diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-08-31 08:35:23 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-08-31 08:35:23 -0700 |
commit | 4f5154e6e22f133edf3a43b61eb44e789c425c45 (patch) | |
tree | c47eeada15d9c8ebe7af6f811bfe5ed11a1dc57a /eval.c | |
parent | 7660334154c96f46c4051403fce18f3828e852ed (diff) | |
download | txr-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.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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)); |