Author: akhaldi
Date: Fri Sep 20 10:53:58 2013
New Revision: 60244
URL:
http://svn.reactos.org/svn/reactos?rev=60244&view=rev
Log:
[ITSS]
* Sync with Wine 1.7.1.
CORE-7469
Modified:
trunk/reactos/dll/win32/itss/CMakeLists.txt
trunk/reactos/dll/win32/itss/chm_lib.c
trunk/reactos/dll/win32/itss/itss.c
trunk/reactos/dll/win32/itss/moniker.c
trunk/reactos/dll/win32/itss/protocol.c
trunk/reactos/dll/win32/itss/storage.c
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/itss/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/itss/CMakeLists.…
==============================================================================
--- trunk/reactos/dll/win32/itss/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/itss/CMakeLists.txt [iso-8859-1] Fri Sep 20 10:53:58 2013
@@ -11,30 +11,11 @@
moniker.c
protocol.c
storage.c
- #${REACTOS_BINARY_DIR}/include/reactos/wine/itss_i.c
${CMAKE_CURRENT_BINARY_DIR}/itss_stubs.c
${CMAKE_CURRENT_BINARY_DIR}/itss.def)
-add_library(itss SHARED
- ${SOURCE}
- rsrc.rc)
-
+add_library(itss SHARED ${SOURCE} rsrc.rc)
set_module_type(itss win32dll)
target_link_libraries(itss uuid wine)
-
-if(NOT MSVC)
- # FIXME:
http://www.cmake.org/Bug/view.php?id=12998
- #allow_warnings(itss)
- set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS
"-Wno-error")
-endif()
-
-add_importlibs(itss
- urlmon
- shlwapi
- ole32
- msvcrt
- kernel32
- ntdll)
-
-add_dependencies(itss wineheaders)
+add_importlibs(itss urlmon shlwapi ole32 msvcrt kernel32 ntdll)
add_cd_file(TARGET itss DESTINATION reactos/system32 FOR all)
Modified: trunk/reactos/dll/win32/itss/chm_lib.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/itss/chm_lib.c?r…
==============================================================================
--- trunk/reactos/dll/win32/itss/chm_lib.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/itss/chm_lib.c [iso-8859-1] Fri Sep 20 10:53:58 2013
@@ -835,7 +835,7 @@
struct chmFile *newHandle=NULL;
newHandle = HeapAlloc(GetProcessHeap(), 0, sizeof(struct chmFile));
- memcpy(newHandle, oldHandle, sizeof(struct chmFile));
+ *newHandle = *oldHandle;
/* duplicate fd handle */
DuplicateHandle(GetCurrentProcess(), oldHandle->fd,
Modified: trunk/reactos/dll/win32/itss/itss.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/itss/itss.c?rev=…
==============================================================================
--- trunk/reactos/dll/win32/itss/itss.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/itss/itss.c [iso-8859-1] Fri Sep 20 10:53:58 2013
@@ -62,8 +62,6 @@
DisableThreadLibraryCalls(hInstDLL);
hInst = hInstDLL;
break;
- case DLL_PROCESS_DETACH:
- break;
}
return TRUE;
}
@@ -200,8 +198,8 @@
if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IITStorage))
{
- IClassFactory_AddRef(iface);
- *ppvObject = This;
+ IITStorage_AddRef(iface);
+ *ppvObject = iface;
return S_OK;
}
Modified: trunk/reactos/dll/win32/itss/moniker.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/itss/moniker.c?r…
==============================================================================
--- trunk/reactos/dll/win32/itss/moniker.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/itss/moniker.c [iso-8859-1] Fri Sep 20 10:53:58 2013
@@ -69,8 +69,8 @@
if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IParseDisplayName))
{
- IClassFactory_AddRef(iface);
- *ppvObject = This;
+ IMoniker_AddRef(iface);
+ *ppvObject = iface;
return S_OK;
}
@@ -358,7 +358,7 @@
DWORD sz;
/* szFile[1] has space for one character already */
- sz = sizeof(ITS_IMonikerImpl) + strlenW( name )*sizeof(WCHAR);
+ sz = FIELD_OFFSET( ITS_IMonikerImpl, szFile[strlenW( name ) + 1] );
itsmon = HeapAlloc( GetProcessHeap(), 0, sz );
itsmon->IMoniker_iface.lpVtbl = &ITS_IMonikerImpl_Vtbl;
@@ -399,8 +399,8 @@
if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IParseDisplayName))
{
- IClassFactory_AddRef(iface);
- *ppvObject = This;
+ IParseDisplayName_AddRef(iface);
+ *ppvObject = iface;
return S_OK;
}
Modified: trunk/reactos/dll/win32/itss/protocol.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/itss/protocol.c?…
==============================================================================
--- trunk/reactos/dll/win32/itss/protocol.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/itss/protocol.c [iso-8859-1] Fri Sep 20 10:53:58 2013
@@ -138,6 +138,55 @@
return NULL;
}
+/* Adopted from urlmon */
+static void remove_dot_segments(WCHAR *path) {
+ const WCHAR *in = path;
+ WCHAR *out = path;
+
+ while(1) {
+ /* Move the first path segment in the input buffer to the end of
+ * the output buffer, and any subsequent characters up to, including
+ * the next "/" character (if any) or the end of the input buffer.
+ */
+ while(*in != '/') {
+ if(!(*out++ = *in++))
+ return;
+ }
+
+ *out++ = *in++;
+
+ while(*in) {
+ if(*in != '.')
+ break;
+
+ /* Handle ending "/." */
+ if(!in[1]) {
+ ++in;
+ break;
+ }
+
+ /* Handle "/./" */
+ if(in[1] == '/') {
+ in += 2;
+ continue;
+ }
+
+ /* If we don't have "/../" or ending "/.." */
+ if(in[1] != '.' || (in[2] && in[2] != '/'))
+ break;
+
+ in += *in ? 3 : 2;
+
+ /* Find the slash preceding out pointer and move out pointer to it */
+ if(out > path+1 && *--out == '/')
+ --out;
+ while(out > path && *(--out) != '/');
+ if(*out == '/')
+ ++out;
+ }
+ }
+}
+
static HRESULT report_result(IInternetProtocolSink *sink, HRESULT hres)
{
IInternetProtocolSink_ReportResult(sink, hres, 0, NULL);
@@ -218,6 +267,8 @@
if(*p == '\\')
*p = '/';
}
+
+ remove_dot_segments(object_name);
TRACE("Resolving %s\n", debugstr_w(object_name));
@@ -422,7 +473,9 @@
if(strchrW(pwzRelativeUrl, ':'))
return STG_E_INVALIDNAME;
- if(pwzRelativeUrl[0] != '/') {
+ if(pwzRelativeUrl[0] == '#') {
+ base_end += strlenW(base_end);
+ }else if(pwzRelativeUrl[0] != '/') {
ptr = strrchrW(base_end, '/');
if(ptr)
base_end = ptr+1;
Modified: trunk/reactos/dll/win32/itss/storage.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/itss/storage.c?r…
==============================================================================
--- trunk/reactos/dll/win32/itss/storage.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/itss/storage.c [iso-8859-1] Fri Sep 20 10:53:58 2013
@@ -620,13 +620,11 @@
struct chmFile *chmfile, const WCHAR *dir, IStorage** ppstgOpen )
{
ITSS_IStorageImpl *stg;
- DWORD len;
TRACE("%p %s\n", chmfile, debugstr_w( dir ) );
- len = strlenW( dir ) + 1;
- stg = HeapAlloc( GetProcessHeap(), 0,
- sizeof (ITSS_IStorageImpl) + len*sizeof(WCHAR) );
+ stg = HeapAlloc( GetProcessHeap(), 0,
+ FIELD_OFFSET( ITSS_IStorageImpl, dir[strlenW( dir ) + 1] ));
stg->IStorage_iface.lpVtbl = &ITSS_IStorageImpl_Vtbl;
stg->ref = 1;
stg->chmfile = chmfile;
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Fri Sep 20 10:53:58 2013
@@ -90,7 +90,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.5.4
+reactos/dll/win32/itss # Synced to Wine-1.7.1
reactos/dll/win32/jscript # Synced to Wine-1.5.26
reactos/dll/win32/loadperf # Synced to Wine-1.5.19
reactos/dll/win32/localspl # Synced to Wine-1.5.26