126 #define FDI_INT_MAGIC 0xfdfdfd05 166 #define ZIPNEEDBITS(n) {while(k<(n)){cab_LONG c=*(ZIP(inpos)++);\ 167 b|=((cab_ULONG)c)<<k;k+=8;}} 168 #define ZIPDUMPBITS(n) {b>>=(n);k-=(n);} 171 #define EndGetI32(a) ((((a)[3])<<24)|(((a)[2])<<16)|(((a)[1])<<8)|((a)[0])) 172 #define EndGetI16(a) ((((a)[1])<<8)|((a)[0])) 174 #define CAB(x) (decomp_state->x) 175 #define ZIP(x) (decomp_state->methods.zip.x) 176 #define QTM(x) (decomp_state->methods.qtm.x) 177 #define LZX(x) (decomp_state->methods.lzx.x) 179 #define DECR_DATAFORMAT (1) 180 #define DECR_ILLEGALDATA (2) 181 #define DECR_NOMEMORY (3) 182 #define DECR_CHECKSUM (4) 183 #define DECR_INPUT (5) 184 #define DECR_OUTPUT (6) 185 #define DECR_USERABORT (7) 214 for (
i = 0;
i <
sym;
i++) model->
syms[
i].cumfreq += 8;
216 if (model->
syms[0].cumfreq > 3800) {
220 model->
syms[
i].cumfreq >>= 1;
221 if (model->
syms[
i].cumfreq <= model->
syms[
i+1].cumfreq) {
222 model->
syms[
i].cumfreq = model->
syms[
i+1].cumfreq + 1;
231 model->
syms[
i].cumfreq -= model->
syms[
i+1].cumfreq;
232 model->
syms[
i].cumfreq++;
233 model->
syms[
i].cumfreq >>= 1;
242 if (model->
syms[
i].cumfreq < model->
syms[
j].cumfreq) {
252 model->
syms[
i].cumfreq += model->
syms[
i+1].cumfreq;
291 while (bit_num <= nbits) {
296 if((
pos += bit_mask) > table_mask)
return 1;
308 if (
pos != table_mask) {
317 while (bit_num <= 16) {
323 if (
table[leaf] == 0) {
324 table[(next_symbol << 1)] = 0;
325 table[(next_symbol << 1) + 1] = 0;
326 table[leaf] = next_symbol++;
329 leaf =
table[leaf] << 1;
330 if ((
pos >> (15-
fill)) & 1) leaf++;
334 if ((
pos += bit_mask) > table_mask)
return 1;
343 if (
pos == table_mask)
return 0;
362 case 3: ul |= *
data++ << 16;
364 case 2: ul |= *
data++ << 8;
425 TRACE(
"(pfnalloc == ^%p, pfnfree == ^%p, pfnopen == ^%p, pfnread == ^%p, pfnwrite == ^%p, " 426 "pfnclose == ^%p, pfnseek == ^%p, cpuType == %d, perf == ^%p)\n",
427 pfnalloc, pfnfree, pfnopen, pfnread, pfnwrite, pfnclose, pfnseek,
430 if ((!pfnalloc) || (!pfnfree)) {
439 if (!((fdi = pfnalloc(
sizeof(
FDI_Int))))) {
447 fdi->
alloc = pfnalloc;
451 fdi->
write = pfnwrite;
452 fdi->
close = pfnclose;
480 maxlen = cabsize -
base;
485 TRACE(
"(fdi == %p, hf == %ld, cabsize == %ld)\n", fdi, hf, cabsize);
488 if (
len > maxlen)
len = maxlen;
499 ERR(
"cabinet is truncated\n");
516 ERR(
"out of memory!\n");
538 int num_folders, num_files, header_resv, folder_resv = 0;
542 char *prevname =
NULL, *previnfo =
NULL, *nextname =
NULL, *nextinfo =
NULL;
544 TRACE(
"(fdi == ^%p, hf == %ld, pfdici == ^%p)\n", fdi, hf, pfdici);
577 WARN(
"cabinet format version > 1.3\n");
588 ERR(
"bunk reserve-sizes?\n");
600 if (header_resv > 60000) {
601 WARN(
"WARNING; header reserved space > 60000\n");
605 if ((header_resv) && (fdi->
seek(hf, header_resv,
SEEK_CUR) == -1)) {
606 ERR(
"seek failure: header_resv\n");
660 pfdici->
cFiles = num_files;
661 pfdici->
setID = setid;
701 TRACE(
"(hfdi == ^%p, hf == ^%ld, pfdici == ^%p)\n", hfdi, hf, pfdici);
703 if (!fdi)
return FALSE;
727 memset(
m->tabloc, 0xFF,
sizeof(
m->tabloc));
728 for (
i = 0;
i <
n;
i++) {
730 m->syms[
i].sym =
i+
s;
731 m->syms[
i].cumfreq =
n-
i;
733 m->syms[
n].cumfreq = 0;
740 unsigned int wndsize = 1 <<
window;
747 if (
QTM(actual_size) < wndsize) {
753 QTM(actual_size) = wndsize;
755 QTM(window_size) = wndsize;
756 QTM(window_posn) = 0;
759 for (
i = 0,
j = 0;
i < 27;
i++) {
760 CAB(q_length_extra)[
i] = (
i == 26) ? 0 : (
i < 2 ? 0 :
i - 2) >> 2;
761 CAB(q_length_base)[
i] =
j;
j += 1 << ((
i == 26) ? 5 :
CAB(q_length_extra)[
i]);
763 for (
i = 0,
j = 0;
i < 42;
i++) {
764 CAB(q_extra_bits)[
i] = (
i < 2 ? 0 :
i-2) >> 1;
765 CAB(q_position_base)[
i] =
j;
j += 1 <<
CAB(q_extra_bits)[
i];
793 { 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
794 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14,
795 15, 15, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
798 { 0, 1, 2, 3, 4, 6, 8, 12,
799 16, 24, 32, 48, 64, 96, 128, 192,
800 256, 384, 512, 768, 1024, 1536, 2048, 3072,
801 4096, 6144, 8192, 12288, 16384, 24576, 32768, 49152,
802 65536, 98304, 131072, 196608, 262144, 393216, 524288, 655360,
803 786432, 917504, 1048576, 1179648, 1310720, 1441792, 1572864, 1703936,
804 1835008, 1966080, 2097152};
811 if (
LZX(actual_size) < wndsize) {
817 LZX(actual_size) = wndsize;
819 LZX(window_size) = wndsize;
826 if (
window == 20) posn_slots = 42;
827 else if (
window == 21) posn_slots = 50;
828 else posn_slots =
window << 1;
834 LZX(header_read) = 0;
835 LZX(frames_read) = 0;
836 LZX(block_remaining) = 0;
838 LZX(intel_curpos) = 0;
839 LZX(intel_started) = 0;
840 LZX(window_posn) = 0;
843 memset(
LZX(MAINTREE_len), 0,
sizeof(
LZX(MAINTREE_len)));
934 for (
y = 1 <<
j;
j <
i;
j++,
y <<= 1)
981 if ((
f = 1 << (
j =
k -
w)) >
a + 1)
987 if ((
f <<= 1) <= *++xp)
1015 j = (
i & ((1 <<
w) - 1)) >> (
w -
l[
h-1]);
1032 r.v.n =
d[*
p++ -
s];
1037 for (
j =
i >>
w;
j <
z;
j +=
f)
1041 for (
j = 1 << (
k - 1);
i &
j;
j >>= 1)
1046 while ((
i & ((1 <<
w) - 1)) !=
ZIP(
x)[
h])
1055 return y != 0 &&
g != 1;
1075 w =
ZIP(window_posn);
1084 if((
e = (
t = tl + (
b & ml))->
e) > 16)
1092 }
while ((
e = (
t =
t->v.t + (
b & Zipmask[
e]))->e) > 16);
1104 n =
t->v.n + (
b & Zipmask[
e]);
1109 if ((
e = (
t = td + (
b &
md))->
e) > 16)
1116 }
while ((
e = (
t =
t->v.t + (
b & Zipmask[
e]))->e) > 16);
1119 d =
w -
t->v.n - (
b & Zipmask[
e]);
1129 CAB(outbuf)[
w++] =
CAB(outbuf)[
d++];
1136 ZIP(window_posn) =
w;
1158 w =
ZIP(window_posn);
1169 if (
n != ((~
b) & 0xffff))
1182 ZIP(window_posn) =
w;
1202 for(
i = 0;
i < 144;
i++)
1215 for(
i = 0;
i < 30;
i++)
1261 nl = 257 + (
b & 0x1f);
1264 nd = 1 + (
b & 0x1f);
1269 if(nl > 288 || nd > 32)
1273 for(
j = 0;
j < nb;
j++)
1276 ll[Zipborder[
j]] =
b & 7;
1280 ll[Zipborder[
j]] = 0;
1298 j = (td = tl + (
b &
m))->b;
1327 j = 11 + (
b & 0x7f);
1410 TRACE(
"(inlen == %d, outlen == %d)\n", inlen, outlen);
1413 ZIP(bb) =
ZIP(bk) =
ZIP(window_posn) = 0;
1418 if(
ZIP(inpos)[0] != 0x43 ||
ZIP(inpos)[1] != 0x4B)
1443 register int bitsleft, bitrun, bitsneed;
1451 int extra, togo = outlen, match_length = 0, copy_length;
1457 TRACE(
"(inlen == %d, outlen == %d)\n", inlen, outlen);
1464 window_posn &= window_size - 1;
1466 if ((window_posn + togo) > window_size) {
1467 TRACE(
"straddled run\n");
1491 match_offset =
CAB(q_position_base)[sym] +
extra + 1;
1499 match_offset =
CAB(q_position_base)[sym] +
extra + 1;
1507 match_length =
CAB(q_length_base)[sym] +
extra + 5;
1510 match_offset =
CAB(q_position_base)[sym] +
extra + 1;
1514 TRACE(
"Selector is bogus\n");
1519 if (selector >= 4) {
1520 rundest =
window + window_posn;
1521 togo -= match_length;
1524 if (window_posn >= match_offset) {
1526 runsrc = rundest - match_offset;
1528 runsrc = rundest + (window_size - match_offset);
1529 copy_length = match_offset - window_posn;
1530 if (copy_length < match_length) {
1531 match_length -= copy_length;
1532 window_posn += copy_length;
1533 while (copy_length-- > 0) *rundest++ = *runsrc++;
1537 window_posn += match_length;
1540 while (match_length-- > 0) *rundest++ = *runsrc++;
1545 TRACE(
"Frame overflow, this_run = %d\n", togo);
1549 memcpy(
CAB(outbuf),
window + ((!window_posn) ? window_size : window_posn) -
1552 QTM(window_posn) = window_posn;
1565 register int bitsleft = lb->
bl;
1569 for (
x = 0;
x < 20;
x++) {
1579 while (
y--) lens[
x++] = 0;
1583 while (
y--) lens[
x++] = 0;
1588 z = lens[
x] -
z;
if (
z < 0)
z += 17;
1589 while (
y--) lens[
x++] =
z;
1592 z = lens[
x] -
z;
if (
z < 0)
z += 17;
1608 const cab_UBYTE *endinp = inpos + inlen;
1620 register int bitsleft;
1624 int togo = outlen, this_run, main_element, aligned_bits;
1625 int match_length, copy_length, length_footer,
extra, verbatim_bits;
1627 TRACE(
"(inlen == %d, outlen == %d)\n", inlen, outlen);
1632 if (!
LZX(header_read)) {
1635 LZX(intel_filesize) = (
i << 16) |
j;
1636 LZX(header_read) = 1;
1642 if (
LZX(block_remaining) == 0) {
1644 if (
LZX(block_length) & 1) inpos++;
1651 LZX(block_remaining) =
LZX(block_length) = (
i << 8) |
j;
1653 switch (
LZX(block_type)) {
1663 if (
LENTABLE(MAINTREE)[0xE8] != 0)
LZX(intel_started) = 1;
1670 LZX(intel_started) = 1;
1672 if (bitsleft > 16) inpos -= 2;
1673 R0 = inpos[0]|(inpos[1]<<8)|(inpos[2]<<16)|(inpos[3]<<24);inpos+=4;
1674 R1 = inpos[0]|(inpos[1]<<8)|(inpos[2]<<16)|(inpos[3]<<24);inpos+=4;
1675 R2 = inpos[0]|(inpos[1]<<8)|(inpos[2]<<16)|(inpos[3]<<24);inpos+=4;
1684 if (inpos > endinp) {
1696 while ((this_run =
LZX(block_remaining)) > 0 && togo > 0) {
1697 if (this_run > togo) this_run = togo;
1699 LZX(block_remaining) -= this_run;
1702 window_posn &= window_size - 1;
1704 if ((window_posn + this_run) > window_size)
1707 switch (
LZX(block_type)) {
1710 while (this_run > 0) {
1715 window[window_posn++] = main_element;
1725 match_length += length_footer;
1729 match_offset = main_element >> 3;
1731 if (match_offset > 2) {
1733 if (match_offset != 3) {
1736 match_offset =
CAB(lzx_position_base)[match_offset]
1737 - 2 + verbatim_bits;
1746 else if (match_offset == 0) {
1749 else if (match_offset == 1) {
1751 R1 =
R0;
R0 = match_offset;
1755 R2 =
R0;
R0 = match_offset;
1758 rundest =
window + window_posn;
1759 this_run -= match_length;
1762 if (window_posn >= match_offset) {
1764 runsrc = rundest - match_offset;
1766 runsrc = rundest + (window_size - match_offset);
1767 copy_length = match_offset - window_posn;
1768 if (copy_length < match_length) {
1769 match_length -= copy_length;
1770 window_posn += copy_length;
1771 while (copy_length-- > 0) *rundest++ = *runsrc++;
1775 window_posn += match_length;
1778 while (match_length-- > 0) *rundest++ = *runsrc++;
1784 while (this_run > 0) {
1789 window[window_posn++] = main_element;
1799 match_length += length_footer;
1803 match_offset = main_element >> 3;
1805 if (match_offset > 2) {
1808 match_offset =
CAB(lzx_position_base)[match_offset] - 2;
1813 match_offset += (verbatim_bits << 3);
1815 match_offset += aligned_bits;
1817 else if (
extra == 3) {
1820 match_offset += aligned_bits;
1822 else if (
extra > 0) {
1825 match_offset += verbatim_bits;
1835 else if (match_offset == 0) {
1838 else if (match_offset == 1) {
1840 R1 =
R0;
R0 = match_offset;
1844 R2 =
R0;
R0 = match_offset;
1847 rundest =
window + window_posn;
1848 this_run -= match_length;
1851 if (window_posn >= match_offset) {
1853 runsrc = rundest - match_offset;
1855 runsrc = rundest + (window_size - match_offset);
1856 copy_length = match_offset - window_posn;
1857 if (copy_length < match_length) {
1858 match_length -= copy_length;
1859 window_posn += copy_length;
1860 while (copy_length-- > 0) *rundest++ = *runsrc++;
1864 window_posn += match_length;
1867 while (match_length-- > 0) *rundest++ = *runsrc++;
1874 memcpy(
window + window_posn, inpos, (
size_t) this_run);
1875 inpos += this_run; window_posn += this_run;
1886 memcpy(
CAB(outbuf),
window + ((!window_posn) ? window_size : window_posn) -
1887 outlen, (
size_t) outlen);
1889 LZX(window_posn) = window_posn;
1895 if ((
LZX(frames_read)++ < 32768) &&
LZX(intel_filesize) != 0) {
1896 if (outlen <= 6 || !
LZX(intel_started)) {
1897 LZX(intel_curpos) += outlen;
1906 LZX(intel_curpos) = curpos + outlen;
1908 while (
data < dataend) {
1909 if (*
data++ != 0xE8) { curpos++;
continue; }
1911 if ((abs_off >= -curpos) && (abs_off < filesize)) {
1912 rel_off = (abs_off >= 0) ? abs_off - curpos : abs_off + filesize;
1948 TRACE(
"(fi == ^%p, savemode == %d, bytes == %d)\n", fi, savemode,
bytes);
1952 cando =
CAB(outlen);
1956 if (cando && savemode)
1957 CAB(fdi)->write(
CAB(filehf),
CAB(outpos), cando);
1959 CAB(outpos) += cando;
1960 CAB(outlen) -= cando;
1967 while (outlen == 0) {
1996 int pathlen, filenamelen;
1998 char fullpath[
MAX_PATH], userpath[256];
2001 char emptystring =
'\0';
2022 pathlen = pszCabPath ?
strlen(pszCabPath) : 0;
2025 strcpy(userpath, pszCabPath);
2032 fdin.
psz3 = userpath;
2040 pathlen =
strlen(userpath);
2044 if ((pathlen + filenamelen + 3) >
MAX_PATH) {
2045 ERR(
"MAX_PATH exceeded.\n");
2052 strcpy(fullpath, userpath);
2054 if (fullpath[pathlen - 1] ==
'\\')
2055 fullpath[pathlen - 1] =
'\0';
2057 if (fullpath[pathlen - 1] !=
'\\')
2084 ERR(
"PFDI_OPEN returned zero for %s.\n", fullpath);
2092 WARN(
"FDIIsCabinet failed.\n");
2093 CAB(fdi)->close(cabhf);
2100 WARN(
"Wrong Cabinet.\n");
2101 CAB(fdi)->close(cabhf);
2116 fdin.
psz1 = (cab->
next->mii.nextname) ? cab->
next->mii.nextname : &emptystring;
2117 fdin.
psz2 = (cab->
next->mii.nextinfo) ? cab->
next->mii.nextinfo : &emptystring;
2118 fdin.
psz3 = pszCabPath;
2125 cab->
next->filehf =
CAB(filehf);
2126 cab->
next->cabhf = cabhf;
2127 cab->
next->decompress =
CAB(decompress);
2141 ERR(
"out of memory!\n");
2152 linkfol->next = fol;
2163 ERR(
"out of memory!\n");
2201 if (!
success)
goto tryanothercab;
2207 if ((
err =
CAB(decompress)(inlen, outlen, decomp_state)))
2209 CAB(outlen) = outlen;
2210 CAB(outpos) =
CAB(outbuf);
2213 CAB(decomp_cab) = cab;
2239 while (decomp_state) {
2245 if (
CAB(mii).nextname) fdi->
free(
CAB(mii).nextname);
2246 if (
CAB(mii).nextinfo) fdi->
free(
CAB(mii).nextinfo);
2247 if (
CAB(mii).prevname) fdi->
free(
CAB(mii).prevname);
2248 if (
CAB(mii).previnfo) fdi->
free(
CAB(mii).previnfo);
2250 while (
CAB(firstfol)) {
2251 fol =
CAB(firstfol);
2255 while (
CAB(firstfile)) {
2261 prev_fds = decomp_state;
2263 fdi->
free(prev_fds);
2445 size_t pathlen, filenamelen;
2446 char emptystring =
'\0';
2453 TRACE(
"(hfdi == ^%p, pszCabinet == %s, pszCabPath == %s, flags == %x, " 2454 "pfnfdin == ^%p, pfnfdid == ^%p, pvUser == ^%p)\n",
2457 if (!fdi)
return FALSE;
2466 pathlen = pszCabPath ?
strlen(pszCabPath) : 0;
2467 filenamelen = pszCabinet ?
strlen(pszCabinet) : 0;
2470 if ((pathlen + filenamelen + 3) >
MAX_PATH) {
2471 ERR(
"MAX_PATH exceeded.\n");
2472 fdi->
free(decomp_state);
2480 strcpy(fullpath, pszCabPath);
2482 strcat(fullpath, pszCabinet);
2489 fdi->
free(decomp_state);
2498 fdi->
free(decomp_state);
2508 fdin.
psz1 = (
CAB(mii).nextname) ?
CAB(mii).nextname : &emptystring;
2509 fdin.
psz2 = (
CAB(mii).nextinfo) ?
CAB(mii).nextinfo : &emptystring;
2510 fdin.
psz3 = pszCabPath;
2528 if (
CAB(mii).folder_resv > 0)
2533 ERR(
"out of memory!\n");
2538 if (!
CAB(firstfol))
CAB(firstfol) = fol;
2545 linkfol->next = fol;
2558 ERR(
"out of memory!\n");
2573 if (!
file->filename) {
2579 linkfile->next =
file;
2635 fdin.
psz1 = (
char *)
file->filename;
2636 fdin.
psz2 = (
CAB(mii).prevname) ?
CAB(mii).prevname : &emptystring;
2637 fdin.
psz3 = (
CAB(mii).previnfo) ?
CAB(mii).previnfo : &emptystring;
2646 if (
file->oppressed) {
2651 fdin.
psz1 = (
char *)
file->filename;
2666 fol =
CAB(firstfol);
2673 for (i2 = 0; (i2 <
file->index); i2++)
2689 CAB(filehf) = filehf;
2727 err =
QTMfdi_init((comptype >> 8) & 0x1f, (comptype >> 4) & 0xF, decomp_state);
2753 switch (
fdi_decomp(
file, 0, decomp_state, pszCabPath, pfnfdin, pvUser)) {
2776 fdin.
psz1 = (
char *)
file->filename;
2811 if (filehf) fdi->
close(filehf);
2835 TRACE(
"(hfdi == ^%p)\n", hfdi);
2836 if (!fdi)
return FALSE;
2863 char *pszCabinetName,
2868 FIXME(
"(hfdi == ^%p, pszCabinetName == %s, iFolderToDelete == %hu): stub\n",
2869 hfdi,
debugstr_a(pszCabinetName), iFolderToDelete);
2871 if (!fdi)
return FALSE;
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
static cab_LONG fdi_Zipinflate_stored(fdi_decomp_state *decomp_state)
INT_PTR(__cdecl * PFNFDINOTIFY)(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin)
static void free_decompression_mem(FDI_Int *fdi, fdi_decomp_state *decomp_state)
BOOL __cdecl FDIDestroy(HFDI hfdi)
#define READ_LENGTHS(tbl, first, last, fn)
#define cfheadext_FolderReserved
static int QTMfdi_init(int window, int level, fdi_decomp_state *decomp_state)
GLubyte GLubyte GLubyte GLubyte w
static FDI_Int * get_fdi_ptr(HFDI hfdi)
int WINAPI lstrcmpiA(LPCSTR lpString1, LPCSTR lpString2)
struct MORE_ISCAB_INFO * PMORE_ISCAB_INFO
struct fdi_cds_fwd * decomp_cab
static cab_LONG fdi_Zipinflate_codes(const struct Ziphuft *tl, const struct Ziphuft *td, cab_LONG bl, cab_LONG bd, fdi_decomp_state *decomp_state)
#define GET_SYMBOL(m, var)
char * strcat(char *DstString, const char *SrcString)
ACPI_SIZE strlen(const char *String)
GLenum GLuint GLenum GLsizei const GLchar * buf
#define Q_READ_BITS(v, n)
cab_UBYTE inbuf[CAB_INPUTMAX+2]
GLdouble GLdouble GLdouble r
struct fdi_folder * firstfol
int(__cdecl * PFNFDIDECRYPT)(PFDIDECRYPT pfdid)
#define ERROR_INVALID_HANDLE
static cab_LONG fdi_Zipinflate_block(cab_LONG *e, fdi_decomp_state *decomp_state)
BOOL __cdecl FDITruncateCabinet(HFDI hfdi, char *pszCabinetName, USHORT iFolderToDelete)
#define ERROR_BAD_ARGUMENTS
static int ZIPfdi_decomp(int inlen, int outlen, fdi_decomp_state *decomp_state)
void(__cdecl * PFNFREE)(void *pv)
#define R2(v, w, x, y, z, i)
#define ERROR_NOT_ENOUGH_MEMORY
struct QTMmodelsym * syms
GLint GLint GLint GLint GLint x
#define cffoldCOMPTYPE_MASK
static char * FDI_read_string(FDI_Int *fdi, INT_PTR hf, long cabsize)
#define cfheadext_HeaderReserved
#define cfheadRESERVE_PRESENT
#define LZX_BLOCKTYPE_UNCOMPRESSED
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
#define cfdata_UncompressedSize
static int LZXfdi_decomp(int inlen, int outlen, fdi_decomp_state *decomp_state)
static cab_LONG fdi_Zipinflate_fixed(fdi_decomp_state *decomp_state)
#define cfhead_NumFolders
GLfloat GLfloat GLfloat GLfloat h
const inflate_huft fixed_td[]
static int QTMfdi_decomp(int inlen, int outlen, fdi_decomp_state *decomp_state)
#define cffile_UncompressedSize
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define cffileCONTINUED_TO_NEXT
struct fdi_cds_fwd * next
static unsigned char bytes[4]
#define cfheadPREV_CABINET
#define cffoldCOMPTYPE_LZX
BOOL __cdecl FDICopy(HFDI hfdi, char *pszCabinet, char *pszCabPath, int flags, PFNFDINOTIFY pfnfdin, PFNFDIDECRYPT pfnfdid, void *pvUser)
static int fdi_lzx_read_lens(cab_UBYTE *lens, cab_ULONG first, cab_ULONG last, struct lzx_bits *lb, fdi_decomp_state *decomp_state)
int(__cdecl * PFNCLOSE)(INT_PTR hf)
#define cfhead_MajorVersion
cab_ULONG lzx_position_base[51]
HFDI __cdecl FDICreate(PFNALLOC pfnalloc, PFNFREE pfnfree, PFNOPEN pfnopen, PFNREAD pfnread, PFNWRITE pfnwrite, PFNCLOSE pfnclose, PFNSEEK pfnseek, int cpuType, PERF perf)
#define cffoldCOMPTYPE_MSZIP
#define LZX_NUM_SECONDARY_LENGTHS
INT_PTR(__cdecl * PFNOPEN)(char *pszFile, int oflag, int pmode)
#define ERROR_FILE_NOT_FOUND
#define cffold_DataOffset
struct fdi_cds_fwd fdi_decomp_state
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
UINT(__cdecl * PFNREAD)(INT_PTR hf, void *pv, UINT cb)
int(* decompress)(int, int, struct fdi_cds_fwd *)
#define R1(v, w, x, y, z, i)
static BOOL FDI_read_entries(FDI_Int *fdi, INT_PTR hf, PFDICABINETINFO pfdici, PMORE_ISCAB_INFO pmii)
GLboolean GLboolean GLboolean b
cab_UBYTE q_length_base[27]
#define cffoldCOMPTYPE_QUANTUM
#define cfdata_CompressedSize
GLenum GLuint GLenum GLsizei length
_STLP_MOVE_TO_STD_NAMESPACE void fill(_ForwardIter __first, _ForwardIter __last, const _Tp &__val)
static void set_error(FDI_Int *fdi, int oper, int err)
#define success(from, fromstr, to, tostr)
GLdouble GLdouble GLdouble GLdouble q
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
static int NONEfdi_decomp(int inlen, int outlen, fdi_decomp_state *decomp_state)
#define cfhead_CabinetSize
cab_UBYTE q_extra_bits[42]
#define cfhead_MinorVersion
#define cfhead_CabinetIndex
int seek(void *fd, ulong off, int mode)
WINE_DEFAULT_DEBUG_CHANNEL(cabinet)
cab_UBYTE outbuf[CAB_BLOCKMAX]
#define cffoldCOMPTYPE_NONE
static cab_LONG fdi_Zipinflate_dynamic(fdi_decomp_state *decomp_state)
void *(__cdecl * PFNALLOC)(ULONG cb)
LONG(__cdecl * PFNSEEK)(INT_PTR hf, LONG dist, int seektype)
#define LZX_BLOCKTYPE_INVALID
#define memcpy(s1, s2, n)
static cab_ULONG checksum(const cab_UBYTE *data, cab_UWORD bytes, cab_ULONG csum)
UINT(__cdecl * PFNWRITE)(INT_PTR hf, void *pv, UINT cb)
static IHTMLWindow2 * window
#define cffile_FolderOffset
#define R0(v, w, x, y, z, i)
static LONG FDI_getoffset(FDI_Int *fdi, INT_PTR hf)
static int fdi_decomp(const struct fdi_file *fi, int savemode, fdi_decomp_state *decomp_state, char *pszCabPath, PFNFDINOTIFY pfnfdin, void *pvUser)
static unsigned __int64 next
#define cffile_FolderIndex
#define LZX_NUM_PRIMARY_LENGTHS
struct fdi_file * firstfile
GLint GLint GLint GLint GLint GLint y
static void free_decompression_temps(FDI_Int *fdi, const struct fdi_folder *fol, fdi_decomp_state *decomp_state)
cab_UBYTE q_length_extra[27]
static cab_LONG fdi_Ziphuft_build(cab_ULONG *b, cab_ULONG n, cab_ULONG s, const cab_UWORD *d, const cab_UWORD *e, struct Ziphuft **t, cab_LONG *m, fdi_decomp_state *decomp_state)
#define READ_HUFFSYM(tbl, var)
static void QTMupdatemodel(struct QTMmodel *model, int sym)
char * strcpy(char *DstString, const char *SrcString)
#define ERROR_CALL_NOT_IMPLEMENTED
static int make_decode_table(cab_ULONG nsyms, cab_ULONG nbits, const cab_UBYTE *length, cab_UWORD *table)
static void fdi_Ziphuft_free(FDI_Int *fdi, struct Ziphuft *t)
BOOL __cdecl FDIIsCabinet(HFDI hfdi, INT_PTR hf, PFDICABINETINFO pfdici)
#define cfheadext_DataReserved
static int LZXfdi_init(int window, fdi_decomp_state *decomp_state)
GLboolean GLboolean GLboolean GLboolean a
struct fdi_folder * current
#define cfheadNEXT_CABINET
const inflate_huft fixed_tl[]
cab_ULONG q_position_base[42]
#define LZX_BLOCKTYPE_VERBATIM
static void QTMfdi_initmodel(struct QTMmodel *m, struct QTMmodelsym *sym, int n, int s)
#define LZX_BLOCKTYPE_ALIGNED
_CRTIMP int __cdecl read(_In_ int _FileHandle, _Out_writes_bytes_(_MaxCharCount) void *_DstBuf, _In_ unsigned int _MaxCharCount)
struct task_struct * current
#define cffileCONTINUED_FROM_PREV
union fdi_cds_fwd::@247 methods
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *