=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/awk/b.c,v retrieving revision 1.1 retrieving revision 1.2 diff -c -r1.1 -r1.2 *** src/usr.bin/awk/b.c 1996/07/04 20:34:41 1.1 --- src/usr.bin/awk/b.c 1997/01/20 19:43:20 1.2 *************** *** 227,237 **** /* to be seen literally; \056 is not a metacharacter. */ int hexstr(char **pp) /* find and eval hex string at pp, return new p */ ! { char *p; int n = 0; ! for (p = *pp; isxdigit(*p); p++) { if (isdigit(*p)) n = 16 * n + *p - '0'; else if (*p >= 'a' && *p <= 'f') --- 227,238 ---- /* to be seen literally; \056 is not a metacharacter. */ int hexstr(char **pp) /* find and eval hex string at pp, return new p */ ! { /* only pick up one 8-bit byte (2 chars) */ char *p; int n = 0; + int i; ! for (i = 0, p = *pp; i < 2 && isxdigit(*p); i++, p++) { if (isdigit(*p)) n = 16 * n + *p - '0'; else if (*p >= 'a' && *p <= 'f') *************** *** 243,249 **** return n; } ! #define isoctdigit(c) ((c) >= '0' && (c) <= '8') /* multiple use of arg */ int quoted(char **pp) /* pick up next thing after a \\ */ /* and increment *pp */ --- 244,250 ---- return n; } ! #define isoctdigit(c) ((c) >= '0' && (c) <= '7') /* multiple use of arg */ int quoted(char **pp) /* pick up next thing after a \\ */ /* and increment *pp */