remove debug fprintf
[nedit-bw.git] / search8191_2.diff
blobb61e407f1fd5618ea39f6e932c706a0fae401cc5
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
6 2006-08-14
8 Modified to take into account new "official" buffer size of 5119
9 in CVS head.
11 ---
13 source/nedit.h | 2 +-
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
20 @@ -60,7 +60,7 @@
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 @@ -4252,12 +4252,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 */ \
39 ucPtr = ucString; \
40 lcPtr = lcString; \
41 tempPtr = filePtr; \
42 - while (*tempPtr == *ucPtr || *tempPtr == *lcPtr) { \
43 + while (*tempPtr == *lcPtr || *tempPtr == *ucPtr) { \
44 tempPtr++; ucPtr++; lcPtr++; \
45 if ( *ucPtr == 0 /* matched whole string */ \
46 && (cignore_R ||\
47 @@ -4351,12 +4351,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 */
50 #define DOSEARCH() \
51 - if (*filePtr == *ucString || *filePtr == *lcString) { \
52 + if (*filePtr == *lcString || *filePtr == *ucString) { \
53 /* matched first character */ \
54 ucPtr = ucString; \
55 lcPtr = lcString; \
56 tempPtr = filePtr; \
57 - while (*tempPtr == *ucPtr || *tempPtr == *lcPtr) { \
58 + while (*tempPtr == *lcPtr || *tempPtr == *ucPtr) { \
59 tempPtr++; ucPtr++; lcPtr++; \
60 if (*ucPtr == 0) { \
61 /* matched whole string */ \