Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

zip.h

00001 /*
00002 This is version 1999-Oct-05 of the Info-ZIP copyright and license.
00003 The definitive version of this document should be available at
00004 ftp://ftp.cdrom.com/pub/infozip/license.html indefinitely.
00005 
00006 
00007 Copyright (c) 1990-1999 Info-ZIP.  All rights reserved.
00008 
00009 For the purposes of this copyright and license, "Info-ZIP" is defined as
00010 the following set of individuals:
00011 
00012    Mark Adler, John Bush, Karl Davis, Harald Denker, Jean-Michel Dubois,
00013    Jean-loup Gailly, Hunter Goatley, Ian Gorman, Chris Herborth, Dirk Haase,
00014    Greg Hartwig, Robert Heath, Jonathan Hudson, Paul Kienitz, David Kirschbaum,
00015    Johnny Lee, Onno van der Linden, Igor Mandrichenko, Steve P. Miller,
00016    Sergio Monesi, Keith Owens, George Petrov, Greg Roelofs, Kai Uwe Rommel,
00017    Steve Salisbury, Dave Smith, Christian Spieler, Antoine Verheijen,
00018    Paul von Behren, Rich Wales, Mike White
00019 
00020 This software is provided "as is," without warranty of any kind, express
00021 or implied.  In no event shall Info-ZIP or its contributors be held liable
00022 for any direct, indirect, incidental, special or consequential damages
00023 arising out of the use of or inability to use this software.
00024 
00025 Permission is granted to anyone to use this software for any purpose,
00026 including commercial applications, and to alter it and redistribute it
00027 freely, subject to the following restrictions:
00028 
00029     1. Redistributions of source code must retain the above copyright notice,
00030        definition, disclaimer, and this list of conditions.
00031 
00032     2. Redistributions in binary form must reproduce the above copyright
00033        notice, definition, disclaimer, and this list of conditions in
00034        documentation and/or other materials provided with the distribution.
00035 
00036     3. Altered versions--including, but not limited to, ports to new operating
00037        systems, existing ports with new graphical interfaces, and dynamic,
00038        shared, or static library versions--must be plainly marked as such
00039        and must not be misrepresented as being the original source.  Such
00040        altered versions also must not be misrepresented as being Info-ZIP
00041        releases--including, but not limited to, labeling of the altered
00042        versions with the names "Info-ZIP" (or any variation thereof, including,
00043        but not limited to, different capitalizations), "Pocket UnZip," "WiZ"
00044        or "MacZip" without the explicit permission of Info-ZIP.  Such altered
00045        versions are further prohibited from misrepresentative use of the
00046        Zip-Bugs or Info-ZIP e-mail addresses or of the Info-ZIP URL(s).
00047 
00048     4. Info-ZIP retains the right to use the names "Info-ZIP," "Zip," "UnZip,"
00049        "WiZ," "Pocket UnZip," "Pocket Zip," and "MacZip" for its own source and
00050        binary releases.
00051 */
00052 
00053 /*
00054  *  zip.h by Mark Adler
00055  */
00056 #ifndef __zip_h
00057 #define __zip_h 1
00058 
00059 #define ZIP   /* for crypt.c:  include zip password functions, not unzip */
00060 
00061 /* Set up portability */
00062 #include "tailor.h"
00063 
00064 #ifdef USE_ZLIB
00065 #  include "zlib.h"
00066 #endif
00067 
00068 #define MIN_MATCH  3
00069 #define MAX_MATCH  258
00070 /* The minimum and maximum match lengths */
00071 
00072 #ifndef WSIZE
00073 #  define WSIZE  (0x8000)
00074 #endif
00075 /* Maximum window size = 32K. If you are really short of memory, compile
00076  * with a smaller WSIZE but this reduces the compression ratio for files
00077  * of size > WSIZE. WSIZE must be a power of two in the current implementation.
00078  */
00079 
00080 #define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
00081 /* Minimum amount of lookahead, except at the end of the input file.
00082  * See deflate.c for comments about the MIN_MATCH+1.
00083  */
00084 
00085 #define MAX_DIST  (WSIZE-MIN_LOOKAHEAD)
00086 /* In order to simplify the code, particularly on 16 bit machines, match
00087  * distances are limited to MAX_DIST instead of WSIZE.
00088  */
00089 
00090 /* Forget FILENAME_MAX (incorrectly = 14 on some System V) */
00091 #ifdef DOS
00092 #  define FNMAX 256
00093 #else
00094 #  define FNMAX 1024
00095 #endif
00096 
00097 #ifndef MATCH
00098 #  define MATCH shmatch         /* Default for pattern matching: UNIX style */
00099 #endif
00100 
00101 /* Types centralized here for easy modification */
00102 #define local static            /* More meaningful outside functions */
00103 typedef unsigned char uch;      /* unsigned 8-bit value */
00104 typedef unsigned short ush;     /* unsigned 16-bit value */
00105 typedef unsigned long ulg;      /* unsigned 32-bit value */
00106 
00107 
00108 /* Structure carrying extended timestamp information */
00109 typedef struct iztimes {
00110    time_t atime;                /* new access time */
00111    time_t mtime;                /* new modification time */
00112    time_t ctime;                /* new creation time (!= Unix st.ctime) */
00113 } iztimes;
00114 
00115 /* Lengths of headers after signatures in bytes */
00116 #define LOCHEAD 26
00117 #define CENHEAD 42
00118 #define ENDHEAD 18
00119 
00120 /* Structures for in-memory file information */
00121 struct zlist {
00122   /* See central header in zipfile.c for what vem..off are */
00123   ush vem, ver, flg, how;
00124   ulg tim, crc, siz, len;
00125   extent nam, ext, cext, com;   /* offset of ext must be >= LOCHEAD */
00126   ush dsk, att, lflg;           /* offset of lflg must be >= LOCHEAD */
00127   ulg atx, off;
00128   char *name;                   /* File name in zip file */
00129   char *extra;                  /* Extra field (set only if ext != 0) */
00130   char *cextra;                 /* Extra in central (set only if cext != 0) */
00131   char *comment;                /* Comment (set only if com != 0) */
00132   char *iname;                  /* Internal file name after cleanup */
00133   char *zname;                  /* External version of internal name */
00134   int mark;                     /* Marker for files to operate on */
00135   int trash;                    /* Marker for files to delete */
00136   int dosflag;                  /* Set to force MSDOS file attributes */
00137   struct zlist far *nxt;        /* Pointer to next header in list */
00138 };
00139 struct flist {
00140   char *name;                   /* Raw internal file name */
00141   char *iname;                  /* Internal file name after cleanup */
00142   char *zname;                  /* External version of internal name */
00143   int dosflag;                  /* Set to force MSDOS file attributes */
00144   struct flist far *far *lst;   /* Pointer to link pointing here */
00145   struct flist far *nxt;        /* Link to next name */
00146 };
00147 struct plist {
00148   char *zname;                  /* External version of internal name */
00149   int select;                   /* Selection flag ('i' or 'x') */
00150 };
00151 
00152 /* internal file attribute */
00153 #define UNKNOWN (-1)
00154 #define BINARY  0
00155 #define ASCII   1
00156 #define __EBCDIC 2
00157 
00158 /* extra field definitions */
00159 #define EF_VMCMS     0x4704   /* VM/CMS Extra Field ID ("G")*/
00160 #define EF_MVS       0x470f   /* MVS Extra Field ID ("G")   */
00161 #define EF_IZUNIX    0x5855   /* UNIX Extra Field ID ("UX") */
00162 #define EF_IZUNIX2   0x7855   /* Info-ZIP's new Unix ("Ux") */
00163 #define EF_TIME      0x5455   /* universal timestamp ("UT") */
00164 #define EF_OS2EA     0x0009   /* OS/2 Extra Field ID (extended attributes) */
00165 #define EF_ACL       0x4C41   /* ACL Extra Field ID (access control list, "AL") */
00166 #define EF_NTSD      0x4453   /* NT Security Descriptor Extra Field ID, ("SD") */
00167 #define EF_BEOS      0x6542   /* BeOS Extra Field ID ("Be") */
00168 #define EF_QDOS      0xfb4a   /* SMS/QDOS ("J\373") */
00169 #define EF_AOSVS     0x5356   /* AOS/VS ("VS") */
00170 #define EF_SPARK     0x4341   /* David Pilling's Acorn/SparkFS ("AC") */
00171 #define EF_THEOS     0x6854   /* THEOS ("Th") */
00172 #define EF_TANDEM    0x4154   /* Tandem NSK ("TA") */
00173 
00174 /* Definitions for extra field handling: */
00175 #define EF_SIZE_MAX  ((unsigned)0xFFFF) /* hard limit of total e.f. length */
00176 #define EB_HEADSIZE       4     /* length of a extra field block header */
00177 #define EB_ID             0     /* offset of block ID in header */
00178 #define EB_LEN            2     /* offset of data length field in header */
00179 
00180 #define EB_UX_MINLEN      8     /* minimal "UX" field contains atime, mtime */
00181 #define EB_UX_ATIME       0     /* offset of atime in "UX" extra field data */
00182 #define EB_UX_MTIME       4     /* offset of mtime in "UX" extra field data */
00183 
00184 #define EB_UX_FULLSIZE    12    /* full "UX" field (atime, mtime, uid, gid) */
00185 #define EB_UX_UID         8     /* byte offset of UID in "UX" field data */
00186 #define EB_UX_GID         10    /* byte offset of GID in "UX" field data */
00187 
00188 #define EB_UT_MINLEN      1     /* minimal UT field contains Flags byte */
00189 #define EB_UT_FLAGS       0     /* byte offset of Flags field */
00190 #define EB_UT_TIME1       1     /* byte offset of 1st time value */
00191 #define EB_UT_FL_MTIME    (1 << 0)      /* mtime present */
00192 #define EB_UT_FL_ATIME    (1 << 1)      /* atime present */
00193 #define EB_UT_FL_CTIME    (1 << 2)      /* ctime present */
00194 #define EB_UT_LEN(n)      (EB_UT_MINLEN + 4 * (n))
00195 
00196 #define EB_UX2_MINLEN     4     /* minimal Ux field contains UID/GID */
00197 #define EB_UX2_UID        0     /* byte offset of UID in "Ux" field data */
00198 #define EB_UX2_GID        2     /* byte offset of GID in "Ux" field data */
00199 #define EB_UX2_VALID      (1 << 8)      /* UID/GID present */
00200 
00201 /* ASCII definitions for line terminators in text files: */
00202 #define LF     10        /* '\n' on ASCII machines; must be 10 due to EBCDIC */
00203 #define CR     13        /* '\r' on ASCII machines; must be 13 due to EBCDIC */
00204 #define CTRLZ  26        /* DOS & OS/2 EOF marker (used in fileio.c, vms.c) */
00205 
00206 /* return codes of password fetches (negative: user abort; positive: error) */
00207 #define IZ_PW_ENTERED   0       /* got some PWD string, use/try it */
00208 #define IZ_PW_CANCEL    -1      /* no password available (for this entry) */
00209 #define IZ_PW_CANCELALL -2      /* no password, skip any further PWD request */
00210 #define IZ_PW_ERROR     5       /* = PK_MEM2 : failure (no mem, no tty, ...) */
00211 #define IZ_PW_SKIPVERIFY IZ_PW_CANCEL   /* skip encrypt. passwd verification */
00212 
00213 /* mode flag values of password prompting function */
00214 #define ZP_PW_ENTER     0       /* request for encryption password */
00215 #define ZP_PW_VERIFY    1       /* request for reentering password */
00216 
00217 /* Error return codes and PERR macro */
00218 #include "ziperr.h"
00219 
00220 #if 0            /* Optimization: use the (const) result of crc32(0L,NULL,0) */
00221 #  define CRCVAL_INITIAL  crc32(0L, (uch *)NULL, 0)
00222 #else
00223 #  define CRCVAL_INITIAL  0L
00224 #endif
00225 
00226 #define DOSTIME_MINIMUM         ((ulg)0x00210000L)
00227 #define DOSTIME_2038_01_18      ((ulg)0x74320000L)
00228 
00229 
00230 /* Public globals */
00231 extern uch upper[256];          /* Country dependent case map table */
00232 extern uch lower[256];
00233 #ifdef EBCDIC
00234 extern ZCONST uch ascii[256];   /* EBCDIC <--> ASCII translation tables */
00235 extern ZCONST uch ebcdic[256];
00236 #endif /* EBCDIC */
00237 #ifdef IZ_ISO2OEM_ARRAY         /* ISO 8859-1 (Win CP 1252) --> OEM CP 850 */
00238 extern ZCONST uch Far iso2oem[128];
00239 #endif
00240 #ifdef IZ_OEM2ISO_ARRAY         /* OEM CP 850 --> ISO 8859-1 (Win CP 1252) */
00241 extern ZCONST uch Far oem2iso[128];
00242 #endif
00243 extern char errbuf[FNMAX+81];   /* Handy place to build error messages */
00244 extern int recurse;             /* Recurse into directories encountered */
00245 extern int dispose;             /* Remove files after put in zip file */
00246 extern int pathput;             /* Store path with name */
00247 
00248 #ifdef RISCOS
00249 extern int scanimage;           /* Scan through image files */
00250 #endif
00251 
00252 #define BEST -1                 /* Use best method (deflation or store) */
00253 #define STORE 0                 /* Store method */
00254 #define DEFLATE 8               /* Deflation method*/
00255 extern int method;              /* Restriction on compression method */
00256 
00257 extern int dosify;              /* Make new entries look like MSDOS */
00258 extern char *special;           /* Don't compress special suffixes */
00259 extern int verbose;             /* Report oddities in zip file structure */
00260 extern int fix;                 /* Fix the zip file */
00261 extern int adjust;              /* Adjust the unzipsfx'd zip file */
00262 extern int level;               /* Compression level */
00263 extern int translate_eol;       /* Translate end-of-line LF -> CR LF */
00264 #ifdef VMS
00265    extern int vmsver;           /* Append VMS version number to file names */
00266    extern int vms_native;       /* Store in VMS format */
00267 #endif /* VMS */
00268 #if defined(OS2) || defined(WIN32)
00269    extern int use_longname_ea;   /* use the .LONGNAME EA as the file's name */
00270 #endif
00271 #if defined (QDOS) || defined(QLZIP)
00272 extern short qlflag;
00273 #endif
00274 extern int hidden_files;        /* process hidden and system files */
00275 extern int volume_label;        /* add volume label */
00276 extern int dirnames;            /* include directory names */
00277 extern int linkput;             /* Store symbolic links as such */
00278 extern int noisy;               /* False for quiet operation */
00279 extern int extra_fields;        /* do not create extra fields */
00280 #ifdef WIN32
00281     extern int use_privileges;  /* use security privilege overrides */
00282 #endif
00283 extern char *key;               /* Scramble password or NULL */
00284 extern char *tempath;           /* Path for temporary files */
00285 extern FILE *mesg;              /* Where informational output goes */
00286 extern char *zipfile;           /* New or existing zip archive (zip file) */
00287 extern ulg zipbeg;              /* Starting offset of zip structures */
00288 extern ulg cenbeg;              /* Starting offset of central directory */
00289 extern struct zlist far *zfiles;/* Pointer to list of files in zip file */
00290 extern extent zcount;           /* Number of files in zip file */
00291 extern extent zcomlen;          /* Length of zip file comment */
00292 extern char *zcomment;          /* Zip file comment (not zero-terminated) */
00293 extern struct zlist far **zsort;/* List of files sorted by name */
00294 extern ulg tempzn;              /* Count of bytes written to output zip file */
00295 extern struct flist far *found; /* List of names found */
00296 extern struct flist far *far *fnxt;     /* Where to put next in found list */
00297 extern extent fcount;           /* Count of names in found list */
00298 
00299 extern struct plist *patterns;  /* List of patterns to be matched */
00300 extern unsigned pcount;         /* number of patterns */
00301 extern unsigned icount;         /* number of include only patterns */
00302 
00303 #ifdef IZ_CHECK_TZ
00304 extern int zp_tz_is_valid;      /* signals "timezone info is available" */
00305 #endif
00306 #if (defined(MACOS) || defined(WINDLL))
00307 extern int zipstate;            /* flag "zipfile has been stat()'ed */
00308 #endif
00309 
00310 /* Diagnostic functions */
00311 #ifdef DEBUG
00312 # ifdef MSDOS
00313 #  undef  stderr
00314 #  define stderr stdout
00315 # endif
00316 #  define diag(where) fprintf(stderr, "zip diagnostic: %s\n", where)
00317 #  define Assert(cond,msg) {if(!(cond)) error(msg);}
00318 # ifdef THEOS
00319 #  define Trace(x) _fprintf x
00320 #  define Tracev(x) {if (verbose) _fprintf x ;}
00321 #  define Tracevv(x) {if (verbose>1) _fprintf x ;}
00322 #  define Tracec(c,x) {if (verbose && (c)) _fprintf x ;}
00323 #  define Tracecv(c,x) {if (verbose>1 && (c)) _fprintf x ;}
00324 # else
00325 #  define Trace(x) fprintf x
00326 #  define Tracev(x) {if (verbose) fprintf x ;}
00327 #  define Tracevv(x) {if (verbose>1) fprintf x ;}
00328 #  define Tracec(c,x) {if (verbose && (c)) fprintf x ;}
00329 #  define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;}
00330 # endif
00331 #else
00332 #  define diag(where)
00333 #  define Assert(cond,msg)
00334 #  define Trace(x)
00335 #  define Tracev(x)
00336 #  define Tracevv(x)
00337 #  define Tracec(c,x)
00338 #  define Tracecv(c,x)
00339 #endif
00340 
00341 #ifdef DEBUGNAMES
00342 #  define free(x) { int *v;Free(x); v=x;*v=0xdeadbeef;x=(void *)0xdeadbeef; }
00343 #endif
00344 
00345 /* Public function prototypes */
00346 
00347 #ifndef UTIL
00348 #ifdef USE_ZIPMAIN
00349 int zipmain OF((int, char **));
00350 #else
00351 int main OF((int, char **));
00352 #endif /* USE_ZIPMAIN */
00353 #endif
00354 
00355 #ifdef EBCDIC
00356 extern int aflag;
00357 #endif /* EBCDIC */
00358 #ifdef CMS_MVS
00359 extern int bflag;
00360 #endif /* CMS_MVS */
00361 void zipwarn  OF((char *, char *));
00362 void ziperr   OF((int, char *));
00363 #ifdef UTIL
00364 #  define error(msg)    ziperr(ZE_LOGIC, msg)
00365 #else
00366    void error OF((char *));
00367 #  ifdef VMSCLI
00368      void help OF((void));
00369 #  endif
00370    int encr_passwd OF((int, char *, int, ZCONST char *));
00371 #endif
00372 
00373         /* in zipup.c */
00374 #ifndef UTIL
00375    int percent OF((ulg, ulg));
00376    int zipup OF((struct zlist far *, FILE *));
00377 #  ifdef USE_ZLIB
00378      void zl_deflate_free OF((void));
00379 #  else
00380      void flush_outbuf OF((char *, unsigned *));
00381      int seekable OF((void));
00382      extern unsigned (*read_buf) OF((char *, unsigned int));
00383 #  endif /* !USE_ZLIB */
00384 #  ifdef ZP_NEED_MEMCOMPR
00385      ulg memcompress OF((char *, ulg, char *, ulg));
00386 #  endif
00387 #endif /* !UTIL */
00388 
00389         /* in zipfile.c */
00390 #ifndef UTIL
00391    struct zlist far *zsearch OF((ZCONST char *));
00392 #  ifdef USE_EF_UT_TIME
00393      int get_ef_ut_ztime OF((struct zlist far *, iztimes *));
00394 #  endif /* USE_EF_UT_TIME */
00395    int trash OF((void));
00396 #endif /* !UTIL */
00397 char *ziptyp OF((char *));
00398 int readzipfile OF((void));
00399 int putlocal OF((struct zlist far *, FILE *));
00400 int putextended OF((struct zlist far *, FILE *));
00401 int putcentral OF((struct zlist far *, FILE *));
00402 int putend OF((int, ulg, ulg, extent, char *, FILE *));
00403 int zipcopy OF((struct zlist far *, FILE *, FILE *));
00404 
00405         /* in fileio.c */
00406 #ifndef UTIL
00407    char *getnam OF((char *, FILE *));
00408    struct flist far *fexpel OF((struct flist far *));
00409    char *last OF((char *, int));
00410    char *msname OF((char *));
00411    int check_dup OF((void));
00412    int filter OF((char *, int));
00413    int newname OF((char *, int, int));
00414 #endif /* !UTIL */
00415 #if (!defined(UTIL) || defined(W32_STATROOT_FIX))
00416    time_t dos2unixtime OF((ulg));
00417 #endif
00418 #ifndef UTIL
00419    ulg dostime OF((int, int, int, int, int, int));
00420    ulg unix2dostime OF((time_t *));
00421    int issymlnk OF((ulg a));
00422 #  ifdef S_IFLNK
00423 #    define rdsymlnk(p,b,n) readlink(p,b,n)
00424 /*   extern int readlink OF((char *, char *, int)); */
00425 #  else /* !S_IFLNK */
00426 #    define rdsymlnk(p,b,n) (0)
00427 #  endif /* !S_IFLNK */
00428 #endif /* !UTIL */
00429 
00430 int destroy OF((char *));
00431 int replace OF((char *, char *));
00432 int getfileattr OF((char *));
00433 int setfileattr OF((char *, int));
00434 char *tempname OF((char *));
00435 int fcopy OF((FILE *, FILE *, ulg));
00436 
00437 #ifdef ZMEM
00438    char *memset OF((char *, int, unsigned int));
00439    char *memcpy OF((char *, char *, unsigned int));
00440    int memcmp OF((char *, char *, unsigned int));
00441 #endif /* ZMEM */
00442 
00443         /* in system dependent fileio code (<system>.c) */
00444 #ifndef UTIL
00445 #  ifdef PROCNAME
00446      int wild OF((char *));
00447 #  endif
00448    char *in2ex OF((char *));
00449    char *ex2in OF((char *, int, int *));
00450    int procname OF((char *, int));
00451    void stamp OF((char *, ulg));
00452    ulg filetime OF((char *, ulg *, long *, iztimes *));
00453 #if !(defined(VMS) && defined(VMS_PK_EXTRA))
00454    int set_extra_field OF((struct zlist far *, iztimes *));
00455 #endif /* ?(VMS && VMS_PK_EXTRA) */
00456    int deletedir OF((char *));
00457 #ifdef MY_ZCALLOC
00458      zvoid far *zcalloc OF((unsigned int, unsigned int));
00459      zvoid zcfree       OF((zvoid far *));
00460 #endif /* MY_ZCALLOC */
00461 #endif /* !UTIL */
00462 void version_local OF((void));
00463 
00464         /* in util.c */
00465 #ifndef UTIL
00466 int   fseekable    OF((FILE *));
00467 char *isshexp      OF((char *));
00468 int   shmatch      OF((ZCONST char *, ZCONST char *, int));
00469 #if defined(DOS) || defined(WIN32)
00470    int dosmatch    OF((ZCONST char *, ZCONST char *, int));
00471 #endif /* DOS || WIN32 */
00472 #endif /* !UTIL */
00473 void init_upper    OF((void));
00474 int  namecmp       OF((ZCONST char *string1, ZCONST char *string2));
00475 
00476 #ifdef EBCDIC
00477 char *strtoasc     OF((char *str1, ZCONST char *str2));
00478 char *strtoebc     OF((char *str1, ZCONST char *str2));
00479 char *memtoasc     OF((char *mem1, ZCONST char *mem2, unsigned len));
00480 char *memtoebc     OF((char *mem1, ZCONST char *mem2, unsigned len));
00481 #endif /* EBCDIC */
00482 #ifdef IZ_ISO2OEM_ARRAY
00483 char *str_iso_to_oem    OF((char *dst, ZCONST char *src));
00484 #endif
00485 #ifdef IZ_OEM2ISO_ARRAY
00486 char *str_oem_to_iso    OF((char *dst, ZCONST char *src));
00487 #endif
00488 
00489 zvoid far **search OF((ZCONST zvoid *, ZCONST zvoid far **, extent,
00490                        int (*)(ZCONST zvoid *, ZCONST zvoid far *)));
00491 void envargs       OF((int *, char ***, char *, char *));
00492 void expand_args   OF((int *, char ***));
00493 
00494 #ifndef USE_ZLIB
00495 #ifndef UTIL
00496         /* in crc32.c */
00497 ulg  crc32         OF((ulg, ZCONST uch *, extent));
00498 #endif /* !UTIL */
00499 
00500         /* in crctab.c */
00501 ZCONST ulg near *get_crc_table OF((void));
00502 #ifdef DYNALLOC_CRCTAB
00503 void free_crc_table OF((void));
00504 #endif
00505 #endif /* !USE_ZLIB */
00506 
00507 #ifndef UTIL
00508 #ifndef USE_ZLIB
00509         /* in deflate.c */
00510 void lm_init OF((int, ush *));
00511 void lm_free OF((void));
00512 ulg  deflate OF((void));
00513 
00514         /* in trees.c */
00515 void     ct_init      OF((ush *, int *));
00516 int      ct_tally     OF((int, int));
00517 ulg      flush_block  OF((char far *, ulg, int));
00518 void     bi_init      OF((char *, unsigned int, int));
00519 #endif /* !USE_ZLIB */
00520 #endif /* !UTIL */
00521 
00522         /* in system specific assembler code, replacing C code in trees.c */
00523 #if defined(ASMV) && defined(RISCOS)
00524   void     send_bits    OF((int, int));
00525   unsigned bi_reverse   OF((unsigned int, int));
00526 #endif /* ASMV && RISCOS */
00527 
00528 /*---------------------------------------------------------------------------
00529     VMS-only functions:
00530   ---------------------------------------------------------------------------*/
00531 #ifdef VMS
00532    int    vms_stat        OF((char *, stat_t *));              /* vms.c */
00533    void   vms_exit        OF((int));                           /* vms.c */
00534 #ifndef UTIL
00535 #ifdef VMSCLI
00536    ulg    vms_zip_cmdline OF((int *, char ***));                /* cmdline.c */
00537    void   VMSCLI_help     OF((void));                           /* cmdline.c */
00538 #endif /* VMSCLI */
00539 #endif /* !UTIL */
00540 #endif /* VMS */
00541 
00542 
00543 /*---------------------------------------------------------------------------
00544     WIN32-only functions:
00545   ---------------------------------------------------------------------------*/
00546 #ifdef WIN32
00547    int    ZipIsWinNT         OF((void));                         /* win32.c */
00548 #endif /* WIN32 */
00549 
00550 #if (defined(WINDLL) || defined(DLL_ZIPAPI))
00551 /*---------------------------------------------------------------------------
00552     Prototypes for public Zip API (DLL) functions.
00553   ---------------------------------------------------------------------------*/
00554 #include "api.h"
00555 #endif /* WINDLL || DLL_ZIPAPI */
00556 
00557 #endif /* !__zip_h */
00558 /* end of zip.h */

Generated on Wed Oct 26 14:46:52 2005 for Lgi by  doxygen 1.4.1