Release 961222
Sun Dec 22 13:30:18 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [graphics/metafiledrv/init.c] [graphisc/metafiledrv/mapping.c]
Added mapping functions.
* [if1632/gdi.spec] [objects/*.c] [include/windows.h]
Added a lot of Win32 functions.
* [memory/heap.c]
Added HEAP_strdupAtoW and HEAP_strdupWtoA.
* [misc/lstr.c] [memory/string.c]
Moved OEM<->Ansi conversion to string.c. Fixed a couple of bugs.
* [object/font.c]
Avoid uppercasing font names.
* [windows/hook.c]
Set ds = ss before calling hook procedure.
Sat Dec 21 21:44:17 1996 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [objects/color.c]
Use colors allocated by other clients.
* [windows/caret.c]
Set default blink time to 500.
* [windows/win.c] [windows/event.c]
Delete X context before XDestroyWindow().
* [windows/keyboard.c]
Fixed GetKeyState() once more.
Fri Dec 20 08:26:33 1996 Eric Youngdale <eric@sub2304.jic.com>
* [debugger/*.c]
Lots of built-in debugger improvements: parse Win32 EXEs debug
information, display local variables, source files and line
numbers, get symbols directly from the Wine executable, etc.
Tue Dec 17 22:39:42 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [misc/winsock_async.c]
Extern declaration added for h_errno.
Tue Dec 17 21:29:34 1996 Albrecht Kleine <kleine@ak.sax.de>
* [windows/message.c]
Added two more CBT hook calls: HCBT_CLICKSKIPPED/HCBT_KEYSKIPPED.
diff --git a/files/file.c b/files/file.c
index fa3177e..5f41ecf 100644
--- a/files/file.c
+++ b/files/file.c
@@ -23,11 +23,11 @@
#include "dos_fs.h"
#include "drive.h"
#include "global.h"
+#include "heap.h"
#include "msdos.h"
#include "options.h"
#include "ldt.h"
#include "task.h"
-#include "string32.h"
#include "stddebug.h"
#include "debug.h"
#include "xmalloc.h"
@@ -630,12 +630,12 @@
UINT32 ret;
if (!path) return 0;
- patha = STRING32_DupUniToAnsi(path);
- prefixa = STRING32_DupUniToAnsi(prefix);
- ret = GetTempFileName32A( patha, prefixa, unique, buffera );
- STRING32_AnsiToUni( buffer, buffera );
- free(patha);
- free(prefixa);
+ patha = HEAP_strdupWtoA( GetProcessHeap(), 0, path );
+ prefixa = HEAP_strdupWtoA( GetProcessHeap(), 0, prefix );
+ ret = GetTempFileName32A( patha, prefixa, unique, buffera );
+ lstrcpyAtoW( buffer, buffera );
+ HeapFree( GetProcessHeap(), 0, patha );
+ HeapFree( GetProcessHeap(), 0, prefixa );
return ret;
}
@@ -921,29 +921,27 @@
/***********************************************************************
* SearchPath32W (KERNEL32.448)
*/
-DWORD SearchPath32W(
- LPCWSTR path,LPCWSTR fn,LPCWSTR ext,DWORD buflen,LPWSTR buf,
- LPWSTR *lastpart
-) {
- LPSTR pathA = path?STRING32_DupUniToAnsi(path):NULL;
- LPSTR fnA = STRING32_DupUniToAnsi(fn);
- LPSTR extA = ext?STRING32_DupUniToAnsi(fn):NULL;
+DWORD SearchPath32W( LPCWSTR path, LPCWSTR fn, LPCWSTR ext, DWORD buflen,
+ LPWSTR buf, LPWSTR *lastpart )
+{
+ LPSTR pathA = HEAP_strdupWtoA( GetProcessHeap(), 0, path );
+ LPSTR fnA = HEAP_strdupWtoA( GetProcessHeap(), 0, fn );
+ LPSTR extA = HEAP_strdupWtoA( GetProcessHeap(), 0, ext );
LPSTR lastpartA;
- LPSTR bufA = (char*)xmalloc(buflen+1);
+ LPSTR bufA = HeapAlloc( GetProcessHeap(), 0, buflen + 1 );
DWORD ret;
- ret=SearchPath32A(pathA,fnA,extA,buflen,bufA,&lastpartA);
- lstrcpynAtoW(buf,bufA,buflen);
- if (lastpart) {
- if (lastpartA)
- *lastpart = buf+(lastpartA-bufA);
- else
- *lastpart = NULL;
+ ret = SearchPath32A(pathA,fnA,extA,buflen,bufA,&lastpartA);
+ lstrcpyAtoW( buf, bufA );
+ if (lastpart)
+ {
+ if (lastpartA) *lastpart = buf+(lastpartA-bufA);
+ else *lastpart = NULL;
}
- free(bufA);
- free(fnA);
- if (pathA) free(pathA);
- if (extA) free(extA);
+ HeapFree( GetProcessHeap(), 0, bufA );
+ HeapFree( GetProcessHeap(), 0, fnA );
+ HeapFree( GetProcessHeap(), 0, pathA );
+ HeapFree( GetProcessHeap(), 0, extA );
return ret;
}
@@ -1282,9 +1280,9 @@
*/
BOOL32 DeleteFile32W( LPCWSTR path )
{
- LPSTR xpath = STRING32_DupUniToAnsi(path);
+ LPSTR xpath = HEAP_strdupWtoA( GetProcessHeap(), 0, path );
BOOL32 ret = RemoveDirectory32A( xpath );
- free(xpath);
+ HeapFree( GetProcessHeap(), 0, xpath );
return ret;
}
@@ -1328,9 +1326,9 @@
*/
BOOL32 CreateDirectory32W( LPCWSTR path, LPSECURITY_ATTRIBUTES lpsecattribs )
{
- LPSTR xpath = STRING32_DupUniToAnsi(path);
- BOOL32 ret = CreateDirectory32A(xpath,lpsecattribs);
- free(xpath);
+ LPSTR xpath = HEAP_strdupWtoA( GetProcessHeap(), 0, path );
+ BOOL32 ret = CreateDirectory32A( xpath, lpsecattribs );
+ HeapFree( GetProcessHeap(), 0, xpath );
return ret;
}
@@ -1391,9 +1389,9 @@
*/
BOOL32 RemoveDirectory32W( LPCWSTR path )
{
- LPSTR xpath = STRING32_DupUniToAnsi(path);
+ LPSTR xpath = HEAP_strdupWtoA( GetProcessHeap(), 0, path );
BOOL32 ret = RemoveDirectory32A( xpath );
- free(xpath);
+ HeapFree( GetProcessHeap(), 0, xpath );
return ret;
}