-die "Usage: ./spell_comments.pl `find ../ -name '*.[ch]' -name '*.hpp' -name '*.cpp'`\n"
- unless length(@ARGV)>1;
+die "Usage: ". ($DICTFILE eq "./spell_dict.txt"? "./":"tools/internal/")."spell_comments.pl "
+ ."`find ". ($DICTFILE eq "./spell_dict.txt"? "../../":".")." -name '*.[ch]' -o -name '*.hpp' -o -name '*.cpp' |grep -v smpi/mpich3-test|grep -v NAS | grep -v src/smpi/colls`\n"
+ unless scalar(@ARGV)>0;
+
+my $total = 0;
foreach my $file (@ARGV) {
open (FI, $file) || die "Cannot open $file: $!\n";
my $content = join ("", <FI>);
foreach my $file (@ARGV) {
open (FI, $file) || die "Cannot open $file: $!\n";
my $content = join ("", <FI>);
open(PIN, "ispell -d american -p $DICTFILE -l < $TEMPFILE | sort -uf |") || die;
my @badwords;
while (my $err = <PIN>) {
open(PIN, "ispell -d american -p $DICTFILE -l < $TEMPFILE | sort -uf |") || die;
my @badwords;
while (my $err = <PIN>) {
push(@badwords, $err) if ($err =~ /\w/ && length($err)>0);
}
close(PIN) || die;
if (@badwords) {
print "$file: ".scalar(@badwords)." errors: '".join("','",@badwords)."'\n";
push(@badwords, $err) if ($err =~ /\w/ && length($err)>0);
}
close(PIN) || die;
if (@badwords) {
print "$file: ".scalar(@badwords)." errors: '".join("','",@badwords)."'\n";