=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/awk/b.c,v retrieving revision 1.16 retrieving revision 1.17 diff -c -r1.16 -r1.17 *** src/usr.bin/awk/b.c 2010/06/13 17:58:19 1.16 --- src/usr.bin/awk/b.c 2011/09/28 19:27:18 1.17 *************** *** 1,4 **** ! /* $OpenBSD: b.c,v 1.16 2010/06/13 17:58:19 millert Exp $ */ /**************************************************************** Copyright (C) Lucent Technologies 1997 All Rights Reserved --- 1,4 ---- ! /* $OpenBSD: b.c,v 1.17 2011/09/28 19:27:18 millert Exp $ */ /**************************************************************** Copyright (C) Lucent Technologies 1997 All Rights Reserved *************** *** 232,238 **** /* in the parsing of regular expressions, metacharacters like . have */ /* 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) */ uschar *p; int n = 0; --- 232,238 ---- /* in the parsing of regular expressions, metacharacters like . have */ /* to be seen literally; \056 is not a metacharacter. */ ! int hexstr(uschar **pp) /* find and eval hex string at pp, return new p */ { /* only pick up one 8-bit byte (2 chars) */ uschar *p; int n = 0; *************** *** 246,261 **** else if (*p >= 'A' && *p <= 'F') n = 16 * n + *p - 'A' + 10; } ! *pp = (char *) p; 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 */ { ! char *p = *pp; int c; if ((c = *p++) == 't') --- 246,261 ---- else if (*p >= 'A' && *p <= 'F') n = 16 * n + *p - 'A' + 10; } ! *pp = (uschar *) p; return n; } #define isoctdigit(c) ((c) >= '0' && (c) <= '7') /* multiple use of arg */ ! int quoted(uschar **pp) /* pick up next thing after a \\ */ /* and increment *pp */ { ! uschar *p = *pp; int c; if ((c = *p++) == 't') *************** *** 300,312 **** bp = buf; for (i = 0; (c = *p++) != 0; ) { if (c == '\\') { ! c = quoted((char **) &p); } else if (c == '-' && i > 0 && bp[-1] != 0) { if (*p != 0) { c = bp[-1]; c2 = *p++; if (c2 == '\\') ! c2 = quoted((char **) &p); if (c > c2) { /* empty; ignore */ bp--; i--; --- 300,312 ---- bp = buf; for (i = 0; (c = *p++) != 0; ) { if (c == '\\') { ! c = quoted(&p); } else if (c == '-' && i > 0 && bp[-1] != 0) { if (*p != 0) { c = bp[-1]; c2 = *p++; if (c2 == '\\') ! c2 = quoted(&p); if (c > c2) { /* empty; ignore */ bp--; i--; *************** *** 734,740 **** #ifndef HAS_ISBLANK ! int (isblank)(int c) { return c==' ' || c=='\t'; } --- 734,740 ---- #ifndef HAS_ISBLANK ! int (xisblank)(int c) { return c==' ' || c=='\t'; } *************** *** 748,754 **** --- 748,758 ---- } charclasses[] = { { "alnum", 5, isalnum }, { "alpha", 5, isalpha }, + #ifndef HAS_ISBLANK + { "blank", 5, isspace }, /* was isblank */ + #else { "blank", 5, isblank }, + #endif { "cntrl", 5, iscntrl }, { "digit", 5, isdigit }, { "graph", 5, isgraph }, *************** *** 785,791 **** case ')': return c; case '\\': ! rlxval = quoted((char **) &prestr); return CHAR; default: rlxval = c; --- 789,795 ---- case ')': return c; case '\\': ! rlxval = quoted(&prestr); return CHAR; default: rlxval = c;