freebsd-dev/sys/i386/conf/makeLINT.pl
Peter Wemm 7ebe1c3acf Use while (<>) instead of while(<STDIN>) so that perl will automagically
deal with filename arguments.  It is amazing how much you forget over time.

Thanks to the people that reminded me this.  I knew there was an easy way
that didn't involve messing with $argv, filehandles, etc, but just could
not remember - all of my books are on the opposite side of the planet..
2000-06-17 19:06:13 +00:00

23 lines
461 B
Perl

#! /usr/bin/perl
# $FreeBSD$
$lno=0;
while (<>) {
chop;
s/#.*//;
s/\f//g;
s/^[ \t]+//;
$line = $_;
$lno++;
($key, @rest) = split;
next if ($key eq "");
next if ($key =~ /^hint\./);
if ($key eq "machine" || $key eq "ident" || $key eq "device" ||
$key eq "makeoptions" || $key eq "options" ||
$key eq "cpu" || $key eq "option" || $key eq "maxusers") {
print "$line\n";
} else {
print STDERR "unrecognized line: line $lno: $line\n";
}
}