diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2009-11-13 09:33:27 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2009-11-13 09:33:27 -0800 |
commit | 95e59dd555a038fd6eb70bc38e4e921d811b1f49 (patch) | |
tree | f3dc2ec7704ff24903618ed4ca5b09e5a1c2e5e8 /parser.l | |
parent | 673d5f3b84d276fb29233d6a3f485ccfe330be13 (diff) | |
download | txr-95e59dd555a038fd6eb70bc38e4e921d811b1f49.tar.gz txr-95e59dd555a038fd6eb70bc38e4e921d811b1f49.tar.bz2 txr-95e59dd555a038fd6eb70bc38e4e921d811b1f49.zip |
Previous commit broke UTF-8 lexing, by changing the get_char
semantics on the input stream to wide character input.
Also, reading a query the command line (-c) must
read bytes from a UTF-8 encoding of the string.
We introduce a new get_byte function which can extract bytes
from streams which provide it.
Diffstat (limited to 'parser.l')
-rw-r--r-- | parser.l | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -48,8 +48,8 @@ obj_t *c = nil; \ int n, ch = '*'; \ for (n = 0; n < max_size && \ - (c = get_char(yyin_stream)) && \ - (ch = c_chr(c)) != '\n'; ++n) \ + (c = get_byte(yyin_stream)) && \ + (ch = c_num(c)) != '\n'; ++n) \ buf[n] = (char) ch; \ if (ch == '\n') \ buf[n++] = (char) ch; \ |