Commit d26f1ebd authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

in open_prevnext_file(), move up a misplaced assert and rename a

variable


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2665 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 8 additions and 5 deletions
+8 -5
...@@ -103,6 +103,9 @@ CVS code - ...@@ -103,6 +103,9 @@ CVS code -
- Set i to 0 when we get a filename via the file browser, so - Set i to 0 when we get a filename via the file browser, so
that it's read in properly when we exit the file browser. that it's read in properly when we exit the file browser.
(DLR) (DLR)
open_prevnext_file()
- Move up a misplaced assert. (DLR)
- Rename variable next to next_file, to avoid confusion. (DLR)
write_file() write_file()
- Since lineswritten is a size_t, print its value as an unsigned - Since lineswritten is a size_t, print its value as an unsigned
long instead of an unsigned int. (DLR) long instead of an unsigned int. (DLR)
......
...@@ -912,12 +912,12 @@ void load_open_file(void) ...@@ -912,12 +912,12 @@ void load_open_file(void)
} }
/* Open either the next or previous file buffer. */ /* Open either the next or previous file buffer. */
void open_prevnext_file(bool next) void open_prevnext_file(bool next_file)
{ {
add_open_file(TRUE);
assert(open_files != NULL); assert(open_files != NULL);
add_open_file(TRUE);
/* If only one file buffer is open, indicate it on the statusbar and /* If only one file buffer is open, indicate it on the statusbar and
* get out. */ * get out. */
if (open_files == open_files->next) { if (open_files == open_files->next) {
...@@ -927,7 +927,7 @@ void open_prevnext_file(bool next) ...@@ -927,7 +927,7 @@ void open_prevnext_file(bool next)
/* Switch to the next or previous file, depending on the value of /* Switch to the next or previous file, depending on the value of
* next. */ * next. */
open_files = next ? open_files->next : open_files->prev; open_files = next_file ? open_files->next : open_files->prev;
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "filename is %s\n", open_files->filename); fprintf(stderr, "filename is %s\n", open_files->filename);
......
...@@ -277,7 +277,7 @@ void free_openfilestruct(openfilestruct *src); ...@@ -277,7 +277,7 @@ void free_openfilestruct(openfilestruct *src);
#endif #endif
void add_open_file(bool update); void add_open_file(bool update);
void load_open_file(void); void load_open_file(void);
void open_prevnext_file(bool next); void open_prevnext_file(bool next_file);
void open_prevfile_void(void); void open_prevfile_void(void);
void open_nextfile_void(void); void open_nextfile_void(void);
bool close_open_file(void); bool close_open_file(void);
......
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