fixing condition in gblint.pl that leads to undefined section; adding sections found...
authorJonathan Blake <jonathan.blake@projectaon.org>
Mon, 13 Apr 2015 17:41:55 +0000 (17:41 +0000)
committerJonathan Blake <jonathan.blake@projectaon.org>
Mon, 13 Apr 2015 17:41:55 +0000 (17:41 +0000)
git-svn-id: https://projectaon.org/data/trunk@2442 f6f3e2d7-ff33-0410-aaf5-b4bee2cdac11

common/scripts/gblint.pl

index c824503..0caf1b4 100755 (executable)
@@ -70,6 +70,13 @@ my %sectionDocLookup = (
   'howcarry' => 'equipmnt',
   'howmuch'  => 'equipmnt',
   'howuse'   => 'equipmnt',
+  'backpack' => 'equipmnt',
+  'ammpouch' => 'equipmnt',
+  'medikit'  => 'equipmnt',
+  'canteen'  => 'equipmnt',
+  'weapons'  => 'weapons',
+  'close'    => 'weapons',
+  'missile'  => 'weapons',
   'cmbtrulz' => 'cmbtrulz',
   'evasion'  => 'cmbtrulz',
   'lorecrcl' => 'lorecrcl',
@@ -170,7 +177,7 @@ while( $#ARGV > -1 && $ARGV[ 0 ] =~ /^-/ ) {
 }
 
 my $lineNumber = 1;
-my $currentSection = "_unknown";
+my $currentSection = '';
 
 while( my $line = <> ) {
   my @section = ( $line =~ /<section[^>]+id="([^"]*)"/g );
@@ -182,6 +189,7 @@ while( my $line = <> ) {
     else {
       $currentSection = $sectionDocLookup{$section[ 0 ]};
     }
+    $currentSection = '_unknown' unless defined $currentSection;
   }
 
   if( $skipLines >= $lineNumber ) {