From 643c7cb95cfb9337a1cd93e3619150f5442d1130 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 1 Sep 2016 06:18:20 -0700 Subject: Address -c not working with --lisp. * txr.c (txr_main): the --lisp option causes the parse stream to be processed as Lisp, which is fine if it is a file stream. If it is a byte string input stream created by the -c option, it won't work due to missing character operations on the stream, resulting in a strange error message and termination. That issue isn't being fixed here; just providing a more meaningful error message when --lisp is combined with -c. --- txr.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/txr.c b/txr.c index 0be29644..15abb5ed 100644 --- a/txr.c +++ b/txr.c @@ -749,6 +749,12 @@ int txr_main(int argc, char **argv) return EXIT_FAILURE; break; case 'c': + if (txr_lisp_p) { + format(std_error, + lit("~a: -c not compatible with --lisp; use -e\n"), + prog_string, nao); + return EXIT_FAILURE; + } specstring = arg; break; case 'f': -- cgit v1.2.3