1 From: Tony Balinski <ajbj@free.fr>
2 Subject: Increase the size of a literal search string to 8191
4 Also switch order of compares for upper and lower case
8 Modified to take into account new "official" buffer size of 5119
14 source/search.c | 8 ++++----
15 2 files changed, 5 insertions(+), 5 deletions(-)
17 diff --quilt old/source/nedit.h new/source/nedit.h
18 --- old/source/nedit.h
19 +++ new/source/nedit.h
21 #define NEDIT_DEFAULT_WRAPMARGIN_FG "black"
23 /* Tuning parameters */
24 -#define SEARCHMAX 5119 /* Maximum length of search/replace strings */
25 +#define SEARCHMAX 8191 /* Maximum length of search/replace strings */
26 #define MAX_SEARCH_HISTORY 100 /* Maximum length of search string history */
27 #define MAX_PANES 6 /* Max # of ADDITIONAL text editing panes
28 that can be added to a window */
29 diff --quilt old/source/search.c new/source/search.c
30 --- old/source/search.c
31 +++ new/source/search.c
32 @@ -4248,12 +4248,12 @@ static int searchLiteralWord(const char
33 /* routine and repeat it, changing the parameters of the outer loop for the */
34 /* searching, forwards, backwards, and before and after the begin point */
35 #define DOSEARCHWORD() \
36 - if (*filePtr == *ucString || *filePtr == *lcString) { \
37 + if (*filePtr == *lcString || *filePtr == *ucString) { \
38 /* matched first character */ \
42 - while (*tempPtr == *ucPtr || *tempPtr == *lcPtr) { \
43 + while (*tempPtr == *lcPtr || *tempPtr == *ucPtr) { \
44 tempPtr++; ucPtr++; lcPtr++; \
45 if ( *ucPtr == 0 /* matched whole string */ \
47 @@ -4347,12 +4347,12 @@ static int searchLiteral(const char *str
48 /* routine and repeat it, changing the parameters of the outer loop for the */
49 /* searching, forwards, backwards, and before and after the begin point */
51 - if (*filePtr == *ucString || *filePtr == *lcString) { \
52 + if (*filePtr == *lcString || *filePtr == *ucString) { \
53 /* matched first character */ \
57 - while (*tempPtr == *ucPtr || *tempPtr == *lcPtr) { \
58 + while (*tempPtr == *lcPtr || *tempPtr == *ucPtr) { \
59 tempPtr++; ucPtr++; lcPtr++; \
61 /* matched whole string */ \