3 # This is just a quick script to scan for cases where the 'error'
4 # function name in a XXXerr() macro is wrong.
6 # Run in the top level by going
7 # perl util/ck_errf.pl */*.c */*/*.c
12 open(IN,"<$file") || die "unable to open $file\n";
16 if (/^[a-zA-Z].+[\s*]([A-Za-z_0-9]+)\(.*\)/)
21 if (/([A-Z0-9]+)err\(([^,]+)/)
23 next if ($func eq "");
26 if ($n !~ /([^_]+)_F_(.+)$/)
28 # print "check -$file:$.:$func:$n\n";
35 { print "$file:$.:$func:$n\n"; next; }
38 if (($n ne $func) && ($errlib ne "SYS"))
39 { print "$file:$.:$func:$n\n"; next; }