summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorwes <wes@FreeBSD.org>1998-12-20 06:22:06 +0000
committerwes <wes@FreeBSD.org>1998-12-20 06:22:06 +0000
commit08ad2ecd3dd6829b788b75b1046a563ac33674d7 (patch)
tree709f4bc4827a91603c916d52dd065f95675523f2 /lib
parent32d2041e9be5b63c9e2ca577753ac57a0eec199f (diff)
downloadFreeBSD-src-08ad2ecd3dd6829b788b75b1046a563ac33674d7.zip
FreeBSD-src-08ad2ecd3dd6829b788b75b1046a563ac33674d7.tar.gz
Added documenation for the existing implementation of asctime_r,
ctime_r, gmtime_r, and localtime_r.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/stdtime/ctime.335
1 files changed, 35 insertions, 0 deletions
diff --git a/lib/libc/stdtime/ctime.3 b/lib/libc/stdtime/ctime.3
index b14a92c..cf1f65c 100644
--- a/lib/libc/stdtime/ctime.3
+++ b/lib/libc/stdtime/ctime.3
@@ -38,10 +38,14 @@
.Os BSD 4.3
.Sh NAME
.Nm asctime ,
+.Nm asctime_r,
.Nm ctime ,
+.Nm ctime_r ,
.Nm difftime ,
.Nm gmtime ,
+.Nm gmtime_r ,
.Nm localtime ,
+.Nm localtime_r ,
.Nm mktime ,
.Nm timegm
.Nd transform binary date and time values
@@ -62,6 +66,14 @@
.Fn mktime "struct tm *tm"
.Ft time_t
.Fn timegm "struct tm *tm"
+.Ft char *
+.Fn ctime_r "const time_t *clock" "char *buf"
+.Ft struct tm *
+.Fn localtime_r "const time_t *clock" "struct tm *result"
+.Ft struct tm *
+.Fn gmtime_r "const time_t *clock" "struct tm *result"
+.Ft char *
+.Fn asctime_r "const struct tm *tm" "char *buf"
.Sh DESCRIPTION
The functions
.Fn ctime ,
@@ -125,6 +137,22 @@ Thu Nov 24 18:22:48 1986\en\e0
.Pp
All the fields have constant width.
.Pp
+.Fn ctime_r
+provides the same functionality as
+.Fn ctime
+except the caller must provide the output buffer
+.Fa buf
+to store the result, which must be at least 26 bytes long.
+.Fn localtime_r
+and
+.Fn gmtime_r
+provide the same functionality as
+.Fn localtime
+and
+.Fn gmtime
+respectively, except the caller must provide the output buffer
+.Fa result .
+.Pp
The
.Fn asctime
function
@@ -135,6 +163,13 @@ pointed at by
to the form
shown in the example above.
.Pp
+.Fn asctime_r
+provides the same functionality as
+.Fn asctime
+except the caller provide the output buffer
+.Fa buf
+to store the result, which must be at least 26 bytes long.
+.Pp
The function
.Fn mktime
converts the broken-down time, expressed as local time, in the structure
OpenPOWER on IntegriCloud