… | |
… | |
3 | use Carp; |
3 | use Carp; |
4 | |
4 | |
5 | require Exporter; |
5 | require Exporter; |
6 | require DynaLoader; |
6 | require DynaLoader; |
7 | |
7 | |
8 | $VERSION = 0.31; |
8 | $VERSION = "1.06"; |
9 | |
9 | |
10 | @ISA = qw(Exporter DynaLoader); |
10 | @ISA = qw(Exporter DynaLoader); |
11 | |
11 | |
12 | @_consts = qw( |
12 | @_consts = qw( |
13 | ACT_COPYING ACT_DECODING ACT_ENCODING ACT_IDLE ACT_SCANNING |
13 | ACT_COPYING ACT_DECODING ACT_ENCODING ACT_IDLE ACT_SCANNING |
… | |
… | |
15 | FILE_DECODED FILE_ERROR FILE_MISPART FILE_NOBEGIN FILE_NODATA |
15 | FILE_DECODED FILE_ERROR FILE_MISPART FILE_NOBEGIN FILE_NODATA |
16 | FILE_NOEND FILE_OK FILE_READ FILE_TMPFILE |
16 | FILE_NOEND FILE_OK FILE_READ FILE_TMPFILE |
17 | |
17 | |
18 | MSG_ERROR MSG_FATAL MSG_MESSAGE MSG_NOTE MSG_PANIC MSG_WARNING |
18 | MSG_ERROR MSG_FATAL MSG_MESSAGE MSG_NOTE MSG_PANIC MSG_WARNING |
19 | |
19 | |
|
|
20 | OPT_RBUF OPT_WBUF |
20 | OPT_BRACKPOL OPT_DEBUG OPT_DESPERATE OPT_DUMBNESS OPT_ENCEXT |
21 | OPT_BRACKPOL OPT_DEBUG OPT_DESPERATE OPT_DUMBNESS OPT_ENCEXT |
21 | OPT_ERRNO OPT_FAST OPT_IGNMODE OPT_IGNREPLY OPT_OVERWRITE OPT_PREAMB |
22 | OPT_ERRNO OPT_FAST OPT_IGNMODE OPT_IGNREPLY OPT_OVERWRITE OPT_PREAMB |
22 | OPT_PROGRESS OPT_SAVEPATH OPT_TINYB64 OPT_USETEXT OPT_VERBOSE |
23 | OPT_PROGRESS OPT_SAVEPATH OPT_TINYB64 OPT_USETEXT OPT_VERBOSE |
23 | OPT_VERSION OPT_REMOVE OPT_MOREMIME OPT_DOTDOT |
24 | OPT_VERSION OPT_REMOVE OPT_MOREMIME OPT_DOTDOT |
24 | |
25 | |
… | |
… | |
151 | OPT_PROGRESS retrieve progress information |
152 | OPT_PROGRESS retrieve progress information |
152 | OPT_USETEXT handle text messages |
153 | OPT_USETEXT handle text messages |
153 | OPT_PREAMB handle Mime preambles/epilogues |
154 | OPT_PREAMB handle Mime preambles/epilogues |
154 | OPT_TINYB64 detect short B64 outside of Mime |
155 | OPT_TINYB64 detect short B64 outside of Mime |
155 | OPT_ENCEXT extension for single-part encoded files |
156 | OPT_ENCEXT extension for single-part encoded files |
156 | OPT_REMOVE remove input files after decoding |
157 | OPT_REMOVE remove input files after decoding (dangerous) |
157 | OPT_MOREMIME strict MIME adherence |
158 | OPT_MOREMIME strict MIME adherence |
158 | OPT_DOTDOT .. unescaping has not yet been done on input files |
159 | OPT_DOTDOT ".."-unescaping has not yet been done on input files |
|
|
160 | OPT_RBUF set default read I/O buffer size in bytes *EXPERIMENTAL* |
|
|
161 | OPT_WBUF set default write I/O buffer size in bytes *EXPERIMENTAL* |
159 | |
162 | |
160 | =head2 Result/Error codes |
163 | =head2 Result/Error codes |
161 | |
164 | |
162 | RET_OK everything went fine |
165 | RET_OK everything went fine |
163 | RET_IOERR I/O Error - examine errno |
166 | RET_IOERR I/O Error - examine errno |
… | |
… | |
203 | |
206 | |
204 | Initialize is automatically called when the module is loaded and allocates |
207 | Initialize is automatically called when the module is loaded and allocates |
205 | quite a small amount of memory for todays machines ;) CleanUp releases that |
208 | quite a small amount of memory for todays machines ;) CleanUp releases that |
206 | again. |
209 | again. |
207 | |
210 | |
|
|
211 | On my machine, a fairly complete decode with DBI backend needs about 10MB |
|
|
212 | RSS to decode 20000 files. |
|
|
213 | |
208 | =over 4 |
214 | =over 4 |
209 | |
215 | |
210 | =item Initialize |
216 | =item Initialize |
211 | |
217 | |
212 | Not normally necessary, (re-)initializes the library. |
218 | Not normally necessary, (re-)initializes the library. |
… | |
… | |
254 | |
260 | |
255 | =head2 Loading sourcefiles, optionally fuzzy merge and start decoding |
261 | =head2 Loading sourcefiles, optionally fuzzy merge and start decoding |
256 | |
262 | |
257 | =over 4 |
263 | =over 4 |
258 | |
264 | |
259 | =item ($retval, $count) = LoadFile $fname, [$id, [$delflag]] |
265 | =item ($retval, $count) = LoadFile $fname, [$id, [$delflag, [$partno]]] |
260 | |
266 | |
261 | Load the given file and scan it for encoded contents. Optionally tag it |
267 | Load the given file and scan it for encoded contents. Optionally tag it |
262 | with the given id, and if C<$delflag> is true, delete the file after it is |
268 | with the given id, and if C<$delflag> is true, delete the file after it |
263 | no longer necessary. |
269 | is no longer necessary. If you are certain of the part number, you can |
|
|
270 | specify it as the last argument. |
|
|
271 | |
|
|
272 | A better (usually faster) way of doing this is using the C<SetFNameFilter> |
|
|
273 | functionality. |
264 | |
274 | |
265 | =item $retval = Smerge $pass |
275 | =item $retval = Smerge $pass |
266 | |
276 | |
267 | If you are desperate, try to call C<Smerge> with increasing C<$pass> |
277 | If you are desperate, try to call C<Smerge> with increasing C<$pass> |
268 | values, beginning at C<0>, to try to merge parts that usually would not |
278 | values, beginning at C<0>, to try to merge parts that usually would not |
… | |
… | |
527 | |
537 | |
528 | CleanUp(); |
538 | CleanUp(); |
529 | |
539 | |
530 | =head1 AUTHOR |
540 | =head1 AUTHOR |
531 | |
541 | |
532 | Marc Lehmann <pcg@goof.com>, the original uulib library was written |
542 | Marc Lehmann <schmorp@schmorp.de>, the original uulib library was written |
533 | by Frank Pilhofer <fp@informatik.uni-frankfurt.de>, and later heavily |
543 | by Frank Pilhofer <fp@informatik.uni-frankfurt.de>, and later heavily |
534 | bugfixed by Marc Lehmann. |
544 | bugfixed by Marc Lehmann. |
535 | |
545 | |
536 | =head1 SEE ALSO |
546 | =head1 SEE ALSO |
537 | |
547 | |