From 1f3d894dab47e0d2527adf7db0b74296f19f7b81 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 19 Nov 2011 12:05:39 -0800 Subject: deffilter grows in power: it can take quasistrings. * lib.c (cdr_f): New global variable. (funcall1, funcall2, funcall3, funcall4): Fix unterminated arguments in uw_throwf call by using uw_throw instead. (do_or): New static function. (orf): New function. (obj_init): gc_protect and initialize cdr_f. * lib.h (cdr_f, orf): Declared. * match.c (v_deffilter): Treat the table as forms to be evaluated which must reduce to strings, rather than literal strings. * txr.1: Documented. --- lib.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib.h') diff --git a/lib.h b/lib.h index 5700a35c..4ad5e7a0 100644 --- a/lib.h +++ b/lib.h @@ -261,7 +261,7 @@ extern val nothrow_k, args_k; extern val null_string; extern val null_list; /* (nil) */ -extern val identity_f, equal_f, eq_f, car_f; +extern val identity_f, equal_f, eq_f, car_f, cdr_f; extern const wchar_t *progname; extern val prog_string; @@ -399,6 +399,7 @@ val curry_123_23(val fun3, val arg1); val curry_1234_34(val fun3, val arg1, val arg2); val chain(val first_fun, ...); val andf(val first_fun, ...); +val orf(val first_fun, ...); val swap_12_21(val fun); val vector(val alloc); val vec_get_fill(val vec); -- cgit v1.2.3