Mercurial > gnulib
annotate lib/time-internal.h @ 40057:b06060465f09
maint: Run 'make update-copyright'
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Tue, 01 Jan 2019 00:25:11 +0100 |
parents | 10eb9086bea0 |
children |
rev | line source |
---|---|
18069 | 1 /* Time internal interface |
2 | |
40057
b06060465f09
maint: Run 'make update-copyright'
Paul Eggert <eggert@cs.ucla.edu>
parents:
19484
diff
changeset
|
3 Copyright 2015-2019 Free Software Foundation, Inc. |
18069 | 4 |
5 This program is free software; you can redistribute it and/or modify | |
6 it under the terms of the GNU General Public License as published by | |
7 the Free Software Foundation; either version 2, or (at your option) | |
8 any later version. | |
9 | |
10 This program is distributed in the hope that it will be useful, | |
11 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 GNU General Public License for more details. | |
14 | |
15 You should have received a copy of the GNU General Public License along | |
19190 | 16 with this program; if not, see <https://www.gnu.org/licenses/>. */ |
18069 | 17 |
18 /* Written by Paul Eggert. */ | |
19 | |
20 /* A time zone rule. */ | |
21 struct tm_zone | |
22 { | |
23 /* More abbreviations, should they be needed. Their TZ_IS_SET | |
24 members are zero. */ | |
25 struct tm_zone *next; | |
26 | |
27 #if HAVE_TZNAME && !HAVE_TM_ZONE | |
28 /* Copies of recent strings taken from tzname[0] and tzname[1]. | |
29 The copies are in ABBRS, so that they survive tzset. Null if unknown. */ | |
30 char *tzname_copy[2]; | |
31 #endif | |
32 | |
33 /* If nonzero, the rule represents the TZ environment variable set | |
34 to the first "abbreviation" (this may be the empty string). | |
35 Otherwise, it represents an unset TZ. */ | |
36 char tz_is_set; | |
37 | |
38 /* A sequence of null-terminated strings packed next to each other. | |
39 The strings are followed by an extra null byte. If TZ_IS_SET, | |
40 there must be at least one string and the first string (which is | |
18683
ab094bdaf384
time_rz: fix comment typo
Paul Eggert <eggert@cs.ucla.edu>
parents:
18626
diff
changeset
|
41 actually a TZ environment value) may be empty. Otherwise all |
ab094bdaf384
time_rz: fix comment typo
Paul Eggert <eggert@cs.ucla.edu>
parents:
18626
diff
changeset
|
42 strings must be nonempty. |
18069 | 43 |
44 Abbreviations are stored here because otherwise the values of | |
45 tm_zone and/or tzname would be dead after changing TZ and calling | |
46 tzset. Abbreviations never move once allocated, and are live | |
47 until tzfree is called. */ | |
48 char abbrs[FLEXIBLE_ARRAY_MEMBER]; | |
49 }; |