summaryrefslogtreecommitdiff
path: root/timezone/checktab.awk
diff options
context:
space:
mode:
Diffstat (limited to 'timezone/checktab.awk')
-rw-r--r--timezone/checktab.awk29
1 files changed, 16 insertions, 13 deletions
diff --git a/timezone/checktab.awk b/timezone/checktab.awk
index c88b12f1ba..fec4f628e5 100644
--- a/timezone/checktab.awk
+++ b/timezone/checktab.awk
@@ -9,6 +9,9 @@ BEGIN {
if (!zone_table) zone_table = "zone.tab"
if (!want_warnings) want_warnings = -1
+ # A special (and we hope temporary) case.
+ tztab["America/Montreal"] = 1
+
while (getline <iso_table) {
iso_NR++
if ($0 ~ /^#/) continue
@@ -69,13 +72,10 @@ BEGIN {
status = 1
}
cc0 = cc
- if (tz2cc[tz]) {
- printf "%s:%d: %s: duplicate TZ column\n", \
- zone_table, zone_NR, tz >>"/dev/stderr"
- status = 1
- }
- tz2cc[tz] = cc
- tz2comments[tz] = comments
+ cctz = cc tz
+ cctztab[cctz] = 1
+ tztab[tz] = 1
+ tz2comments[cctz] = comments
tz2NR[tz] = zone_NR
if (cc2name[cc]) {
cc_used[cc]++
@@ -92,16 +92,19 @@ BEGIN {
}
}
- for (tz in tz2cc) {
- if (cc_used[tz2cc[tz]] == 1) {
- if (tz2comments[tz]) {
+ for (cctz in cctztab) {
+ cc = substr (cctz, 1, 2)
+ tz = substr (cctz, 3)
+ if (cc_used[cc] == 1) {
+ if (tz2comments[cctz]) {
printf "%s:%d: unnecessary comment `%s'\n", \
- zone_table, tz2NR[tz], tz2comments[tz] \
+ zone_table, tz2NR[tz], \
+ tz2comments[cctz] \
>>"/dev/stderr"
status = 1
}
} else {
- if (!tz2comments[tz]) {
+ if (!tz2comments[cctz]) {
printf "%s:%d: missing comment\n", \
zone_table, tz2NR[tz] >>"/dev/stderr"
status = 1
@@ -125,7 +128,7 @@ BEGIN {
if (src != dst) tz = $3
}
if (tz && tz ~ /\//) {
- if (!tz2cc[tz]) {
+ if (!tztab[tz]) {
printf "%s: no data for `%s'\n", zone_table, tz \
>>"/dev/stderr"
status = 1