]> diplodocus.org Git - nmh/commitdiff
check_charset.c: Move interface to own file.
authorRalph Corderoy <ralph@inputplus.co.uk>
Sat, 11 Nov 2017 16:16:14 +0000 (16:16 +0000)
committerRalph Corderoy <ralph@inputplus.co.uk>
Sun, 12 Nov 2017 12:25:31 +0000 (12:25 +0000)
Makefile.am
h/prototypes.h
sbr/check_charset.c
sbr/check_charset.h [new file with mode: 0644]
sbr/encode_rfc2047.c
sbr/fmt_rfc2047.c
uip/mhbuildsbr.c
uip/mhlsbr.c
uip/mhparse.c
uip/mhshowsbr.c
uip/show.c

index 54d342b..4a00aac 100644 (file)
@@ -367,6 +367,7 @@ noinst_HEADERS = \
     sbr/atooi.h \
     sbr/base64.h \
     sbr/brkstring.h \
+    sbr/check_charset.h \
     sbr/context_del.h \
     sbr/context_find.h \
     sbr/context_foil.h \
index c0a12b5..4003765 100644 (file)
@@ -15,18 +15,6 @@ char *etcpath(char *) NONNULL(1);
 
 struct msgs_array;
 
-/*
- * Check to see if we can display a given character set natively.
- * Arguments include:
- *
- * str - Name of character set to check against
- * len - Length of "str"
- *
- * Returns 1 if the specified character set can be displayed natively,
- * 0 otherwise.
- */
-
-int check_charset (char *, int);
 int client(char *, char *, char *, int, int);
 void closefds(int);
 char *concat (const char *, ...) ENDNULL;
@@ -102,14 +90,6 @@ char **read_switch_multiword_via_readline (char *, struct swit *);
 
 char **getarguments (char *, int, char **, int);
 
-/*
- * Returns the MIME character set indicated by the current locale setting.
- * Should be used by routines that want to convert to/from the local
- * character set, or if you want to check to see if you can display content
- * in the local character set.
- */
-char *get_charset(void);
-
 m_getfld_state_t m_getfld_state_init(FILE *iob);
 void m_getfld_state_reset (m_getfld_state_t *);
 void m_getfld_state_destroy (m_getfld_state_t *);
@@ -213,13 +193,6 @@ char *trimcpy (char *);
 int uprf (const char *, const char *) PURE;
 int vfgets (FILE *, char **);
 
-/*
- * Output the local character set name, but make sure it is suitable for
- * 8-bit characters.
- */
-char *write_charset_8bit (void);
-
-
 /*
  * prototypes for some routines in uip
  */
index fcd8cc1..6c42b75 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "check_charset.h"
 
 #include <string.h>
 #include <langinfo.h>
diff --git a/sbr/check_charset.h b/sbr/check_charset.h
new file mode 100644 (file)
index 0000000..bed70d7
--- /dev/null
@@ -0,0 +1,31 @@
+/* check_charset.h -- routines for character sets
+ *
+ * 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. */
+
+/*
+ * Returns the MIME character set indicated by the current locale setting.
+ * Should be used by routines that want to convert to/from the local
+ * character set, or if you want to check to see if you can display content
+ * in the local character set.
+ */
+char *get_charset(void);
+
+/*
+ * Check to see if we can display a given character set natively.
+ * Arguments include:
+ *
+ * str - Name of character set to check against
+ * len - Length of "str"
+ *
+ * Returns 1 if the specified character set can be displayed natively,
+ * 0 otherwise.
+ */
+int check_charset(char *, int);
+
+/*
+ * Output the local character set name, but make sure it is suitable for
+ * 8-bit characters.
+ */
+char *write_charset_8bit(void);
index f468972..823fd82 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "check_charset.h"
 #include "error.h"
 #include "h/mhparse.h"
 #include "h/addrsbr.h"
index 4537476..6609389 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "check_charset.h"
 #include "h/utils.h"
 #ifdef HAVE_ICONV
 #  include <iconv.h>
index 309f298..54f763a 100644 (file)
@@ -14,6 +14,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/check_charset.h"
 #include "sbr/getcpy.h"
 #include "sbr/m_convert.h"
 #include "sbr/getfolder.h"
index b35d366..7ab0863 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/check_charset.h"
 #include "sbr/getcpy.h"
 #include "sbr/brkstring.h"
 #include "sbr/ambigsw.h"
index efa47fa..fde0e2c 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/check_charset.h"
 #include "sbr/getcpy.h"
 #include "sbr/context_find.h"
 #include "sbr/pidstatus.h"
index 92c2097..59f6f43 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/check_charset.h"
 #include "sbr/getcpy.h"
 #include "sbr/context_find.h"
 #include "sbr/pidstatus.h"
index 7753c83..b3c8303 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/check_charset.h"
 #include "sbr/m_draft.h"
 #include "sbr/m_convert.h"
 #include "sbr/getfolder.h"