]> diplodocus.org Git - nmh/commitdiff
m_atoi.c: Move interface to own file.
authorRalph Corderoy <ralph@inputplus.co.uk>
Sat, 11 Nov 2017 14:40:50 +0000 (14:40 +0000)
committerRalph Corderoy <ralph@inputplus.co.uk>
Sun, 12 Nov 2017 12:25:30 +0000 (12:25 +0000)
Makefile.am
h/prototypes.h
sbr/folder_addmsg.c
sbr/folder_read.c
sbr/m_atoi.c
sbr/m_atoi.h [new file with mode: 0644]
sbr/seq_read.c
uip/new.c
uip/prompter.c
uip/rmf.c

index c9eafa1..1f93bb3 100644 (file)
@@ -387,6 +387,7 @@ noinst_HEADERS = \
     sbr/geteditor.h \
     sbr/getfolder.h \
     sbr/lock_file.h \
+    sbr/m_atoi.h \
     sbr/m_maildir.h \
     sbr/m_mktemp.h \
     sbr/m_popen.h \
index 40276b9..44601ec 100644 (file)
@@ -113,7 +113,6 @@ char *get_charset(void);
 /* Return malloc'd copy of str, or of "" if NULL, exit on failure. */
 char *getcpy(const char *str);
 
-int m_atoi (char *) PURE;
 char *m_backup (const char *);
 int m_convert (struct msgs *, char *);
 char *m_draft (char *, char *, int, int *);
index 8666f6a..898af0d 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "m_atoi.h"
 #include "ext_hook.h"
 #include "folder_realloc.h"
 #include "folder_addmsg.h"
index fd75988..044059f 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "m_atoi.h"
 #include "folder_read.h"
 #include "error.h"
 #include "h/utils.h"
index 45855ca..74da5c0 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include "h/mh.h"
+#include "m_atoi.h"
 
 
 int
diff --git a/sbr/m_atoi.h b/sbr/m_atoi.h
new file mode 100644 (file)
index 0000000..4af5ce7
--- /dev/null
@@ -0,0 +1,9 @@
+/* m_atoi.h -- Parse a string representation of a message number, and
+ *          -- return the numeric value of the message.  If the string
+ *          -- contains any non-digit characters, then return 0.
+ *
+ * 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 m_atoi(char *) PURE;
index 5e0e1a8..c4f11a6 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include "h/mh.h"
+#include "m_atoi.h"
 #include "brkstring.h"
 #include "error.h"
 #include "h/utils.h"
index a106ce4..5de05d4 100644 (file)
--- a/uip/new.c
+++ b/uip/new.c
@@ -12,6 +12,7 @@
 #include <sys/types.h>
 
 #include "h/mh.h"
+#include "sbr/m_atoi.h"
 #include "sbr/context_save.h"
 #include "sbr/context_replace.h"
 #include "sbr/context_find.h"
index 44d5322..378f2ab 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/m_atoi.h"
 #include "sbr/context_save.h"
 #include "sbr/ambigsw.h"
 #include "sbr/print_version.h"
index 2fa33d7..8244a21 100644 (file)
--- a/uip/rmf.c
+++ b/uip/rmf.c
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/m_atoi.h"
 #include "sbr/getfolder.h"
 #include "sbr/ext_hook.h"
 #include "sbr/context_save.h"