commit the optimisation result from the new fast character classes

This commit is contained in:
tg
2017-04-28 00:38:33 +00:00
parent 4405a995ad
commit 2231ff566d
11 changed files with 96 additions and 70 deletions

6
tree.c
View File

@ -23,7 +23,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/tree.c,v 1.89 2017/04/12 16:46:23 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/tree.c,v 1.90 2017/04/28 00:38:33 tg Exp $");
#define INDENT 8
@ -856,8 +856,8 @@ dumpwdvar_i(struct shf *shf, const char *wp, int quotelevel)
case QCHAR:
shf_puts("QCHAR<", shf);
c = *wp++;
if (quotelevel == 0 ||
(c == '"' || c == '`' || c == '$' || c == '\\'))
if (quotelevel == 0 || c == '"' || c == '\\' ||
ctype(c, C_DOLAR | C_GRAVE))
shf_putc('\\', shf);
dumpchar(shf, c);
goto closeandout;