aboutsummaryrefslogtreecommitdiffstats
path: root/awkgram.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2015-04-05 10:53:12 +0300
committerArnold D. Robbins <arnold@skeeve.com>2015-04-05 10:53:12 +0300
commit7b6df8af60bfe3e90be216952510a8f7bf2745aa (patch)
tree2876384d16ef0f04e903fcf86d4eb468ce25ac92 /awkgram.c
parent448c45412600cd9844caf2336f5bf6c459145d08 (diff)
parentdbf9d5a4fc4b6d6340912395f020019576ed37f6 (diff)
downloadegawk-7b6df8af60bfe3e90be216952510a8f7bf2745aa.tar.gz
egawk-7b6df8af60bfe3e90be216952510a8f7bf2745aa.tar.bz2
egawk-7b6df8af60bfe3e90be216952510a8f7bf2745aa.zip
Merge branch 'master' into feature/regex-type
Diffstat (limited to 'awkgram.c')
-rw-r--r--awkgram.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/awkgram.c b/awkgram.c
index 337e179f..8118c9c3 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -8422,12 +8422,20 @@ void
install_builtins(void)
{
int i, j;
+ int flags_that_must_be_clear = DEBUG_USE;
+
+ if (do_traditional)
+ flags_that_must_be_clear |= GAWKX;
+
+ if (do_posix)
+ flags_that_must_be_clear |= NOT_POSIX;
+
j = sizeof(tokentab) / sizeof(tokentab[0]);
for (i = 0; i < j; i++) {
- if ( (tokentab[i].class == LEX_BUILTIN
- || tokentab[i].class == LEX_LENGTH)
- && (tokentab[i].flags & DEBUG_USE) == 0) {
+ if ( (tokentab[i].class == LEX_BUILTIN
+ || tokentab[i].class == LEX_LENGTH)
+ && (tokentab[i].flags & flags_that_must_be_clear) == 0) {
(void) install_symbol(tokentab[i].operator, Node_builtin_func);
}
}