From: Ralph Corderoy Date: Thu, 2 Nov 2017 17:59:04 +0000 (+0000) Subject: arglist.c: Move interface to own file. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/0a82924f7e104db5281e56698b823b4d76caa6c1 arglist.c: Move interface to own file. --- diff --git a/Makefile.am b/Makefile.am index bce4eb2c..20a55273 100644 --- a/Makefile.am +++ b/Makefile.am @@ -362,6 +362,7 @@ noinst_HEADERS = \ h/tws.h \ h/utils.h \ mts/smtp/smtp.h \ + sbr/arglist.h \ sbr/base64.h \ sbr/ctype-checked.h \ sbr/error.h \ diff --git a/h/prototypes.h b/h/prototypes.h index c1c54842..9e82ddfd 100644 --- a/h/prototypes.h +++ b/h/prototypes.h @@ -16,10 +16,6 @@ char *etcpath(char *) NONNULL(1); struct msgs_array; void add_profile_entry (const char *, const char *); -char **argsplit (char *, char **, int *) NONNULL(1, 2); -void argsplit_msgarg (struct msgs_array *, char *, char **) NONNULL(1, 2, 3); -void argsplit_insert (struct msgs_array *, char *, char **) NONNULL(1, 2, 3); -void arglist_free (char *, char **); void ambigsw (const char *, const struct swit *) NONNULL(1, 2); int atooi(char *) NONNULL(1) PURE; char **brkstring (char *, char *, char *) NONNULL(1); diff --git a/sbr/arglist.c b/sbr/arglist.c index 75c48825..0dde2c86 100644 --- a/sbr/arglist.c +++ b/sbr/arglist.c @@ -7,6 +7,7 @@ #include "h/mh.h" #include "error.h" +#include "arglist.h" #include "h/utils.h" /* diff --git a/sbr/arglist.h b/sbr/arglist.h new file mode 100644 index 00000000..29f95546 --- /dev/null +++ b/sbr/arglist.h @@ -0,0 +1,10 @@ +/* arglist.h -- Routines for handling argument lists for execvp() and friends + * + * 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 **argsplit(char *, char **, int *) NONNULL(1, 2); +void arglist_free(char *, char **); +void argsplit_msgarg(struct msgs_array *, char *, char **) NONNULL(1, 2, 3); +void argsplit_insert(struct msgs_array *, char *, char **) NONNULL(1, 2, 3); diff --git a/sbr/ext_hook.c b/sbr/ext_hook.c index 8a4a91b3..b8892e99 100644 --- a/sbr/ext_hook.c +++ b/sbr/ext_hook.c @@ -7,6 +7,7 @@ */ #include "h/mh.h" +#include "arglist.h" #include "error.h" int diff --git a/sbr/folder_delmsgs.c b/sbr/folder_delmsgs.c index 2ef88590..f9d7f591 100644 --- a/sbr/folder_delmsgs.c +++ b/sbr/folder_delmsgs.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "arglist.h" #include "error.h" #include "h/utils.h" #include "m_mktemp.h" diff --git a/sbr/m_popen.c b/sbr/m_popen.c index db51f4b7..ac36e6ba 100644 --- a/sbr/m_popen.c +++ b/sbr/m_popen.c @@ -7,6 +7,7 @@ */ #include "h/mh.h" +#include "arglist.h" #include "error.h" #include "h/signals.h" #include "m_popen.h" diff --git a/sbr/refile.c b/sbr/refile.c index 4e375917..ce31273b 100644 --- a/sbr/refile.c +++ b/sbr/refile.c @@ -7,6 +7,7 @@ */ #include "h/mh.h" +#include "arglist.h" #include "error.h" #include "h/utils.h" diff --git a/sbr/showfile.c b/sbr/showfile.c index da8df2fb..1ce63721 100644 --- a/sbr/showfile.c +++ b/sbr/showfile.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "arglist.h" #include "error.h" diff --git a/uip/forw.c b/uip/forw.c index 939832af..80fa7f49 100644 --- a/uip/forw.c +++ b/uip/forw.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/arglist.h" #include "sbr/error.h" #include #include "h/tws.h" diff --git a/uip/mhlsbr.c b/uip/mhlsbr.c index c4f452ba..4a54f710 100644 --- a/uip/mhlsbr.c +++ b/uip/mhlsbr.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/arglist.h" #include "sbr/error.h" #include "h/signals.h" #include "h/addrsbr.h" diff --git a/uip/mhparse.c b/uip/mhparse.c index fc863c3a..c3042420 100644 --- a/uip/mhparse.c +++ b/uip/mhparse.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/arglist.h" #include "sbr/error.h" #include #include "h/md5.h" diff --git a/uip/mhshowsbr.c b/uip/mhshowsbr.c index 071ff8aa..fca44107 100644 --- a/uip/mhshowsbr.c +++ b/uip/mhshowsbr.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/arglist.h" #include "sbr/error.h" #include #include "h/signals.h" diff --git a/uip/post.c b/uip/post.c index 75a7749b..6fbccdf9 100644 --- a/uip/post.c +++ b/uip/post.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/arglist.h" #include "sbr/error.h" #include #include "h/signals.h" diff --git a/uip/rcvdist.c b/uip/rcvdist.c index 6436854f..9f52a4b2 100644 --- a/uip/rcvdist.c +++ b/uip/rcvdist.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/arglist.h" #include "sbr/error.h" #include "h/fmt_scan.h" #include "h/rcvmail.h" diff --git a/uip/refile.c b/uip/refile.c index cebc5c90..58de202c 100644 --- a/uip/refile.c +++ b/uip/refile.c @@ -7,6 +7,7 @@ */ #include "h/mh.h" +#include "sbr/arglist.h" #include "sbr/error.h" #include "h/done.h" #include "h/utils.h" diff --git a/uip/replsbr.c b/uip/replsbr.c index cca19c17..08991178 100644 --- a/uip/replsbr.c +++ b/uip/replsbr.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/arglist.h" #include "sbr/error.h" #include "h/addrsbr.h" #include "h/fmt_scan.h" diff --git a/uip/send.c b/uip/send.c index 02c5cb85..3d559ff5 100644 --- a/uip/send.c +++ b/uip/send.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/arglist.h" #include "sbr/error.h" #include #include "h/done.h" diff --git a/uip/sendsbr.c b/uip/sendsbr.c index 57066165..ca03877a 100644 --- a/uip/sendsbr.c +++ b/uip/sendsbr.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/arglist.h" #include "sbr/error.h" #include "h/fmt_scan.h" #include "h/fmt_compile.h" diff --git a/uip/show.c b/uip/show.c index 51793fc6..7573432e 100644 --- a/uip/show.c +++ b/uip/show.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/arglist.h" #include "sbr/error.h" #include "h/mime.h" #include "h/done.h" diff --git a/uip/viamail.c b/uip/viamail.c index 58772dc3..37066a4f 100644 --- a/uip/viamail.c +++ b/uip/viamail.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/arglist.h" #include "sbr/error.h" #include #include "h/md5.h" diff --git a/uip/whatnowsbr.c b/uip/whatnowsbr.c index 01279147..07bd22bc 100644 --- a/uip/whatnowsbr.c +++ b/uip/whatnowsbr.c @@ -38,6 +38,7 @@ */ #include "h/mh.h" +#include "sbr/arglist.h" #include "sbr/error.h" #include #include "h/mime.h"