diff options
author | jilles <jilles@FreeBSD.org> | 2010-04-03 21:01:01 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2010-04-03 21:01:01 +0000 |
commit | 8bc40943f56c99d0f5290b7ccfe2c20f89648229 (patch) | |
tree | ef5a120bde156b2d719ba4702e8675345b1df9fe /bin | |
parent | 631cfa174839a86bceb027b45b94ae4c25a16df6 (diff) | |
download | FreeBSD-src-8bc40943f56c99d0f5290b7ccfe2c20f89648229.zip FreeBSD-src-8bc40943f56c99d0f5290b7ccfe2c20f89648229.tar.gz |
sh: Remove special handling for ' and " in arithmetic.
They will be treated like normal characters, resulting in a runtime
arithmetic expression error.
Exp-run done by: erwin (with some other sh(1) changes)
Diffstat (limited to 'bin')
-rw-r--r-- | bin/sh/mksyntax.c | 2 | ||||
-rw-r--r-- | bin/sh/parser.c | 5 |
2 files changed, 1 insertions, 6 deletions
diff --git a/bin/sh/mksyntax.c b/bin/sh/mksyntax.c index 28a018b..f5bc51a 100644 --- a/bin/sh/mksyntax.c +++ b/bin/sh/mksyntax.c @@ -232,8 +232,6 @@ main(int argc __unused, char **argv __unused) add("\n", "CNL"); add("\\", "CBACK"); add("`", "CBQUOTE"); - add("'", "CSQUOTE"); - add("\"", "CDQUOTE"); add("$", "CVAR"); add("}", "CENDVAR"); add("(", "CLP"); diff --git a/bin/sh/parser.c b/bin/sh/parser.c index 29ccd83..64c97aa 100644 --- a/bin/sh/parser.c +++ b/bin/sh/parser.c @@ -1223,10 +1223,7 @@ readtoken1(int firstc, char const *initialsyntax, char *eofmark, int striptabs) if (eofmark != NULL && newvarnest == 0) USTPUTC(c, out); else { - if (state[level].category == TSTATE_ARITH) - state[level].syntax = ARISYNTAX; - else - state[level].syntax = BASESYNTAX; + state[level].syntax = BASESYNTAX; quotef++; } break; |