From: Ralph Corderoy Date: Sun, 12 Nov 2017 13:24:05 +0000 (+0000) Subject: scansbr.c: Move interface to own file. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/394a751fd883d2bbfc769fed7e254e008a2ef45e?ds=sidebyside;hp=f9754b35f2f3b4c5cb0890f154181d2bab66c679 scansbr.c: Move interface to own file. Merging in content of existing h/scansbr.h, though that only contained one of the three prototypes. The other two were in h/prototypes.h. --- diff --git a/Makefile.am b/Makefile.am index 94f82fcc..419b1b18 100644 --- a/Makefile.am +++ b/Makefile.am @@ -357,7 +357,6 @@ noinst_HEADERS = \ h/popsbr.h \ h/prototypes.h \ h/rcvmail.h \ - h/scansbr.h \ h/signals.h \ h/tws.h \ h/utils.h \ @@ -461,6 +460,7 @@ noinst_HEADERS = \ uip/mhoutsbr.h \ uip/mhshowsbr.h \ uip/replsbr.h \ + uip/scansbr.h \ # ## diff --git a/h/prototypes.h b/h/prototypes.h index d47ac224..f1265239 100644 --- a/h/prototypes.h +++ b/h/prototypes.h @@ -17,9 +17,6 @@ struct msgs_array; int pidwait (pid_t, int); -void scan_detect_mbox_style (FILE *); -void scan_finished(void); - /* * prototypes for some routines in uip */ diff --git a/uip/fmtdump.c b/uip/fmtdump.c index 0545c0df..9f1f162e 100644 --- a/uip/fmtdump.c +++ b/uip/fmtdump.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "scansbr.h" #include "sbr/getarguments.h" #include "sbr/smatch.h" #include "sbr/ambigsw.h" @@ -14,7 +15,6 @@ #include "sbr/error.h" #include "h/fmt_scan.h" #include "h/fmt_compile.h" -#include "h/scansbr.h" #include "h/done.h" #include "h/utils.h" diff --git a/uip/fmttest.c b/uip/fmttest.c index 94c3b979..72f60f91 100644 --- a/uip/fmttest.c +++ b/uip/fmttest.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "scansbr.h" #include "sbr/m_name.h" #include "sbr/m_getfld.h" #include "sbr/getarguments.h" @@ -31,7 +32,6 @@ #include "h/fmt_scan.h" #include "h/fmt_compile.h" #include "h/utils.h" -#include "h/scansbr.h" #include "h/addrsbr.h" #include "h/done.h" #include "sbr/m_maildir.h" diff --git a/uip/inc.c b/uip/inc.c index ac39f725..70dddbd5 100644 --- a/uip/inc.c +++ b/uip/inc.c @@ -31,6 +31,7 @@ #endif #include "h/mh.h" +#include "scansbr.h" #include "sbr/m_name.h" #include "sbr/m_gmprot.h" #include "sbr/getarguments.h" @@ -57,7 +58,6 @@ #include "h/dropsbr.h" #include "h/popsbr.h" #include "h/fmt_scan.h" -#include "h/scansbr.h" #include "h/signals.h" #include "h/tws.h" #include "h/mts.h" diff --git a/uip/rcvtty.c b/uip/rcvtty.c index 77fa8bdd..6f8ded35 100644 --- a/uip/rcvtty.c +++ b/uip/rcvtty.c @@ -11,6 +11,7 @@ */ #include "h/mh.h" +#include "scansbr.h" #include "sbr/getarguments.h" #include "sbr/smatch.h" #include "sbr/closefds.h" @@ -21,7 +22,6 @@ #include "h/signals.h" #include #include "h/rcvmail.h" -#include "h/scansbr.h" #include "h/fmt_scan.h" #include "h/tws.h" #include "h/mts.h" diff --git a/uip/scan.c b/uip/scan.c index 654f378a..b74b3607 100644 --- a/uip/scan.c +++ b/uip/scan.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "scansbr.h" #include "sbr/m_name.h" #include "sbr/getarguments.h" #include "sbr/seq_setprev.h" @@ -26,7 +27,6 @@ #include "sbr/seq_getnum.h" #include "sbr/error.h" #include "h/fmt_scan.h" -#include "h/scansbr.h" #include "h/tws.h" #include "h/mts.h" #include "h/done.h" diff --git a/uip/scansbr.c b/uip/scansbr.c index 28c382fe..81abc7d4 100644 --- a/uip/scansbr.c +++ b/uip/scansbr.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "scansbr.h" #include "sbr/m_name.h" #include "sbr/m_gmprot.h" #include "sbr/m_getfld.h" @@ -13,7 +14,6 @@ #include "sbr/error.h" #include "h/addrsbr.h" #include "h/fmt_scan.h" -#include "h/scansbr.h" #include "h/tws.h" #include "h/utils.h" #include "sbr/terminal.h" diff --git a/h/scansbr.h b/uip/scansbr.h similarity index 72% rename from h/scansbr.h rename to uip/scansbr.h index 0aa5cc51..a7c8aed9 100644 --- a/h/scansbr.h +++ b/uip/scansbr.h @@ -1,5 +1,8 @@ -/* scansbr.h -- definitions for scan() - */ +/* scansbr.h -- routines to help scan along... + * + * 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. */ #define SCNENC 2 /* message just fine, but encrypted(!!) */ #define SCNMSG 1 /* message just fine */ @@ -30,8 +33,6 @@ #define WIDTH 78 -/* - * prototypes - */ -int scan (FILE *, int, int, char *, int, int, int, char *, long, int, - charstring_t *); +int scan(FILE *, int, int, char *, int, int, int, char *, long, int, charstring_t *); +void scan_finished(void); +void scan_detect_mbox_style(FILE *);