From 62fd70e4360bdd1ac606bff226aa6da2f84c3ef1 Mon Sep 17 00:00:00 2001 From: Pietro Cerutti Date: Mon, 22 Jan 2018 17:14:49 +0000 Subject: [PATCH] Kill mutt_rfc2047_encode_32 macro --- mutt/rfc2047.h | 2 -- send.c | 2 +- sendlib.c | 8 ++++---- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/mutt/rfc2047.h b/mutt/rfc2047.h index 7e031b5b2..bb2113ca2 100644 --- a/mutt/rfc2047.h +++ b/mutt/rfc2047.h @@ -25,8 +25,6 @@ #ifndef _MUTT_LIB_RFC2047_H #define _MUTT_LIB_RFC2047_H -#define mutt_rfc2047_encode_32(a, b) mutt_rfc2047_encode(a, NULL, 32, b); - void mutt_rfc2047_encode(char **pd, const char *specials, int col, const char *charsets); void mutt_rfc2047_decode(char **pd); diff --git a/send.c b/send.c index abcf4bfa5..c36079b93 100644 --- a/send.c +++ b/send.c @@ -1135,7 +1135,7 @@ void mutt_encode_descriptions(struct Body *b, short recurse) { if (t->description) { - mutt_rfc2047_encode_32(&t->description, SendCharset); + mutt_rfc2047_encode(&t->description, NULL, sizeof("Content-Description:"), SendCharset); } if (recurse && t->parts) mutt_encode_descriptions(t->parts, recurse); diff --git a/sendlib.c b/sendlib.c index def5f7c57..a5f30c5b6 100644 --- a/sendlib.c +++ b/sendlib.c @@ -2209,10 +2209,10 @@ static void encode_headers(struct ListHead *h) if (!tmp) continue; - mutt_rfc2047_encode_32(&tmp, SendCharset); - mutt_mem_realloc(&np->data, mutt_str_strlen(np->data) + 2 + mutt_str_strlen(tmp) + 1); + mutt_rfc2047_encode(&tmp, NULL, i + 2, SendCharset); + mutt_mem_realloc(&np->data, i + 2 + mutt_str_strlen(tmp) + 1); - sprintf(np->data + i, ": %s", NONULL(tmp)); + sprintf(np->data + i + 2, "%s", tmp); FREE(&tmp); } @@ -2687,7 +2687,7 @@ void mutt_prepare_envelope(struct Envelope *env, int final) if (!OPT_NEWS_SEND || MimeSubject) #endif { - mutt_rfc2047_encode_32(&env->subject, SendCharset); + mutt_rfc2047_encode(&env->subject, NULL, sizeof("Subject:"), SendCharset); } encode_headers(&env->userhdrs); } -- 2.40.0