* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*/
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "mutt.h"
#include "mutt_curses.h"
#include "mutt_menu.h"
mutt_format_string (prompt, sizeof (prompt),
0, COLS-extra_space, 0, 0,
prompt, sizeof (prompt), 0);
- strncat (prompt, "...?", sizeof (prompt));
+ safe_strcat (prompt, sizeof (prompt), "...?");
}
else
- strncat (prompt, "?", sizeof (prompt));
+ safe_strcat (prompt, sizeof (prompt), "?");
if (query_quadoption (OPT_BOUNCE, prompt) != M_YES)
{
}
-void pipe_msg (HEADER *h, FILE *fp, int decode, int print)
+static void pipe_msg (HEADER *h, FILE *fp, int decode, int print)
{
int cmflags = 0;
int chflags = CH_FROM;
int method = Sort; /* save the current method in case of abort */
switch (mutt_multi_choice (reverse ?
- _("Rev-Sort (d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore?: ") :
- _("Sort (d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore?: "),
- _("dfrsotuzc")))
+ _("Rev-Sort (d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore/s(p)am?: ") :
+ _("Sort (d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore/s(p)am?: "),
+ _("dfrsotuzcp")))
{
case -1: /* abort - don't resort */
return -1;
case 9: /* s(c)ore */
Sort = SORT_SCORE;
break;
+
+ case 10: /* s(p)am */
+ Sort = SORT_SPAM;
+ break;
}
if (reverse)
Sort |= SORT_REVERSE;
return (-1);
}
dprint (1, (debugfile, "Opening %s\n", filename));
- if (!(ofp = fopen (filename, "w")))
+ if (!(ofp = safe_fopen (filename, "w")))
{
fclose (ifp);
mutt_perror _("Unable to open new file for writing");
void mutt_version (void)
{
- mutt_message ("Mutt %s (%s)", MUTT_VERSION, ReleaseDate);
+ mutt_message ("Mutt-ng %s (%s)", MUTT_VERSION, ReleaseDate);
}
void mutt_edit_content_type (HEADER *h, BODY *b, FILE *fp)
/* inform the user */
+ snprintf (tmp, sizeof (tmp), "%s/%s", TYPE (b), NONULL (b->subtype));
if (type_changed)
mutt_message (_("Content-Type changed to %s."), tmp);
- else if (b->type == TYPETEXT && charset_changed)
+ if (b->type == TYPETEXT && charset_changed)
+ {
+ if (type_changed)
+ mutt_sleep (1);
mutt_message (_("Character set changed to %s; %s."),
mutt_get_parameter ("charset", b->parameter),
b->noconv ? _("not converting") : _("converting"));
+ }
b->force_charset |= charset_changed ? 1 : 0;
MESSAGE *msg;
int rv = 0;
+ h->security |= PGP_TRADITIONAL_CHECKED;
+
mutt_parse_mime_message (Context, h);
if ((msg = mx_open_message (Context, h->msgno)) == NULL)
return 0;
rv = 1;
}
+ h->security |= PGP_TRADITIONAL_CHECKED;
mx_close_message (&msg);
return rv;
}
{
int i;
int rv = 0;
- if (h)
+ if (h && !(h->security & PGP_TRADITIONAL_CHECKED))
rv = _mutt_check_traditional_pgp (h, redraw);
else
{
for (i = 0; i < Context->vcount; i++)
- if (Context->hdrs[Context->v2r[i]]->tagged)
+ if (Context->hdrs[Context->v2r[i]]->tagged &&
+ !(Context->hdrs[Context->v2r[i]]->security & PGP_TRADITIONAL_CHECKED))
rv = _mutt_check_traditional_pgp (Context->hdrs[Context->v2r[i]], redraw)
|| rv;
}