split utf_ptradjx into utf_ptradj function (to save space) and

self-assignment macro; remove some uses of the macro in favour
of foo += utf_ptradj(foo)
This commit is contained in:
tg
2009-05-16 15:09:07 +00:00
parent 36f737f5cb
commit 8a7223d4cd
3 changed files with 20 additions and 13 deletions

4
expr.c
View File

@ -2,7 +2,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/expr.c,v 1.24 2009/04/07 18:41:35 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/expr.c,v 1.25 2009/05/16 15:09:07 tg Exp $");
/* The order of these enums is constrained by the order of opinfo[] */
enum token {
@ -505,7 +505,7 @@ exprtoken(Expr_state *es)
es->tok = VAR;
} else if (c == '1' && cp[1] == '#') {
cp += 2;
utf_ptradjx(cp, cp);
cp += utf_ptradj(cp);
strndupx(tvar, es->tokp, cp - es->tokp, ATEMP);
goto process_tvar;
} else if (ksh_isdigit(c)) {