X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=commands.c;h=b6493568b171b37b32865ecfcdb8de0ad5ddc86a;hp=bc059992e2363aad0de3492ad1d4cf623caa52bc;hb=98cf5779d8184a74541be1bc61d15c5f35efd310;hpb=01bd0a7410e476abaebf03d820bcf31a5ec4c7c0 diff --git a/commands.c b/commands.c index bc05999..b649356 100644 --- a/commands.c +++ b/commands.c @@ -8,24 +8,9 @@ * please see the file GPL in the top level source directory. */ -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include -#include -#include -#include +#include #include -#include -#include -#include -#include - #include #include @@ -240,7 +225,7 @@ void ci_bounce_message (HEADER * h, int *redraw) char prompt[SHORT_STRING]; char buf[HUGE_STRING] = { 0 }; address_t *adr = NULL; - const char *err = NULL; + char *err = NULL; int rc; if (h) @@ -833,13 +818,13 @@ void mutt_edit_content_type (HEADER * h, BODY * b, FILE * fp) 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) { - PARAMETER *p; + parameter_t *p; ssize_t l; for (p = b->parameter; p; p = p->next) { @@ -864,7 +849,7 @@ void mutt_edit_content_type (HEADER * h, BODY * b, FILE * fp) 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. */ @@ -872,7 +857,7 @@ void mutt_edit_content_type (HEADER * h, BODY * b, FILE * fp) 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); } @@ -886,14 +871,14 @@ void mutt_edit_content_type (HEADER * h, BODY * b, FILE * fp) 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);