if (!(data = (NNTP_DATA *) tmp->data))
continue;
nntp_sync_sidebar (data);
- if (prefix && *prefix && strncmp (prefix, data->group,
- m_strlen(prefix)) != 0)
+ if (m_strncmp (prefix, data->group, m_strlen(prefix)) != 0)
continue;
if (!((regexec (Mask.rx, data->group, 0, NULL, 0) == 0) ^ Mask.not))
continue;
if (m_strcmp(de->d_name, ".") == 0)
continue; /* we don't need . */
- if (prefix && *prefix
- && m_strncmp(prefix, de->d_name, m_strlen(prefix)) != 0)
+ if (m_strncmp(prefix, de->d_name, m_strlen(prefix)) != 0)
continue;
if (!((regexec (Mask.rx, de->d_name, 0, NULL, 0) == 0) ^ Mask.not))
continue;
if (1 && (uid->email[0] == '<')
&& (uid->email[uid_length - 1] == '>')
&& (uid_length == sender_length + 2)
- && (!strncmp (uid->email + 1, sender->mailbox, sender_length)))
+ && (!m_strncmp (uid->email + 1, sender->mailbox, sender_length)))
ret = 0;
}
}
rv = 0;
}
- if (strncmp (line, "[GNUPG:] ", 9) == 0)
+ if (m_strncmp (line, "[GNUPG:] ", 9) == 0)
continue;
fputs (line, fpout);
fputc ('\n', fpout);
static short is_numerical_keyid (const char *s)
{
/* or should we require the "0x"? */
- if (strncmp (s, "0x", 2) == 0)
+ if (m_strncmp (s, "0x", 2) == 0)
s += 2;
if (m_strlen(s) % 8)
return 0;
p->mailbox);
if ((r = mutt_yesorno (buf, M_YES)) == M_YES) {
if (is_numerical_keyid (keyID)) {
- if (strncmp (keyID, "0x", 2) == 0)
+ if (m_strncmp (keyID, "0x", 2) == 0)
keyID += 2;
goto bypass_selection; /* you don't see this. */
}
/* find the beginning of ASCII armor */
while ((r = fgets (line, sizeof (line), in)) != NULL) {
- if (!strncmp (line, "-----BEGIN", 10))
+ if (!m_strncmp (line, "-----BEGIN", 10))
break;
}
if (r == NULL) {
/* find the checksum */
while ((r = fgets (line, sizeof (line), in)) != NULL) {
- if (*line == '=' || !strncmp (line, "-----END", 8))
+ if (*line == '=' || !m_strncmp (line, "-----END", 8))
break;
}
if (r == NULL) {
ciss->host = NULL;
ciss->port = 0;
- if (strncmp(src, "//", 2))
+ if (m_strncmp(src, "//", 2))
return src;
src += 2;
case MIME_LIST_POST:
/* RFC 2369. FIXME: We should ignore whitespace, but don't. */
- if (strncmp(p, "NO", 2)) {
+ if (m_strncmp(p, "NO", 2)) {
char *beg, *end;
for (beg = strchr (p, '<'); beg; beg = strchr (end, ',')) {
snprintf (sequences, sizeof (sequences), "%s/.mh_sequences", ctx->path);
if ((ofp = fopen (sequences, "r"))) {
while ((buff = mutt_read_line (buff, &sz, ofp, &line))) {
- if (unseen && !strncmp (buff, seq_unseen, m_strlen(seq_unseen))) {
+ if (unseen && !m_strncmp (buff, seq_unseen, m_strlen(seq_unseen))) {
fprintf (nfp, "%s %d\n", buff, n);
unseen_done = 1;
}
else if (flagged
- && !strncmp (buff, seq_flagged, m_strlen(seq_flagged))) {
+ && !m_strncmp (buff, seq_flagged, m_strlen(seq_flagged))) {
fprintf (nfp, "%s %d\n", buff, n);
flagged_done = 1;
}
else if (replied
- && !strncmp (buff, seq_replied, m_strlen(seq_replied))) {
+ && !m_strncmp (buff, seq_replied, m_strlen(seq_replied))) {
fprintf (nfp, "%s %d\n", buff, n);
replied_done = 1;
}
* Check to see if we have enough information to know if the
* message has disappeared out from underneath us.
*/
- else if (((changed & 1) && (!strncmp (ctx->hdrs[i]->path, "new/", 4))) ||
- ((changed & 2) && (!strncmp (ctx->hdrs[i]->path, "cur/", 4)))) {
+ else if (((changed & 1) && (!m_strncmp (ctx->hdrs[i]->path, "new/", 4))) ||
+ ((changed & 2) && (!m_strncmp (ctx->hdrs[i]->path, "cur/", 4)))) {
/* This message disappeared, so we need to simulate a "reopen"
* event. We know it disappeared because we just scanned the
* subdirectory it used to reside in.
if (op == OP_TOGGLE_READ) {
char buffer[LONG_STRING];
- if (!Context->pattern
- || strncmp (Context->pattern, "!~R!~D~s", 8) != 0) {
+ if (m_strncmp (Context->pattern, "!~R!~D~s", 8) != 0) {
snprintf (buffer, sizeof (buffer), "!~R!~D~s%s",
Context->pattern ? Context->pattern : ".*");
set_option (OPTHIDEREAD);
}
else {
m_strcpy(buf, sizeof(buf), Context->pattern + 8);
- if (!*buf || strncmp (buf, ".*", 2) == 0)
+ if (m_strncmp (buf, ".*", 2) == 0)
snprintf (buf, sizeof (buf), "~A");
unset_option (OPTHIDEREAD);
}
add_s ("\\(rq");
else if (*str == '\\')
add_s ("\\\\");
- else if (!strncmp (str, "``", 2)) {
+ else if (!m_strncmp (str, "``", 2)) {
add_s ("\\(lq");
str++;
}
- else if (!strncmp (str, "''", 2)) {
+ else if (!m_strncmp (str, "''", 2)) {
add_s ("\\(rq");
str++;
}
l = skip_ws (l);
- if (!strncmp (l, ".pp", 3))
+ if (!m_strncmp (l, ".pp", 3))
return print_it (SP_NEWPAR, NULL, docstat);
- else if (!strncmp (l, ".ts", 3))
+ else if (!m_strncmp (l, ".ts", 3))
return print_it (SP_START_TAB, NULL, docstat);
- else if (!strncmp (l, ".te", 3))
+ else if (!m_strncmp (l, ".te", 3))
return print_it (SP_END_TAB, NULL, docstat);
- else if (!strncmp (l, ".dl", 3))
+ else if (!m_strncmp (l, ".dl", 3))
return print_it (SP_START_DL, NULL, docstat);
- else if (!strncmp (l, ".de", 3))
+ else if (!m_strncmp (l, ".de", 3))
return print_it (SP_END_DL, NULL, docstat);
- else if (!strncmp (l, ". ", 2))
+ else if (!m_strncmp (l, ". ", 2))
*l = ' ';
for (s = l, d = buff; *s; s++) {
- if (!strncmp (s, "\\(as", 4)) {
+ if (!m_strncmp (s, "\\(as", 4)) {
*d++ = '*';
s += 3;
}
- else if (!strncmp (s, "\\(rs", 4)) {
+ else if (!m_strncmp (s, "\\(rs", 4)) {
*d++ = '\\';
s += 3;
}
- else if (!strncmp (s, "\\fI", 3)) {
+ else if (!m_strncmp (s, "\\fI", 3)) {
docstat = commit_buff (buff, &d, docstat);
docstat = print_it (SP_START_EM, NULL, docstat);
s += 2;
}
- else if (!strncmp (s, "\\fB", 3)) {
+ else if (!m_strncmp (s, "\\fB", 3)) {
docstat = commit_buff (buff, &d, docstat);
docstat = print_it (SP_START_BF, NULL, docstat);
s += 2;
}
- else if (!strncmp (s, "\\fT", 3)) {
+ else if (!m_strncmp (s, "\\fT", 3)) {
docstat = commit_buff (buff, &d, docstat);
docstat = print_it (SP_START_TT, NULL, docstat);
s += 2;
}
- else if (!strncmp (s, "\\fP", 3)) {
+ else if (!m_strncmp (s, "\\fP", 3)) {
docstat = commit_buff (buff, &d, docstat);
docstat = print_it (SP_END_FT, NULL, docstat);
s += 2;
}
- else if (!strncmp (s, ".dt", 3)) {
+ else if (!m_strncmp (s, ".dt", 3)) {
if (docstat & D_DD) {
docstat = commit_buff (buff, &d, docstat);
docstat = print_it (SP_END_DD, NULL, docstat);
docstat = print_it (SP_DT, NULL, docstat);
s += 3;
}
- else if (!strncmp (s, ".dd", 3)) {
+ else if (!m_strncmp (s, ".dd", 3)) {
docstat = commit_buff (buff, &d, docstat);
docstat = print_it (SP_DD, NULL, docstat);
s += 3;
/* if s is an url, only collapse path component */
if (scheme != U_UNKNOWN) {
p = strchr (s, ':') + 1;
- if (!strncmp (p, "//", 2))
+ if (!m_strncmp (p, "//", 2))
q = strchr (p + 2, '/');
if (!q)
q = strchr (p, '\0');