aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Andersen <andersen@codepoet.org>2000-01-05 05:49:51 +0000
committerErik Andersen <andersen@codepoet.org>2000-01-05 05:49:51 +0000
commitf4a99cc02cabd7f2607e21b6b52b1eeba723a3fd (patch)
tree268b4c8328c0f655b2c47d80bb1231f246ce3b3c
parentfb62e3225fc1947e8b62d95f16f5a3cb1378c9d2 (diff)
downloadbusybox-w32-f4a99cc02cabd7f2607e21b6b52b1eeba723a3fd.tar.gz
busybox-w32-f4a99cc02cabd7f2607e21b6b52b1eeba723a3fd.tar.bz2
busybox-w32-f4a99cc02cabd7f2607e21b6b52b1eeba723a3fd.zip
heheh. Forgot the fix. Here it is:
* Grep -i previously failed on UPPER CASE patterns due to a silly regexp implementation bug that is now fixed. -Erik
-rw-r--r--regexp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/regexp.c b/regexp.c
index b264ffb6f..11b46c720 100644
--- a/regexp.c
+++ b/regexp.c
@@ -385,11 +385,14 @@ static int match1(regexp* re, char ch, int token, int ignoreCase)
385 if (re->program[1 + 32 * (token - M_CLASS(0)) + (ch >> 3)] & (1 << (ch & 7))) 385 if (re->program[1 + 32 * (token - M_CLASS(0)) + (ch >> 3)] & (1 << (ch & 7)))
386 return 0; 386 return 0;
387 } 387 }
388 else if (ch == token 388//fprintf(stderr, "match1: ch='%c' token='%c': ", ch, token);
389 || (ignoreCase==TRUE && isupper(ch) && tolower(ch) == token)) 389 if (ch == token
390 || (ignoreCase==TRUE && tolower(ch) == tolower(token)))
390 { 391 {
392//fprintf(stderr, "match\n");
391 return 0; 393 return 0;
392 } 394 }
395//fprintf(stderr, "no match\n");
393 return 1; 396 return 1;
394} 397}
395 398