=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/vgrind/Attic/regexp.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- src/usr.bin/vgrind/Attic/regexp.c 2002/02/16 21:27:56 1.4 +++ src/usr.bin/vgrind/Attic/regexp.c 2003/02/19 07:32:36 1.5 @@ -1,4 +1,4 @@ -/* $OpenBSD: regexp.c,v 1.4 2002/02/16 21:27:56 millert Exp $ */ +/* $OpenBSD: regexp.c,v 1.5 2003/02/19 07:32:36 deraadt Exp $ */ /* $NetBSD: regexp.c,v 1.3 1994/11/17 08:28:02 jtc Exp $ */ /* @@ -45,7 +45,7 @@ #if 0 static char sccsid[] = "@(#)regexp.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: regexp.c,v 1.4 2002/02/16 21:27:56 millert Exp $"; +static char rcsid[] = "$OpenBSD: regexp.c,v 1.5 2003/02/19 07:32:36 deraadt Exp $"; #endif /* not lint */ #include @@ -59,8 +59,8 @@ static void expconv(void); -boolean _escaped; /* true if we are currently _escaped */ -char *_start; /* start of string */ +boolean x_escaped; /* true if we are currently x_escaped */ +char *x_start; /* start of string */ boolean l_onecase; /* true if upper and lower equivalent */ #define makelower(c) (isupper((c)) ? tolower((c)) : (c)) @@ -101,14 +101,14 @@ * internal format. * * Either meta symbols (\a \d or \p) or character strings or - * operations ( alternation or perenthesizing ) can be + * operations ( alternation or parenthesizing ) can be * specified. Each starts with a descriptor byte. The descriptor * byte has STR set for strings, META set for meta symbols * and OPER set for operations. * The descriptor byte can also have the OPT bit set if the object * defined is optional. Also ALT can be set to indicate an alternation. * - * For metasymbols the byte following the descriptor byte identities + * For metasymbols the byte following the descriptor byte identifies * the meta symbol (containing an ascii 'a', 'd', 'p', '|', or '('). For * strings the byte after the descriptor is a character count for * the string: @@ -183,7 +183,7 @@ { char *cs; /* pointer to current symbol in converted exp */ char c; /* character being processed */ - char *acs; /* pinter to last alternate */ + char *acs; /* pointer to last alternate */ int temp; /* let the conversion begin */ @@ -269,7 +269,7 @@ OCNT(cs) = ccre - cs; /* offset to next symbol */ break; - /* reurn from a recursion */ + /* return from a recursion */ case ')': if (acs != NIL) { do { @@ -301,7 +301,7 @@ acs = cs; /* remember that the pointer is to be filles */ break; - /* if its not a metasymbol just build a scharacter string */ + /* if its not a metasymbol just build a character string */ default: if (cs == NIL || (*cs & STR) == 0) { cs = ccre; @@ -324,11 +324,11 @@ } return; } -/* end of convertre */ +/* end of converter */ /* - * The following routine recognises an irregular expresion + * The following routine recognises an irregular expression * with the following special characters: * * \? - means last match was optional @@ -457,7 +457,7 @@ return (ptr); } else if (ptr != NIL && (*cs & OPT)) { - /* it was aoptional so no match is ok */ + /* it was optional so no match is ok */ return (ptr); } else if (ptr != NIL) { @@ -467,9 +467,9 @@ if (!isalnum(*s1) && *s1 != '_') return (NIL); if (*s1 == '\\') - _escaped = _escaped ? FALSE : TRUE; + x_escaped = x_escaped ? FALSE : TRUE; else - _escaped = FALSE; + x_escaped = FALSE; } while (*s1++); return (NIL); @@ -489,7 +489,7 @@ return (ptr); } else if (ptr != NIL && (*cs & OPT)) { - /* it was aoptional so no match is ok */ + /* it was optional so no match is ok */ return (ptr); } else if (ptr != NIL) { @@ -497,15 +497,15 @@ return (NIL); } if (*s1 == '\\') - _escaped = _escaped ? FALSE : TRUE; + x_escaped = x_escaped ? FALSE : TRUE; else - _escaped = FALSE; + x_escaped = FALSE; } while (*s1++); return (NIL); - /* fail if we are currently _escaped */ + /* fail if we are currently x_escaped */ case 'e': - if (_escaped) + if (x_escaped) return(NIL); cs = MNEXT(cs); break; @@ -515,7 +515,7 @@ ptr = s; while (*s == ' ' || *s == '\t') s++; - if (s != ptr || s == _start) { + if (s != ptr || s == x_start) { /* match, be happy */ matched = 1; @@ -567,7 +567,7 @@ /* check for start of line */ case '^': - if (s == _start) { + if (s == x_start) { /* match, be happy */ matched = 1;