aboutsummaryrefslogtreecommitdiff
path: root/contrib/tzdata/checktab.awk
diff options
context:
space:
mode:
authorPhilip Paeps <philip@FreeBSD.org>2018-03-24 04:52:29 +0000
committerPhilip Paeps <philip@FreeBSD.org>2018-03-24 04:52:29 +0000
commit46bee4edc2bbfe89c76f47e63cd1fa09651151c1 (patch)
treea79f20864db5f172d4016fa3385925350ca7a3c9 /contrib/tzdata/checktab.awk
parent3762b440dc17a1be1ce560d2113b5ef36e5deebd (diff)
parent52b750c8aece7970ea49bc24b613e73c83b41b24 (diff)
downloadsrc-46bee4edc2bbfe89c76f47e63cd1fa09651151c1.tar.gz
src-46bee4edc2bbfe89c76f47e63cd1fa09651151c1.zip
Import tzdata 2018d
Notes
Notes: svn path=/head/; revision=331481
Diffstat (limited to 'contrib/tzdata/checktab.awk')
-rw-r--r--contrib/tzdata/checktab.awk9
1 files changed, 9 insertions, 0 deletions
diff --git a/contrib/tzdata/checktab.awk b/contrib/tzdata/checktab.awk
index 2397673e92a9..393ab19f0bd8 100644
--- a/contrib/tzdata/checktab.awk
+++ b/contrib/tzdata/checktab.awk
@@ -126,6 +126,7 @@ $1 ~ /^#/ { next }
if ($1 == "Zone") {
tz = $2
ruleUsed[$4] = 1
+ if ($5 ~ /%/) rulePercentUsed[$4] = 1
} else if ($1 == "Link" && zone_table == "zone.tab") {
# Ignore Link commands if source and destination basenames
# are identical, e.g. Europe/Istanbul versus Asia/Istanbul.
@@ -136,8 +137,10 @@ $1 ~ /^#/ { next }
if (src != dst) tz = $3
} else if ($1 == "Rule") {
ruleDefined[$2] = 1
+ if ($10 != "-") ruleLetters[$2] = 1
} else {
ruleUsed[$2] = 1
+ if ($3 ~ /%/) rulePercentUsed[$2] = 1
}
if (tz && tz ~ /\//) {
if (!tztab[tz]) {
@@ -156,6 +159,12 @@ END {
status = 1
}
}
+ for (tz in ruleLetters) {
+ if (!rulePercentUsed[tz]) {
+ printf "%s: Rule contains letters never used\n", tz
+ status = 1
+ }
+ }
for (tz in tztab) {
if (!zoneSeen[tz]) {
printf "%s:%d: no Zone table for '%s'\n", \