* please see the file GPL in the top level source directory.
*/
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <errno.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/wait.h>
-#include <sys/stat.h>
-#include <sys/types.h>
+#include <lib-lib/lib-lib.h>
#include <utime.h>
-#include <lib-lib/mem.h>
-#include <lib-lib/file.h>
-#include <lib-lib/macros.h>
-#include <lib-lib/ascii.h>
-#include <lib-lib/debug.h>
-
#include <lib-mime/mime.h>
#include <lib-sys/exit.h>
#include <lib-ui/menu.h>
#include "mutt.h"
+#include "alias.h"
#include "recvattach.h"
#include "sort.h"
#include "copy.h"
#include "pager.h"
#include <lib-crypt/crypt.h>
#include "mutt_idna.h"
-#include "rfc1524.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
(option (OPTWEED) ? (CH_WEED | CH_REORDER) : 0) |
CH_DECODE | CH_FROM);
if (res == 0 && (ferror(fpout) || feof(fpout))) {
- debug_print (1, ("_mutt_copy_message failed to detect EOF!\n"));
res = -1;
}
char prompt[SHORT_STRING];
char buf[HUGE_STRING] = { 0 };
address_t *adr = NULL;
- const char *err = NULL;
+ char *err = NULL;
int rc;
if (h)
char buf[LONG_STRING];
char obuf[LONG_STRING];
char tmp[STRING];
- PARAMETER *p;
char charset[STRING];
char *cp;
short charset_changed = 0;
short type_changed = 0;
- cp = mutt_get_parameter ("charset", b->parameter);
+ cp = parameter_getval(b->parameter, "charset");
m_strcpy(charset, sizeof(charset), NONULL(cp));
snprintf (buf, sizeof (buf), "%s/%s", TYPE (b), b->subtype);
m_strcpy(obuf, sizeof(obuf), buf);
if (b->parameter) {
- size_t l;
+ parameter_t *p;
+ ssize_t l;
for (p = b->parameter; p; p = p->next) {
l = m_strlen(buf);
snprintf (tmp, sizeof (tmp), "%s/%s", TYPE (b), NONULL (b->subtype));
type_changed = ascii_strcasecmp (tmp, obuf);
charset_changed =
- ascii_strcasecmp (charset, mutt_get_parameter ("charset", b->parameter));
+ ascii_strcasecmp (charset, parameter_getval(b->parameter, "charset"));
/* if in send mode, check for conversion - current setting is default. */
int r;
snprintf (tmp, sizeof (tmp), _("Convert to %s upon sending?"),
- mutt_get_parameter ("charset", b->parameter));
+ parameter_getval(b->parameter, "charset"));
if ((r = mutt_yesorno (tmp, !b->noconv)) != -1)
b->noconv = (r == M_NO);
}
if (type_changed)
mutt_sleep (1);
mutt_message (_("Character set changed to %s; %s."),
- mutt_get_parameter ("charset", b->parameter),
+ parameter_getval(b->parameter, "charset"),
b->noconv ? _("not converting") : _("converting"));
}
b->force_charset |= charset_changed ? 1 : 0;
if (!is_multipart(b) && b->parts)
- mutt_free_body (&b->parts);
+ body_list_wipe(&b->parts);
if (!mutt_is_message_type (b->type, b->subtype) && b->hdr) {
b->hdr->content = NULL;
header_delete(&b->hdr);