]> diplodocus.org Git - nmh/commitdiff
seq_read.c: Move interface to own file.
authorRalph Corderoy <ralph@inputplus.co.uk>
Sun, 12 Nov 2017 00:10:48 +0000 (00:10 +0000)
committerRalph Corderoy <ralph@inputplus.co.uk>
Sun, 12 Nov 2017 12:25:34 +0000 (12:25 +0000)
Makefile.am
h/prototypes.h
sbr/folder_read.c
sbr/seq_read.c
sbr/seq_read.h [new file with mode: 0644]

index 065bae387bc40ead2d282a3b21ea09d0efe3d6df..1190a6a5a0dcd0a7dd04aad7e84ee97be1b1d1db 100644 (file)
@@ -429,6 +429,7 @@ noinst_HEADERS = \
     sbr/seq_list.h \
     sbr/seq_nameok.h \
     sbr/seq_print.h \
+    sbr/seq_read.h \
     sbr/showfile.h \
     sbr/smatch.h \
     sbr/snprintb.h \
index a70fa62155ae01b8659882b9bb93305e1dfe85e6..be8a1d111ecf1b778ea75ec8f619ce2c4a583ee6 100644 (file)
@@ -67,24 +67,6 @@ int pidwait (pid_t, int);
 void scan_detect_mbox_style (FILE *);
 void scan_finished(void);
 
-/*
- * Read the sequence files for the folder referenced in the given
- * struct msgs and populate the sequence entries in the struct msgs.
- *
- * Arguments:
- *
- * mp          - Folder structure to add sequence entries to
- * lockflag    - If true, obtain a write lock on the sequence file.
- *               Additionally, the sequence file will remain open
- *               and a pointer to the filehandle will be stored in
- *               folder structure, where it will later be used by
- *               seq_save().
- *
- * Return values:
- *     OK       - successfully read the sequence files, or they don't exist
- *     NOTOK    - failed to lock sequence file
- */
-int seq_read (struct msgs * mp, int lockflag);
 void seq_save (struct msgs *);
 void seq_setcur (struct msgs *, int);
 void seq_setprev (struct msgs *);
index 044059fbb0351c4e4f7fcfa672686abd7c038dfe..18a9ec14f75ff2d7a6d0625652ff14cdc7518a59 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "seq_read.h"
 #include "m_atoi.h"
 #include "folder_read.h"
 #include "error.h"
index 751568c3ea7e7f4703bc6e2c142fb80e95645804..e63f8101db3020df59828c5932992f4b72f622d0 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include "h/mh.h"
+#include "seq_read.h"
 #include "ssequal.h"
 #include "trimcpy.h"
 #include "getcpy.h"
diff --git a/sbr/seq_read.h b/sbr/seq_read.h
new file mode 100644 (file)
index 0000000..a4d872c
--- /dev/null
@@ -0,0 +1,25 @@
+/* seq_read.h -- read the .mh_sequence file and
+ *            -- initialize sequence information
+ *
+ * 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. */
+
+/*
+ * Read the sequence files for the folder referenced in the given
+ * struct msgs and populate the sequence entries in the struct msgs.
+ *
+ * Arguments:
+ *
+ * mp          - Folder structure to add sequence entries to
+ * lockflag    - If true, obtain a write lock on the sequence file.
+ *               Additionally, the sequence file will remain open
+ *               and a pointer to the filehandle will be stored in
+ *               folder structure, where it will later be used by
+ *               seq_save().
+ *
+ * Return values:
+ *     OK       - successfully read the sequence files, or they don't exist
+ *     NOTOK    - failed to lock sequence file
+ */
+int seq_read(struct msgs *, int);