From c66b47937d9e790256fa99815557935d6561b309 Mon Sep 17 00:00:00 2001 From: Ralph Corderoy Date: Sun, 12 Nov 2017 00:23:44 +0000 Subject: [PATCH] concat.c: Move interface to own file. --- Makefile.am | 1 + h/prototypes.h | 2 -- sbr/concat.c | 1 + sbr/concat.h | 8 ++++++++ sbr/context_find.c | 1 + sbr/context_read.c | 1 + sbr/crawl_folders.c | 1 + sbr/credentials.c | 1 + sbr/m_mktemp.c | 1 + sbr/mime_type.c | 1 + sbr/oauth.c | 1 + sbr/oauth_prof.c | 1 + sbr/utils.c | 1 + uip/aliasbr.c | 1 + uip/folder.c | 1 + uip/inc.c | 1 + uip/install-mh.c | 1 + uip/mhbuildsbr.c | 1 + uip/mhfixmsg.c | 1 + uip/mhical.c | 1 + uip/mhlogin.c | 1 + uip/mhlsbr.c | 1 + uip/mhmisc.c | 1 + uip/mhparse.c | 1 + uip/mhshowsbr.c | 1 + uip/mhstoresbr.c | 1 + uip/new.c | 1 + uip/packf.c | 1 + uip/post.c | 1 + uip/repl.c | 1 + uip/replsbr.c | 1 + uip/rmf.c | 1 + uip/send.c | 1 + uip/sendsbr.c | 1 + uip/viamail.c | 1 + uip/whatnowsbr.c | 1 + 36 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 sbr/concat.h diff --git a/Makefile.am b/Makefile.am index 8926d76a..3db6bfad 100644 --- a/Makefile.am +++ b/Makefile.am @@ -370,6 +370,7 @@ noinst_HEADERS = \ sbr/check_charset.h \ sbr/client.h \ sbr/closefds.h \ + sbr/concat.h \ sbr/context_del.h \ sbr/context_find.h \ sbr/context_foil.h \ diff --git a/h/prototypes.h b/h/prototypes.h index 2e7bb328..970cd210 100644 --- a/h/prototypes.h +++ b/h/prototypes.h @@ -15,8 +15,6 @@ char *etcpath(char *) NONNULL(1); struct msgs_array; -char *concat (const char *, ...) ENDNULL; - /* * Print null-terminated PROMPT to and flush standard output. Read answers from * standard input until one matches an entry in SWITCHES. When one matches, diff --git a/sbr/concat.c b/sbr/concat.c index 262b93f5..b99f0c02 100644 --- a/sbr/concat.c +++ b/sbr/concat.c @@ -7,6 +7,7 @@ */ #include "h/mh.h" +#include "concat.h" #include "h/utils.h" diff --git a/sbr/concat.h b/sbr/concat.h new file mode 100644 index 00000000..83605c14 --- /dev/null +++ b/sbr/concat.h @@ -0,0 +1,8 @@ +/* concat.h -- concatenate a variable number (minimum of 1) + * of strings in managed memory + * + * 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 *concat(const char *, ...) ENDNULL; diff --git a/sbr/context_find.c b/sbr/context_find.c index 05e368ba..48ab8d0a 100644 --- a/sbr/context_find.c +++ b/sbr/context_find.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "concat.h" #include "context_find.h" diff --git a/sbr/context_read.c b/sbr/context_read.c index fe64fc17..b207201d 100644 --- a/sbr/context_read.c +++ b/sbr/context_read.c @@ -22,6 +22,7 @@ */ #include "h/mh.h" +#include "concat.h" #include "context_read.h" #include "context_find.h" #include "readconfig.h" diff --git a/sbr/crawl_folders.c b/sbr/crawl_folders.c index 9f1327ce..23152d03 100644 --- a/sbr/crawl_folders.c +++ b/sbr/crawl_folders.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "concat.h" #include "error.h" #include "h/crawl_folders.h" #include "h/utils.h" diff --git a/sbr/credentials.c b/sbr/credentials.c index b7eda96a..910e097d 100644 --- a/sbr/credentials.c +++ b/sbr/credentials.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "concat.h" #include "ruserpass.h" #include "credentials.h" #include "context_find.h" diff --git a/sbr/m_mktemp.c b/sbr/m_mktemp.c index 1ec94c6e..228de438 100644 --- a/sbr/m_mktemp.c +++ b/sbr/m_mktemp.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "concat.h" #include "r1bindex.h" #include "h/utils.h" #include "h/signals.h" diff --git a/sbr/mime_type.c b/sbr/mime_type.c index 91c6c398..ab2a9a09 100644 --- a/sbr/mime_type.c +++ b/sbr/mime_type.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "concat.h" #include "readconfig.h" #include "error.h" #include "h/utils.h" diff --git a/sbr/oauth.c b/sbr/oauth.c index 195b9b8f..2ed2b77a 100755 --- a/sbr/oauth.c +++ b/sbr/oauth.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "concat.h" #include "trimcpy.h" #include "getcpy.h" #include "error.h" diff --git a/sbr/oauth_prof.c b/sbr/oauth_prof.c index 4d91b8b2..13e5b973 100644 --- a/sbr/oauth_prof.c +++ b/sbr/oauth_prof.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "concat.h" #include "getcpy.h" #include "context_find.h" diff --git a/sbr/utils.c b/sbr/utils.c index 9c4b9fdc..f7f006a1 100644 --- a/sbr/utils.c +++ b/sbr/utils.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "concat.h" #include "r1bindex.h" #include "context_foil.h" #include "context_replace.h" diff --git a/uip/aliasbr.c b/uip/aliasbr.c index 40c9ca19..22252d72 100644 --- a/uip/aliasbr.c +++ b/uip/aliasbr.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/concat.h" #include "sbr/vfgets.h" #include "sbr/getcpy.h" #include "h/aliasbr.h" diff --git a/uip/folder.c b/uip/folder.c index 9cfa386a..9072246a 100644 --- a/uip/folder.c +++ b/uip/folder.c @@ -8,6 +8,7 @@ */ #include "h/mh.h" +#include "sbr/concat.h" #include "sbr/seq_setprev.h" #include "sbr/seq_setcur.h" #include "sbr/seq_save.h" diff --git a/uip/inc.c b/uip/inc.c index 8e9416c9..1066801f 100644 --- a/uip/inc.c +++ b/uip/inc.c @@ -31,6 +31,7 @@ #endif #include "h/mh.h" +#include "sbr/concat.h" #include "sbr/seq_setunseen.h" #include "sbr/seq_setcur.h" #include "sbr/seq_save.h" diff --git a/uip/install-mh.c b/uip/install-mh.c index 8983ed8f..ee051022 100644 --- a/uip/install-mh.c +++ b/uip/install-mh.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/concat.h" #include "sbr/smatch.h" #include "sbr/context_save.h" #include "sbr/context_replace.h" diff --git a/uip/mhbuildsbr.c b/uip/mhbuildsbr.c index e7b9c50b..48b039e3 100644 --- a/uip/mhbuildsbr.c +++ b/uip/mhbuildsbr.c @@ -14,6 +14,7 @@ */ #include "h/mh.h" +#include "sbr/concat.h" #include "sbr/r1bindex.h" #include "sbr/encode_rfc2047.h" #include "sbr/copyip.h" diff --git a/uip/mhfixmsg.c b/uip/mhfixmsg.c index 292e9128..aabe1c59 100644 --- a/uip/mhfixmsg.c +++ b/uip/mhfixmsg.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/concat.h" #include "sbr/seq_setprev.h" #include "sbr/seq_setcur.h" #include "sbr/seq_save.h" diff --git a/uip/mhical.c b/uip/mhical.c index 56c920b0..b2cd5b0f 100644 --- a/uip/mhical.c +++ b/uip/mhical.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/concat.h" #include "sbr/smatch.h" #include "sbr/ambigsw.h" #include "sbr/path.h" diff --git a/uip/mhlogin.c b/uip/mhlogin.c index 3356add6..ba48f4c1 100644 --- a/uip/mhlogin.c +++ b/uip/mhlogin.c @@ -10,6 +10,7 @@ #include #include "h/mh.h" +#include "sbr/concat.h" #include "sbr/smatch.h" #include "sbr/ambigsw.h" #include "sbr/print_version.h" diff --git a/uip/mhlsbr.c b/uip/mhlsbr.c index b3d650bf..cfd80748 100644 --- a/uip/mhlsbr.c +++ b/uip/mhlsbr.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/concat.h" #include "sbr/smatch.h" #include "sbr/r1bindex.h" #include "sbr/snprintb.h" diff --git a/uip/mhmisc.c b/uip/mhmisc.c index 24fb9b2c..fcec3c3e 100644 --- a/uip/mhmisc.c +++ b/uip/mhmisc.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/concat.h" #include "sbr/error.h" #include "h/mime.h" #include "h/mhparse.h" diff --git a/uip/mhparse.c b/uip/mhparse.c index 9b72d91f..ca9d3030 100644 --- a/uip/mhparse.c +++ b/uip/mhparse.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/concat.h" #include "sbr/r1bindex.h" #include "sbr/ruserpass.h" #include "sbr/fmt_rfc2047.h" diff --git a/uip/mhshowsbr.c b/uip/mhshowsbr.c index 2bac9d00..909506e0 100644 --- a/uip/mhshowsbr.c +++ b/uip/mhshowsbr.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/concat.h" #include "sbr/trimcpy.h" #include "sbr/check_charset.h" #include "sbr/getcpy.h" diff --git a/uip/mhstoresbr.c b/uip/mhstoresbr.c index 28e04541..4cdd3d53 100644 --- a/uip/mhstoresbr.c +++ b/uip/mhstoresbr.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/concat.h" #include "sbr/smatch.h" #include "sbr/r1bindex.h" #include "sbr/uprf.h" diff --git a/uip/new.c b/uip/new.c index 9d04fc26..03d89a3b 100644 --- a/uip/new.c +++ b/uip/new.c @@ -12,6 +12,7 @@ #include #include "h/mh.h" +#include "sbr/concat.h" #include "sbr/smatch.h" #include "sbr/r1bindex.h" #include "sbr/trimcpy.h" diff --git a/uip/packf.c b/uip/packf.c index 65a47a7e..31079a8c 100644 --- a/uip/packf.c +++ b/uip/packf.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/concat.h" #include "sbr/seq_setprev.h" #include "sbr/seq_setcur.h" #include "sbr/seq_save.h" diff --git a/uip/post.c b/uip/post.c index 69cb644b..2a2d8141 100644 --- a/uip/post.c +++ b/uip/post.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/concat.h" #include "sbr/smatch.h" #include "sbr/cpydata.h" #include "sbr/cpydgst.h" diff --git a/uip/repl.c b/uip/repl.c index 2f8492bd..8ee26b86 100644 --- a/uip/repl.c +++ b/uip/repl.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/concat.h" #include "sbr/seq_setprev.h" #include "sbr/seq_setcur.h" #include "sbr/seq_save.h" diff --git a/uip/replsbr.c b/uip/replsbr.c index 1a0c919c..93088975 100644 --- a/uip/replsbr.c +++ b/uip/replsbr.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/concat.h" #include "sbr/closefds.h" #include "sbr/uprf.h" #include "sbr/escape_addresses.h" diff --git a/uip/rmf.c b/uip/rmf.c index 1347378a..d492df1e 100644 --- a/uip/rmf.c +++ b/uip/rmf.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/concat.h" #include "sbr/smatch.h" #include "sbr/remdir.h" #include "sbr/ssequal.h" diff --git a/uip/send.c b/uip/send.c index 86bae68d..b9d3bcf2 100644 --- a/uip/send.c +++ b/uip/send.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/concat.h" #include "sbr/seq_setprev.h" #include "sbr/seq_save.h" #include "sbr/showfile.h" diff --git a/uip/sendsbr.c b/uip/sendsbr.c index 5a743656..47df9481 100644 --- a/uip/sendsbr.c +++ b/uip/sendsbr.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/concat.h" #include "sbr/cpydgst.h" #include "sbr/trimcpy.h" #include "sbr/uprf.h" diff --git a/uip/viamail.c b/uip/viamail.c index 3d8ee6b7..6e889b6a 100644 --- a/uip/viamail.c +++ b/uip/viamail.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/concat.h" #include "sbr/smatch.h" #include "sbr/context_find.h" #include "sbr/ambigsw.h" diff --git a/uip/whatnowsbr.c b/uip/whatnowsbr.c index ca9365d4..8a73536d 100644 --- a/uip/whatnowsbr.c +++ b/uip/whatnowsbr.c @@ -38,6 +38,7 @@ */ #include "h/mh.h" +#include "sbr/concat.h" #include "sbr/showfile.h" #include "sbr/smatch.h" #include "sbr/r1bindex.h" -- 2.56.0