]> diplodocus.org Git - nmh/commitdiff
Move read_line.c's prototypes from prototypes.h to new read_line.h.
authorRalph Corderoy <ralph@inputplus.co.uk>
Mon, 28 Aug 2017 18:57:16 +0000 (19:57 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Mon, 28 Aug 2017 19:05:18 +0000 (20:05 +0100)
Add copyright comment to start of read_line.c whilst there.

Makefile.am
h/prototypes.h
sbr/read_line.c
sbr/read_line.h [new file with mode: 0644]
sbr/utils.c
uip/install-mh.c

index 3a3f9a4..1ad9679 100644 (file)
@@ -367,6 +367,7 @@ noinst_HEADERS = \
     sbr/makedir.h \
     sbr/message_id.h \
     sbr/mime_type.h \
+    sbr/read_line.h \
     sbr/terminal.h \
     sbr/unquote.h \
     thirdparty/jsmn/jsmn.h \
index 0c2d7bd..1f40f40 100644 (file)
@@ -118,13 +118,6 @@ struct msgs *folder_read (char *name, int lockflag);
 
 struct msgs *folder_realloc (struct msgs *, int, int);
 
-/*
- * Flush standard output, read a line from standard input into a static buffer,
- * zero out the newline, and return a pointer to the buffer.
- * On error, return NULL.
- */
-const char *read_line(void);
-
 /*
  * Print null-terminated PROMPT to and flush standard output.  Read answers from
  * standard input until one matches an entry in SWITCHES.  When one matches,
index c9167ab..a6367de 100644 (file)
@@ -1,6 +1,19 @@
+/* read_line.c -- read a possibly incomplete line from stdin.
+ *
+ * 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.
+ */
+
 #include <h/mh.h>
 #include <h/utils.h>
+#include "read_line.h"
 
+/*
+ * Flush standard output, read a line from standard input into a static buffer,
+ * zero out the newline, and return a pointer to the buffer.
+ * On error, return NULL.
+ */
 const char *
 read_line(void)
 {
diff --git a/sbr/read_line.h b/sbr/read_line.h
new file mode 100644 (file)
index 0000000..33ba762
--- /dev/null
@@ -0,0 +1,8 @@
+/* read_line.h -- read a possibly incomplete line from stdin.
+ *
+ * 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.
+ */
+
+const char *read_line(void);
index ad8341c..3be04e7 100644 (file)
@@ -12,6 +12,7 @@
 #include "makedir.h"
 #include <fcntl.h>
 #include <limits.h>
+#include "read_line.h"
 
 extern char *mhdocdir;
 
index 414a487..b9c69f5 100644 (file)
@@ -10,6 +10,7 @@
 #include "../sbr/m_maildir.h"
 #include "../sbr/makedir.h"
 #include <pwd.h>                               /* structure for getpwuid() results */
+#include "../sbr/read_line.h"
 
 #define INSTALLMH_SWITCHES \
     X("auto", 0, AUTOSW) \