1 /*--------------------------------------------------------------------------- 2 3 unzip.h (new) 4 5 Copyright (c) 1990-2002 Info-ZIP. All rights reserved. 6 7 This header file contains the public macros and typedefs required by 8 both the UnZip sources and by any application using the UnZip API. If 9 UNZIP_INTERNAL is defined, it includes unzpriv.h (containing includes, 10 prototypes and extern variables used by the actual UnZip sources). 11 12 ---------------------------------------------------------------------------*/ 13 /*--------------------------------------------------------------------------- 14 This is version 2000-Apr-09 of the Info-ZIP copyright and license. 15 The definitive version of this document should be available at 16 ftp://ftp.info-zip.org/pub/infozip/license.html indefinitely. 17 18 19 Copyright (c) 1990-2000 Info-ZIP. All rights reserved. 20 21 For the purposes of this copyright and license, "Info-ZIP" is defined as 22 the following set of individuals: 23 24 Mark Adler, John Bush, Karl Davis, Harald Denker, Jean-Michel Dubois, 25 Jean-loup Gailly, Hunter Goatley, Ian Gorman, Chris Herborth, Dirk Haase, 26 Greg Hartwig, Robert Heath, Jonathan Hudson, Paul Kienitz, David Kirschbaum, 27 Johnny Lee, Onno van der Linden, Igor Mandrichenko, Steve P. Miller, 28 Sergio Monesi, Keith Owens, George Petrov, Greg Roelofs, Kai Uwe Rommel, 29 Steve Salisbury, Dave Smith, Christian Spieler, Antoine Verheijen, 30 Paul von Behren, Rich Wales, Mike White 31 32 This software is provided "as is," without warranty of any kind, express 33 or implied. In no event shall Info-ZIP or its contributors be held liable 34 for any direct, indirect, incidental, special or consequential damages 35 arising out of the use of or inability to use this software. 36 37 Permission is granted to anyone to use this software for any purpose, 38 including commercial applications, and to alter it and redistribute it 39 freely, subject to the following restrictions: 40 41 1. Redistributions of source code must retain the above copyright notice, 42 definition, disclaimer, and this list of conditions. 43 44 2. Redistributions in binary form must reproduce the above copyright 45 notice, definition, disclaimer, and this list of conditions in 46 documentation and/or other materials provided with the distribution. 47 48 3. Altered versions--including, but not limited to, ports to new operating 49 systems, existing ports with new graphical interfaces, and dynamic, 50 shared, or static library versions--must be plainly marked as such 51 and must not be misrepresented as being the original source. Such 52 altered versions also must not be misrepresented as being Info-ZIP 53 releases--including, but not limited to, labeling of the altered 54 versions with the names "Info-ZIP" (or any variation thereof, including, 55 but not limited to, different capitalizations), "Pocket UnZip," "WiZ" 56 or "MacZip" without the explicit permission of Info-ZIP. Such altered 57 versions are further prohibited from misrepresentative use of the 58 Zip-Bugs or Info-ZIP e-mail addresses or of the Info-ZIP URL(s). 59 60 4. Info-ZIP retains the right to use the names "Info-ZIP," "Zip," "UnZip," 61 "WiZ," "Pocket UnZip," "Pocket Zip," and "MacZip" for its own source and 62 binary releases. 63 ---------------------------------------------------------------------------*/ 64 65 #ifndef __unzip_h /* prevent multiple inclusions */ 66 #define __unzip_h 67 68 /*--------------------------------------------------------------------------- 69 Predefined, machine-specific macros. 70 ---------------------------------------------------------------------------*/ 71 72 #ifdef __GO32__ /* MS-DOS extender: NOT Unix */ 73 # ifdef unix 74 # undef unix 75 # endif 76 # ifdef _unix 77 # undef _unix 78 # endif 79 # ifdef __unix 80 # undef __unix 81 # endif 82 # ifdef __unix__ 83 # undef __unix__ 84 # endif 85 #endif 86 87 #if ((defined(__convex__) || defined(__convexc__)) && !defined(CONVEX)) 88 # define CONVEX 89 #endif 90 91 #if (defined(unix) || defined(_unix) || defined(__unix) || defined(__unix__)) 92 # ifndef UNIX 93 # define UNIX 94 # endif 95 #endif /* unix || _unix || __unix || __unix__ */ 96 #if (defined(M_XENIX) || defined(COHERENT) || defined(__hpux)) 97 # ifndef UNIX 98 # define UNIX 99 # endif 100 #endif /* M_XENIX || COHERENT || __hpux */ 101 #if (defined(CONVEX) || defined(MINIX) || defined(_AIX) || defined(__QNX__)) 102 # ifndef UNIX 103 # define UNIX 104 # endif 105 #endif /* CONVEX || MINIX || _AIX || __QNX__ */ 106 107 #if (defined(VM_CMS) || defined(MVS)) 108 # define CMS_MVS 109 #endif 110 111 #if (defined(__OS2__) && !defined(OS2)) 112 # define OS2 113 #endif 114 115 #if (defined(__TANDEM) && !defined(TANDEM)) 116 # define TANDEM 117 #endif 118 119 #if (defined(__VMS) && !defined(VMS)) 120 # define VMS 121 #endif 122 123 #if ((defined(__WIN32__) || defined(_WIN32)) && !defined(WIN32)) 124 # define WIN32 125 #endif 126 #if ((defined(__WINNT__) || defined(__WINNT)) && !defined(WIN32)) 127 # define WIN32 128 #endif 129 130 #ifdef __COMPILER_KCC__ 131 # include <c-env.h> 132 # ifdef SYS_T20 133 # define TOPS20 134 # endif 135 #endif /* __COMPILER_KCC__ */ 136 137 /* Borland C does not define __TURBOC__ if compiling for a 32-bit platform */ 138 #ifdef __BORLANDC__ 139 # ifndef __TURBOC__ 140 # define __TURBOC__ 141 # endif 142 # if (!defined(__MSDOS__) && !defined(OS2) && !defined(WIN32)) 143 # define __MSDOS__ 144 # endif 145 #endif 146 147 /* define MSDOS for Turbo C (unless OS/2) and Power C as well as Microsoft C */ 148 #ifdef __POWERC 149 # define __TURBOC__ 150 # define MSDOS 151 #endif /* __POWERC */ 152 153 #if (defined(__MSDOS__) && !defined(MSDOS)) /* just to make sure */ 154 # define MSDOS 155 #endif 156 157 /* RSXNTDJ (at least up to v1.3) compiles for WIN32 (RSXNT) using a derivate 158 of the EMX environment, but defines MSDOS and __GO32__. ARG !!! */ 159 #if (defined(MSDOS) && defined(WIN32)) 160 # undef MSDOS /* WIN32 is >>>not<<< MSDOS */ 161 #endif 162 #if (defined(__GO32__) && defined(__EMX__) && defined(__RSXNT__)) 163 # undef __GO32__ 164 #endif 165 166 #if (defined(linux) && !defined(LINUX)) 167 # define LINUX 168 #endif 169 170 #ifdef __riscos 171 # define RISCOS 172 #endif 173 174 #if (defined(THINK_C) || defined(MPW)) 175 # define MACOS 176 #endif 177 #if (defined(__MWERKS__) && defined(macintosh)) 178 # define MACOS 179 #endif 180 181 /* use prototypes and ANSI libraries if __STDC__, or Microsoft or Borland C, or 182 * Silicon Graphics, or Convex?, or IBM C Set/2, or GNU gcc/emx, or Watcom C, 183 * or Macintosh, or Windows NT, or Sequent, or Atari or IBM RS/6000. 184 */ 185 #if (defined(__STDC__) || defined(MSDOS) || defined(WIN32) || defined(__EMX__)) 186 # ifndef PROTO 187 # define PROTO 188 # endif 189 # ifndef MODERN 190 # define MODERN 191 # endif 192 #endif 193 #if (defined(__IBMC__) || defined(__BORLANDC__) || defined(__WATCOMC__)) 194 # ifndef PROTO 195 # define PROTO 196 # endif 197 # ifndef MODERN 198 # define MODERN 199 # endif 200 #endif 201 #if (defined(MACOS) || defined(ATARI_ST) || defined(RISCOS) || defined(THEOS)) 202 # ifndef PROTO 203 # define PROTO 204 # endif 205 # ifndef MODERN 206 # define MODERN 207 # endif 208 #endif 209 /* Sequent running Dynix/ptx: non-modern compiler */ 210 #if (defined(_AIX) || defined(sgi) || (defined(_SEQUENT_) && !defined(PTX))) 211 # ifndef PROTO 212 # define PROTO 213 # endif 214 # ifndef MODERN 215 # define MODERN 216 # endif 217 #endif 218 #if (defined(CMS_MVS) || defined(__BEOS__)) /* || defined(CONVEX) */ 219 # ifndef PROTO 220 # define PROTO 221 # endif 222 # ifndef MODERN 223 # define MODERN 224 # endif 225 #endif 226 227 /* turn off prototypes if requested */ 228 #if (defined(NOPROTO) && defined(PROTO)) 229 # undef PROTO 230 #endif 231 232 /* used to remove arguments in function prototypes for non-ANSI C */ 233 #ifdef PROTO 234 # define OF(a) a 235 #else 236 # define OF(a) () 237 #endif 238 239 /* enable the "const" keyword only if MODERN and if not otherwise instructed */ 240 #ifdef MODERN 241 # if (!defined(ZCONST) && (defined(USE_CONST) || !defined(NO_CONST))) 242 # define ZCONST const 243 # endif 244 #endif 245 246 #ifndef ZCONST 247 # define ZCONST 248 #endif 249 250 251 /*--------------------------------------------------------------------------- 252 Grab system-specific public include headers. 253 ---------------------------------------------------------------------------*/ 254 255 #ifdef POCKET_UNZIP /* WinCE port */ 256 # include "wince/punzip.h" /* must appear before windows.h */ 257 #endif 258 259 #ifdef WINDLL 260 /* for UnZip, the "basic" part of the win32 api is sufficient */ 261 # ifndef WIN32_LEAN_AND_MEAN 262 # define WIN32_LEAN_AND_MEAN 263 # define IZ_HASDEFINED_WIN32LEAN 264 # endif 265 # include <windows.h> 266 # include "windll/structs.h" 267 # ifdef IZ_HASDEFINEd_WIN32LEAN 268 # undef WIN32_LEAN_AND_MEAN 269 # undef IZ_HASDEFINED_WIN32LEAN 270 # endif 271 #endif 272 273 /*--------------------------------------------------------------------------- 274 Grab system-dependent definition of EXPENTRY for prototypes below. 275 ---------------------------------------------------------------------------*/ 276 277 #if 0 278 #if (defined(OS2) && !defined(FUNZIP)) 279 # ifdef UNZIP_INTERNAL 280 # define INCL_NOPM 281 # define INCL_DOSNLS 282 # define INCL_DOSPROCESS 283 # define INCL_DOSDEVICES 284 # define INCL_DOSDEVIOCTL 285 # define INCL_DOSERRORS 286 # define INCL_DOSMISC 287 # ifdef OS2DLL 288 # define INCL_REXXSAA 289 # include <rexxsaa.h> 290 # endif 291 # endif /* UNZIP_INTERNAL */ 292 # include <os2.h> 293 # define UZ_EXP EXPENTRY 294 #endif /* OS2 && !FUNZIP */ 295 #endif /* 0 */ 296 297 #if (defined(OS2) && !defined(FUNZIP)) 298 # if (defined(__IBMC__) || defined(__WATCOMC__)) 299 # define UZ_EXP _System /* compiler keyword */ 300 # else 301 # define UZ_EXP 302 # endif 303 #endif /* OS2 && !FUNZIP */ 304 305 #if (defined(WINDLL) || defined(USE_UNZIP_LIB)) 306 # ifndef EXPENTRY 307 # define UZ_EXP WINAPI 308 # else 309 # define UZ_EXP EXPENTRY 310 # endif 311 #endif 312 313 #ifndef UZ_EXP 314 # define UZ_EXP 315 #endif 316 317 318 /*--------------------------------------------------------------------------- 319 Public typedefs. 320 ---------------------------------------------------------------------------*/ 321 322 #ifndef _IZ_TYPES_DEFINED 323 #ifdef MODERN 324 typedef void zvoid; 325 #else /* !MODERN */ 326 # ifndef AOS_VS /* mostly modern? */ 327 # ifndef VAXC /* not fully modern, but has knows 'void' */ 328 # define void int 329 # endif /* !VAXC */ 330 # endif /* !AOS_VS */ 331 typedef char zvoid; 332 #endif /* ?MODERN */ 333 typedef unsigned char uch; /* code assumes unsigned bytes; these type- */ 334 typedef unsigned short ush; /* defs replace byte/UWORD/ULONG (which are */ 335 typedef unsigned long ulg; /* predefined on some systems) & match zip */ 336 #define _IZ_TYPES_DEFINED 337 #endif /* !_IZ_TYPES_DEFINED */ 338 339 /* InputFn is not yet used and is likely to change: */ 340 #ifdef PROTO 341 typedef int (UZ_EXP MsgFn) (zvoid *pG, uch *buf, ulg size, int flag); 342 typedef int (UZ_EXP InputFn) (zvoid *pG, uch *buf, int *size, int flag); 343 typedef void (UZ_EXP PauseFn) (zvoid *pG, ZCONST char *prompt, int flag); 344 typedef int (UZ_EXP PasswdFn) (zvoid *pG, int *rcnt, char *pwbuf, 345 int size, ZCONST char *zfn, 346 ZCONST char *efn); 347 typedef int (UZ_EXP StatCBFn) (zvoid *pG, int fnflag, ZCONST char *zfn, 348 ZCONST char *efn, ZCONST zvoid *details); 349 typedef void (UZ_EXP UsrIniFn) (void); 350 #else /* !PROTO */ 351 typedef int (UZ_EXP MsgFn) (); 352 typedef int (UZ_EXP InputFn) (); 353 typedef void (UZ_EXP PauseFn) (); 354 typedef int (UZ_EXP PasswdFn) (); 355 typedef int (UZ_EXP StatCBFn) (); 356 typedef void (UZ_EXP UsrIniFn) (); 357 #endif /* ?PROTO */ 358 359 typedef struct _UzpBuffer { /* rxstr */ 360 ulg strlength; /* length of string */ 361 char *strptr; /* pointer to string */ 362 } UzpBuffer; 363 364 typedef struct _UzpInit { 365 ulg structlen; /* length of the struct being passed */ 366 367 /* GRR: can we assume that each of these is a 32-bit pointer? if not, 368 * does it matter? add "far" keyword to make sure? */ 369 MsgFn *msgfn; 370 InputFn *inputfn; 371 PauseFn *pausefn; 372 UsrIniFn *userfn; /* user init function to be called after */ 373 /* globals constructed and initialized */ 374 375 /* pointer to program's environment area or something? */ 376 /* hooks for performance testing? */ 377 /* hooks for extra unzip -v output? (detect CPU or other hardware?) */ 378 /* anything else? let me (Greg) know... */ 379 } UzpInit; 380 381 typedef struct _UzpCB { 382 ulg structlen; /* length of the struct being passed */ 383 /* GRR: can we assume that each of these is a 32-bit pointer? if not, 384 * does it matter? add "far" keyword to make sure? */ 385 MsgFn *msgfn; 386 InputFn *inputfn; 387 PauseFn *pausefn; 388 PasswdFn *passwdfn; 389 StatCBFn *statrepfn; 390 } UzpCB; 391 392 /* the collection of general UnZip option flags and option arguments */ 393 typedef struct _UzpOpts { 394 #ifndef FUNZIP 395 char *exdir; /* pointer to extraction root directory (-d option) */ 396 char *pwdarg; /* pointer to command-line password (-P option) */ 397 int zipinfo_mode; /* behave like ZipInfo or like normal UnZip? */ 398 int aflag; /* -a: do ASCII-EBCDIC and/or end-of-line translation */ 399 #ifdef VMS 400 int bflag; /* -b: force fixed record format for binary files */ 401 #endif 402 #ifdef TANDEM 403 int bflag; /* -b: create text files in 'C' format (180)*/ 404 #endif 405 #ifdef UNIXBACKUP 406 int B_flag; /* -B: back up existing files by renaming to *~ first */ 407 #endif 408 int cflag; /* -c: output to stdout */ 409 int C_flag; /* -C: match filenames case-insensitively */ 410 #ifdef MACOS 411 int E_flag; /* -E: [MacOS] show Mac extra field during restoring */ 412 #endif 413 int fflag; /* -f: "freshen" (extract only newer files) */ 414 #if (defined(RISCOS) || defined(ACORN_FTYPE_NFS)) 415 int acorn_nfs_ext; /* -F: RISC OS types & NFS filetype extensions */ 416 #endif 417 int hflag; /* -h: header line (zipinfo) */ 418 #ifdef MACOS 419 int i_flag; /* -i: [MacOS] ignore filenames stored in Mac e.f. */ 420 #endif 421 #ifdef RISCOS 422 int scanimage; /* -I: scan image files */ 423 #endif 424 int jflag; /* -j: junk pathnames (unzip) */ 425 #if (defined(__BEOS__) || defined(MACOS)) 426 int J_flag; /* -J: ignore BeOS/MacOS extra field info (unzip) */ 427 #endif 428 int lflag; /* -12slmv: listing format (zipinfo) */ 429 int L_flag; /* -L: convert filenames from some OSes to lowercase */ 430 int overwrite_none; /* -n: never overwrite files (no prompting) */ 431 #ifdef AMIGA 432 int N_flag; /* -N: restore comments as AmigaDOS filenotes */ 433 #endif 434 int overwrite_all; /* -o: OK to overwrite files without prompting */ 435 #endif /* !FUNZIP */ 436 int qflag; /* -q: produce a lot less output */ 437 #ifndef FUNZIP 438 #if (defined(MSDOS) || defined(FLEXOS) || defined(OS2) || defined(WIN32)) 439 int sflag; /* -s: convert spaces in filenames to underscores */ 440 #endif 441 #if (defined(NLM)) 442 int sflag; /* -s: convert spaces in filenames to underscores */ 443 #endif 444 #if (defined(MSDOS) || defined(__human68k__) || defined(OS2) || defined(WIN32)) 445 int volflag; /* -$: extract volume labels */ 446 #endif 447 int tflag; /* -t: test (unzip) or totals line (zipinfo) */ 448 int T_flag; /* -T: timestamps (unzip) or dec. time fmt (zipinfo) */ 449 int uflag; /* -u: "update" (extract only newer/brand-new files) */ 450 int vflag; /* -v: (verbosely) list directory */ 451 int V_flag; /* -V: don't strip VMS version numbers */ 452 #if (defined(__BEOS__) || defined(TANDEM) || defined(THEOS) || defined(UNIX)) 453 int X_flag; /* -X: restore owner/protection or UID/GID or ACLs */ 454 #endif 455 #if (defined(OS2) || defined(VMS) || defined(WIN32)) 456 int X_flag; /* -X: restore owner/protection or UID/GID or ACLs */ 457 #endif 458 int zflag; /* -z: display the zipfile comment (only, for unzip) */ 459 #if (!defined(RISCOS) && !defined(CMS_MVS) && !defined(TANDEM)) 460 int ddotflag; /* -:: don't skip over "../" path elements */ 461 #endif 462 #endif /* !FUNZIP */ 463 } UzpOpts; 464 465 /* intended to be a private struct: */ 466 typedef struct _ver { 467 uch major; /* e.g., integer 5 */ 468 uch minor; /* e.g., 2 */ 469 uch patchlevel; /* e.g., 0 */ 470 uch not_used; 471 } _version_type; 472 473 typedef struct _UzpVer { 474 ulg structlen; /* length of the struct being passed */ 475 ulg flag; /* bit 0: is_beta bit 1: uses_zlib */ 476 char *betalevel; /* e.g., "g BETA" or "" */ 477 char *date; /* e.g., "4 Sep 95" (beta) or "4 September 1995" */ 478 char *zlib_version; /* e.g., "0.95" or NULL */ 479 _version_type unzip; 480 _version_type zipinfo; 481 _version_type os2dll; 482 _version_type windll; 483 } UzpVer; 484 485 /* for Visual BASIC access to Windows DLLs: */ 486 typedef struct _UzpVer2 { 487 ulg structlen; /* length of the struct being passed */ 488 ulg flag; /* bit 0: is_beta bit 1: uses_zlib */ 489 char betalevel[10]; /* e.g., "g BETA" or "" */ 490 char date[20]; /* e.g., "4 Sep 95" (beta) or "4 September 1995" */ 491 char zlib_version[10]; /* e.g., "0.95" or NULL */ 492 _version_type unzip; 493 _version_type zipinfo; 494 _version_type os2dll; 495 _version_type windll; 496 } UzpVer2; 497 498 typedef struct central_directory_file_header { /* CENTRAL */ 499 uch version_made_by[2]; 500 uch version_needed_to_extract[2]; 501 ush general_purpose_bit_flag; 502 ush compression_method; 503 ulg last_mod_dos_datetime; 504 ulg crc32; 505 ulg csize; 506 ulg ucsize; 507 ush filename_length; 508 ush extra_field_length; 509 ush file_comment_length; 510 ush disk_number_start; 511 ush internal_file_attributes; 512 ulg external_file_attributes; 513 ulg relative_offset_local_header; 514 } cdir_file_hdr; 515 516 517 #define UZPINIT_LEN sizeof(UzpInit) 518 #define UZPVER_LEN sizeof(UzpVer) 519 #define cbList(func) int (* UZ_EXP func)(char *filename, cdir_file_hdr *crec) 520 521 522 /*--------------------------------------------------------------------------- 523 Return (and exit) values of the public UnZip API functions. 524 ---------------------------------------------------------------------------*/ 525 526 /* external return codes */ 527 #define PK_OK 0 /* no error */ 528 #define PK_COOL 0 /* no error */ 529 #define PK_WARN 1 /* warning error */ 530 #define PK_ERR 2 /* error in zipfile */ 531 #define PK_BADERR 3 /* severe error in zipfile */ 532 #define PK_MEM 4 /* insufficient memory (during initialization) */ 533 #define PK_MEM2 5 /* insufficient memory (password failure) */ 534 #define PK_MEM3 6 /* insufficient memory (file decompression) */ 535 #define PK_MEM4 7 /* insufficient memory (memory decompression) */ 536 #define PK_MEM5 8 /* insufficient memory (not yet used) */ 537 #define PK_NOZIP 9 /* zipfile not found */ 538 #define PK_PARAM 10 /* bad or illegal parameters specified */ 539 #define PK_FIND 11 /* no files found */ 540 #define PK_DISK 50 /* disk full */ 541 #define PK_EOF 51 /* unexpected EOF */ 542 543 #define IZ_CTRLC 80 /* user hit ^C to terminate */ 544 #define IZ_UNSUP 81 /* no files found: all unsup. compr/encrypt. */ 545 #define IZ_BADPWD 82 /* no files found: all had bad password */ 546 547 /* return codes of password fetches (negative = user abort; positive = error) */ 548 #define IZ_PW_ENTERED 0 /* got some password string; use/try it */ 549 #define IZ_PW_CANCEL -1 /* no password available (for this entry) */ 550 #define IZ_PW_CANCELALL -2 /* no password, skip any further pwd. request */ 551 #define IZ_PW_ERROR 5 /* = PK_MEM2 : failure (no mem, no tty, ...) */ 552 553 /* flag values for status callback function */ 554 #define UZ_ST_START_EXTRACT 1 /* no details */ 555 #define UZ_ST_IN_PROGRESS 2 /* no details */ 556 #define UZ_ST_FINISH_MEMBER 3 /* 'details': extracted size */ 557 558 /* return values of status callback function */ 559 #define UZ_ST_CONTINUE 0 560 #define UZ_ST_BREAK 1 561 562 563 /*--------------------------------------------------------------------------- 564 Prototypes for public UnZip API (DLL) functions. 565 ---------------------------------------------------------------------------*/ 566 567 #define UzpMatch match 568 569 int UZ_EXP UzpMain OF((int argc, char **argv)); 570 int UZ_EXP UzpAltMain OF((int argc, char **argv, UzpInit *init)); 571 UzpVer * UZ_EXP UzpVersion OF((void)); 572 void UZ_EXP UzpFreeMemBuffer OF((UzpBuffer *retstr)); 573 #ifndef WINDLL 574 int UZ_EXP UzpUnzipToMemory OF((char *zip, char *file, UzpOpts *optflgs, 575 UzpCB *UsrFunc, UzpBuffer *retstr)); 576 int UZ_EXP UzpGrep OF((char *archive, char *file, 577 char *pattern, int cmd, int SkipBin, 578 UzpCB *UsrFunc)); 579 #endif 580 #ifdef OS2 581 int UZ_EXP UzpFileTree OF((char *name, cbList(callBack), 582 char *cpInclude[], char *cpExclude[])); 583 #endif 584 585 void UZ_EXP UzpVersion2 OF((UzpVer2 *version)); 586 int UZ_EXP UzpValidate OF((char *archive, int AllCodes)); 587 588 589 /* default I/O functions (can be swapped out via UzpAltMain() entry point): */ 590 591 int UZ_EXP UzpMessagePrnt OF((zvoid *pG, uch *buf, ulg size, int flag)); 592 int UZ_EXP UzpMessageNull OF((zvoid *pG, uch *buf, ulg size, int flag)); 593 int UZ_EXP UzpInput OF((zvoid *pG, uch *buf, int *size, int flag)); 594 void UZ_EXP UzpMorePause OF((zvoid *pG, ZCONST char *prompt, int flag)); 595 int UZ_EXP UzpPassword OF((zvoid *pG, int *rcnt, char *pwbuf, 596 int size, ZCONST char *zfn, 597 ZCONST char *efn)); 598 599 600 /*--------------------------------------------------------------------------- 601 Remaining private stuff for UnZip compilation. 602 ---------------------------------------------------------------------------*/ 603 604 #ifdef UNZIP_INTERNAL 605 # include "unzpriv.h" 606 #endif 607 608 609 #endif /* !__unzip_h */ 610