source: trunk/third/nmh/zotnet/tws/tws.h @ 12455

Revision 12455, 1.8 KB checked in by danw, 26 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r12454, which included commits to RCS files with non-trunk default branches.
Line 
1
2/*
3 * tws.h
4 *
5 * $Id: tws.h,v 1.1.1.1 1999-02-07 18:14:11 danw Exp $
6 */
7
8/* DST vs. GMT nonsense */
9#define DSTXXX
10
11struct tws {
12    int tw_sec;         /* seconds after the minute - [0, 61] */
13    int tw_min;         /* minutes after the hour - [0, 59]   */
14    int tw_hour;        /* hour since midnight - [0, 23]      */
15    int tw_mday;        /* day of the month - [1, 31]         */
16    int tw_mon;         /* months since January - [0, 11]     */
17    int tw_year;        /* 4 digit year (ie, 1997)            */
18    int tw_wday;        /* days since Sunday - [0, 6]         */
19    int tw_yday;        /* days since January 1 - [0, 365]    */
20    int tw_zone;
21    time_t tw_clock;    /* if != 0, corresponding calendar value */
22    int tw_flags;
23};
24
25#define TW_NULL  0x0000
26
27#define TW_SDAY  0x0003 /* how day-of-week was determined */
28#define TW_SNIL  0x0000 /*   not given                    */
29#define TW_SEXP  0x0001 /*   explicitly given             */
30#define TW_SIMP  0x0002 /*   implicitly given             */
31
32#define TW_SZONE 0x0004 /* how timezone was determined    */
33#define TW_SZNIL 0x0000 /*   not given                    */
34#define TW_SZEXP 0x0004 /*   explicitly given             */
35
36#define TW_DST   0x0010 /* daylight savings time          */
37#define TW_ZONE  0x0020 /* use numeric timezones only     */
38
39#define dtwszone(tw) dtimezone (tw->tw_zone, tw->tw_flags)
40
41extern char *tw_dotw[];
42extern char *tw_ldotw[];
43extern char *tw_moty[];
44
45/*
46 * prototypes
47 */
48char *dtime (time_t *, int);
49char *dtimenow (int);
50char *dctime (struct tws *);
51struct tws *dlocaltimenow (void);
52struct tws *dlocaltime (time_t *);
53struct tws *dgmtime (time_t *);
54char *dasctime (struct tws *, int);
55char *dtimezone (int, int);
56void twscopy (struct tws *, struct tws *);
57int twsort (struct tws *, struct tws *);
58time_t dmktime (struct tws *);
59void set_dotw (struct tws *);
60
61struct tws *dparsetime (char *);
62
Note: See TracBrowser for help on using the repository browser.