X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=muttlib.c;h=45dd76db5e30dc1659a6a49f6413d48e99ec960c;hp=9be7e750f00a770ecc63497088a1a1cab9f51a4c;hb=1c16e9623a9fb6a15bb284a6f7322b583ebc06a7;hpb=ecaab35b973fbceb58b5ed174971c82762cc0199 diff --git a/muttlib.c b/muttlib.c index 9be7e75..45dd76d 100644 --- a/muttlib.c +++ b/muttlib.c @@ -16,9 +16,10 @@ #include #include #include +#include +#include #include "mutt.h" -#include "buffer.h" #include "enter.h" #include "mutt_curses.h" #include "mime.h" @@ -454,7 +455,7 @@ char *mutt_gecos_name (char *dest, size_t destlen, struct passwd *pw) if (!pw || !pw->pw_gecos) return NULL; - memset (dest, 0, destlen); + p_clear(dest, destlen); if (GecosMask.rx) { if (regexec (GecosMask.rx, pw->pw_gecos, 1, pat_match, 0) == 0) @@ -802,8 +803,8 @@ void mutt_expand_fmt (char *dest, size_t destlen, const char *fmt, *d = '\0'; if (!found && destlen > 0) { - str_cat (dest, destlen, " "); - str_cat (dest, destlen, src); + m_strcat(dest, destlen, " "); + m_strcat(dest, destlen, src); } } @@ -852,10 +853,10 @@ int mutt_check_overwrite (const char *attname, const char *path, if (mutt_get_field (_("File under directory: "), tmp, sizeof (tmp), M_FILE | M_CLEAR) != 0 || !tmp[0]) return (-1); - mutt_concat_path (fname, path, tmp, flen); + mutt_concat_path(fname, flen, path, tmp); } else - mutt_concat_path (fname, path, mutt_basename (attname), flen); + mutt_concat_path(fname, flen, path, mutt_basename(attname)); } if (*append == 0 && access (fname, F_OK) == 0) { @@ -1195,7 +1196,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 +1395,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 +1411,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 +1426,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 +1450,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 +1467,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);