{
if (!addr)
{
- mutt_debug(5, "no, NULL address\n");
+ mutt_debug(LL_DEBUG5, "no, NULL address\n");
return false;
}
if (!addr->mailbox)
{
- mutt_debug(5, "no, no mailbox\n");
+ mutt_debug(LL_DEBUG5, "no, no mailbox\n");
return false;
}
if (mutt_str_strcasecmp(addr->mailbox, Username) == 0)
{
- mutt_debug(5, "#1 yes, %s = %s\n", addr->mailbox, Username);
+ mutt_debug(LL_DEBUG5, "#1 yes, %s = %s\n", addr->mailbox, Username);
return true;
}
if (string_is_address(addr->mailbox, Username, ShortHostname))
{
- mutt_debug(5, "#2 yes, %s = %s @ %s\n", addr->mailbox, Username, ShortHostname);
+ mutt_debug(LL_DEBUG5, "#2 yes, %s = %s @ %s\n", addr->mailbox, Username, ShortHostname);
return true;
}
const char *fqdn = mutt_fqdn(false);
if (string_is_address(addr->mailbox, Username, fqdn))
{
- mutt_debug(5, "#3 yes, %s = %s @ %s\n", addr->mailbox, Username, NONULL(fqdn));
+ mutt_debug(LL_DEBUG5, "#3 yes, %s = %s @ %s\n", addr->mailbox, Username, NONULL(fqdn));
return true;
}
fqdn = mutt_fqdn(true);
if (string_is_address(addr->mailbox, Username, fqdn))
{
- mutt_debug(5, "#4 yes, %s = %s @ %s\n", addr->mailbox, Username, NONULL(fqdn));
+ mutt_debug(LL_DEBUG5, "#4 yes, %s = %s @ %s\n", addr->mailbox, Username, NONULL(fqdn));
return true;
}
if (C_From && (mutt_str_strcasecmp(C_From->mailbox, addr->mailbox) == 0))
{
- mutt_debug(5, "#5 yes, %s = %s\n", addr->mailbox, C_From->mailbox);
+ mutt_debug(LL_DEBUG5, "#5 yes, %s = %s\n", addr->mailbox, C_From->mailbox);
return true;
}
if (mutt_regexlist_match(&Alternates, addr->mailbox))
{
- mutt_debug(5, "yes, %s matched by alternates\n", addr->mailbox);
+ mutt_debug(LL_DEBUG5, "yes, %s matched by alternates\n", addr->mailbox);
if (mutt_regexlist_match(&UnAlternates, addr->mailbox))
- mutt_debug(5, "but, %s matched by unalternates\n", addr->mailbox);
+ mutt_debug(LL_DEBUG5, "but, %s matched by unalternates\n", addr->mailbox);
else
return true;
}
- mutt_debug(5, "no, all failed\n");
+ mutt_debug(LL_DEBUG5, "no, all failed\n");
return false;
}
const char *name = mutt_map_get_name(value, ed->lookup);
if (!name)
{
- mutt_debug(1, "Variable has an invalid value: %d\n", value);
+ mutt_debug(LL_DEBUG1, "Variable has an invalid value: %d\n", value);
return (CSR_ERR_INVALID | CSR_INV_TYPE);
}
if ((k == (size_t)(-1)) || (k == (size_t)(-2)))
{
/* XXX put message in err buffer; fail? warning? */
- mutt_debug(LL_DEBUG1, "mbtable_parse: mbrtowc returned %d converting %s in %s\n",
+ mutt_debug(LL_DEBUG1, "mbrtowc returned %d converting %s in %s\n",
(k == (size_t)(-1)) ? -1 : -2, s, t->orig_str);
if (k == (size_t)(-1))
memset(&mbstate, 0, sizeof(mbstate));
if (!*s)
return false;
- mutt_debug(5, "\nis_from(): parsing: %s\n", s);
+ mutt_debug(LL_DEBUG5, "\nis_from(): parsing: %s\n", s);
if (!mutt_date_is_day_name(s))
{
len = pathlen - 1;
memcpy(path, s, len);
path[len] = '\0';
- mutt_debug(5, "got return path: %s\n", path);
+ mutt_debug(LL_DEBUG5, "got return path: %s\n", path);
}
s = p + 1;
}
if (env->spam && env->spam->data)
- mutt_debug(5, "spam = %s\n", env->spam->data);
+ mutt_debug(LL_DEBUG5, "spam = %s\n", env->spam->data);
}
}
return 0;
cmd_step_fail:
- mutt_debug(LL_DEBUG1, "imap_append_message(): command failed: %s\n", adata->buf);
+ mutt_debug(LL_DEBUG1, "command failed: %s\n", adata->buf);
if (rc != IMAP_CMD_BAD)
{
char *pc = imap_next_word(adata->buf); /* skip sequence number or token */
}
mutt_extract_token(buf, s, MUTT_TOKEN_QUOTE | MUTT_TOKEN_SPACE | MUTT_TOKEN_SEMICOLON);
- mutt_debug(5, "Second token is '%s'\n", buf->data);
+ mutt_debug(LL_DEBUG5, "Second token is '%s'\n", buf->data);
mutt_addrlist_parse2(&tmp->addr, buf->data);
break;
if (a->group)
- mutt_debug(5, " Group %s\n", a->mailbox);
+ mutt_debug(LL_DEBUG5, " Group %s\n", a->mailbox);
else
- mutt_debug(5, " %s\n", a->mailbox);
+ mutt_debug(LL_DEBUG5, " %s\n", a->mailbox);
}
}
mutt_grouplist_destroy(&gl);
*/
void mutt_buffer_pool_free(void)
{
- mutt_debug(LL_DEBUG1, "mutt_buffer_pool_free: %zu of %zu returned to pool\n",
- BufferPoolCount, BufferPoolLen);
+ mutt_debug(LL_DEBUG1, "%zu of %zu returned to pool\n", BufferPoolCount, BufferPoolLen);
while (BufferPoolCount)
mutt_buffer_free(&BufferPool[--BufferPoolCount]);
continue;
if (regexec(np->regex->regex, str, 0, NULL, 0) == 0)
{
- mutt_debug(5, "%s matches %s\n", str, np->regex->pattern);
+ mutt_debug(LL_DEBUG5, "%s matches %s\n", str, np->regex->pattern);
return true;
}
}
switcher ^= 1;
dst = twinbuf[switcher];
- mutt_debug(5, "%s matches %s\n", src, np->regex->pattern);
+ mutt_debug(LL_DEBUG5, "%s matches %s\n", src, np->regex->pattern);
/* Copy into other twinbuf with substitutions */
if (np->tmpl)
}
}
dst[tlen] = '\0';
- mutt_debug(5, "subst %s\n", dst);
+ mutt_debug(LL_DEBUG5, "subst %s\n", dst);
}
src = dst;
}
/* Does this pattern match? */
if (regexec(np->regex->regex, str, (size_t) np->nmatch, pmatch, 0) == 0)
{
- mutt_debug(5, "%s matches %s\n", str, np->regex->pattern);
- mutt_debug(5, "%d subs\n", (int) np->regex->regex->re_nsub);
+ mutt_debug(LL_DEBUG5, "%s matches %s\n", str, np->regex->pattern);
+ mutt_debug(LL_DEBUG5, "%d subs\n", (int) np->regex->regex->re_nsub);
/* Copy template into buf, with substitutions. */
for (p = np->tmpl; *p && tlen < buflen - 1;)
if (tlen < buflen)
{
buf[tlen] = '\0';
- mutt_debug(5, "\"%s\"\n", buf);
+ mutt_debug(LL_DEBUG5, "\"%s\"\n", buf);
}
return true;
}
bool shallcount = true; /* default */
bool shallrecurse = false;
- mutt_debug(5, "desc=\"%s\"; fn=\"%s\", type=\"%d/%s\"\n",
+ mutt_debug(LL_DEBUG5, "desc=\"%s\"; fn=\"%s\", type=\"%d/%s\"\n",
bp->description ? bp->description : ("none"),
bp->filename ? bp->filename : bp->d_filename ? bp->d_filename : "(none)",
bp->type, bp->subtype ? bp->subtype : "*");
buf[n] = '\0';
while ((n > 0) && ((buf[n - 1] == '\n') || (buf[n - 1] == '\r')))
buf[--n] = '\0';
- mutt_debug(5, "fmtpipe < %s\n", buf);
+ mutt_debug(LL_DEBUG5, "fmtpipe < %s\n", buf);
/* If the result ends with '%', this indicates that the filter
* generated %-tokens that neomutt can expand. Eliminate the '%'
if (!keys)
return NULL;
- mutt_debug(5, "looking for %s <%s>\n", a ? a->personal : "", a ? a->mailbox : "");
+ mutt_debug(LL_DEBUG5, "looking for %s <%s>\n", a ? a->personal : "", a ? a->mailbox : "");
for (k = keys; k; k = k->next)
{
- mutt_debug(5, " looking at key: %s '%.15s'\n", crypt_keyid(k), k->uid);
+ mutt_debug(LL_DEBUG5, " looking at key: %s '%.15s'\n", crypt_keyid(k), k->uid);
if (abilities && !(k->flags & abilities))
{
if (abilities && !(k->flags & abilities))
continue;
- mutt_debug(5, "matching \"%s\" against key %s, \"%s\": ", p,
+ mutt_debug(LL_DEBUG5, "matching \"%s\" against key %s, \"%s\": ", p,
crypt_long_keyid(k), k->uid);
if (!*p || (pfcopy && (mutt_str_strcasecmp(pfcopy, crypt_fpr(k)) == 0)) ||
(ps && (mutt_str_strcasecmp(ps, crypt_short_keyid(k)) == 0)) ||
mutt_str_stristr(k->uid, p))
{
- mutt_debug(5, "match\n");
+ mutt_debug(LL_DEBUG5, "match\n");
struct CryptKeyInfo *tmp = crypt_copy_key(k);
*matches_endp = tmp;
}
else
{
- mutt_debug(5, "no match\n");
+ mutt_debug(LL_DEBUG5, "no match\n");
}
}
if (!keys)
return NULL;
- mutt_debug(5, "looking for %s <%s>\n", a->personal, a->mailbox);
+ mutt_debug(LL_DEBUG5, "looking for %s <%s>\n", a->personal, a->mailbox);
for (k = keys; k; k = kn)
{
kn = k->next;
- mutt_debug(5, " looking at key: %s\n", pgp_keyid(k));
+ mutt_debug(LL_DEBUG5, " looking at key: %s\n", pgp_keyid(k));
if (abilities && !(k->flags & abilities))
{
bool match = false;
- mutt_debug(5, "matching \"%s\" against key %s:\n", p, pgp_long_keyid(k));
+ mutt_debug(LL_DEBUG5, "matching \"%s\" against key %s:\n", p, pgp_long_keyid(k));
if (!*p || (pfcopy && (mutt_str_strcasecmp(pfcopy, k->fingerprint) == 0)) ||
(pl && (mutt_str_strcasecmp(pl, pgp_long_keyid(k)) == 0)) ||
(ps && (mutt_str_strcasecmp(ps, pgp_short_keyid(k)) == 0)))
{
- mutt_debug(5, "\t\tmatch #1\n");
+ mutt_debug(LL_DEBUG5, "\t\tmatch #1\n");
match = true;
}
else
{
for (a = k->address; a; a = a->next)
{
- mutt_debug(5, "matching \"%s\" against key %s, \"%s\":\n", p,
+ mutt_debug(LL_DEBUG5, "matching \"%s\" against key %s, \"%s\":\n", p,
pgp_long_keyid(k), NONULL(a->addr));
if (mutt_str_stristr(a->addr, p))
{
- mutt_debug(5, "\t\tmatch #2\n");
+ mutt_debug(LL_DEBUG5, "\t\tmatch #2\n");
match = true;
break;
}
else
snprintf(posstr, sizeof(posstr), "%ld", pos);
- mutt_debug(4, "updating progress: %s\n", posstr);
+ mutt_debug(LL_DEBUG4, "updating progress: %s\n", posstr);
progress->pos = pos;
if (now)
width = quote_width(s, ql);
last = line[mutt_str_strlen(line) - 1];
- mutt_debug(5, "f=f: line [%s], width = %ld, spaces = %lu\n", line,
+ mutt_debug(LL_DEBUG5, "f=f: line [%s], width = %ld, spaces = %lu\n", line,
(long) width, fst->spaces);
for (words = 0; (p = strsep(&line, " "));)
{
- mutt_debug(5, "f=f: word [%s], width: %lu, remaining = [%s]\n", p, fst->width, line);
+ mutt_debug(LL_DEBUG5, "f=f: word [%s], width: %lu, remaining = [%s]\n", p,
+ fst->width, line);
/* remember number of spaces */
if (!*p)
c = buf[len - 1];
buf[len - 1] = '\0';
}
- mutt_debug(5, "f=f: line %d needs space-stuffing: '%s'\n", lc, buf);
+ mutt_debug(LL_DEBUG5, "f=f: line %d needs space-stuffing: '%s'\n", lc, buf);
if (len > 0)
buf[len - 1] = c;
}
if (!TAILQ_EMPTY(&msg->env->from))
{
- mutt_debug(5, "msg->env->from before set_reverse_name: %s\n",
+ mutt_debug(LL_DEBUG5, "msg->env->from before set_reverse_name: %s\n",
TAILQ_FIRST(&msg->env->from)->mailbox);
mutt_addrlist_clear(&msg->env->from);
}
if (!TAILQ_EMPTY(&cur->env->x_original_to) && TAILQ_EMPTY(&msg->env->from))
{
mutt_addrlist_copy(&msg->env->from, &cur->env->x_original_to, false);
- mutt_debug(5, "msg->env->from extracted from X-Original-To: header: %s\n",
+ mutt_debug(LL_DEBUG5, "msg->env->from extracted from X-Original-To: header: %s\n",
TAILQ_FIRST(&msg->env->from)->mailbox);
}
}
int first = 1, col = 0, l = 0;
const bool display = (chflags & CH_DISPLAY);
- mutt_debug(5, "pfx=[%s], tag=[%s], flags=%d value=[%s]\n", pfx, tag, chflags,
- NONULL(value));
+ mutt_debug(LL_DEBUG5, "pfx=[%s], tag=[%s], flags=%d value=[%s]\n", pfx, tag,
+ chflags, NONULL(value));
if (tag && *tag && (fprintf(fp, "%s%s: ", NONULL(pfx), tag) < 0))
return -1;
const int w = mutt_mb_width(buf, col, display);
const int enc = mutt_str_startswith(buf, "=?", CASE_MATCH);
- mutt_debug(5, "word=[%s], col=%d, w=%d, next=[0x0%x]\n", buf, col, w, *next);
+ mutt_debug(LL_DEBUG5, "word=[%s], col=%d, w=%d, next=[0x0%x]\n", buf, col, w, *next);
/* insert a folding \n before the current word's lwsp except for
* header name, first word on a line (word longer than wrap width)
if (!(chflags & CH_DISPLAY) && ((pfxw + max <= wraplen) || is_from))
{
valbuf = mutt_str_substr_dup(start, end);
- mutt_debug(5, "buf[%s%s] short enough, max width = %d <= %d\n", NONULL(pfx),
- valbuf, max, wraplen);
+ mutt_debug(LL_DEBUG5, "buf[%s%s] short enough, max width = %d <= %d\n",
+ NONULL(pfx), valbuf, max, wraplen);
if (pfx && *pfx)
{
if (fputs(pfx, fp) == EOF)
/* if header is short enough, simply print it */
if (!display && (mutt_strwidth(tag) + 2 + pfxw + mutt_strwidth(v) <= wraplen))
{
- mutt_debug(5, "buf[%s%s: %s] is short enough\n", NONULL(pfx), tag, v);
+ mutt_debug(LL_DEBUG5, "buf[%s%s: %s] is short enough\n", NONULL(pfx), tag, v);
if (fprintf(fp, "%s%s: %s\n", NONULL(pfx), tag, v) <= 0)
goto out;
rc = 0;