|
|
1.1 root 1: /*
2: * Copyright (c) 1989 The Regents of the University of California.
3: * All rights reserved.
4: *
5: * Redistribution and use in source and binary forms are permitted provided
6: * that: (1) source distributions retain this entire copyright notice and
7: * comment, and (2) distributions including binaries display the following
8: * acknowledgement: ``This product includes software developed by the
9: * University of California, Berkeley and its contributors'' in the
10: * documentation or other materials provided with the distribution and in
11: * all advertising materials mentioning features or use of this software.
12: * Neither the name of the University nor the names of its contributors may
13: * be used to endorse or promote products derived from this software without
14: * specific prior written permission.
15: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
16: * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
17: * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
18: *
19: * @(#)time.h 5.6 (Berkeley) 6/23/90
20: */
21:
22: #include <machine/machtypes.h>
23:
24: #ifndef NULL
25: #define NULL 0
26: #endif
27:
28: #ifdef _CLOCK_T_
29: typedef _CLOCK_T_ clock_t;
30: #undef _CLOCK_T_
31: #endif
32:
33: #ifdef _TIME_T_
34: typedef _TIME_T_ time_t;
35: #undef _TIME_T_
36: #endif
37:
38: #ifdef _SIZE_T_
39: typedef _SIZE_T_ size_t;
40: #undef _SIZE_T_
41: #endif
42:
43: struct tm {
44: int tm_sec; /* seconds after the minute [0-60] */
45: int tm_min; /* minutes after the hour [0-59] */
46: int tm_hour; /* hours since midnight [0-23] */
47: int tm_mday; /* day of the month [1-31] */
48: int tm_mon; /* months since January [0-11] */
49: int tm_year; /* years since 1900 */
50: int tm_wday; /* days since Sunday [0-6] */
51: int tm_yday; /* days since January 1 [0-365] */
52: int tm_isdst; /* Daylight Savings Time flag */
53: long tm_gmtoff; /* offset from CUT in seconds */
54: char *tm_zone; /* timezone abbreviation */
55: };
56:
57: #if __STDC__ || c_plusplus
58: extern struct tm *gmtime(const time_t *);
59: extern struct tm *localtime(const time_t *);
60: extern time_t mktime(const struct tm *);
61: extern time_t time(time_t *);
62: extern double difftime(const time_t, const time_t);
63: extern char *asctime(const struct tm *);
64: extern char *ctime(const time_t *);
65: extern char *timezone(int , int);
66: extern void tzset(void);
67: extern void tzsetwall(void);
68: #else
69: extern struct tm *gmtime();
70: extern struct tm *localtime();
71: extern time_t mktime();
72: extern time_t time();
73: extern double difftime();
74: extern char *asctime();
75: extern char *ctime();
76: extern char *timezone();
77: extern void tzset();
78: extern void tzsetwall();
79: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.