fixup the remaining issues and last optimisations

This commit is contained in:
tg
2017-04-27 23:12:49 +00:00
parent 8bd529a08c
commit 13e91621ca
7 changed files with 113 additions and 101 deletions

4
expr.c
View File

@ -23,7 +23,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/expr.c,v 1.95 2017/04/27 20:22:24 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/expr.c,v 1.96 2017/04/27 23:12:46 tg Exp $");
#define EXPRTOK_DEFNS
#include "exprtok.h"
@ -618,7 +618,7 @@ exprtoken(Expr_state *es)
goto process_tvar;
#endif
} else if (ctype(c, C_DIGIT)) {
while (ctype(c, C_ALNUM) || c == '#')
while (ctype(c, C_ALNUM | C_HASH))
c = *cp++;
strndupx(tvar, es->tokp, --cp - es->tokp, ATEMP);
process_tvar: