diff options
author | Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> | 1990-03-12 04:13:22 +0000 |
---|---|---|
committer | Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> | 1990-03-12 04:13:22 +0000 |
commit | 79a0689e17f959bdb246dc37bbbbfeba4c2b3b56 (patch) | |
tree | 9d9d5ae4fd6a3bc9c009a7aebe90073c900a27a7 /regcomp.c | |
parent | ff2452de34aca0717369277df00e15764613e5c1 (diff) | |
download | perl-79a0689e17f959bdb246dc37bbbbfeba4c2b3b56.tar.gz |
perl 3.0 patch #14 patch #13, continued
See patch #13.
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -7,9 +7,12 @@ * blame Henry for some of the lack of readability. */ -/* $Header: regcomp.c,v 3.0.1.2 90/02/28 18:08:35 lwall Locked $ +/* $Header: regcomp.c,v 3.0.1.3 90/03/12 16:59:22 lwall Locked $ * * $Log: regcomp.c,v $ + * Revision 3.0.1.3 90/03/12 16:59:22 lwall + * patch13: pattern matches can now use \0 to mean \000 + * * Revision 3.0.1.2 90/02/28 18:08:35 lwall * patch9: /[\200-\377]/ didn't work on machines with signed chars * @@ -639,7 +642,7 @@ int *flagp; goto defchar; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': - if (isdigit(regparse[1])) + if (isdigit(regparse[1]) || *regparse == '0') goto defchar; else { ret = regnode(REF + *regparse++ - '0'); @@ -708,10 +711,10 @@ int *flagp; break; case '0': case '1': case '2': case '3':case '4': case '5': case '6': case '7': case '8':case '9': - if (isdigit(p[1])) { - foo = *p++ - '0'; - foo <<= 3; - foo += *p - '0'; + if (isdigit(p[1]) || *p == '0') { + foo = *p - '0'; + if (isdigit(p[1])) + foo = (foo<<3) + *++p - '0'; if (isdigit(p[1])) foo = (foo<<3) + *++p - '0'; ender = foo; |