Module: wine
Branch: refs/heads/master
Commit: 80e4fb597537b6db4f38a35783131d6f0906a02e
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=80e4fb597537b6db4f38a35…
Author: Robert Shearman <rob(a)codeweavers.com>
Date: Tue Mar 21 13:44:36 2006 +0000
wininet: InternetCreateUrlW should return the number of bytes needed.
InternetCreateUrlW should return the number of bytes needed to store
the URL, not the number of characters (reported by Sven Paschukat).
---
dlls/wininet/http.c | 5 +++--
dlls/wininet/internet.c | 25 ++++++++++++++++++++-----
2 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index 1a2638c..76f7b7e 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -2003,9 +2003,10 @@ static BOOL HTTP_HandleRedirect(LPWININE
(GetLastError() != ERROR_INSUFFICIENT_BUFFER))
return FALSE;
- url_length++; /* for nul terminating character */
- orig_url = HeapAlloc(GetProcessHeap(), 0, url_length * sizeof(WCHAR));
+ orig_url = HeapAlloc(GetProcessHeap(), 0, url_length);
+ /* convert from bytes to characters */
+ url_length = url_length / sizeof(WCHAR) - 1;
if (!InternetCreateUrlW(&urlComponents, 0, orig_url, &url_length))
{
HeapFree(GetProcessHeap(), 0, orig_url);
diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c
index 42eb61d..cde3d52 100644
--- a/dlls/wininet/internet.c
+++ b/dlls/wininet/internet.c
@@ -3900,10 +3900,7 @@ static void convert_urlcomp_atow(LPURL_C
/***********************************************************************
* InternetCreateUrlA (WININET.@)
*
- * RETURNS
- * TRUE on success
- * FALSE on failure
- *
+ * See InternetCreateUrlW.
*/
BOOL WINAPI InternetCreateUrlA(LPURL_COMPONENTSA lpUrlComponents, DWORD dwFlags,
LPSTR lpszUrl, LPDWORD lpdwUrlLength)
@@ -3930,6 +3927,9 @@ BOOL WINAPI InternetCreateUrlA(LPURL_COM
ret = InternetCreateUrlW(&urlCompW, dwFlags, urlW, lpdwUrlLength);
+ if (!ret && (GetLastError() == ERROR_INSUFFICIENT_BUFFER))
+ *lpdwUrlLength /= sizeof(WCHAR);
+
/* on success, lpdwUrlLength points to the size of urlW in WCHARS
* minus one, so add one to leave room for NULL terminator
*/
@@ -3950,6 +3950,21 @@ BOOL WINAPI InternetCreateUrlA(LPURL_COM
/***********************************************************************
* InternetCreateUrlW (WININET.@)
*
+ * Creates a URL from its component parts.
+ *
+ * PARAMS
+ * lpUrlComponents [I] URL Components.
+ * dwFlags [I] Flags. See notes.
+ * lpszUrl [I] Buffer in which to store the created URL.
+ * lpdwUrlLength [I/O] On input, the length of the buffer pointed to by
+ * lpszUrl in characters. On output, the number of bytes
+ * required to store the URL including terminator.
+ *
+ * NOTES
+ *
+ * The dwFlags parameter can be zero or more of the following:
+ *|ICU_ESCAPE - Generates escape sequences for unsafe characters in the path and extra info of the URL.
+ *
* RETURNS
* TRUE on success
* FALSE on failure
@@ -3980,7 +3995,7 @@ BOOL WINAPI InternetCreateUrlW(LPURL_COM
if (!lpszUrl || *lpdwUrlLength < dwLen)
{
- *lpdwUrlLength = dwLen + 1; /* terminating null */
+ *lpdwUrlLength = (dwLen + 1) * sizeof(WCHAR);
SetLastError(ERROR_INSUFFICIENT_BUFFER);
return FALSE;
}
Module: wine
Branch: refs/heads/master
Commit: d6df0ac71710cb3a1cd3b54964373eddbe1a9af0
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=d6df0ac71710cb3a1cd3b54…
Author: Alexandre Julliard <julliard(a)winehq.org>
Date: Tue Mar 21 12:01:12 2006 +0100
winewrapper: Remove explicit call to wineprefixcreate.
Now that wineprefixcreate detects the build tree automatically, the
standard behavior of starting it from ntdll should work fine.
---
tools/winewrapper | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
diff --git a/tools/winewrapper b/tools/winewrapper
index c958b60..7c49b38 100755
--- a/tools/winewrapper
+++ b/tools/winewrapper
@@ -97,13 +97,6 @@ then
. $topdir/.winewrapper
fi
-# create prefix directory if needed
-
-if [ -z "$WINEPREFIX" -a ! -d "$HOME/.wine" ]
-then
- "$topdir/tools/wineprefixcreate" --use-wine-tree "$topdir"
-fi
-
# and run the application
case "$0" in