X-Git-Url: http://git.projectaon.org/?p=project-aon.git;a=blobdiff_plain;f=common%2Fscripts%2Fgblint.pl;h=827a561bb004bcff2a09c8dc14cc768d9dfab483;hp=c8245031d81d005f8b7fbb8f1f1c459154b857b0;hb=547e87990599b8905391bda624deb943d2ea1fcb;hpb=f4bdee5083ca9a72713637e1e979aa183e06faea diff --git a/common/scripts/gblint.pl b/common/scripts/gblint.pl index c824503..827a561 100755 --- a/common/scripts/gblint.pl +++ b/common/scripts/gblint.pl @@ -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', @@ -167,10 +174,14 @@ while( $#ARGV > -1 && $ARGV[ 0 ] =~ /^-/ ) { shift @ARGV; $language = shift @ARGV; } + elsif( $ARGV[ 0 ] eq '-h' ) { + usage(); + exit 0; + } } my $lineNumber = 1; -my $currentSection = "_unknown"; +my $currentSection = ''; while( my $line = <> ) { my @section = ( $line =~ /]+id="([^"]*)"/g ); @@ -182,6 +193,7 @@ while( my $line = <> ) { else { $currentSection = $sectionDocLookup{$section[ 0 ]}; } + $currentSection = '_unknown' unless defined $currentSection; } if( $skipLines >= $lineNumber ) { @@ -223,7 +235,7 @@ while( my $line = <> ) { # ellipsis if( $line =~ /(\.\s*\.(\s*\.)?)/ ) { &printError( "ne", $currentSection, $lineNumber, "possible malformed ellipsis", "$1", " or " ); } - if( $line =~ m{([[:space:]])} || $line =~ m{([[:space:]])} ) { &printError( "ne", $currentSection, $lineNumber, " with extraneous surrounding space", "$1", "" ); } + if( $line =~ m{([[:space:]])}) { &printError( "ne", $currentSection, $lineNumber, " with extraneous surrounding space", "$1", "" ); } if( $line =~ m{([^>])()} ) { &printError( "ne", $currentSection, $lineNumber, "possible used in place of ", "$1$2", "$1" ); } if( $line =~ m{(>)} ) { &printError( "ne", $currentSection, $lineNumber, "possible used in place of ", "$1", ">" ); } @@ -287,7 +299,7 @@ while( my $line = <> ) { } ##### Others - if( $line =~ m{