Converted to the new debugging interface (done with the help of the
script written by Patrik Stridvall).

diff --git a/files/directory.c b/files/directory.c
index aa6926e..b687c23 100644
--- a/files/directory.c
+++ b/files/directory.c
@@ -23,7 +23,7 @@
 #include "heap.h"
 #include "msdos.h"
 #include "options.h"
-#include "debug.h"
+#include "debugtools.h"
 
 DECLARE_DEBUG_CHANNEL(dosfs)
 DECLARE_DEBUG_CHANNEL(file)
@@ -48,7 +48,7 @@
         !FILE_Stat( full_name->long_name, &info ) ||
         !(info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
     {
-        MSG("Invalid path '%s' for %s directory\n", path, keyname);
+        MESSAGE("Invalid path '%s' for %s directory\n", path, keyname);
         return 0;
     }
     return 1;
@@ -73,7 +73,7 @@
     cwd = path;
     if ((drive = DRIVE_FindDriveRoot( &cwd )) == -1)
     {
-        MSG("Warning: could not find wine.conf [Drive x] entry "
+        MESSAGE("Warning: could not find wine.conf [Drive x] entry "
             "for current working directory %s; "
 	    "starting in windows directory.\n", cwd );
     }
@@ -94,11 +94,11 @@
     {
     	if (errno==EACCES)
 	{
-		MSG("Warning: The Temporary Directory (as specified in your configuration file) is NOT writeable.\n");
+		MESSAGE("Warning: The Temporary Directory (as specified in your configuration file) is NOT writeable.\n");
 		PROFILE_UsageWineIni();
 	}
 	else
-		MSG("Warning: Access to Temporary Directory failed (%s).\n",
+		MESSAGE("Warning: Access to Temporary Directory failed (%s).\n",
 		    strerror(errno));
     }
 
@@ -120,14 +120,14 @@
     SetEnvironmentVariableA( "windir", DIR_Windows.short_name );
     SetEnvironmentVariableA( "winsysdir", DIR_System.short_name );
 
-    TRACE(dosfs, "WindowsDir = %s (%s)\n",
+    TRACE_(dosfs)("WindowsDir = %s (%s)\n",
           DIR_Windows.short_name, DIR_Windows.long_name );
-    TRACE(dosfs, "SystemDir  = %s (%s)\n",
+    TRACE_(dosfs)("SystemDir  = %s (%s)\n",
           DIR_System.short_name, DIR_System.long_name );
-    TRACE(dosfs, "TempDir    = %s (%s)\n",
+    TRACE_(dosfs)("TempDir    = %s (%s)\n",
           tmp_dir.short_name, tmp_dir.long_name );
-    TRACE(dosfs, "Path       = %s\n", path );
-    TRACE(dosfs, "Cwd        = %c:\\%s\n",
+    TRACE_(dosfs)("Path       = %s\n", path );
+    TRACE_(dosfs)("Cwd        = %c:\\%s\n",
           'A' + drive, DRIVE_GetDosCwd( drive ) );
 
     return 1;
@@ -291,7 +291,7 @@
  */
 BOOL16 WINAPI CreateDirectory16( LPCSTR path, LPVOID dummy )
 {
-    TRACE(file,"(%s,%p)\n", path, dummy );
+    TRACE_(file)("(%s,%p)\n", path, dummy );
     return (BOOL16)CreateDirectoryA( path, NULL );
 }
 
@@ -311,16 +311,16 @@
 {
     DOS_FULL_NAME full_name;
 
-    TRACE(file, "(%s,%p)\n", path, lpsecattribs );
+    TRACE_(file)("(%s,%p)\n", path, lpsecattribs );
     if (DOSFS_GetDevice( path ))
     {
-        TRACE(file, "cannot use device '%s'!\n",path);
+        TRACE_(file)("cannot use device '%s'!\n",path);
         SetLastError( ERROR_ACCESS_DENIED );
         return FALSE;
     }
     if (!DOSFS_GetFullName( path, FALSE, &full_name )) return 0;
     if (mkdir( full_name.long_name, 0777 ) == -1) {
-        WARN (file, "Errno %i trying to create directory %s.\n", errno, full_name.long_name);
+        WARN_(file)("Errno %i trying to create directory %s.\n", errno, full_name.long_name);
 	/* the FILE_SetDosError() generated error codes don't match the 
 	 * CreateDirectory ones for some errnos */
 	switch (errno) {
@@ -383,11 +383,11 @@
 {
     DOS_FULL_NAME full_name;
 
-    TRACE(file, "'%s'\n", path );
+    TRACE_(file)("'%s'\n", path );
 
     if (DOSFS_GetDevice( path ))
     {
-        TRACE(file, "cannot remove device '%s'!\n", path);
+        TRACE_(file)("cannot remove device '%s'!\n", path);
         SetLastError( ERROR_FILE_NOT_FOUND );
         return FALSE;
     }
@@ -645,7 +645,7 @@
         for (p = buffer; *p; p++) if (*p == '/') *p = '\\';
         if (lastpart) *lastpart = strrchr( buffer, '\\' ) + 1;
     }
-    TRACE(dosfs, "Returning %d\n", strlen(res) + 3 );
+    TRACE_(dosfs)("Returning %d\n", strlen(res) + 3 );
     return strlen(res) + 3;
 }
 
diff --git a/files/dos_fs.c b/files/dos_fs.c
index 878e1db..73a6307 100644
--- a/files/dos_fs.c
+++ b/files/dos_fs.c
@@ -31,7 +31,7 @@
 #include "server.h"
 #include "process.h"
 #include "options.h"
-#include "debug.h"
+#include "debugtools.h"
 
 DECLARE_DEBUG_CHANNEL(dosfs)
 DECLARE_DEBUG_CHANNEL(file)
@@ -525,13 +525,13 @@
     while (len > 1 && name[len-1] == '.') len--;
     if (long_len < len + 1) return FALSE;
 
-    TRACE(dosfs, "%s,%s\n", path, name );
+    TRACE_(dosfs)("%s,%s\n", path, name );
 
     if (!DOSFS_ToDosFCBFormat( name, dos_name )) dos_name[0] = '\0';
 
     if (!(dir = DOSFS_OpenDir( path )))
     {
-        WARN(dosfs, "(%s,%s): can't open dir: %s\n",
+        WARN_(dosfs)("(%s,%s): can't open dir: %s\n",
                        path, name, strerror(errno) );
         return FALSE;
     }
@@ -571,11 +571,11 @@
             else
                 DOSFS_Hash( long_name, short_buf, FALSE, ignore_case );
         }
-        TRACE(dosfs, "(%s,%s) -> %s (%s)\n",
+        TRACE_(dosfs)("(%s,%s) -> %s (%s)\n",
 		     path, name, long_name, short_buf ? short_buf : "***");
     }
     else
-        WARN(dosfs, "'%s' not found in '%s'\n", name, path);
+        WARN_(dosfs)("'%s' not found in '%s'\n", name, path);
     DOSFS_CloseDir( dir );
     return ret;
 }
@@ -666,7 +666,7 @@
 				to_dup = GetStdHandle( STD_OUTPUT_HANDLE );
 				break;
 			default:
-				FIXME(dosfs,"can't open CON read/write\n");
+				FIXME_(dosfs)("can't open CON read/write\n");
 				return HFILE_ERROR;
 				break;
 			}
@@ -687,17 +687,17 @@
 
 		    if(devname[0])
 		    {
-			TRACE(file,"DOSFS_OpenDevice %s is %s\n",
+			TRACE_(file)("DOSFS_OpenDevice %s is %s\n",
 				DOSFS_Devices[i].name,devname);
 			r =  FILE_CreateFile( devname, access,
 				FILE_SHARE_READ|FILE_SHARE_WRITE, NULL,
 				OPEN_EXISTING, 0, -1 );
-			TRACE(file,"Create_File return %08X\n",r);
+			TRACE_(file)("Create_File return %08X\n",r);
 			return r;
 		    }
 		}
 
-		FIXME(dosfs,"device open %s not supported (yet)\n",DOSFS_Devices[i].name);
+		FIXME_(dosfs)("device open %s not supported (yet)\n",DOSFS_Devices[i].name);
     		return HFILE_ERROR;
 	    }
         }
@@ -725,7 +725,7 @@
     {
         if ((drive = DRIVE_FindDriveRoot( name )) == -1)
         {
-            MSG("Warning: %s not accessible from a DOS drive\n", *name );
+            MESSAGE("Warning: %s not accessible from a DOS drive\n", *name );
             /* Assume it really was a DOS name */
             drive = DRIVE_GetCurrentDrive();            
         }
@@ -757,7 +757,7 @@
     UINT flags;
     char *p_l, *p_s, *root;
 
-    TRACE(dosfs, "%s (last=%d)\n",
+    TRACE_(dosfs)("%s (last=%d)\n",
                    name, check_last );
 
     if ((full->drive = DOSFS_GetPathDrive( &name )) == -1) return FALSE;
@@ -870,7 +870,7 @@
     }
     if (!full->long_name[0]) strcpy( full->long_name, "/" );
     if (!full->short_name[2]) strcpy( full->short_name + 2, "\\" );
-    TRACE(dosfs, "returning %s = %s\n",
+    TRACE_(dosfs)("returning %s = %s\n",
                    full->long_name, full->short_name );
     return TRUE;
 }
@@ -1070,7 +1070,7 @@
     char *endchar = buffer + sizeof(buffer) - 2;
     *endchar = '\0';
     
-    TRACE(dosfs, "converting '%s'\n", name );
+    TRACE_(dosfs)("converting '%s'\n", name );
 
     if (!name || !result || ((drive = DOSFS_GetPathDrive( &name )) == -1) )
     {   SetLastError( ERROR_INVALID_PARAMETER );
@@ -1141,7 +1141,7 @@
     else
         lstrcpynA( result, buffer, len );
 
-    TRACE(dosfs, "returning '%s'\n", buffer );
+    TRACE_(dosfs)("returning '%s'\n", buffer );
 
     /* If the lpBuffer buffer is too small, the return value is the 
     size of the buffer, in characters, required to hold the path. */
@@ -1275,7 +1275,7 @@
         lstrcpynA( p, long_name, sizeof(buffer) - (int)(p - buffer) );
         if (!FILE_Stat( buffer, &fileinfo ))
         {
-            WARN(dosfs, "can't stat %s\n", buffer);
+            WARN_(dosfs)("can't stat %s\n", buffer);
             continue;
         }
         if (fileinfo.dwFileAttributes & ~attr) continue;
@@ -1297,7 +1297,7 @@
 
         lstrcpynA( entry->cFileName, long_name, sizeof(entry->cFileName) );
         if (!(flags & DRIVE_CASE_PRESERVING)) CharLowerA( entry->cFileName );
-        TRACE(dosfs, "returning %s (%s) %02lx %ld\n",
+        TRACE_(dosfs)("returning %s (%s) %02lx %ld\n",
                        entry->cFileName, entry->cAlternateFileName,
                        entry->dwFileAttributes, entry->nFileSizeLow );
         return 1;
@@ -1862,7 +1862,7 @@
     LPSTR s;
     char  buffer[200];
 
-    TRACE(dosfs,"(%s,...)\n",devname?devname:"<null>");
+    TRACE_(dosfs)("(%s,...)\n",devname?devname:"<null>");
     if (!devname) {
 	/* return known MSDOS devices */
 	lstrcpyA(buffer,"CON COM1 COM2 LPT1 NUL ");
@@ -1935,7 +1935,7 @@
 }
 
 BOOL WINAPI DefineDosDeviceA(DWORD flags,LPCSTR devname,LPCSTR targetpath) {
-	FIXME(dosfs,"(0x%08lx,%s,%s),stub!\n",flags,devname,targetpath);
+	FIXME_(dosfs)("(0x%08lx,%s,%s),stub!\n",flags,devname,targetpath);
 	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
 	return FALSE;
 }
diff --git a/files/drive.c b/files/drive.c
index 41418c8..85dc688 100644
--- a/files/drive.c
+++ b/files/drive.c
@@ -42,7 +42,7 @@
 #include "msdos.h"
 #include "options.h"
 #include "task.h"
-#include "debug.h"
+#include "debugtools.h"
 
 DECLARE_DEBUG_CHANNEL(dosfs)
 DECLARE_DEBUG_CHANNEL(file)
@@ -110,7 +110,7 @@
     {
         if (!strcasecmp( buffer, DRIVE_Types[i] )) return (DRIVETYPE)i;
     }
-    MSG("%s: unknown type '%s', defaulting to 'hd'.\n", name, buffer );
+    MESSAGE("%s: unknown type '%s', defaulting to 'hd'.\n", name, buffer );
     return TYPE_HD;
 }
 
@@ -124,7 +124,7 @@
 
     for (descr = DRIVE_Filesystems; descr->name; descr++)
         if (!strcasecmp( value, descr->name )) return descr->flags;
-    MSG("%s: unknown filesystem type '%s', defaulting to 'win95'.\n",
+    MESSAGE("%s: unknown filesystem type '%s', defaulting to 'win95'.\n",
 	name, value );
     return DRIVE_CASE_PRESERVING;
 }
@@ -154,12 +154,12 @@
 
             if (stat( path, &drive_stat_buffer ))
             {
-                MSG("Could not stat %s, ignoring drive %c:\n", path, 'A' + i );
+                MESSAGE("Could not stat %s, ignoring drive %c:\n", path, 'A' + i );
                 continue;
             }
             if (!S_ISDIR(drive_stat_buffer.st_mode))
             {
-                MSG("%s is not a directory, ignoring drive %c:\n",
+                MESSAGE("%s is not a directory, ignoring drive %c:\n",
 		    path, 'A' + i );
                 continue;
             }
@@ -203,17 +203,17 @@
                 DRIVE_CurDrive = i;
 
             count++;
-            TRACE(dosfs, "%s: path=%s type=%s label='%s' serial=%08lx flags=%08x dev=%x ino=%x\n",
+            TRACE_(dosfs)("%s: path=%s type=%s label='%s' serial=%08lx flags=%08x dev=%x ino=%x\n",
                            name, path, DRIVE_Types[drive->type],
                            drive->label, drive->serial, drive->flags,
                            (int)drive->dev, (int)drive->ino );
         }
-        else WARN(dosfs, "%s: not defined\n", name );
+        else WARN_(dosfs)("%s: not defined\n", name );
     }
 
     if (!count) 
     {
-        MSG("Warning: no valid DOS drive found, check your configuration file.\n" );
+        MESSAGE("Warning: no valid DOS drive found, check your configuration file.\n" );
         /* Create a C drive pointing to Unix root dir */
         DOSDrives[2].root     = HEAP_strdupA( SystemHeap, 0, "/" );
         DOSDrives[2].dos_cwd  = HEAP_strdupA( SystemHeap, 0, "" );
@@ -275,7 +275,7 @@
         SetLastError( ERROR_INVALID_DRIVE );
         return 0;
     }
-    TRACE(dosfs, "%c:\n", 'A' + drive );
+    TRACE_(dosfs)("%c:\n", 'A' + drive );
     DRIVE_CurDrive = drive;
     if (pTask) pTask->curdrive = drive | 0x80;
     return 1;
@@ -335,7 +335,7 @@
     *next = 0;
 
     if (rootdrive != -1)
-        TRACE(dosfs, "%s -> drive %c:, root='%s', name='%s'\n",
+        TRACE_(dosfs)("%s -> drive %c:, root='%s', name='%s'\n",
                        buffer, 'A' + rootdrive,
                        DOSDrives[rootdrive].root, *path );
     return rootdrive;
@@ -458,7 +458,7 @@
 
     strcpy( buffer, "A:" );
     buffer[0] += drive;
-    TRACE(dosfs, "(%c:,%s)\n", buffer[0], path );
+    TRACE_(dosfs)("(%c:,%s)\n", buffer[0], path );
     lstrcpynA( buffer + 2, path, sizeof(buffer) - 2 );
 
     if (!DOSFS_GetFullName( buffer, TRUE, &full_name )) return 0;
@@ -471,7 +471,7 @@
     unix_cwd = full_name.long_name + strlen( DOSDrives[drive].root );
     while (*unix_cwd == '/') unix_cwd++;
 
-    TRACE(dosfs, "(%c:): unix_cwd=%s dos_cwd=%s\n",
+    TRACE_(dosfs)("(%c:): unix_cwd=%s dos_cwd=%s\n",
                    'A' + drive, unix_cwd, full_name.short_name + 3 );
 
     HeapFree( SystemHeap, 0, DOSDrives[drive].dos_cwd );
@@ -544,7 +544,7 @@
 
     if ( new->root )
     {
-        TRACE(dosfs, "Can\'t map drive %c to drive %c - "
+        TRACE_(dosfs)("Can\'t map drive %c to drive %c - "
 	                        "drive %c already exists\n",
 			'A' + existing_drive, 'A' + new_drive,
 			'A' + new_drive );
@@ -564,7 +564,7 @@
     new->dev = old->dev;
     new->ino = old->ino;
 
-    TRACE(dosfs, "Drive %c is now equal to drive %c\n",
+    TRACE_(dosfs)("Drive %c is now equal to drive %c\n",
                     'A' + new_drive, 'A' + existing_drive );
 
     return 1;
@@ -661,7 +661,7 @@
 #endif
     {
         FILE_SetDosError();
-        WARN(dosfs, "cannot do statfs(%s)\n", DOSDrives[drive].root);
+        WARN_(dosfs)("cannot do statfs(%s)\n", DOSDrives[drive].root);
         return 0;
     }
 
@@ -824,7 +824,7 @@
     {
         if ((root[1]) && ((root[1] != ':') || (root[2] != '\\')))
         {
-            WARN(dosfs, "invalid root '%s'\n", root );
+            WARN_(dosfs)("invalid root '%s'\n", root );
             return FALSE;
         }
         drive = toupper(root[0]) - 'A';
@@ -872,7 +872,7 @@
 UINT16 WINAPI GetDriveType16(
 	UINT16 drive	/* [in] number (NOT letter) of drive */
 ) {
-    TRACE(dosfs, "(%c:)\n", 'A' + drive );
+    TRACE_(dosfs)("(%c:)\n", 'A' + drive );
     switch(DRIVE_GetType(drive))
     {
     case TYPE_FLOPPY:  return DRIVE_REMOVABLE;
@@ -917,14 +917,14 @@
 UINT WINAPI GetDriveTypeA(LPCSTR root /* String describing drive */)
 {
     int drive;
-    TRACE(dosfs, "(%s)\n", debugstr_a(root));
+    TRACE_(dosfs)("(%s)\n", debugstr_a(root));
 
     if (NULL == root) drive = DRIVE_GetCurrentDrive();
     else
     {
         if ((root[1]) && (root[1] != ':'))
 	{
-	    WARN(dosfs, "invalid root '%s'\n", debugstr_a(root));
+	    WARN_(dosfs)("invalid root '%s'\n", debugstr_a(root));
 	    return DRIVE_DOESNOTEXIST;
 	}
 	drive = toupper(root[0]) - 'A';
@@ -1015,7 +1015,7 @@
     int olddrive, drive = DRIVE_GetCurrentDrive();
 
     if (!dir) {
-    	ERR(file,"(NULL)!\n");
+    	ERR_(file)("(NULL)!\n");
 	return FALSE;
     }
     if (dir[0] && (dir[1]==':'))
@@ -1134,7 +1134,7 @@
     {
         if ((root[1]) && (root[1] != ':'))
         {
-            WARN(dosfs, "invalid root '%s'\n",root);
+            WARN_(dosfs)("invalid root '%s'\n",root);
             return FALSE;
         }
         drive = toupper(root[0]) - 'A';
@@ -1203,6 +1203,6 @@
 }
 
 BOOL WINAPI SetVolumeLabelA(LPCSTR rootpath,LPCSTR volname) {
-	FIXME(dosfs,"(%s,%s),stub!\n",rootpath,volname);
+	FIXME_(dosfs)("(%s,%s),stub!\n",rootpath,volname);
 	return TRUE;
 }