diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2015-04-05 10:50:37 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2015-04-05 10:50:37 +0300 |
commit | e7ee504434e315852ebd449e20d72929de63cfe6 (patch) | |
tree | d7dba883ea707d76a3d69905d6cb3ec61f2b9744 /awkgram.c | |
parent | 9730efeabb2116fdf7e93b4553825ba147f5f523 (diff) | |
download | egawk-e7ee504434e315852ebd449e20d72929de63cfe6.tar.gz egawk-e7ee504434e315852ebd449e20d72929de63cfe6.tar.bz2 egawk-e7ee504434e315852ebd449e20d72929de63cfe6.zip |
Don't install gawk extensions if --posix or --traditional.
Diffstat (limited to 'awkgram.c')
-rw-r--r-- | awkgram.c | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -7997,12 +7997,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); } } |