* 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
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);
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);
* 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)
#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';
/* 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;
}
* 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)
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;