]> diplodocus.org Git - nmh/commitdiff
read_switch_multi*_readline.c: Move interface to own file.
authorRalph Corderoy <ralph@inputplus.co.uk>
Sun, 12 Nov 2017 00:33:55 +0000 (00:33 +0000)
committerRalph Corderoy <ralph@inputplus.co.uk>
Sun, 12 Nov 2017 12:25:35 +0000 (12:25 +0000)
Makefile.am
h/prototypes.h
sbr/read_switch_multiword_via_readline.c
sbr/read_switch_multiword_via_readline.h [new file with mode: 0644]
uip/whatnowsbr.c

index 5db1235..65f519c 100644 (file)
@@ -421,6 +421,7 @@ noinst_HEADERS = \
     sbr/read_line.h \
     sbr/read_switch.h \
     sbr/read_switch_multiword.h \
+    sbr/read_switch_multiword_via_readline.h \
     sbr/read_yes_or_no_if_tty.h \
     sbr/readconfig.h \
     sbr/refile.h \
index c08b645..0c52e91 100644 (file)
@@ -15,13 +15,6 @@ char *etcpath(char *) NONNULL(1);
 
 struct msgs_array;
 
-/*
- * Same as read_switch_multiword but using readline(3) for input.
- */
-#ifdef READLINE_SUPPORT
-char **read_switch_multiword_via_readline (char *, struct swit *);
-#endif /* READLINE_SUPPORT */
-
 char **getarguments (char *, int, char **, int);
 
 m_getfld_state_t m_getfld_state_init(FILE *iob);
index 2320ccb..df91701 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "read_switch_multiword_via_readline.h"
 #include "smatch.h"
 #include "brkstring.h"
 #include "ambigsw.h"
diff --git a/sbr/read_switch_multiword_via_readline.h b/sbr/read_switch_multiword_via_readline.h
new file mode 100644 (file)
index 0000000..e1ac82d
--- /dev/null
@@ -0,0 +1,12 @@
+/* read_switch_multiword_via_readline.h -- get an answer from the user, with readline
+ *
+ * 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. */
+
+/*
+ * Same as read_switch_multiword but using readline(3) for input.
+ */
+#ifdef READLINE_SUPPORT
+char **read_switch_multiword_via_readline(char *, struct swit *);
+#endif /* READLINE_SUPPORT */
index 8a73536..a2f872c 100644 (file)
@@ -38,6 +38,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/read_switch_multiword_via_readline.h"
 #include "sbr/concat.h"
 #include "sbr/showfile.h"
 #include "sbr/smatch.h"