]> granicus.if.org Git - neomutt/commitdiff
move rfc2047,rfc2231 to libemail
authorRichard Russon <rich@flatcap.org>
Sat, 14 Jul 2018 11:41:39 +0000 (12:41 +0100)
committerRichard Russon <rich@flatcap.org>
Mon, 16 Jul 2018 22:44:16 +0000 (23:44 +0100)
19 files changed:
Makefile.autosetup
bcache.c
copy.c
email/email.h
email/email_globals.c [moved from rfc2047.h with 68% similarity]
email/email_globals.h [new file with mode: 0644]
email/rfc2047.c
email/rfc2047.h
email/rfc2231.c [moved from rfc2231.c with 99% similarity]
email/rfc2231.h [moved from rfc2231.h with 92% similarity]
email/url.c
globals.h
init.h
mutt_url.c
parse.c
rfc2047.c [deleted file]
send.c
sendlib.c
test/rfc2047.c

index 526345e4d2b367e692f1350ca2cc399b17c8841d..00077a7e86526ee2a161c78025bceeb9c51b598e 100644 (file)
@@ -70,7 +70,7 @@ NEOMUTTOBJS=  addrbook.o alias.o bcache.o browser.o buffy.o \
                mutt_history.o mutt_logging.o mutt_signal.o mutt_socket.o mutt_thread.o mutt_url.o mutt_window.o mx.o \
                pager.o parse.o pattern.o \
                postpone.o progress.o query.o recvattach.o recvcmd.o resize.o rfc1524.o \
-               rfc2047.o rfc2231.o rfc3676.o safe_asprintf.o score.o send.o \
+               rfc3676.o safe_asprintf.o score.o send.o \
                sendlib.o sidebar.o smtp.o sort.o state.o status.o system.o \
                terminal.o version.o
 
@@ -90,7 +90,9 @@ ALLOBJS+=     $(NEOMUTTOBJS)
 # libemail
 LIBEMAIL=      libemail.a
 LIBEMAILOBJS=  email/address.o email/attach.o email/body.o email/envelope.o \
-               email/from.o email/header.o email/idna.o email/mime.o email/parameter.o email/rfc2047.o email/tags.o email/thread.o email/url.o
+               email/from.o email/email_globals.o email/header.o email/idna.o \
+               email/mime.o email/parameter.o email/rfc2047.o email/rfc2231.o email/tags.o \
+               email/thread.o email/url.o
 CLEANFILES+=   $(LIBEMAIL) $(LIBEMAILOBJS)
 MUTTLIBS+=     $(LIBEMAIL)
 ALLOBJS+=      $(LIBEMAILOBJS)
index ed7eb20d75f5e4e5846c19046ce2c53c0037a8a6..6540d9499dde8c90fd6c2d2bcb3574006062417e 100644 (file)
--- a/bcache.c
+++ b/bcache.c
 #include <sys/stat.h>
 #include <unistd.h>
 #include "mutt/mutt.h"
+#include "email/email.h"
 #include "bcache.h"
 #include "globals.h"
 #include "mutt_account.h"
 #include "muttlib.h"
 #include "protos.h"
-#include "email/email.h"
 
 /* These Config Variables are only used in bcache.c */
 char *MessageCachedir;
diff --git a/copy.c b/copy.c
index d0c28a0adbc77f03c0536b8ae7d940172aaeb7df..7b68db8ed0fd6eaa841315d60861e763d82f21be 100644 (file)
--- a/copy.c
+++ b/copy.c
@@ -46,7 +46,6 @@
 #include "ncrypt/ncrypt.h"
 #include "options.h"
 #include "protos.h"
-#include "rfc2047.h"
 #include "sendlib.h"
 #include "state.h"
 #ifdef USE_NOTMUCH
@@ -192,7 +191,7 @@ int mutt_copy_hdr(FILE *in, FILE *out, LOFF_T off_start, LOFF_T off_end,
         if (flags & CH_DECODE)
         {
           if (address_header_decode(&this_one) == 0)
-            mutt_rfc2047_decode(&this_one);
+            rfc2047_decode(&this_one);
           this_one_len = mutt_str_strlen(this_one);
 
           /* Convert CRLF line endings to LF */
@@ -309,7 +308,7 @@ int mutt_copy_hdr(FILE *in, FILE *out, LOFF_T off_start, LOFF_T off_end,
     if (flags & CH_DECODE)
     {
       if (address_header_decode(&this_one) == 0)
-        mutt_rfc2047_decode(&this_one);
+        rfc2047_decode(&this_one);
       this_one_len = mutt_str_strlen(this_one);
     }
 
index 6b306812284716f3d3e12397f45395f8a7d972db..8c3fbd7dfcd168b89b30e80a68cff993096e6e7b 100644 (file)
@@ -37,6 +37,7 @@
  * | email/parameter.c | @subpage email_parameter |
  * | email/mime.c      | @subpage email_mime      |
  * | email/rfc2047.c   | @subpage email_rfc2047   |
+ * | email/rfc2231.c   | @subpage email_rfc2231   |
  * | email/tags.c      | @subpage email_tags      |
  * | email/thread.c    | @subpage email_thread    |
  * | email/url.c       | @subpage email_url       |
@@ -49,6 +50,7 @@
 #include "attach.h"
 #include "body.h"
 #include "content.h"
+#include "email_globals.h"
 #include "envelope.h"
 #include "from.h"
 #include "header.h"
@@ -56,6 +58,7 @@
 #include "mime.h"
 #include "parameter.h"
 #include "rfc2047.h"
+#include "rfc2231.h"
 #include "tags.h"
 #include "thread.h"
 #include "url.h"
similarity index 68%
rename from rfc2047.h
rename to email/email_globals.c
index c396f8284621f3ba3b2786a4b2109b3ce1f2968e..cfb828297d1d2c10e92ef29e0cd01ed007d4785a 100644 (file)
--- a/rfc2047.h
@@ -1,9 +1,9 @@
 /**
  * @file
- * RFC2047 MIME extensions routines
+ * Email Global Variables
  *
  * @authors
- * Copyright (C) 1996-2000 Michael R. Elkins <me@mutt.org>
+ * Copyright (C) 2018 Richard Russon <rich@flatcap.org>
  *
  * @copyright
  * This program is free software: you can redistribute it and/or modify it under
  * this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef _MUTT_RFC2047_2_H
-#define _MUTT_RFC2047_2_H
-
-struct Address;
-
-void rfc2047_encode_addrlist(struct Address *addr, const char *tag);
-void rfc2047_decode_addrlist(struct Address *a);
+/**
+ * @page email_globals Email Global Variables
+ *
+ * These global variables are private to the email library.
+ */
 
-#endif /* _MUTT_RFC2047_2_H */
+#include "config.h"
 
+char *SendCharset;
diff --git a/email/email_globals.h b/email/email_globals.h
new file mode 100644 (file)
index 0000000..1ad38a1
--- /dev/null
@@ -0,0 +1,28 @@
+/**
+ * @file
+ * Email Global Variables
+ *
+ * @authors
+ * Copyright (C) 2018 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _EMAIL_GLOBALS_H
+#define _EMAIL_GLOBALS_H
+
+extern char *SendCharset;
+
+#endif /* _EMAIL_GLOBALS_H */
index 98467a631d733e7770c3833264d06f5fe29add42..8e91d9a5dcabfa3b4dfc4246a86c18f6914aebc4 100644 (file)
 #include <regex.h>
 #include <stdbool.h>
 #include <string.h>
-#include "rfc2047.h"
 #include "mutt/mutt.h"
+#include "rfc2047.h"
+#include "address.h"
+#include "email_globals.h"
 #include "mime.h"
 
 #define ENCWORD_LEN_MAX 75
@@ -412,7 +414,7 @@ static char *rfc2047_decode_word(const char *s, size_t len, enum ContentEncoding
 }
 
 /**
- * rfc2047_encode - RFC2047-encode a string
+ * rfc2047_encode2 - RFC2047-encode a string
  * @param d        String to convert
  * @param dlen     Length of string
  * @param col      Starting column to convert
@@ -423,8 +425,9 @@ static char *rfc2047_decode_word(const char *s, size_t len, enum ContentEncoding
  * @param specials Special characters to be encoded
  * @retval 0 Success
  */
-static int rfc2047_encode(const char *d, size_t dlen, int col, const char *fromcode,
-                          const char *charsets, char **e, size_t *elen, const char *specials)
+static int rfc2047_encode2(const char *d, size_t dlen, int col,
+                           const char *fromcode, const char *charsets, char **e,
+                           size_t *elen, const char *specials)
 {
   int rc = 0;
   char *buf = NULL;
@@ -613,13 +616,13 @@ static int rfc2047_encode(const char *d, size_t dlen, int col, const char *fromc
 }
 
 /**
- * mutt_rfc2047_encode - RFC-2047-encode a string
+ * rfc2047_encode - RFC-2047-encode a string
  * @param[in,out] pd       String to be encoded, and resulting encoded string
  * @param[in]     specials Special characters to be encoded
  * @param[in]     col      Starting index in string
  * @param[in]     charsets List of charsets to choose from
  */
-void mutt_rfc2047_encode(char **pd, const char *specials, int col, const char *charsets)
+void rfc2047_encode(char **pd, const char *specials, int col, const char *charsets)
 {
   char *e = NULL;
   size_t elen;
@@ -630,21 +633,21 @@ void mutt_rfc2047_encode(char **pd, const char *specials, int col, const char *c
   if (!charsets || !*charsets)
     charsets = "utf-8";
 
-  rfc2047_encode(*pd, strlen(*pd), col, Charset, charsets, &e, &elen, specials);
+  rfc2047_encode2(*pd, strlen(*pd), col, Charset, charsets, &e, &elen, specials);
 
   FREE(pd);
   *pd = e;
 }
 
 /**
- * mutt_rfc2047_decode - Decode any RFC2047-encoded header fields
+ * rfc2047_decode - Decode any RFC2047-encoded header fields
  * @param[in,out] pd  String to be decoded, and resulting decoded string
  *
  * Try to decode anything that looks like a valid RFC2047 encoded header field,
  * ignoring RFC822 parsing rules. If decoding fails, for example due to an
  * invalid base64 string, the original input is left untouched.
  */
-void mutt_rfc2047_decode(char **pd)
+void rfc2047_decode(char **pd)
 {
   if (!pd || !*pd)
     return;
@@ -737,3 +740,42 @@ void mutt_rfc2047_decode(char **pd)
   mutt_buffer_addch(&buf, '\0');
   *pd = buf.data;
 }
+
+/**
+ * rfc2047_encode_addrlist - Encode any RFC2047 headers, where required, in an Address list
+ * @param addr Address list
+ * @param tag  Header tag (used for wrapping calculation)
+ */
+void rfc2047_encode_addrlist(struct Address *addr, const char *tag)
+{
+  struct Address *ptr = addr;
+  int col = tag ? strlen(tag) + 2 : 32;
+
+  while (ptr)
+  {
+    if (ptr->personal)
+      rfc2047_encode(&ptr->personal, AddressSpecials, col, SendCharset);
+    else if (ptr->group && ptr->mailbox)
+      rfc2047_encode(&ptr->mailbox, AddressSpecials, col, SendCharset);
+    ptr = ptr->next;
+  }
+}
+
+/**
+ * rfc2047_decode_addrlist - Decode any RFC2047 headers in an Address list
+ * @param a Address list
+ */
+void rfc2047_decode_addrlist(struct Address *a)
+{
+  while (a)
+  {
+    if (a->personal &&
+        ((strstr(a->personal, "=?") != NULL) || (AssumedCharset && *AssumedCharset)))
+    {
+      rfc2047_decode(&a->personal);
+    }
+    else if (a->group && a->mailbox && (strstr(a->mailbox, "=?") != NULL))
+      rfc2047_decode(&a->mailbox);
+    a = a->next;
+  }
+}
index 38c2ce6e39ddb242565b132f55be54fd7e15f98f..31fedbf774dfb4435669fa4498869198a838fa27 100644 (file)
 #ifndef _EMAIL_RFC2047_H
 #define _EMAIL_RFC2047_H
 
-void mutt_rfc2047_decode(char **pd);
-void mutt_rfc2047_encode(char **pd, const char *specials, int col, const char *charsets);
+struct Address;
+
+void rfc2047_decode(char **pd);
+void rfc2047_encode(char **pd, const char *specials, int col, const char *charsets);
+
+void rfc2047_decode_addrlist(struct Address *a);
+void rfc2047_encode_addrlist(struct Address *addr, const char *tag);
 
 #endif /* _EMAIL_RFC2047_H */
similarity index 99%
rename from rfc2231.c
rename to email/rfc2231.c
index b945c73775b97a2662af5a85e8b79ba2a93c890e..c5325b841b654be25dcfca84cb184022956cf564 100644 (file)
--- a/rfc2231.c
@@ -226,7 +226,7 @@ void rfc2231_decode_parameters(struct ParameterList *p)
        */
 
       if (Rfc2047Parameters && np->value && strstr(np->value, "=?"))
-        mutt_rfc2047_decode(&np->value);
+        rfc2047_decode(&np->value);
       else if (AssumedCharset && *AssumedCharset)
         mutt_ch_convert_nonmime_string(&np->value);
     }
similarity index 92%
rename from rfc2231.h
rename to email/rfc2231.h
index 0a492722afa3a35f0965396a9c17c3e618b4ea80..a71a0ab7a68941ce9dfdaf63328c817bb9ba16de 100644 (file)
--- a/rfc2231.h
@@ -20,8 +20,8 @@
  * this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef _MUTT_RFC2231_H
-#define _MUTT_RFC2231_H
+#ifndef _EMAIL_RFC2231_H
+#define _EMAIL_RFC2231_H
 
 struct ParameterList;
 
@@ -31,4 +31,4 @@ extern bool Rfc2047Parameters;
 void rfc2231_decode_parameters(struct ParameterList *p);
 int rfc2231_encode_string(char **pd);
 
-#endif /* _MUTT_RFC2231_H */
+#endif /* _EMAIL_RFC2231_H */
index 7b1917156e730256804ccf5d594b739940512a4b..200d122987566bde2a650a8d9456a2dc41f0d6fa 100644 (file)
@@ -350,4 +350,3 @@ int url_tostring(struct Url *u, char *dest, size_t len, int flags)
 
   return 0;
 }
-
index ab12ff142525f854f535da70430ed521c7ea60b1..79d43778e3f0f3a6a9ede46ea7915953315c6abb 100644 (file)
--- a/globals.h
+++ b/globals.h
@@ -142,7 +142,6 @@ WHERE char *IndentString;
 WHERE char *PrintCommand;
 WHERE char *NewMailCommand;
 WHERE char *Realname;
-WHERE char *SendCharset;
 WHERE char *Shell;
 WHERE char *SimpleSearch;
 #ifdef USE_SMTP
diff --git a/init.h b/init.h
index 18ba0e2fc3a6572d60c8079081abba70e0c48e27..5f97fe9b69c11db47770a5aa1c468915f3063f69 100644 (file)
--- a/init.h
+++ b/init.h
@@ -74,7 +74,6 @@
 #include "recvcmd.h"
 #include "remailer.h"
 #include "rfc1524.h"
-#include "rfc2231.h"
 #include "rfc3676.h"
 #include "score.h"
 #include "send.h"
index 99e0190c0a18497e872eefe98ab9aea64a77ed48..505088971de7eec8420df044b083a125caf5f9a3 100644 (file)
@@ -28,7 +28,6 @@
 #include "email/email.h"
 #include "mutt.h"
 #include "globals.h"
-#include "rfc2047.h"
 #include "parse.h"
 
 int url_parse_mailto(struct Envelope *e, char **body, const char *src)
@@ -112,8 +111,8 @@ int url_parse_mailto(struct Envelope *e, char **body, const char *src)
   rfc2047_decode_addrlist(e->mail_followup_to);
   rfc2047_decode_addrlist(e->return_path);
   rfc2047_decode_addrlist(e->sender);
-  mutt_rfc2047_decode(&e->x_label);
-  mutt_rfc2047_decode(&e->subject);
+  rfc2047_decode(&e->x_label);
+  rfc2047_decode(&e->subject);
 
   rc = 0;
 
diff --git a/parse.c b/parse.c
index 8dca557df271aa91ca6f7aa90dcf9f4d12b77813..5107ddad99ec79b2388ac5c4b06dfb32cbb9524a 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -39,8 +39,6 @@
 #include "options.h"
 #include "protos.h"
 #include "recvattach.h"
-#include "rfc2047.h"
-#include "rfc2231.h"
 
 struct Context;
 
@@ -484,7 +482,7 @@ struct Body *mutt_read_mime_header(FILE *fp, bool digest)
       else if (mutt_str_strcasecmp("description", line + 8) == 0)
       {
         mutt_str_replace(&p->description, c);
-        mutt_rfc2047_decode(&p->description);
+        rfc2047_decode(&p->description);
       }
     }
 #ifdef SUN_ATTACHMENT
@@ -499,7 +497,7 @@ struct Body *mutt_read_mime_header(FILE *fp, bool digest)
       else if (mutt_str_strcasecmp("data-description", line + 6) == 0)
       {
         mutt_str_replace(&p->description, c);
-        mutt_rfc2047_decode(&p->description);
+        rfc2047_decode(&p->description);
       }
     }
 #endif
@@ -851,7 +849,7 @@ int mutt_rfc822_parse_line(struct Envelope *e, struct Header *hdr, char *line,
           if (hdr)
           {
             mutt_str_replace(&hdr->content->description, p);
-            mutt_rfc2047_decode(&hdr->content->description);
+            rfc2047_decode(&hdr->content->description);
           }
           matched = 1;
         }
@@ -1159,7 +1157,7 @@ int mutt_rfc822_parse_line(struct Envelope *e, struct Header *hdr, char *line,
     {
       struct ListNode *np = mutt_list_insert_tail(&e->userhdrs, mutt_str_strdup(line));
       if (do_2047)
-        mutt_rfc2047_decode(&np->data);
+        rfc2047_decode(&np->data);
     }
   }
 
@@ -1304,7 +1302,7 @@ struct Envelope *mutt_rfc822_read_header(FILE *f, struct Header *hdr,
     {
       regmatch_t pmatch[1];
 
-      mutt_rfc2047_decode(&e->subject);
+      rfc2047_decode(&e->subject);
 
       if (ReplyRegex && ReplyRegex->regex &&
           (regexec(ReplyRegex->regex, e->subject, 1, pmatch, 0) == 0))
diff --git a/rfc2047.c b/rfc2047.c
deleted file mode 100644 (file)
index b20538d..0000000
--- a/rfc2047.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * @file
- * RFC2047 MIME extensions routines
- *
- * @authors
- * Copyright (C) 1996-2000,2010 Michael R. Elkins <me@mutt.org>
- * Copyright (C) 2000-2002 Edmund Grimley Evans <edmundo@rano.org>
- *
- * @copyright
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 2 of the License, or (at your option) any later
- * version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "config.h"
-#include "mutt/mutt.h"
-#include "email/email.h"
-#include "globals.h"
-
-#include <string.h>
-
-/**
- * rfc2047_encode_addrlist - Encode any RFC2047 headers, where required, in an Address list
- * @param addr Address list
- * @param tag  Header tag (used for wrapping calculation)
- */
-void rfc2047_encode_addrlist(struct Address *addr, const char *tag)
-{
-  struct Address *ptr = addr;
-  int col = tag ? strlen(tag) + 2 : 32;
-
-  while (ptr)
-  {
-    if (ptr->personal)
-      mutt_rfc2047_encode(&ptr->personal, AddressSpecials, col, SendCharset);
-    else if (ptr->group && ptr->mailbox)
-      mutt_rfc2047_encode(&ptr->mailbox, AddressSpecials, col, SendCharset);
-    ptr = ptr->next;
-  }
-}
-
-/**
- * rfc2047_decode_addrlist - Decode any RFC2047 headers in an Address list
- * @param a Address list
- */
-void rfc2047_decode_addrlist(struct Address *a)
-{
-  while (a)
-  {
-    if (a->personal &&
-        ((strstr(a->personal, "=?") != NULL) || (AssumedCharset && *AssumedCharset)))
-    {
-      mutt_rfc2047_decode(&a->personal);
-    }
-    else if (a->group && a->mailbox && (strstr(a->mailbox, "=?") != NULL))
-      mutt_rfc2047_decode(&a->mailbox);
-    a = a->next;
-  }
-}
diff --git a/send.c b/send.c
index f219197c00fc3258674f03175624aef8855c7668..ae0350546a74eb4575015827aea6618360296921 100644 (file)
--- a/send.c
+++ b/send.c
@@ -1231,7 +1231,7 @@ void mutt_encode_descriptions(struct Body *b, short recurse)
   {
     if (t->description)
     {
-      mutt_rfc2047_encode(&t->description, NULL, sizeof("Content-Description:"), SendCharset);
+      rfc2047_encode(&t->description, NULL, sizeof("Content-Description:"), SendCharset);
     }
     if (recurse && t->parts)
       mutt_encode_descriptions(t->parts, recurse);
@@ -1247,7 +1247,7 @@ static void decode_descriptions(struct Body *b)
   {
     if (t->description)
     {
-      mutt_rfc2047_decode(&t->description);
+      rfc2047_decode(&t->description);
     }
     if (t->parts)
       decode_descriptions(t->parts);
index 2912fce6aa2e3e80c4dc697047ab0d8a233afd59..7dd397ea1918b9895eb2a12606a68e1e8d4d5e92 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -58,8 +58,6 @@
 #include "parse.h"
 #include "protos.h"
 #include "recvattach.h"
-#include "rfc2047.h"
-#include "rfc2231.h"
 #include "send.h"
 #include "smtp.h"
 #include "state.h"
@@ -2322,7 +2320,7 @@ static void encode_headers(struct ListHead *h)
     if (!tmp)
       continue;
 
-    mutt_rfc2047_encode(&tmp, NULL, i + 2, SendCharset);
+    rfc2047_encode(&tmp, NULL, i + 2, SendCharset);
     mutt_mem_realloc(&np->data, i + 2 + mutt_str_strlen(tmp) + 1);
 
     sprintf(np->data + i + 2, "%s", tmp);
@@ -2837,7 +2835,7 @@ void mutt_prepare_envelope(struct Envelope *env, bool final)
     if (!OptNewsSend || MimeSubject)
 #endif
     {
-      mutt_rfc2047_encode(&env->subject, NULL, sizeof("Subject:"), SendCharset);
+      rfc2047_encode(&env->subject, NULL, sizeof("Subject:"), SendCharset);
     }
   encode_headers(&env->userhdrs);
 }
@@ -2854,7 +2852,7 @@ void mutt_unprepare_envelope(struct Envelope *env)
   struct ListNode *item = NULL;
   STAILQ_FOREACH(item, &env->userhdrs, entries)
   {
-    mutt_rfc2047_decode(&item->data);
+    rfc2047_decode(&item->data);
   }
 
   mutt_addr_free(&env->mail_followup_to);
@@ -2865,7 +2863,7 @@ void mutt_unprepare_envelope(struct Envelope *env)
   rfc2047_decode_addrlist(env->bcc);
   rfc2047_decode_addrlist(env->from);
   rfc2047_decode_addrlist(env->reply_to);
-  mutt_rfc2047_decode(&env->subject);
+  rfc2047_decode(&env->subject);
 }
 
 static int bounce_message(FILE *fp, struct Header *h, struct Address *to,
index b1d5e2c9585e3a41fabbc063ac60994faeceb9da..c6c2e0919b9132cc18dde53f1372c79cafe85f1b 100644 (file)
@@ -74,7 +74,7 @@ void test_rfc2047(void)
   {
     /* decode the original string */
     char *s = mutt_str_strdup(test_data[i].original);
-    mutt_rfc2047_decode(&s);
+    rfc2047_decode(&s);
     if (!TEST_CHECK(strcmp(s, test_data[i].decoded) == 0))
     {
       TEST_MSG("Iteration: %zu", i);
@@ -85,7 +85,7 @@ void test_rfc2047(void)
 
     /* encode the expected result */
     s = mutt_str_strdup(test_data[i].decoded);
-    mutt_rfc2047_encode(&s, NULL, 0, "utf-8");
+    rfc2047_encode(&s, NULL, 0, "utf-8");
     if (!TEST_CHECK(strcmp(s, test_data[i].encoded) == 0))
     {
       TEST_MSG("Iteration: %zu", i);
@@ -96,7 +96,7 @@ void test_rfc2047(void)
 
     /* decode the encoded result */
     s = mutt_str_strdup(test_data[i].encoded);
-    mutt_rfc2047_decode(&s);
+    rfc2047_decode(&s);
     if (!TEST_CHECK(strcmp(s, test_data[i].decoded) == 0))
     {
       TEST_MSG("Iteration: %zu", i);