diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-03-12 10:30:56 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-03-12 10:30:56 -0700 |
commit | 5e1226c161ac4dd114fa5071baa943f72b79741c (patch) | |
tree | f9e9faa76092c0e676f0261b338696e4fc97244b /match.c | |
parent | 0ceb62ad1eddfdc0ade20005829c845afec67d81 (diff) | |
download | txr-5e1226c161ac4dd114fa5071baa943f72b79741c.tar.gz txr-5e1226c161ac4dd114fa5071baa943f72b79741c.tar.bz2 txr-5e1226c161ac4dd114fa5071baa943f72b79741c.zip |
match-fun: make last two args optional.
* eval.c (eval_init): Update registration of match-fun.
* match.c (match_fun): Do defaulting on third and fourth arg.
* txr.1: Documenation updated.
Diffstat (limited to 'match.c')
-rw-r--r-- | match.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -4557,10 +4557,12 @@ val match_filter(val name, val arg, val other_args) } } -val match_fun(val name, val args, val input, val files) +val match_fun(val name, val args, val input_in, val files_in) { val call = cons(name, args); val spec = cons(cons(call, nil), nil); + val input = default_bool_arg(input_in); + val files = default_bool_arg(files_in); val in_bindings = cdr(uw_get_match_context()); val data = if3(streamp(input), lazy_stream_cons(input), |