- change lines ==> num_lines to avoid name conflict on AIX with xlC.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@91 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
Adam Rogoyski 2000-07-08 03:57:16 +00:00
parent 688fc032b3
commit 1e328fbd72

12
files.c
View File

@ -125,7 +125,7 @@ filestruct *read_line(char *buf, filestruct * prev, int *line1ins)
int read_file(int fd, char *filename) int read_file(int fd, char *filename)
{ {
long size, lines = 0, linetemp = 0; long size, num_lines = 0, linetemp = 0;
char input[2]; /* buffer */ char input[2]; /* buffer */
char *buf; char *buf;
long i = 0, bufx = 128; long i = 0, bufx = 128;
@ -148,7 +148,7 @@ int read_file(int fd, char *filename)
linetemp = 0; linetemp = 0;
if (input[0] == '\n') { if (input[0] == '\n') {
fileptr = read_line(buf, fileptr, &line1ins); fileptr = read_line(buf, fileptr, &line1ins);
lines++; num_lines++;
buf[0] = 0; buf[0] = 0;
i = 0; i = 0;
} else { } else {
@ -171,13 +171,13 @@ int read_file(int fd, char *filename)
/* Did we not get a newline but still have stuff to do? */ /* Did we not get a newline but still have stuff to do? */
if (buf[0]) { if (buf[0]) {
fileptr = read_line(buf, fileptr, &line1ins); fileptr = read_line(buf, fileptr, &line1ins);
lines++; num_lines++;
buf[0] = 0; buf[0] = 0;
} }
/* Did we even GET a file? */ /* Did we even GET a file? */
if (totsize == 0) { if (totsize == 0) {
new_file(); new_file();
statusbar(_("Read %d lines"), lines); statusbar(_("Read %d lines"), num_lines);
return 1; return 1;
} }
@ -194,8 +194,8 @@ int read_file(int fd, char *filename)
/* Update the edit buffer */ /* Update the edit buffer */
load_file(); load_file();
} }
statusbar(_("Read %d lines"), lines); statusbar(_("Read %d lines"), num_lines);
totlines += lines; totlines += num_lines;
free(buf); free(buf);
close(fd); close(fd);