Added LGPL standard comment, and copyright notices where necessary.
Global replacement of debugtools.h by wine/debug.h.

diff --git a/windows/caret.c b/windows/caret.c
index 932a3d2..52ceaf9 100644
--- a/windows/caret.c
+++ b/windows/caret.c
@@ -4,6 +4,20 @@
  * Copyright 1993 David Metcalfe
  * Copyright 1996 Frans van Dorsselaer
  * Copyright 2001 Eric Pouech
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include "windef.h"
@@ -13,9 +27,9 @@
 #include "wine/wingdi16.h"
 #include "wine/winuser16.h"
 #include "win.h"
-#include "debugtools.h"
+#include "wine/debug.h"
 
-DEFAULT_DEBUG_CHANNEL(caret);
+WINE_DEFAULT_DEBUG_CHANNEL(caret);
 
 typedef struct
 {
diff --git a/windows/class.c b/windows/class.c
index 8e10d0c..613b655 100644
--- a/windows/class.c
+++ b/windows/class.c
@@ -4,6 +4,20 @@
  * Copyright 1993, 1996 Alexandre Julliard
  *           1998 Juergen Schmied (jsch)
  *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
  * FIXME: In win32 all classes are local. They are registered at 
  *	  program start. Processes CANNOT share classes. (Source: some
  *	  win31->NT migration book)
@@ -29,9 +43,9 @@
 #include "controls.h"
 #include "dce.h"
 #include "winproc.h"
-#include "debugtools.h"
+#include "wine/debug.h"
 
-DEFAULT_DEBUG_CHANNEL(class);
+WINE_DEFAULT_DEBUG_CHANNEL(class);
 
 typedef struct tagCLASS
 {
diff --git a/windows/clipboard.c b/windows/clipboard.c
index fc969cd..3a8a879 100644
--- a/windows/clipboard.c
+++ b/windows/clipboard.c
@@ -5,6 +5,20 @@
  *	     1996 Alex Korobka
  *	     1999 Noel Borthwick
  *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
  * NOTES:
  *    This file contains the implementation for the WIN32 Clipboard API
  * and Wine's internal clipboard cache.
@@ -30,9 +44,9 @@
 #include "user.h"
 #include "win.h"
 #include "clipboard.h"
-#include "debugtools.h"
+#include "wine/debug.h"
 
-DEFAULT_DEBUG_CHANNEL(clipboard);
+WINE_DEFAULT_DEBUG_CHANNEL(clipboard);
 
 #define  CF_REGFORMATBASE 	0xC000
 
diff --git a/windows/cursoricon.c b/windows/cursoricon.c
index d31cdb3..6331572 100644
--- a/windows/cursoricon.c
+++ b/windows/cursoricon.c
@@ -5,6 +5,20 @@
  *           1996 Martin Von Loewis
  *           1997 Alex Korobka
  *           1998 Turchanov Sergey
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 /*
@@ -41,16 +55,16 @@
 #include "bitmap.h"
 #include "cursoricon.h"
 #include "module.h"
-#include "debugtools.h"
+#include "wine/debug.h"
 #include "user.h"
 #include "input.h"
 #include "message.h"
 #include "winerror.h"
 #include "msvcrt/excpt.h"
 
-DECLARE_DEBUG_CHANNEL(cursor);
-DECLARE_DEBUG_CHANNEL(icon);
-DECLARE_DEBUG_CHANNEL(resource);
+WINE_DECLARE_DEBUG_CHANNEL(cursor);
+WINE_DECLARE_DEBUG_CHANNEL(icon);
+WINE_DECLARE_DEBUG_CHANNEL(resource);
 
 static HCURSOR hActiveCursor = 0;  /* Active cursor */
 static INT CURSOR_ShowCount = 0;   /* Cursor display count */
diff --git a/windows/dce.c b/windows/dce.c
index 4f27e65..2cc7383 100644
--- a/windows/dce.c
+++ b/windows/dce.c
@@ -4,6 +4,20 @@
  * Copyright 1993 Alexandre Julliard
  *	     1996,1997 Alex Korobka
  *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
  *
  * Note: Visible regions of CS_OWNDC/CS_CLASSDC window DCs 
  * have to be updated dynamically. 
@@ -23,13 +37,13 @@
 #include "gdi.h"
 #include "region.h"
 #include "user.h"
-#include "debugtools.h"
+#include "wine/debug.h"
 #include "windef.h"
 #include "wingdi.h"
 #include "wine/winbase16.h"
 #include "wine/winuser16.h"
 
-DEFAULT_DEBUG_CHANNEL(dc);
+WINE_DEFAULT_DEBUG_CHANNEL(dc);
 
 static DCE *firstDCE;
 static HDC defaultDCstate;
diff --git a/windows/defdlg.c b/windows/defdlg.c
index 6c314d7..de11848 100644
--- a/windows/defdlg.c
+++ b/windows/defdlg.c
@@ -3,6 +3,19 @@
  *
  * Copyright 1993, 1996 Alexandre Julliard
  *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include "windef.h"
@@ -12,9 +25,9 @@
 #include "controls.h"
 #include "win.h"
 #include "winproc.h"
-#include "debugtools.h"
+#include "wine/debug.h"
 
-DEFAULT_DEBUG_CHANNEL(dialog);
+WINE_DEFAULT_DEBUG_CHANNEL(dialog);
 
 
 /***********************************************************************
diff --git a/windows/defwnd.c b/windows/defwnd.c
index a62f289..232a16f 100644
--- a/windows/defwnd.c
+++ b/windows/defwnd.c
@@ -3,6 +3,20 @@
  *
  * Copyright 1993, 1996 Alexandre Julliard
  *	     1995 Alex Korobka
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include <string.h>
@@ -12,7 +26,7 @@
 #include "nonclient.h"
 #include "winpos.h"
 #include "dce.h"
-#include "debugtools.h"
+#include "wine/debug.h"
 #include "spy.h"
 #include "windef.h"
 #include "wingdi.h"
@@ -22,7 +36,7 @@
 #include "wine/server.h"
 #include "imm.h"
 
-DEFAULT_DEBUG_CHANNEL(win);
+WINE_DEFAULT_DEBUG_CHANNEL(win);
 
   /* bits in the dwKeyData */
 #define KEYDATA_ALT 		0x2000
diff --git a/windows/dialog.c b/windows/dialog.c
index c439bc5..ff9d5cb 100644
--- a/windows/dialog.c
+++ b/windows/dialog.c
@@ -2,6 +2,20 @@
  * Dialog functions
  *
  * Copyright 1993, 1994, 1996 Alexandre Julliard
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include "config.h"
@@ -27,9 +41,9 @@
 #include "heap.h"
 #include "win.h"
 #include "user.h"
-#include "debugtools.h"
+#include "wine/debug.h"
 
-DEFAULT_DEBUG_CHANNEL(dialog);
+WINE_DEFAULT_DEBUG_CHANNEL(dialog);
 
 
   /* Dialog control information */
diff --git a/windows/driver.c b/windows/driver.c
index 0455000..02d250c 100644
--- a/windows/driver.c
+++ b/windows/driver.c
@@ -6,6 +6,20 @@
  * Copyright 1994 Martin Ayotte
  * Copyright 1998 Marcus Meissner
  * Copyright 1999,2000 Eric Pouech
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include <string.h>
@@ -15,9 +29,9 @@
 #include "wingdi.h"
 #include "winuser.h"
 #include "mmddk.h"
-#include "debugtools.h"
+#include "wine/debug.h"
 
-DEFAULT_DEBUG_CHANNEL(driver);
+WINE_DEFAULT_DEBUG_CHANNEL(driver);
 
 typedef struct tagWINE_DRIVER
 {
diff --git a/windows/focus.c b/windows/focus.c
index 09cd85e..c7842b1 100644
--- a/windows/focus.c
+++ b/windows/focus.c
@@ -5,6 +5,19 @@
  *           1994 Alexandre Julliard
  * 	     1995 Alex Korobka
  *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include "windef.h"
@@ -16,9 +29,9 @@
 #include "message.h"
 #include "queue.h"
 #include "user.h"
-#include "debugtools.h"
+#include "wine/debug.h"
 
-DEFAULT_DEBUG_CHANNEL(win);
+WINE_DEFAULT_DEBUG_CHANNEL(win);
 
 
 /*****************************************************************
diff --git a/windows/hook.c b/windows/hook.c
index f9e8cab..0f8bb6a 100644
--- a/windows/hook.c
+++ b/windows/hook.c
@@ -5,6 +5,20 @@
  *                 1996 Andrew Lewycky
  *
  * Based on investigations by Alex Korobka
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 /*
@@ -27,9 +41,9 @@
 #include "heap.h"
 #include "struct32.h"
 #include "winproc.h"
-#include "debugtools.h"
+#include "wine/debug.h"
 
-DEFAULT_DEBUG_CHANNEL(hook);
+WINE_DEFAULT_DEBUG_CHANNEL(hook);
 
 #include "pshpack1.h"
 
diff --git a/windows/input.c b/windows/input.c
index 3d69392..7e876ab 100644
--- a/windows/input.c
+++ b/windows/input.c
@@ -7,6 +7,19 @@
  * Copyright 1998 Morten Welinder
  * Copyright 1998 Ulrich Weigand
  *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include <stdlib.h>
@@ -28,13 +41,13 @@
 #include "input.h"
 #include "message.h"
 #include "queue.h"
-#include "debugtools.h"
+#include "wine/debug.h"
 #include "winerror.h"
 
-DECLARE_DEBUG_CHANNEL(key);
-DECLARE_DEBUG_CHANNEL(keyboard);
-DECLARE_DEBUG_CHANNEL(win);
-DEFAULT_DEBUG_CHANNEL(event);
+WINE_DECLARE_DEBUG_CHANNEL(key);
+WINE_DECLARE_DEBUG_CHANNEL(keyboard);
+WINE_DECLARE_DEBUG_CHANNEL(win);
+WINE_DEFAULT_DEBUG_CHANNEL(event);
 
 static BOOL InputEnabled = TRUE;
 static BOOL SwappedButtons;
diff --git a/windows/keyboard.c b/windows/keyboard.c
index 9bab27d..fa1e5ff 100644
--- a/windows/keyboard.c
+++ b/windows/keyboard.c
@@ -7,6 +7,19 @@
  * Copyright 1998 Morten Welinder
  * Copyright 1998 Ulrich Weigand
  *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include <stdlib.h>
@@ -20,10 +33,10 @@
 #include "win.h"
 #include "user.h"
 #include "message.h"
-#include "debugtools.h"
+#include "wine/debug.h"
 #include "winerror.h"
 
-DEFAULT_DEBUG_CHANNEL(keyboard);
+WINE_DEFAULT_DEBUG_CHANNEL(keyboard);
 
 #include "pshpack1.h"
 typedef struct _KBINFO
diff --git a/windows/mdi.c b/windows/mdi.c
index cb11a5f..7d96174 100644
--- a/windows/mdi.c
+++ b/windows/mdi.c
@@ -6,6 +6,20 @@
  * This file contains routines to support MDI (Multiple Document
  * Interface) features .
  *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
  * Notes: Fairly complete implementation.
  *        Also, Excel and WinWord do _not_ use MDI so if you're trying
  *	  to fix them look elsewhere. 
@@ -81,10 +95,10 @@
 #include "controls.h"
 #include "user.h"
 #include "struct32.h"
-#include "debugtools.h"
+#include "wine/debug.h"
 #include "dlgs.h"
 
-DEFAULT_DEBUG_CHANNEL(mdi);
+WINE_DEFAULT_DEBUG_CHANNEL(mdi);
 
 #define MDI_MAXLISTLENGTH       0x40
 #define MDI_MAXTITLELENGTH      0xa1
diff --git a/windows/message.c b/windows/message.c
index 517751c..94a98e5 100644
--- a/windows/message.c
+++ b/windows/message.c
@@ -2,6 +2,20 @@
  * Message queues related functions
  *
  * Copyright 1993, 1994 Alexandre Julliard
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include <stdlib.h>
@@ -29,10 +43,10 @@
 #include "thread.h"
 #include "task.h"
 #include "controls.h"
-#include "debugtools.h"
+#include "wine/debug.h"
 
-DEFAULT_DEBUG_CHANNEL(msg);
-DECLARE_DEBUG_CHANNEL(key);
+WINE_DEFAULT_DEBUG_CHANNEL(msg);
+WINE_DECLARE_DEBUG_CHANNEL(key);
 
 #define WM_NCMOUSEFIRST         WM_NCMOUSEMOVE
 #define WM_NCMOUSELAST          WM_NCMBUTTONDBLCLK
diff --git a/windows/msgbox.c b/windows/msgbox.c
index df922c4..788cdaf 100644
--- a/windows/msgbox.c
+++ b/windows/msgbox.c
@@ -2,6 +2,20 @@
  * Message boxes
  *
  * Copyright 1995 Bernd Schmidt
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include <string.h>
@@ -13,9 +27,9 @@
 #include "dlgs.h"
 #include "heap.h"
 #include "user.h"
-#include "debugtools.h"
+#include "wine/debug.h"
 
-DEFAULT_DEBUG_CHANNEL(dialog);
+WINE_DEFAULT_DEBUG_CHANNEL(dialog);
 
 #define MSGBOX_IDICON 1088
 #define MSGBOX_IDTEXT 100
diff --git a/windows/multimon.c b/windows/multimon.c
index e770482..4a4092f 100644
--- a/windows/multimon.c
+++ b/windows/multimon.c
@@ -2,6 +2,20 @@
  * Multimonitor APIs
  *
  * Copyright 1998 Turchanov Sergey
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include <string.h>
diff --git a/windows/nonclient.c b/windows/nonclient.c
index b04a747..999b5a65 100644
--- a/windows/nonclient.c
+++ b/windows/nonclient.c
@@ -3,6 +3,19 @@
  *
  * Copyright 1994 Alexandre Julliard
  *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include "windef.h"
@@ -17,12 +30,12 @@
 #include "winpos.h"
 #include "hook.h"
 #include "nonclient.h"
-#include "debugtools.h"
+#include "wine/debug.h"
 #include "shellapi.h"
 #include "bitmap.h"
 
-DEFAULT_DEBUG_CHANNEL(nonclient);
-DECLARE_DEBUG_CHANNEL(shell);
+WINE_DEFAULT_DEBUG_CHANNEL(nonclient);
+WINE_DECLARE_DEBUG_CHANNEL(shell);
 
 BOOL NC_DrawGrayButton(HDC hdc, int x, int y);
 
diff --git a/windows/painting.c b/windows/painting.c
index dcad3ac..9dc25b5 100644
--- a/windows/painting.c
+++ b/windows/painting.c
@@ -3,6 +3,20 @@
  *
  * Copyright 1993, 1994, 1995 Alexandre Julliard
  *			 1999 Alex Korobka
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include <string.h>
@@ -16,10 +30,10 @@
 #include "win.h"
 #include "queue.h"
 #include "dce.h"
-#include "debugtools.h"
+#include "wine/debug.h"
 
-DEFAULT_DEBUG_CHANNEL(win);
-DECLARE_DEBUG_CHANNEL(nonclient);
+WINE_DEFAULT_DEBUG_CHANNEL(win);
+WINE_DECLARE_DEBUG_CHANNEL(nonclient);
 
 /* client rect in window coordinates */
 
diff --git a/windows/queue.c b/windows/queue.c
index 00dd6aa..5f0b6d4 100644
--- a/windows/queue.c
+++ b/windows/queue.c
@@ -2,6 +2,20 @@
  * Message queues related functions
  *
  * Copyright 1993, 1994 Alexandre Julliard
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include <string.h>
@@ -17,11 +31,11 @@
 #include "user.h"
 #include "hook.h"
 #include "thread.h"
-#include "debugtools.h"
+#include "wine/debug.h"
 #include "wine/server.h"
 #include "spy.h"
 
-DEFAULT_DEBUG_CHANNEL(msg);
+WINE_DEFAULT_DEBUG_CHANNEL(msg);
 
 
 static PERQUEUEDATA *pQDataWin16 = NULL;  /* Global perQData for Win16 tasks */
diff --git a/windows/rect.c b/windows/rect.c
index d5bcef1..73ffe0e 100644
--- a/windows/rect.c
+++ b/windows/rect.c
@@ -3,6 +3,19 @@
  *
  * Copyright 1993, 1996 Alexandre Julliard
  *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include "windef.h"
diff --git a/windows/scroll.c b/windows/scroll.c
index 84e2391..ac215dc 100644
--- a/windows/scroll.c
+++ b/windows/scroll.c
@@ -4,7 +4,19 @@
  * Copyright  David W. Metcalfe, 1993
  *	      Alex Korobka       1995,1996
  *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
  *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include <stdlib.h>
@@ -14,9 +26,9 @@
 #include "wine/winuser16.h"
 #include "winuser.h"
 #include "user.h"
-#include "debugtools.h"
+#include "wine/debug.h"
 
-DEFAULT_DEBUG_CHANNEL(scroll);
+WINE_DEFAULT_DEBUG_CHANNEL(scroll);
 
 /*************************************************************************
  *		ScrollWindow (USER32.@)
diff --git a/windows/spy.c b/windows/spy.c
index d17f6d4..5fab928 100644
--- a/windows/spy.c
+++ b/windows/spy.c
@@ -3,6 +3,20 @@
  *
  * Copyright 1994, Bob Amstadt
  *           1995, Alex Korobka  
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include <stdlib.h>
@@ -15,11 +29,11 @@
 #include "wine/winbase16.h"
 #include "wine/unicode.h"
 #include "win.h"
-#include "debugtools.h"
+#include "wine/debug.h"
 #include "spy.h"
 #include "commctrl.h"
 
-DEFAULT_DEBUG_CHANNEL(message);
+WINE_DEFAULT_DEBUG_CHANNEL(message);
 
 #define SPY_MAX_MSGNUM   WM_USER
 #define SPY_INDENT_UNIT  4  /* 4 spaces */
diff --git a/windows/struct32.c b/windows/struct32.c
index 3638b5f..c83c518 100644
--- a/windows/struct32.c
+++ b/windows/struct32.c
@@ -2,6 +2,20 @@
  * Win32 structure conversion functions
  *
  * Copyright 1996 Martin von Loewis
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include "struct32.h"
diff --git a/windows/struct32.h b/windows/struct32.h
index 50c15e1..33b14ed 100644
--- a/windows/struct32.h
+++ b/windows/struct32.h
@@ -1,4 +1,23 @@
-/* Structure definitions for Win32 -- used only internally */
+/*
+ * Structure definitions for Win32 -- used only internally
+ *
+ * Copyright 1996 Martin von Loewis
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
 #ifndef __WINE_STRUCT32_H
 #define __WINE_STRUCT32_H
 
diff --git a/windows/syscolor.c b/windows/syscolor.c
index d15cb06..5f8be9c 100644
--- a/windows/syscolor.c
+++ b/windows/syscolor.c
@@ -4,6 +4,19 @@
  * Copyright  David W. Metcalfe, 1993
  * Copyright  Alexandre Julliard, 1994
  *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include <assert.h>
@@ -17,13 +30,13 @@
 #include "sysmetrics.h"
 #include "winbase.h"
 #include "winuser.h"
-#include "debugtools.h"
+#include "wine/debug.h"
 #include "winreg.h"
 #include "local.h"
 #include "user.h"
 #include "gdi.h" /* sic */
 
-DEFAULT_DEBUG_CHANNEL(syscolor);
+WINE_DEFAULT_DEBUG_CHANNEL(syscolor);
 
 static const char * const DefSysColors[] =
 {
diff --git a/windows/sysmetrics.c b/windows/sysmetrics.c
index 60c2081..0b3b7da 100644
--- a/windows/sysmetrics.c
+++ b/windows/sysmetrics.c
@@ -3,6 +3,19 @@
  *
  * Copyright 1994 Alexandre Julliard
  *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include <stdio.h>
diff --git a/windows/sysparams.c b/windows/sysparams.c
index e39126b..df43a62 100644
--- a/windows/sysparams.c
+++ b/windows/sysparams.c
@@ -2,6 +2,20 @@
  * System parameters functions
  *
  * Copyright 1994 Alexandre Julliard
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include "config.h"
@@ -19,10 +33,10 @@
 
 #include "controls.h"
 #include "user.h"
-#include "debugtools.h"
+#include "wine/debug.h"
 #include "sysmetrics.h"
 
-DEFAULT_DEBUG_CHANNEL(system);
+WINE_DEFAULT_DEBUG_CHANNEL(system);
 
 /* System parameter indexes */
 #define SPI_SETBEEP_IDX                         0
diff --git a/windows/timer.c b/windows/timer.c
index 2dc61fd..f4e8a55 100644
--- a/windows/timer.c
+++ b/windows/timer.c
@@ -2,6 +2,20 @@
  * Timer functions
  *
  * Copyright 1993 Alexandre Julliard
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include "windef.h"
@@ -14,9 +28,9 @@
 #include "message.h"
 #include "win.h"
 #include "wine/server.h"
-#include "debugtools.h"
+#include "wine/debug.h"
 
-DEFAULT_DEBUG_CHANNEL(timer);
+WINE_DEFAULT_DEBUG_CHANNEL(timer);
 
 
 typedef struct tagTIMER
diff --git a/windows/user.c b/windows/user.c
index 7385dd0..1abf7d9 100644
--- a/windows/user.c
+++ b/windows/user.c
@@ -3,6 +3,20 @@
  *
  * Copyright 1993 Robert J. Amstadt
  *	     1996 Alex Korobka 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include <stdlib.h>
@@ -22,13 +36,13 @@
 #include "sysmetrics.h"
 #include "local.h"
 #include "module.h"
-#include "debugtools.h"
+#include "wine/debug.h"
 
-DECLARE_DEBUG_CHANNEL(hook);
-DECLARE_DEBUG_CHANNEL(local);
-DECLARE_DEBUG_CHANNEL(system);
-DECLARE_DEBUG_CHANNEL(win);
-DECLARE_DEBUG_CHANNEL(win32);
+WINE_DECLARE_DEBUG_CHANNEL(hook);
+WINE_DECLARE_DEBUG_CHANNEL(local);
+WINE_DECLARE_DEBUG_CHANNEL(system);
+WINE_DECLARE_DEBUG_CHANNEL(win);
+WINE_DECLARE_DEBUG_CHANNEL(win32);
 
 SYSLEVEL USER_SysLevel = { CRITICAL_SECTION_INIT("USER_SysLevel"), 2 };
 
diff --git a/windows/win.c b/windows/win.c
index 0bc438f..a8c715b 100644
--- a/windows/win.c
+++ b/windows/win.c
@@ -2,6 +2,20 @@
  * Window related functions
  *
  * Copyright 1993, 1994 Alexandre Julliard
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include <assert.h>
@@ -24,10 +38,10 @@
 #include "winpos.h"
 #include "winerror.h"
 #include "stackframe.h"
-#include "debugtools.h"
+#include "wine/debug.h"
 
-DEFAULT_DEBUG_CHANNEL(win);
-DECLARE_DEBUG_CHANNEL(msg);
+WINE_DEFAULT_DEBUG_CHANNEL(win);
+WINE_DECLARE_DEBUG_CHANNEL(msg);
 
 #define NB_USER_HANDLES  (LAST_USER_HANDLE - FIRST_USER_HANDLE + 1)
 
diff --git a/windows/winhelp.c b/windows/winhelp.c
index 009e21a..49c6bbc 100644
--- a/windows/winhelp.c
+++ b/windows/winhelp.c
@@ -1,19 +1,35 @@
 /*
  * Windows Help
+ *
+ * Copyright 1996 Martin von Loewis
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
-#include "debugtools.h"
+#include "wine/debug.h"
 #include "windef.h"
 #include "wingdi.h"
 #include "wine/winuser16.h"
 #include "wine/winbase16.h"
 #include "win.h"
 
-DEFAULT_DEBUG_CHANNEL(win);
+WINE_DEFAULT_DEBUG_CHANNEL(win);
 
 
 /* WinHelp internal structure */
diff --git a/windows/winpos.c b/windows/winpos.c
index 72d126c..6a6c95d 100644
--- a/windows/winpos.c
+++ b/windows/winpos.c
@@ -3,6 +3,20 @@
  *
  * Copyright 1993, 1994, 1995 Alexandre Julliard
  *                       1995, 1996, 1999 Alex Korobka
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include <string.h>
@@ -22,10 +36,10 @@
 #include "winpos.h"
 #include "dce.h"
 #include "nonclient.h"
-#include "debugtools.h"
+#include "wine/debug.h"
 #include "input.h"
 
-DEFAULT_DEBUG_CHANNEL(win);
+WINE_DEFAULT_DEBUG_CHANNEL(win);
 
 #define HAS_DLGFRAME(style,exStyle) \
     (((exStyle) & WS_EX_DLGMODALFRAME) || \
diff --git a/windows/winproc.c b/windows/winproc.c
index 706a944..1cf3785 100644
--- a/windows/winproc.c
+++ b/windows/winproc.c
@@ -3,6 +3,20 @@
  *
  * Copyright 1995 Martin von Loewis
  * Copyright 1996 Alexandre Julliard
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include "config.h"
@@ -21,14 +35,14 @@
 #include "struct32.h"
 #include "win.h"
 #include "winproc.h"
-#include "debugtools.h"
+#include "wine/debug.h"
 #include "spy.h"
 #include "task.h"
 #include "thread.h"
 
-DECLARE_DEBUG_CHANNEL(msg);
-DECLARE_DEBUG_CHANNEL(relay);
-DECLARE_DEBUG_CHANNEL(win);
+WINE_DECLARE_DEBUG_CHANNEL(msg);
+WINE_DECLARE_DEBUG_CHANNEL(relay);
+WINE_DECLARE_DEBUG_CHANNEL(win);
 
 #include "pshpack1.h"
 
diff --git a/windows/x11drv/clipboard.c b/windows/x11drv/clipboard.c
index 4dcd92c..73703a8 100644
--- a/windows/x11drv/clipboard.c
+++ b/windows/x11drv/clipboard.c
@@ -5,6 +5,20 @@
  *	     1996 Alex Korobka
  *	     1999 Noel Borthwick
  *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
  * NOTES:
  *    This file contains the X specific implementation for the windows
  *    Clipboard API.
@@ -58,9 +72,9 @@
 #include "clipboard.h"
 #include "win.h"
 #include "x11drv.h"
-#include "debugtools.h"
+#include "wine/debug.h"
 
-DEFAULT_DEBUG_CHANNEL(clipboard);
+WINE_DEFAULT_DEBUG_CHANNEL(clipboard);
 
 /* Selection masks */
 
diff --git a/windows/x11drv/event.c b/windows/x11drv/event.c
index e9022e9..edca7f7 100644
--- a/windows/x11drv/event.c
+++ b/windows/x11drv/event.c
@@ -3,6 +3,20 @@
  *
  * Copyright 1993 Alexandre Julliard
  *	     1999 Noel Borthwick
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include "config.h"
@@ -24,7 +38,7 @@
 
 #include "clipboard.h"
 #include "dce.h"
-#include "debugtools.h"
+#include "wine/debug.h"
 #include "input.h"
 #include "options.h"
 #include "win.h"
@@ -34,8 +48,8 @@
 #include "x11drv.h"
 #include "shellapi.h"
 
-DEFAULT_DEBUG_CHANNEL(event);
-DECLARE_DEBUG_CHANNEL(win);
+WINE_DEFAULT_DEBUG_CHANNEL(event);
+WINE_DECLARE_DEBUG_CHANNEL(win);
   
 /* X context to associate a hwnd to an X window */
 extern XContext winContext;
diff --git a/windows/x11drv/keyboard.c b/windows/x11drv/keyboard.c
index 9a93836..d7de84e 100644
--- a/windows/x11drv/keyboard.c
+++ b/windows/x11drv/keyboard.c
@@ -7,6 +7,20 @@
  * Copyright 1998 Morten Welinder
  * Copyright 1998 Ulrich Weigand
  * Copyright 1999 Ove Kåven
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include "config.h"
@@ -30,11 +44,11 @@
 #include "winnls.h"
 #include "win.h"
 #include "x11drv.h"
-#include "debugtools.h"
+#include "wine/debug.h"
 
-DEFAULT_DEBUG_CHANNEL(keyboard);
-DECLARE_DEBUG_CHANNEL(key);
-DECLARE_DEBUG_CHANNEL(dinput);
+WINE_DEFAULT_DEBUG_CHANNEL(keyboard);
+WINE_DECLARE_DEBUG_CHANNEL(key);
+WINE_DECLARE_DEBUG_CHANNEL(dinput);
 
 int min_keycode, max_keycode, keysyms_per_keycode;
 WORD keyc2vkey[256], keyc2scan[256];
diff --git a/windows/x11drv/wineclipsrv.c b/windows/x11drv/wineclipsrv.c
index 33032e0..4b0b18b 100644
--- a/windows/x11drv/wineclipsrv.c
+++ b/windows/x11drv/wineclipsrv.c
@@ -3,6 +3,20 @@
  *
  *      Copyright 1999  Noel Borthwick
  *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
  * USAGE:
  *       wineclipsrv [selection_mask] [debugClass_mask] [clearAllSelections]
  *