|
cvsdist |
239390 |
--- grep-2.5.1/lib/posix/regex.h.oi 2004-01-05 12:09:12.984391131 +0000
|
|
cvsdist |
239390 |
+++ grep-2.5.1/lib/posix/regex.h 2004-01-05 12:09:24.717990622 +0000
|
|
cvsdist |
239390 |
@@ -109,6 +109,10 @@
|
|
cvsdist |
239390 |
If not set, \{, \}, {, and } are literals. */
|
|
cvsdist |
239390 |
#define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
|
|
cvsdist |
5cfadd |
|
|
cvsdist |
239390 |
+/* If this bit is set, then ignore case when matching.
|
|
cvsdist |
239390 |
+ If not set, then case is significant. */
|
|
cvsdist |
239390 |
+#define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1)
|
|
cvsdist |
239390 |
+
|
|
cvsdist |
239390 |
/* If this bit is set, +, ? and | aren't recognized as operators.
|
|
cvsdist |
239390 |
If not set, they are. */
|
|
cvsdist |
239390 |
#define RE_LIMITED_OPS (RE_INTERVALS << 1)
|
|
cvsdist |
239390 |
--- grep-2.5.1/src/search.c.oi 2004-01-05 12:07:00.550199415 +0000
|
|
cvsdist |
239390 |
+++ grep-2.5.1/src/search.c 2004-01-05 12:07:00.566197505 +0000
|
|
cvsdist |
239390 |
@@ -31,7 +31,7 @@
|
|
cvsdist |
5cfadd |
|
|
cvsdist |
239390 |
#include "system.h"
|
|
cvsdist |
239390 |
#include "grep.h"
|
|
cvsdist |
239390 |
-#include "regex.h"
|
|
cvsdist |
239390 |
+#include <regex.h>
|
|
cvsdist |
239390 |
#include "dfa.h"
|
|
cvsdist |
239390 |
#include "kwset.h"
|
|
cvsdist |
239390 |
#include "error.h"
|
|
cvsdist |
239390 |
@@ -190,7 +190,7 @@
|
|
cvsdist |
239390 |
size_t total = size;
|
|
cvsdist |
239390 |
char const *motif = pattern;
|
|
cvsdist |
239390 |
|
|
cvsdist |
239390 |
- re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE);
|
|
cvsdist |
239390 |
+ re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE | (match_icase ? RE_ICASE : 0));
|
|
cvsdist |
239390 |
dfasyntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE, match_icase, eolbyte);
|
|
cvsdist |
239390 |
|
|
cvsdist |
239390 |
/* For GNU regex compiler we have to pass the patterns separately to detect
|
|
cvsdist |
239390 |
@@ -268,12 +268,12 @@
|
|
cvsdist |
239390 |
|
|
cvsdist |
239390 |
if (strcmp (matcher, "awk") == 0)
|
|
cvsdist |
239390 |
{
|
|
cvsdist |
239390 |
- re_set_syntax (RE_SYNTAX_AWK);
|
|
cvsdist |
239390 |
+ re_set_syntax (RE_SYNTAX_AWK | (match_icase ? RE_ICASE : 0));
|
|
cvsdist |
239390 |
dfasyntax (RE_SYNTAX_AWK, match_icase, eolbyte);
|
|
cvsdist |
239390 |
}
|
|
cvsdist |
239390 |
else
|
|
cvsdist |
239390 |
{
|
|
cvsdist |
239390 |
- re_set_syntax (RE_SYNTAX_POSIX_EGREP);
|
|
cvsdist |
239390 |
+ re_set_syntax (RE_SYNTAX_POSIX_EGREP | (match_icase ? RE_ICASE : 0));
|
|
cvsdist |
239390 |
dfasyntax (RE_SYNTAX_POSIX_EGREP, match_icase, eolbyte);
|
|
cvsdist |
239390 |
}
|
|
cvsdist |
5cfadd |
|