diff options
author | Erik Andersen <andersen@codepoet.org> | 2000-02-12 00:55:04 +0300 |
---|---|---|
committer | Erik Andersen <andersen@codepoet.org> | 2000-02-12 00:55:04 +0300 |
commit | 9ffdaa647ee57263247e047e6c67c5a7fa1f2a6c (patch) | |
tree | 3485e1645439990642fcb941d579deb10f8a17a7 /gunzip.c | |
parent | 5e1b2ca1161cba481ccf4873427389f59dbc23e0 (diff) |
Updates
-Erik
Diffstat (limited to 'gunzip.c')
-rw-r--r-- | gunzip.c | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -194,7 +194,7 @@ extern int method; /* compression method */ # define DECLARE(type, array, size) type * array # define ALLOC(type, array, size) { \ array = (type*)calloc((size_t)(((size)+1L)/2), 2*sizeof(type)); \ - if (array == NULL) error("insufficient memory"); \ + if (array == NULL) errorMsg("insufficient memory"); \ } # define FREE(array) {if (array != NULL) free(array), array=NULL;} #else @@ -311,7 +311,7 @@ extern int save_orig_name; /* set if original name must be saved */ /* Diagnostic functions */ #ifdef DEBUG -# define Assert(cond,msg) {if(!(cond)) error(msg);} +# define Assert(cond,msg) {if(!(cond)) errorMsg(msg);} # define Trace(x) fprintf x # define Tracev(x) {if (verbose) fprintf x ;} # define Tracevv(x) {if (verbose>1) fprintf x ;} @@ -367,8 +367,6 @@ extern void write_buf OF((int fd, voidp buf, unsigned cnt)); #ifndef __linux__ extern char *basename OF((char *fname)); #endif /* not __linux__ */ -extern void error OF((char *m)); -extern void warn OF((char *a, char *b)); extern void read_error OF((void)); extern void write_error OF((void)); @@ -1045,13 +1043,13 @@ int in, out; /* input and output file descriptors */ int res = inflate(); if (res == 3) { - error("out of memory"); + errorMsg("out of memory"); } else if (res != 0) { - error("invalid compressed data--format violated"); + errorMsg("invalid compressed data--format violated"); } } else { - error("internal error, invalid method"); + errorMsg("internal error, invalid method"); } /* Get the crc and original length */ @@ -1080,10 +1078,10 @@ int in, out; /* input and output file descriptors */ /* Validate decompression */ if (orig_crc != updcrc(outbuf, 0)) { - error("invalid compressed data--crc error"); + errorMsg("invalid compressed data--crc error"); } if (orig_len != (ulg) bytes_out) { - error("invalid compressed data--length error"); + errorMsg("invalid compressed data--length error"); } /* Check if there are more entries in a pkzip file */ |