From 2162e37f4350c22522de9a999d92e5a8714dc471 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 22 Dec 2005 12:23:38 +0000 Subject: [PATCH] Chapters Introduction and Server are also subjects, and all pages in those chapters should refer to their chapter-subject. Check & fix. --- info/God.t | 2 +- info/info.pl | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/info/God.t b/info/God.t index ab967698..27c310a1 100644 --- a/info/God.t +++ b/info/God.t @@ -98,4 +98,4 @@ Any time the Deity helps anyone, Deity intervention starts becoming a factor in the game. As a Deity, you absolutely can't go wrong if you do nothing at all except routine game maintenance. -.SA "Deity" +.SA "Deity, Server" diff --git a/info/info.pl b/info/info.pl index ab30bcae..5493bd2c 100644 --- a/info/info.pl +++ b/info/info.pl @@ -202,8 +202,10 @@ sub parse_file { sub parse_see_also { my ($topic) = @_; my @see_also = split(/, /, $see_also{$topic}); + my $wanted = $chapter{$topic}; my $found; # found a subject? + $wanted = undef if $wanted eq 'Concept' or $wanted eq 'Command'; $filename = "$srcdir/$topic"; for (@see_also) { @@ -211,10 +213,14 @@ sub parse_see_also { set_subject($_, $topic); $found = 1; } + if ($wanted && $_ eq $wanted) { + $wanted = undef; + } } $. = $sanr{$topic}; error("No subject listed in .SA") unless $found; + error("Chapter $wanted not listed in .SA") if $wanted; } # Add a new entry to %subject and possibly to %largest