You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Roy T. Fielding" <fi...@kiwi.ICS.UCI.EDU> on 1997/02/10 22:33:07 UTC
[PATCH] Don't propagate EXTRA_CFLAGS to regex library
Since we aren't going to fix the warnings, this is the easiest way
to make them go away without risking breakage.
.....Roy
Index: Makefile.tmpl
===================================================================
RCS file: /export/home/cvs/apache/src/Makefile.tmpl,v
retrieving revision 1.40
diff -c -r1.40 Makefile.tmpl
*** Makefile.tmpl 1997/01/26 01:59:03 1.40
--- Makefile.tmpl 1997/02/10 21:29:36
***************
*** 4,9 ****
--- 4,10 ----
# by the configure script to make the actual Makefile.
CFLAGS=$(OPTIM) $(CFLAGS1) $(EXTRA_CFLAGS)
+ CFLAGS_REGEX=$(OPTIM) $(CFLAGS1)
LIBS=$(EXTRA_LIBS) $(LIBS1)
INCLUDES=$(INCLUDES1) $(EXTRA_INCLUDES)
LFLAGS=$(LFLAGS1) $(EXTRA_LFLAGS)
***************
*** 29,35 ****
$(CC) $(LFLAGS) -o httpd $(OBJS) $(REGLIB) $(LIBS)
regex/libregex.a:
! (cd regex; $(MAKE) lib CC=$(CC) AUX_CFLAGS='$(CFLAGS)' RANLIB='$(RANLIB)')
modules/proxy/libproxy.a:
(cd modules; \
--- 30,36 ----
$(CC) $(LFLAGS) -o httpd $(OBJS) $(REGLIB) $(LIBS)
regex/libregex.a:
! (cd regex; $(MAKE) lib CC=$(CC) AUX_CFLAGS='$(CFLAGS_REGEX)' RANLIB='$(RANLIB)')
modules/proxy/libproxy.a:
(cd modules; \
Re: [PATCH] Don't propagate EXTRA_CFLAGS to regex library
Posted by Alexei Kosut <ak...@nueva.pvt.k12.ca.us>.
On Mon, 10 Feb 1997, Roy T. Fielding wrote:
> Since we aren't going to fix the warnings, this is the easiest way
> to make them go away without risking breakage.
No! EXTRA_CFLAGS means what it says. It does not mean
"PUT_WALL_HERE_BUT_NOTHING_ELSE". If I have a cc flag I need to make
things compile, I would put it there. Since that's what it is. Then
the regex stuff would fail to compile. And that would be bad.
-1
--
________________________________________________________________________
Alexei Kosut <ak...@nueva.pvt.k12.ca.us> The Apache HTTP Server
URL: http://www.nueva.pvt.k12.ca.us/~akosut/ http://www.apache.org/
Re: [PATCH] Don't propagate EXTRA_CFLAGS to regex library
Posted by Marc Slemko <ma...@znep.com>.
On Tue, 11 Feb 1997, Dean Gaudet wrote:
> > There are also other errors that I get on FreeBSD. The register not
> > at beginning of declaration are easy to fix, haven't looked at the rest.
>
> I'll go see if I can reproduce on a BSDI box here. What gcc/flags are you
> using?
gcc version 2.6.3, FreeBSD 2.1.x, flags as below. On BSD/OS 2.0 I get
some of the same errors, some more errors, and some aren't there. <sigh>
>
> Dean
>
> >
> > engine.c: In function `smatcher':
> > In file included from regexec.c:44:
> > engine.c:78: warning: `register' is not at beginning of declaration
> > engine.c:79: warning: `register' is not at beginning of declaration
> > engine.c: In function `lmatcher':
> > In file included from regexec.c:93:
> > engine.c:78: warning: `register' is not at beginning of declaration
> > engine.c:79: warning: `register' is not at beginning of declaration
> > sh ./mkh -p regerror.c >regerror.ih
> > cc -I. -DPOSIX_MISTAKE -Wall -c regerror.c
> > cc -I. -DPOSIX_MISTAKE -Wall -c regfree.c
> > cc -I. -DPOSIX_MISTAKE -Wall -c split.c
> > sh ./mkh -p debug.c >debug.ih
> > cc -I. -DPOSIX_MISTAKE -Wall -c debug.c
> > debug.c: In function `s_print':
> > debug.c:219: warning: int format, long int arg (arg 3)
> > debug.c:219: warning: int format, long int arg (arg 4)
> > sh ./mkh -p main.c >main.ih
> > cc -I. -DPOSIX_MISTAKE -Wall -c main.c
> > main.c:27: warning: return-type defaults to `int'
> > main.c: In function `main':
> > main.c:44: warning: implicit declaration of function `getopt'
> > main.c:53: warning: implicit declaration of function `atoi'
> > main.c:107: warning: field width is not type int (arg 2)
> > main.c: In function `efind':
> > main.c:502: warning: unused variable `n'
> >
> >
> >
>
Re: [PATCH] Don't propagate EXTRA_CFLAGS to regex library
Posted by Dean Gaudet <dg...@arctic.org>.
On Tue, 11 Feb 1997, Marc Slemko wrote:
> There are a bunch of assert(nope)s. But they don't break when you take
> out that. Haven't looked at that really.
Ah right, it should be:
#ifndef NDEBUG
static int nope;
#endif
(regex/utils.h defines NDEBUG, NDEBUG is the macro that disables ansi c
<assert.h>)
> There are also other errors that I get on FreeBSD. The register not
> at beginning of declaration are easy to fix, haven't looked at the rest.
I'll go see if I can reproduce on a BSDI box here. What gcc/flags are you
using?
Dean
>
> engine.c: In function `smatcher':
> In file included from regexec.c:44:
> engine.c:78: warning: `register' is not at beginning of declaration
> engine.c:79: warning: `register' is not at beginning of declaration
> engine.c: In function `lmatcher':
> In file included from regexec.c:93:
> engine.c:78: warning: `register' is not at beginning of declaration
> engine.c:79: warning: `register' is not at beginning of declaration
> sh ./mkh -p regerror.c >regerror.ih
> cc -I. -DPOSIX_MISTAKE -Wall -c regerror.c
> cc -I. -DPOSIX_MISTAKE -Wall -c regfree.c
> cc -I. -DPOSIX_MISTAKE -Wall -c split.c
> sh ./mkh -p debug.c >debug.ih
> cc -I. -DPOSIX_MISTAKE -Wall -c debug.c
> debug.c: In function `s_print':
> debug.c:219: warning: int format, long int arg (arg 3)
> debug.c:219: warning: int format, long int arg (arg 4)
> sh ./mkh -p main.c >main.ih
> cc -I. -DPOSIX_MISTAKE -Wall -c main.c
> main.c:27: warning: return-type defaults to `int'
> main.c: In function `main':
> main.c:44: warning: implicit declaration of function `getopt'
> main.c:53: warning: implicit declaration of function `atoi'
> main.c:107: warning: field width is not type int (arg 2)
> main.c: In function `efind':
> main.c:502: warning: unused variable `n'
>
>
>
Re: [PATCH] Don't propagate EXTRA_CFLAGS to regex library
Posted by Marc Slemko <ma...@znep.com>.
Like the idea and think it may be worthwhile; the changes aren't that big,
they just look that way.
See my comments below.
On Mon, 10 Feb 1997, Dean Gaudet wrote:
> On Mon, 10 Feb 1997, Roy T. Fielding wrote:
>
> > Since we aren't going to fix the warnings, this is the easiest way
> > to make them go away without risking breakage.
>
> I made a patch to fix them, but I'm not really happy about applying it.
> Anyhow the patch is included, lightly tested.
>
> --- 91,96 ----
> Index: regex/regexec.c
> ===================================================================
> RCS file: /export/home/cvs/apache/src/regex/regexec.c,v
> retrieving revision 1.1
> diff -c -3 -r1.1 regexec.c
> *** regexec.c 1996/07/23 22:06:47 1.1
> --- regexec.c 1997/02/10 06:31:18
> ***************
> *** 16,23 ****
> #include "utils.h"
> #include "regex2.h"
>
> - static int nope = 0; /* for use in asserts; shuts lint up */
> -
> /* macros for manipulating states, small version */
> #define states long
> #define states1 states /* for later use in regexec() decision */
> --- 16,21 ----
There are a bunch of assert(nope)s. But they don't break when you take
out that. Haven't looked at that really.
There are also other errors that I get on FreeBSD. The register not
at beginning of declaration are easy to fix, haven't looked at the rest.
engine.c: In function `smatcher':
In file included from regexec.c:44:
engine.c:78: warning: `register' is not at beginning of declaration
engine.c:79: warning: `register' is not at beginning of declaration
engine.c: In function `lmatcher':
In file included from regexec.c:93:
engine.c:78: warning: `register' is not at beginning of declaration
engine.c:79: warning: `register' is not at beginning of declaration
sh ./mkh -p regerror.c >regerror.ih
cc -I. -DPOSIX_MISTAKE -Wall -c regerror.c
cc -I. -DPOSIX_MISTAKE -Wall -c regfree.c
cc -I. -DPOSIX_MISTAKE -Wall -c split.c
sh ./mkh -p debug.c >debug.ih
cc -I. -DPOSIX_MISTAKE -Wall -c debug.c
debug.c: In function `s_print':
debug.c:219: warning: int format, long int arg (arg 3)
debug.c:219: warning: int format, long int arg (arg 4)
sh ./mkh -p main.c >main.ih
cc -I. -DPOSIX_MISTAKE -Wall -c main.c
main.c:27: warning: return-type defaults to `int'
main.c: In function `main':
main.c:44: warning: implicit declaration of function `getopt'
main.c:53: warning: implicit declaration of function `atoi'
main.c:107: warning: field width is not type int (arg 2)
main.c: In function `efind':
main.c:502: warning: unused variable `n'
Re: [PATCH] Don't propagate EXTRA_CFLAGS to regex library
Posted by Dean Gaudet <dg...@arctic.org>.
On Mon, 10 Feb 1997, Roy T. Fielding wrote:
> Since we aren't going to fix the warnings, this is the easiest way
> to make them go away without risking breakage.
I made a patch to fix them, but I'm not really happy about applying it.
Anyhow the patch is included, lightly tested.
Dean
Index: regex/cclass.h
===================================================================
RCS file: /export/home/cvs/apache/src/regex/cclass.h,v
retrieving revision 1.1
diff -c -3 -r1.1 cclass.h
*** cclass.h 1996/07/23 22:06:42 1.1
--- cclass.h 1997/02/10 06:31:17
***************
*** 4,31 ****
char *chars;
char *multis;
} cclasses[] = {
! "alnum", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
! 0123456789", "",
! "alpha", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
! "",
! "blank", " \t", "",
! "cntrl", "\007\b\t\n\v\f\r\1\2\3\4\5\6\16\17\20\21\22\23\24\
! \25\26\27\30\31\32\33\34\35\36\37\177", "",
! "digit", "0123456789", "",
! "graph", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
! "",
! "lower", "abcdefghijklmnopqrstuvwxyz",
! "",
! "print", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ ",
! "",
! "punct", "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
! "",
! "space", "\t\n\v\f\r ", "",
! "upper", "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
! "",
! "xdigit", "0123456789ABCDEFabcdef",
! "",
! NULL, 0, ""
};
--- 4,31 ----
char *chars;
char *multis;
} cclasses[] = {
! { "alnum", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
! 0123456789", "" },
! { "alpha", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
! "" },
! { "blank", " \t", "" },
! { "cntrl", "\007\b\t\n\v\f\r\1\2\3\4\5\6\16\17\20\21\22\23\24\
! \25\26\27\30\31\32\33\34\35\36\37\177", "" },
! { "digit", "0123456789", "" },
! { "graph", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
! "" },
! { "lower", "abcdefghijklmnopqrstuvwxyz",
! "" },
! { "print", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ ",
! "" },
! { "punct", "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
! "" },
! { "space", "\t\n\v\f\r ", "" },
! { "upper", "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
! "" },
! { "xdigit", "0123456789ABCDEFabcdef",
! "" },
! { NULL, 0, "" }
};
Index: regex/cname.h
===================================================================
RCS file: /export/home/cvs/apache/src/regex/cname.h,v
retrieving revision 1.1
diff -c -3 -r1.1 cname.h
*** cname.h 1996/07/23 22:06:43 1.1
--- cname.h 1997/02/10 06:31:17
***************
*** 3,102 ****
char *name;
char code;
} cnames[] = {
! "NUL", '\0',
! "SOH", '\001',
! "STX", '\002',
! "ETX", '\003',
! "EOT", '\004',
! "ENQ", '\005',
! "ACK", '\006',
! "BEL", '\007',
! "alert", '\007',
! "BS", '\010',
! "backspace", '\b',
! "HT", '\011',
! "tab", '\t',
! "LF", '\012',
! "newline", '\n',
! "VT", '\013',
! "vertical-tab", '\v',
! "FF", '\014',
! "form-feed", '\f',
! "CR", '\015',
! "carriage-return", '\r',
! "SO", '\016',
! "SI", '\017',
! "DLE", '\020',
! "DC1", '\021',
! "DC2", '\022',
! "DC3", '\023',
! "DC4", '\024',
! "NAK", '\025',
! "SYN", '\026',
! "ETB", '\027',
! "CAN", '\030',
! "EM", '\031',
! "SUB", '\032',
! "ESC", '\033',
! "IS4", '\034',
! "FS", '\034',
! "IS3", '\035',
! "GS", '\035',
! "IS2", '\036',
! "RS", '\036',
! "IS1", '\037',
! "US", '\037',
! "space", ' ',
! "exclamation-mark", '!',
! "quotation-mark", '"',
! "number-sign", '#',
! "dollar-sign", '$',
! "percent-sign", '%',
! "ampersand", '&',
! "apostrophe", '\'',
! "left-parenthesis", '(',
! "right-parenthesis", ')',
! "asterisk", '*',
! "plus-sign", '+',
! "comma", ',',
! "hyphen", '-',
! "hyphen-minus", '-',
! "period", '.',
! "full-stop", '.',
! "slash", '/',
! "solidus", '/',
! "zero", '0',
! "one", '1',
! "two", '2',
! "three", '3',
! "four", '4',
! "five", '5',
! "six", '6',
! "seven", '7',
! "eight", '8',
! "nine", '9',
! "colon", ':',
! "semicolon", ';',
! "less-than-sign", '<',
! "equals-sign", '=',
! "greater-than-sign", '>',
! "question-mark", '?',
! "commercial-at", '@',
! "left-square-bracket", '[',
! "backslash", '\\',
! "reverse-solidus", '\\',
! "right-square-bracket", ']',
! "circumflex", '^',
! "circumflex-accent", '^',
! "underscore", '_',
! "low-line", '_',
! "grave-accent", '`',
! "left-brace", '{',
! "left-curly-bracket", '{',
! "vertical-line", '|',
! "right-brace", '}',
! "right-curly-bracket", '}',
! "tilde", '~',
! "DEL", '\177',
! NULL, 0,
};
--- 3,102 ----
char *name;
char code;
} cnames[] = {
! { "NUL", '\0' },
! { "SOH", '\001' },
! { "STX", '\002' },
! { "ETX", '\003' },
! { "EOT", '\004' },
! { "ENQ", '\005' },
! { "ACK", '\006' },
! { "BEL", '\007' },
! { "alert", '\007' },
! { "BS", '\010' },
! { "backspace", '\b' },
! { "HT", '\011' },
! { "tab", '\t' },
! { "LF", '\012' },
! { "newline", '\n' },
! { "VT", '\013' },
! { "vertical-tab", '\v' },
! { "FF", '\014' },
! { "form-feed", '\f' },
! { "CR", '\015' },
! { "carriage-return", '\r' },
! { "SO", '\016' },
! { "SI", '\017' },
! { "DLE", '\020' },
! { "DC1", '\021' },
! { "DC2", '\022' },
! { "DC3", '\023' },
! { "DC4", '\024' },
! { "NAK", '\025' },
! { "SYN", '\026' },
! { "ETB", '\027' },
! { "CAN", '\030' },
! { "EM", '\031' },
! { "SUB", '\032' },
! { "ESC", '\033' },
! { "IS4", '\034' },
! { "FS", '\034' },
! { "IS3", '\035' },
! { "GS", '\035' },
! { "IS2", '\036' },
! { "RS", '\036' },
! { "IS1", '\037' },
! { "US", '\037' },
! { "space", ' ' },
! { "exclamation-mark", '!' },
! { "quotation-mark", '"' },
! { "number-sign", '#' },
! { "dollar-sign", '$' },
! { "percent-sign", '%' },
! { "ampersand", '&' },
! { "apostrophe", '\'' },
! { "left-parenthesis", '(' },
! { "right-parenthesis", ')' },
! { "asterisk", '*' },
! { "plus-sign", '+' },
! { "comma", ',' },
! { "hyphen", '-' },
! { "hyphen-minus", '-' },
! { "period", '.' },
! { "full-stop", '.' },
! { "slash", '/' },
! { "solidus", '/' },
! { "zero", '0' },
! { "one", '1' },
! { "two", '2' },
! { "three", '3' },
! { "four", '4' },
! { "five", '5' },
! { "six", '6' },
! { "seven", '7' },
! { "eight", '8' },
! { "nine", '9' },
! { "colon", ':' },
! { "semicolon", ';' },
! { "less-than-sign", '<' },
! { "equals-sign", '=' },
! { "greater-than-sign", '>' },
! { "question-mark", '?' },
! { "commercial-at", '@' },
! { "left-square-bracket", '[' },
! { "backslash", '\\' },
! { "reverse-solidus", '\\' },
! { "right-square-bracket", ']' },
! { "circumflex", '^' },
! { "circumflex-accent", '^' },
! { "underscore", '_' },
! { "low-line", '_' },
! { "grave-accent", '`' },
! { "left-brace", '{' },
! { "left-curly-bracket", '{' },
! { "vertical-line", '|' },
! { "right-brace", '}' },
! { "right-curly-bracket", '}' },
! { "tilde", '~' },
! { "DEL", '\177' },
! { NULL, 0 }
};
Index: regex/engine.c
===================================================================
RCS file: /export/home/cvs/apache/src/regex/engine.c,v
retrieving revision 1.1
diff -c -3 -r1.1 engine.c
*** engine.c 1996/07/23 22:06:44 1.1
--- engine.c 1997/02/10 06:31:17
***************
*** 613,618 ****
--- 613,619 ----
/* "can't happen" */
assert(nope);
/* NOTREACHED */
+ return( NULL );
}
/*
Index: regex/regcomp.c
===================================================================
RCS file: /export/home/cvs/apache/src/regex/regcomp.c,v
retrieving revision 1.2
diff -c -3 -r1.2 regcomp.c
*** regcomp.c 1997/01/25 22:38:29 1.2
--- regcomp.c 1997/02/10 06:31:17
***************
*** 51,57 ****
#define NEXTn(n) (p->next += (n))
#define GETNEXT() (*p->next++)
#define SETERROR(e) seterr(p, (e))
! #define REQUIRE(co, e) ((co) || SETERROR(e))
#define MUSTSEE(c, e) (REQUIRE(MORE() && PEEK() == (c), e))
#define MUSTEAT(c, e) (REQUIRE(MORE() && GETNEXT() == (c), e))
#define MUSTNOTSEE(c, e) (REQUIRE(!MORE() || PEEK() != (c), e))
--- 51,57 ----
#define NEXTn(n) (p->next += (n))
#define GETNEXT() (*p->next++)
#define SETERROR(e) seterr(p, (e))
! #define REQUIRE(co, e) ((void)((co) || SETERROR(e)))
#define MUSTSEE(c, e) (REQUIRE(MORE() && PEEK() == (c), e))
#define MUSTEAT(c, e) (REQUIRE(MORE() && GETNEXT() == (c), e))
#define MUSTNOTSEE(c, e) (REQUIRE(!MORE() || PEEK() != (c), e))
***************
*** 192,199 ****
int stop; /* character this ERE should end at */
{
register char c;
! register sopno prevback;
! register sopno prevfwd;
register sopno conc;
register int first = 1; /* is this the first alternative? */
--- 192,199 ----
int stop; /* character this ERE should end at */
{
register char c;
! register sopno prevback = 0;
! register sopno prevfwd = 0;
register sopno conc;
register int first = 1; /* is this the first alternative? */
***************
*** 580,586 ****
p_bracket(p)
register struct parse *p;
{
- register char c;
register cset *cs = allocset(p);
register int invert = 0;
--- 580,585 ----
***************
*** 796,802 ****
register char *sp = p->next;
register struct cname *cp;
register int len;
- register char c;
while (MORE() && !SEETWO(endc, ']'))
NEXT1();
--- 795,800 ----
***************
*** 1171,1233 ****
cs->multis[cs->smultis - 1] = '\0';
}
- /*
- - mcsub - subtract a collating element from a cset
- == static void mcsub(register cset *cs, register char *cp);
- */
- static void
- mcsub(cs, cp)
- register cset *cs;
- register char *cp;
- {
- register char *fp = mcfind(cs, cp);
- register size_t len = strlen(fp);
-
- assert(fp != NULL);
- (void) memmove(fp, fp + len + 1,
- cs->smultis - (fp + len + 1 - cs->multis));
- cs->smultis -= len;
-
- if (cs->smultis == 0) {
- free(cs->multis);
- cs->multis = NULL;
- return;
- }
-
- cs->multis = realloc(cs->multis, cs->smultis);
- assert(cs->multis != NULL);
- }
-
- /*
- - mcin - is a collating element in a cset?
- == static int mcin(register cset *cs, register char *cp);
- */
- static int
- mcin(cs, cp)
- register cset *cs;
- register char *cp;
- {
- return(mcfind(cs, cp) != NULL);
- }
-
- /*
- - mcfind - find a collating element in a cset
- == static char *mcfind(register cset *cs, register char *cp);
- */
- static char *
- mcfind(cs, cp)
- register cset *cs;
- register char *cp;
- {
- register char *p;
-
- if (cs->multis == NULL)
- return(NULL);
- for (p = cs->multis; *p != '\0'; p += strlen(p) + 1)
- if (strcmp(cp, p) == 0)
- return(p);
- return(NULL);
- }
/*
- mcinvert - invert the list of collating elements in a cset
--- 1169,1174 ----
***************
*** 1497,1504 ****
register struct re_guts *g;
{
register sop *scan;
! sop *start;
! register sop *newstart;
register sopno newlen;
register sop s;
register char *cp;
--- 1438,1445 ----
register struct re_guts *g;
{
register sop *scan;
! sop *start = NULL;
! register sop *newstart = NULL;
register sopno newlen;
register sop s;
register char *cp;
Index: regex/regerror.c
===================================================================
RCS file: /export/home/cvs/apache/src/regex/regerror.c,v
retrieving revision 1.1
diff -c -3 -r1.1 regerror.c
*** regerror.c 1996/07/23 22:06:45 1.1
--- regerror.c 1997/02/10 06:31:17
***************
*** 34,56 ****
char *name;
char *explain;
} rerrs[] = {
! REG_NOMATCH, "REG_NOMATCH", "regexec() failed to match",
! REG_BADPAT, "REG_BADPAT", "invalid regular expression",
! REG_ECOLLATE, "REG_ECOLLATE", "invalid collating element",
! REG_ECTYPE, "REG_ECTYPE", "invalid character class",
! REG_EESCAPE, "REG_EESCAPE", "trailing backslash (\\)",
! REG_ESUBREG, "REG_ESUBREG", "invalid backreference number",
! REG_EBRACK, "REG_EBRACK", "brackets ([ ]) not balanced",
! REG_EPAREN, "REG_EPAREN", "parentheses not balanced",
! REG_EBRACE, "REG_EBRACE", "braces not balanced",
! REG_BADBR, "REG_BADBR", "invalid repetition count(s)",
! REG_ERANGE, "REG_ERANGE", "invalid character range",
! REG_ESPACE, "REG_ESPACE", "out of memory",
! REG_BADRPT, "REG_BADRPT", "repetition-operator operand invalid",
! REG_EMPTY, "REG_EMPTY", "empty (sub)expression",
! REG_ASSERT, "REG_ASSERT", "\"can't happen\" -- you found a bug",
! REG_INVARG, "REG_INVARG", "invalid argument to regex routine",
! 0, "", "*** unknown regexp error code ***",
};
/*
--- 34,56 ----
char *name;
char *explain;
} rerrs[] = {
! { REG_NOMATCH, "REG_NOMATCH", "regexec() failed to match" },
! { REG_BADPAT, "REG_BADPAT", "invalid regular expression" },
! { REG_ECOLLATE, "REG_ECOLLATE", "invalid collating element" },
! { REG_ECTYPE, "REG_ECTYPE", "invalid character class" },
! { REG_EESCAPE, "REG_EESCAPE", "trailing backslash (\\)" },
! { REG_ESUBREG, "REG_ESUBREG", "invalid backreference number" },
! { REG_EBRACK, "REG_EBRACK", "brackets ([ ]) not balanced" },
! { REG_EPAREN, "REG_EPAREN", "parentheses not balanced" },
! { REG_EBRACE, "REG_EBRACE", "braces not balanced" },
! { REG_BADBR, "REG_BADBR", "invalid repetition count(s)" },
! { REG_ERANGE, "REG_ERANGE", "invalid character range" },
! { REG_ESPACE, "REG_ESPACE", "out of memory" },
! { REG_BADRPT, "REG_BADRPT", "repetition-operator operand invalid" },
! { REG_EMPTY, "REG_EMPTY", "empty (sub)expression" },
! { REG_ASSERT, "REG_ASSERT", "\"can't happen\" -- you found a bug" },
! { REG_INVARG, "REG_INVARG", "invalid argument to regex routine" },
! { 0, "", "*** unknown regexp error code ***" }
};
/*
***************
*** 112,119 ****
char *localbuf;
{
register struct rerr *r;
- register size_t siz;
- register char *p;
for (r = rerrs; r->code != 0; r++)
if (strcmp(r->name, preg->re_endp) == 0)
--- 112,117 ----
Index: regex/regex2.h
===================================================================
RCS file: /export/home/cvs/apache/src/regex/regex2.h,v
retrieving revision 1.2
diff -c -3 -r1.2 regex2.h
*** regex2.h 1996/07/24 13:52:27 1.2
--- regex2.h 1997/02/10 06:31:18
***************
*** 91,98 ****
#define CHsub(cs, c) ((cs)->ptr[(uch)(c)] &= ~(cs)->mask, (cs)->hash -= (c))
#define CHIN(cs, c) ((cs)->ptr[(uch)(c)] & (cs)->mask)
#define MCadd(p, cs, cp) mcadd(p, cs, cp) /* regcomp() internal fns */
- #define MCsub(p, cs, cp) mcsub(p, cs, cp)
- #define MCin(p, cs, cp) mcin(p, cs, cp)
/* stuff for character categories */
typedef unsigned char cat_t;
--- 91,96 ----
Index: regex/regexec.c
===================================================================
RCS file: /export/home/cvs/apache/src/regex/regexec.c,v
retrieving revision 1.1
diff -c -3 -r1.1 regexec.c
*** regexec.c 1996/07/23 22:06:47 1.1
--- regexec.c 1997/02/10 06:31:18
***************
*** 16,23 ****
#include "utils.h"
#include "regex2.h"
- static int nope = 0; /* for use in asserts; shuts lint up */
-
/* macros for manipulating states, small version */
#define states long
#define states1 states /* for later use in regexec() decision */
--- 16,21 ----