X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=h%2Ftws.h;h=1db78c777cc7650ad9b6a88c180a70cd20e4d320;hb=51cb63baa791f6ba84c0a7f8538ecfd00b013bcb;hp=47a31b9e9f063292f83ca7ae5b0b6410b7009b33;hpb=da12435096e47ec1d362215141fc8b21f24e5e01;p=mmh diff --git a/h/tws.h b/h/tws.h index 47a31b9..1db78c7 100644 --- a/h/tws.h +++ b/h/tws.h @@ -1,50 +1,50 @@ - /* * tws.h - * - * $Id$ */ -/* If the following is #defined, a timezone given as a numeric-only offset will - be treated specially if it's in a zone that observes Daylight Saving Time. - For instance, during DST, a Date: like "Mon, 24 Jul 2000 12:31:44 -0700" will - be printed as "Mon, 24 Jul 2000 12:31:44 PDT". Without the code activated by - the following #define, that'd be incorrectly printed as "...MST". */ -#define ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST 1 +/* + * If the following is #defined, a timezone given as a numeric-only + * offset will be treated specially if it's in a zone that observes + * Daylight Saving Time. For instance, during DST, a Date: like "Mon, + * 24 Jul 2000 12:31:44 -0700" will be printed as "Mon, 24 Jul 2000 + * 12:31:44 PDT". Without the code activated by the following #define, + * that'd be incorrectly printed as "...MST". + */ +#define ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST 1 struct tws { - int tw_sec; /* seconds after the minute - [0, 61] */ - int tw_min; /* minutes after the hour - [0, 59] */ - int tw_hour; /* hour since midnight - [0, 23] */ - int tw_mday; /* day of the month - [1, 31] */ - int tw_mon; /* months since January - [0, 11] */ - int tw_year; /* 4 digit year (ie, 1997) */ - int tw_wday; /* days since Sunday - [0, 6] */ - int tw_yday; /* days since January 1 - [0, 365] */ - int tw_zone; - time_t tw_clock; /* if != 0, corresponding calendar value */ - int tw_flags; + int tw_sec; /* seconds after the minute - [0, 61] */ + int tw_min; /* minutes after the hour - [0, 59] */ + int tw_hour; /* hour since midnight - [0, 23] */ + int tw_mday; /* day of the month - [1, 31] */ + int tw_mon; /* months since January - [0, 11] */ + int tw_year; /* 4 digit year (ie, 1997) */ + int tw_wday; /* days since Sunday - [0, 6] */ + int tw_yday; /* days since January 1 - [0, 365] */ + int tw_zone; + time_t tw_clock; /* if != 0, corresponding calendar value */ + int tw_flags; }; -#define TW_NULL 0x0000 +#define TW_NULL 0x0000 -#define TW_SDAY 0x0003 /* how day-of-week was determined */ -#define TW_SNIL 0x0000 /* not given */ -#define TW_SEXP 0x0001 /* explicitly given */ -#define TW_SIMP 0x0002 /* implicitly given */ +#define TW_SDAY 0x0003 /* how day-of-week was determined */ +#define TW_SNIL 0x0000 /* not given */ +#define TW_SEXP 0x0001 /* explicitly given */ +#define TW_SIMP 0x0002 /* implicitly given */ -#define TW_SZONE 0x0004 /* how timezone was determined */ -#define TW_SZNIL 0x0000 /* not given */ -#define TW_SZEXP 0x0004 /* explicitly given */ +#define TW_SZONE 0x0004 /* how timezone was determined */ +#define TW_SZNIL 0x0000 /* not given */ +#define TW_SZEXP 0x0004 /* explicitly given */ -#define TW_DST 0x0010 /* daylight savings time */ -#define TW_ZONE 0x0020 /* use numeric timezones only */ +#define TW_DST 0x0010 /* daylight savings time */ +#define TW_ZONE 0x0020 /* use numeric timezones only */ -#define TW_SUCC 0x0040 /* whether parsing was successful */ -#define TW_YES 0x0040 /* yes, found */ -#define TW_NO 0x0000 /* no, not found */ +#define TW_SUCC 0x0040 /* whether parsing was successful */ +#define TW_YES 0x0040 /* yes, found */ +#define TW_NO 0x0000 /* no, not found */ -#define dtwszone(tw) dtimezone (tw->tw_zone, tw->tw_flags) +#define dtwszone(tw) dtimezone (tw->tw_zone, tw->tw_flags) extern char *tw_dotw[]; extern char *tw_ldotw[]; @@ -67,4 +67,3 @@ time_t dmktime (struct tws *); void set_dotw (struct tws *); struct tws *dparsetime (char *); -