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.1 by root, Mon Jun 11 19:48:55 2001 UTC vs.
Revision 1.3 by root, Sun Mar 31 21:42:36 2002 UTC

29SetMsgCallback (sub { 29SetMsgCallback (sub {
30 my($msg,$level)=@_; 30 my($msg,$level)=@_;
31 print uc(strmsglevel($_[1])),": $msg\n"; 31 print uc(strmsglevel($_[1])),": $msg\n";
32}); 32});
33 33
34SetFileNameCallback sub {
35 return unless $_[1]; # skip "Re:"-plies et al.
36 my ($subject, $filename) = @_;
37 ## if we find some *.rar, take it
38 return $1 if $subject =~ /(\S+\.(?:[rstuvwxyz]\d\d|rar))\s/i;
39 # otherwise just pass what we have
40 return ();
41};
42
43
34for(<uusrc/*>) { 44for(<uusrc/*>) {
35 my($retval,$count)=LoadFile ($_,$_,1); 45 my($retval,$count)=LoadFile ($_,$_,1);
36 print "file($_), status(",strerror($retval),") parts($count)\n"; 46 print "file($_), status(",strerror($retval),") parts($count)\n";
37} 47}
38 48
58 print "$k > $v, "; 68 print "$k > $v, ";
59 } 69 }
60 print "\n"; 70 print "\n";
61 } 71 }
62 72
63 $uu->decode_temp; 73 print strerror($uu->decode_temp)."\n";
64 print " temporarily decoded to ",$uu->binfile,"\n"; 74 print " temporarily decoded to ",$uu->binfile,"\n";
65 $uu->remove_temp; 75 $uu->remove_temp;
66 76
67 print strerror($uu->decode); 77 print strerror($uu->decode)."\n";
68 print " saved as uudst/",$uu->filename,"\n"; 78 print " saved as uudst/",$uu->filename,"\n";
69} 79}
70 80
71print "cleanup...\n"; 81print "cleanup...\n";
72 82

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines