From d717d4bac6d1535a132128e6dc1e26f417cbe201 Mon Sep 17 00:00:00 2001
From: David Lawrence Ramsey <pooka109@gmail.com>
Date: Sat, 10 Jul 2004 16:53:17 +0000
Subject: [PATCH] add another missing part of DB's patch (read_file() should be
 returning void instead of int), and rearrange one NANO_SMALL #ifdef for
 better readability

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1851 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
---
 src/files.c | 11 ++++++-----
 src/proto.h |  2 +-
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/files.c b/src/files.c
index e319a511..019114c0 100644
--- a/src/files.c
+++ b/src/files.c
@@ -154,7 +154,7 @@ filestruct *read_line(char *buf, filestruct *prev, int *line1ins, size_t
     return fileptr;
 }
 
-int read_file(FILE *f, const char *filename, int quiet)
+void read_file(FILE *f, const char *filename, int quiet)
 {
     int num_lines = 0, len = 0;
     char input = '\0';		/* current input character */
@@ -336,7 +336,7 @@ int read_file(FILE *f, const char *filename, int quiet)
 
     totlines += num_lines;
 
-    return 1;
+    return;
 }
 
 /* Open the file (and decide if it exists). */
@@ -552,12 +552,13 @@ void do_insertfile(int loading_file)
 	if (i == NANO_EXTCMD_KEY) {
 	    realname = mallocstrcpy(realname, "");
 	    i = open_pipe(answer);
-	} else
-#endif /* NANO_SMALL */
-	{
+	} else {
+#endif
 	    realname = real_dir_from_tilde(answer);
 	    i = open_file(realname, 1, loading_file);
+#ifndef NANO_SMALL
 	}
+#endif
 
 #ifdef ENABLE_MULTIBUFFER
 	if (loading_file) {
diff --git a/src/proto.h b/src/proto.h
index 6fb44210..3aef035f 100644
--- a/src/proto.h
+++ b/src/proto.h
@@ -158,7 +158,7 @@ void load_file(int update);
 void new_file(void);
 filestruct *read_line(char *buf, filestruct *prev, int *line1ins, size_t
 	len);
-int read_file(FILE *f, const char *filename, int quiet);
+void read_file(FILE *f, const char *filename, int quiet);
 int open_file(const char *filename, int insert, int quiet);
 char *get_next_filename(const char *name);
 void do_insertfile(int loading_file);
-- 
GitLab