diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-11-05 16:38:15 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-11-05 16:38:15 -0800 |
commit | b84399720acfc8b34092ad29dd0301a336d7017e (patch) | |
tree | 9418d75a6721e37d5612353faa63dc35873fdec7 | |
parent | 58d0323c8e957722b99f8c1f998353439dace1a3 (diff) | |
download | txr-b84399720acfc8b34092ad29dd0301a336d7017e.tar.gz txr-b84399720acfc8b34092ad29dd0301a336d7017e.tar.bz2 txr-b84399720acfc8b34092ad29dd0301a336d7017e.zip |
load: tolerate hash bang files.
* eval.c (load): Consume the first line of the input file if
it starts with hash bang.
-rw-r--r-- | eval.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -4241,6 +4241,9 @@ val load(val target) open_txr_file(path, &txr_lisp_p, &name, &stream); + if (!match_str(or2(get_line(stream), lit("")), lit("#!"), nil)) + seek_stream(stream, zero, from_start_k); + uw_simple_catch_begin; dyn_env = make_env(nil, nil, dyn_env); |