[tz] [PATCH] Fix ziguard.awk Namibia invalid assumption

Paul Eggert eggert at cs.ucla.edu
Sun Apr 22 23:54:17 UTC 2018


* ziguard.awk: Don’t assume input is in rearguard format.
---
 ziguard.awk | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ziguard.awk b/ziguard.awk
index 7cdceab..dbe64d6 100644
--- a/ziguard.awk
+++ b/ziguard.awk
@@ -63,7 +63,11 @@ outfile != "main.zi" {
 	   || (1994 <= $(in_comment + 4) && $(in_comment + 4) <= 2017) \
 	   || in_comment + 3 == NF))
   if (Rule_Namibia || Zone_using_Namibia_rule) {
-    if (in_comment == vanguard) {
+      if ((Rule_Namibia \
+	   ? ($(in_comment + 9) ~ /^-/ \
+	      || ($(in_comment + 9) == 0 && $(in_comment + 10) == "CAT")) \
+	   : $(in_comment + 1) == "2:00" && $(in_comment + 2) == "Namibia") \
+	  == vanguard) {
       uncomment = in_comment
     } else {
       comment_out = !in_comment
-- 
2.14.3



More information about the tz mailing list