Module Name: src
Committed By: joerg
Date: Fri Jan 8 17:16:56 UTC 2010
Modified Files:
src/lib/libc/time: ctime.3
Log Message:
Try to fixup the mess of mdoc(7)/man(7) mixture as created by the merge.
To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/lib/libc/time/ctime.3
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/time/ctime.3
diff -u src/lib/libc/time/ctime.3:1.28 src/lib/libc/time/ctime.3:1.29
--- src/lib/libc/time/ctime.3:1.28 Thu Dec 31 22:49:16 2009
+++ src/lib/libc/time/ctime.3 Fri Jan 8 17:16:56 2010
@@ -1,4 +1,4 @@
-.\" $NetBSD: ctime.3,v 1.28 2009/12/31 22:49:16 mlelstv Exp $
+.\" $NetBSD: ctime.3,v 1.29 2010/01/08 17:16:56 joerg Exp $
.Dd March 31, 2001
.Dt CTIME 3
.Os
@@ -42,31 +42,21 @@
.Sh DESCRIPTION
.Fn ctime
converts a long integer, pointed to by
-.IR clock ,
+.Fa clock ,
representing the time in seconds since
00:00:00 UTC, 1970-01-01,
and returns a pointer to a
string of the form
-.br
-.ce
-.eo
-Thu Nov 24 18:22:48 1986\n\0
-.br
-.ec
+.D1 Thu Nov 24 18:22:48 1986\en\e0
Years requiring fewer than four characters are padded with leading zeroes.
For years longer than four characters, the string is of the form
-.br
-.ce
-.eo
-Thu Nov 24 18:22:48 81986\n\0
-.ec
-.br
+.D1 Thu Nov 24 18:22:48 81986\en\e0
with five spaces before the year.
These unusual formats are designed to make it less likely that older
software that expects exactly 26 bytes of output will mistakenly output
misleading values for out-of-range years.
-.PP
-.I Localtime\^
+.Pp
+.Fn Localtime
and
.Fn gmtime
return pointers to
@@ -83,7 +73,7 @@
After filling in the
.Va tm
structure,
-.I localtime
+.Fn localtime
sets the
.Fa tm_isdst Ns 'th
element of
@@ -117,8 +107,8 @@
``tm'' structure to a string,
as shown in the above example,
and returns a pointer to the string.
-.PP
-.I Mktime\^
+.Pp
+.Fn mktime
converts the broken-down time,
expressed as local time,
in the structure pointed to by
@@ -256,11 +246,11 @@
points to a static array of characters, which
will also be overwritten at the next call
(and by calls to
-.Xr tzset 3 ).
-.PP
-.I Asctime\^
+.Xr tzset 3 ) .
+.Pp
+.Fn asctime
and
-.I ctime\^
+.Fn ctime
behave strangely for years before 1000 or after 9999.
The 1989 and 1999 editions of the C Standard say
that years from \-99 through 999 are converted without
@@ -269,9 +259,9 @@
Traditional implementations of these two functions are
restricted to years in the range 1900 through 2099.
To avoid this portability mess, new programs should use
-.I strftime\^
+.Fn strftime
instead.
-.PP
+.Pp
Avoid using out-of-range values with
.Fn mktime
when setting up lunch with promptness sticklers in Riyadh.