summaryrefslogtreecommitdiffstats
path: root/lib.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-04-04 00:08:01 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-04-04 00:08:01 -0700
commit93f0e3d10580b0a8126018d0a05dd46b1aa84bf6 (patch)
treef16479c293e657f411cde1346f37df224fe821f2 /lib.h
parentd2aac0db3dbabc163aad4722025db6051f56d804 (diff)
downloadtxr-93f0e3d10580b0a8126018d0a05dd46b1aa84bf6.tar.gz
txr-93f0e3d10580b0a8126018d0a05dd46b1aa84bf6.tar.bz2
txr-93f0e3d10580b0a8126018d0a05dd46b1aa84bf6.zip
New time-parse-local and time-parse-utc functions.
* eval.c (eval_init): Register intrinsic functions time-parse-local and time-parse-utc. * lib.c (strptime_wrap): New static function. (time_parse): Now implemented as by call to strptime_wrap. (time_parse_local, time_parse_utc): New functions. These get the time_t time from struct tm without constructing the intermediate Lisp structure. * lib.h (time_parse_local, time_parse_utc): Declared. * txr.1: Documented new functions.
Diffstat (limited to 'lib.h')
-rw-r--r--lib.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib.h b/lib.h
index 4d359f60..c9456cca 100644
--- a/lib.h
+++ b/lib.h
@@ -1038,6 +1038,8 @@ val make_time_utc(val year, val month, val day,
val isdst);
#if HAVE_STRPTIME
val time_parse(val format, val string);
+val time_parse_local(val format, val string);
+val time_parse_utc(val format, val string);
#endif
void init(mem_t *(*oom_realloc)(mem_t *, size_t), val *stack_bottom);