]> diplodocus.org Git - nmh/commitdiff
fmt_new.c: Move interface to own file.
authorRalph Corderoy <ralph@inputplus.co.uk>
Thu, 16 Nov 2017 00:14:35 +0000 (00:14 +0000)
committerRalph Corderoy <ralph@inputplus.co.uk>
Thu, 16 Nov 2017 00:14:35 +0000 (00:14 +0000)
19 files changed:
Makefile.am
h/fmt_scan.h
sbr/fmt_new.c
sbr/fmt_new.h [new file with mode: 0644]
uip/ap.c
uip/comp.c
uip/dp.c
uip/fmtdump.c
uip/fmttest.c
uip/forwsbr.c
uip/inc.c
uip/mhical.c
uip/mhlsbr.c
uip/mhshowsbr.c
uip/rcvdist.c
uip/rcvtty.c
uip/replsbr.c
uip/scan.c
uip/sendsbr.c

index 865b70a635761f2c9f70ed3efcaecfbb9c590d4a..1b7c2862ed939caea9a75d6946f56570616f8c14 100644 (file)
@@ -387,6 +387,7 @@ noinst_HEADERS = \
     sbr/ext_hook.h \
     sbr/fdcompare.h \
     sbr/fmt_addr.h \
     sbr/ext_hook.h \
     sbr/fdcompare.h \
     sbr/fmt_addr.h \
+    sbr/fmt_new.h \
     sbr/fmt_rfc2047.h \
     sbr/folder_addmsg.h \
     sbr/folder_delmsgs.h \
     sbr/fmt_rfc2047.h \
     sbr/folder_addmsg.h \
     sbr/folder_delmsgs.h \
index dc945ef3306534e7cda42b2a3d5fcc673a4e46e3..40ef9c03a16d641decb7f150194becfa2fd950c0 100644 (file)
@@ -96,28 +96,6 @@ struct fmt_callbacks {
     void *             trace_context;
 };
 
     void *             trace_context;
 };
 
-/*
- * Create a new format string.  Arguments are:
- *
- * form                - Name of format file.  Will be searched by etcpath(), see that
- *               function for details.
- * format      - The format string to be used if no format file is given
- * default_fs  - The default format string to be used if neither form nor
- *               format is given
- *
- * This function also takes care of processing \ escapes like \n, \t, etc.
- *
- * Returns an allocated format string.
- */
-
-char *new_fs (char *form, char *format, char *default_fs);
-
-/*
- * Free memory allocated by new_fs().  It allocates to a static so
- * no argument is necessary.
- */
-void free_fs(void);
-
 /*
  * Compile a format string into a set of format instructions.  Arguments are:
  *
 /*
  * Compile a format string into a set of format instructions.  Arguments are:
  *
index c78e62d449dd3b50141e5c92a32b02ece29985a3..2407cc629e6f6134d9145e60b92094bf5f27c729 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
  */
 
 #include "h/mh.h"
+#include "fmt_new.h"
 #include "getcpy.h"
 #include "error.h"
 #include "h/utils.h"
 #include "getcpy.h"
 #include "error.h"
 #include "h/utils.h"
diff --git a/sbr/fmt_new.h b/sbr/fmt_new.h
new file mode 100644 (file)
index 0000000..0860365
--- /dev/null
@@ -0,0 +1,26 @@
+/* fmt_new.h -- read format file/string and normalize
+ *
+ * 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. */
+
+/*
+ * Create a new format string.  Arguments are:
+ *
+ * form                - Name of format file.  Will be searched by etcpath(), see that
+ *               function for details.
+ * format      - The format string to be used if no format file is given
+ * default_fs  - The default format string to be used if neither form nor
+ *               format is given
+ *
+ * This function also takes care of processing \ escapes like \n, \t, etc.
+ *
+ * Returns an allocated format string.
+ */
+char *new_fs(char *, char *, char *);
+
+/*
+ * Free memory allocated by new_fs().  It allocates to a static so
+ * no argument is necessary.
+ */
+void free_fs(void);
index 83295af9625b2ffaf6502be677217256b367398e..8be42a02b4c8d585274c94e5d882026b2ba2aa67 100644 (file)
--- a/uip/ap.c
+++ b/uip/ap.c
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
  */
 
 #include "h/mh.h"
+#include "sbr/fmt_new.h"
 #include "sbr/getarguments.h"
 #include "sbr/smatch.h"
 #include "sbr/getcpy.h"
 #include "sbr/getarguments.h"
 #include "sbr/smatch.h"
 #include "sbr/getcpy.h"
index 759d0050376cbfbbb1bd204fb6f1d760fbcc9a79..00aa1c2c7c3ba5daa8cf7061d19632676301b2f3 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
  */
 
 #include "h/mh.h"
+#include "sbr/fmt_new.h"
 #include "whatnowproc.h"
 #include "sbr/m_name.h"
 #include "sbr/m_gmprot.h"
 #include "whatnowproc.h"
 #include "sbr/m_name.h"
 #include "sbr/m_gmprot.h"
index 00edef02bee15425e865ea6ff98c639ac6362483..7b6ad83b4a703b225b483e0965df9a92e674e40c 100644 (file)
--- a/uip/dp.c
+++ b/uip/dp.c
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
  */
 
 #include "h/mh.h"
+#include "sbr/fmt_new.h"
 #include "sbr/getarguments.h"
 #include "sbr/smatch.h"
 #include "sbr/context_save.h"
 #include "sbr/getarguments.h"
 #include "sbr/smatch.h"
 #include "sbr/context_save.h"
index 9f1f162e36892f984be75017b180b4eda37c407c..b5a4660c94da3c91e08fccf9ccbeedc3b5d83487 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
  */
 
 #include "h/mh.h"
+#include "sbr/fmt_new.h"
 #include "scansbr.h"
 #include "sbr/getarguments.h"
 #include "sbr/smatch.h"
 #include "scansbr.h"
 #include "sbr/getarguments.h"
 #include "sbr/smatch.h"
index 72f60f91bb80c3369299e9aa41ce654f314928ee..db16ae74c8fd587fbd52e93f10322cb85212e51f 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
  */
 
 #include "h/mh.h"
+#include "sbr/fmt_new.h"
 #include "scansbr.h"
 #include "sbr/m_name.h"
 #include "sbr/m_getfld.h"
 #include "scansbr.h"
 #include "sbr/m_name.h"
 #include "sbr/m_getfld.h"
index 005bc9ca4837bc0d1f400bb0456fd2cb31b53a7c..2cdfb30333f9257d82a5c3553b96c8571e7ebdc4 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
  */
 
 #include "h/mh.h"
+#include "sbr/fmt_new.h"
 #include "sbr/dtime.h"
 #include "sbr/m_getfld.h"
 #include "sbr/getcpy.h"
 #include "sbr/dtime.h"
 #include "sbr/m_getfld.h"
 #include "sbr/getcpy.h"
index 7484d34de42c68c7b51b2e06606f349cfd2e87d3..0344307720e6d2bd66d70983b7034b559db3370d 100644 (file)
--- a/uip/inc.c
+++ b/uip/inc.c
@@ -31,6 +31,7 @@
 #endif
 
 #include "h/mh.h"
 #endif
 
 #include "h/mh.h"
+#include "sbr/fmt_new.h"
 #include "sbr/dtime.h"
 #include "scansbr.h"
 #include "sbr/m_name.h"
 #include "sbr/dtime.h"
 #include "scansbr.h"
 #include "sbr/m_name.h"
index 9618b2b2437bc4b6acc4d9be7c27184fa707e994..8025c02faaae74dd3e474cb83df6a30842558523 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
  */
 
 #include "h/mh.h"
+#include "sbr/fmt_new.h"
 #include "sbr/getarguments.h"
 #include "sbr/concat.h"
 #include "sbr/smatch.h"
 #include "sbr/getarguments.h"
 #include "sbr/concat.h"
 #include "sbr/smatch.h"
index 9af4b8e6a326c15e07eb0fa7318f8c0c460bd4b9..86bae544c55e2ea16203742457bffe8f3a903f4a 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
  */
 
 #include "h/mh.h"
+#include "sbr/fmt_new.h"
 #include "mhlsbr.h"
 #include "sbr/m_getfld.h"
 #include "sbr/getarguments.h"
 #include "mhlsbr.h"
 #include "sbr/m_getfld.h"
 #include "sbr/getarguments.h"
index 909506e02c76fbbcf4a042d01146b9c695467803..fccf3c185d39139762939491b29e35869888a044 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
  */
 
 #include "h/mh.h"
+#include "sbr/fmt_new.h"
 #include "sbr/concat.h"
 #include "sbr/trimcpy.h"
 #include "sbr/check_charset.h"
 #include "sbr/concat.h"
 #include "sbr/trimcpy.h"
 #include "sbr/check_charset.h"
index c8a1d9573e0ea0bfb157ad4dca97bad7eb08d723..f065ad1de40d598ea971d4ee091f7ff43a01d037 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
  */
 
 #include "h/mh.h"
+#include "sbr/fmt_new.h"
 #include "distsbr.h"
 #include "sbr/m_gmprot.h"
 #include "sbr/m_getfld.h"
 #include "distsbr.h"
 #include "sbr/m_gmprot.h"
 #include "sbr/m_getfld.h"
index 90994bffe64f08cd0a2e22314eb3e8b11fe9e69d..4098d709a7d4a8690242fdf6fedbc7718fd9f023 100644 (file)
@@ -11,6 +11,7 @@
  */
 
 #include "h/mh.h"
  */
 
 #include "h/mh.h"
+#include "sbr/fmt_new.h"
 #include "scansbr.h"
 #include "sbr/getarguments.h"
 #include "sbr/smatch.h"
 #include "scansbr.h"
 #include "sbr/getarguments.h"
 #include "sbr/smatch.h"
index a76444b1b5903360275d390e17ddd0a1be6e32d9..55bcd6ceee9e829300dc243db3c502fa11b8b819 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
  */
 
 #include "h/mh.h"
+#include "sbr/fmt_new.h"
 #include "sbr/m_name.h"
 #include "sbr/m_gmprot.h"
 #include "sbr/m_getfld.h"
 #include "sbr/m_name.h"
 #include "sbr/m_gmprot.h"
 #include "sbr/m_getfld.h"
index 8a2e8dc00a8e857e5b8da0c35344e14231656d1d..b682ddd9a58018306f1921f190f7b0755343261f 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
  */
 
 #include "h/mh.h"
+#include "sbr/fmt_new.h"
 #include "sbr/dtime.h"
 #include "scansbr.h"
 #include "sbr/m_name.h"
 #include "sbr/dtime.h"
 #include "scansbr.h"
 #include "sbr/m_name.h"
index a044a620f2011a17489e3cef3faf25b976abd29f..f369f08b28a68cee8cd979c307158c1aced1a21c 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
  */
 
 #include "h/mh.h"
+#include "sbr/fmt_new.h"
 #include "sendsbr.h"
 #include "distsbr.h"
 #include "annosbr.h"
 #include "sendsbr.h"
 #include "distsbr.h"
 #include "annosbr.h"