/*
* Copyright (C) 1996,1997 Michael R. Elkins <me@mutt.org>
- * Copyright (c) 1998,1999 Thomas Roessler <roessler@does-not-exist.org>
+ * Copyright (C) 1998,1999 Thomas Roessler <roessler@does-not-exist.org>
* Copyright (C) 2004 g10 Code GmbH
*
* This program is free software; you can redistribute it and/or modify
* a message.
*/
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "mutt.h"
#include "mutt_curses.h"
#include "pgp.h"
if (armor_header)
{
char *p = mutt_skip_whitespace (buf);
- if (*p == '\n')
+ if (*p == '\0')
armor_header = 0;
continue;
}
fflush (fpout);
rewind (fpout);
- if (feof (fpout))
+ if (fgetc (fpout) == EOF)
return NULL;
+
+ rewind (fpout);
if ((tattach = mutt_read_mime_header (fpout, 0)) != NULL)
{
if (!(WithCrypto & APPLICATION_PGP))
return msg->security;
+
+ /* If autoinline and no crypto options set, then set inline. */
+ if (option (OPTPGPAUTOINLINE) &&
+ !((msg->security & APPLICATION_PGP) && (msg->security & (SIGN|ENCRYPT))))
+ msg->security |= INLINE;
snprintf (prompt, sizeof (prompt),
_("PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, %s, or (c)lear? "),