]> diplodocus.org Git - nmh/commitdiff
vfgets.c: Move interface to own file.
authorRalph Corderoy <ralph@inputplus.co.uk>
Sat, 11 Nov 2017 16:18:15 +0000 (16:18 +0000)
committerRalph Corderoy <ralph@inputplus.co.uk>
Sun, 12 Nov 2017 12:25:31 +0000 (12:25 +0000)
Makefile.am
h/prototypes.h
sbr/vfgets.c
sbr/vfgets.h [new file with mode: 0644]
uip/aliasbr.c
uip/mhlsbr.c
uip/new.c

index 4a00aac..5a2f5de 100644 (file)
@@ -418,6 +418,7 @@ noinst_HEADERS = \
     sbr/terminal.h \
     sbr/unquote.h \
     sbr/vector.h \
+    sbr/vfgets.h \
     thirdparty/jsmn/jsmn.h \
     uip/forwsbr.h \
     uip/mhfree.h \
index 4003765..b762216 100644 (file)
@@ -191,7 +191,6 @@ int stringdex (char *, char *) PURE;
 char *trimcpy (char *);
 
 int uprf (const char *, const char *) PURE;
-int vfgets (FILE *, char **);
 
 /*
  * prototypes for some routines in uip
index 1bc4bc3..b9f5de2 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "vfgets.h"
 #include "error.h"
 #include "h/utils.h"
 
diff --git a/sbr/vfgets.h b/sbr/vfgets.h
new file mode 100644 (file)
index 0000000..4b71bd7
--- /dev/null
@@ -0,0 +1,7 @@
+/* vfgets.h -- virtual fgets
+ *
+ * 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 vfgets(FILE *, char **);
index b5935f6..40c9ca1 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/vfgets.h"
 #include "sbr/getcpy.h"
 #include "h/aliasbr.h"
 #include "h/addrsbr.h"
index 7ab0863..56875e3 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/vfgets.h"
 #include "sbr/check_charset.h"
 #include "sbr/getcpy.h"
 #include "sbr/brkstring.h"
index 2d7c070..4fdbeea 100644 (file)
--- a/uip/new.c
+++ b/uip/new.c
@@ -12,6 +12,7 @@
 #include <sys/types.h>
 
 #include "h/mh.h"
+#include "sbr/vfgets.h"
 #include "sbr/getcpy.h"
 #include "sbr/m_atoi.h"
 #include "sbr/context_save.h"