--- doc/help/usage.pl 2004/09/14 19:47:02 1.1 +++ doc/help/usage.pl 2004/09/14 19:57:15 1.2 @@ -30,19 +30,31 @@ sub print_unused { my ($all,$usage)=@_; my %all; my %no_exist; - foreach my $file (@{ $all }) {$all{$file}=0;} + foreach my $file (@{ $all }) {$all{$file}=[];} + my @order=('author','course','developer'); foreach my $list (@{ $usage }) { foreach my $file (@{ $list }) { - if (exists($all{$file})) { $all{$file}++; } else { $no_exist{$file}++; } + if (exists($all{$file})) { + push(@{$all{$file}},$order[0]); + } else { + push(@{$no_exist{$file}},$order[0]); + } } + shift(@order); } print("Usage count for existing Files:\n"); foreach my $file (sort {uc($a) cmp uc($b)} (keys(%all))) { - printf("%-50s: %s\n",$file,$all{$file}); + if (scalar(@{ $all{$file} }) ne 0) { + printf("%-50s: %s in %s\n",$file,scalar(@{$all{$file}}), + join(',',@{$all{$file}})); + } else { + printf("%-50s: %s\n",$file,scalar(@{$all{$file}})); + } } print("Usage count for nonexistint Files:\n"); foreach my $file (sort {uc($a) cmp uc($b)} (keys(%no_exist))) { - printf("%-50s: %s\n",$file,$no_exist{$file}); + printf("%-50s: %s in %s\n",$file,scalar(@{$no_exist{$file}}), + join(',',@{$no_exist{$file}})); } }