summaryrefslogtreecommitdiffstats
path: root/match.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2011-12-18 23:13:47 -0800
committerKaz Kylheku <kaz@kylheku.com>2011-12-18 23:13:47 -0800
commit61a8fde2872355b4e721f1c5145c77122c92c40e (patch)
tree3eb13f0f241b2ebd565cd2ba716d207c63451083 /match.c
parent595e55ff7fd02106e7e04bd0db3c2737643fedbd (diff)
downloadtxr-61a8fde2872355b4e721f1c5145c77122c92c40e.tar.gz
txr-61a8fde2872355b4e721f1c5145c77122c92c40e.tar.bz2
txr-61a8fde2872355b4e721f1c5145c77122c92c40e.zip
* eval.c (bindings_helper): Fix format arguments.
(eval_init): Registered new functions: symbol-function, func-get-form, func-get-env, functionp, interp-fun-p. * lib.c (nappend2, getplist_f, improper_plist_to_alist): tail variable renamed to avoid clash in macro. (func_get_form, func_get_env, interp_fun_p): New functions. * lib.h (func_get_form, func_get_env, interp_fun_p): Declared. (list_collect): Fix macro not to throw error, but handle the case. * match.c (vars_to_bindings, extract_bindings): tail variable renamed to avoid clash in macro. * txr.1: Documentation stubs.
Diffstat (limited to 'match.c')
-rw-r--r--match.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/match.c b/match.c
index e8cdf22a..c8367f22 100644
--- a/match.c
+++ b/match.c
@@ -317,7 +317,7 @@ static val txeval(val spec, val form, val bindings);
static val vars_to_bindings(val spec, val vars, val bindings)
{
val iter;
- list_collect_decl (fixed_vars, tail);
+ list_collect_decl (fixed_vars, ptail);
if (vars && !consp(vars))
sem_error(spec, lit("not a valid variable list: ~a"), vars, nao);
@@ -325,10 +325,10 @@ static val vars_to_bindings(val spec, val vars, val bindings)
for (iter = vars; iter; iter = cdr(iter)) {
val item = car(iter);
if (bindable(item)) {
- list_collect (tail, cons(item, noval_s));
+ list_collect (ptail, cons(item, noval_s));
} else if (consp(item) && bindable(first(item))) {
- list_collect (tail, cons(first(item),
- txeval(spec, second(item), bindings)));
+ list_collect (ptail, cons(first(item),
+ txeval(spec, second(item), bindings)));
} else {
sem_error(spec, lit("not a variable spec: ~a"), item, nao);
}
@@ -1498,12 +1498,12 @@ static val extract_vars(val output_spec)
static val extract_bindings(val bindings, val output_spec)
{
- list_collect_decl (bindings_out, tail);
+ list_collect_decl (bindings_out, ptail);
val var_list = extract_vars(output_spec);
for (; bindings; bindings = cdr(bindings))
if (memq(car(car(bindings)), var_list))
- list_collect(tail, car(bindings));
+ list_collect(ptail, car(bindings));
return bindings_out;
}