mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-10-06 06:50:16 +00:00
Bonk
This commit is contained in:
parent
75e32df90f
commit
c2c21de95a
@ -76,7 +76,7 @@ ApplicationId ApplicationId::fromTraditionalApp()
|
||||
prefix.remove(QRegularExpression("[^a-zA-Z]"));
|
||||
prefix.truncate(6);
|
||||
QByteArray idc = protoId.toUtf8();
|
||||
quint16 idNum = qChecksum(idc.constData(), idc.size());
|
||||
quint16 idNum = qChecksum(idc);
|
||||
auto socketName = QLatin1String("qtsingleapp-") + prefix + QLatin1Char('-') + QString::number(idNum, 16);
|
||||
#if defined(Q_OS_WIN)
|
||||
if (!pProcessIdToSessionId)
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 5b7c27a7f349394949fc328ed9bd81501403a1d3
|
||||
Subproject commit 1320dde10d304ef01542207326f6ee955dddf0db
|
@ -1 +1 @@
|
||||
Subproject commit b318840e7cb0ec476aaa44737b51ec4e7efd27c9
|
||||
Subproject commit d654f88cabb266168044dc65d06bf883a6dc0542
|
@ -7,7 +7,7 @@
|
||||
|
||||
#include "zutil.h"
|
||||
|
||||
local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2));
|
||||
static uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2));
|
||||
|
||||
#define BASE 65521U /* largest prime smaller than 65536 */
|
||||
#define NMAX 5552
|
||||
@ -140,7 +140,7 @@ uLong ZEXPORT adler32(adler, buf, len)
|
||||
}
|
||||
|
||||
/* ========================================================================= */
|
||||
local uLong adler32_combine_(adler1, adler2, len2)
|
||||
static uLong adler32_combine_(adler1, adler2, len2)
|
||||
uLong adler1;
|
||||
uLong adler2;
|
||||
z_off64_t len2;
|
||||
|
@ -99,8 +99,8 @@
|
||||
#endif
|
||||
|
||||
/* Local functions. */
|
||||
local z_crc_t multmodp OF((z_crc_t a, z_crc_t b));
|
||||
local z_crc_t x2nmodp OF((z_off64_t n, unsigned k));
|
||||
static z_crc_t multmodp OF((z_crc_t a, z_crc_t b));
|
||||
static z_crc_t x2nmodp OF((z_off64_t n, unsigned k));
|
||||
|
||||
/* If available, use the ARM processor CRC32 instruction. */
|
||||
#if defined(__aarch64__) && defined(__ARM_FEATURE_CRC32) && W == 8
|
||||
@ -114,7 +114,7 @@ local z_crc_t x2nmodp OF((z_off64_t n, unsigned k));
|
||||
instruction, if one is available. This assumes that word_t is either 32 bits
|
||||
or 64 bits.
|
||||
*/
|
||||
local z_word_t byte_swap(word)
|
||||
static z_word_t byte_swap(word)
|
||||
z_word_t word;
|
||||
{
|
||||
# if W == 8
|
||||
@ -142,19 +142,19 @@ local z_word_t byte_swap(word)
|
||||
|
||||
#ifdef DYNAMIC_CRC_TABLE
|
||||
|
||||
local z_crc_t FAR crc_table[256];
|
||||
local z_crc_t FAR x2n_table[32];
|
||||
local void make_crc_table OF((void));
|
||||
static z_crc_t FAR crc_table[256];
|
||||
static z_crc_t FAR x2n_table[32];
|
||||
static void make_crc_table OF((void));
|
||||
#ifdef W
|
||||
local z_word_t FAR crc_big_table[256];
|
||||
local z_crc_t FAR crc_braid_table[W][256];
|
||||
local z_word_t FAR crc_braid_big_table[W][256];
|
||||
local void braid OF((z_crc_t [][256], z_word_t [][256], int, int));
|
||||
static z_word_t FAR crc_big_table[256];
|
||||
static z_crc_t FAR crc_braid_table[W][256];
|
||||
static z_word_t FAR crc_braid_big_table[W][256];
|
||||
static void braid OF((z_crc_t [][256], z_word_t [][256], int, int));
|
||||
#endif
|
||||
#ifdef MAKECRCH
|
||||
local void write_table OF((FILE *, const z_crc_t FAR *, int));
|
||||
local void write_table32hi OF((FILE *, const z_word_t FAR *, int));
|
||||
local void write_table64 OF((FILE *, const z_word_t FAR *, int));
|
||||
static void write_table OF((FILE *, const z_crc_t FAR *, int));
|
||||
static void write_table32hi OF((FILE *, const z_word_t FAR *, int));
|
||||
static void write_table64 OF((FILE *, const z_word_t FAR *, int));
|
||||
#endif /* MAKECRCH */
|
||||
|
||||
/*
|
||||
@ -167,7 +167,7 @@ local void make_crc_table OF((void));
|
||||
|
||||
/* Definition of once functionality. */
|
||||
typedef struct once_s once_t;
|
||||
local void once OF((once_t *, void (*)(void)));
|
||||
static void once OF((once_t *, void (*)(void)));
|
||||
|
||||
/* Check for the availability of atomics. */
|
||||
#if defined(__STDC__) && __STDC_VERSION__ >= 201112L && \
|
||||
@ -187,7 +187,7 @@ struct once_s {
|
||||
invoke once() at the same time. The state must be a once_t initialized with
|
||||
ONCE_INIT.
|
||||
*/
|
||||
local void once(state, init)
|
||||
static void once(state, init)
|
||||
once_t *state;
|
||||
void (*init)(void);
|
||||
{
|
||||
@ -213,8 +213,8 @@ struct once_s {
|
||||
|
||||
/* Test and set. Alas, not atomic, but tries to minimize the period of
|
||||
vulnerability. */
|
||||
local int test_and_set OF((int volatile *));
|
||||
local int test_and_set(flag)
|
||||
static int test_and_set OF((int volatile *));
|
||||
static int test_and_set(flag)
|
||||
int volatile *flag;
|
||||
{
|
||||
int was;
|
||||
@ -225,7 +225,7 @@ local int test_and_set(flag)
|
||||
}
|
||||
|
||||
/* Run the provided init() function once. This is not thread-safe. */
|
||||
local void once(state, init)
|
||||
static void once(state, init)
|
||||
once_t *state;
|
||||
void (*init)(void);
|
||||
{
|
||||
@ -243,7 +243,7 @@ local void once(state, init)
|
||||
#endif
|
||||
|
||||
/* State for once(). */
|
||||
local once_t made = ONCE_INIT;
|
||||
static once_t made = ONCE_INIT;
|
||||
|
||||
/*
|
||||
Generate tables for a byte-wise 32-bit CRC calculation on the polynomial:
|
||||
@ -270,7 +270,7 @@ local once_t made = ONCE_INIT;
|
||||
combinations of CRC register values and incoming bytes.
|
||||
*/
|
||||
|
||||
local void make_crc_table()
|
||||
static void make_crc_table()
|
||||
{
|
||||
unsigned i, j, n;
|
||||
z_crc_t p;
|
||||
@ -321,7 +321,7 @@ local void make_crc_table()
|
||||
"/* crc32.h -- tables for rapid CRC calculation\n"
|
||||
" * Generated automatically by crc32.c\n */\n"
|
||||
"\n"
|
||||
"local const z_crc_t FAR crc_table[] = {\n"
|
||||
"static const z_crc_t FAR crc_table[] = {\n"
|
||||
" ");
|
||||
write_table(out, crc_table, 256);
|
||||
fprintf(out,
|
||||
@ -334,7 +334,7 @@ local void make_crc_table()
|
||||
"\n"
|
||||
"#if W == 8\n"
|
||||
"\n"
|
||||
"local const z_word_t FAR crc_big_table[] = {\n"
|
||||
"static const z_word_t FAR crc_big_table[] = {\n"
|
||||
" ");
|
||||
write_table64(out, crc_big_table, 256);
|
||||
fprintf(out,
|
||||
@ -345,7 +345,7 @@ local void make_crc_table()
|
||||
"\n"
|
||||
"#else /* W == 4 */\n"
|
||||
"\n"
|
||||
"local const z_word_t FAR crc_big_table[] = {\n"
|
||||
"static const z_word_t FAR crc_big_table[] = {\n"
|
||||
" ");
|
||||
write_table32hi(out, crc_big_table, 256);
|
||||
fprintf(out,
|
||||
@ -367,7 +367,7 @@ local void make_crc_table()
|
||||
"\n"
|
||||
"#if W == 8\n"
|
||||
"\n"
|
||||
"local const z_crc_t FAR crc_braid_table[][256] = {\n");
|
||||
"static const z_crc_t FAR crc_braid_table[][256] = {\n");
|
||||
for (k = 0; k < 8; k++) {
|
||||
fprintf(out, " {");
|
||||
write_table(out, ltl[k], 256);
|
||||
@ -376,7 +376,7 @@ local void make_crc_table()
|
||||
fprintf(out,
|
||||
"};\n"
|
||||
"\n"
|
||||
"local const z_word_t FAR crc_braid_big_table[][256] = {\n");
|
||||
"static const z_word_t FAR crc_braid_big_table[][256] = {\n");
|
||||
for (k = 0; k < 8; k++) {
|
||||
fprintf(out, " {");
|
||||
write_table64(out, big[k], 256);
|
||||
@ -393,7 +393,7 @@ local void make_crc_table()
|
||||
"\n"
|
||||
"#else /* W == 4 */\n"
|
||||
"\n"
|
||||
"local const z_crc_t FAR crc_braid_table[][256] = {\n");
|
||||
"static const z_crc_t FAR crc_braid_table[][256] = {\n");
|
||||
for (k = 0; k < 4; k++) {
|
||||
fprintf(out, " {");
|
||||
write_table(out, ltl[k], 256);
|
||||
@ -402,7 +402,7 @@ local void make_crc_table()
|
||||
fprintf(out,
|
||||
"};\n"
|
||||
"\n"
|
||||
"local const z_word_t FAR crc_braid_big_table[][256] = {\n");
|
||||
"static const z_word_t FAR crc_braid_big_table[][256] = {\n");
|
||||
for (k = 0; k < 4; k++) {
|
||||
fprintf(out, " {");
|
||||
write_table32hi(out, big[k], 256);
|
||||
@ -422,7 +422,7 @@ local void make_crc_table()
|
||||
/* write out zeros operator table to crc32.h */
|
||||
fprintf(out,
|
||||
"\n"
|
||||
"local const z_crc_t FAR x2n_table[] = {\n"
|
||||
"static const z_crc_t FAR x2n_table[] = {\n"
|
||||
" ");
|
||||
write_table(out, x2n_table, 32);
|
||||
fprintf(out,
|
||||
@ -438,7 +438,7 @@ local void make_crc_table()
|
||||
Write the 32-bit values in table[0..k-1] to out, five per line in
|
||||
hexadecimal separated by commas.
|
||||
*/
|
||||
local void write_table(out, table, k)
|
||||
static void write_table(out, table, k)
|
||||
FILE *out;
|
||||
const z_crc_t FAR *table;
|
||||
int k;
|
||||
@ -455,7 +455,7 @@ local void write_table(out, table, k)
|
||||
Write the high 32-bits of each value in table[0..k-1] to out, five per line
|
||||
in hexadecimal separated by commas.
|
||||
*/
|
||||
local void write_table32hi(out, table, k)
|
||||
static void write_table32hi(out, table, k)
|
||||
FILE *out;
|
||||
const z_word_t FAR *table;
|
||||
int k;
|
||||
@ -475,7 +475,7 @@ int k;
|
||||
bits. If not, then the type cast and format string can be adjusted
|
||||
accordingly.
|
||||
*/
|
||||
local void write_table64(out, table, k)
|
||||
static void write_table64(out, table, k)
|
||||
FILE *out;
|
||||
const z_word_t FAR *table;
|
||||
int k;
|
||||
@ -502,7 +502,7 @@ int main()
|
||||
Generate the little and big-endian braid tables for the given n and z_word_t
|
||||
size w. Each array must have room for w blocks of 256 elements.
|
||||
*/
|
||||
local void braid(ltl, big, n, w)
|
||||
static void braid(ltl, big, n, w)
|
||||
z_crc_t ltl[][256];
|
||||
z_word_t big[][256];
|
||||
int n;
|
||||
@ -539,7 +539,7 @@ local void braid(ltl, big, n, w)
|
||||
Return a(x) multiplied by b(x) modulo p(x), where p(x) is the CRC polynomial,
|
||||
reflected. For speed, this requires that a not be zero.
|
||||
*/
|
||||
local z_crc_t multmodp(a, b)
|
||||
static z_crc_t multmodp(a, b)
|
||||
z_crc_t a;
|
||||
z_crc_t b;
|
||||
{
|
||||
@ -563,7 +563,7 @@ local z_crc_t multmodp(a, b)
|
||||
Return x^(n * 2^k) modulo p(x). Requires that x2n_table[] has been
|
||||
initialized.
|
||||
*/
|
||||
local z_crc_t x2nmodp(n, k)
|
||||
static z_crc_t x2nmodp(n, k)
|
||||
z_off64_t n;
|
||||
unsigned k;
|
||||
{
|
||||
@ -714,7 +714,7 @@ unsigned long ZEXPORT crc32_z(crc, buf, len)
|
||||
least-significant byte of the word as the first byte of data, without any pre
|
||||
or post conditioning. This is used to combine the CRCs of each braid.
|
||||
*/
|
||||
local z_crc_t crc_word(data)
|
||||
static z_crc_t crc_word(data)
|
||||
z_word_t data;
|
||||
{
|
||||
int k;
|
||||
@ -723,7 +723,7 @@ local z_crc_t crc_word(data)
|
||||
return (z_crc_t)data;
|
||||
}
|
||||
|
||||
local z_word_t crc_word_big(data)
|
||||
static z_word_t crc_word_big(data)
|
||||
z_word_t data;
|
||||
{
|
||||
int k;
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Generated automatically by crc32.c
|
||||
*/
|
||||
|
||||
local const z_crc_t FAR crc_table[] = {
|
||||
static const z_crc_t FAR crc_table[] = {
|
||||
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419,
|
||||
0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4,
|
||||
0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07,
|
||||
@ -60,7 +60,7 @@ local const z_crc_t FAR crc_table[] = {
|
||||
|
||||
#if W == 8
|
||||
|
||||
local const z_word_t FAR crc_big_table[] = {
|
||||
static const z_word_t FAR crc_big_table[] = {
|
||||
0x0000000000000000, 0x9630077700000000, 0x2c610eee00000000,
|
||||
0xba51099900000000, 0x19c46d0700000000, 0x8ff46a7000000000,
|
||||
0x35a563e900000000, 0xa395649e00000000, 0x3288db0e00000000,
|
||||
@ -150,7 +150,7 @@ local const z_word_t FAR crc_big_table[] = {
|
||||
|
||||
#else /* W == 4 */
|
||||
|
||||
local const z_word_t FAR crc_big_table[] = {
|
||||
static const z_word_t FAR crc_big_table[] = {
|
||||
0x00000000, 0x96300777, 0x2c610eee, 0xba510999, 0x19c46d07,
|
||||
0x8ff46a70, 0x35a563e9, 0xa395649e, 0x3288db0e, 0xa4b8dc79,
|
||||
0x1ee9d5e0, 0x88d9d297, 0x2b4cb609, 0xbd7cb17e, 0x072db8e7,
|
||||
@ -210,7 +210,7 @@ local const z_word_t FAR crc_big_table[] = {
|
||||
|
||||
#if W == 8
|
||||
|
||||
local const z_crc_t FAR crc_braid_table[][256] = {
|
||||
static const z_crc_t FAR crc_braid_table[][256] = {
|
||||
{0x00000000, 0xccaa009e, 0x4225077d, 0x8e8f07e3, 0x844a0efa,
|
||||
0x48e00e64, 0xc66f0987, 0x0ac50919, 0xd3e51bb5, 0x1f4f1b2b,
|
||||
0x91c01cc8, 0x5d6a1c56, 0x57af154f, 0x9b0515d1, 0x158a1232,
|
||||
@ -628,7 +628,7 @@ local const z_crc_t FAR crc_braid_table[][256] = {
|
||||
0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b,
|
||||
0x2d02ef8d}};
|
||||
|
||||
local const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
static const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
{0x0000000000000000, 0x9630077700000000, 0x2c610eee00000000,
|
||||
0xba51099900000000, 0x19c46d0700000000, 0x8ff46a7000000000,
|
||||
0x35a563e900000000, 0xa395649e00000000, 0x3288db0e00000000,
|
||||
@ -1320,7 +1320,7 @@ local const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
|
||||
#else /* W == 4 */
|
||||
|
||||
local const z_crc_t FAR crc_braid_table[][256] = {
|
||||
static const z_crc_t FAR crc_braid_table[][256] = {
|
||||
{0x00000000, 0xb8bc6765, 0xaa09c88b, 0x12b5afee, 0x8f629757,
|
||||
0x37def032, 0x256b5fdc, 0x9dd738b9, 0xc5b428ef, 0x7d084f8a,
|
||||
0x6fbde064, 0xd7018701, 0x4ad6bfb8, 0xf26ad8dd, 0xe0df7733,
|
||||
@ -1530,7 +1530,7 @@ local const z_crc_t FAR crc_braid_table[][256] = {
|
||||
0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b,
|
||||
0x2d02ef8d}};
|
||||
|
||||
local const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
static const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
{0x00000000, 0x96300777, 0x2c610eee, 0xba510999, 0x19c46d07,
|
||||
0x8ff46a70, 0x35a563e9, 0xa395649e, 0x3288db0e, 0xa4b8dc79,
|
||||
0x1ee9d5e0, 0x88d9d297, 0x2b4cb609, 0xbd7cb17e, 0x072db8e7,
|
||||
@ -1748,7 +1748,7 @@ local const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
|
||||
#if W == 8
|
||||
|
||||
local const z_crc_t FAR crc_braid_table[][256] = {
|
||||
static const z_crc_t FAR crc_braid_table[][256] = {
|
||||
{0x00000000, 0xae689191, 0x87a02563, 0x29c8b4f2, 0xd4314c87,
|
||||
0x7a59dd16, 0x539169e4, 0xfdf9f875, 0x73139f4f, 0xdd7b0ede,
|
||||
0xf4b3ba2c, 0x5adb2bbd, 0xa722d3c8, 0x094a4259, 0x2082f6ab,
|
||||
@ -2166,7 +2166,7 @@ local const z_crc_t FAR crc_braid_table[][256] = {
|
||||
0x03d84904, 0x14a35d47, 0x70c2308e, 0x67b924cd, 0x5e341808,
|
||||
0x494f0c4b}};
|
||||
|
||||
local const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
static const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
{0x0000000000000000, 0x43147b1700000000, 0x8628f62e00000000,
|
||||
0xc53c8d3900000000, 0x0c51ec5d00000000, 0x4f45974a00000000,
|
||||
0x8a791a7300000000, 0xc96d616400000000, 0x18a2d8bb00000000,
|
||||
@ -2858,7 +2858,7 @@ local const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
|
||||
#else /* W == 4 */
|
||||
|
||||
local const z_crc_t FAR crc_braid_table[][256] = {
|
||||
static const z_crc_t FAR crc_braid_table[][256] = {
|
||||
{0x00000000, 0xccaa009e, 0x4225077d, 0x8e8f07e3, 0x844a0efa,
|
||||
0x48e00e64, 0xc66f0987, 0x0ac50919, 0xd3e51bb5, 0x1f4f1b2b,
|
||||
0x91c01cc8, 0x5d6a1c56, 0x57af154f, 0x9b0515d1, 0x158a1232,
|
||||
@ -3068,7 +3068,7 @@ local const z_crc_t FAR crc_braid_table[][256] = {
|
||||
0x028448fc, 0x3fe4614c, 0x8dc4bd5c, 0xb0a494ec, 0xf704ee3c,
|
||||
0xca64c78c}};
|
||||
|
||||
local const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
static const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
{0x00000000, 0xb029603d, 0x6053c07a, 0xd07aa047, 0xc0a680f5,
|
||||
0x708fe0c8, 0xa0f5408f, 0x10dc20b2, 0xc14b7030, 0x7162100d,
|
||||
0xa118b04a, 0x1131d077, 0x01edf0c5, 0xb1c490f8, 0x61be30bf,
|
||||
@ -3286,7 +3286,7 @@ local const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
|
||||
#if W == 8
|
||||
|
||||
local const z_crc_t FAR crc_braid_table[][256] = {
|
||||
static const z_crc_t FAR crc_braid_table[][256] = {
|
||||
{0x00000000, 0x81256527, 0xd93bcc0f, 0x581ea928, 0x69069e5f,
|
||||
0xe823fb78, 0xb03d5250, 0x31183777, 0xd20d3cbe, 0x53285999,
|
||||
0x0b36f0b1, 0x8a139596, 0xbb0ba2e1, 0x3a2ec7c6, 0x62306eee,
|
||||
@ -3704,7 +3704,7 @@ local const z_crc_t FAR crc_braid_table[][256] = {
|
||||
0xec14dac2, 0x6bb21181, 0x4b206dca, 0xcc86a689, 0x9f1cfd0d,
|
||||
0x18ba364e}};
|
||||
|
||||
local const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
static const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
{0x0000000000000000, 0x43cba68700000000, 0xc7903cd400000000,
|
||||
0x845b9a5300000000, 0xcf27087300000000, 0x8cecaef400000000,
|
||||
0x08b734a700000000, 0x4b7c922000000000, 0x9e4f10e600000000,
|
||||
@ -4396,7 +4396,7 @@ local const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
|
||||
#else /* W == 4 */
|
||||
|
||||
local const z_crc_t FAR crc_braid_table[][256] = {
|
||||
static const z_crc_t FAR crc_braid_table[][256] = {
|
||||
{0x00000000, 0x9ba54c6f, 0xec3b9e9f, 0x779ed2f0, 0x03063b7f,
|
||||
0x98a37710, 0xef3da5e0, 0x7498e98f, 0x060c76fe, 0x9da93a91,
|
||||
0xea37e861, 0x7192a40e, 0x050a4d81, 0x9eaf01ee, 0xe931d31e,
|
||||
@ -4606,7 +4606,7 @@ local const z_crc_t FAR crc_braid_table[][256] = {
|
||||
0x03d84904, 0x14a35d47, 0x70c2308e, 0x67b924cd, 0x5e341808,
|
||||
0x494f0c4b}};
|
||||
|
||||
local const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
static const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
{0x00000000, 0x43147b17, 0x8628f62e, 0xc53c8d39, 0x0c51ec5d,
|
||||
0x4f45974a, 0x8a791a73, 0xc96d6164, 0x18a2d8bb, 0x5bb6a3ac,
|
||||
0x9e8a2e95, 0xdd9e5582, 0x14f334e6, 0x57e74ff1, 0x92dbc2c8,
|
||||
@ -4824,7 +4824,7 @@ local const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
|
||||
#if W == 8
|
||||
|
||||
local const z_crc_t FAR crc_braid_table[][256] = {
|
||||
static const z_crc_t FAR crc_braid_table[][256] = {
|
||||
{0x00000000, 0xf1da05aa, 0x38c50d15, 0xc91f08bf, 0x718a1a2a,
|
||||
0x80501f80, 0x494f173f, 0xb8951295, 0xe3143454, 0x12ce31fe,
|
||||
0xdbd13941, 0x2a0b3ceb, 0x929e2e7e, 0x63442bd4, 0xaa5b236b,
|
||||
@ -5242,7 +5242,7 @@ local const z_crc_t FAR crc_braid_table[][256] = {
|
||||
0x42537612, 0xe7d8e61c, 0x29881ab4, 0x8c038aba, 0xb9ee3ce9,
|
||||
0x1c65ace7}};
|
||||
|
||||
local const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
static const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
{0x0000000000000000, 0x0e908ba500000000, 0x5d26669000000000,
|
||||
0x53b6ed3500000000, 0xfb4abdfb00000000, 0xf5da365e00000000,
|
||||
0xa66cdb6b00000000, 0xa8fc50ce00000000, 0xb7930b2c00000000,
|
||||
@ -5934,7 +5934,7 @@ local const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
|
||||
#else /* W == 4 */
|
||||
|
||||
local const z_crc_t FAR crc_braid_table[][256] = {
|
||||
static const z_crc_t FAR crc_braid_table[][256] = {
|
||||
{0x00000000, 0xae689191, 0x87a02563, 0x29c8b4f2, 0xd4314c87,
|
||||
0x7a59dd16, 0x539169e4, 0xfdf9f875, 0x73139f4f, 0xdd7b0ede,
|
||||
0xf4b3ba2c, 0x5adb2bbd, 0xa722d3c8, 0x094a4259, 0x2082f6ab,
|
||||
@ -6144,7 +6144,7 @@ local const z_crc_t FAR crc_braid_table[][256] = {
|
||||
0x20c13fb5, 0xfd57e630, 0x8024e068, 0x5db239ed, 0xe0785523,
|
||||
0x3dee8ca6}};
|
||||
|
||||
local const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
static const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
{0x00000000, 0x85d996dd, 0x4bb55c60, 0xce6ccabd, 0x966ab9c0,
|
||||
0x13b32f1d, 0xdddfe5a0, 0x5806737d, 0x6dd3035a, 0xe80a9587,
|
||||
0x26665f3a, 0xa3bfc9e7, 0xfbb9ba9a, 0x7e602c47, 0xb00ce6fa,
|
||||
@ -6362,7 +6362,7 @@ local const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
|
||||
#if W == 8
|
||||
|
||||
local const z_crc_t FAR crc_braid_table[][256] = {
|
||||
static const z_crc_t FAR crc_braid_table[][256] = {
|
||||
{0x00000000, 0xaf449247, 0x85f822cf, 0x2abcb088, 0xd08143df,
|
||||
0x7fc5d198, 0x55796110, 0xfa3df357, 0x7a7381ff, 0xd53713b8,
|
||||
0xff8ba330, 0x50cf3177, 0xaaf2c220, 0x05b65067, 0x2f0ae0ef,
|
||||
@ -6780,7 +6780,7 @@ local const z_crc_t FAR crc_braid_table[][256] = {
|
||||
0x190fa237, 0x2ffd32c4, 0xaf20c01d, 0x99d250ee, 0xc2c5e1fb,
|
||||
0xf4377108}};
|
||||
|
||||
local const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
static const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
{0x0000000000000000, 0xf390f23600000000, 0xe621e56d00000000,
|
||||
0x15b1175b00000000, 0xcc43cadb00000000, 0x3fd338ed00000000,
|
||||
0x2a622fb600000000, 0xd9f2dd8000000000, 0xd981e56c00000000,
|
||||
@ -7472,7 +7472,7 @@ local const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
|
||||
#else /* W == 4 */
|
||||
|
||||
local const z_crc_t FAR crc_braid_table[][256] = {
|
||||
static const z_crc_t FAR crc_braid_table[][256] = {
|
||||
{0x00000000, 0x65673b46, 0xcace768c, 0xafa94dca, 0x4eedeb59,
|
||||
0x2b8ad01f, 0x84239dd5, 0xe144a693, 0x9ddbd6b2, 0xf8bcedf4,
|
||||
0x5715a03e, 0x32729b78, 0xd3363deb, 0xb65106ad, 0x19f84b67,
|
||||
@ -7682,7 +7682,7 @@ local const z_crc_t FAR crc_braid_table[][256] = {
|
||||
0xec14dac2, 0x6bb21181, 0x4b206dca, 0xcc86a689, 0x9f1cfd0d,
|
||||
0x18ba364e}};
|
||||
|
||||
local const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
static const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
{0x00000000, 0x43cba687, 0xc7903cd4, 0x845b9a53, 0xcf270873,
|
||||
0x8cecaef4, 0x08b734a7, 0x4b7c9220, 0x9e4f10e6, 0xdd84b661,
|
||||
0x59df2c32, 0x1a148ab5, 0x51681895, 0x12a3be12, 0x96f82441,
|
||||
@ -7900,7 +7900,7 @@ local const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
|
||||
#if W == 8
|
||||
|
||||
local const z_crc_t FAR crc_braid_table[][256] = {
|
||||
static const z_crc_t FAR crc_braid_table[][256] = {
|
||||
{0x00000000, 0x3db1ecdc, 0x7b63d9b8, 0x46d23564, 0xf6c7b370,
|
||||
0xcb765fac, 0x8da46ac8, 0xb0158614, 0x36fe60a1, 0x0b4f8c7d,
|
||||
0x4d9db919, 0x702c55c5, 0xc039d3d1, 0xfd883f0d, 0xbb5a0a69,
|
||||
@ -8318,7 +8318,7 @@ local const z_crc_t FAR crc_braid_table[][256] = {
|
||||
0xc39adf05, 0x2b8d4fa4, 0xde78b600, 0x366f26a1, 0xd5269103,
|
||||
0x3d3101a2}};
|
||||
|
||||
local const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
static const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
{0x0000000000000000, 0xa19017e800000000, 0x03275e0b00000000,
|
||||
0xa2b749e300000000, 0x064ebc1600000000, 0xa7deabfe00000000,
|
||||
0x0569e21d00000000, 0xa4f9f5f500000000, 0x0c9c782d00000000,
|
||||
@ -9010,7 +9010,7 @@ local const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
|
||||
#else /* W == 4 */
|
||||
|
||||
local const z_crc_t FAR crc_braid_table[][256] = {
|
||||
static const z_crc_t FAR crc_braid_table[][256] = {
|
||||
{0x00000000, 0x81256527, 0xd93bcc0f, 0x581ea928, 0x69069e5f,
|
||||
0xe823fb78, 0xb03d5250, 0x31183777, 0xd20d3cbe, 0x53285999,
|
||||
0x0b36f0b1, 0x8a139596, 0xbb0ba2e1, 0x3a2ec7c6, 0x62306eee,
|
||||
@ -9220,7 +9220,7 @@ local const z_crc_t FAR crc_braid_table[][256] = {
|
||||
0xdb48ef6d, 0x44926cf3, 0x2d75eaab, 0xb2af6935, 0xc9b1ebd6,
|
||||
0x566b6848}};
|
||||
|
||||
local const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
static const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
{0x00000000, 0x9e83da9f, 0x7d01c4e4, 0xe3821e7b, 0xbb04f912,
|
||||
0x2587238d, 0xc6053df6, 0x5886e769, 0x7609f225, 0xe88a28ba,
|
||||
0x0b0836c1, 0x958bec5e, 0xcd0d0b37, 0x538ed1a8, 0xb00ccfd3,
|
||||
@ -9436,7 +9436,7 @@ local const z_word_t FAR crc_braid_big_table[][256] = {
|
||||
|
||||
#endif
|
||||
|
||||
local const z_crc_t FAR x2n_table[] = {
|
||||
static const z_crc_t FAR x2n_table[] = {
|
||||
0x40000000, 0x20000000, 0x08000000, 0x00800000, 0x00008000,
|
||||
0xedb88320, 0xb1e6b092, 0xa06a2517, 0xed627dae, 0x88d14467,
|
||||
0xd7bbfe6a, 0xec447f11, 0x8e7ea170, 0x6427800e, 0x4d47bae0,
|
||||
|
@ -73,30 +73,30 @@ typedef enum {
|
||||
typedef block_state (*compress_func) OF((deflate_state *s, int flush));
|
||||
/* Compression function. Returns the block state after the call. */
|
||||
|
||||
local int deflateStateCheck OF((z_streamp strm));
|
||||
local void slide_hash OF((deflate_state *s));
|
||||
local void fill_window OF((deflate_state *s));
|
||||
local block_state deflate_stored OF((deflate_state *s, int flush));
|
||||
local block_state deflate_fast OF((deflate_state *s, int flush));
|
||||
static int deflateStateCheck OF((z_streamp strm));
|
||||
static void slide_hash OF((deflate_state *s));
|
||||
static void fill_window OF((deflate_state *s));
|
||||
static block_state deflate_stored OF((deflate_state *s, int flush));
|
||||
static block_state deflate_fast OF((deflate_state *s, int flush));
|
||||
#ifndef FASTEST
|
||||
local block_state deflate_slow OF((deflate_state *s, int flush));
|
||||
static block_state deflate_slow OF((deflate_state *s, int flush));
|
||||
#endif
|
||||
local block_state deflate_rle OF((deflate_state *s, int flush));
|
||||
local block_state deflate_huff OF((deflate_state *s, int flush));
|
||||
local void lm_init OF((deflate_state *s));
|
||||
local void putShortMSB OF((deflate_state *s, uInt b));
|
||||
local void flush_pending OF((z_streamp strm));
|
||||
local unsigned read_buf OF((z_streamp strm, Bytef *buf, unsigned size));
|
||||
static block_state deflate_rle OF((deflate_state *s, int flush));
|
||||
static block_state deflate_huff OF((deflate_state *s, int flush));
|
||||
static void lm_init OF((deflate_state *s));
|
||||
static void putShortMSB OF((deflate_state *s, uInt b));
|
||||
static void flush_pending OF((z_streamp strm));
|
||||
static unsigned read_buf OF((z_streamp strm, Bytef *buf, unsigned size));
|
||||
#ifdef ASMV
|
||||
# pragma message("Assembler code may have bugs -- use at your own risk")
|
||||
void match_init OF((void)); /* asm code initialization */
|
||||
uInt longest_match OF((deflate_state *s, IPos cur_match));
|
||||
#else
|
||||
local uInt longest_match OF((deflate_state *s, IPos cur_match));
|
||||
static uInt longest_match OF((deflate_state *s, IPos cur_match));
|
||||
#endif
|
||||
|
||||
#ifdef ZLIB_DEBUG
|
||||
local void check_match OF((deflate_state *s, IPos start, IPos match,
|
||||
static void check_match OF((deflate_state *s, IPos start, IPos match,
|
||||
int length));
|
||||
#endif
|
||||
|
||||
@ -126,12 +126,12 @@ typedef struct config_s {
|
||||
} config;
|
||||
|
||||
#ifdef FASTEST
|
||||
local const config configuration_table[2] = {
|
||||
static const config configuration_table[2] = {
|
||||
/* good lazy nice chain */
|
||||
/* 0 */ {0, 0, 0, 0, deflate_stored}, /* store only */
|
||||
/* 1 */ {4, 4, 8, 4, deflate_fast}}; /* max speed, no lazy matches */
|
||||
#else
|
||||
local const config configuration_table[10] = {
|
||||
static const config configuration_table[10] = {
|
||||
/* good lazy nice chain */
|
||||
/* 0 */ {0, 0, 0, 0, deflate_stored}, /* store only */
|
||||
/* 1 */ {4, 4, 8, 4, deflate_fast}, /* max speed, no lazy matches */
|
||||
@ -201,7 +201,7 @@ local const config configuration_table[10] = {
|
||||
* bit values at the expense of memory usage). We slide even when level == 0 to
|
||||
* keep the hash table consistent if we switch back to level > 0 later.
|
||||
*/
|
||||
local void slide_hash(s)
|
||||
static void slide_hash(s)
|
||||
deflate_state *s;
|
||||
{
|
||||
unsigned n, m;
|
||||
@ -390,7 +390,7 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
|
||||
/* =========================================================================
|
||||
* Check for a valid deflate stream state. Return 0 if ok, 1 if not.
|
||||
*/
|
||||
local int deflateStateCheck (strm)
|
||||
static int deflateStateCheck (strm)
|
||||
z_streamp strm;
|
||||
{
|
||||
deflate_state *s;
|
||||
@ -754,7 +754,7 @@ uLong ZEXPORT deflateBound(strm, sourceLen)
|
||||
* IN assertion: the stream state is correct and there is enough room in
|
||||
* pending_buf.
|
||||
*/
|
||||
local void putShortMSB (s, b)
|
||||
static void putShortMSB (s, b)
|
||||
deflate_state *s;
|
||||
uInt b;
|
||||
{
|
||||
@ -768,7 +768,7 @@ local void putShortMSB (s, b)
|
||||
* applications may wish to modify it to avoid allocating a large
|
||||
* strm->next_out buffer and copying into it. (See also read_buf()).
|
||||
*/
|
||||
local void flush_pending(strm)
|
||||
static void flush_pending(strm)
|
||||
z_streamp strm;
|
||||
{
|
||||
unsigned len;
|
||||
@ -1201,7 +1201,7 @@ int ZEXPORT deflateCopy (dest, source)
|
||||
* allocating a large strm->next_in buffer and copying from it.
|
||||
* (See also flush_pending()).
|
||||
*/
|
||||
local unsigned read_buf(strm, buf, size)
|
||||
static unsigned read_buf(strm, buf, size)
|
||||
z_streamp strm;
|
||||
Bytef *buf;
|
||||
unsigned size;
|
||||
@ -1231,7 +1231,7 @@ local unsigned read_buf(strm, buf, size)
|
||||
/* ===========================================================================
|
||||
* Initialize the "longest match" routines for a new zlib stream
|
||||
*/
|
||||
local void lm_init (s)
|
||||
static void lm_init (s)
|
||||
deflate_state *s;
|
||||
{
|
||||
s->window_size = (ulg)2L*s->w_size;
|
||||
@ -1273,7 +1273,7 @@ local void lm_init (s)
|
||||
/* For 80x86 and 680x0, an optimized version will be provided in match.asm or
|
||||
* match.S. The code will be functionally equivalent.
|
||||
*/
|
||||
local uInt longest_match(s, cur_match)
|
||||
static uInt longest_match(s, cur_match)
|
||||
deflate_state *s;
|
||||
IPos cur_match; /* current match */
|
||||
{
|
||||
@ -1422,7 +1422,7 @@ local uInt longest_match(s, cur_match)
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Optimized version for FASTEST only
|
||||
*/
|
||||
local uInt longest_match(s, cur_match)
|
||||
static uInt longest_match(s, cur_match)
|
||||
deflate_state *s;
|
||||
IPos cur_match; /* current match */
|
||||
{
|
||||
@ -1485,7 +1485,7 @@ local uInt longest_match(s, cur_match)
|
||||
/* ===========================================================================
|
||||
* Check that the match at match_start is indeed a match.
|
||||
*/
|
||||
local void check_match(s, start, match, length)
|
||||
static void check_match(s, start, match, length)
|
||||
deflate_state *s;
|
||||
IPos start, match;
|
||||
int length;
|
||||
@ -1519,7 +1519,7 @@ local void check_match(s, start, match, length)
|
||||
* performed for at least two bytes (required for the zip translate_eol
|
||||
* option -- not supported here).
|
||||
*/
|
||||
local void fill_window(s)
|
||||
static void fill_window(s)
|
||||
deflate_state *s;
|
||||
{
|
||||
unsigned n;
|
||||
@ -1682,7 +1682,7 @@ local void fill_window(s)
|
||||
* copied. It is most efficient with large input and output buffers, which
|
||||
* maximizes the opportunites to have a single copy from next_in to next_out.
|
||||
*/
|
||||
local block_state deflate_stored(s, flush)
|
||||
static block_state deflate_stored(s, flush)
|
||||
deflate_state *s;
|
||||
int flush;
|
||||
{
|
||||
@ -1869,7 +1869,7 @@ local block_state deflate_stored(s, flush)
|
||||
* new strings in the dictionary only for unmatched strings or for short
|
||||
* matches. It is used only for the fast compression options.
|
||||
*/
|
||||
local block_state deflate_fast(s, flush)
|
||||
static block_state deflate_fast(s, flush)
|
||||
deflate_state *s;
|
||||
int flush;
|
||||
{
|
||||
@ -1971,7 +1971,7 @@ local block_state deflate_fast(s, flush)
|
||||
* evaluation for matches: a match is finally adopted only if there is
|
||||
* no better match at the next window position.
|
||||
*/
|
||||
local block_state deflate_slow(s, flush)
|
||||
static block_state deflate_slow(s, flush)
|
||||
deflate_state *s;
|
||||
int flush;
|
||||
{
|
||||
@ -2102,7 +2102,7 @@ local block_state deflate_slow(s, flush)
|
||||
* one. Do not maintain a hash table. (It will be regenerated if this run of
|
||||
* deflate switches away from Z_RLE.)
|
||||
*/
|
||||
local block_state deflate_rle(s, flush)
|
||||
static block_state deflate_rle(s, flush)
|
||||
deflate_state *s;
|
||||
int flush;
|
||||
{
|
||||
@ -2175,7 +2175,7 @@ local block_state deflate_rle(s, flush)
|
||||
* For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table.
|
||||
* (It will be regenerated if this run of deflate switches away from Huffman.)
|
||||
*/
|
||||
local block_state deflate_huff(s, flush)
|
||||
static block_state deflate_huff(s, flush)
|
||||
deflate_state *s;
|
||||
int flush;
|
||||
{
|
||||
|
@ -110,12 +110,12 @@
|
||||
# define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
#ifndef local
|
||||
# define local static
|
||||
#ifndef static
|
||||
# define static static
|
||||
#endif
|
||||
/* since "static" is used to mean two completely different things in C, we
|
||||
define "local" for the non-static meaning of "static", for readability
|
||||
(compile with -Dlocal if your debugger can't find static symbols) */
|
||||
define "static" for the non-static meaning of "static", for readability
|
||||
(compile with -Dstatic if your debugger can't find static symbols) */
|
||||
|
||||
/* gz* functions always use library allocation functions */
|
||||
#ifndef STDC
|
||||
|
@ -16,12 +16,12 @@
|
||||
#endif
|
||||
|
||||
/* Local functions */
|
||||
local void gz_reset OF((gz_statep));
|
||||
local gzFile gz_open OF((const void *, int, const char *));
|
||||
static void gz_reset OF((gz_statep));
|
||||
static gzFile gz_open OF((const void *, int, const char *));
|
||||
|
||||
#if defined UNDER_CE
|
||||
|
||||
/* Map the Windows error number in ERROR to a locale-dependent error message
|
||||
/* Map the Windows error number in ERROR to a statice-dependent error message
|
||||
string and return a pointer to it. Typically, the values for ERROR come
|
||||
from GetLastError.
|
||||
|
||||
@ -72,7 +72,7 @@ char ZLIB_INTERNAL *gz_strwinerror (error)
|
||||
#endif /* UNDER_CE */
|
||||
|
||||
/* Reset gzip file state */
|
||||
local void gz_reset(state)
|
||||
static void gz_reset(state)
|
||||
gz_statep state;
|
||||
{
|
||||
state->x.have = 0; /* no output data available */
|
||||
@ -90,7 +90,7 @@ local void gz_reset(state)
|
||||
}
|
||||
|
||||
/* Open a gzip file either by name or file descriptor. */
|
||||
local gzFile gz_open(path, fd, mode)
|
||||
static gzFile gz_open(path, fd, mode)
|
||||
const void *path;
|
||||
int fd;
|
||||
const char *mode;
|
||||
|
@ -6,19 +6,19 @@
|
||||
#include "gzguts.h"
|
||||
|
||||
/* Local functions */
|
||||
local int gz_load OF((gz_statep, unsigned char *, unsigned, unsigned *));
|
||||
local int gz_avail OF((gz_statep));
|
||||
local int gz_look OF((gz_statep));
|
||||
local int gz_decomp OF((gz_statep));
|
||||
local int gz_fetch OF((gz_statep));
|
||||
local int gz_skip OF((gz_statep, z_off64_t));
|
||||
local z_size_t gz_read OF((gz_statep, voidp, z_size_t));
|
||||
static int gz_load OF((gz_statep, unsigned char *, unsigned, unsigned *));
|
||||
static int gz_avail OF((gz_statep));
|
||||
static int gz_look OF((gz_statep));
|
||||
static int gz_decomp OF((gz_statep));
|
||||
static int gz_fetch OF((gz_statep));
|
||||
static int gz_skip OF((gz_statep, z_off64_t));
|
||||
static z_size_t gz_read OF((gz_statep, voidp, z_size_t));
|
||||
|
||||
/* Use read() to load a buffer -- return -1 on error, otherwise 0. Read from
|
||||
state->fd, and update state->eof, state->err, and state->msg as appropriate.
|
||||
This function needs to loop on read(), since read() is not guaranteed to
|
||||
read the number of bytes requested, depending on the type of descriptor. */
|
||||
local int gz_load(state, buf, len, have)
|
||||
static int gz_load(state, buf, len, have)
|
||||
gz_statep state;
|
||||
unsigned char *buf;
|
||||
unsigned len;
|
||||
@ -53,7 +53,7 @@ local int gz_load(state, buf, len, have)
|
||||
If strm->avail_in != 0, then the current data is moved to the beginning of
|
||||
the input buffer, and then the remainder of the buffer is loaded with the
|
||||
available data from the input file. */
|
||||
local int gz_avail(state)
|
||||
static int gz_avail(state)
|
||||
gz_statep state;
|
||||
{
|
||||
unsigned got;
|
||||
@ -88,7 +88,7 @@ local int gz_avail(state)
|
||||
case, all further file reads will be directly to either the output buffer or
|
||||
a user buffer. If decompressing, the inflate state will be initialized.
|
||||
gz_look() will return 0 on success or -1 on failure. */
|
||||
local int gz_look(state)
|
||||
static int gz_look(state)
|
||||
gz_statep state;
|
||||
{
|
||||
z_streamp strm = &(state->strm);
|
||||
@ -172,7 +172,7 @@ local int gz_look(state)
|
||||
data. If the gzip stream completes, state->how is reset to LOOK to look for
|
||||
the next gzip stream or raw data, once state->x.have is depleted. Returns 0
|
||||
on success, -1 on failure. */
|
||||
local int gz_decomp(state)
|
||||
static int gz_decomp(state)
|
||||
gz_statep state;
|
||||
{
|
||||
int ret = Z_OK;
|
||||
@ -226,7 +226,7 @@ local int gz_decomp(state)
|
||||
looked for to determine whether to copy or decompress. Returns -1 on error,
|
||||
otherwise 0. gz_fetch() will leave state->how as COPY or GZIP unless the
|
||||
end of the input file has been reached and all data has been processed. */
|
||||
local int gz_fetch(state)
|
||||
static int gz_fetch(state)
|
||||
gz_statep state;
|
||||
{
|
||||
z_streamp strm = &(state->strm);
|
||||
@ -256,7 +256,7 @@ local int gz_fetch(state)
|
||||
}
|
||||
|
||||
/* Skip len uncompressed bytes of output. Return -1 on error, 0 on success. */
|
||||
local int gz_skip(state, len)
|
||||
static int gz_skip(state, len)
|
||||
gz_statep state;
|
||||
z_off64_t len;
|
||||
{
|
||||
@ -291,7 +291,7 @@ local int gz_skip(state, len)
|
||||
input. Return the number of bytes read. If zero is returned, either the
|
||||
end of file was reached, or there was an error. state->err must be
|
||||
consulted in that case to determine which. */
|
||||
local z_size_t gz_read(state, buf, len)
|
||||
static z_size_t gz_read(state, buf, len)
|
||||
gz_statep state;
|
||||
voidp buf;
|
||||
z_size_t len;
|
||||
|
@ -6,15 +6,15 @@
|
||||
#include "gzguts.h"
|
||||
|
||||
/* Local functions */
|
||||
local int gz_init OF((gz_statep));
|
||||
local int gz_comp OF((gz_statep, int));
|
||||
local int gz_zero OF((gz_statep, z_off64_t));
|
||||
local z_size_t gz_write OF((gz_statep, voidpc, z_size_t));
|
||||
static int gz_init OF((gz_statep));
|
||||
static int gz_comp OF((gz_statep, int));
|
||||
static int gz_zero OF((gz_statep, z_off64_t));
|
||||
static z_size_t gz_write OF((gz_statep, voidpc, z_size_t));
|
||||
|
||||
/* Initialize state for writing a gzip file. Mark initialization by setting
|
||||
state->size to non-zero. Return -1 on a memory allocation failure, or 0 on
|
||||
success. */
|
||||
local int gz_init(state)
|
||||
static int gz_init(state)
|
||||
gz_statep state;
|
||||
{
|
||||
int ret;
|
||||
@ -70,7 +70,7 @@ local int gz_init(state)
|
||||
deflate() flush value. If flush is Z_FINISH, then the deflate() state is
|
||||
reset to start a new gzip stream. If gz->direct is true, then simply write
|
||||
to the output file without compressing, and ignore flush. */
|
||||
local int gz_comp(state, flush)
|
||||
static int gz_comp(state, flush)
|
||||
gz_statep state;
|
||||
int flush;
|
||||
{
|
||||
@ -151,7 +151,7 @@ local int gz_comp(state, flush)
|
||||
|
||||
/* Compress len zeros to output. Return -1 on a write error or memory
|
||||
allocation failure by gz_comp(), or 0 on success. */
|
||||
local int gz_zero(state, len)
|
||||
static int gz_zero(state, len)
|
||||
gz_statep state;
|
||||
z_off64_t len;
|
||||
{
|
||||
@ -184,7 +184,7 @@ local int gz_zero(state, len)
|
||||
|
||||
/* Write len bytes from buf to file. Return the number of bytes written. If
|
||||
the returned value is less than len, then there was an error. */
|
||||
local z_size_t gz_write(state, buf, len)
|
||||
static z_size_t gz_write(state, buf, len)
|
||||
gz_statep state;
|
||||
voidpc buf;
|
||||
z_size_t len;
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "inffast.h"
|
||||
|
||||
/* function prototypes */
|
||||
local void fixedtables OF((struct inflate_state FAR *state));
|
||||
static void fixedtables OF((struct inflate_state FAR *state));
|
||||
|
||||
/*
|
||||
strm provides memory allocation functions in zalloc and zfree, or
|
||||
@ -79,7 +79,7 @@ int stream_size;
|
||||
used for threaded applications, since the rewriting of the tables and virgin
|
||||
may not be thread-safe.
|
||||
*/
|
||||
local void fixedtables(state)
|
||||
static void fixedtables(state)
|
||||
struct inflate_state FAR *state;
|
||||
{
|
||||
#ifdef BUILDFIXED
|
||||
|
@ -52,9 +52,9 @@ z_streamp strm;
|
||||
unsigned start; /* inflate()'s starting value for strm->avail_out */
|
||||
{
|
||||
struct inflate_state FAR *state;
|
||||
z_const unsigned char FAR *in; /* local strm->next_in */
|
||||
z_const unsigned char FAR *in; /* static strm->next_in */
|
||||
z_const unsigned char FAR *last; /* have enough input while in < last */
|
||||
unsigned char FAR *out; /* local strm->next_out */
|
||||
unsigned char FAR *out; /* static strm->next_out */
|
||||
unsigned char FAR *beg; /* inflate()'s initial strm->next_out */
|
||||
unsigned char FAR *end; /* while out < end, enough space available */
|
||||
#ifdef INFLATE_STRICT
|
||||
@ -64,10 +64,10 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
|
||||
unsigned whave; /* valid bytes in the window */
|
||||
unsigned wnext; /* window write index */
|
||||
unsigned char FAR *window; /* allocated sliding window, if wsize != 0 */
|
||||
unsigned long hold; /* local strm->hold */
|
||||
unsigned bits; /* local strm->bits */
|
||||
code const FAR *lcode; /* local strm->lencode */
|
||||
code const FAR *dcode; /* local strm->distcode */
|
||||
unsigned long hold; /* static strm->hold */
|
||||
unsigned bits; /* static strm->bits */
|
||||
code const FAR *lcode; /* static strm->lencode */
|
||||
code const FAR *dcode; /* static strm->distcode */
|
||||
unsigned lmask; /* mask for first level of length codes */
|
||||
unsigned dmask; /* mask for first level of distance codes */
|
||||
code const *here; /* retrieved table entry */
|
||||
@ -77,7 +77,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
|
||||
unsigned dist; /* match distance */
|
||||
unsigned char FAR *from; /* where to copy match from */
|
||||
|
||||
/* copy state to local variables */
|
||||
/* copy state to static variables */
|
||||
state = (struct inflate_state FAR *)strm->state;
|
||||
in = strm->next_in;
|
||||
last = in + (strm->avail_in - 5);
|
||||
|
@ -92,17 +92,17 @@
|
||||
#endif
|
||||
|
||||
/* function prototypes */
|
||||
local int inflateStateCheck OF((z_streamp strm));
|
||||
local void fixedtables OF((struct inflate_state FAR *state));
|
||||
local int updatewindow OF((z_streamp strm, const unsigned char FAR *end,
|
||||
static int inflateStateCheck OF((z_streamp strm));
|
||||
static void fixedtables OF((struct inflate_state FAR *state));
|
||||
static int updatewindow OF((z_streamp strm, const unsigned char FAR *end,
|
||||
unsigned copy));
|
||||
#ifdef BUILDFIXED
|
||||
void makefixed OF((void));
|
||||
#endif
|
||||
local unsigned syncsearch OF((unsigned FAR *have, const unsigned char FAR *buf,
|
||||
static unsigned syncsearch OF((unsigned FAR *have, const unsigned char FAR *buf,
|
||||
unsigned len));
|
||||
|
||||
local int inflateStateCheck(strm)
|
||||
static int inflateStateCheck(strm)
|
||||
z_streamp strm;
|
||||
{
|
||||
struct inflate_state FAR *state;
|
||||
@ -276,7 +276,7 @@ int value;
|
||||
used for threaded applications, since the rewriting of the tables and virgin
|
||||
may not be thread-safe.
|
||||
*/
|
||||
local void fixedtables(state)
|
||||
static void fixedtables(state)
|
||||
struct inflate_state FAR *state;
|
||||
{
|
||||
#ifdef BUILDFIXED
|
||||
@ -394,7 +394,7 @@ void makefixed()
|
||||
output will fall in the output data, making match copies simpler and faster.
|
||||
The advantage may be dependent on the size of the processor's data caches.
|
||||
*/
|
||||
local int updatewindow(strm, end, copy)
|
||||
static int updatewindow(strm, end, copy)
|
||||
z_streamp strm;
|
||||
const Bytef *end;
|
||||
unsigned copy;
|
||||
@ -1398,7 +1398,7 @@ gz_headerp head;
|
||||
called again with more data and the *have state. *have is initialized to
|
||||
zero for the first call.
|
||||
*/
|
||||
local unsigned syncsearch(have, buf, len)
|
||||
static unsigned syncsearch(have, buf, len)
|
||||
unsigned FAR *have;
|
||||
const unsigned char FAR *buf;
|
||||
unsigned len;
|
||||
|
@ -59,16 +59,16 @@
|
||||
#define REPZ_11_138 18
|
||||
/* repeat a zero length 11-138 times (7 bits of repeat count) */
|
||||
|
||||
local const int extra_lbits[LENGTH_CODES] /* extra bits for each length code */
|
||||
static const int extra_lbits[LENGTH_CODES] /* extra bits for each length code */
|
||||
= {0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0};
|
||||
|
||||
local const int extra_dbits[D_CODES] /* extra bits for each distance code */
|
||||
static const int extra_dbits[D_CODES] /* extra bits for each distance code */
|
||||
= {0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13};
|
||||
|
||||
local const int extra_blbits[BL_CODES]/* extra bits for each bit length code */
|
||||
static const int extra_blbits[BL_CODES]/* extra bits for each bit length code */
|
||||
= {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7};
|
||||
|
||||
local const uch bl_order[BL_CODES]
|
||||
static const uch bl_order[BL_CODES]
|
||||
= {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15};
|
||||
/* The lengths of the bit length codes are sent in order of decreasing
|
||||
* probability, to avoid transmitting the lengths for unused bit length codes.
|
||||
@ -83,14 +83,14 @@ local const uch bl_order[BL_CODES]
|
||||
#if defined(GEN_TREES_H) || !defined(STDC)
|
||||
/* non ANSI compilers may not accept trees.h */
|
||||
|
||||
local ct_data static_ltree[L_CODES+2];
|
||||
static ct_data static_ltree[L_CODES+2];
|
||||
/* The static literal tree. Since the bit lengths are imposed, there is no
|
||||
* need for the L_CODES extra codes used during heap construction. However
|
||||
* The codes 286 and 287 are needed to build a canonical tree (see _tr_init
|
||||
* below).
|
||||
*/
|
||||
|
||||
local ct_data static_dtree[D_CODES];
|
||||
static ct_data static_dtree[D_CODES];
|
||||
/* The static distance tree. (Actually a trivial tree since all codes use
|
||||
* 5 bits.)
|
||||
*/
|
||||
@ -104,10 +104,10 @@ uch _dist_code[DIST_CODE_LEN];
|
||||
uch _length_code[MAX_MATCH-MIN_MATCH+1];
|
||||
/* length code for each normalized match length (0 == MIN_MATCH) */
|
||||
|
||||
local int base_length[LENGTH_CODES];
|
||||
static int base_length[LENGTH_CODES];
|
||||
/* First normalized length for each code (0 = MIN_MATCH) */
|
||||
|
||||
local int base_dist[D_CODES];
|
||||
static int base_dist[D_CODES];
|
||||
/* First normalized distance for each code (0 = distance of 1) */
|
||||
|
||||
#else
|
||||
@ -122,39 +122,39 @@ struct static_tree_desc_s {
|
||||
int max_length; /* max bit length for the codes */
|
||||
};
|
||||
|
||||
local const static_tree_desc static_l_desc =
|
||||
static const static_tree_desc static_l_desc =
|
||||
{static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS};
|
||||
|
||||
local const static_tree_desc static_d_desc =
|
||||
static const static_tree_desc static_d_desc =
|
||||
{static_dtree, extra_dbits, 0, D_CODES, MAX_BITS};
|
||||
|
||||
local const static_tree_desc static_bl_desc =
|
||||
static const static_tree_desc static_bl_desc =
|
||||
{(const ct_data *)0, extra_blbits, 0, BL_CODES, MAX_BL_BITS};
|
||||
|
||||
/* ===========================================================================
|
||||
* Local (static) routines in this file.
|
||||
*/
|
||||
|
||||
local void tr_static_init OF((void));
|
||||
local void init_block OF((deflate_state *s));
|
||||
local void pqdownheap OF((deflate_state *s, ct_data *tree, int k));
|
||||
local void gen_bitlen OF((deflate_state *s, tree_desc *desc));
|
||||
local void gen_codes OF((ct_data *tree, int max_code, ushf *bl_count));
|
||||
local void build_tree OF((deflate_state *s, tree_desc *desc));
|
||||
local void scan_tree OF((deflate_state *s, ct_data *tree, int max_code));
|
||||
local void send_tree OF((deflate_state *s, ct_data *tree, int max_code));
|
||||
local int build_bl_tree OF((deflate_state *s));
|
||||
local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes,
|
||||
static void tr_static_init OF((void));
|
||||
static void init_block OF((deflate_state *s));
|
||||
static void pqdownheap OF((deflate_state *s, ct_data *tree, int k));
|
||||
static void gen_bitlen OF((deflate_state *s, tree_desc *desc));
|
||||
static void gen_codes OF((ct_data *tree, int max_code, ushf *bl_count));
|
||||
static void build_tree OF((deflate_state *s, tree_desc *desc));
|
||||
static void scan_tree OF((deflate_state *s, ct_data *tree, int max_code));
|
||||
static void send_tree OF((deflate_state *s, ct_data *tree, int max_code));
|
||||
static int build_bl_tree OF((deflate_state *s));
|
||||
static void send_all_trees OF((deflate_state *s, int lcodes, int dcodes,
|
||||
int blcodes));
|
||||
local void compress_block OF((deflate_state *s, const ct_data *ltree,
|
||||
static void compress_block OF((deflate_state *s, const ct_data *ltree,
|
||||
const ct_data *dtree));
|
||||
local int detect_data_type OF((deflate_state *s));
|
||||
local unsigned bi_reverse OF((unsigned code, int len));
|
||||
local void bi_windup OF((deflate_state *s));
|
||||
local void bi_flush OF((deflate_state *s));
|
||||
static int detect_data_type OF((deflate_state *s));
|
||||
static unsigned bi_reverse OF((unsigned code, int len));
|
||||
static void bi_windup OF((deflate_state *s));
|
||||
static void bi_flush OF((deflate_state *s));
|
||||
|
||||
#ifdef GEN_TREES_H
|
||||
local void gen_trees_header OF((void));
|
||||
static void gen_trees_header OF((void));
|
||||
#endif
|
||||
|
||||
#ifndef ZLIB_DEBUG
|
||||
@ -181,9 +181,9 @@ local void gen_trees_header OF((void));
|
||||
* IN assertion: length <= 16 and value fits in length bits.
|
||||
*/
|
||||
#ifdef ZLIB_DEBUG
|
||||
local void send_bits OF((deflate_state *s, int value, int length));
|
||||
static void send_bits OF((deflate_state *s, int value, int length));
|
||||
|
||||
local void send_bits(s, value, length)
|
||||
static void send_bits(s, value, length)
|
||||
deflate_state *s;
|
||||
int value; /* value to send */
|
||||
int length; /* number of bits */
|
||||
@ -229,7 +229,7 @@ local void send_bits(s, value, length)
|
||||
/* ===========================================================================
|
||||
* Initialize the various 'constant' tables.
|
||||
*/
|
||||
local void tr_static_init()
|
||||
static void tr_static_init()
|
||||
{
|
||||
#if defined(GEN_TREES_H) || !defined(STDC)
|
||||
static int static_init_done = 0;
|
||||
@ -332,13 +332,13 @@ void gen_trees_header()
|
||||
fprintf(header,
|
||||
"/* header created automatically with -DGEN_TREES_H */\n\n");
|
||||
|
||||
fprintf(header, "local const ct_data static_ltree[L_CODES+2] = {\n");
|
||||
fprintf(header, "static const ct_data static_ltree[L_CODES+2] = {\n");
|
||||
for (i = 0; i < L_CODES+2; i++) {
|
||||
fprintf(header, "{{%3u},{%3u}}%s", static_ltree[i].Code,
|
||||
static_ltree[i].Len, SEPARATOR(i, L_CODES+1, 5));
|
||||
}
|
||||
|
||||
fprintf(header, "local const ct_data static_dtree[D_CODES] = {\n");
|
||||
fprintf(header, "static const ct_data static_dtree[D_CODES] = {\n");
|
||||
for (i = 0; i < D_CODES; i++) {
|
||||
fprintf(header, "{{%2u},{%2u}}%s", static_dtree[i].Code,
|
||||
static_dtree[i].Len, SEPARATOR(i, D_CODES-1, 5));
|
||||
@ -357,13 +357,13 @@ void gen_trees_header()
|
||||
SEPARATOR(i, MAX_MATCH-MIN_MATCH, 20));
|
||||
}
|
||||
|
||||
fprintf(header, "local const int base_length[LENGTH_CODES] = {\n");
|
||||
fprintf(header, "static const int base_length[LENGTH_CODES] = {\n");
|
||||
for (i = 0; i < LENGTH_CODES; i++) {
|
||||
fprintf(header, "%1u%s", base_length[i],
|
||||
SEPARATOR(i, LENGTH_CODES-1, 20));
|
||||
}
|
||||
|
||||
fprintf(header, "local const int base_dist[D_CODES] = {\n");
|
||||
fprintf(header, "static const int base_dist[D_CODES] = {\n");
|
||||
for (i = 0; i < D_CODES; i++) {
|
||||
fprintf(header, "%5u%s", base_dist[i],
|
||||
SEPARATOR(i, D_CODES-1, 10));
|
||||
@ -404,7 +404,7 @@ void ZLIB_INTERNAL _tr_init(s)
|
||||
/* ===========================================================================
|
||||
* Initialize a new block.
|
||||
*/
|
||||
local void init_block(s)
|
||||
static void init_block(s)
|
||||
deflate_state *s;
|
||||
{
|
||||
int n; /* iterates over tree elements */
|
||||
@ -448,7 +448,7 @@ local void init_block(s)
|
||||
* when the heap property is re-established (each father smaller than its
|
||||
* two sons).
|
||||
*/
|
||||
local void pqdownheap(s, tree, k)
|
||||
static void pqdownheap(s, tree, k)
|
||||
deflate_state *s;
|
||||
ct_data *tree; /* the tree to restore */
|
||||
int k; /* node to move down */
|
||||
@ -483,7 +483,7 @@ local void pqdownheap(s, tree, k)
|
||||
* The length opt_len is updated; static_len is also updated if stree is
|
||||
* not null.
|
||||
*/
|
||||
local void gen_bitlen(s, desc)
|
||||
static void gen_bitlen(s, desc)
|
||||
deflate_state *s;
|
||||
tree_desc *desc; /* the tree descriptor */
|
||||
{
|
||||
@ -569,7 +569,7 @@ local void gen_bitlen(s, desc)
|
||||
* OUT assertion: the field code is set for all tree elements of non
|
||||
* zero code length.
|
||||
*/
|
||||
local void gen_codes (tree, max_code, bl_count)
|
||||
static void gen_codes (tree, max_code, bl_count)
|
||||
ct_data *tree; /* the tree to decorate */
|
||||
int max_code; /* largest code with non zero frequency */
|
||||
ushf *bl_count; /* number of codes at each bit length */
|
||||
@ -612,7 +612,7 @@ local void gen_codes (tree, max_code, bl_count)
|
||||
* and corresponding code. The length opt_len is updated; static_len is
|
||||
* also updated if stree is not null. The field max_code is set.
|
||||
*/
|
||||
local void build_tree(s, desc)
|
||||
static void build_tree(s, desc)
|
||||
deflate_state *s;
|
||||
tree_desc *desc; /* the tree descriptor */
|
||||
{
|
||||
@ -700,7 +700,7 @@ local void build_tree(s, desc)
|
||||
* Scan a literal or distance tree to determine the frequencies of the codes
|
||||
* in the bit length tree.
|
||||
*/
|
||||
local void scan_tree (s, tree, max_code)
|
||||
static void scan_tree (s, tree, max_code)
|
||||
deflate_state *s;
|
||||
ct_data *tree; /* the tree to be scanned */
|
||||
int max_code; /* and its largest code of non zero frequency */
|
||||
@ -745,7 +745,7 @@ local void scan_tree (s, tree, max_code)
|
||||
* Send a literal or distance tree in compressed form, using the codes in
|
||||
* bl_tree.
|
||||
*/
|
||||
local void send_tree (s, tree, max_code)
|
||||
static void send_tree (s, tree, max_code)
|
||||
deflate_state *s;
|
||||
ct_data *tree; /* the tree to be scanned */
|
||||
int max_code; /* and its largest code of non zero frequency */
|
||||
@ -796,7 +796,7 @@ local void send_tree (s, tree, max_code)
|
||||
* Construct the Huffman tree for the bit lengths and return the index in
|
||||
* bl_order of the last bit length code to send.
|
||||
*/
|
||||
local int build_bl_tree(s)
|
||||
static int build_bl_tree(s)
|
||||
deflate_state *s;
|
||||
{
|
||||
int max_blindex; /* index of last bit length code of non zero freq */
|
||||
@ -831,7 +831,7 @@ local int build_bl_tree(s)
|
||||
* lengths of the bit length codes, the literal tree and the distance tree.
|
||||
* IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.
|
||||
*/
|
||||
local void send_all_trees(s, lcodes, dcodes, blcodes)
|
||||
static void send_all_trees(s, lcodes, dcodes, blcodes)
|
||||
deflate_state *s;
|
||||
int lcodes, dcodes, blcodes; /* number of codes for each tree */
|
||||
{
|
||||
@ -1040,7 +1040,7 @@ int ZLIB_INTERNAL _tr_tally (s, dist, lc)
|
||||
/* ===========================================================================
|
||||
* Send the block data compressed using the given Huffman trees
|
||||
*/
|
||||
local void compress_block(s, ltree, dtree)
|
||||
static void compress_block(s, ltree, dtree)
|
||||
deflate_state *s;
|
||||
const ct_data *ltree; /* literal tree */
|
||||
const ct_data *dtree; /* distance tree */
|
||||
@ -1100,7 +1100,7 @@ local void compress_block(s, ltree, dtree)
|
||||
* (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).
|
||||
* IN assertion: the fields Freq of dyn_ltree are set.
|
||||
*/
|
||||
local int detect_data_type(s)
|
||||
static int detect_data_type(s)
|
||||
deflate_state *s;
|
||||
{
|
||||
/* block_mask is the bit mask of block-listed bytes
|
||||
@ -1134,7 +1134,7 @@ local int detect_data_type(s)
|
||||
* method would use a table)
|
||||
* IN assertion: 1 <= len <= 15
|
||||
*/
|
||||
local unsigned bi_reverse(code, len)
|
||||
static unsigned bi_reverse(code, len)
|
||||
unsigned code; /* the value to invert */
|
||||
int len; /* its bit length */
|
||||
{
|
||||
@ -1149,7 +1149,7 @@ local unsigned bi_reverse(code, len)
|
||||
/* ===========================================================================
|
||||
* Flush the bit buffer, keeping at most 7 bits in it.
|
||||
*/
|
||||
local void bi_flush(s)
|
||||
static void bi_flush(s)
|
||||
deflate_state *s;
|
||||
{
|
||||
if (s->bi_valid == 16) {
|
||||
@ -1166,7 +1166,7 @@ local void bi_flush(s)
|
||||
/* ===========================================================================
|
||||
* Flush the bit buffer and align the output on a byte boundary
|
||||
*/
|
||||
local void bi_windup(s)
|
||||
static void bi_windup(s)
|
||||
deflate_state *s;
|
||||
{
|
||||
if (s->bi_valid > 8) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* header created automatically with -DGEN_TREES_H */
|
||||
|
||||
local const ct_data static_ltree[L_CODES+2] = {
|
||||
static const ct_data static_ltree[L_CODES+2] = {
|
||||
{{ 12},{ 8}}, {{140},{ 8}}, {{ 76},{ 8}}, {{204},{ 8}}, {{ 44},{ 8}},
|
||||
{{172},{ 8}}, {{108},{ 8}}, {{236},{ 8}}, {{ 28},{ 8}}, {{156},{ 8}},
|
||||
{{ 92},{ 8}}, {{220},{ 8}}, {{ 60},{ 8}}, {{188},{ 8}}, {{124},{ 8}},
|
||||
@ -61,7 +61,7 @@ local const ct_data static_ltree[L_CODES+2] = {
|
||||
{{163},{ 8}}, {{ 99},{ 8}}, {{227},{ 8}}
|
||||
};
|
||||
|
||||
local const ct_data static_dtree[D_CODES] = {
|
||||
static const ct_data static_dtree[D_CODES] = {
|
||||
{{ 0},{ 5}}, {{16},{ 5}}, {{ 8},{ 5}}, {{24},{ 5}}, {{ 4},{ 5}},
|
||||
{{20},{ 5}}, {{12},{ 5}}, {{28},{ 5}}, {{ 2},{ 5}}, {{18},{ 5}},
|
||||
{{10},{ 5}}, {{26},{ 5}}, {{ 6},{ 5}}, {{22},{ 5}}, {{14},{ 5}},
|
||||
@ -115,12 +115,12 @@ const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= {
|
||||
27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28
|
||||
};
|
||||
|
||||
local const int base_length[LENGTH_CODES] = {
|
||||
static const int base_length[LENGTH_CODES] = {
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56,
|
||||
64, 80, 96, 112, 128, 160, 192, 224, 0
|
||||
};
|
||||
|
||||
local const int base_dist[D_CODES] = {
|
||||
static const int base_dist[D_CODES] = {
|
||||
0, 1, 2, 3, 4, 6, 8, 12, 16, 24,
|
||||
32, 48, 64, 96, 128, 192, 256, 384, 512, 768,
|
||||
1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576
|
||||
|
@ -199,14 +199,14 @@ void ZLIB_INTERNAL zmemzero(dest, len)
|
||||
#define MAX_PTR 10
|
||||
/* 10*64K = 640K */
|
||||
|
||||
local int next_ptr = 0;
|
||||
static int next_ptr = 0;
|
||||
|
||||
typedef struct ptr_table_s {
|
||||
voidpf org_ptr;
|
||||
voidpf new_ptr;
|
||||
} ptr_table;
|
||||
|
||||
local ptr_table table[MAX_PTR];
|
||||
static ptr_table table[MAX_PTR];
|
||||
/* This table is used to remember the original form of pointers
|
||||
* to large buffers (64K). Such pointers are normalized with a zero offset.
|
||||
* Since MSDOS is not a preemptive multitasking OS, this table is not
|
||||
|
@ -29,13 +29,6 @@
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifndef local
|
||||
# define local static
|
||||
#endif
|
||||
/* since "static" is used to mean two completely different things in C, we
|
||||
define "local" for the non-static meaning of "static", for readability
|
||||
(compile with -Dlocal if your debugger can't find static symbols) */
|
||||
|
||||
typedef unsigned char uch;
|
||||
typedef uch FAR uchf;
|
||||
typedef unsigned short ush;
|
||||
|
Loading…
Reference in New Issue
Block a user