Subversion Repositories LCARS

Compare Revisions

Last modification

Regard whitespace Rev 10 → Rev 11

/trunk/tools/network/news/newsstat/newsstat.pl
23,7 → 23,7
# RECENT CHANGES #
# 2011-10-03 PE - Use more compatible shebang
# - Fixed some Perl::Critic-ized code
# - Fixed wrong indent for non-ASCII names (TODO: proper dot count)
# - Fixed wrong indent for non-ASCII names
# - Formatted source code
# 2011-07-03 PE - Use Encode to decode/encode MIME encodings
# - Use warnings, utf8 (just in case)
555,7 → 555,7
#### First, analyse header fields ####
 
# Set up this poster if not defined, get counts, sizes
my $poster = encode( 'UTF-8', $headers{From} ); # get the poster's name
my $poster = $headers{From}; # get the poster's name
if ( !defined( $data{$poster} ) )
{ # seen this one before?
$data{$poster}{agent} = 'Unknown'; # comes after For: field
693,7 → 693,7
}
 
# Get threads
my $thread = encode( 'UTF-8', $headers{"Subject"} );
my $thread = $headers{"Subject"};
$thread =~ s/^re: //i; # Remove Re: or re: at start
$thread =~ s/\s+/ /g; # collapse whitespace
$threads{$thread}{count} += 1; # bump count of this subject
798,9 → 798,12
##############################
sub rpad
{
 
# get text to pad, length to pad, pad chr
my ( $text, $pad_len, $pad_chr ) = @_;
 
### DEBUG
# printf "|%s| = %d\n", $text, length($text);
 
if ( length($text) > $pad_len )
{
$text = substr( $text, 0, $pad_len );