~ubuntu-branches/ubuntu/precise/boinc/precise

« back to all changes in this revision

Viewing changes to zip/zip/zip.h

Tags: 6.12.8+dfsg-1
* New upstream release.
* Simplified debian/rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
This is version 1999-Oct-05 of the Info-ZIP copyright and license.
3
 
The definitive version of this document should be available at
4
 
ftp://ftp.cdrom.com/pub/infozip/license.html indefinitely.
5
 
 
6
 
 
7
 
Copyright (c) 1990-1999 Info-ZIP.  All rights reserved.
8
 
 
9
 
For the purposes of this copyright and license, "Info-ZIP" is defined as
10
 
the following set of individuals:
11
 
 
12
 
   Mark Adler, John Bush, Karl Davis, Harald Denker, Jean-Michel Dubois,
13
 
   Jean-loup Gailly, Hunter Goatley, Ian Gorman, Chris Herborth, Dirk Haase,
14
 
   Greg Hartwig, Robert Heath, Jonathan Hudson, Paul Kienitz, David Kirschbaum,
15
 
   Johnny Lee, Onno van der Linden, Igor Mandrichenko, Steve P. Miller,
16
 
   Sergio Monesi, Keith Owens, George Petrov, Greg Roelofs, Kai Uwe Rommel,
17
 
   Steve Salisbury, Dave Smith, Christian Spieler, Antoine Verheijen,
18
 
   Paul von Behren, Rich Wales, Mike White
19
 
 
20
 
This software is provided "as is," without warranty of any kind, express
21
 
or implied.  In no event shall Info-ZIP or its contributors be held liable
22
 
for any direct, indirect, incidental, special or consequential damages
23
 
arising out of the use of or inability to use this software.
24
 
 
25
 
Permission is granted to anyone to use this software for any purpose,
26
 
including commercial applications, and to alter it and redistribute it
27
 
freely, subject to the following restrictions:
28
 
 
29
 
    1. Redistributions of source code must retain the above copyright notice,
30
 
       definition, disclaimer, and this list of conditions.
31
 
 
32
 
    2. Redistributions in binary form must reproduce the above copyright
33
 
       notice, definition, disclaimer, and this list of conditions in
34
 
       documentation and/or other materials provided with the distribution.
35
 
 
36
 
    3. Altered versions--including, but not limited to, ports to new operating
37
 
       systems, existing ports with new graphical interfaces, and dynamic,
38
 
       shared, or static library versions--must be plainly marked as such
39
 
       and must not be misrepresented as being the original source.  Such
40
 
       altered versions also must not be misrepresented as being Info-ZIP
41
 
       releases--including, but not limited to, labeling of the altered
42
 
       versions with the names "Info-ZIP" (or any variation thereof, including,
43
 
       but not limited to, different capitalizations), "Pocket UnZip," "WiZ"
44
 
       or "MacZip" without the explicit permission of Info-ZIP.  Such altered
45
 
       versions are further prohibited from misrepresentative use of the
46
 
       Zip-Bugs or Info-ZIP e-mail addresses or of the Info-ZIP URL(s).
47
 
 
48
 
    4. Info-ZIP retains the right to use the names "Info-ZIP," "Zip," "UnZip,"
49
 
       "WiZ," "Pocket UnZip," "Pocket Zip," and "MacZip" for its own source and
50
 
       binary releases.
51
 
*/
52
 
 
53
 
/*
54
 
 *  zip.h by Mark Adler
55
 
 */
56
 
#ifndef __zip_h
57
 
#define __zip_h 1
58
 
 
59
 
#define ZIP   /* for crypt.c:  include zip password functions, not unzip */
60
 
 
61
 
/* Set up portability */
62
 
#include "tailor.h"
63
 
 
64
 
#ifdef USE_ZLIB
65
 
#  include "zlib.h"
66
 
#endif
67
 
 
68
 
#define MIN_MATCH  3
69
 
#define MAX_MATCH  258
70
 
/* The minimum and maximum match lengths */
71
 
 
72
 
#ifndef WSIZE
73
 
#  define WSIZE  (0x8000)
74
 
#endif
75
 
/* Maximum window size = 32K. If you are really short of memory, compile
76
 
 * with a smaller WSIZE but this reduces the compression ratio for files
77
 
 * of size > WSIZE. WSIZE must be a power of two in the current implementation.
78
 
 */
79
 
 
80
 
#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
81
 
/* Minimum amount of lookahead, except at the end of the input file.
82
 
 * See deflate.c for comments about the MIN_MATCH+1.
83
 
 */
84
 
 
85
 
#define MAX_DIST  (WSIZE-MIN_LOOKAHEAD)
86
 
/* In order to simplify the code, particularly on 16 bit machines, match
87
 
 * distances are limited to MAX_DIST instead of WSIZE.
88
 
 */
89
 
 
90
 
/* Forget FILENAME_MAX (incorrectly = 14 on some System V) */
91
 
#ifdef DOS
92
 
#  define FNMAX 256
93
 
#else
94
 
#  define FNMAX 1024
95
 
#endif
96
 
 
97
 
#ifndef MATCH
98
 
#  define MATCH dosmatch         /* Default for pattern matching: UNIX style */
99
 
#endif
100
 
 
101
 
/* Types centralized here for easy modification */
102
 
#define local static            /* More meaningful outside functions */
103
 
#ifndef UCH_TYPE
104
 
#define UCH_TYPE
105
 
typedef unsigned char uch;      /* unsigned 8-bit value */
106
 
typedef unsigned short ush;     /* unsigned 16-bit value */
107
 
typedef unsigned long ulg;      /* unsigned 32-bit value */
108
 
#endif
109
 
 
110
 
/* Structure carrying extended timestamp information */
111
 
typedef struct iztimes {
112
 
   time_t atime;                /* new access time */
113
 
   time_t mtime;                /* new modification time */
114
 
   time_t ctime;                /* new creation time (!= Unix st.ctime) */
115
 
} iztimes;
116
 
 
117
 
/* Lengths of headers after signatures in bytes */
118
 
#define LOCHEAD 26
119
 
#define CENHEAD 42
120
 
#define ENDHEAD 18
121
 
 
122
 
/* Structures for in-memory file information */
123
 
struct zlist {
124
 
  /* See central header in zipfile.c for what vem..off are */
125
 
  ush vem, ver, flg, how;
126
 
  ulg tim, crc, siz, len;
127
 
  extent nam, ext, cext, com;   /* offset of ext must be >= LOCHEAD */
128
 
  ush dsk, att, lflg;           /* offset of lflg must be >= LOCHEAD */
129
 
  ulg atx, off;
130
 
  char *name;                   /* File name in zip file */
131
 
  char *extra;                  /* Extra field (set only if ext != 0) */
132
 
  char *cextra;                 /* Extra in central (set only if cext != 0) */
133
 
  char *comment;                /* Comment (set only if com != 0) */
134
 
  char *iname;                  /* Internal file name after cleanup */
135
 
  char *zname;                  /* External version of internal name */
136
 
  int mark;                     /* Marker for files to operate on */
137
 
  int trash;                    /* Marker for files to delete */
138
 
  int dosflag;                  /* Set to force MSDOS file attributes */
139
 
  struct zlist far *nxt;        /* Pointer to next header in list */
140
 
};
141
 
struct flist {
142
 
  char *name;                   /* Raw internal file name */
143
 
  char *iname;                  /* Internal file name after cleanup */
144
 
  char *zname;                  /* External version of internal name */
145
 
  int dosflag;                  /* Set to force MSDOS file attributes */
146
 
  struct flist far *far *lst;   /* Pointer to link pointing here */
147
 
  struct flist far *nxt;        /* Link to next name */
148
 
};
149
 
struct plist {
150
 
  char *zname;                  /* External version of internal name */
151
 
  int select;                   /* Selection flag ('i' or 'x') */
152
 
};
153
 
 
154
 
/* internal file attribute */
155
 
#define UNKNOWN (-1)
156
 
#define BINARY  0
157
 
#define ASCII   1
158
 
#define __EBCDIC 2
159
 
 
160
 
/* extra field definitions */
161
 
#define EF_VMCMS     0x4704   /* VM/CMS Extra Field ID ("G")*/
162
 
#define EF_MVS       0x470f   /* MVS Extra Field ID ("G")   */
163
 
#define EF_IZUNIX    0x5855   /* UNIX Extra Field ID ("UX") */
164
 
#define EF_IZUNIX2   0x7855   /* Info-ZIP's new Unix ("Ux") */
165
 
#define EF_TIME      0x5455   /* universal timestamp ("UT") */
166
 
#define EF_OS2EA     0x0009   /* OS/2 Extra Field ID (extended attributes) */
167
 
#define EF_ACL       0x4C41   /* ACL Extra Field ID (access control list, "AL") */
168
 
#define EF_NTSD      0x4453   /* NT Security Descriptor Extra Field ID, ("SD") */
169
 
#define EF_BEOS      0x6542   /* BeOS Extra Field ID ("Be") */
170
 
#define EF_QDOS      0xfb4a   /* SMS/QDOS ("J\373") */
171
 
#define EF_AOSVS     0x5356   /* AOS/VS ("VS") */
172
 
#define EF_SPARK     0x4341   /* David Pilling's Acorn/SparkFS ("AC") */
173
 
#define EF_THEOS     0x6854   /* THEOS ("Th") */
174
 
#define EF_TANDEM    0x4154   /* Tandem NSK ("TA") */
175
 
 
176
 
/* Definitions for extra field handling: */
177
 
#define EF_SIZE_MAX  ((unsigned)0xFFFF) /* hard limit of total e.f. length */
178
 
#define EB_HEADSIZE       4     /* length of a extra field block header */
179
 
#define EB_ID             0     /* offset of block ID in header */
180
 
#define EB_LEN            2     /* offset of data length field in header */
181
 
 
182
 
#define EB_UX_MINLEN      8     /* minimal "UX" field contains atime, mtime */
183
 
#define EB_UX_ATIME       0     /* offset of atime in "UX" extra field data */
184
 
#define EB_UX_MTIME       4     /* offset of mtime in "UX" extra field data */
185
 
 
186
 
#define EB_UX_FULLSIZE    12    /* full "UX" field (atime, mtime, uid, gid) */
187
 
#define EB_UX_UID         8     /* byte offset of UID in "UX" field data */
188
 
#define EB_UX_GID         10    /* byte offset of GID in "UX" field data */
189
 
 
190
 
#define EB_UT_MINLEN      1     /* minimal UT field contains Flags byte */
191
 
#define EB_UT_FLAGS       0     /* byte offset of Flags field */
192
 
#define EB_UT_TIME1       1     /* byte offset of 1st time value */
193
 
#define EB_UT_FL_MTIME    (1 << 0)      /* mtime present */
194
 
#define EB_UT_FL_ATIME    (1 << 1)      /* atime present */
195
 
#define EB_UT_FL_CTIME    (1 << 2)      /* ctime present */
196
 
#define EB_UT_LEN(n)      (EB_UT_MINLEN + 4 * (n))
197
 
 
198
 
#define EB_UX2_MINLEN     4     /* minimal Ux field contains UID/GID */
199
 
#define EB_UX2_UID        0     /* byte offset of UID in "Ux" field data */
200
 
#define EB_UX2_GID        2     /* byte offset of GID in "Ux" field data */
201
 
#define EB_UX2_VALID      (1 << 8)      /* UID/GID present */
202
 
 
203
 
/* ASCII definitions for line terminators in text files: */
204
 
#define LF     10        /* '\n' on ASCII machines; must be 10 due to EBCDIC */
205
 
#define CR     13        /* '\r' on ASCII machines; must be 13 due to EBCDIC */
206
 
#define CTRLZ  26        /* DOS & OS/2 EOF marker (used in fileio.c, vms.c) */
207
 
 
208
 
/* return codes of password fetches (negative: user abort; positive: error) */
209
 
#define IZ_PW_ENTERED   0       /* got some PWD string, use/try it */
210
 
#define IZ_PW_CANCEL    -1      /* no password available (for this entry) */
211
 
#define IZ_PW_CANCELALL -2      /* no password, skip any further PWD request */
212
 
#define IZ_PW_ERROR     5       /* = PK_MEM2 : failure (no mem, no tty, ...) */
213
 
#define IZ_PW_SKIPVERIFY IZ_PW_CANCEL   /* skip encrypt. passwd verification */
214
 
 
215
 
/* mode flag values of password prompting function */
216
 
#define ZP_PW_ENTER     0       /* request for encryption password */
217
 
#define ZP_PW_VERIFY    1       /* request for reentering password */
218
 
 
219
 
/* Error return codes and PERR macro */
220
 
#include "ziperr.h"
221
 
 
222
 
#if 0            /* Optimization: use the (const) result of crc32(0L,NULL,0) */
223
 
#  define CRCVAL_INITIAL  crc32(0L, (uch *)NULL, 0)
224
 
#else
225
 
#  define CRCVAL_INITIAL  0L
226
 
#endif
227
 
 
228
 
#define DOSTIME_MINIMUM         ((ulg)0x00210000L)
229
 
#define DOSTIME_2038_01_18      ((ulg)0x74320000L)
230
 
 
231
 
 
232
 
/* Public globals */
233
 
extern uch upper[256];          /* Country dependent case map table */
234
 
extern uch lower[256];
235
 
#ifdef EBCDIC
236
 
extern ZCONST uch ascii[256];   /* EBCDIC <--> ASCII translation tables */
237
 
extern ZCONST uch ebcdic[256];
238
 
#endif /* EBCDIC */
239
 
#ifdef IZ_ISO2OEM_ARRAY         /* ISO 8859-1 (Win CP 1252) --> OEM CP 850 */
240
 
extern ZCONST uch Far iso2oem[128];
241
 
#endif
242
 
#ifdef IZ_OEM2ISO_ARRAY         /* OEM CP 850 --> ISO 8859-1 (Win CP 1252) */
243
 
extern ZCONST uch Far oem2iso[128];
244
 
#endif
245
 
extern char errbuf[FNMAX+81];   /* Handy place to build error messages */
246
 
extern int recurse;             /* Recurse into directories encountered */
247
 
extern int dispose;             /* Remove files after put in zip file */
248
 
extern int pathput;             /* Store path with name */
249
 
 
250
 
#ifdef RISCOS
251
 
extern int scanimage;           /* Scan through image files */
252
 
#endif
253
 
 
254
 
#define BEST -1                 /* Use best method (deflation or store) */
255
 
#define STORE 0                 /* Store method */
256
 
#define DEFLATE 8               /* Deflation method*/
257
 
extern int method;              /* Restriction on compression method */
258
 
 
259
 
extern int dosify;              /* Make new entries look like MSDOS */
260
 
extern char *special;           /* Don't compress special suffixes */
261
 
extern int verbose;             /* Report oddities in zip file structure */
262
 
extern int fix;                 /* Fix the zip file */
263
 
extern int adjust;              /* Adjust the unzipsfx'd zip file */
264
 
extern int level;               /* Compression level */
265
 
extern int translate_eol;       /* Translate end-of-line LF -> CR LF */
266
 
#ifdef VMS
267
 
   extern int vmsver;           /* Append VMS version number to file names */
268
 
   extern int vms_native;       /* Store in VMS format */
269
 
#endif /* VMS */
270
 
#if defined(OS2) || defined(WIN32)
271
 
   extern int use_longname_ea;   /* use the .LONGNAME EA as the file's name */
272
 
#endif
273
 
#if defined (QDOS) || defined(QLZIP)
274
 
extern short qlflag;
275
 
#endif
276
 
extern int hidden_files;        /* process hidden and system files */
277
 
extern int volume_label;        /* add volume label */
278
 
extern int dirnames;            /* include directory names */
279
 
extern int linkput;             /* Store symbolic links as such */
280
 
extern int noisy;               /* False for quiet operation */
281
 
extern int extra_fields;        /* do not create extra fields */
282
 
#ifdef WIN32
283
 
    extern int use_privileges;  /* use security privilege overrides */
284
 
#endif
285
 
extern char *key;               /* Scramble password or NULL */
286
 
extern char *tempath;           /* Path for temporary files */
287
 
extern FILE *mesg;              /* Where informational output goes */
288
 
extern char *zipfile;           /* New or existing zip archive (zip file) */
289
 
extern ulg zipbeg;              /* Starting offset of zip structures */
290
 
extern ulg cenbeg;              /* Starting offset of central directory */
291
 
extern struct zlist far *zfiles;/* Pointer to list of files in zip file */
292
 
extern extent zcount;           /* Number of files in zip file */
293
 
extern extent zcomlen;          /* Length of zip file comment */
294
 
extern char *zcomment;          /* Zip file comment (not zero-terminated) */
295
 
extern struct zlist far **zsort;/* List of files sorted by name */
296
 
extern ulg tempzn;              /* Count of bytes written to output zip file */
297
 
extern struct flist far *found; /* List of names found */
298
 
extern struct flist far *far *fnxt;     /* Where to put next in found list */
299
 
extern extent fcount;           /* Count of names in found list */
300
 
 
301
 
extern struct plist *patterns;  /* List of patterns to be matched */
302
 
extern unsigned pcount;         /* number of patterns */
303
 
extern unsigned icount;         /* number of include only patterns */
304
 
 
305
 
#ifdef IZ_CHECK_TZ
306
 
extern int zp_tz_is_valid;      /* signals "timezone info is available" */
307
 
#endif
308
 
#if (defined(MACOS) || defined(WINDLL))
309
 
extern int zipstate;            /* flag "zipfile has been stat()'ed */
310
 
#endif
311
 
 
312
 
/* Diagnostic functions */
313
 
#ifdef DEBUG
314
 
# ifdef MSDOS
315
 
#  undef  stderr
316
 
#  define stderr stdout
317
 
# endif
318
 
#  define diag(where) fprintf(stderr, "zip diagnostic: %s\n", where)
319
 
#  define Assert(cond,msg) {if(!(cond)) error(msg);}
320
 
# ifdef THEOS
321
 
#  define Trace(x) _fprintf x
322
 
#  define Tracev(x) {if (verbose) _fprintf x ;}
323
 
#  define Tracevv(x) {if (verbose>1) _fprintf x ;}
324
 
#  define Tracec(c,x) {if (verbose && (c)) _fprintf x ;}
325
 
#  define Tracecv(c,x) {if (verbose>1 && (c)) _fprintf x ;}
326
 
# else
327
 
#  define Trace(x) fprintf x
328
 
#  define Tracev(x) {if (verbose) fprintf x ;}
329
 
#  define Tracevv(x) {if (verbose>1) fprintf x ;}
330
 
#  define Tracec(c,x) {if (verbose && (c)) fprintf x ;}
331
 
#  define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;}
332
 
# endif
333
 
#else
334
 
#  define diag(where)
335
 
#  define Assert(cond,msg)
336
 
#  define Trace(x)
337
 
#  define Tracev(x)
338
 
#  define Tracevv(x)
339
 
#  define Tracec(c,x)
340
 
#  define Tracecv(c,x)
341
 
#endif
342
 
 
343
 
#ifdef DEBUGNAMES
344
 
#  define free(x) { int *v;Free(x); v=x;*v=0xdeadbeef;x=(void *)0xdeadbeef; }
345
 
#endif
346
 
 
347
 
/* Public function prototypes */
348
 
 
349
 
//#ifndef UTIL
350
 
//#ifdef USE_ZIPMAIN
351
 
//int zip_main OF((int, char **));
352
 
int zip_main(int argc, char** argv);
353
 
//#else
354
 
//int main OF((int, char **));
355
 
//#endif /* USE_ZIPMAIN */
356
 
//#endif
357
 
 
358
 
#ifdef EBCDIC
359
 
extern int aflag;
360
 
#endif /* EBCDIC */
361
 
#ifdef CMS_MVS
362
 
extern int bflag;
363
 
#endif /* CMS_MVS */
364
 
void zipwarn  OF((char *, char *));
365
 
int ziperr   OF((int, char *));
366
 
#ifdef UTIL
367
 
#  define error(msg)    ziperr(ZE_LOGIC, msg)
368
 
#else
369
 
   void error OF((char *));
370
 
#  ifdef VMSCLI
371
 
     void help OF((void));
372
 
#  endif
373
 
   int encr_passwd OF((int, char *, int, ZCONST char *));
374
 
#endif
375
 
 
376
 
        /* in zipup.c */
377
 
#ifndef UTIL
378
 
   int percent OF((ulg, ulg));
379
 
   int zipup OF((struct zlist far *, FILE *));
380
 
#  ifdef USE_ZLIB
381
 
     void zl_deflate_free OF((void));
382
 
#  else
383
 
     void flush_outbuf OF((char *, unsigned *));
384
 
     int seekable OF((void));
385
 
     extern unsigned (*read_buf) OF((char *, unsigned int));
386
 
#  endif /* !USE_ZLIB */
387
 
#  ifdef ZP_NEED_MEMCOMPR
388
 
     ulg memcompress OF((char *, ulg, char *, ulg));
389
 
#  endif
390
 
#endif /* !UTIL */
391
 
 
392
 
        /* in zipfile.c */
393
 
#ifndef UTIL
394
 
   struct zlist far *zsearch OF((ZCONST char *));
395
 
#  ifdef USE_EF_UT_TIME
396
 
     int get_ef_ut_ztime OF((struct zlist far *, iztimes *));
397
 
#  endif /* USE_EF_UT_TIME */
398
 
   int trash OF((void));
399
 
#endif /* !UTIL */
400
 
char *ziptyp OF((char *));
401
 
int readzipfile OF((void));
402
 
int putlocal OF((struct zlist far *, FILE *));
403
 
int putextended OF((struct zlist far *, FILE *));
404
 
int putcentral OF((struct zlist far *, FILE *));
405
 
int putend OF((int, ulg, ulg, extent, char *, FILE *));
406
 
int zipcopy OF((struct zlist far *, FILE *, FILE *));
407
 
 
408
 
        /* in fileio.c */
409
 
#ifndef UTIL
410
 
   char *getnam OF((char *, FILE *));
411
 
   struct flist far *fexpel OF((struct flist far *));
412
 
   char *last OF((char *, int));
413
 
   char *msname OF((char *));
414
 
   int check_dup OF((void));
415
 
   int filter OF((char *, int));
416
 
   int newname OF((char *, int, int));
417
 
#endif /* !UTIL */
418
 
#if (!defined(UTIL) || defined(W32_STATROOT_FIX))
419
 
   time_t dos2unixtime OF((ulg));
420
 
#endif
421
 
#ifndef UTIL
422
 
   ulg dostime OF((int, int, int, int, int, int));
423
 
   ulg unix2dostime OF((time_t *));
424
 
   int issymlnk OF((ulg a));
425
 
#  ifdef S_IFLNK
426
 
#    define rdsymlnk(p,b,n) readlink(p,b,n)
427
 
/*   extern int readlink OF((char *, char *, int)); */
428
 
#  else /* !S_IFLNK */
429
 
#    define rdsymlnk(p,b,n) (0)
430
 
#  endif /* !S_IFLNK */
431
 
#endif /* !UTIL */
432
 
 
433
 
int destroy OF((char *));
434
 
int replace OF((char *, char *));
435
 
int getfileattr OF((char *));
436
 
int setfileattr OF((char *, int));
437
 
char *tempname OF((char *));
438
 
int fcopy OF((FILE *, FILE *, ulg));
439
 
 
440
 
#ifndef ZVOID_DEC
441
 
#define ZVOID_DEC
442
 
   typedef void zvoid;
443
 
#endif
444
 
 
445
 
#ifdef ZMEM
446
 
   char *memset OF((char *, int, unsigned int));
447
 
   char *memcpy OF((char *, char *, unsigned int));
448
 
   int memcmp OF((char *, char *, unsigned int));
449
 
#endif /* ZMEM */
450
 
 
451
 
        /* in system dependent fileio code (<system>.c) */
452
 
#ifndef UTIL
453
 
#  ifdef PROCNAME
454
 
     int wild OF((char *));
455
 
#  endif
456
 
   char *in2ex OF((char *));
457
 
   char *ex2in OF((char *, int, int *));
458
 
   int procname OF((char *, int));
459
 
   void stamp OF((char *, ulg));
460
 
   ulg filetime OF((char *, ulg *, long *, iztimes *));
461
 
#if !(defined(VMS) && defined(VMS_PK_EXTRA))
462
 
   int set_extra_field OF((struct zlist far *, iztimes *));
463
 
#endif /* ?(VMS && VMS_PK_EXTRA) */
464
 
   int deletedir OF((char *));
465
 
#ifdef MY_ZCALLOC
466
 
     zvoid far *zcalloc OF((unsigned int, unsigned int));
467
 
     zvoid zcfree       OF((zvoid far *));
468
 
#endif /* MY_ZCALLOC */
469
 
#endif /* !UTIL */
470
 
void version_local OF((void));
471
 
 
472
 
        /* in util.c */
473
 
#ifndef UTIL
474
 
int   fseekable    OF((FILE *));
475
 
char *isshexp      OF((char *));
476
 
int   shmatch      OF((ZCONST char *, ZCONST char *, int));
477
 
#if defined(DOS) || defined(WIN32)
478
 
   int dosmatch    OF((ZCONST char *, ZCONST char *, int));
479
 
#endif /* DOS || WIN32 */
480
 
#endif /* !UTIL */
481
 
void init_upper    OF((void));
482
 
int  namecmp       OF((ZCONST char *string1, ZCONST char *string2));
483
 
 
484
 
#ifdef EBCDIC
485
 
char *strtoasc     OF((char *str1, ZCONST char *str2));
486
 
char *strtoebc     OF((char *str1, ZCONST char *str2));
487
 
char *memtoasc     OF((char *mem1, ZCONST char *mem2, unsigned len));
488
 
char *memtoebc     OF((char *mem1, ZCONST char *mem2, unsigned len));
489
 
#endif /* EBCDIC */
490
 
#ifdef IZ_ISO2OEM_ARRAY
491
 
char *str_iso_to_oem    OF((char *dst, ZCONST char *src));
492
 
#endif
493
 
#ifdef IZ_OEM2ISO_ARRAY
494
 
char *str_oem_to_iso    OF((char *dst, ZCONST char *src));
495
 
#endif
496
 
 
497
 
zvoid far **search OF((ZCONST zvoid *, ZCONST zvoid far **, extent,
498
 
                       int (*)(ZCONST zvoid *, ZCONST zvoid far *)));
499
 
void envargs       OF((int *, char ***, char *, char *));
500
 
void expand_args   OF((int *, char ***));
501
 
 
502
 
#ifndef USE_ZLIB
503
 
#ifndef UTIL
504
 
        /* in crc32.c */
505
 
ulg  crc32         OF((ulg, ZCONST uch *, extent));
506
 
#endif /* !UTIL */
507
 
 
508
 
        /* in crctab.c */
509
 
ZCONST ulg near *get_crc_table_boinc OF((void));
510
 
#ifdef DYNALLOC_CRCTAB
511
 
void free_crc_table OF((void));
512
 
#endif
513
 
#endif /* !USE_ZLIB */
514
 
 
515
 
#ifndef UTIL
516
 
#ifndef USE_ZLIB
517
 
        /* in deflate.c */
518
 
void lm_init OF((int, ush *));
519
 
void lm_free OF((void));
520
 
ulg  deflate_boinc OF((void));
521
 
 
522
 
        /* in trees.c */
523
 
void     ct_init      OF((ush *, int *));
524
 
int      ct_tally     OF((int, int));
525
 
ulg      flush_block  OF((char far *, ulg, int));
526
 
void     bi_init      OF((char *, unsigned int, int));
527
 
#endif /* !USE_ZLIB */
528
 
#endif /* !UTIL */
529
 
 
530
 
        /* in system specific assembler code, replacing C code in trees.c */
531
 
#if defined(ASMV) && defined(RISCOS)
532
 
  void     send_bits    OF((int, int));
533
 
  unsigned bi_reverse   OF((unsigned int, int));
534
 
#endif /* ASMV && RISCOS */
535
 
 
536
 
/*---------------------------------------------------------------------------
537
 
    VMS-only functions:
538
 
  ---------------------------------------------------------------------------*/
539
 
#ifdef VMS
540
 
   int    vms_stat        OF((char *, stat_t *));              /* vms.c */
541
 
   void   vms_exit        OF((int));                           /* vms.c */
542
 
#ifndef UTIL
543
 
#ifdef VMSCLI
544
 
   ulg    vms_zip_cmdline OF((int *, char ***));                /* cmdline.c */
545
 
   void   VMSCLI_help     OF((void));                           /* cmdline.c */
546
 
#endif /* VMSCLI */
547
 
#endif /* !UTIL */
548
 
#endif /* VMS */
549
 
 
550
 
 
551
 
/*---------------------------------------------------------------------------
552
 
    WIN32-only functions:
553
 
  ---------------------------------------------------------------------------*/
554
 
#ifdef WIN32
555
 
   int    ZipIsWinNT         OF((void));                         /* win32.c */
556
 
#endif /* WIN32 */
557
 
 
558
 
#if (defined(WINDLL) || defined(DLL_ZIPAPI))
559
 
/*---------------------------------------------------------------------------
560
 
    Prototypes for public Zip API (DLL) functions.
561
 
  ---------------------------------------------------------------------------*/
562
 
#include "z_api.h"
563
 
#endif /* WINDLL || DLL_ZIPAPI */
564
 
 
565
 
#endif /* !__zip_h */
566
 
/* end of zip.h */