From e7c690d577772ab93a974fa84e9b383f773a6abc Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Thu, 19 Jun 2014 11:58:11 +0000
Subject: [PATCH] Renaming 'no_more_space()' to 'more_space()' for consistency.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4985 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
---
 ChangeLog   |  4 ++++
 src/nano.c  | 17 ++++++++---------
 src/proto.h |  2 +-
 3 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f7e4efa6..aa2854a6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-06-19  Benno Schulenberg  <bensberg@justemail.net>
+	* src/nano.c (window_init): Rename 'no_more_space()' to 'more_space()'
+	for consistency, and tweak the related comments.
+
 2014-06-18  Benno Schulenberg  <bensberg@justemail.net>
 	* src/text.c: Rename 'to_end' to 'to_eof', to lessen confusion
 	with CUT_TO_END (which is about cutting to end-of-line).
diff --git a/src/nano.c b/src/nano.c
index ac1ee223..e93aeaf1 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -734,7 +734,7 @@ void die_save_file(const char *die_filename
 void window_init(void)
 {
     /* If the screen height is too small, get out. */
-    editwinrows = LINES - 5 + no_more_space() + no_help();
+    editwinrows = LINES - 5 + more_space() + no_help();
     if (COLS < MIN_EDITOR_COLS || editwinrows < MIN_EDITOR_ROWS)
 	die(_("Window size is too small for nano...\n"));
 
@@ -755,10 +755,10 @@ void window_init(void)
 	delwin(bottomwin);
 
     /* Set up the windows. */
-    topwin = newwin(2 - no_more_space(), COLS, 0, 0);
-    edit = newwin(editwinrows, COLS, 2 - no_more_space(), 0);
+    topwin = newwin(2 - more_space(), COLS, 0, 0);
+    edit = newwin(editwinrows, COLS, 2 - more_space(), 0);
     bottomwin = newwin(3 - no_help(), COLS, editwinrows + (2 -
-	no_more_space()), 0);
+	more_space()), 0);
 
     /* Turn the keypad on for the windows, if necessary. */
     if (!ISSET(REBIND_KEYPAD)) {
@@ -1063,16 +1063,15 @@ void version(void)
 }
 
 /* Return 1 if the MORE_SPACE flag is set, and 0 otherwise.  This is
- * used to calculate the relative screen position while taking this flag
- * into account, since it adds one line to the edit window. */
-int no_more_space(void)
+ * used to calculate the sizes and Y coordinates of the subwindows. */
+int more_space(void)
 {
     return ISSET(MORE_SPACE) ? 1 : 0;
 }
 
 /* Return 2 if the NO_HELP flag is set, and 0 otherwise.  This is used
- * to calculate the relative screen position while taking this flag into
- * account, since it removes two lines from the edit window. */
+ * to calculate the sizes and Y coordinates of the subwindows, because
+ * having NO_HELP adds two lines to the edit window. */
 int no_help(void)
 {
     return ISSET(NO_HELP) ? 2 : 0;
diff --git a/src/proto.h b/src/proto.h
index 63607ac1..f5121119 100644
--- a/src/proto.h
+++ b/src/proto.h
@@ -454,7 +454,7 @@ void print_opt_full(const char *shortflag
 	, const char *desc);
 void usage(void);
 void version(void);
-int no_more_space(void);
+int more_space(void);
 int no_help(void);
 void nano_disabled_msg(void);
 void do_exit(void);
-- 
GitLab