merged 2.2 branch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
46
utils/Install/inczip/consts.h
Normal file
46
utils/Install/inczip/consts.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/*---------------------------------------------------------------------------
|
||||
|
||||
consts.h
|
||||
|
||||
This file contains global, initialized variables that never change. It is
|
||||
included by unzip.c and windll/windll.c.
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
/* And'ing with mask_bits[n] masks the lower n bits */
|
||||
ZCONST ush near mask_bits[] = {
|
||||
0x0000,
|
||||
0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,
|
||||
0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff
|
||||
};
|
||||
|
||||
ZCONST char Far VersionDate[] = VERSION_DATE; /* now defined in version.h */
|
||||
|
||||
#ifndef SFX
|
||||
ZCONST char Far EndSigMsg[] =
|
||||
"\nnote: didn't find end-of-central-dir signature at end of central dir.\n";
|
||||
#endif
|
||||
|
||||
ZCONST char Far CentSigMsg[] =
|
||||
"error: expected central file header signature not found (file #%u).\n";
|
||||
ZCONST char Far SeekMsg[] =
|
||||
"error [%s]: attempt to seek before beginning of zipfile\n%s";
|
||||
ZCONST char Far FilenameNotMatched[] = "caution: filename not matched: %s\n";
|
||||
ZCONST char Far ExclFilenameNotMatched[] =
|
||||
"caution: excluded filename not matched: %s\n";
|
||||
|
||||
#ifdef VMS
|
||||
ZCONST char Far ReportMsg[] = "\
|
||||
(please check that you have transferred or created the zipfile in the\n\
|
||||
appropriate BINARY mode--this includes ftp, Kermit, AND unzip'd zipfiles)\n";
|
||||
#else
|
||||
ZCONST char Far ReportMsg[] = "\
|
||||
(please check that you have transferred or created the zipfile in the\n\
|
||||
appropriate BINARY mode and that you have compiled UnZip properly)\n";
|
||||
#endif
|
||||
|
||||
#ifndef SFX
|
||||
ZCONST char Far Zipnfo[] = "zipinfo";
|
||||
ZCONST char Far CompiledWith[] = "Compiled with %s%s for %s%s%s%s.\n\n";
|
||||
#endif
|
24
utils/Install/inczip/crypt.h
Normal file
24
utils/Install/inczip/crypt.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
crypt.h (dummy version) by Info-ZIP. Last revised: 15 Aug 98
|
||||
|
||||
This is a non-functional version of Info-ZIP's crypt.h encryption/
|
||||
decryption header file for Zip, ZipCloak, UnZip and fUnZip. This
|
||||
file is not copyrighted and may be distributed without restriction.
|
||||
See the "WHERE" file for sites from which to obtain the full crypt
|
||||
sources (zcrypt28.zip or later).
|
||||
*/
|
||||
|
||||
#ifndef __crypt_h /* don't include more than once */
|
||||
#define __crypt_h
|
||||
|
||||
#ifdef CRYPT
|
||||
# undef CRYPT
|
||||
#endif
|
||||
#define CRYPT 0 /* dummy version */
|
||||
|
||||
#define zencode
|
||||
#define zdecode
|
||||
|
||||
#define zfwrite fwrite
|
||||
|
||||
#endif /* !__crypt_h */
|
272
utils/Install/inczip/ebcdic.h
Normal file
272
utils/Install/inczip/ebcdic.h
Normal file
@@ -0,0 +1,272 @@
|
||||
/*---------------------------------------------------------------------------
|
||||
|
||||
ebcdic.h
|
||||
|
||||
The CECP 1047 (Extended de-facto EBCDIC) <-> ISO 8859-1 conversion tables,
|
||||
from ftp://aix1.segi.ulg.ac.be/pub/docs/iso8859/iso8859.networking
|
||||
|
||||
NOTES:
|
||||
<Paul_von_Behren@stortek.com> (OS/390 port 12/97)
|
||||
These table no longer represent the standard mappings (for example in the
|
||||
OS/390 iconv utility). In order to follow current standards I remapped
|
||||
ebcdic x0a to ascii x15 and
|
||||
ebcdic x85 to ascii x25 (and vice-versa)
|
||||
Without these changes, newlines in auto-convert text files appeared
|
||||
as literal \045.
|
||||
I'm not sure what effect this remap would have on the MVS and CMS ports, so
|
||||
I ifdef'd these changes. Hopefully these ifdef's can be removed when the
|
||||
MVS/CMS folks test the new mappings.
|
||||
|
||||
Christian Spieler <spieler@ikp.tu-darmstadt.de>, 27-Apr-1998
|
||||
The problem mentioned by Paul von Behren was already observed previously
|
||||
on VM/CMS, during the preparation of the CMS&MVS port of UnZip 5.20 in
|
||||
1996. At that point, the ebcdic tables were not changed since they seemed
|
||||
to be an adopted standard (to my knowledge, these tables are still used
|
||||
as presented in mainfraime KERMIT). Instead, the "end-of-line" conversion
|
||||
feature of Zip's and UnZip's "text-translation" mode was used to force
|
||||
correct mappings between ASCII and EBCDIC newline markers.
|
||||
Before interchanging the ASCII mappings of the EBCDIC control characters
|
||||
"NL" 0x25 and "LF" 0x15 according to the OS/390 setting, we have to
|
||||
make sure that EBCDIC 0x15 is never used as line termination.
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __ebcdic_h /* prevent multiple inclusions */
|
||||
#define __ebcdic_h
|
||||
|
||||
|
||||
#ifndef ZCONST
|
||||
# define ZCONST const
|
||||
#endif
|
||||
|
||||
#ifdef EBCDIC
|
||||
#ifndef MTS /* MTS uses a slightly "special" EBCDIC code page */
|
||||
|
||||
ZCONST uch ebcdic[] = {
|
||||
0x00, 0x01, 0x02, 0x03, 0x37, 0x2D, 0x2E, 0x2F, /* 00 - 07 */
|
||||
#ifdef OS390
|
||||
0x16, 0x05, 0x15, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, /* 08 - 0F */
|
||||
#else
|
||||
0x16, 0x05, 0x25, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, /* 08 - 0F */
|
||||
#endif
|
||||
0x10, 0x11, 0x12, 0x13, 0x3C, 0x3D, 0x32, 0x26, /* 10 - 17 */
|
||||
0x18, 0x19, 0x3F, 0x27, 0x1C, 0x1D, 0x1E, 0x1F, /* 18 - 1F */
|
||||
0x40, 0x5A, 0x7F, 0x7B, 0x5B, 0x6C, 0x50, 0x7D, /* 20 - 27 */
|
||||
0x4D, 0x5D, 0x5C, 0x4E, 0x6B, 0x60, 0x4B, 0x61, /* 28 - 2F */
|
||||
0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, /* 30 - 37 */
|
||||
0xF8, 0xF9, 0x7A, 0x5E, 0x4C, 0x7E, 0x6E, 0x6F, /* 38 - 3F */
|
||||
0x7C, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, /* 40 - 47 */
|
||||
0xC8, 0xC9, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, /* 48 - 4F */
|
||||
0xD7, 0xD8, 0xD9, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, /* 50 - 57 */
|
||||
0xE7, 0xE8, 0xE9, 0xAD, 0xE0, 0xBD, 0x5F, 0x6D, /* 58 - 5F */
|
||||
0x79, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, /* 60 - 67 */
|
||||
0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, /* 68 - 6F */
|
||||
0x97, 0x98, 0x99, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, /* 70 - 77 */
|
||||
0xA7, 0xA8, 0xA9, 0xC0, 0x4F, 0xD0, 0xA1, 0x07, /* 78 - 7F */
|
||||
#ifdef OS390
|
||||
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x06, 0x17, /* 80 - 87 */
|
||||
#else
|
||||
0x20, 0x21, 0x22, 0x23, 0x24, 0x15, 0x06, 0x17, /* 80 - 87 */
|
||||
#endif
|
||||
0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x09, 0x0A, 0x1B, /* 88 - 8F */
|
||||
0x30, 0x31, 0x1A, 0x33, 0x34, 0x35, 0x36, 0x08, /* 90 - 97 */
|
||||
0x38, 0x39, 0x3A, 0x3B, 0x04, 0x14, 0x3E, 0xFF, /* 98 - 9F */
|
||||
0x41, 0xAA, 0x4A, 0xB1, 0x9F, 0xB2, 0x6A, 0xB5, /* A0 - A7 */
|
||||
0xBB, 0xB4, 0x9A, 0x8A, 0xB0, 0xCA, 0xAF, 0xBC, /* A8 - AF */
|
||||
0x90, 0x8F, 0xEA, 0xFA, 0xBE, 0xA0, 0xB6, 0xB3, /* B0 - B7 */
|
||||
0x9D, 0xDA, 0x9B, 0x8B, 0xB7, 0xB8, 0xB9, 0xAB, /* B8 - BF */
|
||||
0x64, 0x65, 0x62, 0x66, 0x63, 0x67, 0x9E, 0x68, /* C0 - C7 */
|
||||
0x74, 0x71, 0x72, 0x73, 0x78, 0x75, 0x76, 0x77, /* C8 - CF */
|
||||
0xAC, 0x69, 0xED, 0xEE, 0xEB, 0xEF, 0xEC, 0xBF, /* D0 - D7 */
|
||||
0x80, 0xFD, 0xFE, 0xFB, 0xFC, 0xBA, 0xAE, 0x59, /* D8 - DF */
|
||||
0x44, 0x45, 0x42, 0x46, 0x43, 0x47, 0x9C, 0x48, /* E0 - E7 */
|
||||
0x54, 0x51, 0x52, 0x53, 0x58, 0x55, 0x56, 0x57, /* E8 - EF */
|
||||
0x8C, 0x49, 0xCD, 0xCE, 0xCB, 0xCF, 0xCC, 0xE1, /* F0 - F7 */
|
||||
0x70, 0xDD, 0xDE, 0xDB, 0xDC, 0x8D, 0x8E, 0xDF /* F8 - FF */
|
||||
};
|
||||
|
||||
#if (defined(ZIP) || CRYPT)
|
||||
ZCONST uch ascii[] = {
|
||||
0x00, 0x01, 0x02, 0x03, 0x9C, 0x09, 0x86, 0x7F, /* 00 - 07 */
|
||||
0x97, 0x8D, 0x8E, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, /* 08 - 0F */
|
||||
#ifdef OS390
|
||||
0x10, 0x11, 0x12, 0x13, 0x9D, 0x0A, 0x08, 0x87, /* 10 - 17 */
|
||||
#else
|
||||
0x10, 0x11, 0x12, 0x13, 0x9D, 0x85, 0x08, 0x87, /* 10 - 17 */
|
||||
#endif
|
||||
0x18, 0x19, 0x92, 0x8F, 0x1C, 0x1D, 0x1E, 0x1F, /* 18 - 1F */
|
||||
#ifdef OS390
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x17, 0x1B, /* 20 - 27 */
|
||||
#else
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x0A, 0x17, 0x1B, /* 20 - 27 */
|
||||
#endif
|
||||
0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x05, 0x06, 0x07, /* 28 - 2F */
|
||||
0x90, 0x91, 0x16, 0x93, 0x94, 0x95, 0x96, 0x04, /* 30 - 37 */
|
||||
0x98, 0x99, 0x9A, 0x9B, 0x14, 0x15, 0x9E, 0x1A, /* 38 - 3F */
|
||||
0x20, 0xA0, 0xE2, 0xE4, 0xE0, 0xE1, 0xE3, 0xE5, /* 40 - 47 */
|
||||
0xE7, 0xF1, 0xA2, 0x2E, 0x3C, 0x28, 0x2B, 0x7C, /* 48 - 4F */
|
||||
0x26, 0xE9, 0xEA, 0xEB, 0xE8, 0xED, 0xEE, 0xEF, /* 50 - 57 */
|
||||
0xEC, 0xDF, 0x21, 0x24, 0x2A, 0x29, 0x3B, 0x5E, /* 58 - 5F */
|
||||
0x2D, 0x2F, 0xC2, 0xC4, 0xC0, 0xC1, 0xC3, 0xC5, /* 60 - 67 */
|
||||
0xC7, 0xD1, 0xA6, 0x2C, 0x25, 0x5F, 0x3E, 0x3F, /* 68 - 6F */
|
||||
0xF8, 0xC9, 0xCA, 0xCB, 0xC8, 0xCD, 0xCE, 0xCF, /* 70 - 77 */
|
||||
0xCC, 0x60, 0x3A, 0x23, 0x40, 0x27, 0x3D, 0x22, /* 78 - 7F */
|
||||
0xD8, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, /* 80 - 87 */
|
||||
0x68, 0x69, 0xAB, 0xBB, 0xF0, 0xFD, 0xFE, 0xB1, /* 88 - 8F */
|
||||
0xB0, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, /* 90 - 97 */
|
||||
0x71, 0x72, 0xAA, 0xBA, 0xE6, 0xB8, 0xC6, 0xA4, /* 98 - 9F */
|
||||
0xB5, 0x7E, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, /* A0 - A7 */
|
||||
0x79, 0x7A, 0xA1, 0xBF, 0xD0, 0x5B, 0xDE, 0xAE, /* A8 - AF */
|
||||
0xAC, 0xA3, 0xA5, 0xB7, 0xA9, 0xA7, 0xB6, 0xBC, /* B0 - B7 */
|
||||
0xBD, 0xBE, 0xDD, 0xA8, 0xAF, 0x5D, 0xB4, 0xD7, /* B8 - BF */
|
||||
0x7B, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, /* C0 - C7 */
|
||||
0x48, 0x49, 0xAD, 0xF4, 0xF6, 0xF2, 0xF3, 0xF5, /* C8 - CF */
|
||||
0x7D, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, /* D0 - D7 */
|
||||
0x51, 0x52, 0xB9, 0xFB, 0xFC, 0xF9, 0xFA, 0xFF, /* D8 - DF */
|
||||
0x5C, 0xF7, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, /* E0 - E7 */
|
||||
0x59, 0x5A, 0xB2, 0xD4, 0xD6, 0xD2, 0xD3, 0xD5, /* E8 - EF */
|
||||
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* F0 - F7 */
|
||||
0x38, 0x39, 0xB3, 0xDB, 0xDC, 0xD9, 0xDA, 0x9F /* F8 - FF */
|
||||
};
|
||||
#endif /* ZIP || CRYPT */
|
||||
|
||||
#else /* MTS */
|
||||
|
||||
/*
|
||||
* This is the MTS ASCII->EBCDIC translation table. It provides a 1-1
|
||||
* translation from ISO 8859/1 8-bit ASCII to IBM Code Page 37 EBCDIC.
|
||||
*/
|
||||
|
||||
ZCONST uch ebcdic[] = {
|
||||
0x00, 0x01, 0x02, 0x03, 0x37, 0x2D, 0x2E, 0x2F, /* 00 - 07 */
|
||||
0x16, 0x05, 0x25, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, /* 08 - 0F */
|
||||
0x10, 0x11, 0x12, 0x13, 0x3C, 0x3D, 0x32, 0x26, /* 10 - 17 */
|
||||
0x18, 0x19, 0x3F, 0x27, 0x1C, 0x1D, 0x1E, 0x1F, /* 18 - 1F */
|
||||
0x40, 0x5A, 0x7F, 0x7B, 0x5B, 0x6C, 0x50, 0x7D, /* 20 - 27 */
|
||||
0x4D, 0x5D, 0x5C, 0x4E, 0x6B, 0x60, 0x4B, 0x61, /* 28 - 2F */
|
||||
0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, /* 30 - 37 */
|
||||
0xF8, 0xF9, 0x7A, 0x5E, 0x4C, 0x7E, 0x6E, 0x6F, /* 38 - 3F */
|
||||
0x7C, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, /* 40 - 47 */
|
||||
0xC8, 0xC9, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, /* 48 - 4F */
|
||||
0xD7, 0xD8, 0xD9, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, /* 50 - 57 */
|
||||
0xE7, 0xE8, 0xE9, 0xBA, 0xE0, 0xBB, 0xB0, 0x6D, /* 58 - 5F */
|
||||
0x79, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, /* 60 - 67 */
|
||||
0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, /* 68 - 6F */
|
||||
0x97, 0x98, 0x99, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, /* 70 - 77 */
|
||||
0xA7, 0xA8, 0xA9, 0xC0, 0x4F, 0xD0, 0xA1, 0x07, /* 78 - 7F */
|
||||
0x20, 0x21, 0x22, 0x23, 0x24, 0x15, 0x06, 0x17, /* 80 - 87 */
|
||||
0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x09, 0x0A, 0x1B, /* 88 - 8F */
|
||||
0x30, 0x31, 0x1A, 0x33, 0x34, 0x35, 0x36, 0x08, /* 90 - 97 */
|
||||
0x38, 0x39, 0x3A, 0x3B, 0x04, 0x14, 0x3E, 0xFF, /* 98 - 9F */
|
||||
0x41, 0xAA, 0x4A, 0xB1, 0x9F, 0xB2, 0x6A, 0xB5, /* A0 - A7 */
|
||||
0xBD, 0xB4, 0x9A, 0x8A, 0x5F, 0xCA, 0xAF, 0xBC, /* A8 - AF */
|
||||
0x90, 0x8F, 0xEA, 0xFA, 0xBE, 0xA0, 0xB6, 0xB3, /* B0 - B7 */
|
||||
0x9D, 0xDA, 0x9B, 0x8B, 0xB7, 0xB8, 0xB9, 0xAB, /* B8 - BF */
|
||||
0x64, 0x65, 0x62, 0x66, 0x63, 0x67, 0x9E, 0x68, /* C0 - C7 */
|
||||
0x74, 0x71, 0x72, 0x73, 0x78, 0x75, 0x76, 0x77, /* C8 - CF */
|
||||
0xAC, 0x69, 0xED, 0xEE, 0xEB, 0xEF, 0xEC, 0xBF, /* D0 - D7 */
|
||||
0x80, 0xFD, 0xFE, 0xFB, 0xFC, 0xAD, 0xAE, 0x59, /* D8 - DF */
|
||||
0x44, 0x45, 0x42, 0x46, 0x43, 0x47, 0x9C, 0x48, /* E0 - E7 */
|
||||
0x54, 0x51, 0x52, 0x53, 0x58, 0x55, 0x56, 0x57, /* E8 - EF */
|
||||
0x8C, 0x49, 0xCD, 0xCE, 0xCB, 0xCF, 0xCC, 0xE1, /* F0 - F7 */
|
||||
0x70, 0xDD, 0xDE, 0xDB, 0xDC, 0x8D, 0x8E, 0xDF /* F8 - FF */
|
||||
};
|
||||
|
||||
#if (defined(ZIP) || CRYPT)
|
||||
ZCONST uch ascii[] = {
|
||||
0x00, 0x01, 0x02, 0x03, 0x9C, 0x09, 0x86, 0x7F, /* 00 - 07 */
|
||||
0x97, 0x8D, 0x8E, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, /* 08 - 0F */
|
||||
0x10, 0x11, 0x12, 0x13, 0x9D, 0x85, 0x08, 0x87, /* 10 - 17 */
|
||||
0x18, 0x19, 0x92, 0x8F, 0x1C, 0x1D, 0x1E, 0x1F, /* 18 - 1F */
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x0A, 0x17, 0x1B, /* 20 - 27 */
|
||||
0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x05, 0x06, 0x07, /* 28 - 2F */
|
||||
0x90, 0x91, 0x16, 0x93, 0x94, 0x95, 0x96, 0x04, /* 30 - 37 */
|
||||
0x98, 0x99, 0x9A, 0x9B, 0x14, 0x15, 0x9E, 0x1A, /* 38 - 3F */
|
||||
0x20, 0xA0, 0xE2, 0xE4, 0xE0, 0xE1, 0xE3, 0xE5, /* 40 - 47 */
|
||||
0xE7, 0xF1, 0xA2, 0x2E, 0x3C, 0x28, 0x2B, 0x7C, /* 48 - 4F */
|
||||
0x26, 0xE9, 0xEA, 0xEB, 0xE8, 0xED, 0xEE, 0xEF, /* 50 - 57 */
|
||||
0xEC, 0xDF, 0x21, 0x24, 0x2A, 0x29, 0x3B, 0xAC, /* 58 - 5F */
|
||||
0x2D, 0x2F, 0xC2, 0xC4, 0xC0, 0xC1, 0xC3, 0xC5, /* 60 - 67 */
|
||||
0xC7, 0xD1, 0xA6, 0x2C, 0x25, 0x5F, 0x3E, 0x3F, /* 68 - 6F */
|
||||
0xF8, 0xC9, 0xCA, 0xCB, 0xC8, 0xCD, 0xCE, 0xCF, /* 70 - 77 */
|
||||
0xCC, 0x60, 0x3A, 0x23, 0x40, 0x27, 0x3D, 0x22, /* 78 - 7F */
|
||||
0xD8, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, /* 80 - 87 */
|
||||
0x68, 0x69, 0xAB, 0xBB, 0xF0, 0xFD, 0xFE, 0xB1, /* 88 - 8F */
|
||||
0xB0, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, /* 90 - 97 */
|
||||
0x71, 0x72, 0xAA, 0xBA, 0xE6, 0xB8, 0xC6, 0xA4, /* 98 - 9F */
|
||||
0xB5, 0x7E, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, /* A0 - A7 */
|
||||
0x79, 0x7A, 0xA1, 0xBF, 0xD0, 0xDD, 0xDE, 0xAE, /* A8 - AF */
|
||||
0x5E, 0xA3, 0xA5, 0xB7, 0xA9, 0xA7, 0xB6, 0xBC, /* B0 - B7 */
|
||||
0xBD, 0xBE, 0x5B, 0x5D, 0xAF, 0xA8, 0xB4, 0xD7, /* B8 - BF */
|
||||
0x7B, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, /* C0 - C7 */
|
||||
0x48, 0x49, 0xAD, 0xF4, 0xF6, 0xF2, 0xF3, 0xF5, /* C8 - CF */
|
||||
0x7D, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, /* D0 - D7 */
|
||||
0x51, 0x52, 0xB9, 0xFB, 0xFC, 0xF9, 0xFA, 0xFF, /* D8 - DF */
|
||||
0x5C, 0xF7, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, /* E0 - E7 */
|
||||
0x59, 0x5A, 0xB2, 0xD4, 0xD6, 0xD2, 0xD3, 0xD5, /* E8 - EF */
|
||||
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* F0 - F7 */
|
||||
0x38, 0x39, 0xB3, 0xDB, 0xDC, 0xD9, 0xDA, 0x9F /* F8 - FF */
|
||||
};
|
||||
#endif /* ZIP || CRYPT */
|
||||
|
||||
#endif /* ?MTS */
|
||||
#endif /* EBCDIC */
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
|
||||
The following conversion tables translate between IBM PC CP 850
|
||||
(OEM codepage) and the "Western Europe & America" Windows codepage 1252.
|
||||
The Windows codepage 1252 contains the ISO 8859-1 "Latin 1" codepage,
|
||||
with some additional printable characters in the range (0x80 - 0x9F),
|
||||
that is reserved to control codes in the ISO 8859-1 character table.
|
||||
|
||||
The ISO <--> OEM conversion tables were constructed with the help
|
||||
of the WIN32 (Win16?) API's OemToAnsi() and AnsiToOem() conversion
|
||||
functions and have been checked against the CP850 and LATIN1 tables
|
||||
provided in the MS-Kermit 3.14 distribution.
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef IZ_ISO2OEM_ARRAY
|
||||
ZCONST uch Far iso2oem[] = {
|
||||
0x3F, 0x3F, 0x27, 0x9F, 0x22, 0x2E, 0xC5, 0xCE, /* 80 - 87 */
|
||||
0x5E, 0x25, 0x53, 0x3C, 0x4F, 0x3F, 0x3F, 0x3F, /* 88 - 8F */
|
||||
0x3F, 0x27, 0x27, 0x22, 0x22, 0x07, 0x2D, 0x2D, /* 90 - 97 */
|
||||
0x7E, 0x54, 0x73, 0x3E, 0x6F, 0x3F, 0x3F, 0x59, /* 98 - 9F */
|
||||
0xFF, 0xAD, 0xBD, 0x9C, 0xCF, 0xBE, 0xDD, 0xF5, /* A0 - A7 */
|
||||
0xF9, 0xB8, 0xA6, 0xAE, 0xAA, 0xF0, 0xA9, 0xEE, /* A8 - AF */
|
||||
0xF8, 0xF1, 0xFD, 0xFC, 0xEF, 0xE6, 0xF4, 0xFA, /* B0 - B7 */
|
||||
0xF7, 0xFB, 0xA7, 0xAF, 0xAC, 0xAB, 0xF3, 0xA8, /* B8 - BF */
|
||||
0xB7, 0xB5, 0xB6, 0xC7, 0x8E, 0x8F, 0x92, 0x80, /* C0 - C7 */
|
||||
0xD4, 0x90, 0xD2, 0xD3, 0xDE, 0xD6, 0xD7, 0xD8, /* C8 - CF */
|
||||
0xD1, 0xA5, 0xE3, 0xE0, 0xE2, 0xE5, 0x99, 0x9E, /* D0 - D7 */
|
||||
0x9D, 0xEB, 0xE9, 0xEA, 0x9A, 0xED, 0xE8, 0xE1, /* D8 - DF */
|
||||
0x85, 0xA0, 0x83, 0xC6, 0x84, 0x86, 0x91, 0x87, /* E0 - E7 */
|
||||
0x8A, 0x82, 0x88, 0x89, 0x8D, 0xA1, 0x8C, 0x8B, /* E8 - EF */
|
||||
0xD0, 0xA4, 0x95, 0xA2, 0x93, 0xE4, 0x94, 0xF6, /* F0 - F7 */
|
||||
0x9B, 0x97, 0xA3, 0x96, 0x81, 0xEC, 0xE7, 0x98 /* F8 - FF */
|
||||
};
|
||||
#endif /* IZ_ISO2OEM_ARRAY */
|
||||
|
||||
#ifdef IZ_OEM2ISO_ARRAY
|
||||
ZCONST uch Far oem2iso[] = {
|
||||
0xC7, 0xFC, 0xE9, 0xE2, 0xE4, 0xE0, 0xE5, 0xE7, /* 80 - 87 */
|
||||
0xEA, 0xEB, 0xE8, 0xEF, 0xEE, 0xEC, 0xC4, 0xC5, /* 88 - 8F */
|
||||
0xC9, 0xE6, 0xC6, 0xF4, 0xF6, 0xF2, 0xFB, 0xF9, /* 90 - 97 */
|
||||
0xFF, 0xD6, 0xDC, 0xF8, 0xA3, 0xD8, 0xD7, 0x83, /* 98 - 9F */
|
||||
0xE1, 0xED, 0xF3, 0xFA, 0xF1, 0xD1, 0xAA, 0xBA, /* A0 - A7 */
|
||||
0xBF, 0xAE, 0xAC, 0xBD, 0xBC, 0xA1, 0xAB, 0xBB, /* A8 - AF */
|
||||
0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xC1, 0xC2, 0xC0, /* B0 - B7 */
|
||||
0xA9, 0xA6, 0xA6, 0x2B, 0x2B, 0xA2, 0xA5, 0x2B, /* B8 - BF */
|
||||
0x2B, 0x2D, 0x2D, 0x2B, 0x2D, 0x2B, 0xE3, 0xC3, /* C0 - C7 */
|
||||
0x2B, 0x2B, 0x2D, 0x2D, 0xA6, 0x2D, 0x2B, 0xA4, /* C8 - CF */
|
||||
0xF0, 0xD0, 0xCA, 0xCB, 0xC8, 0x69, 0xCD, 0xCE, /* D0 - D7 */
|
||||
0xCF, 0x2B, 0x2B, 0xA6, 0x5F, 0xA6, 0xCC, 0xAF, /* D8 - DF */
|
||||
0xD3, 0xDF, 0xD4, 0xD2, 0xF5, 0xD5, 0xB5, 0xFE, /* E0 - E7 */
|
||||
0xDE, 0xDA, 0xDB, 0xD9, 0xFD, 0xDD, 0xAF, 0xB4, /* E8 - EF */
|
||||
0xAD, 0xB1, 0x3D, 0xBE, 0xB6, 0xA7, 0xF7, 0xB8, /* F0 - F7 */
|
||||
0xB0, 0xA8, 0xB7, 0xB9, 0xB3, 0xB2, 0xA6, 0xA0 /* F8 - FF */
|
||||
};
|
||||
#endif /* IZ_OEM2ISO_ARRAY */
|
||||
|
||||
#endif /* __ebcdic_h */
|
395
utils/Install/inczip/globals.h
Normal file
395
utils/Install/inczip/globals.h
Normal file
@@ -0,0 +1,395 @@
|
||||
/*---------------------------------------------------------------------------
|
||||
|
||||
globals.h
|
||||
|
||||
There is usually no need to include this file since unzip.h includes it.
|
||||
|
||||
This header file is used by all of the UnZip source files. It contains
|
||||
a struct definition that is used to "house" all of the global variables.
|
||||
This is done to allow for multithreaded environments (OS/2, NT, Win95,
|
||||
Unix) to call UnZip through an API without a semaphore. REENTRANT should
|
||||
be defined for all platforms that require this.
|
||||
|
||||
GLOBAL CONSTRUCTOR AND DESTRUCTOR (API WRITERS READ THIS!!!)
|
||||
------------------------------------------------------------
|
||||
|
||||
No, it's not C++, but it's as close as we can get with K&R.
|
||||
|
||||
The main() of each process that uses these globals must include the
|
||||
CONSTRUCTGLOBALS; statement. This will malloc enough memory for the
|
||||
structure and initialize any variables that require it. This must
|
||||
also be done by any API function that jumps into the middle of the
|
||||
code.
|
||||
|
||||
The DESTROYGLOBALS; statement should be inserted before EVERY "EXIT(n)".
|
||||
Naturally, it also needs to be put before any API returns as well.
|
||||
In fact, it's much more important in API functions since the process
|
||||
will NOT end, and therefore the memory WON'T automatically be freed
|
||||
by the operating system.
|
||||
|
||||
USING VARIABLES FROM THE STRUCTURE
|
||||
----------------------------------
|
||||
|
||||
All global variables must now be prefixed with `G.' which is either a
|
||||
global struct (in which case it should be the only global variable) or
|
||||
a macro for the value of a local pointer variable that is passed from
|
||||
function to function. Yes, this is a pain. But it's the only way to
|
||||
allow full reentrancy.
|
||||
|
||||
ADDING VARIABLES TO THE STRUCTURE
|
||||
---------------------------------
|
||||
|
||||
If you make the inclusion of any variables conditional, be sure to only
|
||||
check macros that are GUARANTEED to be included in every module.
|
||||
For instance, newzip and pwdarg are needed only if CRYPT is TRUE,
|
||||
but this is defined after unzip.h has been read. If you are not careful,
|
||||
some modules will expect your variable to be part of this struct while
|
||||
others won't. This will cause BIG problems. (Inexplicable crashes at
|
||||
strange times, car fires, etc.) When in doubt, always include it!
|
||||
|
||||
Note also that UnZipSFX needs a few variables that UnZip doesn't. However,
|
||||
it also includes some object files from UnZip. If we were to conditionally
|
||||
include the extra variables that UnZipSFX needs, the object files from
|
||||
UnZip would not mesh with the UnZipSFX object files. Result: we just
|
||||
include the UnZipSFX variables every time. (It's only an extra 4 bytes
|
||||
so who cares!)
|
||||
|
||||
ADDING FUNCTIONS
|
||||
----------------
|
||||
|
||||
To support this new global struct, all functions must now conditionally
|
||||
pass the globals pointer (pG) to each other. This is supported by 5 macros:
|
||||
__GPRO, __GPRO__, __G, __G__ and __GDEF. A function that needs no other
|
||||
parameters would look like this:
|
||||
|
||||
int extract_or_test_files(__G)
|
||||
__GDEF
|
||||
{
|
||||
... stuff ...
|
||||
}
|
||||
|
||||
A function with other parameters would look like:
|
||||
|
||||
int memextract(__G__ tgt, tgtsize, src, srcsize)
|
||||
__GDEF
|
||||
uch *tgt, *src;
|
||||
ulg tgtsize, srcsize;
|
||||
{
|
||||
... stuff ...
|
||||
}
|
||||
|
||||
In the Function Prototypes section of unzpriv.h, you should use __GPRO and
|
||||
__GPRO__ instead:
|
||||
|
||||
int uz_opts OF((__GPRO__ int *pargc, char ***pargv));
|
||||
int process_zipfiles OF((__GPRO));
|
||||
|
||||
Note that there is NO comma after __G__ or __GPRO__ and no semi-colon after
|
||||
__GDEF. I wish there was another way but I don't think there is.
|
||||
|
||||
|
||||
TESTING THE CODE
|
||||
-----------------
|
||||
|
||||
Whether your platform requires reentrancy or not, you should always try
|
||||
building with REENTRANT defined if any functions have been added. It is
|
||||
pretty easy to forget a __G__ or a __GDEF and this mistake will only show
|
||||
up if REENTRANT is defined. All platforms should run with REENTRANT
|
||||
defined. Platforms that can't take advantage of it will just be paying
|
||||
a performance penalty needlessly.
|
||||
|
||||
SIGNAL MADNESS
|
||||
--------------
|
||||
|
||||
This whole pointer passing scheme falls apart when it comes to SIGNALs.
|
||||
I handle this situation 2 ways right now. If you define USETHREADID,
|
||||
UnZip will include a 64-entry table. Each entry can hold a global
|
||||
pointer and thread ID for one thread. This should allow up to 64
|
||||
threads to access UnZip simultaneously. Calling DESTROYGLOBALS()
|
||||
will free the global struct and zero the table entry. If somebody
|
||||
forgets to call DESTROYGLOBALS(), this table will eventually fill up
|
||||
and UnZip will exit with an error message. A good way to test your
|
||||
code to make sure you didn't forget a DESTROYGLOBALS() is to change
|
||||
THREADID_ENTRIES to 3 or 4 in globals.c, making the table real small.
|
||||
Then make a small test program that calls your API a dozen times.
|
||||
|
||||
Those platforms that don't have threads still need to be able to compile
|
||||
with REENTRANT defined to test and see if new code is correctly written
|
||||
to work either way. For these platforms, I simply keep a global pointer
|
||||
called GG that points to the Globals structure. Good enough for testing.
|
||||
|
||||
I believe that NT has thread level storage. This could probably be used
|
||||
to store a global pointer for the sake of the signal handler more cleanly
|
||||
than my table approach.
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __globals_h
|
||||
#define __globals_h
|
||||
|
||||
#ifdef USE_ZLIB
|
||||
# include "zlib.h"
|
||||
#endif
|
||||
|
||||
|
||||
/*************/
|
||||
/* Globals */
|
||||
/*************/
|
||||
|
||||
typedef struct Globals {
|
||||
#ifdef DLL
|
||||
zvoid *callerglobs; /* pointer to structure of pass-through global vars */
|
||||
#endif
|
||||
|
||||
/* command options of general use */
|
||||
UzpOpts UzO; /* command options of general use */
|
||||
|
||||
#ifndef FUNZIP
|
||||
/* command options specific to the high level command line interface */
|
||||
#ifdef MORE
|
||||
int M_flag; /* -M: built-in "more" function */
|
||||
#endif
|
||||
|
||||
/* internal flags and general globals */
|
||||
#ifdef MORE
|
||||
int height; /* check for SIGWINCH, etc., eventually... */
|
||||
#endif /* (take line-wrapping into account?) */
|
||||
#if (defined(IZ_CHECK_TZ) && defined(USE_EF_UT_TIME))
|
||||
int tz_is_valid; /* indicates that timezone info can be used */
|
||||
#endif
|
||||
#ifdef WINDLL
|
||||
int prompt_always; /* prompt to overwrite if TRUE */
|
||||
#endif
|
||||
int noargs; /* did true command line have *any* arguments? */
|
||||
unsigned filespecs; /* number of real file specifications to be matched */
|
||||
unsigned xfilespecs; /* number of excluded filespecs to be matched */
|
||||
int process_all_files;
|
||||
int create_dirs; /* used by main(), mapname(), checkdir() */
|
||||
int extract_flag;
|
||||
int newzip; /* reset in extract.c; used in crypt.c */
|
||||
LONGINT real_ecrec_offset;
|
||||
LONGINT expect_ecrec_offset;
|
||||
long csize; /* used by decompr. (NEXTBYTE): must be signed */
|
||||
long ucsize; /* used by unReduce(), explode() */
|
||||
long used_csize; /* used by extract_or_test_member(), explode() */
|
||||
|
||||
#ifdef DLL
|
||||
int fValidate; /* true if only validating an archive */
|
||||
int filenotfound;
|
||||
int redirect_data; /* redirect data to memory buffer */
|
||||
int redirect_text; /* redirect text output to buffer */
|
||||
# ifndef NO_SLIDE_REDIR
|
||||
int redirect_slide; /* redirect decompression area to mem buffer */
|
||||
unsigned _wsize;
|
||||
# endif
|
||||
unsigned redirect_size; /* size of redirected output buffer */
|
||||
uch *redirect_buffer; /* pointer to head of allocated buffer */
|
||||
uch *redirect_pointer; /* pointer past end of written data */
|
||||
# ifndef NO_SLIDE_REDIR
|
||||
uch *redirect_sldptr; /* head of decompression slide buffer */
|
||||
# endif
|
||||
# ifdef OS2DLL
|
||||
cbList(processExternally); /* call-back list */
|
||||
# endif
|
||||
#endif /* DLL */
|
||||
|
||||
char **pfnames;
|
||||
char **pxnames;
|
||||
char sig[4];
|
||||
char answerbuf[10];
|
||||
min_info info[DIR_BLKSIZ];
|
||||
min_info *pInfo;
|
||||
#endif /* !FUNZIP */
|
||||
union work area; /* see unzpriv.h for definition of work */
|
||||
|
||||
#ifndef FUNZIP
|
||||
# if (!defined(USE_ZLIB) || defined(USE_OWN_CRCTAB))
|
||||
ZCONST ulg near *crc_32_tab;
|
||||
# else
|
||||
ZCONST ulg Far *crc_32_tab;
|
||||
# endif
|
||||
#endif
|
||||
ulg crc32val; /* CRC shift reg. (was static in funzip) */
|
||||
|
||||
#ifdef FUNZIP
|
||||
FILE *in; /* file descriptor of compressed stream */
|
||||
#endif
|
||||
uch *inbuf; /* input buffer (any size is OK) */
|
||||
uch *inptr; /* pointer into input buffer */
|
||||
int incnt;
|
||||
|
||||
#ifndef FUNZIP
|
||||
ulg bitbuf;
|
||||
int bits_left; /* unreduce and unshrink only */
|
||||
int zipeof;
|
||||
char *argv0; /* used for NT and EXE_EXTENSION */
|
||||
char *wildzipfn;
|
||||
char *zipfn; /* GRR: WINDLL: must nuke any malloc'd zipfn... */
|
||||
#ifdef USE_STRM_INPUT
|
||||
FILE *zipfd; /* zipfile file descriptor */
|
||||
#else
|
||||
int zipfd; /* zipfile file handle */
|
||||
#endif
|
||||
LONGINT ziplen;
|
||||
LONGINT cur_zipfile_bufstart; /* extract_or_test, readbuf, ReadByte */
|
||||
LONGINT extra_bytes; /* used in unzip.c, misc.c */
|
||||
uch *extra_field; /* Unix, VMS, Mac, OS/2, Acorn, ... */
|
||||
uch *hold;
|
||||
|
||||
local_file_hdr lrec; /* used in unzip.c, extract.c */
|
||||
cdir_file_hdr crec; /* used in unzip.c, extract.c, misc.c */
|
||||
ecdir_rec ecrec; /* used in unzip.c, extract.c */
|
||||
struct stat statbuf; /* used by main, mapname, check_for_newer */
|
||||
|
||||
int mem_mode;
|
||||
uch *outbufptr; /* extract.c static */
|
||||
ulg outsize; /* extract.c static */
|
||||
int reported_backslash; /* extract.c static */
|
||||
int disk_full;
|
||||
int newfile;
|
||||
|
||||
int didCRlast; /* fileio static */
|
||||
ulg numlines; /* fileio static: number of lines printed */
|
||||
int sol; /* fileio static: at start of line */
|
||||
int no_ecrec; /* process static */
|
||||
#ifdef SYMLINKS
|
||||
int symlnk;
|
||||
#endif
|
||||
#ifdef NOVELL_BUG_FAILSAFE
|
||||
int dne; /* true if stat() says file doesn't exist */
|
||||
#endif
|
||||
|
||||
FILE *outfile;
|
||||
uch *outbuf;
|
||||
uch *realbuf;
|
||||
|
||||
#ifndef VMS /* if SMALL_MEM, outbuf2 is initialized in */
|
||||
uch *outbuf2; /* process_zipfiles() (never changes); */
|
||||
#endif /* else malloc'd ONLY if unshrink and -a */
|
||||
#endif /* !FUNZIP */
|
||||
uch *outptr;
|
||||
ulg outcnt; /* number of chars stored in outbuf */
|
||||
#ifndef FUNZIP
|
||||
char filename[FILNAMSIZ]; /* also used by NT for temporary SFX path */
|
||||
|
||||
#ifdef CMS_MVS
|
||||
char *tempfn; /* temp file used; erase on close */
|
||||
#endif
|
||||
|
||||
char *key; /* crypt static: decryption password or NULL */
|
||||
int nopwd; /* crypt static */
|
||||
#endif /* !FUNZIP */
|
||||
ulg keys[3]; /* crypt static: keys defining pseudo-random sequence */
|
||||
|
||||
#if (!defined(DOS_FLX_H68_OS2_W32) && !defined(AMIGA) && !defined(RISCOS))
|
||||
#if (!defined(MACOS) && !defined(ATARI) && !defined(VMS))
|
||||
int echofd; /* ttyio static: file descriptor whose echo is off */
|
||||
#endif /* !(MACOS || ATARI || VMS) */
|
||||
#endif /* !(DOS_FLX_H68_OS2_W32 || AMIGA || RISCOS) */
|
||||
|
||||
unsigned hufts; /* track memory usage */
|
||||
|
||||
#ifdef USE_ZLIB
|
||||
int inflInit; /* inflate static: zlib inflate() initialized */
|
||||
z_stream dstrm; /* inflate global: decompression stream */
|
||||
#else
|
||||
struct huft *fixed_tl; /* inflate static */
|
||||
struct huft *fixed_td; /* inflate static */
|
||||
int fixed_bl, fixed_bd; /* inflate static */
|
||||
unsigned wp; /* inflate static: current position in slide */
|
||||
ulg bb; /* inflate static: bit buffer */
|
||||
unsigned bk; /* inflate static: bits in bit buffer */
|
||||
#endif /* ?USE_ZLIB */
|
||||
|
||||
#ifndef FUNZIP
|
||||
#ifdef SMALL_MEM
|
||||
char rgchBigBuffer[512];
|
||||
char rgchSmallBuffer[96];
|
||||
char rgchSmallBuffer2[160]; /* boosted to 160 for local3[] in unzip.c */
|
||||
#endif
|
||||
|
||||
MsgFn *message;
|
||||
InputFn *input;
|
||||
PauseFn *mpause;
|
||||
PasswdFn *decr_passwd;
|
||||
StatCBFn *statreportcb;
|
||||
#ifdef WINDLL
|
||||
LPUSERFUNCTIONS lpUserFunctions;
|
||||
#endif
|
||||
|
||||
int incnt_leftover; /* so improved NEXTBYTE does not waste input */
|
||||
uch *inptr_leftover;
|
||||
|
||||
#ifdef VMS_TEXT_CONV
|
||||
int VMS_line_state; /* so native VMS variable-length text files are */
|
||||
int VMS_line_length; /* readable on other platforms */
|
||||
int VMS_line_pad;
|
||||
#endif
|
||||
#endif /* !FUNZIP */
|
||||
|
||||
#ifdef SYSTEM_SPECIFIC_GLOBALS
|
||||
SYSTEM_SPECIFIC_GLOBALS
|
||||
#endif
|
||||
|
||||
} Uz_Globs; /* end of struct Globals */
|
||||
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifdef FUNZIP
|
||||
# if (!defined(USE_ZLIB) || defined(USE_OWN_CRCTAB))
|
||||
extern ZCONST ulg near crc_32_tab[256];
|
||||
# else
|
||||
extern ZCONST ulg Far *crc_32_tab;
|
||||
# endif
|
||||
# define CRC_32_TAB crc_32_tab
|
||||
#else
|
||||
# define CRC_32_TAB G.crc_32_tab
|
||||
#endif
|
||||
|
||||
|
||||
Uz_Globs *globalsCtor OF((void));
|
||||
|
||||
/* pseudo constant sigs; they are initialized at runtime so unzip executable
|
||||
* won't look like a zipfile
|
||||
*/
|
||||
extern char local_hdr_sig[4];
|
||||
extern char central_hdr_sig[4];
|
||||
extern char end_central_sig[4];
|
||||
/* extern char extd_local_sig[4]; NOT USED YET */
|
||||
|
||||
#ifdef REENTRANT
|
||||
# define G (*(Uz_Globs *)pG)
|
||||
# define __G pG
|
||||
# define __G__ pG,
|
||||
# define __GPRO Uz_Globs *pG
|
||||
# define __GPRO__ Uz_Globs *pG,
|
||||
# define __GDEF Uz_Globs *pG;
|
||||
# ifdef USETHREADID
|
||||
extern int lastScan;
|
||||
void deregisterGlobalPointer OF((__GPRO));
|
||||
Uz_Globs *getGlobalPointer OF((void));
|
||||
# define GETGLOBALS() Uz_Globs *pG = getGlobalPointer();
|
||||
# define DESTROYGLOBALS() {free_G_buffers(pG); deregisterGlobalPointer(pG);}
|
||||
# else
|
||||
extern Uz_Globs *GG;
|
||||
# define GETGLOBALS() Uz_Globs *pG = GG;
|
||||
# define DESTROYGLOBALS() {free_G_buffers(pG); free(pG);}
|
||||
# endif /* ?USETHREADID */
|
||||
# define CONSTRUCTGLOBALS() Uz_Globs *pG = globalsCtor()
|
||||
#else /* !REENTRANT */
|
||||
extern Uz_Globs G;
|
||||
# define __G
|
||||
# define __G__
|
||||
# define __GPRO void
|
||||
# define __GPRO__
|
||||
# define __GDEF
|
||||
# define GETGLOBALS()
|
||||
# define CONSTRUCTGLOBALS() globalsCtor()
|
||||
# define DESTROYGLOBALS()
|
||||
#endif /* ?REENTRANT */
|
||||
|
||||
#define uO G.UzO
|
||||
|
||||
#endif /* __globals_h */
|
24
utils/Install/inczip/inflate.h
Normal file
24
utils/Install/inczip/inflate.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/* inflate.h for UnZip -- put in the public domain by Mark Adler
|
||||
version c14f, 23 November 1995 */
|
||||
|
||||
|
||||
/* You can do whatever you like with this source file, though I would
|
||||
prefer that if you modify it and redistribute it that you include
|
||||
comments to that effect with your name and the date. Thank you.
|
||||
|
||||
History:
|
||||
vers date who what
|
||||
---- --------- -------------- ------------------------------------
|
||||
c14 12 Mar 93 M. Adler made inflate.c standalone with the
|
||||
introduction of inflate.h.
|
||||
c14d 28 Aug 93 G. Roelofs replaced flush/FlushOutput with new version
|
||||
c14e 29 Sep 93 G. Roelofs moved everything into unzip.h; added crypt.h
|
||||
c14f 23 Nov 95 G. Roelofs added UNZIP_INTERNAL to accommodate newly
|
||||
split unzip.h
|
||||
*/
|
||||
|
||||
#define UNZIP_INTERNAL
|
||||
#include "unzip.h" /* provides slide[], typedefs and macros */
|
||||
#ifdef FUNZIP
|
||||
# include "crypt.h" /* provides NEXTBYTE macro for crypt version of funzip */
|
||||
#endif
|
28
utils/Install/inczip/nt.h
Normal file
28
utils/Install/inczip/nt.h
Normal file
@@ -0,0 +1,28 @@
|
||||
/* nt.h: central header for EF_NTSD "SD" extra field */
|
||||
|
||||
#ifndef _NT_H
|
||||
#define _NT_H
|
||||
|
||||
#define NTSD_BUFFERSIZE (1024) /* threshold to cause malloc() */
|
||||
#define OVERRIDE_BACKUP 1 /* we have SeBackupPrivilege on remote */
|
||||
#define OVERRIDE_RESTORE 2 /* we have SeRestorePrivilege on remote */
|
||||
#define OVERRIDE_SACL 4 /* we have SeSystemSecurityPrivilege on remote */
|
||||
|
||||
typedef struct {
|
||||
BOOL bValid; /* are our contents valid? */
|
||||
BOOL bProcessDefer; /* process deferred entry yet? */
|
||||
BOOL bUsePrivileges; /* use privilege overrides? */
|
||||
DWORD dwFileSystemFlags; /* describes target file system */
|
||||
BOOL bRemote; /* is volume remote? */
|
||||
DWORD dwRemotePrivileges; /* relevant only on remote volumes */
|
||||
DWORD dwFileAttributes;
|
||||
char RootPath[MAX_PATH+1]; /* path to network / filesystem */
|
||||
} VOLUMECAPS, *PVOLUMECAPS, *LPVOLUMECAPS;
|
||||
|
||||
BOOL SecuritySet(char *resource, PVOLUMECAPS VolumeCaps, uch *securitydata);
|
||||
BOOL GetVolumeCaps(char *rootpath, char *name, PVOLUMECAPS VolumeCaps);
|
||||
BOOL ValidateSecurity(uch *securitydata);
|
||||
BOOL ProcessDefer(PDWORD dwDirectoryCount, PDWORD dwBytesProcessed,
|
||||
PDWORD dwDirectoryFail, PDWORD dwBytesFail);
|
||||
|
||||
#endif /* _NT_H */
|
32
utils/Install/inczip/os2acl.h
Normal file
32
utils/Install/inczip/os2acl.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/* os2acl.h
|
||||
*
|
||||
* Author: Kai Uwe Rommel <rommel@ars.de>
|
||||
* Created: Fri Mar 29 1996
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.2 2000/07/15 19:50:44 cvsuser
|
||||
* merged 2.2 branch
|
||||
*
|
||||
* Revision 1.1.2.1 2000/04/11 12:38:05 BS
|
||||
* Added wxInstall a self extracting installation program using wxWindows.
|
||||
*
|
||||
* Revision 1.1 1996/03/30 09:35:00 rommel
|
||||
* Initial revision
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _OS2ACL_H
|
||||
#define _OS2ACL_H
|
||||
|
||||
#define ACL_BUFFERSIZE 4096
|
||||
|
||||
int acl_get(char *server, const char *resource, char *buffer);
|
||||
int acl_set(char *server, const char *resource, char *buffer);
|
||||
|
||||
#endif /* _OS2ACL_H */
|
||||
|
||||
/* end of os2acl.h */
|
136
utils/Install/inczip/os2cfg.h
Normal file
136
utils/Install/inczip/os2cfg.h
Normal file
@@ -0,0 +1,136 @@
|
||||
/*---------------------------------------------------------------------------
|
||||
OS/2 specific configuration section:
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __os2cfg_h
|
||||
#define __os2cfg_h
|
||||
|
||||
#ifdef MSDOS
|
||||
# include <dos.h> /* for REGS macro (TC) or _dos_setftime (MSC) */
|
||||
# ifdef __TURBOC__ /* includes Power C */
|
||||
# include <sys/timeb.h> /* for structure ftime */
|
||||
# ifndef __BORLANDC__ /* there appears to be a bug (?) in Borland's */
|
||||
# include <mem.h> /* MEM.H related to __STDC__ and far poin- */
|
||||
# endif /* ters. (dpk) [mem.h included for memcpy] */
|
||||
# endif
|
||||
#endif /* MSDOS */
|
||||
|
||||
#ifdef __IBMC__
|
||||
# define S_IFMT 0xF000
|
||||
# define timezone _timezone /* (underscore names work with */
|
||||
# define tzset _tzset /* all versions of C Set) */
|
||||
# define PIPE_ERROR (errno == EERRSET || errno == EOS2ERR)
|
||||
#endif /* __IBMC__ */
|
||||
|
||||
#ifdef __WATCOMC__
|
||||
# ifdef __386__
|
||||
# ifndef WATCOMC_386
|
||||
# define WATCOMC_386
|
||||
# endif
|
||||
# define __32BIT__
|
||||
# undef far
|
||||
# define far
|
||||
# undef near
|
||||
# define near
|
||||
|
||||
/* Get asm routines to link properly without using "__cdecl": */
|
||||
# ifndef USE_ZLIB
|
||||
# pragma aux crc32 "_*" parm caller [] value [eax] modify [eax]
|
||||
# pragma aux get_crc_table "_*" parm caller [] value [eax] \
|
||||
modify [eax ecx edx]
|
||||
# endif /* !USE_ZLIB */
|
||||
# else /* !__386__ */
|
||||
# ifndef USE_ZLIB
|
||||
# pragma aux crc32 "_*" parm caller [] value [ax dx] \
|
||||
modify [ax cx dx bx]
|
||||
# pragma aux get_crc_table "_*" parm caller [] value [ax] \
|
||||
modify [ax cx dx bx]
|
||||
# endif /* !USE_ZLIB */
|
||||
# endif /* ?__386__ */
|
||||
|
||||
# ifndef EPIPE
|
||||
# define EPIPE -1
|
||||
# endif
|
||||
# define PIPE_ERROR (errno == EPIPE)
|
||||
#endif /* __WATCOMC__ */
|
||||
|
||||
#ifdef __EMX__
|
||||
# ifndef __32BIT__
|
||||
# define __32BIT__
|
||||
# endif
|
||||
# define far
|
||||
#endif
|
||||
|
||||
#ifndef __32BIT__
|
||||
# define __16BIT__
|
||||
#endif
|
||||
|
||||
#ifdef MSDOS
|
||||
# undef MSDOS
|
||||
#endif
|
||||
|
||||
#if defined(M_I86CM) || defined(M_I86LM)
|
||||
# define MED_MEM
|
||||
#endif
|
||||
#if (defined(__COMPACT__) || defined(__LARGE__) || defined(__HUGE__))
|
||||
# define MED_MEM
|
||||
#endif
|
||||
#ifdef __16BIT__
|
||||
# ifndef MED_MEM
|
||||
# define SMALL_MEM
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __16BIT__
|
||||
# if defined(MSC) || defined(__WATCOMC__)
|
||||
# include <malloc.h>
|
||||
# define nearmalloc _nmalloc
|
||||
# define nearfree _nfree
|
||||
# endif
|
||||
# if defined(__TURBOC__) && defined(DYNALLOC_CRCTAB)
|
||||
# if defined(__COMPACT__) || defined(__LARGE__) || defined(__HUGE__)
|
||||
# undef DYNALLOC_CRCTAB
|
||||
# endif
|
||||
# endif
|
||||
# ifndef nearmalloc
|
||||
# define nearmalloc malloc
|
||||
# define nearfree free
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* TIMESTAMP is now supported on OS/2, so enable it by default */
|
||||
#if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP))
|
||||
# define TIMESTAMP
|
||||
#endif
|
||||
|
||||
/* check that TZ environment variable is defined before using UTC times */
|
||||
#if (!defined(NO_IZ_CHECK_TZ) && !defined(IZ_CHECK_TZ))
|
||||
# define IZ_CHECK_TZ
|
||||
#endif
|
||||
|
||||
#ifndef OS2_EAS
|
||||
# define OS2_EAS /* for -l and -v listings (list.c) */
|
||||
#endif
|
||||
|
||||
#ifdef isupper
|
||||
# undef isupper
|
||||
#endif
|
||||
#ifdef tolower
|
||||
# undef tolower
|
||||
#endif
|
||||
#define isupper(x) IsUpperNLS((unsigned char)(x))
|
||||
#define tolower(x) ToLowerNLS((unsigned char)(x))
|
||||
#define USETHREADID
|
||||
|
||||
/* handlers for OEM <--> ANSI string conversions */
|
||||
#ifndef _OS2_ISO_ANSI
|
||||
/* use home-brewed conversion functions; internal charset is OEM */
|
||||
# ifdef CRTL_CP_IS_ISO
|
||||
# undef CRTL_CP_IS_ISO
|
||||
# endif
|
||||
# ifndef CRTL_CP_IS_OEM
|
||||
# define CRTL_CP_IS_OEM
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* !__os2cfg_h */
|
139
utils/Install/inczip/os2data.h
Normal file
139
utils/Install/inczip/os2data.h
Normal file
@@ -0,0 +1,139 @@
|
||||
/*---------------------------------------------------------------------------
|
||||
|
||||
os2data.h
|
||||
|
||||
OS/2-specific structures and data to be included in the global data struc-
|
||||
ture.
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#define MAXNAMLEN 256
|
||||
#define MAXPATHLEN 256
|
||||
#define MAXLEN 256 /* temporary buffer length */
|
||||
#define IBUF_LEN 4096 /* input buffer length */
|
||||
|
||||
#define INCL_NOPM
|
||||
#define INCL_DOSNLS
|
||||
#define INCL_DOSPROCESS
|
||||
#define INCL_DOSDEVICES
|
||||
#define INCL_DOSDEVIOCTL
|
||||
#define INCL_DOSERRORS
|
||||
#define INCL_DOSMISC
|
||||
|
||||
#if (defined(OS2DLL) && !defined(DLL))
|
||||
# undef OS2DLL
|
||||
#endif
|
||||
|
||||
#ifdef OS2DLL
|
||||
# define INCL_REXXSAA
|
||||
# include <rexxsaa.h>
|
||||
#endif
|
||||
|
||||
#include <os2.h>
|
||||
|
||||
|
||||
struct direct
|
||||
{
|
||||
ino_t d_ino; /* a bit of a farce */
|
||||
int d_reclen; /* more farce */
|
||||
int d_namlen; /* length of d_name */
|
||||
char d_name[MAXNAMLEN + 1]; /* null terminated */
|
||||
/* nonstandard fields */
|
||||
long d_size; /* size in bytes */
|
||||
unsigned d_mode; /* MS-DOS or OS/2 file attributes */
|
||||
unsigned d_time;
|
||||
unsigned d_date;
|
||||
};
|
||||
|
||||
/* The fields d_size and d_mode are extensions by me (Kai Uwe Rommel). The
|
||||
* find_first and find_next calls deliver these data without any extra cost.
|
||||
* If these data are needed, the fields save a lot of extra calls to stat()
|
||||
* (each stat() again performs a find_first call !).
|
||||
*/
|
||||
|
||||
struct _dircontents
|
||||
{
|
||||
char *_d_entry;
|
||||
long _d_size;
|
||||
unsigned _d_mode, _d_time, _d_date;
|
||||
struct _dircontents *_d_next;
|
||||
};
|
||||
|
||||
typedef struct _dirdesc
|
||||
{
|
||||
int dd_id; /* uniquely identify each open directory */
|
||||
long dd_loc; /* where we are in directory entry is this */
|
||||
struct _dircontents *dd_contents; /* pointer to contents of dir */
|
||||
struct _dircontents *dd_cp; /* pointer to current position */
|
||||
}
|
||||
DIR;
|
||||
|
||||
|
||||
struct os2Global {
|
||||
|
||||
#ifndef SFX
|
||||
HDIR hdir;
|
||||
#ifdef __32BIT__
|
||||
ULONG count;
|
||||
FILEFINDBUF3 find;
|
||||
#else
|
||||
USHORT count;
|
||||
FILEFINDBUF find;
|
||||
#endif
|
||||
#endif /* !SFX */
|
||||
|
||||
int created_dir; /* used by mapname(), checkdir() */
|
||||
int renamed_fullpath; /* ditto */
|
||||
int fnlen; /* ditto */
|
||||
#ifdef __32BIT__
|
||||
ULONG nLabelDrive; /* ditto */
|
||||
#else
|
||||
USHORT nLabelDrive;
|
||||
#endif
|
||||
int longnameEA; /* checkdir(), close_outfile() */
|
||||
char *lastpathcomp; /* ditto */
|
||||
|
||||
struct direct dp;
|
||||
int lower;
|
||||
USHORT nLastDrive, nResult;
|
||||
|
||||
DIR *dir;
|
||||
char *dirname, *wildname, matchname[FILNAMSIZ];
|
||||
int firstcall, have_dirname, dirnamelen;
|
||||
|
||||
int rootlen; /* length of rootpath */
|
||||
char *rootpath; /* user's "extract-to" directory */
|
||||
char *buildpathHPFS; /* full path (so far) to extracted file, */
|
||||
char *buildpathFAT; /* both HPFS/EA (main) and FAT versions */
|
||||
char *endHPFS; /* corresponding pointers to end of */
|
||||
char *endFAT; /* buildpath ('\0') */
|
||||
|
||||
#ifdef OS2DLL
|
||||
char buffer[IBUF_LEN];
|
||||
char output_var[MAXLEN];
|
||||
char getvar_buf[MAXLEN];
|
||||
int getvar_len;
|
||||
|
||||
int output_idx;
|
||||
int stem_len;
|
||||
int putchar_idx;
|
||||
int rexx_error;
|
||||
char *rexx_mes;
|
||||
|
||||
SHVBLOCK request;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
#define SYSTEM_SPECIFIC_GLOBALS struct os2Global os2;
|
||||
#define SYSTEM_SPECIFIC_CTOR os2GlobalsCtor
|
||||
|
||||
#ifdef OS2DLL
|
||||
# ifdef API_DOC
|
||||
# define SYSTEM_API_BRIEF REXXBrief
|
||||
# define SYSTEM_API_DETAILS REXXDetails
|
||||
extern char *REXXBrief;
|
||||
extern APIDocStruct REXXDetails[];
|
||||
# endif
|
||||
#endif
|
155
utils/Install/inczip/rsxntwin.h
Normal file
155
utils/Install/inczip/rsxntwin.h
Normal file
@@ -0,0 +1,155 @@
|
||||
/* rsxntwin.h
|
||||
*
|
||||
* fills some gaps in the rsxnt 1.3 win32 header files (<windows.h>) that are
|
||||
* required for compiling Info-ZIP sources for Win NT / Win 95
|
||||
*/
|
||||
|
||||
#ifdef __RSXNT__
|
||||
#if !defined (_RSXNTWIN_H)
|
||||
#define _RSXNTWIN_H
|
||||
|
||||
#ifdef TFUNCT /* TFUNCT is undefined when MSSDK headers are used */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define PASCAL __stdcall
|
||||
|
||||
#define ANYSIZE_ARRAY 1
|
||||
|
||||
#ifndef TIME_ZONE_ID_UNKNOWN
|
||||
# define TIME_ZONE_ID_UNKNOWN 0
|
||||
#endif
|
||||
|
||||
#define FILE_ATTRIBUTE_HIDDEN 0x00000002
|
||||
#define FILE_ATTRIBUTE_SYSTEM 0x00000004
|
||||
|
||||
#define FILE_SHARE_DELETE 0x00000004
|
||||
|
||||
#define FILE_PERSISTENT_ACLS 0x00000008
|
||||
|
||||
#define HFILE_ERROR ((HFILE)-1)
|
||||
|
||||
#define FS_PERSISTENT_ACLS FILE_PERSISTENT_ACLS
|
||||
|
||||
|
||||
BOOL WINAPI DosDateTimeToFileTime(WORD, WORD, LPFILETIME);
|
||||
|
||||
|
||||
#ifndef SetVolumeLabel
|
||||
#define SetVolumeLabel TFUNCT(SetVolumeLabel)
|
||||
#endif
|
||||
BOOL WINAPI SetVolumeLabel(LPCTSTR, LPCTSTR);
|
||||
|
||||
|
||||
#ifndef GetDriveType
|
||||
#define GetDriveType TFUNCT(GetDriveType)
|
||||
#endif
|
||||
DWORD GetDriveType(LPCTSTR);
|
||||
|
||||
#define DRIVE_UNKNOWN 0
|
||||
#define DRIVE_REMOVABLE 2
|
||||
#define DRIVE_FIXED 3
|
||||
#define DRIVE_REMOTE 4
|
||||
#define DRIVE_CDROM 5
|
||||
#define DRIVE_RAMDISK 6
|
||||
|
||||
#ifndef SearchPath
|
||||
#define SearchPath TFUNCT(SearchPath)
|
||||
#endif
|
||||
BOOL WINAPI SearchPath(LPCTSTR, LPCTSTR, LPCTSTR, UINT, LPTSTR, LPTSTR *);
|
||||
|
||||
#define ERROR_SUCCESS 0
|
||||
#define ERROR_INSUFFICIENT_BUFFER 122
|
||||
|
||||
LONG WINAPI InterlockedExchange(LPLONG, LONG);
|
||||
|
||||
#define ACCESS_SYSTEM_SECURITY 0x01000000L
|
||||
|
||||
typedef PVOID PSECURITY_DESCRIPTOR;
|
||||
typedef PVOID PSID;
|
||||
typedef struct _ACL {
|
||||
BYTE AclRevision;
|
||||
BYTE Sbz1;
|
||||
WORD AclSize;
|
||||
WORD AceCount;
|
||||
WORD Sbz2;
|
||||
} ACL;
|
||||
typedef ACL *PACL;
|
||||
|
||||
typedef struct _LUID {
|
||||
DWORD LowPart;
|
||||
LONG HighPart;
|
||||
} LUID, *PLUID;
|
||||
|
||||
typedef struct _LUID_AND_ATTRIBUTES {
|
||||
LUID Luid;
|
||||
DWORD Attributes;
|
||||
} LUID_AND_ATTRIBUTES, * PLUID_AND_ATTRIBUTES;
|
||||
|
||||
typedef struct _TOKEN_PRIVILEGES {
|
||||
DWORD PrivilegeCount;
|
||||
LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY];
|
||||
} TOKEN_PRIVILEGES, *PTOKEN_PRIVILEGES;
|
||||
|
||||
#define TOKEN_QUERY 0x0008
|
||||
#define TOKEN_ADJUST_PRIVILEGES 0x0020
|
||||
|
||||
BOOL WINAPI OpenProcessToken(HANDLE, DWORD, PHANDLE);
|
||||
BOOL WINAPI AdjustTokenPrivileges(HANDLE, BOOL, PTOKEN_PRIVILEGES, DWORD,
|
||||
PTOKEN_PRIVILEGES, PDWORD);
|
||||
|
||||
#ifndef LookupPrivilegeValue
|
||||
#define LookupPrivilegeValue TFUNCT(LookupPrivilegeValue)
|
||||
#endif
|
||||
BOOL WINAPI LookupPrivilegeValue(LPCTSTR, LPCTSTR, PLUID);
|
||||
|
||||
typedef DWORD SECURITY_INFORMATION, *PSECURITY_INFORMATION;
|
||||
#define OWNER_SECURITY_INFORMATION 0x00000001L
|
||||
#define GROUP_SECURITY_INFORMATION 0x00000002L
|
||||
#define DACL_SECURITY_INFORMATION 0x00000004L
|
||||
#define SACL_SECURITY_INFORMATION 0x00000008L
|
||||
|
||||
typedef WORD SECURITY_DESCRIPTOR_CONTROL, *PSECURITY_DESCRIPTOR_CONTROL;
|
||||
#define SE_DACL_PRESENT 0x0004
|
||||
#define SE_SACL_PRESENT 0x0010
|
||||
|
||||
#define SE_PRIVILEGE_ENABLED 0x00000002L
|
||||
|
||||
#define SE_SECURITY_NAME TEXT("SeSecurityPrivilege")
|
||||
#define SE_BACKUP_NAME TEXT("SeBackupPrivilege")
|
||||
#define SE_RESTORE_NAME TEXT("SeRestorePrivilege")
|
||||
|
||||
BOOL WINAPI GetKernelObjectSecurity(HANDLE, SECURITY_INFORMATION,
|
||||
PSECURITY_DESCRIPTOR, DWORD, LPDWORD);
|
||||
BOOL WINAPI SetKernelObjectSecurity(HANDLE, SECURITY_INFORMATION,
|
||||
PSECURITY_DESCRIPTOR);
|
||||
BOOL WINAPI IsValidSid(PSID);
|
||||
BOOL WINAPI IsValidAcl(PACL);
|
||||
BOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR);
|
||||
BOOL WINAPI IsValidSecurityDescriptor(PSECURITY_DESCRIPTOR);
|
||||
DWORD WINAPI GetSecurityDescriptorLength(PSECURITY_DESCRIPTOR);
|
||||
BOOL WINAPI GetSecurityDescriptorControl(PSECURITY_DESCRIPTOR,
|
||||
PSECURITY_DESCRIPTOR_CONTROL, LPDWORD);
|
||||
BOOL WINAPI SetSecurityDescriptorControl(PSECURITY_DESCRIPTOR,
|
||||
SECURITY_DESCRIPTOR_CONTROL, SECURITY_DESCRIPTOR_CONTROL);
|
||||
BOOL WINAPI GetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR,
|
||||
LPBOOL, PACL *, LPBOOL);
|
||||
BOOL WINAPI SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR, BOOL, PACL, BOOL);
|
||||
BOOL WINAPI GetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR,
|
||||
LPBOOL, PACL *, LPBOOL);
|
||||
BOOL WINAPI SetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR, BOOL, PACL, BOOL);
|
||||
BOOL WINAPI GetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR, PSID *, LPBOOL);
|
||||
BOOL WINAPI SetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR, PSID, BOOL);
|
||||
BOOL WINAPI GetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR, PSID *, LPBOOL);
|
||||
BOOL WINAPI SetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR, PSID, BOOL);
|
||||
VOID WINAPI InitializeCriticalSection();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* TFUNCT */
|
||||
#endif /* !defined (_RSXNTWIN_H) */
|
||||
#endif /* __RSXNT__ */
|
81
utils/Install/inczip/tables.h
Normal file
81
utils/Install/inczip/tables.h
Normal file
@@ -0,0 +1,81 @@
|
||||
/*---------------------------------------------------------------------------
|
||||
|
||||
tables.h
|
||||
|
||||
This file contains only the 32-bit CRC table used in fUnZip;
|
||||
it is in a separate file because it is rather big and ugly and
|
||||
gets in the way during editing.
|
||||
This file can be included in no more than ONE source file per
|
||||
executable, of course.
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __tables_h /* prevent multiple inclusions */
|
||||
#define __tables_h
|
||||
|
||||
#ifdef FUNZIP
|
||||
#if (!defined(USE_ZLIB) || defined(USE_OWN_CRCTAB))
|
||||
|
||||
/* Table of CRC-32's of all single-byte values (made by makecrc.c) */
|
||||
ZCONST ulg near crc_32_tab[256] = {
|
||||
0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L,
|
||||
0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L,
|
||||
0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L,
|
||||
0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL,
|
||||
0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L,
|
||||
0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L,
|
||||
0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L,
|
||||
0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL,
|
||||
0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L,
|
||||
0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL,
|
||||
0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L,
|
||||
0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L,
|
||||
0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L,
|
||||
0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL,
|
||||
0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL,
|
||||
0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L,
|
||||
0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL,
|
||||
0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L,
|
||||
0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L,
|
||||
0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L,
|
||||
0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL,
|
||||
0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L,
|
||||
0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L,
|
||||
0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL,
|
||||
0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L,
|
||||
0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L,
|
||||
0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L,
|
||||
0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L,
|
||||
0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L,
|
||||
0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL,
|
||||
0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL,
|
||||
0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L,
|
||||
0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L,
|
||||
0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL,
|
||||
0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL,
|
||||
0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L,
|
||||
0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL,
|
||||
0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L,
|
||||
0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL,
|
||||
0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L,
|
||||
0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL,
|
||||
0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L,
|
||||
0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L,
|
||||
0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL,
|
||||
0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L,
|
||||
0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L,
|
||||
0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L,
|
||||
0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L,
|
||||
0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L,
|
||||
0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L,
|
||||
0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL,
|
||||
0x2d02ef8dL
|
||||
};
|
||||
|
||||
#else /* USE_ZLIB && !USE_OWN_CRCTAB */
|
||||
|
||||
ZCONST uLongf *crc_32_tab = NULL;
|
||||
|
||||
#endif /* ?(!USE_ZLIB || USE_OWN_CRCTAB) */
|
||||
#endif /* FUNZIP */
|
||||
#endif /* __tables_h */
|
186
utils/Install/inczip/ttyio.h
Normal file
186
utils/Install/inczip/ttyio.h
Normal file
@@ -0,0 +1,186 @@
|
||||
/*
|
||||
ttyio.h
|
||||
*/
|
||||
|
||||
#ifndef __ttyio_h /* don't include more than once */
|
||||
#define __ttyio_h
|
||||
|
||||
#ifndef __crypt_h
|
||||
# include "crypt.h" /* ensure that encryption header file has been seen */
|
||||
#endif
|
||||
|
||||
#if (CRYPT || (defined(UNZIP) && !defined(FUNZIP)))
|
||||
/*
|
||||
* Non-echo keyboard/console input support is needed and enabled.
|
||||
*/
|
||||
|
||||
#ifndef __G /* UnZip only, for now (DLL stuff) */
|
||||
# define __G
|
||||
# define __G__
|
||||
# define __GDEF
|
||||
# define __GPRO void
|
||||
# define __GPRO__
|
||||
#endif
|
||||
|
||||
#ifndef ZCONST /* UnZip only (until have configure script like Zip) */
|
||||
# define ZCONST const
|
||||
#endif
|
||||
|
||||
#if (defined(MSDOS) || defined(OS2) || defined(WIN32))
|
||||
# ifndef DOS_OS2_W32
|
||||
# define DOS_OS2_W32
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if (defined(DOS_OS2_W32) || defined(__human68k__))
|
||||
# ifndef DOS_H68_OS2_W32
|
||||
# define DOS_H68_OS2_W32
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if (defined(DOS_OS2_W32) || defined(FLEXOS))
|
||||
# ifndef DOS_FLX_OS2_W32
|
||||
# define DOS_FLX_OS2_W32
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if (defined(DOS_H68_OS2_W32) || defined(FLEXOS))
|
||||
# ifndef DOS_FLX_H68_OS2_W32
|
||||
# define DOS_FLX_H68_OS2_W32
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if (defined(VM_CMS) || defined(MVS))
|
||||
# ifndef CMS_MVS
|
||||
# define CMS_MVS
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
/* The following systems supply a `non-echo' character input function "getch()"
|
||||
* (or an alias) and do not need the echoff() / echon() function pair.
|
||||
*/
|
||||
#ifdef AMIGA
|
||||
# define echoff(f)
|
||||
# define echon()
|
||||
# define getch() Agetch()
|
||||
# define HAVE_WORKING_GETCH
|
||||
#endif /* AMIGA */
|
||||
|
||||
#ifdef ATARI
|
||||
# define echoff(f)
|
||||
# define echon()
|
||||
# include <osbind.h>
|
||||
# define getch() (Cnecin() & 0x000000ff)
|
||||
# define HAVE_WORKING_GETCH
|
||||
#endif
|
||||
|
||||
#ifdef MACOS
|
||||
# define echoff(f)
|
||||
# define echon()
|
||||
# define getch() macgetch()
|
||||
# define HAVE_WORKING_GETCH
|
||||
#endif
|
||||
|
||||
#ifdef QDOS
|
||||
# define echoff(f)
|
||||
# define echon()
|
||||
# define HAVE_WORKING_GETCH
|
||||
#endif
|
||||
|
||||
#ifdef RISCOS
|
||||
# define echoff(f)
|
||||
# define echon()
|
||||
# define getch() SWI_OS_ReadC()
|
||||
# define HAVE_WORKING_GETCH
|
||||
#endif
|
||||
|
||||
#ifdef DOS_H68_OS2_W32
|
||||
# define echoff(f)
|
||||
# define echon()
|
||||
# ifdef WIN32
|
||||
# ifndef getch
|
||||
# define getch() getch_win32()
|
||||
# endif
|
||||
# else /* !WIN32 */
|
||||
# ifdef __EMX__
|
||||
# ifndef getch
|
||||
# define getch() _read_kbd(0, 1, 0)
|
||||
# endif
|
||||
# else /* !__EMX__ */
|
||||
# ifdef __GO32__
|
||||
# include <pc.h>
|
||||
# define getch() getkey()
|
||||
# else /* !__GO32__ */
|
||||
# include <conio.h>
|
||||
# endif /* ?__GO32__ */
|
||||
# endif /* ?__EMX__ */
|
||||
# endif /* ?WIN32 */
|
||||
# define HAVE_WORKING_GETCH
|
||||
#endif /* DOS_H68_OS2_W32 */
|
||||
|
||||
#ifdef FLEXOS
|
||||
# define echoff(f)
|
||||
# define echon()
|
||||
# define getch() getchar() /* not correct, but may not be on a console */
|
||||
# define HAVE_WORKING_GETCH
|
||||
#endif
|
||||
|
||||
/* For VM/CMS and MVS, we do not (yet) have any support to switch terminal
|
||||
* input echo on and off. The following "fake" definitions allow inclusion
|
||||
* of crypt support and UnZip's "pause prompting" features, but without
|
||||
* any echo suppression.
|
||||
*/
|
||||
#ifdef CMS_MVS
|
||||
# define echoff(f)
|
||||
# define echon()
|
||||
#endif
|
||||
|
||||
/* VMS has a single echo() function in ttyio.c to toggle terminal
|
||||
* input echo on and off.
|
||||
*/
|
||||
#ifdef VMS
|
||||
# define echoff(f) echo(0)
|
||||
# define echon() echo(1)
|
||||
int echo OF((int));
|
||||
#endif
|
||||
|
||||
/* For all other systems, ttyio.c supplies the two functions Echoff() and
|
||||
* Echon() for suppressing and (re)enabling console input echo.
|
||||
*/
|
||||
#ifndef echoff
|
||||
# define echoff(f) Echoff(__G__ f)
|
||||
# define echon() Echon(__G)
|
||||
void Echoff OF((__GPRO__ int f));
|
||||
void Echon OF((__GPRO));
|
||||
#endif
|
||||
|
||||
/* this stuff is used by MORE and also now by the ctrl-S code; fileio.c only */
|
||||
#if (defined(UNZIP) && !defined(FUNZIP))
|
||||
# ifdef HAVE_WORKING_GETCH
|
||||
# define FGETCH(f) getch()
|
||||
# endif
|
||||
# ifndef FGETCH
|
||||
/* default for all systems where no getch()-like function is available */
|
||||
int zgetch OF((__GPRO__ int f));
|
||||
# define FGETCH(f) zgetch(__G__ f)
|
||||
# endif
|
||||
#endif /* UNZIP && !FUNZIP */
|
||||
|
||||
#if (CRYPT && !defined(WINDLL))
|
||||
char *getp OF((__GPRO__ ZCONST char *m, char *p, int n));
|
||||
#endif
|
||||
|
||||
#else /* !(CRYPT || (UNZIP && !FUNZIP)) */
|
||||
|
||||
/*
|
||||
* No need for non-echo keyboard/console input; provide dummy definitions.
|
||||
*/
|
||||
#define echoff(f)
|
||||
#define echon()
|
||||
|
||||
#endif /* ?(CRYPT || (UNZIP && !FUNZIP)) */
|
||||
|
||||
#endif /* !__ttyio_h */
|
548
utils/Install/inczip/unzip.h
Normal file
548
utils/Install/inczip/unzip.h
Normal file
@@ -0,0 +1,548 @@
|
||||
/*---------------------------------------------------------------------------
|
||||
|
||||
unzip.h (new)
|
||||
|
||||
This header file contains the public macros and typedefs required by
|
||||
both the UnZip sources and by any application using the UnZip API. If
|
||||
UNZIP_INTERNAL is defined, it includes unzpriv.h (containing includes,
|
||||
prototypes and extern variables used by the actual UnZip sources).
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#ifndef __unzip_h /* prevent multiple inclusions */
|
||||
#define __unzip_h
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
Predefined, machine-specific macros.
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef __GO32__ /* MS-DOS extender: NOT Unix */
|
||||
# ifdef unix
|
||||
# undef unix
|
||||
# endif
|
||||
# ifdef __unix
|
||||
# undef __unix
|
||||
# endif
|
||||
# ifdef __unix__
|
||||
# undef __unix__
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if ((defined(__convex__) || defined(__convexc__)) && !defined(CONVEX))
|
||||
# define CONVEX
|
||||
#endif
|
||||
|
||||
#if (defined(unix) || defined(__unix) || defined(__unix__))
|
||||
# ifndef UNIX
|
||||
# define UNIX
|
||||
# endif
|
||||
#endif /* unix || __unix || __unix__ */
|
||||
#if (defined(M_XENIX) || defined(COHERENT) || defined(__hpux))
|
||||
# ifndef UNIX
|
||||
# define UNIX
|
||||
# endif
|
||||
#endif /* M_XENIX || COHERENT || __hpux */
|
||||
#if (defined(CONVEX) || defined(MINIX) || defined(_AIX) || defined(__QNX__))
|
||||
# ifndef UNIX
|
||||
# define UNIX
|
||||
# endif
|
||||
#endif /* CONVEX || MINIX || _AIX || __QNX__ */
|
||||
|
||||
#if (defined(VM_CMS) || defined(MVS))
|
||||
# define CMS_MVS
|
||||
#endif
|
||||
|
||||
#if (defined(__OS2__) && !defined(OS2))
|
||||
# define OS2
|
||||
#endif
|
||||
|
||||
#if (defined(__TANDEM) && !defined(TANDEM))
|
||||
# define TANDEM
|
||||
#endif
|
||||
|
||||
#if (defined(__VMS) && !defined(VMS))
|
||||
# define VMS
|
||||
#endif
|
||||
|
||||
#if ((defined(__WIN32__) || defined(_WIN32)) && !defined(WIN32))
|
||||
# define WIN32
|
||||
#endif
|
||||
#if ((defined(__WINNT__) || defined(__WINNT)) && !defined(WIN32))
|
||||
# define WIN32
|
||||
#endif
|
||||
|
||||
#ifdef __COMPILER_KCC__
|
||||
# include <c-env.h>
|
||||
# ifdef SYS_T20
|
||||
# define TOPS20
|
||||
# endif
|
||||
#endif /* __COMPILER_KCC__ */
|
||||
|
||||
/* Borland C does not define __TURBOC__ if compiling for a 32-bit platform */
|
||||
#ifdef __BORLANDC__
|
||||
# ifndef __TURBOC__
|
||||
# define __TURBOC__
|
||||
# endif
|
||||
# if (!defined(__MSDOS__) && !defined(OS2) && !defined(WIN32))
|
||||
# define __MSDOS__
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* define MSDOS for Turbo C (unless OS/2) and Power C as well as Microsoft C */
|
||||
#ifdef __POWERC
|
||||
# define __TURBOC__
|
||||
# define MSDOS
|
||||
#endif /* __POWERC */
|
||||
|
||||
#if (defined(__MSDOS__) && !defined(MSDOS)) /* just to make sure */
|
||||
# define MSDOS
|
||||
#endif
|
||||
|
||||
/* RSXNTDJ (at least up to v1.3) compiles for WIN32 (RSXNT) using a derivate
|
||||
of the EMX environment, but defines MSDOS and __GO32__. ARG !!! */
|
||||
#if (defined(MSDOS) && defined(WIN32))
|
||||
# undef MSDOS /* WIN32 is >>>not<<< MSDOS */
|
||||
#endif
|
||||
#if (defined(__GO32__) && defined(__EMX__) && defined(__RSXNT__))
|
||||
# undef __GO32__
|
||||
#endif
|
||||
|
||||
#if (defined(linux) && !defined(LINUX))
|
||||
# define LINUX
|
||||
#endif
|
||||
|
||||
#ifdef __riscos
|
||||
# define RISCOS
|
||||
#endif
|
||||
|
||||
#if (defined(THINK_C) || defined(MPW))
|
||||
# define MACOS
|
||||
#endif
|
||||
#if (defined(__MWERKS__) && defined(macintosh))
|
||||
# define MACOS
|
||||
#endif
|
||||
|
||||
/* use prototypes and ANSI libraries if __STDC__, or Microsoft or Borland C, or
|
||||
* Silicon Graphics, or Convex?, or IBM C Set/2, or GNU gcc/emx, or Watcom C,
|
||||
* or Macintosh, or Windows NT, or Sequent, or Atari or IBM RS/6000.
|
||||
*/
|
||||
#if (defined(__STDC__) || defined(MSDOS) || defined(WIN32) || defined(__EMX__))
|
||||
# ifndef PROTO
|
||||
# define PROTO
|
||||
# endif
|
||||
# ifndef MODERN
|
||||
# define MODERN
|
||||
# endif
|
||||
#endif
|
||||
#if (defined(__IBMC__) || defined(__BORLANDC__) || defined(__WATCOMC__))
|
||||
# ifndef PROTO
|
||||
# define PROTO
|
||||
# endif
|
||||
# ifndef MODERN
|
||||
# define MODERN
|
||||
# endif
|
||||
#endif
|
||||
#if (defined(MACOS) || defined(ATARI_ST) || defined(RISCOS))
|
||||
# ifndef PROTO
|
||||
# define PROTO
|
||||
# endif
|
||||
# ifndef MODERN
|
||||
# define MODERN
|
||||
# endif
|
||||
#endif
|
||||
/* Sequent running Dynix/ptx: non-modern compiler */
|
||||
#if (defined(_AIX) || defined(sgi) || (defined(_SEQUENT_) && !defined(PTX)))
|
||||
# ifndef PROTO
|
||||
# define PROTO
|
||||
# endif
|
||||
# ifndef MODERN
|
||||
# define MODERN
|
||||
# endif
|
||||
#endif
|
||||
#if (defined(CMS_MVS) || defined(__BEOS__)) /* || defined(CONVEX) */
|
||||
# ifndef PROTO
|
||||
# define PROTO
|
||||
# endif
|
||||
# ifndef MODERN
|
||||
# define MODERN
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* turn off prototypes if requested */
|
||||
#if (defined(NOPROTO) && defined(PROTO))
|
||||
# undef PROTO
|
||||
#endif
|
||||
|
||||
/* used to remove arguments in function prototypes for non-ANSI C */
|
||||
#ifdef PROTO
|
||||
# define OF(a) a
|
||||
#else
|
||||
# define OF(a) ()
|
||||
#endif
|
||||
|
||||
/* enable the "const" keyword only if MODERN and if not otherwise instructed */
|
||||
#ifdef MODERN
|
||||
# if (!defined(ZCONST) && (defined(USE_CONST) || !defined(NO_CONST)))
|
||||
# define ZCONST const
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef ZCONST
|
||||
# define ZCONST
|
||||
#endif
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
Grab system-specific public include headers.
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef POCKET_UNZIP /* WinCE port */
|
||||
# include "wince/punzip.h" /* must appear before windows.h */
|
||||
#endif
|
||||
|
||||
#ifdef WINDLL
|
||||
# include <windows.h>
|
||||
# include "windll/structs.h"
|
||||
#endif
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
Grab system-dependent definition of EXPENTRY for prototypes below.
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
#if 0
|
||||
#if (defined(OS2) && !defined(FUNZIP))
|
||||
# ifdef UNZIP_INTERNAL
|
||||
# define INCL_NOPM
|
||||
# define INCL_DOSNLS
|
||||
# define INCL_DOSPROCESS
|
||||
# define INCL_DOSDEVICES
|
||||
# define INCL_DOSDEVIOCTL
|
||||
# define INCL_DOSERRORS
|
||||
# define INCL_DOSMISC
|
||||
# ifdef OS2DLL
|
||||
# define INCL_REXXSAA
|
||||
# include <rexxsaa.h>
|
||||
# endif
|
||||
# endif /* UNZIP_INTERNAL */
|
||||
# include <os2.h>
|
||||
# define UZ_EXP EXPENTRY
|
||||
#endif /* OS2 && !FUNZIP */
|
||||
#endif /* 0 */
|
||||
|
||||
#if (defined(OS2) && !defined(FUNZIP))
|
||||
# if (defined(__IBMC__) || defined(__WATCOMC__))
|
||||
# define UZ_EXP _System /* compiler keyword */
|
||||
# else
|
||||
# define UZ_EXP
|
||||
# endif
|
||||
#endif /* OS2 && !FUNZIP */
|
||||
|
||||
#if (defined(WINDLL) || defined(USE_UNZIP_LIB))
|
||||
# ifndef EXPENTRY
|
||||
# define UZ_EXP WINAPI
|
||||
# else
|
||||
# define UZ_EXP EXPENTRY
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef UZ_EXP
|
||||
# define UZ_EXP
|
||||
#endif
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
Public typedefs.
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _IZ_TYPES_DEFINED
|
||||
#ifdef MODERN
|
||||
typedef void zvoid;
|
||||
#else /* !MODERN */
|
||||
# ifndef AOS_VS /* mostly modern? */
|
||||
# ifndef VAXC /* not fully modern, but has knows 'void' */
|
||||
# define void int
|
||||
# endif /* !VAXC */
|
||||
# endif /* !AOS_VS */
|
||||
typedef char zvoid;
|
||||
#endif /* ?MODERN */
|
||||
typedef unsigned char uch; /* code assumes unsigned bytes; these type- */
|
||||
typedef unsigned short ush; /* defs replace byte/UWORD/ULONG (which are */
|
||||
typedef unsigned long ulg; /* predefined on some systems) & match zip */
|
||||
#define _IZ_TYPES_DEFINED
|
||||
#endif /* !_IZ_TYPES_DEFINED */
|
||||
|
||||
/* InputFn is not yet used and is likely to change: */
|
||||
#ifdef PROTO
|
||||
typedef int (UZ_EXP MsgFn) (zvoid *pG, uch *buf, ulg size, int flag);
|
||||
typedef int (UZ_EXP InputFn) (zvoid *pG, uch *buf, int *size, int flag);
|
||||
typedef void (UZ_EXP PauseFn) (zvoid *pG, ZCONST char *prompt, int flag);
|
||||
typedef int (UZ_EXP PasswdFn) (zvoid *pG, int *rcnt, char *pwbuf,
|
||||
int size, ZCONST char *zfn,
|
||||
ZCONST char *efn);
|
||||
typedef int (UZ_EXP StatCBFn) (zvoid *pG, int fnflag, ZCONST char *zfn,
|
||||
ZCONST char *efn, ZCONST zvoid *details);
|
||||
typedef void (UZ_EXP UsrIniFn) (void);
|
||||
#else /* !PROTO */
|
||||
typedef int (UZ_EXP MsgFn) ();
|
||||
typedef int (UZ_EXP InputFn) ();
|
||||
typedef void (UZ_EXP PauseFn) ();
|
||||
typedef int (UZ_EXP PasswdFn) ();
|
||||
typedef int (UZ_EXP StatCBFn) ();
|
||||
typedef void (UZ_EXP UsrIniFn) ();
|
||||
#endif /* ?PROTO */
|
||||
|
||||
typedef struct _UzpBuffer { /* rxstr */
|
||||
ulg strlength; /* length of string */
|
||||
char *strptr; /* pointer to string */
|
||||
} UzpBuffer;
|
||||
|
||||
typedef struct _UzpInit {
|
||||
ulg structlen; /* length of the struct being passed */
|
||||
|
||||
/* GRR: can we assume that each of these is a 32-bit pointer? if not,
|
||||
* does it matter? add "far" keyword to make sure? */
|
||||
MsgFn *msgfn;
|
||||
InputFn *inputfn;
|
||||
PauseFn *pausefn;
|
||||
UsrIniFn *userfn; /* user init function to be called after */
|
||||
/* globals constructed and initialized */
|
||||
|
||||
/* pointer to program's environment area or something? */
|
||||
/* hooks for performance testing? */
|
||||
/* hooks for extra unzip -v output? (detect CPU or other hardware?) */
|
||||
/* anything else? let me (Greg) know... */
|
||||
} UzpInit;
|
||||
|
||||
typedef struct _UzpCB {
|
||||
ulg structlen; /* length of the struct being passed */
|
||||
/* GRR: can we assume that each of these is a 32-bit pointer? if not,
|
||||
* does it matter? add "far" keyword to make sure? */
|
||||
MsgFn *msgfn;
|
||||
InputFn *inputfn;
|
||||
PauseFn *pausefn;
|
||||
PasswdFn *passwdfn;
|
||||
StatCBFn *statrepfn;
|
||||
} UzpCB;
|
||||
|
||||
/* the collection of general UnZip option flags and option arguments */
|
||||
typedef struct _UzpOpts {
|
||||
#ifndef FUNZIP
|
||||
char *exdir; /* pointer to extraction root directory (-d option) */
|
||||
char *pwdarg; /* pointer to command-line password (-P option) */
|
||||
int zipinfo_mode; /* behave like ZipInfo or like normal UnZip? */
|
||||
int aflag; /* -a: do ASCII-EBCDIC and/or end-of-line translation */
|
||||
#ifdef VMS
|
||||
int bflag; /* -b: force fixed record format for binary files */
|
||||
#endif
|
||||
#ifdef UNIXBACKUP
|
||||
int B_flag; /* -B: back up existing files by renaming to *~ first */
|
||||
#endif
|
||||
int cflag; /* -c: output to stdout */
|
||||
int C_flag; /* -C: match filenames case-insensitively */
|
||||
#ifdef MACOS
|
||||
int E_flag; /* -E: [MacOS] show Mac extra field during restoring */
|
||||
#endif
|
||||
int fflag; /* -f: "freshen" (extract only newer files) */
|
||||
#if (defined(RISCOS) || defined(ACORN_FTYPE_NFS))
|
||||
int acorn_nfs_ext; /* -F: RISC OS types & NFS filetype extensions */
|
||||
#endif
|
||||
int hflag; /* -h: header line (zipinfo) */
|
||||
#ifdef MACOS
|
||||
int i_flag; /* -i: [MacOS] ignore filenames stored in Mac e.f. */
|
||||
#endif
|
||||
#ifdef RISCOS
|
||||
int scanimage; /* -I: scan image files */
|
||||
#endif
|
||||
int jflag; /* -j: junk pathnames (unzip) */
|
||||
#if (defined(__BEOS__) || defined(MACOS))
|
||||
int J_flag; /* -J: ignore BeOS/MacOS extra field info (unzip) */
|
||||
#endif
|
||||
int lflag; /* -12slmv: listing format (zipinfo) */
|
||||
int L_flag; /* -L: convert filenames from some OSes to lowercase */
|
||||
int overwrite_none; /* -n: never overwrite files (no prompting) */
|
||||
#ifdef AMIGA
|
||||
int N_flag; /* -N: restore comments as AmigaDOS filenotes */
|
||||
#endif
|
||||
int overwrite_all; /* -o: OK to overwrite files without prompting */
|
||||
#endif /* !FUNZIP */
|
||||
int qflag; /* -q: produce a lot less output */
|
||||
#ifndef FUNZIP
|
||||
#if (defined(MSDOS) || defined(FLEXOS) || defined(OS2) || defined(WIN32))
|
||||
int sflag; /* -s: convert spaces in filenames to underscores */
|
||||
#endif
|
||||
#if (defined(MSDOS) || defined(OS2) || defined(WIN32))
|
||||
int volflag; /* -$: extract volume labels */
|
||||
#endif
|
||||
int tflag; /* -t: test (unzip) or totals line (zipinfo) */
|
||||
int T_flag; /* -T: timestamps (unzip) or dec. time fmt (zipinfo) */
|
||||
int uflag; /* -u: "update" (extract only newer/brand-new files) */
|
||||
int vflag; /* -v: (verbosely) list directory */
|
||||
int V_flag; /* -V: don't strip VMS version numbers */
|
||||
#if (defined(TANDEM) || defined(UNIX) || defined(VMS) || defined(__BEOS__))
|
||||
int X_flag; /* -X: restore owner/protection or UID/GID or ACLs */
|
||||
#endif
|
||||
#if (defined(OS2) || defined(WIN32))
|
||||
int X_flag; /* -X: restore owner/protection or UID/GID or ACLs */
|
||||
#endif
|
||||
int zflag; /* -z: display the zipfile comment (only, for unzip) */
|
||||
#endif /* !FUNZIP */
|
||||
} UzpOpts;
|
||||
|
||||
/* intended to be a private struct: */
|
||||
typedef struct _ver {
|
||||
uch major; /* e.g., integer 5 */
|
||||
uch minor; /* e.g., 2 */
|
||||
uch patchlevel; /* e.g., 0 */
|
||||
uch not_used;
|
||||
} _version_type;
|
||||
|
||||
typedef struct _UzpVer {
|
||||
ulg structlen; /* length of the struct being passed */
|
||||
ulg flag; /* bit 0: is_beta bit 1: uses_zlib */
|
||||
char *betalevel; /* e.g., "g BETA" or "" */
|
||||
char *date; /* e.g., "4 Sep 95" (beta) or "4 September 1995" */
|
||||
char *zlib_version; /* e.g., "0.95" or NULL */
|
||||
_version_type unzip;
|
||||
_version_type zipinfo;
|
||||
_version_type os2dll;
|
||||
_version_type windll;
|
||||
} UzpVer;
|
||||
|
||||
/* for Visual BASIC access to Windows DLLs: */
|
||||
typedef struct _UzpVer2 {
|
||||
ulg structlen; /* length of the struct being passed */
|
||||
ulg flag; /* bit 0: is_beta bit 1: uses_zlib */
|
||||
char betalevel[10]; /* e.g., "g BETA" or "" */
|
||||
char date[20]; /* e.g., "4 Sep 95" (beta) or "4 September 1995" */
|
||||
char zlib_version[10]; /* e.g., "0.95" or NULL */
|
||||
_version_type unzip;
|
||||
_version_type zipinfo;
|
||||
_version_type os2dll;
|
||||
_version_type windll;
|
||||
} UzpVer2;
|
||||
|
||||
typedef struct central_directory_file_header { /* CENTRAL */
|
||||
uch version_made_by[2];
|
||||
uch version_needed_to_extract[2];
|
||||
ush general_purpose_bit_flag;
|
||||
ush compression_method;
|
||||
ulg last_mod_dos_datetime;
|
||||
ulg crc32;
|
||||
ulg csize;
|
||||
ulg ucsize;
|
||||
ush filename_length;
|
||||
ush extra_field_length;
|
||||
ush file_comment_length;
|
||||
ush disk_number_start;
|
||||
ush internal_file_attributes;
|
||||
ulg external_file_attributes;
|
||||
ulg relative_offset_local_header;
|
||||
} cdir_file_hdr;
|
||||
|
||||
|
||||
#define UZPINIT_LEN sizeof(UzpInit)
|
||||
#define UZPVER_LEN sizeof(UzpVer)
|
||||
#define cbList(func) int (* UZ_EXP func)(char *filename, cdir_file_hdr *crec)
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
Return (and exit) values of the public UnZip API functions.
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
/* external return codes */
|
||||
#define PK_OK 0 /* no error */
|
||||
#define PK_COOL 0 /* no error */
|
||||
#define PK_GNARLY 0 /* no error */
|
||||
#define PK_WARN 1 /* warning error */
|
||||
#define PK_ERR 2 /* error in zipfile */
|
||||
#define PK_BADERR 3 /* severe error in zipfile */
|
||||
#define PK_MEM 4 /* insufficient memory (during initialization) */
|
||||
#define PK_MEM2 5 /* insufficient memory (password failure) */
|
||||
#define PK_MEM3 6 /* insufficient memory (file decompression) */
|
||||
#define PK_MEM4 7 /* insufficient memory (memory decompression) */
|
||||
#define PK_MEM5 8 /* insufficient memory (not yet used) */
|
||||
#define PK_NOZIP 9 /* zipfile not found */
|
||||
#define PK_PARAM 10 /* bad or illegal parameters specified */
|
||||
#define PK_FIND 11 /* no files found */
|
||||
#define PK_DISK 50 /* disk full */
|
||||
#define PK_EOF 51 /* unexpected EOF */
|
||||
|
||||
#define IZ_CTRLC 80 /* user hit ^C to terminate */
|
||||
#define IZ_UNSUP 81 /* no files found: all unsup. compr/encrypt. */
|
||||
#define IZ_BADPWD 82 /* no files found: all had bad password */
|
||||
|
||||
/* internal and DLL-only return codes */
|
||||
#define IZ_DIR 76 /* potential zipfile is a directory */
|
||||
#define IZ_CREATED_DIR 77 /* directory created: set time and permissions */
|
||||
#define IZ_VOL_LABEL 78 /* volume label, but can't set on hard disk */
|
||||
#define IZ_EF_TRUNC 79 /* local extra field truncated (PKZIP'd) */
|
||||
|
||||
/* return codes of password fetches (negative = user abort; positive = error) */
|
||||
#define IZ_PW_ENTERED 0 /* got some password string; use/try it */
|
||||
#define IZ_PW_CANCEL -1 /* no password available (for this entry) */
|
||||
#define IZ_PW_CANCELALL -2 /* no password, skip any further pwd. request */
|
||||
#define IZ_PW_ERROR 5 /* = PK_MEM2 : failure (no mem, no tty, ...) */
|
||||
|
||||
/* flag values for status callback function */
|
||||
#define UZ_ST_START_EXTRACT 1
|
||||
#define UZ_ST_IN_PROGRESS 2
|
||||
#define UZ_ST_FINISH_MEMBER 3
|
||||
|
||||
/* return values of status callback function */
|
||||
#define UZ_ST_CONTINUE 0
|
||||
#define UZ_ST_BREAK 1
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
Prototypes for public UnZip API (DLL) functions.
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
#define UzpMatch match
|
||||
|
||||
int UZ_EXP UzpMain OF((int argc, char **argv));
|
||||
int UZ_EXP UzpAltMain OF((int argc, char **argv, UzpInit *init));
|
||||
UzpVer * UZ_EXP UzpVersion OF((void));
|
||||
void UZ_EXP UzpFreeMemBuffer OF((UzpBuffer *retstr));
|
||||
#ifndef WINDLL
|
||||
int UZ_EXP UzpUnzipToMemory OF((char *zip, char *file, UzpOpts *optflgs,
|
||||
UzpCB *UsrFunc, UzpBuffer *retstr));
|
||||
#endif
|
||||
#ifndef WINDLL
|
||||
int UZ_EXP UzpGrep OF((char *archive, char *file,
|
||||
char *pattern, int cmd, int SkipBin,
|
||||
UzpCB *UsrFunc));
|
||||
#endif
|
||||
#ifdef OS2
|
||||
int UZ_EXP UzpFileTree OF((char *name, cbList(callBack),
|
||||
char *cpInclude[], char *cpExclude[]));
|
||||
#endif
|
||||
|
||||
void UZ_EXP UzpVersion2 OF((UzpVer2 *version));
|
||||
int UZ_EXP UzpValidate OF((char *archive, int AllCodes));
|
||||
|
||||
|
||||
/* default I/O functions (can be swapped out via UzpAltMain() entry point): */
|
||||
|
||||
int UZ_EXP UzpMessagePrnt OF((zvoid *pG, uch *buf, ulg size, int flag));
|
||||
int UZ_EXP UzpMessageNull OF((zvoid *pG, uch *buf, ulg size, int flag));
|
||||
int UZ_EXP UzpInput OF((zvoid *pG, uch *buf, int *size, int flag));
|
||||
void UZ_EXP UzpMorePause OF((zvoid *pG, ZCONST char *prompt, int flag));
|
||||
int UZ_EXP UzpPassword OF((zvoid *pG, int *rcnt, char *pwbuf,
|
||||
int size, ZCONST char *zfn,
|
||||
ZCONST char *efn));
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
Remaining private stuff for UnZip compilation.
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef UNZIP_INTERNAL
|
||||
# include "unzpriv.h"
|
||||
#endif
|
||||
|
||||
int pipeit(char *format, ...);
|
||||
int pipeit2(char *format, int flag, ...);
|
||||
int confirm(char *format, ...);
|
||||
|
||||
#endif /* !__unzip_h */
|
2384
utils/Install/inczip/unzpriv.h
Normal file
2384
utils/Install/inczip/unzpriv.h
Normal file
File diff suppressed because it is too large
Load Diff
44
utils/Install/inczip/version.h
Normal file
44
utils/Install/inczip/version.h
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
version.h (for UnZip) by Info-ZIP.
|
||||
|
||||
This header file is not copyrighted and may be distributed without
|
||||
restriction. (That's a little geek humor, heh heh.)
|
||||
*/
|
||||
|
||||
#ifndef __version_h /* don't include more than once */
|
||||
#define __version_h
|
||||
|
||||
#ifdef BETA
|
||||
# undef BETA /* define BETA for internal beta releases */
|
||||
#endif
|
||||
|
||||
#ifdef BETA
|
||||
# define BETALEVEL "d BETA"
|
||||
# define VERSION_DATE "27 November 98" /* internal beta version */
|
||||
#else
|
||||
# define BETALEVEL ""
|
||||
# define VERSION_DATE "28 November 1998" /* official release version */
|
||||
# define RELEASE
|
||||
#endif
|
||||
|
||||
#define UZ_MAJORVER 5 /* UnZip */
|
||||
#define UZ_MINORVER 4
|
||||
|
||||
#define ZI_MAJORVER 2 /* ZipInfo */
|
||||
#define ZI_MINORVER 3
|
||||
|
||||
#define PATCHLEVEL 0
|
||||
|
||||
|
||||
/* these are obsolete but remain for backward compatibility: */
|
||||
#define D2_MAJORVER UZ_MAJORVER /* DLL for OS/2 */
|
||||
#define D2_MINORVER UZ_MINORVER
|
||||
#define D2_PATCHLEVEL PATCHLEVEL
|
||||
|
||||
#define DW_MAJORVER UZ_MAJORVER /* DLL for MS Windows */
|
||||
#define DW_MINORVER UZ_MINORVER
|
||||
#define DW_PATCHLEVEL PATCHLEVEL
|
||||
|
||||
#define WIN_VERSION_DATE VERSION_DATE
|
||||
|
||||
#endif /* !__version_h */
|
222
utils/Install/inczip/w32cfg.h
Normal file
222
utils/Install/inczip/w32cfg.h
Normal file
@@ -0,0 +1,222 @@
|
||||
/*---------------------------------------------------------------------------
|
||||
Win32 specific configuration section:
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __w32cfg_h
|
||||
#define __w32cfg_h
|
||||
|
||||
#if (defined(__CYGWIN__) && !defined(__CYGWIN32__))
|
||||
# define __CYGWIN32__ /* new versions of CygWin may not define this */
|
||||
#endif
|
||||
|
||||
#include <sys/types.h> /* off_t, time_t, dev_t, ... */
|
||||
#include <sys/stat.h>
|
||||
#include <io.h> /* read(), open(), etc. */
|
||||
#include <time.h>
|
||||
#if (defined(__RSXNT__) || defined(__EMX__)) && !defined(tzset)
|
||||
# define tzset _tzset
|
||||
#endif
|
||||
#ifdef __MINGW32__
|
||||
extern void _tzset(void); /* this is missing in <time.h> */
|
||||
# ifndef tzset
|
||||
# define tzset _tzset
|
||||
# endif
|
||||
#endif
|
||||
#include <memory.h>
|
||||
#if (!defined(__RSXNT__) && !defined(__CYGWIN32__))
|
||||
# include <direct.h> /* mkdir() */
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
#ifdef __CYGWIN32__
|
||||
# include <unistd.h>
|
||||
extern int setmode(int, int); /* this is missing in <fcntl.h> */
|
||||
#endif
|
||||
#if (defined(MSC) || defined(__WATCOMC__) || defined(__MINGW32__))
|
||||
# include <sys/utime.h>
|
||||
#else
|
||||
# include <utime.h>
|
||||
#endif
|
||||
|
||||
#if defined(FILEIO_C)
|
||||
# ifndef __CYGWIN32__
|
||||
# include <conio.h>
|
||||
# endif
|
||||
# include <windows.h>
|
||||
# ifdef __RSXNT__
|
||||
# include "win32/rsxntwin.h"
|
||||
# endif
|
||||
#endif
|
||||
#if (defined(ENVARGS_C) || defined(EXTRACT_C) || defined(UNZIP_C) || \
|
||||
defined(ZCRYPT_INTERNAL))
|
||||
# include <windows.h>
|
||||
# ifdef __RSXNT__
|
||||
# include "win32/rsxntwin.h"
|
||||
# endif
|
||||
#endif
|
||||
#if (defined(__CYGWIN32__) || defined(__MINGW32__))
|
||||
/* the following definitions are missing in their <windows.h> */
|
||||
# ifndef AnsiToOem
|
||||
# define AnsiToOem CharToOemA
|
||||
# endif
|
||||
# ifndef OemToAnsi
|
||||
# define OemToAnsi OemToCharA
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define DIR_END '\\' /* OS uses '\\' as directory separator */
|
||||
#define DIR_END2 '/' /* also check for '/' (RTL may convert) */
|
||||
#ifndef DATE_FORMAT
|
||||
# define DATE_FORMAT DF_MDY
|
||||
#endif
|
||||
#define lenEOL 2
|
||||
#define PutNativeEOL {*q++ = native(CR); *q++ = native(LF);}
|
||||
|
||||
#if (defined(__RSXNT__) && !defined(HAVE_MKTIME))
|
||||
# define HAVE_MKTIME /* use mktime() in time conversion routines */
|
||||
#endif
|
||||
#if (defined(__CYGWIN32__) && defined(HAVE_MKTIME))
|
||||
# undef HAVE_MKTIME /* Cygnus' mktime() implementation is buggy */
|
||||
#endif
|
||||
#if (!defined(NT_TZBUG_WORKAROUND) && !defined(NO_NT_TZBUG_WORKAROUND))
|
||||
# define NT_TZBUG_WORKAROUND
|
||||
#endif
|
||||
#if (!defined(NO_EF_UT_TIME) && !defined(USE_EF_UT_TIME))
|
||||
# define USE_EF_UT_TIME
|
||||
#endif
|
||||
#if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP))
|
||||
# define TIMESTAMP
|
||||
#endif
|
||||
#if (!defined(NO_NTSD_EAS) && !defined(NTSD_EAS))
|
||||
# define NTSD_EAS /* enable NTSD support unless explicitly suppressed */
|
||||
#endif
|
||||
|
||||
/* handlers for OEM <--> ANSI string conversions */
|
||||
#ifdef __RSXNT__
|
||||
/* RSXNT uses OEM coded strings in functions supplied by C RTL */
|
||||
# ifdef CRTL_CP_IS_ISO
|
||||
# undef CRTL_CP_IS_ISO
|
||||
# endif
|
||||
# ifndef CRTL_CP_IS_OEM
|
||||
# define CRTL_CP_IS_OEM
|
||||
# endif
|
||||
#else
|
||||
/* "real" native WIN32 compilers use ANSI coded strings in C RTL calls */
|
||||
# ifndef CRTL_CP_IS_ISO
|
||||
# define CRTL_CP_IS_ISO
|
||||
# endif
|
||||
# ifdef CRTL_CP_IS_OEM
|
||||
# undef CRTL_CP_IS_OEM
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef CRTL_CP_IS_ISO
|
||||
/* C RTL's file system support assumes ANSI coded strings */
|
||||
# define ISO_TO_INTERN(src, dst) {if ((src) != (dst)) strcpy((dst), (src));}
|
||||
# define OEM_TO_INTERN(src, dst) OemToAnsi(src, dst)
|
||||
# define INTERN_TO_ISO(src, dst) {if ((src) != (dst)) strcpy((dst), (src));}
|
||||
# define INTERN_TO_OEM(src, dst) AnsiToOem(src, dst)
|
||||
#endif /* CRTL_CP_IS_ISO */
|
||||
#ifdef CRTL_CP_IS_OEM
|
||||
/* C RTL's file system support assumes OEM coded strings */
|
||||
# define ISO_TO_INTERN(src, dst) AnsiToOem(src, dst)
|
||||
# define OEM_TO_INTERN(src, dst) {if ((src) != (dst)) strcpy((dst), (src));}
|
||||
# define INTERN_TO_ISO(src, dst) OemToAnsi(src, dst)
|
||||
# define INTERN_TO_OEM(src, dst) {if ((src) != (dst)) strcpy((dst), (src));}
|
||||
#endif /* CRTL_CP_IS_OEM */
|
||||
#define _OEM_INTERN(str1) OEM_TO_INTERN(str1, str1)
|
||||
#define _ISO_INTERN(str1) ISO_TO_INTERN(str1, str1)
|
||||
#ifndef WINDLL
|
||||
/* Despite best intentions, for the command-line version UzpPassword()
|
||||
* could return either character set, depending on whether running under
|
||||
* Win95 (DOS-session) or WinNT (native WinNT command interpreter)! */
|
||||
# define STR_TO_CP2(dst, src) (AnsiToOem(src, dst), dst)
|
||||
# define STR_TO_CP3(dst, src) (OemToAnsi(src, dst), dst)
|
||||
#else
|
||||
/* The WINDLL front end is known to supply ISO/ANSI-coded passwords! */
|
||||
# define STR_TO_CP2(dst, src) (AnsiToOem(src, dst), dst)
|
||||
#endif
|
||||
/* dummy defines to disable these functions, they are not needed */
|
||||
#define STR_TO_OEM
|
||||
#define STR_TO_ISO
|
||||
|
||||
/* Static variables that we have to add to Uz_Globs: */
|
||||
#define SYSTEM_SPECIFIC_GLOBALS \
|
||||
int created_dir, renamed_fullpath, fnlen;\
|
||||
unsigned nLabelDrive;\
|
||||
char lastRootPath[4];\
|
||||
int lastVolOldFAT, lastVolLocTim;\
|
||||
char *rootpath, *buildpathHPFS, *buildpathFAT, *endHPFS, *endFAT;\
|
||||
char *dirname, *wildname, matchname[FILNAMSIZ];\
|
||||
int rootlen, have_dirname, dirnamelen, notfirstcall;\
|
||||
zvoid *wild_dir;
|
||||
|
||||
/* created_dir, renamed_fullpath, fnlen, and nLabelDrive are used by */
|
||||
/* both mapname() and checkdir(). */
|
||||
/* lastRootPath and lastVolOldFAT are used by IsVolumeOldFAT(). */
|
||||
/* rootlen, rootpath, buildpathHPFS, buildpathFAT, endHPFS, and endFAT */
|
||||
/* are used by checkdir(). */
|
||||
/* wild_dir, dirname, wildname, matchname[], dirnamelen, have_dirname, */
|
||||
/* and notfirstcall are used by do_wild(). */
|
||||
|
||||
#if (defined(_MSC_VER) && !defined(MSC))
|
||||
# define MSC
|
||||
#endif
|
||||
|
||||
/* This replacement for C-RTL-supplied getch() (or similar) functionality
|
||||
* avoids leaving unabsorbed LFs in the keyboard buffer under Windows95,
|
||||
* and supports the <ALT>+[0]<digit><digit><digit> feature.
|
||||
*/
|
||||
int getch_win32 OF((void));
|
||||
|
||||
/* This patch of stat() is useful for at least two compilers. It is */
|
||||
/* difficult to take a stat() of a root directory under Windows95, so */
|
||||
/* zstat_win32() detects that case and fills in suitable values. */
|
||||
#ifndef __RSXNT__
|
||||
# ifndef W32_STATROOT_FIX
|
||||
# define W32_STATROOT_FIX
|
||||
# endif
|
||||
#endif /* !__RSXNT__ */
|
||||
|
||||
#if (defined(NT_TZBUG_WORKAROUND) || defined(W32_STATROOT_FIX))
|
||||
# define W32_STAT_BANDAID
|
||||
# if (defined(NT_TZBUG_WORKAROUND) && defined(REENTRANT))
|
||||
# define __W32STAT_GLOBALS__ Uz_Globs *pG,
|
||||
# define __W32STAT_G__ pG,
|
||||
# else
|
||||
# define __W32STAT_GLOBALS__
|
||||
# define __W32STAT_G__
|
||||
# endif
|
||||
# undef SSTAT
|
||||
# ifdef WILD_STAT_BUG
|
||||
# define SSTAT(path, pbuf) (iswild(path) || zstat_win32(__W32STAT_G__ path, pbuf))
|
||||
# else
|
||||
# define SSTAT(path, pbuf) zstat_win32(__W32STAT_G__ path, pbuf)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __WATCOMC__
|
||||
# ifdef __386__
|
||||
# ifndef WATCOMC_386
|
||||
# define WATCOMC_386
|
||||
# endif
|
||||
# define __32BIT__
|
||||
# undef far
|
||||
# define far
|
||||
# undef near
|
||||
# define near
|
||||
|
||||
/* Get asm routines to link properly without using "__cdecl": */
|
||||
# ifndef USE_ZLIB
|
||||
# pragma aux crc32 "_*" parm caller [] value [eax] modify [eax]
|
||||
# pragma aux get_crc_table "_*" parm caller [] value [eax] \
|
||||
modify [eax ecx edx]
|
||||
# endif /* !USE_ZLIB */
|
||||
# endif /* __386__ */
|
||||
|
||||
# ifndef EPIPE
|
||||
# define EPIPE -1
|
||||
# endif
|
||||
# define PIPE_ERROR (errno == EPIPE)
|
||||
#endif /* __WATCOMC__ */
|
||||
|
||||
#endif /* !__w32cfg_h */
|
15
utils/Install/inczip/zip.h
Normal file
15
utils/Install/inczip/zip.h
Normal file
@@ -0,0 +1,15 @@
|
||||
/* This is a dummy zip.h to allow the source files shared with Zip (crypt.c,
|
||||
crc32.c, crctab.c, ttyio.c) to compile for UnZip. */
|
||||
|
||||
#ifndef __zip_h /* don't include more than once */
|
||||
#define __zip_h
|
||||
|
||||
#define UNZIP_INTERNAL
|
||||
#include "unzip.h"
|
||||
|
||||
#define local static
|
||||
|
||||
#define ZE_MEM PK_MEM
|
||||
#define ziperr(c, h) return
|
||||
|
||||
#endif /* !__zip_h */
|
Reference in New Issue
Block a user