]> git.saurik.com Git - wxWidgets.git/blob - utils/Install/packzip/unzipstb.c
changed version number
[wxWidgets.git] / utils / Install / packzip / unzipstb.c
1 /*---------------------------------------------------------------------------
2
3 unzipstb.c
4
5 Simple stub function for UnZip DLL (or shared library, whatever); does
6 exactly the same thing as normal UnZip, except for additional printf()s
7 of various version numbers, solely as a demonstration of what can/should
8 be checked when using the DLL. (If major version numbers ever differ,
9 assume program is incompatible with DLL--especially if DLL version is
10 older. This is not likely to be a problem with *this* simple program,
11 but most user programs will be much more complex.)
12
13 ---------------------------------------------------------------------------*/
14
15 #include <stdio.h>
16 #include "unzip.h"
17 #include "version.h"
18
19 int main(int argc, char *argv[])
20 {
21 static UzpVer *pVersion; /* no pervert jokes, please... */
22
23 pVersion = UzpVersion();
24
25 printf("UnZip stub: checking version numbers (DLL is dated %s)\n",
26 pVersion->date);
27 printf(" UnZip versions: expecting %d.%d%d, using %d.%d%d%s\n",
28 UZ_MAJORVER, UZ_MINORVER, PATCHLEVEL, pVersion->unzip.major,
29 pVersion->unzip.minor, pVersion->unzip.patchlevel, pVersion->betalevel);
30 printf(" ZipInfo versions: expecting %d.%d%d, using %d.%d%d\n",
31 ZI_MAJORVER, ZI_MINORVER, PATCHLEVEL, pVersion->zipinfo.major,
32 pVersion->zipinfo.minor, pVersion->zipinfo.patchlevel);
33
34 /*
35 D2_M*VER and os2dll.* are obsolete, though retained for compatibility:
36
37 printf(" OS2 DLL versions: expecting %d.%d%d, using %d.%d%d\n",
38 D2_MAJORVER, D2_MINORVER, PATCHLEVEL, pVersion->os2dll.major,
39 pVersion->os2dll.minor, pVersion->os2dll.patchlevel);
40 */
41
42 if (pVersion->flag & 2)
43 printf(" using zlib version %s\n", pVersion->zlib_version);
44 printf("\n");
45
46 /* call the actual UnZip routine (string-arguments version) */
47 return UzpMain(argc, argv);
48 }