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.19 by root, Sun Apr 18 14:48:53 2004 UTC vs.
Revision 1.30 by root, Fri Jun 13 13:27:51 2008 UTC

1package Convert::UUlib; 1package Convert::UUlib;
2
3no warnings;
4use strict;
2 5
3use Carp; 6use Carp;
4 7
5require Exporter; 8require Exporter;
6require DynaLoader; 9require DynaLoader;
7 10
8$VERSION = "1.02"; 11our $VERSION = '1.10';
9 12
10@ISA = qw(Exporter DynaLoader); 13our @ISA = qw(Exporter DynaLoader);
11 14
12@_consts = qw( 15our @_consts = qw(
13 ACT_COPYING ACT_DECODING ACT_ENCODING ACT_IDLE ACT_SCANNING 16 ACT_COPYING ACT_DECODING ACT_ENCODING ACT_IDLE ACT_SCANNING
14 17
15 FILE_DECODED FILE_ERROR FILE_MISPART FILE_NOBEGIN FILE_NODATA 18 FILE_DECODED FILE_ERROR FILE_MISPART FILE_NOBEGIN FILE_NODATA
16 FILE_NOEND FILE_OK FILE_READ FILE_TMPFILE 19 FILE_NOEND FILE_OK FILE_READ FILE_TMPFILE
17 20
18 MSG_ERROR MSG_FATAL MSG_MESSAGE MSG_NOTE MSG_PANIC MSG_WARNING 21 MSG_ERROR MSG_FATAL MSG_MESSAGE MSG_NOTE MSG_PANIC MSG_WARNING
19 22
23 OPT_RBUF OPT_WBUF
20 OPT_BRACKPOL OPT_DEBUG OPT_DESPERATE OPT_DUMBNESS OPT_ENCEXT 24 OPT_BRACKPOL OPT_DEBUG OPT_DESPERATE OPT_DUMBNESS OPT_ENCEXT
21 OPT_ERRNO OPT_FAST OPT_IGNMODE OPT_IGNREPLY OPT_OVERWRITE OPT_PREAMB 25 OPT_ERRNO OPT_FAST OPT_IGNMODE OPT_IGNREPLY OPT_OVERWRITE OPT_PREAMB
22 OPT_PROGRESS OPT_SAVEPATH OPT_TINYB64 OPT_USETEXT OPT_VERBOSE 26 OPT_PROGRESS OPT_SAVEPATH OPT_TINYB64 OPT_USETEXT OPT_VERBOSE
23 OPT_VERSION OPT_REMOVE OPT_MOREMIME OPT_DOTDOT 27 OPT_VERSION OPT_REMOVE OPT_MOREMIME OPT_DOTDOT
24 28
27 31
28 B64_ENCODED BH_ENCODED PT_ENCODED QP_ENCODED 32 B64_ENCODED BH_ENCODED PT_ENCODED QP_ENCODED
29 XX_ENCODED UU_ENCODED YENC_ENCODED 33 XX_ENCODED UU_ENCODED YENC_ENCODED
30); 34);
31 35
32@_funcs = qw( 36our @_funcs = qw(
33 Initialize CleanUp GetOption SetOption strerror SetMsgCallback 37 Initialize CleanUp GetOption SetOption strerror SetMsgCallback
34 SetBusyCallback SetFileCallback SetFNameFilter SetFileNameCallback 38 SetBusyCallback SetFileCallback SetFNameFilter SetFileNameCallback
35 FNameFilter LoadFile GetFileListItem RenameFile DecodeToTemp 39 FNameFilter LoadFile GetFileListItem RenameFile DecodeToTemp
36 RemoveTemp DecodeFile InfoFile Smerge QuickDecode EncodeMulti 40 RemoveTemp DecodeFile InfoFile Smerge QuickDecode EncodeMulti
37 EncodePartial EncodeToStream EncodeToFile E_PrepSingle 41 EncodePartial EncodeToStream EncodeToFile E_PrepSingle
38 E_PrepPartial 42 E_PrepPartial
39 43
40 straction strencoding strmsglevel 44 straction strencoding strmsglevel
41); 45);
42 46
43@EXPORT = @_consts; 47our @EXPORT = @_consts;
44@EXPORT_OK = @_funcs; 48our @EXPORT_OK = @_funcs;
45%EXPORT_TAGS = (all => [@_consts,@_funcs], constants => \@_consts); 49our %EXPORT_TAGS = (all => [@_consts,@_funcs], constants => \@_consts);
46 50
47bootstrap Convert::UUlib $VERSION; 51bootstrap Convert::UUlib $VERSION;
48 52
49Initialize(); 53Initialize();
50 54
51# not when < 5.005_6x 55# not when < 5.005_6x
52# END { CleanUp() } 56# END { CleanUp() }
53 57
54for (@_consts) { 58for (@_consts) {
55 my $constant = constant($_); 59 my $constant = constant($_);
60 no strict 'refs';
56 *$_ = sub () { $constant }; 61 *$_ = sub () { $constant };
57} 62}
58 63
59# action code -> string mapping 64# action code -> string mapping
60sub straction($) { 65sub straction($) {
154 OPT_TINYB64 detect short B64 outside of Mime 159 OPT_TINYB64 detect short B64 outside of Mime
155 OPT_ENCEXT extension for single-part encoded files 160 OPT_ENCEXT extension for single-part encoded files
156 OPT_REMOVE remove input files after decoding (dangerous) 161 OPT_REMOVE remove input files after decoding (dangerous)
157 OPT_MOREMIME strict MIME adherence 162 OPT_MOREMIME strict MIME adherence
158 OPT_DOTDOT ".."-unescaping has not yet been done on input files 163 OPT_DOTDOT ".."-unescaping has not yet been done on input files
164 OPT_RBUF set default read I/O buffer size in bytes *EXPERIMENTAL*
165 OPT_WBUF set default write I/O buffer size in bytes *EXPERIMENTAL*
159 166
160=head2 Result/Error codes 167=head2 Result/Error codes
161 168
162 RET_OK everything went fine 169 RET_OK everything went fine
163 RET_IOERR I/O Error - examine errno 170 RET_IOERR I/O Error - examine errno
534 541
535 CleanUp(); 542 CleanUp();
536 543
537=head1 AUTHOR 544=head1 AUTHOR
538 545
539Marc Lehmann <pcg@goof.com>, the original uulib library was written 546Marc Lehmann <schmorp@schmorp.de>, the original uulib library was written
540by Frank Pilhofer <fp@informatik.uni-frankfurt.de>, and later heavily 547by Frank Pilhofer <fp@informatik.uni-frankfurt.de>, and later heavily
541bugfixed by Marc Lehmann. 548bugfixed by Marc Lehmann.
542 549
543=head1 SEE ALSO 550=head1 SEE ALSO
544 551

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines