]> diplodocus.org Git - nmh/commitdiff
encode_rfc2047.c: Move interface to own file.
authorRalph Corderoy <ralph@inputplus.co.uk>
Sat, 11 Nov 2017 17:38:47 +0000 (17:38 +0000)
committerRalph Corderoy <ralph@inputplus.co.uk>
Sun, 12 Nov 2017 12:25:32 +0000 (12:25 +0000)
Makefile.am
h/prototypes.h
sbr/encode_rfc2047.c
sbr/encode_rfc2047.h [new file with mode: 0644]
uip/mhbuildsbr.c

index 2797949a7f92e77b14e9b22b087192d12d8b80d1..5b2c6f01813a97c78a9fddc1b96b81d1131105d1 100644 (file)
@@ -381,6 +381,7 @@ noinst_HEADERS = \
     sbr/cpydgst.h \
     sbr/ctype-checked.h \
     sbr/discard.h \
     sbr/cpydgst.h \
     sbr/ctype-checked.h \
     sbr/discard.h \
+    sbr/encode_rfc2047.h \
     sbr/error.h \
     sbr/escape_addresses.h \
     sbr/ext_hook.h \
     sbr/error.h \
     sbr/escape_addresses.h \
     sbr/ext_hook.h \
index dfc4e51590f8ccb7023c1dffdcf3442ea7c0c5ae..ddaad4a863ac1e51616fd8196483e13149d8848e 100644 (file)
@@ -17,26 +17,6 @@ struct msgs_array;
 
 char *concat (const char *, ...) ENDNULL;
 
 
 char *concat (const char *, ...) ENDNULL;
 
-/*
- * Encode a message header using RFC 2047 encoding.  If the message contains
- * no non-ASCII characters, then leave the header as-is.
- *
- * Arguments include:
- *
- * name                - Message header name
- * value       - Message header content; must point to allocated memory
- *               (may be changed if encoding is necessary)
- * encoding    - Encoding type.  May be one of CE_UNKNOWN (function chooses
- *               the encoding), CE_BASE64 or CE_QUOTED
- * charset     - Charset used for encoding.  If NULL, obtain from system
- *               locale.
- *
- * Returns 0 on success, any other value on failure.
- */
-
-int encode_rfc2047(const char *name, char **value, int encoding,
-                  const char *charset);
-
 /*
  * Print null-terminated PROMPT to and flush standard output.  Read answers from
  * standard input until one matches an entry in SWITCHES.  When one matches,
 /*
  * Print null-terminated PROMPT to and flush standard output.  Read answers from
  * standard input until one matches an entry in SWITCHES.  When one matches,
index 823fd824940becd9995e0b5fc5d7e55bb66e0f7f..e463bf6840ad94c2d3330be9c1d36c9732edee11 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
  */
 
 #include "h/mh.h"
+#include "encode_rfc2047.h"
 #include "check_charset.h"
 #include "error.h"
 #include "h/mhparse.h"
 #include "check_charset.h"
 #include "error.h"
 #include "h/mhparse.h"
diff --git a/sbr/encode_rfc2047.h b/sbr/encode_rfc2047.h
new file mode 100644 (file)
index 0000000..8016335
--- /dev/null
@@ -0,0 +1,24 @@
+/* encode_rfc2047.h -- encode message headers using RFC 2047 encoding.
+ *
+ * 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. */
+
+/*
+ * Encode a message header using RFC 2047 encoding.  If the message contains
+ * no non-ASCII characters, then leave the header as-is.
+ *
+ * Arguments include:
+ *
+ * name                - Message header name
+ * value       - Message header content; must point to allocated memory
+ *               (may be changed if encoding is necessary)
+ * encoding    - Encoding type.  May be one of CE_UNKNOWN (function chooses
+ *               the encoding), CE_BASE64 or CE_QUOTED
+ * charset     - Charset used for encoding.  If NULL, obtain from system
+ *               locale.
+ *
+ * Returns 0 on success, any other value on failure.
+ */
+
+int encode_rfc2047(const char *, char **, int, const char *);
index b7792a2c279647f22e9beba1ad42c18011a94f90..fd83155c2bff0cb54612d2d9a622f20fd7034c01 100644 (file)
@@ -14,6 +14,7 @@
  */
 
 #include "h/mh.h"
  */
 
 #include "h/mh.h"
+#include "sbr/encode_rfc2047.h"
 #include "sbr/copyip.h"
 #include "sbr/cpydata.h"
 #include "sbr/trimcpy.h"
 #include "sbr/copyip.h"
 #include "sbr/cpydata.h"
 #include "sbr/trimcpy.h"