rugged 1.3.2.3 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/rugged/extconf.rb +1 -1
- data/ext/rugged/rugged_config.c +7 -2
- data/ext/rugged/rugged_remote.c +17 -0
- data/lib/rugged/version.rb +1 -1
- data/vendor/libgit2/CMakeLists.txt +103 -276
- data/vendor/libgit2/COPYING +36 -19
- data/vendor/libgit2/cmake/AddCFlagIfSupported.cmake +21 -21
- data/vendor/libgit2/cmake/DefaultCFlags.cmake +154 -0
- data/vendor/libgit2/cmake/EnableWarnings.cmake +13 -13
- data/vendor/libgit2/cmake/FindCoreFoundation.cmake +13 -13
- data/vendor/libgit2/cmake/FindGSSAPI.cmake +171 -287
- data/vendor/libgit2/cmake/FindGSSFramework.cmake +13 -13
- data/vendor/libgit2/cmake/{FindHTTP_Parser.cmake → FindHTTPParser.cmake} +17 -17
- data/vendor/libgit2/cmake/FindIconv.cmake +27 -27
- data/vendor/libgit2/cmake/FindLibSSH2.cmake +5 -5
- data/vendor/libgit2/cmake/FindPCRE.cmake +13 -13
- data/vendor/libgit2/cmake/FindPCRE2.cmake +12 -12
- data/vendor/libgit2/cmake/FindPkgLibraries.cmake +19 -19
- data/vendor/libgit2/cmake/FindSecurity.cmake +14 -14
- data/vendor/libgit2/cmake/FindStatNsec.cmake +12 -18
- data/vendor/libgit2/cmake/Findfutimens.cmake +8 -8
- data/vendor/libgit2/cmake/FindmbedTLS.cmake +63 -70
- data/vendor/libgit2/cmake/IdeSplitSources.cmake +18 -18
- data/vendor/libgit2/cmake/PkgBuildConfig.cmake +60 -60
- data/vendor/libgit2/cmake/SanitizeBool.cmake +20 -20
- data/vendor/libgit2/cmake/SelectGSSAPI.cmake +37 -37
- data/vendor/libgit2/cmake/SelectHTTPParser.cmake +19 -0
- data/vendor/libgit2/cmake/SelectHTTPSBackend.cmake +100 -100
- data/vendor/libgit2/cmake/SelectHashes.cmake +39 -49
- data/vendor/libgit2/cmake/SelectRegex.cmake +51 -0
- data/vendor/libgit2/cmake/SelectSSH.cmake +41 -0
- data/vendor/libgit2/cmake/SelectWinHTTP.cmake +17 -0
- data/vendor/libgit2/cmake/SelectZlib.cmake +34 -0
- data/vendor/libgit2/deps/chromium-zlib/CMakeLists.txt +6 -6
- data/vendor/libgit2/deps/ntlmclient/CMakeLists.txt +31 -31
- data/vendor/libgit2/deps/ntlmclient/crypt_openssl.c +1 -1
- data/vendor/libgit2/deps/ntlmclient/ntlm.c +4 -4
- data/vendor/libgit2/deps/ntlmclient/ntlm.h +4 -4
- data/vendor/libgit2/deps/ntlmclient/ntlmclient.h +2 -2
- data/vendor/libgit2/deps/pcre/CMakeLists.txt +88 -88
- data/vendor/libgit2/deps/winhttp/CMakeLists.txt +14 -16
- data/vendor/libgit2/deps/zlib/adler32.c +0 -7
- data/vendor/libgit2/deps/zlib/crc32.c +288 -975
- data/vendor/libgit2/deps/zlib/crc32.h +436 -9441
- data/vendor/libgit2/deps/zlib/deflate.c +31 -83
- data/vendor/libgit2/deps/zlib/deflate.h +15 -12
- data/vendor/libgit2/deps/zlib/gzguts.h +2 -3
- data/vendor/libgit2/deps/zlib/infback.c +1 -2
- data/vendor/libgit2/deps/zlib/inffast.c +14 -14
- data/vendor/libgit2/deps/zlib/inflate.c +8 -39
- data/vendor/libgit2/deps/zlib/inflate.h +2 -3
- data/vendor/libgit2/deps/zlib/inftrees.c +3 -3
- data/vendor/libgit2/deps/zlib/trees.c +48 -27
- data/vendor/libgit2/deps/zlib/zlib.h +100 -126
- data/vendor/libgit2/deps/zlib/zutil.c +2 -2
- data/vendor/libgit2/deps/zlib/zutil.h +9 -12
- data/vendor/libgit2/include/git2/apply.h +16 -2
- data/vendor/libgit2/include/git2/attr.h +11 -2
- data/vendor/libgit2/include/git2/blame.h +4 -1
- data/vendor/libgit2/include/git2/blob.h +14 -1
- data/vendor/libgit2/include/git2/branch.h +2 -0
- data/vendor/libgit2/include/git2/buffer.h +18 -78
- data/vendor/libgit2/include/git2/cert.h +2 -2
- data/vendor/libgit2/include/git2/checkout.h +5 -2
- data/vendor/libgit2/include/git2/clone.h +3 -3
- data/vendor/libgit2/include/git2/commit.h +2 -0
- data/vendor/libgit2/include/git2/common.h +5 -12
- data/vendor/libgit2/include/git2/config.h +19 -3
- data/vendor/libgit2/include/git2/credential.h +2 -1
- data/vendor/libgit2/include/git2/credential_helpers.h +1 -0
- data/vendor/libgit2/include/git2/deprecated.h +1 -1
- data/vendor/libgit2/include/git2/describe.h +7 -2
- data/vendor/libgit2/include/git2/diff.h +17 -9
- data/vendor/libgit2/include/git2/email.h +1 -1
- data/vendor/libgit2/include/git2/errors.h +1 -2
- data/vendor/libgit2/include/git2/filter.h +7 -2
- data/vendor/libgit2/include/git2/graph.h +1 -0
- data/vendor/libgit2/include/git2/ignore.h +1 -1
- data/vendor/libgit2/include/git2/index.h +11 -5
- data/vendor/libgit2/include/git2/indexer.h +19 -0
- data/vendor/libgit2/include/git2/merge.h +23 -3
- data/vendor/libgit2/include/git2/message.h +2 -0
- data/vendor/libgit2/include/git2/object.h +23 -0
- data/vendor/libgit2/include/git2/odb.h +37 -7
- data/vendor/libgit2/include/git2/odb_backend.h +1 -1
- data/vendor/libgit2/include/git2/pack.h +24 -8
- data/vendor/libgit2/include/git2/patch.h +8 -0
- data/vendor/libgit2/include/git2/pathspec.h +1 -1
- data/vendor/libgit2/include/git2/proxy.h +1 -1
- data/vendor/libgit2/include/git2/rebase.h +9 -1
- data/vendor/libgit2/include/git2/refdb.h +3 -0
- data/vendor/libgit2/include/git2/reflog.h +1 -1
- data/vendor/libgit2/include/git2/refs.h +2 -2
- data/vendor/libgit2/include/git2/remote.h +184 -37
- data/vendor/libgit2/include/git2/repository.h +14 -9
- data/vendor/libgit2/include/git2/reset.h +2 -2
- data/vendor/libgit2/include/git2/revparse.h +1 -1
- data/vendor/libgit2/include/git2/revwalk.h +4 -1
- data/vendor/libgit2/include/git2/signature.h +1 -1
- data/vendor/libgit2/include/git2/stash.h +3 -3
- data/vendor/libgit2/include/git2/status.h +9 -3
- data/vendor/libgit2/include/git2/submodule.h +7 -2
- data/vendor/libgit2/include/git2/sys/commit_graph.h +1 -1
- data/vendor/libgit2/include/git2/sys/odb_backend.h +2 -5
- data/vendor/libgit2/include/git2/sys/remote.h +31 -0
- data/vendor/libgit2/include/git2/sys/stream.h +1 -1
- data/vendor/libgit2/include/git2/sys/transport.h +25 -34
- data/vendor/libgit2/include/git2/tag.h +1 -0
- data/vendor/libgit2/include/git2/tree.h +4 -3
- data/vendor/libgit2/include/git2/types.h +7 -7
- data/vendor/libgit2/include/git2/version.h +3 -3
- data/vendor/libgit2/include/git2/worktree.h +12 -2
- data/vendor/libgit2/src/CMakeLists.txt +189 -315
- data/vendor/libgit2/src/annotated_commit.h +1 -1
- data/vendor/libgit2/src/apply.c +18 -18
- data/vendor/libgit2/src/apply.h +2 -2
- data/vendor/libgit2/src/attr.c +18 -18
- data/vendor/libgit2/src/attr_file.c +17 -17
- data/vendor/libgit2/src/attr_file.h +4 -4
- data/vendor/libgit2/src/attrcache.c +17 -12
- data/vendor/libgit2/src/blame_git.c +1 -1
- data/vendor/libgit2/src/blob.c +33 -26
- data/vendor/libgit2/src/blob.h +1 -1
- data/vendor/libgit2/src/branch.c +150 -109
- data/vendor/libgit2/src/branch.h +15 -3
- data/vendor/libgit2/src/buf.c +126 -0
- data/vendor/libgit2/src/buf.h +50 -0
- data/vendor/libgit2/src/cc-compat.h +1 -1
- data/vendor/libgit2/src/checkout.c +74 -68
- data/vendor/libgit2/src/cherrypick.c +10 -10
- data/vendor/libgit2/src/clone.c +66 -66
- data/vendor/libgit2/src/commit.c +128 -58
- data/vendor/libgit2/src/commit.h +24 -1
- data/vendor/libgit2/src/commit_graph.c +68 -53
- data/vendor/libgit2/src/commit_graph.h +10 -3
- data/vendor/libgit2/src/commit_list.c +2 -3
- data/vendor/libgit2/src/common.h +10 -3
- data/vendor/libgit2/src/config.c +99 -77
- data/vendor/libgit2/src/config.h +15 -2
- data/vendor/libgit2/src/config_file.c +103 -91
- data/vendor/libgit2/src/config_mem.c +9 -9
- data/vendor/libgit2/src/config_parse.c +27 -23
- data/vendor/libgit2/src/crlf.c +24 -21
- data/vendor/libgit2/src/date.c +10 -17
- data/vendor/libgit2/src/date.h +33 -0
- data/vendor/libgit2/src/describe.c +27 -19
- data/vendor/libgit2/src/diff.c +25 -8
- data/vendor/libgit2/src/diff.h +2 -4
- data/vendor/libgit2/src/diff_driver.c +34 -36
- data/vendor/libgit2/src/diff_driver.h +3 -3
- data/vendor/libgit2/src/diff_file.c +29 -20
- data/vendor/libgit2/src/diff_generate.c +30 -6
- data/vendor/libgit2/src/diff_generate.h +5 -3
- data/vendor/libgit2/src/diff_print.c +102 -95
- data/vendor/libgit2/src/diff_stats.c +40 -29
- data/vendor/libgit2/src/{message.h → diff_stats.h} +7 -6
- data/vendor/libgit2/src/diff_tform.c +9 -8
- data/vendor/libgit2/src/diff_xdiff.c +3 -8
- data/vendor/libgit2/src/email.c +54 -38
- data/vendor/libgit2/src/email.h +1 -1
- data/vendor/libgit2/src/errors.c +18 -18
- data/vendor/libgit2/src/features.h.in +6 -1
- data/vendor/libgit2/src/fetch.c +69 -24
- data/vendor/libgit2/src/fetch.h +1 -1
- data/vendor/libgit2/src/fetchhead.c +19 -19
- data/vendor/libgit2/src/filebuf.c +28 -28
- data/vendor/libgit2/src/filebuf.h +1 -1
- data/vendor/libgit2/src/filter.c +96 -52
- data/vendor/libgit2/src/filter.h +26 -5
- data/vendor/libgit2/src/fs_path.c +1912 -0
- data/vendor/libgit2/src/fs_path.h +752 -0
- data/vendor/libgit2/src/futils.c +91 -85
- data/vendor/libgit2/src/futils.h +26 -14
- data/vendor/libgit2/src/hash/sha1/collisiondetect.c +2 -2
- data/vendor/libgit2/src/hash/sha1/common_crypto.c +2 -2
- data/vendor/libgit2/src/hash/sha1/generic.c +2 -2
- data/vendor/libgit2/src/hash/sha1/mbedtls.c +2 -2
- data/vendor/libgit2/src/hash/sha1/openssl.c +2 -2
- data/vendor/libgit2/src/hash/sha1/sha1dc/sha1.c +1 -1
- data/vendor/libgit2/src/hash/sha1/win32.c +6 -6
- data/vendor/libgit2/src/hash/sha1.h +3 -1
- data/vendor/libgit2/src/hash.c +67 -35
- data/vendor/libgit2/src/hash.h +12 -12
- data/vendor/libgit2/src/ident.c +18 -18
- data/vendor/libgit2/src/ignore.c +35 -34
- data/vendor/libgit2/src/ignore.h +2 -2
- data/vendor/libgit2/src/index.c +79 -80
- data/vendor/libgit2/src/index.h +6 -3
- data/vendor/libgit2/src/indexer.c +75 -57
- data/vendor/libgit2/src/iterator.c +64 -56
- data/vendor/libgit2/src/iterator.h +5 -5
- data/vendor/libgit2/src/khash.h +1 -1
- data/vendor/libgit2/src/libgit2.c +22 -19
- data/vendor/libgit2/src/mailmap.c +38 -36
- data/vendor/libgit2/src/merge.c +27 -27
- data/vendor/libgit2/src/merge.h +1 -14
- data/vendor/libgit2/src/merge_driver.c +2 -2
- data/vendor/libgit2/src/merge_file.c +13 -3
- data/vendor/libgit2/src/message.c +21 -10
- data/vendor/libgit2/src/midx.c +83 -66
- data/vendor/libgit2/src/midx.h +3 -3
- data/vendor/libgit2/src/mwindow.c +1 -1
- data/vendor/libgit2/src/net.c +278 -68
- data/vendor/libgit2/src/net.h +10 -3
- data/vendor/libgit2/src/netops.c +1 -1
- data/vendor/libgit2/src/netops.h +1 -1
- data/vendor/libgit2/src/notes.c +20 -29
- data/vendor/libgit2/src/object.c +49 -9
- data/vendor/libgit2/src/object.h +1 -1
- data/vendor/libgit2/src/odb.c +35 -32
- data/vendor/libgit2/src/odb.h +1 -1
- data/vendor/libgit2/src/odb_loose.c +68 -68
- data/vendor/libgit2/src/odb_mempack.c +18 -5
- data/vendor/libgit2/src/odb_pack.c +43 -43
- data/vendor/libgit2/src/oid.c +11 -4
- data/vendor/libgit2/src/oid.h +15 -0
- data/vendor/libgit2/src/pack-objects.c +41 -26
- data/vendor/libgit2/src/pack-objects.h +11 -6
- data/vendor/libgit2/src/pack.c +10 -10
- data/vendor/libgit2/src/patch.c +3 -3
- data/vendor/libgit2/src/patch.h +1 -0
- data/vendor/libgit2/src/patch_generate.c +27 -11
- data/vendor/libgit2/src/patch_generate.h +5 -5
- data/vendor/libgit2/src/patch_parse.c +24 -24
- data/vendor/libgit2/src/path.c +76 -1951
- data/vendor/libgit2/src/path.h +34 -741
- data/vendor/libgit2/src/pathspec.c +6 -6
- data/vendor/libgit2/src/pathspec.h +2 -2
- data/vendor/libgit2/src/posix.c +3 -3
- data/vendor/libgit2/src/posix.h +1 -0
- data/vendor/libgit2/src/pqueue.h +1 -1
- data/vendor/libgit2/src/proxy.c +4 -1
- data/vendor/libgit2/src/proxy.h +1 -1
- data/vendor/libgit2/src/push.c +30 -35
- data/vendor/libgit2/src/push.h +4 -16
- data/vendor/libgit2/src/rand.c +226 -0
- data/vendor/libgit2/src/rand.h +37 -0
- data/vendor/libgit2/src/reader.c +8 -8
- data/vendor/libgit2/src/reader.h +2 -2
- data/vendor/libgit2/src/rebase.c +89 -88
- data/vendor/libgit2/src/refdb_fs.c +447 -173
- data/vendor/libgit2/src/refs.c +32 -32
- data/vendor/libgit2/src/refs.h +2 -2
- data/vendor/libgit2/src/refspec.c +32 -37
- data/vendor/libgit2/src/refspec.h +5 -2
- data/vendor/libgit2/src/regexp.c +1 -1
- data/vendor/libgit2/src/remote.c +713 -419
- data/vendor/libgit2/src/remote.h +15 -10
- data/vendor/libgit2/src/repository.c +350 -467
- data/vendor/libgit2/src/repository.h +11 -10
- data/vendor/libgit2/src/reset.c +8 -5
- data/vendor/libgit2/src/revert.c +10 -10
- data/vendor/libgit2/src/revparse.c +48 -35
- data/vendor/libgit2/src/revwalk.c +7 -7
- data/vendor/libgit2/src/signature.c +12 -6
- data/vendor/libgit2/src/signature.h +1 -1
- data/vendor/libgit2/src/sortedcache.c +1 -1
- data/vendor/libgit2/src/sortedcache.h +1 -1
- data/vendor/libgit2/src/stash.c +36 -37
- data/vendor/libgit2/src/status.c +4 -1
- data/vendor/libgit2/src/{buffer.c → str.c} +157 -151
- data/vendor/libgit2/src/str.h +357 -0
- data/vendor/libgit2/src/streams/mbedtls.c +8 -6
- data/vendor/libgit2/src/streams/openssl_dynamic.h +3 -3
- data/vendor/libgit2/src/submodule.c +171 -159
- data/vendor/libgit2/src/submodule.h +1 -1
- data/vendor/libgit2/src/sysdir.c +68 -52
- data/vendor/libgit2/src/sysdir.h +15 -10
- data/vendor/libgit2/src/tag.c +29 -27
- data/vendor/libgit2/src/thread.h +3 -3
- data/vendor/libgit2/src/threadstate.c +3 -3
- data/vendor/libgit2/src/threadstate.h +1 -1
- data/vendor/libgit2/src/trace.c +1 -14
- data/vendor/libgit2/src/trace.h +5 -22
- data/vendor/libgit2/src/trailer.c +1 -1
- data/vendor/libgit2/src/transaction.c +1 -1
- data/vendor/libgit2/src/transport.c +10 -10
- data/vendor/libgit2/src/transports/auth.c +7 -9
- data/vendor/libgit2/src/transports/auth.h +2 -3
- data/vendor/libgit2/src/transports/auth_negotiate.c +12 -13
- data/vendor/libgit2/src/transports/auth_ntlm.c +10 -10
- data/vendor/libgit2/src/transports/auth_ntlm.h +0 -1
- data/vendor/libgit2/src/transports/git.c +9 -11
- data/vendor/libgit2/src/transports/http.c +37 -17
- data/vendor/libgit2/src/transports/http.h +2 -3
- data/vendor/libgit2/src/transports/httpclient.c +65 -65
- data/vendor/libgit2/src/transports/local.c +124 -116
- data/vendor/libgit2/src/transports/smart.c +51 -139
- data/vendor/libgit2/src/transports/smart.h +25 -31
- data/vendor/libgit2/src/transports/smart_pkt.c +33 -33
- data/vendor/libgit2/src/transports/smart_protocol.c +57 -39
- data/vendor/libgit2/src/transports/ssh.c +47 -112
- data/vendor/libgit2/src/transports/winhttp.c +50 -56
- data/vendor/libgit2/src/tree-cache.c +5 -5
- data/vendor/libgit2/src/tree-cache.h +2 -2
- data/vendor/libgit2/src/tree.c +59 -48
- data/vendor/libgit2/src/tree.h +1 -1
- data/vendor/libgit2/src/unix/map.c +0 -2
- data/vendor/libgit2/src/unix/posix.h +1 -4
- data/vendor/libgit2/src/unix/realpath.c +0 -2
- data/vendor/libgit2/src/util.c +14 -14
- data/vendor/libgit2/src/util.h +2 -28
- data/vendor/libgit2/src/vector.h +1 -1
- data/vendor/libgit2/src/win32/findfile.c +172 -116
- data/vendor/libgit2/src/win32/findfile.h +7 -4
- data/vendor/libgit2/src/win32/path_w32.c +140 -9
- data/vendor/libgit2/src/win32/path_w32.h +2 -0
- data/vendor/libgit2/src/win32/posix.h +0 -1
- data/vendor/libgit2/src/win32/posix_w32.c +11 -27
- data/vendor/libgit2/src/win32/w32_buffer.c +2 -3
- data/vendor/libgit2/src/win32/w32_buffer.h +2 -3
- data/vendor/libgit2/src/win32/w32_leakcheck.c +1 -1
- data/vendor/libgit2/src/worktree.c +116 -94
- data/vendor/libgit2/src/worktree.h +1 -1
- data/vendor/libgit2/src/xdiff/git-xdiff.h +53 -0
- data/vendor/libgit2/src/xdiff/xdiff.h +15 -15
- data/vendor/libgit2/src/xdiff/xdiffi.c +134 -108
- data/vendor/libgit2/src/xdiff/xemit.c +23 -7
- data/vendor/libgit2/src/xdiff/xhistogram.c +87 -78
- data/vendor/libgit2/src/xdiff/xinclude.h +1 -12
- data/vendor/libgit2/src/xdiff/xmerge.c +104 -117
- data/vendor/libgit2/src/xdiff/xpatience.c +6 -17
- data/vendor/libgit2/src/xdiff/xprepare.c +15 -20
- data/vendor/libgit2/src/xdiff/xutils.c +18 -7
- data/vendor/libgit2/src/zstream.c +5 -5
- data/vendor/libgit2/src/zstream.h +4 -4
- metadata +25 -10
- data/vendor/libgit2/src/buffer.h +0 -374
@@ -1,7 +1,7 @@
|
|
1
1
|
/* zlib.h -- interface of the 'zlib' general purpose compression library
|
2
|
-
version 1.2.
|
2
|
+
version 1.2.11, January 15th, 2017
|
3
3
|
|
4
|
-
Copyright (C) 1995-
|
4
|
+
Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
|
5
5
|
|
6
6
|
This software is provided 'as-is', without any express or implied
|
7
7
|
warranty. In no event will the authors be held liable for any damages
|
@@ -37,11 +37,11 @@
|
|
37
37
|
extern "C" {
|
38
38
|
#endif
|
39
39
|
|
40
|
-
#define ZLIB_VERSION "1.2.
|
41
|
-
#define ZLIB_VERNUM
|
40
|
+
#define ZLIB_VERSION "1.2.11"
|
41
|
+
#define ZLIB_VERNUM 0x12b0
|
42
42
|
#define ZLIB_VER_MAJOR 1
|
43
43
|
#define ZLIB_VER_MINOR 2
|
44
|
-
#define ZLIB_VER_REVISION
|
44
|
+
#define ZLIB_VER_REVISION 11
|
45
45
|
#define ZLIB_VER_SUBREVISION 0
|
46
46
|
|
47
47
|
/*
|
@@ -543,7 +543,8 @@ ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
|
|
543
543
|
int strategy));
|
544
544
|
|
545
545
|
This is another version of deflateInit with more compression options. The
|
546
|
-
fields zalloc, zfree and opaque must be initialized before by the
|
546
|
+
fields next_in, zalloc, zfree and opaque must be initialized before by the
|
547
|
+
caller.
|
547
548
|
|
548
549
|
The method parameter is the compression method. It must be Z_DEFLATED in
|
549
550
|
this version of the library.
|
@@ -711,12 +712,11 @@ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
|
|
711
712
|
used to switch between compression and straight copy of the input data, or
|
712
713
|
to switch to a different kind of input data requiring a different strategy.
|
713
714
|
If the compression approach (which is a function of the level) or the
|
714
|
-
strategy is changed, and if
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
of deflate().
|
715
|
+
strategy is changed, and if any input has been consumed in a previous
|
716
|
+
deflate() call, then the input available so far is compressed with the old
|
717
|
+
level and strategy using deflate(strm, Z_BLOCK). There are three approaches
|
718
|
+
for the compression levels 0, 1..3, and 4..9 respectively. The new level
|
719
|
+
and strategy will take effect at the next call of deflate().
|
720
720
|
|
721
721
|
If a deflate(strm, Z_BLOCK) is performed by deflateParams(), and it does
|
722
722
|
not have enough output space to complete, then the parameter change will not
|
@@ -865,11 +865,9 @@ ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
|
|
865
865
|
detection, or add 16 to decode only the gzip format (the zlib format will
|
866
866
|
return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a
|
867
867
|
CRC-32 instead of an Adler-32. Unlike the gunzip utility and gzread() (see
|
868
|
-
below), inflate() will
|
869
|
-
inflate() will return Z_STREAM_END at the end of the gzip
|
870
|
-
would need to be reset to continue decoding a subsequent gzip
|
871
|
-
*must* be done if there is more data after a gzip member, in order for the
|
872
|
-
decompression to be compliant with the gzip standard (RFC 1952).
|
868
|
+
below), inflate() will not automatically decode concatenated gzip streams.
|
869
|
+
inflate() will return Z_STREAM_END at the end of the gzip stream. The state
|
870
|
+
would need to be reset to continue decoding a subsequent gzip stream.
|
873
871
|
|
874
872
|
inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
|
875
873
|
memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
|
@@ -1304,14 +1302,14 @@ typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */
|
|
1304
1302
|
/*
|
1305
1303
|
ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
|
1306
1304
|
|
1307
|
-
|
1308
|
-
|
1309
|
-
|
1310
|
-
|
1311
|
-
|
1312
|
-
|
1313
|
-
|
1314
|
-
|
1305
|
+
Opens a gzip (.gz) file for reading or writing. The mode parameter is as
|
1306
|
+
in fopen ("rb" or "wb") but can also include a compression level ("wb9") or
|
1307
|
+
a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman-only
|
1308
|
+
compression as in "wb1h", 'R' for run-length encoding as in "wb1R", or 'F'
|
1309
|
+
for fixed code compression as in "wb9F". (See the description of
|
1310
|
+
deflateInit2 for more information about the strategy parameter.) 'T' will
|
1311
|
+
request transparent writing or appending with no compression and not using
|
1312
|
+
the gzip format.
|
1315
1313
|
|
1316
1314
|
"a" can be used instead of "w" to request that the gzip stream that will
|
1317
1315
|
be written be appended to the file. "+" will result in an error, since
|
@@ -1341,9 +1339,9 @@ ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
|
|
1341
1339
|
|
1342
1340
|
ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
|
1343
1341
|
/*
|
1344
|
-
|
1345
|
-
obtained from calls like open, dup, creat, pipe or fileno (if the file
|
1346
|
-
been previously opened with fopen). The mode parameter is as in gzopen.
|
1342
|
+
gzdopen associates a gzFile with the file descriptor fd. File descriptors
|
1343
|
+
are obtained from calls like open, dup, creat, pipe or fileno (if the file
|
1344
|
+
has been previously opened with fopen). The mode parameter is as in gzopen.
|
1347
1345
|
|
1348
1346
|
The next call of gzclose on the returned gzFile will also close the file
|
1349
1347
|
descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor
|
@@ -1364,13 +1362,13 @@ ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
|
|
1364
1362
|
|
1365
1363
|
ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));
|
1366
1364
|
/*
|
1367
|
-
Set the internal buffer size used by this library's functions
|
1368
|
-
|
1369
|
-
|
1370
|
-
|
1371
|
-
|
1372
|
-
|
1373
|
-
|
1365
|
+
Set the internal buffer size used by this library's functions. The
|
1366
|
+
default buffer size is 8192 bytes. This function must be called after
|
1367
|
+
gzopen() or gzdopen(), and before any other calls that read or write the
|
1368
|
+
file. The buffer memory allocation is always deferred to the first read or
|
1369
|
+
write. Three times that size in buffer space is allocated. A larger buffer
|
1370
|
+
size of, for example, 64K or 128K bytes will noticeably increase the speed
|
1371
|
+
of decompression (reading).
|
1374
1372
|
|
1375
1373
|
The new buffer size also affects the maximum length for gzprintf().
|
1376
1374
|
|
@@ -1380,9 +1378,9 @@ ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));
|
|
1380
1378
|
|
1381
1379
|
ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
|
1382
1380
|
/*
|
1383
|
-
Dynamically update the compression level
|
1384
|
-
|
1385
|
-
|
1381
|
+
Dynamically update the compression level or strategy. See the description
|
1382
|
+
of deflateInit2 for the meaning of these parameters. Previously provided
|
1383
|
+
data is flushed before the parameter change.
|
1386
1384
|
|
1387
1385
|
gzsetparams returns Z_OK if success, Z_STREAM_ERROR if the file was not
|
1388
1386
|
opened for writing, Z_ERRNO if there is an error writing the flushed data,
|
@@ -1391,7 +1389,7 @@ ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
|
|
1391
1389
|
|
1392
1390
|
ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
|
1393
1391
|
/*
|
1394
|
-
|
1392
|
+
Reads the given number of uncompressed bytes from the compressed file. If
|
1395
1393
|
the input file is not in gzip format, gzread copies the given number of
|
1396
1394
|
bytes into the buffer directly from the file.
|
1397
1395
|
|
@@ -1422,11 +1420,11 @@ ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
|
|
1422
1420
|
ZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems,
|
1423
1421
|
gzFile file));
|
1424
1422
|
/*
|
1425
|
-
Read
|
1426
|
-
|
1427
|
-
|
1428
|
-
|
1429
|
-
|
1423
|
+
Read up to nitems items of size size from file to buf, otherwise operating
|
1424
|
+
as gzread() does. This duplicates the interface of stdio's fread(), with
|
1425
|
+
size_t request and return types. If the library defines size_t, then
|
1426
|
+
z_size_t is identical to size_t. If not, then z_size_t is an unsigned
|
1427
|
+
integer type that can contain a pointer.
|
1430
1428
|
|
1431
1429
|
gzfread() returns the number of full items read of size size, or zero if
|
1432
1430
|
the end of the file was reached and a full item could not be read, or if
|
@@ -1445,16 +1443,18 @@ ZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems,
|
|
1445
1443
|
file, reseting and retrying on end-of-file, when size is not 1.
|
1446
1444
|
*/
|
1447
1445
|
|
1448
|
-
ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
|
1446
|
+
ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
|
1447
|
+
voidpc buf, unsigned len));
|
1449
1448
|
/*
|
1450
|
-
|
1451
|
-
returns the number of uncompressed bytes written or 0 in case of
|
1449
|
+
Writes the given number of uncompressed bytes into the compressed file.
|
1450
|
+
gzwrite returns the number of uncompressed bytes written or 0 in case of
|
1451
|
+
error.
|
1452
1452
|
*/
|
1453
1453
|
|
1454
1454
|
ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size,
|
1455
1455
|
z_size_t nitems, gzFile file));
|
1456
1456
|
/*
|
1457
|
-
|
1457
|
+
gzfwrite() writes nitems items of size size from buf to file, duplicating
|
1458
1458
|
the interface of stdio's fwrite(), with size_t request and return types. If
|
1459
1459
|
the library defines size_t, then z_size_t is identical to size_t. If not,
|
1460
1460
|
then z_size_t is an unsigned integer type that can contain a pointer.
|
@@ -1467,22 +1467,22 @@ ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size,
|
|
1467
1467
|
|
1468
1468
|
ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...));
|
1469
1469
|
/*
|
1470
|
-
|
1471
|
-
control of the string
|
1470
|
+
Converts, formats, and writes the arguments to the compressed file under
|
1471
|
+
control of the format string, as in fprintf. gzprintf returns the number of
|
1472
1472
|
uncompressed bytes actually written, or a negative zlib error code in case
|
1473
1473
|
of error. The number of uncompressed bytes written is limited to 8191, or
|
1474
1474
|
one less than the buffer size given to gzbuffer(). The caller should assure
|
1475
1475
|
that this limit is not exceeded. If it is exceeded, then gzprintf() will
|
1476
1476
|
return an error (0) with nothing written. In this case, there may also be a
|
1477
1477
|
buffer overflow with unpredictable consequences, which is possible only if
|
1478
|
-
zlib was compiled with the insecure functions sprintf() or vsprintf()
|
1478
|
+
zlib was compiled with the insecure functions sprintf() or vsprintf()
|
1479
1479
|
because the secure snprintf() or vsnprintf() functions were not available.
|
1480
1480
|
This can be determined using zlibCompileFlags().
|
1481
1481
|
*/
|
1482
1482
|
|
1483
1483
|
ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
|
1484
1484
|
/*
|
1485
|
-
|
1485
|
+
Writes the given null-terminated string to the compressed file, excluding
|
1486
1486
|
the terminating null character.
|
1487
1487
|
|
1488
1488
|
gzputs returns the number of characters written, or -1 in case of error.
|
@@ -1490,12 +1490,11 @@ ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
|
|
1490
1490
|
|
1491
1491
|
ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
|
1492
1492
|
/*
|
1493
|
-
|
1494
|
-
|
1495
|
-
|
1496
|
-
|
1497
|
-
|
1498
|
-
left untouched.
|
1493
|
+
Reads bytes from the compressed file until len-1 characters are read, or a
|
1494
|
+
newline character is read and transferred to buf, or an end-of-file
|
1495
|
+
condition is encountered. If any characters are read or if len == 1, the
|
1496
|
+
string is terminated with a null character. If no characters are read due
|
1497
|
+
to an end-of-file or len < 1, then the buffer is left untouched.
|
1499
1498
|
|
1500
1499
|
gzgets returns buf which is a null-terminated string, or it returns NULL
|
1501
1500
|
for end-of-file or in case of error. If there was an error, the contents at
|
@@ -1504,13 +1503,13 @@ ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
|
|
1504
1503
|
|
1505
1504
|
ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
|
1506
1505
|
/*
|
1507
|
-
|
1506
|
+
Writes c, converted to an unsigned char, into the compressed file. gzputc
|
1508
1507
|
returns the value that was written, or -1 in case of error.
|
1509
1508
|
*/
|
1510
1509
|
|
1511
1510
|
ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
|
1512
1511
|
/*
|
1513
|
-
|
1512
|
+
Reads one byte from the compressed file. gzgetc returns this byte or -1
|
1514
1513
|
in case of end of file or error. This is implemented as a macro for speed.
|
1515
1514
|
As such, it does not do all of the checking the other functions do. I.e.
|
1516
1515
|
it does not check to see if file is NULL, nor whether the structure file
|
@@ -1519,8 +1518,8 @@ ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
|
|
1519
1518
|
|
1520
1519
|
ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
|
1521
1520
|
/*
|
1522
|
-
Push
|
1523
|
-
the next read. At least one character of push-back is
|
1521
|
+
Push one character back onto the stream to be read as the first character
|
1522
|
+
on the next read. At least one character of push-back is allowed.
|
1524
1523
|
gzungetc() returns the character pushed, or -1 on failure. gzungetc() will
|
1525
1524
|
fail if c is -1, and may fail if a character has been pushed but not read
|
1526
1525
|
yet. If gzungetc is used immediately after gzopen or gzdopen, at least the
|
@@ -1531,9 +1530,9 @@ ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
|
|
1531
1530
|
|
1532
1531
|
ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
|
1533
1532
|
/*
|
1534
|
-
|
1535
|
-
deflate() function. The return value is the zlib error number
|
1536
|
-
gzerror below). gzflush is only permitted when writing.
|
1533
|
+
Flushes all pending output into the compressed file. The parameter flush
|
1534
|
+
is as in the deflate() function. The return value is the zlib error number
|
1535
|
+
(see function gzerror below). gzflush is only permitted when writing.
|
1537
1536
|
|
1538
1537
|
If the flush parameter is Z_FINISH, the remaining data is written and the
|
1539
1538
|
gzip stream is completed in the output. If gzwrite() is called again, a new
|
@@ -1548,8 +1547,8 @@ ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
|
|
1548
1547
|
ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
|
1549
1548
|
z_off_t offset, int whence));
|
1550
1549
|
|
1551
|
-
|
1552
|
-
|
1550
|
+
Sets the starting position for the next gzread or gzwrite on the given
|
1551
|
+
compressed file. The offset represents a number of bytes in the
|
1553
1552
|
uncompressed data stream. The whence parameter is defined as in lseek(2);
|
1554
1553
|
the value SEEK_END is not supported.
|
1555
1554
|
|
@@ -1566,18 +1565,18 @@ ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
|
|
1566
1565
|
|
1567
1566
|
ZEXTERN int ZEXPORT gzrewind OF((gzFile file));
|
1568
1567
|
/*
|
1569
|
-
|
1568
|
+
Rewinds the given file. This function is supported only for reading.
|
1570
1569
|
|
1571
|
-
gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
|
1570
|
+
gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
|
1572
1571
|
*/
|
1573
1572
|
|
1574
1573
|
/*
|
1575
1574
|
ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file));
|
1576
1575
|
|
1577
|
-
|
1578
|
-
This position represents a number of bytes in the
|
1579
|
-
and is zero when starting, even if appending or
|
1580
|
-
the middle of a file using gzdopen().
|
1576
|
+
Returns the starting position for the next gzread or gzwrite on the given
|
1577
|
+
compressed file. This position represents a number of bytes in the
|
1578
|
+
uncompressed data stream, and is zero when starting, even if appending or
|
1579
|
+
reading a gzip stream from the middle of a file using gzdopen().
|
1581
1580
|
|
1582
1581
|
gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
|
1583
1582
|
*/
|
@@ -1585,22 +1584,22 @@ ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file));
|
|
1585
1584
|
/*
|
1586
1585
|
ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file));
|
1587
1586
|
|
1588
|
-
|
1589
|
-
|
1590
|
-
|
1591
|
-
|
1592
|
-
|
1587
|
+
Returns the current offset in the file being read or written. This offset
|
1588
|
+
includes the count of bytes that precede the gzip stream, for example when
|
1589
|
+
appending or when using gzdopen() for reading. When reading, the offset
|
1590
|
+
does not include as yet unused buffered input. This information can be used
|
1591
|
+
for a progress indicator. On error, gzoffset() returns -1.
|
1593
1592
|
*/
|
1594
1593
|
|
1595
1594
|
ZEXTERN int ZEXPORT gzeof OF((gzFile file));
|
1596
1595
|
/*
|
1597
|
-
|
1598
|
-
|
1599
|
-
|
1600
|
-
|
1601
|
-
|
1602
|
-
|
1603
|
-
|
1596
|
+
Returns true (1) if the end-of-file indicator has been set while reading,
|
1597
|
+
false (0) otherwise. Note that the end-of-file indicator is set only if the
|
1598
|
+
read tried to go past the end of the input, but came up short. Therefore,
|
1599
|
+
just like feof(), gzeof() may return false even if there is no more data to
|
1600
|
+
read, in the event that the last read request was for the exact number of
|
1601
|
+
bytes remaining in the input file. This will happen if the input file size
|
1602
|
+
is an exact multiple of the buffer size.
|
1604
1603
|
|
1605
1604
|
If gzeof() returns true, then the read functions will return no more data,
|
1606
1605
|
unless the end-of-file indicator is reset by gzclearerr() and the input file
|
@@ -1609,7 +1608,7 @@ ZEXTERN int ZEXPORT gzeof OF((gzFile file));
|
|
1609
1608
|
|
1610
1609
|
ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
|
1611
1610
|
/*
|
1612
|
-
|
1611
|
+
Returns true (1) if file is being copied directly while reading, or false
|
1613
1612
|
(0) if file is a gzip stream being decompressed.
|
1614
1613
|
|
1615
1614
|
If the input file is empty, gzdirect() will return true, since the input
|
@@ -1630,8 +1629,8 @@ ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
|
|
1630
1629
|
|
1631
1630
|
ZEXTERN int ZEXPORT gzclose OF((gzFile file));
|
1632
1631
|
/*
|
1633
|
-
|
1634
|
-
|
1632
|
+
Flushes all pending output if necessary, closes the compressed file and
|
1633
|
+
deallocates the (de)compression state. Note that once file is closed, you
|
1635
1634
|
cannot call gzerror with file, since its structures have been deallocated.
|
1636
1635
|
gzclose must not be called more than once on the same file, just as free
|
1637
1636
|
must not be called more than once on the same allocation.
|
@@ -1655,10 +1654,10 @@ ZEXTERN int ZEXPORT gzclose_w OF((gzFile file));
|
|
1655
1654
|
|
1656
1655
|
ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
|
1657
1656
|
/*
|
1658
|
-
|
1659
|
-
errnum is set to zlib error number. If an error occurred
|
1660
|
-
and not in the compression library, errnum is set to
|
1661
|
-
application may consult errno to get the exact error code.
|
1657
|
+
Returns the error message for the last error which occurred on the given
|
1658
|
+
compressed file. errnum is set to zlib error number. If an error occurred
|
1659
|
+
in the file system and not in the compression library, errnum is set to
|
1660
|
+
Z_ERRNO and the application may consult errno to get the exact error code.
|
1662
1661
|
|
1663
1662
|
The application must not modify the returned string. Future calls to
|
1664
1663
|
this function may invalidate the previously returned string. If file is
|
@@ -1671,7 +1670,7 @@ ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
|
|
1671
1670
|
|
1672
1671
|
ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
|
1673
1672
|
/*
|
1674
|
-
|
1673
|
+
Clears the error and end-of-file flags for file. This is analogous to the
|
1675
1674
|
clearerr() function in stdio. This is useful for continuing to read a gzip
|
1676
1675
|
file that is being written concurrently.
|
1677
1676
|
*/
|
@@ -1689,9 +1688,8 @@ ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
|
|
1689
1688
|
ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
|
1690
1689
|
/*
|
1691
1690
|
Update a running Adler-32 checksum with the bytes buf[0..len-1] and
|
1692
|
-
return the updated checksum.
|
1693
|
-
|
1694
|
-
initial value for the checksum.
|
1691
|
+
return the updated checksum. If buf is Z_NULL, this function returns the
|
1692
|
+
required initial value for the checksum.
|
1695
1693
|
|
1696
1694
|
An Adler-32 checksum is almost as reliable as a CRC-32 but can be computed
|
1697
1695
|
much faster.
|
@@ -1724,13 +1722,12 @@ ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
|
|
1724
1722
|
negative, the result has no meaning or utility.
|
1725
1723
|
*/
|
1726
1724
|
|
1727
|
-
ZEXTERN uLong ZEXPORT crc32
|
1725
|
+
ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
|
1728
1726
|
/*
|
1729
1727
|
Update a running CRC-32 with the bytes buf[0..len-1] and return the
|
1730
|
-
updated CRC-32.
|
1731
|
-
|
1732
|
-
|
1733
|
-
function so it shouldn't be done by the application.
|
1728
|
+
updated CRC-32. If buf is Z_NULL, this function returns the required
|
1729
|
+
initial value for the crc. Pre- and post-conditioning (one's complement) is
|
1730
|
+
performed within this function so it shouldn't be done by the application.
|
1734
1731
|
|
1735
1732
|
Usage example:
|
1736
1733
|
|
@@ -1742,7 +1739,7 @@ ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
|
|
1742
1739
|
if (crc != original_crc) error();
|
1743
1740
|
*/
|
1744
1741
|
|
1745
|
-
ZEXTERN uLong ZEXPORT crc32_z OF((uLong
|
1742
|
+
ZEXTERN uLong ZEXPORT crc32_z OF((uLong adler, const Bytef *buf,
|
1746
1743
|
z_size_t len));
|
1747
1744
|
/*
|
1748
1745
|
Same as crc32(), but with a size_t length.
|
@@ -1758,20 +1755,6 @@ ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
|
|
1758
1755
|
len2.
|
1759
1756
|
*/
|
1760
1757
|
|
1761
|
-
/*
|
1762
|
-
ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t len2));
|
1763
|
-
|
1764
|
-
Return the operator corresponding to length len2, to be used with
|
1765
|
-
crc32_combine_op().
|
1766
|
-
*/
|
1767
|
-
|
1768
|
-
ZEXTERN uLong ZEXPORT crc32_combine_op OF((uLong crc1, uLong crc2, uLong op));
|
1769
|
-
/*
|
1770
|
-
Give the same result as crc32_combine(), using op in place of len2. op is
|
1771
|
-
is generated from len2 by crc32_combine_gen(). This will be faster than
|
1772
|
-
crc32_combine() if the generated op is used more than once.
|
1773
|
-
*/
|
1774
|
-
|
1775
1758
|
|
1776
1759
|
/* various hacks, don't look :) */
|
1777
1760
|
|
@@ -1859,7 +1842,6 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
|
|
1859
1842
|
ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
|
1860
1843
|
ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t));
|
1861
1844
|
ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t));
|
1862
|
-
ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off64_t));
|
1863
1845
|
#endif
|
1864
1846
|
|
1865
1847
|
#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64)
|
@@ -1870,7 +1852,6 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
|
|
1870
1852
|
# define z_gzoffset z_gzoffset64
|
1871
1853
|
# define z_adler32_combine z_adler32_combine64
|
1872
1854
|
# define z_crc32_combine z_crc32_combine64
|
1873
|
-
# define z_crc32_combine_gen z_crc32_combine_gen64
|
1874
1855
|
# else
|
1875
1856
|
# define gzopen gzopen64
|
1876
1857
|
# define gzseek gzseek64
|
@@ -1878,7 +1859,6 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
|
|
1878
1859
|
# define gzoffset gzoffset64
|
1879
1860
|
# define adler32_combine adler32_combine64
|
1880
1861
|
# define crc32_combine crc32_combine64
|
1881
|
-
# define crc32_combine_gen crc32_combine_gen64
|
1882
1862
|
# endif
|
1883
1863
|
# ifndef Z_LARGE64
|
1884
1864
|
ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
|
@@ -1887,7 +1867,6 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
|
|
1887
1867
|
ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile));
|
1888
1868
|
ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
|
1889
1869
|
ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
|
1890
|
-
ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off_t));
|
1891
1870
|
# endif
|
1892
1871
|
#else
|
1893
1872
|
ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *));
|
@@ -1895,18 +1874,13 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
|
|
1895
1874
|
ZEXTERN z_off_t ZEXPORT gztell OF((gzFile));
|
1896
1875
|
ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile));
|
1897
1876
|
ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
|
1898
|
-
ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t));
|
1899
1877
|
ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
|
1900
|
-
ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t));
|
1901
|
-
ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t));
|
1902
|
-
ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off64_t));
|
1903
1878
|
#endif
|
1904
1879
|
|
1905
1880
|
#else /* Z_SOLO */
|
1906
1881
|
|
1907
1882
|
ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
|
1908
1883
|
ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
|
1909
|
-
ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t));
|
1910
1884
|
|
1911
1885
|
#endif /* !Z_SOLO */
|
1912
1886
|
|
@@ -1919,7 +1893,7 @@ ZEXTERN int ZEXPORT inflateValidate OF((z_streamp, int));
|
|
1919
1893
|
ZEXTERN unsigned long ZEXPORT inflateCodesUsed OF ((z_streamp));
|
1920
1894
|
ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp));
|
1921
1895
|
ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp));
|
1922
|
-
#if defined(_WIN32) && !defined(Z_SOLO)
|
1896
|
+
#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(Z_SOLO)
|
1923
1897
|
ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path,
|
1924
1898
|
const char *mode));
|
1925
1899
|
#endif
|
@@ -136,8 +136,8 @@ const char * ZEXPORT zError(err)
|
|
136
136
|
return ERR_MSG(err);
|
137
137
|
}
|
138
138
|
|
139
|
-
#if defined(_WIN32_WCE)
|
140
|
-
/* The
|
139
|
+
#if defined(_WIN32_WCE)
|
140
|
+
/* The Microsoft C Run-Time Library for Windows CE doesn't have
|
141
141
|
* errno. We define it as a global variable to simplify porting.
|
142
142
|
* Its value is always 0 and should not be used.
|
143
143
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* zutil.h -- internal interface and configuration of the compression library
|
2
|
-
* Copyright (C) 1995-
|
2
|
+
* Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler
|
3
3
|
* For conditions of distribution and use, see copyright notice in zlib.h
|
4
4
|
*/
|
5
5
|
|
@@ -29,6 +29,10 @@
|
|
29
29
|
# include <stdlib.h>
|
30
30
|
#endif
|
31
31
|
|
32
|
+
#ifdef Z_SOLO
|
33
|
+
typedef long ptrdiff_t; /* guess -- will be caught if guess is wrong */
|
34
|
+
#endif
|
35
|
+
|
32
36
|
#ifndef local
|
33
37
|
# define local static
|
34
38
|
#endif
|
@@ -42,17 +46,6 @@ typedef unsigned short ush;
|
|
42
46
|
typedef ush FAR ushf;
|
43
47
|
typedef unsigned long ulg;
|
44
48
|
|
45
|
-
#if !defined(Z_U8) && !defined(Z_SOLO) && defined(STDC)
|
46
|
-
# include <limits.h>
|
47
|
-
# if (ULONG_MAX == 0xffffffffffffffff)
|
48
|
-
# define Z_U8 unsigned long
|
49
|
-
# elif (ULLONG_MAX == 0xffffffffffffffff)
|
50
|
-
# define Z_U8 unsigned long long
|
51
|
-
# elif (UINT_MAX == 0xffffffffffffffff)
|
52
|
-
# define Z_U8 unsigned
|
53
|
-
# endif
|
54
|
-
#endif
|
55
|
-
|
56
49
|
extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
57
50
|
/* (size given to avoid silly warnings with Visual C++) */
|
58
51
|
|
@@ -177,6 +170,10 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
|
177
170
|
#if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX
|
178
171
|
# if defined(_WIN32_WCE)
|
179
172
|
# define fdopen(fd,mode) NULL /* No fdopen() */
|
173
|
+
# ifndef _PTRDIFF_T_DEFINED
|
174
|
+
typedef int ptrdiff_t;
|
175
|
+
# define _PTRDIFF_T_DEFINED
|
176
|
+
# endif
|
180
177
|
# else
|
181
178
|
# define fdopen(fd,type) _fdopen(fd,type)
|
182
179
|
# endif
|
@@ -32,6 +32,8 @@ GIT_BEGIN_DECL
|
|
32
32
|
*
|
33
33
|
* @param delta The delta to be applied
|
34
34
|
* @param payload User-specified payload
|
35
|
+
* @return 0 if the delta is applied, < 0 if the apply process will be aborted
|
36
|
+
* or > 0 if the delta will not be applied.
|
35
37
|
*/
|
36
38
|
typedef int GIT_CALLBACK(git_apply_delta_cb)(
|
37
39
|
const git_diff_delta *delta,
|
@@ -48,6 +50,8 @@ typedef int GIT_CALLBACK(git_apply_delta_cb)(
|
|
48
50
|
*
|
49
51
|
* @param hunk The hunk to be applied
|
50
52
|
* @param payload User-specified payload
|
53
|
+
* @return 0 if the hunk is applied, < 0 if the apply process will be aborted
|
54
|
+
* or > 0 if the hunk will not be applied.
|
51
55
|
*/
|
52
56
|
typedef int GIT_CALLBACK(git_apply_hunk_cb)(
|
53
57
|
const git_diff_hunk *hunk,
|
@@ -59,7 +63,7 @@ typedef enum {
|
|
59
63
|
* Don't actually make changes, just test that the patch applies.
|
60
64
|
* This is the equivalent of `git apply --check`.
|
61
65
|
*/
|
62
|
-
GIT_APPLY_CHECK = (1 << 0)
|
66
|
+
GIT_APPLY_CHECK = (1 << 0)
|
63
67
|
} git_apply_flags_t;
|
64
68
|
|
65
69
|
/**
|
@@ -89,6 +93,16 @@ typedef struct {
|
|
89
93
|
#define GIT_APPLY_OPTIONS_VERSION 1
|
90
94
|
#define GIT_APPLY_OPTIONS_INIT {GIT_APPLY_OPTIONS_VERSION}
|
91
95
|
|
96
|
+
/**
|
97
|
+
* Initialize git_apply_options structure
|
98
|
+
*
|
99
|
+
* Initialize a `git_apply_options` with default values. Equivalent to creating
|
100
|
+
* an instance with GIT_APPLY_OPTIONS_INIT.
|
101
|
+
*
|
102
|
+
* @param opts The `git_apply_options` struct to initialize.
|
103
|
+
* @param version The struct version; pass `GIT_APPLY_OPTIONS_VERSION`
|
104
|
+
* @return 0 on success or -1 on failure.
|
105
|
+
*/
|
92
106
|
GIT_EXTERN(int) git_apply_options_init(git_apply_options *opts, unsigned int version);
|
93
107
|
|
94
108
|
/**
|
@@ -127,7 +141,7 @@ typedef enum {
|
|
127
141
|
* Apply the patch to both the working directory and the index.
|
128
142
|
* This is the equivalent of `git apply --index`.
|
129
143
|
*/
|
130
|
-
GIT_APPLY_LOCATION_BOTH = 2
|
144
|
+
GIT_APPLY_LOCATION_BOTH = 2
|
131
145
|
} git_apply_location_t;
|
132
146
|
|
133
147
|
/**
|