Changeset d29a42b in rtems


Ignore:
Timestamp:
Sep 2, 2008, 5:33:58 AM (11 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.9, master
Children:
5d657043
Parents:
9fe6e06
Message:

Stop using old-style function definitions.

Location:
cpukit/zlib
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • cpukit/zlib/adler32.c

    r9fe6e06 rd29a42b  
    5555
    5656/* ========================================================================= */
    57 uLong ZEXPORT adler32(adler, buf, len)
    58     uLong adler;
    59     const Bytef *buf;
    60     uInt len;
     57uLong ZEXPORT adler32(
     58    uLong adler,
     59    const Bytef *buf,
     60    uInt len)
    6161{
    6262    unsigned long sum2;
     
    126126
    127127/* ========================================================================= */
    128 uLong ZEXPORT adler32_combine(adler1, adler2, len2)
    129     uLong adler1;
    130     uLong adler2;
    131     z_off_t len2;
     128uLong ZEXPORT adler32_combine(
     129    uLong adler1,
     130    uLong adler2,
     131    z_off_t len2)
    132132{
    133133    unsigned long sum1;
  • cpukit/zlib/compress.c

    r9fe6e06 rd29a42b  
    2020   Z_STREAM_ERROR if the level parameter is invalid.
    2121*/
    22 int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
    23     Bytef *dest;
    24     uLongf *destLen;
    25     const Bytef *source;
    26     uLong sourceLen;
    27     int level;
     22int ZEXPORT compress2 (
     23    Bytef *dest,
     24    uLongf *destLen,
     25    const Bytef *source,
     26    uLong sourceLen,
     27    int level)
    2828{
    2929    z_stream stream;
     
    6060/* ===========================================================================
    6161 */
    62 int ZEXPORT compress (dest, destLen, source, sourceLen)
    63     Bytef *dest;
    64     uLongf *destLen;
    65     const Bytef *source;
    66     uLong sourceLen;
     62int ZEXPORT compress (
     63    Bytef *dest,
     64    uLongf *destLen,
     65    const Bytef *source,
     66    uLong sourceLen)
    6767{
    6868    return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);
     
    7373   this function needs to be updated.
    7474 */
    75 uLong ZEXPORT compressBound (sourceLen)
    76     uLong sourceLen;
     75uLong ZEXPORT compressBound (
     76    uLong sourceLen)
    7777{
    7878    return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + 11;
  • cpukit/zlib/crc32.c

    r9fe6e06 rd29a42b  
    203203 * This function can be used by asm versions of crc32()
    204204 */
    205 const unsigned long FAR * ZEXPORT get_crc_table()
     205const unsigned long FAR * ZEXPORT get_crc_table(void)
    206206{
    207207#ifdef DYNAMIC_CRC_TABLE
     
    217217
    218218/* ========================================================================= */
    219 unsigned long ZEXPORT crc32(crc, buf, len)
    220     unsigned long crc;
    221     const unsigned char FAR *buf;
    222     unsigned len;
     219unsigned long ZEXPORT crc32(
     220    uLong crc,
     221    const Bytef *buf,
     222    uInt len)
    223223{
    224224    if (buf == Z_NULL) return 0UL;
     
    260260
    261261/* ========================================================================= */
    262 local unsigned long crc32_little(crc, buf, len)
    263     unsigned long crc;
    264     const unsigned char FAR *buf;
    265     unsigned len;
     262local unsigned long crc32_little(
     263    unsigned long crc,
     264    const unsigned char FAR *buf,
     265    unsigned len)
    266266{
    267267    register u4 c;
     
    300300
    301301/* ========================================================================= */
    302 local unsigned long crc32_big(crc, buf, len)
    303     unsigned long crc;
    304     const unsigned char FAR *buf;
    305     unsigned len;
     302local unsigned long crc32_big(
     303    unsigned long crc,
     304    const unsigned char FAR *buf,
     305    unsigned len)
    306306{
    307307    register u4 c;
     
    340340
    341341/* ========================================================================= */
    342 local unsigned long gf2_matrix_times(mat, vec)
    343     unsigned long *mat;
    344     unsigned long vec;
     342local unsigned long gf2_matrix_times(
     343    unsigned long *mat,
     344    unsigned long vec)
    345345{
    346346    unsigned long sum;
     
    357357
    358358/* ========================================================================= */
    359 local void gf2_matrix_square(square, mat)
    360     unsigned long *square;
    361     unsigned long *mat;
     359local void gf2_matrix_square(
     360    unsigned long *square,
     361    unsigned long *mat)
    362362{
    363363    int n;
     
    368368
    369369/* ========================================================================= */
    370 uLong ZEXPORT crc32_combine(crc1, crc2, len2)
    371     uLong crc1;
    372     uLong crc2;
    373     z_off_t len2;
     370uLong ZEXPORT crc32_combine(
     371    uLong crc1,
     372    uLong crc2,
     373    z_off_t len2)
    374374{
    375375    int n;
  • cpukit/zlib/deflate.c

    r9fe6e06 rd29a42b  
    202202
    203203/* ========================================================================= */
    204 int ZEXPORT deflateInit_(strm, level, version, stream_size)
    205     z_streamp strm;
    206     int level;
    207     const char *version;
    208     int stream_size;
     204int ZEXPORT deflateInit_(
     205    z_streamp strm,
     206    int level,
     207    const char *version,
     208    int stream_size)
    209209{
    210210    return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL,
     
    214214
    215215/* ========================================================================= */
    216 int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
    217                   version, stream_size)
    218     z_streamp strm;
    219     int  level;
    220     int  method;
    221     int  windowBits;
    222     int  memLevel;
    223     int  strategy;
    224     const char *version;
    225     int stream_size;
     216int ZEXPORT deflateInit2_(
     217    z_streamp strm,
     218    int  level,
     219    int  method,
     220    int  windowBits,
     221    int  memLevel,
     222    int  strategy,
     223    const char *version,
     224    int stream_size)
    226225{
    227226    deflate_state *s;
     
    313312
    314313/* ========================================================================= */
    315 int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
    316     z_streamp strm;
    317     const Bytef *dictionary;
    318     uInt  dictLength;
     314int ZEXPORT deflateSetDictionary (
     315    z_streamp strm,
     316    const Bytef *dictionary,
     317    uInt  dictLength)
    319318{
    320319    deflate_state *s;
     
    355354
    356355/* ========================================================================= */
    357 int ZEXPORT deflateReset (strm)
    358     z_streamp strm;
     356int ZEXPORT deflateReset (
     357    z_streamp strm)
    359358{
    360359    deflate_state *s;
     
    391390
    392391/* ========================================================================= */
    393 int ZEXPORT deflateSetHeader (strm, head)
    394     z_streamp strm;
    395     gz_headerp head;
     392int ZEXPORT deflateSetHeader (
     393    z_streamp strm,
     394    gz_headerp head)
    396395{
    397396    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
     
    402401
    403402/* ========================================================================= */
    404 int ZEXPORT deflatePrime (strm, bits, value)
    405     z_streamp strm;
    406     int bits;
    407     int value;
     403int ZEXPORT deflatePrime (
     404    z_streamp strm,
     405    int bits,
     406    int value)
    408407{
    409408    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
     
    414413
    415414/* ========================================================================= */
    416 int ZEXPORT deflateParams(strm, level, strategy)
    417     z_streamp strm;
    418     int level;
    419     int strategy;
     415int ZEXPORT deflateParams(
     416    z_streamp strm,
     417    int level,
     418    int strategy)
    420419{
    421420    deflate_state *s;
     
    452451
    453452/* ========================================================================= */
    454 int ZEXPORT deflateTune(strm, good_length, max_lazy, nice_length, max_chain)
    455     z_streamp strm;
    456     int good_length;
    457     int max_lazy;
    458     int nice_length;
    459     int max_chain;
     453int ZEXPORT deflateTune(
     454    z_streamp strm,
     455    int good_length,
     456    int max_lazy,
     457    int nice_length,
     458    int max_chain)
    460459{
    461460    deflate_state *s;
     
    487486 * seem onerous for output buffer allocation.
    488487 */
    489 uLong ZEXPORT deflateBound(strm, sourceLen)
    490     z_streamp strm;
    491     uLong sourceLen;
     488uLong ZEXPORT deflateBound(
     489    z_streamp strm,
     490    uLong sourceLen)
    492491{
    493492    deflate_state *s;
     
    516515 * pending_buf.
    517516 */
    518 local void putShortMSB (s, b)
    519     deflate_state *s;
    520     uInt b;
     517local void putShortMSB (
     518    deflate_state *s,
     519    uInt b)
    521520{
    522521    put_byte(s, (Byte)(b >> 8));
     
    530529 * (See also read_buf()).
    531530 */
    532 local void flush_pending(strm)
    533     z_streamp strm;
     531local void flush_pending(
     532    z_streamp strm)
    534533{
    535534    unsigned len = strm->state->pending;
     
    550549
    551550/* ========================================================================= */
    552 int ZEXPORT deflate (strm, flush)
    553     z_streamp strm;
    554     int flush;
     551int ZEXPORT deflate (
     552    z_streamp strm,
     553    int flush)
    555554{
    556555    int old_flush; /* value of flush param for previous deflate call */
     
    857856
    858857/* ========================================================================= */
    859 int ZEXPORT deflateEnd (strm)
    860     z_streamp strm;
     858int ZEXPORT deflateEnd (
     859    z_streamp strm)
    861860{
    862861    int status;
     
    892891 * doesn't have enough memory anyway to duplicate compression states).
    893892 */
    894 int ZEXPORT deflateCopy (dest, source)
    895     z_streamp dest;
    896     z_streamp source;
     893int ZEXPORT deflateCopy (
     894    z_streamp dest,
     895    z_streamp source)
    897896{
    898897#ifdef MAXSEG_64K
     
    954953 * (See also flush_pending()).
    955954 */
    956 local int read_buf(strm, buf, size)
    957     z_streamp strm;
    958     Bytef *buf;
    959     unsigned size;
     955local int read_buf(
     956    z_streamp strm,
     957    Bytef *buf,
     958    unsigned size)
    960959{
    961960    unsigned len = strm->avail_in;
     
    984983 * Initialize the "longest match" routines for a new zlib stream
    985984 */
    986 local void lm_init (s)
    987     deflate_state *s;
     985local void lm_init (
     986    deflate_state *s)
    988987{
    989988    s->window_size = (ulg)2L*s->w_size;
     
    10251024 * match.S. The code will be functionally equivalent.
    10261025 */
    1027 local uInt longest_match(s, cur_match)
    1028     deflate_state *s;
    1029     IPos cur_match;                             /* current match */
     1026local uInt longest_match(
     1027    deflate_state *s,
     1028    IPos cur_match)                             /* current match */
    10301029{
    10311030    unsigned chain_length = s->max_chain_length;/* max hash chain length */
     
    11731172 * Optimized version for level == 1 or strategy == Z_RLE only
    11741173 */
    1175 local uInt longest_match_fast(s, cur_match)
    1176     deflate_state *s;
    1177     IPos cur_match;                             /* current match */
     1174local uInt longest_match_fast(
     1175    deflate_state *s,
     1176    IPos cur_match)                             /* current match */
    11781177{
    11791178    register Bytef *scan = s->window + s->strstart; /* current string */
     
    12301229 * Check that the match at match_start is indeed a match.
    12311230 */
    1232 local void check_match(s, start, match, length)
    1233     deflate_state *s;
    1234     IPos start, match;
    1235     int length;
     1231local void check_match(
     1232    deflate_state *s,
     1233    IPos start, IPos match,
     1234    int length)
    12361235{
    12371236    /* check that the match is indeed a match */
     
    12641263 *    option -- not supported here).
    12651264 */
    1266 local void fill_window(s)
    1267     deflate_state *s;
     1265local void fill_window(
     1266    deflate_state *s)
    12681267{
    12691268    register unsigned n, m;
     
    13881387 * window to pending_buf.
    13891388 */
    1390 local block_state deflate_stored(s, flush)
    1391     deflate_state *s;
    1392     int flush;
     1389local block_state deflate_stored(
     1390    deflate_state *s,
     1391    int flush)
    13931392{
    13941393    /* Stored blocks are limited to 0xffff bytes, pending_buf is limited
     
    14461445 * matches. It is used only for the fast compression options.
    14471446 */
    1448 local block_state deflate_fast(s, flush)
    1449     deflate_state *s;
    1450     int flush;
     1447local block_state deflate_fast(
     1448    deflate_state *s,
     1449    int flush)
    14511450{
    14521451    IPos hash_head = NIL; /* head of the hash chain */
     
    15521551 * no better match at the next window position.
    15531552 */
    1554 local block_state deflate_slow(s, flush)
    1555     deflate_state *s;
    1556     int flush;
     1553local block_state deflate_slow(
     1554    deflate_state *s,
     1555    int flush)
    15571556{
    15581557    IPos hash_head = NIL;    /* head of hash chain */
     
    16811680 * deflate switches away from Z_RLE.)
    16821681 */
    1683 local block_state deflate_rle(s, flush)
    1684     deflate_state *s;
    1685     int flush;
     1682local block_state deflate_rle(
     1683    deflate_state *s,
     1684    int flush)
    16861685{
    16871686    int bflush;         /* set if current block must be flushed */
  • cpukit/zlib/gzio.c

    r9fe6e06 rd29a42b  
    9191   zlib error is Z_MEM_ERROR).
    9292*/
    93 local gzFile gz_open (path, mode, fd)
    94     const char *path;
    95     const char *mode;
    96     int  fd;
     93local gzFile gz_open (
     94    const char *path,
     95    const char *mode,
     96    int  fd)
    9797{
    9898    int err;
     
    206206     Opens a gzip (.gz) file for reading or writing.
    207207*/
    208 gzFile ZEXPORT gzopen (path, mode)
    209     const char *path;
    210     const char *mode;
     208gzFile ZEXPORT gzopen (
     209    const char *path,
     210    const char *mode)
    211211{
    212212    return gz_open (path, mode, -1);
     
    217217   to mimic the behavio(u)r of fdopen.
    218218*/
    219 gzFile ZEXPORT gzdopen (fd, mode)
    220     int fd;
    221     const char *mode;
     219gzFile ZEXPORT gzdopen (
     220    int fd,
     221    const char *mode)
    222222{
    223223    char name[46];      /* allow for up to 128-bit integers */
     
    232232 * Update the compression level and strategy
    233233 */
    234 int ZEXPORT gzsetparams (file, level, strategy)
    235     gzFile file;
    236     int level;
    237     int strategy;
     234int ZEXPORT gzsetparams (
     235    gzFile file,
     236    int level,
     237    int strategy)
    238238{
    239239    gz_stream *s = (gz_stream*)file;
     
    259259   IN assertion: the stream s has been sucessfully opened for reading.
    260260*/
    261 local int get_byte(s)
    262     gz_stream *s;
     261local int get_byte(
     262    gz_stream *s)
    263263{
    264264    if (s->z_eof) return EOF;
     
    286286       for concatenated .gz files.
    287287*/
    288 local void check_header(s)
    289     gz_stream *s;
     288local void check_header(
     289    gz_stream *s)
    290290{
    291291    int method; /* method byte */
     
    353353   Try freeing in the reverse order of allocations.
    354354 */
    355 local int destroy (s)
    356     gz_stream *s;
     355local int destroy (
     356    gz_stream *s)
    357357{
    358358    int err = Z_OK;
     
    392392   gzread returns the number of bytes actually read (0 for end of file).
    393393*/
    394 int ZEXPORT gzread (file, buf, len)
    395     gzFile file;
    396     voidp buf;
    397     unsigned len;
     394int ZEXPORT gzread (
     395    gzFile file,
     396    voidp buf,
     397    unsigned len)
    398398{
    399399    gz_stream *s = (gz_stream*)file;
     
    501501   or -1 in case of end of file or error.
    502502*/
    503 int ZEXPORT gzgetc(file)
    504     gzFile file;
     503int ZEXPORT gzgetc(
     504    gzFile file)
    505505{
    506506    unsigned char c;
     
    513513      Push one byte back onto the stream.
    514514*/
    515 int ZEXPORT gzungetc(c, file)
    516     int c;
    517     gzFile file;
     515int ZEXPORT gzungetc(
     516    int c,
     517    gzFile file)
    518518{
    519519    gz_stream *s = (gz_stream*)file;
     
    538538      The current implementation is not optimized at all.
    539539*/
    540 char * ZEXPORT gzgets(file, buf, len)
    541     gzFile file;
    542     char *buf;
    543     int len;
     540char * ZEXPORT gzgets(
     541    gzFile file,
     542    char *buf,
     543    int len)
    544544{
    545545    char *b = buf;
     
    557557   gzwrite returns the number of bytes actually written (0 in case of error).
    558558*/
    559 int ZEXPORT gzwrite (file, buf, len)
    560     gzFile file;
    561     voidpc buf;
    562     unsigned len;
     559int ZEXPORT gzwrite (
     560    gzFile file,
     561    voidpc buf,
     562    unsigned len)
    563563{
    564564    gz_stream *s = (gz_stream*)file;
     
    676676   gzputc returns the value that was written, or -1 in case of error.
    677677*/
    678 int ZEXPORT gzputc(file, c)
    679     gzFile file;
    680     int c;
     678int ZEXPORT gzputc(
     679    gzFile file,
     680    int c)
    681681{
    682682    unsigned char cc = (unsigned char) c; /* required for big endian systems */
     
    691691      gzputs returns the number of characters written, or -1 in case of error.
    692692*/
    693 int ZEXPORT gzputs(file, s)
    694     gzFile file;
    695     const char *s;
     693int ZEXPORT gzputs(
     694    gzFile file,
     695    const char *s)
    696696{
    697697    return gzwrite(file, (char*)s, (unsigned)strlen(s));
     
    703703   flush is as in the deflate() function.
    704704*/
    705 local int do_flush (file, flush)
    706     gzFile file;
    707     int flush;
     705local int do_flush (
     706    gzFile file,
     707    int flush)
    708708{
    709709    uInt len;
     
    744744}
    745745
    746 int ZEXPORT gzflush (file, flush)
    747      gzFile file;
    748      int flush;
     746int ZEXPORT gzflush (
     747     gzFile file,
     748     int flush)
    749749{
    750750    gz_stream *s = (gz_stream*)file;
     
    765765      In this version of the library, gzseek can be extremely slow.
    766766*/
    767 z_off_t ZEXPORT gzseek (file, offset, whence)
    768     gzFile file;
    769     z_off_t offset;
    770     int whence;
     767z_off_t ZEXPORT gzseek (
     768    gzFile file,
     769    z_off_t offset,
     770    int whence)
    771771{
    772772    gz_stream *s = (gz_stream*)file;
     
    855855     Rewinds input file.
    856856*/
    857 int ZEXPORT gzrewind (file)
    858     gzFile file;
     857int ZEXPORT gzrewind (
     858    gzFile file)
    859859{
    860860    gz_stream *s = (gz_stream*)file;
     
    879879   uncompressed data stream.
    880880*/
    881 z_off_t ZEXPORT gztell (file)
    882     gzFile file;
     881z_off_t ZEXPORT gztell (
     882    gzFile file)
    883883{
    884884    return gzseek(file, 0L, SEEK_CUR);
     
    889889   input stream, otherwise zero.
    890890*/
    891 int ZEXPORT gzeof (file)
    892     gzFile file;
     891int ZEXPORT gzeof (
     892    gzFile file)
    893893{
    894894    gz_stream *s = (gz_stream*)file;
     
    906906     Returns 1 if reading and doing so transparently, otherwise zero.
    907907*/
    908 int ZEXPORT gzdirect (file)
    909     gzFile file;
     908int ZEXPORT gzdirect (
     909    gzFile file)
    910910{
    911911    gz_stream *s = (gz_stream*)file;
     
    918918   Outputs a long in LSB order to the given file
    919919*/
    920 local void putLong (file, x)
    921     FILE *file;
    922     uLong x;
     920local void putLong (
     921    FILE *file,
     922    uLong x)
    923923{
    924924    int n;
     
    933933   of error.
    934934*/
    935 local uLong getLong (s)
    936     gz_stream *s;
     935local uLong getLong (
     936    gz_stream *s)
    937937{
    938938    uLong x = (uLong)get_byte(s);
     
    951951   and deallocates all the (de)compression state.
    952952*/
    953 int ZEXPORT gzclose (file)
    954     gzFile file;
     953int ZEXPORT gzclose (
     954    gzFile file)
    955955{
    956956    gz_stream *s = (gz_stream*)file;
     
    985985   to get the exact error code.
    986986*/
    987 const char * ZEXPORT gzerror (file, errnum)
    988     gzFile file;
    989     int *errnum;
     987const char * ZEXPORT gzerror (
     988    gzFile file,
     989    int *errnum)
    990990{
    991991    char *m;
     
    10151015     Clear the error and end-of-file flags, and do the same for the real file.
    10161016*/
    1017 void ZEXPORT gzclearerr (file)
    1018     gzFile file;
     1017void ZEXPORT gzclearerr (
     1018    gzFile file)
    10191019{
    10201020    gz_stream *s = (gz_stream*)file;
  • cpukit/zlib/infback.c

    r9fe6e06 rd29a42b  
    2626   window and output buffer that is 2**windowBits bytes.
    2727 */
    28 int ZEXPORT inflateBackInit_(strm, windowBits, window, version, stream_size)
    29 z_streamp strm;
    30 int windowBits;
    31 unsigned char FAR *window;
    32 const char *version;
    33 int stream_size;
     28int ZEXPORT inflateBackInit_(
     29    z_streamp strm,
     30    int windowBits,
     31    unsigned char FAR *window,
     32    const char *version,
     33    int stream_size)
    3434{
    3535    struct inflate_state FAR *state;
     
    7171   may not be thread-safe.
    7272 */
    73 local void fixedtables(state)
    74 struct inflate_state FAR *state;
     73local void fixedtables(
     74    struct inflate_state FAR *state)
    7575{
    7676#ifdef BUILDFIXED
     
    239239   are not correct, i.e. strm is Z_NULL or the state was not initialized.
    240240 */
    241 int ZEXPORT inflateBack(strm, in, in_desc, out, out_desc)
    242 z_streamp strm;
    243 in_func in;
    244 void FAR *in_desc;
    245 out_func out;
    246 void FAR *out_desc;
     241int ZEXPORT inflateBack(
     242    z_streamp strm,
     243    in_func in,
     244    void FAR *in_desc,
     245    out_func out,
     246    void FAR *out_desc)
    247247{
    248248    struct inflate_state FAR *state;
     
    612612}
    613613
    614 int ZEXPORT inflateBackEnd(strm)
    615 z_streamp strm;
     614int ZEXPORT inflateBackEnd(
     615    z_streamp strm)
    616616{
    617617    if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
  • cpukit/zlib/inffast.c

    r9fe6e06 rd29a42b  
    6565      output space.
    6666 */
    67 void inflate_fast(strm, start)
    68 z_streamp strm;
    69 unsigned start;         /* inflate()'s starting value for strm->avail_out */
     67void inflate_fast(
     68    z_streamp strm,
     69    unsigned start)         /* inflate()'s starting value for strm->avail_out */
    7070{
    7171    struct inflate_state FAR *state;
  • cpukit/zlib/inflate.c

    r9fe6e06 rd29a42b  
    101101                              unsigned len));
    102102
    103 int ZEXPORT inflateReset(strm)
    104 z_streamp strm;
     103int ZEXPORT inflateReset(
     104    z_streamp strm)
    105105{
    106106    struct inflate_state FAR *state;
     
    126126}
    127127
    128 int ZEXPORT inflatePrime(strm, bits, value)
    129 z_streamp strm;
    130 int bits;
    131 int value;
     128int ZEXPORT inflatePrime(
     129    z_streamp strm,
     130    int bits,
     131    int value)
    132132{
    133133    struct inflate_state FAR *state;
     
    142142}
    143143
    144 int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size)
    145 z_streamp strm;
    146 int windowBits;
    147 const char *version;
    148 int stream_size;
     144int ZEXPORT inflateInit2_(
     145    z_streamp strm,
     146    int windowBits,
     147    const char *version,
     148    int stream_size)
    149149{
    150150    struct inflate_state FAR *state;
     
    185185}
    186186
    187 int ZEXPORT inflateInit_(strm, version, stream_size)
    188 z_streamp strm;
    189 const char *version;
    190 int stream_size;
     187int ZEXPORT inflateInit_(
     188     z_streamp strm,
     189     const char *version,
     190     int stream_size)
    191191{
    192192    return inflateInit2_(strm, DEF_WBITS, version, stream_size);
     
    203203   may not be thread-safe.
    204204 */
    205 local void fixedtables(state)
    206 struct inflate_state FAR *state;
     205local void fixedtables(
     206    struct inflate_state FAR *state)
    207207{
    208208#ifdef BUILDFIXED
     
    321321   The advantage may be dependent on the size of the processor's data caches.
    322322 */
    323 local int updatewindow(strm, out)
    324 z_streamp strm;
    325 unsigned out;
     323local int updatewindow(
     324   z_streamp strm,
     325   unsigned out)
    326326{
    327327    struct inflate_state FAR *state;
     
    552552 */
    553553
    554 int ZEXPORT inflate(strm, flush)
    555 z_streamp strm;
    556 int flush;
     554int ZEXPORT inflate(
     555    z_streamp strm,
     556    int flush)
    557557{
    558558    struct inflate_state FAR *state;
     
    11531153}
    11541154
    1155 int ZEXPORT inflateEnd(strm)
    1156 z_streamp strm;
     1155int ZEXPORT inflateEnd(
     1156  z_streamp strm)
    11571157{
    11581158    struct inflate_state FAR *state;
     
    11671167}
    11681168
    1169 int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength)
    1170 z_streamp strm;
    1171 const Bytef *dictionary;
    1172 uInt dictLength;
     1169int ZEXPORT inflateSetDictionary(
     1170    z_streamp strm,
     1171    const Bytef *dictionary,
     1172    uInt dictLength)
    11731173{
    11741174    struct inflate_state FAR *state;
     
    12091209}
    12101210
    1211 int ZEXPORT inflateGetHeader(strm, head)
    1212 z_streamp strm;
    1213 gz_headerp head;
     1211int ZEXPORT inflateGetHeader(
     1212    z_streamp strm,
     1213    gz_headerp head)
    12141214{
    12151215    struct inflate_state FAR *state;
     
    12371237   zero for the first call.
    12381238 */
    1239 local unsigned syncsearch(have, buf, len)
    1240 unsigned FAR *have;
    1241 unsigned char FAR *buf;
    1242 unsigned len;
     1239local unsigned syncsearch(
     1240    unsigned FAR *have,
     1241    unsigned char FAR *buf,
     1242    unsigned len)
    12431243{
    12441244    unsigned got;
     
    12601260}
    12611261
    1262 int ZEXPORT inflateSync(strm)
    1263 z_streamp strm;
     1262int ZEXPORT inflateSync(
     1263    z_streamp strm)
    12641264{
    12651265    unsigned len;               /* number of bytes to look at or looked at */
     
    13111311   inflate is waiting for these length bytes.
    13121312 */
    1313 int ZEXPORT inflateSyncPoint(strm)
    1314 z_streamp strm;
     1313int ZEXPORT inflateSyncPoint(
     1314    z_streamp strm)
    13151315{
    13161316    struct inflate_state FAR *state;
     
    13211321}
    13221322
    1323 int ZEXPORT inflateCopy(dest, source)
    1324 z_streamp dest;
    1325 z_streamp source;
     1323int ZEXPORT inflateCopy(
     1324    z_streamp dest,
     1325    z_streamp source)
    13261326{
    13271327    struct inflate_state FAR *state;
  • cpukit/zlib/inftrees.c

    r9fe6e06 rd29a42b  
    3030   longest code or if it is less than the shortest code.
    3131 */
    32 int inflate_table(type, lens, codes, table, bits, work)
    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;
     32int 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)
    3939{
    4040    unsigned len;               /* a code's length in bits */
  • cpukit/zlib/trees.c

    r9fe6e06 rd29a42b  
    236236 * Initialize the various 'constant' tables.
    237237 */
    238 local void tr_static_init()
     238local void tr_static_init(void)
    239239{
    240240#if defined(GEN_TREES_H) || !defined(STDC)
     
    380380 * Initialize the tree data structures for a new zlib stream.
    381381 */
    382 void _tr_init(s)
    383     deflate_state *s;
     382void _tr_init(
     383    deflate_state *s)
    384384{
    385385    tr_static_init();
     
    409409 * Initialize a new block.
    410410 */
    411 local void init_block(s)
    412     deflate_state *s;
     411local void init_block(
     412    deflate_state *s)
    413413{
    414414    int n; /* iterates over tree elements */
     
    453453 * two sons).
    454454 */
    455 local void pqdownheap(s, tree, k)
    456     deflate_state *s;
    457     ct_data *tree;  /* the tree to restore */
    458     int k;               /* node to move down */
     455local void pqdownheap(
     456    deflate_state *s,
     457    ct_data *tree,  /* the tree to restore */
     458    int k)               /* node to move down */
    459459{
    460460    int v = s->heap[k];
     
    488488 *     not null.
    489489 */
    490 local void gen_bitlen(s, desc)
    491     deflate_state *s;
    492     tree_desc *desc;    /* the tree descriptor */
     490local void gen_bitlen(
     491    deflate_state *s,
     492    tree_desc *desc)    /* the tree descriptor */
    493493{
    494494    ct_data *tree        = desc->dyn_tree;
     
    575575 *     zero code length.
    576576 */
    577 local void gen_codes (tree, max_code, bl_count)
    578     ct_data *tree;             /* the tree to decorate */
    579     int max_code;              /* largest code with non zero frequency */
    580     ushf *bl_count;            /* number of codes at each bit length */
     577local void gen_codes (
     578    ct_data *tree,             /* the tree to decorate */
     579    int max_code,              /* largest code with non zero frequency */
     580    ushf *bl_count)            /* number of codes at each bit length */
    581581{
    582582    ush next_code[MAX_BITS+1]; /* next code value for each bit length */
     
    617617 *     also updated if stree is not null. The field max_code is set.
    618618 */
    619 local void build_tree(s, desc)
    620     deflate_state *s;
    621     tree_desc *desc; /* the tree descriptor */
     619local void build_tree(
     620    deflate_state *s,
     621    tree_desc *desc) /* the tree descriptor */
    622622{
    623623    ct_data *tree         = desc->dyn_tree;
     
    705705 * in the bit length tree.
    706706 */
    707 local void scan_tree (s, tree, max_code)
    708     deflate_state *s;
    709     ct_data *tree;   /* the tree to be scanned */
    710     int max_code;    /* and its largest code of non zero frequency */
     707local void scan_tree (
     708    deflate_state *s,
     709    ct_data *tree,   /* the tree to be scanned */
     710    int max_code)    /* and its largest code of non zero frequency */
    711711{
    712712    int n;                     /* iterates over all tree elements */
     
    750750 * bl_tree.
    751751 */
    752 local void send_tree (s, tree, max_code)
    753     deflate_state *s;
    754     ct_data *tree; /* the tree to be scanned */
    755     int max_code;       /* and its largest code of non zero frequency */
     752local void send_tree (
     753    deflate_state *s,
     754    ct_data *tree, /* the tree to be scanned */
     755    int max_code)       /* and its largest code of non zero frequency */
    756756{
    757757    int n;                     /* iterates over all tree elements */
     
    801801 * bl_order of the last bit length code to send.
    802802 */
    803 local int build_bl_tree(s)
    804     deflate_state *s;
     803local int build_bl_tree(
     804    deflate_state *s)
    805805{
    806806    int max_blindex;  /* index of last bit length code of non zero freq */
     
    836836 * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.
    837837 */
    838 local void send_all_trees(s, lcodes, dcodes, blcodes)
    839     deflate_state *s;
    840     int lcodes, dcodes, blcodes; /* number of codes for each tree */
     838local void send_all_trees(
     839    deflate_state *s,
     840    int lcodes, int dcodes, int blcodes) /* number of codes for each tree */
    841841{
    842842    int rank;                    /* index in bl_order */
     
    865865 * Send a stored block
    866866 */
    867 void _tr_stored_block(s, buf, stored_len, eof)
    868     deflate_state *s;
    869     charf *buf;       /* input block */
    870     ulg stored_len;   /* length of input block */
    871     int eof;          /* true if this is the last block for a file */
     867void _tr_stored_block(
     868    deflate_state *s,
     869    charf *buf,       /* input block */
     870    ulg stored_len,   /* length of input block */
     871    int eof)          /* true if this is the last block for a file */
    872872{
    873873    send_bits(s, (STORED_BLOCK<<1)+eof, 3);  /* send block type */
     
    890890 * on one bit only.
    891891 */
    892 void _tr_align(s)
    893     deflate_state *s;
     892void _tr_align(
     893    deflate_state *s)
    894894{
    895895    send_bits(s, STATIC_TREES<<1, 3);
     
    919919 * trees or store, and output the encoded block to the zip file.
    920920 */
    921 void _tr_flush_block(s, buf, stored_len, eof)
    922     deflate_state *s;
    923     charf *buf;       /* input block, or NULL if too old */
    924     ulg stored_len;   /* length of input block */
    925     int eof;          /* true if this is the last block for a file */
     921void _tr_flush_block(
     922    deflate_state *s,
     923    charf *buf,       /* input block, or NULL if too old */
     924    ulg stored_len,   /* length of input block */
     925    int eof)          /* true if this is the last block for a file */
    926926{
    927927    ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */
     
    10201020 * the current block must be flushed.
    10211021 */
    1022 int _tr_tally (s, dist, lc)
    1023     deflate_state *s;
    1024     unsigned dist;  /* distance of matched string */
    1025     unsigned lc;    /* match length-MIN_MATCH or unmatched char (if dist==0) */
     1022int _tr_tally (
     1023    deflate_state *s,
     1024    unsigned dist,  /* distance of matched string */
     1025    unsigned lc)    /* match length-MIN_MATCH or unmatched char (if dist==0) */
    10261026{
    10271027    s->d_buf[s->last_lit] = (ush)dist;
     
    10701070 * Send the block data compressed using the given Huffman trees
    10711071 */
    1072 local void compress_block(s, ltree, dtree)
    1073     deflate_state *s;
    1074     ct_data *ltree; /* literal tree */
    1075     ct_data *dtree; /* distance tree */
     1072local void compress_block(
     1073    deflate_state *s,
     1074    ct_data *ltree, /* literal tree */
     1075    ct_data *dtree) /* distance tree */
    10761076{
    10771077    unsigned dist;      /* distance of matched string */
     
    11241124 * IN assertion: the fields Freq of dyn_ltree are set.
    11251125 */
    1126 local void set_data_type(s)
    1127     deflate_state *s;
     1126local void set_data_type(
     1127    deflate_state *s)
    11281128{
    11291129    int n;
     
    11441144 * IN assertion: 1 <= len <= 15
    11451145 */
    1146 local unsigned bi_reverse(code, len)
    1147     unsigned code; /* the value to invert */
    1148     int len;       /* its bit length */
     1146local unsigned bi_reverse(
     1147    unsigned code, /* the value to invert */
     1148    int len)       /* its bit length */
    11491149{
    11501150    register unsigned res = 0;
     
    11591159 * Flush the bit buffer, keeping at most 7 bits in it.
    11601160 */
    1161 local void bi_flush(s)
    1162     deflate_state *s;
     1161local void bi_flush(
     1162    deflate_state *s)
    11631163{
    11641164    if (s->bi_valid == 16) {
     
    11761176 * Flush the bit buffer and align the output on a byte boundary
    11771177 */
    1178 local void bi_windup(s)
    1179     deflate_state *s;
     1178local void bi_windup(
     1179    deflate_state *s)
    11801180{
    11811181    if (s->bi_valid > 8) {
     
    11951195 * one's complement if requested.
    11961196 */
    1197 local void copy_block(s, buf, len, header)
    1198     deflate_state *s;
    1199     charf    *buf;    /* the input data */
    1200     unsigned len;     /* its length */
    1201     int      header;  /* true if block header must be written */
     1197local void copy_block(
     1198    deflate_state *s,
     1199    charf    *buf,    /* the input data */
     1200    unsigned len,     /* its length */
     1201    int      header)  /* true if block header must be written */
    12021202{
    12031203    bi_windup(s);        /* align on byte boundary */
  • cpukit/zlib/uncompr.c

    r9fe6e06 rd29a42b  
    2424   buffer, or Z_DATA_ERROR if the input data was corrupted.
    2525*/
    26 int ZEXPORT uncompress (dest, destLen, source, sourceLen)
    27     Bytef *dest;
    28     uLongf *destLen;
    29     const Bytef *source;
    30     uLong sourceLen;
     26int ZEXPORT uncompress (
     27    Bytef *dest,
     28    uLongf *destLen,
     29    const Bytef *source,
     30    uLong sourceLen)
    3131{
    3232    z_stream stream;
  • cpukit/zlib/zutil.c

    r9fe6e06 rd29a42b  
    2525
    2626
    27 const char * ZEXPORT zlibVersion()
     27const char * ZEXPORT zlibVersion(void)
    2828{
    2929    return ZLIB_VERSION;
    3030}
    3131
    32 uLong ZEXPORT zlibCompileFlags()
     32uLong ZEXPORT zlibCompileFlags(void)
    3333{
    3434    uLong flags;
     
    131131 * uncompress()
    132132 */
    133 const char * ZEXPORT zError(err)
    134     int err;
     133const char * ZEXPORT zError(
     134    int err)
    135135{
    136136    return ERR_MSG(err);
Note: See TracChangeset for help on using the changeset viewer.