freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype][master] [gzip] Update sources to zlib 1.13.


From: Werner Lemberg (@wl)
Subject: [Git][freetype/freetype][master] [gzip] Update sources to zlib 1.13.
Date: Mon, 28 Aug 2023 17:54:22 +0000

Werner Lemberg pushed to branch master at FreeType / FreeType

Commits:

  • 2d9fce53
    by Werner Lemberg at 2023-08-27T09:47:24+02:00
    [gzip] Update sources to zlib 1.13.
    

15 changed files:

Changes:

  • src/gzip/README.freetype
    1 1
     Name: zlib
    
    2 2
     Short Name: zlib
    
    3 3
     URL: http://zlib.net/
    
    4
    -Version: 1.2.13
    
    4
    +Version: 1.3
    
    5 5
     License: see `zlib.h`
    
    6 6
     
    
    7 7
     Description:
    
    ... ... @@ -19,5 +19,4 @@ The files in this directory have been prepared as follows.
    19 19
      - Take the unmodified source code files from the zlib distribution that are
    
    20 20
        included by `ftgzip.c`.
    
    21 21
      - Copy `zconf.h` to `ftzconf.h` (which stays unmodified otherwise).
    
    22
    - - Run zlib's `zlib2ansi` script on all `.c` files.
    
    23 22
      - Apply the diff file(s) in the `patches` folder.

  • src/gzip/adler32.c
    ... ... @@ -7,10 +7,6 @@
    7 7
     
    
    8 8
     #include "zutil.h"
    
    9 9
     
    
    10
    -#ifndef Z_FREETYPE
    
    11
    -local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2));
    
    12
    -#endif
    
    13
    -
    
    14 10
     #define BASE 65521U     /* largest prime smaller than 65536 */
    
    15 11
     #define NMAX 5552
    
    16 12
     /* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
    
    ... ... @@ -62,11 +58,7 @@ local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2));
    62 58
     #endif
    
    63 59
     
    
    64 60
     /* ========================================================================= */
    
    65
    -uLong ZEXPORT adler32_z(
    
    66
    -    uLong adler,
    
    67
    -    const Bytef *buf,
    
    68
    -    z_size_t len)
    
    69
    -{
    
    61
    +uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf, z_size_t len) {
    
    70 62
         unsigned long sum2;
    
    71 63
         unsigned n;
    
    72 64
     
    
    ... ... @@ -133,22 +125,14 @@ uLong ZEXPORT adler32_z(
    133 125
     }
    
    134 126
     
    
    135 127
     /* ========================================================================= */
    
    136
    -uLong ZEXPORT adler32(
    
    137
    -    uLong adler,
    
    138
    -    const Bytef *buf,
    
    139
    -    uInt len)
    
    140
    -{
    
    128
    +uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len) {
    
    141 129
         return adler32_z(adler, buf, len);
    
    142 130
     }
    
    143 131
     
    
    144 132
     #ifndef Z_FREETYPE
    
    145 133
     
    
    146 134
     /* ========================================================================= */
    
    147
    -local uLong adler32_combine_(
    
    148
    -    uLong adler1,
    
    149
    -    uLong adler2,
    
    150
    -    z_off64_t len2)
    
    151
    -{
    
    135
    +local uLong adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2) {
    
    152 136
         unsigned long sum1;
    
    153 137
         unsigned long sum2;
    
    154 138
         unsigned rem;
    
    ... ... @@ -173,19 +157,11 @@ local uLong adler32_combine_(
    173 157
     }
    
    174 158
     
    
    175 159
     /* ========================================================================= */
    
    176
    -uLong ZEXPORT adler32_combine(
    
    177
    -    uLong adler1,
    
    178
    -    uLong adler2,
    
    179
    -    z_off_t len2)
    
    180
    -{
    
    160
    +uLong ZEXPORT adler32_combine(uLong adler1, uLong adler2, z_off_t len2) {
    
    181 161
         return adler32_combine_(adler1, adler2, len2);
    
    182 162
     }
    
    183 163
     
    
    184
    -uLong ZEXPORT adler32_combine64(
    
    185
    -    uLong adler1,
    
    186
    -    uLong adler2,
    
    187
    -    z_off64_t len2)
    
    188
    -{
    
    164
    +uLong ZEXPORT adler32_combine64(uLong adler1, uLong adler2, z_off64_t len2) {
    
    189 165
         return adler32_combine_(adler1, adler2, len2);
    
    190 166
     }
    
    191 167
     
    

  • src/gzip/crc32.c
    ... ... @@ -103,21 +103,6 @@
    103 103
     #  define ARMCRC32
    
    104 104
     #endif
    
    105 105
     
    
    106
    -#ifndef Z_FREETYPE
    
    107
    -/* Local functions. */
    
    108
    -local z_crc_t multmodp OF((z_crc_t a, z_crc_t b));
    
    109
    -local z_crc_t x2nmodp OF((z_off64_t n, unsigned k));
    
    110
    -#endif  /* Z_FREETYPE */
    
    111
    -
    
    112
    -#if defined(W) && (!defined(ARMCRC32) || defined(DYNAMIC_CRC_TABLE))
    
    113
    -    local z_word_t byte_swap OF((z_word_t word));
    
    114
    -#endif
    
    115
    -
    
    116
    -#if defined(W) && !defined(ARMCRC32)
    
    117
    -    local z_crc_t crc_word OF((z_word_t data));
    
    118
    -    local z_word_t crc_word_big OF((z_word_t data));
    
    119
    -#endif
    
    120
    -
    
    121 106
     #if defined(W) && (!defined(ARMCRC32) || defined(DYNAMIC_CRC_TABLE))
    
    122 107
     /*
    
    123 108
       Swap the bytes in a z_word_t to convert between little and big endian. Any
    
    ... ... @@ -125,9 +110,7 @@ local z_crc_t x2nmodp OF((z_off64_t n, unsigned k));
    125 110
       instruction, if one is available. This assumes that word_t is either 32 bits
    
    126 111
       or 64 bits.
    
    127 112
      */
    
    128
    -local z_word_t byte_swap(
    
    129
    -    z_word_t word)
    
    130
    -{
    
    113
    +local z_word_t byte_swap(z_word_t word) {
    
    131 114
     #  if W == 8
    
    132 115
         return
    
    133 116
             (word & 0xff00000000000000) >> 56 |
    
    ... ... @@ -148,24 +131,81 @@ local z_word_t byte_swap(
    148 131
     }
    
    149 132
     #endif
    
    150 133
     
    
    134
    +#ifdef DYNAMIC_CRC_TABLE
    
    135
    +/* =========================================================================
    
    136
    + * Table of powers of x for combining CRC-32s, filled in by make_crc_table()
    
    137
    + * below.
    
    138
    + */
    
    139
    +   local z_crc_t FAR x2n_table[32];
    
    140
    +#else
    
    141
    +/* =========================================================================
    
    142
    + * Tables for byte-wise and braided CRC-32 calculations, and a table of powers
    
    143
    + * of x for combining CRC-32s, all made by make_crc_table().
    
    144
    + */
    
    145
    +#  include "crc32.h"
    
    146
    +#endif
    
    147
    +
    
    151 148
     /* CRC polynomial. */
    
    152 149
     #define POLY 0xedb88320         /* p(x) reflected, with x^32 implied */
    
    153 150
     
    
    154
    -#ifdef DYNAMIC_CRC_TABLE
    
    151
    +#ifndef Z_FREETYPE
    
    155 152
     
    
    153
    +/*
    
    154
    +  Return a(x) multiplied by b(x) modulo p(x), where p(x) is the CRC polynomial,
    
    155
    +  reflected. For speed, this requires that a not be zero.
    
    156
    + */
    
    157
    +local z_crc_t multmodp(z_crc_t a, z_crc_t b) {
    
    158
    +    z_crc_t m, p;
    
    159
    +
    
    160
    +    m = (z_crc_t)1 << 31;
    
    161
    +    p = 0;
    
    162
    +    for (;;) {
    
    163
    +        if (a & m) {
    
    164
    +            p ^= b;
    
    165
    +            if ((a & (m - 1)) == 0)
    
    166
    +                break;
    
    167
    +        }
    
    168
    +        m >>= 1;
    
    169
    +        b = b & 1 ? (b >> 1) ^ POLY : b >> 1;
    
    170
    +    }
    
    171
    +    return p;
    
    172
    +}
    
    173
    +
    
    174
    +/*
    
    175
    +  Return x^(n * 2^k) modulo p(x). Requires that x2n_table[] has been
    
    176
    +  initialized.
    
    177
    + */
    
    178
    +local z_crc_t x2nmodp(z_off64_t n, unsigned k) {
    
    179
    +    z_crc_t p;
    
    180
    +
    
    181
    +    p = (z_crc_t)1 << 31;           /* x^0 == 1 */
    
    182
    +    while (n) {
    
    183
    +        if (n & 1)
    
    184
    +            p = multmodp(x2n_table[k & 31], p);
    
    185
    +        n >>= 1;
    
    186
    +        k++;
    
    187
    +    }
    
    188
    +    return p;
    
    189
    +}
    
    190
    +
    
    191
    +#endif  /* !Z_FREETYPE */
    
    192
    +
    
    193
    +#ifdef DYNAMIC_CRC_TABLE
    
    194
    +/* =========================================================================
    
    195
    + * Build the tables for byte-wise and braided CRC-32 calculations, and a table
    
    196
    + * of powers of x for combining CRC-32s.
    
    197
    + */
    
    156 198
     local z_crc_t FAR crc_table[256];
    
    157
    -local z_crc_t FAR x2n_table[32];
    
    158
    -local void make_crc_table OF((void));
    
    159 199
     #ifdef W
    
    160 200
        local z_word_t FAR crc_big_table[256];
    
    161 201
        local z_crc_t FAR crc_braid_table[W][256];
    
    162 202
        local z_word_t FAR crc_braid_big_table[W][256];
    
    163
    -   local void braid OF((z_crc_t [][256], z_word_t [][256], int, int));
    
    203
    +   local void braid(z_crc_t [][256], z_word_t [][256], int, int);
    
    164 204
     #endif
    
    165 205
     #ifdef MAKECRCH
    
    166
    -   local void write_table OF((FILE *, const z_crc_t FAR *, int));
    
    167
    -   local void write_table32hi OF((FILE *, const z_word_t FAR *, int));
    
    168
    -   local void write_table64 OF((FILE *, const z_word_t FAR *, int));
    
    206
    +   local void write_table(FILE *, const z_crc_t FAR *, int);
    
    207
    +   local void write_table32hi(FILE *, const z_word_t FAR *, int);
    
    208
    +   local void write_table64(FILE *, const z_word_t FAR *, int);
    
    169 209
     #endif /* MAKECRCH */
    
    170 210
     
    
    171 211
     /*
    
    ... ... @@ -178,7 +218,6 @@ local void make_crc_table OF((void));
    178 218
     
    
    179 219
     /* Definition of once functionality. */
    
    180 220
     typedef struct once_s once_t;
    
    181
    -local void once OF((once_t *, void (*)(void)));
    
    182 221
     
    
    183 222
     /* Check for the availability of atomics. */
    
    184 223
     #if defined(__STDC__) && __STDC_VERSION__ >= 201112L && \
    
    ... ... @@ -198,10 +237,7 @@ struct once_s {
    198 237
       invoke once() at the same time. The state must be a once_t initialized with
    
    199 238
       ONCE_INIT.
    
    200 239
      */
    
    201
    -local void once(state, init)
    
    202
    -    once_t *state;
    
    203
    -    void (*init)(void);
    
    204
    -{
    
    240
    +local void once(once_t *state, void (*init)(void)) {
    
    205 241
         if (!atomic_load(&state->done)) {
    
    206 242
             if (atomic_flag_test_and_set(&state->begun))
    
    207 243
                 while (!atomic_load(&state->done))
    
    ... ... @@ -224,10 +260,7 @@ struct once_s {
    224 260
     
    
    225 261
     /* Test and set. Alas, not atomic, but tries to minimize the period of
    
    226 262
        vulnerability. */
    
    227
    -local int test_and_set OF((int volatile *));
    
    228
    -local int test_and_set(
    
    229
    -    int volatile *flag)
    
    230
    -{
    
    263
    +local int test_and_set(int volatile *flag) {
    
    231 264
         int was;
    
    232 265
     
    
    233 266
         was = *flag;
    
    ... ... @@ -236,10 +269,7 @@ local int test_and_set(
    236 269
     }
    
    237 270
     
    
    238 271
     /* Run the provided init() function once. This is not thread-safe. */
    
    239
    -local void once(state, init)
    
    240
    -    once_t *state;
    
    241
    -    void (*init)(void);
    
    242
    -{
    
    272
    +local void once(once_t *state, void (*init)(void)) {
    
    243 273
         if (!state->done) {
    
    244 274
             if (test_and_set(&state->begun))
    
    245 275
                 while (!state->done)
    
    ... ... @@ -281,8 +311,7 @@ local once_t made = ONCE_INIT;
    281 311
       combinations of CRC register values and incoming bytes.
    
    282 312
      */
    
    283 313
     
    
    284
    -local void make_crc_table()
    
    285
    -{
    
    314
    +local void make_crc_table(void) {
    
    286 315
         unsigned i, j, n;
    
    287 316
         z_crc_t p;
    
    288 317
     
    
    ... ... @@ -449,11 +478,7 @@ local void make_crc_table()
    449 478
        Write the 32-bit values in table[0..k-1] to out, five per line in
    
    450 479
        hexadecimal separated by commas.
    
    451 480
      */
    
    452
    -local void write_table(
    
    453
    -    FILE *out,
    
    454
    -    const z_crc_t FAR *table,
    
    455
    -    int k)
    
    456
    -{
    
    481
    +local void write_table(FILE *out, const z_crc_t FAR *table, int k) {
    
    457 482
         int n;
    
    458 483
     
    
    459 484
         for (n = 0; n < k; n++)
    
    ... ... @@ -466,11 +491,7 @@ local void write_table(
    466 491
        Write the high 32-bits of each value in table[0..k-1] to out, five per line
    
    467 492
        in hexadecimal separated by commas.
    
    468 493
      */
    
    469
    -local void write_table32hi(
    
    470
    -    FILE *out,
    
    471
    -    const z_word_t FAR *table,
    
    472
    -    int k)
    
    473
    -{
    
    494
    +local void write_table32hi(FILE *out, const z_word_t FAR *table, int k) {
    
    474 495
         int n;
    
    475 496
     
    
    476 497
         for (n = 0; n < k; n++)
    
    ... ... @@ -486,11 +507,7 @@ local void write_table32hi(
    486 507
       bits. If not, then the type cast and format string can be adjusted
    
    487 508
       accordingly.
    
    488 509
      */
    
    489
    -local void write_table64(
    
    490
    -    FILE *out,
    
    491
    -    const z_word_t FAR *table,
    
    492
    -    int k)
    
    493
    -{
    
    510
    +local void write_table64(FILE *out, const z_word_t FAR *table, int k) {
    
    494 511
         int n;
    
    495 512
     
    
    496 513
         for (n = 0; n < k; n++)
    
    ... ... @@ -500,8 +517,7 @@ local void write_table64(
    500 517
     }
    
    501 518
     
    
    502 519
     /* Actually do the deed. */
    
    503
    -int main()
    
    504
    -{
    
    520
    +int main(void) {
    
    505 521
         make_crc_table();
    
    506 522
         return 0;
    
    507 523
     }
    
    ... ... @@ -513,12 +529,7 @@ int main()
    513 529
       Generate the little and big-endian braid tables for the given n and z_word_t
    
    514 530
       size w. Each array must have room for w blocks of 256 elements.
    
    515 531
      */
    
    516
    -local void braid(ltl, big, n, w)
    
    517
    -    z_crc_t ltl[][256];
    
    518
    -    z_word_t big[][256];
    
    519
    -    int n;
    
    520
    -    int w;
    
    521
    -{
    
    532
    +local void braid(z_crc_t ltl[][256], z_word_t big[][256], int n, int w) {
    
    522 533
         int k;
    
    523 534
         z_crc_t i, p, q;
    
    524 535
         for (k = 0; k < w; k++) {
    
    ... ... @@ -533,78 +544,22 @@ local void braid(ltl, big, n, w)
    533 544
     }
    
    534 545
     #endif
    
    535 546
     
    
    536
    -#else /* !DYNAMIC_CRC_TABLE */
    
    537
    -/* ========================================================================
    
    538
    - * Tables for byte-wise and braided CRC-32 calculations, and a table of powers
    
    539
    - * of x for combining CRC-32s, all made by make_crc_table().
    
    540
    - */
    
    541
    -#include "crc32.h"
    
    542 547
     #endif /* DYNAMIC_CRC_TABLE */
    
    543 548
     
    
    544
    -/* ========================================================================
    
    545
    - * Routines used for CRC calculation. Some are also required for the table
    
    546
    - * generation above.
    
    547
    - */
    
    548
    -
    
    549 549
     #ifndef Z_FREETYPE
    
    550 550
     
    
    551
    -/*
    
    552
    -  Return a(x) multiplied by b(x) modulo p(x), where p(x) is the CRC polynomial,
    
    553
    -  reflected. For speed, this requires that a not be zero.
    
    554
    - */
    
    555
    -local z_crc_t multmodp(
    
    556
    -    z_crc_t a,
    
    557
    -    z_crc_t b)
    
    558
    -{
    
    559
    -    z_crc_t m, p;
    
    560
    -
    
    561
    -    m = (z_crc_t)1 << 31;
    
    562
    -    p = 0;
    
    563
    -    for (;;) {
    
    564
    -        if (a & m) {
    
    565
    -            p ^= b;
    
    566
    -            if ((a & (m - 1)) == 0)
    
    567
    -                break;
    
    568
    -        }
    
    569
    -        m >>= 1;
    
    570
    -        b = b & 1 ? (b >> 1) ^ POLY : b >> 1;
    
    571
    -    }
    
    572
    -    return p;
    
    573
    -}
    
    574
    -
    
    575
    -/*
    
    576
    -  Return x^(n * 2^k) modulo p(x). Requires that x2n_table[] has been
    
    577
    -  initialized.
    
    578
    - */
    
    579
    -local z_crc_t x2nmodp(
    
    580
    -    z_off64_t n,
    
    581
    -    unsigned k)
    
    582
    -{
    
    583
    -    z_crc_t p;
    
    584
    -
    
    585
    -    p = (z_crc_t)1 << 31;           /* x^0 == 1 */
    
    586
    -    while (n) {
    
    587
    -        if (n & 1)
    
    588
    -            p = multmodp(x2n_table[k & 31], p);
    
    589
    -        n >>= 1;
    
    590
    -        k++;
    
    591
    -    }
    
    592
    -    return p;
    
    593
    -}
    
    594
    -
    
    595 551
     /* =========================================================================
    
    596 552
      * This function can be used by asm versions of crc32(), and to force the
    
    597 553
      * generation of the CRC tables in a threaded application.
    
    598 554
      */
    
    599
    -const z_crc_t FAR * ZEXPORT get_crc_table()
    
    600
    -{
    
    555
    +const z_crc_t FAR * ZEXPORT get_crc_table(void) {
    
    601 556
     #ifdef DYNAMIC_CRC_TABLE
    
    602 557
         once(&made, make_crc_table);
    
    603 558
     #endif /* DYNAMIC_CRC_TABLE */
    
    604 559
         return (const z_crc_t FAR *)crc_table;
    
    605 560
     }
    
    606 561
     
    
    607
    -#endif  /* Z_FREETYPE */
    
    562
    +#endif   /* !Z_FREETYPE */
    
    608 563
     
    
    609 564
     /* =========================================================================
    
    610 565
      * Use ARM machine instructions if available. This will compute the CRC about
    
    ... ... @@ -625,11 +580,8 @@ const z_crc_t FAR * ZEXPORT get_crc_table()
    625 580
     #define Z_BATCH_ZEROS 0xa10d3d0c    /* computed from Z_BATCH = 3990 */
    
    626 581
     #define Z_BATCH_MIN 800             /* fewest words in a final batch */
    
    627 582
     
    
    628
    -unsigned long ZEXPORT crc32_z(
    
    629
    -    unsigned long crc,
    
    630
    -    const unsigned char FAR *buf,
    
    631
    -    z_size_t len)
    
    632
    -{
    
    583
    +unsigned long ZEXPORT crc32_z(unsigned long crc, const unsigned char FAR *buf,
    
    584
    +                              z_size_t len) {
    
    633 585
         z_crc_t val;
    
    634 586
         z_word_t crc1, crc2;
    
    635 587
         const z_word_t *word;
    
    ... ... @@ -729,18 +681,14 @@ unsigned long ZEXPORT crc32_z(
    729 681
       least-significant byte of the word as the first byte of data, without any pre
    
    730 682
       or post conditioning. This is used to combine the CRCs of each braid.
    
    731 683
      */
    
    732
    -local z_crc_t crc_word(
    
    733
    -    z_word_t data)
    
    734
    -{
    
    684
    +local z_crc_t crc_word(z_word_t data) {
    
    735 685
         int k;
    
    736 686
         for (k = 0; k < W; k++)
    
    737 687
             data = (data >> 8) ^ crc_table[data & 0xff];
    
    738 688
         return (z_crc_t)data;
    
    739 689
     }
    
    740 690
     
    
    741
    -local z_word_t crc_word_big(
    
    742
    -    z_word_t data)
    
    743
    -{
    
    691
    +local z_word_t crc_word_big(z_word_t data) {
    
    744 692
         int k;
    
    745 693
         for (k = 0; k < W; k++)
    
    746 694
             data = (data << 8) ^
    
    ... ... @@ -751,11 +699,8 @@ local z_word_t crc_word_big(
    751 699
     #endif
    
    752 700
     
    
    753 701
     /* ========================================================================= */
    
    754
    -unsigned long ZEXPORT crc32_z(
    
    755
    -    unsigned long crc,
    
    756
    -    const unsigned char FAR *buf,
    
    757
    -    z_size_t len)
    
    758
    -{
    
    702
    +unsigned long ZEXPORT crc32_z(unsigned long crc, const unsigned char FAR *buf,
    
    703
    +                              z_size_t len) {
    
    759 704
         /* Return initial CRC, if requested. */
    
    760 705
         if (buf == Z_NULL) return 0;
    
    761 706
     
    
    ... ... @@ -787,8 +732,8 @@ unsigned long ZEXPORT crc32_z(
    787 732
             words = (z_word_t const *)buf;
    
    788 733
     
    
    789 734
             /* Do endian check at execution time instead of compile time, since ARM
    
    790
    -           processors can change the endianess at execution time. If the
    
    791
    -           compiler knows what the endianess will be, it can optimize out the
    
    735
    +           processors can change the endianness at execution time. If the
    
    736
    +           compiler knows what the endianness will be, it can optimize out the
    
    792 737
                check and the unused branch. */
    
    793 738
             endian = 1;
    
    794 739
             if (*(unsigned char *)&endian) {
    
    ... ... @@ -1075,22 +1020,15 @@ unsigned long ZEXPORT crc32_z(
    1075 1020
     #endif
    
    1076 1021
     
    
    1077 1022
     /* ========================================================================= */
    
    1078
    -unsigned long ZEXPORT crc32(
    
    1079
    -    unsigned long crc,
    
    1080
    -    const unsigned char FAR *buf,
    
    1081
    -    uInt len)
    
    1082
    -{
    
    1023
    +unsigned long ZEXPORT crc32(unsigned long crc, const unsigned char FAR *buf,
    
    1024
    +                            uInt len) {
    
    1083 1025
         return crc32_z(crc, buf, len);
    
    1084 1026
     }
    
    1085 1027
     
    
    1086 1028
     #ifndef Z_FREETYPE
    
    1087 1029
     
    
    1088 1030
     /* ========================================================================= */
    
    1089
    -uLong ZEXPORT crc32_combine64(
    
    1090
    -    uLong crc1,
    
    1091
    -    uLong crc2,
    
    1092
    -    z_off64_t len2)
    
    1093
    -{
    
    1031
    +uLong ZEXPORT crc32_combine64(uLong crc1, uLong crc2, z_off64_t len2) {
    
    1094 1032
     #ifdef DYNAMIC_CRC_TABLE
    
    1095 1033
         once(&made, make_crc_table);
    
    1096 1034
     #endif /* DYNAMIC_CRC_TABLE */
    
    ... ... @@ -1098,18 +1036,12 @@ uLong ZEXPORT crc32_combine64(
    1098 1036
     }
    
    1099 1037
     
    
    1100 1038
     /* ========================================================================= */
    
    1101
    -uLong ZEXPORT crc32_combine(
    
    1102
    -    uLong crc1,
    
    1103
    -    uLong crc2,
    
    1104
    -    z_off_t len2)
    
    1105
    -{
    
    1039
    +uLong ZEXPORT crc32_combine(uLong crc1, uLong crc2, z_off_t len2) {
    
    1106 1040
         return crc32_combine64(crc1, crc2, (z_off64_t)len2);
    
    1107 1041
     }
    
    1108 1042
     
    
    1109 1043
     /* ========================================================================= */
    
    1110
    -uLong ZEXPORT crc32_combine_gen64(
    
    1111
    -    z_off64_t len2)
    
    1112
    -{
    
    1044
    +uLong ZEXPORT crc32_combine_gen64(z_off64_t len2) {
    
    1113 1045
     #ifdef DYNAMIC_CRC_TABLE
    
    1114 1046
         once(&made, make_crc_table);
    
    1115 1047
     #endif /* DYNAMIC_CRC_TABLE */
    
    ... ... @@ -1117,19 +1049,13 @@ uLong ZEXPORT crc32_combine_gen64(
    1117 1049
     }
    
    1118 1050
     
    
    1119 1051
     /* ========================================================================= */
    
    1120
    -uLong ZEXPORT crc32_combine_gen(
    
    1121
    -    z_off_t len2)
    
    1122
    -{
    
    1052
    +uLong ZEXPORT crc32_combine_gen(z_off_t len2) {
    
    1123 1053
         return crc32_combine_gen64((z_off64_t)len2);
    
    1124 1054
     }
    
    1125 1055
     
    
    1126 1056
     /* ========================================================================= */
    
    1127
    -uLong ZEXPORT crc32_combine_op(
    
    1128
    -    uLong crc1,
    
    1129
    -    uLong crc2,
    
    1130
    -    uLong op)
    
    1131
    -{
    
    1057
    +uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op) {
    
    1132 1058
         return multmodp(op, crc1) ^ (crc2 & 0xffffffff);
    
    1133 1059
     }
    
    1134 1060
     
    
    1135
    -#endif  /* Z_FREETYPE */
    1061
    +#endif  /* !Z_FREETYPE */

  • src/gzip/ftzconf.h
    ... ... @@ -241,7 +241,11 @@
    241 241
     #endif
    
    242 242
     
    
    243 243
     #ifdef Z_SOLO
    
    244
    -   typedef unsigned long z_size_t;
    
    244
    +#  ifdef _WIN64
    
    245
    +     typedef unsigned long long z_size_t;
    
    246
    +#  else
    
    247
    +     typedef unsigned long z_size_t;
    
    248
    +#  endif
    
    245 249
     #else
    
    246 250
     #  define z_longlong long long
    
    247 251
     #  if defined(NO_SIZE_T)
    
    ... ... @@ -520,7 +524,7 @@ typedef uLong FAR uLongf;
    520 524
     #if !defined(_WIN32) && defined(Z_LARGE64)
    
    521 525
     #  define z_off64_t off64_t
    
    522 526
     #else
    
    523
    -#  if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
    
    527
    +#  if defined(_WIN32) && !defined(__GNUC__)
    
    524 528
     #    define z_off64_t __int64
    
    525 529
     #  else
    
    526 530
     #    define z_off64_t z_off_t
    

  • src/gzip/gzguts.h
    ... ... @@ -7,9 +7,8 @@
    7 7
     #  ifndef _LARGEFILE_SOURCE
    
    8 8
     #    define _LARGEFILE_SOURCE 1
    
    9 9
     #  endif
    
    10
    -#  ifdef _FILE_OFFSET_BITS
    
    11
    -#    undef _FILE_OFFSET_BITS
    
    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 OF((uInt size));
    
    123
    -  extern void   free   OF((voidpf ptr));
    
    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 OF((const char *, const char *));
    
    142
    -    ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
    
    143
    -    ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
    
    144
    -    ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
    
    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,9 +202,9 @@ typedef struct {
    203 202
     typedef gz_state FAR *gz_statep;
    
    204 203
     
    
    205 204
     /* shared functions */
    
    206
    -void ZLIB_INTERNAL gz_error OF((gz_statep, int, const char *));
    
    205
    +void ZLIB_INTERNAL gz_error(gz_statep, int, const char *);
    
    207 206
     #if defined UNDER_CE
    
    208
    -char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error));
    
    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
    
    ... ... @@ -214,6 +213,6 @@ char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error));
    214 213
     #ifdef INT_MAX
    
    215 214
     #  define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX)
    
    216 215
     #else
    
    217
    -unsigned ZLIB_INTERNAL gz_intmax OF((void));
    
    216
    +unsigned ZLIB_INTERNAL gz_intmax(void);
    
    218 217
     #  define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax())
    
    219 218
     #endif

  • src/gzip/inffast.c
    ... ... @@ -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(
    
    51
    -    z_streamp strm,
    
    52
    -    unsigned start)
    
    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 */
    

  • src/gzip/inffast.h
    ... ... @@ -8,4 +8,4 @@
    8 8
        subject to change. Applications should only use zlib.h.
    
    9 9
      */
    
    10 10
     
    
    11
    -static void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start));
    11
    +static void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start);

  • src/gzip/inflate.c
    ... ... @@ -91,22 +91,7 @@
    91 91
     #  endif
    
    92 92
     #endif
    
    93 93
     
    
    94
    -/* function prototypes */
    
    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
    -#ifndef Z_FREETYPE
    
    103
    -local unsigned syncsearch OF((unsigned FAR *have, const unsigned char FAR *buf,
    
    104
    -                              unsigned len));
    
    105
    -#endif
    
    106
    -
    
    107
    -local int inflateStateCheck(
    
    108
    -    z_streamp strm)
    
    109
    -{
    
    94
    +local int inflateStateCheck(z_streamp strm) {
    
    110 95
         struct inflate_state FAR *state;
    
    111 96
         if (strm == Z_NULL ||
    
    112 97
             strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0)
    
    ... ... @@ -118,9 +103,7 @@ local int inflateStateCheck(
    118 103
         return 0;
    
    119 104
     }
    
    120 105
     
    
    121
    -int ZEXPORT inflateResetKeep(
    
    122
    -    z_streamp strm)
    
    123
    -{
    
    106
    +int ZEXPORT inflateResetKeep(z_streamp strm) {
    
    124 107
         struct inflate_state FAR *state;
    
    125 108
     
    
    126 109
         if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
    
    ... ... @@ -144,9 +127,7 @@ int ZEXPORT inflateResetKeep(
    144 127
         return Z_OK;
    
    145 128
     }
    
    146 129
     
    
    147
    -int ZEXPORT inflateReset(
    
    148
    -    z_streamp strm)
    
    149
    -{
    
    130
    +int ZEXPORT inflateReset(z_streamp strm) {
    
    150 131
         struct inflate_state FAR *state;
    
    151 132
     
    
    152 133
         if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
    
    ... ... @@ -157,10 +138,7 @@ int ZEXPORT inflateReset(
    157 138
         return inflateResetKeep(strm);
    
    158 139
     }
    
    159 140
     
    
    160
    -int ZEXPORT inflateReset2(
    
    161
    -    z_streamp strm,
    
    162
    -    int windowBits)
    
    163
    -{
    
    141
    +int ZEXPORT inflateReset2(z_streamp strm, int windowBits) {
    
    164 142
         int wrap;
    
    165 143
         struct inflate_state FAR *state;
    
    166 144
     
    
    ... ... @@ -197,12 +175,8 @@ int ZEXPORT inflateReset2(
    197 175
         return inflateReset(strm);
    
    198 176
     }
    
    199 177
     
    
    200
    -int ZEXPORT inflateInit2_(
    
    201
    -    z_streamp strm,
    
    202
    -    int windowBits,
    
    203
    -    const char *version,
    
    204
    -    int stream_size)
    
    205
    -{
    
    178
    +int ZEXPORT inflateInit2_(z_streamp strm, int windowBits,
    
    179
    +                          const char *version, int stream_size) {
    
    206 180
         int ret;
    
    207 181
         struct inflate_state FAR *state;
    
    208 182
     
    
    ... ... @@ -243,22 +217,17 @@ int ZEXPORT inflateInit2_(
    243 217
     
    
    244 218
     #ifndef Z_FREETYPE
    
    245 219
     
    
    246
    -int ZEXPORT inflateInit_(
    
    247
    -    z_streamp strm,
    
    248
    -    const char *version,
    
    249
    -    int stream_size)
    
    250
    -{
    
    220
    +int ZEXPORT inflateInit_(z_streamp strm, const char *version,
    
    221
    +                         int stream_size) {
    
    251 222
         return inflateInit2_(strm, DEF_WBITS, version, stream_size);
    
    252 223
     }
    
    253 224
     
    
    254
    -int ZEXPORT inflatePrime(
    
    255
    -    z_streamp strm,
    
    256
    -    int bits,
    
    257
    -    int value)
    
    258
    -{
    
    225
    +int ZEXPORT inflatePrime(z_streamp strm, int bits, int value) {
    
    259 226
         struct inflate_state FAR *state;
    
    260 227
     
    
    261 228
         if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
    
    229
    +    if (bits == 0)
    
    230
    +        return Z_OK;
    
    262 231
         state = (struct inflate_state FAR *)strm->state;
    
    263 232
         if (bits < 0) {
    
    264 233
             state->hold = 0;
    
    ... ... @@ -284,9 +253,7 @@ int ZEXPORT inflatePrime(
    284 253
        used for threaded applications, since the rewriting of the tables and virgin
    
    285 254
        may not be thread-safe.
    
    286 255
      */
    
    287
    -local void fixedtables(
    
    288
    -    struct inflate_state FAR *state)
    
    289
    -{
    
    256
    +local void fixedtables(struct inflate_state FAR *state) {
    
    290 257
     #ifdef BUILDFIXED
    
    291 258
         static int virgin = 1;
    
    292 259
         static code *lenfix, *distfix;
    
    ... ... @@ -348,7 +315,7 @@ local void fixedtables(
    348 315
     
    
    349 316
         a.out > inffixed.h
    
    350 317
      */
    
    351
    -void makefixed()
    
    318
    +void makefixed(void)
    
    352 319
     {
    
    353 320
         unsigned low, size;
    
    354 321
         struct inflate_state state;
    
    ... ... @@ -402,11 +369,7 @@ void makefixed()
    402 369
        output will fall in the output data, making match copies simpler and faster.
    
    403 370
        The advantage may be dependent on the size of the processor's data caches.
    
    404 371
      */
    
    405
    -local int updatewindow(
    
    406
    -    z_streamp strm,
    
    407
    -    const Bytef *end,
    
    408
    -    unsigned copy)
    
    409
    -{
    
    372
    +local int updatewindow(z_streamp strm, const Bytef *end, unsigned copy) {
    
    410 373
         struct inflate_state FAR *state;
    
    411 374
         unsigned dist;
    
    412 375
     
    
    ... ... @@ -628,10 +591,7 @@ local int updatewindow(
    628 591
        will return Z_BUF_ERROR if it has not reached the end of the stream.
    
    629 592
      */
    
    630 593
     
    
    631
    -int ZEXPORT inflate(
    
    632
    -    z_streamp strm,
    
    633
    -    int flush)
    
    634
    -{
    
    594
    +int ZEXPORT inflate(z_streamp strm, int flush) {
    
    635 595
         struct inflate_state FAR *state;
    
    636 596
         z_const unsigned char FAR *next;    /* next input */
    
    637 597
         unsigned char FAR *put;     /* next output */
    
    ... ... @@ -1307,9 +1267,7 @@ int ZEXPORT inflate(
    1307 1267
         return ret;
    
    1308 1268
     }
    
    1309 1269
     
    
    1310
    -int ZEXPORT inflateEnd(
    
    1311
    -    z_streamp strm)
    
    1312
    -{
    
    1270
    +int ZEXPORT inflateEnd(z_streamp strm) {
    
    1313 1271
         struct inflate_state FAR *state;
    
    1314 1272
         if (inflateStateCheck(strm))
    
    1315 1273
             return Z_STREAM_ERROR;
    
    ... ... @@ -1323,11 +1281,8 @@ int ZEXPORT inflateEnd(
    1323 1281
     
    
    1324 1282
     #ifndef Z_FREETYPE
    
    1325 1283
     
    
    1326
    -int ZEXPORT inflateGetDictionary(
    
    1327
    -    z_streamp strm,
    
    1328
    -    Bytef *dictionary,
    
    1329
    -    uInt *dictLength)
    
    1330
    -{
    
    1284
    +int ZEXPORT inflateGetDictionary(z_streamp strm, Bytef *dictionary,
    
    1285
    +                                 uInt *dictLength) {
    
    1331 1286
         struct inflate_state FAR *state;
    
    1332 1287
     
    
    1333 1288
         /* check state */
    
    ... ... @@ -1346,11 +1301,8 @@ int ZEXPORT inflateGetDictionary(
    1346 1301
         return Z_OK;
    
    1347 1302
     }
    
    1348 1303
     
    
    1349
    -int ZEXPORT inflateSetDictionary(
    
    1350
    -    z_streamp strm,
    
    1351
    -    const Bytef *dictionary,
    
    1352
    -    uInt dictLength)
    
    1353
    -{
    
    1304
    +int ZEXPORT inflateSetDictionary(z_streamp strm, const Bytef *dictionary,
    
    1305
    +                                 uInt dictLength) {
    
    1354 1306
         struct inflate_state FAR *state;
    
    1355 1307
         unsigned long dictid;
    
    1356 1308
         int ret;
    
    ... ... @@ -1381,10 +1333,7 @@ int ZEXPORT inflateSetDictionary(
    1381 1333
         return Z_OK;
    
    1382 1334
     }
    
    1383 1335
     
    
    1384
    -int ZEXPORT inflateGetHeader(
    
    1385
    -    z_streamp strm,
    
    1386
    -    gz_headerp head)
    
    1387
    -{
    
    1336
    +int ZEXPORT inflateGetHeader(z_streamp strm, gz_headerp head) {
    
    1388 1337
         struct inflate_state FAR *state;
    
    1389 1338
     
    
    1390 1339
         /* check state */
    
    ... ... @@ -1409,11 +1358,8 @@ int ZEXPORT inflateGetHeader(
    1409 1358
        called again with more data and the *have state.  *have is initialized to
    
    1410 1359
        zero for the first call.
    
    1411 1360
      */
    
    1412
    -local unsigned syncsearch(
    
    1413
    -    unsigned FAR *have,
    
    1414
    -    const unsigned char FAR *buf,
    
    1415
    -    unsigned len)
    
    1416
    -{
    
    1361
    +local unsigned syncsearch(unsigned FAR *have, const unsigned char FAR *buf,
    
    1362
    +                          unsigned len) {
    
    1417 1363
         unsigned got;
    
    1418 1364
         unsigned next;
    
    1419 1365
     
    
    ... ... @@ -1432,9 +1378,7 @@ local unsigned syncsearch(
    1432 1378
         return next;
    
    1433 1379
     }
    
    1434 1380
     
    
    1435
    -int ZEXPORT inflateSync(
    
    1436
    -    z_streamp strm)
    
    1437
    -{
    
    1381
    +int ZEXPORT inflateSync(z_streamp strm) {
    
    1438 1382
         unsigned len;               /* number of bytes to look at or looked at */
    
    1439 1383
         int flags;                  /* temporary to save header status */
    
    1440 1384
         unsigned long in, out;      /* temporary to save total_in and total_out */
    
    ... ... @@ -1490,9 +1434,7 @@ int ZEXPORT inflateSync(
    1490 1434
        block. When decompressing, PPP checks that at the end of input packet,
    
    1491 1435
        inflate is waiting for these length bytes.
    
    1492 1436
      */
    
    1493
    -int ZEXPORT inflateSyncPoint(
    
    1494
    -    z_streamp strm)
    
    1495
    -{
    
    1437
    +int ZEXPORT inflateSyncPoint(z_streamp strm) {
    
    1496 1438
         struct inflate_state FAR *state;
    
    1497 1439
     
    
    1498 1440
         if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
    
    ... ... @@ -1500,10 +1442,7 @@ int ZEXPORT inflateSyncPoint(
    1500 1442
         return state->mode == STORED && state->bits == 0;
    
    1501 1443
     }
    
    1502 1444
     
    
    1503
    -int ZEXPORT inflateCopy(
    
    1504
    -    z_streamp dest,
    
    1505
    -    z_streamp source)
    
    1506
    -{
    
    1445
    +int ZEXPORT inflateCopy(z_streamp dest, z_streamp source) {
    
    1507 1446
         struct inflate_state FAR *state;
    
    1508 1447
         struct inflate_state FAR *copy;
    
    1509 1448
         unsigned char FAR *window;
    
    ... ... @@ -1547,10 +1486,7 @@ int ZEXPORT inflateCopy(
    1547 1486
         return Z_OK;
    
    1548 1487
     }
    
    1549 1488
     
    
    1550
    -int ZEXPORT inflateUndermine(
    
    1551
    -    z_streamp strm,
    
    1552
    -    int subvert)
    
    1553
    -{
    
    1489
    +int ZEXPORT inflateUndermine(z_streamp strm, int subvert) {
    
    1554 1490
         struct inflate_state FAR *state;
    
    1555 1491
     
    
    1556 1492
         if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
    
    ... ... @@ -1565,10 +1501,7 @@ int ZEXPORT inflateUndermine(
    1565 1501
     #endif
    
    1566 1502
     }
    
    1567 1503
     
    
    1568
    -int ZEXPORT inflateValidate(
    
    1569
    -    z_streamp strm,
    
    1570
    -    int check)
    
    1571
    -{
    
    1504
    +int ZEXPORT inflateValidate(z_streamp strm, int check) {
    
    1572 1505
         struct inflate_state FAR *state;
    
    1573 1506
     
    
    1574 1507
         if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
    
    ... ... @@ -1580,9 +1513,7 @@ int ZEXPORT inflateValidate(
    1580 1513
         return Z_OK;
    
    1581 1514
     }
    
    1582 1515
     
    
    1583
    -long ZEXPORT inflateMark(
    
    1584
    -    z_streamp strm)
    
    1585
    -{
    
    1516
    +long ZEXPORT inflateMark(z_streamp strm) {
    
    1586 1517
         struct inflate_state FAR *state;
    
    1587 1518
     
    
    1588 1519
         if (inflateStateCheck(strm))
    
    ... ... @@ -1593,9 +1524,7 @@ long ZEXPORT inflateMark(
    1593 1524
                 (state->mode == MATCH ? state->was - state->length : 0));
    
    1594 1525
     }
    
    1595 1526
     
    
    1596
    -unsigned long ZEXPORT inflateCodesUsed(
    
    1597
    -    z_streamp strm)
    
    1598
    -{
    
    1527
    +unsigned long ZEXPORT inflateCodesUsed(z_streamp strm) {
    
    1599 1528
         struct inflate_state FAR *state;
    
    1600 1529
         if (inflateStateCheck(strm)) return (unsigned long)-1;
    
    1601 1530
         state = (struct inflate_state FAR *)strm->state;
    

  • src/gzip/inflate.h
    ... ... @@ -128,4 +128,4 @@ struct inflate_state {
    128 128
         unsigned was;               /* initial length of match */
    
    129 129
     };
    
    130 130
     
    
    131
    -#endif  /* INFLATE_H */
    131
    +#endif  /* !INFLATE_H */

  • src/gzip/inftrees.c
    1 1
     /* inftrees.c -- generate Huffman trees for efficient decoding
    
    2
    - * Copyright (C) 1995-2022 Mark Adler
    
    2
    + * Copyright (C) 1995-2023 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
     static const char inflate_copyright[] =
    
    12
    -   " inflate 1.2.13 Copyright 1995-2022 Mark Adler ";
    
    12
    +   " inflate 1.3 Copyright 1995-2023 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 @@ static 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(
    
    33
    -    codetype type,
    
    34
    -    unsigned short FAR *lens,
    
    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 @@ int ZLIB_INTERNAL inflate_table(
    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, 194, 65};
    
    60
    +        19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 198, 203};
    
    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,
    

  • src/gzip/inftrees.h
    ... ... @@ -60,8 +60,8 @@ typedef enum {
    60 60
         DISTS
    
    61 61
     } codetype;
    
    62 62
     
    
    63
    -static int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens,
    
    64
    -                             unsigned codes, code FAR * FAR *table,
    
    65
    -                             unsigned FAR *bits, unsigned short FAR *work));
    
    63
    +static int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens,
    
    64
    +                                unsigned codes, code FAR * FAR *table,
    
    65
    +                                unsigned FAR *bits, unsigned short FAR *work);
    
    66 66
     
    
    67
    -#endif  /* INFTREES_H_ */
    67
    +#endif  /* !INFTREES_H */

  • src/gzip/patches/freetype-zlib.diff
    ... ... @@ -30,88 +30,84 @@ prevent compiler errors.
    30 30
     (inflate_table): Declare as static.
    
    31 31
     
    
    32 32
     diff --git b/src/gzip/adler32.c a/src/gzip/adler32.c
    
    33
    -index be5e8a247..aa032e1dd 100644
    
    33
    +index 04b81d29b..260185b67 100644
    
    34 34
     --- b/src/gzip/adler32.c
    
    35 35
     +++ a/src/gzip/adler32.c
    
    36
    -@@ -7,7 +7,9 @@
    
    37
    - 
    
    38
    - #include "zutil.h"
    
    39
    - 
    
    40
    -+#ifndef Z_FREETYPE
    
    41
    - local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2));
    
    42
    -+#endif
    
    43
    - 
    
    44
    - #define BASE 65521U     /* largest prime smaller than 65536 */
    
    45
    - #define NMAX 5552
    
    46
    -@@ -139,6 +141,8 @@ uLong ZEXPORT adler32(
    
    36
    +@@ -129,6 +129,8 @@ uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len) {
    
    47 37
          return adler32_z(adler, buf, len);
    
    48 38
      }
    
    49 39
      
    
    50 40
     +#ifndef Z_FREETYPE
    
    51 41
     +
    
    52 42
      /* ========================================================================= */
    
    53
    - local uLong adler32_combine_(
    
    54
    -     uLong adler1,
    
    55
    -@@ -184,3 +188,5 @@ uLong ZEXPORT adler32_combine64(
    
    56
    - {
    
    43
    + local uLong adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2) {
    
    44
    +     unsigned long sum1;
    
    45
    +@@ -162,3 +164,5 @@ uLong ZEXPORT adler32_combine(uLong adler1, uLong adler2, z_off_t len2) {
    
    46
    + uLong ZEXPORT adler32_combine64(uLong adler1, uLong adler2, z_off64_t len2) {
    
    57 47
          return adler32_combine_(adler1, adler2, len2);
    
    58 48
      }
    
    59 49
     +
    
    60 50
     +#endif  /* !Z_FREETYPE */
    
    61 51
     diff --git b/src/gzip/crc32.c a/src/gzip/crc32.c
    
    62
    -index 3a52aa89d..6cd1b09d5 100644
    
    52
    +index 6c38f5c04..27487dcc2 100644
    
    63 53
     --- b/src/gzip/crc32.c
    
    64 54
     +++ a/src/gzip/crc32.c
    
    65
    -@@ -103,9 +103,11 @@
    
    66
    - #  define ARMCRC32
    
    67
    - #endif
    
    68
    - 
    
    69
    -+#ifndef Z_FREETYPE
    
    70
    - /* Local functions. */
    
    71
    - local z_crc_t multmodp OF((z_crc_t a, z_crc_t b));
    
    72
    - local z_crc_t x2nmodp OF((z_off64_t n, unsigned k));
    
    73
    -+#endif  /* Z_FREETYPE */
    
    74
    - 
    
    75
    - #if defined(W) && (!defined(ARMCRC32) || defined(DYNAMIC_CRC_TABLE))
    
    76
    -     local z_word_t byte_swap OF((z_word_t word));
    
    77
    -@@ -544,6 +546,8 @@ local void braid(ltl, big, n, w)
    
    78
    -  * generation above.
    
    79
    -  */
    
    55
    +@@ -148,6 +148,8 @@ local z_word_t byte_swap(z_word_t word) {
    
    56
    + /* CRC polynomial. */
    
    57
    + #define POLY 0xedb88320         /* p(x) reflected, with x^32 implied */
    
    80 58
      
    
    81 59
     +#ifndef Z_FREETYPE
    
    82 60
     +
    
    83 61
      /*
    
    84 62
        Return a(x) multiplied by b(x) modulo p(x), where p(x) is the CRC polynomial,
    
    85 63
        reflected. For speed, this requires that a not be zero.
    
    86
    -@@ -600,6 +604,8 @@ const z_crc_t FAR * ZEXPORT get_crc_table()
    
    64
    +@@ -186,6 +188,8 @@ local z_crc_t x2nmodp(z_off64_t n, unsigned k) {
    
    65
    +     return p;
    
    66
    + }
    
    67
    + 
    
    68
    ++#endif  /* !Z_FREETYPE */
    
    69
    ++
    
    70
    + #ifdef DYNAMIC_CRC_TABLE
    
    71
    + /* =========================================================================
    
    72
    +  * Build the tables for byte-wise and braided CRC-32 calculations, and a table
    
    73
    +@@ -542,6 +546,8 @@ local void braid(z_crc_t ltl[][256], z_word_t big[][256], int n, int w) {
    
    74
    + 
    
    75
    + #endif /* DYNAMIC_CRC_TABLE */
    
    76
    + 
    
    77
    ++#ifndef Z_FREETYPE
    
    78
    ++
    
    79
    + /* =========================================================================
    
    80
    +  * This function can be used by asm versions of crc32(), and to force the
    
    81
    +  * generation of the CRC tables in a threaded application.
    
    82
    +@@ -553,6 +559,8 @@ const z_crc_t FAR * ZEXPORT get_crc_table(void) {
    
    87 83
          return (const z_crc_t FAR *)crc_table;
    
    88 84
      }
    
    89 85
      
    
    90
    -+#endif  /* Z_FREETYPE */
    
    86
    ++#endif   /* !Z_FREETYPE */
    
    91 87
     +
    
    92 88
      /* =========================================================================
    
    93 89
       * Use ARM machine instructions if available. This will compute the CRC about
    
    94 90
       * ten times faster than the braided calculation. This code does not check for
    
    95
    -@@ -1077,6 +1083,8 @@ unsigned long ZEXPORT crc32(
    
    91
    +@@ -1017,6 +1025,8 @@ unsigned long ZEXPORT crc32(unsigned long crc, const unsigned char FAR *buf,
    
    96 92
          return crc32_z(crc, buf, len);
    
    97 93
      }
    
    98 94
      
    
    99 95
     +#ifndef Z_FREETYPE
    
    100 96
     +
    
    101 97
      /* ========================================================================= */
    
    102
    - uLong ZEXPORT crc32_combine64(
    
    103
    -     uLong crc1,
    
    104
    -@@ -1123,3 +1131,5 @@ uLong ZEXPORT crc32_combine_op(
    
    105
    - {
    
    98
    + uLong ZEXPORT crc32_combine64(uLong crc1, uLong crc2, z_off64_t len2) {
    
    99
    + #ifdef DYNAMIC_CRC_TABLE
    
    100
    +@@ -1047,3 +1057,5 @@ uLong ZEXPORT crc32_combine_gen(z_off_t len2) {
    
    101
    + uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op) {
    
    106 102
          return multmodp(op, crc1) ^ (crc2 & 0xffffffff);
    
    107 103
      }
    
    108 104
     +
    
    109
    -+#endif  /* Z_FREETYPE */
    
    105
    ++#endif  /* !Z_FREETYPE */
    
    110 106
     diff --git b/src/gzip/gzguts.h a/src/gzip/gzguts.h
    
    111
    -index 57faf3716..4f09a52a7 100644
    
    107
    +index f9375047e..f9a250b85 100644
    
    112 108
     --- b/src/gzip/gzguts.h
    
    113 109
     +++ a/src/gzip/gzguts.h
    
    114
    -@@ -163,7 +163,7 @@
    
    110
    +@@ -162,7 +162,7 @@
    
    115 111
      
    
    116 112
      /* values for gz_state how */
    
    117 113
      #define LOOK 0      /* look for a gzip header */
    
    ... ... @@ -121,40 +117,29 @@ index 57faf3716..4f09a52a7 100644
    121 117
      
    
    122 118
      /* internal gzip file state data structure */
    
    123 119
     diff --git b/src/gzip/inffast.h a/src/gzip/inffast.h
    
    124
    -index e5c1aa4ca..684ae878c 100644
    
    120
    +index 49c6d156c..a38c5be45 100644
    
    125 121
     --- b/src/gzip/inffast.h
    
    126 122
     +++ a/src/gzip/inffast.h
    
    127 123
     @@ -8,4 +8,4 @@
    
    128 124
         subject to change. Applications should only use zlib.h.
    
    129 125
       */
    
    130 126
      
    
    131
    --void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start));
    
    132
    -+static void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start));
    
    127
    +-void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start);
    
    128
    ++static void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start);
    
    133 129
     diff --git b/src/gzip/inflate.c a/src/gzip/inflate.c
    
    134
    -index c9e566b03..5117e2e26 100644
    
    130
    +index b0757a9b2..f7ed5d181 100644
    
    135 131
     --- b/src/gzip/inflate.c
    
    136 132
     +++ a/src/gzip/inflate.c
    
    137
    -@@ -99,8 +99,10 @@ local int updatewindow OF((z_streamp strm, const unsigned char FAR *end,
    
    138
    - #ifdef BUILDFIXED
    
    139
    -    void makefixed OF((void));
    
    140
    - #endif
    
    141
    -+#ifndef Z_FREETYPE
    
    142
    - local unsigned syncsearch OF((unsigned FAR *have, const unsigned char FAR *buf,
    
    143
    -                               unsigned len));
    
    144
    -+#endif
    
    145
    - 
    
    146
    - local int inflateStateCheck(
    
    147
    -     z_streamp strm)
    
    148
    -@@ -239,6 +241,8 @@ int ZEXPORT inflateInit2_(
    
    133
    +@@ -215,6 +215,8 @@ int ZEXPORT inflateInit2_(z_streamp strm, int windowBits,
    
    149 134
          return ret;
    
    150 135
      }
    
    151 136
      
    
    152 137
     +#ifndef Z_FREETYPE
    
    153 138
     +
    
    154
    - int ZEXPORT inflateInit_(
    
    155
    -     z_streamp strm,
    
    156
    -     const char *version,
    
    157
    -@@ -268,6 +272,8 @@ int ZEXPORT inflatePrime(
    
    139
    + int ZEXPORT inflateInit_(z_streamp strm, const char *version,
    
    140
    +                          int stream_size) {
    
    141
    +     return inflateInit2_(strm, DEF_WBITS, version, stream_size);
    
    142
    +@@ -239,6 +241,8 @@ int ZEXPORT inflatePrime(z_streamp strm, int bits, int value) {
    
    158 143
          return Z_OK;
    
    159 144
      }
    
    160 145
      
    
    ... ... @@ -163,23 +148,23 @@ index c9e566b03..5117e2e26 100644
    163 148
      /*
    
    164 149
         Return state with length and distance decoding tables and index sizes set to
    
    165 150
         fixed code decoding.  Normally this returns fixed tables from inffixed.h.
    
    166
    -@@ -1315,6 +1321,8 @@ int ZEXPORT inflateEnd(
    
    151
    +@@ -1275,6 +1279,8 @@ int ZEXPORT inflateEnd(z_streamp strm) {
    
    167 152
          return Z_OK;
    
    168 153
      }
    
    169 154
      
    
    170 155
     +#ifndef Z_FREETYPE
    
    171 156
     +
    
    172
    - int ZEXPORT inflateGetDictionary(
    
    173
    -     z_streamp strm,
    
    174
    -     Bytef *dictionary,
    
    175
    -@@ -1593,3 +1601,5 @@ unsigned long ZEXPORT inflateCodesUsed(
    
    157
    + int ZEXPORT inflateGetDictionary(z_streamp strm, Bytef *dictionary,
    
    158
    +                                  uInt *dictLength) {
    
    159
    +     struct inflate_state FAR *state;
    
    160
    +@@ -1524,3 +1530,5 @@ unsigned long ZEXPORT inflateCodesUsed(z_streamp strm) {
    
    176 161
          state = (struct inflate_state FAR *)strm->state;
    
    177 162
          return (unsigned long)(state->next - state->codes);
    
    178 163
      }
    
    179 164
     +
    
    180 165
     +#endif  /* !Z_FREETYPE */
    
    181 166
     diff --git b/src/gzip/inflate.h a/src/gzip/inflate.h
    
    182
    -index f127b6b1f..c6f5a52e1 100644
    
    167
    +index f127b6b1f..8a0e437ae 100644
    
    183 168
     --- b/src/gzip/inflate.h
    
    184 169
     +++ a/src/gzip/inflate.h
    
    185 170
     @@ -3,6 +3,9 @@
    
    ... ... @@ -197,9 +182,9 @@ index f127b6b1f..c6f5a52e1 100644
    197 182
          unsigned was;               /* initial length of match */
    
    198 183
      };
    
    199 184
     +
    
    200
    -+#endif  /* INFLATE_H */
    
    185
    ++#endif  /* !INFLATE_H */
    
    201 186
     diff --git b/src/gzip/inftrees.c a/src/gzip/inftrees.c
    
    202
    -index d8405a24c..dd4965e9a 100644
    
    187
    +index 8a208c2da..1fd655593 100644
    
    203 188
     --- b/src/gzip/inftrees.c
    
    204 189
     +++ a/src/gzip/inftrees.c
    
    205 190
     @@ -8,7 +8,7 @@
    
    ... ... @@ -208,11 +193,11 @@ index d8405a24c..dd4965e9a 100644
    208 193
      
    
    209 194
     -const char inflate_copyright[] =
    
    210 195
     +static const char inflate_copyright[] =
    
    211
    -    " inflate 1.2.13 Copyright 1995-2022 Mark Adler ";
    
    196
    +    " inflate 1.3 Copyright 1995-2023 Mark Adler ";
    
    212 197
      /*
    
    213 198
        If you use the zlib library in a product, an acknowledgment is welcome
    
    214 199
     diff --git b/src/gzip/inftrees.h a/src/gzip/inftrees.h
    
    215
    -index f53665311..a2207efb1 100644
    
    200
    +index a10712d8c..47f726c36 100644
    
    216 201
     --- b/src/gzip/inftrees.h
    
    217 202
     +++ a/src/gzip/inftrees.h
    
    218 203
     @@ -3,6 +3,9 @@
    
    ... ... @@ -229,14 +214,14 @@ index f53665311..a2207efb1 100644
    229 214
          DISTS
    
    230 215
      } codetype;
    
    231 216
      
    
    232
    --int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens,
    
    233
    -+static int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens,
    
    234
    -                              unsigned codes, code FAR * FAR *table,
    
    235
    -                              unsigned FAR *bits, unsigned short FAR *work));
    
    217
    +-int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens,
    
    218
    ++static int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens,
    
    219
    +                                 unsigned codes, code FAR * FAR *table,
    
    220
    +                                 unsigned FAR *bits, unsigned short FAR *work);
    
    236 221
     +
    
    237
    -+#endif  /* INFTREES_H_ */
    
    222
    ++#endif  /* !INFTREES_H */
    
    238 223
     diff --git b/src/gzip/zlib.h a/src/gzip/zlib.h
    
    239
    -index 953cb5012..3f2f76e3c 100644
    
    224
    +index 6b7244f99..5c7a884c9 100644
    
    240 225
     --- b/src/gzip/zlib.h
    
    241 226
     +++ a/src/gzip/zlib.h
    
    242 227
     @@ -31,7 +31,7 @@
    
    ... ... @@ -257,60 +242,60 @@ index 953cb5012..3f2f76e3c 100644
    257 242
      #define zlib_version zlibVersion()
    
    258 243
      /* for compatibility with versions < 1.0.2 */
    
    259 244
      
    
    260
    -@@ -373,6 +375,7 @@ ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
    
    245
    +@@ -373,6 +375,7 @@ ZEXTERN int ZEXPORT deflateEnd(z_streamp strm);
    
    261 246
         deallocated).
    
    262 247
      */
    
    263 248
      
    
    264 249
     +#endif  /* !Z_FREETYPE */
    
    265 250
      
    
    266 251
      /*
    
    267
    - ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
    
    268
    -@@ -534,6 +537,8 @@ ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
    
    252
    + ZEXTERN int ZEXPORT inflateInit(z_streamp strm);
    
    253
    +@@ -535,6 +538,8 @@ ZEXTERN int ZEXPORT inflateEnd(z_streamp strm);
    
    269 254
          The following functions are needed only in some special applications.
    
    270 255
      */
    
    271 256
      
    
    272 257
     +#ifndef Z_FREETYPE
    
    273 258
     +
    
    274 259
      /*
    
    275
    - ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
    
    276
    -                                      int  level,
    
    277
    -@@ -956,6 +961,8 @@ ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
    
    260
    + ZEXTERN int ZEXPORT deflateInit2(z_streamp strm,
    
    261
    +                                  int level,
    
    262
    +@@ -958,6 +963,8 @@ ZEXTERN int ZEXPORT inflateCopy(z_streamp dest,
    
    278 263
         destination.
    
    279 264
      */
    
    280 265
      
    
    281 266
     +#endif  /* !Z_FREETYPE */
    
    282 267
     +
    
    283
    - ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
    
    268
    + ZEXTERN int ZEXPORT inflateReset(z_streamp strm);
    
    284 269
      /*
    
    285 270
           This function is equivalent to inflateEnd followed by inflateInit,
    
    286
    -@@ -980,6 +987,8 @@ ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm,
    
    271
    +@@ -983,6 +990,8 @@ ZEXTERN int ZEXPORT inflateReset2(z_streamp strm,
    
    287 272
         the windowBits parameter is invalid.
    
    288 273
      */
    
    289 274
      
    
    290 275
     +#ifndef Z_FREETYPE
    
    291 276
     +
    
    292
    - ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
    
    293
    -                                      int bits,
    
    294
    -                                      int value));
    
    295
    -@@ -1069,6 +1078,8 @@ ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm,
    
    277
    + ZEXTERN int ZEXPORT inflatePrime(z_streamp strm,
    
    278
    +                                  int bits,
    
    279
    +                                  int value);
    
    280
    +@@ -1072,6 +1081,8 @@ ZEXTERN int ZEXPORT inflateGetHeader(z_streamp strm,
    
    296 281
         stream state was inconsistent.
    
    297 282
      */
    
    298 283
      
    
    299 284
     +#endif  /* !Z_FREETYPE */
    
    300 285
     +
    
    301 286
      /*
    
    302
    - ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
    
    303
    -                                         unsigned char FAR *window));
    
    304
    -@@ -1095,6 +1106,8 @@ typedef unsigned (*in_func) OF((void FAR *,
    
    305
    -                                 z_const unsigned char FAR * FAR *));
    
    306
    - typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
    
    287
    + ZEXTERN int ZEXPORT inflateBackInit(z_streamp strm, int windowBits,
    
    288
    +                                     unsigned char FAR *window);
    
    289
    +@@ -1098,6 +1109,8 @@ typedef unsigned (*in_func)(void FAR *,
    
    290
    +                             z_const unsigned char FAR * FAR *);
    
    291
    + typedef int (*out_func)(void FAR *, unsigned char FAR *, unsigned);
    
    307 292
      
    
    308 293
     +#ifndef Z_FREETYPE
    
    309 294
     +
    
    310
    - ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
    
    311
    -                                     in_func in, void FAR *in_desc,
    
    312
    -                                     out_func out, void FAR *out_desc));
    
    313
    -@@ -1214,6 +1227,8 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
    
    295
    + ZEXTERN int ZEXPORT inflateBack(z_streamp strm,
    
    296
    +                                 in_func in, void FAR *in_desc,
    
    297
    +                                 out_func out, void FAR *out_desc);
    
    298
    +@@ -1217,6 +1230,8 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags(void);
    
    314 299
           27-31: 0 (reserved)
    
    315 300
       */
    
    316 301
      
    
    ... ... @@ -319,63 +304,61 @@ index 953cb5012..3f2f76e3c 100644
    319 304
      #ifndef Z_SOLO
    
    320 305
      
    
    321 306
                              /* utility functions */
    
    322
    -@@ -1765,6 +1780,8 @@ ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t len2));
    
    307
    +@@ -1768,6 +1783,8 @@ ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t len2);
    
    323 308
         crc32_combine_op().
    
    324 309
      */
    
    325 310
      
    
    326 311
     +#ifndef Z_FREETYPE
    
    327 312
     +
    
    328
    - ZEXTERN uLong ZEXPORT crc32_combine_op OF((uLong crc1, uLong crc2, uLong op));
    
    313
    + ZEXTERN uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op);
    
    329 314
      /*
    
    330 315
           Give the same result as crc32_combine(), using op in place of len2. op is
    
    331
    -@@ -1822,6 +1839,19 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
    
    316
    +@@ -1825,6 +1842,17 @@ ZEXTERN int ZEXPORT inflateBackInit_(z_streamp strm, int windowBits,
    
    332 317
                                 ZLIB_VERSION, (int)sizeof(z_stream))
    
    333 318
      #endif
    
    334 319
      
    
    335 320
     +#else  /* Z_FREETYPE */
    
    336 321
     +
    
    337
    -+
    
    338
    -+ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int  windowBits,
    
    339
    -+                                      const char *version, int stream_size));
    
    322
    ++ZEXTERN int ZEXPORT inflateInit2_(z_streamp strm, int  windowBits,
    
    323
    ++                                  const char *version, int stream_size);
    
    340 324
     +
    
    341 325
     +#  define inflateInit2(strm, windowBits) \
    
    342 326
     +          inflateInit2_((strm), (windowBits), ZLIB_VERSION, \
    
    343 327
     +                        (int)sizeof(z_stream))
    
    344 328
     +
    
    345 329
     +#endif  /* Z_FREETYPE */
    
    346
    -+
    
    347 330
     +
    
    348 331
      #ifndef Z_SOLO
    
    349 332
      
    
    350 333
      /* gzgetc() macro and its supporting function and exposed data structure.  Note
    
    351
    -@@ -1901,20 +1931,25 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file));  /* backward compatibility */
    
    334
    +@@ -1904,20 +1932,25 @@ ZEXTERN int ZEXPORT gzgetc_(gzFile file);       /* backward compatibility */
    
    352 335
      
    
    353 336
      #else /* Z_SOLO */
    
    354 337
      
    
    355 338
     +#ifndef Z_FREETYPE
    
    356
    -    ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
    
    357
    -    ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
    
    358
    -    ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t));
    
    339
    +    ZEXTERN uLong ZEXPORT adler32_combine(uLong, uLong, z_off_t);
    
    340
    +    ZEXTERN uLong ZEXPORT crc32_combine(uLong, uLong, z_off_t);
    
    341
    +    ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t);
    
    359 342
     +#endif
    
    360 343
      
    
    361 344
      #endif /* !Z_SOLO */
    
    362 345
      
    
    363 346
      /* undocumented functions */
    
    364 347
     +#ifndef Z_FREETYPE
    
    365
    - ZEXTERN const char   * ZEXPORT zError           OF((int));
    
    366
    - ZEXTERN int            ZEXPORT inflateSyncPoint OF((z_streamp));
    
    367
    - ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table    OF((void));
    
    368
    - ZEXTERN int            ZEXPORT inflateUndermine OF((z_streamp, int));
    
    369
    - ZEXTERN int            ZEXPORT inflateValidate OF((z_streamp, int));
    
    370
    - ZEXTERN unsigned long  ZEXPORT inflateCodesUsed OF((z_streamp));
    
    348
    + ZEXTERN const char   * ZEXPORT zError(int);
    
    349
    + ZEXTERN int            ZEXPORT inflateSyncPoint(z_streamp);
    
    350
    + ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table(void);
    
    351
    + ZEXTERN int            ZEXPORT inflateUndermine(z_streamp, int);
    
    352
    + ZEXTERN int            ZEXPORT inflateValidate(z_streamp, int);
    
    353
    + ZEXTERN unsigned long  ZEXPORT inflateCodesUsed(z_streamp);
    
    371 354
     +#endif  /* !Z_FREETYPE */
    
    372
    - ZEXTERN int            ZEXPORT inflateResetKeep OF((z_streamp));
    
    355
    + ZEXTERN int            ZEXPORT inflateResetKeep(z_streamp);
    
    373 356
     +#ifndef Z_FREETYPE
    
    374
    - ZEXTERN int            ZEXPORT deflateResetKeep OF((z_streamp));
    
    357
    + ZEXTERN int            ZEXPORT deflateResetKeep(z_streamp);
    
    375 358
      #if defined(_WIN32) && !defined(Z_SOLO)
    
    376
    - ZEXTERN gzFile         ZEXPORT gzopen_w OF((const wchar_t *path,
    
    377
    -@@ -1927,6 +1962,7 @@ ZEXTERN int            ZEXPORTVA gzvprintf Z_ARG((gzFile file,
    
    378
    -                                                   va_list va));
    
    359
    + ZEXTERN gzFile         ZEXPORT gzopen_w(const wchar_t *path,
    
    360
    +@@ -1930,6 +1963,7 @@ ZEXTERN int            ZEXPORTVA gzvprintf(gzFile file,
    
    361
    +                                            va_list va);
    
    379 362
      #  endif
    
    380 363
      #endif
    
    381 364
     +#endif  /* !Z_FREETYPE */
    
    ... ... @@ -383,7 +366,7 @@ index 953cb5012..3f2f76e3c 100644
    383 366
      #ifdef __cplusplus
    
    384 367
      }
    
    385 368
     diff --git b/src/gzip/zutil.c a/src/gzip/zutil.c
    
    386
    -index ef174ca64..542706ca0 100644
    
    369
    +index b1c5d2d3c..f76def425 100644
    
    387 370
     --- b/src/gzip/zutil.c
    
    388 371
     +++ a/src/gzip/zutil.c
    
    389 372
     @@ -10,6 +10,8 @@
    
    ... ... @@ -395,7 +378,7 @@ index ef174ca64..542706ca0 100644
    395 378
      z_const char * const z_errmsg[10] = {
    
    396 379
          (z_const char *)"need dictionary",     /* Z_NEED_DICT       2  */
    
    397 380
          (z_const char *)"stream end",          /* Z_STREAM_END      1  */
    
    398
    -@@ -138,6 +140,8 @@ const char * ZEXPORT zError(
    
    381
    +@@ -132,6 +134,8 @@ const char * ZEXPORT zError(int err) {
    
    399 382
          return ERR_MSG(err);
    
    400 383
      }
    
    401 384
      
    
    ... ... @@ -404,16 +387,15 @@ index ef174ca64..542706ca0 100644
    404 387
      #if defined(_WIN32_WCE) && _WIN32_WCE < 0x800
    
    405 388
          /* The older Microsoft C Run-Time Library for Windows CE doesn't have
    
    406 389
           * errno.  We define it as a global variable to simplify porting.
    
    407
    -@@ -159,6 +163,8 @@ void ZLIB_INTERNAL zmemcpy(
    
    390
    +@@ -149,6 +153,7 @@ void ZLIB_INTERNAL zmemcpy(Bytef* dest, const Bytef* source, uInt len) {
    
    408 391
          } while (--len != 0);
    
    409 392
      }
    
    410 393
      
    
    411 394
     +#ifndef Z_FREETYPE
    
    412
    -+
    
    413
    - int ZLIB_INTERNAL zmemcmp(
    
    414
    -     const Bytef* s1,
    
    415
    -     const Bytef* s2,
    
    416
    -@@ -181,6 +187,7 @@ void ZLIB_INTERNAL zmemzero(
    
    395
    + int ZLIB_INTERNAL zmemcmp(const Bytef* s1, const Bytef* s2, uInt len) {
    
    396
    +     uInt j;
    
    397
    + 
    
    398
    +@@ -164,6 +169,7 @@ void ZLIB_INTERNAL zmemzero(Bytef* dest, uInt len) {
    
    417 399
              *dest++ = 0;  /* ??? to be unrolled */
    
    418 400
          } while (--len != 0);
    
    419 401
      }
    
    ... ... @@ -422,7 +404,7 @@ index ef174ca64..542706ca0 100644
    422 404
      
    
    423 405
      #ifndef Z_SOLO
    
    424 406
     diff --git b/src/gzip/zutil.h a/src/gzip/zutil.h
    
    425
    -index 0bc7f4ecd..055ba8b62 100644
    
    407
    +index 902a304cc..a2c046a1f 100644
    
    426 408
     --- b/src/gzip/zutil.h
    
    427 409
     +++ a/src/gzip/zutil.h
    
    428 410
     @@ -53,8 +53,10 @@ typedef unsigned long  ulg;
    
    ... ... @@ -432,7 +414,7 @@ index 0bc7f4ecd..055ba8b62 100644
    432 414
     +#ifndef Z_FREETYPE
    
    433 415
      extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
    
    434 416
      /* (size given to avoid silly warnings with Visual C++) */
    
    435
    -+#endif  /* !Z_FREETYPE */
    
    417
    ++#endif
    
    436 418
      
    
    437 419
      #define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
    
    438 420
      
    
    ... ... @@ -446,7 +428,7 @@ index 0bc7f4ecd..055ba8b62 100644
    446 428
      #if !defined(_WIN32) && \
    
    447 429
          (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
    
    448 430
     @@ -196,6 +200,8 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
    
    449
    -     ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off_t));
    
    431
    +     ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off_t);
    
    450 432
      #endif
    
    451 433
      
    
    452 434
     +#endif  /* !Z_FREETYPE */
    
    ... ... @@ -466,4 +448,4 @@ index 0bc7f4ecd..055ba8b62 100644
    466 448
     +#    define zmemzero(dest, len) ft_memset(dest, 0, len)
    
    467 449
      #  endif
    
    468 450
      #else
    
    469
    -    void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len));
    451
    +    void ZLIB_INTERNAL zmemcpy(Bytef* dest, const Bytef* source, uInt len);

  • src/gzip/zlib.h
    1 1
     /* zlib.h -- interface of the 'zlib' general purpose compression library
    
    2
    -  version 1.2.13, October 13th, 2022
    
    2
    +  version 1.3, August 18th, 2023
    
    3 3
     
    
    4
    -  Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler
    
    4
    +  Copyright (C) 1995-2023 Jean-loup Gailly and Mark Adler
    
    5 5
     
    
    6 6
       This software is provided 'as-is', without any express or implied
    
    7 7
       warranty.  In no event will the authors be held liable for any damages
    
    ... ... @@ -37,11 +37,11 @@
    37 37
     extern "C" {
    
    38 38
     #endif
    
    39 39
     
    
    40
    -#define ZLIB_VERSION "1.2.13"
    
    41
    -#define ZLIB_VERNUM 0x12d0
    
    40
    +#define ZLIB_VERSION "1.3"
    
    41
    +#define ZLIB_VERNUM 0x1300
    
    42 42
     #define ZLIB_VER_MAJOR 1
    
    43
    -#define ZLIB_VER_MINOR 2
    
    44
    -#define ZLIB_VER_REVISION 13
    
    43
    +#define ZLIB_VER_MINOR 3
    
    44
    +#define ZLIB_VER_REVISION 0
    
    45 45
     #define ZLIB_VER_SUBREVISION 0
    
    46 46
     
    
    47 47
     /*
    
    ... ... @@ -78,8 +78,8 @@ extern "C" {
    78 78
       even in the case of corrupted input.
    
    79 79
     */
    
    80 80
     
    
    81
    -typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
    
    82
    -typedef void   (*free_func)  OF((voidpf opaque, voidpf address));
    
    81
    +typedef voidpf (*alloc_func)(voidpf opaque, uInt items, uInt size);
    
    82
    +typedef void   (*free_func)(voidpf opaque, voidpf address);
    
    83 83
     
    
    84 84
     struct internal_state;
    
    85 85
     
    
    ... ... @@ -219,7 +219,7 @@ typedef gz_header FAR *gz_headerp;
    219 219
     
    
    220 220
                             /* basic functions */
    
    221 221
     
    
    222
    -ZEXTERN const char * ZEXPORT zlibVersion OF((void));
    
    222
    +ZEXTERN const char * ZEXPORT zlibVersion(void);
    
    223 223
     /* The application can compare zlibVersion and ZLIB_VERSION for consistency.
    
    224 224
        If the first character differs, the library code actually used is not
    
    225 225
        compatible with the zlib.h header file used by the application.  This check
    
    ... ... @@ -227,12 +227,12 @@ ZEXTERN const char * ZEXPORT zlibVersion OF((void));
    227 227
      */
    
    228 228
     
    
    229 229
     /*
    
    230
    -ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
    
    230
    +ZEXTERN int ZEXPORT deflateInit(z_streamp strm, int level);
    
    231 231
     
    
    232 232
          Initializes the internal stream state for compression.  The fields
    
    233 233
        zalloc, zfree and opaque must be initialized before by the caller.  If
    
    234 234
        zalloc and zfree are set to Z_NULL, deflateInit updates them to use default
    
    235
    -   allocation functions.
    
    235
    +   allocation functions.  total_in, total_out, adler, and msg are initialized.
    
    236 236
     
    
    237 237
          The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
    
    238 238
        1 gives best speed, 9 gives best compression, 0 gives no compression at all
    
    ... ... @@ -249,7 +249,7 @@ ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
    249 249
     */
    
    250 250
     
    
    251 251
     
    
    252
    -ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
    
    252
    +ZEXTERN int ZEXPORT deflate(z_streamp strm, int flush);
    
    253 253
     /*
    
    254 254
         deflate compresses as much data as possible, and stops when the input
    
    255 255
       buffer becomes empty or the output buffer becomes full.  It may introduce
    
    ... ... @@ -322,8 +322,8 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
    322 322
       with the same value of the flush parameter and more output space (updated
    
    323 323
       avail_out), until the flush is complete (deflate returns with non-zero
    
    324 324
       avail_out).  In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
    
    325
    -  avail_out is greater than six to avoid repeated flush markers due to
    
    326
    -  avail_out == 0 on return.
    
    325
    +  avail_out is greater than six when the flush marker begins, in order to avoid
    
    326
    +  repeated flush markers upon calling deflate() again when avail_out == 0.
    
    327 327
     
    
    328 328
         If the parameter flush is set to Z_FINISH, pending input is processed,
    
    329 329
       pending output is flushed and deflate returns with Z_STREAM_END if there was
    
    ... ... @@ -362,7 +362,7 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
    362 362
     */
    
    363 363
     
    
    364 364
     
    
    365
    -ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
    
    365
    +ZEXTERN int ZEXPORT deflateEnd(z_streamp strm);
    
    366 366
     /*
    
    367 367
          All dynamically allocated data structures for this stream are freed.
    
    368 368
        This function discards any unprocessed input and does not flush any pending
    
    ... ... @@ -378,7 +378,7 @@ ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
    378 378
     #endif  /* !Z_FREETYPE */
    
    379 379
     
    
    380 380
     /*
    
    381
    -ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
    
    381
    +ZEXTERN int ZEXPORT inflateInit(z_streamp strm);
    
    382 382
     
    
    383 383
          Initializes the internal stream state for decompression.  The fields
    
    384 384
        next_in, avail_in, zalloc, zfree and opaque must be initialized before by
    
    ... ... @@ -386,7 +386,8 @@ ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
    386 386
        read or consumed.  The allocation of a sliding window will be deferred to
    
    387 387
        the first call of inflate (if the decompression does not complete on the
    
    388 388
        first call).  If zalloc and zfree are set to Z_NULL, inflateInit updates
    
    389
    -   them to use default allocation functions.
    
    389
    +   them to use default allocation functions.  total_in, total_out, adler, and
    
    390
    +   msg are initialized.
    
    390 391
     
    
    391 392
          inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
    
    392 393
        memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
    
    ... ... @@ -400,7 +401,7 @@ ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
    400 401
     */
    
    401 402
     
    
    402 403
     
    
    403
    -ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
    
    404
    +ZEXTERN int ZEXPORT inflate(z_streamp strm, int flush);
    
    404 405
     /*
    
    405 406
         inflate decompresses as much data as possible, and stops when the input
    
    406 407
       buffer becomes empty or the output buffer becomes full.  It may introduce
    
    ... ... @@ -520,7 +521,7 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
    520 521
     */
    
    521 522
     
    
    522 523
     
    
    523
    -ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
    
    524
    +ZEXTERN int ZEXPORT inflateEnd(z_streamp strm);
    
    524 525
     /*
    
    525 526
          All dynamically allocated data structures for this stream are freed.
    
    526 527
        This function discards any unprocessed input and does not flush any pending
    
    ... ... @@ -540,12 +541,12 @@ ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
    540 541
     #ifndef Z_FREETYPE
    
    541 542
     
    
    542 543
     /*
    
    543
    -ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
    
    544
    -                                     int  level,
    
    545
    -                                     int  method,
    
    546
    -                                     int  windowBits,
    
    547
    -                                     int  memLevel,
    
    548
    -                                     int  strategy));
    
    544
    +ZEXTERN int ZEXPORT deflateInit2(z_streamp strm,
    
    545
    +                                 int level,
    
    546
    +                                 int method,
    
    547
    +                                 int windowBits,
    
    548
    +                                 int memLevel,
    
    549
    +                                 int strategy);
    
    549 550
     
    
    550 551
          This is another version of deflateInit with more compression options.  The
    
    551 552
        fields zalloc, zfree and opaque must be initialized before by the caller.
    
    ... ... @@ -612,9 +613,9 @@ ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
    612 613
        compression: this will be done by deflate().
    
    613 614
     */
    
    614 615
     
    
    615
    -ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
    
    616
    -                                             const Bytef *dictionary,
    
    617
    -                                             uInt  dictLength));
    
    616
    +ZEXTERN int ZEXPORT deflateSetDictionary(z_streamp strm,
    
    617
    +                                         const Bytef *dictionary,
    
    618
    +                                         uInt  dictLength);
    
    618 619
     /*
    
    619 620
          Initializes the compression dictionary from the given byte sequence
    
    620 621
        without producing any compressed output.  When using the zlib format, this
    
    ... ... @@ -656,9 +657,9 @@ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
    656 657
        not perform any compression: this will be done by deflate().
    
    657 658
     */
    
    658 659
     
    
    659
    -ZEXTERN int ZEXPORT deflateGetDictionary OF((z_streamp strm,
    
    660
    -                                             Bytef *dictionary,
    
    661
    -                                             uInt  *dictLength));
    
    660
    +ZEXTERN int ZEXPORT deflateGetDictionary(z_streamp strm,
    
    661
    +                                         Bytef *dictionary,
    
    662
    +                                         uInt  *dictLength);
    
    662 663
     /*
    
    663 664
          Returns the sliding dictionary being maintained by deflate.  dictLength is
    
    664 665
        set to the number of bytes in the dictionary, and that many bytes are copied
    
    ... ... @@ -678,8 +679,8 @@ ZEXTERN int ZEXPORT deflateGetDictionary OF((z_streamp strm,
    678 679
        stream state is inconsistent.
    
    679 680
     */
    
    680 681
     
    
    681
    -ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
    
    682
    -                                    z_streamp source));
    
    682
    +ZEXTERN int ZEXPORT deflateCopy(z_streamp dest,
    
    683
    +                                z_streamp source);
    
    683 684
     /*
    
    684 685
          Sets the destination stream as a complete copy of the source stream.
    
    685 686
     
    
    ... ... @@ -696,20 +697,20 @@ ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
    696 697
        destination.
    
    697 698
     */
    
    698 699
     
    
    699
    -ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
    
    700
    +ZEXTERN int ZEXPORT deflateReset(z_streamp strm);
    
    700 701
     /*
    
    701 702
          This function is equivalent to deflateEnd followed by deflateInit, but
    
    702 703
        does not free and reallocate the internal compression state.  The stream
    
    703 704
        will leave the compression level and any other attributes that may have been
    
    704
    -   set unchanged.
    
    705
    +   set unchanged.  total_in, total_out, adler, and msg are initialized.
    
    705 706
     
    
    706 707
          deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
    
    707 708
        stream state was inconsistent (such as zalloc or state being Z_NULL).
    
    708 709
     */
    
    709 710
     
    
    710
    -ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
    
    711
    -                                      int level,
    
    712
    -                                      int strategy));
    
    711
    +ZEXTERN int ZEXPORT deflateParams(z_streamp strm,
    
    712
    +                                  int level,
    
    713
    +                                  int strategy);
    
    713 714
     /*
    
    714 715
          Dynamically update the compression level and compression strategy.  The
    
    715 716
        interpretation of level and strategy is as in deflateInit2().  This can be
    
    ... ... @@ -734,7 +735,7 @@ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
    734 735
        Then no more input data should be provided before the deflateParams() call.
    
    735 736
        If this is done, the old level and strategy will be applied to the data
    
    736 737
        compressed before deflateParams(), and the new level and strategy will be
    
    737
    -   applied to the the data compressed after deflateParams().
    
    738
    +   applied to the data compressed after deflateParams().
    
    738 739
     
    
    739 740
          deflateParams returns Z_OK on success, Z_STREAM_ERROR if the source stream
    
    740 741
        state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if
    
    ... ... @@ -745,11 +746,11 @@ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
    745 746
        retried with more output space.
    
    746 747
     */
    
    747 748
     
    
    748
    -ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm,
    
    749
    -                                    int good_length,
    
    750
    -                                    int max_lazy,
    
    751
    -                                    int nice_length,
    
    752
    -                                    int max_chain));
    
    749
    +ZEXTERN int ZEXPORT deflateTune(z_streamp strm,
    
    750
    +                                int good_length,
    
    751
    +                                int max_lazy,
    
    752
    +                                int nice_length,
    
    753
    +                                int max_chain);
    
    753 754
     /*
    
    754 755
          Fine tune deflate's internal compression parameters.  This should only be
    
    755 756
        used by someone who understands the algorithm used by zlib's deflate for
    
    ... ... @@ -762,8 +763,8 @@ ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm,
    762 763
        returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
    
    763 764
      */
    
    764 765
     
    
    765
    -ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
    
    766
    -                                       uLong sourceLen));
    
    766
    +ZEXTERN uLong ZEXPORT deflateBound(z_streamp strm,
    
    767
    +                                   uLong sourceLen);
    
    767 768
     /*
    
    768 769
          deflateBound() returns an upper bound on the compressed size after
    
    769 770
        deflation of sourceLen bytes.  It must be called after deflateInit() or
    
    ... ... @@ -777,9 +778,9 @@ ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
    777 778
        than Z_FINISH or Z_NO_FLUSH are used.
    
    778 779
     */
    
    779 780
     
    
    780
    -ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm,
    
    781
    -                                       unsigned *pending,
    
    782
    -                                       int *bits));
    
    781
    +ZEXTERN int ZEXPORT deflatePending(z_streamp strm,
    
    782
    +                                   unsigned *pending,
    
    783
    +                                   int *bits);
    
    783 784
     /*
    
    784 785
          deflatePending() returns the number of bytes and bits of output that have
    
    785 786
        been generated, but not yet provided in the available output.  The bytes not
    
    ... ... @@ -792,9 +793,9 @@ ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm,
    792 793
        stream state was inconsistent.
    
    793 794
      */
    
    794 795
     
    
    795
    -ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
    
    796
    -                                     int bits,
    
    797
    -                                     int value));
    
    796
    +ZEXTERN int ZEXPORT deflatePrime(z_streamp strm,
    
    797
    +                                 int bits,
    
    798
    +                                 int value);
    
    798 799
     /*
    
    799 800
          deflatePrime() inserts bits in the deflate output stream.  The intent
    
    800 801
        is that this function is used to start off the deflate output with the bits
    
    ... ... @@ -809,8 +810,8 @@ ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
    809 810
        source stream state was inconsistent.
    
    810 811
     */
    
    811 812
     
    
    812
    -ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
    
    813
    -                                         gz_headerp head));
    
    813
    +ZEXTERN int ZEXPORT deflateSetHeader(z_streamp strm,
    
    814
    +                                     gz_headerp head);
    
    814 815
     /*
    
    815 816
          deflateSetHeader() provides gzip header information for when a gzip
    
    816 817
        stream is requested by deflateInit2().  deflateSetHeader() may be called
    
    ... ... @@ -826,16 +827,17 @@ ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
    826 827
        gzip file" and give up.
    
    827 828
     
    
    828 829
          If deflateSetHeader is not used, the default gzip header has text false,
    
    829
    -   the time set to zero, and os set to 255, with no extra, name, or comment
    
    830
    -   fields.  The gzip header is returned to the default state by deflateReset().
    
    830
    +   the time set to zero, and os set to the current operating system, with no
    
    831
    +   extra, name, or comment fields.  The gzip header is returned to the default
    
    832
    +   state by deflateReset().
    
    831 833
     
    
    832 834
          deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
    
    833 835
        stream state was inconsistent.
    
    834 836
     */
    
    835 837
     
    
    836 838
     /*
    
    837
    -ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
    
    838
    -                                     int  windowBits));
    
    839
    +ZEXTERN int ZEXPORT inflateInit2(z_streamp strm,
    
    840
    +                                 int windowBits);
    
    839 841
     
    
    840 842
          This is another version of inflateInit with an extra parameter.  The
    
    841 843
        fields next_in, avail_in, zalloc, zfree and opaque must be initialized
    
    ... ... @@ -888,9 +890,9 @@ ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
    888 890
        deferred until inflate() is called.
    
    889 891
     */
    
    890 892
     
    
    891
    -ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
    
    892
    -                                             const Bytef *dictionary,
    
    893
    -                                             uInt  dictLength));
    
    893
    +ZEXTERN int ZEXPORT inflateSetDictionary(z_streamp strm,
    
    894
    +                                         const Bytef *dictionary,
    
    895
    +                                         uInt  dictLength);
    
    894 896
     /*
    
    895 897
          Initializes the decompression dictionary from the given uncompressed byte
    
    896 898
        sequence.  This function must be called immediately after a call of inflate,
    
    ... ... @@ -911,9 +913,9 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
    911 913
        inflate().
    
    912 914
     */
    
    913 915
     
    
    914
    -ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm,
    
    915
    -                                             Bytef *dictionary,
    
    916
    -                                             uInt  *dictLength));
    
    916
    +ZEXTERN int ZEXPORT inflateGetDictionary(z_streamp strm,
    
    917
    +                                         Bytef *dictionary,
    
    918
    +                                         uInt  *dictLength);
    
    917 919
     /*
    
    918 920
          Returns the sliding dictionary being maintained by inflate.  dictLength is
    
    919 921
        set to the number of bytes in the dictionary, and that many bytes are copied
    
    ... ... @@ -926,7 +928,7 @@ ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm,
    926 928
        stream state is inconsistent.
    
    927 929
     */
    
    928 930
     
    
    929
    -ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
    
    931
    +ZEXTERN int ZEXPORT inflateSync(z_streamp strm);
    
    930 932
     /*
    
    931 933
          Skips invalid compressed data until a possible full flush point (see above
    
    932 934
        for the description of deflate with Z_FULL_FLUSH) can be found, or until all
    
    ... ... @@ -945,8 +947,8 @@ ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
    945 947
        input each time, until success or end of the input data.
    
    946 948
     */
    
    947 949
     
    
    948
    -ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
    
    949
    -                                    z_streamp source));
    
    950
    +ZEXTERN int ZEXPORT inflateCopy(z_streamp dest,
    
    951
    +                                z_streamp source);
    
    950 952
     /*
    
    951 953
          Sets the destination stream as a complete copy of the source stream.
    
    952 954
     
    
    ... ... @@ -963,18 +965,19 @@ ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
    963 965
     
    
    964 966
     #endif  /* !Z_FREETYPE */
    
    965 967
     
    
    966
    -ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
    
    968
    +ZEXTERN int ZEXPORT inflateReset(z_streamp strm);
    
    967 969
     /*
    
    968 970
          This function is equivalent to inflateEnd followed by inflateInit,
    
    969 971
        but does not free and reallocate the internal decompression state.  The
    
    970 972
        stream will keep attributes that may have been set by inflateInit2.
    
    973
    +   total_in, total_out, adler, and msg are initialized.
    
    971 974
     
    
    972 975
          inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
    
    973 976
        stream state was inconsistent (such as zalloc or state being Z_NULL).
    
    974 977
     */
    
    975 978
     
    
    976
    -ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm,
    
    977
    -                                      int windowBits));
    
    979
    +ZEXTERN int ZEXPORT inflateReset2(z_streamp strm,
    
    980
    +                                  int windowBits);
    
    978 981
     /*
    
    979 982
          This function is the same as inflateReset, but it also permits changing
    
    980 983
        the wrap and window size requests.  The windowBits parameter is interpreted
    
    ... ... @@ -989,9 +992,9 @@ ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm,
    989 992
     
    
    990 993
     #ifndef Z_FREETYPE
    
    991 994
     
    
    992
    -ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
    
    993
    -                                     int bits,
    
    994
    -                                     int value));
    
    995
    +ZEXTERN int ZEXPORT inflatePrime(z_streamp strm,
    
    996
    +                                 int bits,
    
    997
    +                                 int value);
    
    995 998
     /*
    
    996 999
          This function inserts bits in the inflate input stream.  The intent is
    
    997 1000
        that this function is used to start inflating at a bit position in the
    
    ... ... @@ -1010,7 +1013,7 @@ ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
    1010 1013
        stream state was inconsistent.
    
    1011 1014
     */
    
    1012 1015
     
    
    1013
    -ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm));
    
    1016
    +ZEXTERN long ZEXPORT inflateMark(z_streamp strm);
    
    1014 1017
     /*
    
    1015 1018
          This function returns two values, one in the lower 16 bits of the return
    
    1016 1019
        value, and the other in the remaining upper bits, obtained by shifting the
    
    ... ... @@ -1038,8 +1041,8 @@ ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm));
    1038 1041
        source stream state was inconsistent.
    
    1039 1042
     */
    
    1040 1043
     
    
    1041
    -ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm,
    
    1042
    -                                         gz_headerp head));
    
    1044
    +ZEXTERN int ZEXPORT inflateGetHeader(z_streamp strm,
    
    1045
    +                                     gz_headerp head);
    
    1043 1046
     /*
    
    1044 1047
          inflateGetHeader() requests that gzip header information be stored in the
    
    1045 1048
        provided gz_header structure.  inflateGetHeader() may be called after
    
    ... ... @@ -1081,8 +1084,8 @@ ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm,
    1081 1084
     #endif  /* !Z_FREETYPE */
    
    1082 1085
     
    
    1083 1086
     /*
    
    1084
    -ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
    
    1085
    -                                        unsigned char FAR *window));
    
    1087
    +ZEXTERN int ZEXPORT inflateBackInit(z_streamp strm, int windowBits,
    
    1088
    +                                    unsigned char FAR *window);
    
    1086 1089
     
    
    1087 1090
          Initialize the internal stream state for decompression using inflateBack()
    
    1088 1091
        calls.  The fields zalloc, zfree and opaque in strm must be initialized
    
    ... ... @@ -1102,15 +1105,15 @@ ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
    1102 1105
        the version of the header file.
    
    1103 1106
     */
    
    1104 1107
     
    
    1105
    -typedef unsigned (*in_func) OF((void FAR *,
    
    1106
    -                                z_const unsigned char FAR * FAR *));
    
    1107
    -typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
    
    1108
    +typedef unsigned (*in_func)(void FAR *,
    
    1109
    +                            z_const unsigned char FAR * FAR *);
    
    1110
    +typedef int (*out_func)(void FAR *, unsigned char FAR *, unsigned);
    
    1108 1111
     
    
    1109 1112
     #ifndef Z_FREETYPE
    
    1110 1113
     
    
    1111
    -ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
    
    1112
    -                                    in_func in, void FAR *in_desc,
    
    1113
    -                                    out_func out, void FAR *out_desc));
    
    1114
    +ZEXTERN int ZEXPORT inflateBack(z_streamp strm,
    
    1115
    +                                in_func in, void FAR *in_desc,
    
    1116
    +                                out_func out, void FAR *out_desc);
    
    1114 1117
     /*
    
    1115 1118
          inflateBack() does a raw inflate with a single call using a call-back
    
    1116 1119
        interface for input and output.  This is potentially more efficient than
    
    ... ... @@ -1178,7 +1181,7 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
    1178 1181
        cannot return Z_OK.
    
    1179 1182
     */
    
    1180 1183
     
    
    1181
    -ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm));
    
    1184
    +ZEXTERN int ZEXPORT inflateBackEnd(z_streamp strm);
    
    1182 1185
     /*
    
    1183 1186
          All memory allocated by inflateBackInit() is freed.
    
    1184 1187
     
    
    ... ... @@ -1186,7 +1189,7 @@ ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm));
    1186 1189
        state was inconsistent.
    
    1187 1190
     */
    
    1188 1191
     
    
    1189
    -ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
    
    1192
    +ZEXTERN uLong ZEXPORT zlibCompileFlags(void);
    
    1190 1193
     /* Return flags indicating compile-time options.
    
    1191 1194
     
    
    1192 1195
         Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other:
    
    ... ... @@ -1241,8 +1244,8 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
    1241 1244
        you need special options.
    
    1242 1245
     */
    
    1243 1246
     
    
    1244
    -ZEXTERN int ZEXPORT compress OF((Bytef *dest,   uLongf *destLen,
    
    1245
    -                                 const Bytef *source, uLong sourceLen));
    
    1247
    +ZEXTERN int ZEXPORT compress(Bytef *dest,   uLongf *destLen,
    
    1248
    +                             const Bytef *source, uLong sourceLen);
    
    1246 1249
     /*
    
    1247 1250
          Compresses the source buffer into the destination buffer.  sourceLen is
    
    1248 1251
        the byte length of the source buffer.  Upon entry, destLen is the total size
    
    ... ... @@ -1256,9 +1259,9 @@ ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen,
    1256 1259
        buffer.
    
    1257 1260
     */
    
    1258 1261
     
    
    1259
    -ZEXTERN int ZEXPORT compress2 OF((Bytef *dest,   uLongf *destLen,
    
    1260
    -                                  const Bytef *source, uLong sourceLen,
    
    1261
    -                                  int level));
    
    1262
    +ZEXTERN int ZEXPORT compress2(Bytef *dest,   uLongf *destLen,
    
    1263
    +                              const Bytef *source, uLong sourceLen,
    
    1264
    +                              int level);
    
    1262 1265
     /*
    
    1263 1266
          Compresses the source buffer into the destination buffer.  The level
    
    1264 1267
        parameter has the same meaning as in deflateInit.  sourceLen is the byte
    
    ... ... @@ -1272,15 +1275,15 @@ ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen,
    1272 1275
        Z_STREAM_ERROR if the level parameter is invalid.
    
    1273 1276
     */
    
    1274 1277
     
    
    1275
    -ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen));
    
    1278
    +ZEXTERN uLong ZEXPORT compressBound(uLong sourceLen);
    
    1276 1279
     /*
    
    1277 1280
          compressBound() returns an upper bound on the compressed size after
    
    1278 1281
        compress() or compress2() on sourceLen bytes.  It would be used before a
    
    1279 1282
        compress() or compress2() call to allocate the destination buffer.
    
    1280 1283
     */
    
    1281 1284
     
    
    1282
    -ZEXTERN int ZEXPORT uncompress OF((Bytef *dest,   uLongf *destLen,
    
    1283
    -                                   const Bytef *source, uLong sourceLen));
    
    1285
    +ZEXTERN int ZEXPORT uncompress(Bytef *dest,   uLongf *destLen,
    
    1286
    +                               const Bytef *source, uLong sourceLen);
    
    1284 1287
     /*
    
    1285 1288
          Decompresses the source buffer into the destination buffer.  sourceLen is
    
    1286 1289
        the byte length of the source buffer.  Upon entry, destLen is the total size
    
    ... ... @@ -1297,8 +1300,8 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
    1297 1300
        buffer with the uncompressed data up to that point.
    
    1298 1301
     */
    
    1299 1302
     
    
    1300
    -ZEXTERN int ZEXPORT uncompress2 OF((Bytef *dest,   uLongf *destLen,
    
    1301
    -                                    const Bytef *source, uLong *sourceLen));
    
    1303
    +ZEXTERN int ZEXPORT uncompress2(Bytef *dest,   uLongf *destLen,
    
    1304
    +                                const Bytef *source, uLong *sourceLen);
    
    1302 1305
     /*
    
    1303 1306
          Same as uncompress, except that sourceLen is a pointer, where the
    
    1304 1307
        length of the source is *sourceLen.  On return, *sourceLen is the number of
    
    ... ... @@ -1317,7 +1320,7 @@ ZEXTERN int ZEXPORT uncompress2 OF((Bytef *dest, uLongf *destLen,
    1317 1320
     typedef struct gzFile_s *gzFile;    /* semi-opaque gzip file descriptor */
    
    1318 1321
     
    
    1319 1322
     /*
    
    1320
    -ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
    
    1323
    +ZEXTERN gzFile ZEXPORT gzopen(const char *path, const char *mode);
    
    1321 1324
     
    
    1322 1325
          Open the gzip (.gz) file at path for reading and decompressing, or
    
    1323 1326
        compressing and writing.  The mode parameter is as in fopen ("rb" or "wb")
    
    ... ... @@ -1354,7 +1357,7 @@ ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
    1354 1357
        file could not be opened.
    
    1355 1358
     */
    
    1356 1359
     
    
    1357
    -ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
    
    1360
    +ZEXTERN gzFile ZEXPORT gzdopen(int fd, const char *mode);
    
    1358 1361
     /*
    
    1359 1362
          Associate a gzFile with the file descriptor fd.  File descriptors are
    
    1360 1363
        obtained from calls like open, dup, creat, pipe or fileno (if the file has
    
    ... ... @@ -1377,7 +1380,7 @@ ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
    1377 1380
        will not detect if fd is invalid (unless fd is -1).
    
    1378 1381
     */
    
    1379 1382
     
    
    1380
    -ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));
    
    1383
    +ZEXTERN int ZEXPORT gzbuffer(gzFile file, unsigned size);
    
    1381 1384
     /*
    
    1382 1385
          Set the internal buffer size used by this library's functions for file to
    
    1383 1386
        size.  The default buffer size is 8192 bytes.  This function must be called
    
    ... ... @@ -1393,7 +1396,7 @@ ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));
    1393 1396
        too late.
    
    1394 1397
     */
    
    1395 1398
     
    
    1396
    -ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
    
    1399
    +ZEXTERN int ZEXPORT gzsetparams(gzFile file, int level, int strategy);
    
    1397 1400
     /*
    
    1398 1401
          Dynamically update the compression level and strategy for file.  See the
    
    1399 1402
        description of deflateInit2 for the meaning of these parameters. Previously
    
    ... ... @@ -1404,7 +1407,7 @@ ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
    1404 1407
        or Z_MEM_ERROR if there is a memory allocation error.
    
    1405 1408
     */
    
    1406 1409
     
    
    1407
    -ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
    
    1410
    +ZEXTERN int ZEXPORT gzread(gzFile file, voidp buf, unsigned len);
    
    1408 1411
     /*
    
    1409 1412
          Read and decompress up to len uncompressed bytes from file into buf.  If
    
    1410 1413
        the input file is not in gzip format, gzread copies the given number of
    
    ... ... @@ -1434,8 +1437,8 @@ ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
    1434 1437
        Z_STREAM_ERROR.
    
    1435 1438
     */
    
    1436 1439
     
    
    1437
    -ZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems,
    
    1438
    -                                     gzFile file));
    
    1440
    +ZEXTERN z_size_t ZEXPORT gzfread(voidp buf, z_size_t size, z_size_t nitems,
    
    1441
    +                                 gzFile file);
    
    1439 1442
     /*
    
    1440 1443
          Read and decompress up to nitems items of size size from file into buf,
    
    1441 1444
        otherwise operating as gzread() does.  This duplicates the interface of
    
    ... ... @@ -1460,14 +1463,14 @@ ZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems,
    1460 1463
        file, resetting and retrying on end-of-file, when size is not 1.
    
    1461 1464
     */
    
    1462 1465
     
    
    1463
    -ZEXTERN int ZEXPORT gzwrite OF((gzFile file, voidpc buf, unsigned len));
    
    1466
    +ZEXTERN int ZEXPORT gzwrite(gzFile file, voidpc buf, unsigned len);
    
    1464 1467
     /*
    
    1465 1468
          Compress and write the len uncompressed bytes at buf to file. gzwrite
    
    1466 1469
        returns the number of uncompressed bytes written or 0 in case of error.
    
    1467 1470
     */
    
    1468 1471
     
    
    1469
    -ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size,
    
    1470
    -                                      z_size_t nitems, gzFile file));
    
    1472
    +ZEXTERN z_size_t ZEXPORT gzfwrite(voidpc buf, z_size_t size,
    
    1473
    +                                  z_size_t nitems, gzFile file);
    
    1471 1474
     /*
    
    1472 1475
          Compress and write nitems items of size size from buf to file, duplicating
    
    1473 1476
        the interface of stdio's fwrite(), with size_t request and return types.  If
    
    ... ... @@ -1480,7 +1483,7 @@ ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size,
    1480 1483
        is returned, and the error state is set to Z_STREAM_ERROR.
    
    1481 1484
     */
    
    1482 1485
     
    
    1483
    -ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...));
    
    1486
    +ZEXTERN int ZEXPORTVA gzprintf(gzFile file, const char *format, ...);
    
    1484 1487
     /*
    
    1485 1488
          Convert, format, compress, and write the arguments (...) to file under
    
    1486 1489
        control of the string format, as in fprintf.  gzprintf returns the number of
    
    ... ... @@ -1495,7 +1498,7 @@ ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...));
    1495 1498
        This can be determined using zlibCompileFlags().
    
    1496 1499
     */
    
    1497 1500
     
    
    1498
    -ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
    
    1501
    +ZEXTERN int ZEXPORT gzputs(gzFile file, const char *s);
    
    1499 1502
     /*
    
    1500 1503
          Compress and write the given null-terminated string s to file, excluding
    
    1501 1504
        the terminating null character.
    
    ... ... @@ -1503,7 +1506,7 @@ ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
    1503 1506
          gzputs returns the number of characters written, or -1 in case of error.
    
    1504 1507
     */
    
    1505 1508
     
    
    1506
    -ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
    
    1509
    +ZEXTERN char * ZEXPORT gzgets(gzFile file, char *buf, int len);
    
    1507 1510
     /*
    
    1508 1511
          Read and decompress bytes from file into buf, until len-1 characters are
    
    1509 1512
        read, or until a newline character is read and transferred to buf, or an
    
    ... ... @@ -1517,13 +1520,13 @@ ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
    1517 1520
        buf are indeterminate.
    
    1518 1521
     */
    
    1519 1522
     
    
    1520
    -ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
    
    1523
    +ZEXTERN int ZEXPORT gzputc(gzFile file, int c);
    
    1521 1524
     /*
    
    1522 1525
          Compress and write c, converted to an unsigned char, into file.  gzputc
    
    1523 1526
        returns the value that was written, or -1 in case of error.
    
    1524 1527
     */
    
    1525 1528
     
    
    1526
    -ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
    
    1529
    +ZEXTERN int ZEXPORT gzgetc(gzFile file);
    
    1527 1530
     /*
    
    1528 1531
          Read and decompress one byte from file.  gzgetc returns this byte or -1
    
    1529 1532
        in case of end of file or error.  This is implemented as a macro for speed.
    
    ... ... @@ -1532,7 +1535,7 @@ ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
    1532 1535
        points to has been clobbered or not.
    
    1533 1536
     */
    
    1534 1537
     
    
    1535
    -ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
    
    1538
    +ZEXTERN int ZEXPORT gzungetc(int c, gzFile file);
    
    1536 1539
     /*
    
    1537 1540
          Push c back onto the stream for file to be read as the first character on
    
    1538 1541
        the next read.  At least one character of push-back is always allowed.
    
    ... ... @@ -1544,7 +1547,7 @@ ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
    1544 1547
        gzseek() or gzrewind().
    
    1545 1548
     */
    
    1546 1549
     
    
    1547
    -ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
    
    1550
    +ZEXTERN int ZEXPORT gzflush(gzFile file, int flush);
    
    1548 1551
     /*
    
    1549 1552
          Flush all pending output to file.  The parameter flush is as in the
    
    1550 1553
        deflate() function.  The return value is the zlib error number (see function
    
    ... ... @@ -1560,8 +1563,8 @@ ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
    1560 1563
     */
    
    1561 1564
     
    
    1562 1565
     /*
    
    1563
    -ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
    
    1564
    -                                   z_off_t offset, int whence));
    
    1566
    +ZEXTERN z_off_t ZEXPORT gzseek(gzFile file,
    
    1567
    +                               z_off_t offset, int whence);
    
    1565 1568
     
    
    1566 1569
          Set the starting position to offset relative to whence for the next gzread
    
    1567 1570
        or gzwrite on file.  The offset represents a number of bytes in the
    
    ... ... @@ -1579,7 +1582,7 @@ ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
    1579 1582
        would be before the current position.
    
    1580 1583
     */
    
    1581 1584
     
    
    1582
    -ZEXTERN int ZEXPORT    gzrewind OF((gzFile file));
    
    1585
    +ZEXTERN int ZEXPORT    gzrewind(gzFile file);
    
    1583 1586
     /*
    
    1584 1587
          Rewind file. This function is supported only for reading.
    
    1585 1588
     
    
    ... ... @@ -1587,7 +1590,7 @@ ZEXTERN int ZEXPORT gzrewind OF((gzFile file));
    1587 1590
     */
    
    1588 1591
     
    
    1589 1592
     /*
    
    1590
    -ZEXTERN z_off_t ZEXPORT    gztell OF((gzFile file));
    
    1593
    +ZEXTERN z_off_t ZEXPORT    gztell(gzFile file);
    
    1591 1594
     
    
    1592 1595
          Return the starting position for the next gzread or gzwrite on file.
    
    1593 1596
        This position represents a number of bytes in the uncompressed data stream,
    
    ... ... @@ -1598,7 +1601,7 @@ ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file));
    1598 1601
     */
    
    1599 1602
     
    
    1600 1603
     /*
    
    1601
    -ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file));
    
    1604
    +ZEXTERN z_off_t ZEXPORT gzoffset(gzFile file);
    
    1602 1605
     
    
    1603 1606
          Return the current compressed (actual) read or write offset of file.  This
    
    1604 1607
        offset includes the count of bytes that precede the gzip stream, for example
    
    ... ... @@ -1607,7 +1610,7 @@ ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file));
    1607 1610
        be used for a progress indicator.  On error, gzoffset() returns -1.
    
    1608 1611
     */
    
    1609 1612
     
    
    1610
    -ZEXTERN int ZEXPORT gzeof OF((gzFile file));
    
    1613
    +ZEXTERN int ZEXPORT gzeof(gzFile file);
    
    1611 1614
     /*
    
    1612 1615
          Return true (1) if the end-of-file indicator for file has been set while
    
    1613 1616
        reading, false (0) otherwise.  Note that the end-of-file indicator is set
    
    ... ... @@ -1622,7 +1625,7 @@ ZEXTERN int ZEXPORT gzeof OF((gzFile file));
    1622 1625
        has grown since the previous end of file was detected.
    
    1623 1626
     */
    
    1624 1627
     
    
    1625
    -ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
    
    1628
    +ZEXTERN int ZEXPORT gzdirect(gzFile file);
    
    1626 1629
     /*
    
    1627 1630
          Return true (1) if file is being copied directly while reading, or false
    
    1628 1631
        (0) if file is a gzip stream being decompressed.
    
    ... ... @@ -1643,7 +1646,7 @@ ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
    1643 1646
        gzip file reading and decompression, which may not be desired.)
    
    1644 1647
     */
    
    1645 1648
     
    
    1646
    -ZEXTERN int ZEXPORT    gzclose OF((gzFile file));
    
    1649
    +ZEXTERN int ZEXPORT    gzclose(gzFile file);
    
    1647 1650
     /*
    
    1648 1651
          Flush all pending output for file, if necessary, close file and
    
    1649 1652
        deallocate the (de)compression state.  Note that once file is closed, you
    
    ... ... @@ -1656,8 +1659,8 @@ ZEXTERN int ZEXPORT gzclose OF((gzFile file));
    1656 1659
        last read ended in the middle of a gzip stream, or Z_OK on success.
    
    1657 1660
     */
    
    1658 1661
     
    
    1659
    -ZEXTERN int ZEXPORT gzclose_r OF((gzFile file));
    
    1660
    -ZEXTERN int ZEXPORT gzclose_w OF((gzFile file));
    
    1662
    +ZEXTERN int ZEXPORT gzclose_r(gzFile file);
    
    1663
    +ZEXTERN int ZEXPORT gzclose_w(gzFile file);
    
    1661 1664
     /*
    
    1662 1665
          Same as gzclose(), but gzclose_r() is only for use when reading, and
    
    1663 1666
        gzclose_w() is only for use when writing or appending.  The advantage to
    
    ... ... @@ -1668,7 +1671,7 @@ ZEXTERN int ZEXPORT gzclose_w OF((gzFile file));
    1668 1671
        zlib library.
    
    1669 1672
     */
    
    1670 1673
     
    
    1671
    -ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
    
    1674
    +ZEXTERN const char * ZEXPORT gzerror(gzFile file, int *errnum);
    
    1672 1675
     /*
    
    1673 1676
          Return the error message for the last error which occurred on file.
    
    1674 1677
        errnum is set to zlib error number.  If an error occurred in the file system
    
    ... ... @@ -1684,7 +1687,7 @@ ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
    1684 1687
        functions above that do not distinguish those cases in their return values.
    
    1685 1688
     */
    
    1686 1689
     
    
    1687
    -ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
    
    1690
    +ZEXTERN void ZEXPORT gzclearerr(gzFile file);
    
    1688 1691
     /*
    
    1689 1692
          Clear the error and end-of-file flags for file.  This is analogous to the
    
    1690 1693
        clearerr() function in stdio.  This is useful for continuing to read a gzip
    
    ... ... @@ -1701,7 +1704,7 @@ ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
    1701 1704
        library.
    
    1702 1705
     */
    
    1703 1706
     
    
    1704
    -ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
    
    1707
    +ZEXTERN uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len);
    
    1705 1708
     /*
    
    1706 1709
          Update a running Adler-32 checksum with the bytes buf[0..len-1] and
    
    1707 1710
        return the updated checksum. An Adler-32 value is in the range of a 32-bit
    
    ... ... @@ -1721,15 +1724,15 @@ ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
    1721 1724
          if (adler != original_adler) error();
    
    1722 1725
     */
    
    1723 1726
     
    
    1724
    -ZEXTERN uLong ZEXPORT adler32_z OF((uLong adler, const Bytef *buf,
    
    1725
    -                                    z_size_t len));
    
    1727
    +ZEXTERN uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf,
    
    1728
    +                                z_size_t len);
    
    1726 1729
     /*
    
    1727 1730
          Same as adler32(), but with a size_t length.
    
    1728 1731
     */
    
    1729 1732
     
    
    1730 1733
     /*
    
    1731
    -ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
    
    1732
    -                                          z_off_t len2));
    
    1734
    +ZEXTERN uLong ZEXPORT adler32_combine(uLong adler1, uLong adler2,
    
    1735
    +                                      z_off_t len2);
    
    1733 1736
     
    
    1734 1737
          Combine two Adler-32 checksums into one.  For two sequences of bytes, seq1
    
    1735 1738
        and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for
    
    ... ... @@ -1739,7 +1742,7 @@ ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
    1739 1742
        negative, the result has no meaning or utility.
    
    1740 1743
     */
    
    1741 1744
     
    
    1742
    -ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
    
    1745
    +ZEXTERN uLong ZEXPORT crc32(uLong crc, const Bytef *buf, uInt len);
    
    1743 1746
     /*
    
    1744 1747
          Update a running CRC-32 with the bytes buf[0..len-1] and return the
    
    1745 1748
        updated CRC-32. A CRC-32 value is in the range of a 32-bit unsigned integer.
    
    ... ... @@ -1757,14 +1760,14 @@ ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
    1757 1760
          if (crc != original_crc) error();
    
    1758 1761
     */
    
    1759 1762
     
    
    1760
    -ZEXTERN uLong ZEXPORT crc32_z OF((uLong crc, const Bytef *buf,
    
    1761
    -                                  z_size_t len));
    
    1763
    +ZEXTERN uLong ZEXPORT crc32_z(uLong crc, const Bytef *buf,
    
    1764
    +                              z_size_t len);
    
    1762 1765
     /*
    
    1763 1766
          Same as crc32(), but with a size_t length.
    
    1764 1767
     */
    
    1765 1768
     
    
    1766 1769
     /*
    
    1767
    -ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
    
    1770
    +ZEXTERN uLong ZEXPORT crc32_combine(uLong crc1, uLong crc2, z_off_t len2);
    
    1768 1771
     
    
    1769 1772
          Combine two CRC-32 check values into one.  For two sequences of bytes,
    
    1770 1773
        seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
    
    ... ... @@ -1774,7 +1777,7 @@ ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
    1774 1777
     */
    
    1775 1778
     
    
    1776 1779
     /*
    
    1777
    -ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t len2));
    
    1780
    +ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t len2);
    
    1778 1781
     
    
    1779 1782
          Return the operator corresponding to length len2, to be used with
    
    1780 1783
        crc32_combine_op().
    
    ... ... @@ -1782,7 +1785,7 @@ ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t len2));
    1782 1785
     
    
    1783 1786
     #ifndef Z_FREETYPE
    
    1784 1787
     
    
    1785
    -ZEXTERN uLong ZEXPORT crc32_combine_op OF((uLong crc1, uLong crc2, uLong op));
    
    1788
    +ZEXTERN uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op);
    
    1786 1789
     /*
    
    1787 1790
          Give the same result as crc32_combine(), using op in place of len2. op is
    
    1788 1791
        is generated from len2 by crc32_combine_gen(). This will be faster than
    
    ... ... @@ -1795,20 +1798,20 @@ ZEXTERN uLong ZEXPORT crc32_combine_op OF((uLong crc1, uLong crc2, uLong op));
    1795 1798
     /* deflateInit and inflateInit are macros to allow checking the zlib version
    
    1796 1799
      * and the compiler's view of z_stream:
    
    1797 1800
      */
    
    1798
    -ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
    
    1799
    -                                     const char *version, int stream_size));
    
    1800
    -ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
    
    1801
    -                                     const char *version, int stream_size));
    
    1802
    -ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int  level, int  method,
    
    1803
    -                                      int windowBits, int memLevel,
    
    1804
    -                                      int strategy, const char *version,
    
    1805
    -                                      int stream_size));
    
    1806
    -ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int  windowBits,
    
    1807
    -                                      const char *version, int stream_size));
    
    1808
    -ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
    
    1809
    -                                         unsigned char FAR *window,
    
    1810
    -                                         const char *version,
    
    1811
    -                                         int stream_size));
    
    1801
    +ZEXTERN int ZEXPORT deflateInit_(z_streamp strm, int level,
    
    1802
    +                                 const char *version, int stream_size);
    
    1803
    +ZEXTERN int ZEXPORT inflateInit_(z_streamp strm,
    
    1804
    +                                 const char *version, int stream_size);
    
    1805
    +ZEXTERN int ZEXPORT deflateInit2_(z_streamp strm, int  level, int  method,
    
    1806
    +                                  int windowBits, int memLevel,
    
    1807
    +                                  int strategy, const char *version,
    
    1808
    +                                  int stream_size);
    
    1809
    +ZEXTERN int ZEXPORT inflateInit2_(z_streamp strm, int  windowBits,
    
    1810
    +                                  const char *version, int stream_size);
    
    1811
    +ZEXTERN int ZEXPORT inflateBackInit_(z_streamp strm, int windowBits,
    
    1812
    +                                     unsigned char FAR *window,
    
    1813
    +                                     const char *version,
    
    1814
    +                                     int stream_size);
    
    1812 1815
     #ifdef Z_PREFIX_SET
    
    1813 1816
     #  define z_deflateInit(strm, level) \
    
    1814 1817
               deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
    
    ... ... @@ -1841,9 +1844,8 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
    1841 1844
     
    
    1842 1845
     #else  /* Z_FREETYPE */
    
    1843 1846
     
    
    1844
    -
    
    1845
    -ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int  windowBits,
    
    1846
    -                                      const char *version, int stream_size));
    
    1847
    +ZEXTERN int ZEXPORT inflateInit2_(z_streamp strm, int  windowBits,
    
    1848
    +                                  const char *version, int stream_size);
    
    1847 1849
     
    
    1848 1850
     #  define inflateInit2(strm, windowBits) \
    
    1849 1851
               inflateInit2_((strm), (windowBits), ZLIB_VERSION, \
    
    ... ... @@ -1851,7 +1853,6 @@ ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits,
    1851 1853
     
    
    1852 1854
     #endif  /* Z_FREETYPE */
    
    1853 1855
     
    
    1854
    -
    
    1855 1856
     #ifndef Z_SOLO
    
    1856 1857
     
    
    1857 1858
     /* gzgetc() macro and its supporting function and exposed data structure.  Note
    
    ... ... @@ -1866,7 +1867,7 @@ struct gzFile_s {
    1866 1867
         unsigned char *next;
    
    1867 1868
         z_off64_t pos;
    
    1868 1869
     };
    
    1869
    -ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file));  /* backward compatibility */
    
    1870
    +ZEXTERN int ZEXPORT gzgetc_(gzFile file);       /* backward compatibility */
    
    1870 1871
     #ifdef Z_PREFIX_SET
    
    1871 1872
     #  undef z_gzgetc
    
    1872 1873
     #  define z_gzgetc(g) \
    
    ... ... @@ -1883,13 +1884,13 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
    1883 1884
      * without large file support, _LFS64_LARGEFILE must also be true
    
    1884 1885
      */
    
    1885 1886
     #ifdef Z_LARGE64
    
    1886
    -   ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
    
    1887
    -   ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
    
    1888
    -   ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
    
    1889
    -   ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
    
    1890
    -   ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t));
    
    1891
    -   ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t));
    
    1892
    -   ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off64_t));
    
    1887
    +   ZEXTERN gzFile ZEXPORT gzopen64(const char *, const char *);
    
    1888
    +   ZEXTERN z_off64_t ZEXPORT gzseek64(gzFile, z_off64_t, int);
    
    1889
    +   ZEXTERN z_off64_t ZEXPORT gztell64(gzFile);
    
    1890
    +   ZEXTERN z_off64_t ZEXPORT gzoffset64(gzFile);
    
    1891
    +   ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off64_t);
    
    1892
    +   ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off64_t);
    
    1893
    +   ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off64_t);
    
    1893 1894
     #endif
    
    1894 1895
     
    
    1895 1896
     #if !defined(ZLIB_INTERNAL) && defined(Z_WANT64)
    
    ... ... @@ -1911,55 +1912,55 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
    1911 1912
     #    define crc32_combine_gen crc32_combine_gen64
    
    1912 1913
     #  endif
    
    1913 1914
     #  ifndef Z_LARGE64
    
    1914
    -     ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
    
    1915
    -     ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int));
    
    1916
    -     ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile));
    
    1917
    -     ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile));
    
    1918
    -     ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
    
    1919
    -     ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
    
    1920
    -     ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off_t));
    
    1915
    +     ZEXTERN gzFile ZEXPORT gzopen64(const char *, const char *);
    
    1916
    +     ZEXTERN z_off_t ZEXPORT gzseek64(gzFile, z_off_t, int);
    
    1917
    +     ZEXTERN z_off_t ZEXPORT gztell64(gzFile);
    
    1918
    +     ZEXTERN z_off_t ZEXPORT gzoffset64(gzFile);
    
    1919
    +     ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off_t);
    
    1920
    +     ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off_t);
    
    1921
    +     ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off_t);
    
    1921 1922
     #  endif
    
    1922 1923
     #else
    
    1923
    -   ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *));
    
    1924
    -   ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int));
    
    1925
    -   ZEXTERN z_off_t ZEXPORT gztell OF((gzFile));
    
    1926
    -   ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile));
    
    1927
    -   ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
    
    1928
    -   ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
    
    1929
    -   ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t));
    
    1924
    +   ZEXTERN gzFile ZEXPORT gzopen(const char *, const char *);
    
    1925
    +   ZEXTERN z_off_t ZEXPORT gzseek(gzFile, z_off_t, int);
    
    1926
    +   ZEXTERN z_off_t ZEXPORT gztell(gzFile);
    
    1927
    +   ZEXTERN z_off_t ZEXPORT gzoffset(gzFile);
    
    1928
    +   ZEXTERN uLong ZEXPORT adler32_combine(uLong, uLong, z_off_t);
    
    1929
    +   ZEXTERN uLong ZEXPORT crc32_combine(uLong, uLong, z_off_t);
    
    1930
    +   ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t);
    
    1930 1931
     #endif
    
    1931 1932
     
    
    1932 1933
     #else /* Z_SOLO */
    
    1933 1934
     
    
    1934 1935
     #ifndef Z_FREETYPE
    
    1935
    -   ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
    
    1936
    -   ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
    
    1937
    -   ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t));
    
    1936
    +   ZEXTERN uLong ZEXPORT adler32_combine(uLong, uLong, z_off_t);
    
    1937
    +   ZEXTERN uLong ZEXPORT crc32_combine(uLong, uLong, z_off_t);
    
    1938
    +   ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t);
    
    1938 1939
     #endif
    
    1939 1940
     
    
    1940 1941
     #endif /* !Z_SOLO */
    
    1941 1942
     
    
    1942 1943
     /* undocumented functions */
    
    1943 1944
     #ifndef Z_FREETYPE
    
    1944
    -ZEXTERN const char   * ZEXPORT zError           OF((int));
    
    1945
    -ZEXTERN int            ZEXPORT inflateSyncPoint OF((z_streamp));
    
    1946
    -ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table    OF((void));
    
    1947
    -ZEXTERN int            ZEXPORT inflateUndermine OF((z_streamp, int));
    
    1948
    -ZEXTERN int            ZEXPORT inflateValidate OF((z_streamp, int));
    
    1949
    -ZEXTERN unsigned long  ZEXPORT inflateCodesUsed OF((z_streamp));
    
    1945
    +ZEXTERN const char   * ZEXPORT zError(int);
    
    1946
    +ZEXTERN int            ZEXPORT inflateSyncPoint(z_streamp);
    
    1947
    +ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table(void);
    
    1948
    +ZEXTERN int            ZEXPORT inflateUndermine(z_streamp, int);
    
    1949
    +ZEXTERN int            ZEXPORT inflateValidate(z_streamp, int);
    
    1950
    +ZEXTERN unsigned long  ZEXPORT inflateCodesUsed(z_streamp);
    
    1950 1951
     #endif  /* !Z_FREETYPE */
    
    1951
    -ZEXTERN int            ZEXPORT inflateResetKeep OF((z_streamp));
    
    1952
    +ZEXTERN int            ZEXPORT inflateResetKeep(z_streamp);
    
    1952 1953
     #ifndef Z_FREETYPE
    
    1953
    -ZEXTERN int            ZEXPORT deflateResetKeep OF((z_streamp));
    
    1954
    +ZEXTERN int            ZEXPORT deflateResetKeep(z_streamp);
    
    1954 1955
     #if defined(_WIN32) && !defined(Z_SOLO)
    
    1955
    -ZEXTERN gzFile         ZEXPORT gzopen_w OF((const wchar_t *path,
    
    1956
    -                                            const char *mode));
    
    1956
    +ZEXTERN gzFile         ZEXPORT gzopen_w(const wchar_t *path,
    
    1957
    +                                        const char *mode);
    
    1957 1958
     #endif
    
    1958 1959
     #if defined(STDC) || defined(Z_HAVE_STDARG_H)
    
    1959 1960
     #  ifndef Z_SOLO
    
    1960
    -ZEXTERN int            ZEXPORTVA gzvprintf Z_ARG((gzFile file,
    
    1961
    -                                                  const char *format,
    
    1962
    -                                                  va_list va));
    
    1961
    +ZEXTERN int            ZEXPORTVA gzvprintf(gzFile file,
    
    1962
    +                                           const char *format,
    
    1963
    +                                           va_list va);
    
    1963 1964
     #  endif
    
    1964 1965
     #endif
    
    1965 1966
     #endif  /* !Z_FREETYPE */
    

  • src/gzip/zutil.c
    ... ... @@ -26,13 +26,11 @@ z_const char * const z_errmsg[10] = {
    26 26
     };
    
    27 27
     
    
    28 28
     
    
    29
    -const char * ZEXPORT zlibVersion()
    
    30
    -{
    
    29
    +const char * ZEXPORT zlibVersion(void) {
    
    31 30
         return ZLIB_VERSION;
    
    32 31
     }
    
    33 32
     
    
    34
    -uLong ZEXPORT zlibCompileFlags()
    
    35
    -{
    
    33
    +uLong ZEXPORT zlibCompileFlags(void) {
    
    36 34
         uLong flags;
    
    37 35
     
    
    38 36
         flags = 0;
    
    ... ... @@ -123,9 +121,7 @@ uLong ZEXPORT zlibCompileFlags()
    123 121
     #  endif
    
    124 122
     int ZLIB_INTERNAL z_verbose = verbose;
    
    125 123
     
    
    126
    -void ZLIB_INTERNAL z_error(
    
    127
    -    char *m)
    
    128
    -{
    
    124
    +void ZLIB_INTERNAL z_error(char *m) {
    
    129 125
         fprintf(stderr, "%s\n", m);
    
    130 126
         exit(1);
    
    131 127
     }
    
    ... ... @@ -134,9 +130,7 @@ void ZLIB_INTERNAL z_error(
    134 130
     /* exported to allow conversion of error code to string for compress() and
    
    135 131
      * uncompress()
    
    136 132
      */
    
    137
    -const char * ZEXPORT zError(
    
    138
    -    int err)
    
    139
    -{
    
    133
    +const char * ZEXPORT zError(int err) {
    
    140 134
         return ERR_MSG(err);
    
    141 135
     }
    
    142 136
     
    
    ... ... @@ -152,11 +146,7 @@ const char * ZEXPORT zError(
    152 146
     
    
    153 147
     #ifndef HAVE_MEMCPY
    
    154 148
     
    
    155
    -void ZLIB_INTERNAL zmemcpy(
    
    156
    -    Bytef* dest,
    
    157
    -    const Bytef* source,
    
    158
    -    uInt  len)
    
    159
    -{
    
    149
    +void ZLIB_INTERNAL zmemcpy(Bytef* dest, const Bytef* source, uInt len) {
    
    160 150
         if (len == 0) return;
    
    161 151
         do {
    
    162 152
             *dest++ = *source++; /* ??? to be unrolled */
    
    ... ... @@ -164,12 +154,7 @@ void ZLIB_INTERNAL zmemcpy(
    164 154
     }
    
    165 155
     
    
    166 156
     #ifndef Z_FREETYPE
    
    167
    -
    
    168
    -int ZLIB_INTERNAL zmemcmp(
    
    169
    -    const Bytef* s1,
    
    170
    -    const Bytef* s2,
    
    171
    -    uInt  len)
    
    172
    -{
    
    157
    +int ZLIB_INTERNAL zmemcmp(const Bytef* s1, const Bytef* s2, uInt len) {
    
    173 158
         uInt j;
    
    174 159
     
    
    175 160
         for (j = 0; j < len; j++) {
    
    ... ... @@ -178,10 +163,7 @@ int ZLIB_INTERNAL zmemcmp(
    178 163
         return 0;
    
    179 164
     }
    
    180 165
     
    
    181
    -void ZLIB_INTERNAL zmemzero(
    
    182
    -    Bytef* dest,
    
    183
    -    uInt  len)
    
    184
    -{
    
    166
    +void ZLIB_INTERNAL zmemzero(Bytef* dest, uInt len) {
    
    185 167
         if (len == 0) return;
    
    186 168
         do {
    
    187 169
             *dest++ = 0;  /* ??? to be unrolled */
    
    ... ... @@ -223,8 +205,7 @@ local ptr_table table[MAX_PTR];
    223 205
      * a protected system like OS/2. Use Microsoft C instead.
    
    224 206
      */
    
    225 207
     
    
    226
    -voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, unsigned size)
    
    227
    -{
    
    208
    +voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, unsigned size) {
    
    228 209
         voidpf buf;
    
    229 210
         ulg bsize = (ulg)items*size;
    
    230 211
     
    
    ... ... @@ -249,8 +230,7 @@ voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, unsigned size)
    249 230
         return buf;
    
    250 231
     }
    
    251 232
     
    
    252
    -void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr)
    
    253
    -{
    
    233
    +void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) {
    
    254 234
         int n;
    
    255 235
     
    
    256 236
         (void)opaque;
    
    ... ... @@ -286,14 +266,12 @@ void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr)
    286 266
     #  define _hfree   hfree
    
    287 267
     #endif
    
    288 268
     
    
    289
    -voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, uInt items, uInt size)
    
    290
    -{
    
    269
    +voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, uInt items, uInt size) {
    
    291 270
         (void)opaque;
    
    292 271
         return _halloc((long)items, size);
    
    293 272
     }
    
    294 273
     
    
    295
    -void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr)
    
    296
    -{
    
    274
    +void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) {
    
    297 275
         (void)opaque;
    
    298 276
         _hfree(ptr);
    
    299 277
     }
    
    ... ... @@ -306,25 +284,18 @@ void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr)
    306 284
     #ifndef MY_ZCALLOC /* Any system without a special alloc function */
    
    307 285
     
    
    308 286
     #ifndef STDC
    
    309
    -extern voidp  malloc OF((uInt size));
    
    310
    -extern voidp  calloc OF((uInt items, uInt size));
    
    311
    -extern void   free   OF((voidpf ptr));
    
    287
    +extern voidp malloc(uInt size);
    
    288
    +extern voidp calloc(uInt items, uInt size);
    
    289
    +extern void free(voidpf ptr);
    
    312 290
     #endif
    
    313 291
     
    
    314
    -voidpf ZLIB_INTERNAL zcalloc(
    
    315
    -    voidpf opaque,
    
    316
    -    unsigned items,
    
    317
    -    unsigned size)
    
    318
    -{
    
    292
    +voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, unsigned size) {
    
    319 293
         (void)opaque;
    
    320 294
         return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) :
    
    321 295
                                   (voidpf)calloc(items, size);
    
    322 296
     }
    
    323 297
     
    
    324
    -void ZLIB_INTERNAL zcfree(
    
    325
    -    voidpf opaque,
    
    326
    -    voidpf ptr)
    
    327
    -{
    
    298
    +void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) {
    
    328 299
         (void)opaque;
    
    329 300
         free(ptr);
    
    330 301
     }
    

  • src/gzip/zutil.h
    ... ... @@ -56,7 +56,7 @@ typedef unsigned long ulg;
    56 56
     #ifndef Z_FREETYPE
    
    57 57
     extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
    
    58 58
     /* (size given to avoid silly warnings with Visual C++) */
    
    59
    -#endif  /* !Z_FREETYPE */
    
    59
    +#endif
    
    60 60
     
    
    61 61
     #define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
    
    62 62
     
    
    ... ... @@ -195,9 +195,9 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
    195 195
     /* provide prototypes for these when building zlib without LFS */
    
    196 196
     #if !defined(_WIN32) && \
    
    197 197
         (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
    
    198
    -    ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
    
    199
    -    ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
    
    200
    -    ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off_t));
    
    198
    +    ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off_t);
    
    199
    +    ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off_t);
    
    200
    +    ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off_t);
    
    201 201
     #endif
    
    202 202
     
    
    203 203
     #endif  /* !Z_FREETYPE */
    
    ... ... @@ -238,16 +238,16 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
    238 238
     #    define zmemzero(dest, len) ft_memset(dest, 0, len)
    
    239 239
     #  endif
    
    240 240
     #else
    
    241
    -   void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len));
    
    242
    -   int ZLIB_INTERNAL zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len));
    
    243
    -   void ZLIB_INTERNAL zmemzero OF((Bytef* dest, uInt len));
    
    241
    +   void ZLIB_INTERNAL zmemcpy(Bytef* dest, const Bytef* source, uInt len);
    
    242
    +   int ZLIB_INTERNAL zmemcmp(const Bytef* s1, const Bytef* s2, uInt len);
    
    243
    +   void ZLIB_INTERNAL zmemzero(Bytef* dest, uInt len);
    
    244 244
     #endif
    
    245 245
     
    
    246 246
     /* Diagnostic functions */
    
    247 247
     #ifdef ZLIB_DEBUG
    
    248 248
     #  include <stdio.h>
    
    249 249
        extern int ZLIB_INTERNAL z_verbose;
    
    250
    -   extern void ZLIB_INTERNAL z_error OF((char *m));
    
    250
    +   extern void ZLIB_INTERNAL z_error(char *m);
    
    251 251
     #  define Assert(cond,msg) {if(!(cond)) z_error(msg);}
    
    252 252
     #  define Trace(x) {if (z_verbose>=0) fprintf x ;}
    
    253 253
     #  define Tracev(x) {if (z_verbose>0) fprintf x ;}
    
    ... ... @@ -264,9 +264,9 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
    264 264
     #endif
    
    265 265
     
    
    266 266
     #ifndef Z_SOLO
    
    267
    -   voidpf ZLIB_INTERNAL zcalloc OF((voidpf opaque, unsigned items,
    
    268
    -                                    unsigned size));
    
    269
    -   void ZLIB_INTERNAL zcfree  OF((voidpf opaque, voidpf ptr));
    
    267
    +   voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items,
    
    268
    +                                unsigned size);
    
    269
    +   void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr);
    
    270 270
     #endif
    
    271 271
     
    
    272 272
     #define ZALLOC(strm, items, size) \
    


  • reply via email to

    [Prev in Thread] Current Thread [Next in Thread]