aboutsummaryrefslogtreecommitdiff
path: root/contrib/awk/node.c
diff options
context:
space:
mode:
authorSheldon Hearn <sheldonh@FreeBSD.org>2000-08-15 10:02:07 +0000
committerSheldon Hearn <sheldonh@FreeBSD.org>2000-08-15 10:02:07 +0000
commit4192247c04a09b9f83953a0d00f7992e8afaf976 (patch)
tree88d7fea3d791af620456e3cd42ff2bf1c4229af2 /contrib/awk/node.c
parent7513a7dcd41f511878c9886b41685d9212679e7f (diff)
downloadsrc-4192247c04a09b9f83953a0d00f7992e8afaf976.tar.gz
src-4192247c04a09b9f83953a0d00f7992e8afaf976.zip
Update vendor branch to gawk-3.0.6.
Notes
Notes: svn path=/vendor/awk/dist/; revision=64666
Diffstat (limited to 'contrib/awk/node.c')
-rw-r--r--contrib/awk/node.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/contrib/awk/node.c b/contrib/awk/node.c
index af899b6b58a7..3a7b5f4a4551 100644
--- a/contrib/awk/node.c
+++ b/contrib/awk/node.c
@@ -3,7 +3,7 @@
*/
/*
- * Copyright (C) 1986, 1988, 1989, 1991-1999 the Free Software Foundation, Inc.
+ * Copyright (C) 1986, 1988, 1989, 1991-2000 the Free Software Foundation, Inc.
*
* This file is part of GAWK, the GNU implementation of the
* AWK Programming Language.
@@ -203,8 +203,10 @@ register NODE *s;
cant_happen();
if (s->type != Node_val)
cant_happen();
+/*
if ((s->flags & NUM) == 0)
cant_happen();
+*/
if (s->stref <= 0)
cant_happen();
if ((s->flags & STR) != 0
@@ -239,7 +241,7 @@ NODE *n;
}
getnode(r);
*r = *n;
- r->flags &= ~(PERM|TEMP);
+ r->flags &= ~(PERM|TEMP|FIELD);
r->flags |= MALLOC;
if (n->type == Node_val && (n->flags & STR) != 0) {
r->stref = 1;
@@ -511,6 +513,18 @@ char **string_ptr;
}
return i;
default:
+ if (do_lint) {
+ static short warned[256];
+ unsigned char uc = (unsigned char) c;
+
+ /* N.B.: use unsigned char here to avoid Latin-1 problems */
+
+ if (! warned[uc]) {
+ warned[uc] = TRUE;
+
+ warning("escape sequence `\\%c' treated as plain `%c'", uc, uc);
+ }
+ }
return c;
}
}