From: Ralph Corderoy Date: Thu, 2 Nov 2017 21:50:33 +0000 (+0000) Subject: seq_getnum.c: Move interface to own file. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/932e06400b371192f5d872a72f93dbaf02592a8d?ds=inline;hp=9f1e781a5c2beb9df943c832300a3f5bee1e4ed3 seq_getnum.c: Move interface to own file. --- diff --git a/Makefile.am b/Makefile.am index 314288cf..13b6d662 100644 --- a/Makefile.am +++ b/Makefile.am @@ -377,6 +377,7 @@ noinst_HEADERS = \ sbr/read_line.h \ sbr/seq_add.h \ sbr/seq_del.h \ + sbr/seq_getnum.h \ sbr/seq_print.h \ sbr/terminal.h \ sbr/unquote.h \ diff --git a/h/prototypes.h b/h/prototypes.h index 255f1758..3e7d8979 100644 --- a/h/prototypes.h +++ b/h/prototypes.h @@ -204,7 +204,6 @@ int remdir (char *); void scan_detect_mbox_style (FILE *); void scan_finished(void); char *seq_bits (struct msgs *); -int seq_getnum (struct msgs *, char *); char *seq_list (struct msgs *, char *); int seq_nameok (char *); diff --git a/sbr/m_convert.c b/sbr/m_convert.c index 64346fb9..d5d06905 100644 --- a/sbr/m_convert.c +++ b/sbr/m_convert.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "seq_getnum.h" #include "error.h" #include "h/utils.h" diff --git a/sbr/seq_getnum.h b/sbr/seq_getnum.h new file mode 100644 index 00000000..a6668e49 --- /dev/null +++ b/sbr/seq_getnum.h @@ -0,0 +1,8 @@ +/* seq_getnum.h -- find the index for a sequence + * -- return -1 if sequence doesn't exist + * + * 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. */ + +int seq_getnum(struct msgs *, char *); diff --git a/sbr/seq_list.c b/sbr/seq_list.c index 20617a54..5344510d 100644 --- a/sbr/seq_list.c +++ b/sbr/seq_list.c @@ -7,6 +7,7 @@ */ #include "h/mh.h" +#include "seq_getnum.h" #include "h/utils.h" /* allocate this much buffer space at a time */ diff --git a/sbr/seq_print.c b/sbr/seq_print.c index 6139bc14..e37c0eae 100644 --- a/sbr/seq_print.c +++ b/sbr/seq_print.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "seq_getnum.h" #include "seq_print.h" /* diff --git a/sbr/seq_setunseen.c b/sbr/seq_setunseen.c index 298f2637..4c92f156 100644 --- a/sbr/seq_setunseen.c +++ b/sbr/seq_setunseen.c @@ -7,6 +7,7 @@ */ #include "h/mh.h" +#include "seq_getnum.h" #include "seq_del.h" #include "seq_add.h" #include "h/utils.h" diff --git a/uip/flist.c b/uip/flist.c index 4435d2da..47b6922b 100644 --- a/uip/flist.c +++ b/uip/flist.c @@ -14,6 +14,7 @@ */ #include "h/mh.h" +#include "sbr/seq_getnum.h" #include "sbr/error.h" #include "h/utils.h" #include "h/done.h" diff --git a/uip/fmttest.c b/uip/fmttest.c index 4214ab1b..719214a6 100644 --- a/uip/fmttest.c +++ b/uip/fmttest.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/seq_getnum.h" #include "sbr/error.h" #include "h/fmt_scan.h" #include "h/fmt_compile.h" diff --git a/uip/refile.c b/uip/refile.c index 98df16a8..2e9da1c6 100644 --- a/uip/refile.c +++ b/uip/refile.c @@ -7,6 +7,7 @@ */ #include "h/mh.h" +#include "sbr/seq_getnum.h" #include "sbr/seq_add.h" #include "sbr/arglist.h" #include "sbr/error.h" diff --git a/uip/scan.c b/uip/scan.c index 8a8a59b1..f39ef096 100644 --- a/uip/scan.c +++ b/uip/scan.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/seq_getnum.h" #include "sbr/error.h" #include "h/fmt_scan.h" #include "h/scansbr.h"