]> git.wh0rd.org Git - nano.git/commitdiff
Chopping a parameter that is now unused, or rather: always NULL.
authorBenno Schulenberg <bensberg@justemail.net>
Tue, 29 Mar 2016 15:05:47 +0000 (15:05 +0000)
committerBenno Schulenberg <bensberg@justemail.net>
Tue, 29 Mar 2016 15:05:47 +0000 (15:05 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5775 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
src/proto.h
src/search.c
src/text.c

index 37be69abc8640cb35cc80455bf8767fedaeaef62..853237f6fa37b7ef7a5d55a755d2f54420f1c491 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,7 @@
        * src/chars.c (is_valid_unicode): Speed up Unicode validation.
        * src/text.c (do_int_spell_fix): Allow to stop replacing a word
        without aborting the entire spell-fixing session.
+       * src/search.c (do_replace_loop): Chop a now-unused parameter.
 
 2016-03-28  Benno Schulenberg  <bensberg@justemail.net>
        * src/winio.c (statusbar): Don't bother putting back the cursor in
index 339729087d66077128c59a0eed590b9fdf3cf627..a8bca721aaa9a7d34a016bd68c01df71d27f9101 100644 (file)
@@ -606,8 +606,8 @@ ssize_t do_replace_loop(
 #ifndef DISABLE_SPELLER
        bool whole_word_only,
 #endif
-       bool *canceled, const filestruct *real_current, size_t
-       *real_current_x, const char *needle);
+       const filestruct *real_current, size_t *real_current_x,
+       const char *needle);
 void do_replace(void);
 void goto_line_posx(ssize_t line, size_t pos_x);
 void do_gotolinecolumn(ssize_t line, ssize_t column, bool use_answer,
index 7c85da38db2dff8e24fead71eea675c96bf729de..392183fe157b289e5bc5eaa4aef842bef7b58e84 100644 (file)
@@ -611,8 +611,8 @@ ssize_t do_replace_loop(
 #ifndef DISABLE_SPELLER
        bool whole_word_only,
 #endif
-       bool *canceled, const filestruct *real_current, size_t
-       *real_current_x, const char *needle)
+       const filestruct *real_current, size_t *real_current_x,
+       const char *needle)
 {
     ssize_t numreplaced = -1;
     size_t match_len;
@@ -642,9 +642,6 @@ ssize_t do_replace_loop(
     }
 #endif /* !NANO_TINY */
 
-    if (canceled != NULL)
-       *canceled = FALSE;
-
     findnextstr_wrap_reset();
     while (findnextstr(
 #ifndef DISABLE_SPELLER
@@ -690,11 +687,8 @@ ssize_t do_replace_loop(
 
            free(exp_word);
 
-           if (i == -1) {      /* We canceled the replace. */
-               if (canceled != NULL)
-                   *canceled = TRUE;
+           if (i == -1)  /* The replacing was cancelled. */
                break;
-           }
        }
 
        if (i > 0 || replaceall) {      /* Yes, replace it!!!! */
@@ -860,7 +854,7 @@ void do_replace(void)
 #ifndef DISABLE_SPELLER
                FALSE,
 #endif
-               NULL, begin, &begin_x, last_search);
+               begin, &begin_x, last_search);
 
     /* Restore where we were. */
     openfile->edittop = edittop_save;
index 0a93a15e58cb0d946683e521eca4c4bc171fd316..fc1f2a18ae7f06a29c1b7e32fd18f41b40d9a74d 100644 (file)
@@ -2448,7 +2448,7 @@ bool do_int_spell_fix(const char *word)
 
            if (!canceled && strcmp(word, answer) != 0) {
                openfile->current_x--;
-               do_replace_loop(TRUE, NULL, openfile->current,
+               do_replace_loop(TRUE, openfile->current,
                        &openfile->current_x, word);
            }