summaryrefslogtreecommitdiff
path: root/src/time/ctime_s.c
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2020-08-16 15:55:19 -0400
committerJakob Kaivo <jkk@ung.org>2020-08-16 15:55:19 -0400
commite223e635cc53fa11e473cdbc864eb69a3da5f290 (patch)
treed481ca6fb0b7f4184f3ec259a6f9c37d76e56a26 /src/time/ctime_s.c
parent700fbd205a1a428677876d322606b9a354221892 (diff)
add skeleton of symbols from C11 LIB_EXT1
Diffstat (limited to 'src/time/ctime_s.c')
-rw-r--r--src/time/ctime_s.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/time/ctime_s.c b/src/time/ctime_s.c
new file mode 100644
index 00000000..8813247c
--- /dev/null
+++ b/src/time/ctime_s.c
@@ -0,0 +1,24 @@
+#include "time.h"
+
+/** convert arithmetic time to string **/
+errno_t ctime_s(char *s, rsize_t maxsize, const time_t *timer)
+{
+ __C_EXT(1, 201112L);
+ return asctime(localtime(timer));
+}
+
+/***
+The fn(ctime) converts the time at arg(timer) to a string in the same format as
+fn(asctime).
+***/
+
+/* UNSPECIFIED: - */
+/* UNDEFINED: - */
+/* IMPLEMENTATION: - */
+/* LOCALE: - */
+
+/* RETURN: a pointer to the string */
+
+/*
+CEXT1(201112)
+*/