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
This commit is contained in:
David Lawrence Ramsey 2004-07-10 16:53:17 +00:00
parent 0273829353
commit d717d4bac6
2 changed files with 7 additions and 6 deletions

View File

@ -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) {

View 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);