]> diplodocus.org Git - nmh/commitdiff
getarguments.c: Move interface to own file.
authorRalph Corderoy <ralph@inputplus.co.uk>
Sun, 12 Nov 2017 12:31:05 +0000 (12:31 +0000)
committerRalph Corderoy <ralph@inputplus.co.uk>
Sun, 12 Nov 2017 12:31:05 +0000 (12:31 +0000)
54 files changed:
Makefile.am
h/prototypes.h
sbr/getarguments.c
sbr/getarguments.h [new file with mode: 0644]
uip/ali.c
uip/anno.c
uip/ap.c
uip/burst.c
uip/comp.c
uip/dist.c
uip/dp.c
uip/flist.c
uip/fmtdump.c
uip/fmttest.c
uip/folder.c
uip/forw.c
uip/imaptest.c
uip/inc.c
uip/install-mh.c
uip/mark.c
uip/mhbuild.c
uip/mhfixmsg.c
uip/mhical.c
uip/mhlist.c
uip/mhlogin.c
uip/mhlsbr.c
uip/mhn.c
uip/mhparam.c
uip/mhpath.c
uip/mhshow.c
uip/mhstore.c
uip/mkstemp.c
uip/msgchk.c
uip/new.c
uip/packf.c
uip/pick.c
uip/post.c
uip/prompter.c
uip/rcvdist.c
uip/rcvpack.c
uip/rcvstore.c
uip/rcvtty.c
uip/refile.c
uip/repl.c
uip/rmf.c
uip/rmm.c
uip/scan.c
uip/send.c
uip/show.c
uip/slocal.c
uip/sortm.c
uip/viamail.c
uip/whatnowsbr.c
uip/whom.c

index 65f519c..68ec278 100644 (file)
@@ -395,6 +395,7 @@ noinst_HEADERS = \
     sbr/folder_pack.h \
     sbr/folder_read.h \
     sbr/folder_realloc.h \
+    sbr/getarguments.h \
     sbr/getcpy.h \
     sbr/geteditor.h \
     sbr/getfolder.h \
index 0c52e91..d3f05ac 100644 (file)
@@ -15,8 +15,6 @@ char *etcpath(char *) NONNULL(1);
 
 struct msgs_array;
 
-char **getarguments (char *, int, char **, int);
-
 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 *);
index a7ac1be..1ab1163 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "getarguments.h"
 #include "context_find.h"
 #include "brkstring.h"
 #include "h/utils.h"
diff --git a/sbr/getarguments.h b/sbr/getarguments.h
new file mode 100644 (file)
index 0000000..74fa8c7
--- /dev/null
@@ -0,0 +1,7 @@
+/* getarguments.h -- Get the argument vector ready to go.
+ *
+ * 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. */
+
+char **getarguments(char *, int, char **, int);
index 6e94f8c..d14b38a 100644 (file)
--- a/uip/ali.c
+++ b/uip/ali.c
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/smatch.h"
 #include "sbr/getcpy.h"
 #include "sbr/context_find.h"
index 8671ff6..0207d47 100644 (file)
@@ -42,6 +42,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/seq_setcur.h"
 #include "sbr/seq_save.h"
 #include "sbr/smatch.h"
index 0a09a21..83295af 100644 (file)
--- a/uip/ap.c
+++ b/uip/ap.c
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/smatch.h"
 #include "sbr/getcpy.h"
 #include "sbr/ambigsw.h"
index 6e401d4..5048e4d 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/seq_setprev.h"
 #include "sbr/seq_setcur.h"
 #include "sbr/seq_save.h"
index 2143625..34d46bb 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/read_switch_multiword.h"
 #include "sbr/seq_setprev.h"
 #include "sbr/seq_save.h"
index 7e1b2de..0dc2cca 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/read_switch_multiword.h"
 #include "sbr/seq_setprev.h"
 #include "sbr/seq_setcur.h"
index 9458626..00edef0 100644 (file)
--- a/uip/dp.c
+++ b/uip/dp.c
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/smatch.h"
 #include "sbr/context_save.h"
 #include "sbr/ambigsw.h"
index c420b94..aedfd88 100644 (file)
@@ -14,6 +14,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/smatch.h"
 #include "sbr/ssequal.h"
 #include "sbr/getfolder.h"
index c43b412..0545c0d 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/smatch.h"
 #include "sbr/ambigsw.h"
 #include "sbr/print_version.h"
index 030e80a..21e6de6 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/seq_setprev.h"
 #include "sbr/seq_save.h"
 #include "sbr/smatch.h"
index 9072246..13a9c46 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/concat.h"
 #include "sbr/seq_setprev.h"
 #include "sbr/seq_setcur.h"
index 63b902e..2886d05 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/read_switch_multiword.h"
 #include "sbr/seq_setprev.h"
 #include "sbr/seq_setcur.h"
index 2aa9e16..9009159 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/smatch.h"
 #include "sbr/client.h"
 #include "sbr/getcpy.h"
index 1066801..3692647 100644 (file)
--- a/uip/inc.c
+++ b/uip/inc.c
@@ -31,6 +31,7 @@
 #endif
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/concat.h"
 #include "sbr/seq_setunseen.h"
 #include "sbr/seq_setcur.h"
index 97e1ac4..ac2c5c9 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/read_switch.h"
 #include "sbr/concat.h"
 #include "sbr/smatch.h"
index b0c91d1..72328ba 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/seq_save.h"
 #include "sbr/smatch.h"
 #include "sbr/snprintb.h"
index 212d8e6..1ef8421 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/smatch.h"
 #include "sbr/m_backup.h"
 #include "sbr/context_find.h"
index aabe1c5..5312fd1 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/concat.h"
 #include "sbr/seq_setprev.h"
 #include "sbr/seq_setcur.h"
index b2cd5b0..d0ebd13 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/concat.h"
 #include "sbr/smatch.h"
 #include "sbr/ambigsw.h"
index f4aa532..ec6c5a8 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/seq_setprev.h"
 #include "sbr/seq_setcur.h"
 #include "sbr/seq_save.h"
index ba48f4c..5e6d161 100644 (file)
@@ -10,6 +10,7 @@
 #include <string.h>
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/concat.h"
 #include "sbr/smatch.h"
 #include "sbr/ambigsw.h"
index cfd8074..1a7125e 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/concat.h"
 #include "sbr/smatch.h"
 #include "sbr/r1bindex.h"
index 4cd99d7..c6f861a 100644 (file)
--- a/uip/mhn.c
+++ b/uip/mhn.c
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/seq_setprev.h"
 #include "sbr/seq_setcur.h"
 #include "sbr/seq_save.h"
index caf72c1..65082a0 100644 (file)
@@ -9,6 +9,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/smatch.h"
 #include "sbr/context_find.h"
 #include "sbr/ambigsw.h"
index 27a8ec6..46b2436 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/seq_setprev.h"
 #include "sbr/seq_save.h"
 #include "sbr/smatch.h"
index 8b07cb9..9367f00 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/seq_setunseen.h"
 #include "sbr/seq_setprev.h"
 #include "sbr/seq_setcur.h"
index 56b186a..a1837bf 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/seq_setprev.h"
 #include "sbr/seq_setcur.h"
 #include "sbr/seq_save.h"
index 0a44a5f..b7fa5ae 100644 (file)
@@ -120,6 +120,7 @@ build_template(const char *directory, const char *prefix, const char *suffix)
 
 #if NMH
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/smatch.h"
 #include "sbr/ambigsw.h"
 #include "sbr/print_version.h"
index 4998353..411686e 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/smatch.h"
 #include "sbr/ambigsw.h"
 #include "sbr/print_version.h"
index 03d89a3..6736790 100644 (file)
--- a/uip/new.c
+++ b/uip/new.c
@@ -12,6 +12,7 @@
 #include <sys/types.h>
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/concat.h"
 #include "sbr/smatch.h"
 #include "sbr/r1bindex.h"
index 19ab1d4..727e00d 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/read_yes_or_no_if_tty.h"
 #include "sbr/concat.h"
 #include "sbr/seq_setprev.h"
index 3290330..6ca9eaa 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/seq_setprev.h"
 #include "sbr/seq_save.h"
 #include "sbr/smatch.h"
index 2a2d814..27f7ad8 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/concat.h"
 #include "sbr/smatch.h"
 #include "sbr/cpydata.h"
index d91173f..b5fb93a 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/smatch.h"
 #include "sbr/cpydata.h"
 #include "sbr/m_atoi.h"
index 89d0730..85e877d 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/smatch.h"
 #include "sbr/cpydata.h"
 #include "sbr/context_find.h"
index 31a18b0..a6efb62 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/smatch.h"
 #include "sbr/ambigsw.h"
 #include "sbr/print_version.h"
index e01a5a2..2484aaa 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/seq_setunseen.h"
 #include "sbr/seq_save.h"
 #include "sbr/smatch.h"
index 22edfb6..77fa8bd 100644 (file)
@@ -11,6 +11,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/smatch.h"
 #include "sbr/closefds.h"
 #include "sbr/ambigsw.h"
index c985d38..68202ae 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/seq_setprev.h"
 #include "sbr/seq_setcur.h"
 #include "sbr/seq_save.h"
index 976c7a6..7581c17 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/read_switch_multiword.h"
 #include "sbr/concat.h"
 #include "sbr/seq_setprev.h"
index 1e7f90c..37e7162 100644 (file)
--- a/uip/rmf.c
+++ b/uip/rmf.c
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/read_yes_or_no_if_tty.h"
 #include "sbr/concat.h"
 #include "sbr/smatch.h"
index 38ff284..df28926 100644 (file)
--- a/uip/rmm.c
+++ b/uip/rmm.c
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/seq_setprev.h"
 #include "sbr/smatch.h"
 #include "sbr/m_convert.h"
index ea6f0fc..6534768 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/seq_setprev.h"
 #include "sbr/seq_save.h"
 #include "sbr/smatch.h"
index 98d353d..08c87b4 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/read_switch_multiword.h"
 #include "sbr/concat.h"
 #include "sbr/seq_setprev.h"
index f77b8f0..99a6608 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/seq_setunseen.h"
 #include "sbr/seq_setprev.h"
 #include "sbr/seq_setcur.h"
index 28e403d..cc1aa7b 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/smatch.h"
 #include "sbr/strindex.h"
 #include "sbr/closefds.h"
index 79e53fd..e8a0f4d 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/seq_setprev.h"
 #include "sbr/seq_setcur.h"
 #include "sbr/seq_save.h"
index 6e889b6..8856702 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/concat.h"
 #include "sbr/smatch.h"
 #include "sbr/context_find.h"
index a2f872c..68a56ba 100644 (file)
@@ -38,6 +38,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/read_switch_multiword_via_readline.h"
 #include "sbr/concat.h"
 #include "sbr/showfile.h"
index e648739..9b03e16 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/getarguments.h"
 #include "sbr/smatch.h"
 #include "sbr/closefds.h"
 #include "sbr/m_draft.h"