rugged 1.7.2 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rugged/version.rb +1 -1
- data/vendor/libgit2/AUTHORS +1 -0
- data/vendor/libgit2/CMakeLists.txt +23 -10
- data/vendor/libgit2/COPYING +195 -1
- data/vendor/libgit2/cmake/{FindIconv.cmake → FindIntlIconv.cmake} +6 -0
- data/vendor/libgit2/cmake/FindLLHTTP.cmake +39 -0
- data/vendor/libgit2/cmake/SelectGSSAPI.cmake +1 -1
- data/vendor/libgit2/cmake/SelectHTTPParser.cmake +23 -8
- data/vendor/libgit2/cmake/SelectHTTPSBackend.cmake +17 -8
- data/vendor/libgit2/cmake/SelectHashes.cmake +28 -11
- data/vendor/libgit2/cmake/SelectRegex.cmake +6 -1
- data/vendor/libgit2/cmake/SelectSSH.cmake +22 -17
- data/vendor/libgit2/cmake/SelectZlib.cmake +4 -0
- data/vendor/libgit2/deps/llhttp/CMakeLists.txt +8 -0
- data/vendor/libgit2/deps/llhttp/LICENSE-MIT +22 -0
- data/vendor/libgit2/deps/llhttp/api.c +510 -0
- data/vendor/libgit2/deps/llhttp/http.c +170 -0
- data/vendor/libgit2/deps/llhttp/llhttp.c +10168 -0
- data/vendor/libgit2/deps/llhttp/llhttp.h +897 -0
- data/vendor/libgit2/deps/ntlmclient/CMakeLists.txt +1 -1
- data/vendor/libgit2/deps/ntlmclient/crypt_builtin_md4.c +311 -0
- data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.c +2 -1
- data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.c +0 -20
- data/vendor/libgit2/deps/ntlmclient/crypt_openssl.c +4 -4
- data/vendor/libgit2/deps/ntlmclient/ntlm.c +21 -21
- data/vendor/libgit2/deps/ntlmclient/unicode_builtin.c +5 -4
- data/vendor/libgit2/deps/ntlmclient/unicode_iconv.c +2 -1
- data/vendor/libgit2/deps/ntlmclient/utf8.h +1176 -721
- data/vendor/libgit2/deps/ntlmclient/util.h +11 -0
- data/vendor/libgit2/deps/pcre/CMakeLists.txt +1 -0
- data/vendor/libgit2/deps/xdiff/xmerge.c +2 -2
- data/vendor/libgit2/deps/zlib/CMakeLists.txt +6 -1
- data/vendor/libgit2/deps/zlib/LICENSE +22 -0
- data/vendor/libgit2/deps/zlib/adler32.c +5 -27
- data/vendor/libgit2/deps/zlib/crc32.c +94 -167
- data/vendor/libgit2/deps/zlib/deflate.c +358 -435
- data/vendor/libgit2/deps/zlib/deflate.h +41 -10
- data/vendor/libgit2/deps/zlib/gzguts.h +13 -18
- data/vendor/libgit2/deps/zlib/infback.c +17 -30
- data/vendor/libgit2/deps/zlib/inffast.c +1 -4
- data/vendor/libgit2/deps/zlib/inffast.h +1 -1
- data/vendor/libgit2/deps/zlib/inflate.c +36 -102
- data/vendor/libgit2/deps/zlib/inftrees.c +6 -11
- data/vendor/libgit2/deps/zlib/inftrees.h +6 -6
- data/vendor/libgit2/deps/zlib/trees.c +287 -352
- data/vendor/libgit2/deps/zlib/zconf.h +23 -14
- data/vendor/libgit2/deps/zlib/zlib.h +202 -202
- data/vendor/libgit2/deps/zlib/zutil.c +18 -44
- data/vendor/libgit2/deps/zlib/zutil.h +13 -33
- data/vendor/libgit2/include/git2/annotated_commit.h +12 -5
- data/vendor/libgit2/include/git2/apply.h +27 -6
- data/vendor/libgit2/include/git2/attr.h +17 -4
- data/vendor/libgit2/include/git2/blame.h +133 -28
- data/vendor/libgit2/include/git2/blob.h +71 -28
- data/vendor/libgit2/include/git2/branch.h +22 -15
- data/vendor/libgit2/include/git2/buffer.h +6 -4
- data/vendor/libgit2/include/git2/cert.h +2 -1
- data/vendor/libgit2/include/git2/checkout.h +83 -32
- data/vendor/libgit2/include/git2/cherrypick.h +10 -3
- data/vendor/libgit2/include/git2/clone.h +25 -9
- data/vendor/libgit2/include/git2/commit.h +132 -3
- data/vendor/libgit2/include/git2/common.h +120 -63
- data/vendor/libgit2/include/git2/config.h +93 -23
- data/vendor/libgit2/include/git2/credential.h +30 -2
- data/vendor/libgit2/include/git2/credential_helpers.h +1 -0
- data/vendor/libgit2/include/git2/deprecated.h +133 -3
- data/vendor/libgit2/include/git2/describe.h +13 -1
- data/vendor/libgit2/include/git2/diff.h +38 -8
- data/vendor/libgit2/include/git2/email.h +9 -29
- data/vendor/libgit2/include/git2/errors.h +46 -73
- data/vendor/libgit2/include/git2/filter.h +14 -7
- data/vendor/libgit2/include/git2/global.h +8 -1
- data/vendor/libgit2/include/git2/graph.h +3 -2
- data/vendor/libgit2/include/git2/ignore.h +10 -0
- data/vendor/libgit2/include/git2/index.h +99 -14
- data/vendor/libgit2/include/git2/indexer.h +21 -4
- data/vendor/libgit2/include/git2/mailmap.h +7 -1
- data/vendor/libgit2/include/git2/merge.h +46 -1
- data/vendor/libgit2/include/git2/message.h +2 -2
- data/vendor/libgit2/include/git2/net.h +3 -1
- data/vendor/libgit2/include/git2/notes.h +9 -6
- data/vendor/libgit2/include/git2/object.h +9 -8
- data/vendor/libgit2/include/git2/odb.h +91 -49
- data/vendor/libgit2/include/git2/odb_backend.h +80 -52
- data/vendor/libgit2/include/git2/oid.h +23 -24
- data/vendor/libgit2/include/git2/oidarray.h +7 -1
- data/vendor/libgit2/include/git2/pack.h +13 -1
- data/vendor/libgit2/include/git2/patch.h +2 -3
- data/vendor/libgit2/include/git2/pathspec.h +9 -0
- data/vendor/libgit2/include/git2/proxy.h +10 -0
- data/vendor/libgit2/include/git2/rebase.h +9 -6
- data/vendor/libgit2/include/git2/refdb.h +2 -2
- data/vendor/libgit2/include/git2/reflog.h +3 -2
- data/vendor/libgit2/include/git2/refs.h +9 -6
- data/vendor/libgit2/include/git2/refspec.h +14 -4
- data/vendor/libgit2/include/git2/remote.h +94 -18
- data/vendor/libgit2/include/git2/repository.h +57 -21
- data/vendor/libgit2/include/git2/reset.h +16 -3
- data/vendor/libgit2/include/git2/revert.h +9 -4
- data/vendor/libgit2/include/git2/revparse.h +3 -3
- data/vendor/libgit2/include/git2/revwalk.h +3 -2
- data/vendor/libgit2/include/git2/signature.h +46 -1
- data/vendor/libgit2/include/git2/stash.h +17 -3
- data/vendor/libgit2/include/git2/status.h +10 -6
- data/vendor/libgit2/include/git2/stdint.h +87 -85
- data/vendor/libgit2/include/git2/strarray.h +2 -3
- data/vendor/libgit2/include/git2/submodule.h +20 -9
- data/vendor/libgit2/include/git2/sys/alloc.h +12 -0
- data/vendor/libgit2/include/git2/sys/commit.h +77 -3
- data/vendor/libgit2/include/git2/sys/commit_graph.h +103 -62
- data/vendor/libgit2/include/git2/sys/config.h +80 -4
- data/vendor/libgit2/include/git2/sys/credential.h +4 -3
- data/vendor/libgit2/include/git2/sys/diff.h +21 -1
- data/vendor/libgit2/include/git2/sys/email.h +7 -0
- data/vendor/libgit2/include/git2/sys/errors.h +76 -0
- data/vendor/libgit2/include/git2/sys/filter.h +66 -3
- data/vendor/libgit2/include/git2/sys/hashsig.h +11 -0
- data/vendor/libgit2/include/git2/sys/index.h +3 -2
- data/vendor/libgit2/include/git2/sys/mempack.h +32 -2
- data/vendor/libgit2/include/git2/sys/merge.h +55 -7
- data/vendor/libgit2/include/git2/sys/midx.h +43 -4
- data/vendor/libgit2/include/git2/sys/odb_backend.h +7 -3
- data/vendor/libgit2/include/git2/sys/openssl.h +8 -1
- data/vendor/libgit2/include/git2/sys/path.h +12 -1
- data/vendor/libgit2/include/git2/sys/refdb_backend.h +40 -36
- data/vendor/libgit2/include/git2/sys/refs.h +3 -2
- data/vendor/libgit2/include/git2/sys/remote.h +8 -1
- data/vendor/libgit2/include/git2/sys/repository.h +63 -3
- data/vendor/libgit2/include/git2/sys/stream.h +11 -2
- data/vendor/libgit2/include/git2/sys/transport.h +24 -3
- data/vendor/libgit2/include/git2/tag.h +3 -1
- data/vendor/libgit2/include/git2/trace.h +9 -3
- data/vendor/libgit2/include/git2/transaction.h +3 -2
- data/vendor/libgit2/include/git2/transport.h +11 -3
- data/vendor/libgit2/include/git2/tree.h +16 -5
- data/vendor/libgit2/include/git2/types.h +19 -3
- data/vendor/libgit2/include/git2/version.h +44 -8
- data/vendor/libgit2/include/git2/worktree.h +16 -6
- data/vendor/libgit2/src/CMakeLists.txt +6 -4
- data/vendor/libgit2/src/cli/CMakeLists.txt +2 -2
- data/vendor/libgit2/src/cli/cmd.c +1 -1
- data/vendor/libgit2/src/cli/cmd.h +4 -0
- data/vendor/libgit2/src/cli/cmd_blame.c +287 -0
- data/vendor/libgit2/src/cli/cmd_cat_file.c +6 -8
- data/vendor/libgit2/src/cli/cmd_clone.c +5 -7
- data/vendor/libgit2/src/cli/cmd_config.c +241 -0
- data/vendor/libgit2/src/cli/cmd_hash_object.c +6 -8
- data/vendor/libgit2/src/cli/cmd_help.c +6 -7
- data/vendor/libgit2/src/cli/cmd_index_pack.c +114 -0
- data/vendor/libgit2/src/cli/cmd_init.c +102 -0
- data/vendor/libgit2/src/cli/common.c +168 -0
- data/vendor/libgit2/src/cli/common.h +63 -0
- data/vendor/libgit2/src/cli/error.h +1 -1
- data/vendor/libgit2/src/cli/main.c +52 -24
- data/vendor/libgit2/src/cli/opt.c +29 -3
- data/vendor/libgit2/src/cli/opt.h +21 -3
- data/vendor/libgit2/src/cli/opt_usage.c +102 -33
- data/vendor/libgit2/src/cli/opt_usage.h +6 -1
- data/vendor/libgit2/src/cli/progress.c +51 -2
- data/vendor/libgit2/src/cli/progress.h +12 -0
- data/vendor/libgit2/src/cli/unix/sighandler.c +2 -1
- data/vendor/libgit2/src/cli/win32/precompiled.h +1 -1
- data/vendor/libgit2/src/cli/win32/sighandler.c +1 -1
- data/vendor/libgit2/src/libgit2/CMakeLists.txt +26 -8
- data/vendor/libgit2/src/libgit2/apply.c +10 -13
- data/vendor/libgit2/src/libgit2/attr.c +30 -13
- data/vendor/libgit2/src/libgit2/attr_file.c +7 -2
- data/vendor/libgit2/src/libgit2/attr_file.h +2 -0
- data/vendor/libgit2/src/libgit2/attrcache.c +69 -33
- data/vendor/libgit2/src/libgit2/attrcache.h +5 -9
- data/vendor/libgit2/src/libgit2/blame.c +130 -44
- data/vendor/libgit2/src/libgit2/blame.h +1 -0
- data/vendor/libgit2/src/libgit2/cache.c +22 -17
- data/vendor/libgit2/src/libgit2/cache.h +7 -9
- data/vendor/libgit2/src/libgit2/checkout.c +34 -24
- data/vendor/libgit2/src/libgit2/checkout.h +0 -2
- data/vendor/libgit2/src/libgit2/cherrypick.c +1 -2
- data/vendor/libgit2/src/libgit2/clone.c +186 -166
- data/vendor/libgit2/src/libgit2/clone.h +4 -1
- data/vendor/libgit2/src/libgit2/commit.c +92 -0
- data/vendor/libgit2/src/libgit2/commit_graph.c +67 -56
- data/vendor/libgit2/src/libgit2/commit_graph.h +1 -2
- data/vendor/libgit2/src/libgit2/config.c +389 -298
- data/vendor/libgit2/src/libgit2/config.cmake.in +3 -0
- data/vendor/libgit2/src/libgit2/config.h +9 -4
- data/vendor/libgit2/src/libgit2/config_backend.h +8 -10
- data/vendor/libgit2/src/libgit2/config_cache.c +4 -5
- data/vendor/libgit2/src/libgit2/config_file.c +99 -88
- data/vendor/libgit2/src/libgit2/config_list.c +285 -0
- data/vendor/libgit2/src/libgit2/config_list.h +32 -0
- data/vendor/libgit2/src/libgit2/config_mem.c +194 -40
- data/vendor/libgit2/src/libgit2/config_parse.c +10 -9
- data/vendor/libgit2/src/libgit2/config_snapshot.c +24 -31
- data/vendor/libgit2/src/libgit2/describe.c +24 -24
- data/vendor/libgit2/src/libgit2/diff.c +1 -1
- data/vendor/libgit2/src/libgit2/diff_driver.c +12 -19
- data/vendor/libgit2/src/libgit2/diff_driver.h +2 -2
- data/vendor/libgit2/src/libgit2/diff_generate.c +3 -3
- data/vendor/libgit2/src/libgit2/diff_parse.c +2 -2
- data/vendor/libgit2/src/libgit2/diff_print.c +65 -9
- data/vendor/libgit2/src/libgit2/diff_tform.c +36 -8
- data/vendor/libgit2/src/libgit2/email.c +1 -0
- data/vendor/libgit2/src/libgit2/fetch.c +5 -3
- data/vendor/libgit2/src/libgit2/filter.c +5 -5
- data/vendor/libgit2/src/libgit2/git2.rc +3 -3
- data/vendor/libgit2/src/libgit2/grafts.c +18 -20
- data/vendor/libgit2/src/libgit2/grafts.h +0 -1
- data/vendor/libgit2/src/libgit2/graph.c +1 -1
- data/vendor/libgit2/src/libgit2/hashmap_oid.h +30 -0
- data/vendor/libgit2/src/libgit2/ignore.c +9 -5
- data/vendor/libgit2/src/libgit2/index.c +68 -90
- data/vendor/libgit2/src/libgit2/index.h +2 -2
- data/vendor/libgit2/src/libgit2/index_map.c +95 -0
- data/vendor/libgit2/src/libgit2/index_map.h +28 -0
- data/vendor/libgit2/src/libgit2/indexer.c +34 -38
- data/vendor/libgit2/src/libgit2/iterator.c +14 -8
- data/vendor/libgit2/src/libgit2/libgit2.c +153 -368
- data/vendor/libgit2/src/libgit2/mailmap.c +1 -1
- data/vendor/libgit2/src/libgit2/merge.c +42 -37
- data/vendor/libgit2/src/libgit2/merge_driver.c +2 -2
- data/vendor/libgit2/src/libgit2/midx.c +28 -15
- data/vendor/libgit2/src/libgit2/mwindow.c +38 -45
- data/vendor/libgit2/src/libgit2/mwindow.h +4 -0
- data/vendor/libgit2/src/libgit2/object.c +6 -5
- data/vendor/libgit2/src/libgit2/odb.c +5 -4
- data/vendor/libgit2/src/libgit2/odb_mempack.c +49 -17
- data/vendor/libgit2/src/libgit2/odb_pack.c +13 -5
- data/vendor/libgit2/src/libgit2/oid.c +32 -5
- data/vendor/libgit2/src/libgit2/oid.h +11 -0
- data/vendor/libgit2/src/libgit2/pack-objects.c +58 -31
- data/vendor/libgit2/src/libgit2/pack-objects.h +12 -4
- data/vendor/libgit2/src/libgit2/pack.c +30 -24
- data/vendor/libgit2/src/libgit2/pack.h +15 -10
- data/vendor/libgit2/src/libgit2/patch_parse.c +2 -2
- data/vendor/libgit2/src/libgit2/path.c +1 -1
- data/vendor/libgit2/src/libgit2/pathspec.c +1 -1
- data/vendor/libgit2/src/libgit2/push.c +79 -28
- data/vendor/libgit2/src/libgit2/push.h +1 -0
- data/vendor/libgit2/src/libgit2/refdb_fs.c +128 -61
- data/vendor/libgit2/src/libgit2/reflog.c +1 -2
- data/vendor/libgit2/src/libgit2/reflog.h +2 -0
- data/vendor/libgit2/src/libgit2/refs.c +26 -7
- data/vendor/libgit2/src/libgit2/refs.h +6 -1
- data/vendor/libgit2/src/libgit2/refspec.c +28 -1
- data/vendor/libgit2/src/libgit2/refspec.h +8 -0
- data/vendor/libgit2/src/libgit2/remote.c +121 -61
- data/vendor/libgit2/src/libgit2/repository.c +231 -51
- data/vendor/libgit2/src/libgit2/repository.h +10 -6
- data/vendor/libgit2/src/libgit2/revert.c +1 -2
- data/vendor/libgit2/src/libgit2/revparse.c +2 -2
- data/vendor/libgit2/src/libgit2/revwalk.c +13 -10
- data/vendor/libgit2/src/libgit2/revwalk.h +3 -3
- data/vendor/libgit2/src/libgit2/settings.c +468 -0
- data/vendor/libgit2/src/libgit2/settings.h +6 -2
- data/vendor/libgit2/src/libgit2/signature.c +132 -15
- data/vendor/libgit2/src/libgit2/signature.h +0 -1
- data/vendor/libgit2/src/libgit2/status.c +1 -1
- data/vendor/libgit2/src/libgit2/streams/mbedtls.c +54 -60
- data/vendor/libgit2/src/libgit2/streams/openssl.c +32 -7
- data/vendor/libgit2/src/libgit2/streams/openssl.h +2 -0
- data/vendor/libgit2/src/libgit2/streams/openssl_dynamic.c +4 -0
- data/vendor/libgit2/src/libgit2/streams/openssl_dynamic.h +3 -0
- data/vendor/libgit2/src/libgit2/streams/stransport.c +39 -7
- data/vendor/libgit2/src/libgit2/submodule.c +106 -63
- data/vendor/libgit2/src/libgit2/submodule.h +6 -7
- data/vendor/libgit2/src/libgit2/tag.c +1 -1
- data/vendor/libgit2/src/libgit2/trailer.c +6 -6
- data/vendor/libgit2/src/libgit2/transaction.c +26 -20
- data/vendor/libgit2/src/libgit2/transaction.h +4 -1
- data/vendor/libgit2/src/libgit2/transport.c +4 -1
- data/vendor/libgit2/src/libgit2/transports/credential.c +1 -1
- data/vendor/libgit2/src/libgit2/transports/http.c +1 -2
- data/vendor/libgit2/src/libgit2/transports/http.h +0 -10
- data/vendor/libgit2/src/libgit2/transports/httpclient.c +112 -72
- data/vendor/libgit2/src/libgit2/transports/httpparser.c +128 -0
- data/vendor/libgit2/src/libgit2/transports/httpparser.h +99 -0
- data/vendor/libgit2/src/libgit2/transports/local.c +8 -7
- data/vendor/libgit2/src/libgit2/transports/smart.c +20 -8
- data/vendor/libgit2/src/libgit2/transports/smart.h +4 -2
- data/vendor/libgit2/src/libgit2/transports/smart_pkt.c +2 -2
- data/vendor/libgit2/src/libgit2/transports/smart_protocol.c +55 -10
- data/vendor/libgit2/src/libgit2/transports/ssh.c +41 -1103
- data/vendor/libgit2/src/libgit2/transports/ssh_exec.c +347 -0
- data/vendor/libgit2/src/libgit2/transports/ssh_exec.h +26 -0
- data/vendor/libgit2/src/libgit2/transports/ssh_libssh2.c +1126 -0
- data/vendor/libgit2/src/libgit2/transports/ssh_libssh2.h +28 -0
- data/vendor/libgit2/src/libgit2/transports/winhttp.c +35 -7
- data/vendor/libgit2/src/libgit2/tree.c +34 -26
- data/vendor/libgit2/src/libgit2/tree.h +3 -2
- data/vendor/libgit2/src/libgit2/worktree.c +14 -17
- data/vendor/libgit2/src/util/CMakeLists.txt +4 -6
- data/vendor/libgit2/src/util/alloc.c +4 -1
- data/vendor/libgit2/src/util/allocators/debugalloc.c +73 -0
- data/vendor/libgit2/src/{cli/cli.h → util/allocators/debugalloc.h} +6 -9
- data/vendor/libgit2/src/util/allocators/stdalloc.c +0 -10
- data/vendor/libgit2/src/util/array.h +18 -17
- data/vendor/libgit2/src/util/cc-compat.h +2 -0
- data/vendor/libgit2/src/util/ctype_compat.h +70 -0
- data/vendor/libgit2/src/util/date.c +22 -14
- data/vendor/libgit2/src/util/date.h +12 -0
- data/vendor/libgit2/src/util/errors.c +401 -0
- data/vendor/libgit2/src/{libgit2 → util}/errors.h +21 -17
- data/vendor/libgit2/src/util/fs_path.c +15 -4
- data/vendor/libgit2/src/util/fs_path.h +23 -0
- data/vendor/libgit2/src/util/futils.c +6 -5
- data/vendor/libgit2/src/util/futils.h +13 -4
- data/vendor/libgit2/src/util/git2_features.h.in +12 -1
- data/vendor/libgit2/src/util/git2_util.h +6 -0
- data/vendor/libgit2/src/util/hash/openssl.c +152 -0
- data/vendor/libgit2/src/util/hash/openssl.h +17 -1
- data/vendor/libgit2/src/util/hash/sha.h +4 -1
- data/vendor/libgit2/src/util/hashmap.h +424 -0
- data/vendor/libgit2/src/util/hashmap_str.h +43 -0
- data/vendor/libgit2/src/util/integer.h +3 -1
- data/vendor/libgit2/src/util/net.c +13 -7
- data/vendor/libgit2/src/util/net.h +2 -0
- data/vendor/libgit2/src/util/pool.c +1 -1
- data/vendor/libgit2/src/util/pool.h +5 -0
- data/vendor/libgit2/src/util/pqueue.h +1 -1
- data/vendor/libgit2/src/util/process.h +222 -0
- data/vendor/libgit2/src/util/rand.c +1 -7
- data/vendor/libgit2/src/util/regexp.c +1 -1
- data/vendor/libgit2/src/util/sortedcache.c +14 -13
- data/vendor/libgit2/src/util/sortedcache.h +3 -3
- data/vendor/libgit2/src/util/str.c +2 -2
- data/vendor/libgit2/src/util/strlist.c +108 -0
- data/vendor/libgit2/src/util/strlist.h +36 -0
- data/vendor/libgit2/src/util/unix/posix.h +0 -2
- data/vendor/libgit2/src/util/unix/process.c +629 -0
- data/vendor/libgit2/src/util/unix/realpath.c +23 -5
- data/vendor/libgit2/src/util/util.c +2 -2
- data/vendor/libgit2/src/util/util.h +4 -38
- data/vendor/libgit2/src/util/vector.c +3 -3
- data/vendor/libgit2/src/util/vector.h +2 -2
- data/vendor/libgit2/src/util/win32/posix_w32.c +29 -6
- data/vendor/libgit2/src/util/win32/process.c +506 -0
- metadata +45 -28
- data/vendor/libgit2/deps/http-parser/CMakeLists.txt +0 -6
- data/vendor/libgit2/deps/http-parser/COPYING +0 -23
- data/vendor/libgit2/deps/http-parser/http_parser.c +0 -2182
- data/vendor/libgit2/deps/http-parser/http_parser.h +0 -305
- data/vendor/libgit2/deps/zlib/COPYING +0 -27
- data/vendor/libgit2/include/git2/sys/reflog.h +0 -21
- data/vendor/libgit2/src/libgit2/config_entries.c +0 -237
- data/vendor/libgit2/src/libgit2/config_entries.h +0 -24
- data/vendor/libgit2/src/libgit2/errors.c +0 -293
- data/vendor/libgit2/src/libgit2/idxmap.c +0 -157
- data/vendor/libgit2/src/libgit2/idxmap.h +0 -177
- data/vendor/libgit2/src/libgit2/libgit2.h +0 -15
- data/vendor/libgit2/src/libgit2/offmap.c +0 -101
- data/vendor/libgit2/src/libgit2/offmap.h +0 -133
- data/vendor/libgit2/src/libgit2/oidmap.c +0 -107
- data/vendor/libgit2/src/libgit2/oidmap.h +0 -128
- data/vendor/libgit2/src/libgit2/threadstate.c +0 -97
- data/vendor/libgit2/src/libgit2/threadstate.h +0 -22
- data/vendor/libgit2/src/libgit2/transports/ssh.h +0 -14
- data/vendor/libgit2/src/util/khash.h +0 -615
- data/vendor/libgit2/src/util/strmap.c +0 -100
- data/vendor/libgit2/src/util/strmap.h +0 -131
- /data/vendor/libgit2/cmake/{FindHTTPParser.cmake → FindHTTP_Parser.cmake} +0 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
/* deflate.h -- internal compression state
|
2
|
-
* Copyright (C) 1995-
|
2
|
+
* Copyright (C) 1995-2024 Jean-loup Gailly
|
3
3
|
* For conditions of distribution and use, see copyright notice in zlib.h
|
4
4
|
*/
|
5
5
|
|
@@ -23,6 +23,10 @@
|
|
23
23
|
# define GZIP
|
24
24
|
#endif
|
25
25
|
|
26
|
+
/* define LIT_MEM to slightly increase the speed of deflate (order 1% to 2%) at
|
27
|
+
the cost of a larger memory footprint */
|
28
|
+
/* #define LIT_MEM */
|
29
|
+
|
26
30
|
/* ===========================================================================
|
27
31
|
* Internal compression state.
|
28
32
|
*/
|
@@ -217,7 +221,14 @@ typedef struct internal_state {
|
|
217
221
|
/* Depth of each subtree used as tie breaker for trees of equal frequency
|
218
222
|
*/
|
219
223
|
|
224
|
+
#ifdef LIT_MEM
|
225
|
+
# define LIT_BUFS 5
|
226
|
+
ushf *d_buf; /* buffer for distances */
|
227
|
+
uchf *l_buf; /* buffer for literals/lengths */
|
228
|
+
#else
|
229
|
+
# define LIT_BUFS 4
|
220
230
|
uchf *sym_buf; /* buffer for distances and literals/lengths */
|
231
|
+
#endif
|
221
232
|
|
222
233
|
uInt lit_bufsize;
|
223
234
|
/* Size of match buffer for literals/lengths. There are 4 reasons for
|
@@ -239,7 +250,7 @@ typedef struct internal_state {
|
|
239
250
|
* - I can't count above 4
|
240
251
|
*/
|
241
252
|
|
242
|
-
uInt sym_next; /* running index in
|
253
|
+
uInt sym_next; /* running index in symbol buffer */
|
243
254
|
uInt sym_end; /* symbol table full when sym_next reaches this */
|
244
255
|
|
245
256
|
ulg opt_len; /* bit length of current block with optimal trees */
|
@@ -291,14 +302,14 @@ typedef struct internal_state {
|
|
291
302
|
memory checker errors from longest match routines */
|
292
303
|
|
293
304
|
/* in trees.c */
|
294
|
-
void ZLIB_INTERNAL _tr_init
|
295
|
-
int ZLIB_INTERNAL _tr_tally
|
296
|
-
void ZLIB_INTERNAL _tr_flush_block
|
297
|
-
|
298
|
-
void ZLIB_INTERNAL _tr_flush_bits
|
299
|
-
void ZLIB_INTERNAL _tr_align
|
300
|
-
void ZLIB_INTERNAL _tr_stored_block
|
301
|
-
|
305
|
+
void ZLIB_INTERNAL _tr_init(deflate_state *s);
|
306
|
+
int ZLIB_INTERNAL _tr_tally(deflate_state *s, unsigned dist, unsigned lc);
|
307
|
+
void ZLIB_INTERNAL _tr_flush_block(deflate_state *s, charf *buf,
|
308
|
+
ulg stored_len, int last);
|
309
|
+
void ZLIB_INTERNAL _tr_flush_bits(deflate_state *s);
|
310
|
+
void ZLIB_INTERNAL _tr_align(deflate_state *s);
|
311
|
+
void ZLIB_INTERNAL _tr_stored_block(deflate_state *s, charf *buf,
|
312
|
+
ulg stored_len, int last);
|
302
313
|
|
303
314
|
#define d_code(dist) \
|
304
315
|
((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
|
@@ -318,6 +329,25 @@ void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
|
|
318
329
|
extern const uch ZLIB_INTERNAL _dist_code[];
|
319
330
|
#endif
|
320
331
|
|
332
|
+
#ifdef LIT_MEM
|
333
|
+
# define _tr_tally_lit(s, c, flush) \
|
334
|
+
{ uch cc = (c); \
|
335
|
+
s->d_buf[s->sym_next] = 0; \
|
336
|
+
s->l_buf[s->sym_next++] = cc; \
|
337
|
+
s->dyn_ltree[cc].Freq++; \
|
338
|
+
flush = (s->sym_next == s->sym_end); \
|
339
|
+
}
|
340
|
+
# define _tr_tally_dist(s, distance, length, flush) \
|
341
|
+
{ uch len = (uch)(length); \
|
342
|
+
ush dist = (ush)(distance); \
|
343
|
+
s->d_buf[s->sym_next] = dist; \
|
344
|
+
s->l_buf[s->sym_next++] = len; \
|
345
|
+
dist--; \
|
346
|
+
s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
|
347
|
+
s->dyn_dtree[d_code(dist)].Freq++; \
|
348
|
+
flush = (s->sym_next == s->sym_end); \
|
349
|
+
}
|
350
|
+
#else
|
321
351
|
# define _tr_tally_lit(s, c, flush) \
|
322
352
|
{ uch cc = (c); \
|
323
353
|
s->sym_buf[s->sym_next++] = 0; \
|
@@ -337,6 +367,7 @@ void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
|
|
337
367
|
s->dyn_dtree[d_code(dist)].Freq++; \
|
338
368
|
flush = (s->sym_next == s->sym_end); \
|
339
369
|
}
|
370
|
+
#endif
|
340
371
|
#else
|
341
372
|
# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c)
|
342
373
|
# define _tr_tally_dist(s, distance, length, flush) \
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* gzguts.h -- zlib internal header definitions for gz* operations
|
2
|
-
* Copyright (C) 2004-
|
2
|
+
* Copyright (C) 2004-2024 Mark Adler
|
3
3
|
* For conditions of distribution and use, see copyright notice in zlib.h
|
4
4
|
*/
|
5
5
|
|
@@ -7,9 +7,8 @@
|
|
7
7
|
# ifndef _LARGEFILE_SOURCE
|
8
8
|
# define _LARGEFILE_SOURCE 1
|
9
9
|
# endif
|
10
|
-
#
|
11
|
-
#
|
12
|
-
# endif
|
10
|
+
# undef _FILE_OFFSET_BITS
|
11
|
+
# undef _TIME_BITS
|
13
12
|
#endif
|
14
13
|
|
15
14
|
#ifdef HAVE_HIDDEN
|
@@ -119,8 +118,8 @@
|
|
119
118
|
|
120
119
|
/* gz* functions always use library allocation functions */
|
121
120
|
#ifndef STDC
|
122
|
-
extern voidp malloc
|
123
|
-
extern void free
|
121
|
+
extern voidp malloc(uInt size);
|
122
|
+
extern void free(voidpf ptr);
|
124
123
|
#endif
|
125
124
|
|
126
125
|
/* get errno and strerror definition */
|
@@ -138,10 +137,10 @@
|
|
138
137
|
|
139
138
|
/* provide prototypes for these when building zlib without LFS */
|
140
139
|
#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0
|
141
|
-
ZEXTERN gzFile ZEXPORT gzopen64
|
142
|
-
ZEXTERN z_off64_t ZEXPORT gzseek64
|
143
|
-
ZEXTERN z_off64_t ZEXPORT gztell64
|
144
|
-
ZEXTERN z_off64_t ZEXPORT gzoffset64
|
140
|
+
ZEXTERN gzFile ZEXPORT gzopen64(const char *, const char *);
|
141
|
+
ZEXTERN z_off64_t ZEXPORT gzseek64(gzFile, z_off64_t, int);
|
142
|
+
ZEXTERN z_off64_t ZEXPORT gztell64(gzFile);
|
143
|
+
ZEXTERN z_off64_t ZEXPORT gzoffset64(gzFile);
|
145
144
|
#endif
|
146
145
|
|
147
146
|
/* default memLevel */
|
@@ -203,17 +202,13 @@ typedef struct {
|
|
203
202
|
typedef gz_state FAR *gz_statep;
|
204
203
|
|
205
204
|
/* shared functions */
|
206
|
-
void ZLIB_INTERNAL gz_error
|
205
|
+
void ZLIB_INTERNAL gz_error(gz_statep, int, const char *);
|
207
206
|
#if defined UNDER_CE
|
208
|
-
char ZLIB_INTERNAL *gz_strwinerror
|
207
|
+
char ZLIB_INTERNAL *gz_strwinerror(DWORD error);
|
209
208
|
#endif
|
210
209
|
|
211
210
|
/* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t
|
212
211
|
value -- needed when comparing unsigned to z_off64_t, which is signed
|
213
212
|
(possible z_off64_t types off_t, off64_t, and long are all signed) */
|
214
|
-
|
215
|
-
#
|
216
|
-
#else
|
217
|
-
unsigned ZLIB_INTERNAL gz_intmax OF((void));
|
218
|
-
# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax())
|
219
|
-
#endif
|
213
|
+
unsigned ZLIB_INTERNAL gz_intmax(void);
|
214
|
+
#define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax())
|
@@ -15,9 +15,6 @@
|
|
15
15
|
#include "inflate.h"
|
16
16
|
#include "inffast.h"
|
17
17
|
|
18
|
-
/* function prototypes */
|
19
|
-
local void fixedtables OF((struct inflate_state FAR *state));
|
20
|
-
|
21
18
|
/*
|
22
19
|
strm provides memory allocation functions in zalloc and zfree, or
|
23
20
|
Z_NULL to use the library memory allocation functions.
|
@@ -25,13 +22,9 @@ local void fixedtables OF((struct inflate_state FAR *state));
|
|
25
22
|
windowBits is in the range 8..15, and window is a user-supplied
|
26
23
|
window and output buffer that is 2**windowBits bytes.
|
27
24
|
*/
|
28
|
-
int ZEXPORT inflateBackInit_(strm, windowBits,
|
29
|
-
|
30
|
-
int
|
31
|
-
unsigned char FAR *window;
|
32
|
-
const char *version;
|
33
|
-
int stream_size;
|
34
|
-
{
|
25
|
+
int ZEXPORT inflateBackInit_(z_streamp strm, int windowBits,
|
26
|
+
unsigned char FAR *window, const char *version,
|
27
|
+
int stream_size) {
|
35
28
|
struct inflate_state FAR *state;
|
36
29
|
|
37
30
|
if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
|
@@ -66,6 +59,7 @@ int stream_size;
|
|
66
59
|
state->window = window;
|
67
60
|
state->wnext = 0;
|
68
61
|
state->whave = 0;
|
62
|
+
state->sane = 1;
|
69
63
|
return Z_OK;
|
70
64
|
}
|
71
65
|
|
@@ -79,9 +73,7 @@ int stream_size;
|
|
79
73
|
used for threaded applications, since the rewriting of the tables and virgin
|
80
74
|
may not be thread-safe.
|
81
75
|
*/
|
82
|
-
local void fixedtables(state)
|
83
|
-
struct inflate_state FAR *state;
|
84
|
-
{
|
76
|
+
local void fixedtables(struct inflate_state FAR *state) {
|
85
77
|
#ifdef BUILDFIXED
|
86
78
|
static int virgin = 1;
|
87
79
|
static code *lenfix, *distfix;
|
@@ -247,13 +239,8 @@ struct inflate_state FAR *state;
|
|
247
239
|
inflateBack() can also return Z_STREAM_ERROR if the input parameters
|
248
240
|
are not correct, i.e. strm is Z_NULL or the state was not initialized.
|
249
241
|
*/
|
250
|
-
int ZEXPORT inflateBack(strm, in, in_desc,
|
251
|
-
|
252
|
-
in_func in;
|
253
|
-
void FAR *in_desc;
|
254
|
-
out_func out;
|
255
|
-
void FAR *out_desc;
|
256
|
-
{
|
242
|
+
int ZEXPORT inflateBack(z_streamp strm, in_func in, void FAR *in_desc,
|
243
|
+
out_func out, void FAR *out_desc) {
|
257
244
|
struct inflate_state FAR *state;
|
258
245
|
z_const unsigned char FAR *next; /* next input */
|
259
246
|
unsigned char FAR *put; /* next output */
|
@@ -605,33 +592,33 @@ void FAR *out_desc;
|
|
605
592
|
break;
|
606
593
|
|
607
594
|
case DONE:
|
608
|
-
/* inflate stream terminated properly
|
595
|
+
/* inflate stream terminated properly */
|
609
596
|
ret = Z_STREAM_END;
|
610
|
-
if (left < state->wsize) {
|
611
|
-
if (out(out_desc, state->window, state->wsize - left))
|
612
|
-
ret = Z_BUF_ERROR;
|
613
|
-
}
|
614
597
|
goto inf_leave;
|
615
598
|
|
616
599
|
case BAD:
|
617
600
|
ret = Z_DATA_ERROR;
|
618
601
|
goto inf_leave;
|
619
602
|
|
620
|
-
default:
|
603
|
+
default:
|
604
|
+
/* can't happen, but makes compilers happy */
|
621
605
|
ret = Z_STREAM_ERROR;
|
622
606
|
goto inf_leave;
|
623
607
|
}
|
624
608
|
|
625
|
-
/*
|
609
|
+
/* Write leftover output and return unused input */
|
626
610
|
inf_leave:
|
611
|
+
if (left < state->wsize) {
|
612
|
+
if (out(out_desc, state->window, state->wsize - left) &&
|
613
|
+
ret == Z_STREAM_END)
|
614
|
+
ret = Z_BUF_ERROR;
|
615
|
+
}
|
627
616
|
strm->next_in = next;
|
628
617
|
strm->avail_in = have;
|
629
618
|
return ret;
|
630
619
|
}
|
631
620
|
|
632
|
-
int ZEXPORT inflateBackEnd(strm)
|
633
|
-
z_streamp strm;
|
634
|
-
{
|
621
|
+
int ZEXPORT inflateBackEnd(z_streamp strm) {
|
635
622
|
if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
|
636
623
|
return Z_STREAM_ERROR;
|
637
624
|
ZFREE(strm, strm->state);
|
@@ -47,10 +47,7 @@
|
|
47
47
|
requires strm->avail_out >= 258 for each loop to avoid checking for
|
48
48
|
output space.
|
49
49
|
*/
|
50
|
-
void ZLIB_INTERNAL inflate_fast(strm, start)
|
51
|
-
z_streamp strm;
|
52
|
-
unsigned start; /* inflate()'s starting value for strm->avail_out */
|
53
|
-
{
|
50
|
+
void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start) {
|
54
51
|
struct inflate_state FAR *state;
|
55
52
|
z_const unsigned char FAR *in; /* local strm->next_in */
|
56
53
|
z_const unsigned char FAR *last; /* have enough input while in < last */
|
@@ -91,20 +91,7 @@
|
|
91
91
|
# endif
|
92
92
|
#endif
|
93
93
|
|
94
|
-
|
95
|
-
local int inflateStateCheck OF((z_streamp strm));
|
96
|
-
local void fixedtables OF((struct inflate_state FAR *state));
|
97
|
-
local int updatewindow OF((z_streamp strm, const unsigned char FAR *end,
|
98
|
-
unsigned copy));
|
99
|
-
#ifdef BUILDFIXED
|
100
|
-
void makefixed OF((void));
|
101
|
-
#endif
|
102
|
-
local unsigned syncsearch OF((unsigned FAR *have, const unsigned char FAR *buf,
|
103
|
-
unsigned len));
|
104
|
-
|
105
|
-
local int inflateStateCheck(strm)
|
106
|
-
z_streamp strm;
|
107
|
-
{
|
94
|
+
local int inflateStateCheck(z_streamp strm) {
|
108
95
|
struct inflate_state FAR *state;
|
109
96
|
if (strm == Z_NULL ||
|
110
97
|
strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0)
|
@@ -116,9 +103,7 @@ z_streamp strm;
|
|
116
103
|
return 0;
|
117
104
|
}
|
118
105
|
|
119
|
-
int ZEXPORT inflateResetKeep(strm)
|
120
|
-
z_streamp strm;
|
121
|
-
{
|
106
|
+
int ZEXPORT inflateResetKeep(z_streamp strm) {
|
122
107
|
struct inflate_state FAR *state;
|
123
108
|
|
124
109
|
if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
|
@@ -142,9 +127,7 @@ z_streamp strm;
|
|
142
127
|
return Z_OK;
|
143
128
|
}
|
144
129
|
|
145
|
-
int ZEXPORT inflateReset(strm)
|
146
|
-
z_streamp strm;
|
147
|
-
{
|
130
|
+
int ZEXPORT inflateReset(z_streamp strm) {
|
148
131
|
struct inflate_state FAR *state;
|
149
132
|
|
150
133
|
if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
|
@@ -155,10 +138,7 @@ z_streamp strm;
|
|
155
138
|
return inflateResetKeep(strm);
|
156
139
|
}
|
157
140
|
|
158
|
-
int ZEXPORT inflateReset2(strm, windowBits)
|
159
|
-
z_streamp strm;
|
160
|
-
int windowBits;
|
161
|
-
{
|
141
|
+
int ZEXPORT inflateReset2(z_streamp strm, int windowBits) {
|
162
142
|
int wrap;
|
163
143
|
struct inflate_state FAR *state;
|
164
144
|
|
@@ -168,6 +148,8 @@ int windowBits;
|
|
168
148
|
|
169
149
|
/* extract wrap request from windowBits parameter */
|
170
150
|
if (windowBits < 0) {
|
151
|
+
if (windowBits < -15)
|
152
|
+
return Z_STREAM_ERROR;
|
171
153
|
wrap = 0;
|
172
154
|
windowBits = -windowBits;
|
173
155
|
}
|
@@ -193,12 +175,8 @@ int windowBits;
|
|
193
175
|
return inflateReset(strm);
|
194
176
|
}
|
195
177
|
|
196
|
-
int ZEXPORT inflateInit2_(strm, windowBits,
|
197
|
-
|
198
|
-
int windowBits;
|
199
|
-
const char *version;
|
200
|
-
int stream_size;
|
201
|
-
{
|
178
|
+
int ZEXPORT inflateInit2_(z_streamp strm, int windowBits,
|
179
|
+
const char *version, int stream_size) {
|
202
180
|
int ret;
|
203
181
|
struct inflate_state FAR *state;
|
204
182
|
|
@@ -237,22 +215,17 @@ int stream_size;
|
|
237
215
|
return ret;
|
238
216
|
}
|
239
217
|
|
240
|
-
int ZEXPORT inflateInit_(strm, version,
|
241
|
-
|
242
|
-
const char *version;
|
243
|
-
int stream_size;
|
244
|
-
{
|
218
|
+
int ZEXPORT inflateInit_(z_streamp strm, const char *version,
|
219
|
+
int stream_size) {
|
245
220
|
return inflateInit2_(strm, DEF_WBITS, version, stream_size);
|
246
221
|
}
|
247
222
|
|
248
|
-
int ZEXPORT inflatePrime(strm, bits, value)
|
249
|
-
z_streamp strm;
|
250
|
-
int bits;
|
251
|
-
int value;
|
252
|
-
{
|
223
|
+
int ZEXPORT inflatePrime(z_streamp strm, int bits, int value) {
|
253
224
|
struct inflate_state FAR *state;
|
254
225
|
|
255
226
|
if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
|
227
|
+
if (bits == 0)
|
228
|
+
return Z_OK;
|
256
229
|
state = (struct inflate_state FAR *)strm->state;
|
257
230
|
if (bits < 0) {
|
258
231
|
state->hold = 0;
|
@@ -276,9 +249,7 @@ int value;
|
|
276
249
|
used for threaded applications, since the rewriting of the tables and virgin
|
277
250
|
may not be thread-safe.
|
278
251
|
*/
|
279
|
-
local void fixedtables(state)
|
280
|
-
struct inflate_state FAR *state;
|
281
|
-
{
|
252
|
+
local void fixedtables(struct inflate_state FAR *state) {
|
282
253
|
#ifdef BUILDFIXED
|
283
254
|
static int virgin = 1;
|
284
255
|
static code *lenfix, *distfix;
|
@@ -340,7 +311,7 @@ struct inflate_state FAR *state;
|
|
340
311
|
|
341
312
|
a.out > inffixed.h
|
342
313
|
*/
|
343
|
-
void makefixed()
|
314
|
+
void makefixed(void)
|
344
315
|
{
|
345
316
|
unsigned low, size;
|
346
317
|
struct inflate_state state;
|
@@ -394,11 +365,7 @@ void makefixed()
|
|
394
365
|
output will fall in the output data, making match copies simpler and faster.
|
395
366
|
The advantage may be dependent on the size of the processor's data caches.
|
396
367
|
*/
|
397
|
-
local int updatewindow(strm, end, copy)
|
398
|
-
z_streamp strm;
|
399
|
-
const Bytef *end;
|
400
|
-
unsigned copy;
|
401
|
-
{
|
368
|
+
local int updatewindow(z_streamp strm, const Bytef *end, unsigned copy) {
|
402
369
|
struct inflate_state FAR *state;
|
403
370
|
unsigned dist;
|
404
371
|
|
@@ -620,10 +587,7 @@ unsigned copy;
|
|
620
587
|
will return Z_BUF_ERROR if it has not reached the end of the stream.
|
621
588
|
*/
|
622
589
|
|
623
|
-
int ZEXPORT inflate(strm, flush)
|
624
|
-
z_streamp strm;
|
625
|
-
int flush;
|
626
|
-
{
|
590
|
+
int ZEXPORT inflate(z_streamp strm, int flush) {
|
627
591
|
struct inflate_state FAR *state;
|
628
592
|
z_const unsigned char FAR *next; /* next input */
|
629
593
|
unsigned char FAR *put; /* next output */
|
@@ -764,8 +728,9 @@ int flush;
|
|
764
728
|
if (copy > have) copy = have;
|
765
729
|
if (copy) {
|
766
730
|
if (state->head != Z_NULL &&
|
767
|
-
state->head->extra != Z_NULL
|
768
|
-
len = state->head->extra_len - state->length
|
731
|
+
state->head->extra != Z_NULL &&
|
732
|
+
(len = state->head->extra_len - state->length) <
|
733
|
+
state->head->extra_max) {
|
769
734
|
zmemcpy(state->head->extra + len, next,
|
770
735
|
len + copy > state->head->extra_max ?
|
771
736
|
state->head->extra_max - len : copy);
|
@@ -1298,9 +1263,7 @@ int flush;
|
|
1298
1263
|
return ret;
|
1299
1264
|
}
|
1300
1265
|
|
1301
|
-
int ZEXPORT inflateEnd(strm)
|
1302
|
-
z_streamp strm;
|
1303
|
-
{
|
1266
|
+
int ZEXPORT inflateEnd(z_streamp strm) {
|
1304
1267
|
struct inflate_state FAR *state;
|
1305
1268
|
if (inflateStateCheck(strm))
|
1306
1269
|
return Z_STREAM_ERROR;
|
@@ -1312,11 +1275,8 @@ z_streamp strm;
|
|
1312
1275
|
return Z_OK;
|
1313
1276
|
}
|
1314
1277
|
|
1315
|
-
int ZEXPORT inflateGetDictionary(strm, dictionary,
|
1316
|
-
|
1317
|
-
Bytef *dictionary;
|
1318
|
-
uInt *dictLength;
|
1319
|
-
{
|
1278
|
+
int ZEXPORT inflateGetDictionary(z_streamp strm, Bytef *dictionary,
|
1279
|
+
uInt *dictLength) {
|
1320
1280
|
struct inflate_state FAR *state;
|
1321
1281
|
|
1322
1282
|
/* check state */
|
@@ -1335,11 +1295,8 @@ uInt *dictLength;
|
|
1335
1295
|
return Z_OK;
|
1336
1296
|
}
|
1337
1297
|
|
1338
|
-
int ZEXPORT inflateSetDictionary(strm, dictionary,
|
1339
|
-
|
1340
|
-
const Bytef *dictionary;
|
1341
|
-
uInt dictLength;
|
1342
|
-
{
|
1298
|
+
int ZEXPORT inflateSetDictionary(z_streamp strm, const Bytef *dictionary,
|
1299
|
+
uInt dictLength) {
|
1343
1300
|
struct inflate_state FAR *state;
|
1344
1301
|
unsigned long dictid;
|
1345
1302
|
int ret;
|
@@ -1370,10 +1327,7 @@ uInt dictLength;
|
|
1370
1327
|
return Z_OK;
|
1371
1328
|
}
|
1372
1329
|
|
1373
|
-
int ZEXPORT inflateGetHeader(strm, head)
|
1374
|
-
z_streamp strm;
|
1375
|
-
gz_headerp head;
|
1376
|
-
{
|
1330
|
+
int ZEXPORT inflateGetHeader(z_streamp strm, gz_headerp head) {
|
1377
1331
|
struct inflate_state FAR *state;
|
1378
1332
|
|
1379
1333
|
/* check state */
|
@@ -1398,11 +1352,8 @@ gz_headerp head;
|
|
1398
1352
|
called again with more data and the *have state. *have is initialized to
|
1399
1353
|
zero for the first call.
|
1400
1354
|
*/
|
1401
|
-
local unsigned syncsearch(have, buf,
|
1402
|
-
unsigned
|
1403
|
-
const unsigned char FAR *buf;
|
1404
|
-
unsigned len;
|
1405
|
-
{
|
1355
|
+
local unsigned syncsearch(unsigned FAR *have, const unsigned char FAR *buf,
|
1356
|
+
unsigned len) {
|
1406
1357
|
unsigned got;
|
1407
1358
|
unsigned next;
|
1408
1359
|
|
@@ -1421,9 +1372,7 @@ unsigned len;
|
|
1421
1372
|
return next;
|
1422
1373
|
}
|
1423
1374
|
|
1424
|
-
int ZEXPORT inflateSync(strm)
|
1425
|
-
z_streamp strm;
|
1426
|
-
{
|
1375
|
+
int ZEXPORT inflateSync(z_streamp strm) {
|
1427
1376
|
unsigned len; /* number of bytes to look at or looked at */
|
1428
1377
|
int flags; /* temporary to save header status */
|
1429
1378
|
unsigned long in, out; /* temporary to save total_in and total_out */
|
@@ -1438,7 +1387,7 @@ z_streamp strm;
|
|
1438
1387
|
/* if first time, start search in bit buffer */
|
1439
1388
|
if (state->mode != SYNC) {
|
1440
1389
|
state->mode = SYNC;
|
1441
|
-
state->hold
|
1390
|
+
state->hold >>= state->bits & 7;
|
1442
1391
|
state->bits -= state->bits & 7;
|
1443
1392
|
len = 0;
|
1444
1393
|
while (state->bits >= 8) {
|
@@ -1479,9 +1428,7 @@ z_streamp strm;
|
|
1479
1428
|
block. When decompressing, PPP checks that at the end of input packet,
|
1480
1429
|
inflate is waiting for these length bytes.
|
1481
1430
|
*/
|
1482
|
-
int ZEXPORT inflateSyncPoint(strm)
|
1483
|
-
z_streamp strm;
|
1484
|
-
{
|
1431
|
+
int ZEXPORT inflateSyncPoint(z_streamp strm) {
|
1485
1432
|
struct inflate_state FAR *state;
|
1486
1433
|
|
1487
1434
|
if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
|
@@ -1489,10 +1436,7 @@ z_streamp strm;
|
|
1489
1436
|
return state->mode == STORED && state->bits == 0;
|
1490
1437
|
}
|
1491
1438
|
|
1492
|
-
int ZEXPORT inflateCopy(dest, source)
|
1493
|
-
z_streamp dest;
|
1494
|
-
z_streamp source;
|
1495
|
-
{
|
1439
|
+
int ZEXPORT inflateCopy(z_streamp dest, z_streamp source) {
|
1496
1440
|
struct inflate_state FAR *state;
|
1497
1441
|
struct inflate_state FAR *copy;
|
1498
1442
|
unsigned char FAR *window;
|
@@ -1536,10 +1480,7 @@ z_streamp source;
|
|
1536
1480
|
return Z_OK;
|
1537
1481
|
}
|
1538
1482
|
|
1539
|
-
int ZEXPORT inflateUndermine(strm, subvert)
|
1540
|
-
z_streamp strm;
|
1541
|
-
int subvert;
|
1542
|
-
{
|
1483
|
+
int ZEXPORT inflateUndermine(z_streamp strm, int subvert) {
|
1543
1484
|
struct inflate_state FAR *state;
|
1544
1485
|
|
1545
1486
|
if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
|
@@ -1554,10 +1495,7 @@ int subvert;
|
|
1554
1495
|
#endif
|
1555
1496
|
}
|
1556
1497
|
|
1557
|
-
int ZEXPORT inflateValidate(strm, check)
|
1558
|
-
z_streamp strm;
|
1559
|
-
int check;
|
1560
|
-
{
|
1498
|
+
int ZEXPORT inflateValidate(z_streamp strm, int check) {
|
1561
1499
|
struct inflate_state FAR *state;
|
1562
1500
|
|
1563
1501
|
if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
|
@@ -1569,9 +1507,7 @@ int check;
|
|
1569
1507
|
return Z_OK;
|
1570
1508
|
}
|
1571
1509
|
|
1572
|
-
long ZEXPORT inflateMark(strm)
|
1573
|
-
z_streamp strm;
|
1574
|
-
{
|
1510
|
+
long ZEXPORT inflateMark(z_streamp strm) {
|
1575
1511
|
struct inflate_state FAR *state;
|
1576
1512
|
|
1577
1513
|
if (inflateStateCheck(strm))
|
@@ -1582,9 +1518,7 @@ z_streamp strm;
|
|
1582
1518
|
(state->mode == MATCH ? state->was - state->length : 0));
|
1583
1519
|
}
|
1584
1520
|
|
1585
|
-
unsigned long ZEXPORT inflateCodesUsed(strm)
|
1586
|
-
z_streamp strm;
|
1587
|
-
{
|
1521
|
+
unsigned long ZEXPORT inflateCodesUsed(z_streamp strm) {
|
1588
1522
|
struct inflate_state FAR *state;
|
1589
1523
|
if (inflateStateCheck(strm)) return (unsigned long)-1;
|
1590
1524
|
state = (struct inflate_state FAR *)strm->state;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* inftrees.c -- generate Huffman trees for efficient decoding
|
2
|
-
* Copyright (C) 1995-
|
2
|
+
* Copyright (C) 1995-2024 Mark Adler
|
3
3
|
* For conditions of distribution and use, see copyright notice in zlib.h
|
4
4
|
*/
|
5
5
|
|
@@ -9,7 +9,7 @@
|
|
9
9
|
#define MAXBITS 15
|
10
10
|
|
11
11
|
const char inflate_copyright[] =
|
12
|
-
" inflate 1.
|
12
|
+
" inflate 1.3.1 Copyright 1995-2024 Mark Adler ";
|
13
13
|
/*
|
14
14
|
If you use the zlib library in a product, an acknowledgment is welcome
|
15
15
|
in the documentation of your product. If for some reason you cannot
|
@@ -29,14 +29,9 @@ const char inflate_copyright[] =
|
|
29
29
|
table index bits. It will differ if the request is greater than the
|
30
30
|
longest code or if it is less than the shortest code.
|
31
31
|
*/
|
32
|
-
int ZLIB_INTERNAL inflate_table(type,
|
33
|
-
|
34
|
-
unsigned short FAR *
|
35
|
-
unsigned codes;
|
36
|
-
code FAR * FAR *table;
|
37
|
-
unsigned FAR *bits;
|
38
|
-
unsigned short FAR *work;
|
39
|
-
{
|
32
|
+
int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens,
|
33
|
+
unsigned codes, code FAR * FAR *table,
|
34
|
+
unsigned FAR *bits, unsigned short FAR *work) {
|
40
35
|
unsigned len; /* a code's length in bits */
|
41
36
|
unsigned sym; /* index of code symbols */
|
42
37
|
unsigned min, max; /* minimum and maximum code lengths */
|
@@ -62,7 +57,7 @@ unsigned short FAR *work;
|
|
62
57
|
35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
|
63
58
|
static const unsigned short lext[31] = { /* Length codes 257..285 extra */
|
64
59
|
16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
|
65
|
-
19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16,
|
60
|
+
19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 203, 77};
|
66
61
|
static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
|
67
62
|
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
|
68
63
|
257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
|
@@ -38,11 +38,11 @@ typedef struct {
|
|
38
38
|
/* Maximum size of the dynamic table. The maximum number of code structures is
|
39
39
|
1444, which is the sum of 852 for literal/length codes and 592 for distance
|
40
40
|
codes. These values were found by exhaustive searches using the program
|
41
|
-
examples/enough.c found in the zlib
|
41
|
+
examples/enough.c found in the zlib distribution. The arguments to that
|
42
42
|
program are the number of symbols, the initial root table size, and the
|
43
43
|
maximum bit length of a code. "enough 286 9 15" for literal/length codes
|
44
|
-
returns
|
45
|
-
|
44
|
+
returns 852, and "enough 30 6 15" for distance codes returns 592. The
|
45
|
+
initial root table size (9 or 6) is found in the fifth argument of the
|
46
46
|
inflate_table() calls in inflate.c and infback.c. If the root table size is
|
47
47
|
changed, then these maximum sizes would be need to be recalculated and
|
48
48
|
updated. */
|
@@ -57,6 +57,6 @@ typedef enum {
|
|
57
57
|
DISTS
|
58
58
|
} codetype;
|
59
59
|
|
60
|
-
int ZLIB_INTERNAL inflate_table
|
61
|
-
|
62
|
-
|
60
|
+
int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens,
|
61
|
+
unsigned codes, code FAR * FAR *table,
|
62
|
+
unsigned FAR *bits, unsigned short FAR *work);
|