X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=sendlib.c;h=0178db0de877ed19581d577d4a8aa77b58455136;hp=e8a89a613ee06f658342303da41c42157d92ab6e;hb=2a2f2f9a5bad73c883b7f9c9b4166d932b6aaf37;hpb=2293e9bc5a94ef33dc596b064c607d6bed5ad1fd diff --git a/sendlib.c b/sendlib.c index e8a89a6..0178db0 100644 --- a/sendlib.c +++ b/sendlib.c @@ -274,7 +274,6 @@ static void encode_8bit (fgetconv_t * fc, FILE * fout, int istext) int mutt_write_mime_header (BODY * a, FILE * f) { - PARAMETER *p; char buffer[STRING]; char *t; char *fn; @@ -285,6 +284,8 @@ int mutt_write_mime_header (BODY * a, FILE * f) fprintf (f, "Content-Type: %s/%s", TYPE (a), a->subtype); if (a->parameter) { + PARAMETER *p; + len = 25 + m_strlen(a->subtype); /* approximate len. of content-type */ for (p = a->parameter; p; p = p->next) { @@ -369,7 +370,8 @@ int mutt_write_mime_header (BODY * a, FILE * f) int mutt_write_mime_body (BODY * a, FILE * f) { - char *p, boundary[SHORT_STRING]; + const char *p; + char boundary[SHORT_STRING]; char send_charset[SHORT_STRING]; FILE *fpin; BODY *t; @@ -377,7 +379,7 @@ int mutt_write_mime_body (BODY * a, FILE * f) if (a->type == TYPEMULTIPART) { /* First, find the boundary to use */ - if (!(p = mutt_get_parameter ("boundary", a->parameter))) { + if (!(p = parameter_getval(a->parameter, "boundary"))) { mutt_error _("No boundary parameter found! [report this error]"); return (-1); @@ -819,7 +821,7 @@ CONTENT *mutt_get_content_info (const char *fname, BODY * b) p_clear(&state, 1); if (b != NULL && b->type == TYPETEXT && (!b->noconv && !b->force_charset)) { - char *chs = mutt_get_parameter ("charset", b->parameter); + const char *chs = parameter_getval(b->parameter, "charset"); char *fchs = b->use_disp ? ((FileCharset && *FileCharset) ? FileCharset : Charset) : Charset; if (Charset && (chs || SendCharset) && @@ -1127,16 +1129,16 @@ void mutt_stamp_attachment (BODY * a) char *mutt_get_body_charset (char *d, ssize_t dlen, BODY * b) { - char *p = NULL; + const char *p = NULL; if (b && b->type != TYPETEXT) return NULL; if (b) - p = mutt_get_parameter ("charset", b->parameter); + p = parameter_getval(b->parameter, "charset"); if (p) - charset_canonicalize (d, dlen, NONULL (p)); + charset_canonicalize (d, dlen, p); else m_strcpy(d, dlen, "us-ascii");