c = stream->buffer[0];
- if(c < 0 && c != EOF)
+ if((unsigned char)c >= 0x80 && c != (char)EOF)
{
/* multi-byte UTF-8 sequence */
int i, count;
c = lex_get_save(lex, error);
while(c != '"') {
- if(c == EOF) {
+ if(c == (char)EOF) {
lex_unget_unsave(lex, c);
if(lex_eof(lex))
error_set(error, lex, "premature end of input");
goto out;
}
- else if(0 <= c && c <= 0x1F) {
+ else if((unsigned char)c <= 0x1F) {
/* control character */
lex_unget_unsave(lex, c);
if(c == '\n')
c = lex_get(lex, error);
}
- if(c == EOF) {
+ if(c == (char)EOF) {
if(lex_eof(lex))
lex->token = TOKEN_EOF;
else