3 my ($fsck_h, $fsck_msgids_txt, $okfile) = @ARGV;
5 my (%in_fsck_h, $fh, $bad);
7 open($fh, "<", "$fsck_h") or die;
9 if (/^\s+FUNC\(([0-9A-Z_]+), ([A-Z]+)\)/) {
10 my ($name, $severity) = ($1, $2);
23 $in_fsck_h{$name} = $severity;
28 open($fh, "<", "$fsck_msgids_txt") or die;
29 my ($previous, $current);
31 if (!defined $current) {
32 if (/^\`([a-zA-Z0-9]*)\`::/) {
34 if ((defined $previous) &&
35 ($current le $previous)) {
36 print STDERR
"$previous >= $current in doc\n";
40 } elsif (/^\s+\(([A-Z]+)\) /) {
42 if (!exists $in_fsck_h{$current}) {
43 print STDERR
"$current does not exist in fsck.h\n";
45 } elsif ($in_fsck_h{$current} eq "") {
46 print STDERR
"$current defined twice\n";
48 } elsif ($in_fsck_h{$current} ne $level) {
49 print STDERR
"$current severity $level != $in_fsck_h{$current}\n";
53 $in_fsck_h{$current} = ""; # mark as seen.
59 for my $key (keys %in_fsck_h) {
60 if ($in_fsck_h{$key} ne "") {
61 print STDERR
"$key not explained in doc.\n";
68 open($fh, ">", "$okfile");