From: markus schnalke Date: Fri, 10 Apr 2015 10:30:56 +0000 (+0200) Subject: Move #include from h/mh.h to source files X-Git-Tag: mmh-0.2-RC1~40 X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=2abb9a7cfb0930e27062088734d306e7d78e4cc2;p=mmh Move #include from h/mh.h to source files Included files should not include further files. Now, only the necessary files are included and not all of them in every file. A large bunch of this work is done, but there are some more nested include files. --- diff --git a/h/mh.h b/h/mh.h index 17d5c2f..8e8c11a 100644 --- a/h/mh.h +++ b/h/mh.h @@ -4,23 +4,10 @@ #include -#include #include -#include -#include - -#include - #include -#include #include -#ifdef HAVE_SYS_PARAM_H -# include -#endif - -#include -#include /* ** Well-used constants diff --git a/sbr/concat.c b/sbr/concat.c index 5c519e9..4a57656 100644 --- a/sbr/concat.c +++ b/sbr/concat.c @@ -9,6 +9,7 @@ #include #include +#include static char * diff --git a/sbr/context_read.c b/sbr/context_read.c index abf666c..166fe59 100644 --- a/sbr/context_read.c +++ b/sbr/context_read.c @@ -27,6 +27,8 @@ #include /* mh internals */ #include /* system call errors */ #include /* structure for getpwuid() results */ +#include +#include void context_read(void) diff --git a/sbr/cpydata.c b/sbr/cpydata.c index 048579e..6fa21f7 100644 --- a/sbr/cpydata.c +++ b/sbr/cpydata.c @@ -6,6 +6,7 @@ ** complete copyright information. */ +#include #include void diff --git a/sbr/cpydgst.c b/sbr/cpydgst.c index b788fef..a9e5bc6 100644 --- a/sbr/cpydgst.c +++ b/sbr/cpydgst.c @@ -7,6 +7,7 @@ ** complete copyright information. */ +#include #include /* diff --git a/sbr/crawl_folders.c b/sbr/crawl_folders.c index 59ec952..b59a8e7 100644 --- a/sbr/crawl_folders.c +++ b/sbr/crawl_folders.c @@ -9,6 +9,8 @@ #include #include #include +#include +#include struct crawl_context { int max; /* diff --git a/sbr/error.c b/sbr/error.c index 599b91d..28f3255 100644 --- a/sbr/error.c +++ b/sbr/error.c @@ -8,6 +8,7 @@ #include #include +#include /* diff --git a/sbr/execprog.c b/sbr/execprog.c index f1f03bc..28ef810 100644 --- a/sbr/execprog.c +++ b/sbr/execprog.c @@ -4,6 +4,8 @@ */ #include +#include +#include int diff --git a/sbr/fmt_compile.c b/sbr/fmt_compile.c index 1fc5f36..d299efc 100644 --- a/sbr/fmt_compile.c +++ b/sbr/fmt_compile.c @@ -43,6 +43,7 @@ #include #include #include +#include #ifdef HAVE_SYS_TIME_H # include diff --git a/sbr/fmt_new.c b/sbr/fmt_new.c index 9fd34c8..e71b8d0 100644 --- a/sbr/fmt_new.c +++ b/sbr/fmt_new.c @@ -8,6 +8,8 @@ #include #include +#include +#include static char *formats = NULL; diff --git a/sbr/fmt_scan.c b/sbr/fmt_scan.c index 1f55a65..0616d17 100644 --- a/sbr/fmt_scan.c +++ b/sbr/fmt_scan.c @@ -14,6 +14,7 @@ #include #include #include +#include #ifdef HAVE_SYS_TIME_H # include diff --git a/sbr/folder_addmsg.c b/sbr/folder_addmsg.c index 69083cc..4cc8d6c 100644 --- a/sbr/folder_addmsg.c +++ b/sbr/folder_addmsg.c @@ -6,9 +6,11 @@ ** complete copyright information. */ +#include #include #include #include +#include /* ** Link message into a folder. Return the new number diff --git a/sbr/folder_delmsgs.c b/sbr/folder_delmsgs.c index 17b99be..0ecf382 100644 --- a/sbr/folder_delmsgs.c +++ b/sbr/folder_delmsgs.c @@ -6,6 +6,7 @@ ** complete copyright information. */ +#include #include /* diff --git a/sbr/folder_read.c b/sbr/folder_read.c index 159949a..ec51d64 100644 --- a/sbr/folder_read.c +++ b/sbr/folder_read.c @@ -6,8 +6,11 @@ ** complete copyright information. */ +#include #include #include +#include +#include /* We allocate the `mi' array 1024 elements at a time */ #define NUMMSGS 1024 diff --git a/sbr/gans.c b/sbr/gans.c index c90bfef..c62eb77 100644 --- a/sbr/gans.c +++ b/sbr/gans.c @@ -7,6 +7,7 @@ */ #include +#include int diff --git a/sbr/getanswer.c b/sbr/getanswer.c index 9bac0e5..4de8a89 100644 --- a/sbr/getanswer.c +++ b/sbr/getanswer.c @@ -8,6 +8,7 @@ #include #include +#include int diff --git a/sbr/lock_file.c b/sbr/lock_file.c index b1879b3..bdce7bb 100644 --- a/sbr/lock_file.c +++ b/sbr/lock_file.c @@ -15,9 +15,11 @@ ** Ruud de Rooij Sun, 28 Mar 1999 15:34:03 +0200 */ +#include #include #include #include +#include #ifdef HAVE_SYS_TIME_H # include diff --git a/sbr/m_atoi.c b/sbr/m_atoi.c index b903b7e..0dcbffe 100644 --- a/sbr/m_atoi.c +++ b/sbr/m_atoi.c @@ -9,6 +9,7 @@ */ #include +#include int diff --git a/sbr/m_convert.c b/sbr/m_convert.c index 85d4e58..7f2a7a8 100644 --- a/sbr/m_convert.c +++ b/sbr/m_convert.c @@ -10,6 +10,7 @@ /* FIXME: This code needs rework! Rewrite as a parser? */ #include +#include /* ** error codes for sequence diff --git a/sbr/m_getfld.c b/sbr/m_getfld.c index 059e0e3..a3852fe 100644 --- a/sbr/m_getfld.c +++ b/sbr/m_getfld.c @@ -8,6 +8,7 @@ #include #include +#include /* ** This module has a long and checkered history. diff --git a/sbr/m_mktemp.c b/sbr/m_mktemp.c index 4c7703c..ff5d00c 100644 --- a/sbr/m_mktemp.c +++ b/sbr/m_mktemp.c @@ -6,8 +6,10 @@ ** complete copyright information. */ -#include #include +#include +#include +#include static char *get_temp_dir(); diff --git a/sbr/makedir.c b/sbr/makedir.c index ea39385..c4870dd 100644 --- a/sbr/makedir.c +++ b/sbr/makedir.c @@ -14,6 +14,7 @@ #include #include #include +#include int makedir(char *dir) diff --git a/sbr/mts.c b/sbr/mts.c index a65d9de..b52740d 100644 --- a/sbr/mts.c +++ b/sbr/mts.c @@ -13,6 +13,7 @@ #include #include #include +#include /* ** static prototypes diff --git a/sbr/path.c b/sbr/path.c index 21796a7..90d3a27 100644 --- a/sbr/path.c +++ b/sbr/path.c @@ -8,6 +8,7 @@ #include #include +#include /* diff --git a/sbr/seq_nameok.c b/sbr/seq_nameok.c index a61dd9c..54d63ee 100644 --- a/sbr/seq_nameok.c +++ b/sbr/seq_nameok.c @@ -7,6 +7,7 @@ */ #include +#include /* diff --git a/sbr/seq_save.c b/sbr/seq_save.c index 745fa25..f546cb8 100644 --- a/sbr/seq_save.c +++ b/sbr/seq_save.c @@ -9,6 +9,7 @@ #include #include +#include /* diff --git a/sbr/strcasecmp.c b/sbr/strcasecmp.c index 608b4a5..d59c10c 100644 --- a/sbr/strcasecmp.c +++ b/sbr/strcasecmp.c @@ -7,6 +7,7 @@ */ #include +#include /* ** Our version of strcasecmp has to deal with NULL strings. diff --git a/sbr/trim.c b/sbr/trim.c index 9f08d99..249faf9 100644 --- a/sbr/trim.c +++ b/sbr/trim.c @@ -7,6 +7,7 @@ */ #include +#include char * diff --git a/sbr/trimcpy.c b/sbr/trimcpy.c index 64dd848..0d7f58a 100644 --- a/sbr/trimcpy.c +++ b/sbr/trimcpy.c @@ -9,6 +9,7 @@ */ #include +#include char * diff --git a/sbr/utils.c b/sbr/utils.c index 297ad45..1a9093d 100644 --- a/sbr/utils.c +++ b/sbr/utils.c @@ -11,6 +11,8 @@ #include #include #include +#include +#include /* ** We allocate space for messages (msgs array) diff --git a/uip/ali.c b/uip/ali.c index 4d7617b..e7bc90f 100644 --- a/uip/ali.c +++ b/uip/ali.c @@ -10,6 +10,7 @@ #include #include #include +#include /* ** maximum number of names diff --git a/uip/aliasbr.c b/uip/aliasbr.c index 8b32826..97f0c34 100644 --- a/uip/aliasbr.c +++ b/uip/aliasbr.c @@ -11,6 +11,7 @@ #include #include #include +#include static int akvis; static char *akerrst; diff --git a/uip/anno.c b/uip/anno.c index 0483dff..7a65a7f 100644 --- a/uip/anno.c +++ b/uip/anno.c @@ -17,6 +17,10 @@ #include #include #include +#include +#include +#include +#include static enum { MODE_ADD, MODE_DEL, MODE_LIST } mode = MODE_ADD; diff --git a/uip/ap.c b/uip/ap.c index 41554d7..a74eb96 100644 --- a/uip/ap.c +++ b/uip/ap.c @@ -9,6 +9,7 @@ #include #include #include +#include #define NADDRS 100 diff --git a/uip/burst.c b/uip/burst.c index db2ddc6..21b218b 100644 --- a/uip/burst.c +++ b/uip/burst.c @@ -7,6 +7,9 @@ */ #include +#include +#include +#include static struct swit switches[] = { #define VERBSW 0 diff --git a/uip/comp.c b/uip/comp.c index f867593..62e4cd2 100644 --- a/uip/comp.c +++ b/uip/comp.c @@ -9,6 +9,8 @@ #include #include #include +#include +#include static struct swit switches[] = { #define EDITRSW 0 diff --git a/uip/dist.c b/uip/dist.c index 47d7ed5..21c6702 100644 --- a/uip/dist.c +++ b/uip/dist.c @@ -9,6 +9,8 @@ #include #include #include +#include +#include static struct swit switches[] = { #define ANNOSW 0 diff --git a/uip/distsbr.c b/uip/distsbr.c index 42c3ce8..cf668ad 100644 --- a/uip/distsbr.c +++ b/uip/distsbr.c @@ -9,6 +9,9 @@ #include #include #include +#include +#include +#include static int hdrfd = NOTOK; static int txtfd = NOTOK; diff --git a/uip/dp.c b/uip/dp.c index 22e725c..b6efbe8 100644 --- a/uip/dp.c +++ b/uip/dp.c @@ -9,6 +9,7 @@ #include #include #include +#include #define NDATES 100 diff --git a/uip/dropsbr.c b/uip/dropsbr.c index 5b5cf0e..5fbbb61 100644 --- a/uip/dropsbr.c +++ b/uip/dropsbr.c @@ -6,14 +6,15 @@ ** complete copyright information. */ -#include -#include - #include +#include #include #include #include #include +#include +#include +#include /* diff --git a/uip/flist.c b/uip/flist.c index c0c8b5f..c0a056c 100644 --- a/uip/flist.c +++ b/uip/flist.c @@ -16,6 +16,11 @@ #include #include +#include +#include +#include +#include +#include /* ** We allocate space to record the names of folders diff --git a/uip/fmtdump.c b/uip/fmtdump.c index dd5dbcb..884aa4f 100644 --- a/uip/fmtdump.c +++ b/uip/fmtdump.c @@ -10,6 +10,7 @@ #include #include #include +#include static struct swit switches[] = { #define FORMSW 0 diff --git a/uip/folder.c b/uip/folder.c index e46519b..84b4365 100644 --- a/uip/folder.c +++ b/uip/folder.c @@ -12,6 +12,8 @@ #include #include #include +#include +#include static struct swit switches[] = { #define ALLSW 0 diff --git a/uip/forw.c b/uip/forw.c index 1ba80ee..91ce04a 100644 --- a/uip/forw.c +++ b/uip/forw.c @@ -11,7 +11,8 @@ #include #include #include - +#include +#include #define IFORMAT "digest-issue-%s" #define VFORMAT "digest-volume-%s" diff --git a/uip/inc.c b/uip/inc.c index 33672de..1cac19f 100644 --- a/uip/inc.c +++ b/uip/inc.c @@ -29,13 +29,19 @@ #include #include #include - #include #include #include #include #include #include +#include +#include +#include + +#ifdef HAVE_SYS_PARAM_H +# include +#endif static struct swit switches[] = { #define AUDSW 0 diff --git a/uip/mark.c b/uip/mark.c index e58ec64..57a6553 100644 --- a/uip/mark.c +++ b/uip/mark.c @@ -10,6 +10,8 @@ #include #include +#include +#include static struct swit switches[] = { #define ADDSW 0 diff --git a/uip/mhbuild.c b/uip/mhbuild.c index 2ffd09c..c862bc3 100644 --- a/uip/mhbuild.c +++ b/uip/mhbuild.c @@ -20,6 +20,10 @@ #include #include #include +#include +#include +#include +#include #ifdef HAVE_SYS_TIME_H # include diff --git a/uip/mhfree.c b/uip/mhfree.c index c9a0418..c873066 100644 --- a/uip/mhfree.c +++ b/uip/mhfree.c @@ -11,6 +11,7 @@ #include #include #include +#include /* The list of top-level contents to display */ CT *cts = NULL; diff --git a/uip/mhl.c b/uip/mhl.c index 09fa366..386cf95 100644 --- a/uip/mhl.c +++ b/uip/mhl.c @@ -13,6 +13,9 @@ #include #include #include +#include +#include +#include /* ** MAJOR BUG: diff --git a/uip/mhlist.c b/uip/mhlist.c index cf55c4c..ceb9336 100644 --- a/uip/mhlist.c +++ b/uip/mhlist.c @@ -15,6 +15,9 @@ #include #include #include +#include +#include +#include static struct swit switches[] = { #define VERBSW 0 diff --git a/uip/mhlistsbr.c b/uip/mhlistsbr.c index 08f35c7..a59e0e8 100644 --- a/uip/mhlistsbr.c +++ b/uip/mhlistsbr.c @@ -14,6 +14,7 @@ #include #include #include +#include /* mhmisc.c */ int part_ok(CT, int); diff --git a/uip/mhmail.c b/uip/mhmail.c index 9936261..eea92b7 100644 --- a/uip/mhmail.c +++ b/uip/mhmail.c @@ -11,7 +11,9 @@ #include #include #include - +#include +#include +#include static struct swit switches[] = { #define BODYSW 0 diff --git a/uip/mhmisc.c b/uip/mhmisc.c index 0c8e644..0f0a8d6 100644 --- a/uip/mhmisc.c +++ b/uip/mhmisc.c @@ -11,6 +11,8 @@ #include #include #include +#include +#include extern int debugsw; diff --git a/uip/mhparse.c b/uip/mhparse.c index e83932c..a325926 100644 --- a/uip/mhparse.c +++ b/uip/mhparse.c @@ -14,6 +14,9 @@ #include #include #include +#include +#include +#include extern int debugsw; diff --git a/uip/mhpath.c b/uip/mhpath.c index 67408ed..47146f4 100644 --- a/uip/mhpath.c +++ b/uip/mhpath.c @@ -8,6 +8,8 @@ #include #include +#include +#include static struct swit switches[] = { #define VERSIONSW 0 diff --git a/uip/mhshow.c b/uip/mhshow.c index e56b612..3713495 100644 --- a/uip/mhshow.c +++ b/uip/mhshow.c @@ -15,6 +15,9 @@ #include #include #include +#include +#include +#include static struct swit switches[] = { #define VERBSW 0 diff --git a/uip/mhshowsbr.c b/uip/mhshowsbr.c index fe40f9d..f6d86cd 100644 --- a/uip/mhshowsbr.c +++ b/uip/mhshowsbr.c @@ -16,6 +16,8 @@ #include #include #include +#include +#include extern int debugsw; diff --git a/uip/mhstore.c b/uip/mhstore.c index 63fa5ab..74442ad 100644 --- a/uip/mhstore.c +++ b/uip/mhstore.c @@ -15,6 +15,9 @@ #include #include #include +#include +#include +#include static struct swit switches[] = { #define AUTOSW 0 diff --git a/uip/mhtest.c b/uip/mhtest.c index aa7e411..c31a2dc 100644 --- a/uip/mhtest.c +++ b/uip/mhtest.c @@ -15,6 +15,9 @@ #include #include #include +#include +#include +#include static struct swit switches[] = { #define VERBSW 0 diff --git a/uip/new.c b/uip/new.c index 04fb949..e95ee6a 100644 --- a/uip/new.c +++ b/uip/new.c @@ -10,15 +10,15 @@ ** Inspired by Luke Mewburn's new: http://www.mewburn.net/luke/src/new */ +#include +#include +#include #include - #include #include #include - -#include -#include -#include +#include +#include static struct swit switches[] = { #define MODESW 0 diff --git a/uip/packf.c b/uip/packf.c index f9d02e8..78f64c0 100644 --- a/uip/packf.c +++ b/uip/packf.c @@ -11,6 +11,8 @@ #include #include #include +#include +#include static struct swit switches[] = { #define VERSIONSW 0 diff --git a/uip/pick.c b/uip/pick.c index d31f9b8..07dca9a 100644 --- a/uip/pick.c +++ b/uip/pick.c @@ -9,6 +9,8 @@ #include #include #include +#include +#include #ifdef HAVE_SYS_TIME_H # include diff --git a/uip/prompter.c b/uip/prompter.c index e42e8df..2bcd92a 100644 --- a/uip/prompter.c +++ b/uip/prompter.c @@ -13,6 +13,9 @@ #include #include #include +#include +#include +#include static struct swit switches[] = { #define PREPSW 0 diff --git a/uip/rcvdist.c b/uip/rcvdist.c index c365059..4e052cc 100644 --- a/uip/rcvdist.c +++ b/uip/rcvdist.c @@ -11,6 +11,9 @@ #include #include #include +#include +#include +#include static struct swit switches[] = { #define FORMSW 0 diff --git a/uip/rcvpack.c b/uip/rcvpack.c index 352f785..4c271df 100644 --- a/uip/rcvpack.c +++ b/uip/rcvpack.c @@ -10,6 +10,8 @@ #include #include #include +#include +#include static struct swit switches[] = { #define VERSIONSW 0 diff --git a/uip/rcvstore.c b/uip/rcvstore.c index 0b5ad85..61a91b2 100644 --- a/uip/rcvstore.c +++ b/uip/rcvstore.c @@ -11,6 +11,9 @@ #include #include #include +#include +#include +#include static struct swit switches[] = { #define CRETSW 0 diff --git a/uip/refile.c b/uip/refile.c index 96f355a..17e6d61 100644 --- a/uip/refile.c +++ b/uip/refile.c @@ -11,6 +11,8 @@ #include #include #include +#include +#include static struct swit switches[] = { #define LINKSW 0 diff --git a/uip/repl.c b/uip/repl.c index 42bcfdc..a5864c1 100644 --- a/uip/repl.c +++ b/uip/repl.c @@ -12,7 +12,10 @@ #include #include /* L_SET */ #include - +#include +#include +#include +#include static struct swit switches[] = { #define GROUPSW 0 diff --git a/uip/rmf.c b/uip/rmf.c index 164ec77..615369c 100644 --- a/uip/rmf.c +++ b/uip/rmf.c @@ -7,6 +7,9 @@ */ #include +#include +#include +#include static struct swit switches[] = { #define INTRSW 0 diff --git a/uip/rmm.c b/uip/rmm.c index 03d4568..520ce03 100644 --- a/uip/rmm.c +++ b/uip/rmm.c @@ -8,6 +8,8 @@ #include #include +#include +#include static struct swit switches[] = { #define UNLINKSW 0 diff --git a/uip/scan.c b/uip/scan.c index 29aea65..f53cf1d 100644 --- a/uip/scan.c +++ b/uip/scan.c @@ -12,6 +12,8 @@ #include #include #include +#include +#include static struct swit switches[] = { #define FORMSW 0 diff --git a/uip/scansbr.c b/uip/scansbr.c index 865f2f7..4fa5a0d 100644 --- a/uip/scansbr.c +++ b/uip/scansbr.c @@ -12,6 +12,8 @@ #include #include #include +#include +#include #ifdef _FSTDIO # define _ptr _p /* Gag */ diff --git a/uip/send.c b/uip/send.c index 234dfb2..41ef92a 100644 --- a/uip/send.c +++ b/uip/send.c @@ -16,12 +16,20 @@ #include #include #include +#include +#include +#include +#include #ifdef HAVE_SYS_TIME_H # include #endif #include +#ifdef HAVE_SYS_PARAM_H +# include +#endif + int debugsw = 0; /* global */ char *altmsg = NULL; char *annotext = NULL; diff --git a/uip/slocal.c b/uip/slocal.c index 17be186..41f986d 100644 --- a/uip/slocal.c +++ b/uip/slocal.c @@ -15,17 +15,19 @@ ** */ - #include #include #include #include #include - #include #include #include #include +#include +#include +#include +#include #ifdef INITGROUPS_HEADER #include INITGROUPS_HEADER diff --git a/uip/sortm.c b/uip/sortm.c index 0230495..734b63b 100644 --- a/uip/sortm.c +++ b/uip/sortm.c @@ -9,6 +9,14 @@ #include #include #include +#include +#include +#include +#include + +#ifdef HAVE_SYS_PARAM_H +# include +#endif static struct swit switches[] = { #define DATESW 0 diff --git a/uip/spost.c b/uip/spost.c index bfa8f4b..449d1a7 100644 --- a/uip/spost.c +++ b/uip/spost.c @@ -16,6 +16,8 @@ #include #include #include +#include +#include #define MAX_SM_FIELD 1476 /* < largest hdr field sendmail will accept */ diff --git a/uip/whatnow.c b/uip/whatnow.c index 2969397..cd72e44 100644 --- a/uip/whatnow.c +++ b/uip/whatnow.c @@ -11,6 +11,13 @@ #include #include #include +#include +#include +#include + +#ifdef HAVE_SYS_PARAM_H +# include +#endif static struct swit switches[] = { #define EDITRSW 0 diff --git a/uip/whatnowproc.c b/uip/whatnowproc.c index e20df68..1ccd209 100644 --- a/uip/whatnowproc.c +++ b/uip/whatnowproc.c @@ -7,6 +7,7 @@ */ #include +#include /* diff --git a/uip/whom.c b/uip/whom.c index fb77ab3..3d3eb84 100644 --- a/uip/whom.c +++ b/uip/whom.c @@ -10,6 +10,7 @@ #include #include #include +#include static struct swit switches[] = { #define VERSIONSW 0