}
}
-void mutt_expand_file_fmt(char *dest, ssize_t destlen,
- const char *fmt, const char *src)
+void
+mutt_expand_file_fmt(char *dst, ssize_t n, const char *fmt, const char *src)
{
char tmp[LONG_STRING];
-
mutt_quote_filename(tmp, sizeof(tmp), src);
- m_snsubst(dest, destlen, fmt, tmp);
+ m_snsubst(dst, n, fmt, tmp);
}
/* return 0 on success, -1 on abort, 1 on error */
}
}
else
- if ((rc =
- mutt_yesorno (_("File is a directory, save under it?"),
- M_YES)) != M_YES)
+ if ((rc = mutt_yesorno(_("File is a directory, save under it?"),
+ M_YES)) != M_YES)
return (rc == M_NO) ? 1 : -1;
if (!attname || !attname[0]) {
}
}
*wptr = 0;
-
-#if 0
- if (flags & M_FORMAT_MAKEPRINT) {
- /* Make sure that the string is printable by changing all non-printable
- chars to dots, or spaces for non-printable whitespace */
- for (cp = dest; *cp; cp++)
- if (!isprint(*cp) && !((flags & M_FORMAT_TREE) && (*cp <= M_TREE_MAX)))
- *cp = isspace ((unsigned char) *cp) ? ' ' : '.';
- }
-#endif
}
/* returns 0 if OK to proceed, -1 to abort, 1 to retry */
mutt_error (_("%s is not a mailbox!"), s);
return 1;
}
- }
- else {
+ } else {
if (magic != M_IMAP)
{
st->st_mtime = 0;
else if (rc == -1)
ret = -1;
}
- }
- else {
+ } else {
mutt_perror (s);
return 1;
}
return vstring;
}
-void mutt_free_spam_list (SPAM_LIST ** list)
-{
- SPAM_LIST *p;
-
- if (!list)
- return;
- while (*list) {
- p = *list;
- *list = (*list)->next;
- rx_delete(&p->rx);
- p_delete(&p->template);
- p_delete(&p);
- }
-}
-
-int mutt_match_spam_list (const char *s, SPAM_LIST * l, char *text, int x)
+int mutt_match_spam_list (const char *s, rx_t * l, char *text, int x)
{
static regmatch_t *pmatch = NULL;
static int nmatch = 0;
}
/* Does this pattern match? */
- if (regexec(l->rx->rx, s, l->nmatch, (regmatch_t *)pmatch, (int) 0) == 0)
- {
+ if (regexec(l->rx, s, l->nmatch, (regmatch_t *)pmatch, (int) 0) == 0) {
/* Copy template into text, with substitutions. */
for (p = l->template; *p;) {
if (*p == '%') {