This just passes any bytes with the high bit set through the system so
programs can include UTF-8 in strings and symbols. What the heck.
Signed-off-by: Keith Packard <keithp@keithp.com>
c = 0;
lex_class = ENDOFFILE;
} else {
- c &= 0x7f;
- lex_class = lex_classes[c];
+ lex_class = PRINTABLE;
+ if (c <= 0x7f)
+ lex_class = lex_classes[c];
}
} while (lex_class & IGNORE);
return c;
{
struct ao_scheme_string *s;
+ if (len < 0)
+ return NULL;
s = ao_scheme_alloc(len + 2);
if (!s)
return NULL;
fputs("\\\\", out);
break;
default:
- if (c < ' ')
- fprintf(out, "\\%03o", c);
+ if ((uint8_t) c < ' ')
+ fprintf(out, "\\%03o", (uint8_t) c);
else
putc(c, out);
break;