mostly revert 100480A853206FB56FA and parse utf-8 lead bytes ourselves

This commit is contained in:
tg
2008-04-20 00:24:26 +00:00
parent 1aa64814c0
commit 309c674ed7
4 changed files with 13 additions and 18 deletions

7
expr.c
View File

@@ -2,7 +2,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/expr.c,v 1.16 2008/04/19 23:49:58 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/expr.c,v 1.17 2008/04/20 00:24:25 tg Exp $");
/* The order of these enums is constrained by the order of opinfo[] */
enum token {
@@ -478,11 +478,6 @@ exprtoken(Expr_state *es)
} else if (c == '1' && cp[1] == '#') {
utf_cptradj(cp + 2, &cp);
tvar = str_nsave(es->tokp, cp - es->tokp, ATEMP);
if (*cp) {
*tvar = '\0'; /* produce an artificial error */
while (*cp) /* and skip until end of expr */
++cp;
}
goto process_tvar;
} else if (ksh_isdigit(c)) {
while (c != '_' && (ksh_isalnux(c) || c == '#'))