a certain size optimisation broke the utf8bom-3 regression test if

mksh was configured to have utf-8 mode “always on” (because it's
really only always on for interactive shells); setting it to really
always on would break the other half of this regression test, so
do the optimisation only if MKSH_SMALL
This commit is contained in:
tg
2007-05-10 19:22:11 +00:00
parent 384032b729
commit d2d035355f
2 changed files with 4 additions and 3 deletions

4
lex.c
View File

@@ -2,7 +2,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.29 2007/04/26 11:58:53 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.30 2007/05/10 19:22:11 tg Exp $");
/* Structure to keep track of the lexing state and the various pieces of info
* needed for each particular state. */
@@ -957,7 +957,7 @@ getsc__(void)
(((const unsigned char *)(s->str))[0] == 0xBB) &&
(((const unsigned char *)(s->str))[1] == 0xBF)) {
s->str += 2;
#ifndef MKSH_ASSUME_UTF8 /* otherwise it's always on */
#if !defined(MKSH_ASSUME_UTF8) || !defined(MKSH_SMALL)
Flag(FUTFHACK) = 1;
#endif
goto getsc_again;