hand-sorted ctypes/chtypes upgrade; use table-driven where they make
sense and preprocessored otherwise; unify the logic saves 144t 1i and lots of cpp(1) time, as well as improves readability
This commit is contained in:
4
eval.c
4
eval.c
@ -2,7 +2,7 @@
|
||||
|
||||
#include "sh.h"
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.17 2006/11/10 06:40:05 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.18 2006/11/10 07:52:02 tg Exp $");
|
||||
|
||||
/*
|
||||
* string expansion
|
||||
@ -797,7 +797,7 @@ varsub(Expand *xp, char *sp, char *word,
|
||||
} else {
|
||||
/* Can't assign things like $! or $1 */
|
||||
if ((stype & 0x7f) == '=' &&
|
||||
(ctype(*sp, C_VAR1) || digit(*sp)))
|
||||
ctype(*sp, C_VAR1 | C_DIGIT))
|
||||
return -1;
|
||||
xp->var = global(sp);
|
||||
xp->str = str_val(xp->var);
|
||||
|
Reference in New Issue
Block a user