From 72760159e78523d14f7eac4b81ce7bfc772cc3a1 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Fri, 18 Dec 2015 20:44:01 +0000 Subject: [PATCH] Tweaking some comments and improving a variable name. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5499 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 1 + src/files.c | 18 ++++++++---------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index f239dd3c..144188e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ * src/color.c (set_colorpairs): Improve comments and rename vars. * src/files.c (read_line): Chop a superfluous bool -- 'prevnode' being NULL is enough indication that the first line is being read. + * src/files.c (switch_to_prevnext_buffer): Tweak comment and var name. 2015-12-11 Benno Schulenberg * doc/syntax/Makefile.am: Add missing autoconf and nftables syntaxes. diff --git a/src/files.c b/src/files.c index a3a7471e..53e1b97e 100644 --- a/src/files.c +++ b/src/files.c @@ -466,23 +466,21 @@ void display_buffer(void) } #ifndef DISABLE_MULTIBUFFER -/* Switch to the next file buffer if next_buf is TRUE. Otherwise, - * switch to the previous file buffer. */ -void switch_to_prevnext_buffer(bool next_buf, bool quiet) +/* Switch to a neighbouring file buffer; to the next if to_next is TRUE; + * otherwise, to the previous one. */ +void switch_to_prevnext_buffer(bool to_next, bool quiet) { assert(openfile != NULL); - /* If only one file buffer is open, indicate it on the statusbar and - * get out. */ + /* If only one file buffer is open, say so and get out. */ if (openfile == openfile->next) { - if (quiet == FALSE) + if (!quiet) statusbar(_("No more open file buffers")); return; } - /* Switch to the next or previous file buffer, depending on the - * value of next_buf. */ - openfile = next_buf ? openfile->next : openfile->prev; + /* Switch to the next or previous file buffer. */ + openfile = to_next ? openfile->next : openfile->prev; #ifdef DEBUG fprintf(stderr, "filename is %s\n", openfile->filename); @@ -492,7 +490,7 @@ void switch_to_prevnext_buffer(bool next_buf, bool quiet) display_buffer(); /* Indicate the switch on the statusbar. */ - if (quiet == FALSE) + if (!quiet) statusbar(_("Switched to %s"), ((openfile->filename[0] == '\0') ? _("New Buffer") : openfile->filename)); -- 2.39.5