[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grep
From: |
Stepan Kasal |
Subject: |
Re: grep |
Date: |
Tue, 8 Jul 2003 17:13:11 +0200 |
User-agent: |
Mutt/1.2.5.1i |
Dobry den,
On Tue, Jul 08, 2003 at 12:24:58PM +0200, Ing. Jaroslav Fikar wrote:
> Subject: ERROR - grep - UNIXWARE
> UX:acomp: ERROR: "dfa.c", line 1055: non-constant initializer: op "NAME"
> UX:acomp: ERROR: "dfa.c", line 1055: non-constant initializer: op "NAME"
> UX:acomp: ERROR: "dfa.c", line 1059: non-constant initializer: op "NAME"
the patch attached below should solve the problem.
Have a nice day,
Stepan Kasal
--- grep-2.5.1/src/dfa.c Wed Sep 26 12:57:55 2001
+++ grep-2.5.1/src/dfa.c Sun Mar 23 23:15:30 2003
@@ -1052,12 +1052,15 @@
setbit_case_fold (c, ccl);
} else {
/* POSIX locales are painful - leave the decision to
libc */
- char expr[6] = { '[', c, '-', c2, ']', '\0' };
+ char expr[6] = { '[', 0 /* c */, '-', 0 /* c2 */, ']',
'\0' };
regex_t re;
+ expr[1] = c;
+ expr[3] = c2;
if (regcomp (&re, expr, case_fold ? REG_ICASE : 0) ==
REG_NOERROR) {
for (c = 0; c < NOTCHAR; ++c) {
- char buf[2] = { c, '\0' };
+ char buf[2] = { 0 /* c */, '\0' };
regmatch_t mat;
+ buf[0] = c;
if (regexec (&re, buf, 1, &mat, 0) == REG_NOERROR
&& mat.rm_so == 0 && mat.rm_eo == 1)
setbit_case_fold (c, ccl);
- grep, Ing. Jaroslav Fikar, 2003/07/08
- Re: grep,
Stepan Kasal <=
- grep, tjzhang, 2003/07/22