batch of optimisations

This commit is contained in:
tg
2017-04-27 20:22:28 +00:00
parent 1080008a8f
commit d54d4aab50
8 changed files with 50 additions and 67 deletions

4
expr.c
View File

@ -23,7 +23,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/expr.c,v 1.94 2017/04/27 19:33:48 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/expr.c,v 1.95 2017/04/27 20:22:24 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 (c != '_' && (ctype(c, C_ALNUX) || c == '#'))
while (ctype(c, C_ALNUM) || c == '#')
c = *cp++;
strndupx(tvar, es->tokp, --cp - es->tokp, ATEMP);
process_tvar: