/[gentoo-alt]/trunk/prefix-overlay/sys-apps/grep/files/grep-2.5.1-oi.patch
Gentoo

Contents of /trunk/prefix-overlay/sys-apps/grep/files/grep-2.5.1-oi.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 908 - (show annotations) (download)
Tue Nov 29 20:23:28 2005 UTC (8 years, 4 months ago) by grobian
File size: 1695 byte(s)
Updated to newest grep version (with a new patch) and added portnotes.


1 --- grep-2.5.1/lib/posix/regex.h.oi 2004-01-05 12:09:12.984391131 +0000
2 +++ grep-2.5.1/lib/posix/regex.h 2004-01-05 12:09:24.717990622 +0000
3 @@ -109,6 +109,10 @@
4 If not set, \{, \}, {, and } are literals. */
5 #define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
6
7 +/* If this bit is set, then ignore case when matching.
8 + If not set, then case is significant. */
9 +#define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1)
10 +
11 /* If this bit is set, +, ? and | aren't recognized as operators.
12 If not set, they are. */
13 #define RE_LIMITED_OPS (RE_INTERVALS << 1)
14 --- grep-2.5.1/src/search.c.oi 2004-01-05 12:07:00.550199415 +0000
15 +++ grep-2.5.1/src/search.c 2004-01-05 12:07:00.566197505 +0000
16 @@ -31,7 +31,7 @@
17
18 #include "system.h"
19 #include "grep.h"
20 -#include "regex.h"
21 +#include <regex.h>
22 #include "dfa.h"
23 #include "kwset.h"
24 #include "error.h"
25 @@ -190,7 +190,7 @@
26 size_t total = size;
27 char const *motif = pattern;
28
29 - re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE);
30 + re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE | (match_icase ? RE_ICASE : 0));
31 dfasyntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE, match_icase, eolbyte);
32
33 /* For GNU regex compiler we have to pass the patterns separately to detect
34 @@ -268,12 +268,12 @@
35
36 if (strcmp (matcher, "awk") == 0)
37 {
38 - re_set_syntax (RE_SYNTAX_AWK);
39 + re_set_syntax (RE_SYNTAX_AWK | (match_icase ? RE_ICASE : 0));
40 dfasyntax (RE_SYNTAX_AWK, match_icase, eolbyte);
41 }
42 else
43 {
44 - re_set_syntax (RE_SYNTAX_POSIX_EGREP);
45 + re_set_syntax (RE_SYNTAX_POSIX_EGREP | (match_icase ? RE_ICASE : 0));
46 dfasyntax (RE_SYNTAX_POSIX_EGREP, match_icase, eolbyte);
47 }
48

  ViewVC Help
Powered by ViewVC 1.1.20