exiftool-vendored.exe 12.82.0 → 12.82.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. package/README.md +6 -0
  2. package/bin/exiftool.exe +0 -0
  3. package/bin/exiftool_files/Licenses_Strawberry_Perl.zip +0 -0
  4. package/bin/exiftool_files/lib/Archive/Zip/Archive.pm +399 -65
  5. package/bin/exiftool_files/lib/Archive/Zip/DirectoryMember.pm +1 -1
  6. package/bin/exiftool_files/lib/Archive/Zip/FileMember.pm +1 -1
  7. package/bin/exiftool_files/lib/Archive/Zip/Member.pm +499 -195
  8. package/bin/exiftool_files/lib/Archive/Zip/NewFileMember.pm +1 -1
  9. package/bin/exiftool_files/lib/Archive/Zip/StringMember.pm +2 -2
  10. package/bin/exiftool_files/lib/Archive/Zip/ZipFileMember.pm +79 -20
  11. package/bin/exiftool_files/lib/Archive/Zip.pm +179 -29
  12. package/bin/exiftool_files/lib/AutoLoader.pm +453 -0
  13. package/bin/exiftool_files/lib/B/Deparse.pm +209 -137
  14. package/bin/exiftool_files/lib/B.pm +1 -1
  15. package/bin/exiftool_files/lib/Benchmark.pm +1123 -0
  16. package/bin/exiftool_files/lib/Class/Struct.pm +2 -2
  17. package/bin/exiftool_files/lib/Compress/Raw/Bzip2.pm +14 -9
  18. package/bin/exiftool_files/lib/Compress/Raw/Lzma.pm +982 -0
  19. package/bin/exiftool_files/lib/Compress/Raw/Zlib.pm +91 -86
  20. package/bin/exiftool_files/lib/Compress/Zlib.pm +105 -100
  21. package/bin/exiftool_files/lib/Config.pm +9 -9
  22. package/bin/exiftool_files/lib/Config_heavy.pl +36 -33
  23. package/bin/exiftool_files/lib/CryptX.pm +2 -82
  24. package/bin/exiftool_files/lib/Data/Dumper.pm +2 -2
  25. package/bin/exiftool_files/lib/Digest/MD5.pm +12 -9
  26. package/bin/exiftool_files/lib/Digest/Perl/MD5.pm +1 -191
  27. package/bin/exiftool_files/lib/Digest/base.pm +26 -20
  28. package/bin/exiftool_files/lib/DynaLoader.pm +7 -4
  29. package/bin/exiftool_files/lib/Encode.pm +3 -3
  30. package/bin/exiftool_files/lib/Errno.pm +13 -13
  31. package/bin/exiftool_files/lib/Exporter/Heavy.pm +2 -2
  32. package/bin/exiftool_files/lib/Exporter.pm +1 -1
  33. package/bin/exiftool_files/lib/ExtUtils/Command/MM.pm +323 -0
  34. package/bin/exiftool_files/lib/ExtUtils/Command.pm +382 -0
  35. package/bin/exiftool_files/lib/File/Find.pm +1 -1
  36. package/bin/exiftool_files/lib/File/Glob.pm +1 -8
  37. package/bin/exiftool_files/lib/File/GlobMapper.pm +2 -2
  38. package/bin/exiftool_files/lib/File/HomeDir/Darwin/Carbon.pm +2 -40
  39. package/bin/exiftool_files/lib/File/HomeDir/Darwin/Cocoa.pm +2 -34
  40. package/bin/exiftool_files/lib/File/HomeDir/Darwin.pm +2 -28
  41. package/bin/exiftool_files/lib/File/HomeDir/Driver.pm +2 -35
  42. package/bin/exiftool_files/lib/File/HomeDir/FreeDesktop.pm +2 -62
  43. package/bin/exiftool_files/lib/File/HomeDir/MacOS9.pm +2 -53
  44. package/bin/exiftool_files/lib/File/HomeDir/Test.pm +2 -43
  45. package/bin/exiftool_files/lib/File/HomeDir/Unix.pm +2 -53
  46. package/bin/exiftool_files/lib/File/HomeDir/Windows.pm +2 -69
  47. package/bin/exiftool_files/lib/File/HomeDir.pm +5 -416
  48. package/bin/exiftool_files/lib/File/Path.pm +3 -3
  49. package/bin/exiftool_files/lib/File/Spec/Win32.pm +2 -2
  50. package/bin/exiftool_files/lib/File/Temp.pm +70 -35
  51. package/bin/exiftool_files/lib/File/Which.pm +1 -240
  52. package/bin/exiftool_files/lib/File/stat.pm +3 -2
  53. package/bin/exiftool_files/lib/IO/Compress/Adapter/Bzip2.pm +16 -17
  54. package/bin/exiftool_files/lib/IO/Compress/Adapter/Deflate.pm +19 -20
  55. package/bin/exiftool_files/lib/IO/Compress/Base/Common.pm +5 -5
  56. package/bin/exiftool_files/lib/IO/Compress/Base.pm +35 -26
  57. package/bin/exiftool_files/lib/IO/Compress/Brotli.pm +159 -0
  58. package/bin/exiftool_files/lib/IO/Compress/Bzip2.pm +50 -25
  59. package/bin/exiftool_files/lib/IO/Compress/Gzip/Constants.pm +6 -6
  60. package/bin/exiftool_files/lib/IO/Compress/Gzip.pm +58 -32
  61. package/bin/exiftool_files/lib/IO/Compress/RawDeflate.pm +63 -38
  62. package/bin/exiftool_files/lib/IO/Compress/Zlib/Extra.pm +20 -20
  63. package/bin/exiftool_files/lib/IO/Dir.pm +1 -1
  64. package/bin/exiftool_files/lib/IO/File.pm +1 -1
  65. package/bin/exiftool_files/lib/IO/Handle.pm +1 -21
  66. package/bin/exiftool_files/lib/IO/Pipe.pm +1 -1
  67. package/bin/exiftool_files/lib/IO/Seekable.pm +1 -1
  68. package/bin/exiftool_files/lib/IO/Select.pm +16 -2
  69. package/bin/exiftool_files/lib/IO/Socket/INET.pm +14 -9
  70. package/bin/exiftool_files/lib/IO/Socket/UNIX.pm +17 -1
  71. package/bin/exiftool_files/lib/IO/Socket.pm +474 -126
  72. package/bin/exiftool_files/lib/IO/String.pm +425 -0
  73. package/bin/exiftool_files/lib/IO/Uncompress/Adapter/Inflate.pm +13 -14
  74. package/bin/exiftool_files/lib/IO/Uncompress/Base.pm +142 -132
  75. package/bin/exiftool_files/lib/IO/Uncompress/Brotli.pm +119 -0
  76. package/bin/exiftool_files/lib/IO/Uncompress/Gunzip.pm +43 -37
  77. package/bin/exiftool_files/lib/IO/Uncompress/RawInflate.pm +49 -43
  78. package/bin/exiftool_files/lib/IO.pm +2 -2
  79. package/bin/exiftool_files/lib/List/Util.pm +97 -8
  80. package/bin/exiftool_files/lib/MIME/Base64.pm +5 -5
  81. package/bin/exiftool_files/lib/MIME/Charset/_Compat.pm +106 -0
  82. package/bin/exiftool_files/lib/MIME/Charset.pm +1303 -0
  83. package/bin/exiftool_files/lib/Math/BigFloat.pm +444 -27
  84. package/bin/exiftool_files/lib/Math/BigInt/Calc.pm +296 -313
  85. package/bin/exiftool_files/lib/Math/BigInt/FastCalc.pm +1 -1
  86. package/bin/exiftool_files/lib/Math/BigInt/GMP.pm +2 -115
  87. package/bin/exiftool_files/lib/Math/BigInt/LTM.pm +2 -24
  88. package/bin/exiftool_files/lib/Math/BigInt/Lib.pm +61 -32
  89. package/bin/exiftool_files/lib/Math/BigInt.pm +292 -107
  90. package/bin/exiftool_files/lib/POSIX.pm +1 -1
  91. package/bin/exiftool_files/lib/PerlIO/scalar.pm +41 -0
  92. package/bin/exiftool_files/lib/PerlIO.pm +397 -0
  93. package/bin/exiftool_files/lib/Portable/CPAN.pm +94 -94
  94. package/bin/exiftool_files/lib/Portable/Config.pm +94 -94
  95. package/bin/exiftool_files/lib/Portable/FileSpec.pm +180 -180
  96. package/bin/exiftool_files/lib/Portable/HomeDir.pm +110 -110
  97. package/bin/exiftool_files/lib/Portable/LoadYaml.pm +430 -430
  98. package/bin/exiftool_files/lib/Portable/minicpan.pm +55 -55
  99. package/bin/exiftool_files/lib/Portable.pm +246 -320
  100. package/bin/exiftool_files/lib/Scalar/Util.pm +9 -4
  101. package/bin/exiftool_files/lib/Socket.pm +16 -12
  102. package/bin/exiftool_files/lib/Storable.pm +1444 -1441
  103. package/bin/exiftool_files/lib/TAP/Base.pm +133 -0
  104. package/bin/exiftool_files/lib/TAP/Formatter/Base.pm +467 -0
  105. package/bin/exiftool_files/lib/TAP/Formatter/Color.pm +116 -0
  106. package/bin/exiftool_files/lib/TAP/Formatter/Console/ParallelSession.pm +201 -0
  107. package/bin/exiftool_files/lib/TAP/Formatter/Console/Session.pm +205 -0
  108. package/bin/exiftool_files/lib/TAP/Formatter/Console.pm +100 -0
  109. package/bin/exiftool_files/lib/TAP/Formatter/File/Session.pm +95 -0
  110. package/bin/exiftool_files/lib/TAP/Formatter/File.pm +56 -0
  111. package/bin/exiftool_files/lib/TAP/Formatter/Session.pm +220 -0
  112. package/bin/exiftool_files/lib/TAP/Harness/Beyond.pod +426 -0
  113. package/bin/exiftool_files/lib/TAP/Harness/Env.pm +215 -0
  114. package/bin/exiftool_files/lib/TAP/Harness.pm +1054 -0
  115. package/bin/exiftool_files/lib/TAP/Object.pm +155 -0
  116. package/bin/exiftool_files/lib/TAP/Parser/Aggregator.pm +414 -0
  117. package/bin/exiftool_files/lib/TAP/Parser/Grammar.pm +584 -0
  118. package/bin/exiftool_files/lib/TAP/Parser/Iterator/Array.pm +100 -0
  119. package/bin/exiftool_files/lib/TAP/Parser/Iterator/Process.pm +378 -0
  120. package/bin/exiftool_files/lib/TAP/Parser/Iterator/Stream.pm +116 -0
  121. package/bin/exiftool_files/lib/TAP/Parser/Iterator.pm +162 -0
  122. package/bin/exiftool_files/lib/TAP/Parser/IteratorFactory.pm +339 -0
  123. package/bin/exiftool_files/lib/TAP/Parser/Multiplexer.pm +194 -0
  124. package/bin/exiftool_files/lib/TAP/Parser/Result/Bailout.pm +62 -0
  125. package/bin/exiftool_files/lib/TAP/Parser/Result/Comment.pm +60 -0
  126. package/bin/exiftool_files/lib/TAP/Parser/Result/Plan.pm +119 -0
  127. package/bin/exiftool_files/lib/TAP/Parser/Result/Pragma.pm +62 -0
  128. package/bin/exiftool_files/lib/TAP/Parser/Result/Test.pm +271 -0
  129. package/bin/exiftool_files/lib/TAP/Parser/Result/Unknown.pm +48 -0
  130. package/bin/exiftool_files/lib/TAP/Parser/Result/Version.pm +62 -0
  131. package/bin/exiftool_files/lib/TAP/Parser/Result/YAML.pm +61 -0
  132. package/bin/exiftool_files/lib/TAP/Parser/Result.pm +297 -0
  133. package/bin/exiftool_files/lib/TAP/Parser/ResultFactory.pm +183 -0
  134. package/bin/exiftool_files/lib/TAP/Parser/Scheduler/Job.pm +127 -0
  135. package/bin/exiftool_files/lib/TAP/Parser/Scheduler/Spinner.pm +61 -0
  136. package/bin/exiftool_files/lib/TAP/Parser/Scheduler.pm +448 -0
  137. package/bin/exiftool_files/lib/TAP/Parser/Source.pm +381 -0
  138. package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/Executable.pm +184 -0
  139. package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/File.pm +136 -0
  140. package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/Handle.pm +124 -0
  141. package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/Perl.pm +370 -0
  142. package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/RawTAP.pm +130 -0
  143. package/bin/exiftool_files/lib/TAP/Parser/SourceHandler.pm +191 -0
  144. package/bin/exiftool_files/lib/TAP/Parser/YAMLish/Reader.pm +332 -0
  145. package/bin/exiftool_files/lib/TAP/Parser/YAMLish/Writer.pm +254 -0
  146. package/bin/exiftool_files/lib/TAP/Parser.pm +1931 -0
  147. package/bin/exiftool_files/lib/Test/Builder/Formatter.pm +107 -0
  148. package/bin/exiftool_files/lib/Test/Builder/IO/Scalar.pm +659 -0
  149. package/bin/exiftool_files/lib/Test/Builder/Module.pm +182 -0
  150. package/bin/exiftool_files/lib/Test/Builder/Tester/Color.pm +51 -0
  151. package/bin/exiftool_files/lib/Test/Builder/Tester.pm +675 -0
  152. package/bin/exiftool_files/lib/Test/Builder/TodoDiag.pm +68 -0
  153. package/bin/exiftool_files/lib/Test/Builder.pm +2653 -0
  154. package/bin/exiftool_files/lib/Test/Harness.pm +618 -0
  155. package/bin/exiftool_files/lib/Test/More.pm +1997 -0
  156. package/bin/exiftool_files/lib/Test/Simple.pm +220 -0
  157. package/bin/exiftool_files/lib/Test/Tester/Capture.pm +241 -0
  158. package/bin/exiftool_files/lib/Test/Tester/CaptureRunner.pm +79 -0
  159. package/bin/exiftool_files/lib/Test/Tester/Delegate.pm +45 -0
  160. package/bin/exiftool_files/lib/Test/Tester.pm +695 -0
  161. package/bin/exiftool_files/lib/Test/Tutorial.pod +618 -0
  162. package/bin/exiftool_files/lib/Test/use/ok.pm +64 -0
  163. package/bin/exiftool_files/lib/Text/ParseWords.pm +303 -0
  164. package/bin/exiftool_files/lib/Tie/StdHandle.pm +2 -2
  165. package/bin/exiftool_files/lib/Time/HiRes.pm +73 -68
  166. package/bin/exiftool_files/lib/Time/Local.pm +82 -35
  167. package/bin/exiftool_files/lib/Time/Piece.pm +19 -4
  168. package/bin/exiftool_files/lib/Time/Seconds.pm +1 -1
  169. package/bin/exiftool_files/lib/UNIVERSAL.pm +203 -0
  170. package/bin/exiftool_files/lib/Unicode/GCString.pm +60 -0
  171. package/bin/exiftool_files/lib/Unicode/LineBreak/Constants.pm +68 -0
  172. package/bin/exiftool_files/lib/Unicode/LineBreak.pm +248 -0
  173. package/bin/exiftool_files/lib/Win32/API/Struct.pm +1 -177
  174. package/bin/exiftool_files/lib/Win32/API/Type.pm +1 -100
  175. package/bin/exiftool_files/lib/Win32/API.pm +1 -830
  176. package/bin/exiftool_files/lib/Win32/FindFile.pm +2 -123
  177. package/bin/exiftool_files/lib/Win32.pm +213 -89
  178. package/bin/exiftool_files/lib/Win32API/File.pm +1 -1
  179. package/bin/exiftool_files/lib/auto/B/B.xs.dll +0 -0
  180. package/bin/exiftool_files/lib/auto/Compress/Raw/Bzip2/Bzip2.xs.dll +0 -0
  181. package/bin/exiftool_files/lib/auto/Compress/Raw/Lzma/Lzma.xs.dll +0 -0
  182. package/bin/exiftool_files/lib/auto/Compress/Raw/Lzma/autosplit.ix +3 -0
  183. package/bin/exiftool_files/lib/auto/Compress/Raw/Zlib/Zlib.xs.dll +0 -0
  184. package/bin/exiftool_files/lib/auto/CryptX/CryptX.xs.dll +0 -0
  185. package/bin/exiftool_files/lib/auto/Cwd/Cwd.xs.dll +0 -0
  186. package/bin/exiftool_files/lib/auto/Data/Dumper/Dumper.xs.dll +0 -0
  187. package/bin/exiftool_files/lib/auto/Digest/MD5/MD5.xs.dll +0 -0
  188. package/bin/exiftool_files/lib/auto/Digest/SHA/SHA.xs.dll +0 -0
  189. package/bin/exiftool_files/lib/auto/Encode/Encode.xs.dll +0 -0
  190. package/bin/exiftool_files/lib/auto/Fcntl/Fcntl.xs.dll +0 -0
  191. package/bin/exiftool_files/lib/auto/File/Glob/Glob.xs.dll +0 -0
  192. package/bin/exiftool_files/lib/auto/IO/Compress/Brotli/Brotli.xs.dll +0 -0
  193. package/bin/exiftool_files/lib/auto/IO/IO.xs.dll +0 -0
  194. package/bin/exiftool_files/lib/auto/List/Util/Util.xs.dll +0 -0
  195. package/bin/exiftool_files/lib/auto/MIME/Base64/Base64.xs.dll +0 -0
  196. package/bin/exiftool_files/lib/auto/Math/BigInt/FastCalc/FastCalc.xs.dll +0 -0
  197. package/bin/exiftool_files/lib/auto/Math/BigInt/GMP/GMP.xs.dll +0 -0
  198. package/bin/exiftool_files/lib/auto/POSIX/POSIX.xs.dll +0 -0
  199. package/bin/exiftool_files/lib/auto/PerlIO/scalar/scalar.xs.dll +0 -0
  200. package/bin/exiftool_files/lib/auto/Socket/Socket.xs.dll +0 -0
  201. package/bin/exiftool_files/lib/auto/Storable/Storable.xs.dll +0 -0
  202. package/bin/exiftool_files/lib/auto/Time/HiRes/HiRes.xs.dll +0 -0
  203. package/bin/exiftool_files/lib/auto/Time/Piece/Piece.xs.dll +0 -0
  204. package/bin/exiftool_files/lib/auto/Unicode/LineBreak/LineBreak.xs.dll +0 -0
  205. package/bin/exiftool_files/lib/auto/Win32/API/API.xs.dll +0 -0
  206. package/bin/exiftool_files/lib/auto/Win32/FindFile/FindFile.xs.dll +0 -0
  207. package/bin/exiftool_files/lib/auto/Win32/Win32.xs.dll +0 -0
  208. package/bin/exiftool_files/lib/auto/Win32API/File/File.xs.dll +0 -0
  209. package/bin/exiftool_files/lib/auto/mro/mro.xs.dll +0 -0
  210. package/bin/exiftool_files/lib/auto/re/re.xs.dll +0 -0
  211. package/bin/exiftool_files/lib/feature.pm +49 -17
  212. package/bin/exiftool_files/lib/mro.pm +4 -20
  213. package/bin/exiftool_files/lib/overload.pm +15 -15
  214. package/bin/exiftool_files/lib/parent.pm +10 -2
  215. package/bin/exiftool_files/lib/re.pm +91 -33
  216. package/bin/exiftool_files/lib/warnings.pm +17 -6
  217. package/bin/exiftool_files/libgcc_s_seh-1.dll +0 -0
  218. package/bin/exiftool_files/liblzma-5__.dll +0 -0
  219. package/bin/exiftool_files/libstdc++-6.dll +0 -0
  220. package/bin/exiftool_files/libwinpthread-1.dll +0 -0
  221. package/bin/exiftool_files/perl.exe +0 -0
  222. package/bin/exiftool_files/perl532.dll +0 -0
  223. package/package.json +5 -3
  224. package/bin/exiftool_files/libgcc_s_dw2-1.dll +0 -0
  225. package/bin/exiftool_files/perl530.dll +0 -0
@@ -0,0 +1,425 @@
1
+ package IO::String;
2
+
3
+ # Copyright 1998-2005 Gisle Aas.
4
+ #
5
+ # This library is free software; you can redistribute it and/or
6
+ # modify it under the same terms as Perl itself.
7
+
8
+ require 5.005_03;
9
+ use strict;
10
+ use vars qw($VERSION $DEBUG $IO_CONSTANTS);
11
+ $VERSION = "1.08"; # $Date: 2005/12/05 12:00:47 $
12
+
13
+ use Symbol ();
14
+
15
+ sub new
16
+ {
17
+ my $class = shift;
18
+ my $self = bless Symbol::gensym(), ref($class) || $class;
19
+ tie *$self, $self;
20
+ $self->open(@_);
21
+ return $self;
22
+ }
23
+
24
+ sub open
25
+ {
26
+ my $self = shift;
27
+ return $self->new(@_) unless ref($self);
28
+
29
+ if (@_) {
30
+ my $bufref = ref($_[0]) ? $_[0] : \$_[0];
31
+ $$bufref = "" unless defined $$bufref;
32
+ *$self->{buf} = $bufref;
33
+ }
34
+ else {
35
+ my $buf = "";
36
+ *$self->{buf} = \$buf;
37
+ }
38
+ *$self->{pos} = 0;
39
+ *$self->{lno} = 0;
40
+ return $self;
41
+ }
42
+
43
+ sub pad
44
+ {
45
+ my $self = shift;
46
+ my $old = *$self->{pad};
47
+ *$self->{pad} = substr($_[0], 0, 1) if @_;
48
+ return "\0" unless defined($old) && length($old);
49
+ return $old;
50
+ }
51
+
52
+ sub dump
53
+ {
54
+ require Data::Dumper;
55
+ my $self = shift;
56
+ print Data::Dumper->Dump([$self], ['*self']);
57
+ print Data::Dumper->Dump([*$self{HASH}], ['$self{HASH}']);
58
+ return;
59
+ }
60
+
61
+ sub TIEHANDLE
62
+ {
63
+ print "TIEHANDLE @_\n" if $DEBUG;
64
+ return $_[0] if ref($_[0]);
65
+ my $class = shift;
66
+ my $self = bless Symbol::gensym(), $class;
67
+ $self->open(@_);
68
+ return $self;
69
+ }
70
+
71
+ sub DESTROY
72
+ {
73
+ print "DESTROY @_\n" if $DEBUG;
74
+ }
75
+
76
+ sub close
77
+ {
78
+ my $self = shift;
79
+ delete *$self->{buf};
80
+ delete *$self->{pos};
81
+ delete *$self->{lno};
82
+ undef *$self if $] eq "5.008"; # workaround for some bug
83
+ return 1;
84
+ }
85
+
86
+ sub opened
87
+ {
88
+ my $self = shift;
89
+ return defined *$self->{buf};
90
+ }
91
+
92
+ sub binmode
93
+ {
94
+ my $self = shift;
95
+ return 1 unless @_;
96
+ # XXX don't know much about layers yet :-(
97
+ return 0;
98
+ }
99
+
100
+ sub getc
101
+ {
102
+ my $self = shift;
103
+ my $buf;
104
+ return $buf if $self->read($buf, 1);
105
+ return undef;
106
+ }
107
+
108
+ sub ungetc
109
+ {
110
+ my $self = shift;
111
+ $self->setpos($self->getpos() - 1);
112
+ return 1;
113
+ }
114
+
115
+ sub eof
116
+ {
117
+ my $self = shift;
118
+ return length(${*$self->{buf}}) <= *$self->{pos};
119
+ }
120
+
121
+ sub print
122
+ {
123
+ my $self = shift;
124
+ if (defined $\) {
125
+ if (defined $,) {
126
+ $self->write(join($,, @_).$\);
127
+ }
128
+ else {
129
+ $self->write(join("",@_).$\);
130
+ }
131
+ }
132
+ else {
133
+ if (defined $,) {
134
+ $self->write(join($,, @_));
135
+ }
136
+ else {
137
+ $self->write(join("",@_));
138
+ }
139
+ }
140
+ return 1;
141
+ }
142
+ *printflush = \*print;
143
+
144
+ sub printf
145
+ {
146
+ my $self = shift;
147
+ print "PRINTF(@_)\n" if $DEBUG;
148
+ my $fmt = shift;
149
+ $self->write(sprintf($fmt, @_));
150
+ return 1;
151
+ }
152
+
153
+
154
+ my($SEEK_SET, $SEEK_CUR, $SEEK_END);
155
+
156
+ sub _init_seek_constants
157
+ {
158
+ if ($IO_CONSTANTS) {
159
+ require IO::Handle;
160
+ $SEEK_SET = &IO::Handle::SEEK_SET;
161
+ $SEEK_CUR = &IO::Handle::SEEK_CUR;
162
+ $SEEK_END = &IO::Handle::SEEK_END;
163
+ }
164
+ else {
165
+ $SEEK_SET = 0;
166
+ $SEEK_CUR = 1;
167
+ $SEEK_END = 2;
168
+ }
169
+ }
170
+
171
+
172
+ sub seek
173
+ {
174
+ my($self,$off,$whence) = @_;
175
+ my $buf = *$self->{buf} || return 0;
176
+ my $len = length($$buf);
177
+ my $pos = *$self->{pos};
178
+
179
+ _init_seek_constants() unless defined $SEEK_SET;
180
+
181
+ if ($whence == $SEEK_SET) { $pos = $off }
182
+ elsif ($whence == $SEEK_CUR) { $pos += $off }
183
+ elsif ($whence == $SEEK_END) { $pos = $len + $off }
184
+ else { die "Bad whence ($whence)" }
185
+ print "SEEK(POS=$pos,OFF=$off,LEN=$len)\n" if $DEBUG;
186
+
187
+ $pos = 0 if $pos < 0;
188
+ $self->truncate($pos) if $pos > $len; # extend file
189
+ *$self->{pos} = $pos;
190
+ return 1;
191
+ }
192
+
193
+ sub pos
194
+ {
195
+ my $self = shift;
196
+ my $old = *$self->{pos};
197
+ if (@_) {
198
+ my $pos = shift || 0;
199
+ my $buf = *$self->{buf};
200
+ my $len = $buf ? length($$buf) : 0;
201
+ $pos = $len if $pos > $len;
202
+ *$self->{pos} = $pos;
203
+ }
204
+ return $old;
205
+ }
206
+
207
+ sub getpos { shift->pos; }
208
+
209
+ *sysseek = \&seek;
210
+ *setpos = \&pos;
211
+ *tell = \&getpos;
212
+
213
+
214
+
215
+ sub getline
216
+ {
217
+ my $self = shift;
218
+ my $buf = *$self->{buf} || return;
219
+ my $len = length($$buf);
220
+ my $pos = *$self->{pos};
221
+ return if $pos >= $len;
222
+
223
+ unless (defined $/) { # slurp
224
+ *$self->{pos} = $len;
225
+ return substr($$buf, $pos);
226
+ }
227
+
228
+ unless (length $/) { # paragraph mode
229
+ # XXX slow&lazy implementation using getc()
230
+ my $para = "";
231
+ my $eol = 0;
232
+ my $c;
233
+ while (defined($c = $self->getc)) {
234
+ if ($c eq "\n") {
235
+ $eol++;
236
+ next if $eol > 2;
237
+ }
238
+ elsif ($eol > 1) {
239
+ $self->ungetc($c);
240
+ last;
241
+ }
242
+ else {
243
+ $eol = 0;
244
+ }
245
+ $para .= $c;
246
+ }
247
+ return $para; # XXX wantarray
248
+ }
249
+
250
+ my $idx = index($$buf,$/,$pos);
251
+ if ($idx < 0) {
252
+ # return rest of it
253
+ *$self->{pos} = $len;
254
+ $. = ++ *$self->{lno};
255
+ return substr($$buf, $pos);
256
+ }
257
+ $len = $idx - $pos + length($/);
258
+ *$self->{pos} += $len;
259
+ $. = ++ *$self->{lno};
260
+ return substr($$buf, $pos, $len);
261
+ }
262
+
263
+ sub getlines
264
+ {
265
+ die "getlines() called in scalar context\n" unless wantarray;
266
+ my $self = shift;
267
+ my($line, @lines);
268
+ push(@lines, $line) while defined($line = $self->getline);
269
+ return @lines;
270
+ }
271
+
272
+ sub READLINE
273
+ {
274
+ goto &getlines if wantarray;
275
+ goto &getline;
276
+ }
277
+
278
+ sub input_line_number
279
+ {
280
+ my $self = shift;
281
+ my $old = *$self->{lno};
282
+ *$self->{lno} = shift if @_;
283
+ return $old;
284
+ }
285
+
286
+ sub truncate
287
+ {
288
+ my $self = shift;
289
+ my $len = shift || 0;
290
+ my $buf = *$self->{buf};
291
+ if (length($$buf) >= $len) {
292
+ substr($$buf, $len) = '';
293
+ *$self->{pos} = $len if $len < *$self->{pos};
294
+ }
295
+ else {
296
+ $$buf .= ($self->pad x ($len - length($$buf)));
297
+ }
298
+ return 1;
299
+ }
300
+
301
+ sub read
302
+ {
303
+ my $self = shift;
304
+ my $buf = *$self->{buf};
305
+ return undef unless $buf;
306
+
307
+ my $pos = *$self->{pos};
308
+ my $rem = length($$buf) - $pos;
309
+ my $len = $_[1];
310
+ $len = $rem if $len > $rem;
311
+ return undef if $len < 0;
312
+ if (@_ > 2) { # read offset
313
+ substr($_[0],$_[2]) = substr($$buf, $pos, $len);
314
+ }
315
+ else {
316
+ $_[0] = substr($$buf, $pos, $len);
317
+ }
318
+ *$self->{pos} += $len;
319
+ return $len;
320
+ }
321
+
322
+ sub write
323
+ {
324
+ my $self = shift;
325
+ my $buf = *$self->{buf};
326
+ return unless $buf;
327
+
328
+ my $pos = *$self->{pos};
329
+ my $slen = length($_[0]);
330
+ my $len = $slen;
331
+ my $off = 0;
332
+ if (@_ > 1) {
333
+ $len = $_[1] if $_[1] < $len;
334
+ if (@_ > 2) {
335
+ $off = $_[2] || 0;
336
+ die "Offset outside string" if $off > $slen;
337
+ if ($off < 0) {
338
+ $off += $slen;
339
+ die "Offset outside string" if $off < 0;
340
+ }
341
+ my $rem = $slen - $off;
342
+ $len = $rem if $rem < $len;
343
+ }
344
+ }
345
+ substr($$buf, $pos, $len) = substr($_[0], $off, $len);
346
+ *$self->{pos} += $len;
347
+ return $len;
348
+ }
349
+
350
+ *sysread = \&read;
351
+ *syswrite = \&write;
352
+
353
+ sub stat
354
+ {
355
+ my $self = shift;
356
+ return unless $self->opened;
357
+ return 1 unless wantarray;
358
+ my $len = length ${*$self->{buf}};
359
+
360
+ return (
361
+ undef, undef, # dev, ino
362
+ 0666, # filemode
363
+ 1, # links
364
+ $>, # user id
365
+ $), # group id
366
+ undef, # device id
367
+ $len, # size
368
+ undef, # atime
369
+ undef, # mtime
370
+ undef, # ctime
371
+ 512, # blksize
372
+ int(($len+511)/512) # blocks
373
+ );
374
+ }
375
+
376
+ sub FILENO {
377
+ return undef; # XXX perlfunc says this means the file is closed
378
+ }
379
+
380
+ sub blocking {
381
+ my $self = shift;
382
+ my $old = *$self->{blocking} || 0;
383
+ *$self->{blocking} = shift if @_;
384
+ return $old;
385
+ }
386
+
387
+ my $notmuch = sub { return };
388
+
389
+ *fileno = $notmuch;
390
+ *error = $notmuch;
391
+ *clearerr = $notmuch;
392
+ *sync = $notmuch;
393
+ *flush = $notmuch;
394
+ *setbuf = $notmuch;
395
+ *setvbuf = $notmuch;
396
+
397
+ *untaint = $notmuch;
398
+ *autoflush = $notmuch;
399
+ *fcntl = $notmuch;
400
+ *ioctl = $notmuch;
401
+
402
+ *GETC = \&getc;
403
+ *PRINT = \&print;
404
+ *PRINTF = \&printf;
405
+ *READ = \&read;
406
+ *WRITE = \&write;
407
+ *SEEK = \&seek;
408
+ *TELL = \&getpos;
409
+ *EOF = \&eof;
410
+ *CLOSE = \&close;
411
+ *BINMODE = \&binmode;
412
+
413
+
414
+ sub string_ref
415
+ {
416
+ my $self = shift;
417
+ return *$self->{buf};
418
+ }
419
+ *sref = \&string_ref;
420
+
421
+ 1;
422
+
423
+ __END__
424
+
425
+ #line 552
@@ -4,11 +4,11 @@ use strict;
4
4
  use warnings;
5
5
  use bytes;
6
6
 
7
- use IO::Compress::Base::Common 2.086 qw(:Status);
8
- use Compress::Raw::Zlib 2.086 qw(Z_OK Z_BUF_ERROR Z_STREAM_END Z_FINISH MAX_WBITS);
7
+ use IO::Compress::Base::Common 2.100 qw(:Status);
8
+ use Compress::Raw::Zlib 2.100 qw(Z_OK Z_BUF_ERROR Z_STREAM_END Z_FINISH MAX_WBITS);
9
9
 
10
10
  our ($VERSION);
11
- $VERSION = '2.086';
11
+ $VERSION = '2.100';
12
12
 
13
13
 
14
14
 
@@ -23,23 +23,23 @@ sub mkUncompObject
23
23
 
24
24
  if ($scan)
25
25
  {
26
- ($inflate, $status) = new Compress::Raw::Zlib::InflateScan
26
+ ($inflate, $status) = Compress::Raw::Zlib::InflateScan->new(
27
27
  #LimitOutput => 1,
28
28
  CRC32 => $crc32,
29
29
  ADLER32 => $adler32,
30
- WindowBits => - MAX_WBITS ;
30
+ WindowBits => - MAX_WBITS );
31
31
  }
32
32
  else
33
33
  {
34
- ($inflate, $status) = new Compress::Raw::Zlib::Inflate
34
+ ($inflate, $status) = Compress::Raw::Zlib::Inflate->new(
35
35
  AppendOutput => 1,
36
36
  LimitOutput => 1,
37
37
  CRC32 => $crc32,
38
38
  ADLER32 => $adler32,
39
- WindowBits => - MAX_WBITS ;
39
+ WindowBits => - MAX_WBITS );
40
40
  }
41
41
 
42
- return (undef, "Could not create Inflation object: $status", $status)
42
+ return (undef, "Could not create Inflation object: $status", $status)
43
43
  if $status != Z_OK ;
44
44
 
45
45
  return bless {'Inf' => $inflate,
@@ -47,8 +47,8 @@ sub mkUncompObject
47
47
  'UnCompSize' => 0,
48
48
  'Error' => '',
49
49
  'ConsumesInput' => 1,
50
- } ;
51
-
50
+ } ;
51
+
52
52
  }
53
53
 
54
54
  sub uncompr
@@ -67,7 +67,7 @@ sub uncompr
67
67
  $self->{Error} = "Inflation Error: $status";
68
68
  return STATUS_ERROR;
69
69
  }
70
-
70
+
71
71
  return STATUS_OK if $status == Z_BUF_ERROR ; # ???
72
72
  return STATUS_OK if $status == Z_OK ;
73
73
  return STATUS_ENDSTREAM if $status == Z_STREAM_END ;
@@ -115,8 +115,8 @@ sub adler32
115
115
  sub sync
116
116
  {
117
117
  my $self = shift ;
118
- ( $self->{Inf}->inflateSync(@_) == Z_OK)
119
- ? STATUS_OK
118
+ ( $self->{Inf}->inflateSync(@_) == Z_OK)
119
+ ? STATUS_OK
120
120
  : STATUS_ERROR ;
121
121
  }
122
122
 
@@ -154,4 +154,3 @@ sub createDeflateStream
154
154
 
155
155
 
156
156
  __END__
157
-