I think I’m onto something here… getsc_{uu,bn} never return -1 AFAICT

This commit is contained in:
tg
2018-01-14 00:57:55 +00:00
parent 7716e825ab
commit d7b77a76df

6
lex.c
View File

@@ -23,7 +23,7 @@
#include "sh.h" #include "sh.h"
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.244 2018/01/14 00:51:35 tg Exp $"); __RCSID("$MirOS: src/bin/mksh/lex.c,v 1.245 2018/01/14 00:57:55 tg Exp $");
/* /*
* states while lexing word * states while lexing word
@@ -131,7 +131,7 @@ getsc_i(void)
} }
#if defined(MKSH_SMALL) && !defined(MKSH_SMALL_BUT_FAST) #if defined(MKSH_SMALL) && !defined(MKSH_SMALL_BUT_FAST)
#define getsc() ord(getsc_i()) #define getsc() ((unsigned int)(unsigned char)(getsc_i()))
#else #else
static int getsc_r(int); static int getsc_r(int);
@@ -141,7 +141,7 @@ getsc_r(int c)
o_getsc_r(c); o_getsc_r(c);
} }
#define getsc() ord(getsc_r(o_getsc())) #define getsc() ((unsigned int)(unsigned char)(getsc_r(o_getsc())))
#endif #endif
#define STATE_BSIZE 8 #define STATE_BSIZE 8