7 modified files
reactos/lib/shlwapi
diff -u -r1.7 -r1.8
--- ordinal.c 16 Apr 2004 08:47:55 -0000 1.7
+++ ordinal.c 8 May 2004 13:49:05 -0000 1.8
@@ -2437,7 +2437,7 @@
#define SHELL_NO_POLICY 0xffffffff
/* default shell policy registry key */
-static WCHAR strRegistryPolicyW[] = {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o',
+static const WCHAR strRegistryPolicyW[] = {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o',
's','o','f','t','\\','W','i','n','d','o','w','s','\\',
'C','u','r','r','e','n','t','V','e','r','s','i','o','n',
'\\','P','o','l','i','c','i','e','s',0};
@@ -2461,7 +2461,7 @@
HKEY hKey;
if (!lpSubKey)
- lpSubKey = (LPCWSTR)strRegistryPolicyW;
+ lpSubKey = strRegistryPolicyW;
retval = RegOpenKeyW(HKEY_LOCAL_MACHINE, lpSubKey, &hKey);
if (retval != ERROR_SUCCESS)
@@ -2641,7 +2641,7 @@
GET_FUNC(pDllGetVersion, shell32, "DllGetVersion", 1);
dwState = pDllGetVersion ? 2 : 1;
- /* Set or delete the key accordinly */
+ /* Set or delete the key accordingly */
dwRet = RegOpenKeyExA(HKEY_LOCAL_MACHINE,
"Software\\Microsoft\\Internet Explorer", 0,
KEY_ALL_ACCESS, &hKey);
@@ -3887,7 +3887,7 @@
*/
BOOL WINAPI SHSkipJunction(IBindCtx *pbc, const CLSID *pclsid)
{
- static WCHAR szSkipBinding[] = { 'S','k','i','p',' ',
+ static const WCHAR szSkipBinding[] = { 'S','k','i','p',' ',
'B','i','n','d','i','n','g',' ','C','L','S','I','D','\0' };
BOOL bRet = FALSE;
@@ -3895,7 +3895,7 @@
{
IUnknown* lpUnk;
- if (SUCCEEDED(IBindCtx_GetObjectParam(pbc, szSkipBinding, &lpUnk)))
+ if (SUCCEEDED(IBindCtx_GetObjectParam(pbc, (LPOLESTR)szSkipBinding, &lpUnk)))
{
CLSID clsid;
reactos/lib/shlwapi
diff -u -r1.5 -r1.6
--- path.c 22 Jan 2004 23:52:53 -0000 1.5
+++ path.c 8 May 2004 13:49:05 -0000 1.6
@@ -1141,8 +1141,8 @@
*/
static BOOL WINAPI SHLWAPI_PathFindInOtherDirs(LPWSTR lpszFile, DWORD dwWhich)
{
- static WCHAR szSystem[] = { 'S','y','s','t','e','m','\0'};
- static WCHAR szPath[] = { 'P','A','T','H','\0'};
+ static const WCHAR szSystem[] = { 'S','y','s','t','e','m','\0'};
+ static const WCHAR szPath[] = { 'P','A','T','H','\0'};
DWORD dwLenPATH;
LPCWSTR lpszCurr;
WCHAR *lpszPATH;
reactos/lib/shlwapi
diff -u -r1.8 -r1.9
--- reg.c 16 Apr 2004 08:47:55 -0000 1.8
+++ reg.c 8 May 2004 13:49:05 -0000 1.9
@@ -1047,7 +1047,7 @@
{
DWORD dwRet = ERROR_SUCCESS, dwDummy;
HKEY hSubKey;
- char szEmpty[] = "";
+ static const char szEmpty[] = { '\0' };
TRACE("(hkey=%p,%s,%s,%ld,%p,%ld)\n", hKey, debugstr_a(lpszSubKey),
debugstr_a(lpszValue), dwType, pvData, cbData);
@@ -1076,7 +1076,7 @@
{
DWORD dwRet = ERROR_SUCCESS, dwDummy;
HKEY hSubKey;
- WCHAR szEmpty[] = { '\0' };
+ static const WCHAR szEmpty[] = { '\0' };
TRACE("(hkey=%p,%s,%s,%ld,%p,%ld)\n", hKey, debugstr_w(lpszSubKey),
debugstr_w(lpszValue), dwType, pvData, cbData);
reactos/lib/shlwapi
diff -u -r1.7 -r1.8
--- string.c 16 Apr 2004 08:47:55 -0000 1.7
+++ string.c 8 May 2004 13:49:05 -0000 1.8
@@ -2530,7 +2530,7 @@
INT WINAPI SHUnicodeToAnsiCP(UINT CodePage, LPCWSTR lpSrcStr, LPSTR lpDstStr,
LPINT lpiLen)
{
- WCHAR emptyW[] = { '\0' };
+ static const WCHAR emptyW[] = { '\0' };
int len , reqLen;
LPSTR mem;
reactos/lib/shlwapi
diff -u -r1.2 -r1.3
--- thread.c 28 Jan 2004 21:57:41 -0000 1.2
+++ thread.c 8 May 2004 13:49:05 -0000 1.3
@@ -310,7 +310,7 @@
if(hThread)
{
/* Wait for the thread to signal us to continue */
- WaitForSingleObject(ti.hEvent, -1);
+ WaitForSingleObject(ti.hEvent, INFINITE);
CloseHandle(hThread);
bCalled = TRUE;
}
reactos/lib/shlwapi
diff -u -r1.6 -r1.7
--- url.c 16 Apr 2004 08:47:55 -0000 1.6
+++ url.c 8 May 2004 13:49:05 -0000 1.7
@@ -643,7 +643,7 @@
debugstr_a(pszBase),debugstr_a(pszRelative),
pcchCombined?*pcchCombined:0,dwFlags);
- if(!pszBase || !pszRelative || !pszCombined || !pcchCombined)
+ if(!pszBase || !pszRelative || !pcchCombined)
return E_INVALIDARG;
base = (LPWSTR) HeapAlloc(GetProcessHeap(), 0,
@@ -653,10 +653,11 @@
MultiByteToWideChar(0, 0, pszBase, -1, base, INTERNET_MAX_URL_LENGTH);
MultiByteToWideChar(0, 0, pszRelative, -1, relative, INTERNET_MAX_URL_LENGTH);
- len = INTERNET_MAX_URL_LENGTH;
+ len = *pcchCombined;
- ret = UrlCombineW(base, relative, combined, &len, dwFlags);
+ ret = UrlCombineW(base, relative, pszCombined?combined:NULL, &len, dwFlags);
if (ret != S_OK) {
+ *pcchCombined = len;
HeapFree(GetProcessHeap(), 0, base);
return ret;
}
@@ -667,7 +668,7 @@
HeapFree(GetProcessHeap(), 0, base);
return E_POINTER;
}
- WideCharToMultiByte(0, 0, combined, len+1, pszCombined, *pcchCombined,
+ WideCharToMultiByte(0, 0, combined, len+1, pszCombined, (*pcchCombined)+1,
0, 0);
*pcchCombined = len2;
HeapFree(GetProcessHeap(), 0, base);
@@ -687,15 +688,15 @@
DWORD myflags, sizeloc = 0;
DWORD len, res1, res2, process_case = 0;
LPWSTR work, preliminary, mbase, mrelative;
- WCHAR myfilestr[] = {'f','i','l','e',':','/','/','/','\0'};
- WCHAR single_slash[] = {'/','\0'};
+ static const WCHAR myfilestr[] = {'f','i','l','e',':','/','/','/','\0'};
+ static const WCHAR single_slash[] = {'/','\0'};
HRESULT ret;
TRACE("(base %s, Relative %s, Combine size %ld, flags %08lx)\n",
debugstr_w(pszBase),debugstr_w(pszRelative),
pcchCombined?*pcchCombined:0,dwFlags);
- if(!pszBase || !pszRelative || !pszCombined || !pcchCombined)
+ if(!pszBase || !pszRelative || !pcchCombined)
return E_INVALIDARG;
base.size = 24;
@@ -829,12 +830,6 @@
* Return pszRelative appended to what ever is in pszCombined,
* (which may the string "file:///"
*/
- len = strlenW(mrelative) + strlenW(preliminary);
- if (len+1 > *pcchCombined) {
- *pcchCombined = len;
- ret = E_POINTER;
- break;
- }
strcatW(preliminary, mrelative);
break;
@@ -842,12 +837,6 @@
* Same as case 1, but if URL_PLUGGABLE_PROTOCOL was specified
* and pszRelative starts with "//", then append a "/"
*/
- len = strlenW(mrelative) + 1;
- if (len+1 > *pcchCombined) {
- *pcchCombined = len;
- ret = E_POINTER;
- break;
- }
strcpyW(preliminary, mrelative);
if (!(dwFlags & URL_PLUGGABLE_PROTOCOL) &&
URL_JustLocation(relative.ap2))
@@ -855,15 +844,9 @@
break;
case 3: /*
- * Return the pszBase scheme with pszRelative. Basicly
+ * Return the pszBase scheme with pszRelative. Basically
* keeps the scheme and replaces the domain and following.
*/
- len = base.sizep1 + 1 + relative.sizep2 + 1;
- if (len+1 > *pcchCombined) {
- *pcchCombined = len;
- ret = E_POINTER;
- break;
- }
strncpyW(preliminary, base.ap1, base.sizep1 + 1);
work = preliminary + base.sizep1 + 1;
strcpyW(work, relative.ap2);
@@ -877,12 +860,6 @@
* after the location is pszRelative. (Replace document
* from root on.)
*/
- len = base.sizep1 + 1 + sizeloc + relative.sizep2 + 1;
- if (len+1 > *pcchCombined) {
- *pcchCombined = len;
- ret = E_POINTER;
- break;
- }
strncpyW(preliminary, base.ap1, base.sizep1+1+sizeloc);
work = preliminary + base.sizep1 + 1 + sizeloc;
if (dwFlags & URL_PLUGGABLE_PROTOCOL)
@@ -894,12 +871,6 @@
* Return the pszBase without its document (if any) and
* append pszRelative after its scheme.
*/
- len = base.sizep1 + 1 + base.sizep2 + relative.sizep2;
- if (len+1 > *pcchCombined) {
- *pcchCombined = len;
- ret = E_POINTER;
- break;
- }
strncpyW(preliminary, base.ap1, base.sizep1+1+base.sizep2);
work = preliminary + base.sizep1+1+base.sizep2 - 1;
if (*work++ != L'/')
@@ -913,21 +884,10 @@
}
if (ret == S_OK) {
- /*
- * Now that the combining is done, process the escape options if
- * necessary, otherwise just copy the string.
- */
- myflags = dwFlags & (URL_ESCAPE_PERCENT |
- URL_ESCAPE_SPACES_ONLY |
- URL_DONT_ESCAPE_EXTRA_INFO |
- URL_ESCAPE_SEGMENT_ONLY);
- if (myflags)
- ret = UrlEscapeW(preliminary, pszCombined,
- pcchCombined, myflags);
- else {
- len = (strlenW(preliminary) + 1) * sizeof(WCHAR);
- memcpy(pszCombined, preliminary, len);
- *pcchCombined = strlenW(preliminary);
+ /* Reuse mrelative as temp storage as its already allocated and not needed anymore */
+ ret = UrlCanonicalizeW(preliminary, mrelative, pcchCombined, dwFlags);
+ if(SUCCEEDED(ret) && pszCombined) {
+ lstrcpyW(pszCombined, mrelative);
}
TRACE("return-%ld len=%ld, %s\n",
process_case, *pcchCombined, debugstr_w(pszCombined));
reactos/lib/shlwapi
diff -u -r1.5 -r1.6
--- winehq2ros.patch 11 Mar 2004 22:30:40 -0000 1.5
+++ winehq2ros.patch 8 May 2004 13:49:05 -0000 1.6
@@ -1,10 +1,10 @@
Index: path.c
===================================================================
RCS file: /home/wine/wine/dlls/shlwapi/path.c,v
-retrieving revision 1.41
-diff -u -r1.41 path.c
---- path.c 23 Jan 2004 22:45:25 -0000 1.41
-+++ path.c 11 Mar 2004 22:38:00 -0000
+retrieving revision 1.42
+diff -u -r1.42 path.c
+--- path.c 20 Apr 2004 00:34:52 -0000 1.42
++++ path.c 8 May 2004 13:58:39 -0000
@@ -32,6 +32,7 @@
#include "wingdi.h"
#include "winuser.h"
@@ -16,10 +16,10 @@
Index: shlwapi.spec
===================================================================
RCS file: /home/wine/wine/dlls/shlwapi/shlwapi.spec,v
-retrieving revision 1.88
-diff -u -r1.88 shlwapi.spec
---- shlwapi.spec 28 Feb 2004 01:46:56 -0000 1.88
-+++ shlwapi.spec 11 Mar 2004 22:38:00 -0000
+retrieving revision 1.90
+diff -u -r1.90 shlwapi.spec
+--- shlwapi.spec 27 Mar 2004 01:38:26 -0000 1.90
++++ shlwapi.spec 8 May 2004 13:58:39 -0000
@@ -368,9 +368,9 @@
368 stdcall @(wstr wstr ptr long wstr) kernel32.GetPrivateProfileStructW
369 stdcall @(wstr wstr ptr ptr long long ptr wstr ptr ptr) kernel32.CreateProcessW
@@ -45,10 +45,10 @@
Index: string.c
===================================================================
RCS file: /home/wine/wine/dlls/shlwapi/string.c,v
-retrieving revision 1.44
-diff -u -r1.44 string.c
---- string.c 20 Feb 2004 05:16:37 -0000 1.44
-+++ string.c 11 Mar 2004 22:38:01 -0000
+retrieving revision 1.46
+diff -u -r1.46 string.c
+--- string.c 20 Apr 2004 01:12:17 -0000 1.46
++++ string.c 8 May 2004 13:58:40 -0000
@@ -528,7 +528,7 @@
{
TRACE("(%s,%s)\n", debugstr_w(lpszStr), debugstr_w(lpszSearch));
@@ -70,11 +70,11 @@
Index: url.c
===================================================================
RCS file: /home/wine/wine/dlls/shlwapi/url.c,v
-retrieving revision 1.29
-diff -u -r1.29 url.c
---- url.c 3 Mar 2004 20:11:46 -0000 1.29
-+++ url.c 11 Mar 2004 22:38:02 -0000
-@@ -1423,8 +1423,8 @@
+retrieving revision 1.33
+diff -u -r1.33 url.c
+--- url.c 27 Apr 2004 23:29:02 -0000 1.33
++++ url.c 8 May 2004 13:58:41 -0000
+@@ -1386,8 +1386,8 @@
* Success: TRUE. lpDest is filled with the computed hash value.
* Failure: FALSE, if any argument is invalid.
*/
CVSspam 0.2.8