Mon Jan 24 19:37:35 2011 UTC ()
Redo Vt macro fixes (from r1.35) which were lost.


(njoly)
diff -r1.37 -r1.38 src/lib/libc/time/ctime.3

cvs diff -r1.37 -r1.38 src/lib/libc/time/ctime.3 (expand / switch to unified diff)

--- src/lib/libc/time/ctime.3 2010/12/17 01:30:50 1.37
+++ src/lib/libc/time/ctime.3 2011/01/24 19:37:35 1.38
@@ -1,40 +1,40 @@ @@ -1,40 +1,40 @@
1.\" $NetBSD: ctime.3,v 1.37 2010/12/17 01:30:50 wiz Exp $ 1.\" $NetBSD: ctime.3,v 1.38 2011/01/24 19:37:35 njoly Exp $
2.Dd December 14, 2010 2.Dd December 14, 2010
3.Dt CTIME 3 3.Dt CTIME 3
4.Os 4.Os
5.Sh NAME 5.Sh NAME
6.Nm asctime , 6.Nm asctime ,
7.Nm asctime_r , 7.Nm asctime_r ,
8.Nm ctime , 8.Nm ctime ,
9.Nm ctime_r , 9.Nm ctime_r ,
10.Nm ctime_rz , 10.Nm ctime_rz ,
11.Nm difftime , 11.Nm difftime ,
12.Nm gmtime , 12.Nm gmtime ,
13.Nm gmtime_r , 13.Nm gmtime_r ,
14.Nm localtime , 14.Nm localtime ,
15.Nm localtime_r , 15.Nm localtime_r ,
16.Nm localtime_rz , 16.Nm localtime_rz ,
17.Nm mktime , 17.Nm mktime ,
18.Nm mktime_z , 18.Nm mktime_z ,
19.Nm tzalloc , 19.Nm tzalloc ,
20.Nm tzgetname , 20.Nm tzgetname ,
21.Nm tzfree , 21.Nm tzfree ,
22.Nd convert date and time to ASCII 22.Nd convert date and time to ASCII
23.Sh LIBRARY 23.Sh LIBRARY
24.Lb libc 24.Lb libc
25.Sh SYNOPSIS 25.Sh SYNOPSIS
26.In time.h 26.In time.h
27.Dv extern char *tzname[2]; 27.Vt extern char *tzname[2];
28.Ft char * 28.Ft char *
29.Fn ctime "const time_t *clock" 29.Fn ctime "const time_t *clock"
30.Ft char * 30.Ft char *
31.Fn ctime_r "const time_t *clock" "char *buf" 31.Fn ctime_r "const time_t *clock" "char *buf"
32.Ft char * 32.Ft char *
33.Fn ctime_rz "const timezone_t tz" "const time_t *clock" "char *buf" 33.Fn ctime_rz "const timezone_t tz" "const time_t *clock" "char *buf"
34.Ft double 34.Ft double
35.Fn difftime "time_t time1" "time_t time0" 35.Fn difftime "time_t time1" "time_t time0"
36.Ft char * 36.Ft char *
37.Fn asctime "const struct tm *tm" 37.Fn asctime "const struct tm *tm"
38.Ft char * 38.Ft char *
39.Fn asctime_r "const struct tm restrict tm" "char * restrict buf" 39.Fn asctime_r "const struct tm restrict tm" "char * restrict buf"
40.Ft struct tm * 40.Ft struct tm *
@@ -50,27 +50,27 @@ @@ -50,27 +50,27 @@
50.Ft time_t 50.Ft time_t
51.Fn mktime "struct tm *tm" 51.Fn mktime "struct tm *tm"
52.Ft time_t 52.Ft time_t
53.Fn mktime_z "const timezone_t tz" "struct tm *tm" 53.Fn mktime_z "const timezone_t tz" "struct tm *tm"
54.Ft timezone_t 54.Ft timezone_t
55.Fn tzalloc "const char *zone" 55.Fn tzalloc "const char *zone"
56.Ft const char * 56.Ft const char *
57.Fn tzgetname "const timezone_t tz" "int isdst" 57.Fn tzgetname "const timezone_t tz" "int isdst"
58.Ft void 58.Ft void
59.Fn tzfree "const timezone_t tz" 59.Fn tzfree "const timezone_t tz"
60.Sh DESCRIPTION 60.Sh DESCRIPTION
61.Fn ctime 61.Fn ctime
62converts a 62converts a
63.Tp time_t , 63.Vt time_t ,
64pointed to by 64pointed to by
65.Fa clock , 65.Fa clock ,
66representing the time in seconds since 66representing the time in seconds since
6700:00:00 UTC, 1970-01-01, 6700:00:00 UTC, 1970-01-01,
68and returns a pointer to a 68and returns a pointer to a
69string of the form 69string of the form
70.D1 Thu Nov 24 18:22:48 1986\en\e0 70.D1 Thu Nov 24 18:22:48 1986\en\e0
71Years requiring fewer than four characters are padded with leading zeroes. 71Years requiring fewer than four characters are padded with leading zeroes.
72For years longer than four characters, the string is of the form 72For years longer than four characters, the string is of the form
73.D1 Thu Nov 24 18:22:48 81986\en\e0 73.D1 Thu Nov 24 18:22:48 81986\en\e0
74with five spaces before the year. 74with five spaces before the year.
75These unusual formats are designed to make it less likely that older 75These unusual formats are designed to make it less likely that older
76software that expects exactly 26 bytes of output will mistakenly output 76software that expects exactly 26 bytes of output will mistakenly output
@@ -323,27 +323,27 @@ and @@ -323,27 +323,27 @@ and
323.Fn localtime_rz , 323.Fn localtime_rz ,
324functions return a pointer to the user-supplied 324functions return a pointer to the user-supplied
325.Va "struct tm" . 325.Va "struct tm" .
326On failure they all return 326On failure they all return
327.Dv NULL 327.Dv NULL
328and the global variable 328and the global variable
329.Va errno 329.Va errno
330is set to indicate the error. 330is set to indicate the error.
331The 331The
332.Fn mktime 332.Fn mktime
333and 333and
334.Fn mktime_z 334.Fn mktime_z
335function returns the specified time since the Epoch as a 335function returns the specified time since the Epoch as a
336.Va time_t 336.Vt time_t
337type value. 337type value.
338If the time cannot be represented, then 338If the time cannot be represented, then
339.Fn mktime 339.Fn mktime
340and 340and
341.Fn mktime_z 341.Fn mktime_z
342return 342return
343.Va "(time_t)-1" 343.Va "(time_t)-1"
344setting the global variable 344setting the global variable
345.Va errno 345.Va errno
346to indicate the error. 346to indicate the error.
347The 347The
348.Fn tzalloc 348.Fn tzalloc
349function returns a pointer to a 349function returns a pointer to a