diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-09-01 06:18:20 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-09-01 06:18:20 -0700 |
commit | 5a2c7bc838fa9f99c5d8e918940d9c0255377620 (patch) | |
tree | b25b315e053226d9450d660fd8a6dfbdf9e60008 | |
parent | 41bb44dd5a7c5ea86d139a0ccb2c91fb4a970bea (diff) | |
download | txr-5a2c7bc838fa9f99c5d8e918940d9c0255377620.tar.gz txr-5a2c7bc838fa9f99c5d8e918940d9c0255377620.tar.bz2 txr-5a2c7bc838fa9f99c5d8e918940d9c0255377620.zip |
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.
-rw-r--r-- | txr.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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': |