exit str_cmp enters m_strcmp
authorPierre Habouzit <madcoder@debian.org>
Sun, 29 Oct 2006 19:20:02 +0000 (20:20 +0100)
committerPierre Habouzit <madcoder@debian.org>
Sun, 29 Oct 2006 19:20:02 +0000 (20:20 +0100)
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
49 files changed:
account.c
alias.c
attach.c
browser.c
color.c
commands.c
complete.c
compose.c
crypt-gpgme.c
curs_lib.c
edit.c
gnupgparse.c
help.c
history.c
hook.c
imap/browse.c
imap/command.c
imap/imap.c
init.c
keymap.c
lib-lib/ascii.h
lib/rx.c
lib/str.c
lib/str.h
main.c
mbox.c
mh.c
mutt_ssl_gnutls.c
muttlib.c
mx.c
nntp/newsrc.c
nntp/nntp.c
pager.c
parse.c
pattern.c
pgp.c
pop/pop.c
pop/pop_lib.c
recvattach.c
remailer.c
rfc1524.c
rfc2231.c
score.c
send.c
sendlib.c
sidebar.c
sort.c
state.c
thread.c

index 5270c2e..2c1eb5c 100644 (file)
--- a/account.c
+++ b/account.c
@@ -57,11 +57,11 @@ int mutt_account_match (const ACCOUNT * a1, const ACCOUNT * a2)
 #endif
 
   if (a1->flags & a2->flags & M_ACCT_USER)
-    return (!str_cmp (a1->user, a2->user));
+    return (!m_strcmp(a1->user, a2->user));
   if (a1->flags & M_ACCT_USER)
-    return (!str_cmp (a1->user, user));
+    return (!m_strcmp(a1->user, user));
   if (a2->flags & M_ACCT_USER)
-    return (!str_cmp (a2->user, user));
+    return (!m_strcmp(a2->user, user));
 
   return 1;
 }
diff --git a/alias.c b/alias.c
index e287551..b1acd23 100644 (file)
--- a/alias.c
+++ b/alias.c
@@ -66,7 +66,7 @@ static ADDRESS *mutt_expand_aliases_r (ADDRESS * a, LIST ** expn)
       if (t) {
         i = 0;
         for (u = *expn; u; u = u->next) {
-          if (str_cmp (a->mailbox, u->data) == 0) { /* alias already found */
+          if (m_strcmp(a->mailbox, u->data) == 0) { /* alias already found */
             debug_print(1, ("loop in alias found for '%s'\n", a->mailbox));
             i = 1;
             break;
@@ -419,7 +419,7 @@ int mutt_alias_complete (char *s, size_t buflen)
     }
 
     if (bestname[0] != 0) {
-      if (str_cmp (bestname, s) != 0) {
+      if (m_strcmp(bestname, s) != 0) {
         /* we are adding something to the completion */
         strfcpy (s, bestname, m_strlen(bestname) + 1);
         return 1;
index 5480710..96867b9 100644 (file)
--- a/attach.c
+++ b/attach.c
@@ -279,7 +279,7 @@ static int is_mmnoask (const char *buf)
   int lng;
 
   if ((p = getenv ("MM_NOASK")) != NULL && *p) {
-    if (str_cmp (p, "1") == 0)
+    if (m_strcmp(p, "1") == 0)
       return (1);
 
     strfcpy (tmp, p, sizeof (tmp));
@@ -435,7 +435,7 @@ int mutt_view_attachment (FILE * fp, BODY * a, int flag, HEADER * hdr,
 
     if (rfc1524_expand_filename (entry->nametemplate, fname,
                                  tempfile, sizeof (tempfile))) {
-      if (fp == NULL && str_cmp (tempfile, a->filename)) {
+      if (fp == NULL && m_strcmp(tempfile, a->filename)) {
         /* send case: the file is already there */
         if (safe_symlink (a->filename, tempfile) == -1) {
           if (mutt_yesorno (_("Can't match nametemplate, continue?"), M_YES)
index 18b442f..3477f9a 100644 (file)
--- a/browser.c
+++ b/browser.c
@@ -530,7 +530,7 @@ static int examine_directory (MUTTMENU * menu, struct browser_state *state,
     init_state (state, menu);
 
     while ((de = readdir (dp)) != NULL) {
-      if (str_cmp (de->d_name, ".") == 0)
+      if (m_strcmp(de->d_name, ".") == 0)
         continue;               /* we don't need . */
 
       if (prefix && *prefix
@@ -892,8 +892,8 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files,
           /* save the old directory */
           strfcpy (OldLastDir, LastDir, sizeof (OldLastDir));
 
-          if (str_cmp (state.entry[menu->current].name, "..") == 0) {
-            if (str_cmp ("..", LastDir + m_strlen(LastDir) - 2) == 0)
+          if (m_strcmp(state.entry[menu->current].name, "..") == 0) {
+            if (m_strcmp("..", LastDir + m_strlen(LastDir) - 2) == 0)
               strcat (LastDir, "/..");  /* __STRCAT_CHECKED__ */
             else {
               char *p = strrchr (LastDir + 1, '/');
diff --git a/color.c b/color.c
index a160d6a..dd29b7f 100644 (file)
--- a/color.c
+++ b/color.c
@@ -402,7 +402,7 @@ _mutt_parse_uncolor (BUFFER * buf, BUFFER * s, unsigned long data,
 
   do {
     mutt_extract_token (buf, s, 0);
-    if (!str_cmp ("*", buf->data)) {
+    if (!m_strcmp("*", buf->data)) {
       for (tmp = ColorIndexList; tmp;) {
         if (!do_cache)
           do_cache = 1;
@@ -415,7 +415,7 @@ _mutt_parse_uncolor (BUFFER * buf, BUFFER * s, unsigned long data,
     else {
       for (last = NULL, tmp = ColorIndexList; tmp;
            last = tmp, tmp = tmp->next) {
-        if (!str_cmp (buf->data, tmp->pattern)) {
+        if (!m_strcmp(buf->data, tmp->pattern)) {
           if (!do_cache)
             do_cache = 1;
           debug_print (1, ("Freeing pattern \"%s\" from ColorIndexList\n", tmp->pattern));
@@ -457,7 +457,7 @@ add_pattern (COLOR_LINE ** top, const char *s, int sensitive,
 
   while (tmp) {
     if (sensitive) {
-      if (str_cmp (s, tmp->pattern) == 0)
+      if (m_strcmp(s, tmp->pattern) == 0)
         break;
     }
     else {
index 889ac8a..eaf2249 100644 (file)
@@ -96,7 +96,7 @@ int mutt_display_message (HEADER * cur)
     }
   }
 
-  if (!Pager || str_cmp (Pager, "builtin") == 0)
+  if (!Pager || m_strcmp(Pager, "builtin") == 0)
     builtin = 1;
   else {
     mutt_make_string (buf, sizeof (buf), NONULL (PagerFmt), Context, cur);
@@ -750,7 +750,7 @@ int mutt_save_message (HEADER * h, int delete,
   /* This is an undocumented feature of ELM pointed out to me by Felix von
    * Leitner <leitner@prz.fu-berlin.de>
    */
-  if (str_cmp (buf, ".") == 0)
+  if (m_strcmp(buf, ".") == 0)
     strfcpy (buf, LastSaveFolder, sizeof (buf));
   else
     strfcpy (LastSaveFolder, buf, sizeof (LastSaveFolder));
index a385af4..491d897 100644 (file)
@@ -174,8 +174,8 @@ int mutt_complete (char *s, size_t slen)
    */
   if ((len = m_strlen(filepart)) == 0) {
     while ((de = readdir (dirp)) != NULL) {
-      if (str_cmp (".", de->d_name) != 0
-          && str_cmp ("..", de->d_name) != 0) {
+      if (m_strcmp(".", de->d_name) != 0
+          && m_strcmp("..", de->d_name) != 0) {
         strfcpy (filepart, de->d_name, sizeof (filepart));
         init++;
         break;
@@ -219,7 +219,7 @@ int mutt_complete (char *s, size_t slen)
 
   if (dirpart[0]) {
     strfcpy (s, dirpart, slen);
-    if (str_cmp ("/", dirpart) != 0 && dirpart[0] != '='
+    if (m_strcmp("/", dirpart) != 0 && dirpart[0] != '='
         && dirpart[0] != '+')
       strfcpy (s + m_strlen(s), "/", slen - m_strlen(s));
     strfcpy (s + m_strlen(s), filepart, slen - m_strlen(s));
index f5d6d2b..5a9c76a 100644 (file)
--- a/compose.c
+++ b/compose.c
@@ -696,7 +696,7 @@ int mutt_compose_menu (HEADER * msg,    /* structure for new message */
       mutt_message_hook (NULL, msg, M_SEND2HOOK);
       break;
     case OP_COMPOSE_EDIT_MESSAGE:
-      if (Editor && (str_cmp ("builtin", Editor) != 0)
+      if (Editor && (m_strcmp("builtin", Editor) != 0)
           && !option (OPTEDITHDRS)) {
         mutt_edit_file (Editor, msg->content->filename);
         mutt_update_encoding (msg->content);
@@ -706,7 +706,7 @@ int mutt_compose_menu (HEADER * msg,    /* structure for new message */
       }
       /* fall through */
     case OP_COMPOSE_EDIT_HEADERS:
-      if (str_cmp ("builtin", Editor) != 0 &&
+      if (m_strcmp("builtin", Editor) != 0 &&
           (op == OP_COMPOSE_EDIT_HEADERS ||
            (op == OP_COMPOSE_EDIT_MESSAGE && option (OPTEDITHDRS)))) {
         const char *tag = NULL, *err = NULL;
index 2a370b0..0d5cd89 100644 (file)
@@ -1006,7 +1006,7 @@ static int show_sig_summary (unsigned long sum,
       state_attach_puts (": ", s);
       if (t0)
         state_attach_puts (t0, s);
-      if (t1 && !(t0 && !str_cmp (t0, t1))) {
+      if (t1 && !(t0 && !m_strcmp(t0, t1))) {
         if (t0)
           state_attach_puts (",", s);
         state_attach_puts (t1, s);
@@ -1660,9 +1660,9 @@ static int pgp_check_traditional_one_body (FILE * fp, BODY * b,
 
   while (fgets (buf, sizeof (buf), tfp)) {
     if (!str_ncmp ("-----BEGIN PGP ", buf, 15)) {
-      if (!str_cmp ("MESSAGE-----\n", buf + 15))
+      if (!m_strcmp("MESSAGE-----\n", buf + 15))
         enc = 1;
-      else if (!str_cmp ("SIGNED MESSAGE-----\n", buf + 15))
+      else if (!m_strcmp("SIGNED MESSAGE-----\n", buf + 15))
         sgn = 1;
     }
   }
@@ -1741,7 +1741,7 @@ static void copy_clearsigned (gpgme_data_t data, STATE * s, char *charset)
       continue;
     }
 
-    if (!str_cmp (buf, "-----BEGIN PGP SIGNATURE-----\n"))
+    if (!m_strcmp(buf, "-----BEGIN PGP SIGNATURE-----\n"))
       break;
 
     if (armor_header) {
@@ -1806,14 +1806,14 @@ int pgp_gpgme_application_handler (BODY * m, STATE * s)
       clearsign = 0;
       start_pos = last_pos;
 
-      if (!str_cmp ("MESSAGE-----\n", buf + 15))
+      if (!m_strcmp("MESSAGE-----\n", buf + 15))
         needpass = 1;
-      else if (!str_cmp ("SIGNED MESSAGE-----\n", buf + 15)) {
+      else if (!m_strcmp("SIGNED MESSAGE-----\n", buf + 15)) {
         clearsign = 1;
         needpass = 0;
       }
       else if (!option (OPTDONTHANDLEPGPKEYS) &&
-               !str_cmp ("PUBLIC KEY BLOCK-----\n", buf + 15)) {
+               !m_strcmp("PUBLIC KEY BLOCK-----\n", buf + 15)) {
         needpass = 0;
         pgp_keyblock = 1;
       }
@@ -1837,10 +1837,10 @@ int pgp_gpgme_application_handler (BODY * m, STATE * s)
 
         gpgme_data_write (armored_data, buf, m_strlen(buf));
 
-        if ((needpass && !str_cmp ("-----END PGP MESSAGE-----\n", buf))
+        if ((needpass && !m_strcmp("-----END PGP MESSAGE-----\n", buf))
             || (!needpass
-                && (!str_cmp ("-----END PGP SIGNATURE-----\n", buf)
-                    || !str_cmp ("-----END PGP PUBLIC KEY BLOCK-----\n",
+                && (!m_strcmp("-----END PGP SIGNATURE-----\n", buf)
+                    || !m_strcmp("-----END PGP PUBLIC KEY BLOCK-----\n",
                                      buf))))
           break;
       }
@@ -2482,7 +2482,7 @@ static int print_dn_part (FILE * fp, struct dn_array_s *dn, const char *key)
   int any = 0;
 
   for (; dn->key; dn++) {
-    if (!str_cmp (dn->key, key)) {
+    if (!m_strcmp(dn->key, key)) {
       if (any)
         fputs (" + ", fp);
       print_utf8 (fp, dn->value, m_strlen(dn->value));
@@ -2508,7 +2508,7 @@ static void print_dn_parts (FILE * fp, struct dn_array_s *dn)
   /* now print the rest without any specific ordering */
   for (; dn->key; dn++) {
     for (i = 0; stdpart[i]; i++) {
-      if (!str_cmp (dn->key, stdpart[i]))
+      if (!m_strcmp(dn->key, stdpart[i]))
         break;
     }
     if (!stdpart[i]) {
@@ -2981,7 +2981,7 @@ static void verify_key (crypt_key_t * key)
 
   k = key->kobj;
   gpgme_key_ref (k);
-  while ((s = k->chain_id) && k->subkeys && str_cmp (s, k->subkeys->fpr)) {
+  while ((s = k->chain_id) && k->subkeys && m_strcmp(s, k->subkeys->fpr)) {
     putc ('\n', fp);
     err = gpgme_op_keylist_start (listctx, s, 0);
     gpgme_key_release (k);
index be5583f..4203b0e 100644 (file)
@@ -420,7 +420,7 @@ int mutt_do_pager (const char *banner,
 {
   int rc;
 
-  if (!Pager || str_cmp (Pager, "builtin") == 0)
+  if (!Pager || m_strcmp(Pager, "builtin") == 0)
     rc = mutt_pager (banner, tempfile, do_color, info);
   else {
     char cmd[STRING];
diff --git a/edit.c b/edit.c
index 47f4480..4360c1f 100644 (file)
--- a/edit.c
+++ b/edit.c
@@ -436,7 +436,7 @@ int mutt_builtin_editor (const char *path, HEADER * msg, HEADER * cur)
         break;
       }
     }
-    else if (str_cmp (".", tmp) == 0)
+    else if (m_strcmp(".", tmp) == 0)
       done = 1;
     else {
       str_cat (tmp, sizeof (tmp), "\n");
index 4d2d72d..ef08bcd 100644 (file)
@@ -131,13 +131,13 @@ static pgp_key_t parse_pub_line (char *buf, int *is_subkey, pgp_key_t k)
       {
         debug_print (2, ("record type: %s\n", p));
 
-        if (!str_cmp (p, "pub"));
-        else if (!str_cmp (p, "sub"))
+        if (!m_strcmp(p, "pub"));
+        else if (!m_strcmp(p, "sub"))
           *is_subkey = 1;
-        else if (!str_cmp (p, "sec"));
-        else if (!str_cmp (p, "ssb"))
+        else if (!m_strcmp(p, "sec"));
+        else if (!m_strcmp(p, "ssb"))
           *is_subkey = 1;
-        else if (!str_cmp (p, "uid"))
+        else if (!m_strcmp(p, "uid"))
           is_uid = 1;
         else
           return NULL;
diff --git a/help.c b/help.c
index 249882e..72d0610 100644 (file)
--- a/help.c
+++ b/help.c
@@ -172,7 +172,7 @@ static void format_line (FILE * f, int ismacro,
   }
 
   if (ismacro > 0) {
-    if (!str_cmp (Pager, "builtin"))
+    if (!m_strcmp(Pager, "builtin"))
       fputs ("_\010", f);
     fputs ("M ", f);
     col += 2;
@@ -213,7 +213,7 @@ static void format_line (FILE * f, int ismacro,
       print_macro (f, n, &t3);
 
       if (*t3) {
-        if (str_cmp (Pager, "builtin")) {
+        if (m_strcmp(Pager, "builtin")) {
           fputc ('\n', f);
           n = 0;
         }
index 215a0ef..e138f29 100644 (file)
--- a/history.c
+++ b/history.c
@@ -71,7 +71,7 @@ void mutt_history_add (history_class_t hclass, const char *s)
     prev = h->last - 1;
     if (prev < 0)
       prev = HistSize - 1;
-    if (!h->hist[prev] || str_cmp (h->hist[prev], s) != 0) {
+    if (!h->hist[prev] || m_strcmp(h->hist[prev], s) != 0) {
       str_replace (&h->hist[h->last++], s);
       if (h->last > HistSize - 1)
         h->last = 0;
diff --git a/hook.c b/hook.c
index 4222f52..1f8fc1e 100644 (file)
--- a/hook.c
+++ b/hook.c
@@ -125,14 +125,14 @@ int mutt_parse_hook (BUFFER * buf, BUFFER * s, unsigned long data,
   /* check to make sure that a matching hook doesn't already exist */
   for (ptr = Hooks; ptr; ptr = ptr->next) {
     if (ptr->type == data &&
-        ptr->rx.not == not && !str_cmp (pattern.data, ptr->rx.pattern)) {
+        ptr->rx.not == not && !m_strcmp(pattern.data, ptr->rx.pattern)) {
       if (data &
           (M_FOLDERHOOK | M_SENDHOOK | M_SEND2HOOK | M_MESSAGEHOOK |
            M_ACCOUNTHOOK | M_REPLYHOOK)) {
         /* these hooks allow multiple commands with the same
          * pattern, so if we've already seen this pattern/command pair, just
          * ignore it instead of creating a duplicate */
-        if (!str_cmp (ptr->command, command.data)) {
+        if (!m_strcmp(ptr->command, command.data)) {
           p_delete(&command.data);
           p_delete(&pattern.data);
           return 0;
@@ -244,7 +244,7 @@ int mutt_parse_unhook (BUFFER * buf, BUFFER * s, unsigned long data,
 {
   while (MoreArgs (s)) {
     mutt_extract_token (buf, s, 0);
-    if (str_cmp ("*", buf->data) == 0) {
+    if (m_strcmp("*", buf->data) == 0) {
       if (current_hook_type) {
         snprintf (err->data, err->dsize,
                   _("unhook: Can't do unhook * from within a hook."));
index 68974a2..d9bdf83 100644 (file)
@@ -440,7 +440,7 @@ static void imap_add_folder (char delim, char *folder, int noselect,
 
 static int compare_names (struct folder_file *a, struct folder_file *b)
 {
-  return str_cmp (a->name, b->name);
+  return m_strcmp(a->name, b->name);
 }
 
 static int browse_get_namespace (IMAP_DATA * idata, char *nsbuf, int nsblen,
index 411dc50..6c470e8 100644 (file)
@@ -572,7 +572,7 @@ static void cmd_parse_lsub (IMAP_DATA* idata, char* s) {
     strfcpy (buf, "mailboxes \"", sizeof (buf));
     mutt_account_tourl (&idata->conn->account, &url);
     url.path = s;
-    if (!str_cmp (url.user, ImapUser))
+    if (!m_strcmp(url.user, ImapUser))
       url.user = NULL;
     url_ciss_tostring (&url, buf + 11, sizeof (buf) - 10, 0);
     str_cat (buf, sizeof (buf), "\"");
index e7b4adc..6f50317 100644 (file)
@@ -1181,7 +1181,7 @@ int imap_mailbox_check (char *path, int new)
    * command on a mailbox that you have selected 
    */
 
-  if (str_cmp (mbox_unquoted, idata->mailbox) == 0
+  if (m_strcmp(mbox_unquoted, idata->mailbox) == 0
       || (ascii_strcasecmp (mbox_unquoted, "INBOX") == 0
           && str_casecmp (mbox_unquoted, idata->mailbox) == 0)) {
     strfcpy (buf, "NOOP", sizeof (buf));
diff --git a/init.c b/init.c
index 63b3470..88d3423 100644 (file)
--- a/init.c
+++ b/init.c
@@ -207,7 +207,7 @@ static int bool_from_string (struct option_t* dst, const char* val,
 static void num_to_string (char* dst, size_t dstlen,
                            struct option_t* option) {
   /* XXX puke */
-  const char* fmt = (str_cmp (option->option, "umask") == 0) ?
+  const char* fmt = (m_strcmp(option->option, "umask") == 0) ?
                     "%s=%04o" : "%s=%d";
   snprintf (dst, dstlen, fmt, option->option,
             *((short*) option->data));
@@ -427,7 +427,7 @@ static int rx_from_string (struct option_t* dst, const char* val,
   if (!dst)
     return (0);
 
-  if (option (OPTATTACHMSG) && !str_cmp (dst->option, "reply_regexp")) {
+  if (option (OPTATTACHMSG) && !m_strcmp(dst->option, "reply_regexp")) {
     if (errbuf)
       snprintf (errbuf, errlen,
                 "Operation not permitted when in attach-message mode.");
@@ -440,14 +440,14 @@ static int rx_from_string (struct option_t* dst, const char* val,
   p = (rx_t*) dst->data;
 
   /* something to do? */
-  if (!val || !*val || (p->pattern && str_cmp (p->pattern, val) == 0))
+  if (!val || !*val || (p->pattern && m_strcmp(p->pattern, val) == 0))
     return (1);
 
-  if (str_cmp (dst->option, "mask") != 0)
+  if (m_strcmp(dst->option, "mask") != 0)
     flags |= mutt_which_case (val);
 
   s = (char*) val;
-  if (str_cmp (dst->option, "mask") == 0 && *s == '!') {
+  if (m_strcmp(dst->option, "mask") == 0 && *s == '!') {
     not = 1;
     s++;
   }
@@ -470,7 +470,7 @@ static int rx_from_string (struct option_t* dst, const char* val,
   p->rx = rx;
   p->not = not;
 
-  if (str_cmp (dst->option, "reply_regexp") == 0)
+  if (m_strcmp(dst->option, "reply_regexp") == 0)
     mutt_adjust_all_subjects ();
 
   return (1);
@@ -749,7 +749,7 @@ static int remove_from_spam_list (SPAM_LIST ** list, const char *pat)
   spam = *list;
   if (!spam)
     return 0;
-  if (spam->rx && !str_cmp (spam->rx->pattern, pat)) {
+  if (spam->rx && !m_strcmp(spam->rx->pattern, pat)) {
     *list = spam->next;
     rx_free (&spam->rx);
     p_delete(&spam->template);
@@ -759,7 +759,7 @@ static int remove_from_spam_list (SPAM_LIST ** list, const char *pat)
 
   prev = spam;
   for (spam = prev->next; spam;) {
-    if (!str_cmp (spam->rx->pattern, pat)) {
+    if (!m_strcmp(spam->rx->pattern, pat)) {
       prev->next = spam->next;
       rx_free (&spam->rx);
       p_delete(&spam->template);
@@ -779,7 +779,7 @@ static void remove_from_list (LIST ** l, const char *str)
 {
   LIST *p, *last = NULL;
 
-  if (str_cmp ("*", str) == 0)
+  if (m_strcmp("*", str) == 0)
     mutt_free_list (l);         /* ``unCMD *'' means delete all current entries */
   else {
     p = *l;
@@ -805,7 +805,7 @@ static int remove_from_rx_list (list2_t** l, const char *str)
 {
   int i = 0;
 
-  if (str_cmp ("*", str) == 0) {
+  if (m_strcmp("*", str) == 0) {
     list_del (l, (list_del_t*) rx_free);
     return (0);
   }
@@ -959,7 +959,7 @@ static int parse_unalternates (BUFFER * buf, BUFFER * s, unsigned long data,
     mutt_extract_token (buf, s, 0);
     remove_from_rx_list (&Alternates, buf->data);
 
-    if (str_cmp (buf->data, "*") &&
+    if (m_strcmp(buf->data, "*") &&
         add_to_rx_list (&UnAlternates, buf->data, REG_ICASE, err) != 0)
       return -1;
 
@@ -1015,7 +1015,7 @@ static int parse_spam_list (BUFFER * buf, BUFFER * s, unsigned long data,
     /* nospam only ever has one parameter. */
 
     /* "*" is a special case. */
-    if (!str_cmp (buf->data, "*")) {
+    if (!m_strcmp(buf->data, "*")) {
       mutt_free_spam_list (&SpamList);
       list_del (&NoSpamList, (list_del_t*) rx_free);
       return 0;
@@ -1045,7 +1045,7 @@ static int parse_unlist (BUFFER * buf, BUFFER * s, unsigned long data,
     /*
      * Check for deletion of entire list
      */
-    if (str_cmp (buf->data, "*") == 0) {
+    if (m_strcmp(buf->data, "*") == 0) {
       mutt_free_list ((LIST **) data);
       break;
     }
@@ -1320,7 +1320,7 @@ static int parse_unlists (BUFFER * buf, BUFFER * s, unsigned long data,
     remove_from_rx_list (&SubscribedLists, buf->data);
     remove_from_rx_list (&MailLists, buf->data);
 
-    if (str_cmp (buf->data, "*") &&
+    if (m_strcmp(buf->data, "*") &&
         add_to_rx_list (&UnMailLists, buf->data, REG_ICASE, err) != 0)
       return -1;
   }
@@ -1354,7 +1354,7 @@ static int parse_unsubscribe (BUFFER * buf, BUFFER * s, unsigned long data,
     mutt_extract_token (buf, s, 0);
     remove_from_rx_list (&SubscribedLists, buf->data);
 
-    if (str_cmp (buf->data, "*") &&
+    if (m_strcmp(buf->data, "*") &&
         add_to_rx_list (&UnSubscribedLists, buf->data, REG_ICASE, err) != 0)
       return -1;
   }
@@ -1371,7 +1371,7 @@ static int parse_unalias (BUFFER * buf, BUFFER * s, unsigned long data,
   do {
     mutt_extract_token (buf, s, 0);
 
-    if (str_cmp ("*", buf->data) == 0) {
+    if (m_strcmp("*", buf->data) == 0) {
       if (CurrentMenu == MENU_ALIAS) {
         for (tmp = Aliases; tmp; tmp = tmp->next)
           tmp->del = 1;
@@ -1483,7 +1483,7 @@ parse_unmy_hdr (BUFFER * buf, BUFFER * s, unsigned long data, BUFFER * err)
 
   do {
     mutt_extract_token (buf, s, 0);
-    if (str_cmp ("*", buf->data) == 0)
+    if (m_strcmp("*", buf->data) == 0)
       mutt_free_list (&UserHeader);
     else {
       tmp = UserHeader;
@@ -1780,7 +1780,7 @@ static int check_special (const char* name, unsigned long val,
   int i = 0;
 
   for (i = 0; SpecialVars[i].name; i++) {
-    if (str_cmp (SpecialVars[i].name, name) == 0) {
+    if (m_strcmp(SpecialVars[i].name, name) == 0) {
       return (SpecialVars[i].check (SpecialVars[i].name,
                                     val, errbuf, errlen));
     }
@@ -1873,7 +1873,7 @@ static int parse_set (BUFFER * tmp, BUFFER * s, unsigned long data,
       }
     }
 
-    if (!option && !(reset && str_cmp ("all", tmp->data) == 0)) {
+    if (!option && !(reset && m_strcmp("all", tmp->data) == 0)) {
       snprintf (err->data, err->dsize, _("%s: unknown variable"), tmp->data);
       return (-1);
     }
@@ -1890,7 +1890,7 @@ static int parse_set (BUFFER * tmp, BUFFER * s, unsigned long data,
         return (-1);
       }
 
-      if (!str_cmp ("all", tmp->data)) {
+      if (!m_strcmp("all", tmp->data)) {
         if (CurrentMenu == MENU_PAGER) {
           snprintf (err->data, err->dsize, _("Not available in this menu."));
           return (-1);
@@ -2185,7 +2185,7 @@ int mutt_parse_rc_line ( /* const */ char *line, BUFFER * token, BUFFER * err)
     }
     mutt_extract_token (token, &expn, 0);
     for (i = 0; Commands[i].name; i++) {
-      if (!str_cmp (token->data, Commands[i].name)) {
+      if (!m_strcmp(token->data, Commands[i].name)) {
         if (Commands[i].func (token, &expn, Commands[i].data, err) != 0)
           goto finish;
         break;
@@ -2883,7 +2883,7 @@ int mutt_get_hook_type (const char *name)
 
 /* compare two option_t*'s for sorting -t/-T output */
 static int opt_cmp (const void* a, const void* b) {
-  return (str_cmp ((*(struct option_t**) a)->option,
+  return (m_strcmp((*(struct option_t**) a)->option,
                        (*(struct option_t**) b)->option));
 }
 
@@ -2909,7 +2909,7 @@ static void opt_sel_diff (const char* key, void* data,
     return;
 
   mutt_option_value (option->option, buf, sizeof(buf));
-  if (str_cmp (buf, option->init) != 0)
+  if (m_strcmp(buf, option->init) != 0)
     list_push_back (l, option);
 }
 
index 93f8225..76ac63c 100644 (file)
--- a/keymap.c
+++ b/keymap.c
@@ -722,7 +722,7 @@ try_bind (char *key, int menu, char *func, struct binding_t *bindings)
   int i;
 
   for (i = 0; bindings[i].name; i++)
-    if (str_cmp (func, bindings[i].name) == 0) {
+    if (m_strcmp(func, bindings[i].name) == 0) {
       km_bindkey (key, menu, bindings[i].op);
       return (0);
     }
index e268e14..5911dec 100644 (file)
@@ -49,7 +49,7 @@ static inline int ascii_tolower(int c) {
 int ascii_strcasecmp(const char *a, const char *b);
 int ascii_strncasecmp(const char *a, const char *b, int n);
 
-#define ascii_strcmp(a,b)     str_cmp(a,b)
+#define ascii_strcmp(a,b)     m_strcmp(a,b)
 #define ascii_strncmp(a,b,c)  str_ncmp(a,b,c)
 
 #endif /* MUTT_LIB_LIB_ASCII_H */
index 5595108..230bf3d 100644 (file)
--- a/lib/rx.c
+++ b/lib/rx.c
@@ -33,7 +33,7 @@ void rx_free (rx_t** p) {
 }
 
 int rx_compare (const rx_t* r1, const rx_t* r2) {
-  return (str_cmp (r1->pattern, r2->pattern));
+  return (m_strcmp(r1->pattern, r2->pattern));
 }
 
 int rx_list_match (list2_t* l, const char* pat) {
@@ -51,7 +51,7 @@ int rx_lookup (list2_t* l, const char* pat) {
   if (!pat || !*pat || list_empty(l))
     return (-1);
   for (i = 0; i < l->length; i++)
-    if (str_cmp (((rx_t*) l->data[i])->pattern, pat) == 0)
+    if (m_strcmp(((rx_t*) l->data[i])->pattern, pat) == 0)
       return (i);
   return (-1);
 }
index 7eb2efc..f90e861 100644 (file)
--- a/lib/str.c
+++ b/lib/str.c
@@ -55,11 +55,6 @@ char *str_ncat (char *d, size_t l, const char *s, size_t sl)
   return p;
 }
 
-int str_cmp (const char *a, const char *b)
-{
-  return strcmp (NONULL (a), NONULL (b));
-}
-
 int str_casecmp (const char *a, const char *b)
 {
   return strcasecmp (NONULL (a), NONULL (b));
index 8629d15..b2457d4 100644 (file)
--- a/lib/str.h
+++ b/lib/str.h
@@ -41,7 +41,6 @@
  */
 char *str_cat (char*, size_t, const char*);
 char *str_ncat (char*, size_t, const char*, size_t);
-int str_cmp (const char*, const char*);
 int str_casecmp (const char*, const char*);
 int str_ncmp (const char*, const char*, size_t);
 int str_ncasecmp (const char*, const char*, size_t);
diff --git a/main.c b/main.c
index 916f7f0..66c5f7a 100644 (file)
--- a/main.c
+++ b/main.c
@@ -880,7 +880,7 @@ int main (int argc, char **argv)
 
     if (infile || bodytext) {
       if (infile) {
-        if (str_cmp ("-", infile) == 0)
+        if (m_strcmp("-", infile) == 0)
           fin = stdin;
         else {
           char path[_POSIX_PATH_MAX];
diff --git a/mbox.c b/mbox.c
index 1485ad7..3b9fba0 100644 (file)
--- a/mbox.c
+++ b/mbox.c
@@ -128,7 +128,7 @@ static int mmdf_parse_mailbox (CONTEXT * ctx)
     if (fgets (buf, sizeof (buf) - 1, ctx->fp) == NULL)
       break;
 
-    if (str_cmp (buf, MMDF_SEP) == 0) {
+    if (m_strcmp(buf, MMDF_SEP) == 0) {
       loc = ftello (ctx->fp);
 
       count++;
@@ -172,7 +172,7 @@ static int mmdf_parse_mailbox (CONTEXT * ctx)
         if (0 < tmploc && tmploc < ctx->size) {
           if (fseeko (ctx->fp, tmploc, SEEK_SET) != 0 ||
               fgets (buf, sizeof (buf) - 1, ctx->fp) == NULL ||
-              str_cmp (MMDF_SEP, buf) != 0) {
+              m_strcmp(MMDF_SEP, buf) != 0) {
             if (fseeko (ctx->fp, loc, SEEK_SET) != 0)
               debug_print (1, ("fseeko() failed\n"));
             hdr->content->length = -1;
@@ -191,7 +191,7 @@ static int mmdf_parse_mailbox (CONTEXT * ctx)
           if (fgets (buf, sizeof (buf) - 1, ctx->fp) == NULL)
             break;
           lines++;
-        } while (str_cmp (buf, MMDF_SEP) != 0);
+        } while (m_strcmp(buf, MMDF_SEP) != 0);
 
         hdr->lines = lines;
         hdr->content->length = loc - hdr->content->offset;
@@ -470,7 +470,7 @@ static int _mbox_check_mailbox (CONTEXT * ctx, int *index_hint)
         debug_print (1, ("fseeko() failed\n"));
       if (fgets (buffer, sizeof (buffer), ctx->fp) != NULL) {
         if ((ctx->magic == M_MBOX && str_ncmp ("From ", buffer, 5) == 0)
-            || (ctx->magic == M_MMDF && str_cmp (MMDF_SEP, buffer) == 0)) {
+            || (ctx->magic == M_MMDF && m_strcmp(MMDF_SEP, buffer) == 0)) {
           if (fseeko (ctx->fp, ctx->size, SEEK_SET) != 0)
             debug_print (1, ("fseeko() failed\n"));
           if (ctx->magic == M_MBOX)
@@ -752,7 +752,7 @@ static int _mbox_sync_mailbox (CONTEXT * ctx, int unused, int *index_hint)
       /* do a sanity check to make sure the mailbox looks ok */
       fgets (buf, sizeof (buf), ctx->fp) == NULL ||
       (ctx->magic == M_MBOX && str_ncmp ("From ", buf, 5) != 0) ||
-      (ctx->magic == M_MMDF && str_cmp (MMDF_SEP, buf) != 0)) {
+      (ctx->magic == M_MMDF && m_strcmp(MMDF_SEP, buf) != 0)) {
     debug_print (1, ("message not in expected position.\n"));
     debug_print (1, ("LINE: %s\n", buf));
     i = -1;
@@ -1095,7 +1095,7 @@ int mbox_is_magic (const char* path, struct stat* st) {
     fgets (tmp, sizeof (tmp), f);
     if (str_ncmp ("From ", tmp, 5) == 0)
       magic = M_MBOX;
-    else if (str_cmp (MMDF_SEP, tmp) == 0)
+    else if (m_strcmp(MMDF_SEP, tmp) == 0)
       magic = M_MMDF;
     safe_fclose (&f);
 #ifndef BUFFY_SIZE
diff --git a/mh.c b/mh.c
index 1b9c7a6..8f40b39 100644 (file)
--- a/mh.c
+++ b/mh.c
@@ -160,11 +160,11 @@ static void mh_read_sequences (struct mh_sequences *mhs, const char *path)
     if (!(t = strtok (buff, " \t:")))
       continue;
 
-    if (!str_cmp (t, MhUnseen))
+    if (!m_strcmp(t, MhUnseen))
       f = MH_SEQ_UNSEEN;
-    else if (!str_cmp (t, MhFlagged))
+    else if (!m_strcmp(t, MhFlagged))
       f = MH_SEQ_FLAGGED;
-    else if (!str_cmp (t, MhReplied))
+    else if (!m_strcmp(t, MhReplied))
       f = MH_SEQ_REPLIED;
     else                        /* unknown sequence */
       continue;
@@ -686,7 +686,7 @@ static int maildir_parse_dir (CONTEXT * ctx, struct maildir ***last,
 
   if (subdir) {
     snprintf (buf, sizeof (buf), "%s/%s", ctx->path, subdir);
-    is_old = (str_cmp ("cur", subdir) == 0);
+    is_old = (m_strcmp("cur", subdir) == 0);
   }
   else
     strfcpy (buf, ctx->path, sizeof (buf));
@@ -1364,7 +1364,7 @@ static int maildir_sync_message (CONTEXT * ctx, int msgno)
     snprintf (fullpath, sizeof (fullpath), "%s/%s", ctx->path, partpath);
     snprintf (oldpath, sizeof (oldpath), "%s/%s", ctx->path, h->path);
 
-    if (str_cmp (fullpath, oldpath) == 0) {
+    if (m_strcmp(fullpath, oldpath) == 0) {
       /* message hasn't really changed */
       return 0;
     }
@@ -1629,7 +1629,7 @@ static int maildir_check_mailbox (CONTEXT * ctx, int *index_hint, int unused)
       /* check to see if the message has moved to a different
        * subdirectory.  If so, update the associated filename.
        */
-      if (str_cmp (ctx->hdrs[i]->path, p->h->path))
+      if (m_strcmp(ctx->hdrs[i]->path, p->h->path))
         str_replace (&ctx->hdrs[i]->path, p->h->path);
 
       /* if the user hasn't modified the flags on this message, update
@@ -1814,7 +1814,7 @@ FILE *_maildir_open_find_message (const char *folder, const char *unique,
   while ((de = readdir (dp))) {
     maildir_canon_filename (tunique, de->d_name, sizeof (tunique));
 
-    if (!str_cmp (tunique, unique)) {
+    if (!m_strcmp(tunique, unique)) {
       snprintf (fname, sizeof (fname), "%s/%s/%s", folder, subfolder,
                 de->d_name);
       fp = fopen (fname, "r");  /* __FOPEN_CHECKED__ */
index c8e0ce0..1efbbbe 100644 (file)
@@ -415,8 +415,8 @@ static int tls_check_stored_hostname (const gnutls_datum * cert,
         if (regexec (&preg, linestr, 3, pmatch, 0) == 0) {
           linestr[pmatch[1].rm_eo] = '\0';
           linestr[pmatch[2].rm_eo] = '\0';
-          if (str_cmp (linestr + pmatch[1].rm_so, hostname) == 0 &&
-              str_cmp (linestr + pmatch[2].rm_so, buf) == 0) {
+          if (m_strcmp(linestr + pmatch[1].rm_so, hostname) == 0 &&
+              m_strcmp(linestr + pmatch[2].rm_so, buf) == 0) {
             regfree (&preg);
             p_delete(&linestr);
             fclose (fp);
index 2e15ea0..7dc21d6 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
@@ -1195,7 +1195,7 @@ int mutt_save_confirm (const char *s, struct stat *st)
 
   if (magic > 0 && !mx_access (s, W_OK)) {
     if (option (OPTCONFIRMAPPEND) &&
-        (!TrashPath || (str_cmp (s, TrashPath) != 0))) {
+        (!TrashPath || (m_strcmp(s, TrashPath) != 0))) {
       /* if we're appending to the trash, there's no point in asking */
       snprintf (tmp, sizeof (tmp), _("Append messages to %s?"), s);
       if ((rc = mutt_yesorno (tmp, M_YES)) == M_NO)
@@ -1394,8 +1394,8 @@ int mutt_cmp_header (const HEADER * h1, const HEADER * h2) {
 int mutt_cmp_addr (const ADDRESS * a, const ADDRESS * b)
 {
   while (a && b) {
-    if (str_cmp (a->mailbox, b->mailbox) ||
-        str_cmp (a->personal, b->personal))
+    if (m_strcmp(a->mailbox, b->mailbox) ||
+        m_strcmp(a->personal, b->personal))
       return (0);
 
     a = a->next;
@@ -1410,7 +1410,7 @@ int mutt_cmp_addr (const ADDRESS * a, const ADDRESS * b)
 int mutt_cmp_list (const LIST * a, const LIST * b)
 {
   while (a && b) {
-    if (str_cmp (a->data, b->data))
+    if (m_strcmp(a->data, b->data))
       return (0);
 
     a = a->next;
@@ -1425,8 +1425,8 @@ int mutt_cmp_list (const LIST * a, const LIST * b)
 int mutt_cmp_env (const ENVELOPE * e1, const ENVELOPE * e2)
 {
   if (e1 && e2) {
-    if (str_cmp (e1->message_id, e2->message_id) ||
-        str_cmp (e1->subject, e2->subject) ||
+    if (m_strcmp(e1->message_id, e2->message_id) ||
+        m_strcmp(e1->subject, e2->subject) ||
         !mutt_cmp_list (e1->references, e2->references) ||
         !mutt_cmp_addr (e1->from, e2->from) ||
         !mutt_cmp_addr (e1->sender, e2->sender) ||
@@ -1449,8 +1449,8 @@ int mutt_cmp_env (const ENVELOPE * e1, const ENVELOPE * e2)
 int mutt_cmp_param (const PARAMETER * p1, const PARAMETER * p2)
 {
   while (p1 && p2) {
-    if (str_cmp (p1->attribute, p2->attribute) ||
-        str_cmp (p1->value, p2->value))
+    if (m_strcmp(p1->attribute, p2->attribute) ||
+        m_strcmp(p1->value, p2->value))
       return (0);
 
     p1 = p1->next;
@@ -1466,8 +1466,8 @@ int mutt_cmp_body (const BODY * b1, const BODY * b2)
 {
   if (b1->type != b2->type ||
       b1->encoding != b2->encoding ||
-      str_cmp (b1->subtype, b2->subtype) ||
-      str_cmp (b1->description, b2->description) ||
+      m_strcmp(b1->subtype, b2->subtype) ||
+      m_strcmp(b1->description, b2->description) ||
       !mutt_cmp_param (b1->parameter, b2->parameter) ||
       b1->length != b2->length)
     return (0);
diff --git a/mx.c b/mx.c
index cf924ca..b25d841 100644 (file)
--- a/mx.c
+++ b/mx.c
@@ -73,7 +73,7 @@ static list2_t* MailboxFormats = NULL;
 #define MX_COMMAND(idx,cmd) ((mx_t*) MailboxFormats->data[idx])->cmd
 #define MX_IDX(idx) (idx >= 0 && idx < MailboxFormats->length)
 
-#define mutt_is_spool(s)  (str_cmp (Spoolfile, s) == 0)
+#define mutt_is_spool(s)  (m_strcmp(Spoolfile, s) == 0)
 
 #ifdef USE_DOTLOCK
 /* parameters: 
index fb5fc1b..22b6cf3 100644 (file)
@@ -218,10 +218,10 @@ static int nntp_parse_cacheindex (NNTP_SERVER * news)
     if (!*cp)
       continue;
     cp[0] = 0;
-    if (!str_cmp (buf, "#:"))
+    if (!m_strcmp(buf, "#:"))
       break;
     sscanf (cp + 1, "%s %d %d", file, &l, &m);
-    if (!str_cmp (buf, "ALL")) {
+    if (!m_strcmp(buf, "ALL")) {
       news->cache = m_strdup(file);
       news->newgroups_time = m;
     }
@@ -1085,7 +1085,7 @@ void nntp_buffy (char* dst, size_t dstlen) {
     NNTP_DATA *data = (NNTP_DATA *) list->data;
     if (data && data->subscribed && data->unread && 
         Context && Context->magic == M_NNTP &&
-        str_cmp (data->group, ((NNTP_DATA *) Context->data)->group) == 0) {
+        m_strcmp(data->group, ((NNTP_DATA *) Context->data)->group) == 0) {
       list = list->next;
       break;
     }
@@ -1103,7 +1103,7 @@ void nntp_buffy (char* dst, size_t dstlen) {
 
       if (data && data->subscribed && data->unread) {
         if (Context && Context->magic == M_NNTP &&
-            !str_cmp (data->group, ((NNTP_DATA *) Context->data)->group)) {
+            !m_strcmp(data->group, ((NNTP_DATA *) Context->data)->group)) {
           unsigned int i, unread = 0;
 
           for (i = 0; i < Context->msgcount; i++)
index 24850c8..b70c115 100644 (file)
@@ -440,7 +440,7 @@ static void nntp_parse_xref (CONTEXT * ctx, char *group, char *xref,
       *colon = '\0';
       colon++;
       nntp_get_status (ctx, h, b, atoi (colon));
-      if (h && h->article_num == 0 && str_cmp (group, b) == 0)
+      if (h && h->article_num == 0 && m_strcmp(group, b) == 0)
         h->article_num = atoi (colon);
     }
   }
@@ -512,7 +512,7 @@ static int parse_description (char *line, void *n)
     d++;
   debug_print (2, ("group: %s, desc: %s\n", line, d));
   if ((data = (NNTP_DATA *) hash_find (news->newsgroups, line)) != NULL &&
-      str_cmp (d, data->desc)) {
+      m_strcmp(d, data->desc)) {
     p_delete(&data->desc);
     data->desc = m_strdup(d);
   }
diff --git a/pager.c b/pager.c
index 2e4aa39..13f3908 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -687,8 +687,8 @@ resolve_types (char *buf, char *raw, struct line_t *lineInfo, int n, int last,
   else if (check_attachment_marker ((char *) raw) == 0)
     lineInfo[n].type = MT_COLOR_ATTACHMENT;
 #endif
-  else if (str_cmp ("-- \n", buf) == 0
-           || str_cmp ("-- \r\n", buf) == 0) {
+  else if (m_strcmp("-- \n", buf) == 0
+           || m_strcmp("-- \r\n", buf) == 0) {
     i = n + 1;
 
     lineInfo[n].type = MT_COLOR_SIGNATURE;
diff --git a/parse.c b/parse.c
index 2d1ecd6..5457e65 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -612,7 +612,7 @@ BODY *mutt_parse_multipart (FILE * fp, const char *boundary, off_t end_off,
         buffer[i] = 0;
 
       /* Check for the end boundary */
-      if (str_cmp (buffer + blen + 2, "--") == 0) {
+      if (m_strcmp(buffer + blen + 2, "--") == 0) {
         final = 1;
         break;                  /* done parsing */
       }
index 500d3b3..bb818f0 100644 (file)
--- a/pattern.c
+++ b/pattern.c
@@ -1170,7 +1170,7 @@ void mutt_check_simple (char *s, size_t len, const char *simple)
 
   if (!strchr (s, '~') && !strchr (s, '=')) {       /* yup, so spoof a real request */
     /* convert old tokens into the new format */
-    if (ascii_strcasecmp ("all", s) == 0 || !str_cmp ("^", s) || !str_cmp (".", s))     /* ~A is more efficient */
+    if (ascii_strcasecmp ("all", s) == 0 || !m_strcmp("^", s) || !m_strcmp(".", s))     /* ~A is more efficient */
       strfcpy (s, "~A", len);
     else if (ascii_strcasecmp ("del", s) == 0)
       strfcpy (s, "~D", len);
@@ -1326,7 +1326,7 @@ int mutt_search_command (int cur, int op)
     strfcpy (temp, buf, sizeof (temp));
     mutt_check_simple (temp, sizeof (temp), NONULL (SimpleSearch));
 
-    if (!SearchPattern || str_cmp (temp, LastSearchExpn)) {
+    if (!SearchPattern || m_strcmp(temp, LastSearchExpn)) {
       set_option (OPTSEARCHINVALID);
       strfcpy (LastSearch, buf, sizeof (LastSearch));
       mutt_message _("Compiling search pattern...");
diff --git a/pgp.c b/pgp.c
index 6bd70f2..d40d8cb 100644 (file)
--- a/pgp.c
+++ b/pgp.c
@@ -206,7 +206,7 @@ static void pgp_copy_clearsigned (FILE * fpin, STATE * s, char *charset)
       continue;
     }
 
-    if (str_cmp (buf, "-----BEGIN PGP SIGNATURE-----\n") == 0)
+    if (m_strcmp(buf, "-----BEGIN PGP SIGNATURE-----\n") == 0)
       break;
 
     if (armor_header) {
@@ -272,14 +272,14 @@ int pgp_application_pgp_handler (BODY * m, STATE * s)
       clearsign = 0;
       start_pos = last_pos;
 
-      if (str_cmp ("MESSAGE-----\n", buf + 15) == 0)
+      if (m_strcmp("MESSAGE-----\n", buf + 15) == 0)
         needpass = 1;
-      else if (str_cmp ("SIGNED MESSAGE-----\n", buf + 15) == 0) {
+      else if (m_strcmp("SIGNED MESSAGE-----\n", buf + 15) == 0) {
         clearsign = 1;
         needpass = 0;
       }
       else if (!option (OPTDONTHANDLEPGPKEYS) &&
-               str_cmp ("PUBLIC KEY BLOCK-----\n", buf + 15) == 0) {
+               m_strcmp("PUBLIC KEY BLOCK-----\n", buf + 15) == 0) {
         needpass = 0;
         pgp_keyblock = 1;
       }
@@ -309,10 +309,10 @@ int pgp_application_pgp_handler (BODY * m, STATE * s)
         fputs (buf, tmpfp);
 
         if ((needpass
-             && str_cmp ("-----END PGP MESSAGE-----\n", buf) == 0)
+             && m_strcmp("-----END PGP MESSAGE-----\n", buf) == 0)
             || (!needpass
-                && (str_cmp ("-----END PGP SIGNATURE-----\n", buf) == 0
-                    || str_cmp ("-----END PGP PUBLIC KEY BLOCK-----\n",
+                && (m_strcmp("-----END PGP SIGNATURE-----\n", buf) == 0
+                    || m_strcmp("-----END PGP PUBLIC KEY BLOCK-----\n",
                                     buf) == 0)))
           break;
       }
@@ -507,11 +507,11 @@ static int pgp_check_traditional_one_body (FILE * fp, BODY * b,
 
   while (fgets (buf, sizeof (buf), tfp)) {
     if (str_ncmp ("-----BEGIN PGP ", buf, 15) == 0) {
-      if (str_cmp ("MESSAGE-----\n", buf + 15) == 0)
+      if (m_strcmp("MESSAGE-----\n", buf + 15) == 0)
         enc = 1;
-      else if (str_cmp ("SIGNED MESSAGE-----\n", buf + 15) == 0)
+      else if (m_strcmp("SIGNED MESSAGE-----\n", buf + 15) == 0)
         sgn = 1;
-      else if (str_cmp ("PUBLIC KEY BLOCK-----\n", buf + 15) == 0)
+      else if (m_strcmp("PUBLIC KEY BLOCK-----\n", buf + 15) == 0)
         key = 1;
     }
   }
@@ -993,9 +993,9 @@ BODY *pgp_sign_message (BODY * a)
    * recommended for future releases of PGP.
    */
   while (fgets (buffer, sizeof (buffer) - 1, pgpout) != NULL) {
-    if (str_cmp ("-----BEGIN PGP MESSAGE-----\n", buffer) == 0)
+    if (m_strcmp("-----BEGIN PGP MESSAGE-----\n", buffer) == 0)
       fputs ("-----BEGIN PGP SIGNATURE-----\n", fp);
-    else if (str_cmp ("-----END PGP MESSAGE-----\n", buffer) == 0)
+    else if (m_strcmp("-----END PGP MESSAGE-----\n", buffer) == 0)
       fputs ("-----END PGP SIGNATURE-----\n", fp);
     else
       fputs (buffer, fp);
index 058fe1d..89e4dd8 100644 (file)
--- a/pop/pop.c
+++ b/pop/pop.c
@@ -131,7 +131,7 @@ static int fetch_uidl (char *line, void *data)
 
   sscanf (line, "%d %s", &index, line);
   for (i = 0; i < ctx->msgcount; i++)
-    if (!str_cmp (line, ctx->hdrs[i]->data))
+    if (!m_strcmp(line, ctx->hdrs[i]->data))
       break;
 
   if (i == ctx->msgcount) {
index 318fbdf..89ffb87 100644 (file)
@@ -492,7 +492,7 @@ static int check_uidl (char *line, void *data)
 
   sscanf (line, "%u %s", &index, line);
   for (i = 0; i < ctx->msgcount; i++) {
-    if (!str_cmp (ctx->hdrs[i]->data, line)) {
+    if (!m_strcmp(ctx->hdrs[i]->data, line)) {
       ctx->hdrs[i]->refno = index;
       break;
     }
index 99a8917..e123884 100644 (file)
@@ -102,7 +102,7 @@ void mutt_update_tree (ATTACHPTR ** idx, short idxlen)
     }
 
     if (idx[x]->tree) {
-      if (str_cmp (idx[x]->tree, buf) != 0)
+      if (m_strcmp(idx[x]->tree, buf) != 0)
         str_replace (&idx[x]->tree, buf);
     }
     else
index cbefd24..f4cf7ce 100644 (file)
@@ -436,7 +436,7 @@ static int mix_chain_add (MIXCHAIN * chain, const char *s,
   if (chain->cl >= MAXMIXES)
     return -1;
 
-  if (!str_cmp (s, "0") || !ascii_strcasecmp (s, "<random>")) {
+  if (!m_strcmp(s, "0") || !ascii_strcasecmp (s, "<random>")) {
     chain->ch[chain->cl++] = 0;
     return 0;
   }
index ceca551..35a2a95 100644 (file)
--- a/rfc1524.c
+++ b/rfc1524.c
@@ -197,7 +197,7 @@ static int rfc1524_mailcap_parse (BODY * a,
       /* check type */
       ch = get_field (buf);
       if (ascii_strcasecmp (buf, type) && (ascii_strncasecmp (buf, type, btlen) || (buf[btlen] != 0 &&  /* implicit wild */
-                                                                                    str_cmp (buf + btlen, "/*"))))  /* wildsubtype */
+                                                                                    m_strcmp(buf + btlen, "/*"))))  /* wildsubtype */
         continue;
 
       /* next field is the viewcommand */
index aa6b071..93058dd 100644 (file)
--- a/rfc2231.c
+++ b/rfc2231.c
@@ -231,7 +231,7 @@ static void rfc2231_list_insert (struct rfc2231_parameter **list,
     q = p;
     p = p->next;
 
-    c = str_cmp (par->value, q->value);
+    c = m_strcmp(par->value, q->value);
     if ((c > 0) || (c == 0 && par->index >= q->index))
       break;
   }
@@ -280,7 +280,7 @@ static void rfc2231_join_continuations (PARAMETER ** head,
       rfc2231_free_parameter (&par);
       if ((par = q))
         valp = par->value;
-    } while (par && !str_cmp (par->attribute, attribute));
+    } while (par && !m_strcmp(par->attribute, attribute));
 
     if (value) {
       if (encoded)
diff --git a/score.c b/score.c
index 7d04fb4..24cad59 100644 (file)
--- a/score.c
+++ b/score.c
@@ -79,7 +79,7 @@ int mutt_parse_score (BUFFER * buf, BUFFER * s, unsigned long data,
   /* look for an existing entry and update the value, else add it to the end
      of the list */
   for (ptr = Score, last = NULL; ptr; last = ptr, ptr = ptr->next)
-    if (str_cmp (pattern, ptr->str) == 0)
+    if (m_strcmp(pattern, ptr->str) == 0)
       break;
   if (!ptr) {
     if ((pat = mutt_pattern_comp (pattern, 0, err)) == NULL) {
@@ -136,7 +136,7 @@ int mutt_parse_unscore (BUFFER * buf, BUFFER * s, unsigned long data,
 
   while (MoreArgs (s)) {
     mutt_extract_token (buf, s, 0);
-    if (!str_cmp ("*", buf->data)) {
+    if (!m_strcmp("*", buf->data)) {
       for (tmp = Score; tmp;) {
         last = tmp;
         tmp = tmp->next;
@@ -147,7 +147,7 @@ int mutt_parse_unscore (BUFFER * buf, BUFFER * s, unsigned long data,
     }
     else {
       for (tmp = Score; tmp; last = tmp, tmp = tmp->next) {
-        if (!str_cmp (buf->data, tmp->str)) {
+        if (!m_strcmp(buf->data, tmp->str)) {
           if (last)
             last->next = tmp->next;
           else
diff --git a/send.c b/send.c
index aa4e4e3..d2c2c2a 100644 (file)
--- a/send.c
+++ b/send.c
@@ -1325,7 +1325,7 @@ int ci_send_message (int flags, /* send mode */
 
     if (option (OPTSIGONTOP)
         && (!(flags & (SENDMAILX | SENDKEY)) && Editor
-            && str_cmp (Editor, "builtin") != 0))
+            && m_strcmp(Editor, "builtin") != 0))
       append_signature (tempfp);
 
     /* include replies/forwarded messages, unless we are given a template */
@@ -1335,7 +1335,7 @@ int ci_send_message (int flags, /* send mode */
 
     if (!option (OPTSIGONTOP)
         && (!(flags & (SENDMAILX | SENDKEY)) && Editor
-            && str_cmp (Editor, "builtin") != 0))
+            && m_strcmp(Editor, "builtin") != 0))
       append_signature (tempfp);
 
     /* 
@@ -1449,7 +1449,7 @@ int ci_send_message (int flags, /* send mode */
       if (mutt_needs_mailcap (msg->content)) {
         if (!mutt_edit_attachment (msg->content))
           goto cleanup;
-      } else if (!Editor || str_cmp ("builtin", Editor) == 0)
+      } else if (!Editor || m_strcmp("builtin", Editor) == 0)
         mutt_builtin_editor (msg->content->filename, msg, cur);
       else if (option (OPTEDITHDRS)) {
         mutt_env_to_local (msg->env);
@@ -1701,7 +1701,7 @@ int ci_send_message (int flags, /* send mode */
     fcc[0] = '\0';
 #endif
 
-  if (*fcc && str_cmp ("/dev/null", fcc) != 0) {
+  if (*fcc && m_strcmp("/dev/null", fcc) != 0) {
     BODY *tmpbody = msg->content;
     BODY *save_sig = NULL;
     BODY *save_parts = NULL;
@@ -1712,8 +1712,8 @@ int ci_send_message (int flags, /* send mode */
     /* check to see if the user wants copies of all attachments */
     if (!option (OPTFCCATTACH) && msg->content->type == TYPEMULTIPART) {
       if (WithCrypto
-          && (str_cmp (msg->content->subtype, "encrypted") == 0 ||
-              str_cmp (msg->content->subtype, "signed") == 0)) {
+          && (m_strcmp(msg->content->subtype, "encrypted") == 0 ||
+              m_strcmp(msg->content->subtype, "signed") == 0)) {
         if (clear_content->type == TYPEMULTIPART) {
           if (!(msg->security & ENCRYPT) && (msg->security & SIGN)) {
             /* save initial signature and attachments */
index 5fc706c..7674a32 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -412,7 +412,7 @@ int mutt_write_mime_body (BODY * a, FILE * f)
   /* This is pretty gross, but it's the best solution for now... */
   if ((WithCrypto & APPLICATION_PGP)
       && a->type == TYPEAPPLICATION
-      && str_cmp (a->subtype, "pgp-encrypted") == 0) {
+      && m_strcmp(a->subtype, "pgp-encrypted") == 0) {
     fputs ("Version: 1\n", f);
     return 0;
   }
index 4e2c08e..905a6da 100644 (file)
--- a/sidebar.c
+++ b/sidebar.c
@@ -289,9 +289,9 @@ void sidebar_draw_frames (void) {
     move (i, SidebarWidth - delim_len);
     if (option (OPTASCIICHARS))
       addstr (NONULL (SidebarDelim));
-    else if (!option (OPTASCIICHARS) && !str_cmp (SidebarDelim, "|"))
+    else if (!option (OPTASCIICHARS) && !m_strcmp(SidebarDelim, "|"))
       addch (ACS_VLINE);
-    else if ((Charset_is_utf8) && !str_cmp (SidebarDelim, "|"))
+    else if ((Charset_is_utf8) && !m_strcmp(SidebarDelim, "|"))
       addstr ("\342\224\202");
     else
       addstr (NONULL (SidebarDelim));
diff --git a/sort.c b/sort.c
index 52f4dff..b932ab1 100644 (file)
--- a/sort.c
+++ b/sort.c
@@ -215,13 +215,13 @@ int compare_spam (const void *a, const void *b)
   /* If either aptr or bptr is equal to data, there is no numeric    */
   /* value for that spam attribute. In this case, compare lexically. */
   if ((aptr == (*ppa)->env->spam->data) || (bptr == (*ppb)->env->spam->data))
-    return (SORTCODE (str_cmp (aptr, bptr)));
+    return (SORTCODE (m_strcmp(aptr, bptr)));
 
   /* Otherwise, we have numeric value for both attrs. If these values */
   /* are equal, then we first fall back upon string comparison, then  */
   /* upon auxiliary sort.                                             */
   if (result == 0) {
-    result = str_cmp (aptr, bptr);
+    result = m_strcmp(aptr, bptr);
     if (result == 0)
       AUXSORT (result, a, b);
   }
diff --git a/state.c b/state.c
index 3c87f3c..656f816 100644 (file)
--- a/state.c
+++ b/state.c
@@ -136,7 +136,7 @@ int state_printf (STATE * s, const char *fmt, ...)
 
 void state_mark_attach (STATE * s)
 {
-  if ((s->flags & M_DISPLAY) && !str_cmp (Pager, "builtin"))
+  if ((s->flags & M_DISPLAY) && !m_strcmp(Pager, "builtin"))
     state_puts (AttachmentMarker, s);
 }
 
index ac0d67a..1bf0b5f 100644 (file)
--- a/thread.c
+++ b/thread.c
@@ -340,7 +340,7 @@ static LIST *make_subject_list (THREAD * cur, time_t * dateptr)
         ((env->real_subj != env->subject) || (!option (OPTSORTRE)))) {
       for (curlist = subjects, oldlist = NULL;
            curlist; oldlist = curlist, curlist = curlist->next) {
-        rc = str_cmp (env->real_subj, curlist->data);
+        rc = m_strcmp(env->real_subj, curlist->data);
         if (rc >= 0)
           break;
       }
@@ -400,7 +400,7 @@ static THREAD *find_subject (CONTEXT * ctx, THREAD * cur)
             (last->message->received < tmp->message->received) :
             (last->message->date_sent < tmp->message->date_sent))) &&
           tmp->message->env->real_subj &&
-          str_cmp (subjects->data, tmp->message->env->real_subj) == 0)
+          m_strcmp(subjects->data, tmp->message->env->real_subj) == 0)
         last = tmp;             /* best match so far */
     }
 
@@ -473,7 +473,7 @@ static void pseudo_threads (CONTEXT * ctx)
          * parent, since otherwise they rightly belong to the message
          * we're attaching. */
         if (tmp == cur
-            || !str_cmp (tmp->message->env->real_subj,
+            || !m_strcmp(tmp->message->env->real_subj,
                              parent->message->env->real_subj)) {
           tmp->message->subject_changed = 0;
 
@@ -671,7 +671,7 @@ static void check_subjects (CONTEXT * ctx, int init)
     if (!tmp)
       cur->subject_changed = 1;
     else if (cur->env->real_subj && tmp->message->env->real_subj)
-      cur->subject_changed = str_cmp (cur->env->real_subj,
+      cur->subject_changed = m_strcmp(cur->env->real_subj,
                                           tmp->message->env->
                                           real_subj) ? 1 : 0;
     else
@@ -823,7 +823,7 @@ void mutt_sort_threads (CONTEXT * ctx, int init)
         if (!cur->env->references)
           ref = ref->next;
         else {
-          if (str_cmp (ref->data, cur->env->references->data))
+          if (m_strcmp(ref->data, cur->env->references->data))
             ref = cur->env->references;
           else
             ref = cur->env->references->next;