gosu 0.7.16 → 0.7.17
Sign up to get free protection for your applications and to get access to all the features.
- data/Gosu/Version.hpp +2 -2
- data/GosuImpl/AudioFmod.cpp +7 -1
- data/GosuImpl/RubyGosuStub.mm +4 -1
- data/GosuImpl/RubyGosu_wrap.cxx +2 -2
- data/GosuImpl/TimingUnix.cpp +4 -1
- data/GosuImpl/TimingWin.cpp +31 -28
- data/GosuImpl/WindowWin.cpp +4 -0
- data/Rakefile +12 -18
- data/examples/ChipmunkIntegration.rb +1 -1
- data/examples/OpenGLIntegration.rb +1 -1
- data/examples/RMagickIntegration.rb +1 -1
- data/examples/Tutorial.cpp +2 -2
- data/examples/Tutorial.rb +1 -1
- data/lib/gosu/patches.rb +2 -2
- data/reference/cpp/_version_8hpp.html +4 -4
- data/reference/cpp/_version_8hpp_source.html +2 -2
- data/reference/rdoc/classes/Gosu.html +10 -10
- data/reference/rdoc/classes/Gosu/Color.html +3 -3
- data/reference/rdoc/classes/Gosu/Font.html +5 -5
- data/reference/rdoc/classes/Gosu/Image.html +9 -9
- data/reference/rdoc/classes/Gosu/Sample.html +3 -3
- data/reference/rdoc/classes/Gosu/SampleInstance.html +5 -5
- data/reference/rdoc/classes/Gosu/Song.html +7 -7
- data/reference/rdoc/classes/Gosu/TextInput.html +1 -1
- data/reference/rdoc/classes/Gosu/Window.html +17 -17
- data/reference/rdoc/classes/Numeric.html +2 -2
- data/reference/rdoc/created.rid +1 -1
- metadata +2 -912
- data/dependencies/libogg/AUTHORS +0 -4
- data/dependencies/libogg/CHANGES +0 -33
- data/dependencies/libogg/COPYING +0 -28
- data/dependencies/libogg/Makefile.am +0 -32
- data/dependencies/libogg/Makefile.in +0 -713
- data/dependencies/libogg/README +0 -103
- data/dependencies/libogg/aclocal.m4 +0 -6807
- data/dependencies/libogg/compile +0 -142
- data/dependencies/libogg/config.guess +0 -1465
- data/dependencies/libogg/config.h.in +0 -70
- data/dependencies/libogg/config.sub +0 -1569
- data/dependencies/libogg/configure +0 -23018
- data/dependencies/libogg/configure.in +0 -301
- data/dependencies/libogg/debian/changelog +0 -68
- data/dependencies/libogg/debian/control +0 -22
- data/dependencies/libogg/debian/copyright +0 -37
- data/dependencies/libogg/debian/libogg-dev.docs +0 -1
- data/dependencies/libogg/debian/libogg-dev.install +0 -8
- data/dependencies/libogg/debian/libogg0.README.Debian +0 -6
- data/dependencies/libogg/debian/libogg0.install +0 -1
- data/dependencies/libogg/debian/rules +0 -154
- data/dependencies/libogg/debian/watch +0 -3
- data/dependencies/libogg/depcomp +0 -529
- data/dependencies/libogg/doc/Makefile.am +0 -11
- data/dependencies/libogg/doc/Makefile.in +0 -518
- data/dependencies/libogg/doc/framing.html +0 -431
- data/dependencies/libogg/doc/index.html +0 -104
- data/dependencies/libogg/doc/libogg/Makefile.am +0 -28
- data/dependencies/libogg/doc/libogg/Makefile.in +0 -378
- data/dependencies/libogg/doc/libogg/bitpacking.html +0 -99
- data/dependencies/libogg/doc/libogg/datastructures.html +0 -59
- data/dependencies/libogg/doc/libogg/decoding.html +0 -100
- data/dependencies/libogg/doc/libogg/encoding.html +0 -64
- data/dependencies/libogg/doc/libogg/general.html +0 -105
- data/dependencies/libogg/doc/libogg/index.html +0 -39
- data/dependencies/libogg/doc/libogg/ogg_packet.html +0 -75
- data/dependencies/libogg/doc/libogg/ogg_packet_clear.html +0 -62
- data/dependencies/libogg/doc/libogg/ogg_page.html +0 -74
- data/dependencies/libogg/doc/libogg/ogg_page_bos.html +0 -65
- data/dependencies/libogg/doc/libogg/ogg_page_checksum_set.html +0 -62
- data/dependencies/libogg/doc/libogg/ogg_page_continued.html +0 -64
- data/dependencies/libogg/doc/libogg/ogg_page_eos.html +0 -65
- data/dependencies/libogg/doc/libogg/ogg_page_granulepos.html +0 -65
- data/dependencies/libogg/doc/libogg/ogg_page_packets.html +0 -75
- data/dependencies/libogg/doc/libogg/ogg_page_pageno.html +0 -63
- data/dependencies/libogg/doc/libogg/ogg_page_serialno.html +0 -63
- data/dependencies/libogg/doc/libogg/ogg_page_version.html +0 -63
- data/dependencies/libogg/doc/libogg/ogg_stream_clear.html +0 -61
- data/dependencies/libogg/doc/libogg/ogg_stream_destroy.html +0 -62
- data/dependencies/libogg/doc/libogg/ogg_stream_eos.html +0 -62
- data/dependencies/libogg/doc/libogg/ogg_stream_flush.html +0 -67
- data/dependencies/libogg/doc/libogg/ogg_stream_init.html +0 -66
- data/dependencies/libogg/doc/libogg/ogg_stream_packetin.html +0 -65
- data/dependencies/libogg/doc/libogg/ogg_stream_packetout.html +0 -71
- data/dependencies/libogg/doc/libogg/ogg_stream_packetpeek.html +0 -85
- data/dependencies/libogg/doc/libogg/ogg_stream_pagein.html +0 -67
- data/dependencies/libogg/doc/libogg/ogg_stream_pageout.html +0 -66
- data/dependencies/libogg/doc/libogg/ogg_stream_reset.html +0 -61
- data/dependencies/libogg/doc/libogg/ogg_stream_reset_serialno.html +0 -67
- data/dependencies/libogg/doc/libogg/ogg_stream_state.html +0 -121
- data/dependencies/libogg/doc/libogg/ogg_sync_buffer.html +0 -67
- data/dependencies/libogg/doc/libogg/ogg_sync_clear.html +0 -62
- data/dependencies/libogg/doc/libogg/ogg_sync_destroy.html +0 -62
- data/dependencies/libogg/doc/libogg/ogg_sync_init.html +0 -63
- data/dependencies/libogg/doc/libogg/ogg_sync_pageout.html +0 -79
- data/dependencies/libogg/doc/libogg/ogg_sync_pageseek.html +0 -68
- data/dependencies/libogg/doc/libogg/ogg_sync_reset.html +0 -63
- data/dependencies/libogg/doc/libogg/ogg_sync_state.html +0 -67
- data/dependencies/libogg/doc/libogg/ogg_sync_wrote.html +0 -73
- data/dependencies/libogg/doc/libogg/oggpack_adv.html +0 -64
- data/dependencies/libogg/doc/libogg/oggpack_adv1.html +0 -62
- data/dependencies/libogg/doc/libogg/oggpack_bits.html +0 -62
- data/dependencies/libogg/doc/libogg/oggpack_buffer.html +0 -66
- data/dependencies/libogg/doc/libogg/oggpack_bytes.html +0 -62
- data/dependencies/libogg/doc/libogg/oggpack_get_buffer.html +0 -62
- data/dependencies/libogg/doc/libogg/oggpack_look.html +0 -66
- data/dependencies/libogg/doc/libogg/oggpack_look1.html +0 -63
- data/dependencies/libogg/doc/libogg/oggpack_read.html +0 -65
- data/dependencies/libogg/doc/libogg/oggpack_read1.html +0 -63
- data/dependencies/libogg/doc/libogg/oggpack_readinit.html +0 -64
- data/dependencies/libogg/doc/libogg/oggpack_reset.html +0 -62
- data/dependencies/libogg/doc/libogg/oggpack_write.html +0 -68
- data/dependencies/libogg/doc/libogg/oggpack_writealign.html +0 -65
- data/dependencies/libogg/doc/libogg/oggpack_writeclear.html +0 -62
- data/dependencies/libogg/doc/libogg/oggpack_writecopy.html +0 -69
- data/dependencies/libogg/doc/libogg/oggpack_writeinit.html +0 -62
- data/dependencies/libogg/doc/libogg/oggpack_writetrunc.html +0 -65
- data/dependencies/libogg/doc/libogg/overview.html +0 -44
- data/dependencies/libogg/doc/libogg/reference.html +0 -93
- data/dependencies/libogg/doc/libogg/style.css +0 -7
- data/dependencies/libogg/doc/libogg/vorbis_comment.html +0 -70
- data/dependencies/libogg/doc/libogg/vorbis_info.html +0 -80
- data/dependencies/libogg/doc/ogg-multiplex.html +0 -445
- data/dependencies/libogg/doc/oggstream.html +0 -234
- data/dependencies/libogg/doc/rfc3533.txt +0 -843
- data/dependencies/libogg/doc/rfc3534.txt +0 -339
- data/dependencies/libogg/doc/stream.png +0 -0
- data/dependencies/libogg/doc/vorbisword2.png +0 -0
- data/dependencies/libogg/doc/white-ogg.png +0 -0
- data/dependencies/libogg/doc/white-xifish.png +0 -0
- data/dependencies/libogg/include/Makefile.am +0 -3
- data/dependencies/libogg/include/Makefile.in +0 -481
- data/dependencies/libogg/include/ogg/Makefile.am +0 -6
- data/dependencies/libogg/include/ogg/Makefile.in +0 -428
- data/dependencies/libogg/include/ogg/config_types.h.in +0 -11
- data/dependencies/libogg/include/ogg/ogg.h +0 -202
- data/dependencies/libogg/include/ogg/os_types.h +0 -127
- data/dependencies/libogg/install-sh +0 -323
- data/dependencies/libogg/libogg.spec +0 -106
- data/dependencies/libogg/libogg.spec.in +0 -106
- data/dependencies/libogg/ltmain.sh +0 -6426
- data/dependencies/libogg/macos/compat/strdup.c +0 -21
- data/dependencies/libogg/macos/compat/sys/types.h +0 -1
- data/dependencies/libogg/macos/libogg.mcp +0 -0
- data/dependencies/libogg/macos/libogg.mcp.exp +0 -64
- data/dependencies/libogg/macosx/English.lproj/InfoPlist.strings +0 -0
- data/dependencies/libogg/macosx/Info.plist +0 -30
- data/dependencies/libogg/macosx/Ogg.xcodeproj/project.pbxproj +0 -303
- data/dependencies/libogg/macosx/Ogg_Prefix.pch +0 -5
- data/dependencies/libogg/missing +0 -357
- data/dependencies/libogg/ogg-uninstalled.pc.in +0 -14
- data/dependencies/libogg/ogg.m4 +0 -102
- data/dependencies/libogg/ogg.pc.in +0 -14
- data/dependencies/libogg/src/Makefile.am +0 -28
- data/dependencies/libogg/src/Makefile.in +0 -536
- data/dependencies/libogg/src/bitwise.c +0 -784
- data/dependencies/libogg/src/framing.c +0 -1800
- data/dependencies/libogg/win32/Makefile.am +0 -5
- data/dependencies/libogg/win32/Makefile.in +0 -327
- data/dependencies/libogg/win32/build_ogg_dynamic.bat +0 -18
- data/dependencies/libogg/win32/build_ogg_dynamic_debug.bat +0 -18
- data/dependencies/libogg/win32/build_ogg_static.bat +0 -18
- data/dependencies/libogg/win32/build_ogg_static_debug.bat +0 -18
- data/dependencies/libogg/win32/ogg.def +0 -78
- data/dependencies/libogg/win32/ogg.dsw +0 -41
- data/dependencies/libogg/win32/ogg_dynamic.dsp +0 -128
- data/dependencies/libogg/win32/ogg_static.dsp +0 -108
- data/dependencies/libpng/ANNOUNCE +0 -61
- data/dependencies/libpng/CHANGES +0 -2173
- data/dependencies/libpng/INSTALL +0 -199
- data/dependencies/libpng/KNOWNBUG +0 -22
- data/dependencies/libpng/LICENSE +0 -109
- data/dependencies/libpng/README +0 -264
- data/dependencies/libpng/TODO +0 -24
- data/dependencies/libpng/Y2KINFO +0 -55
- data/dependencies/libpng/configure +0 -13
- data/dependencies/libpng/contrib/gregbook/COPYING +0 -340
- data/dependencies/libpng/contrib/gregbook/LICENSE +0 -50
- data/dependencies/libpng/contrib/gregbook/Makefile.mingw32 +0 -130
- data/dependencies/libpng/contrib/gregbook/Makefile.sgi +0 -104
- data/dependencies/libpng/contrib/gregbook/Makefile.unx +0 -132
- data/dependencies/libpng/contrib/gregbook/Makefile.w32 +0 -113
- data/dependencies/libpng/contrib/gregbook/README +0 -186
- data/dependencies/libpng/contrib/gregbook/makevms.com +0 -132
- data/dependencies/libpng/contrib/gregbook/readpng.c +0 -304
- data/dependencies/libpng/contrib/gregbook/readpng.h +0 -88
- data/dependencies/libpng/contrib/gregbook/readpng2.c +0 -645
- data/dependencies/libpng/contrib/gregbook/readpng2.h +0 -121
- data/dependencies/libpng/contrib/gregbook/readppm.c +0 -179
- data/dependencies/libpng/contrib/gregbook/rpng-win.c +0 -684
- data/dependencies/libpng/contrib/gregbook/rpng-x.c +0 -904
- data/dependencies/libpng/contrib/gregbook/rpng2-win.c +0 -1225
- data/dependencies/libpng/contrib/gregbook/rpng2-x.c +0 -2127
- data/dependencies/libpng/contrib/gregbook/toucan.png +0 -0
- data/dependencies/libpng/contrib/gregbook/wpng.c +0 -853
- data/dependencies/libpng/contrib/gregbook/writepng.c +0 -392
- data/dependencies/libpng/contrib/gregbook/writepng.h +0 -133
- data/dependencies/libpng/contrib/pngminim/decoder/README +0 -6
- data/dependencies/libpng/contrib/pngminim/decoder/gather.sh +0 -8
- data/dependencies/libpng/contrib/pngminim/decoder/makefile.std +0 -44
- data/dependencies/libpng/contrib/pngminim/decoder/pngusr.h +0 -67
- data/dependencies/libpng/contrib/pngminim/encoder/README +0 -6
- data/dependencies/libpng/contrib/pngminim/encoder/dummy_inflate.c +0 -27
- data/dependencies/libpng/contrib/pngminim/encoder/gather.sh +0 -9
- data/dependencies/libpng/contrib/pngminim/encoder/makefile.std +0 -43
- data/dependencies/libpng/contrib/pngminim/encoder/pngusr.h +0 -66
- data/dependencies/libpng/contrib/pngminus/README +0 -153
- data/dependencies/libpng/contrib/pngminus/makefile.std +0 -65
- data/dependencies/libpng/contrib/pngminus/makefile.tc3 +0 -38
- data/dependencies/libpng/contrib/pngminus/makevms.com +0 -92
- data/dependencies/libpng/contrib/pngminus/png2pnm.bat +0 -41
- data/dependencies/libpng/contrib/pngminus/png2pnm.c +0 -430
- data/dependencies/libpng/contrib/pngminus/png2pnm.sh +0 -42
- data/dependencies/libpng/contrib/pngminus/pngminus.bat +0 -4
- data/dependencies/libpng/contrib/pngminus/pngminus.sh +0 -5
- data/dependencies/libpng/contrib/pngminus/pnm2png.bat +0 -41
- data/dependencies/libpng/contrib/pngminus/pnm2png.c +0 -533
- data/dependencies/libpng/contrib/pngminus/pnm2png.sh +0 -42
- data/dependencies/libpng/contrib/pngsuite/basn0g01.png +0 -0
- data/dependencies/libpng/contrib/pngsuite/basn0g02.png +0 -0
- data/dependencies/libpng/contrib/pngsuite/basn0g04.png +0 -0
- data/dependencies/libpng/contrib/pngsuite/basn0g08.png +0 -0
- data/dependencies/libpng/contrib/pngsuite/basn0g16.png +0 -0
- data/dependencies/libpng/contrib/pngsuite/basn2c08.png +0 -0
- data/dependencies/libpng/contrib/pngsuite/basn2c16.png +0 -0
- data/dependencies/libpng/contrib/pngsuite/basn3p01.png +0 -0
- data/dependencies/libpng/contrib/pngsuite/basn3p02.png +0 -0
- data/dependencies/libpng/contrib/pngsuite/basn3p04.png +0 -0
- data/dependencies/libpng/contrib/pngsuite/basn3p08.png +0 -0
- data/dependencies/libpng/contrib/pngsuite/basn4a08.png +0 -0
- data/dependencies/libpng/contrib/pngsuite/basn4a16.png +0 -0
- data/dependencies/libpng/contrib/pngsuite/basn6a08.png +0 -0
- data/dependencies/libpng/contrib/pngsuite/basn6a16.png +0 -0
- data/dependencies/libpng/contrib/visupng/PngFile.c +0 -439
- data/dependencies/libpng/contrib/visupng/PngFile.h +0 -27
- data/dependencies/libpng/contrib/visupng/README.txt +0 -58
- data/dependencies/libpng/contrib/visupng/VisualPng.c +0 -961
- data/dependencies/libpng/contrib/visupng/VisualPng.dsp +0 -147
- data/dependencies/libpng/contrib/visupng/VisualPng.dsw +0 -29
- data/dependencies/libpng/contrib/visupng/VisualPng.ico +0 -0
- data/dependencies/libpng/contrib/visupng/VisualPng.png +0 -0
- data/dependencies/libpng/contrib/visupng/VisualPng.rc +0 -152
- data/dependencies/libpng/contrib/visupng/cexcept.h +0 -243
- data/dependencies/libpng/contrib/visupng/resource.h +0 -23
- data/dependencies/libpng/example.c +0 -814
- data/dependencies/libpng/libpng-1.2.29.txt +0 -2906
- data/dependencies/libpng/libpng.3 +0 -3680
- data/dependencies/libpng/libpngpf.3 +0 -274
- data/dependencies/libpng/png.5 +0 -74
- data/dependencies/libpng/png.c +0 -798
- data/dependencies/libpng/png.h +0 -3569
- data/dependencies/libpng/pngbar.jpg +0 -0
- data/dependencies/libpng/pngbar.png +0 -0
- data/dependencies/libpng/pngconf.h +0 -1481
- data/dependencies/libpng/pngerror.c +0 -343
- data/dependencies/libpng/pnggccrd.c +0 -103
- data/dependencies/libpng/pngget.c +0 -901
- data/dependencies/libpng/pngmem.c +0 -608
- data/dependencies/libpng/pngnow.png +0 -0
- data/dependencies/libpng/pngpread.c +0 -1598
- data/dependencies/libpng/pngread.c +0 -1479
- data/dependencies/libpng/pngrio.c +0 -167
- data/dependencies/libpng/pngrtran.c +0 -4292
- data/dependencies/libpng/pngrutil.c +0 -3183
- data/dependencies/libpng/pngset.c +0 -1268
- data/dependencies/libpng/pngtest.c +0 -1563
- data/dependencies/libpng/pngtest.png +0 -0
- data/dependencies/libpng/pngtrans.c +0 -662
- data/dependencies/libpng/pngvcrd.c +0 -1
- data/dependencies/libpng/pngwio.c +0 -234
- data/dependencies/libpng/pngwrite.c +0 -1532
- data/dependencies/libpng/pngwtran.c +0 -572
- data/dependencies/libpng/pngwutil.c +0 -2802
- data/dependencies/libpng/projects/beos/x86-shared.proj +0 -0
- data/dependencies/libpng/projects/beos/x86-shared.txt +0 -22
- data/dependencies/libpng/projects/beos/x86-static.proj +0 -0
- data/dependencies/libpng/projects/beos/x86-static.txt +0 -22
- data/dependencies/libpng/projects/cbuilder5/libpng.bpf +0 -22
- data/dependencies/libpng/projects/cbuilder5/libpng.bpg +0 -25
- data/dependencies/libpng/projects/cbuilder5/libpng.bpr +0 -157
- data/dependencies/libpng/projects/cbuilder5/libpng.cpp +0 -29
- data/dependencies/libpng/projects/cbuilder5/libpng.readme.txt +0 -25
- data/dependencies/libpng/projects/cbuilder5/libpngstat.bpf +0 -22
- data/dependencies/libpng/projects/cbuilder5/libpngstat.bpr +0 -109
- data/dependencies/libpng/projects/cbuilder5/zlib.readme.txt +0 -14
- data/dependencies/libpng/projects/netware.txt +0 -6
- data/dependencies/libpng/projects/visualc6/README.txt +0 -57
- data/dependencies/libpng/projects/visualc6/libpng.dsp +0 -472
- data/dependencies/libpng/projects/visualc6/libpng.dsw +0 -59
- data/dependencies/libpng/projects/visualc6/pngtest.dsp +0 -314
- data/dependencies/libpng/projects/visualc71/PRJ0041.mak +0 -21
- data/dependencies/libpng/projects/visualc71/README.txt +0 -57
- data/dependencies/libpng/projects/visualc71/README_zlib.txt +0 -44
- data/dependencies/libpng/projects/visualc71/libpng.sln +0 -88
- data/dependencies/libpng/projects/visualc71/libpng.vcproj +0 -702
- data/dependencies/libpng/projects/visualc71/pngtest.vcproj +0 -459
- data/dependencies/libpng/projects/visualc71/zlib.vcproj +0 -670
- data/dependencies/libpng/projects/wince.txt +0 -6
- data/dependencies/libpng/scripts/CMakeLists.txt +0 -210
- data/dependencies/libpng/scripts/SCOPTIONS.ppc +0 -7
- data/dependencies/libpng/scripts/descrip.mms +0 -52
- data/dependencies/libpng/scripts/libpng-config-body.in +0 -96
- data/dependencies/libpng/scripts/libpng-config-head.in +0 -21
- data/dependencies/libpng/scripts/libpng-config.in +0 -124
- data/dependencies/libpng/scripts/libpng.icc +0 -44
- data/dependencies/libpng/scripts/libpng.pc-configure.in +0 -10
- data/dependencies/libpng/scripts/libpng.pc.in +0 -10
- data/dependencies/libpng/scripts/makefile.32sunu +0 -254
- data/dependencies/libpng/scripts/makefile.64sunu +0 -254
- data/dependencies/libpng/scripts/makefile.acorn +0 -51
- data/dependencies/libpng/scripts/makefile.aix +0 -113
- data/dependencies/libpng/scripts/makefile.amiga +0 -48
- data/dependencies/libpng/scripts/makefile.atari +0 -51
- data/dependencies/libpng/scripts/makefile.bc32 +0 -152
- data/dependencies/libpng/scripts/makefile.beos +0 -226
- data/dependencies/libpng/scripts/makefile.bor +0 -162
- data/dependencies/libpng/scripts/makefile.cygwin +0 -299
- data/dependencies/libpng/scripts/makefile.darwin +0 -234
- data/dependencies/libpng/scripts/makefile.dec +0 -214
- data/dependencies/libpng/scripts/makefile.dj2 +0 -55
- data/dependencies/libpng/scripts/makefile.elf +0 -275
- data/dependencies/libpng/scripts/makefile.freebsd +0 -48
- data/dependencies/libpng/scripts/makefile.gcc +0 -79
- data/dependencies/libpng/scripts/makefile.gcmmx +0 -271
- data/dependencies/libpng/scripts/makefile.hp64 +0 -235
- data/dependencies/libpng/scripts/makefile.hpgcc +0 -245
- data/dependencies/libpng/scripts/makefile.hpux +0 -232
- data/dependencies/libpng/scripts/makefile.ibmc +0 -71
- data/dependencies/libpng/scripts/makefile.intel +0 -102
- data/dependencies/libpng/scripts/makefile.knr +0 -99
- data/dependencies/libpng/scripts/makefile.linux +0 -249
- data/dependencies/libpng/scripts/makefile.mingw +0 -289
- data/dependencies/libpng/scripts/makefile.mips +0 -83
- data/dependencies/libpng/scripts/makefile.msc +0 -86
- data/dependencies/libpng/scripts/makefile.ne12bsd +0 -45
- data/dependencies/libpng/scripts/makefile.netbsd +0 -45
- data/dependencies/libpng/scripts/makefile.nommx +0 -252
- data/dependencies/libpng/scripts/makefile.openbsd +0 -73
- data/dependencies/libpng/scripts/makefile.os2 +0 -69
- data/dependencies/libpng/scripts/makefile.sco +0 -229
- data/dependencies/libpng/scripts/makefile.sggcc +0 -242
- data/dependencies/libpng/scripts/makefile.sgi +0 -245
- data/dependencies/libpng/scripts/makefile.so9 +0 -251
- data/dependencies/libpng/scripts/makefile.solaris +0 -249
- data/dependencies/libpng/scripts/makefile.solaris-x86 +0 -248
- data/dependencies/libpng/scripts/makefile.std +0 -92
- data/dependencies/libpng/scripts/makefile.sunos +0 -97
- data/dependencies/libpng/scripts/makefile.tc3 +0 -89
- data/dependencies/libpng/scripts/makefile.vcawin32 +0 -99
- data/dependencies/libpng/scripts/makefile.vcwin32 +0 -99
- data/dependencies/libpng/scripts/makefile.watcom +0 -109
- data/dependencies/libpng/scripts/makevms.com +0 -144
- data/dependencies/libpng/scripts/pngos2.def +0 -257
- data/dependencies/libpng/scripts/pngw32.def +0 -238
- data/dependencies/libpng/scripts/pngw32.rc +0 -112
- data/dependencies/libpng/scripts/smakefile.ppc +0 -30
- data/dependencies/libvorbis/AUTHORS +0 -3
- data/dependencies/libvorbis/CHANGES +0 -48
- data/dependencies/libvorbis/COPYING +0 -28
- data/dependencies/libvorbis/Makefile.am +0 -41
- data/dependencies/libvorbis/Makefile.in +0 -759
- data/dependencies/libvorbis/README +0 -132
- data/dependencies/libvorbis/acinclude.m4 +0 -161
- data/dependencies/libvorbis/aclocal.m4 +0 -7273
- data/dependencies/libvorbis/autogen.sh +0 -127
- data/dependencies/libvorbis/config.guess +0 -1500
- data/dependencies/libvorbis/config.h.in +0 -78
- data/dependencies/libvorbis/config.sub +0 -1616
- data/dependencies/libvorbis/configure +0 -22114
- data/dependencies/libvorbis/configure.in +0 -246
- data/dependencies/libvorbis/depcomp +0 -584
- data/dependencies/libvorbis/doc/Makefile +0 -665
- data/dependencies/libvorbis/doc/Makefile.am +0 -137
- data/dependencies/libvorbis/doc/Makefile.in +0 -665
- data/dependencies/libvorbis/doc/Vorbis_I_spec.html +0 -2292
- data/dependencies/libvorbis/doc/Vorbis_I_spec.pdf +0 -0
- data/dependencies/libvorbis/doc/components.png +0 -0
- data/dependencies/libvorbis/doc/draft-ietf-avt-rtp-vorbis-06.txt +0 -1401
- data/dependencies/libvorbis/doc/draft-ietf-avt-rtp-vorbis-06.xml +0 -1388
- data/dependencies/libvorbis/doc/eightphase.png +0 -0
- data/dependencies/libvorbis/doc/evenlsp.png +0 -0
- data/dependencies/libvorbis/doc/fish_xiph_org.png +0 -0
- data/dependencies/libvorbis/doc/floor1-1.png +0 -0
- data/dependencies/libvorbis/doc/floor1-2.png +0 -0
- data/dependencies/libvorbis/doc/floor1-3.png +0 -0
- data/dependencies/libvorbis/doc/floor1-4.png +0 -0
- data/dependencies/libvorbis/doc/floor1_inverse_dB_table.html +0 -154
- data/dependencies/libvorbis/doc/floorval.png +0 -0
- data/dependencies/libvorbis/doc/fourphase.png +0 -0
- data/dependencies/libvorbis/doc/framing.html +0 -431
- data/dependencies/libvorbis/doc/helper.html +0 -239
- data/dependencies/libvorbis/doc/hufftree-under.png +0 -0
- data/dependencies/libvorbis/doc/hufftree.png +0 -0
- data/dependencies/libvorbis/doc/index.html +0 -114
- data/dependencies/libvorbis/doc/lspmap.png +0 -0
- data/dependencies/libvorbis/doc/oddlsp.png +0 -0
- data/dependencies/libvorbis/doc/oggstream.html +0 -234
- data/dependencies/libvorbis/doc/programming.html +0 -554
- data/dependencies/libvorbis/doc/residue-pack.png +0 -0
- data/dependencies/libvorbis/doc/residue2.png +0 -0
- data/dependencies/libvorbis/doc/squarepolar.png +0 -0
- data/dependencies/libvorbis/doc/stereo.html +0 -418
- data/dependencies/libvorbis/doc/stream.png +0 -0
- data/dependencies/libvorbis/doc/v-comment.html +0 -285
- data/dependencies/libvorbis/doc/vorbis-clip.txt +0 -139
- data/dependencies/libvorbis/doc/vorbis-errors.txt +0 -103
- data/dependencies/libvorbis/doc/vorbis-fidelity.html +0 -180
- data/dependencies/libvorbis/doc/vorbis.html +0 -234
- data/dependencies/libvorbis/doc/vorbisenc/Makefile +0 -382
- data/dependencies/libvorbis/doc/vorbisenc/Makefile.am +0 -9
- data/dependencies/libvorbis/doc/vorbisenc/Makefile.in +0 -382
- data/dependencies/libvorbis/doc/vorbisenc/changes.html +0 -104
- data/dependencies/libvorbis/doc/vorbisenc/examples.html +0 -133
- data/dependencies/libvorbis/doc/vorbisenc/index.html +0 -40
- data/dependencies/libvorbis/doc/vorbisenc/ov_ectl_ratemanage2_arg.html +0 -92
- data/dependencies/libvorbis/doc/vorbisenc/ov_ectl_ratemanage_arg.html +0 -92
- data/dependencies/libvorbis/doc/vorbisenc/overview.html +0 -382
- data/dependencies/libvorbis/doc/vorbisenc/reference.html +0 -48
- data/dependencies/libvorbis/doc/vorbisenc/style.css +0 -7
- data/dependencies/libvorbis/doc/vorbisenc/vorbis_encode_ctl.html +0 -169
- data/dependencies/libvorbis/doc/vorbisenc/vorbis_encode_init.html +0 -88
- data/dependencies/libvorbis/doc/vorbisenc/vorbis_encode_init_vbr.html +0 -81
- data/dependencies/libvorbis/doc/vorbisenc/vorbis_encode_setup_init.html +0 -88
- data/dependencies/libvorbis/doc/vorbisenc/vorbis_encode_setup_managed.html +0 -102
- data/dependencies/libvorbis/doc/vorbisenc/vorbis_encode_setup_vbr.html +0 -90
- data/dependencies/libvorbis/doc/vorbisenc/vorbis_info.html +0 -81
- data/dependencies/libvorbis/doc/vorbisfile/Makefile +0 -396
- data/dependencies/libvorbis/doc/vorbisfile/Makefile.am +0 -23
- data/dependencies/libvorbis/doc/vorbisfile/Makefile.in +0 -396
- data/dependencies/libvorbis/doc/vorbisfile/OggVorbis_File.html +0 -137
- data/dependencies/libvorbis/doc/vorbisfile/callbacks.html +0 -121
- data/dependencies/libvorbis/doc/vorbisfile/chaining_example_c.html +0 -90
- data/dependencies/libvorbis/doc/vorbisfile/chainingexample.html +0 -175
- data/dependencies/libvorbis/doc/vorbisfile/crosslap.html +0 -121
- data/dependencies/libvorbis/doc/vorbisfile/datastructures.html +0 -61
- data/dependencies/libvorbis/doc/vorbisfile/decoding.html +0 -87
- data/dependencies/libvorbis/doc/vorbisfile/example.html +0 -208
- data/dependencies/libvorbis/doc/vorbisfile/exampleindex.html +0 -39
- data/dependencies/libvorbis/doc/vorbisfile/fileinfo.html +0 -95
- data/dependencies/libvorbis/doc/vorbisfile/index.html +0 -49
- data/dependencies/libvorbis/doc/vorbisfile/initialization.html +0 -118
- data/dependencies/libvorbis/doc/vorbisfile/ov_bitrate.html +0 -72
- data/dependencies/libvorbis/doc/vorbisfile/ov_bitrate_instant.html +0 -65
- data/dependencies/libvorbis/doc/vorbisfile/ov_callbacks.html +0 -117
- data/dependencies/libvorbis/doc/vorbisfile/ov_clear.html +0 -64
- data/dependencies/libvorbis/doc/vorbisfile/ov_comment.html +0 -66
- data/dependencies/libvorbis/doc/vorbisfile/ov_crosslap.html +0 -100
- data/dependencies/libvorbis/doc/vorbisfile/ov_fopen.html +0 -124
- data/dependencies/libvorbis/doc/vorbisfile/ov_info.html +0 -64
- data/dependencies/libvorbis/doc/vorbisfile/ov_open.html +0 -183
- data/dependencies/libvorbis/doc/vorbisfile/ov_open_callbacks.html +0 -147
- data/dependencies/libvorbis/doc/vorbisfile/ov_pcm_seek.html +0 -83
- data/dependencies/libvorbis/doc/vorbisfile/ov_pcm_seek_lap.html +0 -103
- data/dependencies/libvorbis/doc/vorbisfile/ov_pcm_seek_page.html +0 -84
- data/dependencies/libvorbis/doc/vorbisfile/ov_pcm_seek_page_lap.html +0 -112
- data/dependencies/libvorbis/doc/vorbisfile/ov_pcm_tell.html +0 -63
- data/dependencies/libvorbis/doc/vorbisfile/ov_pcm_total.html +0 -67
- data/dependencies/libvorbis/doc/vorbisfile/ov_raw_seek.html +0 -83
- data/dependencies/libvorbis/doc/vorbisfile/ov_raw_seek_lap.html +0 -110
- data/dependencies/libvorbis/doc/vorbisfile/ov_raw_tell.html +0 -65
- data/dependencies/libvorbis/doc/vorbisfile/ov_raw_total.html +0 -68
- data/dependencies/libvorbis/doc/vorbisfile/ov_read.html +0 -123
- data/dependencies/libvorbis/doc/vorbisfile/ov_read_float.html +0 -101
- data/dependencies/libvorbis/doc/vorbisfile/ov_seekable.html +0 -63
- data/dependencies/libvorbis/doc/vorbisfile/ov_serialnumber.html +0 -67
- data/dependencies/libvorbis/doc/vorbisfile/ov_streams.html +0 -64
- data/dependencies/libvorbis/doc/vorbisfile/ov_test.html +0 -101
- data/dependencies/libvorbis/doc/vorbisfile/ov_test_callbacks.html +0 -111
- data/dependencies/libvorbis/doc/vorbisfile/ov_test_open.html +0 -82
- data/dependencies/libvorbis/doc/vorbisfile/ov_time_seek.html +0 -82
- data/dependencies/libvorbis/doc/vorbisfile/ov_time_seek_lap.html +0 -105
- data/dependencies/libvorbis/doc/vorbisfile/ov_time_seek_page.html +0 -83
- data/dependencies/libvorbis/doc/vorbisfile/ov_time_seek_page_lap.html +0 -112
- data/dependencies/libvorbis/doc/vorbisfile/ov_time_tell.html +0 -63
- data/dependencies/libvorbis/doc/vorbisfile/ov_time_total.html +0 -67
- data/dependencies/libvorbis/doc/vorbisfile/overview.html +0 -61
- data/dependencies/libvorbis/doc/vorbisfile/reference.html +0 -83
- data/dependencies/libvorbis/doc/vorbisfile/return.html +0 -77
- data/dependencies/libvorbis/doc/vorbisfile/seekexample.html +0 -152
- data/dependencies/libvorbis/doc/vorbisfile/seeking.html +0 -107
- data/dependencies/libvorbis/doc/vorbisfile/seeking_example_c.html +0 -86
- data/dependencies/libvorbis/doc/vorbisfile/seeking_test_c.html +0 -86
- data/dependencies/libvorbis/doc/vorbisfile/seekingexample.html +0 -203
- data/dependencies/libvorbis/doc/vorbisfile/style.css +0 -7
- data/dependencies/libvorbis/doc/vorbisfile/threads.html +0 -50
- data/dependencies/libvorbis/doc/vorbisfile/vorbis_comment.html +0 -70
- data/dependencies/libvorbis/doc/vorbisfile/vorbis_info.html +0 -80
- data/dependencies/libvorbis/doc/vorbisfile/vorbisfile_example_c.html +0 -106
- data/dependencies/libvorbis/doc/vorbisword2.png +0 -0
- data/dependencies/libvorbis/doc/wait.png +0 -0
- data/dependencies/libvorbis/doc/white-ogg.png +0 -0
- data/dependencies/libvorbis/doc/white-xifish.png +0 -0
- data/dependencies/libvorbis/doc/window1.png +0 -0
- data/dependencies/libvorbis/doc/window2.png +0 -0
- data/dependencies/libvorbis/doc/xifish.pdf +0 -0
- data/dependencies/libvorbis/doc/xml/01-introduction.xml +0 -665
- data/dependencies/libvorbis/doc/xml/02-bitpacking.xml +0 -280
- data/dependencies/libvorbis/doc/xml/03-codebook.xml +0 -458
- data/dependencies/libvorbis/doc/xml/04-codec.xml +0 -711
- data/dependencies/libvorbis/doc/xml/05-comment.xml +0 -284
- data/dependencies/libvorbis/doc/xml/06-floor0.xml +0 -257
- data/dependencies/libvorbis/doc/xml/07-floor1.xml +0 -450
- data/dependencies/libvorbis/doc/xml/08-residue.xml +0 -492
- data/dependencies/libvorbis/doc/xml/09-helper.xml +0 -211
- data/dependencies/libvorbis/doc/xml/10-tables.xml +0 -94
- data/dependencies/libvorbis/doc/xml/TODO +0 -28
- data/dependencies/libvorbis/doc/xml/Vorbis_I_spec.xml +0 -30
- data/dependencies/libvorbis/doc/xml/a1-encapsulation_ogg.xml +0 -201
- data/dependencies/libvorbis/doc/xml/a2-encapsulation_rtp.xml +0 -31
- data/dependencies/libvorbis/doc/xml/footer.xml +0 -60
- data/dependencies/libvorbis/doc/xml/spec-common.xsl +0 -24
- data/dependencies/libvorbis/doc/xml/spec-fo.xsl +0 -16
- data/dependencies/libvorbis/doc/xml/spec-html.xsl +0 -5
- data/dependencies/libvorbis/examples/Makefile +0 -515
- data/dependencies/libvorbis/examples/Makefile.am +0 -28
- data/dependencies/libvorbis/examples/Makefile.in +0 -515
- data/dependencies/libvorbis/examples/chaining_example.c +0 -72
- data/dependencies/libvorbis/examples/decoder_example.c +0 -307
- data/dependencies/libvorbis/examples/encoder_example.c +0 -253
- data/dependencies/libvorbis/examples/frameview.pl +0 -630
- data/dependencies/libvorbis/examples/seeking_example.c +0 -256
- data/dependencies/libvorbis/examples/vorbisfile_example.c +0 -87
- data/dependencies/libvorbis/include/Makefile.am +0 -3
- data/dependencies/libvorbis/include/Makefile.in +0 -506
- data/dependencies/libvorbis/include/vorbis/Makefile.am +0 -7
- data/dependencies/libvorbis/include/vorbis/Makefile.in +0 -426
- data/dependencies/libvorbis/include/vorbis/codec.h +0 -241
- data/dependencies/libvorbis/include/vorbis/vorbisenc.h +0 -112
- data/dependencies/libvorbis/include/vorbis/vorbisfile.h +0 -183
- data/dependencies/libvorbis/install-sh +0 -507
- data/dependencies/libvorbis/lib/Makefile.am +0 -44
- data/dependencies/libvorbis/lib/Makefile.in +0 -706
- data/dependencies/libvorbis/lib/analysis.c +0 -121
- data/dependencies/libvorbis/lib/backends.h +0 -146
- data/dependencies/libvorbis/lib/barkmel.c +0 -64
- data/dependencies/libvorbis/lib/bitrate.c +0 -253
- data/dependencies/libvorbis/lib/bitrate.h +0 -59
- data/dependencies/libvorbis/lib/block.c +0 -993
- data/dependencies/libvorbis/lib/books/Makefile.am +0 -3
- data/dependencies/libvorbis/lib/books/Makefile.in +0 -506
- data/dependencies/libvorbis/lib/books/coupled/Makefile.am +0 -3
- data/dependencies/libvorbis/lib/books/coupled/Makefile.in +0 -347
- data/dependencies/libvorbis/lib/books/coupled/res_books_stereo.h +0 -20681
- data/dependencies/libvorbis/lib/books/floor/Makefile.am +0 -3
- data/dependencies/libvorbis/lib/books/floor/Makefile.in +0 -347
- data/dependencies/libvorbis/lib/books/floor/floor_books.h +0 -1838
- data/dependencies/libvorbis/lib/books/uncoupled/Makefile.am +0 -3
- data/dependencies/libvorbis/lib/books/uncoupled/Makefile.in +0 -347
- data/dependencies/libvorbis/lib/books/uncoupled/res_books_uncoupled.h +0 -11517
- data/dependencies/libvorbis/lib/codebook.c +0 -634
- data/dependencies/libvorbis/lib/codebook.h +0 -160
- data/dependencies/libvorbis/lib/codec_internal.h +0 -137
- data/dependencies/libvorbis/lib/envelope.c +0 -382
- data/dependencies/libvorbis/lib/envelope.h +0 -81
- data/dependencies/libvorbis/lib/floor0.c +0 -223
- data/dependencies/libvorbis/lib/floor1.c +0 -1094
- data/dependencies/libvorbis/lib/highlevel.h +0 -57
- data/dependencies/libvorbis/lib/info.c +0 -644
- data/dependencies/libvorbis/lib/lookup.c +0 -94
- data/dependencies/libvorbis/lib/lookup.h +0 -32
- data/dependencies/libvorbis/lib/lookup_data.h +0 -189
- data/dependencies/libvorbis/lib/lookups.pl +0 -142
- data/dependencies/libvorbis/lib/lpc.c +0 -149
- data/dependencies/libvorbis/lib/lpc.h +0 -29
- data/dependencies/libvorbis/lib/lsp.c +0 -455
- data/dependencies/libvorbis/lib/lsp.h +0 -28
- data/dependencies/libvorbis/lib/mapping0.c +0 -844
- data/dependencies/libvorbis/lib/masking.h +0 -785
- data/dependencies/libvorbis/lib/mdct.c +0 -564
- data/dependencies/libvorbis/lib/mdct.h +0 -83
- data/dependencies/libvorbis/lib/misc.h +0 -52
- data/dependencies/libvorbis/lib/modes/Makefile.am +0 -6
- data/dependencies/libvorbis/lib/modes/Makefile.in +0 -351
- data/dependencies/libvorbis/lib/modes/floor_all.h +0 -248
- data/dependencies/libvorbis/lib/modes/psych_11.h +0 -51
- data/dependencies/libvorbis/lib/modes/psych_16.h +0 -136
- data/dependencies/libvorbis/lib/modes/psych_44.h +0 -666
- data/dependencies/libvorbis/lib/modes/psych_8.h +0 -102
- data/dependencies/libvorbis/lib/modes/residue_16.h +0 -163
- data/dependencies/libvorbis/lib/modes/residue_44.h +0 -294
- data/dependencies/libvorbis/lib/modes/residue_44u.h +0 -318
- data/dependencies/libvorbis/lib/modes/residue_8.h +0 -109
- data/dependencies/libvorbis/lib/modes/setup_11.h +0 -141
- data/dependencies/libvorbis/lib/modes/setup_16.h +0 -149
- data/dependencies/libvorbis/lib/modes/setup_22.h +0 -128
- data/dependencies/libvorbis/lib/modes/setup_32.h +0 -132
- data/dependencies/libvorbis/lib/modes/setup_44.h +0 -107
- data/dependencies/libvorbis/lib/modes/setup_44u.h +0 -74
- data/dependencies/libvorbis/lib/modes/setup_8.h +0 -146
- data/dependencies/libvorbis/lib/modes/setup_X.h +0 -226
- data/dependencies/libvorbis/lib/os.h +0 -156
- data/dependencies/libvorbis/lib/psy.c +0 -1227
- data/dependencies/libvorbis/lib/psy.h +0 -186
- data/dependencies/libvorbis/lib/psytune.c +0 -524
- data/dependencies/libvorbis/lib/registry.c +0 -46
- data/dependencies/libvorbis/lib/registry.h +0 -32
- data/dependencies/libvorbis/lib/res0.c +0 -919
- data/dependencies/libvorbis/lib/scales.h +0 -86
- data/dependencies/libvorbis/lib/sharedbook.c +0 -735
- data/dependencies/libvorbis/lib/smallft.c +0 -1255
- data/dependencies/libvorbis/lib/smallft.h +0 -34
- data/dependencies/libvorbis/lib/synthesis.c +0 -170
- data/dependencies/libvorbis/lib/tone.c +0 -54
- data/dependencies/libvorbis/lib/vorbisenc.c +0 -1184
- data/dependencies/libvorbis/lib/vorbisfile.c +0 -2194
- data/dependencies/libvorbis/lib/window.c +0 -2136
- data/dependencies/libvorbis/lib/window.h +0 -26
- data/dependencies/libvorbis/libvorbis.spec +0 -118
- data/dependencies/libvorbis/libvorbis.spec.in +0 -118
- data/dependencies/libvorbis/ltmain.sh +0 -6871
- data/dependencies/libvorbis/macos/compat/strdup.c +0 -21
- data/dependencies/libvorbis/macos/compat/sys/types.h +0 -1
- data/dependencies/libvorbis/macos/decoder_example.mcp +0 -0
- data/dependencies/libvorbis/macos/encoder_example.mcp +0 -0
- data/dependencies/libvorbis/macos/libvorbis.mcp +0 -0
- data/dependencies/libvorbis/macos/libvorbis.mcp.exp +0 -45
- data/dependencies/libvorbis/macos/libvorbisenc.mcp +0 -0
- data/dependencies/libvorbis/macos/libvorbisenc.mcp.exp +0 -8
- data/dependencies/libvorbis/macos/libvorbisfile.mcp +0 -0
- data/dependencies/libvorbis/macos/libvorbisfile.mcp.exp +0 -45
- data/dependencies/libvorbis/macos/vorbis.mcp +0 -0
- data/dependencies/libvorbis/macosx/English.lproj/InfoPlist.strings +0 -0
- data/dependencies/libvorbis/macosx/Info.plist +0 -30
- data/dependencies/libvorbis/macosx/Vorbis.xcodeproj/project.pbxproj +0 -893
- data/dependencies/libvorbis/missing +0 -367
- data/dependencies/libvorbis/symbian/bld.inf +0 -35
- data/dependencies/libvorbis/symbian/config.h +0 -54
- data/dependencies/libvorbis/symbian/vorbis.mmp +0 -43
- data/dependencies/libvorbis/todo.txt +0 -22
- data/dependencies/libvorbis/vorbis-uninstalled.pc.in +0 -14
- data/dependencies/libvorbis/vorbis.m4 +0 -122
- data/dependencies/libvorbis/vorbis.pc.in +0 -14
- data/dependencies/libvorbis/vorbisenc-uninstalled.pc.in +0 -14
- data/dependencies/libvorbis/vorbisenc.pc.in +0 -14
- data/dependencies/libvorbis/vorbisfile-uninstalled.pc.in +0 -14
- data/dependencies/libvorbis/vorbisfile.pc.in +0 -14
- data/dependencies/libvorbis/vq/16.vqs +0 -77
- data/dependencies/libvorbis/vq/16u.vqs +0 -71
- data/dependencies/libvorbis/vq/44c-1.vqs +0 -63
- data/dependencies/libvorbis/vq/44c0.vqs +0 -65
- data/dependencies/libvorbis/vq/44c1.vqs +0 -66
- data/dependencies/libvorbis/vq/44c2.vqs +0 -37
- data/dependencies/libvorbis/vq/44c3.vqs +0 -36
- data/dependencies/libvorbis/vq/44c4.vqs +0 -36
- data/dependencies/libvorbis/vq/44c5.vqs +0 -37
- data/dependencies/libvorbis/vq/44c6.vqs +0 -37
- data/dependencies/libvorbis/vq/44c7.vqs +0 -38
- data/dependencies/libvorbis/vq/44c8.vqs +0 -39
- data/dependencies/libvorbis/vq/44c9.vqs +0 -37
- data/dependencies/libvorbis/vq/44u0.vqs +0 -33
- data/dependencies/libvorbis/vq/44u1.vqs +0 -33
- data/dependencies/libvorbis/vq/44u2.vqs +0 -32
- data/dependencies/libvorbis/vq/44u3.vqs +0 -33
- data/dependencies/libvorbis/vq/44u4.vqs +0 -33
- data/dependencies/libvorbis/vq/44u5.vqs +0 -35
- data/dependencies/libvorbis/vq/44u6.vqs +0 -35
- data/dependencies/libvorbis/vq/44u7.vqs +0 -34
- data/dependencies/libvorbis/vq/44u8.vqs +0 -35
- data/dependencies/libvorbis/vq/44u9.vqs +0 -36
- data/dependencies/libvorbis/vq/8.vqs +0 -43
- data/dependencies/libvorbis/vq/8u.vqs +0 -41
- data/dependencies/libvorbis/vq/Makefile +0 -532
- data/dependencies/libvorbis/vq/Makefile.am +0 -34
- data/dependencies/libvorbis/vq/Makefile.in +0 -532
- data/dependencies/libvorbis/vq/auxpartition.pl +0 -71
- data/dependencies/libvorbis/vq/bookutil.c +0 -717
- data/dependencies/libvorbis/vq/bookutil.h +0 -43
- data/dependencies/libvorbis/vq/build.c +0 -195
- data/dependencies/libvorbis/vq/cascade.c +0 -91
- data/dependencies/libvorbis/vq/distribution.c +0 -248
- data/dependencies/libvorbis/vq/floor_11.vqs +0 -10
- data/dependencies/libvorbis/vq/floor_22.vqs +0 -27
- data/dependencies/libvorbis/vq/floor_44.vqs +0 -83
- data/dependencies/libvorbis/vq/genericdata.c +0 -61
- data/dependencies/libvorbis/vq/huffbuild.c +0 -201
- data/dependencies/libvorbis/vq/latticebuild.c +0 -177
- data/dependencies/libvorbis/vq/latticehint.c +0 -430
- data/dependencies/libvorbis/vq/latticepare.c +0 -595
- data/dependencies/libvorbis/vq/latticetune.c +0 -164
- data/dependencies/libvorbis/vq/localcodebook.h +0 -160
- data/dependencies/libvorbis/vq/lspdata.c +0 -157
- data/dependencies/libvorbis/vq/make_floor_books.pl +0 -108
- data/dependencies/libvorbis/vq/make_residue_books.pl +0 -187
- data/dependencies/libvorbis/vq/metrics.c +0 -295
- data/dependencies/libvorbis/vq/residue_entropy +0 -58
- data/dependencies/libvorbis/vq/residuedata.c +0 -160
- data/dependencies/libvorbis/vq/residuesplit.c +0 -282
- data/dependencies/libvorbis/vq/run.c +0 -216
- data/dependencies/libvorbis/vq/train.c +0 -364
- data/dependencies/libvorbis/vq/vqext.h +0 -34
- data/dependencies/libvorbis/vq/vqgen.c +0 -567
- data/dependencies/libvorbis/vq/vqgen.h +0 -85
- data/dependencies/libvorbis/vq/vqsplit.c +0 -612
- data/dependencies/libvorbis/vq/vqsplit.h +0 -37
- data/dependencies/libvorbis/win32/VS2003/libvorbis/libvorbis.vcproj +0 -467
- data/dependencies/libvorbis/win32/VS2003/libvorbisfile/libvorbisfile.def +0 -47
- data/dependencies/libvorbis/win32/VS2003/libvorbisfile/libvorbisfile.vcproj +0 -147
- data/dependencies/libvorbis/win32/VS2003/vorbisdec/vorbisdec.vcproj +0 -268
- data/dependencies/libvorbis/win32/VS2003/vorbisenc/vorbisenc.vcproj +0 -268
- data/dependencies/libvorbis/win32/VS2005/libvorbis/libvorbis.vcproj +0 -653
- data/dependencies/libvorbis/win32/VS2005/libvorbisfile/libvorbisfile.def +0 -47
- data/dependencies/libvorbis/win32/VS2005/libvorbisfile/libvorbisfile.vcproj +0 -219
- data/dependencies/libvorbis/win32/VS2005/vorbisdec/vorbisdec.vcproj +0 -389
- data/dependencies/libvorbis/win32/VS2005/vorbisenc/vorbisenc.vcproj +0 -390
- data/dependencies/libvorbis/win32/build_vorbis_dynamic.bat +0 -19
- data/dependencies/libvorbis/win32/build_vorbis_dynamic_debug.bat +0 -19
- data/dependencies/libvorbis/win32/build_vorbis_static.bat +0 -19
- data/dependencies/libvorbis/win32/build_vorbis_static_debug.bat +0 -19
- data/dependencies/libvorbis/win32/build_vorbisenc_dynamic.bat +0 -19
- data/dependencies/libvorbis/win32/build_vorbisenc_dynamic_debug.bat +0 -19
- data/dependencies/libvorbis/win32/build_vorbisenc_static.bat +0 -19
- data/dependencies/libvorbis/win32/build_vorbisenc_static_debug.bat +0 -19
- data/dependencies/libvorbis/win32/build_vorbisfile_dynamic.bat +0 -19
- data/dependencies/libvorbis/win32/build_vorbisfile_dynamic_debug.bat +0 -19
- data/dependencies/libvorbis/win32/build_vorbisfile_static.bat +0 -19
- data/dependencies/libvorbis/win32/build_vorbisfile_static_debug.bat +0 -19
- data/dependencies/libvorbis/win32/vorbis.def +0 -57
- data/dependencies/libvorbis/win32/vorbis.dsw +0 -101
- data/dependencies/libvorbis/win32/vorbis_dynamic.dsp +0 -281
- data/dependencies/libvorbis/win32/vorbis_static.dsp +0 -257
- data/dependencies/libvorbis/win32/vorbisenc.def +0 -13
- data/dependencies/libvorbis/win32/vorbisenc_dynamic.dsp +0 -121
- data/dependencies/libvorbis/win32/vorbisenc_static.dsp +0 -100
- data/dependencies/libvorbis/win32/vorbisfile.def +0 -41
- data/dependencies/libvorbis/win32/vorbisfile_dynamic.dsp +0 -119
- data/dependencies/libvorbis/win32/vorbisfile_static.dsp +0 -100
- data/dependencies/zlib/ChangeLog +0 -855
- data/dependencies/zlib/FAQ +0 -339
- data/dependencies/zlib/INDEX +0 -51
- data/dependencies/zlib/Makefile +0 -154
- data/dependencies/zlib/Makefile.in +0 -154
- data/dependencies/zlib/README +0 -125
- data/dependencies/zlib/adler32.c +0 -149
- data/dependencies/zlib/algorithm.txt +0 -209
- data/dependencies/zlib/amiga/Makefile.pup +0 -66
- data/dependencies/zlib/amiga/Makefile.sas +0 -65
- data/dependencies/zlib/as400/bndsrc +0 -132
- data/dependencies/zlib/as400/compile.clp +0 -123
- data/dependencies/zlib/as400/readme.txt +0 -111
- data/dependencies/zlib/as400/zlib.inc +0 -331
- data/dependencies/zlib/compress.c +0 -79
- data/dependencies/zlib/configure +0 -459
- data/dependencies/zlib/contrib/README.contrib +0 -71
- data/dependencies/zlib/contrib/ada/buffer_demo.adb +0 -106
- data/dependencies/zlib/contrib/ada/mtest.adb +0 -156
- data/dependencies/zlib/contrib/ada/read.adb +0 -156
- data/dependencies/zlib/contrib/ada/readme.txt +0 -65
- data/dependencies/zlib/contrib/ada/test.adb +0 -463
- data/dependencies/zlib/contrib/ada/zlib-streams.adb +0 -225
- data/dependencies/zlib/contrib/ada/zlib-streams.ads +0 -114
- data/dependencies/zlib/contrib/ada/zlib-thin.adb +0 -141
- data/dependencies/zlib/contrib/ada/zlib-thin.ads +0 -450
- data/dependencies/zlib/contrib/ada/zlib.adb +0 -701
- data/dependencies/zlib/contrib/ada/zlib.ads +0 -328
- data/dependencies/zlib/contrib/ada/zlib.gpr +0 -20
- data/dependencies/zlib/contrib/asm586/README.586 +0 -43
- data/dependencies/zlib/contrib/asm586/match.S +0 -364
- data/dependencies/zlib/contrib/asm686/README.686 +0 -34
- data/dependencies/zlib/contrib/asm686/match.S +0 -329
- data/dependencies/zlib/contrib/blast/Makefile +0 -8
- data/dependencies/zlib/contrib/blast/README +0 -4
- data/dependencies/zlib/contrib/blast/blast.c +0 -444
- data/dependencies/zlib/contrib/blast/blast.h +0 -71
- data/dependencies/zlib/contrib/blast/test.pk +0 -0
- data/dependencies/zlib/contrib/blast/test.txt +0 -1
- data/dependencies/zlib/contrib/delphi/ZLib.pas +0 -557
- data/dependencies/zlib/contrib/delphi/ZLibConst.pas +0 -11
- data/dependencies/zlib/contrib/delphi/readme.txt +0 -76
- data/dependencies/zlib/contrib/delphi/zlibd32.mak +0 -93
- data/dependencies/zlib/contrib/dotzlib/DotZLib.build +0 -33
- data/dependencies/zlib/contrib/dotzlib/DotZLib.chm +0 -0
- data/dependencies/zlib/contrib/dotzlib/DotZLib.sln +0 -21
- data/dependencies/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs +0 -58
- data/dependencies/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs +0 -202
- data/dependencies/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs +0 -83
- data/dependencies/zlib/contrib/dotzlib/DotZLib/CodecBase.cs +0 -198
- data/dependencies/zlib/contrib/dotzlib/DotZLib/Deflater.cs +0 -106
- data/dependencies/zlib/contrib/dotzlib/DotZLib/DotZLib.cs +0 -288
- data/dependencies/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj +0 -141
- data/dependencies/zlib/contrib/dotzlib/DotZLib/GZipStream.cs +0 -301
- data/dependencies/zlib/contrib/dotzlib/DotZLib/Inflater.cs +0 -105
- data/dependencies/zlib/contrib/dotzlib/DotZLib/UnitTests.cs +0 -274
- data/dependencies/zlib/contrib/dotzlib/LICENSE_1_0.txt +0 -23
- data/dependencies/zlib/contrib/dotzlib/readme.txt +0 -58
- data/dependencies/zlib/contrib/infback9/README +0 -1
- data/dependencies/zlib/contrib/infback9/infback9.c +0 -608
- data/dependencies/zlib/contrib/infback9/infback9.h +0 -37
- data/dependencies/zlib/contrib/infback9/inffix9.h +0 -107
- data/dependencies/zlib/contrib/infback9/inflate9.h +0 -47
- data/dependencies/zlib/contrib/infback9/inftree9.c +0 -323
- data/dependencies/zlib/contrib/infback9/inftree9.h +0 -55
- data/dependencies/zlib/contrib/inflate86/inffas86.c +0 -1157
- data/dependencies/zlib/contrib/inflate86/inffast.S +0 -1368
- data/dependencies/zlib/contrib/iostream/test.cpp +0 -24
- data/dependencies/zlib/contrib/iostream/zfstream.cpp +0 -329
- data/dependencies/zlib/contrib/iostream/zfstream.h +0 -128
- data/dependencies/zlib/contrib/iostream2/zstream.h +0 -307
- data/dependencies/zlib/contrib/iostream2/zstream_test.cpp +0 -25
- data/dependencies/zlib/contrib/iostream3/README +0 -35
- data/dependencies/zlib/contrib/iostream3/TODO +0 -17
- data/dependencies/zlib/contrib/iostream3/test.cc +0 -50
- data/dependencies/zlib/contrib/iostream3/zfstream.cc +0 -479
- data/dependencies/zlib/contrib/iostream3/zfstream.h +0 -466
- data/dependencies/zlib/contrib/masm686/match.asm +0 -413
- data/dependencies/zlib/contrib/masmx64/bld_ml64.bat +0 -2
- data/dependencies/zlib/contrib/masmx64/gvmat64.asm +0 -513
- data/dependencies/zlib/contrib/masmx64/gvmat64.obj +0 -0
- data/dependencies/zlib/contrib/masmx64/inffas8664.c +0 -186
- data/dependencies/zlib/contrib/masmx64/inffasx64.asm +0 -392
- data/dependencies/zlib/contrib/masmx64/inffasx64.obj +0 -0
- data/dependencies/zlib/contrib/masmx64/readme.txt +0 -28
- data/dependencies/zlib/contrib/masmx86/bld_ml32.bat +0 -2
- data/dependencies/zlib/contrib/masmx86/gvmat32.asm +0 -972
- data/dependencies/zlib/contrib/masmx86/gvmat32.obj +0 -0
- data/dependencies/zlib/contrib/masmx86/gvmat32c.c +0 -62
- data/dependencies/zlib/contrib/masmx86/inffas32.asm +0 -1083
- data/dependencies/zlib/contrib/masmx86/inffas32.obj +0 -0
- data/dependencies/zlib/contrib/masmx86/mkasm.bat +0 -3
- data/dependencies/zlib/contrib/masmx86/readme.txt +0 -21
- data/dependencies/zlib/contrib/minizip/ChangeLogUnzip +0 -67
- data/dependencies/zlib/contrib/minizip/Makefile +0 -25
- data/dependencies/zlib/contrib/minizip/crypt.h +0 -132
- data/dependencies/zlib/contrib/minizip/ioapi.c +0 -177
- data/dependencies/zlib/contrib/minizip/ioapi.h +0 -75
- data/dependencies/zlib/contrib/minizip/iowin32.c +0 -270
- data/dependencies/zlib/contrib/minizip/iowin32.h +0 -21
- data/dependencies/zlib/contrib/minizip/miniunz.c +0 -585
- data/dependencies/zlib/contrib/minizip/minizip.c +0 -420
- data/dependencies/zlib/contrib/minizip/mztools.c +0 -281
- data/dependencies/zlib/contrib/minizip/mztools.h +0 -31
- data/dependencies/zlib/contrib/minizip/unzip.c +0 -1598
- data/dependencies/zlib/contrib/minizip/unzip.h +0 -354
- data/dependencies/zlib/contrib/minizip/zip.c +0 -1219
- data/dependencies/zlib/contrib/minizip/zip.h +0 -235
- data/dependencies/zlib/contrib/pascal/example.pas +0 -599
- data/dependencies/zlib/contrib/pascal/readme.txt +0 -76
- data/dependencies/zlib/contrib/pascal/zlibd32.mak +0 -93
- data/dependencies/zlib/contrib/pascal/zlibpas.pas +0 -236
- data/dependencies/zlib/contrib/puff/Makefile +0 -8
- data/dependencies/zlib/contrib/puff/README +0 -63
- data/dependencies/zlib/contrib/puff/puff.c +0 -837
- data/dependencies/zlib/contrib/puff/puff.h +0 -31
- data/dependencies/zlib/contrib/puff/zeros.raw +0 -0
- data/dependencies/zlib/contrib/testzlib/testzlib.c +0 -275
- data/dependencies/zlib/contrib/testzlib/testzlib.txt +0 -10
- data/dependencies/zlib/contrib/untgz/Makefile +0 -14
- data/dependencies/zlib/contrib/untgz/Makefile.msc +0 -17
- data/dependencies/zlib/contrib/untgz/untgz.c +0 -674
- data/dependencies/zlib/contrib/vstudio/readme.txt +0 -73
- data/dependencies/zlib/contrib/vstudio/vc7/miniunz.vcproj +0 -126
- data/dependencies/zlib/contrib/vstudio/vc7/minizip.vcproj +0 -126
- data/dependencies/zlib/contrib/vstudio/vc7/testzlib.vcproj +0 -126
- data/dependencies/zlib/contrib/vstudio/vc7/zlib.rc +0 -32
- data/dependencies/zlib/contrib/vstudio/vc7/zlibstat.vcproj +0 -246
- data/dependencies/zlib/contrib/vstudio/vc7/zlibvc.def +0 -92
- data/dependencies/zlib/contrib/vstudio/vc7/zlibvc.sln +0 -78
- data/dependencies/zlib/contrib/vstudio/vc7/zlibvc.vcproj +0 -445
- data/dependencies/zlib/contrib/vstudio/vc8/miniunz.vcproj +0 -566
- data/dependencies/zlib/contrib/vstudio/vc8/minizip.vcproj +0 -563
- data/dependencies/zlib/contrib/vstudio/vc8/testzlib.vcproj +0 -948
- data/dependencies/zlib/contrib/vstudio/vc8/testzlibdll.vcproj +0 -567
- data/dependencies/zlib/contrib/vstudio/vc8/zlib.rc +0 -32
- data/dependencies/zlib/contrib/vstudio/vc8/zlibstat.vcproj +0 -870
- data/dependencies/zlib/contrib/vstudio/vc8/zlibvc.def +0 -92
- data/dependencies/zlib/contrib/vstudio/vc8/zlibvc.sln +0 -144
- data/dependencies/zlib/contrib/vstudio/vc8/zlibvc.vcproj +0 -1219
- data/dependencies/zlib/crc32.c +0 -423
- data/dependencies/zlib/crc32.h +0 -441
- data/dependencies/zlib/deflate.c +0 -1736
- data/dependencies/zlib/deflate.h +0 -331
- data/dependencies/zlib/example.c +0 -565
- data/dependencies/zlib/examples/README.examples +0 -42
- data/dependencies/zlib/examples/fitblk.c +0 -233
- data/dependencies/zlib/examples/gun.c +0 -693
- data/dependencies/zlib/examples/gzappend.c +0 -500
- data/dependencies/zlib/examples/gzjoin.c +0 -448
- data/dependencies/zlib/examples/gzlog.c +0 -413
- data/dependencies/zlib/examples/gzlog.h +0 -58
- data/dependencies/zlib/examples/zlib_how.html +0 -523
- data/dependencies/zlib/examples/zpipe.c +0 -191
- data/dependencies/zlib/examples/zran.c +0 -404
- data/dependencies/zlib/gzio.c +0 -1026
- data/dependencies/zlib/infback.c +0 -623
- data/dependencies/zlib/inffast.c +0 -318
- data/dependencies/zlib/inffast.h +0 -11
- data/dependencies/zlib/inffixed.h +0 -94
- data/dependencies/zlib/inflate.c +0 -1368
- data/dependencies/zlib/inflate.h +0 -115
- data/dependencies/zlib/inftrees.c +0 -329
- data/dependencies/zlib/inftrees.h +0 -55
- data/dependencies/zlib/make_vms.com +0 -461
- data/dependencies/zlib/minigzip.c +0 -322
- data/dependencies/zlib/msdos/Makefile.bor +0 -109
- data/dependencies/zlib/msdos/Makefile.dj2 +0 -104
- data/dependencies/zlib/msdos/Makefile.emx +0 -69
- data/dependencies/zlib/msdos/Makefile.msc +0 -106
- data/dependencies/zlib/msdos/Makefile.tc +0 -94
- data/dependencies/zlib/old/Makefile.riscos +0 -151
- data/dependencies/zlib/old/README +0 -3
- data/dependencies/zlib/old/descrip.mms +0 -48
- data/dependencies/zlib/old/os2/Makefile.os2 +0 -136
- data/dependencies/zlib/old/os2/zlib.def +0 -51
- data/dependencies/zlib/old/visual-basic.txt +0 -160
- data/dependencies/zlib/old/zlib.html +0 -971
- data/dependencies/zlib/projects/README.projects +0 -41
- data/dependencies/zlib/projects/visualc6/README.txt +0 -73
- data/dependencies/zlib/projects/visualc6/example.dsp +0 -278
- data/dependencies/zlib/projects/visualc6/minigzip.dsp +0 -278
- data/dependencies/zlib/projects/visualc6/zlib.dsp +0 -609
- data/dependencies/zlib/projects/visualc6/zlib.dsw +0 -59
- data/dependencies/zlib/qnx/package.qpg +0 -141
- data/dependencies/zlib/trees.c +0 -1219
- data/dependencies/zlib/trees.h +0 -128
- data/dependencies/zlib/uncompr.c +0 -61
- data/dependencies/zlib/win32/DLL_FAQ.txt +0 -397
- data/dependencies/zlib/win32/Makefile.bor +0 -107
- data/dependencies/zlib/win32/Makefile.emx +0 -69
- data/dependencies/zlib/win32/Makefile.gcc +0 -141
- data/dependencies/zlib/win32/Makefile.msc +0 -126
- data/dependencies/zlib/win32/VisualC.txt +0 -3
- data/dependencies/zlib/win32/zlib.def +0 -60
- data/dependencies/zlib/win32/zlib1.rc +0 -39
- data/dependencies/zlib/zconf.h +0 -332
- data/dependencies/zlib/zconf.in.h +0 -332
- data/dependencies/zlib/zlib.3 +0 -159
- data/dependencies/zlib/zlib.h +0 -1357
- data/dependencies/zlib/zutil.c +0 -318
- data/dependencies/zlib/zutil.h +0 -269
- data/mac/English.lproj/InfoPlist.strings +0 -0
- data/mac/Gosu-Info.plist +0 -26
- data/mac/Gosu.icns +0 -0
- data/mac/Gosu.xcodeproj/jlnr.mode1v3 +0 -1420
- data/mac/Gosu.xcodeproj/jlnr.mode2v3 +0 -1464
- data/mac/Gosu.xcodeproj/jlnr.pbxuser +0 -1407
- data/mac/Gosu.xcodeproj/jlnr.perspectivev3 +0 -1573
- data/mac/Gosu.xcodeproj/project.pbxproj +0 -2758
- data/mac/RubyGosu App-Info.plist +0 -26
- data/windows/Gosu.sln +0 -34
- data/windows/Gosu.vcproj +0 -553
- data/windows/RubyGosu.vcproj +0 -241
@@ -1,31 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
Additional tools for Minizip
|
3
|
-
Code: Xavier Roche '2004
|
4
|
-
License: Same as ZLIB (www.gzip.org)
|
5
|
-
*/
|
6
|
-
|
7
|
-
#ifndef _zip_tools_H
|
8
|
-
#define _zip_tools_H
|
9
|
-
|
10
|
-
#ifdef __cplusplus
|
11
|
-
extern "C" {
|
12
|
-
#endif
|
13
|
-
|
14
|
-
#ifndef _ZLIB_H
|
15
|
-
#include "zlib.h"
|
16
|
-
#endif
|
17
|
-
|
18
|
-
#include "unzip.h"
|
19
|
-
|
20
|
-
/* Repair a ZIP file (missing central directory)
|
21
|
-
file: file to recover
|
22
|
-
fileOut: output file after recovery
|
23
|
-
fileOutTmp: temporary file name used for recovery
|
24
|
-
*/
|
25
|
-
extern int ZEXPORT unzRepair(const char* file,
|
26
|
-
const char* fileOut,
|
27
|
-
const char* fileOutTmp,
|
28
|
-
uLong* nRecovered,
|
29
|
-
uLong* bytesRecovered);
|
30
|
-
|
31
|
-
#endif
|
@@ -1,1598 +0,0 @@
|
|
1
|
-
/* unzip.c -- IO for uncompress .zip files using zlib
|
2
|
-
Version 1.01e, February 12th, 2005
|
3
|
-
|
4
|
-
Copyright (C) 1998-2005 Gilles Vollant
|
5
|
-
|
6
|
-
Read unzip.h for more info
|
7
|
-
*/
|
8
|
-
|
9
|
-
/* Decryption code comes from crypt.c by Info-ZIP but has been greatly reduced in terms of
|
10
|
-
compatibility with older software. The following is from the original crypt.c. Code
|
11
|
-
woven in by Terry Thorsen 1/2003.
|
12
|
-
*/
|
13
|
-
/*
|
14
|
-
Copyright (c) 1990-2000 Info-ZIP. All rights reserved.
|
15
|
-
|
16
|
-
See the accompanying file LICENSE, version 2000-Apr-09 or later
|
17
|
-
(the contents of which are also included in zip.h) for terms of use.
|
18
|
-
If, for some reason, all these files are missing, the Info-ZIP license
|
19
|
-
also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html
|
20
|
-
*/
|
21
|
-
/*
|
22
|
-
crypt.c (full version) by Info-ZIP. Last revised: [see crypt.h]
|
23
|
-
|
24
|
-
The encryption/decryption parts of this source code (as opposed to the
|
25
|
-
non-echoing password parts) were originally written in Europe. The
|
26
|
-
whole source package can be freely distributed, including from the USA.
|
27
|
-
(Prior to January 2000, re-export from the US was a violation of US law.)
|
28
|
-
*/
|
29
|
-
|
30
|
-
/*
|
31
|
-
This encryption code is a direct transcription of the algorithm from
|
32
|
-
Roger Schlafly, described by Phil Katz in the file appnote.txt. This
|
33
|
-
file (appnote.txt) is distributed with the PKZIP program (even in the
|
34
|
-
version without encryption capabilities).
|
35
|
-
*/
|
36
|
-
|
37
|
-
|
38
|
-
#include <stdio.h>
|
39
|
-
#include <stdlib.h>
|
40
|
-
#include <string.h>
|
41
|
-
#include "zlib.h"
|
42
|
-
#include "unzip.h"
|
43
|
-
|
44
|
-
#ifdef STDC
|
45
|
-
# include <stddef.h>
|
46
|
-
# include <string.h>
|
47
|
-
# include <stdlib.h>
|
48
|
-
#endif
|
49
|
-
#ifdef NO_ERRNO_H
|
50
|
-
extern int errno;
|
51
|
-
#else
|
52
|
-
# include <errno.h>
|
53
|
-
#endif
|
54
|
-
|
55
|
-
|
56
|
-
#ifndef local
|
57
|
-
# define local static
|
58
|
-
#endif
|
59
|
-
/* compile with -Dlocal if your debugger can't find static symbols */
|
60
|
-
|
61
|
-
|
62
|
-
#ifndef CASESENSITIVITYDEFAULT_NO
|
63
|
-
# if !defined(unix) && !defined(CASESENSITIVITYDEFAULT_YES)
|
64
|
-
# define CASESENSITIVITYDEFAULT_NO
|
65
|
-
# endif
|
66
|
-
#endif
|
67
|
-
|
68
|
-
|
69
|
-
#ifndef UNZ_BUFSIZE
|
70
|
-
#define UNZ_BUFSIZE (16384)
|
71
|
-
#endif
|
72
|
-
|
73
|
-
#ifndef UNZ_MAXFILENAMEINZIP
|
74
|
-
#define UNZ_MAXFILENAMEINZIP (256)
|
75
|
-
#endif
|
76
|
-
|
77
|
-
#ifndef ALLOC
|
78
|
-
# define ALLOC(size) (malloc(size))
|
79
|
-
#endif
|
80
|
-
#ifndef TRYFREE
|
81
|
-
# define TRYFREE(p) {if (p) free(p);}
|
82
|
-
#endif
|
83
|
-
|
84
|
-
#define SIZECENTRALDIRITEM (0x2e)
|
85
|
-
#define SIZEZIPLOCALHEADER (0x1e)
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
const char unz_copyright[] =
|
91
|
-
" unzip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll";
|
92
|
-
|
93
|
-
/* unz_file_info_interntal contain internal info about a file in zipfile*/
|
94
|
-
typedef struct unz_file_info_internal_s
|
95
|
-
{
|
96
|
-
uLong offset_curfile;/* relative offset of local header 4 bytes */
|
97
|
-
} unz_file_info_internal;
|
98
|
-
|
99
|
-
|
100
|
-
/* file_in_zip_read_info_s contain internal information about a file in zipfile,
|
101
|
-
when reading and decompress it */
|
102
|
-
typedef struct
|
103
|
-
{
|
104
|
-
char *read_buffer; /* internal buffer for compressed data */
|
105
|
-
z_stream stream; /* zLib stream structure for inflate */
|
106
|
-
|
107
|
-
uLong pos_in_zipfile; /* position in byte on the zipfile, for fseek*/
|
108
|
-
uLong stream_initialised; /* flag set if stream structure is initialised*/
|
109
|
-
|
110
|
-
uLong offset_local_extrafield;/* offset of the local extra field */
|
111
|
-
uInt size_local_extrafield;/* size of the local extra field */
|
112
|
-
uLong pos_local_extrafield; /* position in the local extra field in read*/
|
113
|
-
|
114
|
-
uLong crc32; /* crc32 of all data uncompressed */
|
115
|
-
uLong crc32_wait; /* crc32 we must obtain after decompress all */
|
116
|
-
uLong rest_read_compressed; /* number of byte to be decompressed */
|
117
|
-
uLong rest_read_uncompressed;/*number of byte to be obtained after decomp*/
|
118
|
-
zlib_filefunc_def z_filefunc;
|
119
|
-
voidpf filestream; /* io structore of the zipfile */
|
120
|
-
uLong compression_method; /* compression method (0==store) */
|
121
|
-
uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
|
122
|
-
int raw;
|
123
|
-
} file_in_zip_read_info_s;
|
124
|
-
|
125
|
-
|
126
|
-
/* unz_s contain internal information about the zipfile
|
127
|
-
*/
|
128
|
-
typedef struct
|
129
|
-
{
|
130
|
-
zlib_filefunc_def z_filefunc;
|
131
|
-
voidpf filestream; /* io structore of the zipfile */
|
132
|
-
unz_global_info gi; /* public global information */
|
133
|
-
uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
|
134
|
-
uLong num_file; /* number of the current file in the zipfile*/
|
135
|
-
uLong pos_in_central_dir; /* pos of the current file in the central dir*/
|
136
|
-
uLong current_file_ok; /* flag about the usability of the current file*/
|
137
|
-
uLong central_pos; /* position of the beginning of the central dir*/
|
138
|
-
|
139
|
-
uLong size_central_dir; /* size of the central directory */
|
140
|
-
uLong offset_central_dir; /* offset of start of central directory with
|
141
|
-
respect to the starting disk number */
|
142
|
-
|
143
|
-
unz_file_info cur_file_info; /* public info about the current file in zip*/
|
144
|
-
unz_file_info_internal cur_file_info_internal; /* private info about it*/
|
145
|
-
file_in_zip_read_info_s* pfile_in_zip_read; /* structure about the current
|
146
|
-
file if we are decompressing it */
|
147
|
-
int encrypted;
|
148
|
-
# ifndef NOUNCRYPT
|
149
|
-
unsigned long keys[3]; /* keys defining the pseudo-random sequence */
|
150
|
-
const unsigned long* pcrc_32_tab;
|
151
|
-
# endif
|
152
|
-
} unz_s;
|
153
|
-
|
154
|
-
|
155
|
-
#ifndef NOUNCRYPT
|
156
|
-
#include "crypt.h"
|
157
|
-
#endif
|
158
|
-
|
159
|
-
/* ===========================================================================
|
160
|
-
Read a byte from a gz_stream; update next_in and avail_in. Return EOF
|
161
|
-
for end of file.
|
162
|
-
IN assertion: the stream s has been sucessfully opened for reading.
|
163
|
-
*/
|
164
|
-
|
165
|
-
|
166
|
-
local int unzlocal_getByte OF((
|
167
|
-
const zlib_filefunc_def* pzlib_filefunc_def,
|
168
|
-
voidpf filestream,
|
169
|
-
int *pi));
|
170
|
-
|
171
|
-
local int unzlocal_getByte(pzlib_filefunc_def,filestream,pi)
|
172
|
-
const zlib_filefunc_def* pzlib_filefunc_def;
|
173
|
-
voidpf filestream;
|
174
|
-
int *pi;
|
175
|
-
{
|
176
|
-
unsigned char c;
|
177
|
-
int err = (int)ZREAD(*pzlib_filefunc_def,filestream,&c,1);
|
178
|
-
if (err==1)
|
179
|
-
{
|
180
|
-
*pi = (int)c;
|
181
|
-
return UNZ_OK;
|
182
|
-
}
|
183
|
-
else
|
184
|
-
{
|
185
|
-
if (ZERROR(*pzlib_filefunc_def,filestream))
|
186
|
-
return UNZ_ERRNO;
|
187
|
-
else
|
188
|
-
return UNZ_EOF;
|
189
|
-
}
|
190
|
-
}
|
191
|
-
|
192
|
-
|
193
|
-
/* ===========================================================================
|
194
|
-
Reads a long in LSB order from the given gz_stream. Sets
|
195
|
-
*/
|
196
|
-
local int unzlocal_getShort OF((
|
197
|
-
const zlib_filefunc_def* pzlib_filefunc_def,
|
198
|
-
voidpf filestream,
|
199
|
-
uLong *pX));
|
200
|
-
|
201
|
-
local int unzlocal_getShort (pzlib_filefunc_def,filestream,pX)
|
202
|
-
const zlib_filefunc_def* pzlib_filefunc_def;
|
203
|
-
voidpf filestream;
|
204
|
-
uLong *pX;
|
205
|
-
{
|
206
|
-
uLong x ;
|
207
|
-
int i;
|
208
|
-
int err;
|
209
|
-
|
210
|
-
err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
|
211
|
-
x = (uLong)i;
|
212
|
-
|
213
|
-
if (err==UNZ_OK)
|
214
|
-
err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
|
215
|
-
x += ((uLong)i)<<8;
|
216
|
-
|
217
|
-
if (err==UNZ_OK)
|
218
|
-
*pX = x;
|
219
|
-
else
|
220
|
-
*pX = 0;
|
221
|
-
return err;
|
222
|
-
}
|
223
|
-
|
224
|
-
local int unzlocal_getLong OF((
|
225
|
-
const zlib_filefunc_def* pzlib_filefunc_def,
|
226
|
-
voidpf filestream,
|
227
|
-
uLong *pX));
|
228
|
-
|
229
|
-
local int unzlocal_getLong (pzlib_filefunc_def,filestream,pX)
|
230
|
-
const zlib_filefunc_def* pzlib_filefunc_def;
|
231
|
-
voidpf filestream;
|
232
|
-
uLong *pX;
|
233
|
-
{
|
234
|
-
uLong x ;
|
235
|
-
int i;
|
236
|
-
int err;
|
237
|
-
|
238
|
-
err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
|
239
|
-
x = (uLong)i;
|
240
|
-
|
241
|
-
if (err==UNZ_OK)
|
242
|
-
err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
|
243
|
-
x += ((uLong)i)<<8;
|
244
|
-
|
245
|
-
if (err==UNZ_OK)
|
246
|
-
err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
|
247
|
-
x += ((uLong)i)<<16;
|
248
|
-
|
249
|
-
if (err==UNZ_OK)
|
250
|
-
err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
|
251
|
-
x += ((uLong)i)<<24;
|
252
|
-
|
253
|
-
if (err==UNZ_OK)
|
254
|
-
*pX = x;
|
255
|
-
else
|
256
|
-
*pX = 0;
|
257
|
-
return err;
|
258
|
-
}
|
259
|
-
|
260
|
-
|
261
|
-
/* My own strcmpi / strcasecmp */
|
262
|
-
local int strcmpcasenosensitive_internal (fileName1,fileName2)
|
263
|
-
const char* fileName1;
|
264
|
-
const char* fileName2;
|
265
|
-
{
|
266
|
-
for (;;)
|
267
|
-
{
|
268
|
-
char c1=*(fileName1++);
|
269
|
-
char c2=*(fileName2++);
|
270
|
-
if ((c1>='a') && (c1<='z'))
|
271
|
-
c1 -= 0x20;
|
272
|
-
if ((c2>='a') && (c2<='z'))
|
273
|
-
c2 -= 0x20;
|
274
|
-
if (c1=='\0')
|
275
|
-
return ((c2=='\0') ? 0 : -1);
|
276
|
-
if (c2=='\0')
|
277
|
-
return 1;
|
278
|
-
if (c1<c2)
|
279
|
-
return -1;
|
280
|
-
if (c1>c2)
|
281
|
-
return 1;
|
282
|
-
}
|
283
|
-
}
|
284
|
-
|
285
|
-
|
286
|
-
#ifdef CASESENSITIVITYDEFAULT_NO
|
287
|
-
#define CASESENSITIVITYDEFAULTVALUE 2
|
288
|
-
#else
|
289
|
-
#define CASESENSITIVITYDEFAULTVALUE 1
|
290
|
-
#endif
|
291
|
-
|
292
|
-
#ifndef STRCMPCASENOSENTIVEFUNCTION
|
293
|
-
#define STRCMPCASENOSENTIVEFUNCTION strcmpcasenosensitive_internal
|
294
|
-
#endif
|
295
|
-
|
296
|
-
/*
|
297
|
-
Compare two filename (fileName1,fileName2).
|
298
|
-
If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
|
299
|
-
If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi
|
300
|
-
or strcasecmp)
|
301
|
-
If iCaseSenisivity = 0, case sensitivity is defaut of your operating system
|
302
|
-
(like 1 on Unix, 2 on Windows)
|
303
|
-
|
304
|
-
*/
|
305
|
-
extern int ZEXPORT unzStringFileNameCompare (fileName1,fileName2,iCaseSensitivity)
|
306
|
-
const char* fileName1;
|
307
|
-
const char* fileName2;
|
308
|
-
int iCaseSensitivity;
|
309
|
-
{
|
310
|
-
if (iCaseSensitivity==0)
|
311
|
-
iCaseSensitivity=CASESENSITIVITYDEFAULTVALUE;
|
312
|
-
|
313
|
-
if (iCaseSensitivity==1)
|
314
|
-
return strcmp(fileName1,fileName2);
|
315
|
-
|
316
|
-
return STRCMPCASENOSENTIVEFUNCTION(fileName1,fileName2);
|
317
|
-
}
|
318
|
-
|
319
|
-
#ifndef BUFREADCOMMENT
|
320
|
-
#define BUFREADCOMMENT (0x400)
|
321
|
-
#endif
|
322
|
-
|
323
|
-
/*
|
324
|
-
Locate the Central directory of a zipfile (at the end, just before
|
325
|
-
the global comment)
|
326
|
-
*/
|
327
|
-
local uLong unzlocal_SearchCentralDir OF((
|
328
|
-
const zlib_filefunc_def* pzlib_filefunc_def,
|
329
|
-
voidpf filestream));
|
330
|
-
|
331
|
-
local uLong unzlocal_SearchCentralDir(pzlib_filefunc_def,filestream)
|
332
|
-
const zlib_filefunc_def* pzlib_filefunc_def;
|
333
|
-
voidpf filestream;
|
334
|
-
{
|
335
|
-
unsigned char* buf;
|
336
|
-
uLong uSizeFile;
|
337
|
-
uLong uBackRead;
|
338
|
-
uLong uMaxBack=0xffff; /* maximum size of global comment */
|
339
|
-
uLong uPosFound=0;
|
340
|
-
|
341
|
-
if (ZSEEK(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)
|
342
|
-
return 0;
|
343
|
-
|
344
|
-
|
345
|
-
uSizeFile = ZTELL(*pzlib_filefunc_def,filestream);
|
346
|
-
|
347
|
-
if (uMaxBack>uSizeFile)
|
348
|
-
uMaxBack = uSizeFile;
|
349
|
-
|
350
|
-
buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4);
|
351
|
-
if (buf==NULL)
|
352
|
-
return 0;
|
353
|
-
|
354
|
-
uBackRead = 4;
|
355
|
-
while (uBackRead<uMaxBack)
|
356
|
-
{
|
357
|
-
uLong uReadSize,uReadPos ;
|
358
|
-
int i;
|
359
|
-
if (uBackRead+BUFREADCOMMENT>uMaxBack)
|
360
|
-
uBackRead = uMaxBack;
|
361
|
-
else
|
362
|
-
uBackRead+=BUFREADCOMMENT;
|
363
|
-
uReadPos = uSizeFile-uBackRead ;
|
364
|
-
|
365
|
-
uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?
|
366
|
-
(BUFREADCOMMENT+4) : (uSizeFile-uReadPos);
|
367
|
-
if (ZSEEK(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0)
|
368
|
-
break;
|
369
|
-
|
370
|
-
if (ZREAD(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize)
|
371
|
-
break;
|
372
|
-
|
373
|
-
for (i=(int)uReadSize-3; (i--)>0;)
|
374
|
-
if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) &&
|
375
|
-
((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06))
|
376
|
-
{
|
377
|
-
uPosFound = uReadPos+i;
|
378
|
-
break;
|
379
|
-
}
|
380
|
-
|
381
|
-
if (uPosFound!=0)
|
382
|
-
break;
|
383
|
-
}
|
384
|
-
TRYFREE(buf);
|
385
|
-
return uPosFound;
|
386
|
-
}
|
387
|
-
|
388
|
-
/*
|
389
|
-
Open a Zip file. path contain the full pathname (by example,
|
390
|
-
on a Windows NT computer "c:\\test\\zlib114.zip" or on an Unix computer
|
391
|
-
"zlib/zlib114.zip".
|
392
|
-
If the zipfile cannot be opened (file doesn't exist or in not valid), the
|
393
|
-
return value is NULL.
|
394
|
-
Else, the return value is a unzFile Handle, usable with other function
|
395
|
-
of this unzip package.
|
396
|
-
*/
|
397
|
-
extern unzFile ZEXPORT unzOpen2 (path, pzlib_filefunc_def)
|
398
|
-
const char *path;
|
399
|
-
zlib_filefunc_def* pzlib_filefunc_def;
|
400
|
-
{
|
401
|
-
unz_s us;
|
402
|
-
unz_s *s;
|
403
|
-
uLong central_pos,uL;
|
404
|
-
|
405
|
-
uLong number_disk; /* number of the current dist, used for
|
406
|
-
spaning ZIP, unsupported, always 0*/
|
407
|
-
uLong number_disk_with_CD; /* number the the disk with central dir, used
|
408
|
-
for spaning ZIP, unsupported, always 0*/
|
409
|
-
uLong number_entry_CD; /* total number of entries in
|
410
|
-
the central dir
|
411
|
-
(same than number_entry on nospan) */
|
412
|
-
|
413
|
-
int err=UNZ_OK;
|
414
|
-
|
415
|
-
if (unz_copyright[0]!=' ')
|
416
|
-
return NULL;
|
417
|
-
|
418
|
-
if (pzlib_filefunc_def==NULL)
|
419
|
-
fill_fopen_filefunc(&us.z_filefunc);
|
420
|
-
else
|
421
|
-
us.z_filefunc = *pzlib_filefunc_def;
|
422
|
-
|
423
|
-
us.filestream= (*(us.z_filefunc.zopen_file))(us.z_filefunc.opaque,
|
424
|
-
path,
|
425
|
-
ZLIB_FILEFUNC_MODE_READ |
|
426
|
-
ZLIB_FILEFUNC_MODE_EXISTING);
|
427
|
-
if (us.filestream==NULL)
|
428
|
-
return NULL;
|
429
|
-
|
430
|
-
central_pos = unzlocal_SearchCentralDir(&us.z_filefunc,us.filestream);
|
431
|
-
if (central_pos==0)
|
432
|
-
err=UNZ_ERRNO;
|
433
|
-
|
434
|
-
if (ZSEEK(us.z_filefunc, us.filestream,
|
435
|
-
central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0)
|
436
|
-
err=UNZ_ERRNO;
|
437
|
-
|
438
|
-
/* the signature, already checked */
|
439
|
-
if (unzlocal_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK)
|
440
|
-
err=UNZ_ERRNO;
|
441
|
-
|
442
|
-
/* number of this disk */
|
443
|
-
if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_disk)!=UNZ_OK)
|
444
|
-
err=UNZ_ERRNO;
|
445
|
-
|
446
|
-
/* number of the disk with the start of the central directory */
|
447
|
-
if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_disk_with_CD)!=UNZ_OK)
|
448
|
-
err=UNZ_ERRNO;
|
449
|
-
|
450
|
-
/* total number of entries in the central dir on this disk */
|
451
|
-
if (unzlocal_getShort(&us.z_filefunc, us.filestream,&us.gi.number_entry)!=UNZ_OK)
|
452
|
-
err=UNZ_ERRNO;
|
453
|
-
|
454
|
-
/* total number of entries in the central dir */
|
455
|
-
if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_entry_CD)!=UNZ_OK)
|
456
|
-
err=UNZ_ERRNO;
|
457
|
-
|
458
|
-
if ((number_entry_CD!=us.gi.number_entry) ||
|
459
|
-
(number_disk_with_CD!=0) ||
|
460
|
-
(number_disk!=0))
|
461
|
-
err=UNZ_BADZIPFILE;
|
462
|
-
|
463
|
-
/* size of the central directory */
|
464
|
-
if (unzlocal_getLong(&us.z_filefunc, us.filestream,&us.size_central_dir)!=UNZ_OK)
|
465
|
-
err=UNZ_ERRNO;
|
466
|
-
|
467
|
-
/* offset of start of central directory with respect to the
|
468
|
-
starting disk number */
|
469
|
-
if (unzlocal_getLong(&us.z_filefunc, us.filestream,&us.offset_central_dir)!=UNZ_OK)
|
470
|
-
err=UNZ_ERRNO;
|
471
|
-
|
472
|
-
/* zipfile comment length */
|
473
|
-
if (unzlocal_getShort(&us.z_filefunc, us.filestream,&us.gi.size_comment)!=UNZ_OK)
|
474
|
-
err=UNZ_ERRNO;
|
475
|
-
|
476
|
-
if ((central_pos<us.offset_central_dir+us.size_central_dir) &&
|
477
|
-
(err==UNZ_OK))
|
478
|
-
err=UNZ_BADZIPFILE;
|
479
|
-
|
480
|
-
if (err!=UNZ_OK)
|
481
|
-
{
|
482
|
-
ZCLOSE(us.z_filefunc, us.filestream);
|
483
|
-
return NULL;
|
484
|
-
}
|
485
|
-
|
486
|
-
us.byte_before_the_zipfile = central_pos -
|
487
|
-
(us.offset_central_dir+us.size_central_dir);
|
488
|
-
us.central_pos = central_pos;
|
489
|
-
us.pfile_in_zip_read = NULL;
|
490
|
-
us.encrypted = 0;
|
491
|
-
|
492
|
-
|
493
|
-
s=(unz_s*)ALLOC(sizeof(unz_s));
|
494
|
-
*s=us;
|
495
|
-
unzGoToFirstFile((unzFile)s);
|
496
|
-
return (unzFile)s;
|
497
|
-
}
|
498
|
-
|
499
|
-
|
500
|
-
extern unzFile ZEXPORT unzOpen (path)
|
501
|
-
const char *path;
|
502
|
-
{
|
503
|
-
return unzOpen2(path, NULL);
|
504
|
-
}
|
505
|
-
|
506
|
-
/*
|
507
|
-
Close a ZipFile opened with unzipOpen.
|
508
|
-
If there is files inside the .Zip opened with unzipOpenCurrentFile (see later),
|
509
|
-
these files MUST be closed with unzipCloseCurrentFile before call unzipClose.
|
510
|
-
return UNZ_OK if there is no problem. */
|
511
|
-
extern int ZEXPORT unzClose (file)
|
512
|
-
unzFile file;
|
513
|
-
{
|
514
|
-
unz_s* s;
|
515
|
-
if (file==NULL)
|
516
|
-
return UNZ_PARAMERROR;
|
517
|
-
s=(unz_s*)file;
|
518
|
-
|
519
|
-
if (s->pfile_in_zip_read!=NULL)
|
520
|
-
unzCloseCurrentFile(file);
|
521
|
-
|
522
|
-
ZCLOSE(s->z_filefunc, s->filestream);
|
523
|
-
TRYFREE(s);
|
524
|
-
return UNZ_OK;
|
525
|
-
}
|
526
|
-
|
527
|
-
|
528
|
-
/*
|
529
|
-
Write info about the ZipFile in the *pglobal_info structure.
|
530
|
-
No preparation of the structure is needed
|
531
|
-
return UNZ_OK if there is no problem. */
|
532
|
-
extern int ZEXPORT unzGetGlobalInfo (file,pglobal_info)
|
533
|
-
unzFile file;
|
534
|
-
unz_global_info *pglobal_info;
|
535
|
-
{
|
536
|
-
unz_s* s;
|
537
|
-
if (file==NULL)
|
538
|
-
return UNZ_PARAMERROR;
|
539
|
-
s=(unz_s*)file;
|
540
|
-
*pglobal_info=s->gi;
|
541
|
-
return UNZ_OK;
|
542
|
-
}
|
543
|
-
|
544
|
-
|
545
|
-
/*
|
546
|
-
Translate date/time from Dos format to tm_unz (readable more easilty)
|
547
|
-
*/
|
548
|
-
local void unzlocal_DosDateToTmuDate (ulDosDate, ptm)
|
549
|
-
uLong ulDosDate;
|
550
|
-
tm_unz* ptm;
|
551
|
-
{
|
552
|
-
uLong uDate;
|
553
|
-
uDate = (uLong)(ulDosDate>>16);
|
554
|
-
ptm->tm_mday = (uInt)(uDate&0x1f) ;
|
555
|
-
ptm->tm_mon = (uInt)((((uDate)&0x1E0)/0x20)-1) ;
|
556
|
-
ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980) ;
|
557
|
-
|
558
|
-
ptm->tm_hour = (uInt) ((ulDosDate &0xF800)/0x800);
|
559
|
-
ptm->tm_min = (uInt) ((ulDosDate&0x7E0)/0x20) ;
|
560
|
-
ptm->tm_sec = (uInt) (2*(ulDosDate&0x1f)) ;
|
561
|
-
}
|
562
|
-
|
563
|
-
/*
|
564
|
-
Get Info about the current file in the zipfile, with internal only info
|
565
|
-
*/
|
566
|
-
local int unzlocal_GetCurrentFileInfoInternal OF((unzFile file,
|
567
|
-
unz_file_info *pfile_info,
|
568
|
-
unz_file_info_internal
|
569
|
-
*pfile_info_internal,
|
570
|
-
char *szFileName,
|
571
|
-
uLong fileNameBufferSize,
|
572
|
-
void *extraField,
|
573
|
-
uLong extraFieldBufferSize,
|
574
|
-
char *szComment,
|
575
|
-
uLong commentBufferSize));
|
576
|
-
|
577
|
-
local int unzlocal_GetCurrentFileInfoInternal (file,
|
578
|
-
pfile_info,
|
579
|
-
pfile_info_internal,
|
580
|
-
szFileName, fileNameBufferSize,
|
581
|
-
extraField, extraFieldBufferSize,
|
582
|
-
szComment, commentBufferSize)
|
583
|
-
unzFile file;
|
584
|
-
unz_file_info *pfile_info;
|
585
|
-
unz_file_info_internal *pfile_info_internal;
|
586
|
-
char *szFileName;
|
587
|
-
uLong fileNameBufferSize;
|
588
|
-
void *extraField;
|
589
|
-
uLong extraFieldBufferSize;
|
590
|
-
char *szComment;
|
591
|
-
uLong commentBufferSize;
|
592
|
-
{
|
593
|
-
unz_s* s;
|
594
|
-
unz_file_info file_info;
|
595
|
-
unz_file_info_internal file_info_internal;
|
596
|
-
int err=UNZ_OK;
|
597
|
-
uLong uMagic;
|
598
|
-
long lSeek=0;
|
599
|
-
|
600
|
-
if (file==NULL)
|
601
|
-
return UNZ_PARAMERROR;
|
602
|
-
s=(unz_s*)file;
|
603
|
-
if (ZSEEK(s->z_filefunc, s->filestream,
|
604
|
-
s->pos_in_central_dir+s->byte_before_the_zipfile,
|
605
|
-
ZLIB_FILEFUNC_SEEK_SET)!=0)
|
606
|
-
err=UNZ_ERRNO;
|
607
|
-
|
608
|
-
|
609
|
-
/* we check the magic */
|
610
|
-
if (err==UNZ_OK)
|
611
|
-
if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)
|
612
|
-
err=UNZ_ERRNO;
|
613
|
-
else if (uMagic!=0x02014b50)
|
614
|
-
err=UNZ_BADZIPFILE;
|
615
|
-
|
616
|
-
if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version) != UNZ_OK)
|
617
|
-
err=UNZ_ERRNO;
|
618
|
-
|
619
|
-
if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version_needed) != UNZ_OK)
|
620
|
-
err=UNZ_ERRNO;
|
621
|
-
|
622
|
-
if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.flag) != UNZ_OK)
|
623
|
-
err=UNZ_ERRNO;
|
624
|
-
|
625
|
-
if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.compression_method) != UNZ_OK)
|
626
|
-
err=UNZ_ERRNO;
|
627
|
-
|
628
|
-
if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.dosDate) != UNZ_OK)
|
629
|
-
err=UNZ_ERRNO;
|
630
|
-
|
631
|
-
unzlocal_DosDateToTmuDate(file_info.dosDate,&file_info.tmu_date);
|
632
|
-
|
633
|
-
if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.crc) != UNZ_OK)
|
634
|
-
err=UNZ_ERRNO;
|
635
|
-
|
636
|
-
if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.compressed_size) != UNZ_OK)
|
637
|
-
err=UNZ_ERRNO;
|
638
|
-
|
639
|
-
if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK)
|
640
|
-
err=UNZ_ERRNO;
|
641
|
-
|
642
|
-
if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_filename) != UNZ_OK)
|
643
|
-
err=UNZ_ERRNO;
|
644
|
-
|
645
|
-
if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_extra) != UNZ_OK)
|
646
|
-
err=UNZ_ERRNO;
|
647
|
-
|
648
|
-
if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_comment) != UNZ_OK)
|
649
|
-
err=UNZ_ERRNO;
|
650
|
-
|
651
|
-
if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.disk_num_start) != UNZ_OK)
|
652
|
-
err=UNZ_ERRNO;
|
653
|
-
|
654
|
-
if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.internal_fa) != UNZ_OK)
|
655
|
-
err=UNZ_ERRNO;
|
656
|
-
|
657
|
-
if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.external_fa) != UNZ_OK)
|
658
|
-
err=UNZ_ERRNO;
|
659
|
-
|
660
|
-
if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info_internal.offset_curfile) != UNZ_OK)
|
661
|
-
err=UNZ_ERRNO;
|
662
|
-
|
663
|
-
lSeek+=file_info.size_filename;
|
664
|
-
if ((err==UNZ_OK) && (szFileName!=NULL))
|
665
|
-
{
|
666
|
-
uLong uSizeRead ;
|
667
|
-
if (file_info.size_filename<fileNameBufferSize)
|
668
|
-
{
|
669
|
-
*(szFileName+file_info.size_filename)='\0';
|
670
|
-
uSizeRead = file_info.size_filename;
|
671
|
-
}
|
672
|
-
else
|
673
|
-
uSizeRead = fileNameBufferSize;
|
674
|
-
|
675
|
-
if ((file_info.size_filename>0) && (fileNameBufferSize>0))
|
676
|
-
if (ZREAD(s->z_filefunc, s->filestream,szFileName,uSizeRead)!=uSizeRead)
|
677
|
-
err=UNZ_ERRNO;
|
678
|
-
lSeek -= uSizeRead;
|
679
|
-
}
|
680
|
-
|
681
|
-
|
682
|
-
if ((err==UNZ_OK) && (extraField!=NULL))
|
683
|
-
{
|
684
|
-
uLong uSizeRead ;
|
685
|
-
if (file_info.size_file_extra<extraFieldBufferSize)
|
686
|
-
uSizeRead = file_info.size_file_extra;
|
687
|
-
else
|
688
|
-
uSizeRead = extraFieldBufferSize;
|
689
|
-
|
690
|
-
if (lSeek!=0)
|
691
|
-
if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
|
692
|
-
lSeek=0;
|
693
|
-
else
|
694
|
-
err=UNZ_ERRNO;
|
695
|
-
if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0))
|
696
|
-
if (ZREAD(s->z_filefunc, s->filestream,extraField,uSizeRead)!=uSizeRead)
|
697
|
-
err=UNZ_ERRNO;
|
698
|
-
lSeek += file_info.size_file_extra - uSizeRead;
|
699
|
-
}
|
700
|
-
else
|
701
|
-
lSeek+=file_info.size_file_extra;
|
702
|
-
|
703
|
-
|
704
|
-
if ((err==UNZ_OK) && (szComment!=NULL))
|
705
|
-
{
|
706
|
-
uLong uSizeRead ;
|
707
|
-
if (file_info.size_file_comment<commentBufferSize)
|
708
|
-
{
|
709
|
-
*(szComment+file_info.size_file_comment)='\0';
|
710
|
-
uSizeRead = file_info.size_file_comment;
|
711
|
-
}
|
712
|
-
else
|
713
|
-
uSizeRead = commentBufferSize;
|
714
|
-
|
715
|
-
if (lSeek!=0)
|
716
|
-
if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
|
717
|
-
lSeek=0;
|
718
|
-
else
|
719
|
-
err=UNZ_ERRNO;
|
720
|
-
if ((file_info.size_file_comment>0) && (commentBufferSize>0))
|
721
|
-
if (ZREAD(s->z_filefunc, s->filestream,szComment,uSizeRead)!=uSizeRead)
|
722
|
-
err=UNZ_ERRNO;
|
723
|
-
lSeek+=file_info.size_file_comment - uSizeRead;
|
724
|
-
}
|
725
|
-
else
|
726
|
-
lSeek+=file_info.size_file_comment;
|
727
|
-
|
728
|
-
if ((err==UNZ_OK) && (pfile_info!=NULL))
|
729
|
-
*pfile_info=file_info;
|
730
|
-
|
731
|
-
if ((err==UNZ_OK) && (pfile_info_internal!=NULL))
|
732
|
-
*pfile_info_internal=file_info_internal;
|
733
|
-
|
734
|
-
return err;
|
735
|
-
}
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
/*
|
740
|
-
Write info about the ZipFile in the *pglobal_info structure.
|
741
|
-
No preparation of the structure is needed
|
742
|
-
return UNZ_OK if there is no problem.
|
743
|
-
*/
|
744
|
-
extern int ZEXPORT unzGetCurrentFileInfo (file,
|
745
|
-
pfile_info,
|
746
|
-
szFileName, fileNameBufferSize,
|
747
|
-
extraField, extraFieldBufferSize,
|
748
|
-
szComment, commentBufferSize)
|
749
|
-
unzFile file;
|
750
|
-
unz_file_info *pfile_info;
|
751
|
-
char *szFileName;
|
752
|
-
uLong fileNameBufferSize;
|
753
|
-
void *extraField;
|
754
|
-
uLong extraFieldBufferSize;
|
755
|
-
char *szComment;
|
756
|
-
uLong commentBufferSize;
|
757
|
-
{
|
758
|
-
return unzlocal_GetCurrentFileInfoInternal(file,pfile_info,NULL,
|
759
|
-
szFileName,fileNameBufferSize,
|
760
|
-
extraField,extraFieldBufferSize,
|
761
|
-
szComment,commentBufferSize);
|
762
|
-
}
|
763
|
-
|
764
|
-
/*
|
765
|
-
Set the current file of the zipfile to the first file.
|
766
|
-
return UNZ_OK if there is no problem
|
767
|
-
*/
|
768
|
-
extern int ZEXPORT unzGoToFirstFile (file)
|
769
|
-
unzFile file;
|
770
|
-
{
|
771
|
-
int err=UNZ_OK;
|
772
|
-
unz_s* s;
|
773
|
-
if (file==NULL)
|
774
|
-
return UNZ_PARAMERROR;
|
775
|
-
s=(unz_s*)file;
|
776
|
-
s->pos_in_central_dir=s->offset_central_dir;
|
777
|
-
s->num_file=0;
|
778
|
-
err=unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
|
779
|
-
&s->cur_file_info_internal,
|
780
|
-
NULL,0,NULL,0,NULL,0);
|
781
|
-
s->current_file_ok = (err == UNZ_OK);
|
782
|
-
return err;
|
783
|
-
}
|
784
|
-
|
785
|
-
/*
|
786
|
-
Set the current file of the zipfile to the next file.
|
787
|
-
return UNZ_OK if there is no problem
|
788
|
-
return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
|
789
|
-
*/
|
790
|
-
extern int ZEXPORT unzGoToNextFile (file)
|
791
|
-
unzFile file;
|
792
|
-
{
|
793
|
-
unz_s* s;
|
794
|
-
int err;
|
795
|
-
|
796
|
-
if (file==NULL)
|
797
|
-
return UNZ_PARAMERROR;
|
798
|
-
s=(unz_s*)file;
|
799
|
-
if (!s->current_file_ok)
|
800
|
-
return UNZ_END_OF_LIST_OF_FILE;
|
801
|
-
if (s->gi.number_entry != 0xffff) /* 2^16 files overflow hack */
|
802
|
-
if (s->num_file+1==s->gi.number_entry)
|
803
|
-
return UNZ_END_OF_LIST_OF_FILE;
|
804
|
-
|
805
|
-
s->pos_in_central_dir += SIZECENTRALDIRITEM + s->cur_file_info.size_filename +
|
806
|
-
s->cur_file_info.size_file_extra + s->cur_file_info.size_file_comment ;
|
807
|
-
s->num_file++;
|
808
|
-
err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
|
809
|
-
&s->cur_file_info_internal,
|
810
|
-
NULL,0,NULL,0,NULL,0);
|
811
|
-
s->current_file_ok = (err == UNZ_OK);
|
812
|
-
return err;
|
813
|
-
}
|
814
|
-
|
815
|
-
|
816
|
-
/*
|
817
|
-
Try locate the file szFileName in the zipfile.
|
818
|
-
For the iCaseSensitivity signification, see unzipStringFileNameCompare
|
819
|
-
|
820
|
-
return value :
|
821
|
-
UNZ_OK if the file is found. It becomes the current file.
|
822
|
-
UNZ_END_OF_LIST_OF_FILE if the file is not found
|
823
|
-
*/
|
824
|
-
extern int ZEXPORT unzLocateFile (file, szFileName, iCaseSensitivity)
|
825
|
-
unzFile file;
|
826
|
-
const char *szFileName;
|
827
|
-
int iCaseSensitivity;
|
828
|
-
{
|
829
|
-
unz_s* s;
|
830
|
-
int err;
|
831
|
-
|
832
|
-
/* We remember the 'current' position in the file so that we can jump
|
833
|
-
* back there if we fail.
|
834
|
-
*/
|
835
|
-
unz_file_info cur_file_infoSaved;
|
836
|
-
unz_file_info_internal cur_file_info_internalSaved;
|
837
|
-
uLong num_fileSaved;
|
838
|
-
uLong pos_in_central_dirSaved;
|
839
|
-
|
840
|
-
|
841
|
-
if (file==NULL)
|
842
|
-
return UNZ_PARAMERROR;
|
843
|
-
|
844
|
-
if (strlen(szFileName)>=UNZ_MAXFILENAMEINZIP)
|
845
|
-
return UNZ_PARAMERROR;
|
846
|
-
|
847
|
-
s=(unz_s*)file;
|
848
|
-
if (!s->current_file_ok)
|
849
|
-
return UNZ_END_OF_LIST_OF_FILE;
|
850
|
-
|
851
|
-
/* Save the current state */
|
852
|
-
num_fileSaved = s->num_file;
|
853
|
-
pos_in_central_dirSaved = s->pos_in_central_dir;
|
854
|
-
cur_file_infoSaved = s->cur_file_info;
|
855
|
-
cur_file_info_internalSaved = s->cur_file_info_internal;
|
856
|
-
|
857
|
-
err = unzGoToFirstFile(file);
|
858
|
-
|
859
|
-
while (err == UNZ_OK)
|
860
|
-
{
|
861
|
-
char szCurrentFileName[UNZ_MAXFILENAMEINZIP+1];
|
862
|
-
err = unzGetCurrentFileInfo(file,NULL,
|
863
|
-
szCurrentFileName,sizeof(szCurrentFileName)-1,
|
864
|
-
NULL,0,NULL,0);
|
865
|
-
if (err == UNZ_OK)
|
866
|
-
{
|
867
|
-
if (unzStringFileNameCompare(szCurrentFileName,
|
868
|
-
szFileName,iCaseSensitivity)==0)
|
869
|
-
return UNZ_OK;
|
870
|
-
err = unzGoToNextFile(file);
|
871
|
-
}
|
872
|
-
}
|
873
|
-
|
874
|
-
/* We failed, so restore the state of the 'current file' to where we
|
875
|
-
* were.
|
876
|
-
*/
|
877
|
-
s->num_file = num_fileSaved ;
|
878
|
-
s->pos_in_central_dir = pos_in_central_dirSaved ;
|
879
|
-
s->cur_file_info = cur_file_infoSaved;
|
880
|
-
s->cur_file_info_internal = cur_file_info_internalSaved;
|
881
|
-
return err;
|
882
|
-
}
|
883
|
-
|
884
|
-
|
885
|
-
/*
|
886
|
-
///////////////////////////////////////////
|
887
|
-
// Contributed by Ryan Haksi (mailto://cryogen@infoserve.net)
|
888
|
-
// I need random access
|
889
|
-
//
|
890
|
-
// Further optimization could be realized by adding an ability
|
891
|
-
// to cache the directory in memory. The goal being a single
|
892
|
-
// comprehensive file read to put the file I need in a memory.
|
893
|
-
*/
|
894
|
-
|
895
|
-
/*
|
896
|
-
typedef struct unz_file_pos_s
|
897
|
-
{
|
898
|
-
uLong pos_in_zip_directory; // offset in file
|
899
|
-
uLong num_of_file; // # of file
|
900
|
-
} unz_file_pos;
|
901
|
-
*/
|
902
|
-
|
903
|
-
extern int ZEXPORT unzGetFilePos(file, file_pos)
|
904
|
-
unzFile file;
|
905
|
-
unz_file_pos* file_pos;
|
906
|
-
{
|
907
|
-
unz_s* s;
|
908
|
-
|
909
|
-
if (file==NULL || file_pos==NULL)
|
910
|
-
return UNZ_PARAMERROR;
|
911
|
-
s=(unz_s*)file;
|
912
|
-
if (!s->current_file_ok)
|
913
|
-
return UNZ_END_OF_LIST_OF_FILE;
|
914
|
-
|
915
|
-
file_pos->pos_in_zip_directory = s->pos_in_central_dir;
|
916
|
-
file_pos->num_of_file = s->num_file;
|
917
|
-
|
918
|
-
return UNZ_OK;
|
919
|
-
}
|
920
|
-
|
921
|
-
extern int ZEXPORT unzGoToFilePos(file, file_pos)
|
922
|
-
unzFile file;
|
923
|
-
unz_file_pos* file_pos;
|
924
|
-
{
|
925
|
-
unz_s* s;
|
926
|
-
int err;
|
927
|
-
|
928
|
-
if (file==NULL || file_pos==NULL)
|
929
|
-
return UNZ_PARAMERROR;
|
930
|
-
s=(unz_s*)file;
|
931
|
-
|
932
|
-
/* jump to the right spot */
|
933
|
-
s->pos_in_central_dir = file_pos->pos_in_zip_directory;
|
934
|
-
s->num_file = file_pos->num_of_file;
|
935
|
-
|
936
|
-
/* set the current file */
|
937
|
-
err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
|
938
|
-
&s->cur_file_info_internal,
|
939
|
-
NULL,0,NULL,0,NULL,0);
|
940
|
-
/* return results */
|
941
|
-
s->current_file_ok = (err == UNZ_OK);
|
942
|
-
return err;
|
943
|
-
}
|
944
|
-
|
945
|
-
/*
|
946
|
-
// Unzip Helper Functions - should be here?
|
947
|
-
///////////////////////////////////////////
|
948
|
-
*/
|
949
|
-
|
950
|
-
/*
|
951
|
-
Read the local header of the current zipfile
|
952
|
-
Check the coherency of the local header and info in the end of central
|
953
|
-
directory about this file
|
954
|
-
store in *piSizeVar the size of extra info in local header
|
955
|
-
(filename and size of extra field data)
|
956
|
-
*/
|
957
|
-
local int unzlocal_CheckCurrentFileCoherencyHeader (s,piSizeVar,
|
958
|
-
poffset_local_extrafield,
|
959
|
-
psize_local_extrafield)
|
960
|
-
unz_s* s;
|
961
|
-
uInt* piSizeVar;
|
962
|
-
uLong *poffset_local_extrafield;
|
963
|
-
uInt *psize_local_extrafield;
|
964
|
-
{
|
965
|
-
uLong uMagic,uData,uFlags;
|
966
|
-
uLong size_filename;
|
967
|
-
uLong size_extra_field;
|
968
|
-
int err=UNZ_OK;
|
969
|
-
|
970
|
-
*piSizeVar = 0;
|
971
|
-
*poffset_local_extrafield = 0;
|
972
|
-
*psize_local_extrafield = 0;
|
973
|
-
|
974
|
-
if (ZSEEK(s->z_filefunc, s->filestream,s->cur_file_info_internal.offset_curfile +
|
975
|
-
s->byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET)!=0)
|
976
|
-
return UNZ_ERRNO;
|
977
|
-
|
978
|
-
|
979
|
-
if (err==UNZ_OK)
|
980
|
-
if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)
|
981
|
-
err=UNZ_ERRNO;
|
982
|
-
else if (uMagic!=0x04034b50)
|
983
|
-
err=UNZ_BADZIPFILE;
|
984
|
-
|
985
|
-
if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK)
|
986
|
-
err=UNZ_ERRNO;
|
987
|
-
/*
|
988
|
-
else if ((err==UNZ_OK) && (uData!=s->cur_file_info.wVersion))
|
989
|
-
err=UNZ_BADZIPFILE;
|
990
|
-
*/
|
991
|
-
if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uFlags) != UNZ_OK)
|
992
|
-
err=UNZ_ERRNO;
|
993
|
-
|
994
|
-
if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK)
|
995
|
-
err=UNZ_ERRNO;
|
996
|
-
else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compression_method))
|
997
|
-
err=UNZ_BADZIPFILE;
|
998
|
-
|
999
|
-
if ((err==UNZ_OK) && (s->cur_file_info.compression_method!=0) &&
|
1000
|
-
(s->cur_file_info.compression_method!=Z_DEFLATED))
|
1001
|
-
err=UNZ_BADZIPFILE;
|
1002
|
-
|
1003
|
-
if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* date/time */
|
1004
|
-
err=UNZ_ERRNO;
|
1005
|
-
|
1006
|
-
if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* crc */
|
1007
|
-
err=UNZ_ERRNO;
|
1008
|
-
else if ((err==UNZ_OK) && (uData!=s->cur_file_info.crc) &&
|
1009
|
-
((uFlags & 8)==0))
|
1010
|
-
err=UNZ_BADZIPFILE;
|
1011
|
-
|
1012
|
-
if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size compr */
|
1013
|
-
err=UNZ_ERRNO;
|
1014
|
-
else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compressed_size) &&
|
1015
|
-
((uFlags & 8)==0))
|
1016
|
-
err=UNZ_BADZIPFILE;
|
1017
|
-
|
1018
|
-
if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size uncompr */
|
1019
|
-
err=UNZ_ERRNO;
|
1020
|
-
else if ((err==UNZ_OK) && (uData!=s->cur_file_info.uncompressed_size) &&
|
1021
|
-
((uFlags & 8)==0))
|
1022
|
-
err=UNZ_BADZIPFILE;
|
1023
|
-
|
1024
|
-
|
1025
|
-
if (unzlocal_getShort(&s->z_filefunc, s->filestream,&size_filename) != UNZ_OK)
|
1026
|
-
err=UNZ_ERRNO;
|
1027
|
-
else if ((err==UNZ_OK) && (size_filename!=s->cur_file_info.size_filename))
|
1028
|
-
err=UNZ_BADZIPFILE;
|
1029
|
-
|
1030
|
-
*piSizeVar += (uInt)size_filename;
|
1031
|
-
|
1032
|
-
if (unzlocal_getShort(&s->z_filefunc, s->filestream,&size_extra_field) != UNZ_OK)
|
1033
|
-
err=UNZ_ERRNO;
|
1034
|
-
*poffset_local_extrafield= s->cur_file_info_internal.offset_curfile +
|
1035
|
-
SIZEZIPLOCALHEADER + size_filename;
|
1036
|
-
*psize_local_extrafield = (uInt)size_extra_field;
|
1037
|
-
|
1038
|
-
*piSizeVar += (uInt)size_extra_field;
|
1039
|
-
|
1040
|
-
return err;
|
1041
|
-
}
|
1042
|
-
|
1043
|
-
/*
|
1044
|
-
Open for reading data the current file in the zipfile.
|
1045
|
-
If there is no error and the file is opened, the return value is UNZ_OK.
|
1046
|
-
*/
|
1047
|
-
extern int ZEXPORT unzOpenCurrentFile3 (file, method, level, raw, password)
|
1048
|
-
unzFile file;
|
1049
|
-
int* method;
|
1050
|
-
int* level;
|
1051
|
-
int raw;
|
1052
|
-
const char* password;
|
1053
|
-
{
|
1054
|
-
int err=UNZ_OK;
|
1055
|
-
uInt iSizeVar;
|
1056
|
-
unz_s* s;
|
1057
|
-
file_in_zip_read_info_s* pfile_in_zip_read_info;
|
1058
|
-
uLong offset_local_extrafield; /* offset of the local extra field */
|
1059
|
-
uInt size_local_extrafield; /* size of the local extra field */
|
1060
|
-
# ifndef NOUNCRYPT
|
1061
|
-
char source[12];
|
1062
|
-
# else
|
1063
|
-
if (password != NULL)
|
1064
|
-
return UNZ_PARAMERROR;
|
1065
|
-
# endif
|
1066
|
-
|
1067
|
-
if (file==NULL)
|
1068
|
-
return UNZ_PARAMERROR;
|
1069
|
-
s=(unz_s*)file;
|
1070
|
-
if (!s->current_file_ok)
|
1071
|
-
return UNZ_PARAMERROR;
|
1072
|
-
|
1073
|
-
if (s->pfile_in_zip_read != NULL)
|
1074
|
-
unzCloseCurrentFile(file);
|
1075
|
-
|
1076
|
-
if (unzlocal_CheckCurrentFileCoherencyHeader(s,&iSizeVar,
|
1077
|
-
&offset_local_extrafield,&size_local_extrafield)!=UNZ_OK)
|
1078
|
-
return UNZ_BADZIPFILE;
|
1079
|
-
|
1080
|
-
pfile_in_zip_read_info = (file_in_zip_read_info_s*)
|
1081
|
-
ALLOC(sizeof(file_in_zip_read_info_s));
|
1082
|
-
if (pfile_in_zip_read_info==NULL)
|
1083
|
-
return UNZ_INTERNALERROR;
|
1084
|
-
|
1085
|
-
pfile_in_zip_read_info->read_buffer=(char*)ALLOC(UNZ_BUFSIZE);
|
1086
|
-
pfile_in_zip_read_info->offset_local_extrafield = offset_local_extrafield;
|
1087
|
-
pfile_in_zip_read_info->size_local_extrafield = size_local_extrafield;
|
1088
|
-
pfile_in_zip_read_info->pos_local_extrafield=0;
|
1089
|
-
pfile_in_zip_read_info->raw=raw;
|
1090
|
-
|
1091
|
-
if (pfile_in_zip_read_info->read_buffer==NULL)
|
1092
|
-
{
|
1093
|
-
TRYFREE(pfile_in_zip_read_info);
|
1094
|
-
return UNZ_INTERNALERROR;
|
1095
|
-
}
|
1096
|
-
|
1097
|
-
pfile_in_zip_read_info->stream_initialised=0;
|
1098
|
-
|
1099
|
-
if (method!=NULL)
|
1100
|
-
*method = (int)s->cur_file_info.compression_method;
|
1101
|
-
|
1102
|
-
if (level!=NULL)
|
1103
|
-
{
|
1104
|
-
*level = 6;
|
1105
|
-
switch (s->cur_file_info.flag & 0x06)
|
1106
|
-
{
|
1107
|
-
case 6 : *level = 1; break;
|
1108
|
-
case 4 : *level = 2; break;
|
1109
|
-
case 2 : *level = 9; break;
|
1110
|
-
}
|
1111
|
-
}
|
1112
|
-
|
1113
|
-
if ((s->cur_file_info.compression_method!=0) &&
|
1114
|
-
(s->cur_file_info.compression_method!=Z_DEFLATED))
|
1115
|
-
err=UNZ_BADZIPFILE;
|
1116
|
-
|
1117
|
-
pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc;
|
1118
|
-
pfile_in_zip_read_info->crc32=0;
|
1119
|
-
pfile_in_zip_read_info->compression_method =
|
1120
|
-
s->cur_file_info.compression_method;
|
1121
|
-
pfile_in_zip_read_info->filestream=s->filestream;
|
1122
|
-
pfile_in_zip_read_info->z_filefunc=s->z_filefunc;
|
1123
|
-
pfile_in_zip_read_info->byte_before_the_zipfile=s->byte_before_the_zipfile;
|
1124
|
-
|
1125
|
-
pfile_in_zip_read_info->stream.total_out = 0;
|
1126
|
-
|
1127
|
-
if ((s->cur_file_info.compression_method==Z_DEFLATED) &&
|
1128
|
-
(!raw))
|
1129
|
-
{
|
1130
|
-
pfile_in_zip_read_info->stream.zalloc = (alloc_func)0;
|
1131
|
-
pfile_in_zip_read_info->stream.zfree = (free_func)0;
|
1132
|
-
pfile_in_zip_read_info->stream.opaque = (voidpf)0;
|
1133
|
-
pfile_in_zip_read_info->stream.next_in = (voidpf)0;
|
1134
|
-
pfile_in_zip_read_info->stream.avail_in = 0;
|
1135
|
-
|
1136
|
-
err=inflateInit2(&pfile_in_zip_read_info->stream, -MAX_WBITS);
|
1137
|
-
if (err == Z_OK)
|
1138
|
-
pfile_in_zip_read_info->stream_initialised=1;
|
1139
|
-
else
|
1140
|
-
{
|
1141
|
-
TRYFREE(pfile_in_zip_read_info);
|
1142
|
-
return err;
|
1143
|
-
}
|
1144
|
-
/* windowBits is passed < 0 to tell that there is no zlib header.
|
1145
|
-
* Note that in this case inflate *requires* an extra "dummy" byte
|
1146
|
-
* after the compressed stream in order to complete decompression and
|
1147
|
-
* return Z_STREAM_END.
|
1148
|
-
* In unzip, i don't wait absolutely Z_STREAM_END because I known the
|
1149
|
-
* size of both compressed and uncompressed data
|
1150
|
-
*/
|
1151
|
-
}
|
1152
|
-
pfile_in_zip_read_info->rest_read_compressed =
|
1153
|
-
s->cur_file_info.compressed_size ;
|
1154
|
-
pfile_in_zip_read_info->rest_read_uncompressed =
|
1155
|
-
s->cur_file_info.uncompressed_size ;
|
1156
|
-
|
1157
|
-
|
1158
|
-
pfile_in_zip_read_info->pos_in_zipfile =
|
1159
|
-
s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER +
|
1160
|
-
iSizeVar;
|
1161
|
-
|
1162
|
-
pfile_in_zip_read_info->stream.avail_in = (uInt)0;
|
1163
|
-
|
1164
|
-
s->pfile_in_zip_read = pfile_in_zip_read_info;
|
1165
|
-
|
1166
|
-
# ifndef NOUNCRYPT
|
1167
|
-
if (password != NULL)
|
1168
|
-
{
|
1169
|
-
int i;
|
1170
|
-
s->pcrc_32_tab = get_crc_table();
|
1171
|
-
init_keys(password,s->keys,s->pcrc_32_tab);
|
1172
|
-
if (ZSEEK(s->z_filefunc, s->filestream,
|
1173
|
-
s->pfile_in_zip_read->pos_in_zipfile +
|
1174
|
-
s->pfile_in_zip_read->byte_before_the_zipfile,
|
1175
|
-
SEEK_SET)!=0)
|
1176
|
-
return UNZ_INTERNALERROR;
|
1177
|
-
if(ZREAD(s->z_filefunc, s->filestream,source, 12)<12)
|
1178
|
-
return UNZ_INTERNALERROR;
|
1179
|
-
|
1180
|
-
for (i = 0; i<12; i++)
|
1181
|
-
zdecode(s->keys,s->pcrc_32_tab,source[i]);
|
1182
|
-
|
1183
|
-
s->pfile_in_zip_read->pos_in_zipfile+=12;
|
1184
|
-
s->encrypted=1;
|
1185
|
-
}
|
1186
|
-
# endif
|
1187
|
-
|
1188
|
-
|
1189
|
-
return UNZ_OK;
|
1190
|
-
}
|
1191
|
-
|
1192
|
-
extern int ZEXPORT unzOpenCurrentFile (file)
|
1193
|
-
unzFile file;
|
1194
|
-
{
|
1195
|
-
return unzOpenCurrentFile3(file, NULL, NULL, 0, NULL);
|
1196
|
-
}
|
1197
|
-
|
1198
|
-
extern int ZEXPORT unzOpenCurrentFilePassword (file, password)
|
1199
|
-
unzFile file;
|
1200
|
-
const char* password;
|
1201
|
-
{
|
1202
|
-
return unzOpenCurrentFile3(file, NULL, NULL, 0, password);
|
1203
|
-
}
|
1204
|
-
|
1205
|
-
extern int ZEXPORT unzOpenCurrentFile2 (file,method,level,raw)
|
1206
|
-
unzFile file;
|
1207
|
-
int* method;
|
1208
|
-
int* level;
|
1209
|
-
int raw;
|
1210
|
-
{
|
1211
|
-
return unzOpenCurrentFile3(file, method, level, raw, NULL);
|
1212
|
-
}
|
1213
|
-
|
1214
|
-
/*
|
1215
|
-
Read bytes from the current file.
|
1216
|
-
buf contain buffer where data must be copied
|
1217
|
-
len the size of buf.
|
1218
|
-
|
1219
|
-
return the number of byte copied if somes bytes are copied
|
1220
|
-
return 0 if the end of file was reached
|
1221
|
-
return <0 with error code if there is an error
|
1222
|
-
(UNZ_ERRNO for IO error, or zLib error for uncompress error)
|
1223
|
-
*/
|
1224
|
-
extern int ZEXPORT unzReadCurrentFile (file, buf, len)
|
1225
|
-
unzFile file;
|
1226
|
-
voidp buf;
|
1227
|
-
unsigned len;
|
1228
|
-
{
|
1229
|
-
int err=UNZ_OK;
|
1230
|
-
uInt iRead = 0;
|
1231
|
-
unz_s* s;
|
1232
|
-
file_in_zip_read_info_s* pfile_in_zip_read_info;
|
1233
|
-
if (file==NULL)
|
1234
|
-
return UNZ_PARAMERROR;
|
1235
|
-
s=(unz_s*)file;
|
1236
|
-
pfile_in_zip_read_info=s->pfile_in_zip_read;
|
1237
|
-
|
1238
|
-
if (pfile_in_zip_read_info==NULL)
|
1239
|
-
return UNZ_PARAMERROR;
|
1240
|
-
|
1241
|
-
|
1242
|
-
if ((pfile_in_zip_read_info->read_buffer == NULL))
|
1243
|
-
return UNZ_END_OF_LIST_OF_FILE;
|
1244
|
-
if (len==0)
|
1245
|
-
return 0;
|
1246
|
-
|
1247
|
-
pfile_in_zip_read_info->stream.next_out = (Bytef*)buf;
|
1248
|
-
|
1249
|
-
pfile_in_zip_read_info->stream.avail_out = (uInt)len;
|
1250
|
-
|
1251
|
-
if ((len>pfile_in_zip_read_info->rest_read_uncompressed) &&
|
1252
|
-
(!(pfile_in_zip_read_info->raw)))
|
1253
|
-
pfile_in_zip_read_info->stream.avail_out =
|
1254
|
-
(uInt)pfile_in_zip_read_info->rest_read_uncompressed;
|
1255
|
-
|
1256
|
-
if ((len>pfile_in_zip_read_info->rest_read_compressed+
|
1257
|
-
pfile_in_zip_read_info->stream.avail_in) &&
|
1258
|
-
(pfile_in_zip_read_info->raw))
|
1259
|
-
pfile_in_zip_read_info->stream.avail_out =
|
1260
|
-
(uInt)pfile_in_zip_read_info->rest_read_compressed+
|
1261
|
-
pfile_in_zip_read_info->stream.avail_in;
|
1262
|
-
|
1263
|
-
while (pfile_in_zip_read_info->stream.avail_out>0)
|
1264
|
-
{
|
1265
|
-
if ((pfile_in_zip_read_info->stream.avail_in==0) &&
|
1266
|
-
(pfile_in_zip_read_info->rest_read_compressed>0))
|
1267
|
-
{
|
1268
|
-
uInt uReadThis = UNZ_BUFSIZE;
|
1269
|
-
if (pfile_in_zip_read_info->rest_read_compressed<uReadThis)
|
1270
|
-
uReadThis = (uInt)pfile_in_zip_read_info->rest_read_compressed;
|
1271
|
-
if (uReadThis == 0)
|
1272
|
-
return UNZ_EOF;
|
1273
|
-
if (ZSEEK(pfile_in_zip_read_info->z_filefunc,
|
1274
|
-
pfile_in_zip_read_info->filestream,
|
1275
|
-
pfile_in_zip_read_info->pos_in_zipfile +
|
1276
|
-
pfile_in_zip_read_info->byte_before_the_zipfile,
|
1277
|
-
ZLIB_FILEFUNC_SEEK_SET)!=0)
|
1278
|
-
return UNZ_ERRNO;
|
1279
|
-
if (ZREAD(pfile_in_zip_read_info->z_filefunc,
|
1280
|
-
pfile_in_zip_read_info->filestream,
|
1281
|
-
pfile_in_zip_read_info->read_buffer,
|
1282
|
-
uReadThis)!=uReadThis)
|
1283
|
-
return UNZ_ERRNO;
|
1284
|
-
|
1285
|
-
|
1286
|
-
# ifndef NOUNCRYPT
|
1287
|
-
if(s->encrypted)
|
1288
|
-
{
|
1289
|
-
uInt i;
|
1290
|
-
for(i=0;i<uReadThis;i++)
|
1291
|
-
pfile_in_zip_read_info->read_buffer[i] =
|
1292
|
-
zdecode(s->keys,s->pcrc_32_tab,
|
1293
|
-
pfile_in_zip_read_info->read_buffer[i]);
|
1294
|
-
}
|
1295
|
-
# endif
|
1296
|
-
|
1297
|
-
|
1298
|
-
pfile_in_zip_read_info->pos_in_zipfile += uReadThis;
|
1299
|
-
|
1300
|
-
pfile_in_zip_read_info->rest_read_compressed-=uReadThis;
|
1301
|
-
|
1302
|
-
pfile_in_zip_read_info->stream.next_in =
|
1303
|
-
(Bytef*)pfile_in_zip_read_info->read_buffer;
|
1304
|
-
pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis;
|
1305
|
-
}
|
1306
|
-
|
1307
|
-
if ((pfile_in_zip_read_info->compression_method==0) || (pfile_in_zip_read_info->raw))
|
1308
|
-
{
|
1309
|
-
uInt uDoCopy,i ;
|
1310
|
-
|
1311
|
-
if ((pfile_in_zip_read_info->stream.avail_in == 0) &&
|
1312
|
-
(pfile_in_zip_read_info->rest_read_compressed == 0))
|
1313
|
-
return (iRead==0) ? UNZ_EOF : iRead;
|
1314
|
-
|
1315
|
-
if (pfile_in_zip_read_info->stream.avail_out <
|
1316
|
-
pfile_in_zip_read_info->stream.avail_in)
|
1317
|
-
uDoCopy = pfile_in_zip_read_info->stream.avail_out ;
|
1318
|
-
else
|
1319
|
-
uDoCopy = pfile_in_zip_read_info->stream.avail_in ;
|
1320
|
-
|
1321
|
-
for (i=0;i<uDoCopy;i++)
|
1322
|
-
*(pfile_in_zip_read_info->stream.next_out+i) =
|
1323
|
-
*(pfile_in_zip_read_info->stream.next_in+i);
|
1324
|
-
|
1325
|
-
pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,
|
1326
|
-
pfile_in_zip_read_info->stream.next_out,
|
1327
|
-
uDoCopy);
|
1328
|
-
pfile_in_zip_read_info->rest_read_uncompressed-=uDoCopy;
|
1329
|
-
pfile_in_zip_read_info->stream.avail_in -= uDoCopy;
|
1330
|
-
pfile_in_zip_read_info->stream.avail_out -= uDoCopy;
|
1331
|
-
pfile_in_zip_read_info->stream.next_out += uDoCopy;
|
1332
|
-
pfile_in_zip_read_info->stream.next_in += uDoCopy;
|
1333
|
-
pfile_in_zip_read_info->stream.total_out += uDoCopy;
|
1334
|
-
iRead += uDoCopy;
|
1335
|
-
}
|
1336
|
-
else
|
1337
|
-
{
|
1338
|
-
uLong uTotalOutBefore,uTotalOutAfter;
|
1339
|
-
const Bytef *bufBefore;
|
1340
|
-
uLong uOutThis;
|
1341
|
-
int flush=Z_SYNC_FLUSH;
|
1342
|
-
|
1343
|
-
uTotalOutBefore = pfile_in_zip_read_info->stream.total_out;
|
1344
|
-
bufBefore = pfile_in_zip_read_info->stream.next_out;
|
1345
|
-
|
1346
|
-
/*
|
1347
|
-
if ((pfile_in_zip_read_info->rest_read_uncompressed ==
|
1348
|
-
pfile_in_zip_read_info->stream.avail_out) &&
|
1349
|
-
(pfile_in_zip_read_info->rest_read_compressed == 0))
|
1350
|
-
flush = Z_FINISH;
|
1351
|
-
*/
|
1352
|
-
err=inflate(&pfile_in_zip_read_info->stream,flush);
|
1353
|
-
|
1354
|
-
if ((err>=0) && (pfile_in_zip_read_info->stream.msg!=NULL))
|
1355
|
-
err = Z_DATA_ERROR;
|
1356
|
-
|
1357
|
-
uTotalOutAfter = pfile_in_zip_read_info->stream.total_out;
|
1358
|
-
uOutThis = uTotalOutAfter-uTotalOutBefore;
|
1359
|
-
|
1360
|
-
pfile_in_zip_read_info->crc32 =
|
1361
|
-
crc32(pfile_in_zip_read_info->crc32,bufBefore,
|
1362
|
-
(uInt)(uOutThis));
|
1363
|
-
|
1364
|
-
pfile_in_zip_read_info->rest_read_uncompressed -=
|
1365
|
-
uOutThis;
|
1366
|
-
|
1367
|
-
iRead += (uInt)(uTotalOutAfter - uTotalOutBefore);
|
1368
|
-
|
1369
|
-
if (err==Z_STREAM_END)
|
1370
|
-
return (iRead==0) ? UNZ_EOF : iRead;
|
1371
|
-
if (err!=Z_OK)
|
1372
|
-
break;
|
1373
|
-
}
|
1374
|
-
}
|
1375
|
-
|
1376
|
-
if (err==Z_OK)
|
1377
|
-
return iRead;
|
1378
|
-
return err;
|
1379
|
-
}
|
1380
|
-
|
1381
|
-
|
1382
|
-
/*
|
1383
|
-
Give the current position in uncompressed data
|
1384
|
-
*/
|
1385
|
-
extern z_off_t ZEXPORT unztell (file)
|
1386
|
-
unzFile file;
|
1387
|
-
{
|
1388
|
-
unz_s* s;
|
1389
|
-
file_in_zip_read_info_s* pfile_in_zip_read_info;
|
1390
|
-
if (file==NULL)
|
1391
|
-
return UNZ_PARAMERROR;
|
1392
|
-
s=(unz_s*)file;
|
1393
|
-
pfile_in_zip_read_info=s->pfile_in_zip_read;
|
1394
|
-
|
1395
|
-
if (pfile_in_zip_read_info==NULL)
|
1396
|
-
return UNZ_PARAMERROR;
|
1397
|
-
|
1398
|
-
return (z_off_t)pfile_in_zip_read_info->stream.total_out;
|
1399
|
-
}
|
1400
|
-
|
1401
|
-
|
1402
|
-
/*
|
1403
|
-
return 1 if the end of file was reached, 0 elsewhere
|
1404
|
-
*/
|
1405
|
-
extern int ZEXPORT unzeof (file)
|
1406
|
-
unzFile file;
|
1407
|
-
{
|
1408
|
-
unz_s* s;
|
1409
|
-
file_in_zip_read_info_s* pfile_in_zip_read_info;
|
1410
|
-
if (file==NULL)
|
1411
|
-
return UNZ_PARAMERROR;
|
1412
|
-
s=(unz_s*)file;
|
1413
|
-
pfile_in_zip_read_info=s->pfile_in_zip_read;
|
1414
|
-
|
1415
|
-
if (pfile_in_zip_read_info==NULL)
|
1416
|
-
return UNZ_PARAMERROR;
|
1417
|
-
|
1418
|
-
if (pfile_in_zip_read_info->rest_read_uncompressed == 0)
|
1419
|
-
return 1;
|
1420
|
-
else
|
1421
|
-
return 0;
|
1422
|
-
}
|
1423
|
-
|
1424
|
-
|
1425
|
-
|
1426
|
-
/*
|
1427
|
-
Read extra field from the current file (opened by unzOpenCurrentFile)
|
1428
|
-
This is the local-header version of the extra field (sometimes, there is
|
1429
|
-
more info in the local-header version than in the central-header)
|
1430
|
-
|
1431
|
-
if buf==NULL, it return the size of the local extra field that can be read
|
1432
|
-
|
1433
|
-
if buf!=NULL, len is the size of the buffer, the extra header is copied in
|
1434
|
-
buf.
|
1435
|
-
the return value is the number of bytes copied in buf, or (if <0)
|
1436
|
-
the error code
|
1437
|
-
*/
|
1438
|
-
extern int ZEXPORT unzGetLocalExtrafield (file,buf,len)
|
1439
|
-
unzFile file;
|
1440
|
-
voidp buf;
|
1441
|
-
unsigned len;
|
1442
|
-
{
|
1443
|
-
unz_s* s;
|
1444
|
-
file_in_zip_read_info_s* pfile_in_zip_read_info;
|
1445
|
-
uInt read_now;
|
1446
|
-
uLong size_to_read;
|
1447
|
-
|
1448
|
-
if (file==NULL)
|
1449
|
-
return UNZ_PARAMERROR;
|
1450
|
-
s=(unz_s*)file;
|
1451
|
-
pfile_in_zip_read_info=s->pfile_in_zip_read;
|
1452
|
-
|
1453
|
-
if (pfile_in_zip_read_info==NULL)
|
1454
|
-
return UNZ_PARAMERROR;
|
1455
|
-
|
1456
|
-
size_to_read = (pfile_in_zip_read_info->size_local_extrafield -
|
1457
|
-
pfile_in_zip_read_info->pos_local_extrafield);
|
1458
|
-
|
1459
|
-
if (buf==NULL)
|
1460
|
-
return (int)size_to_read;
|
1461
|
-
|
1462
|
-
if (len>size_to_read)
|
1463
|
-
read_now = (uInt)size_to_read;
|
1464
|
-
else
|
1465
|
-
read_now = (uInt)len ;
|
1466
|
-
|
1467
|
-
if (read_now==0)
|
1468
|
-
return 0;
|
1469
|
-
|
1470
|
-
if (ZSEEK(pfile_in_zip_read_info->z_filefunc,
|
1471
|
-
pfile_in_zip_read_info->filestream,
|
1472
|
-
pfile_in_zip_read_info->offset_local_extrafield +
|
1473
|
-
pfile_in_zip_read_info->pos_local_extrafield,
|
1474
|
-
ZLIB_FILEFUNC_SEEK_SET)!=0)
|
1475
|
-
return UNZ_ERRNO;
|
1476
|
-
|
1477
|
-
if (ZREAD(pfile_in_zip_read_info->z_filefunc,
|
1478
|
-
pfile_in_zip_read_info->filestream,
|
1479
|
-
buf,read_now)!=read_now)
|
1480
|
-
return UNZ_ERRNO;
|
1481
|
-
|
1482
|
-
return (int)read_now;
|
1483
|
-
}
|
1484
|
-
|
1485
|
-
/*
|
1486
|
-
Close the file in zip opened with unzipOpenCurrentFile
|
1487
|
-
Return UNZ_CRCERROR if all the file was read but the CRC is not good
|
1488
|
-
*/
|
1489
|
-
extern int ZEXPORT unzCloseCurrentFile (file)
|
1490
|
-
unzFile file;
|
1491
|
-
{
|
1492
|
-
int err=UNZ_OK;
|
1493
|
-
|
1494
|
-
unz_s* s;
|
1495
|
-
file_in_zip_read_info_s* pfile_in_zip_read_info;
|
1496
|
-
if (file==NULL)
|
1497
|
-
return UNZ_PARAMERROR;
|
1498
|
-
s=(unz_s*)file;
|
1499
|
-
pfile_in_zip_read_info=s->pfile_in_zip_read;
|
1500
|
-
|
1501
|
-
if (pfile_in_zip_read_info==NULL)
|
1502
|
-
return UNZ_PARAMERROR;
|
1503
|
-
|
1504
|
-
|
1505
|
-
if ((pfile_in_zip_read_info->rest_read_uncompressed == 0) &&
|
1506
|
-
(!pfile_in_zip_read_info->raw))
|
1507
|
-
{
|
1508
|
-
if (pfile_in_zip_read_info->crc32 != pfile_in_zip_read_info->crc32_wait)
|
1509
|
-
err=UNZ_CRCERROR;
|
1510
|
-
}
|
1511
|
-
|
1512
|
-
|
1513
|
-
TRYFREE(pfile_in_zip_read_info->read_buffer);
|
1514
|
-
pfile_in_zip_read_info->read_buffer = NULL;
|
1515
|
-
if (pfile_in_zip_read_info->stream_initialised)
|
1516
|
-
inflateEnd(&pfile_in_zip_read_info->stream);
|
1517
|
-
|
1518
|
-
pfile_in_zip_read_info->stream_initialised = 0;
|
1519
|
-
TRYFREE(pfile_in_zip_read_info);
|
1520
|
-
|
1521
|
-
s->pfile_in_zip_read=NULL;
|
1522
|
-
|
1523
|
-
return err;
|
1524
|
-
}
|
1525
|
-
|
1526
|
-
|
1527
|
-
/*
|
1528
|
-
Get the global comment string of the ZipFile, in the szComment buffer.
|
1529
|
-
uSizeBuf is the size of the szComment buffer.
|
1530
|
-
return the number of byte copied or an error code <0
|
1531
|
-
*/
|
1532
|
-
extern int ZEXPORT unzGetGlobalComment (file, szComment, uSizeBuf)
|
1533
|
-
unzFile file;
|
1534
|
-
char *szComment;
|
1535
|
-
uLong uSizeBuf;
|
1536
|
-
{
|
1537
|
-
int err=UNZ_OK;
|
1538
|
-
unz_s* s;
|
1539
|
-
uLong uReadThis ;
|
1540
|
-
if (file==NULL)
|
1541
|
-
return UNZ_PARAMERROR;
|
1542
|
-
s=(unz_s*)file;
|
1543
|
-
|
1544
|
-
uReadThis = uSizeBuf;
|
1545
|
-
if (uReadThis>s->gi.size_comment)
|
1546
|
-
uReadThis = s->gi.size_comment;
|
1547
|
-
|
1548
|
-
if (ZSEEK(s->z_filefunc,s->filestream,s->central_pos+22,ZLIB_FILEFUNC_SEEK_SET)!=0)
|
1549
|
-
return UNZ_ERRNO;
|
1550
|
-
|
1551
|
-
if (uReadThis>0)
|
1552
|
-
{
|
1553
|
-
*szComment='\0';
|
1554
|
-
if (ZREAD(s->z_filefunc,s->filestream,szComment,uReadThis)!=uReadThis)
|
1555
|
-
return UNZ_ERRNO;
|
1556
|
-
}
|
1557
|
-
|
1558
|
-
if ((szComment != NULL) && (uSizeBuf > s->gi.size_comment))
|
1559
|
-
*(szComment+s->gi.size_comment)='\0';
|
1560
|
-
return (int)uReadThis;
|
1561
|
-
}
|
1562
|
-
|
1563
|
-
/* Additions by RX '2004 */
|
1564
|
-
extern uLong ZEXPORT unzGetOffset (file)
|
1565
|
-
unzFile file;
|
1566
|
-
{
|
1567
|
-
unz_s* s;
|
1568
|
-
|
1569
|
-
if (file==NULL)
|
1570
|
-
return UNZ_PARAMERROR;
|
1571
|
-
s=(unz_s*)file;
|
1572
|
-
if (!s->current_file_ok)
|
1573
|
-
return 0;
|
1574
|
-
if (s->gi.number_entry != 0 && s->gi.number_entry != 0xffff)
|
1575
|
-
if (s->num_file==s->gi.number_entry)
|
1576
|
-
return 0;
|
1577
|
-
return s->pos_in_central_dir;
|
1578
|
-
}
|
1579
|
-
|
1580
|
-
extern int ZEXPORT unzSetOffset (file, pos)
|
1581
|
-
unzFile file;
|
1582
|
-
uLong pos;
|
1583
|
-
{
|
1584
|
-
unz_s* s;
|
1585
|
-
int err;
|
1586
|
-
|
1587
|
-
if (file==NULL)
|
1588
|
-
return UNZ_PARAMERROR;
|
1589
|
-
s=(unz_s*)file;
|
1590
|
-
|
1591
|
-
s->pos_in_central_dir = pos;
|
1592
|
-
s->num_file = s->gi.number_entry; /* hack */
|
1593
|
-
err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
|
1594
|
-
&s->cur_file_info_internal,
|
1595
|
-
NULL,0,NULL,0,NULL,0);
|
1596
|
-
s->current_file_ok = (err == UNZ_OK);
|
1597
|
-
return err;
|
1598
|
-
}
|