summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-08-31 08:35:23 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-08-31 08:35:23 -0700
commit4f5154e6e22f133edf3a43b61eb44e789c425c45 (patch)
treec47eeada15d9c8ebe7af6f811bfe5ed11a1dc57a /eval.c
parent7660334154c96f46c4051403fce18f3828e852ed (diff)
downloadtxr-4f5154e6e22f133edf3a43b61eb44e789c425c45.tar.gz
txr-4f5154e6e22f133edf3a43b61eb44e789c425c45.tar.bz2
txr-4f5154e6e22f133edf3a43b61eb44e789c425c45.zip
Time structure.
* eval.c (eval_init): Register time-struct-local and time-struct-utc intrinsic funtions. * lib.c (time_s, year_s, month_s, day_s, hour_s, min_s, sec_s): New global symbol variables. (broken_time_struct, time_init): New static functions. (time_struct_local, time_struct_utc): New functions. (init): Call time_init. * lib.h (time_struct_local, time_struct_utc): Declared.
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index d5345c78..eddc3809 100644
--- a/eval.c
+++ b/eval.c
@@ -4614,6 +4614,8 @@ void eval_init(void)
reg_fun(intern(lit("time-string-utc"), user_package), func_n2(time_string_utc));
reg_fun(intern(lit("time-fields-local"), user_package), func_n1(time_fields_local));
reg_fun(intern(lit("time-fields-utc"), user_package), func_n1(time_fields_utc));
+ reg_fun(intern(lit("time-struct-local"), user_package), func_n1(time_struct_local));
+ reg_fun(intern(lit("time-struct-utc"), user_package), func_n1(time_struct_utc));
reg_fun(intern(lit("make-time"), user_package), func_n7(make_time));
reg_fun(intern(lit("make-time-utc"), user_package), func_n7(make_time_utc));