0
|
1 /* tws.h */
|
12
|
2 /* @(#)$Id: tws.h,v 1.1.1.1 2005/04/18 14:46:07 kono Exp $ */
|
0
|
3
|
|
4 #ifdef _AIX
|
|
5 #include <sys/time.h>
|
|
6 #include <time.h>
|
|
7 #else
|
|
8 #ifdef BSD42
|
|
9 #include <sys/time.h>
|
|
10 #else /* BSD42 */
|
|
11 #include <time.h>
|
|
12 #endif /* BSD42 */
|
|
13 #endif
|
|
14
|
|
15 #define DSTXXX
|
|
16 /* DST vs. GMT nonsense */
|
|
17
|
|
18 struct tws {
|
|
19 int tw_sec;
|
|
20 int tw_min;
|
|
21 int tw_hour;
|
|
22
|
|
23 int tw_mday;
|
|
24 int tw_mon;
|
|
25 int tw_year;
|
|
26
|
|
27 int tw_wday;
|
|
28 int tw_yday;
|
|
29
|
|
30 int tw_zone;
|
|
31
|
|
32 time_t tw_clock;
|
|
33
|
|
34 int tw_flags;
|
|
35 #define TW_NULL 0x0000
|
|
36 #define TW_SDAY 0x0003 /* how day-of-week was determined */
|
|
37 #define TW_SNIL 0x0000 /* not given */
|
|
38 #define TW_SEXP 0x0001 /* explicitly given */
|
|
39 #define TW_SIMP 0x0002 /* implicitly given */
|
|
40 #define TW_SZONE 0x0004 /* how timezone was determined */
|
|
41 #define TW_SZNIL 0x0000 /* not given */
|
|
42 #define TW_SZEXP 0x0004 /* explicitly given */
|
|
43 #define TW_DST 0x0010 /* daylight savings time */
|
|
44 #define TW_ZONE 0x0020 /* use numeric timezones only */
|
|
45 };
|
|
46
|
|
47 void twscopy ();
|
|
48 int twsort ();
|
|
49 time_t twclock ();
|
|
50 char *dasctime (), *dtimezone (), *dctime (), *dtimenow ();
|
|
51 struct tws *dgmtime(), *dlocaltime (), *dparsetime (), *dtwstime ();
|
|
52
|
|
53 #ifndef ATZ
|
|
54 #define dtime(cl) dasctime (dlocaltime (cl), TW_ZONE)
|
|
55 #else
|
|
56 #define dtime(cl) dasctime (dlocaltime (cl), TW_NULL)
|
|
57 #endif
|
|
58 #define dtwszone(tw) dtimezone (tw -> tw_zone, tw -> tw_flags)
|
|
59
|
|
60
|
|
61 extern char *tw_dotw[], *tw_ldotw[], *tw_moty[];
|