From: Ralph Corderoy Date: Sat, 11 Nov 2017 16:18:15 +0000 (+0000) Subject: vfgets.c: Move interface to own file. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/10559fe6f6843b27aa4804b6f90f2d7244a94ca5 vfgets.c: Move interface to own file. --- diff --git a/Makefile.am b/Makefile.am index 4a00aacc..5a2f5dee 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 \ diff --git a/h/prototypes.h b/h/prototypes.h index 40037652..b762216b 100644 --- a/h/prototypes.h +++ b/h/prototypes.h @@ -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 diff --git a/sbr/vfgets.c b/sbr/vfgets.c index 1bc4bc3e..b9f5de20 100644 --- a/sbr/vfgets.c +++ b/sbr/vfgets.c @@ -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 index 00000000..4b71bd7a --- /dev/null +++ b/sbr/vfgets.h @@ -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 **); diff --git a/uip/aliasbr.c b/uip/aliasbr.c index b5935f60..40c9ca19 100644 --- a/uip/aliasbr.c +++ b/uip/aliasbr.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/vfgets.h" #include "sbr/getcpy.h" #include "h/aliasbr.h" #include "h/addrsbr.h" diff --git a/uip/mhlsbr.c b/uip/mhlsbr.c index 7ab08636..56875e31 100644 --- a/uip/mhlsbr.c +++ b/uip/mhlsbr.c @@ -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" diff --git a/uip/new.c b/uip/new.c index 2d7c0708..4fdbeeaa 100644 --- a/uip/new.c +++ b/uip/new.c @@ -12,6 +12,7 @@ #include #include "h/mh.h" +#include "sbr/vfgets.h" #include "sbr/getcpy.h" #include "sbr/m_atoi.h" #include "sbr/context_save.h"