Author: akhaldi Date: Tue Apr 22 21:30:00 2014 New Revision: 62897
URL: http://svn.reactos.org/svn/reactos?rev=62897&view=rev Log: [ITSS] * Sync with Wine 1.7.17. CORE-8080
Modified: trunk/reactos/dll/win32/itss/chm_lib.c trunk/reactos/dll/win32/itss/chm_lib.h trunk/reactos/dll/win32/itss/itss.idl trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/itss/chm_lib.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/itss/chm_lib.c?re... ============================================================================== --- trunk/reactos/dll/win32/itss/chm_lib.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/itss/chm_lib.c [iso-8859-1] Tue Apr 22 21:30:00 2014 @@ -95,64 +95,64 @@ typedef ULONGLONG UInt64;
/* utilities for unmarshalling data */ -static int _unmarshal_char_array(unsigned char **pData, - unsigned int *pLenRemain, - char *dest, - int count) +static BOOL _unmarshal_char_array(unsigned char **pData, + unsigned int *pLenRemain, + char *dest, + int count) { if (count <= 0 || (unsigned int)count > *pLenRemain) - return 0; + return FALSE; memcpy(dest, (*pData), count); *pData += count; *pLenRemain -= count; - return 1; -} - -static int _unmarshal_uchar_array(unsigned char **pData, - unsigned int *pLenRemain, - unsigned char *dest, - int count) -{ - if (count <= 0 || (unsigned int)count > *pLenRemain) - return 0; + return TRUE; +} + +static BOOL _unmarshal_uchar_array(unsigned char **pData, + unsigned int *pLenRemain, + unsigned char *dest, + int count) +{ + if (count <= 0 || (unsigned int)count > *pLenRemain) + return FALSE; memcpy(dest, (*pData), count); *pData += count; *pLenRemain -= count; - return 1; -} - -static int _unmarshal_int32(unsigned char **pData, - unsigned int *pLenRemain, - Int32 *dest) + return TRUE; +} + +static BOOL _unmarshal_int32(unsigned char **pData, + unsigned int *pLenRemain, + Int32 *dest) { if (4 > *pLenRemain) - return 0; + return FALSE; *dest = (*pData)[0] | (*pData)[1]<<8 | (*pData)[2]<<16 | (*pData)[3]<<24; *pData += 4; *pLenRemain -= 4; - return 1; -} - -static int _unmarshal_uint32(unsigned char **pData, - unsigned int *pLenRemain, - UInt32 *dest) + return TRUE; +} + +static BOOL _unmarshal_uint32(unsigned char **pData, + unsigned int *pLenRemain, + UInt32 *dest) { if (4 > *pLenRemain) - return 0; + return FALSE; *dest = (*pData)[0] | (*pData)[1]<<8 | (*pData)[2]<<16 | (*pData)[3]<<24; *pData += 4; *pLenRemain -= 4; - return 1; -} - -static int _unmarshal_int64(unsigned char **pData, - unsigned int *pLenRemain, - Int64 *dest) + return TRUE; +} + +static BOOL _unmarshal_int64(unsigned char **pData, + unsigned int *pLenRemain, + Int64 *dest) { Int64 temp; int i; if (8 > *pLenRemain) - return 0; + return FALSE; temp=0; for(i=8; i>0; i--) { @@ -162,17 +162,17 @@ *dest = temp; *pData += 8; *pLenRemain -= 8; - return 1; -} - -static int _unmarshal_uint64(unsigned char **pData, - unsigned int *pLenRemain, - UInt64 *dest) + return TRUE; +} + +static BOOL _unmarshal_uint64(unsigned char **pData, + unsigned int *pLenRemain, + UInt64 *dest) { UInt64 temp; int i; if (8 > *pLenRemain) - return 0; + return FALSE; temp=0; for(i=8; i>0; i--) { @@ -182,12 +182,12 @@ *dest = temp; *pData += 8; *pLenRemain -= 8; - return 1; -} - -static int _unmarshal_uuid(unsigned char **pData, - unsigned int *pDataLen, - unsigned char *dest) + return TRUE; +} + +static BOOL _unmarshal_uuid(unsigned char **pData, + unsigned int *pDataLen, + unsigned char *dest) { return _unmarshal_uchar_array(pData, pDataLen, dest, 16); } @@ -241,13 +241,13 @@ UInt64 data_offset; /* 58 (Not present before V3) */ }; /* __attribute__ ((aligned (1))); */
-static int _unmarshal_itsf_header(unsigned char **pData, - unsigned int *pDataLen, - struct chmItsfHeader *dest) +static BOOL _unmarshal_itsf_header(unsigned char **pData, + unsigned int *pDataLen, + struct chmItsfHeader *dest) { /* we only know how to deal with the 0x58 and 0x60 byte structures */ if (*pDataLen != _CHM_ITSF_V2_LEN && *pDataLen != _CHM_ITSF_V3_LEN) - return 0; + return FALSE;
/* unmarshal common fields */ _unmarshal_char_array(pData, pDataLen, dest->signature, 4); @@ -268,19 +268,19 @@ * current MS tools do not seem to use them. */ if (memcmp(dest->signature, "ITSF", 4) != 0) - return 0; + return FALSE; if (dest->version == 2) { if (dest->header_len < _CHM_ITSF_V2_LEN) - return 0; + return FALSE; } else if (dest->version == 3) { if (dest->header_len < _CHM_ITSF_V3_LEN) - return 0; + return FALSE; } else - return 0; + return FALSE;
/* now, if we have a V3 structure, unmarshal the rest. * otherwise, compute it @@ -290,12 +290,12 @@ if (*pDataLen != 0) _unmarshal_uint64(pData, pDataLen, &dest->data_offset); else - return 0; + return FALSE; } else dest->data_offset = dest->dir_offset + dest->dir_len;
- return 1; + return TRUE; }
/* structure of ITSP headers */ @@ -319,13 +319,13 @@ UChar unknown_0044[16]; /* 44 */ }; /* __attribute__ ((aligned (1))); */
-static int _unmarshal_itsp_header(unsigned char **pData, - unsigned int *pDataLen, - struct chmItspHeader *dest) +static BOOL _unmarshal_itsp_header(unsigned char **pData, + unsigned int *pDataLen, + struct chmItspHeader *dest) { /* we only know how to deal with a 0x54 byte structures */ if (*pDataLen != _CHM_ITSP_V1_LEN) - return 0; + return FALSE;
/* unmarshal fields */ _unmarshal_char_array(pData, pDataLen, dest->signature, 4); @@ -346,13 +346,13 @@
/* error check the data */ if (memcmp(dest->signature, "ITSP", 4) != 0) - return 0; + return FALSE; if (dest->version != 1) - return 0; + return FALSE; if (dest->header_len != _CHM_ITSP_V1_LEN) - return 0; - - return 1; + return FALSE; + + return TRUE; }
/* structure of PMGL headers */ @@ -367,13 +367,13 @@ Int32 block_next; /* 10 */ }; /* __attribute__ ((aligned (1))); */
-static int _unmarshal_pmgl_header(unsigned char **pData, - unsigned int *pDataLen, - struct chmPmglHeader *dest) +static BOOL _unmarshal_pmgl_header(unsigned char **pData, + unsigned int *pDataLen, + struct chmPmglHeader *dest) { /* we only know how to deal with a 0x14 byte structures */ if (*pDataLen != _CHM_PMGL_LEN) - return 0; + return FALSE;
/* unmarshal fields */ _unmarshal_char_array(pData, pDataLen, dest->signature, 4); @@ -384,9 +384,9 @@
/* check structure */ if (memcmp(dest->signature, _chm_pmgl_marker, 4) != 0) - return 0; - - return 1; + return FALSE; + + return TRUE; }
/* structure of PMGI headers */ @@ -398,13 +398,13 @@ UInt32 free_space; /* 4 */ }; /* __attribute__ ((aligned (1))); */
-static int _unmarshal_pmgi_header(unsigned char **pData, - unsigned int *pDataLen, - struct chmPmgiHeader *dest) +static BOOL _unmarshal_pmgi_header(unsigned char **pData, + unsigned int *pDataLen, + struct chmPmgiHeader *dest) { /* we only know how to deal with a 0x8 byte structures */ if (*pDataLen != _CHM_PMGI_LEN) - return 0; + return FALSE;
/* unmarshal fields */ _unmarshal_char_array(pData, pDataLen, dest->signature, 4); @@ -412,9 +412,9 @@
/* check structure */ if (memcmp(dest->signature, _chm_pmgi_marker, 4) != 0) - return 0; - - return 1; + return FALSE; + + return TRUE; }
/* structure of LZXC reset table */ @@ -430,13 +430,13 @@ UInt64 block_len; }; /* __attribute__ ((aligned (1))); */
-static int _unmarshal_lzxc_reset_table(unsigned char **pData, - unsigned int *pDataLen, - struct chmLzxcResetTable *dest) +static BOOL _unmarshal_lzxc_reset_table(unsigned char **pData, + unsigned int *pDataLen, + struct chmLzxcResetTable *dest) { /* we only know how to deal with a 0x28 byte structures */ if (*pDataLen != _CHM_LZXC_RESETTABLE_V1_LEN) - return 0; + return FALSE;
/* unmarshal fields */ _unmarshal_uint32 (pData, pDataLen, &dest->version); @@ -449,9 +449,9 @@
/* check structure */ if (dest->version != 2) - return 0; - - return 1; + return FALSE; + + return TRUE; }
/* structure of LZXC control data block */ @@ -468,13 +468,13 @@ UInt32 unknown_18; /* 18 */ };
-static int _unmarshal_lzxc_control_data(unsigned char **pData, - unsigned int *pDataLen, - struct chmLzxcControlData *dest) +static BOOL _unmarshal_lzxc_control_data(unsigned char **pData, + unsigned int *pDataLen, + struct chmLzxcControlData *dest) { /* we want at least 0x18 bytes */ if (*pDataLen < _CHM_LZXC_MIN_LEN) - return 0; + return FALSE;
/* unmarshal fields */ _unmarshal_uint32 (pData, pDataLen, &dest->size); @@ -495,19 +495,19 @@ dest->windowSize *= 0x8000; } if (dest->windowSize == 0 || dest->resetInterval == 0) - return 0; + return FALSE;
/* for now, only support resetInterval a multiple of windowSize/2 */ if (dest->windowSize == 1) - return 0; + return FALSE; if ((dest->resetInterval % (dest->windowSize/2)) != 0) - return 0; + return FALSE;
/* check structure */ if (memcmp(dest->signature, "LZXC", 4) != 0) - return 0; - - return 1; + return FALSE; + + return TRUE; }
/* the structure used for chm file handles */ @@ -920,7 +920,7 @@ }
/* parse a utf-8 string into an ASCII char buffer */ -static int _chm_parse_UTF8(UChar **pEntry, UInt64 count, WCHAR *path) +static BOOL _chm_parse_UTF8(UChar **pEntry, UInt64 count, WCHAR *path) { /* MJM - Modified to return real Unicode strings */ while (count != 0) @@ -930,28 +930,28 @@ }
*path = '\0'; - return 1; + return TRUE; }
/* parse a PMGL entry into a chmUnitInfo struct; return 1 on success. */ -static int _chm_parse_PMGL_entry(UChar **pEntry, struct chmUnitInfo *ui) +static BOOL _chm_parse_PMGL_entry(UChar **pEntry, struct chmUnitInfo *ui) { UInt64 strLen;
/* parse str len */ strLen = _chm_parse_cword(pEntry); if (strLen > CHM_MAX_PATHLEN) - return 0; + return FALSE;
/* parse path */ if (! _chm_parse_UTF8(pEntry, strLen, ui->path)) - return 0; + return FALSE;
/* parse info */ ui->space = (int)_chm_parse_cword(pEntry); ui->start = _chm_parse_cword(pEntry); ui->length = _chm_parse_cword(pEntry); - return 1; + return TRUE; }
/* find an exact entry in PMGL; return NULL if we fail */ @@ -1108,11 +1108,11 @@ * utility methods for dealing with compressed data */
-/* get the bounds of a compressed block. return 0 on failure */ -static int _chm_get_cmpblock_bounds(struct chmFile *h, - UInt64 block, - UInt64 *start, - Int64 *len) +/* get the bounds of a compressed block. Returns FALSE on failure */ +static BOOL _chm_get_cmpblock_bounds(struct chmFile *h, + UInt64 block, + UInt64 *start, + Int64 *len) { UChar buffer[8], *dummy; UInt32 remain; @@ -1130,7 +1130,7 @@ + block*8, remain) != remain || !_unmarshal_uint64(&dummy, &remain, start)) - return 0; + return FALSE;
/* unpack the end address */ dummy = buffer; @@ -1142,7 +1142,7 @@ + block*8 + 8, remain) != remain || !_unmarshal_int64(&dummy, &remain, len)) - return 0; + return FALSE; }
/* for the last block, use the span in addition to the reset table */ @@ -1158,7 +1158,7 @@ + block*8, remain) != remain || !_unmarshal_uint64(&dummy, &remain, start)) - return 0; + return FALSE;
*len = h->reset_table.compressed_len; } @@ -1167,7 +1167,7 @@ *len -= *start; *start += h->data_offset + h->cn_unit.start;
- return 1; + return TRUE; }
/* decompress the block. must have lzx_mutex. */ @@ -1392,11 +1392,11 @@ } }
-int chm_enumerate_dir(struct chmFile *h, - const WCHAR *prefix, - int what, - CHM_ENUMERATOR e, - void *context) +BOOL chm_enumerate_dir(struct chmFile *h, + const WCHAR *prefix, + int what, + CHM_ENUMERATOR e, + void *context) { /* * XXX: do this efficiently (i.e. using the tree index) @@ -1411,8 +1411,8 @@ UChar *cur; unsigned int lenRemain;
- /* set to 1 once we've started */ - int it_has_begun=0; + /* set to TRUE once we've started */ + BOOL it_has_begun = FALSE;
/* the current ui */ struct chmUnitInfo ui; @@ -1454,7 +1454,7 @@ h->block_len) != h->block_len) { HeapFree(GetProcessHeap(), 0, page_buf); - return 0; + return FALSE; }
/* figure out start and end for this page */ @@ -1463,7 +1463,7 @@ if (! _unmarshal_pmgl_header(&cur, &lenRemain, &header)) { HeapFree(GetProcessHeap(), 0, page_buf); - return 0; + return FALSE; } end = page_buf + h->block_len - (header.free_space);
@@ -1473,14 +1473,14 @@ if (! _chm_parse_PMGL_entry(&cur, &ui)) { HeapFree(GetProcessHeap(), 0, page_buf); - return 0; + return FALSE; }
/* check if we should start */ if (! it_has_begun) { if (ui.length == 0 && strncmpiW(ui.path, prefixRectified, prefixLen) == 0) - it_has_begun = 1; + it_has_begun = TRUE; else continue;
@@ -1494,7 +1494,7 @@ if (strncmpiW(ui.path, prefixRectified, prefixLen) != 0) { HeapFree(GetProcessHeap(), 0, page_buf); - return 1; + return TRUE; } }
@@ -1540,12 +1540,12 @@ { case CHM_ENUMERATOR_FAILURE: HeapFree(GetProcessHeap(), 0, page_buf); - return 0; + return FALSE; case CHM_ENUMERATOR_CONTINUE: break; case CHM_ENUMERATOR_SUCCESS: HeapFree(GetProcessHeap(), 0, page_buf); - return 1; + return TRUE; default: break; } @@ -1557,5 +1557,5 @@ }
HeapFree(GetProcessHeap(), 0, page_buf); - return 1; -} + return TRUE; +}
Modified: trunk/reactos/dll/win32/itss/chm_lib.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/itss/chm_lib.h?re... ============================================================================== --- trunk/reactos/dll/win32/itss/chm_lib.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/itss/chm_lib.h [iso-8859-1] Tue Apr 22 21:30:00 2014 @@ -105,10 +105,10 @@ #define CHM_ENUMERATOR_FAILURE (0) #define CHM_ENUMERATOR_CONTINUE (1) #define CHM_ENUMERATOR_SUCCESS (2) -int chm_enumerate_dir(struct chmFile *h, - const WCHAR *prefix, - int what, - CHM_ENUMERATOR e, - void *context) DECLSPEC_HIDDEN; +BOOL chm_enumerate_dir(struct chmFile *h, + const WCHAR *prefix, + int what, + CHM_ENUMERATOR e, + void *context) DECLSPEC_HIDDEN;
#endif /* INCLUDED_CHMLIB_H */
Modified: trunk/reactos/dll/win32/itss/itss.idl URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/itss/itss.idl?rev... ============================================================================== --- trunk/reactos/dll/win32/itss/itss.idl [iso-8859-1] (original) +++ trunk/reactos/dll/win32/itss/itss.idl [iso-8859-1] Tue Apr 22 21:30:00 2014 @@ -17,6 +17,8 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ + +#pragma makedep register
[ helpstring("Microsoft InfoTech Protocol for IE 3.0"),
Modified: trunk/reactos/media/doc/README.WINE URL: http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=6... ============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Tue Apr 22 21:30:00 2014 @@ -91,7 +91,7 @@ reactos/dll/win32/inseng # Synced to Wine-1.7.1 reactos/dll/win32/iphlpapi # Out of sync reactos/dll/win32/itircl # Synced to Wine-1.7.1 -reactos/dll/win32/itss # Synced to Wine-1.7.1 +reactos/dll/win32/itss # Synced to Wine-1.7.17 reactos/dll/win32/jscript # Synced to Wine-1.7.1 reactos/dll/win32/loadperf # Synced to Wine-1.7.1 reactos/dll/win32/localspl # Synced to Wine-1.7.1