You need to sign in or sign up before continuing.
Commit d717d4ba authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

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
parent 02738293
Showing with 7 additions and 6 deletions
+7 -6
......@@ -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) {
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment