… | |
… | |
5 | use Carp; |
5 | use Carp; |
6 | |
6 | |
7 | require Exporter; |
7 | require Exporter; |
8 | require DynaLoader; |
8 | require DynaLoader; |
9 | |
9 | |
10 | our $VERSION = 1.62; |
10 | our $VERSION = 1.71; |
11 | |
11 | |
12 | our @ISA = qw(Exporter DynaLoader); |
12 | our @ISA = qw(Exporter DynaLoader); |
13 | |
13 | |
14 | our @_consts = qw( |
14 | our @_consts = qw( |
15 | ACT_COPYING ACT_DECODING ACT_ENCODING ACT_IDLE ACT_SCANNING |
15 | ACT_COPYING ACT_DECODING ACT_ENCODING ACT_IDLE ACT_SCANNING |
… | |
… | |
292 | if you want to iterate over all items, it is usually faster to use |
292 | if you want to iterate over all items, it is usually faster to use |
293 | C<GetFileList>. |
293 | C<GetFileList>. |
294 | |
294 | |
295 | =item @items = GetFileList |
295 | =item @items = GetFileList |
296 | |
296 | |
297 | Similar to C<GetFileListItem>, but returns all files in one go. |
297 | Similar to C<GetFileListItem>, but returns all files in one go, which is |
|
|
298 | very much faster for large number of items, and has no drawbacks when used |
|
|
299 | for a small number of items. |
298 | |
300 | |
299 | =back |
301 | =back |
300 | |
302 | |
301 | =head2 Decoding files |
303 | =head2 Decoding files |
302 | |
304 | |
… | |
… | |
482 | SetOption OPT_RBUF, 128*1024; |
484 | SetOption OPT_RBUF, 128*1024; |
483 | SetOption OPT_WBUF, 1024*1024; |
485 | SetOption OPT_WBUF, 1024*1024; |
484 | SetOption OPT_IGNMODE, 1; |
486 | SetOption OPT_IGNMODE, 1; |
485 | SetOption OPT_IGNMODE, 1; |
487 | SetOption OPT_IGNMODE, 1; |
486 | SetOption OPT_VERBOSE, 1; |
488 | SetOption OPT_VERBOSE, 1; |
|
|
489 | SetOption OPT_AUTOCHK, 0; |
487 | |
490 | |
488 | # show the three ways you can set callback functions. I normally |
491 | # show the three ways you can set callback functions. I normally |
489 | # prefer the one with the sub inplace. |
492 | # prefer the one with the sub inplace. |
490 | SetFNameFilter \&namefilter; |
493 | SetFNameFilter \&namefilter; |
491 | |
494 | |
… | |
… | |
529 | # now read all files in the directory uusrc/* |
532 | # now read all files in the directory uusrc/* |
530 | for (<uusrc/*>) { |
533 | for (<uusrc/*>) { |
531 | my ($retval, $count) = LoadFile ($_, $_, 1); |
534 | my ($retval, $count) = LoadFile ($_, $_, 1); |
532 | print "file($_), status(", strerror $retval, ") parts($count)\n"; |
535 | print "file($_), status(", strerror $retval, ") parts($count)\n"; |
533 | } |
536 | } |
|
|
537 | |
|
|
538 | Smerge -1; |
534 | |
539 | |
535 | SetOption OPT_SAVEPATH, "uudst/"; |
540 | SetOption OPT_SAVEPATH, "uudst/"; |
536 | |
541 | |
537 | # now wade through all files and their source parts |
542 | # now wade through all files and their source parts |
538 | for my $uu (GetFileList) { |
543 | for my $uu (GetFileList) { |
… | |
… | |
596 | security purposes requires care. |
601 | security purposes requires care. |
597 | |
602 | |
598 | Likewise, file sizes when the uulib library was written were tiny compared |
603 | Likewise, file sizes when the uulib library was written were tiny compared |
599 | to today, so do not expect this library to handle files larger than 2GB. |
604 | to today, so do not expect this library to handle files larger than 2GB. |
600 | |
605 | |
|
|
606 | Lastly, this module uses a very "C-like" interface, which means it doesn't |
|
|
607 | protect you from invalid points as you might expect from "more perlish" |
|
|
608 | modules - for example, accessing a file item object after callinbg |
|
|
609 | C<CleanUp> will likely result in crashes, memory corruption, or worse. |
|
|
610 | |
601 | =head1 AUTHOR |
611 | =head1 AUTHOR |
602 | |
612 | |
603 | Marc Lehmann <schmorp@schmorp.de>, the original uulib library was written |
613 | Marc Lehmann <schmorp@schmorp.de>, the original uulib library was written |
604 | by Frank Pilhofer <fp@informatik.uni-frankfurt.de>, and later heavily |
614 | by Frank Pilhofer <fp@informatik.uni-frankfurt.de>, and later heavily |
605 | bugfixed by Marc Lehmann. |
615 | bugfixed by Marc Lehmann. |