httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roy Fielding <field...@hyperreal.com>
Subject cvs commit: apache/src/regex cclass.h cname.h debug.c engine.c main.c regcomp.c regerror.c regex2.h regexec.c
Date Mon, 17 Feb 1997 04:52:45 GMT
fielding    97/02/16 20:52:44

  Modified:    src       CHANGES
               src/regex  cclass.h cname.h debug.c engine.c main.c
                        regcomp.c regerror.c  regex2.h regexec.c
  Log:
  Fixed compiler warnings in the regex library.
  
  Submitted by: Dean Gaudet
  Reviewed by: Marc Slemko, Roy Fielding
  
  Revision  Changes    Path
  1.165     +2 -0      apache/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.164
  retrieving revision 1.165
  diff -C3 -r1.164 -r1.165
  *** CHANGES	1997/02/17 00:45:06	1.164
  --- CHANGES	1997/02/17 04:52:38	1.165
  ***************
  *** 100,105 ****
  --- 100,107 ----
      *) Fixed http_protocol to correctly output all HTTP/1.1 headers, including
         for the special case of a 304 response.  [Paul Sutton]
    
  +   *) Fixed compiler warnings in the regex library. [Dean Gaudet]
  + 
    Changes with Apache 1.2b6
    
      *) Allow whitespace in imagemap mapfile coordinates. [Marc Slemko]
  
  
  
  1.2       +22 -22    apache/src/regex/cclass.h
  
  Index: cclass.h
  ===================================================================
  RCS file: /export/home/cvs/apache/src/regex/cclass.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -C3 -r1.1 -r1.2
  *** cclass.h	1996/07/23 22:06:42	1.1
  --- cclass.h	1997/02/17 04:52:40	1.2
  ***************
  *** 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,		"" }
    };
  
  
  
  1.2       +96 -96    apache/src/regex/cname.h
  
  Index: cname.h
  ===================================================================
  RCS file: /export/home/cvs/apache/src/regex/cname.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -C3 -r1.1 -r1.2
  *** cname.h	1996/07/23 22:06:43	1.1
  --- cname.h	1997/02/17 04:52:40	1.2
  ***************
  *** 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 }
    };
  
  
  
  1.2       +1 -1      apache/src/regex/debug.c
  
  Index: debug.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/regex/debug.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -C3 -r1.1 -r1.2
  *** debug.c	1996/07/23 22:06:43	1.1
  --- debug.c	1997/02/17 04:52:40	1.2
  ***************
  *** 216,222 ****
    			fprintf(d, ">");
    			break;
    		default:
  ! 			fprintf(d, "!%d(%d)!", OP(*s), opnd);
    			break;
    		}
    		if (!done)
  --- 216,222 ----
    			fprintf(d, ">");
    			break;
    		default:
  ! 			fprintf(d, "!%ld(%ld)!", OP(*s), opnd);
    			break;
    		}
    		if (!done)
  
  
  
  1.2       +3 -2      apache/src/regex/engine.c
  
  Index: engine.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/regex/engine.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -C3 -r1.1 -r1.2
  *** engine.c	1996/07/23 22:06:44	1.1
  --- engine.c	1997/02/17 04:52:40	1.2
  ***************
  *** 75,82 ****
    	struct match mv;
    	register struct match *m = &mv;
    	register char *dp;
  ! 	const register sopno gf = g->firststate+1;	/* +1 for OEND */
  ! 	const register sopno gl = g->laststate;
    	char *start;
    	char *stop;
    
  --- 75,82 ----
    	struct match mv;
    	register struct match *m = &mv;
    	register char *dp;
  ! 	register const sopno gf = g->firststate+1;	/* +1 for OEND */
  ! 	register const sopno gl = g->laststate;
    	char *start;
    	char *stop;
    
  ***************
  *** 613,618 ****
  --- 613,619 ----
    	/* "can't happen" */
    	assert(nope);
    	/* NOTREACHED */
  + 	return( NULL );
    }
    
    /*
  
  
  
  1.2       +3 -3      apache/src/regex/main.c
  
  Index: main.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/regex/main.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -C3 -r1.1 -r1.2
  *** main.c	1996/07/23 22:06:44	1.1
  --- main.c	1997/02/17 04:52:40	1.2
  ***************
  *** 3,8 ****
  --- 3,9 ----
    #include <sys/types.h>
    #include <regex.h>
    #include <assert.h>
  + #include <stdlib.h>
    
    #include "main.ih"
    
  ***************
  *** 23,29 ****
    /*
     - main - do the simple case, hand off to regress() for regression
     */
  ! main(argc, argv)
    int argc;
    char *argv[];
    {
  --- 24,30 ----
    /*
     - main - do the simple case, hand off to regress() for regression
     */
  ! int main(argc, argv)
    int argc;
    char *argv[];
    {
  ***************
  *** 103,109 ****
    		len = (int)(subs[0].rm_eo - subs[0].rm_so);
    		if (subs[0].rm_so != -1) {
    			if (len != 0)
  ! 				printf("match `%.*s'\n", len,
    					argv[optind] + subs[0].rm_so);
    			else
    				printf("match `'@%.1s\n",
  --- 104,110 ----
    		len = (int)(subs[0].rm_eo - subs[0].rm_so);
    		if (subs[0].rm_so != -1) {
    			if (len != 0)
  ! 				printf("match `%.*s'\n", (int)len,
    					argv[optind] + subs[0].rm_so);
    			else
    				printf("match `'@%.1s\n",
  ***************
  *** 499,505 ****
    char *name;
    {
    	static char efbuf[100];
  - 	size_t n;
    	regex_t re;
    
    	sprintf(efbuf, "REG_%s", name);
  --- 500,505 ----
  
  
  
  1.3       +5 -64     apache/src/regex/regcomp.c
  
  Index: regcomp.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/regex/regcomp.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -C3 -r1.2 -r1.3
  *** regcomp.c	1997/01/25 22:38:29	1.2
  --- regcomp.c	1997/02/17 04:52:41	1.3
  ***************
  *** 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;
  
  
  
  1.2       +17 -19    apache/src/regex/regerror.c
  
  Index: regerror.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/regex/regerror.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -C3 -r1.1 -r1.2
  *** regerror.c	1996/07/23 22:06:45	1.1
  --- regerror.c	1997/02/17 04:52:41	1.2
  ***************
  *** 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 ----
  
  
  
  1.3       +0 -2      apache/src/regex/regex2.h
  
  Index: regex2.h
  ===================================================================
  RCS file: /export/home/cvs/apache/src/regex/regex2.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -C3 -r1.2 -r1.3
  *** regex2.h	1996/07/24 13:52:27	1.2
  --- regex2.h	1997/02/17 04:52:41	1.3
  ***************
  *** 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 ----
  
  
  
  1.2       +2 -0      apache/src/regex/regexec.c
  
  Index: regexec.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/regex/regexec.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -C3 -r1.1 -r1.2
  *** regexec.c	1996/07/23 22:06:47	1.1
  --- regexec.c	1997/02/17 04:52:41	1.2
  ***************
  *** 16,22 ****
  --- 16,24 ----
    #include "utils.h"
    #include "regex2.h"
    
  + #ifndef NDEBUG
    static int nope = 0;		/* for use in asserts; shuts lint up */
  + #endif
    
    /* macros for manipulating states, small version */
    #define	states	long
  
  
  

Mime
View raw message