… | |
… | |
2 | |
2 | |
3 | # decode all the files in the directory uusrc/ and copy |
3 | # decode all the files in the directory uusrc/ and copy |
4 | # the resulting files to uudst/ |
4 | # the resulting files to uudst/ |
5 | |
5 | |
6 | #use Coro::Multicore; |
6 | #use Coro::Multicore; |
|
|
7 | |
|
|
8 | use strict; |
7 | |
9 | |
8 | use Convert::UUlib ':all'; |
10 | use Convert::UUlib ':all'; |
9 | |
11 | |
10 | sub namefilter { |
12 | sub namefilter { |
11 | my ($path) = @_; |
13 | my ($path) = @_; |
… | |
… | |
87 | Smerge -1; |
89 | Smerge -1; |
88 | |
90 | |
89 | SetOption OPT_SAVEPATH, "uudst/"; |
91 | SetOption OPT_SAVEPATH, "uudst/"; |
90 | |
92 | |
91 | # now wade through all files and their source parts |
93 | # now wade through all files and their source parts |
92 | $i = 0; |
94 | for my $uu (GetFileList) { |
93 | while ($uu = GetFileListItem $i) { |
95 | print "file ", $uu->filename, "\n"; |
94 | $i++; |
|
|
95 | print "file nr. $i"; |
|
|
96 | print " state ", $uu->state; |
96 | print " state ", $uu->state, "\n"; |
97 | print " mode ", $uu->mode; |
97 | print " mode ", $uu->mode, "\n"; |
98 | print " uudet ", strencoding $uu->uudet; |
98 | print " uudet ", strencoding $uu->uudet, "\n"; |
99 | print " size ", $uu->size; |
99 | print " size ", $uu->size, "\n"; |
100 | print " filename ", $uu->filename; |
|
|
101 | print " subfname ", $uu->subfname; |
100 | print " subfname ", $uu->subfname, "\n"; |
102 | print " mimeid ", $uu->mimeid; |
101 | print " mimeid ", $uu->mimeid, "\n"; |
103 | print " mimetype ", $uu->mimetype; |
102 | print " mimetype ", $uu->mimetype, "\n"; |
104 | print "\n"; |
|
|
105 | |
103 | |
106 | # print additional info about all parts |
104 | # print additional info about all parts |
|
|
105 | print " parts"; |
107 | for ($uu->parts) { |
106 | for ($uu->parts) { |
108 | while (my ($k, $v) = each %$_) { |
107 | for my $k (sort keys %$_) { |
109 | print "$k > $v, "; |
108 | print " $k=$_->{$k}"; |
110 | } |
109 | } |
111 | print "\n"; |
110 | print "\n"; |
112 | } |
111 | } |
113 | |
112 | |
114 | print $uu->filename; |
|
|
115 | |
|
|
116 | $uu->remove_temp; |
113 | $uu->remove_temp; |
117 | |
114 | |
118 | print "<s", $uu->state, ">";#d# |
|
|
119 | if (my $err = $uu->decode) { |
115 | if (my $err = $uu->decode) { |
120 | print ", ", strerror $err, "\n"; |
116 | print " ERROR ", strerror $err, "\n"; |
121 | } else { |
117 | } else { |
122 | print ", saved as uudst/", $uu->filename, "\n"; |
118 | print " successfully saved as uudst/", $uu->filename, "\n"; |
123 | } |
119 | } |
124 | } |
120 | } |
125 | |
121 | |
126 | print "cleanup...\n"; |
122 | print "cleanup...\n"; |
127 | |
123 | |