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 | 643c7cb95cfb9337a1cd93e3619150f5442d1130 (patch) | |
tree | b25b315e053226d9450d660fd8a6dfbdf9e60008 /txr.c | |
parent | 33c4ea998b7b40245a80571c0370896d7782e7ce (diff) | |
download | txr-643c7cb95cfb9337a1cd93e3619150f5442d1130.tar.gz txr-643c7cb95cfb9337a1cd93e3619150f5442d1130.tar.bz2 txr-643c7cb95cfb9337a1cd93e3619150f5442d1130.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.
Diffstat (limited to 'txr.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': |