From: Ralph Corderoy Date: Tue, 7 Nov 2017 00:17:50 +0000 (+0000) Subject: brkstring.c: Move interface to own file. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/a59c5565745b21ab13ba016612b9bbbc95ffc8ed?ds=inline;hp=0b05f0175b632c856ea4a2c4ae10c84694a1f385 brkstring.c: Move interface to own file. --- diff --git a/Makefile.am b/Makefile.am index 2fabf7c8..034fd41a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -366,6 +366,7 @@ noinst_HEADERS = \ sbr/arglist.h \ sbr/atooi.h \ sbr/base64.h \ + sbr/brkstring.h \ sbr/ctype-checked.h \ sbr/error.h \ sbr/lock_file.h \ diff --git a/h/prototypes.h b/h/prototypes.h index 80d0cb6b..4be454f4 100644 --- a/h/prototypes.h +++ b/h/prototypes.h @@ -16,7 +16,6 @@ char *etcpath(char *) NONNULL(1); struct msgs_array; void add_profile_entry (const char *, const char *); -char **brkstring (char *, char *, char *) NONNULL(1); /* * Check to see if we can display a given character set natively. diff --git a/sbr/arglist.c b/sbr/arglist.c index 0dde2c86..bf88eb2d 100644 --- a/sbr/arglist.c +++ b/sbr/arglist.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "brkstring.h" #include "error.h" #include "arglist.h" #include "h/utils.h" diff --git a/sbr/brkstring.c b/sbr/brkstring.c index 599ac31a..8f1c297f 100644 --- a/sbr/brkstring.c +++ b/sbr/brkstring.c @@ -7,6 +7,7 @@ */ #include "h/mh.h" +#include "brkstring.h" #include "h/utils.h" /* allocate this number of pointers at a time */ diff --git a/sbr/brkstring.h b/sbr/brkstring.h new file mode 100644 index 00000000..f727179e --- /dev/null +++ b/sbr/brkstring.h @@ -0,0 +1,8 @@ +/* brkstring.h -- (destructively) split a string into + * -- an array of substrings + * + * 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 **brkstring(char *, char *, char *) NONNULL(1); diff --git a/sbr/getarguments.c b/sbr/getarguments.c index 829c9b30..b91019d9 100644 --- a/sbr/getarguments.c +++ b/sbr/getarguments.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "brkstring.h" #include "h/utils.h" char ** diff --git a/sbr/netsec.c b/sbr/netsec.c index 0109288c..6a72495b 100644 --- a/sbr/netsec.c +++ b/sbr/netsec.c @@ -7,6 +7,7 @@ */ #include "h/mh.h" +#include "brkstring.h" #include "h/utils.h" #include "h/netsec.h" #include "h/oauth.h" diff --git a/sbr/read_switch_multiword.c b/sbr/read_switch_multiword.c index 1b684050..d13ae7a1 100644 --- a/sbr/read_switch_multiword.c +++ b/sbr/read_switch_multiword.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "brkstring.h" #include "ambigsw.h" #include "print_sw.h" #include "h/signals.h" diff --git a/sbr/read_switch_multiword_via_readline.c b/sbr/read_switch_multiword_via_readline.c index 93542733..cd43c579 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 "brkstring.h" #include "ambigsw.h" #include "print_sw.h" diff --git a/sbr/seq_read.c b/sbr/seq_read.c index 01f5475c..5e0e1a85 100644 --- a/sbr/seq_read.c +++ b/sbr/seq_read.c @@ -7,6 +7,7 @@ */ #include "h/mh.h" +#include "brkstring.h" #include "error.h" #include "h/utils.h" #include "lock_file.h" diff --git a/sbr/seq_setprev.c b/sbr/seq_setprev.c index cfdfd610..0dab8e6c 100644 --- a/sbr/seq_setprev.c +++ b/sbr/seq_setprev.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "brkstring.h" #include "seq_add.h" #include "h/utils.h" diff --git a/sbr/seq_setunseen.c b/sbr/seq_setunseen.c index 4c92f156..74212d8d 100644 --- a/sbr/seq_setunseen.c +++ b/sbr/seq_setunseen.c @@ -7,6 +7,7 @@ */ #include "h/mh.h" +#include "brkstring.h" #include "seq_getnum.h" #include "seq_del.h" #include "seq_add.h" diff --git a/uip/ali.c b/uip/ali.c index 8c5cd360..b4fe3d85 100644 --- a/uip/ali.c +++ b/uip/ali.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/brkstring.h" #include "sbr/ambigsw.h" #include "sbr/print_version.h" #include "sbr/print_help.h" diff --git a/uip/flist.c b/uip/flist.c index 00a907a8..54202459 100644 --- a/uip/flist.c +++ b/uip/flist.c @@ -14,6 +14,7 @@ */ #include "h/mh.h" +#include "sbr/brkstring.h" #include "sbr/ambigsw.h" #include "sbr/path.h" #include "sbr/print_version.h" diff --git a/uip/fmttest.c b/uip/fmttest.c index 08a244f2..ee8790a4 100644 --- a/uip/fmttest.c +++ b/uip/fmttest.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/brkstring.h" #include "sbr/ambigsw.h" #include "sbr/path.h" #include "sbr/print_version.h" diff --git a/uip/folder.c b/uip/folder.c index 01178fb2..46090eda 100644 --- a/uip/folder.c +++ b/uip/folder.c @@ -8,6 +8,7 @@ */ #include "h/mh.h" +#include "sbr/brkstring.h" #include "sbr/ambigsw.h" #include "sbr/path.h" #include "sbr/print_version.h" diff --git a/uip/imaptest.c b/uip/imaptest.c index da45d491..6c5d0046 100644 --- a/uip/imaptest.c +++ b/uip/imaptest.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/brkstring.h" #include "sbr/ambigsw.h" #include "sbr/print_version.h" #include "sbr/print_help.h" diff --git a/uip/mhbuildsbr.c b/uip/mhbuildsbr.c index adaadd10..3588078a 100644 --- a/uip/mhbuildsbr.c +++ b/uip/mhbuildsbr.c @@ -14,6 +14,7 @@ */ #include "h/mh.h" +#include "sbr/brkstring.h" #include "sbr/pidstatus.h" #include "sbr/path.h" #include "sbr/error.h" diff --git a/uip/mhlsbr.c b/uip/mhlsbr.c index 56093b8e..8224980e 100644 --- a/uip/mhlsbr.c +++ b/uip/mhlsbr.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/brkstring.h" #include "sbr/ambigsw.h" #include "sbr/pidstatus.h" #include "sbr/print_version.h" diff --git a/uip/new.c b/uip/new.c index 5f918da1..5df7f0b4 100644 --- a/uip/new.c +++ b/uip/new.c @@ -12,6 +12,7 @@ #include #include "h/mh.h" +#include "sbr/brkstring.h" #include "sbr/ambigsw.h" #include "sbr/print_version.h" #include "sbr/print_help.h" diff --git a/uip/picksbr.c b/uip/picksbr.c index 4732785c..346dcc70 100644 --- a/uip/picksbr.c +++ b/uip/picksbr.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/brkstring.h" #include "sbr/ambigsw.h" #include "sbr/error.h" #include "h/tws.h" diff --git a/uip/scan.c b/uip/scan.c index 377ab161..77341eb9 100644 --- a/uip/scan.c +++ b/uip/scan.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/brkstring.h" #include "sbr/ambigsw.h" #include "sbr/path.h" #include "sbr/print_version.h" diff --git a/uip/send.c b/uip/send.c index 7324816b..faa40afe 100644 --- a/uip/send.c +++ b/uip/send.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/brkstring.h" #include "sbr/ambigsw.h" #include "sbr/push.h" #include "sbr/path.h" diff --git a/uip/sendsbr.c b/uip/sendsbr.c index f96779c1..3d911484 100644 --- a/uip/sendsbr.c +++ b/uip/sendsbr.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/brkstring.h" #include "sbr/pidstatus.h" #include "sbr/arglist.h" #include "sbr/error.h" diff --git a/uip/whatnowsbr.c b/uip/whatnowsbr.c index 07b13e77..e8e2e711 100644 --- a/uip/whatnowsbr.c +++ b/uip/whatnowsbr.c @@ -38,6 +38,7 @@ */ #include "h/mh.h" +#include "sbr/brkstring.h" #include "sbr/ambigsw.h" #include "sbr/push.h" #include "sbr/path.h" diff --git a/uip/whom.c b/uip/whom.c index 6264298c..d3e5c5fc 100644 --- a/uip/whom.c +++ b/uip/whom.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/brkstring.h" #include "sbr/ambigsw.h" #include "sbr/path.h" #include "sbr/print_version.h"