diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2022-12-25 14:53:47 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2022-12-25 16:13:10 -0800 |
commit | 96cd660ad06675e811505229c029004efe9a3a8f (patch) | |
tree | ede3f4eaa8033bb31dbbec104d9ef24c3cf2b279 /unzip.c | |
parent | 8ae183ff73ff5827a6e0f260ad591fe5fae33127 (diff) | |
download | gzip-96cd660ad06675e811505229c029004efe9a3a8f.tar.gz |
maint: port function definitions to C23
C23 does not allow K&R style function definitions.
Use protyped definitions. However, don't bother with (void) in
function definitions since C23 prefers (); so prefer () to (void) as
this will work with older compilers anyway.
Diffstat (limited to 'unzip.c')
-rw-r--r-- | unzip.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -60,9 +60,10 @@ static int ext_header = 0; /* set if extended local header */ /* =========================================================================== * Check zip file and advance inptr to the start of the compressed data. * Get ofname from the local header if necessary. + * IN is the input file descriptor. */ -int check_zipfile(in) - int in; /* input file descriptors */ +int +check_zipfile (int in) { uch *h = inbuf + inptr; /* first local header */ @@ -108,9 +109,11 @@ int check_zipfile(in) * IN assertions: the buffer inbuf contains already the beginning of * the compressed data, from offsets inptr to insize-1 included. * The magic header has already been checked. The output buffer is cleared. + * + * 'in' and 'out' are the input and output file descriptors. */ -int unzip(in, out) - int in, out; /* input and output file descriptors */ +int +unzip (int in, int out) { ulg orig_crc = 0; /* original crc */ ulg orig_len = 0; /* original uncompressed length */ |