ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Convert-UUlib/example-decoder
(Generate patch)

Comparing Convert-UUlib/example-decoder (file contents):
Revision 1.3 by root, Sun Mar 31 21:42:36 2002 UTC vs.
Revision 1.4 by root, Sun Mar 31 22:03:56 2002 UTC

31 print uc(strmsglevel($_[1])),": $msg\n"; 31 print uc(strmsglevel($_[1])),": $msg\n";
32}); 32});
33 33
34SetFileNameCallback sub { 34SetFileNameCallback sub {
35 return unless $_[1]; # skip "Re:"-plies et al. 35 return unless $_[1]; # skip "Re:"-plies et al.
36 my ($subject, $filename) = @_; 36 local _$ = $_[0];
37
38 # the following rules are rather effective on some newsgroups,
39 # like alt.binaries.games.anime, where non-mime, uuencoded data
40 # is very common
41
37 ## if we find some *.rar, take it 42 # if we find some *.rar, take it
38 return $1 if $subject =~ /(\S+\.(?:[rstuvwxyz]\d\d|rar))\s/i; 43 return $1 if /(\S+\.(?:[rstuvwxyz]\d\d|rar))\s/i;
44
45 # - filename.par (04/55)
46 return $1 if /- "?(\S+\.\S+?)"? (:yenc )?\(\d+\/\d+\)/i;
47
39 # otherwise just pass what we have 48 # otherwise just pass what we have
40 return (); 49 return ();
41}; 50};
42 51
43 52

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines