1 /*
2   The code here is based on code by Mark Adler et al. which is
3   Copyright (c) 1990-2005 Info-ZIP.  Specifically, it derives from zip
4   version 2.31.  Modifications are by Allin Cottrell, March, 2006.
5   Please see the included file "LICENSE" which contains the Info-ZIP
6   license information.
7 */
8 
9 #ifndef ZIPERR_H_
10 #define ZIPERR_H_
11 
12 /* Error code values.  The values 0..4 and 12..18 follow the
13    conventions of PKZIP.  The values 4..10 are all assigned to
14    "insufficient memory" by PKZIP, so the codes 5..10 are used here
15    for other purposes.  Allin Cottrell: added errors beyond 18 and
16    increased ZE_MAXERR accordingly.
17 */
18 #define ZE_MISS        -1       /* used by process_filename() */
19 #define ZE_OK           0       /* success */
20 #define ZE_EOF          2       /* unexpected end of zip file */
21 #define ZE_FORM         3       /* zip file structure error */
22 #define ZE_MEM          4       /* out of memory */
23 #define ZE_LOGIC        5       /* internal logic error */
24 #define ZE_BIG          6       /* entry too large to split, read, or write */
25 #define ZE_NOTE         7       /* invalid comment format */
26 #define ZE_TEST         8       /* zip test failed or out of memory */
27 #define ZE_ABORT        9       /* user interrupt or termination */
28 #define ZE_TEMP         10      /* error using a temp file */
29 #define ZE_READ         11      /* read or seek error */
30 #define ZE_NONE         12      /* nothing to do */
31 #define ZE_NAME         13      /* missing or empty zip file */
32 #define ZE_WRITE        14      /* error writing to a file */
33 #define ZE_CREAT        15      /* couldn't open to write */
34 #define ZE_PARMS        16      /* bad command line */
35 #define ZE_OPEN         18      /* could not open a specified file to read */
36 #define ZE_DATA         19      /* encountered invalid compressed data */
37 #define ZE_CRC          20      /* CRC mismatch */
38 #define ZE_ZNAME        21      /* file not found within archive */
39 #define ZE_CRYPT        22      /* encrypted file: not handled */
40 #define ZE_MAXERR       23      /* 1 + the highest error number */
41 
42 #endif /* ZIPERR_H_ */
43