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/drive.c b/files/drive.c
index 74b3672..522518c 100644
--- a/files/drive.c
+++ b/files/drive.c
@@ -28,11 +28,11 @@
#include "dos_fs.h"
#include "drive.h"
#include "file.h"
+#include "heap.h"
#include "msdos.h"
#include "options.h"
#include "task.h"
#include "xmalloc.h"
-#include "string32.h"
#include "stddebug.h"
#include "debug.h"
@@ -529,7 +529,7 @@
/***********************************************************************
- * GetDiskFreeSpaceA (KERNEL32.206)
+ * GetDiskFreeSpace32A (KERNEL32.206)
*/
BOOL32 GetDiskFreeSpace32A( LPCSTR root, LPDWORD cluster_sectors,
LPDWORD sector_bytes, LPDWORD free_clusters,
@@ -562,7 +562,7 @@
/***********************************************************************
- * GetDiskFreeSpaceW (KERNEL32.207)
+ * GetDiskFreeSpace32W (KERNEL32.207)
*/
BOOL32 GetDiskFreeSpace32W( LPCWSTR root, LPDWORD cluster_sectors,
LPDWORD sector_bytes, LPDWORD free_clusters,
@@ -571,10 +571,10 @@
LPSTR xroot;
BOOL ret;
- xroot = STRING32_DupUniToAnsi(root);
+ xroot = HEAP_strdupWtoA( GetProcessHeap(), 0, root);
ret = GetDiskFreeSpace32A( xroot,cluster_sectors, sector_bytes,
free_clusters, total_clusters );
- free( xroot );
+ HeapFree( GetProcessHeap(), 0, xroot );
return ret;
}
@@ -625,11 +625,9 @@
*/
UINT32 GetDriveType32W( LPCWSTR root )
{
- LPSTR xpath=STRING32_DupUniToAnsi(root);
- UINT32 ret;
-
- ret = GetDriveType32A(xpath);
- free(xpath);
+ LPSTR xpath = HEAP_strdupWtoA( GetProcessHeap(), 0, root );
+ UINT32 ret = GetDriveType32A( xpath );
+ HeapFree( GetProcessHeap(), 0, xpath );
return ret;
}
@@ -669,12 +667,10 @@
*/
UINT32 GetCurrentDirectory32W( UINT32 buflen, LPWSTR buf )
{
- LPSTR xpath=(char*)xmalloc(buflen+1);
- UINT32 ret;
-
- ret = GetCurrentDirectory32A(buflen,xpath);
- STRING32_AnsiToUni(buf,xpath);
- free(xpath);
+ LPSTR xpath = HeapAlloc( GetProcessHeap(), 0, buflen+1 );
+ UINT32 ret = GetCurrentDirectory32A( buflen, xpath );
+ lstrcpyAtoW( buf, xpath );
+ HeapFree( GetProcessHeap(), 0, xpath );
return ret;
}
@@ -715,10 +711,9 @@
*/
BOOL32 SetCurrentDirectory32W( LPCWSTR dirW)
{
- LPSTR dir = STRING32_DupUniToAnsi(dirW);
- BOOL32 res = SetCurrentDirectory32A(dir);
-
- free(dir);
+ LPSTR dir = HEAP_strdupWtoA( GetProcessHeap(), 0, dirW );
+ BOOL32 res = SetCurrentDirectory32A( dir );
+ HeapFree( GetProcessHeap(), 0, dir );
return res;
}
@@ -831,19 +826,19 @@
DWORD *serial, DWORD *filename_len,
DWORD *flags, LPWSTR fsname, DWORD fsname_len)
{
- LPSTR xroot = root?STRING32_DupUniToAnsi(root):NULL;
- LPSTR xvolname = label?(char*)xmalloc( label_len ):NULL;
- LPSTR xfsname = fsname?(char*)xmalloc( fsname_len ):NULL;
+ LPSTR xroot = HEAP_strdupWtoA( GetProcessHeap(), 0, root );
+ LPSTR xvolname = label ? HeapAlloc(GetProcessHeap(),0,label_len) : NULL;
+ LPSTR xfsname = fsname ? HeapAlloc(GetProcessHeap(),0,fsname_len) : NULL;
BOOL32 ret = GetVolumeInformation32A( xroot, xvolname, label_len, serial,
filename_len, flags, xfsname,
fsname_len );
if (ret)
{
- if (label) STRING32_AnsiToUni( label, xvolname );
- if (fsname) STRING32_AnsiToUni( fsname, xfsname );
+ if (label) lstrcpyAtoW( label, xvolname );
+ if (fsname) lstrcpyAtoW( fsname, xfsname );
}
- if (xroot) free(xroot);
- if (xvolname) free(xvolname);
- if (xfsname) free(xfsname);
+ HeapFree( GetProcessHeap(), 0, xroot );
+ HeapFree( GetProcessHeap(), 0, xvolname );
+ HeapFree( GetProcessHeap(), 0, xfsname );
return ret;
}