diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-06-10 19:32:02 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-06-10 19:32:02 -0700 |
commit | fbf525ae910ae48b1e6401fd2307772e214b1baa (patch) | |
tree | 01375a1d08b4fb2cc5cbe526998bec9ed35eced9 /txr.c | |
parent | 421b7c3aec0b60d126cdec79f2647c901323389f (diff) | |
download | txr-fbf525ae910ae48b1e6401fd2307772e214b1baa.tar.gz txr-fbf525ae910ae48b1e6401fd2307772e214b1baa.tar.bz2 txr-fbf525ae910ae48b1e6401fd2307772e214b1baa.zip |
Preparing for lisp loading.
* parser.c (open_txr_file): Rewritten to take new argument
which indicates whether to treat an unsuffixed file as
TXR or TXR Lisp, and is updated to indicate which is the
case by looking at the suffix.
* parser.h (open_txr_file): Declaration updated.
* match.c (v_load): Follow change in open_txr_file.
* txr.c (txr_main): Likewise.
Diffstat (limited to 'txr.c')
-rw-r--r-- | txr.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -371,6 +371,7 @@ int txr_main(int argc, char **argv) int match_loglevel = opt_loglevel; val arg_undo = nil, arg; val parse_stream = std_input; + val txr_lisp_p = nil; list_collect_decl(arg_list, arg_tail); setvbuf(stderr, 0, _IOLBF, 0); @@ -631,7 +632,7 @@ int txr_main(int argc, char **argv) arg_list = arg_undo; } else if (spec_file) { if (wcscmp(c_str(spec_file), L"-") != 0) { - open_txr_file(spec_file, &spec_file_str, &parse_stream); + open_txr_file(spec_file, &txr_lisp_p, &spec_file_str, &parse_stream); } else { spec_file_str = lit("stdin"); } @@ -646,7 +647,7 @@ int txr_main(int argc, char **argv) } if (!equal(arg, lit("-"))) { - open_txr_file(arg, &spec_file_str, &parse_stream); + open_txr_file(arg, &txr_lisp_p, &spec_file_str, &parse_stream); } else { spec_file_str = lit("stdin"); } |