grep/grep-2.5.1-oi.patch

47 lines
1.2 KiB
Diff
Raw Normal View History

--- 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];
+ 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);
@@ -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);