From c9e0e299e93a5c4f9caf9df31aed18038650a7be Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 15 Oct 2015 23:02:13 -0700 Subject: Adding find-frame function. * unwind.c (uw_find_frame): New function. (uw_late_init): Registered find-frame intrinsic. * unwind.h (uw_find_frame): Declared. * lib.h (default_arg_strict): New inline function. Will not replace nil value with default. * txr.1: Documented find-frame. --- lib.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib.h') diff --git a/lib.h b/lib.h index e48904a4..aaa87fcb 100644 --- a/lib.h +++ b/lib.h @@ -968,6 +968,11 @@ INLINE val default_bool_arg(val arg) return if3(missingp(arg), nil, arg); } +INLINE val default_arg_strict(val arg, val dfl) +{ + return if3(missingp(arg), dfl, arg); +} + #define list_collect_decl(OUT, PTAIL) \ val OUT = nil; \ loc PTAIL = mkcloc(OUT) -- cgit v1.2.3