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)
This commit is contained in:
Jilles Tjoelker 2010-04-03 21:01:01 +00:00
parent 8cf06f5eee
commit e79985ffed
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=206146
2 changed files with 1 additions and 6 deletions

View File

@ -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");

View File

@ -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;