• syn.c: replace expanded use of str_save() with the actual macro
• others: fix 6 (!) cases of non-constant or side-effect arguments to the str_save() or str_nsave() macros, and other abuse of them • also fix some cosmetics and other un-nice code while here
This commit is contained in:
7
expr.c
7
expr.c
@ -2,7 +2,7 @@
|
||||
|
||||
#include "sh.h"
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/expr.c,v 1.17 2008/04/20 00:24:25 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/expr.c,v 1.18 2008/07/12 16:56:38 tg Exp $");
|
||||
|
||||
/* The order of these enums is constrained by the order of opinfo[] */
|
||||
enum token {
|
||||
@ -480,9 +480,12 @@ exprtoken(Expr_state *es)
|
||||
tvar = str_nsave(es->tokp, cp - es->tokp, ATEMP);
|
||||
goto process_tvar;
|
||||
} else if (ksh_isdigit(c)) {
|
||||
int i;
|
||||
|
||||
while (c != '_' && (ksh_isalnux(c) || c == '#'))
|
||||
c = *cp++;
|
||||
tvar = str_nsave(es->tokp, --cp - es->tokp, ATEMP);
|
||||
i = --cp - es->tokp;
|
||||
tvar = str_nsave(es->tokp, i, ATEMP);
|
||||
process_tvar:
|
||||
es->val = tempvar();
|
||||
es->val->flag &= ~INTEGER;
|
||||
|
Reference in New Issue
Block a user