remove yet anoter round of str_* functions, replaced with their inlineable
[apps/madmutt.git] / nntp / nntp.c
index 3a1e626..ca3e51e 100644 (file)
@@ -119,7 +119,7 @@ static int nntp_auth (NNTP_SERVER * serv)
     return -1;
   }
 
-  if (str_ncmp ("281", buf, 3)) {
+  if (m_strncmp("281", buf, 3)) {
     conn->account.flags = flags;
     mutt_error _("Login failed.");
 
@@ -154,9 +154,9 @@ static int nntp_connect_and_auth (NNTP_SERVER * serv)
   if (mutt_socket_readln (buf, sizeof (buf), conn) < 0)
     return nntp_connect_error (serv);
 
-  if (!str_ncmp ("200", buf, 3))
+  if (!m_strncmp("200", buf, 3))
     mutt_message (_("Connected to %s. Posting ok."), conn->account.host);
-  else if (!str_ncmp ("201", buf, 3))
+  else if (!m_strncmp("201", buf, 3))
     mutt_message (_("Connected to %s. Posting NOT ok."), conn->account.host);
   else {
     mutt_socket_close (conn);
@@ -178,7 +178,7 @@ static int nntp_connect_and_auth (NNTP_SERVER * serv)
   if (mutt_socket_readln (buf, sizeof (buf), conn) < 0)
     return nntp_connect_error (serv);
 
-  if (!(conn->account.flags & M_ACCT_USER) && str_ncmp ("480", buf, 3)) {
+  if (!(conn->account.flags & M_ACCT_USER) && m_strncmp("480", buf, 3)) {
     serv->status = NNTP_OK;
     return 0;
   }
@@ -210,30 +210,30 @@ static int nntp_attempt_features (NNTP_SERVER * serv)
   mutt_socket_write (conn, "XOVER\r\n");
   if (mutt_socket_readln (buf, sizeof (buf), conn) < 0)
     return nntp_connect_error (serv);
-  if (str_ncmp ("500", buf, 3))
+  if (m_strncmp("500", buf, 3))
     serv->hasXOVER = 1;
 
   mutt_socket_write (conn, "XPAT\r\n");
   if (mutt_socket_readln (buf, sizeof (buf), conn) < 0)
     return nntp_connect_error (serv);
-  if (str_ncmp ("500", buf, 3))
+  if (m_strncmp("500", buf, 3))
     serv->hasXPAT = 1;
 
 #if WANT_LISTGROUP_COMMAND
   mutt_socket_write (conn, "LISTGROUP\r\n");
   if (mutt_socket_readln (buf, sizeof (buf), conn) < 0)
     return (nntp_connect_error (serv));
-  if (str_ncmp ("500", buf, 3))
+  if (m_strncmp("500", buf, 3))
     serv->hasLISTGROUP = 1;
 #endif
 
   mutt_socket_write (conn, "XGTITLE +\r\n");
   if (mutt_socket_readln (buf, sizeof (buf), conn) < 0)
     return nntp_connect_error (serv);
-  if (str_ncmp ("500", buf, 3))
+  if (m_strncmp("500", buf, 3))
     serv->hasXGTITLE = 1;
 
-  if (!str_ncmp ("282", buf, 3)) {
+  if (!m_strncmp("282", buf, 3)) {
     do {
       if (mutt_socket_readln (buf, sizeof (buf), conn) < 0)
         return nntp_connect_error (serv);
@@ -307,7 +307,7 @@ static int mutt_nntp_query (NNTP_DATA * data, char *line, size_t linelen)
       if (*line)
         done = FALSE;
     }
-    else if ((!str_ncmp ("480", buf, 3)) && nntp_auth (data->nserv) < 0)
+    else if ((!m_strncmp("480", buf, 3)) && nntp_auth (data->nserv) < 0)
       return -1;
   } while (!done);
 
@@ -891,11 +891,11 @@ int nntp_open_mailbox (CONTEXT * ctx)
     return -1;
   }
 
-  if (str_ncmp ("211", buf, 3)) {
+  if (m_strncmp("211", buf, 3)) {
     LIST *l = serv->list;
 
     /* GROUP command failed */
-    if (!str_ncmp ("411", buf, 3)) {
+    if (!m_strncmp("411", buf, 3)) {
       mutt_error (_("Newsgroup %s not found on server %s"),
                   nntp_data->group, serv->conn->account.host);
 
@@ -1208,7 +1208,7 @@ static int _nntp_check_mailbox (CONTEXT * ctx, NNTP_DATA * nntp_data)
 #endif
     return -1;
   }
-  if (str_ncmp ("211", buf, 3)) {
+  if (m_strncmp("211", buf, 3)) {
     buf[0] = 0;
     if (mutt_nntp_query (nntp_data, buf, sizeof (buf)) < 0) {
 #ifdef DEBUG
@@ -1217,7 +1217,7 @@ static int _nntp_check_mailbox (CONTEXT * ctx, NNTP_DATA * nntp_data)
       return -1;
     }
   }
-  if (!str_ncmp ("211", buf, 3)) {
+  if (!m_strncmp("211", buf, 3)) {
     int first;
     int last;