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/misc/registry.c b/misc/registry.c
index e208349..ece9fb0 100644
--- a/misc/registry.c
+++ b/misc/registry.c
@@ -20,6 +20,7 @@
 #include "win.h"
 #include "winerror.h"
 #include "file.h"
+#include "heap.h"
 #include "dos_fs.h"
 #include "string32.h"	
 #include "stddebug.h"
@@ -82,11 +83,8 @@
 #define UNICONVMASK	((1<<REG_SZ)|(1<<REG_MULTI_SZ)|(1<<REG_EXPAND_SZ))
 
 #define strdupA2W(x)	STRING32_DupAnsiToUni(x)
-#define strdupW2A(x)	STRING32_DupUniToAnsi(x)
 #define strdupW(x)	STRING32_strdupW(x)
-#define strcmpniW(a,b)	STRING32_lstrcmpniW(a,b)
 #define strchrW(a,c)	STRING32_lstrchrW(a,c)
-#define strcpyWA(a,b)	STRING32_UniToAnsi(a,b)
 
 static struct openhandle {
 	LPKEYSTRUCT	lpkey;
@@ -159,8 +157,8 @@
 		return "<NULL>";
 	if (sub!=0 && sub!=1)
 		return "<W2C:bad sub>";
-	if (unicodedebug[sub]) free(unicodedebug[sub]);
-	unicodedebug[sub]	= strdupW2A(x);
+	if (unicodedebug[sub]) HeapFree( SystemHeap, 0, unicodedebug[sub] );
+	unicodedebug[sub] = HEAP_strdupWtoA( SystemHeap, 0, x );
 	return unicodedebug[sub];
 }
 
@@ -1429,7 +1427,7 @@
 	struct _w31_dirent	*dir;
 	struct _w31_keyent	*key;
 	struct _w31_valent	*val;
-	LPKEYSTRUCT		xlpkey;
+	LPKEYSTRUCT		xlpkey = NULL;
 	LPWSTR			name,value;
 	static char		tail[400];
 
@@ -2132,7 +2130,7 @@
 		if (buf) {
 			if (UNICONVMASK & (1<<(type))) {
 				/* convert UNICODE to ASCII */
-				strcpyWA(lpbData,(LPWSTR)buf);
+				lstrcpyWtoA(lpbData,(LPWSTR)buf);
 				*lpcbData	= myxlen/2;
 			} else {
 				if (myxlen>*lpcbData)
@@ -2536,10 +2534,10 @@
 		ft
 	);
 	if (ret==ERROR_SUCCESS) {
-		strcpyWA(lpszName,lpszNameW);
+		lstrcpyWtoA(lpszName,lpszNameW);
 		*lpcchName=strlen(lpszName);
 		if (lpszClassW) {
-			strcpyWA(lpszClass,lpszClassW);
+			lstrcpyWtoA(lpszClass,lpszClassW);
 			*lpcchClass=strlen(lpszClass);
 		}
 	}
@@ -2677,10 +2675,10 @@
 	);
 
 	if (ret==ERROR_SUCCESS) {
-		strcpyWA(lpszValue,lpszValueW);
+		lstrcpyWtoA(lpszValue,lpszValueW);
 		if (lpbData) {
 			if ((1<<*lpdwType) & UNICONVMASK) {
-				strcpyWA(lpbData,(LPWSTR)lpbDataW);
+				lstrcpyWtoA(lpbData,(LPWSTR)lpbDataW);
 			} else {
 				if (lpcbDataW > *lpcbData)
 					ret	= ERROR_MORE_DATA;
@@ -3009,7 +3007,7 @@
 		ft
 	);
 	if (ret==ERROR_SUCCESS)
-		strcpyWA(lpszClass,lpszClassW);
+		lstrcpyWtoA(lpszClass,lpszClassW);
 	if (lpcchClass)
 		*lpcchClass/=2;
 	if (lpcchMaxSubkey)