From: Ralph Corderoy Date: Sun, 12 Nov 2017 00:33:55 +0000 (+0000) Subject: read_switch_multi*_readline.c: Move interface to own file. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/b0d9589edea941ca26f07f07721e7228c280feb6 read_switch_multi*_readline.c: Move interface to own file. --- diff --git a/Makefile.am b/Makefile.am index 5db12359..65f519c9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 \ diff --git a/h/prototypes.h b/h/prototypes.h index c08b645e..0c52e910 100644 --- a/h/prototypes.h +++ b/h/prototypes.h @@ -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); diff --git a/sbr/read_switch_multiword_via_readline.c b/sbr/read_switch_multiword_via_readline.c index 2320ccbf..df91701c 100644 --- a/sbr/read_switch_multiword_via_readline.c +++ b/sbr/read_switch_multiword_via_readline.c @@ -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 index 00000000..e1ac82d0 --- /dev/null +++ b/sbr/read_switch_multiword_via_readline.h @@ -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 */ diff --git a/uip/whatnowsbr.c b/uip/whatnowsbr.c index 8a73536d..a2f872c4 100644 --- a/uip/whatnowsbr.c +++ b/uip/whatnowsbr.c @@ -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"