diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-04-08 19:23:58 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-04-08 19:23:58 -0700 |
commit | 1928aa26ceab8601049565a9064d68ff76dc25c3 (patch) | |
tree | 6608c1d80a0910f7cebfcd1e8838783d79ccb4c7 /eval.c | |
parent | d6d824b58bf2257a6cc50354a083699b7d739e19 (diff) | |
download | txr-1928aa26ceab8601049565a9064d68ff76dc25c3.tar.gz txr-1928aa26ceab8601049565a9064d68ff76dc25c3.tar.bz2 txr-1928aa26ceab8601049565a9064d68ff76dc25c3.zip |
* 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.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2405,6 +2405,9 @@ void eval_init(void) reg_fun(intern(lit("url-encode"), user_package), func_n2o(url_encode, 1)); reg_fun(intern(lit("url-decode"), user_package), func_n2o(url_decode, 1)); + reg_fun(intern(lit("time"), user_package), func_n0(time_sec)); + reg_fun(intern(lit("time-usec"), user_package), func_n0(time_sec_usec)); + eval_error_s = intern(lit("eval-error"), user_package); uw_register_subtype(eval_error_s, error_s); } |