]>
git.saurik.com Git - wxWidgets.git/blob - utils/Install/sfxzip/unzipstb.c
1 /*---------------------------------------------------------------------------
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.)
13 ---------------------------------------------------------------------------*/
19 int main(int argc
, char *argv
[])
21 static UzpVer
*pVersion
; /* no pervert jokes, please... */
23 pVersion
= UzpVersion();
25 printf("UnZip stub: checking version numbers (DLL is dated %s)\n",
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
);
35 D2_M*VER and os2dll.* are obsolete, though retained for compatibility:
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);
42 if (pVersion
->flag
& 2)
43 printf(" using zlib version %s\n", pVersion
->zlib_version
);
46 /* call the actual UnZip routine (string-arguments version) */
47 return UzpMain(argc
, argv
);