From df7524d7e86cd4efc484e2f626e20b93b8c06708 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Sat, 25 Apr 2015 15:26:09 +0000
Subject: [PATCH] Renaming the parameter 'whole_word' to 'whole_word_only',
 because the first sounds too much like "found_whole" to me.

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

diff --git a/ChangeLog b/ChangeLog
index a369db18..7552dbf0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
 	* src/search.c (do_replace_loop): Remove the unintended special
 	case for replacing multiple occurrences of a literal ^ or $.
 	* src/search.c (findnextstr): Delete an always-FALSE parameter.
+	* src/search.c (findnextstr): Rename the parameter 'whole_word'
+	to 'whole_word_only', for clarity.
 
 2015-04-21  Benno Schulenberg  <bensberg@justemail.net>
 	* src/browser.c (findnextfile): Save the settings of the global
diff --git a/src/proto.h b/src/proto.h
index 4e8d13ad..f90b18eb 100644
--- a/src/proto.h
+++ b/src/proto.h
@@ -582,7 +582,7 @@ void search_replace_abort(void);
 int search_init(bool replacing, bool use_answer);
 bool findnextstr(
 #ifndef DISABLE_SPELLER
-	bool whole_word,
+	bool whole_word_only,
 #endif
 	const filestruct *begin, size_t begin_x,
 	const char *needle, size_t *needle_len);
@@ -597,7 +597,7 @@ int replace_regexp(char *string, bool create);
 char *replace_line(const char *needle);
 ssize_t do_replace_loop(
 #ifndef DISABLE_SPELLER
-	bool whole_word,
+	bool whole_word_only,
 #endif
 	bool *canceled, const filestruct *real_current, size_t
 	*real_current_x, const char *needle);
diff --git a/src/search.c b/src/search.c
index b3c49710..e00621d7 100644
--- a/src/search.c
+++ b/src/search.c
@@ -255,7 +255,7 @@ int search_init(bool replacing, bool use_answer)
  * to the length of the string we found if it isn't NULL. */
 bool findnextstr(
 #ifndef DISABLE_SPELLER
-	bool whole_word,
+	bool whole_word_only,
 #endif
 	const filestruct *begin, size_t begin_x,
 	const char *needle, size_t *needle_len)
@@ -315,7 +315,7 @@ bool findnextstr(
 #ifndef DISABLE_SPELLER
 	    /* If we're searching for whole words, see if this potential
 	     * match is a whole word. */
-	    if (whole_word) {
+	    if (whole_word_only) {
 		char *word = mallocstrncpy(NULL, found, found_len + 1);
 		word[found_len] = '\0';
 
@@ -326,7 +326,7 @@ bool findnextstr(
 
 	    /* If we're searching for whole words and this potential
 	     * match isn't a whole word, continue searching. */
-	    if (!whole_word || found_whole)
+	    if (!whole_word_only || found_whole)
 #endif
 		break;
 	}
@@ -616,7 +616,7 @@ char *replace_line(const char *needle)
  * canceled isn't NULL, set it to TRUE if we canceled. */
 ssize_t do_replace_loop(
 #ifndef DISABLE_SPELLER
-	bool whole_word,
+	bool whole_word_only,
 #endif
 	bool *canceled, const filestruct *real_current, size_t
 	*real_current_x, const char *needle)
@@ -655,7 +655,7 @@ ssize_t do_replace_loop(
     findnextstr_wrap_reset();
     while (findnextstr(
 #ifndef DISABLE_SPELLER
-	whole_word,
+	whole_word_only,
 #endif
 	real_current, *real_current_x, needle, &match_len)) {
 	int i = 0;
-- 
GitLab