rename another variable
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2516 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
9c8baed321
commit
50995bd024
|
@ -25,6 +25,8 @@ CVS code -
|
||||||
we cut the line, we hit End to move to the end of the line
|
we cut the line, we hit End to move to the end of the line
|
||||||
after it. (DLR)
|
after it. (DLR)
|
||||||
- files.c:
|
- files.c:
|
||||||
|
read_line()
|
||||||
|
- Rename variable prev to prevnode to avoid confusion. (DLR)
|
||||||
load_open_file()
|
load_open_file()
|
||||||
- Remove an unneeded clearok(FALSE). (DLR)
|
- Remove an unneeded clearok(FALSE). (DLR)
|
||||||
get_next_filename()
|
get_next_filename()
|
||||||
|
|
16
src/files.c
16
src/files.c
|
@ -61,10 +61,10 @@ void new_file(void)
|
||||||
|
|
||||||
/* We make a new line of text from buf. buf is length len. If
|
/* We make a new line of text from buf. buf is length len. If
|
||||||
* first_line_ins is TRUE, then we put the new line at the top of the
|
* first_line_ins is TRUE, then we put the new line at the top of the
|
||||||
* file. Otherwise, we assume prev is the last line of the file, and
|
* file. Otherwise, we assume prevnode is the last line of the file,
|
||||||
* put our line after prev. */
|
* and put our line after prevnode. */
|
||||||
filestruct *read_line(char *buf, filestruct *prev, bool *first_line_ins,
|
filestruct *read_line(char *buf, filestruct *prevnode, bool
|
||||||
size_t len)
|
*first_line_ins, size_t len)
|
||||||
{
|
{
|
||||||
filestruct *fileptr = (filestruct *)nmalloc(sizeof(filestruct));
|
filestruct *fileptr = (filestruct *)nmalloc(sizeof(filestruct));
|
||||||
|
|
||||||
|
@ -99,12 +99,12 @@ filestruct *read_line(char *buf, filestruct *prev, bool *first_line_ins,
|
||||||
filebot = fileptr;
|
filebot = fileptr;
|
||||||
fileage = fileptr;
|
fileage = fileptr;
|
||||||
} else {
|
} else {
|
||||||
assert(prev != NULL);
|
assert(prevnode != NULL);
|
||||||
|
|
||||||
fileptr->prev = prev;
|
fileptr->prev = prevnode;
|
||||||
fileptr->next = NULL;
|
fileptr->next = NULL;
|
||||||
fileptr->lineno = prev->lineno + 1;
|
fileptr->lineno = prevnode->lineno + 1;
|
||||||
prev->next = fileptr;
|
prevnode->next = fileptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
return fileptr;
|
return fileptr;
|
||||||
|
|
|
@ -237,8 +237,8 @@ void do_uncut_text(void);
|
||||||
|
|
||||||
/* Public functions in files.c. */
|
/* Public functions in files.c. */
|
||||||
void new_file(void);
|
void new_file(void);
|
||||||
filestruct *read_line(char *buf, filestruct *prev, bool *first_line_ins,
|
filestruct *read_line(char *buf, filestruct *prevnode, bool
|
||||||
size_t len);
|
*first_line_ins, size_t len);
|
||||||
void load_file(void);
|
void load_file(void);
|
||||||
void read_file(FILE *f, const char *filename);
|
void read_file(FILE *f, const char *filename);
|
||||||
int open_file(const char *filename, bool newfie, FILE **f);
|
int open_file(const char *filename, bool newfie, FILE **f);
|
||||||
|
|
Loading…
Reference in New Issue