From 3edbbe6a00d49c3bd63f2aeff1d180c0a85e438f Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Fri, 8 Jan 2010 17:16:56 +0000 Subject: [PATCH] Try to fixup the mess of mdoc(7)/man(7) mixture as created by the merge. --- lib/libc/time/ctime.3 | 40 +++++++++++++++------------------------- 1 file changed, 15 insertions(+), 25 deletions(-) diff --git a/lib/libc/time/ctime.3 b/lib/libc/time/ctime.3 index fdd8a2723c8..8c32e87cdcc 100644 --- a/lib/libc/time/ctime.3 +++ b/lib/libc/time/ctime.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: ctime.3,v 1.27 2003/04/16 13:34:58 wiz Exp $ +.\" $NetBSD: ctime.3,v 1.28 2009/12/31 22:49:16 mlelstv 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 @@ structure, After filling in the .Va tm structure, -.I localtime +.Fn localtime sets the .Fa tm_isdst Ns 'th element of @@ -117,8 +107,8 @@ converts a time value contained in a ``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 @@ field of a returned 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 @@ tradition and with this implementation. 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. -- 2.11.4.GIT