summaryrefslogtreecommitdiffstats
path: root/txr.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2009-11-13 09:33:27 -0800
committerKaz Kylheku <kaz@kylheku.com>2009-11-13 09:33:27 -0800
commit95e59dd555a038fd6eb70bc38e4e921d811b1f49 (patch)
treef3dc2ec7704ff24903618ed4ca5b09e5a1c2e5e8 /txr.c
parent673d5f3b84d276fb29233d6a3f485ccfe330be13 (diff)
downloadtxr-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 'txr.c')
-rw-r--r--txr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/txr.c b/txr.c
index 9cdb03d5..58bfffb3 100644
--- a/txr.c
+++ b/txr.c
@@ -307,7 +307,7 @@ static int txr_main(int argc, char **argv)
if (specstring) {
spec_file = L"cmdline";
spec_file_str = string(spec_file);
- yyin_stream = make_string_input_stream(specstring);
+ yyin_stream = make_string_byte_input_stream(specstring);
} else if (spec_file_str) {
if (wcscmp(c_str(spec_file_str), L"-") != 0) {
FILE *in = w_fopen(c_str(spec_file_str), L"r");