2 Copyright (c) 1990-2001 Info-ZIP. All rights reserved.
4 See the accompanying file LICENSE, version 2000-Apr-09 or later
5 (the contents of which are also included in unzip.h) for terms of use.
6 If, for some reason, all these files are missing, the Info-ZIP license
7 also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html
9 /*---------------------------------------------------------------------------
13 Simple stub function for UnZip DLL (or shared library, whatever); does
14 exactly the same thing as normal UnZip, except for additional printf()s
15 of various version numbers, solely as a demonstration of what can/should
16 be checked when using the DLL. (If major version numbers ever differ,
17 assume program is incompatible with DLL--especially if DLL version is
18 older. This is not likely to be a problem with *this* simple program,
19 but most user programs will be much more complex.)
21 ---------------------------------------------------------------------------*/
27 int main(int argc
, char *argv
[])
29 static UzpVer
*pVersion
; /* no pervert jokes, please... */
31 pVersion
= UzpVersion();
33 printf("UnZip stub: checking version numbers (DLL is dated %s)\n",
35 printf(" UnZip versions: expecting %d.%d%d, using %d.%d%d%s\n",
36 UZ_MAJORVER
, UZ_MINORVER
, UZ_PATCHLEVEL
, pVersion
->unzip
.major
,
37 pVersion
->unzip
.minor
, pVersion
->unzip
.patchlevel
, pVersion
->betalevel
);
38 printf(" ZipInfo versions: expecting %d.%d%d, using %d.%d%d\n",
39 ZI_MAJORVER
, ZI_MINORVER
, UZ_PATCHLEVEL
, pVersion
->zipinfo
.major
,
40 pVersion
->zipinfo
.minor
, pVersion
->zipinfo
.patchlevel
);
43 D2_M*VER and os2dll.* are obsolete, though retained for compatibility:
45 printf(" OS2 DLL versions: expecting %d.%d%d, using %d.%d%d\n",
46 D2_MAJORVER, D2_MINORVER, D2_PATCHLEVEL, pVersion->os2dll.major,
47 pVersion->os2dll.minor, pVersion->os2dll.patchlevel);
50 if (pVersion
->flag
& 2)
51 printf(" using zlib version %s\n", pVersion
->zlib_version
);
54 /* call the actual UnZip routine (string-arguments version) */
55 return UzpMain(argc
, argv
);