optimisation: #ifdef MKSH_ASSUME_UTF8, don't bother to “Flag(FUTFHACK) = 1;” on UTF-8 BOM encounter, it's always on (unless manually set to off) – saves a few bytes, I guess

This commit is contained in:
tg 2007-04-26 11:58:53 +00:00
parent 7a775ab0cf
commit c0e5c09351

4
lex.c
View File

@ -2,7 +2,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.28 2007/04/15 12:28:38 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.29 2007/04/26 11:58:53 tg Exp $");
/* Structure to keep track of the lexing state and the various pieces of info
* needed for each particular state. */
@ -957,7 +957,9 @@ 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 */
Flag(FUTFHACK) = 1;
#endif
goto getsc_again;
}
}