From 1928aa26ceab8601049565a9064d68ff76dc25c3 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 8 Apr 2012 19:23:58 -0700 Subject: * arith.c (bignum): Previously static function now exposed as external. * arith.h (bignum): Declared. * configure: Added check for tm_gmtoff and tm_tmzone fields being present in struct tm. * eval.c (eval_init): New intrinsic functions: time, time-usec. * lib.c (num): If the cnum is outside of the fixnum range, then construct a bignum. (time_sec, time_sec_usec): New functions. * lib.h (mut): Slight change to macro to eliminate compiler warning. (time_sec, time_sec_usec): Declared. * txr.1: Stub section for time and time-usec. * txr.vim: Highlighting for time and time-usec. --- lib.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib.h') diff --git a/lib.h b/lib.h index 672f2fcf..18530770 100644 --- a/lib.h +++ b/lib.h @@ -235,7 +235,7 @@ val gc_set(val *, val); #define mpush(val, place) (gc_push(val, &(place))) #else #define set(place, val) ((place) = (val)) -#define mut(obj) (obj) +#define mut(obj) ((void) (obj)) #define mpush(val, place) (push(val, &(place))) #endif @@ -640,6 +640,8 @@ val obj_print(val obj, val stream); val obj_pprint(val obj, val stream); val tostring(val obj); val tostringp(val obj); +val time_sec(void); +val time_sec_usec(void); void init(const wchar_t *progname, mem_t *(*oom_realloc)(mem_t *, size_t), val *stack_bottom); -- cgit v1.2.3