2004-09-09 05:53:29 +00:00
|
|
|
--- grep-2.5.1/src/search.c.oi 2003-12-08 10:56:43.000000000 +0000
|
|
|
|
+++ grep-2.5.1/src/search.c 2003-12-08 11:01:11.000000000 +0000
|
|
|
|
@@ -219,6 +219,21 @@
|
|
|
|
|
|
|
|
patterns[pcount] = patterns0;
|
|
|
|
|
|
|
|
+ // patch ed@javabase.fsnet.co.uk
|
|
|
|
+ if (match_icase
|
|
|
|
+#ifdef MBS_SUPPORT
|
|
|
|
+ && MB_CUR_MAX == 1
|
|
|
|
+#endif /* MBS_SUPPORT */
|
|
|
|
+ )
|
|
|
|
+ {
|
|
|
|
+ static char trans[NCHAR];
|
2004-09-09 05:53:23 +00:00
|
|
|
+ int i;
|
2004-09-09 05:53:29 +00:00
|
|
|
+ for (i = 0; i < NCHAR; ++i)
|
|
|
|
+ trans[i] = TOLOWER (i);
|
|
|
|
+ patterns[pcount].regexbuf.translate = trans;
|
|
|
|
+ }
|
|
|
|
+ // end patch
|
|
|
|
+
|
|
|
|
if ((err = re_compile_pattern (motif, len,
|
|
|
|
&(patterns[pcount].regexbuf))) != 0)
|
|
|
|
error (2, 0, err);
|
|
|
|
@@ -302,6 +317,21 @@
|
|
|
|
error (2, errno, _("memory exhausted"));
|
|
|
|
patterns[pcount] = patterns0;
|
|
|
|
|
|
|
|
+ // patch ed@javabase.fsnet.co.uk
|
|
|
|
+ if (match_icase
|
|
|
|
+#ifdef MBS_SUPPORT
|
|
|
|
+ && MB_CUR_MAX == 1
|
|
|
|
+#endif /* MBS_SUPPORT */
|
|
|
|
+ )
|
|
|
|
+ {
|
|
|
|
+ static char trans[NCHAR];
|
|
|
|
+ int i;
|
|
|
|
+ for (i = 0; i < NCHAR; ++i)
|
|
|
|
+ trans[i] = TOLOWER (i);
|
|
|
|
+ patterns[pcount].regexbuf.translate = trans;
|
|
|
|
+ }
|
|
|
|
+ // end patch
|
|
|
|
+
|
|
|
|
if ((err = re_compile_pattern (motif, len,
|
|
|
|
&(patterns[pcount].regexbuf))) != 0)
|
|
|
|
error (2, 0, err);
|