Release 980315

Sun Mar 15 03:46:50 1998  Dimitrie O. Paun  <dimi@mail.cs.toronto.edu>

	* [*/*]
	Fixed some dprintf_ such that there is one and only one
	new line for each dprintf and that new line occurs at the end.
	Transformed some fprintfs into proper debug statements.
	Removed much redundancy from most of the debug statements. The
	redundancy appeared because now the component and function
	name is output automatically. Most debug statements also used to
	output the name of the function.
	All these changes prepared the source to switch completely to
	the new debugging interface.
	For more info, refer to ./documentation/debug-msg

Sat Mar 14 19:45:23 1997  Andreas Mohr <100.30936@germany.net>

	* [misc/shell.c] [if1632/kernel.spec]
	Changed parameters of FUNC004() to fix a crash.
	Not sure if this fix is correct (doc wanted).

	* [windows/user.c] [if1632/user.spec] [include/user.h]
	Implemented UserSeeUserDo.

	* [msdos/int21.c] [include/msdos.h]
	Added "GET LIST OF LISTS" (INT 21/52h).

Sat Mar 14 15:48:02 1998  Douglas Ridgway <ridgway@gmcl.com>

	* [include/windows.h] [relay32/gdi32.spec] [objects/enhmetafile.c]
	Beginnings of enhanced metafile support.

Fri Mar 13 20:53:09 1998  John Richardson <jrichard@zko.dec.com>

	* [win32/console.c]
	Restart interrupted console writes.

Fri Mar 13 18:59:24 1998  Matthew Becker <mbecker@glasscity.net>

	* [*/*.c]
	Updated documentation for API manpages.

	* [windows/dce.c]
	ReleaseDC16: Fixed cast.

	* [include/windows.h] [memory/virtual.c]
	VirtualQuery{Ex} should return DWORD instead of BOOL32.

Fri Mar 13 13:03:06 1998  Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>

	* [README][documentation/status/]
	README updated, added lzexpand,version and multimedia
	status notes to new documentation/status directory.

	* [ole/*.c][if1632/typelib.spec]
	Added typelib stubs, several small additions and fixes.

	* [loader/pe_image.c]
	Fixed a small bug (fixup_imports got passed the wrong hModule in a
	remapcase).

	* [loader/signal.c][if1632/signal.c][misc/winsock_dns.c]
	  [loader/module.c]
	Fixed some recursive debugger crashes (caused by invalid FS).

	* [misc/registry.c]
	Two bugs fixed.

Fri Mar 13 04:55:01 1998  David Lee Lambert <lamber45@egr.msu.edu>

	* [include/winnt.h] [include/winnls.h]
	Moved LANG_xxx flags to winnls.h

	* [include/winnls.h]
	Added flags for GetDateFormat(); fixed validity of
	LOCALE_SYSTEM_DEFAULT.

	* [include/windows.h] 
	Added GetTimeFormat() prototypes.

	* [ole/ole2nls.c]
	Implemented ASCII date- and time-functions,  using an
	optimized common core;  added stubs for Unicode versions;  
	started work on a Unicode core.

	* [AUTHORS]
	Added my name.

Mon Mar  9 20:10:15 1998  Eric Kohl <ekohl@abo.rhein-zeitung.de>

	* [relay32/comctl32.spec] [include/imagelist.h]
	  [include/commctrl.h] [misc/imagelist.c] [misc/Makefile.in]
	First attempt at implementing ImageLists.

Sun Mar  8 20:19:49 1998  Uwe Bonnes  <bon@elektron.ikp.physik.tu-darmstadt.de>

	* [files/dos_fs.c] [configure.in]
	Try to get FileTimeToLocalFileTime,FileTimeToSystemTime and
	SystemTimeToFileTime right.
	Use timegm() where available.

	* [misc/lstr.c]
	Fix an off by one error in FormatMessage and handle the case 
	when args = NULL (used by programs to get the length of the 
	string).

	* [win32/console.c]
	Actual display a per-process Title string, better working
	attempt for WriteConsole32W and ReadConsole32W.

Fri Mar  6 20:33:45 1998  Slaven Rezic  <eserte@cs.tu-berlin.de>

	* [include/config.h.in][configure.in][multimedia/audio.c]
	  [multimedia/dsound.c]
	Added check for FreeBSD sound system.

Sun Mar  1 17:40:10 1998  Jason Schonberg <schon@mti.sgi.com>

	* [controls/edit.c] [include/ole.h] [include/shlobj.h]
	Removed final commas in enum types.

Mon Feb 23 07:52:18 1998  Luiz Otavio L. Zorzella  <zorzella@nr.conexware.com>

	* [multimedia/time.c]
	Workaround to avoid infinite recursion inside timeGetTime.

	* [multimedia/audio.c]
	WODM_GETNUMDEVS and WIDM_GETNUMDEVS only return 1 now if the
	SOUND_DEV can be opened, or if it's busy.
diff --git a/misc/registry.c b/misc/registry.c
index 3e47851..3f7ac03 100644
--- a/misc/registry.c
+++ b/misc/registry.c
@@ -50,7 +50,7 @@
 {
     LPWSTR   name;          /* name of value (UNICODE) or NULL for win31 */
     DWORD    type;          /* type of value */
-    DWORD    len;           /* length of data */
+    DWORD    len;           /* length of data in BYTEs */
     DWORD    lastmodified;  /* time of seconds since 1.1.1970 */
     LPBYTE   data;          /* content, may be strings, binaries, etc. */
 } KEYVALUE,*LPKEYVALUE;
@@ -117,10 +117,10 @@
 
 	for (i=0;i<nrofopenhandles;i++) {
 		if (openhandles[i].lpkey==lpkey) {
-			dprintf_warn(reg, "add_handle:Tried to add %p twice!\n",lpkey);
+			WARN(reg, "Tried to add %p twice!\n",lpkey);
 		}
 		if (openhandles[i].hkey==hkey) {
-			dprintf_warn(reg, "add_handle:Tried to add %lx twice!\n",(LONG)hkey);
+			WARN(reg, "Tried to add %lx twice!\n",(LONG)hkey);
 		}
 	}
 	openhandles=xrealloc(	openhandles,
@@ -139,7 +139,7 @@
 	for (i=0;i<nrofopenhandles;i++)
 		if (openhandles[i].hkey==hkey)
 			return openhandles[i].lpkey;
-	dprintf_warn(reg, "get_handle:Didn't find handle %lx?\n",(LONG)hkey);
+	WARN(reg, "Didn't find handle %lx?\n",(LONG)hkey);
 	return NULL;
 }
 
@@ -151,7 +151,7 @@
 		if (openhandles[i].hkey==hkey)
 			break;
 	if (i==nrofopenhandles) {
-		dprintf_warn(reg, "remove_handle:Didn't find handle %08x?\n",hkey);
+		WARN(reg, "Didn't find handle %08x?\n",hkey);
 		return;
 	}
 	memcpy(	openhandles+i,
@@ -199,7 +199,7 @@
 	case HKEY_CURRENT_CONFIG:
 		return key_current_config;
 	default:
-		dprintf_warn(reg, "lookup_hkey(%lx), special key!\n",
+		WARN(reg, "(%lx), special key!\n",
 			(LONG)hkey
 		);
 		return get_handle(hkey);
@@ -806,7 +806,7 @@
 		return 0;
 	}
 	if (ver!=REGISTRY_SAVE_VERSION) {
-		dprintf_info(reg,__FILE__":_wine_loadsubreg:Old format (%d) registry found, ignoring it. (buf was %s).\n",ver,buf);
+		TRACE(reg,"Old format (%d) registry found, ignoring it. (buf was %s).\n",ver,buf);
 		free(buf);
 		return 0;
 	}
@@ -828,7 +828,7 @@
 
 	F=fopen(fn,"rb");
 	if (F==NULL) {
-		dprintf_warn(reg,"Couldn't open %s for reading: %s\n",
+		WARN(reg,"Couldn't open %s for reading: %s\n",
 		       fn,strerror(errno)
 		);
 		return;
@@ -996,7 +996,7 @@
 {
    LPWSTR dest = xmalloc (2 * nchars + 2);
 
-   lstrcpynAtoW(dest,src, nchars);
+   lstrcpynAtoW(dest,src,nchars+1);
    dest[nchars] = 0;
    return dest;
 }
@@ -1088,7 +1088,7 @@
 
 	  if ((1 << dkv.type) & UNICONVMASK) {
 	    data = (LPBYTE) strcvtA2W(curdata, dkv.valdatalen);
-	    len = dkv.valdatalen + 1;
+	    len = 2*(dkv.valdatalen + 1);
 	  } else {
 	    /* I don't think we want to NULL terminate all data */
 	    data = xmalloc(dkv.valdatalen);
@@ -1168,7 +1168,7 @@
 	OFSTRUCT	ofs;
 	BY_HANDLE_FILE_INFORMATION hfdinfo;
 
-	dprintf_info(reg,"Loading Win95 registry database '%s'\n",fn);
+	TRACE(reg,"Loading Win95 registry database '%s'\n",fn);
 	hfd=OpenFile32(fn,&ofs,OF_READ);
 	if (hfd==HFILE_ERROR32)
 		return;
@@ -1188,7 +1188,7 @@
 	if (4!=_lread32(hfd,magic,4))
 		return;
 	if (strcmp(magic,"RGKN")) {
-		dprintf_warn(reg, "second IFF header not RGKN, but %s\n", magic);
+		WARN(reg, "second IFF header not RGKN, but %s\n", magic);
 		return;
 	}
 
@@ -1353,7 +1353,7 @@
 				}
 			}
 		} else {
-			dprintf_info(reg,"__w31_dumptree:strange: no directory key name, idx=%04x\n", idx);
+			TRACE(reg,"strange: no directory key name, idx=%04x\n", idx);
 		}
 		__w31_dumptree(dir->child_idx,txt,tab,head,xlpkey,lastmodified,level+1);
 		idx=dir->sibling_idx;
@@ -1379,12 +1379,12 @@
 
 	/* read & dump header */
 	if (sizeof(head)!=_lread32(hf,&head,sizeof(head))) {
-		dprintf_err(reg, "_w31_loadreg:reg.dat is too short.\n");
+		ERR(reg, "reg.dat is too short.\n");
 		_lclose32(hf);
 		return;
 	}
 	if (memcmp(head.cookie, "SHCC3.10", sizeof(head.cookie))!=0) {
-		dprintf_err(reg, "_w31_loadreg:reg.dat has bad signature.\n");
+		ERR(reg, "reg.dat has bad signature.\n");
 		_lclose32(hf);
 		return;
 	}
@@ -1393,7 +1393,7 @@
 	/* read and dump index table */
 	tab = xmalloc(len);
 	if (len!=_lread32(hf,tab,len)) {
-		dprintf_err(reg,"_w31_loadreg:couldn't read %d bytes.\n",len); 
+		ERR(reg,"couldn't read %d bytes.\n",len); 
 		free(tab);
 		_lclose32(hf);
 		return;
@@ -1402,14 +1402,14 @@
 	/* read text */
 	txt = xmalloc(head.textsize);
 	if (-1==_llseek32(hf,head.textoff,SEEK_SET)) {
-		dprintf_err(reg,"_w31_loadreg:couldn't seek to textblock.\n"); 
+		ERR(reg,"couldn't seek to textblock.\n"); 
 		free(tab);
 		free(txt);
 		_lclose32(hf);
 		return;
 	}
 	if (head.textsize!=_lread32(hf,txt,head.textsize)) {
-		dprintf_err(reg,"_w31_loadreg:textblock too short (%d instead of %ld).\n",len,head.textsize); 
+		ERR(reg,"textblock too short (%d instead of %ld).\n",len,head.textsize); 
 		free(tab);
 		free(txt);
 		_lclose32(hf);
@@ -1417,7 +1417,7 @@
 	}
 
 	if (!GetFileInformationByHandle(hf,&hfinfo)) {
-		dprintf_err(reg,"_w31_loadreg:GetFileInformationByHandle failed?.\n"); 
+		ERR(reg,"GetFileInformationByHandle failed?.\n"); 
 		free(tab);
 		free(txt);
 		_lclose32(hf);
@@ -1529,7 +1529,7 @@
 	LPKEYSTRUCT	lpNextKey,lpxkey;
 	LPWSTR		*wps;
 	int		wpc,i;
-	dprintf_info(reg,"RegOpenKeyEx32W(%lx,%s,%ld,%lx,%p)\n",
+	TRACE(reg,"(%lx,%s,%ld,%lx,%p)\n",
 		(LONG)hkey,W2C(lpszSubKey,0),dwReserved,samDesired,retkey
 	);
 
@@ -1571,7 +1571,7 @@
 	LPCWSTR	lpszSubKey,
 	LPHKEY	retkey
 ) {
-	dprintf_info(reg,"RegOpenKey32W(%lx,%s,%p)\n",
+	TRACE(reg,"(%lx,%s,%p)\n",
 		(LONG)hkey,W2C(lpszSubKey,0),retkey
 	);
 	return RegOpenKeyEx32W(hkey,lpszSubKey,0,KEY_ALL_ACCESS,retkey);
@@ -1589,7 +1589,7 @@
 	LPWSTR	lpszSubKeyW;
 	DWORD	ret;
 
-	dprintf_info(reg,"RegOpenKeyEx32A(%lx,%s,%ld,%lx,%p)\n",
+	TRACE(reg,"(%lx,%s,%ld,%lx,%p)\n",
 		(LONG)hkey,lpszSubKey,dwReserved,samDesired,retkey
 	);
 	if (lpszSubKey)
@@ -1608,7 +1608,7 @@
 	LPCSTR	lpszSubKey,
 	LPHKEY	retkey
 ) {
-	dprintf_info(reg,"RegOpenKey32A(%lx,%s,%p)\n",
+	TRACE(reg,"(%lx,%s,%p)\n",
 		(LONG)hkey,lpszSubKey,retkey
 	);
 	return	RegOpenKeyEx32A(hkey,lpszSubKey,0,KEY_ALL_ACCESS,retkey);
@@ -1620,7 +1620,7 @@
 	LPCSTR	lpszSubKey,
 	LPHKEY	retkey
 ) {
-	dprintf_info(reg,"RegOpenKey16(%lx,%s,%p)\n",
+	TRACE(reg,"(%lx,%s,%p)\n",
 		(LONG)hkey,lpszSubKey,retkey
 	);
 	return RegOpenKey32A(hkey,lpszSubKey,retkey);
@@ -1656,7 +1656,7 @@
 	int		wpc,i;
 
 /*FIXME: handle security/access/whatever */
-	dprintf_info(reg,"RegCreateKeyEx32W(%lx,%s,%ld,%s,%lx,%lx,%p,%p,%p)\n",
+	TRACE(reg,"(%lx,%s,%ld,%s,%lx,%lx,%p,%p,%p)\n",
 		(LONG)hkey,
 		W2C(lpszSubKey,0),
 		dwReserved,
@@ -1752,7 +1752,7 @@
 ) {
 	DWORD	junk,ret;
 
-	dprintf_info(reg,"RegCreateKey32W(%lx,%s,%p)\n",
+	TRACE(reg,"(%lx,%s,%p)\n",
 		(LONG)hkey,W2C(lpszSubKey,0),retkey
 	);
 	ret=RegCreateKeyEx32W(
@@ -1784,7 +1784,7 @@
 	LPWSTR	lpszSubKeyW,lpszClassW;
 	DWORD	ret;
 
-	dprintf_info(reg,"RegCreateKeyEx32A(%lx,%s,%ld,%s,%lx,%lx,%p,%p,%p)\n",
+	TRACE(reg,"(%lx,%s,%ld,%s,%lx,%lx,%p,%p,%p)\n",
 		(LONG)hkey,
 		lpszSubKey,
 		dwReserved,
@@ -1829,7 +1829,7 @@
 ) {
 	DWORD	junk;
 
-	dprintf_info(reg,"RegCreateKey32A(%lx,%s,%p)\n",
+	TRACE(reg,"(%lx,%s,%p)\n",
 		(LONG)hkey,lpszSubKey,retkey
 	);
 	return	RegCreateKeyEx32A(
@@ -1851,7 +1851,7 @@
 	LPCSTR	lpszSubKey,
 	LPHKEY	retkey
 ) {
-	dprintf_info(reg,"RegCreateKey16(%lx,%s,%p)\n",
+	TRACE(reg,"(%lx,%s,%p)\n",
 		(LONG)hkey,lpszSubKey,retkey
 	);
 	return RegCreateKey32A(hkey,lpszSubKey,retkey);
@@ -1881,10 +1881,9 @@
 	LPKEYSTRUCT	lpkey;
 	int		i;
 
-	dprintf_info(reg,"RegQueryValueEx32W(%x,%s,%p,%p,%p,%ld)\n",
-		hkey,W2C(lpszValueName,0),lpdwReserved,lpdwType,lpbData,
-		lpcbData?*lpcbData:0
-	);
+	TRACE(reg,"(%x,%s,%p,%p,%p,%ld)\n",
+		     hkey,W2C(lpszValueName,0),lpdwReserved,lpdwType,lpbData,
+		     lpcbData?*lpcbData:0);
 
 	lpkey	= lookup_hkey(hkey);
 	if (!lpkey)
@@ -1923,8 +1922,7 @@
 		return SHELL_ERROR_SUCCESS;
 	}
 	if (*lpcbData<lpkey->values[i].len) {
-		*(WCHAR*)lpbData
-			= 0;
+		*(WCHAR*)lpbData= 0;
 		*lpcbData	= lpkey->values[i].len;
 		return ERROR_MORE_DATA;
 	}
@@ -1943,10 +1941,9 @@
 	HKEY	xhkey;
 	DWORD	ret,lpdwType;
 
-	dprintf_info(reg,"RegQueryValue32W(%x,%s,%p,%ld)\n",
-		hkey,W2C(lpszSubKey,0),lpszData,
-		lpcbData?*lpcbData:0
-	);
+	TRACE(reg,"(%x,%s,%p,%ld)\n",
+		     hkey,W2C(lpszSubKey,0),lpszData,
+		     lpcbData?*lpcbData:0);
 
 	/* only open subkey, if we really do descend */
 	if (lpszSubKey && *lpszSubKey) {
@@ -1985,10 +1982,10 @@
 	DWORD	*mylen;
 	DWORD	type;
 
-	dprintf_info(reg,"RegQueryValueEx32A(%x,%s,%p,%p,%p,%ld)\n",
-		hkey,lpszValueName,lpdwReserved,lpdwType,lpbData,
-		lpcbData?*lpcbData:0
-	);
+	TRACE(reg,"(%x,%s,%p,%p,%p,%ld)\n",
+		     hkey,lpszValueName,lpdwReserved,lpdwType,lpbData,
+		     lpcbData?*lpcbData:0);
+
 	if (lpszValueName)
 		lpszValueNameW=strdupA2W(lpszValueName);
 	else 
@@ -2070,10 +2067,10 @@
 	LPBYTE	lpbData,
 	LPDWORD	lpcbData
 ) {
-	dprintf_info(reg,"RegQueryValueEx16(%x,%s,%p,%p,%p,%ld)\n",
-		hkey,lpszValueName,lpdwReserved,lpdwType,lpbData,
-		lpcbData?*lpcbData:0
-	);
+	TRACE(reg,"(%x,%s,%p,%p,%p,%ld)\n",
+		     hkey,lpszValueName,lpdwReserved,lpdwType,lpbData,
+		     lpcbData?*lpcbData:0);
+
 	return RegQueryValueEx32A(
 		hkey,
 		lpszValueName,
@@ -2094,10 +2091,9 @@
 	HKEY	xhkey;
 	DWORD	ret,lpdwType;
 
-	dprintf_info(reg,"RegQueryValue32A(%x,%s,%p,%ld)\n",
-		hkey,lpszSubKey,lpszData,
-		lpcbData?*lpcbData:0
-	);
+	TRACE(reg,"(%x,%s,%p,%ld)\n",
+		     hkey,lpszSubKey,lpszData,
+		     lpcbData?*lpcbData:0);
 
 	/* only open subkey, if we really do descend */
 	if (lpszSubKey && *lpszSubKey) {
@@ -2128,9 +2124,9 @@
 	LPSTR	lpszData,
 	LPDWORD	lpcbData
 ) {
-	dprintf_info(reg,"RegQueryValue16(%x,%s,%p,%ld)\n",
-		hkey,lpszSubKey,lpszData,lpcbData?*lpcbData:0
-	);
+	TRACE(reg,"(%x,%s,%p,%ld)\n",
+		     hkey,lpszSubKey,lpszData,lpcbData?*lpcbData:0);
+
 	/* HACK: the 16bit RegQueryValue doesn't handle selectorblocks
 	 *       anyway, so we just mask out the high 16 bit.
 	 *       (this (not so much incidently;) hopefully fixes Aldus FH4)
@@ -2160,7 +2156,7 @@
 	LPKEYSTRUCT	lpkey;
 	int		i;
 
-	dprintf_info(reg,"RegSetValueEx32W(%x,%s,%ld,%ld,%p,%ld)\n",
+	TRACE(reg,"(%x,%s,%ld,%ld,%p,%ld)\n",
 		hkey,W2C(lpszValueName,0),dwReserved,dwType,lpbData,cbData
 	);
 	/* we no longer care about the lpbData type here... */
@@ -2217,7 +2213,7 @@
 	LPWSTR	lpszValueNameW;
 	DWORD	ret;
 
-	dprintf_info(reg,"RegSetValueEx32A(%x,%s,%ld,%ld,%p,%ld)\n",
+	TRACE(reg,"(%x,%s,%ld,%ld,%p,%ld)\n",
 		hkey,lpszValueName,dwReserved,dwType,lpbData,cbData
 	);
 	if ((1<<dwType) & UNICONVMASK) {
@@ -2246,7 +2242,7 @@
 	LPBYTE	lpbData,
 	DWORD	cbData
 ) {
-	dprintf_info(reg,"RegSetValueEx16(%x,%s,%ld,%ld,%p,%ld)\n",
+	TRACE(reg,"(%x,%s,%ld,%ld,%p,%ld)\n",
 		hkey,lpszValueName,dwReserved,dwType,lpbData,cbData
 	);
 	return RegSetValueEx32A(hkey,lpszValueName,dwReserved,dwType,lpbData,cbData);
@@ -2263,7 +2259,7 @@
 	HKEY	xhkey;
 	DWORD	ret;
 
-	dprintf_info(reg,"RegSetValue32W(%x,%s,%ld,%s,%ld)\n",
+	TRACE(reg,"(%x,%s,%ld,%s,%ld)\n",
 		hkey,W2C(lpszSubKey,0),dwType,W2C(lpszData,0),cbData
 	);
 	if (lpszSubKey && *lpszSubKey) {
@@ -2277,7 +2273,7 @@
 		dwType=REG_SZ;
 	}
 	if (cbData!=2*lstrlen32W(lpszData)+2) {
-		dprintf_info(reg,"RegSetValueX called with len=%ld != strlen(%s)+1=%d!\n",
+		TRACE(reg,"RegSetValueX called with len=%ld != strlen(%s)+1=%d!\n",
 			cbData,W2C(lpszData,0),2*lstrlen32W(lpszData)+2
 		);
 		cbData=2*lstrlen32W(lpszData)+2;
@@ -2299,7 +2295,7 @@
 	DWORD	ret;
 	HKEY	xhkey;
 
-	dprintf_info(reg,"RegSetValue32A(%x,%s,%ld,%s,%ld)\n",
+	TRACE(reg,"(%x,%s,%ld,%s,%ld)\n",
 		hkey,lpszSubKey,dwType,lpszData,cbData
 	);
 	if (lpszSubKey && *lpszSubKey) {
@@ -2310,7 +2306,7 @@
 		xhkey=hkey;
 
 	if (dwType!=REG_SZ) {
-		dprintf_info(reg,"RegSetValueA called with dwType=%ld!\n",dwType);
+		TRACE(reg,"RegSetValueA called with dwType=%ld!\n",dwType);
 		dwType=REG_SZ;
 	}
 	if (cbData!=strlen(lpszData)+1)
@@ -2330,7 +2326,7 @@
 	DWORD	cbData
 ) {
 	DWORD	ret;
-	dprintf_info(reg,"RegSetValue16(%x,%s,%ld,%s,%ld)\n",
+	TRACE(reg,"(%x,%s,%ld,%s,%ld)\n",
 		hkey,lpszSubKey,dwType,lpszData,cbData
 	);
 	ret=RegSetValue32A(hkey,lpszSubKey,dwType,lpszData,cbData);
@@ -2358,7 +2354,7 @@
 ) {
 	LPKEYSTRUCT	lpkey,lpxkey;
 
-	dprintf_info(reg,"RegEnumKeyEx32W(%x,%ld,%p,%ld,%p,%p,%p,%p)\n",
+	TRACE(reg,"(%x,%ld,%p,%ld,%p,%p,%p,%p)\n",
 		hkey,iSubkey,lpszName,*lpcchName,lpdwReserved,lpszClass,lpcchClass,ft
 	);
 	lpkey=lookup_hkey(hkey);
@@ -2378,7 +2374,7 @@
 	memcpy(lpszName,lpxkey->keyname,lstrlen32W(lpxkey->keyname)*2+2);
 	if (lpszClass) {
 		/* what should we write into it? */
-		*lpszClass		= 0;
+		*lpszClass	= 0;
 		*lpcchClass	= 2;
 	}
 	return ERROR_SUCCESS;
@@ -2394,7 +2390,7 @@
 ) {
 	FILETIME	ft;
 
-	dprintf_info(reg,"RegEnumKey32W(%x,%ld,%p,%ld)\n",
+	TRACE(reg,"(%x,%ld,%p,%ld)\n",
 		hkey,iSubkey,lpszName,lpcchName
 	);
 	return RegEnumKeyEx32W(hkey,iSubkey,lpszName,&lpcchName,NULL,NULL,NULL,&ft);
@@ -2414,7 +2410,7 @@
 	LPWSTR	lpszNameW,lpszClassW;
 
 
-	dprintf_info(reg,"RegEnumKeyEx32A(%x,%ld,%p,%ld,%p,%p,%p,%p)\n",
+	TRACE(reg,"(%x,%ld,%p,%ld,%p,%p,%p,%p)\n",
 		hkey,iSubkey,lpszName,*lpcchName,lpdwReserved,lpszClass,lpcchClass,ft
 	);
 	if (lpszName) {
@@ -2465,7 +2461,7 @@
 ) {
 	FILETIME	ft;
 
-	dprintf_info(reg,"RegEnumKey32A(%x,%ld,%p,%ld)\n",
+	TRACE(reg,"(%x,%ld,%p,%ld)\n",
 		hkey,iSubkey,lpszName,lpcchName
 	);
 	return	RegEnumKeyEx32A(
@@ -2487,7 +2483,7 @@
 	LPSTR	lpszName,
 	DWORD	lpcchName
 ) {
-	dprintf_info(reg,"RegEnumKey16(%x,%ld,%p,%ld)\n",
+	TRACE(reg,"(%x,%ld,%p,%ld)\n",
 		hkey,iSubkey,lpszName,lpcchName
 	);
 	return RegEnumKey32A(hkey,iSubkey,lpszName,lpcchName);
@@ -2514,7 +2510,7 @@
 	LPKEYSTRUCT	lpkey;
 	LPKEYVALUE	val;
 
-	dprintf_info(reg,"RegEnumValue32W(%x,%ld,%p,%p,%p,%p,%p,%p)\n",
+	TRACE(reg,"(%x,%ld,%p,%p,%p,%p,%p,%p)\n",
 		hkey,iValue,lpszValue,lpcchValue,lpdReserved,lpdwType,lpbData,lpcbData
 	);
 	lpkey = lookup_hkey(hkey);
@@ -2561,7 +2557,7 @@
 	LPBYTE	lpbDataW;
 	DWORD	ret,lpcbDataW;
 
-	dprintf_info(reg,"RegEnumValue32A(%x,%ld,%p,%p,%p,%p,%p,%p)\n",
+	TRACE(reg,"(%x,%ld,%p,%p,%p,%p,%p,%p)\n",
 		hkey,iValue,lpszValue,lpcchValue,lpdReserved,lpdwType,lpbData,lpcbData
 	);
 
@@ -2614,7 +2610,7 @@
 	LPBYTE	lpbData,
 	LPDWORD	lpcbData
 ) {
-	dprintf_info(reg,"RegEnumValue(%x,%ld,%p,%p,%p,%p,%p,%p)\n",
+	TRACE(reg,"(%x,%ld,%p,%p,%p,%p,%p,%p)\n",
 		hkey,iValue,lpszValue,lpcchValue,lpdReserved,lpdwType,lpbData,lpcbData
 	);
 	return RegEnumValue32A(
@@ -2634,7 +2630,7 @@
  */
 /* RegCloseKey			[SHELL.3] [KERNEL.220] [ADVAPI32.126] */
 DWORD WINAPI RegCloseKey(HKEY hkey) {
-	dprintf_info(reg,"RegCloseKey(%x)\n",hkey);
+	TRACE(reg,"(%x)\n",hkey);
 	remove_handle(hkey);
 	return ERROR_SUCCESS;
 }
@@ -2650,17 +2646,17 @@
 	LPWSTR		*wps;
 	int		wpc,i;
 
-	dprintf_info(reg,"RegDeleteKey32W(%x,%s)\n",
+	TRACE(reg,"(%x,%s)\n",
 		hkey,W2C(lpszSubKey,0)
 	);
 	lpNextKey	= lookup_hkey(hkey);
 	if (!lpNextKey) {
-		dprintf_info(reg, "  Badkey[1].\n");
+		TRACE(reg, "  Badkey[1].\n");
 		return SHELL_ERROR_BADKEY;
 	}
 	/* we need to know the previous key in the hier. */
 	if (!lpszSubKey || !*lpszSubKey) {
-		dprintf_info(reg, "  Badkey[2].\n");
+		TRACE(reg, "  Badkey[2].\n");
 		return SHELL_ERROR_BADKEY;
 	}
 	split_keypath(lpszSubKey,&wps,&wpc);
@@ -2669,7 +2665,7 @@
 	while (i<wpc-1) {
 		lpxkey=lpNextKey->nextsub;
 		while (lpxkey) {
-			dprintf_info(reg, "  Scanning [%s]\n",
+			TRACE(reg, "  Scanning [%s]\n",
 				     W2C (lpxkey->keyname, 0));
 			if (!lstrcmpi32W(wps[i],lpxkey->keyname))
 				break;
@@ -2677,7 +2673,7 @@
 		}
 		if (!lpxkey) {
 			FREE_KEY_PATH;
-			dprintf_info(reg, "  Not found.\n");
+			TRACE(reg, "  Not found.\n");
 			/* not found is success */
 			return SHELL_ERROR_SUCCESS;
 		}
@@ -2687,7 +2683,7 @@
 	lpxkey	= lpNextKey->nextsub;
 	lplpPrevKey = &(lpNextKey->nextsub);
 	while (lpxkey) {
-		dprintf_info(reg, "  Scanning [%s]\n",
+		TRACE(reg, "  Scanning [%s]\n",
 			     W2C (lpxkey->keyname, 0));
 		if (!lstrcmpi32W(wps[i],lpxkey->keyname))
 			break;
@@ -2696,12 +2692,12 @@
 	}
 	if (!lpxkey) {
 		FREE_KEY_PATH;
-		dprintf_warn(reg , "  Not found.\n");
+		WARN(reg , "  Not found.\n");
 		return SHELL_ERROR_BADKEY;
 	}
 	if (lpxkey->nextsub) {
 		FREE_KEY_PATH;
-		dprintf_warn(reg , "  Not empty.\n");
+		WARN(reg , "  Not empty.\n");
 		return SHELL_ERROR_CANTWRITE;
 	}
 	*lplpPrevKey	= lpxkey->next;
@@ -2712,7 +2708,7 @@
 		free(lpxkey->values);
 	free(lpxkey);
 	FREE_KEY_PATH;
-	dprintf_info(reg, "  Done.\n");
+	TRACE(reg, "  Done.\n");
 	return	SHELL_ERROR_SUCCESS;
 }
 
@@ -2721,7 +2717,7 @@
 	LPWSTR	lpszSubKeyW;
 	DWORD	ret;
 
-	dprintf_info(reg,"RegDeleteKey32A(%x,%s)\n",
+	TRACE(reg,"(%x,%s)\n",
 		hkey,lpszSubKey
 	);
 	lpszSubKeyW=HEAP_strdupAtoW(GetProcessHeap(),0,lpszSubKey);
@@ -2732,7 +2728,7 @@
 
 /* RegDeleteKey			[SHELL.4] [KERNEL.219] */
 DWORD WINAPI RegDeleteKey16(HKEY hkey,LPCSTR lpszSubKey) {
-	dprintf_info(reg,"RegDeleteKey16(%x,%s)\n",
+	TRACE(reg,"(%x,%s)\n",
 		hkey,lpszSubKey
 	);
 	return RegDeleteKey32A(hkey,lpszSubKey);
@@ -2751,7 +2747,7 @@
 	LPKEYSTRUCT	lpkey;
 	LPKEYVALUE	val;
 
-	dprintf_info(reg,"RegDeleteValue32W(%x,%s)\n",
+	TRACE(reg,"(%x,%s)\n",
 		hkey,W2C(lpszValue,0)
 	);
 	lpkey=lookup_hkey(hkey);
@@ -2792,7 +2788,7 @@
 	LPWSTR	lpszValueW;
 	DWORD	ret;
 
-	dprintf_info(reg, "RegDeleteValue32A(%x,%s)\n", hkey,lpszValue );
+	TRACE(reg, "(%x,%s)\n", hkey,lpszValue );
         lpszValueW=HEAP_strdupAtoW(GetProcessHeap(),0,lpszValue);
 	ret=RegDeleteValue32W(hkey,lpszValueW);
         HeapFree(GetProcessHeap(),0,lpszValueW);
@@ -2802,14 +2798,14 @@
 /* RegDeleteValue		[KERNEL.222] */
 DWORD WINAPI RegDeleteValue16(HKEY hkey,LPSTR lpszValue)
 {
-	dprintf_info(reg,"RegDeleteValue16(%x,%s)\n", hkey,lpszValue );
+	TRACE(reg,"(%x,%s)\n", hkey,lpszValue );
 	return RegDeleteValue32A(hkey,lpszValue);
 }
 
 /* RegFlushKey			[ADVAPI32.143] [KERNEL.227] */
 DWORD WINAPI RegFlushKey(HKEY hkey)
 {
-	dprintf_fixme(reg, "RegFlushKey(%x), STUB.\n", hkey);
+	FIXME(reg, "(%x), STUB.\n", hkey);
 	return SHELL_ERROR_SUCCESS;
 }
 
@@ -2834,7 +2830,7 @@
 	int		nrofkeys,maxsubkey,maxclass,maxvalues,maxvname,maxvdata;
 	int		i;
 
-	dprintf_info(reg,"RegQueryInfoKey32W(%x,......)\n",hkey);
+	TRACE(reg,"(%x,......)\n",hkey);
 	lpkey=lookup_hkey(hkey);
 	if (!lpkey)
 		return SHELL_ERROR_BADKEY;
@@ -2909,7 +2905,7 @@
 	LPWSTR		lpszClassW;
 	DWORD		ret;
 
-	dprintf_info(reg,"RegQueryInfoKey32A(%x,......)\n",hkey);
+	TRACE(reg,"(%x,......)\n",hkey);
 	if (lpszClass) {
 		*lpcchClass*= 2;
 		lpszClassW  = (LPWSTR)xmalloc(*lpcchClass);