clean up comment handling some more, keep shells straight
[unix-history] / usr / src / lib / libc / gen / ctime.3
index c485cd9..66d14ce 100644 (file)
@@ -2,9 +2,9 @@
 .\" All rights reserved.  The Berkeley software License Agreement
 .\" specifies the terms and conditions for redistribution.
 .\"
 .\" All rights reserved.  The Berkeley software License Agreement
 .\" specifies the terms and conditions for redistribution.
 .\"
-.\"    @(#)ctime.3     5.1 (Berkeley) %G%
+.\"    @(#)ctime.3     6.4 (Berkeley) %G%
 .\"
 .\"
-.TH CTIME 3  "26 June 1983"
+.TH CTIME 3  ""
 .UC 4
 .SH NAME
 ctime, localtime, gmtime, asctime, timezone \-  convert date and time to ASCII
 .UC 4
 .SH NAME
 ctime, localtime, gmtime, asctime, timezone \-  convert date and time to ASCII
@@ -13,7 +13,7 @@ ctime, localtime, gmtime, asctime, timezone \-  convert date and time to ASCII
 .B char *ctime(clock)
 .B long *clock;
 .PP
 .B char *ctime(clock)
 .B long *clock;
 .PP
-.B #include <sys/time.h>
+.B #include <time.h>
 .PP
 .B struct tm *localtime(clock)
 .B long *clock;
 .PP
 .B struct tm *localtime(clock)
 .B long *clock;
@@ -57,25 +57,22 @@ The structure declaration from the include file is:
 .PP
 .RS
 .nf
 .PP
 .RS
 .nf
+.nr .0 .8i+\w'int tm_isdst'u
+.ta .5i \n(.0u \n(.0u+\w'/* 0-000'u+1n
 struct tm {
 struct tm {
-       int     tm_sec;
-       int     tm_min;
-       int     tm_hour;
-       int     tm_mday;
-       int     tm_mon;
-       int     tm_year;
-       int     tm_wday;
-       int     tm_yday;
-       int     tm_isdst;
+       int tm_sec;     /* 0-59 seconds */
+       int tm_min;     /* 0-59 minutes */
+       int tm_hour;    /* 0-23 hour */
+       int tm_mday;    /* 1-31 day of month */
+       int tm_mon;     /* 0-11 month */
+       int tm_year;    /* 0-   year \- 1900 */
+       int tm_wday;    /* 0-6  day of week (Sunday = 0) */
+       int tm_yday;    /* 0-365        day of year */
+       int tm_isdst;   /* flag:        daylight savings time in effect */
 };
 .fi
 .RE
 .PP
 };
 .fi
 .RE
 .PP
-These quantities give the time on a 24-hour clock,
-day of month (1-31), month of year (0-11), day of week
-(Sunday = 0), year \- 1900, day of year (0-365),
-and a flag that is nonzero if daylight saving time is in effect.
-.PP
 When local time is called for,
 the program consults the system to determine the time zone and
 whether the U.S.A., Australian, Eastern European, Middle European,
 When local time is called for,
 the program consults the system to determine the time zone and
 whether the U.S.A., Australian, Eastern European, Middle European,
@@ -91,7 +88,7 @@ If the second argument is 0, the standard name is used,
 otherwise the Daylight Saving version.
 If the required name does not appear in a table
 built into the routine,
 otherwise the Daylight Saving version.
 If the required name does not appear in a table
 built into the routine,
-the difference from GMT is produced; e.g.
+the difference from GMT is produced; e.g.,
 in Afghanistan
 .I timezone(-(60*4+30), 0)
 is appropriate because it is 4:30 ahead of GMT
 in Afghanistan
 .I timezone(-(60*4+30), 0)
 is appropriate because it is 4:30 ahead of GMT