Added a WINEDEBUG environment variable that allows turning on debug
output as early as possible during startup.

diff --git a/documentation/wine.man.in b/documentation/wine.man.in
index 4e7358a..d1338ec 100644
--- a/documentation/wine.man.in
+++ b/documentation/wine.man.in
@@ -11,20 +11,18 @@
 section of the man page.
 .SH DESCRIPTION
 .B wine
-.I program
-loads and runs the given program, where the program is a DOS, Windows 3.x,
-or Win32 executable (x86 binaries only).
+loads and runs the given program, where the program is a DOS, Windows
+3.x, or Win32 executable (x86 binaries only).
 .PP
 For debugging wine, use
 .B winedbg
-.I program
 instead.
 .PP
 For running CUI executables (Windows console programs), use
 .B wineconsole
 instead of
-.B wine
-. This will display all the output in a separate windows (this requires X11 to
+.B wine.
+This will display all the output in a separate windows (this requires X11 to
 run). Not using
 .B wineconsole
 for CUI programs will only provide very limited console support, and your
@@ -39,8 +37,10 @@
 A large percentage of the API has been implemented,
 although there are still several major pieces of work left to do.
 .SH REQUIREMENTS AND INSTALLATION
-Read the README file in the Wine source distribution and the wine.conf
-man page to know what Wine requires and how it is installed from source.
+Read the README file in the Wine source distribution and the
+.BR wine.conf (5)
+man page to know what Wine requires and how it is installed from
+source.
 .SH OPTIONS
 .TP
 .I --debugmsg [xxx]#name[,[xxx1]#name1]
@@ -57,11 +57,11 @@
 channel are turned on.  Each channel will print messages about a particular
 component of 
 .B wine.  
-# is required and can be either + or -.  Note that 
-there is not a space after the comma between names. yyy are either the
-name of a whole DLL or a single API entry by name you either
-want to include or exclude from the relay listing.  Case doesn't matter
-for these.  You can do the same for snoop.
+# can be either + or - to switch the specified channel on or off
+respectively.  If there is no
+.I xxx
+part before it, a leading + can be omitted. Note that spaces are not
+allowed anywhere in the string.
 .PP
 For instance:
 .PP
@@ -77,32 +77,12 @@
 .br 
 .I --debugmsg +relay
 will turn on all relay messages. For more control on including or excluding
-functions and dlls look into the [Debug] section of the wine configuration file.
+functions and dlls from the relay trace look into the [Debug] section
+of the wine configuration file.
 .PP
-The full list of names is:
-all, accel, advapi, animate, aspi, atom, avifile, bitblt, bitmap, caret,
-cdrom, class, clipboard, clipping, combo, comboex, comm, commctrl, commdlg,
-console, crtdll, cursor, datetime, dc, ddeml, ddraw, debug, debugstr,
-delayhlp, dialog, dinput, dll, dosfs, dosmem, dplay, driver, dsound, edit,
-elfdll, enhmetafile, event, exec, file, fixup, font, gdi, global, graphics,
-header, heap, hook, hotkey, icmp, icon, imagehlp, imagelist, imm, int, int10,
-int16, int17, int19, int21, int31, io, ipaddress, joystick, key, keyboard,
-loaddll, ldt, listbox, listview, local, mci, mcianim, mciavi, mcicda, mcimidi,
-mciwave, mdi, menu, message, metafile, midi, mmaux, mmio, mmsys, mmtime,
-module, monthcal, mpr, msacm, msg, msvideo, nativefont, nonclient, ntdll,
-odbc, ole, opengl, pager, palette, pidl, print, process, profile, progress, 
-prop, propsheet, psapi, psdrv, ras, rebar, reg, region, relay, resource, 
-richedit, scroll, segment, seh, selector, sendmsg, server, setupapi, 
-setupx, shell, snoop, sound, static, statusbar, storage, stress, string, 
-syscolor, system, tab, tape, tapi, task, text, thread, thunk, timer, toolbar,
-toolhelp, tooltips, trackbar, treeview, ttydrv, tweak, typelib, updown, ver,
-virtual, vxd, wave, win, win16drv, win32, winedbg, wing, wininet, winsock,
-winspool, wnet, x11 and x11drv.
-
-.PP
-For more information on debugging messages, see the file 
-.I documentation/running.sgml
-in the source distribution (FIXME: outdated).
+For more information on debugging messages, see the
+.I Running Wine
+chapter of the Wine User Guide.
 .RE
 .PD 1
 .SH PROGRAM/ARGUMENTS
@@ -204,6 +184,10 @@
 and if this doesn't exist it will then look for a file named "wine" in
 the path and in a few other likely locations.
 .TP
+.I WINEDEBUG
+Turns debugging messages on or off. The syntax of the variable is
+identical to the syntax of the arguments for the --debugmsg option.
+.TP
 .I WINEDLLPATH
 Specifies the path(s) in which to search for builtin dlls and Winelib
 applications. This is a list of directories separated by ":". In
@@ -312,7 +296,7 @@
 The latest snapshot of the code may be obtained via CVS.  For information
 on how to do this, please see
 .I
-http://www.winehq.org/development/
+http://www.winehq.org/cvs
 .PP
 WineHQ, the
 .B wine
@@ -326,14 +310,15 @@
 newsgroup is 
 .I comp.emulators.ms-windows.wine.
 It is used for discussion of various 
-.B wine end user aspects/help.
+.B wine
+end user aspects/help.
 .PP
 For further information about 
 .B wine
 development, you might want to subscribe to the 
 .B wine 
 mailing lists at
-.I http://www.winehq.org/development/#ml
+.I http://www.winehq.org/forums
 .SH FILES
 .PD 0
 .TP