From: Ralph Corderoy Date: Sat, 11 Nov 2017 17:33:36 +0000 (+0000) Subject: fmt_rfc2047.c: Move interface to own file. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/827facc0fe3f6f0ef2a9e81917d2eb29fac209aa?ds=inline;hp=2b7a0f47ea3ecea7b50c3052e854eae0d306da80 fmt_rfc2047.c: Move interface to own file. --- diff --git a/Makefile.am b/Makefile.am index 3d1353b4..2797949a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -385,6 +385,7 @@ noinst_HEADERS = \ sbr/escape_addresses.h \ sbr/ext_hook.h \ sbr/fdcompare.h \ + sbr/fmt_rfc2047.h \ sbr/folder_addmsg.h \ sbr/folder_delmsgs.h \ sbr/folder_free.h \ diff --git a/h/prototypes.h b/h/prototypes.h index 5f8f8e0d..dfc4e515 100644 --- a/h/prototypes.h +++ b/h/prototypes.h @@ -16,19 +16,6 @@ char *etcpath(char *) NONNULL(1); struct msgs_array; char *concat (const char *, ...) ENDNULL; -int decode_rfc2047 (char *, char *, size_t); - -/* - * Decode two characters into their quoted-printable representation. - * - * Arguments are: - * - * byte1 - First character of Q-P representation - * byte2 - Second character of Q-P representation - * - * Returns the decoded value, -1 if the conversion failed. - */ -int decode_qp(unsigned char byte1, unsigned char byte2) CONST; /* * Encode a message header using RFC 2047 encoding. If the message contains diff --git a/sbr/fmt_rfc2047.c b/sbr/fmt_rfc2047.c index 66093898..2fe63e56 100644 --- a/sbr/fmt_rfc2047.c +++ b/sbr/fmt_rfc2047.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "fmt_rfc2047.h" #include "check_charset.h" #include "h/utils.h" #ifdef HAVE_ICONV diff --git a/sbr/fmt_rfc2047.h b/sbr/fmt_rfc2047.h new file mode 100644 index 00000000..8b6ec095 --- /dev/null +++ b/sbr/fmt_rfc2047.h @@ -0,0 +1,19 @@ +/* fmt_rfc2047.h -- decode RFC-2047 header format + * + * This code is Copyright (c) 2017, by the authors of nmh. See the + * COPYRIGHT file in the root directory of the nmh distribution for + * complete copyright information. */ + +/* + * Decode two characters into their quoted-printable representation. + * + * Arguments are: + * + * byte1 - First character of Q-P representation + * byte2 - Second character of Q-P representation + * + * Returns the decoded value, -1 if the conversion failed. + */ +int decode_qp(unsigned char byte1, unsigned char byte2) CONST; + +int decode_rfc2047(char *, char *, size_t); diff --git a/sbr/fmt_scan.c b/sbr/fmt_scan.c index 74000876..3c4c8d77 100644 --- a/sbr/fmt_scan.c +++ b/sbr/fmt_scan.c @@ -9,6 +9,7 @@ */ #include "h/mh.h" +#include "fmt_rfc2047.h" #include "uprf.h" #include "context_find.h" #include "error.h" diff --git a/uip/mhfixmsg.c b/uip/mhfixmsg.c index 68c1bf71..dd0d8a23 100644 --- a/uip/mhfixmsg.c +++ b/uip/mhfixmsg.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/fmt_rfc2047.h" #include "sbr/cpydata.h" #include "sbr/trimcpy.h" #include "sbr/m_convert.h" diff --git a/uip/mhparse.c b/uip/mhparse.c index d4a239cb..110ed4e7 100644 --- a/uip/mhparse.c +++ b/uip/mhparse.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/fmt_rfc2047.h" #include "sbr/uprf.h" #include "sbr/check_charset.h" #include "sbr/getcpy.h" diff --git a/uip/picksbr.c b/uip/picksbr.c index 346dcc70..aff2fea7 100644 --- a/uip/picksbr.c +++ b/uip/picksbr.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/fmt_rfc2047.h" #include "sbr/brkstring.h" #include "sbr/ambigsw.h" #include "sbr/error.h"