X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=complete.c;h=679a839bcc6a6a714c5ef9bc8a49c3d9adf6cbc5;hp=491d897d05448c495b97221428b5929fee25c897;hb=c98480f8568e6c1bc927c6c5f2b5e80b4aa6548c;hpb=2ea77d3b2827ba23feb756ce2fb936565ae38998 diff --git a/complete.c b/complete.c index 491d897..679a839 100644 --- a/complete.c +++ b/complete.c @@ -21,6 +21,7 @@ #endif #include +#include #include "lib/debug.h" #include @@ -77,7 +78,7 @@ int mutt_complete (char *s, size_t slen) NNTP_DATA *data = (NNTP_DATA *) l->data; if (data && data->subscribed && - str_ncmp (data->group, filepart, len) == 0) { + m_strncmp(data->group, filepart, len) == 0) { if (init) { for (i = 0; filepart[i] && data->group[i]; i++) { if (filepart[i] != data->group[i]) { @@ -104,7 +105,7 @@ int mutt_complete (char *s, size_t slen) /* we can use '/' as a delimiter, imap_complete rewrites it */ if (*s == '=' || *s == '+' || *s == '!') { const char *q = NONULL(*s == '!' ? Spoolfile : Maildir); - mutt_concat_path (imap_path, q, s + 1, sizeof (imap_path)); + mutt_concat_path(imap_path, sizeof(imap_path), q, s + 1); } else strfcpy (imap_path, s, sizeof (imap_path)); @@ -124,7 +125,7 @@ int mutt_complete (char *s, size_t slen) char buf[_POSIX_PATH_MAX]; *p++ = 0; - mutt_concat_path (buf, exp_dirpart, s + 1, sizeof (buf)); + mutt_concat_path(buf, sizeof(buf), exp_dirpart, s + 1); strfcpy (exp_dirpart, buf, sizeof (exp_dirpart)); snprintf (buf, sizeof (buf), "%s%s/", dirpart, s + 1); strfcpy (dirpart, buf, sizeof (dirpart)); @@ -146,7 +147,7 @@ int mutt_complete (char *s, size_t slen) else { *p = 0; len = (size_t) (p - s); - strncpy (dirpart, s, len); + memcpy(dirpart, s, len); dirpart[len] = 0; p++; strfcpy (filepart, p, sizeof (filepart)); @@ -184,7 +185,7 @@ int mutt_complete (char *s, size_t slen) } while ((de = readdir (dirp)) != NULL) { - if (str_ncmp (de->d_name, filepart, len) == 0) { + if (m_strncmp(de->d_name, filepart, len) == 0) { if (init) { for (i = 0; filepart[i] && de->d_name[i]; i++) { if (filepart[i] != de->d_name[i]) {