Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 875605 Details for
Bug 910280
app-arch/unzip test phase hangs with -flto and append-flags -std=gnu89 [Clang16/LLVM system]
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
unzip-6.0-fix-prototypes.patch
unzip-6.0-fix-prototypes.patch (text/plain), 52.76 KB, created by
ppw0
on 2023-11-25 09:21:52 UTC
(
hide
)
Description:
unzip-6.0-fix-prototypes.patch
Filename:
MIME Type:
Creator:
ppw0
Created:
2023-11-25 09:21:52 UTC
Size:
52.76 KB
patch
obsolete
>diff --git a/crc32.c b/crc32.c >index 02f504d..2be436b 100644 >--- a/crc32.c >+++ b/crc32.c >@@ -677,10 +677,10 @@ void free_crc_table() > > > /* ========================================================================= */ >-ulg crc32(crc, buf, len) >- ulg crc; /* crc shift register */ >- register ZCONST uch *buf; /* pointer to bytes to pump through */ >- extent len; /* number of bytes in buf[] */ >+ulg crc32(ulg crc, register ZCONST uch *buf, extent len) >+ //ulg crc; /* crc shift register */ >+ //register ZCONST uch *buf; /* pointer to bytes to pump through */ >+ //extent len; /* number of bytes in buf[] */ > /* Run a set of bytes through the crc shift register. If buf is a NULL > pointer, then initialize the crc shift register contents instead. > Return the current crc in either case. */ >diff --git a/crypt.c b/crypt.c >index a8975f2..fb47b96 100644 >--- a/crypt.c >+++ b/crypt.c >@@ -160,9 +160,8 @@ int decrypt_byte(__G) > /*********************************************************************** > * Update the encryption keys with the next byte of plain text > */ >-int update_keys(__G__ c) >- __GDEF >- int c; /* byte of plain text */ >+int update_keys(__GPRO__ int c) >+ //int c; /* byte of plain text */ > { > GLOBAL(keys[0]) = CRC32(GLOBAL(keys[0]), c, CRY_CRC_TAB); > GLOBAL(keys[1]) = (GLOBAL(keys[1]) >@@ -180,9 +179,8 @@ int update_keys(__G__ c) > * Initialize the encryption keys and the random header according to > * the given password. > */ >-void init_keys(__G__ passwd) >- __GDEF >- ZCONST char *passwd; /* password string with which to modify keys */ >+void init_keys(__GPRO__ ZCONST char *passwd) >+ //ZCONST char *passwd; /* password string with which to modify keys */ > { > #ifdef IZ_CRC_BE_OPTIMIZ > if (cry_crctb_p == NULL) { >@@ -450,10 +448,7 @@ unsigned zfwrite(buf, item_size, nb, f) > * Get the password and set up keys for current zipfile member. > * Return PK_ class error. > */ >-int decrypt(__G__ passwrd) >- __GDEF >- ZCONST char *passwrd; >-{ >+int decrypt(__GPRO__ ZCONST char *passwrd) { > ush b; > int n, r; > uch h[RAND_HEAD_LEN]; >@@ -536,10 +531,7 @@ int decrypt(__G__ passwrd) > /*********************************************************************** > * Test the password. Return -1 if bad, 0 if OK. > */ >-local int testp(__G__ h) >- __GDEF >- ZCONST uch *h; >-{ >+local int testp(__GPRO__ ZCONST uch *h) { > int r; > char *key_translated; > >@@ -591,10 +583,9 @@ local int testp(__G__ h) > } /* end function testp() */ > > >-local int testkey(__G__ h, key) >- __GDEF >- ZCONST uch *h; /* decrypted header */ >- ZCONST char *key; /* decryption password to test */ >+local int testkey(__GPRO__ ZCONST uch *h, ZCONST char *key) >+ //ZCONST uch *h; /* decrypted header */ >+ //ZCONST char *key; /* decryption password to test */ > { > ush b; > #ifdef ZIP10 >diff --git a/envargs.c b/envargs.c >index f0a230d..94623b0 100644 >--- a/envargs.c >+++ b/envargs.c >@@ -46,11 +46,7 @@ static int count_args OF((ZCONST char *)); > > /* envargs() returns PK-style error code */ > >-int envargs(Pargc, Pargv, envstr, envstr2) >- int *Pargc; >- char ***Pargv; >- ZCONST char *envstr, *envstr2; >-{ >+int envargs(int *Pargc, char ***Pargv, ZCONST char *envstr, ZCONST char *envstr2) { > char *envptr; /* value returned by getenv */ > char *bufptr; /* copy of env info */ > int argc = 0; /* internal arg count */ >@@ -176,9 +172,7 @@ int envargs(Pargc, Pargv, envstr, envstr2) > > > >-static int count_args(s) >- ZCONST char *s; >-{ >+static int count_args(ZCONST char *s) { > int count = 0; > char ch; > >diff --git a/explode.c b/explode.c >index 3b558c2..8e6116b 100644 >--- a/explode.c >+++ b/explode.c >@@ -219,10 +219,9 @@ static ZCONST ush cpdist8[] = > } > > >-static int get_tree(__G__ l, n) >- __GDEF >-unsigned *l; /* bit lengths */ >-unsigned n; /* number expected */ >+static int get_tree(__GPRO__ unsigned *l, unsigned n) >+//unsigned *l; /* bit lengths */ >+//unsigned n; /* number expected */ > /* Get the bit lengths for a code representation from the compressed > stream. If get_tree() returns 4, then there is an error in the data. > Otherwise zero is returned. */ >@@ -250,11 +249,11 @@ unsigned n; /* number expected */ > > > >-static int explode_lit(__G__ tb, tl, td, bb, bl, bd, bdl) >- __GDEF >-struct huft *tb, *tl, *td; /* literal, length, and distance tables */ >-unsigned bb, bl, bd; /* number of bits decoded by those */ >-unsigned bdl; /* number of distance low bits */ >+static int explode_lit(__GPRO__ struct huft *tb, struct huft *tl, struct huft *td, >+ unsigned bb, unsigned bl, unsigned bd, unsigned bdl) >+//struct huft *tb, *tl, *td; /* literal, length, and distance tables */ >+//unsigned bb, bl, bd; /* number of bits decoded by those */ >+//unsigned bdl; /* number of distance low bits */ > /* Decompress the imploded data using coded literals and a sliding > window (of size 2^(6+bdl) bytes). */ > { >@@ -368,11 +367,12 @@ unsigned bdl; /* number of distance low bits */ > > > >-static int explode_nolit(__G__ tl, td, bl, bd, bdl) >- __GDEF >-struct huft *tl, *td; /* length and distance decoder tables */ >-unsigned bl, bd; /* number of bits decoded by tl[] and td[] */ >-unsigned bdl; /* number of distance low bits */ >+static int explode_nolit(__GPRO__ struct huft *tl, struct huft *td, >+ unsigned bl, unsigned bd, >+ unsigned bdl) >+//struct huft *tl, *td; /* length and distance decoder tables */ >+//unsigned bl, bd; /* number of bits decoded by tl[] and td[] */ >+//unsigned bdl; /* number of distance low bits */ > /* Decompress the imploded data using uncoded literals and a sliding > window (of size 2^(6+bdl) bytes). */ > { >diff --git a/extract.c b/extract.c >index bee3013..9b83dfe 100644 >--- a/extract.c >+++ b/extract.c >@@ -346,10 +346,7 @@ typedef struct { > * Return the index of the first span in cover whose beg is greater than val. > * If there is no such span, then cover->num is returned. > */ >-static size_t cover_find(cover, val) >- cover_t *cover; >- bound_t val; >-{ >+static size_t cover_find(cover_t *cover, bound_t val) { > size_t lo = 0, hi = cover->num; > while (lo < hi) { > size_t mid = (lo + hi) >> 1; >@@ -362,10 +359,7 @@ static size_t cover_find(cover, val) > } > > /* Return true if val lies within any one of the spans in cover. */ >-static int cover_within(cover, val) >- cover_t *cover; >- bound_t val; >-{ >+static int cover_within(cover_t *cover, bound_t val) { > size_t pos = cover_find(cover, val); > return pos > 0 && val < cover->span[pos - 1].end; > } >@@ -382,11 +376,7 @@ static int cover_within(cover, val) > * end, then -1 is returned. If the list needs to be grown but the memory > * allocation fails, then -2 is returned. > */ >-static int cover_add(cover, beg, end) >- cover_t *cover; >- bound_t beg; >- bound_t end; >-{ >+static int cover_add(cover_t *cover, bound_t beg, bound_t end) { > size_t pos; > int prec, foll; > >@@ -771,7 +761,7 @@ int extract_or_test_files(__G) /* return PK-type error code */ > G.cur_zipfile_bufstart = > zlseek(G.zipfd, cd_bufstart, SEEK_SET); > #endif /* ?USE_STRM_INPUT */ >- read(G.zipfd, (char *)G.inbuf, INBUFSIZ); /* been here before... */ >+ (void)read(G.zipfd, (char *)G.inbuf, INBUFSIZ); /* been here before... */ > G.inptr = cd_inptr; > G.incnt = cd_incnt; > ++blknum; >@@ -1083,7 +1073,7 @@ static int store_info(__G) /* return 0 if skipping, 1 if OK */ > else if (!uO.tflag && !IS_OVERWRT_ALL) { /* if -o, extract anyway */ > Info(slide, 0x481, ((char *)slide, LoadFarString(VMSFormatQuery), > FnFilter1(G.filename))); >- fgets(G.answerbuf, sizeof(G.answerbuf), stdin); >+ (void)fgets(G.answerbuf, sizeof(G.answerbuf), stdin); > if ((*G.answerbuf != 'y') && (*G.answerbuf != 'Y')) > return 0; > } >@@ -1153,9 +1143,7 @@ static int store_info(__G) /* return 0 if skipping, 1 if OK */ > /* Function find_compr_idx() */ > /*******************************/ > >-unsigned find_compr_idx(compr_methodnum) >- unsigned compr_methodnum; >-{ >+unsigned find_compr_idx(unsigned compr_methodnum) { > unsigned i; > > for (i = 0; i < NUM_METHODS; i++) { >@@ -1173,22 +1161,12 @@ unsigned find_compr_idx(compr_methodnum) > /* Function extract_or_test_entrylist() */ > /******************************************/ > >-static int extract_or_test_entrylist(__G__ numchunk, >- pfilnum, pnum_bad_pwd, pold_extra_bytes, >-#ifdef SET_DIR_ATTRIB >- pnum_dirs, pdirlist, >-#endif >- error_in_archive) /* return PK-type error code */ >- __GDEF >- unsigned numchunk; >- ulg *pfilnum; >- ulg *pnum_bad_pwd; >- zoff_t *pold_extra_bytes; >+static int extract_or_test_entrylist(__GPRO__ unsigned numchunk, >+ ulg *pfilnum, ulg *pnum_bad_pwd, zoff_t *pold_extra_bytes, > #ifdef SET_DIR_ATTRIB >- unsigned *pnum_dirs; >- direntry **pdirlist; >+ unsigned *pnum_dirs, direntry **pdirlist, > #endif >- int error_in_archive; >+ int error_in_archive) /* return PK-type error code */ > { > unsigned i; > int renamed, query; >@@ -1673,7 +1651,7 @@ reprompt: > do { > Info(slide, 0x81, ((char *)slide, > LoadFarString(NewNameQuery))); >- fgets(G.filename, FILNAMSIZ, stdin); >+ (void)fgets(G.filename, FILNAMSIZ, stdin); > /* usually get \n here: better check for it */ > fnlen = strlen(G.filename); > if (lastchar(G.filename, fnlen) == '\n') >@@ -2219,11 +2197,7 @@ static int extract_or_test_member(__G) /* return PK-type error code */ > /* Function TestExtraField() */ > /*******************************/ > >-static int TestExtraField(__G__ ef, ef_len) >- __GDEF >- uch *ef; >- unsigned ef_len; >-{ >+static int TestExtraField(__GPRO__ uch *ef, unsigned ef_len) { > ush ebID; > unsigned ebLen; > unsigned eb_cmpr_offs = 0; >@@ -2494,12 +2468,12 @@ static int test_compr_eb(__G__ eb, eb_size, compr_offset, test_uc_ebdata) > /* Function memextract() */ > /***************************/ > >-int memextract(__G__ tgt, tgtsize, src, srcsize) /* extract compressed */ >- __GDEF /* extra field block; */ >- uch *tgt; /* return PK-type error */ >- ulg tgtsize; /* level */ >- ZCONST uch *src; >- ulg srcsize; >+int memextract(__GPRO__ uch *tgt, ulg tgtsize, ZCONST uch *src, ulg srcsize) /* extract compressed */ >+ //__GDEF /* extra field block; */ >+ //uch *tgt; /* return PK-type error */ >+ //ulg tgtsize; /* level */ >+ //ZCONST uch *src; >+ //ulg srcsize; > { > zoff_t old_csize=G.csize; > uch *old_inptr=G.inptr; >@@ -2583,11 +2557,7 @@ int memextract(__G__ tgt, tgtsize, src, srcsize) /* extract compressed */ > /* Function memflush() */ > /*************************/ > >-int memflush(__G__ rawbuf, size) >- __GDEF >- ZCONST uch *rawbuf; >- ulg size; >-{ >+int memflush(__GPRO__ ZCONST uch *rawbuf, ulg size) { > if (size > G.outsize) > /* Here, PK_DISK is a bit off-topic, but in the sense of marking > "overflow of output space", its use may be tolerated. */ >@@ -2623,14 +2593,7 @@ int memflush(__G__ rawbuf, size) > * - Deflation (see memextract()) > * The IZVMS block data is returned in malloc'd space. > */ >-uch *extract_izvms_block(__G__ ebdata, size, retlen, init, needlen) >- __GDEF >- ZCONST uch *ebdata; >- unsigned size; >- unsigned *retlen; >- ZCONST uch *init; >- unsigned needlen; >-{ >+uch *extract_izvms_block(__GPRO__ ZCONST uch *ebdata, unsigned size, unsigned *retlen, ZCONST uch *init, unsigned needlen) { > uch *ucdata; /* Pointer to block allocated */ > int cmptype; > unsigned usiz, csiz; >@@ -2685,10 +2648,10 @@ uch *extract_izvms_block(__G__ ebdata, size, retlen, init, needlen) > * else > * putbit(0) > */ >-static void decompress_bits(outptr, needlen, bitptr) >- uch *outptr; /* Pointer into output block */ >- unsigned needlen; /* Size of uncompressed block */ >- ZCONST uch *bitptr; /* Pointer into compressed data */ >+static void decompress_bits(uch *outptr, unsigned needlen, ZCONST uch *bitptr) >+ //uch *outptr; /* Pointer into output block */ >+ //unsigned needlen; /* Size of uncompressed block */ >+ //ZCONST uch *bitptr; /* Pointer into compressed data */ > { > ulg bitbuf = 0; > int bitcnt = 0; >@@ -2731,10 +2694,7 @@ static void decompress_bits(outptr, needlen, bitptr) > /* Function set_deferred_symlink() */ > /***********************************/ > >-static void set_deferred_symlink(__G__ slnk_entry) >- __GDEF >- slinkentry *slnk_entry; >-{ >+static void set_deferred_symlink(__GPRO__ slinkentry *slnk_entry) { > extent ucsize = slnk_entry->targetlen; > char *linkfname = slnk_entry->fname; > char *linktarget = (char *)malloc(ucsize+1); >@@ -2788,11 +2748,7 @@ static void set_deferred_symlink(__G__ slnk_entry) > /* Function fnfilter() */ /* here instead of in list.c for SFX */ > /*************************/ > >-char *fnfilter(raw, space, size) /* convert name to safely printable form */ >- ZCONST char *raw; >- uch *space; >- extent size; >-{ >+char *fnfilter(ZCONST char *raw, uch *space, extent size) { /* convert name to safely printable form */ > #ifndef NATIVE /* ASCII: filter ANSI escape codes, etc. */ > ZCONST uch *r=(ZCONST uch *)raw; > uch *s=space; >@@ -2914,8 +2870,7 @@ char *fnfilter(raw, space, size) /* convert name to safely printable form */ > /* Function dircomp() */ > /************************/ > >-static int Cdecl dircomp(a, b) /* used by qsort(); swiped from Zip */ >- ZCONST zvoid *a, *b; >+static int Cdecl dircomp(ZCONST zvoid *a, ZCONST zvoid *b) /* used by qsort(); swiped from Zip */ > { > /* order is significant: this sorts in reverse order (deepest first) */ > return strcmp((*(direntry **)b)->fn, (*(direntry **)a)->fn); >@@ -2937,7 +2892,7 @@ __GDEF > { > int retval = 0; /* return code: 0 = "no error" */ > int err=BZ_OK; >- int repeated_buf_err; >+ //int repeated_buf_err; > bz_stream bstrm; > > if (G.incnt <= 0 && G.csize <= 0L) { >@@ -3022,7 +2977,7 @@ __GDEF > > /* no more input, so loop until we have all output */ > Trace((stderr, "beginning final loop: err = %d\n", err)); >- repeated_buf_err = FALSE; >+ //repeated_buf_err = FALSE; > while (err != BZ_STREAM_END) { > err = BZ2_bzDecompress(&bstrm); > if (err == BZ_DATA_ERROR) { >diff --git a/fileio.c b/fileio.c >index 50a74fc..e1ad83f 100644 >--- a/fileio.c >+++ b/fileio.c >@@ -576,11 +576,7 @@ void defer_leftover_input(__G) > /* Function readbuf() */ > /**********************/ > >-unsigned readbuf(__G__ buf, size) /* return number of bytes read into buf */ >- __GDEF >- char *buf; >- register unsigned size; >-{ >+unsigned readbuf(__GPRO__ char *buf, register unsigned size) { /* return number of bytes read into buf */ > register unsigned count; > unsigned n; > >@@ -713,10 +709,7 @@ int fillinbuf(__G) /* like readbyte() except returns number of bytes in inbuf */ > /* Function seek_zipf() */ > /************************/ > >-int seek_zipf(__G__ abs_offset) >- __GDEF >- zoff_t abs_offset; >-{ >+int seek_zipf(__GPRO__ zoff_t abs_offset) { > /* > * Seek to the block boundary of the block which includes abs_offset, > * then read block into input buffer and set pointers appropriately. >@@ -784,11 +777,7 @@ int seek_zipf(__G__ abs_offset) > /* Function flush() */ /* returns PK error codes: */ > /********************/ /* if tflag => always 0; PK_DISK if write error */ > >-int flush(__G__ rawbuf, size, unshrink) >- __GDEF >- uch *rawbuf; >- ulg size; >- int unshrink; >+int flush(__GPRO__ uch *rawbuf, ulg size, int unshrink) > #if (defined(USE_DEFLATE64) && defined(__16BIT__)) > { > int ret; >@@ -1090,10 +1079,9 @@ static int partflush(__G__ rawbuf, size, unshrink) > /* Function is_vms_varlen_txt() */ > /********************************/ > >-static int is_vms_varlen_txt(__G__ ef_buf, ef_len) >- __GDEF >- uch *ef_buf; /* buffer containing extra field */ >- unsigned ef_len; /* total length of extra field */ >+static int is_vms_varlen_txt(__GPRO__ uch *ef_buf, unsigned ef_len) >+ //uch *ef_buf; /* buffer containing extra field */ >+ //unsigned ef_len; /* total length of extra field */ > { > unsigned eb_id; > unsigned eb_len; >@@ -1224,7 +1212,7 @@ static int disk_error(__G) > FnFilter1(G.filename))); > > #ifndef WINDLL >- fgets(G.answerbuf, sizeof(G.answerbuf), stdin); >+ (void)fgets(G.answerbuf, sizeof(G.answerbuf), stdin); > if (*G.answerbuf == 'y') /* stop writing to this file */ > G.disk_full = 1; /* (outfile bad?), but new OK */ > else >@@ -1245,11 +1233,11 @@ static int disk_error(__G) > /* Function UzpMessagePrnt() */ > /*****************************/ > >-int UZ_EXP UzpMessagePrnt(pG, buf, size, flag) >- zvoid *pG; /* globals struct: always passed */ >- uch *buf; /* preformatted string to be printed */ >- ulg size; /* length of string (may include nulls) */ >- int flag; /* flag bits */ >+int UZ_EXP UzpMessagePrnt(zvoid *pG, uch *buf, ulg size, int flag) >+ //zvoid *pG; /* globals struct: always passed */ >+ //uch *buf; /* preformatted string to be printed */ >+ //ulg size; /* length of string (may include nulls) */ >+ //int flag; /* flag bits */ > { > /* IMPORTANT NOTE: > * The name of the first parameter of UzpMessagePrnt(), which passes >@@ -1488,14 +1476,14 @@ int UZ_EXP UzpMessageNull(pG, buf, size, flag) > /* Function UzpInput() */ /* GRR: this is a placeholder for now */ > /***********************/ > >-int UZ_EXP UzpInput(pG, buf, size, flag) >- zvoid *pG; /* globals struct: always passed */ >- uch *buf; /* preformatted string to be printed */ >- int *size; /* (address of) size of buf and of returned string */ >- int flag; /* flag bits (bit 0: no echo) */ >+int UZ_EXP UzpInput(zvoid *pG, uch *buf, int *size, int flag) >+ //zvoid *pG; /* globals struct: always passed */ >+ //uch *buf; /* preformatted string to be printed */ >+ //int *size; /* (address of) size of buf and of returned string */ >+ //int flag; /* flag bits (bit 0: no echo) */ > { > /* tell picky compilers to shut up about "unused variable" warnings */ >- pG = pG; buf = buf; flag = flag; >+ //pG = pG; buf = buf; flag = flag; > > *size = 0; > return 0; >@@ -1512,10 +1500,10 @@ int UZ_EXP UzpInput(pG, buf, size, flag) > /* Function UzpMorePause() */ > /***************************/ > >-void UZ_EXP UzpMorePause(pG, prompt, flag) >- zvoid *pG; /* globals struct: always passed */ >- ZCONST char *prompt; /* "--More--" prompt */ >- int flag; /* 0 = any char OK; 1 = accept only '\n', ' ', q */ >+void UZ_EXP UzpMorePause(zvoid *pG, ZCONST char *prompt, int flag) >+ //zvoid *pG; /* globals struct: always passed */ >+ //ZCONST char *prompt; /* "--More--" prompt */ >+ //int flag; /* 0 = any char OK; 1 = accept only '\n', ' ', q */ > { > uch c; > >@@ -1574,18 +1562,18 @@ void UZ_EXP UzpMorePause(pG, prompt, flag) > /* Function UzpPassword() */ > /**************************/ > >-int UZ_EXP UzpPassword (pG, rcnt, pwbuf, size, zfn, efn) >- zvoid *pG; /* pointer to UnZip's internal global vars */ >- int *rcnt; /* retry counter */ >- char *pwbuf; /* buffer for password */ >- int size; /* size of password buffer */ >- ZCONST char *zfn; /* name of zip archive */ >- ZCONST char *efn; /* name of archive entry being processed */ >+int UZ_EXP UzpPassword (zvoid *pG, int *rcnt, char *pwbuf, int size, ZCONST char *zfn, ZCONST char *efn) >+ //zvoid *pG; /* pointer to UnZip's internal global vars */ >+ //int *rcnt; /* retry counter */ >+ //char *pwbuf; /* buffer for password */ >+ //int size; /* size of password buffer */ >+ //ZCONST char *zfn; /* name of zip archive */ >+ //ZCONST char *efn; /* name of archive entry being processed */ > { > #if CRYPT > int r = IZ_PW_ENTERED; > char *m; >- char *prompt; >+ char *prompt = NULL; > char *zfnf; > char *efnf; > size_t zfnfl; >@@ -1593,7 +1581,7 @@ int UZ_EXP UzpPassword (pG, rcnt, pwbuf, size, zfn, efn) > > #ifndef REENTRANT > /* tell picky compilers to shut up about "unused variable" warnings */ >- pG = pG; >+ //pG = pG; > #endif > > if (*rcnt == 0) { /* First call for current entry */ >@@ -1632,7 +1620,7 @@ int UZ_EXP UzpPassword (pG, rcnt, pwbuf, size, zfn, efn) > > #else /* !CRYPT */ > /* tell picky compilers to shut up about "unused variable" warnings */ >- pG = pG; rcnt = rcnt; pwbuf = pwbuf; size = size; zfn = zfn; efn = efn; >+ //pG = pG; rcnt = rcnt; pwbuf = pwbuf; size = size; zfn = zfn; efn = efn; > > return IZ_PW_ERROR; /* internal error; function should never get called */ > #endif /* ?CRYPT */ >@@ -1647,9 +1635,7 @@ int UZ_EXP UzpPassword (pG, rcnt, pwbuf, size, zfn, efn) > /* Function handler() */ > /**********************/ > >-void handler(signal) /* upon interrupt, turn on echo and exit cleanly */ >- int signal; >-{ >+void handler(int signal) { /* upon interrupt, turn on echo and exit cleanly */ > GETGLOBALS(); > > #if !(defined(SIGBUS) || defined(SIGSEGV)) /* add a newline if not at */ >@@ -1711,9 +1697,7 @@ ZCONST ush ydays[] = > /* Function dos_to_unix_time() */ /* used for freshening/updating/timestamps */ > /*******************************/ > >-time_t dos_to_unix_time(dosdatetime) >- ulg dosdatetime; >-{ >+time_t dos_to_unix_time(ulg dosdatetime) { > time_t m_time; > > #ifdef HAVE_MKTIME >@@ -1897,9 +1881,9 @@ time_t dos_to_unix_time(dosdatetime) > /* Function check_for_newer() */ /* used for overwriting/freshening/updating */ > /******************************/ > >-int check_for_newer(__G__ filename) /* return 1 if existing file is newer */ >- __GDEF /* or equal; 0 if older; -1 if doesn't */ >- char *filename; /* exist yet */ >+int check_for_newer(__GPRO__ char *filename) /* return 1 if existing file is newer */ >+ //__GDEF /* or equal; 0 if older; -1 if doesn't */ >+ //char *filename; /* exist yet */ > { > time_t existing, archive; > #ifdef USE_EF_UT_TIME >@@ -2016,10 +2000,8 @@ int check_for_newer(__G__ filename) /* return 1 if existing file is newer */ > /* Function do_string() */ > /************************/ > >-int do_string(__G__ length, option) /* return PK-type error code */ >- __GDEF >- unsigned int length; /* without prototype, ush converted to this */ >- int option; >+int do_string(__GPRO__ unsigned int length, int option) /* return PK-type error code */ >+ //unsigned int length; /* without prototype, ush converted to this */ > { > unsigned comment_bytes_left; > unsigned int block_len; >@@ -2446,9 +2428,7 @@ int do_string(__G__ length, option) /* return PK-type error code */ > /* Function makeword() */ > /***********************/ > >-ush makeword(b) >- ZCONST uch *b; >-{ >+ush makeword(ZCONST uch *b) { > /* > * Convert Intel style 'short' integer to non-Intel non-16-bit > * host format. This routine also takes care of byte-ordering. >@@ -2464,9 +2444,7 @@ ush makeword(b) > /* Function makelong() */ > /***********************/ > >-ulg makelong(sig) >- ZCONST uch *sig; >-{ >+ulg makelong(ZCONST uch *sig) { > /* > * Convert intel style 'long' variable to non-Intel non-16-bit > * host format. This routine also takes care of byte-ordering. >@@ -2485,9 +2463,7 @@ ulg makelong(sig) > /* Function makeint64() */ > /************************/ > >-zusz_t makeint64(sig) >- ZCONST uch *sig; >-{ >+zusz_t makeint64(ZCONST uch *sig) { > #ifdef LARGE_FILE_SUPPORT > /* > * Convert intel style 'int64' variable to non-Intel non-16-bit >@@ -2524,12 +2500,7 @@ zusz_t makeint64(sig) > /*********************/ > > /* Format a zoff_t value in a cylindrical buffer set. */ >-char *fzofft(__G__ val, pre, post) >- __GDEF >- zoff_t val; >- ZCONST char *pre; >- ZCONST char *post; >-{ >+char *fzofft(__GPRO__ zoff_t val, ZCONST char *pre, ZCONST char *post) { > /* Storage cylinder. (now in globals.h) */ > /*static char fzofft_buf[FZOFFT_NUM][FZOFFT_LEN];*/ > /*static int fzofft_index = 0;*/ >@@ -2607,9 +2578,9 @@ char *str2iso(dst, src) > /* Function str2oem() */ > /**********************/ > >-char *str2oem(dst, src) >- char *dst; /* destination buffer */ >- register ZCONST char *src; /* source string */ >+char *str2oem(char *dst, register ZCONST char *src) >+ //char *dst; /* destination buffer */ >+ //register ZCONST char *src; /* source string */ > { > #ifdef INTERN_TO_OEM > INTERN_TO_OEM(src, dst); >@@ -2702,10 +2673,7 @@ zvoid *memcpy(dst, src, len) > /* Function zstrnicmp() */ > /************************/ > >-int zstrnicmp(s1, s2, n) >- register ZCONST char *s1, *s2; >- register unsigned n; >-{ >+int zstrnicmp(register ZCONST char *s1, register ZCONST char *s2, register unsigned n) { > for (; n > 0; --n, ++s1, ++s2) { > > if (ToLower(*s1) != ToLower(*s2)) >diff --git a/funzip.c b/funzip.c >index 1e55910..c540bd5 100644 >--- a/funzip.c >+++ b/funzip.c >@@ -218,9 +218,7 @@ __GDEF > #endif /* USE_ZLIB */ > > >-static void err(n, m) >-int n; >-char *m; >+static void err(int n, char *m) > /* Exit on error with a message and a code */ > { > Info(slide, 1, ((char *)slide, "funzip error: %s\n", m)); >@@ -243,8 +241,8 @@ extent w; /* number of bytes to flush */ > } > > >-int flush(w) /* used by inflate.c (FLUSH macro) */ >-ulg w; /* number of bytes to flush */ >+int flush(ulg w) /* used by inflate.c (FLUSH macro) */ >+//ulg w; /* number of bytes to flush */ > { > uch *rawbuf; > int ret; >@@ -266,8 +264,8 @@ ulg w; /* number of bytes to flush */ > > #else /* !(USE_DEFLATE64 && __16BIT__) */ > >-int flush(w) /* used by inflate.c (FLUSH macro) */ >-ulg w; /* number of bytes to flush */ >+int flush(ulg w) /* used by inflate.c (FLUSH macro) */ >+//ulg w; /* number of bytes to flush */ > { > G.crc32val = crc32(G.crc32val, slide, (extent)w); > if (fwrite((char *)slide,1,(extent)w,out) != (extent)w && !PIPE_ERROR) >@@ -279,9 +277,7 @@ ulg w; /* number of bytes to flush */ > #endif /* ?(USE_DEFLATE64 && __16BIT__) */ > > >-int main(argc, argv) >-int argc; >-char **argv; >+int main(int argc, char **argv) > /* Given a zipfile on stdin, decompress the first entry to stdout. */ > { > ush n; >diff --git a/inflate.c b/inflate.c >index 2c37999..9a0e230 100644 >--- a/inflate.c >+++ b/inflate.c >@@ -929,10 +929,9 @@ static ZCONST unsigned dbits = 6; > > #ifndef ASM_INFLATECODES > >-int inflate_codes(__G__ tl, td, bl, bd) >- __GDEF >-struct huft *tl, *td; /* literal/length and distance decoder tables */ >-unsigned bl, bd; /* number of bits decoded by tl[] and td[] */ >+int inflate_codes(__GPRO__ struct huft *tl, struct huft *td, unsigned bl, unsigned bd) >+//struct huft *tl, *td; /* literal/length and distance decoder tables */ >+//unsigned bl, bd; /* number of bits decoded by tl[] and td[] */ > /* inflate (decompress) the codes in a deflated (compressed) block. > Return an error code or zero if it all goes ok. */ > { >@@ -1383,9 +1382,8 @@ cleanup_and_exit: > > > >-static int inflate_block(__G__ e) >- __GDEF >- int *e; /* last block flag */ >+static int inflate_block(__GPRO__ int *e) >+ //int *e; /* last block flag */ > /* decompress an inflated block */ > { > unsigned t; /* block type */ >@@ -1434,9 +1432,7 @@ cleanup_and_exit: > > > >-int inflate(__G__ is_defl64) >- __GDEF >- int is_defl64; >+int inflate(__GPRO__ int is_defl64) > /* decompress an inflated entry */ > { > int e; /* last block flag */ >@@ -1548,15 +1544,14 @@ int inflate_free(__G) > #define N_MAX 288 /* maximum number of codes in any set */ > > >-int huft_build(__G__ b, n, s, d, e, t, m) >- __GDEF >- ZCONST unsigned *b; /* code lengths in bits (all assumed <= BMAX) */ >- unsigned n; /* number of codes (assumed <= N_MAX) */ >- unsigned s; /* number of simple-valued codes (0..s-1) */ >- ZCONST ush *d; /* list of base values for non-simple codes */ >- ZCONST uch *e; /* list of extra bits for non-simple codes */ >- struct huft **t; /* result: starting table */ >- unsigned *m; /* maximum lookup bits, returns actual */ >+int huft_build(__GPRO__ ZCONST unsigned *b, unsigned n, unsigned s, ZCONST ush *d, ZCONST uch *e, struct huft **t, unsigned *m) >+ //ZCONST unsigned *b; /* code lengths in bits (all assumed <= BMAX) */ >+ //unsigned n; /* number of codes (assumed <= N_MAX) */ >+ //unsigned s; /* number of simple-valued codes (0..s-1) */ >+ //ZCONST ush *d; /* list of base values for non-simple codes */ >+ //ZCONST uch *e; /* list of extra bits for non-simple codes */ >+ //struct huft **t; /* result: starting table */ >+ //unsigned *m; /* maximum lookup bits, returns actual */ > /* Given a list of code lengths and a maximum table size, make a set of > tables to decode that set of codes. Return zero on success, one if > the given code set is incomplete (the tables are still built in this >@@ -1754,8 +1749,8 @@ int huft_build(__G__ b, n, s, d, e, t, m) > > > >-int huft_free(t) >-struct huft *t; /* table to free */ >+int huft_free(struct huft *t) >+//struct huft *t; /* table to free */ > /* Free the malloc'ed tables built by huft_build(), which makes a linked > list of the tables it made, with the links in a dummy first entry of > each table. */ >diff --git a/list.c b/list.c >index 4f206aa..35f5528 100644 >--- a/list.c >+++ b/list.c >@@ -562,10 +562,7 @@ static int fn_is_dir(__G) /* returns TRUE if G.filename is directory */ > /* Function get_time_stamp() */ > /*****************************/ > >-int get_time_stamp(__G__ last_modtime, nmember) /* return PK-type error code */ >- __GDEF >- time_t *last_modtime; >- ulg *nmember; >+int get_time_stamp(__GPRO__ time_t *last_modtime, ulg *nmember) /* return PK-type error code */ > { > int do_this_file=FALSE, error, error_in_archive=PK_COOL; > ulg j; >@@ -705,9 +702,7 @@ int get_time_stamp(__G__ last_modtime, nmember) /* return PK-type error code */ > /* Function ratio() */ /* also used by ZipInfo routines */ > /********************/ > >-int ratio(uc, c) >- zusz_t uc, c; >-{ >+int ratio(zusz_t uc, zusz_t c) { > zusz_t denom; > > if (uc == 0) >diff --git a/match.c b/match.c >index f634409..85721a7 100644 >--- a/match.c >+++ b/match.c >@@ -122,11 +122,7 @@ static int namecmp OF((ZCONST char *s1, ZCONST char *s2)); > > /* match() is a shell to recmatch() to return only Boolean values. */ > >-int match(string, pattern, ignore_case __WDL) >- ZCONST char *string, *pattern; >- int ignore_case; >- __WDLDEF >-{ >+int match(ZCONST char *string, ZCONST char *pattern, int ignore_case __WDLPRO) { > #if (defined(MSDOS) && defined(DOSWILD)) > char *dospattern; > int j = strlen(pattern); >@@ -164,11 +160,11 @@ int match(string, pattern, ignore_case __WDL) > > > >-static int recmatch(p, s, ic __WDL) >- ZCONST uch *p; /* sh pattern to match */ >- ZCONST uch *s; /* string to which to match it */ >- int ic; /* true for case insensitivity */ >- __WDLDEF /* directory sepchar for WildStopAtDir mode, or 0 */ >+static int recmatch(ZCONST uch *p, ZCONST uch *s, int ic __WDLPRO) >+ //ZCONST uch *p; /* sh pattern to match */ >+ //ZCONST uch *s; /* string to which to match it */ >+ //int ic; /* true for case insensitivity */ >+ //__WDLDEF /* directory sepchar for WildStopAtDir mode, or 0 */ > /* Recursively compare the sh pattern p with the string s and return 1 if > * they match, and 0 or 2 if they don't or if there is a syntax error in the > * pattern. This routine recurses on itself no more deeply than the number >@@ -340,8 +336,7 @@ static int recmatch(p, s, ic __WDL) > > > >-static char *isshexp(p) >-ZCONST char *p; >+static char *isshexp(ZCONST char *p) > /* If p is a sh expression, a pointer to the first special character is > returned. Otherwise, NULL is returned. */ > { >@@ -355,9 +350,7 @@ ZCONST char *p; > > > >-static int namecmp(s1, s2) >- ZCONST char *s1, *s2; >-{ >+static int namecmp(ZCONST char *s1, ZCONST char *s2) { > int d; > > for (;;) { >@@ -377,8 +370,8 @@ static int namecmp(s1, s2) > > > >-int iswild(p) /* originally only used for stat()-bug workaround in */ >- ZCONST char *p; /* VAX C, Turbo/Borland C, Watcom C, Atari MiNT libs; */ >+int iswild(ZCONST char *p) /* originally only used for stat()-bug workaround in */ >+ //ZCONST char *p; /* VAX C, Turbo/Borland C, Watcom C, Atari MiNT libs; */ > { /* now used in process_zipfiles() as well */ > for (; *p; INCSTR(p)) > if (*p == '\\' && *(p+1)) >diff --git a/process.c b/process.c >index a7d5b87..2c8be6a 100644 >--- a/process.c >+++ b/process.c >@@ -656,10 +656,7 @@ void free_G_buffers(__G) /* releases all memory allocated in global vars */ > /* Function do_seekable() */ > /**************************/ > >-static int do_seekable(__G__ lastchance) /* return PK-type error code */ >- __GDEF >- int lastchance; >-{ >+static int do_seekable(__GPRO__ int lastchance) { /* return PK-type error code */ > #ifndef SFX > /* static int no_ecrec = FALSE; SKM: moved to globals.h */ > int maybe_exe=FALSE; >@@ -1124,12 +1121,8 @@ static zoff_t file_size(fh) > /* Function rec_find() */ > /***********************/ > >-static int rec_find(__G__ searchlen, signature, rec_size) >+static int rec_find(__GPRO__ zoff_t searchlen, char* signature, int rec_size) > /* return 0 when rec found, 1 when not found, 2 in case of read error */ >- __GDEF >- zoff_t searchlen; >- char* signature; >- int rec_size; > { > int i, numblks, found=FALSE; > zoff_t tail_len; >@@ -1225,10 +1218,7 @@ static int check_ecrec_zip64(__G) > /* Function find_ecrec64() */ > /***************************/ > >-static int find_ecrec64(__G__ searchlen) /* return PK-class error */ >- __GDEF >- zoff_t searchlen; >-{ >+static int find_ecrec64(__GPRO__ zoff_t searchlen) { /* return PK-class error */ > ec_byte_rec64 byterec; /* buf for ecrec64 */ > ec_byte_loc64 byterecL; /* buf for ecrec64 locator */ > zoff_t ecloc64_start_offset; /* start offset of ecrec64 locator */ >@@ -1455,10 +1445,7 @@ static int find_ecrec64(__G__ searchlen) /* return PK-class error */ > /* Function find_ecrec() */ > /*************************/ > >-static int find_ecrec(__G__ searchlen) /* return PK-class error */ >- __GDEF >- zoff_t searchlen; >-{ >+static int find_ecrec(__GPRO__ zoff_t searchlen) { /* return PK-class error */ > int found = FALSE; > int error_in_archive; > int result; >@@ -1902,10 +1889,9 @@ int process_local_file_hdr(__G) /* return PK-type error code */ > /* Function getZip64Data() */ > /*******************************/ > >-int getZip64Data(__G__ ef_buf, ef_len) >- __GDEF >- ZCONST uch *ef_buf; /* buffer containing extra field */ >- unsigned ef_len; /* total length of extra field */ >+int getZip64Data(__GPRO__ ZCONST uch *ef_buf, unsigned ef_len) >+ //ZCONST uch *ef_buf; /* buffer containing extra field */ >+ //unsigned ef_len; /* total length of extra field */ > { > unsigned eb_id; > unsigned eb_len; >@@ -2009,10 +1995,9 @@ int getZip64Data(__G__ ef_buf, ef_len) > /* Function getUnicodeData() */ > /*******************************/ > >-int getUnicodeData(__G__ ef_buf, ef_len) >- __GDEF >- ZCONST uch *ef_buf; /* buffer containing extra field */ >- unsigned ef_len; /* total length of extra field */ >+int getUnicodeData(__GPRO__ ZCONST uch *ef_buf, unsigned ef_len) >+ //ZCONST uch *ef_buf; /* buffer containing extra field */ >+ //unsigned ef_len; /* total length of extra field */ > { > unsigned eb_id; > unsigned eb_len; >@@ -2157,9 +2142,7 @@ static int utf8_to_ucs4_string OF((ZCONST char *utf8, ulg *ucs4buf, > * Returns the number of bytes used by the first character in a UTF-8 > * string, or -1 if the UTF-8 is invalid or null. > */ >-static int utf8_char_bytes(utf8) >- ZCONST char *utf8; >-{ >+static int utf8_char_bytes(ZCONST char *utf8) { > int t, r; > unsigned lead; > >@@ -2196,9 +2179,7 @@ static int utf8_char_bytes(utf8) > * Returns ~0 (= -1 in twos-complement notation) and does not advance the > * pointer when input is ill-formed. > */ >-static ulg ucs4_char_from_utf8(utf8) >- ZCONST char **utf8; >-{ >+static ulg ucs4_char_from_utf8(ZCONST char **utf8) { > ulg ret; > int t, bytes; > >@@ -2264,11 +2245,7 @@ static int utf8_from_ucs4_char(utf8buf, ch) > * > * Return UCS count. Now returns int so can return -1. > */ >-static int utf8_to_ucs4_string(utf8, ucs4buf, buflen) >- ZCONST char *utf8; >- ulg *ucs4buf; >- int buflen; >-{ >+static int utf8_to_ucs4_string(ZCONST char *utf8, ulg *ucs4buf, int buflen) { > int count = 0; > > for (;;) >@@ -2408,9 +2385,7 @@ char *local_to_utf8_string(local_string) > /* set this to the max bytes an escape can be */ > #define MAX_ESCAPE_BYTES 8 > >-char *wide_to_escape_string(wide_char) >- zwchar wide_char; >-{ >+char *wide_to_escape_string(zwchar wide_char) { > int i; > zwchar w = wide_char; > uch b[sizeof(zwchar)]; >@@ -2497,14 +2472,11 @@ zwchar escape_string_to_wide(escape_string) > > #ifndef WIN32 /* WIN32 supplies a special variant of this function */ > /* convert wide character string to multi-byte character string */ >-char *wide_to_local_string(wide_string, escape_all) >- ZCONST zwchar *wide_string; >- int escape_all; >-{ >+char *wide_to_local_string(ZCONST zwchar *wide_string, int escape_all) { > int i; > wchar_t wc; > int b; >- int state_dependent; >+ //int state_dependent; > int wsize = 0; > int max_bytes = MB_CUR_MAX; > char buf[ MB_CUR_MAX+ 1]; /* ("+1" not really needed?) */ >@@ -2526,10 +2498,10 @@ char *wide_to_local_string(wide_string, escape_all) > /* set initial state if state-dependent encoding */ > wc = (wchar_t)'a'; > b = wctomb(NULL, wc); >- if (b == 0) >+ /*if (b == 0) > state_dependent = 0; > else >- state_dependent = 1; >+ state_dependent = 1;*/ > for (i = 0; i < wsize; i++) { > if (sizeof(wchar_t) < 4 && wide_string[i] > 0xFFFF) { > /* wchar_t probably 2 bytes */ >@@ -2624,10 +2596,7 @@ char *local_to_display_string(local_string) > #endif /* unused */ > > /* UTF-8 to local */ >-char *utf8_to_local_string(utf8_string, escape_all) >- ZCONST char *utf8_string; >- int escape_all; >-{ >+char *utf8_to_local_string(ZCONST char *utf8_string, int escape_all) { > zwchar *wide; > char *loc = NULL; > >@@ -2701,9 +2670,7 @@ char *wide_to_utf8_string(wide_string) > #endif /* unused */ > > /* convert UTF-8 string to wide string */ >-zwchar *utf8_to_wide_string(utf8_string) >- ZCONST char *utf8_string; >-{ >+zwchar *utf8_to_wide_string(ZCONST char *utf8_string) { > int wcount; > zwchar *wide_string; > >@@ -2763,14 +2730,14 @@ static int read_ux3_value(dbuf, uidgid_sz, p_uidgid) > /* Function ef_scan_for_izux() */ > /*******************************/ > >-unsigned ef_scan_for_izux(ef_buf, ef_len, ef_is_c, dos_mdatetime, >- z_utim, z_uidgid) >- ZCONST uch *ef_buf; /* buffer containing extra field */ >- unsigned ef_len; /* total length of extra field */ >- int ef_is_c; /* flag indicating "is central extra field" */ >- ulg dos_mdatetime; /* last_mod_file_date_time in DOS format */ >- iztimes *z_utim; /* return storage: atime, mtime, ctime */ >- ulg *z_uidgid; /* return storage: uid and gid */ >+unsigned ef_scan_for_izux(ZCONST uch *ef_buf, unsigned ef_len, int ef_is_c, ulg dos_mdatetime, >+ iztimes *z_utim, ulg *z_uidgid) >+ //ZCONST uch *ef_buf; /* buffer containing extra field */ >+ //unsigned ef_len; /* total length of extra field */ >+ //int ef_is_c; /* flag indicating "is central extra field" */ >+ //ulg dos_mdatetime; /* last_mod_file_date_time in DOS format */ >+ //iztimes *z_utim; /* return storage: atime, mtime, ctime */ >+ //ulg *z_uidgid; /* return storage: uid and gid */ > { > unsigned flags = 0; > unsigned eb_id; >diff --git a/ttyio.c b/ttyio.c >index a1a13b1..386cd87 100644 >--- a/ttyio.c >+++ b/ttyio.c >@@ -303,9 +303,8 @@ int tt_getch() > /* > * Turn echo off for file descriptor f. Assumes that f is a tty device. > */ >-void Echoff(__G__ f) >- __GDEF >- int f; /* file descriptor for which to turn echo off */ >+void Echoff(__GPRO__ int f) >+ //int f; /* file descriptor for which to turn echo off */ > { > struct sgttyb sg; /* tty device structure */ > >@@ -350,10 +349,7 @@ void Echon(__G) > > #if (defined(TIOCGWINSZ) && !defined(M_UNIX)) > >-int screensize(tt_rows, tt_cols) >- int *tt_rows; >- int *tt_cols; >-{ >+int screensize(int *tt_rows, int *tt_cols) { > struct winsize wsz; > #ifdef DEBUG_WINSZ > static int firsttime = TRUE; >@@ -436,9 +432,8 @@ int screensize(tt_rows, tt_cols) > /* > * Get a character from the given file descriptor without echo or newline. > */ >-int zgetch(__G__ f) >- __GDEF >- int f; /* file descriptor from which to read */ >+int zgetch(__GPRO__ int f) >+ //int f; /* file descriptor from which to read */ > { > #if (defined(USE_SYSV_TERMIO) || defined(USE_POSIX_TERMIOS)) > char oldmin, oldtim; >@@ -460,7 +455,7 @@ int zgetch(__G__ f) > STTY(f, &sg); /* set cbreak mode */ > GLOBAL(echofd) = f; /* in case ^C hit (not perfect: still CBREAK) */ > >- read(f, &c, 1); /* read our character */ >+ (void)read(f, &c, 1); /* read our character */ > > #if (defined(USE_SYSV_TERMIO) || defined(USE_POSIX_TERMIOS)) > sg.c_cc[VMIN] = oldmin; /* restore old values */ >@@ -547,11 +542,10 @@ int zgetch(__G__ f) > /* This is the getp() function for all systems (with TTY type user interface) > * that supply a working `non-echo' getch() function for "raw" console input. > */ >-char *getp(__G__ m, p, n) >- __GDEF >- ZCONST char *m; /* prompt for password */ >- char *p; /* return value: line input */ >- int n; /* bytes available in p[] */ >+char *getp(__GPRO__ ZCONST char *m, char *p, int n) >+ //ZCONST char *m; /* prompt for password */ >+ //char *p; /* return value: line input */ >+ //int n; /* bytes available in p[] */ > { > char c; /* one-byte buffer for read() to use */ > int i; /* number of characters input */ >@@ -599,11 +593,10 @@ char *getp(__G__ m, p, n) > # endif > #endif > >-char *getp(__G__ m, p, n) >- __GDEF >- ZCONST char *m; /* prompt for password */ >- char *p; /* return value: line input */ >- int n; /* bytes available in p[] */ >+char *getp(__GPRO__ ZCONST char *m, char *p, int n) >+ //ZCONST char *m; /* prompt for password */ >+ //char *p; /* return value: line input */ >+ //int n; /* bytes available in p[] */ > { > char c; /* one-byte buffer for read() to use */ > int i; /* number of characters input */ >@@ -628,7 +621,7 @@ char *getp(__G__ m, p, n) > i = 0; > echoff(f); > do { /* read line, keeping n */ >- read(f, &c, 1); >+ (void)read(f, &c, 1); > if (i < n) > p[i++] = c; > } while (c != '\n'); >@@ -652,11 +645,10 @@ char *getp(__G__ m, p, n) > > #if (defined(VMS) || defined(CMS_MVS)) > >-char *getp(__G__ m, p, n) >- __GDEF >- ZCONST char *m; /* prompt for password */ >- char *p; /* return value: line input */ >- int n; /* bytes available in p[] */ >+char *getp(__GPRO__ ZCONST char *m, char *p, int n) >+ //ZCONST char *m; /* prompt for password */ >+ //char *p; /* return value: line input */ >+ //int n; /* bytes available in p[] */ > { > char c; /* one-byte buffer for read() to use */ > int i; /* number of characters input */ >diff --git a/ubz2err.c b/ubz2err.c >index f384489..c242b18 100644 >--- a/ubz2err.c >+++ b/ubz2err.c >@@ -45,9 +45,7 @@ > * BZ_NO_STDIO), required to handle fatal internal bug-type errors of > * the bzip2 library. > */ >-void bz_internal_error(bzerrcode) >- int bzerrcode; >-{ >+void bz_internal_error(int bzerrcode) { > GETGLOBALS(); > > Info(slide, 0x421, ((char *)slide, >diff --git a/unix/unix.c b/unix/unix.c >index 57a3813..81cbe9f 100644 >--- a/unix/unix.c >+++ b/unix/unix.c >@@ -189,9 +189,8 @@ struct dirent *readdir(dirp) > /* Function do_wild() */ /* for porting: dir separator; match(ignore_case) */ > /**********************/ > >-char *do_wild(__G__ wildspec) >- __GDEF >- ZCONST char *wildspec; /* only used first time on a given dir */ >+char *do_wild(__GPRO__ ZCONST char *wildspec) >+ //ZCONST char *wildspec; /* only used first time on a given dir */ > { > /* these statics are now declared in SYSTEM_SPECIFIC_GLOBALS in unxcfg.h: > static DIR *wild_dir = (DIR *)NULL; >@@ -331,10 +330,7 @@ char *do_wild(__G__ wildspec) > * file as the user or group. The new option -K bypasses this check. > */ > >-static unsigned filtattr(__G__ perms) >- __GDEF >- unsigned perms; >-{ >+static unsigned filtattr(__GPRO__ unsigned perms) { > /* keep setuid/setgid/tacky perms? */ > if (!uO.K_flag) > perms &= ~(S_ISUID | S_ISGID | S_ISVTX); >@@ -498,9 +494,7 @@ int mapattr(__G) > /* Function mapname() */ > /************************/ > >-int mapname(__G__ renamed) >- __GDEF >- int renamed; >+int mapname(__GPRO__ int renamed) > /* > * returns: > * MPN_OK - no problem detected >@@ -751,10 +745,7 @@ int mapname(__G__ renamed) > /* Function checkdir() */ > /***********************/ > >-int checkdir(__G__ pathcomp, flag) >- __GDEF >- char *pathcomp; >- int flag; >+int checkdir(__GPRO__ char *pathcomp, int flag) > /* > * returns: > * MPN_OK - no problem detected >@@ -1044,11 +1035,7 @@ int mkdir(path, mode) > #if (!defined(MTS) || defined(SET_DIR_ATTRIB)) > static int get_extattribs OF((__GPRO__ iztimes *pzt, ulg z_uidgid[2])); > >-static int get_extattribs(__G__ pzt, z_uidgid) >- __GDEF >- iztimes *pzt; >- ulg z_uidgid[2]; >-{ >+static int get_extattribs(__G__ iztimes *pzt, ulg z_uidgid[2]) { > /*--------------------------------------------------------------------------- > Convert from MSDOS-format local time and date to Unix-format 32-bit GMT > time: adjust base year from 1980 to 1970, do usual conversions from >@@ -1276,10 +1263,7 @@ void close_outfile(__G) /* GRR: change to return PK-style warning level */ > > > #if (defined(SYMLINKS) && defined(SET_SYMLINK_ATTRIBS)) >-int set_symlnk_attribs(__G__ slnk_entry) >- __GDEF >- slinkentry *slnk_entry; >-{ >+int set_symlnk_attribs(__GPRO__ slinkentry *slnk_entry) { > if (slnk_entry->attriblen > 0) { > # if (!defined(NO_LCHOWN)) > if (slnk_entry->attriblen > sizeof(unsigned)) { >@@ -1324,10 +1308,7 @@ int set_symlnk_attribs(__G__ slnk_entry) > # endif > > >-int defer_dir_attribs(__G__ pd) >- __GDEF >- direntry **pd; >-{ >+int defer_dir_attribs(__GPRO__ direntry **pd) { > uxdirattr *d_entry; > > d_entry = (uxdirattr *)malloc(sizeof(uxdirattr) + strlen(G.filename)); >@@ -1346,10 +1327,7 @@ int defer_dir_attribs(__G__ pd) > } /* end function defer_dir_attribs() */ > > >-int set_direc_attribs(__G__ d) >- __GDEF >- direntry *d; >-{ >+int set_direc_attribs(__GPRO__ direntry *d) { > int errval = PK_OK; > > if (UxAtt(d)->have_uidgid && >@@ -1397,10 +1375,7 @@ int set_direc_attribs(__G__ d) > /* Function stamp_file() */ > /***************************/ > >-int stamp_file(fname, modtime) >- ZCONST char *fname; >- time_t modtime; >-{ >+int stamp_file(ZCONST char *fname, time_t modtime) { > ztimbuf tp; > > tp.modtime = tp.actime = modtime; >diff --git a/unix/unxcfg.h b/unix/unxcfg.h >index 6ef19cc..6b17d2d 100644 >--- a/unix/unxcfg.h >+++ b/unix/unxcfg.h >@@ -118,7 +118,8 @@ typedef struct stat z_stat; > # endif > #else > # include <time.h> >- struct tm *gmtime(), *localtime(); >+ struct tm *gmtime(const time_t *__timer); >+ struct tm *localtime(const time_t *__timer); > #endif > > #if (defined(BSD4_4) || (defined(SYSV) && defined(MODERN))) >diff --git a/unshrink.c b/unshrink.c >index ae993e9..e64a2d4 100644 >--- a/unshrink.c >+++ b/unshrink.c >@@ -304,10 +304,7 @@ int unshrink(__G) > /* Function partial_clear() */ /* no longer recursive... */ > /****************************/ > >-static void partial_clear(__G__ lastcodeused) >- __GDEF >- int lastcodeused; >-{ >+static void partial_clear(__GPRO__ int lastcodeused) { > register shrint code; > > /* clear all nodes which have no children (i.e., leaf nodes only) */ >diff --git a/unzip.c b/unzip.c >index a512a6a..5005318 100644 >--- a/unzip.c >+++ b/unzip.c >@@ -717,9 +717,7 @@ See \"unzip -hh\" or unzip.txt for more help. Examples:\n\ > /* main() / UzpMain() stub */ > /*****************************/ > >-int MAIN(argc, argv) /* return PK-type error code (except under VMS) */ >- int argc; >- char *argv[]; >+int MAIN(int argc, char *argv[]) /* return PK-type error code (except under VMS) */ > { > int r; > >@@ -736,10 +734,7 @@ int MAIN(argc, argv) /* return PK-type error code (except under VMS) */ > /* Primary UnZip entry point */ > /*******************************/ > >-int unzip(__G__ argc, argv) >- __GDEF >- int argc; >- char *argv[]; >+int unzip(__GPRO__ int argc, char *argv[]) > { > #ifndef NO_ZIPINFO > char *p; >@@ -1334,11 +1329,7 @@ static int setsignalhandler(__G__ p_savedhandler_chain, signal_type, > /* Function uz_opts() */ > /**********************/ > >-int uz_opts(__G__ pargc, pargv) >- __GDEF >- int *pargc; >- char ***pargv; >-{ >+int uz_opts(__GPRO__ int *pargc, char ***pargv) { > char **argv, *s; > int argc, c, error=FALSE, negative=0, showhelp=0; > >@@ -2045,9 +2036,7 @@ opts_done: /* yes, very ugly...but only used by UnZipSFX with -x xlist */ > # endif > # endif > >-int usage(__G__ error) /* return PK-type error code */ >- __GDEF >- int error; >+int usage(__GPRO__ int error) /* return PK-type error code */ > { > Info(slide, error? 1 : 0, ((char *)slide, LoadFarString(UnzipSFXBanner), > UZ_MAJORVER, UZ_MINORVER, UZ_PATCHLEVEL, UZ_BETALEVEL, >@@ -2079,9 +2068,7 @@ int usage(__G__ error) /* return PK-type error code */ > # define QUOTS "" > # endif > >-int usage(__G__ error) /* return PK-type error code */ >- __GDEF >- int error; >+int usage(__GPRO__ int error) /* return PK-type error code */ > { > int flag = (error? 1 : 0); > >diff --git a/zipinfo.c b/zipinfo.c >index f29aba3..8c15beb 100644 >--- a/zipinfo.c >+++ b/zipinfo.c >@@ -446,11 +446,7 @@ static ZCONST char Far DecimalTime[] = "%04u%02u%02u.%02u%02u%02u"; > /* Function zi_opts() */ > /************************/ > >-int zi_opts(__G__ pargc, pargv) >- int *pargc; >- char ***pargv; >- __GDEF >-{ >+int zi_opts(__GPRO__ int *pargc, char ***pargv) { > char **argv, *s; > int argc, c, error=FALSE, negative=0; > int hflag_slmv=TRUE, hflag_2=FALSE; /* diff options => diff defaults */ >@@ -1046,11 +1042,10 @@ int zipinfo(__G) /* return PK-type error code */ > /* Function zi_long() */ > /************************/ > >-static int zi_long(__G__ pEndprev, error_in_archive) >+static int zi_long(__GPRO__ zusz_t *pEndprev, int error_in_archive) > /* return PK-type error code */ >- __GDEF >- zusz_t *pEndprev; /* for zi_long() check of extra bytes */ >- int error_in_archive; /* may signal premature return */ >+ //zusz_t *pEndprev; /* for zi_long() check of extra bytes */ >+ //int error_in_archive; /* may signal premature return */ > { > #ifdef USE_EF_UT_TIME > iztimes z_utime; >@@ -2269,10 +2264,7 @@ static int zi_short(__G) /* return PK-type error code */ > /* Function zi_showMacTypeCreator() */ > /**************************************/ > >-static void zi_showMacTypeCreator(__G__ ebfield) >- __GDEF >- uch *ebfield; >-{ >+static void zi_showMacTypeCreator(__GPRO__ uch *ebfield) { > /* not every Type / Creator character is printable */ > if (isprint(native(ebfield[0])) && isprint(native(ebfield[1])) && > isprint(native(ebfield[2])) && isprint(native(ebfield[3])) && >@@ -2304,12 +2296,7 @@ static void zi_showMacTypeCreator(__G__ ebfield) > /* Function zi_time() */ > /************************/ > >-static char *zi_time(__G__ datetimez, modtimez, d_t_str) >- __GDEF >- ZCONST ulg *datetimez; >- ZCONST time_t *modtimez; >- char *d_t_str; >-{ >+static char *zi_time(__GPRO__ ZCONST ulg *datetimez, ZCONST time_t *modtimez, char *d_t_str) { > unsigned yr, mo, dy, hh, mm, ss; > char monthbuf[4]; > ZCONST char *monthstr;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 910280
:
865442
|
865443
|
875455
|
875456
| 875605