You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Randy Terbush <ra...@zyzzyva.com> on 1997/01/25 22:46:07 UTC
Re: [PATCH] NEXT define in regex/regcomp.c
+1
> On Sat, 25 Jan 1997, Roy T. Fielding wrote:
>
> > * RobH wants us to test it before a public release. That makes sense,
> > so lets plan on delaying public release until 24hrs after 1.2b5 tar.
> > That should satisfy Ben as well.
>
> Yup. Sounds good. All this cleanup stuff is a good thing and is worth a
> day or two, considering it is almost more bugfixes than in the last 6
> months... <g> Guess we better start tracking things.
>
> > * NeXT doesn't compile due to macro NEXT in regex/regcomp.c ???
> > Status: no idea
>
> Proposed patch. Compiles, but not tested on a NeXT.
>
> Index: regex/regcomp.c
> ===================================================================
> RCS file: /export/home/cvs/apache/src/regex/regcomp.c,v
> retrieving revision 1.1
> diff -c -r1.1 regcomp.c
> *** 1.1 1996/07/23 22:06:45
> --- regcomp.c 1997/01/25 20:46:02
> ***************
> *** 44,52 ****
> #define MORE2() (p->next+1 < p->end)
> #define SEE(c) (MORE() && PEEK() == (c))
> #define SEETWO(a, b) (MORE() && MORE2() && PEEK() == (a) && PEEK2() == (b))
> ! #define EAT(c) ((SEE(c)) ? (NEXT(), 1) : 0)
> #define EATTWO(a, b) ((SEETWO(a, b)) ? (NEXT2(), 1) : 0)
> ! #define NEXT() (p->next++)
> #define NEXT2() (p->next += 2)
> #define NEXTn(n) (p->next += (n))
> #define GETNEXT() (*p->next++)
> --- 44,52 ----
> #define MORE2() (p->next+1 < p->end)
> #define SEE(c) (MORE() && PEEK() == (c))
> #define SEETWO(a, b) (MORE() && MORE2() && PEEK() == (a) && PEEK2() == (b))
> ! #define EAT(c) ((SEE(c)) ? (NEXT1(), 1) : 0)
> #define EATTWO(a, b) ((SEETWO(a, b)) ? (NEXT2(), 1) : 0)
> ! #define NEXT1() (p->next++)
> #define NEXT2() (p->next += 2)
> #define NEXTn(n) (p->next += (n))
> #define GETNEXT() (*p->next++)
> ***************
> *** 324,330 ****
> if (!( c == '*' || c == '+' || c == '?' ||
> (c == '{' && MORE2() && isdigit(PEEK2())) ))
> return; /* no repetition, we're done */
> ! NEXT();
>
> REQUIRE(!wascaret, REG_BADRPT);
> switch (c) {
> --- 324,330 ----
> if (!( c == '*' || c == '+' || c == '?' ||
> (c == '{' && MORE2() && isdigit(PEEK2())) ))
> return; /* no repetition, we're done */
> ! NEXT1();
>
> REQUIRE(!wascaret, REG_BADRPT);
> switch (c) {
> ***************
> *** 361,367 ****
> repeat(p, pos, count, count2);
> if (!EAT('}')) { /* error heuristics */
> while (MORE() && PEEK() != '}')
> ! NEXT();
> REQUIRE(MORE(), REG_EBRACE);
> SETERROR(REG_BADBR);
> }
> --- 361,367 ----
> repeat(p, pos, count, count2);
> if (!EAT('}')) { /* error heuristics */
> while (MORE() && PEEK() != '}')
> ! NEXT1();
> REQUIRE(MORE(), REG_EBRACE);
> SETERROR(REG_BADBR);
> }
> ***************
> *** 539,545 ****
> repeat(p, pos, count, count2);
> if (!EATTWO('\\', '}')) { /* error heuristics */
> while (MORE() && !SEETWO('\\', '}'))
> ! NEXT();
> REQUIRE(MORE(), REG_EBRACE);
> SETERROR(REG_BADBR);
> }
> --- 539,545 ----
> repeat(p, pos, count, count2);
> if (!EATTWO('\\', '}')) { /* error heuristics */
> while (MORE() && !SEETWO('\\', '}'))
> ! NEXT1();
> REQUIRE(MORE(), REG_EBRACE);
> SETERROR(REG_BADBR);
> }
> ***************
> *** 698,704 ****
> start = p_b_symbol(p);
> if (SEE('-') && MORE2() && PEEK2() != ']') {
> /* range */
> ! NEXT();
> if (EAT('-'))
> finish = '-';
> else
> --- 698,704 ----
> start = p_b_symbol(p);
> if (SEE('-') && MORE2() && PEEK2() != ']') {
> /* range */
> ! NEXT1();
> if (EAT('-'))
> finish = '-';
> else
> ***************
> *** 729,735 ****
> register char c;
>
> while (MORE() && isalpha(PEEK()))
> ! NEXT();
> len = p->next - sp;
> for (cp = cclasses; cp->name != NULL; cp++)
> if (strncmp(cp->name, sp, len) == 0 && cp->name[len] == '\0')
> --- 729,735 ----
> register char c;
>
> while (MORE() && isalpha(PEEK()))
> ! NEXT1();
> len = p->next - sp;
> for (cp = cclasses; cp->name != NULL; cp++)
> if (strncmp(cp->name, sp, len) == 0 && cp->name[len] == '\0')
> ***************
> *** 799,805 ****
> register char c;
>
> while (MORE() && !SEETWO(endc, ']'))
> ! NEXT();
> if (!MORE()) {
> SETERROR(REG_EBRACK);
> return(0);
> --- 799,805 ----
> register char c;
>
> while (MORE() && !SEETWO(endc, ']'))
> ! NEXT1();
> if (!MORE()) {
> SETERROR(REG_EBRACK);
> return(0);
Re: [PATCH] NEXT define in regex/regcomp.c
Posted by Chuck Murcko <ch...@topsail.org>.
Randy Terbush wrote:
>
> +1
>
> > On Sat, 25 Jan 1997, Roy T. Fielding wrote:
> >
> > > * RobH wants us to test it before a public release. That makes sense,
> > > so lets plan on delaying public release until 24hrs after 1.2b5 tar.
> > > That should satisfy Ben as well.
> >
> > Yup. Sounds good. All this cleanup stuff is a good thing and is worth a
> > day or two, considering it is almost more bugfixes than in the last 6
> > months... <g> Guess we better start tracking things.
> >
> > > * NeXT doesn't compile due to macro NEXT in regex/regcomp.c ???
> > > Status: no idea
> >
> > Proposed patch. Compiles, but not tested on a NeXT.
> >
Safe as anything. +1
--
chuck
Chuck Murcko
The Topsail Group, West Chester PA USA
chuck@topsail.org