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

Comparing Convert-UUlib/UUlib.pm (file contents):
Revision 1.49 by root, Fri Feb 28 17:33:09 2020 UTC vs.
Revision 1.53 by root, Sat Dec 12 02:03:14 2020 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines