diff options
-rw-r--r-- | addrbook.c | 6 | ||||
-rw-r--r-- | alias.c | 16 | ||||
-rw-r--r-- | attach.c | 14 | ||||
-rw-r--r-- | browser.c | 18 | ||||
-rw-r--r-- | buffy.c | 10 | ||||
-rw-r--r-- | charset.c | 8 | ||||
-rw-r--r-- | color.c | 28 | ||||
-rw-r--r-- | commands.c | 14 | ||||
-rw-r--r-- | complete.c | 12 | ||||
-rw-r--r-- | compose.c | 10 | ||||
-rw-r--r-- | copy.c | 36 | ||||
-rw-r--r-- | curs_lib.c | 10 | ||||
-rw-r--r-- | dotlock.c | 2 | ||||
-rw-r--r-- | edit.c | 14 | ||||
-rw-r--r-- | enter.c | 6 | ||||
-rw-r--r-- | from.c | 8 | ||||
-rw-r--r-- | getdomain.c | 2 | ||||
-rw-r--r-- | gnupgparse.c | 8 | ||||
-rw-r--r-- | handler.c | 76 | ||||
-rw-r--r-- | hash.c | 6 | ||||
-rw-r--r-- | hdrline.c | 6 | ||||
-rw-r--r-- | headers.c | 8 | ||||
-rw-r--r-- | help.c | 12 | ||||
-rw-r--r-- | history.c | 2 | ||||
-rw-r--r-- | hook.c | 4 | ||||
-rw-r--r-- | imap.c | 56 | ||||
-rw-r--r-- | init.c | 102 | ||||
-rw-r--r-- | keymap.c | 18 | ||||
-rw-r--r-- | lib.c | 71 | ||||
-rw-r--r-- | main.c | 2 | ||||
-rw-r--r-- | mbox.c | 24 | ||||
-rw-r--r-- | menu.c | 2 | ||||
-rw-r--r-- | mh.c | 6 | ||||
-rw-r--r-- | mx.c | 16 | ||||
-rw-r--r-- | pager.c | 12 | ||||
-rw-r--r-- | parse.c | 142 | ||||
-rw-r--r-- | pattern.c | 28 | ||||
-rw-r--r-- | pgp.c | 70 | ||||
-rw-r--r-- | pgpinvoke.c | 4 | ||||
-rw-r--r-- | pgpkey.c | 22 | ||||
-rw-r--r-- | pgppubring.c | 2 | ||||
-rw-r--r-- | pop.c | 26 | ||||
-rw-r--r-- | postpone.c | 8 | ||||
-rw-r--r-- | protos.h | 4 | ||||
-rw-r--r-- | query.c | 8 | ||||
-rw-r--r-- | recvattach.c | 12 | ||||
-rw-r--r-- | rfc1524.c | 30 | ||||
-rw-r--r-- | rfc2047.c | 22 | ||||
-rw-r--r-- | rfc822.c | 12 | ||||
-rw-r--r-- | score.c | 6 | ||||
-rw-r--r-- | send.c | 36 | ||||
-rw-r--r-- | sendlib.c | 30 | ||||
-rw-r--r-- | snprintf.c | 10 | ||||
-rw-r--r-- | socket.c | 4 | ||||
-rw-r--r-- | sort.c | 6 | ||||
-rw-r--r-- | status.c | 2 | ||||
-rw-r--r-- | strcasecmp.c | 4 | ||||
-rw-r--r-- | thread.c | 8 |
58 files changed, 579 insertions, 562 deletions
@@ -93,7 +93,7 @@ static int alias_SortAlias (const void *a, const void *b) { ALIAS *pa = *(ALIAS **) a; ALIAS *pb = *(ALIAS **) b; - int r = strcasecmp (pa->name, pb->name); + int r = mutt_strcasecmp (pa->name, pb->name); return (RSORT (r)); } @@ -107,14 +107,14 @@ static int alias_SortAddress (const void *a, const void *b) if (pa->personal) { if (pb->personal) - r = strcasecmp (pa->personal, pb->personal); + r = mutt_strcasecmp (pa->personal, pb->personal); else r = 1; } else if (pb->personal) r = -1; else - r = strcasecmp (pa->mailbox, pb->mailbox); + r = mutt_strcasecmp (pa->mailbox, pb->mailbox); return (RSORT (r)); } @@ -29,7 +29,7 @@ ADDRESS *mutt_lookup_alias (const char *s) ALIAS *t = Aliases; for (; t; t = t->next) - if (!strcasecmp (s, t->name)) + if (!mutt_strcasecmp (s, t->name)) return (t->addr); return (NULL); /* no such alias */ } @@ -52,7 +52,7 @@ static ADDRESS *mutt_expand_aliases_r (ADDRESS *a, LIST **expn) i = 0; for (u = *expn; u; u = u->next) { - if (strcmp (a->mailbox, u->data) == 0) /* alias already found */ + if (mutt_strcmp (a->mailbox, u->data) == 0) /* alias already found */ { dprint (1, (debugfile, "mutt_expand_aliases_r(): loop in alias found for '%s'\n", a->mailbox)); i = 1; @@ -287,7 +287,7 @@ ADDRESS *alias_reverse_lookup (ADDRESS *a) for (ap = t->addr; ap; ap = ap->next) { if (!ap->group && ap->mailbox && - strcasecmp (ap->mailbox, a->mailbox) == 0) + mutt_strcasecmp (ap->mailbox, a->mailbox) == 0) return ap; } } @@ -315,7 +315,7 @@ int mutt_alias_complete (char *s, size_t buflen) if (a->name && strstr (a->name, s) == a->name) { if (!bestname[0]) /* init */ - strfcpy (bestname, a->name, min (strlen (a->name) + 1, sizeof (bestname))); + strfcpy (bestname, a->name, min (mutt_strlen (a->name) + 1, sizeof (bestname))); else { for (i = 0 ; a->name[i] && a->name[i] == bestname[i] ; i++) @@ -334,7 +334,7 @@ int mutt_alias_complete (char *s, size_t buflen) } else { - if (strcmp (bestname, s) == 0) /* add anything to the completion? */ + if (mutt_strcmp (bestname, s) == 0) /* add anything to the completion? */ { /* build alias list and show it */ a = Aliases; @@ -369,7 +369,7 @@ int mutt_alias_complete (char *s, size_t buflen) return 0; } else /* we are adding something to the completion */ - strfcpy (s, bestname, strlen (bestname) + 1); + strfcpy (s, bestname, mutt_strlen (bestname) + 1); } return 1; @@ -380,7 +380,7 @@ static int string_is_address(const char *str, const char *u, const char *d) char buf[LONG_STRING]; snprintf(buf, sizeof(buf), "%s@%s", NONULL(u), NONULL(d)); - if (strcasecmp(str, buf) == 0) + if (mutt_strcasecmp(str, buf) == 0) return 1; return 0; @@ -395,7 +395,7 @@ int mutt_addr_is_user (ADDRESS *addr) if (!addr->mailbox) return 0; - if (strcasecmp (addr->mailbox, NONULL(Username)) == 0) + if (mutt_strcasecmp (addr->mailbox, Username) == 0) return 1; if(string_is_address(addr->mailbox, Username, Hostname)) return 1; @@ -256,7 +256,7 @@ int mutt_edit_attachment (BODY *a) else if (a->type == TYPETEXT) { /* On text, default to editor */ - mutt_edit_file ((!Editor || strcmp ("builtin", Editor) == 0) ? + mutt_edit_file ((!Editor || mutt_strcmp ("builtin", Editor) == 0) ? NONULL(Visual) : NONULL(Editor), newfile); } else @@ -284,10 +284,10 @@ int mutt_is_autoview (char *type) while (t) { - i = strlen (t->data) - 1; + i = mutt_strlen (t->data) - 1; if ((i > 0 && t->data[i-1] == '/' && t->data[i] == '*' && - strncasecmp (type, t->data, i) == 0) || - strcasecmp (type, t->data) == 0) + mutt_strncasecmp (type, t->data, i) == 0) || + mutt_strcasecmp (type, t->data) == 0) return 1; t = t->next; } @@ -359,7 +359,7 @@ int mutt_view_attachment (FILE *fp, BODY *a, int flag) if (rfc1524_expand_filename (entry->nametemplate, fname, tempfile, sizeof (tempfile))) { - if (fp == NULL && strcmp(tempfile, a->filename)) + if (fp == NULL && mutt_strcmp(tempfile, a->filename)) { /* send case: the file is already there */ if (safe_symlink (a->filename, tempfile) == -1) @@ -859,8 +859,8 @@ int mutt_print_attachment (FILE *fp, BODY *a) return (1); } - if (!strcasecmp ("text/plain", a->subtype) || - !strcasecmp ("application/postscript", a->subtype)) + if (!mutt_strcasecmp ("text/plain", a->subtype) || + !mutt_strcasecmp ("application/postscript", a->subtype)) { return (mutt_pipe_attachment (fp, a, NONULL(PrintCmd), NULL)); } @@ -85,7 +85,7 @@ static int browser_compare_subject (const void *a, const void *b) struct folder_file *pa = (struct folder_file *) a; struct folder_file *pb = (struct folder_file *) b; - int r = strcmp (pa->name, pb->name); + int r = mutt_strcmp (pa->name, pb->name); return ((BrowserSort & SORT_REVERSE) ? -r : r); } @@ -358,10 +358,10 @@ static int examine_directory (MUTTMENU *menu, struct browser_state *state, while ((de = readdir (dp)) != NULL) { - if (strcmp (de->d_name, ".") == 0) + if (mutt_strcmp (de->d_name, ".") == 0) continue; /* we don't need . */ - if (prefix && *prefix && strncmp (prefix, de->d_name, strlen (prefix)) != 0) + if (prefix && *prefix && mutt_strncmp (prefix, de->d_name, mutt_strlen (prefix)) != 0) continue; if (!((regexec (Mask.rx, de->d_name, 0, NULL, 0) == 0) ^ Mask.not)) continue; @@ -375,7 +375,7 @@ static int examine_directory (MUTTMENU *menu, struct browser_state *state, continue; tmp = Incoming; - while (tmp && strcmp (buffer, NONULL(tmp->path))) + while (tmp && mutt_strcmp (buffer, tmp->path)) tmp = tmp->next; add_folder (menu, state, de->d_name, &s, (tmp) ? tmp->new : 0); } @@ -472,7 +472,7 @@ void mutt_select_file (char *f, size_t flen, int buffy) if (*f) { mutt_expand_path (f, flen); - for (i = strlen (f) - 1; i > 0 && f[i] != '/' ; i--); + for (i = mutt_strlen (f) - 1; i > 0 && f[i] != '/' ; i--); if (i > 0) { if (f[0] == '/') @@ -559,9 +559,9 @@ void mutt_select_file (char *f, size_t flen, int buffy) /* save the old directory */ strfcpy (OldLastDir, LastDir, sizeof (OldLastDir)); - if (strcmp (state.entry[menu->current].name, "..") == 0) + if (mutt_strcmp (state.entry[menu->current].name, "..") == 0) { - if (strcmp ("..", LastDir + strlen (LastDir) - 2) == 0) + if (mutt_strcmp ("..", LastDir + mutt_strlen (LastDir) - 2) == 0) strcat (LastDir, "/.."); else { @@ -584,7 +584,7 @@ void mutt_select_file (char *f, size_t flen, int buffy) mutt_expand_path (LastDir, sizeof (LastDir)); } else - sprintf (LastDir + strlen (LastDir), "/%s", + sprintf (LastDir + mutt_strlen (LastDir), "/%s", state.entry[menu->current].name); destroy_state (&state); @@ -636,7 +636,7 @@ void mutt_select_file (char *f, size_t flen, int buffy) strfcpy (buf, LastDir, sizeof (buf)); {/* add '/' at the end of the directory name */ - int len=strlen(LastDir); + int len=mutt_strlen(LastDir); if (sizeof (buf) > len) buf[len]='/'; } @@ -64,13 +64,13 @@ int fseek_last_message (FILE * f) while ((pos -= bytes_read) >= 0) { /* we save in the buffer at the end the first 7 chars from the last read */ - strncpy (buffer + BUFSIZ, buffer, 5+2); /* 2 == 2 * strlen(CRLF) */ + strncpy (buffer + BUFSIZ, buffer, 5+2); /* 2 == 2 * mutt_strlen(CRLF) */ fseek (f, pos, SEEK_SET); bytes_read = fread (buffer, sizeof (char), bytes_read, f); if (bytes_read == -1) return -1; for (i = bytes_read; --i >= 0;) - if (!strncmp (buffer + i, "\n\nFrom ", strlen ("\n\nFrom "))) + if (!mutt_strncmp (buffer + i, "\n\nFrom ", mutt_strlen ("\n\nFrom "))) { /* found it - go to the beginning of the From */ fseek (f, pos + i + 2, SEEK_SET); return 0; @@ -79,7 +79,7 @@ int fseek_last_message (FILE * f) } /* here we are at the beginning of the file */ - if (!strncmp ("From ", buffer, 5)) + if (!mutt_strncmp ("From ", buffer, 5)) { fseek (f, 0, 0); return (0); @@ -177,7 +177,7 @@ int mutt_parse_mailboxes (BUFFER *path, BUFFER *s, unsigned long data, BUFFER *e /* simple check to avoid duplicates */ for (tmp = &Incoming; *tmp; tmp = &((*tmp)->next)) { - if (strcmp (buf, (*tmp)->path) == 0) + if (mutt_strcmp (buf, (*tmp)->path) == 0) break; } @@ -413,7 +413,7 @@ void mutt_buffy (char *s) count = 0; while (count < 3) { - if (strcmp (s, tmp->path) == 0) + if (mutt_strcmp (s, tmp->path) == 0) count++; else if (count && tmp->new) break; @@ -54,7 +54,7 @@ static void canonical_charset(char *dest, size_t dlen, const char *name) { int i; - if(!strncasecmp(name, "x-", 2)) + if(!mutt_strncasecmp(name, "x-", 2)) name = name + 2; for(i = 0; name[i] && i < dlen - 1; i++) @@ -85,7 +85,7 @@ static CHARSET *load_charset(const char *name) if(fgets(buffer, sizeof(buffer), fp) == NULL) goto bail; - if(strcmp(buffer, CHARSET_MAGIC) != 0) + if(mutt_strcmp(buffer, CHARSET_MAGIC) != 0) goto bail; chs->map = safe_malloc(sizeof(CHARSET_MAP)); @@ -212,7 +212,7 @@ CHARSET_MAP *mutt_get_translation(const char *_from, const char *_to) to = to_canon; /* quick check for the identity mapping */ - if((from == to) || ((*from == *to) && !strcmp(from, to))) + if((from == to) || ((*from == *to) && !mutt_strcmp(from, to))) return NULL; snprintf(key, sizeof(key), "%s %s", from, to); @@ -260,7 +260,7 @@ int mutt_is_utf8(const char *s) return 0; canonical_charset(buffer, sizeof(buffer), s); - return !strcmp(buffer, "utf-8"); + return !mutt_strcmp(buffer, "utf-8"); } /* macros for the various bit maps we need */ @@ -290,14 +290,14 @@ parse_color_name (const char *s, int *col, int *attr, int brite, BUFFER *err) { char *eptr; - if (strncasecmp (s, "bright", 6) == 0) + if (mutt_strncasecmp (s, "bright", 6) == 0) { *attr |= brite; s += 6; } /* allow aliases for xterm color resources */ - if (strncasecmp (s, "color", 5) == 0) + if (mutt_strncasecmp (s, "color", 5) == 0) { s += 5; *col = strtol (s, &eptr, 10); @@ -360,7 +360,7 @@ _mutt_parse_uncolor (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err, return (-1); } - if (strncmp (buf->data, "index", 5) != 0) + if (mutt_strncmp (buf->data, "index", 5) != 0) { snprintf (err->data, err->dsize, _("%s: command valid only for index object"), @@ -391,7 +391,7 @@ _mutt_parse_uncolor (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err, do { mutt_extract_token (buf, s, 0); - if (!strcmp ("*", buf->data)) + if (!mutt_strcmp ("*", buf->data)) { for (tmp = ColorIndexList; tmp; ) { @@ -407,7 +407,7 @@ _mutt_parse_uncolor (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err, { for (last = NULL, tmp = ColorIndexList; tmp; last = tmp, tmp = tmp->next) { - if (!strcmp (buf->data, tmp->pattern)) + if (!mutt_strcmp (buf->data, tmp->pattern)) { if (!do_cache) do_cache = 1; @@ -454,12 +454,12 @@ add_pattern (COLOR_LINE **top, const char *s, int sensitive, { if (sensitive) { - if (strcmp (s, tmp->pattern) == 0) + if (mutt_strcmp (s, tmp->pattern) == 0) break; } else { - if (strcasecmp (s, tmp->pattern) == 0) + if (mutt_strcasecmp (s, tmp->pattern) == 0) break; } tmp = tmp->next; @@ -540,7 +540,7 @@ parse_object(BUFFER *buf, BUFFER *s, int *o, int *ql, BUFFER *err) } mutt_extract_token(buf, s, 0); - if(!strncmp(buf->data, "quoted", 6)) + if(!mutt_strncmp(buf->data, "quoted", 6)) { if(buf->data[6]) { @@ -614,17 +614,17 @@ parse_attr_spec(BUFFER *buf, BUFFER *s, int *fg, int *bg, int *attr, BUFFER *err mutt_extract_token (buf, s, 0); - if (strcasecmp ("bold", buf->data) == 0) + if (mutt_strcasecmp ("bold", buf->data) == 0) *attr |= A_BOLD; - else if (strcasecmp ("underline", buf->data) == 0) + else if (mutt_strcasecmp ("underline", buf->data) == 0) *attr |= A_UNDERLINE; - else if (strcasecmp ("none", buf->data) == 0) + else if (mutt_strcasecmp ("none", buf->data) == 0) *attr = A_NORMAL; - else if (strcasecmp ("reverse", buf->data) == 0) + else if (mutt_strcasecmp ("reverse", buf->data) == 0) *attr |= A_REVERSE; - else if (strcasecmp ("standout", buf->data) == 0) + else if (mutt_strcasecmp ("standout", buf->data) == 0) *attr |= A_STANDOUT; - else if (strcasecmp ("normal", buf->data) == 0) + else if (mutt_strcasecmp ("normal", buf->data) == 0) *attr = A_NORMAL; /* needs use = instead of |= to clear other bits */ else { @@ -69,7 +69,7 @@ static int is_mmnoask (const char *buf) if ((p = getenv ("MM_NOASK")) != NULL && *p) { - if (strcmp (p, "1") == 0) + if (mutt_strcmp (p, "1") == 0) return (1); strfcpy (tmp, p, sizeof (tmp)); @@ -81,19 +81,19 @@ static int is_mmnoask (const char *buf) { if (*(q+1) == '*') { - if (strncasecmp (buf, p, q-p) == 0) + if (mutt_strncasecmp (buf, p, q-p) == 0) return (1); } else { - if (strcasecmp (buf, p) == 0) + if (mutt_strcasecmp (buf, p) == 0) return (1); } } else { - lng = strlen (p); - if (buf[lng] == '/' && strncasecmp (buf, p, lng) == 0) + lng = mutt_strlen (p); + if (buf[lng] == '/' && mutt_strncasecmp (buf, p, lng) == 0) return (1); } @@ -178,7 +178,7 @@ int mutt_display_message (HEADER *cur) return (0); } - if (!Pager || strcmp (Pager, "builtin") == 0) + if (!Pager || mutt_strcmp (Pager, "builtin") == 0) builtin = 1; else { @@ -622,7 +622,7 @@ int mutt_save_message (HEADER *h, int delete, int decode, int decrypt, int *redr /* This is an undocumented feature of ELM pointed out to me by Felix von * Leitner <leitner@prz.fu-berlin.de> */ - if (strcmp (buf, ".") == 0) + if (mutt_strcmp (buf, ".") == 0) strfcpy (buf, LastSaveFolder, sizeof (buf)); else strfcpy (LastSaveFolder, buf, sizeof (LastSaveFolder)); @@ -48,8 +48,8 @@ int mutt_complete (char *s) if ((p = strrchr (s, '/'))) { *p++ = 0; - sprintf (exp_dirpart + strlen (exp_dirpart), "/%s", s+1); - sprintf (dirpart + strlen (dirpart), "%s/", s+1); + sprintf (exp_dirpart + mutt_strlen (exp_dirpart), "/%s", s+1); + sprintf (dirpart + mutt_strlen (dirpart), "%s/", s+1); strfcpy (filepart, p, sizeof (filepart)); } else @@ -100,11 +100,11 @@ int mutt_complete (char *s) * special case to handle when there is no filepart yet. find the first * file/directory which is not ``.'' or ``..'' */ - if ((len = strlen (filepart)) == 0) + if ((len = mutt_strlen (filepart)) == 0) { while ((de = readdir (dirp)) != NULL) { - if (strcmp (".", de->d_name) != 0 && strcmp ("..", de->d_name) != 0) + if (mutt_strcmp (".", de->d_name) != 0 && mutt_strcmp ("..", de->d_name) != 0) { strfcpy (filepart, de->d_name, sizeof (filepart)); init++; @@ -115,7 +115,7 @@ int mutt_complete (char *s) while ((de = readdir (dirp)) != NULL) { - if (strncmp (de->d_name, filepart, len) == 0) + if (mutt_strncmp (de->d_name, filepart, len) == 0) { if (init) { @@ -156,7 +156,7 @@ int mutt_complete (char *s) if (dirpart[0]) { strcpy (s, dirpart); - if (strcmp ("/", dirpart) != 0 && dirpart[0] != '=' && dirpart[0] != '+') + if (mutt_strcmp ("/", dirpart) != 0 && dirpart[0] != '=' && dirpart[0] != '+') strcat (s, "/"); strcat (s, filepart); } @@ -191,8 +191,8 @@ static int pgp_send_menu (int bits, int *redraw) if(mutt_get_field (_("MIC algorithm: "), input_micalg, sizeof(input_micalg), 0) == 0) { - if(strcasecmp(input_micalg, "pgp-md5") && strcasecmp(input_micalg, "pgp-sha1") - && strcasecmp(input_micalg, "pgp-rmd160")) + if(mutt_strcasecmp(input_micalg, "pgp-md5") && mutt_strcasecmp(input_micalg, "pgp-sha1") + && mutt_strcasecmp(input_micalg, "pgp-rmd160")) { mutt_error _("Unknown MIC algorithm, valid ones are: pgp-md5, pgp-sha1, pgp-rmd160"); } @@ -446,7 +446,7 @@ int mutt_compose_menu (HEADER *msg, /* structure for new message */ MAYBE_REDRAW (menu->redraw); break; case OP_COMPOSE_EDIT_MESSAGE: - if (Editor && (strcmp ("builtin", Editor) != 0) && !option (OPTEDITHDRS)) + if (Editor && (mutt_strcmp ("builtin", Editor) != 0) && !option (OPTEDITHDRS)) { mutt_edit_file (Editor, msg->content->filename); mutt_update_encoding (msg->content); @@ -458,7 +458,7 @@ int mutt_compose_menu (HEADER *msg, /* structure for new message */ if (op == OP_COMPOSE_EDIT_HEADERS || (op == OP_COMPOSE_EDIT_MESSAGE && option (OPTEDITHDRS))) { - mutt_edit_headers ((!Editor || strcmp ("builtin", Editor) == 0) ? NONULL(Visual) : NONULL(Editor), + mutt_edit_headers ((!Editor || mutt_strcmp ("builtin", Editor) == 0) ? NONULL(Visual) : NONULL(Editor), msg->content->filename, msg, fcc, fcclen); } else @@ -789,7 +789,7 @@ int mutt_compose_menu (HEADER *msg, /* structure for new message */ case OP_COMPOSE_EDIT_FILE: CHECK_COUNT; - mutt_edit_file ((!Editor || strcmp ("builtin", Editor) == 0) ? NONULL(Visual) : NONULL(Editor), + mutt_edit_file ((!Editor || mutt_strcmp ("builtin", Editor) == 0) ? NONULL(Visual) : NONULL(Editor), idx[menu->current]->content->filename); mutt_update_encoding (idx[menu->current]->content); menu->redraw = REDRAW_CURRENT; @@ -78,7 +78,7 @@ mutt_copy_hdr (FILE *in, FILE *out, long off_start, long off_end, int flags, if (nl && buf[0] != ' ' && buf[0] != '\t') { ignore = 1; - if (!from && strncmp ("From ", buf, 5) == 0) + if (!from && mutt_strncmp ("From ", buf, 5) == 0) { if ((flags & CH_FROM) == 0) continue; @@ -88,12 +88,12 @@ mutt_copy_hdr (FILE *in, FILE *out, long off_start, long off_end, int flags, break; /* end of header */ if ((flags & (CH_UPDATE | CH_XMIT | CH_NOSTATUS)) && - (strncasecmp ("Status:", buf, 7) == 0 || - strncasecmp ("X-Status:", buf, 9) == 0)) + (mutt_strncasecmp ("Status:", buf, 7) == 0 || + mutt_strncasecmp ("X-Status:", buf, 9) == 0)) continue; if ((flags & (CH_UPDATE_LEN | CH_XMIT)) && - (strncasecmp ("Content-Length:", buf, 15) == 0 || - strncasecmp ("Lines:", buf, 6) == 0)) + (mutt_strncasecmp ("Content-Length:", buf, 15) == 0 || + mutt_strncasecmp ("Lines:", buf, 6) == 0)) continue; ignore = 0; } @@ -138,7 +138,7 @@ mutt_copy_hdr (FILE *in, FILE *out, long off_start, long off_end, int flags, if (nl && buf[0] != ' ' && buf[0] != '\t') { ignore = 1; - if (!from && strncmp ("From ", buf, 5) == 0) + if (!from && mutt_strncmp ("From ", buf, 5) == 0) { if ((flags & CH_FROM) == 0) continue; @@ -152,18 +152,18 @@ mutt_copy_hdr (FILE *in, FILE *out, long off_start, long off_end, int flags, !mutt_matches_ignore (buf, UnIgnore)) continue; if ((flags & (CH_UPDATE | CH_XMIT | CH_NOSTATUS)) && - (strncasecmp ("Status:", buf, 7) == 0 || - strncasecmp ("X-Status:", buf, 9) == 0)) + (mutt_strncasecmp ("Status:", buf, 7) == 0 || + mutt_strncasecmp ("X-Status:", buf, 9) == 0)) continue; if ((flags & (CH_UPDATE_LEN | CH_XMIT)) && - (strncasecmp ("Content-Length:", buf, 15) == 0 || - strncasecmp ("Lines:", buf, 6) == 0)) + (mutt_strncasecmp ("Content-Length:", buf, 15) == 0 || + mutt_strncasecmp ("Lines:", buf, 6) == 0)) continue; if ((flags & CH_MIME) && - ((strncasecmp ("content-", buf, 8) == 0 && - (strncasecmp ("transfer-encoding:", buf + 8, 18) == 0 || - strncasecmp ("type:", buf + 8, 5) == 0)) || - strncasecmp ("mime-version:", buf, 13) == 0)) + ((mutt_strncasecmp ("content-", buf, 8) == 0 && + (mutt_strncasecmp ("transfer-encoding:", buf + 8, 18) == 0 || + mutt_strncasecmp ("type:", buf + 8, 5) == 0)) || + mutt_strncasecmp ("mime-version:", buf, 13) == 0)) continue; /* Find x -- the array entry where this header is to be saved */ @@ -171,7 +171,7 @@ mutt_copy_hdr (FILE *in, FILE *out, long off_start, long off_end, int flags, { for (t = HeaderOrderList, x = 0 ; (t) ; t = t->next, x++) { - if (!strncasecmp (buf, t->data, strlen (t->data))) + if (!mutt_strncasecmp (buf, t->data, mutt_strlen (t->data))) { dprint(2, (debugfile, "Reorder: %s matches %s", t->data, buf)); break; @@ -190,7 +190,7 @@ mutt_copy_hdr (FILE *in, FILE *out, long off_start, long off_end, int flags, else { safe_realloc ((void **) &headers[x], - strlen (headers[x]) + strlen (buf) + sizeof (char)); + mutt_strlen (headers[x]) + mutt_strlen (buf) + sizeof (char)); strcat (headers[x], buf); } } @@ -202,7 +202,7 @@ mutt_copy_hdr (FILE *in, FILE *out, long off_start, long off_end, int flags, if (headers[x]) { if (flags & CH_DECODE) - rfc2047_decode (headers[x], headers[x], strlen (headers[x])); + rfc2047_decode (headers[x], headers[x], mutt_strlen (headers[x])); /* We couldn't do the prefixing when reading because RFC 2047 * decoding may have concatenated lines. @@ -546,7 +546,7 @@ static BODY *new_deleted_body () char date[SHORT_STRING]; mutt_make_date (date, sizeof (date)); - date[strlen (date) - 1] = 0; /* cut off ending newline character */ |