]> diplodocus.org Git - nmh/blob - docs/historical/mh-6.8.5/zotnet/tws.h
Always check that mktemp()/mktemp2() succeeds before trying to
[nmh] / docs / historical / mh-6.8.5 / zotnet / tws.h
1 /* tws.h */
2 /* @(#)$Id: tws.h,v 1.4 1992/05/12 22:08:28 jromine Exp $ */
3
4 #define DSTXXX
5 /* DST vs. GMT nonsense */
6
7 struct tws {
8 int tw_sec;
9 int tw_min;
10 int tw_hour;
11
12 int tw_mday;
13 int tw_mon;
14 int tw_year;
15
16 int tw_wday;
17 int tw_yday;
18
19 int tw_zone;
20
21 long tw_clock;
22
23 int tw_flags;
24 #define TW_NULL 0x0000
25 #define TW_SDAY 0x0003 /* how day-of-week was determined */
26 #define TW_SNIL 0x0000 /* not given */
27 #define TW_SEXP 0x0001 /* explicitly given */
28 #define TW_SIMP 0x0002 /* implicitly given */
29 #define TW_SZONE 0x0004 /* how timezone was determined */
30 #define TW_SZNIL 0x0000 /* not given */
31 #define TW_SZEXP 0x0004 /* explicitly given */
32 #define TW_DST 0x0010 /* daylight savings time */
33 #define TW_ZONE 0x0020 /* use numeric timezones only */
34 };
35
36 void twscopy ();
37 int twsort ();
38 long twclock ();
39 char *dasctime (), *dtimezone (), *dctime (), *dtimenow ();
40 struct tws *dgmtime(), *dlocaltime (), *dparsetime (), *dtwstime ();
41
42 #ifndef ATZ
43 #define dtime(cl) dasctime (dlocaltime (cl), TW_ZONE)
44 #else
45 #define dtime(cl) dasctime (dlocaltime (cl), TW_NULL)
46 #endif
47 #define dtwszone(tw) dtimezone (tw -> tw_zone, tw -> tw_flags)
48
49
50 extern char *tw_dotw[], *tw_ldotw[], *tw_moty[];