Removed some more trailing whitespace.

diff --git a/tools/Makefile.in b/tools/Makefile.in
index 13932ed..34dd48f 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -1,4 +1,4 @@
-DEFS      = -D__WINE__ -DNO_LIBWINE -DLEX_OUTPUT_ROOT="\"@LEX_OUTPUT_ROOT@\"" 
+DEFS      = -D__WINE__ -DNO_LIBWINE -DLEX_OUTPUT_ROOT="\"@LEX_OUTPUT_ROOT@\""
 TOPSRCDIR = @top_srcdir@
 TOPOBJDIR = ..
 SRCDIR    = @srcdir@
diff --git a/tools/bug_report.pl b/tools/bug_report.pl
index 558ccb4..c045c8e 100755
--- a/tools/bug_report.pl
+++ b/tools/bug_report.pl
@@ -21,7 +21,7 @@
 ## License along with this library; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ##
-##Changelog: 
+##Changelog:
 ##August 29, 1999 - Work around for debugger exit (or lack thereof)
 ##                - Should now put debugging output in correct place
 ##April 19, 1999 - Much nicer way to select wine's location
@@ -47,11 +47,11 @@
 	$var =~ s/\t//g;
 	return $var;
 }
-open STDERR, ">&SAVEERR"; open STDERR, ">&STDOUT"; 
+open STDERR, ">&SAVEERR"; open STDERR, ">&STDOUT";
 $ENV{'SHELL'}="/bin/bash";
 $var0 = qq{
 	What is your level of WINE expertise? 1-newbie 2-intermediate 3-advanced
-	
+
 	1 - Makes a debug report as defined in the WINE documentation. Best
 	    for new WINE users. If you're not sure what -debugmsg is, then
 	    use this mode.
@@ -66,7 +66,7 @@
 	print "Enter your level of WINE expertise (1-3): ";
 	$debuglevel=<STDIN>;
 	chomp $debuglevel;
-} 
+}
 
 if ($debuglevel < 3) {
 	$var1 = qq{
@@ -220,28 +220,28 @@
 do
 	{
 	print "Enter the number that corresponds to your windows version: ";
-	$winver=<STDIN>; 
-	chomp $winver; 
+	$winver=<STDIN>;
+	chomp $winver;
 	}
-until ($winver >= 0 and $winver <= 7); 
-if ($winver =~ 0) { 
-	$winver="None Installed"; 
-} elsif ($winver =~ 1) { 
-	$winver="Windows 3.x"; 
-} elsif ($winver =~ 2) { 
-	$winver="Windows 95"; 
-} elsif ($winver =~ 3) { 
-	$winver="Windows 98"; 
-} elsif ($winver =~ 4) { 
-	$winver="Windows NT 3.5x"; 
-} elsif ($winver =~ 5) { 
-	$winver="Windows NT 4.x"; 
-} elsif ($winver =~ 6) { 
-	$winver="Windows NT 5.x"; 
-} elsif ($winver =~ 7) { 
+until ($winver >= 0 and $winver <= 7);
+if ($winver =~ 0) {
+	$winver="None Installed";
+} elsif ($winver =~ 1) {
+	$winver="Windows 3.x";
+} elsif ($winver =~ 2) {
+	$winver="Windows 95";
+} elsif ($winver =~ 3) {
+	$winver="Windows 98";
+} elsif ($winver =~ 4) {
+	$winver="Windows NT 3.5x";
+} elsif ($winver =~ 5) {
+	$winver="Windows NT 4.x";
+} elsif ($winver =~ 6) {
+	$winver="Windows NT 5.x";
+} elsif ($winver =~ 7) {
 	print "What version of Windows are you using? ";
-	$winver=<STDIN>; 
-	chomp $winver; 
+	$winver=<STDIN>;
+	chomp $winver;
 }
 if ($debuglevel < 3) {
 	$var7 = qq{
@@ -254,11 +254,11 @@
 }
 if ($debuglevel =~ 3) {
 	$var8 = qq{
-	Enter the full path to the program you want to run (Example: 
-	/dos/windows/sol.exe, NOT sol.exe): 
+	Enter the full path to the program you want to run (Example:
+	/dos/windows/sol.exe, NOT sol.exe):
 	};
 	print do_var($var8);
-} 
+}
 $program=<STDIN>;
 chomp $program;
 while ($program =~ /^(\s)*$/) {
@@ -284,15 +284,15 @@
 until ($progbits == 0 or $progbits == 1 or $progbits == 2) {
 	print "You must enter 0, 1 or 2!\n";
 	$progbits=<STDIN>;
-	chomp $progbits 
+	chomp $progbits
 }
-if ($progbits =~ 0) { 
+if ($progbits =~ 0) {
 	$progbits=Win16
-} elsif ($progbits =~ 1) { 
-	$progbits=Win32 
-} else { 
-	$progbits = "Unsure" 
-} 
+} elsif ($progbits =~ 1) {
+	$progbits=Win32
+} else {
+	$progbits = "Unsure"
+}
 if ($debuglevel > 1) {
 	if ($debuglevel =~ 2) {
 		$var11 = qq{
@@ -312,14 +312,14 @@
 	$debugopts=<STDIN>;
 	chomp $debugopts;
 	if ($debugopts =~ /-debugmsg /) {
-		($crap, $debugopts) = split / /,$debugopts; 
+		($crap, $debugopts) = split / /,$debugopts;
 	}
-	if ($debugopts =~ /^\s*$/) { 
-		$debugopts="+relay"; 
-	} 
+	if ($debugopts =~ /^\s*$/) {
+		$debugopts="+relay";
+	}
 } elsif ($debuglevel =~ 1) {
-	$debugopts = "+relay"; 
-} 
+	$debugopts = "+relay";
+}
 if ($debuglevel > 1) {
 	if ($debuglevel =~ 2) {
 		$var13 = qq{
@@ -338,13 +338,13 @@
 	}
 	$lastnlines=<STDIN>;
 	chomp $lastnlines;
-	if ($lastnlines =~ /^\s*$/) { 
-	$lastnlines=200; 
-	} 
+	if ($lastnlines =~ /^\s*$/) {
+	$lastnlines=200;
+	}
 } elsif ($debuglevel =~ 1) {
-	$lastnlines=200; 
+	$lastnlines=200;
 }
-if ($debuglevel > 1) { 
+if ($debuglevel > 1) {
 	$var15 = qq{
 	Enter any extra options you want to pass to WINE.
 	};
@@ -376,11 +376,11 @@
 	}
 	$configopts=<STDIN>;
 	chomp $configopts;
-	if ($configopts =~ /^\s*$/) { 
-	$configopts="None"; 
-	} 
+	if ($configopts =~ /^\s*$/) {
+	$configopts="None";
+	}
 } elsif ($debuglevel =~ 1) {
-	$configopts="None"; 
+	$configopts="None";
 }
 if ($debuglevel > 1) {
 	if ($debuglevel =~ 2) {
@@ -388,7 +388,7 @@
 		Is your wine version CVS or from a .tar.gz file? As in... did you download it
 		off a website/ftpsite or did you/have you run cvs on it to update it?
 		For CVS: YYMMDD, where YY is the year (99), MM is the month (01), and DD
-		is the day (14), that you last updated it (Example: 990114). 
+		is the day (14), that you last updated it (Example: 990114).
 		For tar.gz: Just hit enter and I'll figure out the version for you:
 		};
 		print do_var($var18);
@@ -401,13 +401,13 @@
 	}
 	$winever=<STDIN>;
 	chomp $winever;
-	if ($winever =~ /[0-9]+/) {  
+	if ($winever =~ /[0-9]+/) {
 		$winever .= " CVS";
 	}
 	else {
 		$winever = `$wineloc -v 2>&1`;
 		chomp $winever;
-	} 
+	}
 } elsif ($debuglevel =~ 1) {
 	$winever=`$wineloc -v 2>&1`;
 	chomp $winever;
@@ -427,10 +427,10 @@
 	OK, now I'm going to run WINE. I will close it for you once the wine
 	debugger comes up. NOTE: You won't see ANY debug messages. Don't
 	worry, they are being output to a file. Since there are so many, it's
-	not a good idea to have them all output to a terminal (Speed slowdown 
+	not a good idea to have them all output to a terminal (Speed slowdown
 	mainly).
 	WINE will still run much slower than normal, because there will be so
-	many debug messages being output to file. 
+	many debug messages being output to file.
 	};
 	print do_var($var20);
 } elsif ($debuglevel =~ 3) {
@@ -544,7 +544,7 @@
 Debug Options:               -debugmsg $debugopts
 Other Extra Commands Passed: $extraops
 Extra ./configure Commands:  $configopts
-Wine Dependencies: 
+Wine Dependencies:
 $wineneeds
 Last $lastnlines lines of debug output follows:
 $lastlines
@@ -553,7 +553,7 @@
 EOM
 }
 $var22 = qq{
-Great! We're finished making the debug report. Do whatever with it. 
+Great! We're finished making the debug report. Do whatever with it.
 };
 $var28 = qq{
 The filename for the formatted report is:
@@ -573,4 +573,3 @@
 print do_var($var28) if $outfile ne "no file";
 print do_var($var29) if $dbgoutfile ne "no file";
 print do_var($var30);
-
diff --git a/tools/c2man.pl b/tools/c2man.pl
index 26dd395..9f5315c 100755
--- a/tools/c2man.pl
+++ b/tools/c2man.pl
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 
 #####################################################################################
-# 
+#
 # c2man.pl v0.1  Copyright (C) 2000 Mike McCormack
 #
 # Generates Documents from C source code.
@@ -35,7 +35,7 @@
 #
 #####################################################################################
 # Input from C source file:
-# 
+#
 # /******************************************************************
 #  *         CopyMetaFile32A   (GDI32.23)
 #  *
@@ -58,43 +58,43 @@
 #
 #####################################################################################
 # Output after processing with nroff -man
-# 
+#
 # CopyMetaFileA(3w)                               CopyMetaFileA(3w)
-# 
-# 
+#
+#
 # NAME
 #        CopyMetaFileA - CopyMetaFile32A   (GDI32.23)
-#  
+#
 # SYNOPSIS
 #        HMETAFILE32 CopyMetaFileA
 #        (
 #             HMETAFILE32 hSrcMetaFile,
 #             LPCSTR lpFilename
 #        );
-#  
+#
 # PARAMETERS
 #        HMETAFILE32 hSrcMetaFile
 #               Handle of metafile to copy.
-#  
+#
 #        LPCSTR lpFilename
 #               Filename if copying to a file.
-#  
+#
 # DESCRIPTION
 #        Copies  the  metafile  corresponding  to  hSrcMetaFile  to
 #        either a disk file, if a filename is given, or  to  a  new
 #        memory based metafile, if lpFileName is NULL.
-#  
+#
 # RETURNS
 #        Handle to metafile copy on success, NULL on failure.
-#  
+#
 # BUGS
 #        Copying to disk returns NULL even if successful.
-#  
+#
 # SEE ALSO
 #        GetMetaFileA(3w),   GetMetaFileW(3w),   CopyMetaFileW(3w),
 #        PlayMetaFile(3w),  SetMetaFileBitsEx(3w),  GetMetaFileBit-
 #        sEx(3w)
-# 
+#
 #####################################################################################
 
 sub output_manpage
@@ -159,7 +159,7 @@
     print MAN ".PP\n";
     print MAN "$name_type\n";
     print MAN " (\n";
-    for($i=0; $i<@params; $i++) { 
+    for($i=0; $i<@params; $i++) {
         $x = ($i == (@params-1)) ? "" : ",";
         $c = $params[$i];
         $c =~ s/-.*//;
@@ -168,7 +168,7 @@
     print MAN " );\n";
     print MAN ".SH PARAMETERS\n";
     print MAN ".PP\n";
-    for($i=0; $i<@params; $i++) { 
+    for($i=0; $i<@params; $i++) {
         print MAN "    $params[$i]\n";
     }
     print MAN ".SH DESCRIPTION\n";
@@ -272,7 +272,7 @@
             s/\(.*\)//; #remove all the args
             ($ord,$type,$name,$func) = split( /\s+/ );
             if(( $type eq "stub" ) || ($type eq "forward")) {next;}
-            if( $func eq "" ) { next; } 
+            if( $func eq "" ) { next; }
             @funclist = ( @funclist , $func );
             $funcdb{$func."ORD"} = $ord;
             $funcdb{$func."TYPE"} = $type;
@@ -335,4 +335,3 @@
     parse_source($ARGV[0]);
     shift @ARGV;
 }
-
diff --git a/tools/examine-relay b/tools/examine-relay
index e640abb..1823f89 100755
--- a/tools/examine-relay
+++ b/tools/examine-relay
@@ -59,7 +59,7 @@
 	    if (!$newlineerror) {
 		print "Err[$tid] string probably cut by newline at line $. .\n";
 		$newlineerror = 1;
-	    }	    
+	    }
 	    # print "[$_]";
 	    redo;
 	}
@@ -110,7 +110,7 @@
 		if !$addrok;
 	    print "Err[$tid]: Return from $func with segreg $segreg, not $topseg.\n"
 		if !$segok;
-	}    
+	}
     }
 }
 
diff --git a/tools/font_convert.sh b/tools/font_convert.sh
index 24bd89e..af7fe56 100755
--- a/tools/font_convert.sh
+++ b/tools/font_convert.sh
@@ -21,7 +21,7 @@
 TMPDIR=/tmp/fconv.$$;
 TFILE=`tempfile`;
 
-# Where the fnt2bdf utility resides 
+# Where the fnt2bdf utility resides
 FC=$HOME""/wine/tools/fnt2bdf;
 # which OEM_CHARSET to use
 CHARSET="winsys";
@@ -29,16 +29,16 @@
 BDFTOPCF=/usr/X11R6/bin/bdftopcf;
 PAT="*.fon";
 Q="";
-OLDPWD=`pwd`; 
+OLDPWD=`pwd`;
 
 usage () {
     echo "usage: "`basename $0`" [-q] [-c charset] [-t fontdir] [-b bdftopcf] [-f fnt2bdf]"
     echo "       [-p pattern] windir"
-    echo 
+    echo
     echo "this utility scans a directory and its subdirectories for bitmap-fonts"
     echo "in Windows format, converts them to PCF-fons and installs them. If X"
     echo "is running, the X fontpath is re-adjusted."
-    echo 
+    echo
     echo "options:"
     echo " -q          quit operation."
     echo " -c charset  charset name for OEM_CHARSET fonts, default: $CHARSET"
@@ -65,7 +65,7 @@
 	-p ) shift; if [ "$1" ]; then PAT=$1; shift; else usage; fi; ;;
         -q ) shift; Q=":"; ;;
 	-* ) usage; ;;
-	* ) if [ "$WIND" ]; then usage; else WIND=$1; shift; fi; ;;  
+	* ) if [ "$WIND" ]; then usage; else WIND=$1; shift; fi; ;;
     esac;
 done;
 
@@ -77,7 +77,7 @@
 
 $Q echo -n "looking for bitmap fonts... "
 FONTS=`find "$WIND" -iname $PAT 1>$TFILE 2>/dev/null`;
-if [ $? -ne 0 ]; then 
+if [ $? -ne 0 ]; then
     $Q echo "$PAT is a invalid sarch expression"; exit 1;
 fi;
 i=0;
@@ -85,15 +85,15 @@
 rm $TFILE;
 $Q echo "done."
 
-if [ -z "$FONTS" ]; then $Q echo "Can't find any fonts in $WIND"; exit 1; fi; 
+if [ -z "$FONTS" ]; then $Q echo "Can't find any fonts in $WIND"; exit 1; fi;
 
 mkdir "$TMPDIR"
 cd "$TMPDIR"
 
-for i in "${FONTS[@]}"; do 
+for i in "${FONTS[@]}"; do
     FNT=`basename "$i"`; FNT=${FNT%.???};
     $Q echo "converting $i";
-    if [ "$Q" ]; then 
+    if [ "$Q" ]; then
 	$FC -c $CHARSET -f $FNT "$i" 2>/dev/null;
     else
 	$FC -c $CHARSET -f $FNT "$i";
@@ -101,17 +101,17 @@
 done;
 
 for i in *.bdf; do
-    if [ "$i" == "*.bdf" ]; then echo "No fonts extracted"; exit 0; fi; 
+    if [ "$i" == "*.bdf" ]; then echo "No fonts extracted"; exit 0; fi;
     bdftopcf -o "${i%.???}.pcf" "$i";
     $Q echo "installing ${i%.???}.pcf";
     mv "${i%.???}.pcf" $TARGET 2>/dev/null
-    if [ $? -ne 0 ]; then 
+    if [ $? -ne 0 ]; then
 	$Q echo "Can't install fonts to $TARGET. Are your root?"; cd "$OLDPWD"; rm -rf "$TMPDIR"; exit 1; fi;
     rm "$i";
 done;
 
 cd $TARGET;
-$Q echo "running mkfontdir"; 
+$Q echo "running mkfontdir";
 if [ "$Q" ]; then
     mkfontdir 1>/dev/null 2>/dev/null;
 else
@@ -120,4 +120,3 @@
 rmdir "$TMPDIR"
 
 if [ "$DISPLAY" ]; then $Q echo "adjusting X font database"; xset fp rehash; fi;
-
diff --git a/tools/genpatch b/tools/genpatch
index 2625cd4..d390650 100755
--- a/tools/genpatch
+++ b/tools/genpatch
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-# 
+#
 # genpatch - A utility that generates patches for submission to
 # wine-patches@winehq.com
 #
diff --git a/tools/make_X11wrappers b/tools/make_X11wrappers
index 9ab4986..7937bfa 100755
--- a/tools/make_X11wrappers
+++ b/tools/make_X11wrappers
@@ -147,7 +147,7 @@
 	output_fn("XShmQueryExtension", "Bool",
 		  "Display *", "Display *a0", "a0");
 	output_fn("XShmQueryVersion", "Bool",
-		  "Display *, int *, int *, Bool *", 
+		  "Display *, int *, int *, Bool *",
 		  "Display *a0, int *a1, int *a2, Bool *a3", "a0, a1, a2, a3");
 	output_fn("XShmPixmapFormat", "int",
 		  "Display *", "Display *a0", "a0");
@@ -162,7 +162,7 @@
 		  "Display *a0, Drawable a1, GC a2, XImage *a3, int a4, int a5, int a6, int a7, unsigned int a8, unsigned int a9, Bool a10", "a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10");
 	output_fn("XShmGetImage", Status,
 		  "Display *, Drawable, XImage *, int, int, unsigned long",
-		  "Display *a0, Drawable a1, XImage *a2, int a3, int a4, unsigned long a5", 
+		  "Display *a0, Drawable a1, XImage *a2, int a3, int a4, unsigned long a5",
 		  "a0, a1, a2, a3, a4, a5");
 	output_fn("XShmCreateImage", "XImage *",
 		  "Display *, Visual *, unsigned int, int, char *, XShmSegmentInfo *, unsigned int, unsigned int",
@@ -331,11 +331,11 @@
 		"Display*,int,int,int",
 		"Display*a0,int a1,int a2,int a3",
 		"a0,a1,a2,a3"
-	);	
-	
+	);
+
     } else {
-	open(IN, 
-	     "echo \"$x11_incl#include <X11/$extensions_dir$name.h>\" | " . 
+	open(IN,
+	     "echo \"$x11_incl#include <X11/$extensions_dir$name.h>\" | " .
 	     "gcc -L$X11_include_dir -DNeedFunctionPrototypes -E - | " .
 	     "grep -v '^[ \t]*\$)' |"
 	     ) || die "open";
@@ -453,8 +453,8 @@
     # output_fn_sort("Bool", "XDGAQueryExtension", "Display *", "int *", "int *");
     #
     my ($result_type, $fn_name, @args) = @_;
-    
-    my ($i, $proto, $formals, $actuals) = (0, 
+
+    my ($i, $proto, $formals, $actuals) = (0,
 					   "$result_type TS$fn_name(",
 					   "$result_type TS$fn_name(",
 					   "");
diff --git a/tools/testrun b/tools/testrun
index 79e3462..ac256e0 100755
--- a/tools/testrun
+++ b/tools/testrun
@@ -41,7 +41,7 @@
 # Path to WINE ChangeLog. Used as timestamp for new releases...
 #
 $changelog = '/home/marcus/wine/ChangeLog';
-# 
+#
 # How long before automatically killing all subprocesses
 # 30 is good for automatic testing, 300 or more for interactive testing.
 #
@@ -62,7 +62,7 @@
 
 if (! -d "runs") { die "no subdirectory runs/ found in $cwd. Please create one first!\n";}
 
-# look for the exact path to wine executeable in case we need it for a 
+# look for the exact path to wine executeable in case we need it for a
 # replacement changelog.
 if (! ($wine =~ /\//)) { # no path specified. Look it up.
 	@paths = split(/:/,$ENV{'PATH'});
@@ -118,7 +118,7 @@
 	open(PSAUX,"ps aulc|");
 	# lookup all processes, remember their parents and cmdlines.
 	%parentof=();
-	$xline = <PSAUX>; # fmtline 
+	$xline = <PSAUX>; # fmtline
 	@psformat = split(/\s\s*/,$xline);
 
 	psline: while (<PSAUX>) {
@@ -231,7 +231,7 @@
 	# FIXME: doesn't handle missing libwine.so during compile...
 	(-x $wine)  || die "no $wine executable found!\n";
 
-	# Skip all mssetup, acmsetup , installshield whatever exes. 
+	# Skip all mssetup, acmsetup , installshield whatever exes.
 	# they seem to work, mostly and starting them is just annoying.
 	next if ($exe =~ /acmsetup|unwise|testexit|_msset|isun|st4u|st5u|_mstest|_isdel|ms-setup|~ms|unin/io);
 
@@ -243,8 +243,8 @@
 	#
 	# Check if changelog is newer, if not, continue
 	#
-	if (	-e "runs/${runfile}.out" && 
-		(-M $changelog > -M "runs/${runfile}.out") && 
+	if (	-e "runs/${runfile}.out" &&
+		(-M $changelog > -M "runs/${runfile}.out") &&
 		(-M $exe > -M "runs/${runfile}.out")
 	) {
 		#print "skipping $exe, already done.\n";
diff --git a/tools/winapi/c_function.pm b/tools/winapi/c_function.pm
index 9b82814..b5d32ce 100644
--- a/tools/winapi/c_function.pm
+++ b/tools/winapi/c_function.pm
@@ -36,7 +36,7 @@
     local $_ = shift;
 
     if(defined($_)) { $$file = $_; }
-    
+
     return $$file;
 }
 
@@ -47,7 +47,7 @@
     local $_ = shift;
 
     if(defined($_)) { $$begin_line = $_; }
-    
+
     return $$begin_line;
 }
 
@@ -58,7 +58,7 @@
     local $_ = shift;
 
     if(defined($_)) { $$begin_column = $_; }
-    
+
     return $$begin_column;
 }
 
@@ -69,7 +69,7 @@
     local $_ = shift;
 
     if(defined($_)) { $$end_line = $_; }
-    
+
     return $$end_line;
 }
 
@@ -80,7 +80,7 @@
     local $_ = shift;
 
     if(defined($_)) { $$end_column = $_; }
-    
+
     return $$end_column;
 }
 
@@ -91,7 +91,7 @@
     local $_ = shift;
 
     if(defined($_)) { $$linkage = $_; }
-    
+
     return $$linkage;
 }
 
@@ -102,7 +102,7 @@
     local $_ = shift;
 
     if(defined($_)) { $$return_type = $_; }
-    
+
     return $$return_type;
 }
 
@@ -113,7 +113,7 @@
     local $_ = shift;
 
     if(defined($_)) { $$calling_convention = $_; }
-    
+
     return $$calling_convention;
 }
 
@@ -124,7 +124,7 @@
     local $_ = shift;
 
     if(defined($_)) { $$name = $_; }
-    
+
     return $$name;
 }
 
@@ -135,7 +135,7 @@
     local $_ = shift;
 
     if(defined($_)) { $$argument_types = $_; }
-    
+
     return $$argument_types;
 }
 
@@ -146,7 +146,7 @@
     local $_ = shift;
 
     if(defined($_)) { $$argument_names = $_; }
-    
+
     return $$argument_names;
 }
 
@@ -157,7 +157,7 @@
     local $_ = shift;
 
     if(defined($_)) { $$statements_line = $_; }
-    
+
     return $$statements_line;
 }
 
@@ -168,7 +168,7 @@
     local $_ = shift;
 
     if(defined($_)) { $$statements_column = $_; }
-    
+
     return $$statements_column;
 }
 
@@ -179,7 +179,7 @@
     local $_ = shift;
 
     if(defined($_)) { $$statements = $_; }
-    
+
     return $$statements;
 }
 
diff --git a/tools/winapi/c_parser.pm b/tools/winapi/c_parser.pm
index 451dcdf..7165f90 100644
--- a/tools/winapi/c_parser.pm
+++ b/tools/winapi/c_parser.pm
@@ -221,7 +221,7 @@
 	$output->write("\n");
 	$output->prefix("");
     }
-    
+
     if($current) {
 	$output->write("$$file:$line." . ($column + 1) . ": $context: $message: \\\n$current");
     } else {
@@ -493,7 +493,7 @@
     if(!&$$found_declaration($begin_line, $begin_column, $end_line, $end_column, $_)) {
 	return 1;
     }
-    
+
     # Function
     my $function = shift;
 
@@ -543,7 +543,7 @@
     } else {
 	$self->_parse_c_error($_, $line, $column, "declaration");
     }
-    
+
     $$refcurrent = $_;
     $$refline = $line;
     $$refcolumn = $column;
@@ -588,7 +588,7 @@
 
 	    my $begin_line = $line;
 	    my $begin_column = $column + 1;
-	    
+
 	    my $name;
 	    my @arguments;
 	    my @argument_lines;
@@ -596,7 +596,7 @@
 	    if(!$self->parse_c_function_call(\$_, \$line, \$column, \$name, \@arguments, \@argument_lines, \@argument_columns)) {
 		return 0;
 	    }
-	    
+
 	    if(&$$found_function_call($begin_line, $begin_column, $line, $column, $name, \@arguments))
 	    {
 		while(defined(my $argument = shift @arguments) &&
@@ -632,7 +632,7 @@
     my $refcurrent = shift;
     my $refline = shift;
     my $refcolumn = shift;
-    
+
     local $_ = $$refcurrent;
     my $line = $$refline;
     my $column = $$refcolumn;
@@ -652,7 +652,7 @@
     while($plevel > 0 || $blevel > 0) {
 	my $match;
 	$self->_parse_c_until_one_of("#/\\(\\)\\[\\]\\{\\};", \$_, \$line, \$column, \$match);
-	
+
 	if($line != $previous_line) {
 	    &$$found_line($line);
 	} elsif($column == $previous_column) {
@@ -737,7 +737,7 @@
 		&$$found_comment($line, $column + 1, $&);
 	        local $_ = $&;
 		while(s/^.*?\n//) {
-		    $blank_lines++; 
+		    $blank_lines++;
 		}
 		if($_) {
 		    $column += length($_);
@@ -815,11 +815,11 @@
 	    }
 	} elsif(s/^;//) {
 	    $declaration .= $&;
-	    if($blevel == 1 && 
-	       $declaration !~ /^typedef/ && 
+	    if($blevel == 1 &&
+	       $declaration !~ /^typedef/ &&
 	       $declaration !~ /^(?:const\s+|extern\s+|static\s+)(?:struct|union)(?:\s+\w+)?\s*\{/s &&
-	       $declaration =~ /^(?:\w+\s*)*(?:(?:\*\s*)+|\s+)(\w+)\s*\(\s*(?:(?:\w+\s*,\s*)*\w+\s*)?\)(.*?);/s && 
-	       $1 ne "ICOM_VTABLE" && $2) # K&R 
+	       $declaration =~ /^(?:\w+\s*)*(?:(?:\*\s*)+|\s+)(\w+)\s*\(\s*(?:(?:\w+\s*,\s*)*\w+\s*)?\)(.*?);/s &&
+	       $1 ne "ICOM_VTABLE" && $2) # K&R
 	    {
 		$self->_parse_c_warning($line, $column, "function $1: warning: function has K&R format");
 	    } elsif($plevel == 1 && $blevel == 1) {
@@ -861,7 +861,7 @@
     my $refcolumn = shift;
 
     my $reffunction = shift;
-    
+
     local $_ = $$refcurrent;
     my $line = $$refline;
     my $column = $$refcolumn;
@@ -883,10 +883,10 @@
     my $begin_column = $column + 1;
 
     my $match;
-    while($self->_parse_c('const|inline|extern|static|volatile|' . 
+    while($self->_parse_c('const|inline|extern|static|volatile|' .
 			  'signed(?=\\s+char|s+int|\s+long(?:\s+long)?|\s+short)|' .
 			  'unsigned(?=\s+char|\s+int|\s+long(?:\s+long)?|\s+short)',
-			  \$_, \$line, \$column, \$match)) 
+			  \$_, \$line, \$column, \$match))
     {
 	if($match =~ /^extern|static$/) {
 	    if(!$linkage) {
@@ -907,15 +907,15 @@
 	    return 0;
 	}
 
-	$self->_parse_c("__cdecl|__stdcall|inline|CDECL|VFWAPIV|VFWAPI|WINAPIV|WINAPI|CALLBACK|WINE_UNUSED|PASCAL", 
+	$self->_parse_c("__cdecl|__stdcall|inline|CDECL|VFWAPIV|VFWAPI|WINAPIV|WINAPI|CALLBACK|WINE_UNUSED|PASCAL",
 			\$_, \$line, \$column, \$calling_convention);
-	
-	if(!$self->_parse_c('\w+', \$_, \$line, \$column, \$name)) { 
-	    return 0; 
+
+	if(!$self->_parse_c('\w+', \$_, \$line, \$column, \$name)) {
+	    return 0;
 	}
 
 	if(!$self->parse_c_tuple(\$_, \$line, \$column, \@arguments, \@argument_lines, \@argument_columns)) {
-	    return 0; 
+	    return 0;
 	}
     }
 
@@ -933,7 +933,7 @@
 
     my $end_line = $line;
     my $end_column = $column;
-    
+
     $$refcurrent = $_;
     $$refline = $line;
     $$refcolumn = $column;
@@ -946,7 +946,7 @@
     $function->end_line($end_line);
     $function->end_column($end_column);
     $function->linkage($linkage);
-    $function->return_type($return_type); 
+    $function->return_type($return_type);
     $function->calling_convention($calling_convention);
     $function->name($name);
     # if(defined($argument_types)) {
@@ -1036,7 +1036,7 @@
     if(!&$$found_preprocessor($begin_line, $begin_column, "$_")) {
 	return 1;
     }
-    
+
     if(0) {
 	# Nothing
     } elsif(/^\#\s*define\s*(.*?)$/s) {
@@ -1424,10 +1424,10 @@
     my $name = "";
 
     my $match;
-    while($self->_parse_c('const|inline|extern|static|volatile|' . 
+    while($self->_parse_c('const|inline|extern|static|volatile|' .
 			  'signed(?=\\s+char|s+int|\s+long(?:\s+long)?|\s+short)|' .
 			  'unsigned(?=\s+char|\s+int|\s+long(?:\s+long)?|\s+short)',
-			  \$_, \$line, \$column, \$match)) 
+			  \$_, \$line, \$column, \$match))
     {
 	if($match =~ /^extern|static$/) {
 	    if(!$linkage) {
@@ -1448,7 +1448,7 @@
 	$finished = 1;
     } elsif($self->_parse_c('DEFINE_REGS_ENTRYPOINT_\w+|DPQ_DECL_\w+|HANDLER_DEF|IX86_ONLY', # Wine specific
 			    \$_, \$line, \$column, \$match))
-    { 
+    {
 	$type = $match;
 	$finished = 1;
     } elsif($self->_parse_c('(?:struct\s+)?ICOM_VTABLE\s*\(\w+\)', \$_, \$line, \$column, \$match)) {
@@ -1509,7 +1509,7 @@
     } else {
 	return 0;
     }
- 
+
     # $output->write("$type: $name: '$_'\n");
 
     if(1) {
diff --git a/tools/winapi/config.pm b/tools/winapi/config.pm
index 24c3ed4..bda39c7 100644
--- a/tools/winapi/config.pm
+++ b/tools/winapi/config.pm
@@ -159,7 +159,7 @@
 	my @entries= readdir(DIR);
 	closedir(DIR);
 	foreach (@entries) {
-	    $_ = "$dir/$_";    
+	    $_ = "$dir/$_";
 	    if(/\.\.?$/) {
 		# Nothing
 	    } elsif(-d $_) {
@@ -174,8 +174,8 @@
     return @files;
 }
 
-sub get_api_files { 
-    my $name = shift; 
+sub get_api_files {
+    my $name = shift;
     return _get_files("api", undef, "$winapi_check_dir/$name");
 }
 sub get_c_files { return _get_files("c", @_); }
diff --git a/tools/winapi/function.pm b/tools/winapi/function.pm
index 92dfab7..fbc3475 100644
--- a/tools/winapi/function.pm
+++ b/tools/winapi/function.pm
@@ -36,7 +36,7 @@
     local $_ = shift;
 
     if(defined($_)) { $$file = $_; }
-    
+
     return $$file;
 }
 
@@ -47,7 +47,7 @@
     local $_ = shift;
 
     if(defined($_)) { $$debug_channels = $_; }
-    
+
     return $$debug_channels;
 }
 
@@ -58,7 +58,7 @@
     local $_ = shift;
 
     if(defined($_)) { $$documentation_line = $_; }
-    
+
     return $$documentation_line;
 }
 
@@ -69,7 +69,7 @@
     local $_ = shift;
 
     if(defined($_)) { $$documentation = $_; }
-    
+
     return $$documentation;
 }
 
@@ -80,7 +80,7 @@
     local $_ = shift;
 
     if(defined($_)) { $$function_line = $_; }
-    
+
     return $$function_line;
 }
 
@@ -91,7 +91,7 @@
     local $_ = shift;
 
     if(defined($_)) { $$linkage = $_; }
-    
+
     return $$linkage;
 }
 
@@ -102,7 +102,7 @@
     local $_ = shift;
 
     if(defined($_)) { $$return_type = $_; }
-    
+
     return $$return_type;
 }
 
@@ -113,7 +113,7 @@
     local $_ = shift;
 
     if(defined($_)) { $$calling_convention = $_; }
-    
+
     return $$calling_convention;
 }
 
@@ -124,7 +124,7 @@
     local $_ = shift;
 
     if(defined($_)) { $$internal_name = $_; }
-    
+
     return $$internal_name;
 }
 
@@ -135,7 +135,7 @@
     local $_ = shift;
 
     if(defined($_)) { $$argument_types = $_; }
-    
+
     return $$argument_types;
 }
 
@@ -146,7 +146,7 @@
     local $_ = shift;
 
     if(defined($_)) { $$argument_names = $_; }
-    
+
     return $$argument_names;
 }
 
@@ -157,7 +157,7 @@
     local $_ = shift;
 
     if(defined($_)) { $$argument_documentations = $_; }
-    
+
     return $$argument_documentations;
 }
 
@@ -168,7 +168,7 @@
     local $_ = shift;
 
     if(defined($_)) { $$statements_line = $_; }
-    
+
     return $$statements_line;
 }
 
@@ -179,7 +179,7 @@
     local $_ = shift;
 
     if(defined($_)) { $$statements = $_; }
-    
+
     return $$statements;
 }
 
diff --git a/tools/winapi/make_filter b/tools/winapi/make_filter
index 1dfc9af..5f7c293 100755
--- a/tools/winapi/make_filter
+++ b/tools/winapi/make_filter
@@ -46,7 +46,7 @@
 my $command = $options->make . " " . join(" ", $options->arguments);
 open(IN, "($command) 2>&1 |");
 
-while(<IN>) {    
+while(<IN>) {
     chomp;
 
     if(!&make_parser::line($_)) {
diff --git a/tools/winapi/make_parser.pm b/tools/winapi/make_parser.pm
index 5d35f39..527ee66 100644
--- a/tools/winapi/make_parser.pm
+++ b/tools/winapi/make_parser.pm
@@ -40,7 +40,7 @@
 # global
 ########################################################################
 
-my $current; 
+my $current;
 my $function;
 
 ########################################################################
@@ -98,7 +98,7 @@
 	my $progress = "";
 	if($directory && $directory ne ".") {
 	    $progress .= "$directory: ";
-	} 
+	}
 	if($tool) {
 	    $progress .= "$tool: ";
 	}
@@ -122,16 +122,16 @@
 	    if($#$write_files >= 0) {
 		if($#$read_files >= 0) {
 		    $progress .= ", ";
-		}	       
+		}
 		$progress .= "write[" . join(" ", @{$write_files}) . "]";
 	    }
 	    if($#$remove_files >= 0) {
 		if($#$read_files >= 0 || $#$write_files >= 0) {
 		    $progress .= ", ";
-		}	       
+		}
 		$progress .= "remove[" . join(" ", @{$remove_files}) . "]";
 	    }
-	    
+
 	    $output->progress($progress);
 	}
 
@@ -209,7 +209,7 @@
 	# Nothing
     } elsif(/^\*\*\* Error code (\d+)$/) {
 	# Nothing
-    } elsif(/^\*\*\* Warning:\s+/) { # 
+    } elsif(/^\*\*\* Warning:\s+/) { #
 	if(/^File \`(.+?)\' has modification time in the future \((.+?) > \(.+?\)\)$/) {
 	    # Nothing
 	} else {
@@ -493,7 +493,7 @@
 		   HMENU|HMIDISTRM|HMIDIIN|HMIDIOUT|HMIXER|HMIXEROBJ|HMMIO|HMODULE|
 		   HLINE|HPEN|HPHONE|HPHONEAPP|
 		   HRASCONN|HRGN|HRSRC|HWAVEIN|HWAVEOUT|HWINSTA|HWND|
-		   SC_HANDLE|WSAEVENT|handle_t|pointer)$/x) 
+		   SC_HANDLE|WSAEVENT|handle_t|pointer)$/x)
 		{
 		    $supress = 1;
 		} else {
diff --git a/tools/winapi/options.pm b/tools/winapi/options.pm
index 5a6ca95..277622b 100644
--- a/tools/winapi/options.pm
+++ b/tools/winapi/options.pm
@@ -102,13 +102,13 @@
             } else {
 		$name = $1;
 	    }
-	    
+
 	    if($name =~ /^([^-].*)$/) {
 		$name = $$options_short{$1};
 	    } else {
 		$name =~ s/^-(.*)$/$1/;
 	    }
-	    	   
+
 	    my $prefix;
 	    if(defined($name) && $name =~ /^no-(.*)$/) {
 		$name = $1;
@@ -130,7 +130,7 @@
 		my $parser = $$option{parser};
 		my $refvalue = \${$self->{$key}};
 		my @parents = ();
-		
+
 		if(defined($$option{parent})) {
 		    if(ref($$option{parent}) eq "ARRAY") {
 			@parents = @{$$option{parent}};
@@ -139,7 +139,7 @@
 		    }
 		}
 
-		if(defined($parser)) { 
+		if(defined($parser)) {
 		    if(!defined($value)) {
 			$value = shift @ARGV;
 		    }
@@ -161,7 +161,7 @@
 			foreach my $parent (@old_parents) {
 			    my $parentkey = $$options_long{$parent}{key};
 			    my $refparentvalue = \${$self->{$parentkey}};
-			    
+
 			    $$refparentvalue = 1;
 
 			    if(defined($$options_long{$parent}{parent})) {
@@ -177,9 +177,9 @@
 		next;
 	    }
 	}
-	
+
 	if(!$end_of_options && /^-(.*)$/) {
-	    $output->write("unknown option: $_\n"); 
+	    $output->write("unknown option: $_\n");
 	    $output->write($$options_usage);
 	    exit 1;
 	} else {
@@ -335,7 +335,7 @@
 	my $current = ${$self->{$$option{key}}};
 
 	my $value = $current;
-	
+
 	my $command;
 	if(ref($value) ne "HASH") {
 	    if($value) {
@@ -358,7 +358,7 @@
 		$output->write("Disable ");
 	    } else {
 		$output->write("Enable ");
-	    }    
+	    }
 	} else {
 	    if($value->{active}) {
 		$output->write("(Disable) ");
@@ -370,7 +370,7 @@
 	    $output->write("$description (default)\n");
 	} else {
 	    $output->write("$description\n");
-	}    
+	}
     }
 }
 
@@ -382,7 +382,7 @@
 
     my $refvalue = $self->{$name};
     if(!defined($refvalue)) {
-	die "<internal>: options.pm: member $name does not exists\n"; 
+	die "<internal>: options.pm: member $name does not exists\n";
     }
 
     if(ref($$refvalue) ne "HASH") {
@@ -392,16 +392,16 @@
     }
 }
 
-sub arguments { 
+sub arguments {
     my $self = shift;
 
     my $arguments = \@{$self->{_ARGUMENTS}};
 
-    return @$arguments; 
+    return @$arguments;
 }
 
 sub c_files {
-    my $self = shift; 
+    my $self = shift;
 
     my $c_files = \@{$self->{_C_FILES}};
 
@@ -412,8 +412,8 @@
     return @$c_files;
 }
 
-sub h_files { 
-    my $self = shift; 
+sub h_files {
+    my $self = shift;
 
     my $h_files = \@{$self->{_H_FILES}};
 
@@ -425,7 +425,7 @@
 }
 
 sub directories {
-    my $self = shift; 
+    my $self = shift;
 
     my $directories = \@{$self->{_DIRECTORIES}};
 
diff --git a/tools/winapi/output.pm b/tools/winapi/output.pm
index f5cf793..259b9ef 100644
--- a/tools/winapi/output.pm
+++ b/tools/winapi/output.pm
@@ -126,7 +126,7 @@
     my $progress_enabled = \${$self->{PROGRESS_ENABLED}};
     my $progress = \${$self->{PROGRESS}};
     my $last_progress = \${$self->{LAST_PROGRESS}};
-    
+
     if($$progress_enabled) {
 	my $prefix = "";
 	my $suffix = "";
@@ -134,7 +134,7 @@
 	    for (1..length($$last_progress)) {
 		$prefix .= "";
 	    }
-	    
+
 	    my $diff = length($$last_progress)-length($$progress);
 	    if($diff > 0) {
 		for (1..$diff) {
diff --git a/tools/winapi/setup.pm b/tools/winapi/setup.pm
index 6ec13a5..16c9ade 100644
--- a/tools/winapi/setup.pm
+++ b/tools/winapi/setup.pm
@@ -30,7 +30,7 @@
 
     use vars qw($current_dir $wine_dir $winapi_dir $winapi_check_dir);
 
-    my $tool = $0; 
+    my $tool = $0;
     $tool =~ s%^(?:.*?/)?([^/]+)$%$1%;
 
     if(defined($current_dir) && defined($wine_dir) &&
@@ -45,8 +45,8 @@
 	    $wine_dir = $1;
 	} else {
 	    $wine_dir = ".";
-	    
-	} 
+
+	}
 
 	require Cwd;
 	my $cwd = Cwd::cwd();
diff --git a/tools/winapi/trampoline b/tools/winapi/trampoline
index cd04865..7bdf13f 100755
--- a/tools/winapi/trampoline
+++ b/tools/winapi/trampoline
@@ -21,7 +21,7 @@
 
 require Cwd;
 
-my $tool = $0; 
+my $tool = $0;
 $tool =~ s%^(?:.*?/)?([^/]+)$%$1%;
 
 $_ = Cwd::cwd();
diff --git a/tools/winapi/util.pm b/tools/winapi/util.pm
index 2d3c86f..dfbf834 100644
--- a/tools/winapi/util.pm
+++ b/tools/winapi/util.pm
@@ -105,7 +105,7 @@
     }
 
     return $result;
-}		   
+}
 
 ########################################################################
 # normalize_set
@@ -116,7 +116,7 @@
     if(!defined($_)) {
 	return undef;
     }
-    
+
     my %hash = ();
     foreach my $key (split(/\s*&\s*/)) {
 	$hash{$key}++;
diff --git a/tools/winapi/winapi_check_options.pm b/tools/winapi/winapi_check_options.pm
index 389f41d..03c060e 100644
--- a/tools/winapi/winapi_check_options.pm
+++ b/tools/winapi/winapi_check_options.pm
@@ -50,7 +50,7 @@
     "spec-mismatch" => { default => 0, description => "spec file mismatch checking" },
 
     "local" =>  { default => 1, description => "local checking" },
-    "module" => { 
+    "module" => {
 	default => { active => 1, filter => 0, hash => {} },
 	parent => "local",
 	parser => \&parser_comma_list,
@@ -77,11 +77,11 @@
     "misplaced" => { default => 1, parent => "local", description => "check for misplaced functions" },
     "statements"  => { default => 0, parent => "local", description => "check for statements inconsistances" },
     "cross-call" => { default => 0, parent => "statements",  description => "check for cross calling functions" },
-    "cross-call-win32-win16" => { 
+    "cross-call-win32-win16" => {
 	default => 0, parent => "cross-call", description => "check for cross calls between win32 and win16"
      },
-    "cross-call-unicode-ascii" => { 
-	default => 0, parent => "cross-call", description => "check for cross calls between Unicode and ASCII" 
+    "cross-call-unicode-ascii" => {
+	default => 0, parent => "cross-call", description => "check for cross calls between Unicode and ASCII"
     },
     "debug-messages" => { default => 0, parent => "statements", description => "check for debug messages inconsistances" },
 
@@ -98,12 +98,12 @@
 
     "documentation" => {
 	default => 1,
-	parent => "local", 
+	parent => "local",
 	description => "check for documentation inconsistances"
 	},
-    "documentation-pedantic" => { 
-	default => 0, 
-	parent => "documentation", 
+    "documentation-pedantic" => {
+	default => 0,
+	parent => "documentation",
 	description => "be pendantic when checking for documentation inconsistances"
 	},
 
@@ -113,11 +113,11 @@
 	description => "check for arguments documentation inconsistances\n"
 	},
     "documentation-comment-indent" => {
-	default => 0, 
+	default => 0,
 	parent => "documentation", description => "check for documentation comment indent inconsistances"
 	},
     "documentation-comment-width" => {
-	default => 0, 
+	default => 0,
 	parent => "documentation", description => "check for documentation comment width inconsistances"
 	},
     "documentation-name" => {
@@ -168,23 +168,23 @@
 sub report_module {
     my $self = shift;
     my $refvalue = $self->{MODULE};
-    
+
     my $name = shift;
 
     if(defined($name)) {
-	return $$refvalue->{active} && (!$$refvalue->{filter} || $$refvalue->{hash}->{$name}); 
+	return $$refvalue->{active} && (!$$refvalue->{filter} || $$refvalue->{hash}->{$name});
     } else {
 	return 0;
-    } 
+    }
 }
 
 sub report_argument_forbidden {
-    my $self = shift;   
+    my $self = shift;
     my $refargument_forbidden = $self->{ARGUMENT_FORBIDDEN};
 
     my $type = shift;
 
-    return $$refargument_forbidden->{active} && (!$$refargument_forbidden->{filter} || $$refargument_forbidden->{hash}->{$type}); 
+    return $$refargument_forbidden->{active} && (!$$refargument_forbidden->{filter} || $$refargument_forbidden->{hash}->{$type});
 }
 
 sub report_argument_kind {
@@ -193,7 +193,7 @@
 
     my $kind = shift;
 
-    return $$refargument_kind->{active} && (!$$refargument_kind->{filter} || $$refargument_kind->{hash}->{$kind}); 
+    return $$refargument_kind->{active} && (!$$refargument_kind->{filter} || $$refargument_kind->{hash}->{$kind});
 
 }
 
diff --git a/tools/winapi/winapi_extract b/tools/winapi/winapi_extract
index a480b71..bb509e9 100755
--- a/tools/winapi/winapi_extract
+++ b/tools/winapi/winapi_extract
@@ -79,7 +79,7 @@
 		    $module2type{$module} = $type;
 		} elsif(/^\d+|@/) {
 		    $header = 0;
-		    $lookahead = 1; 
+		    $lookahead = 1;
 		}
 		next;
 	    }
@@ -152,7 +152,7 @@
 		    $output->write("$external_name ($module.$ordinal) already exists\n");
 		}
 	    }
-	    
+
 	    if($options->debug) {
 		$output->write("$external_name ($module.$ordinal)\n");
 	    }
@@ -208,7 +208,7 @@
 
 	my $internal_name = $function->internal_name;
 	$functions{$internal_name} = $function;
-	
+
 	$output->progress("$file (file $progress_current of $progress_max): $internal_name");
 	$output->prefix_callback(sub { return $function->prefix; });
 
@@ -286,14 +286,14 @@
     foreach my $module (keys(%specifications)) {
 	my $spec_file = $module2spec_file{$module};
 	my $type = $module2type{$module};
-	
+
 	if(!defined($spec_file) || !defined($type)) {
 	    $output->write("$module: doesn't exist\n");
 	    next;
 	}
-	
+
 	$spec_file .= "2";
-	
+
 	$output->progress("$spec_file");
 	open(OUT, "> $wine_dir/$spec_file");
 
@@ -304,7 +304,7 @@
 	    print OUT "init " . $function->internal_name . "\n";
 	}
 	print OUT "\n";
-	
+
 	my %debug_channels;
 	if(exists($specifications{$module}{init})) {
 	    my $function = $specifications{$module}{init}{function};
@@ -319,7 +319,7 @@
 	    }
 	}
 	foreach my $name (sort(keys(%{$specifications{$module}{unfixed}}))) {
-	    my $function = $specifications{$module}{unfixed}{$name}{function}; 
+	    my $function = $specifications{$module}{unfixed}{$name}{function};
 	    foreach my $debug_channel (@{$function->debug_channels}) {
 		$debug_channels{$debug_channel}++;
 	    }
@@ -332,11 +332,11 @@
 	}
 
 	my @debug_channels = sort(keys(%debug_channels));
-	if($#debug_channels >= 0) { 
+	if($#debug_channels >= 0) {
 	    print OUT "debug_channels (" .  join(" ", @debug_channels) . ")\n";
 	    print OUT "\n";
 	}
-	
+
 	my $empty = 1;
 
 	if(!$empty) {
@@ -345,8 +345,8 @@
 	}
 	foreach my $external_name (sort(keys(%{$specifications{$module}{unknown}}))) {
 	    my $entry = $specifications{$module}{unknown}{$external_name};
-	    my $ordinal = $entry->{ordinal}; 
-	    my $function = $entry->{function}; 
+	    my $ordinal = $entry->{ordinal};
+	    my $function = $entry->{function};
 	    print OUT "# ";
 	    output_function(\*OUT, $type, $ordinal, $external_name, $function);
 	    $empty = 0;
@@ -358,8 +358,8 @@
 	}
 	foreach my $ordinal (sort {$a <=> $b} keys(%{$specifications{$module}{fixed}})) {
 	    my $entry = $specifications{$module}{fixed}{$ordinal};
-	    my $external_name = $entry->{external_name}; 
-	    my $function = $entry->{function}; 
+	    my $external_name = $entry->{external_name};
+	    my $function = $entry->{function};
 	    output_function(\*OUT, $type, $ordinal, $external_name, $function);
 	    $empty = 0;
 	}
@@ -387,7 +387,7 @@
 
 	my %module_stub_count;
 	my %module_total_count;
-	
+
 	foreach my $internal_name ($winapi->all_internal_functions,$winapi->all_functions_stub) {
 	    foreach my $module (split(/ \& /, $winapi->function_internal_module($internal_name))) {
 		if($winapi->is_function_stub_in_module($module, $internal_name)) {
@@ -413,11 +413,11 @@
 	    if(!defined($total)) { $total = 0;}
 
 	    my $stubs = $real_stubs + $pseudo_stubs;
-    
+
 	    $output->write("*.c: $module: ");
 	    $output->write("$stubs of $total functions are stubs ($real_stubs real, $pseudo_stubs pseudo)\n");
 	}
-    } 
+    }
 }
 
 if($options->winetest) {
@@ -448,9 +448,9 @@
 
 	my $n = 0;
 	foreach my $entry (@entries) {
-	    my $external_name = $entry->{external_name}; 
-	    my $ordinal = $entry->{ordinal}; 
-	    my $function = $entry->{function}; 
+	    my $external_name = $entry->{external_name};
+	    my $ordinal = $entry->{ordinal};
+	    my $function = $entry->{function};
 
 	    my $return_kind;
 	    my $calling_convention;
diff --git a/tools/winapi/winapi_fixup b/tools/winapi/winapi_fixup
index 83c96c7..05a0baf 100755
--- a/tools/winapi/winapi_fixup
+++ b/tools/winapi/winapi_fixup
@@ -27,7 +27,7 @@
 use config qw(
     &file_type &files_filter
     &file_skip &files_skip
-    &file_normalize 
+    &file_normalize
     &get_spec_files
     $current_dir $wine_dir $winapi_dir $winapi_check_dir
 );
@@ -68,9 +68,9 @@
 	$_ = <IN>;
 	close(IN);
     }
-   
+
     my $max_line = 0;
-    { 
+    {
       local $_ = $_;
       while(s/^.*?\n//) { $max_line++; }
       if($_) { $max_line++; }
@@ -115,7 +115,7 @@
 	return 1;
     };
 
-    $parser->set_found_preprocessor_callback($found_preprocessor);  
+    $parser->set_found_preprocessor_callback($found_preprocessor);
 
     my $found_comment = sub {
 	my $begin_line = shift;
@@ -127,7 +127,7 @@
 	return 1;
     };
 
-    $parser->set_found_comment_callback($found_comment);  
+    $parser->set_found_comment_callback($found_comment);
 
     my $found_line = sub {
 	$line = shift;
@@ -152,7 +152,7 @@
 	return 1;
     };
 
-    $parser->set_found_declaration_callback($found_declaration);  
+    $parser->set_found_declaration_callback($found_declaration);
 
     my $found_function = sub {
 	$function = shift;
@@ -168,11 +168,11 @@
 	if($options->documentation) {
 	    # fixup_documentation($function, $editor);
 	}
-	
+
 	if($options->statements) {
 	    fixup_statements($function, $editor);
 	}
-	
+
 	my $statements = $function->statements;
 	if(!defined($statements)) {
 	    $function = undef;
@@ -183,7 +183,7 @@
 
 	return 0;
     };
-    
+
     $parser->set_found_function_callback($found_function);
 
     my $found_variable = sub {
@@ -194,11 +194,11 @@
 	my $name = shift;
 
 	# $output->write("$begin_line.$begin_column: $linkage $type $name = /* ... */\n");
-	
+
 	return 1;
     };
 
-    $parser->set_found_variable_callback($found_variable);        
+    $parser->set_found_variable_callback($found_variable);
 
     my $found_function_call = sub {
 	my $begin_line = shift;
@@ -227,4 +227,3 @@
 
     $editor->flush;
 }
-
diff --git a/tools/winapi/winapi_fixup_documentation.pm b/tools/winapi/winapi_fixup_documentation.pm
index 91d7e73..c8ea86c 100644
--- a/tools/winapi/winapi_fixup_documentation.pm
+++ b/tools/winapi/winapi_fixup_documentation.pm
@@ -48,14 +48,14 @@
     my $calling_convention = $function->calling_convention;
     my $internal_name = $function->internal_name;
     my $statements = $function->statements;
-    
+
     if($linkage eq "static" ||
        ($linkage eq "extern" && !defined($statements)) ||
        ($linkage eq "" && !defined($statements)))
     {
 	return;
     }
-    
+
     my @external_names = $function->external_names;
     if($#external_names < 0) {
 	return;
@@ -65,7 +65,7 @@
 	$documentation = undef;
     }
     $documentation_line_used{$file}{$documentation_line}++;
-    
+
     my @module_ordinal_entries = ();
     foreach my $entry2 ($function->get_all_module_ordinal) {
 	(my $external_name2, my $module2, my $ordinal2) = @$entry2;
@@ -74,21 +74,21 @@
 	    ($win32api->is_module($module2) && !$win32api->is_function_stub_in_module($module2, $external_name2))) &&
 	       $modules->is_allowed_module_in_file($module2, "$current_dir/$file"))
 	{
-	    push @module_ordinal_entries, $entry2; 
+	    push @module_ordinal_entries, $entry2;
 	}
     }
-    
+
     my $spec_modified = 0;
-    
+
     if($options->stub && defined($documentation)) {
 	my $calling_convention16 = $function->calling_convention16;
 	my $calling_convention32 = $function->calling_convention32;
-	
+
 	foreach my $winapi (@winapis) {
 	    my @entries = ();
 	    my $module = $winapi->function_internal_module($internal_name);
 	    my $ordinal = $winapi->function_internal_ordinal($internal_name);
-	    
+
 	    if($winapi->is_function_stub_in_module($module, $internal_name)) {
 		my $external_name = $internal_name;
 		if($winapi->name eq "win16") {
@@ -99,14 +99,14 @@
 		}
 		push @entries, [$external_name, $module, $ordinal];
 	    }
-	    
+
 	    foreach (split(/\n/, $documentation)) {
 		if(/^\s*\*\s*(\S+)\s*[\(\[]\s*(\w+)\s*\.\s*([^\s\)\]]*)\s*[\)\]].*?$/) {
 		    my $external_name = $1;
 		    my $module = lc($2);
 		    my $ordinal = $3;
-		    
-		    if($external_name ne "@" && 
+
+		    if($external_name ne "@" &&
 		       $winapi->is_module($module) &&
 		       $winapi->is_function_stub_in_module($module, $external_name) &&
 		       $internal_name !~ /^\U$module\E_\Q$external_name\E$/)
@@ -115,16 +115,16 @@
 		    }
 		}
 	    }
-	    
+
 	    foreach my $entry (@entries) {
 		(my $external_name, my $module, my $ordinal) = @$entry;
-		
+
 		my $refargument_types = $function->argument_types;
-		
+
 		if(!defined($refargument_types)) {
 		    next;
 		}
-		
+
 		my $abort = 0;
 		my $n;
 		my @argument_kinds = map {
@@ -133,7 +133,7 @@
 		    if($type ne "..." && !defined($kind = $winapi->translate_argument($type))) {
 			$output->write("no translation defined: " . $type . "\n");
 		    }
-		    
+
 		    # FIXME: Kludge
 		    if(defined($kind) && $kind eq "longlong") {
 			$n += 2;
@@ -154,7 +154,7 @@
 			"undef";
 		    }
 		} @$refargument_types;
-		
+
 		my $search = "^\\s*$ordinal\\s+stub\\s+$external_name\\s*(?:#.*?)?\$";
 		my $replace;
 		if($winapi->name eq "win16") {
@@ -167,28 +167,28 @@
 		    $spec_modified = 1;
 		    $editor->replace_spec_file($module, $search, $replace);
 		}
-	    }	    
+	    }
 	}
     }
-    
+
     my %found_external_names;
     foreach my $external_name (@external_names) {
 	$found_external_names{$external_name} = {};
     }
-    
+
     my $documentation_modified = 0;
-    
+
     if(!$spec_modified &&
        (defined($documentation) && !$documentation_modified) &&
-       ($options->documentation_name || $options->documentation_ordinal || 
+       ($options->documentation_name || $options->documentation_ordinal ||
 	$options->documentation_missing))
     {
 	local $_;
-	
+
 	my $line3;
 	my $search;
 	my $replace;
-	
+
 	my $count = 0;
 	my $line2 = $documentation_line - 1;
 	foreach (split(/\n/, $documentation)) {
@@ -198,14 +198,14 @@
 		my $external_name = $2;
 		my $part3 = $3;
 		my $part4 = $4;
-		
+
 		$part4 =~ s/\s*$//;
-		
+
 		my @entries = ();
 		while($part3 =~ s/^\s*([\(\[]\s*(\w+)(?:\s*\.\s*([^\s\)\]]*)\s*)?[\)\]])//) {
 		    push @entries, [$1, $2, $3];
 		}
-		
+
 		my $found = 0;
 		foreach my $external_name2 (@external_names) {
 		    if($external_name eq $external_name2) {
@@ -217,28 +217,28 @@
 			last;
 			}
 		}
-		
+
 		my $replaced = 0;
 		my $replace2 = "";
 		foreach my $entry (@entries) {
 		    my $part12 = $part1;
 		    (my $part32, my $module, my $ordinal) = @$entry;
-		    
+
 		    foreach my $entry2 (@module_ordinal_entries) {
 			(my $external_name2, my $module2, my $ordinal2) = @$entry2;
-			
-			if($options->documentation_name && lc($module) eq $module2 && 
-			   $external_name ne $external_name2) 
+
+			if($options->documentation_name && lc($module) eq $module2 &&
+			   $external_name ne $external_name2)
 			{
 			    if(!$found && $part12 =~ s/\b\Q$external_name\E\b/$external_name2/) {
 				$external_name = $external_name2;
 				$replaced++;
 			    }
 			}
-			
+
 			if($options->documentation_ordinal &&
 			   $external_name eq $external_name2 &&
-			   lc($module) eq $module2 && 
+			   lc($module) eq $module2 &&
 			   ($#entries > 0 || !defined($ordinal) || ($ordinal ne $ordinal2)))
 			{
 			    if(defined($ordinal)) {
@@ -255,7 +255,7 @@
 		    if($replace2) { $replace2 .= "\n"; }
 		    $replace2 .= "$part12$part32$part4";
 		}
-		
+
 		if($replaced > 0) {
 		    $line3 = $line2;
 		    $search = "^\Q$_\E\$";
@@ -299,7 +299,7 @@
 	my $part3;
 	my $part4;
 	my $line3 = 0;
-	
+
 	my $line2 = $documentation_line - 1;
 	foreach (split(/\n/, $documentation)) {
 	    $line2++;
@@ -310,14 +310,14 @@
 		$part4 = $4;
 
 		$part2 =~ s/\S/ /g;
-		
+
 		$line3 = $line2 + 1;
 	    }
 	}
 
 	foreach my $entry2 (@module_ordinal_entries) {
 	    (my $external_name2, my $module2, my $ordinal2) = @$entry2;
-	    
+
 	    my $found = 0;
 	    foreach my $external_name (keys(%found_external_names)) {
 		foreach my $module3 (keys(%{$found_external_names{$external_name}})) {
@@ -327,9 +327,9 @@
 		}
 	    }
 	    # FIXME: Not 100% correct
-	    if(!$found && 
-	       !$win16api->is_function_stub_in_module($module2, $internal_name) && 
-	       !$win32api->is_function_stub_in_module($module2, $internal_name)) 
+	    if(!$found &&
+	       !$win16api->is_function_stub_in_module($module2, $internal_name) &&
+	       !$win32api->is_function_stub_in_module($module2, $internal_name))
 	    {
 		if($line3 > 0) {
 		    $documentation_modified = 1;
@@ -342,7 +342,7 @@
 	}
     }
 
-    if(!$documentation_modified && 
+    if(!$documentation_modified &&
        defined($documentation) &&
        $options->documentation_wrong)
     {
@@ -353,14 +353,14 @@
 		my $external_name = $1;
 		my $module = $2;
 		my $ordinal = $3;
-		
+
 		my $found = 0;
 		foreach my $entry2 (@module_ordinal_entries) {
 		    (my $external_name2, my $module2, my $ordinal2) = @$entry2;
-		    
+
 		    if($external_name eq $external_name2 &&
 		       lc($module) eq $module2 &&
-		       $ordinal eq $ordinal2) 
+		       $ordinal eq $ordinal2)
 		    {
 			$found = 1;
 		    }
diff --git a/tools/winapi/winapi_fixup_editor.pm b/tools/winapi/winapi_fixup_editor.pm
index 6a09d90..3700f7d 100644
--- a/tools/winapi/winapi_fixup_editor.pm
+++ b/tools/winapi/winapi_fixup_editor.pm
@@ -64,7 +64,7 @@
     my $replace = shift;
 
     my $file = \${$self->{FILE}};
-    
+
     my $line = $begin_line;
     my $action = {};
 
@@ -225,7 +225,7 @@
 
 	    my $search = $substitute_line{$.}{search};
 	    my $replace = $substitute_line{$.}{replace};
-	    
+
 	    if(defined($search) && defined($replace)) {
 		my $modified2 = 0;
 		if(s/$search/$replace/) {
@@ -239,14 +239,14 @@
 		    my $search2;
 		    my $replace2;
 		    if(!$modified2) {
-			$search2 = "unmatched search"; 
-			$replace2 = "unmatched replace"; 
+			$search2 = "unmatched search";
+			$replace2 = "unmatched replace";
 		    } else {
-			$search2 = "search"; 
+			$search2 = "search";
 			$replace2 = "replace";
 		    }
 		    $output->write("$file: $.: $search2 : '$search'\n");
-		    
+
 		    my @replace2 = split(/\n/, $replace);
 		    if($#replace2 > 0) {
 			$output->write("$file: $.: $replace2: \\\n");
@@ -288,7 +288,7 @@
     }
 
     foreach my $module (sort(keys(%spec_file))) {
-	my $file; 
+	my $file;
 	foreach my $winapi (@winapis) {
 	    $file = ($winapi->module_file($module) || $file);
 	}
@@ -302,7 +302,7 @@
 	my $editor = sub {
 	    local *IN = shift;
 	    local *OUT = shift;
-	    
+
 	    my $modified = 0;
 	    while(<IN>) {
 		chomp;
@@ -328,7 +328,7 @@
 
 		print OUT "$_\n";
 	    }
-	    
+
 	    return $modified;
 	};
 
@@ -362,7 +362,7 @@
 
     my $line = shift;
     my $pattern = shift;
-    
+
     $delete_line{$line} = $pattern;
 }
 
@@ -371,7 +371,7 @@
 
     my $line = shift;
     my $insert = shift;
-    
+
     $insert_line{$line} = $insert;
 }
 
@@ -381,7 +381,7 @@
     my $line = shift;
     my $search = shift;
     my $replace = shift;
-    
+
     $substitute_line{$line}{search} = $search;
     $substitute_line{$line}{replace} = $replace;
 }
@@ -392,15 +392,15 @@
     my $module = shift;
     my $search = shift;
     my $replace = shift;
-    
+
     my $substitute = {};
     $substitute->{search} = $search;
     $substitute->{replace} = $replace;
-    
+
     if(!defined($spec_file{$module})) {
 	$spec_file{$module} = [];
     }
-    
+
     push @{$spec_file{$module}}, $substitute;
 }
 
diff --git a/tools/winapi/winapi_fixup_options.pm b/tools/winapi/winapi_fixup_options.pm
index 94be80c..fe496b4 100644
--- a/tools/winapi/winapi_fixup_options.pm
+++ b/tools/winapi/winapi_fixup_options.pm
@@ -52,7 +52,7 @@
 
     "global" => { default => 1, description => "global fixup" },
 
-    "modify" => { default => 0, description => "actually perform the fixups" },	    
+    "modify" => { default => 0, description => "actually perform the fixups" },
 );
 
 my %options_short = (
diff --git a/tools/winapi/winapi_fixup_statements.pm b/tools/winapi/winapi_fixup_statements.pm
index fb7c3ec..80185dc 100644
--- a/tools/winapi/winapi_fixup_statements.pm
+++ b/tools/winapi/winapi_fixup_statements.pm
@@ -67,7 +67,7 @@
     my $line = 1;
     my $column = 0;
     if($parser->parse_c_function_call(\$_, \$line, \$column, \$name, \@arguments, \@argument_lines, \@argument_columns) &&
-       $name =~ /^MAKE(?:LONG|LPARAM|LRESULT|WPARAM)$/) 
+       $name =~ /^MAKE(?:LONG|LPARAM|LRESULT|WPARAM)$/)
     {
 	$low = $arguments[0];
 	$high = $arguments[1];
@@ -95,7 +95,7 @@
     if($msg !~ /^WM_/) {
 	return undef;
     } elsif($msg =~ /^(?:WM_BEGINDRAG|WM_ENTERMENULOOP|WM_EXITMENULOOP|WM_HELP|
-		       WM_ISACTIVEICON|WM_LBTRACKPOINT|WM_NEXTMENU)$/x) 
+		       WM_ISACTIVEICON|WM_LBTRACKPOINT|WM_NEXTMENU)$/x)
     {
 	return undef;
     } elsif($msg =~ /^WM_(?:GET|SET)TEXT$/) {
@@ -284,13 +284,13 @@
     my $statements_line = $function->statements_line;
     my $statements_column = $function->statements_column;
     my $statements = $function->statements;
-   
+
     if(!defined($statements)) {
 	return;
     }
 
     my $parser = new c_parser($file);
-    
+
     my $found_function_call = sub {
 	my $begin_line = shift;
 	my $begin_column = shift;
@@ -298,7 +298,7 @@
 	my $end_column = shift;
 	my $name = shift;
 	my $arguments = shift;
-	
+
 	foreach my $argument (@$arguments) {
 	    $argument =~ s/^\s*(.*?)\s*$/$1/;
 	}
@@ -311,7 +311,7 @@
 	    } else {
 		$fixup_function_call = \&_fixup_user_message;
 	    }
-	} 
+	}
 
 	if(defined($fixup_function_call)) {
 	    my $replace = &$fixup_function_call($name, $arguments);
@@ -326,11 +326,11 @@
 
 	return 0;
     };
-    
+
     $parser->set_found_function_call_callback($found_function_call);
-    
+
     my $line = $statements_line;
-    my $column = 0;	
+    my $column = 0;
     if(!$parser->parse_c_statements(\$statements, \$line, \$column)) {
 	$output->write("error: can't parse statements\n");
     }
diff --git a/tools/winapi/winapi_module_user.pm b/tools/winapi/winapi_module_user.pm
index e2df1fa..7c54bf7 100644
--- a/tools/winapi/winapi_module_user.pm
+++ b/tools/winapi/winapi_module_user.pm
@@ -110,9 +110,9 @@
 	id => 0x0301, result => "void", wparam => "void", lparam => "void" },
     WM_COPYDATA => {
         id => 0x004a, result => "", wparam => "", lparam => "" },
-    WM_COMPACTING => { 
+    WM_COMPACTING => {
 	id => 0x0041, result => "void", wparam => "UINT", lparam => "void" },
-    WM_COMPAREITEM => { 
+    WM_COMPAREITEM => {
 	id => 0x0039, result => "int", wparam => "UINT", lparam => "const COMPAREITEMSTRUCT *" },
     WM_CREATE => {
 	id => 0x0001, result => "BOOL", wparam => "void", lparam => "LPCREATESTRUCT" },
@@ -143,7 +143,7 @@
 	id => 0x0103, result => "void", wparam => "TCHAR", lparam => ["", ""] },
     WM_DEVICECHANGE => {
         id => 0x0219, result => "BOOL", wparam => "UINT", lparam => "DWORD" },
-    WM_DELETEITEM => { 
+    WM_DELETEITEM => {
 	id => 0x002d, result => "void", wparam => "UINT", lparam => "const DELETEITEMSTRUCT *" },
     WM_DEVMODECHANGE => {
 	id => 0x001b, result => "void", wparam => "void", lparam => "LPCTSTR" },
@@ -551,7 +551,7 @@
 	id => 0x0046, result => "BOOL", wparam => "void", lparam => "LPWINDOWPOS" },
     WM_WINDOWPOSCHANGED => {
 	id => 0x0047, result => "void", wparam => "void", lparam => "const LPWINDOWPOS" },
-    WM_WININICHANGE => { 
+    WM_WININICHANGE => {
 	id => 0x001a, result => "void", wparam => "void", lparam => "LPCTSTR" }
 };
 
@@ -699,7 +699,7 @@
 	if(!s/^\#\s*define\s*// || !/^FORWARD_WM_/) {
 	    return 1;
 	}
-	
+
 	my $name;
 	if(s/^FORWARD_(\w+)\([^\)]*\)\s*(.*?)\s*$/$2/s) {
 	    $name = $1;
@@ -749,7 +749,7 @@
 		    die "$name: '$_'";
 		}
 	    }
-	    # $output->write("$1: $_\n");    
+	    # $output->write("$1: $_\n");
 	} else {
 	    die "$name: '$_'";
 	}
@@ -763,7 +763,7 @@
 		    return "";
 		}
 	    }
-	    
+
 	};
 
 	my @entries = (
@@ -813,7 +813,7 @@
 	    } else {
 		die "$name: '$_'";
             }
-        } 
+        }
 
 	# $output->write("$result: '@names', '$wparam', '$lparam'\n");
 
@@ -878,7 +878,7 @@
 	if(/^\#\s*define\s+(WM_\w+)\s+(0x[0-9a-fA-F]+)\s*$/) {
 	    my $name = $1;
 	    my $id = lc($2);
-	    	
+
 	    if(exists($$message{$name})) {
 		my $id2 = sprintf("0x%04x", $$message{$name}{id});
 		if($id ne $id2) {
diff --git a/tools/winapi_check/modules.pm b/tools/winapi_check/modules.pm
index 9a2790e..42c02cf 100644
--- a/tools/winapi_check/modules.pm
+++ b/tools/winapi_check/modules.pm
@@ -32,7 +32,7 @@
 use config qw(
     &file_type &files_skip
     &file_directory
-    &get_c_files &get_spec_files 
+    &get_c_files &get_spec_files
     $current_dir $wine_dir
     $winapi_check_dir
 );
@@ -106,7 +106,7 @@
 
 	    if(!-f "$wine_dir/$spec_file") {
 		$output->write("modules.dat: $spec_file: file ($spec_file) doesn't exist or is no file\n");
-	    } 
+	    }
 
 	    $spec_file_found{$spec_file}++;
 	    $$spec_file2dir{$spec_file} = {};
@@ -119,7 +119,7 @@
 
 	if(!-d "$wine_dir/$allowed_dir") {
 	    $output->write("modules.dat: $spec_file: directory ($allowed_dir) doesn't exist or is no directory\n");
-	} 
+	}
     }
     close(IN);
 
@@ -202,7 +202,7 @@
 	my $index = -1;
 	my @dirs = $self->allowed_dirs_for_module($module);
 	foreach my $dir (@dirs) {
-	    if(exists($dirs{$dir}) && $dirs{$dir} == 0) { 
+	    if(exists($dirs{$dir}) && $dirs{$dir} == 0) {
 		$index++;
 	    }
 	}
@@ -277,7 +277,7 @@
    my $self = shift;
 
    my $module2spec_file = \%{$self->{MODULE2SPEC_FILE}};
-   my $spec_file2dir = \%{$self->{SPEC_FILE2DIR}};   
+   my $spec_file2dir = \%{$self->{SPEC_FILE2DIR}};
 
    my $module = shift;
 
diff --git a/tools/winapi_check/nativeapi.pm b/tools/winapi_check/nativeapi.pm
index 482f0fc..621604d 100644
--- a/tools/winapi_check/nativeapi.pm
+++ b/tools/winapi_check/nativeapi.pm
@@ -61,7 +61,7 @@
     while(<IN>) {
 	s/^\s*(.*?)\s*$/$1/; # remove whitespace at begin and end of line
 	s/^(.*?)\s*#.*$/$1/; # remove comments
-	/^$/ && next;        # skip empty lines   
+	/^$/ && next;        # skip empty lines
 
 	$$functions{$_}++;
     }
@@ -70,7 +70,7 @@
     $output->progress("$configure_ac_file");
 
     my $again = 0;
-    open(IN, "< $configure_ac_file");   
+    open(IN, "< $configure_ac_file");
     local $/ = "\n";
     while($again || (defined($_ = <IN>))) {
 	$again = 0;
diff --git a/tools/winapi_check/preprocessor.pm b/tools/winapi_check/preprocessor.pm
index a3086a9..6689214 100644
--- a/tools/winapi_check/preprocessor.pm
+++ b/tools/winapi_check/preprocessor.pm
@@ -30,7 +30,7 @@
     my $stack = \@{$self->{STACK}};
     my $include_found = \${$self->{INCLUDE_FOUND}};
     my $conditional_found = \${$self->{CONDITIONAL_FOUND}};
-  
+
     $$include_found = shift;
     $$conditional_found = shift;
 
@@ -162,7 +162,7 @@
     my $state = \%{$self->{STATE}};
 
     my $name = shift;
-    
+
     my $status = $$state{$name};
 
     return defined($status) && $status eq "def";
@@ -173,7 +173,7 @@
     my $state = \%{$self->{STATE}};
 
     my $name = shift;
-    
+
     my $status = $$state{$name};
 
     return defined($status) && $status eq "undef";
@@ -184,7 +184,7 @@
     my $state = \%{$self->{STATE}};
 
     my $name = shift;
-    
+
     my $status = $$state{$name};
 
     return !defined($status);
diff --git a/tools/winapi_check/winapi.pm b/tools/winapi_check/winapi.pm
index 207b5b7..3209344 100644
--- a/tools/winapi_check/winapi.pm
+++ b/tools/winapi_check/winapi.pm
@@ -83,8 +83,8 @@
 	if($modules->is_allowed_module($module)) {
 	    $self->parse_api_file($file,$module);
 	}
-    }   
-	
+    }
+
     foreach my $forward_name (sort(keys(%$function_forward))) {
 	$$function_forward{$forward_name} =~ /^(\S*):(\S*)\.(\S*)$/;
 	(my $from_module, my $to_module, my $external_name) = ($1, $2, $3);
@@ -197,7 +197,7 @@
 	    } else {
 		$$translate_argument{$type} = $kind;
 	    }
-		
+
 	    $$type_format{$module}{$type} = $format;
 	} else {
 	    $output->write("$file: file must begin with %<type> statement\n");
@@ -251,7 +251,7 @@
 	    if(/^type\s*(\w+)/) { $type = $1; }
 	    if(/^\d+|@/) { $header = 0; $lookahead = 1; }
 	    next;
-	} 
+	}
 
 	my $ordinal;
 	if(/^(\d+|@)\s+
@@ -405,7 +405,7 @@
 		$lookahead = 1;
 	    }
 	}
-	
+
 	if(defined($ordinal)) {
 	    if($ordinal ne "@" && $ordinals{$ordinal}) {
 		$output->write("$file: ordinal redefined: $_\n");
@@ -580,11 +580,11 @@
     if(defined($module) && defined($type)) {
 	local $_;
 	foreach (split(/ & /, $module)) {
-	    if(defined($formats)) { 
-		$formats .= "|"; 
+	    if(defined($formats)) {
+		$formats .= "|";
 	    } else {
 		$formats = "";
-	    }	    
+	    }
 	    if(defined($$type_format{$_}{$type})) {
 		$formats .= $$type_format{$_}{$type};
 	    }
@@ -885,7 +885,7 @@
     my $ordinal;
     while(defined($name = shift @name) &&
 	  defined($module = shift @module) &&
-	  defined($ordinal = shift @ordinal)) 
+	  defined($ordinal = shift @ordinal))
     {
 	push @entries, [$name, $module, $ordinal];
     }
@@ -936,17 +936,17 @@
 	    @ordinal = split(/ & /, $ordinal);
 	}
     }
-    
+
     my $name;
     my $module;
     my $ordinal;
     while(defined($name = shift @name) &&
 	  defined($module = shift @module) &&
-	  defined($ordinal = shift @ordinal)) 
+	  defined($ordinal = shift @ordinal))
     {
 	push @entries, [$name, $module, $ordinal];
     }
- 
+
     return @entries;
 }
 
diff --git a/tools/winapi_check/winapi_check b/tools/winapi_check/winapi_check
index 154e2d4..3ec273d 100755
--- a/tools/winapi_check/winapi_check
+++ b/tools/winapi_check/winapi_check
@@ -20,7 +20,7 @@
 # Note that winapi_check are using heuristics quite heavily.
 # So always remember that:
 #
-# "Heuristics are bug ridden by definition. 
+# "Heuristics are bug ridden by definition.
 #  If they didn't have bugs, then they'd be algorithms."
 #
 # In other words, reported bugs are only potential bugs not
@@ -64,11 +64,11 @@
 my %declared_functions;
 
 my %include2info;
-{   
+{
     my @files = get_h_files("winelib");
 
     my $progress_current = 0;
-    my $progress_max = scalar(@files);   
+    my $progress_max = scalar(@files);
 
     foreach my $file (@files) {
 	$progress_current++;
@@ -107,7 +107,7 @@
                   "storage.h", "ver.h");
     foreach my $file2 (@files2) {
 	$include2info{"include/$file2"}{used}++;
-    }    
+    }
 }
 
 my @c_files = $options->c_files;
@@ -122,7 +122,7 @@
 my %complete_module;
 if($options->global) {
     my @complete_modules = $modules->complete_modules(\@c_files);
-    
+
     foreach my $module (@complete_modules) {
 	$complete_module{$module}++;
     }
@@ -146,7 +146,7 @@
 
     foreach my $file (@h_files) {
 	my %functions;
-	
+
 	$progress_current++;
 	$output->progress("$file: file $progress_current of $progress_max");
 
@@ -163,11 +163,11 @@
 		}
 	    }
 	};
-	
+
 	my $found_cplusplus_comment = sub {
 	    my $line = shift;
 	    my $comment = shift;
-	    
+
 	    if($options->comments_cplusplus) {
 		$output->write("$file:$line: C++ comments not allowed: $comment\n");
 	    }
@@ -199,7 +199,7 @@
 	    }
 
 	    if(defined($external_name) && !defined($statements) &&
-	       ($linkage eq "" || $linkage eq "extern")) 
+	       ($linkage eq "" || $linkage eq "extern"))
 	    {
 		my $previous_function = $declared_functions{$internal_name};
 		if(!defined($previous_function)) {
@@ -231,10 +231,10 @@
 	&winapi_parser::parse_c_file($file, {
 	    c_comment_found => $found_c_comment,
 	    cplusplus_comment_found => $found_cplusplus_comment,
-	    function_create => $create_function, 
-	    function_found => $found_function, 
-	    type_create => $create_type, 
-	    type_found => $found_type, 
+	    function_create => $create_function,
+	    function_found => $found_function,
+	    type_create => $create_type,
+	    type_found => $found_type,
 	    preprocessor_found => $found_preprocessor
 	});
     }
@@ -273,12 +273,12 @@
 	    }
 	}
     };
-    
+
     my $found_cplusplus_comment = sub {
 	my $line = shift;
 	my $comment = shift;
 
-	if($options->comments_cplusplus) {	
+	if($options->comments_cplusplus) {
 	    $output->write("$file:$line: C++ comments not allowed: $comment\n");
 	}
     };
@@ -286,7 +286,7 @@
     my $create_function = sub {
 	return 'winapi_function'->new;
     };
-   
+
     my $found_function = sub {
 	my $function = shift;
 
@@ -312,8 +312,8 @@
 	my $external_name16 = $function->external_name16;
 	my $external_name32 = $function->external_name32;
 
-	if(defined($external_name) && !defined($statements) && 
-	   ($linkage eq "" || $linkage eq "extern")) 
+	if(defined($external_name) && !defined($statements) &&
+	   ($linkage eq "" || $linkage eq "extern"))
 	{
 	    my $previous_function = $declared_functions{$internal_name};
 	    if(!defined($previous_function)) {
@@ -350,15 +350,15 @@
 	}
 
 	if($options->shared) {
-	    if($win16api->is_shared_internal_function($internal_name) || 
-	       $win32api->is_shared_internal_function($internal_name)) 
+	    if($win16api->is_shared_internal_function($internal_name) ||
+	       $win32api->is_shared_internal_function($internal_name))
 	    {
 		$output->write("is shared between Win16 and Win32\n");
 	    }
 	}
 
-	if($options->headers && $options->headers_needed && 
-	   defined($declared_function) && defined($external_name) && 
+	if($options->headers && $options->headers_needed &&
+	   defined($declared_function) && defined($external_name) &&
 	   defined($statements))
 	{
 	    my $needed_include = $declared_function->file;
@@ -375,11 +375,11 @@
 	if($options->local && $options->argument && defined($statements)) {
 	    &winapi_local::check_function($function);
 	}
-	
+
 	if($options->local && $options->statements && defined($statements)) {
 	    &winapi_local::check_statements(\%functions, $function);
 	}
-	
+
 	if($options->local && $options->documentation &&
 	   (defined($module16) || defined($module32)) &&
 	   $linkage eq "" && defined($statements))
@@ -392,14 +392,14 @@
 	    if(defined($external_name16)) {
 		$external_name16 = (split(/\s*&\s*/, $external_name16))[0];
 	    }
-	    
+
 	    # FIXME: Not correct
 	    if(defined($external_name32)) {
 		$external_name32 = (split(/\s*&\s*/, $external_name32))[0];
 	    }
 
 	    if($options->local && $options->misplaced &&
-	       $linkage ne "extern" && defined($statements)) 
+	       $linkage ne "extern" && defined($statements))
 	    {
 		if($options->win16 && $options->report_module($module16))
 		{
@@ -432,7 +432,7 @@
 
 	    if($options->local && $options->headers && $options->prototype) {
 		if($options->win16 && $options->report_module($module16)) {
-		    if(!$nativeapi->is_function($internal_name) && 
+		    if(!$nativeapi->is_function($internal_name) &&
 		       !defined($declared_functions{$internal_name}))
 		    {
 			$output->write("no prototype\n");
@@ -444,7 +444,7 @@
 		    {
 			if(!defined($external_name32) || ($external_name32 !~ /^Dll(?:
 			   Install|CanUnloadNow|GetClassObject|GetVersion|
-			   RegisterServer|RegisterServerEx|UnregisterServer)|DriverProc$/x && 
+			   RegisterServer|RegisterServerEx|UnregisterServer)|DriverProc$/x &&
 			   $internal_name !~ /^COMCTL32_Str/ &&
 			   $internal_name !~ /^(?:\Q$module32\E|wine)_(?:\Q$external_name32\E|\d+)$/))
 			{
@@ -489,7 +489,7 @@
     my $create_type = sub {
 	return 'type'->new;
     };
-    
+
     my $found_type = sub {
 	my $type = shift;
     };
@@ -558,17 +558,17 @@
 		    my $macro = uc($header);
 		    $macro =~ y/\.\//__/;
 		    $macro = "HAVE_" . $macro;
-		    
-		    if($nativeapi->is_conditional_header($header)) { 
+
+		    if($nativeapi->is_conditional_header($header)) {
 			if(!$preprocessor->is_def($macro)) {
 			    if($macro =~ /^HAVE_X11/) {
 				# Do nothing X Windows is handled differently
 			    } elsif($macro =~ /^HAVE_(.*?)_H$/) {
 				my $name = $1;
-				if($header !~ /^alloca\.h|sys\/time\.h|unistd\.h$/ && 
-				   !$preprocessor->is_def("STATFS_DEFINED_BY_$name")) 
+				if($header !~ /^alloca\.h|sys\/time\.h|unistd\.h$/ &&
+				   !$preprocessor->is_def("STATFS_DEFINED_BY_$name"))
 				{
-				    $output->write("$file: #$directive $argument: is a conditional include, " . 
+				    $output->write("$file: #$directive $argument: is a conditional include, " .
 						   "but is not protected\n");
 				}
 			    }
@@ -625,10 +625,10 @@
     &winapi_parser::parse_c_file($file, {
 	c_comment_found => $found_c_comment,
 	cplusplus_comment_found => $found_cplusplus_comment,
-	function_create => $create_function, 
-	function_found => $found_function, 
-	type_create => $create_type, 
-	type_found => $found_type, 
+	function_create => $create_function,
+	function_found => $found_function,
+	type_create => $create_type,
+	type_found => $found_type,
 	preprocessor_found => $found_preprocessor
     });
 
@@ -678,7 +678,7 @@
 
     if($all_modules) {
 	&winapi_documentation::report_documentation;
-	
+
 	if($options->headers_unused) {
 	    foreach my $name (sort(keys(%include2info))) {
 		if(!$include2info{$name}{used}) {
@@ -688,11 +688,10 @@
 		}
 	    }
 	}
-	
+
 	&winapi_global::check(\%type_found);
 
 	$modules->global_report;
 	$nativeapi->global_report;
     }
 }
-
diff --git a/tools/winapi_check/winapi_documentation.pm b/tools/winapi_check/winapi_documentation.pm
index 13b94b2..837ff9f 100644
--- a/tools/winapi_check/winapi_documentation.pm
+++ b/tools/winapi_check/winapi_documentation.pm
@@ -49,9 +49,9 @@
 
     my $documentation_error = 0;
     my $documentation_warning = 0;
-    if($options->documentation_name || 
+    if($options->documentation_name ||
        $options->documentation_ordinal ||
-       $options->documentation_pedantic) 
+       $options->documentation_pedantic)
     {
 	my @winapis = ($win16api, $win32api);
 	my @modules = ($module16, $module32);
@@ -70,9 +70,9 @@
 	    my @ordinals = split(/\s*\&\s*/, $ordinal);
 
 	    my $pedantic_failed = 0;
-	    while(defined(my $external_name = shift @external_name) && 
-		  defined(my $module = shift @modules) && 
-		  defined(my $ordinal = shift @ordinals)) 
+	    while(defined(my $external_name = shift @external_name) &&
+		  defined(my $module = shift @modules) &&
+		  defined(my $ordinal = shift @ordinals))
 	    {
 		my $found_name = 0;
 		my $found_ordinal = 0;
@@ -82,7 +82,7 @@
 			my $module2 = $6;
 			my $ordinal2 = $7;
 
-			if(length($1) != 1 || length($2) < 1 || 
+			if(length($1) != 1 || length($2) < 1 ||
 			   length($4) < 1 || $5 ne "(" || $8 ne ")")
 			{
 			    $pedantic_failed = 1;
@@ -98,13 +98,13 @@
 			}
 		    }
 		}
-		if(($options->documentation_name && !$found_name) || 
+		if(($options->documentation_name && !$found_name) ||
 		   ($options->documentation_ordinal && !$found_ordinal))
 		{
 		    $documentation_error = 1;
 		    $output->write("documentation: expected $external_name (\U$module\E.$ordinal): \\\n$documentation\n");
 		}
-		
+
 	    }
 	    if($options->documentation_pedantic && $pedantic_failed) {
 		$documentation_warning = 1;
@@ -147,13 +147,13 @@
 	    if(/^\s*\*(\s*)\S+(\s*)[\(\[]\s*\w+\s*\.\s*[^\s\)\]]*\s*[\)\]].*?$/) {
 		my $indent = $1;
 		my $spacing = $2;
-		
+
 		$indent =~ s/\t/        /g;
 		$indent = length($indent);
-		
+
 		$spacing =~ s/\t/        /g;
 		$spacing = length($spacing);
-		
+
 		$comment_indent{$indent}++;
 		if($indent >= 20) {
 		    $output->write("documentation: comment indent is $indent\n");
diff --git a/tools/winapi_check/winapi_function.pm b/tools/winapi_check/winapi_function.pm
index f020806..96da183 100644
--- a/tools/winapi_check/winapi_function.pm
+++ b/tools/winapi_check/winapi_function.pm
@@ -66,7 +66,7 @@
 
     my @external_names = split(/\s*&\s*/, $external_name);
     my @modules = split(/\s*&\s*/, $module);
-    
+
     my @external_names2;
     while(defined(my $external_name = shift @external_names) &&
 	  defined(my $module = shift @modules))
@@ -84,7 +84,7 @@
     my $winapi = shift;
 
     my $external_name = $self->_external_name($winapi);
-    
+
     if(defined($external_name)) {
 	return split(/\s*&\s*/, $external_name);
     } else {
@@ -92,7 +92,7 @@
     }
 }
 
-sub external_name { 
+sub external_name {
     my $self = shift;
 
     foreach my $winapi (@winapis) {
@@ -145,7 +145,7 @@
     my $winapi = shift;
 
     my $module = $self->_module($winapi);
-    
+
     if(defined($module)) {
 	return split(/\s*&\s*/, $module);
     } else {
@@ -183,7 +183,7 @@
 
     my @ordinals = split(/\s*&\s*/, $ordinal);
     my @modules = split(/\s*&\s*/, $module);
-    
+
     my @ordinals2;
     while(defined(my $ordinal = shift @ordinals) &&
 	  defined(my $module = shift @modules))
@@ -201,7 +201,7 @@
     my $winapi = shift;
 
     my $ordinal = $self->_ordinal($winapi);
-    
+
     if(defined($ordinal)) {
 	return split(/\s*&\s*/, $ordinal);
     } else {
@@ -359,7 +359,7 @@
     my $self = shift; return $self->_return_kind($win32api, @_);
 }
 
-sub _argument_kinds {   
+sub _argument_kinds {
     my $self = shift;
     my $winapi = shift;
     my $refargument_types = $self->argument_types;
@@ -394,7 +394,7 @@
 # Accounting
 #
 
-sub function_called {    
+sub function_called {
     my $self = shift;
     my $called_function_names = \%{$self->{CALLED_FUNCTION_NAMES}};
 
@@ -403,7 +403,7 @@
     $$called_function_names{$name}++;
 }
 
-sub function_called_by { 
+sub function_called_by {
    my $self = shift;
    my $called_by_function_names = \%{$self->{CALLED_BY_FUNCTION_NAMES}};
 
@@ -412,14 +412,14 @@
    $$called_by_function_names{$name}++;
 }
 
-sub called_function_names {    
+sub called_function_names {
     my $self = shift;
     my $called_function_names = \%{$self->{CALLED_FUNCTION_NAMES}};
 
     return sort(keys(%$called_function_names));
 }
 
-sub called_by_function_names {    
+sub called_by_function_names {
     my $self = shift;
     my $called_by_function_names = \%{$self->{CALLED_BY_FUNCTION_NAMES}};
 
diff --git a/tools/winapi_check/winapi_local.pm b/tools/winapi_check/winapi_local.pm
index 3429fc8..b5cd44c 100644
--- a/tools/winapi_check/winapi_local.pm
+++ b/tools/winapi_check/winapi_local.pm
@@ -44,15 +44,15 @@
     }
 
     if($options->win16 && $options->report_module($module16)) {
-	_check_function($return_type, 
-			$calling_convention, $external_name16, 
+	_check_function($return_type,
+			$calling_convention, $external_name16,
 			$internal_name, $refargument_types,
 			$win16api);
     }
 
     if($options->win32 && $options->report_module($module32)) {
-	_check_function($return_type, 
-			$calling_convention, $external_name32, 
+	_check_function($return_type,
+			$calling_convention, $external_name32,
 			$internal_name, $refargument_types,
 			$win32api);
     }
@@ -68,7 +68,7 @@
     my $winapi = shift;
 
     my $module = $winapi->function_internal_module($internal_name);
-       
+
     if($winapi->name eq "win16") {
 	if($winapi->is_function_stub_in_module($module, $internal_name)) {
 	    if($options->implemented) {
@@ -97,7 +97,7 @@
 	    $output->write("no translation defined: " . $return_type . "\n");
 	}
     } elsif(!$winapi->is_allowed_kind($implemented_return_kind) ||
-	    !$winapi->is_allowed_type_in_module($return_type, $module)) 
+	    !$winapi->is_allowed_type_in_module($return_type, $module))
     {
 	$forbidden_return_type = 1;
 	$winapi->allow_kind($implemented_return_kind);
@@ -106,7 +106,7 @@
 	    $output->write("return type is forbidden: $return_type ($implemented_return_kind)\n");
 	}
     }
-    
+
     my $segmented = 0;
     if(defined($implemented_return_kind) && $implemented_return_kind =~ /^segptr|segstr$/) {
 	$segmented = 1;
@@ -183,7 +183,7 @@
     {
 	$#argument_types--;
     }
-    
+
     if($internal_name =~ /^NTDLL__ftol|NTDLL__CIpow$/) { # FIXME: Kludge
 	# ignore
     } else {
@@ -198,7 +198,7 @@
 		$winapi->declare_argument($type, "unknown");
 		$output->write("no translation defined: " . $type . "\n");
 	    } elsif(!$winapi->is_allowed_kind($kind) ||
-		    !$winapi->is_allowed_type_in_module($type, $module)) 
+		    !$winapi->is_allowed_type_in_module($type, $module))
 	    {
 		$winapi->allow_kind($kind);
 		$winapi->allow_type_in_module($type, $module);
@@ -234,7 +234,7 @@
 	    if($argument_kinds[$n] eq "context86") {
 		# Nothing
 	    } elsif(!$winapi->is_allowed_kind($argument_kinds[$n]) ||
-	       !$winapi->is_allowed_type_in_module($argument_types[$n], $module)) 
+	       !$winapi->is_allowed_type_in_module($argument_types[$n], $module))
 	    {
 		$winapi->allow_kind($argument_kinds[$n]);
 		$winapi->allow_type_in_module($argument_types[$n],, $module);
@@ -247,7 +247,7 @@
 		   $options->report_argument_kind($declared_argument_kinds[$n]))
 		{
 		    $output->write("argument " . ($n + 1) . " type mismatch: " .
-			     $argument_types[$n] . " ($argument_kinds[$n]) != " . 
+			     $argument_types[$n] . " ($argument_kinds[$n]) != " .
 			     $declared_argument_kinds[$n] . "\n");
 		}
 	    }
@@ -257,8 +257,8 @@
 	   $implemented_calling_convention ne "asm")
 	{
 	    if($options->argument_count) {
-		$output->write("argument count differs: " . 
-		    ($#argument_types + 1) . " != " . 
+		$output->write("argument count differs: " .
+		    ($#argument_types + 1) . " != " .
 		    ($#declared_argument_kinds + 1) . "\n");
 	    }
 	}
@@ -310,7 +310,7 @@
 			my $formating = $1;
 			my $extra = $2;
 			my $arguments = $3;
-			
+
 			my $format;
 			my $argument;
 			my $n = 0;
@@ -323,7 +323,7 @@
 			    $n++;
 
 			    if(!defined($type)) { last; }
-			    
+
 			    $format =~ s/^\w+\s*[:=]?\s*//;
 			    $format =~ s/\s*\{[^\{\}]*\}$//;
 			    $format =~ s/\s*\[[^\[\]]*\]$//;
@@ -340,7 +340,7 @@
 			}
 
 			if($options->debug_messages) {
-			    my $count = $#{$function->argument_types} + 1; 
+			    my $count = $#{$function->argument_types} + 1;
 			    if($n != $count) {
 				$output->write("$called_name: argument count mismatch ($n != $count)\n");
 			    }
@@ -375,13 +375,13 @@
 		my $module16 = $$functions{$name}->module16;
 		my $module32 = $$functions{$name}->module32;
 
-		if($#called_names >= 0 && (defined($module16) || defined($module32)) ) {	
+		if($#called_names >= 0 && (defined($module16) || defined($module32)) ) {
 		    for my $called_name (@called_names) {
 			my $called_module16 = $$functions{$called_name}->module16;
 			my $called_module32 = $$functions{$called_name}->module32;
 			if(defined($module32) &&
 			   defined($called_module16) && !defined($called_module32) &&
-			   $name ne $called_name) 
+			   $name ne $called_name)
 			{
 			    $output->write("$file: $module: $name: illegal call to $called_name (Win32 -> Win16)\n");
 			}
@@ -403,4 +403,3 @@
 }
 
 1;
-
diff --git a/tools/winapi_check/winapi_parser.pm b/tools/winapi_check/winapi_parser.pm
index 617e3a8..ec74660 100644
--- a/tools/winapi_check/winapi_parser.pm
+++ b/tools/winapi_check/winapi_parser.pm
@@ -56,7 +56,7 @@
 	my $argument_documentations;
 	my $statements_line;
 	my $statements;
-	
+
 	$function_begin = sub {
 	    $documentation_line = shift;
 	    $documentation = shift;
@@ -68,7 +68,7 @@
 	    $argument_types = shift;
 	    $argument_names = shift;
 	    $argument_documentations = shift;
-	    
+
 	    if(defined($argument_names) && defined($argument_types) &&
 	       $#$argument_names == -1)
 	    {
@@ -76,7 +76,7 @@
 		    push @$argument_names, "";
 		}
 	    }
-	    
+
 	    if(defined($argument_documentations) &&
 	       $#$argument_documentations == -1)
 	    {
@@ -84,7 +84,7 @@
 		    push @$argument_documentations, "";
 		}
 	    }
-	    
+
 	    $in_function = 1;
 	};
 
@@ -93,18 +93,18 @@
 	    $statements = shift;
 
 	    my $function = &$function_create_callback();
-	    
+
 	    if(!defined($documentation_line)) {
 		$documentation_line = 0;
 	    }
-	    
+
 	    $function->file($file);
 	    $function->debug_channels([@$debug_channels]);
 	    $function->documentation_line($documentation_line);
 	    $function->documentation($documentation);
 	    $function->function_line($function_line);
 	    $function->linkage($linkage);
-	    $function->return_type($return_type); 
+	    $function->return_type($return_type);
 	    $function->calling_convention($calling_convention);
 	    $function->internal_name($internal_name);
 	    if(defined($argument_types)) {
@@ -118,7 +118,7 @@
 	    }
 	    $function->statements_line($statements_line);
 	    $function->statements($statements);
-	    
+
 	    &$function_found_callback($function);
 
 	    $in_function = 0;
@@ -189,13 +189,13 @@
 	    $output->write("$file: merge conflicts in file\n");
 	    last;
 	}
-      
+
 	# remove C comments
 	if(s/^([^\"\/]*?(?:\"[^\"]*?\"[^\"]*?)*?)(?=\/\*)//s) {
 	    my $prefix = $1;
 	    if(s/^(\/\*.*?\*\/)//s) {
 		my @lines = split(/\n/, $1);
-		push @comment_lines, $.; 
+		push @comment_lines, $.;
 		push @comments, $1;
 		&$c_comment_found_callback($. - $#lines, $., $1);
 		if($#lines <= 0) {
@@ -203,7 +203,7 @@
 		} else {
 		    $_ = $prefix . ("\n" x $#lines) . $_;
 		}
-		$again = 1; 
+		$again = 1;
 	    } else {
 		$_ = "$prefix$_";
 		$lookahead = 1;
@@ -214,7 +214,7 @@
 	# remove C++ comments
 	while(s/^([^\"\/]*?(?:\"[^\"]*?\"[^\"]*?)*?)(\/\/.*?)$/$1/s) {
 	    &$cplusplus_comment_found_callback($., $2);
-	    $again = 1; 
+	    $again = 1;
 	}
 	if($again) { next; }
 
@@ -239,10 +239,10 @@
 	}
 
 	# Remove extern "C"
-	if(s/^\s*extern\s+"C"\s+\{//m) { 
+	if(s/^\s*extern\s+"C"\s+\{//m) {
 	    $extern_c = 1;
 	    $again = 1;
-	    next; 
+	    next;
 	}
 
 	my $documentation_line;
@@ -251,7 +251,7 @@
 	{
 	    my $n = $#comments;
 	    while($n >= 0 && ($comments[$n] !~ /^\/\*\*/ ||
-			      $comments[$n] =~ /^\/\*\*+\/$/)) 
+			      $comments[$n] =~ /^\/\*\*+\/$/))
 	    {
 		$n--;
 	    }
@@ -328,7 +328,7 @@
 	    } elsif(s/^\}//) {
 		$_ = $'; $again = 1;
 		$line .= "}" if $level > 1;
-		print "-1: \}$_\n" if $options->debug >= 2; 
+		print "-1: \}$_\n" if $options->debug >= 2;
 		$level--;
 		if($level == -1 && $extern_c) {
 		    $extern_c = 0;
@@ -390,7 +390,7 @@
 
 	    if($regs_entrypoints{$name}) {
 		$name = $regs_entrypoints{$name};
-	    } 
+	    }
 
 	    $arguments =~ y/\t\n/  /;
 	    $arguments =~ s/^\s*(.*?)\s*$/$1/;
@@ -435,7 +435,7 @@
 	    }
 	    if($#argument_types == 0 && $argument_types[0] =~ /^void$/i) {
 		$#argument_types = -1;
-		$#argument_names = -1;  
+		$#argument_names = -1;
 	    }
 
 	    if($options->debug) {
@@ -484,7 +484,7 @@
 			     $function_line, "", "UINT16", "WINAPI", "waveOut" . $1 . "16", \@arguments16);
 	    &$function_end($., "");
 	    &$function_begin($documentation_line, $documentation,
-			     $function_line, "", "UINT", "WINAPI", "waveOut" . $1, \@arguments32);	    
+			     $function_line, "", "UINT", "WINAPI", "waveOut" . $1, \@arguments32);
 	    &$function_end($., "");
 	} elsif(/WAVEOUT_SHORTCUT_(1|2)\s*\(\s*(.*?)\s*,\s*(.*?)\s*,\s*(.*?)\s*\)/s) {
 	    my @lines = split(/\n/, $&);
@@ -507,7 +507,7 @@
 		&$function_begin($documentation_line, $documentation,
 				 $function_line, "", "UINT16", "WINAPI", "waveOut". $2 . "16", \@arguments16);
 		&$function_end($., "");
-		&$function_begin($documentation_line, $documentation, 
+		&$function_begin($documentation_line, $documentation,
 				 $function_line, "", "UINT", "WINAPI", "waveOut" . $2, \@arguments32);
 		&$function_end($., "");
 	    }
@@ -534,7 +534,7 @@
 		(?:\s+const)?
 		((?:\s*\*+\s*|\s+)\w+\s*(?:\[[^\]]*\])?
 		(?:\s*,\s*(?:\s*\*+\s*|\s+)\w+\s*(?:\[[^\]]*\])?)*)
-		\s*;/sx) 
+		\s*;/sx)
 	{
 	    $_ = $'; $again = 1;
 
@@ -561,9 +561,9 @@
 		(\w+(?:\s*\*+\s*)?)\s+
 		(?:(\w+)\s*)?
 		\((?:(\w+)\s+)?\s*\*\s*(\w+)\s*\)\s*
-		(?:\(([^\)]*)\)|\[([^\]]*)\])\s*;/sx) 
+		(?:\(([^\)]*)\)|\[([^\]]*)\])\s*;/sx)
 	{
-	    $_ = $'; $again = 1;	   
+	    $_ = $'; $again = 1;
 	    my $type;
 	    if(defined($2) || defined($3)) {
 		my $cc = $2 || $3;
diff --git a/tools/winecheck b/tools/winecheck
index a669fe1..ab32c33 100755
--- a/tools/winecheck
+++ b/tools/winecheck
@@ -105,7 +105,7 @@
   my ($text) = @_;
   my $test_no;
   my $indent_str = "";
-  
+
   $count_tests++;
   $test_no = sprintf("%03d", $count_tests);
   for (my $i = 0; $i < $indent; $i++)
@@ -225,7 +225,7 @@
     $advice = "Make sure the \"wine\" command is in your PATH (echo \$PATH; export PATH=xxx)";
   }
   Do_PrintResult($level, $reason, $advice);
-  
+
   # check for config mess
   $level = $is_ok;
   my @output = ();
@@ -305,7 +305,7 @@
   $indent++;
 
   my $serious = ($drive =~ /^C$/i) || ($type =~ /^cdrom$/i);
-  
+
   ##### check Path #####
   Do_Check("Path option");
   $level = $is_ok;
diff --git a/tools/wineconf b/tools/wineconf
index 6c211c1..b9310f5 100755
--- a/tools/wineconf
+++ b/tools/wineconf
@@ -104,7 +104,7 @@
 		   ($device eq '/dev/cdrom' && $type eq 'auto') ) {
 		push(@::CdromDrives, [$device, $mntpoint, 'win95']);
 	    }
-	    elsif ( ($mntpoint eq '/mnt/cdrom' || $mntpoint eq '/cdrom') 
+	    elsif ( ($mntpoint eq '/mnt/cdrom' || $mntpoint eq '/cdrom')
 		  && $type eq 'supermount') {
 		push(@::CdromDrives, [ '/dev/cdrom', $mntpoint, 'win95']);
 	    }
@@ -131,7 +131,7 @@
 	print "\n";
 	&RegisterDrive($MagicDrive, $FatDrive);
 	if(!&IsMounted($FatDrive->[0])) {
-	    warn "WARNING: DOS Drive $MagicDrive (" . $FatDrive->[0] . 
+	    warn "WARNING: DOS Drive $MagicDrive (" . $FatDrive->[0] .
 		") is not mounted\n";
 	}
 	$MagicDrive++;
@@ -190,7 +190,7 @@
 	    chomp $winini;
 	}
 	my ($winini_cnt) = $#wininis+1;
-	if ($::opt_debug) { 
+	if ($::opt_debug) {
 	    print STDERR "DEBUG: Num wininis found: $winini_cnt\n";}
 	if ($winini_cnt > 1) {
 	    warn "$winini_cnt win.ini files found:\n";
@@ -227,11 +227,11 @@
     my($Device) = @_;
     if (-d "/proc") {
 	if (-e "/proc/mounts") {
-	    open(MOUNTS, "/proc/mounts") || 
+	    open(MOUNTS, "/proc/mounts") ||
 		(warn "Cannot open /proc/mounts, although it exists\n" &&
 		 return -1);
 	    while(<MOUNTS>) {
-		if (/^$Device/) { 
+		if (/^$Device/) {
 		    return 1; # Tested 1.4
 		}
 	    }
@@ -255,11 +255,11 @@
     my($DriveC) = $::DOS2MntPoint{"C"};
     $DriveC =~ s%/$%%;
     my($path);
-    if ($::opt_debug) { 
+    if ($::opt_debug) {
 	print STDERR "DEBUG: Looking for $DriveC/autoexec.bat\n"; }
     if (-e "$DriveC/autoexec.bat") {
 	# Tested 1.4
-        open(AUTOEXEC, "$DriveC/autoexec.bat") || 
+        open(AUTOEXEC, "$DriveC/autoexec.bat") ||
             die "Cannot read autoexec.bat\n";
         while(<AUTOEXEC>) {
 	    s/\015//;
@@ -282,7 +282,7 @@
 			$varvalue =~ s/\%$matchname\%/$::DOSenv{$subname}/;
 		    }
 		    else {
-			warn "DOS environment variable $subname not\n"; 
+			warn "DOS environment variable $subname not\n";
 			warn "defined in autoexec.bat. (Reading config.sys\n";
 			warn "is not implemented.)  Using null value\n";
 			$varvalue =~ s/%$matchname%//;
@@ -335,11 +335,11 @@
 	warn "path from that\n";
 	my $shellcmd = 'find ' . &ToUnix($::windir) . " -iregex '" .
 	    '.*\.\(exe\|bat\|com\|dll\)' . "' -print";
-	if ($::opt_debug) { 
+	if ($::opt_debug) {
 	    print STDERR "DEBUG: autoexec.bat search command:\n $shellcmd\n";
 	}
 	push(@::DOScommand, `$shellcmd`);
-	if ($::opt_debug && $::opt_debug =~ /autoexec/i) { 
+	if ($::opt_debug && $::opt_debug =~ /autoexec/i) {
 	    print STDERR "DEBUG: autoexec.bat search results:\n\@DOS::command\n";
 	}
 	foreach my $command (@::DOScommand) {
@@ -347,8 +347,8 @@
 	    $::DOSexecdir{&ToDos($command)}++;
 	}
 	print "\"path\" = " .
-	    &marshall (join(";", 
-			    grep(s%\\$%%, 
+	    &marshall (join(";",
+			    grep(s%\\$%%,
 				 sort {$::DOSexecdir{$b} <=> $::DOSexecdir{$a}}
 				 (keys %::DOSexecdir)))) . "\n";
     }
diff --git a/tools/wineconf.tcl b/tools/wineconf.tcl
index b5c80e8..f2d44fe 100755
--- a/tools/wineconf.tcl
+++ b/tools/wineconf.tcl
@@ -17,7 +17,7 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #
 # the next line restarts using wish \
-exec wish $0 ${1+"$@"} 
+exec wish $0 ${1+"$@"}
 proc load_libs {} {
 	global TKW
 	set libLIST [glob $TKW/wineconf.libs/*.tcl]
diff --git a/tools/winedump/function_grep.pl b/tools/winedump/function_grep.pl
index 74cdecc..81f3bd8 100755
--- a/tools/winedump/function_grep.pl
+++ b/tools/winedump/function_grep.pl
@@ -59,7 +59,7 @@
 	}
 
 	# remove C comments
-	if(s/^(.*?)(\/\*.*?\*\/)(.*)$/$1 $3/s) { 
+	if(s/^(.*?)(\/\*.*?\*\/)(.*)$/$1 $3/s) {
 	    $again = 1;
 	    next;
 	} elsif(/^(.*?)\/\*/s) {
@@ -85,10 +85,10 @@
 	}
 
 	# Remove extern "C"
-	if(s/^\s*extern\s+"C"\s+\{//m) { 
+	if(s/^\s*extern\s+"C"\s+\{//m) {
 	    $extern_c = 1;
 	    $again = 1;
-	    next; 
+	    next;
 	}
 
 	if($level > 0)
@@ -176,7 +176,7 @@
             my $calling_convention = $7;
             my $name = $8;
             my $arguments = $10;
-	    
+
             if(!defined($linkage)) {
                 $linkage = "";
             }
@@ -281,5 +281,5 @@
             $lookahead = 1;
         }
     }
-    close(IN);	
+    close(IN);
 }
diff --git a/tools/wineinstall b/tools/wineinstall
index 59ed09f..bddae1a 100755
--- a/tools/wineinstall
+++ b/tools/wineinstall
@@ -72,16 +72,16 @@
 #  prevent the user from running wineinstall as root
 #  add script commands so we su root for 'make install' and other commands
 #    that require root access
-#  add text to tell the user we need to run stuff as root so they don't 
+#  add text to tell the user we need to run stuff as root so they don't
 #    think we are trying to pull something funny
 # Apr 14 2002 - Dustin Navea
-#  Fix sed command when finding real-windows registry so it actually 
+#  Fix sed command when finding real-windows registry so it actually
 #   accesses a file (~/.wine/config) instead of null ($CONF?!)
 #  Added search for clean-install (not upgrade) Win2k registry
 #  (next day, after some sleep)
-#  Fix sed string when finding real-windows registry to actually find 
+#  Fix sed string when finding real-windows registry to actually find
 #   windows partition name in [Drive C] section
-#  it should now almost always find the windows partition and real-windows 
+#  it should now almost always find the windows partition and real-windows
 #  registry (if not, let me know)
 
 #--- defaults (change these if you are a packager)
@@ -524,7 +524,7 @@
   fi
 }
 elif [ "$DOWINE" = 'auto' ]
-then 
+then
   DOWINE=no
 fi
 
@@ -576,13 +576,13 @@
     }
     done
     echo "Configuring Wine for a no-windows install in $CROOT..."
-  
+
     create_windows_directories
     configure_wine_applications
   }
   fi
 
-  # create $LCONF using the default config file $WINEINI  
+  # create $LCONF using the default config file $WINEINI
   if [ "$DOLOCALCONF" = 'yes' ] && [ "$CONVCONF" = 'no' ]
   then {
     sed "s|\"Path\" = \"/c\"\$|\"Path\" = \"${CROOT}\"|" $WINEINI > $TMPCONF
@@ -615,7 +615,7 @@
   fi
 else
   DOREG=no
-fi      
+fi
 
 #install the global config file $GCONF
 if [ "$DOGLOBALCONF" = 'yes' ]
@@ -639,7 +639,7 @@
   elif [ -f "$CROOT/windows/system32/config/system" ]
   then DOREG=no
   elif [ -f "$CROOT/WINNT/system32/config/system" ]
-  then DOREG=no 
+  then DOREG=no
   else DOREG=yes
   fi
   if [ "$DOREG" = 'yes' ]
diff --git a/tools/winelauncher.in b/tools/winelauncher.in
index 8c1d9eb..a4ce82d 100755
--- a/tools/winelauncher.in
+++ b/tools/winelauncher.in
@@ -4,7 +4,7 @@
 #       This shell script attempts to intelligently manage the process
 #   of launching a program with Wine.  It adds some level of
 #   visual feedback to an end user.
-#  
+#
 #   Usage:
 #       winelauncher [options]  "<windows program> [program arguments]"
 #
@@ -45,7 +45,7 @@
 COLOR=' -xrm *.Command.background:darkgrey
 -xrm *.Command.foreground:black
 -xrm *.Text.background:black
--xrm *.Text.foreground:green 
+-xrm *.Text.foreground:green
 -xrm *.Form.background:grey
 -xrm *.Form.foreground:green
 -xrm *.foreground:green
@@ -163,13 +163,13 @@
 debug_flag=~/.wine/.no_debug_window_flag
 debug_options="-debugmsg warn+all"
 
-if [ -f $info_flag ] ; then 
+if [ -f $info_flag ] ; then
     use_info_message=0
 else
     use_info_message=1
 fi
 
-if [ -f $debug_flag ] ; then 
+if [ -f $debug_flag ] ; then
     use_debug_message=0
 else
     use_debug_message=1
@@ -226,7 +226,7 @@
         If you would like to see the command line arguments
         for Wine, select the second option, below.
 
-        " 
+        "
     welcome_rc=$?
     if [ $welcome_rc -eq 0 ] ; then
         exit
@@ -283,7 +283,7 @@
         If this is the case, select the 'Configure Wine'
         option, below, to create a configuration file.
 
-        " 
+        "
     init_rc=$?
     if [ $init_rc -eq 0 ] ; then
         exit
@@ -321,7 +321,7 @@
         that Wine is attempting to launch your application.
 
         Since Wine is still very much in a development stage, many
-        applications will fail silently.  This dialog box is your indication 
+        applications will fail silently.  This dialog box is your indication
         that we're *trying* to run your application.
 
         This dialog box will automatically disappear after 30 seconds,
@@ -439,7 +439,7 @@
 Wine has exited with a failure status of $wine_return.
 
 Wine is still development software, so there can be many
-explanations for this problem.  
+explanations for this problem.
 
 You can choose to run Wine again with a higher level
 of debug messages (the debug option, below).
@@ -503,7 +503,7 @@
         #  Process a view instruction
         #------------------------------------------------------------------------------
         if [ $debug_return -eq 1 ] ; then
-            $XMESSAGE -title "View Wine Log" -file "$log_name" -buttons "  Okay  ":0,"Delete $log_name":1  
+            $XMESSAGE -title "View Wine Log" -file "$log_name" -buttons "  Okay  ":0,"Delete $log_name":1
             if [ $? -eq 1 ] ; then
                 echo "Deleting $log_name"
                 rm -f "$log_name"
@@ -537,7 +537,7 @@
             echo "Rerunning $0 $debug_options $@"
             exec $0 $debug_options "$@"
         fi
-    done 
+    done
 fi
 
 
diff --git a/tools/winemaker b/tools/winemaker
index ed01e1e..c96bd9f 100755
--- a/tools/winemaker
+++ b/tools/winemaker
@@ -89,16 +89,16 @@
 # Options for the 'Source' method
 
 ##
-# Specifies that we have only one target so that all sources relate 
-# to this target. By default this variable is left undefined which 
-# means winemaker should try to find out by itself what the targets 
-# are. If not undefined then this contains the name of the default 
+# Specifies that we have only one target so that all sources relate
+# to this target. By default this variable is left undefined which
+# means winemaker should try to find out by itself what the targets
+# are. If not undefined then this contains the name of the default
 # target (without the extension).
 my $opt_single_target;
 
 ##
-# If '$opt_single_target' has been specified then this is the type of 
-# that target. Otherwise it specifies whether the default target type 
+# If '$opt_single_target' has been specified then this is the type of
+# that target. Otherwise it specifies whether the default target type
 # is guiexe or cuiexe.
 my $opt_target_type;
 
@@ -107,14 +107,14 @@
 my $opt_flags;
 
 ##
-# If true then winemaker should ask questions to the user as it goes 
+# If true then winemaker should ask questions to the user as it goes
 # along.
 my $opt_is_interactive;
 my $opt_ask_project_options;
 my $opt_ask_target_options;
 
 ##
-# If false then winemaker should not generate any file, i.e. 
+# If false then winemaker should not generate any file, i.e.
 # no makefiles, but also no .spec files, no configure.in, etc.
 my $opt_no_generated_files;
 
@@ -135,7 +135,7 @@
 #
 #####
 
-# The description of a target is stored in an array. The constants 
+# The description of a target is stored in an array. The constants
 # below identify what is stored at each index of the array.
 
 ##
@@ -153,12 +153,12 @@
 my $T_INIT=2;
 
 ##
-# This is a bitfield containing flags refining the way the target 
+# This is a bitfield containing flags refining the way the target
 # should be handled. See the TF_xxx constants below
 my $T_FLAGS=3;
 
 ##
-# This is a reference to an array containing the list of the 
+# This is a reference to an array containing the list of the
 # resp. C, C++, RC, other (.h, .hxx, etc.) source files.
 my $T_SOURCES_C=4;
 my $T_SOURCES_CXX=5;
@@ -166,12 +166,12 @@
 my $T_SOURCES_MISC=7;
 
 ##
-# This is a reference to an array containing the list of macro 
+# This is a reference to an array containing the list of macro
 # definitions
 my $T_DEFINES=8;
 
 ##
-# This is a reference to an array containing the list of directory 
+# This is a reference to an array containing the list of directory
 # names that constitute the include path
 my $T_INCLUDE_PATH=9;
 
@@ -199,9 +199,9 @@
 # The following constants define the recognized types of target
 
 ##
-# This is not a real target. This type of target is used to collect 
+# This is not a real target. This type of target is used to collect
 # the sources that don't seem to belong to any other target. Thus no
-# real target is generated for them, we just put the sources of the 
+# real target is generated for them, we just put the sources of the
 # fake target in the global source list.
 my $TT_SETTINGS=0;
 
@@ -234,8 +234,8 @@
 
 ##
 # Initialize a target:
-# - set the target type to TT_SETTINGS, i.e. no real target will 
-#   be generated. 
+# - set the target type to TT_SETTINGS, i.e. no real target will
+#   be generated.
 sub target_init
 {
   my $target=$_[0];
@@ -276,25 +276,25 @@
 #
 #####
 
-# First we have the notion of project. A project is described by an 
-# array (since we don't have structs in perl). The constants below 
+# First we have the notion of project. A project is described by an
+# array (since we don't have structs in perl). The constants below
 # identify what is stored at each index of the array.
 
 ##
-# This is the path in which this project is located. In other 
+# This is the path in which this project is located. In other
 # words, this is the path to  the Makefile.
 my $P_PATH=0;
 
 ##
-# This index contains a reference to an array containing the project-wide 
-# settings. The structure of that arrray is actually identical to that of 
+# This index contains a reference to an array containing the project-wide
+# settings. The structure of that arrray is actually identical to that of
 # a regular target since it can also contain extra sources.
 my $P_SETTINGS=1;
 
 ##
-# This index contains a reference to an array of targets for this 
-# project. Each target describes how an executable or library is to 
-# be built. For each target this description takes the same form as 
+# This index contains a reference to an array of targets for this
+# project. Each target describes how an executable or library is to
+# be built. For each target this description takes the same form as
 # that of the project: an array. So this entry is an array of arrays.
 my $P_TARGETS=2;
 
@@ -329,26 +329,26 @@
 my %templates;
 
 ##
-# Contains the list of all projects. This list tells us what are 
-# the subprojects of the main Makefile and where we have to generate 
+# Contains the list of all projects. This list tells us what are
+# the subprojects of the main Makefile and where we have to generate
 # Makefiles.
 my @projects=();
 
 ##
-# This is the main project, i.e. the one in the "." directory. 
-# It may well be empty in which case the main Makefile will only 
+# This is the main project, i.e. the one in the "." directory.
+# It may well be empty in which case the main Makefile will only
 # call out subprojects.
 my @main_project;
 
 ##
 # Contains the defaults for the include path, etc.
-# We store the defaults as if this were a target except that we only 
+# We store the defaults as if this were a target except that we only
 # exploit the defines, include path, library path, library list and misc
 # sources fields.
 my @global_settings;
 
 ##
-# If one of the projects requires the MFc then we set this global variable 
+# If one of the projects requires the MFc then we set this global variable
 # to true so that configure asks the user to provide a path tothe MFC
 my $needs_mfc=0;
 
@@ -361,7 +361,7 @@
 #####
 
 ##
-# Cleans up a name to make it an acceptable Makefile 
+# Cleans up a name to make it an acceptable Makefile
 # variable name.
 sub canonize
 {
@@ -373,7 +373,7 @@
 
 ##
 # Returns true is the specified pathname is absolute.
-# Note: pathnames that start with a variable '$' or 
+# Note: pathnames that start with a variable '$' or
 # '~' are considered absolute.
 sub is_absolute
 {
@@ -457,7 +457,7 @@
 
 ##
 # Scans the specified directory to:
-# - see if we should create a Makefile in this directory. We normally do 
+# - see if we should create a Makefile in this directory. We normally do
 #   so if we find a project file and sources
 # - get a list of targets for this directory
 # - get the list of source files
@@ -465,13 +465,13 @@
 {
   # a reference to the parent's project
   my $parent_project=$_[0];
-  # the full relative path to the current directory, including a 
+  # the full relative path to the current directory, including a
   # trailing '/', or an empty string if this is the top level directory
   my $path=$_[1];
   # the name of this directory, including a trailing '/', or an empty
   # string if this is the top level directory
   my $dirname=$_[2];
-  # if set then no targets will be looked for and the sources will all 
+  # if set then no targets will be looked for and the sources will all
   # end up in the parent_project's 'misc' bucket
   my $no_target=$_[3];
 
@@ -486,15 +486,15 @@
   my @sources_misc=();
   # true if this directory contains a Windows project
   my $has_win_project=0;
-  # If we don't find any executable/library then we might make up targets 
-  # from the list of .dsp/.mak files we find since they usually have the 
+  # If we don't find any executable/library then we might make up targets
+  # from the list of .dsp/.mak files we find since they usually have the
   # same name as their target.
   my @dsp_files=();
   my @mak_files=();
 
   if (defined $opt_single_target or $dirname eq "") {
-    # Either there is a single target and thus a single project, 
-    # or we are in the top level directory for which a project 
+    # Either there is a single target and thus a single project,
+    # or we are in the top level directory for which a project
     # already exists
     $project=$parent_project;
   } else {
@@ -513,7 +513,7 @@
     my $fullentry="$path$dentry";
     if (-d "$fullentry") {
       if ($dentry =~ /^(Release|Debug)/i) {
-	# These directories are often used to store the object files and the 
+	# These directories are often used to store the object files and the
 	# resulting executable/library. They should not contain anything else.
 	my @candidates=grep /\.(exe|dll)$/i, @{get_directory_contents("$fullentry")};
 	foreach $candidate (@candidates) {
@@ -528,8 +528,8 @@
         push @{@$project_settings[$T_INCLUDE_PATH]},"-I$dentry";
         source_scan_directory($project,"$fullentry/","$dentry/",1);
       } else {
-	# Recursively scan this directory. Any source file that cannot be 
-	# attributed to a project in one of the subdirectories will be 
+	# Recursively scan this directory. Any source file that cannot be
+	# attributed to a project in one of the subdirectories will be
 	# attributed to this project.
 	source_scan_directory($project,"$fullentry/","$dentry/",$no_target);
       }
@@ -567,7 +567,7 @@
   }
   closedir(DIRECTORY);
 
-  # If we have a single target then all we have to do is assign 
+  # If we have a single target then all we have to do is assign
   # all the sources to it and we're done
   # FIXME: does this play well with the --interactive mode?
   if ($opt_single_target) {
@@ -608,7 +608,7 @@
 
   my $target_count;
   if (($has_win_project != 0) or ($dirname eq "")) {
-    # Deal with cases where we could not find any executable/library, and 
+    # Deal with cases where we could not find any executable/library, and
     # thus have no target, although we did find some sort of windows project.
     $target_count=keys %targets;
     if ($target_count == 0) {
@@ -635,7 +635,7 @@
 	  $name=(split /\//, cwd)[-1];
 	} else {
 	  $name=$dirname;
-	  # Remove the trailing '/'. Also eliminate whatever is after the last 
+	  # Remove the trailing '/'. Also eliminate whatever is after the last
 	  # '.' as it is likely to be meaningless (.orig, .new, ...)
 	  $name =~ s+(/|\.[^.]*)$++;
 	  if ($name eq "src") {
@@ -691,7 +691,7 @@
     }
   }
 
-  # If we have no project at this level, then transfer all 
+  # If we have no project at this level, then transfer all
   # the sources to the parent project
   $target_count=keys %targets;
   if ($target_count == 0) {
@@ -706,7 +706,7 @@
     return;
   }
 
-  # Otherwise add this project to the project list, except for 
+  # Otherwise add this project to the project list, except for
   # the main project which is already in the list.
   if ($dirname ne "") {
     push @projects,$project;
@@ -748,7 +748,7 @@
 
   # - Create the targets
   # - Check if we have both libraries and programs
-  # - Match each target with source files (sort in reverse 
+  # - Match each target with source files (sort in reverse
   #   alphabetical order to get the longest matches first)
   my @local_dlls=();
   my @local_depends=();
@@ -773,8 +773,8 @@
       $basename=$target_name;
       push @exe_list,$target;
     }
-    # This is the default link list of Visual Studio, except odbccp32 
-    # which we don't have in Wine. Also I add ntdll which seems 
+    # This is the default link list of Visual Studio, except odbccp32
+    # which we don't have in Wine. Also I add ntdll which seems
     # necessary for Winelib.
     my @std_dlls=qw(advapi32.dll comdlg32.dll gdi32.dll kernel32.dll ntdll.dll odbc32.dll ole32.dll oleaut32.dll shell32.dll user32.dll winspool.drv);
     @$target[$T_DLLS]=\@std_dlls;
@@ -815,7 +815,7 @@
       @$project_settings[$T_FLAGS]|=$TF_MFC;
       push @{@$target[$T_DLL_PATH]},"\$(MFC_LIBRARY_PATH)";
       push @{@$target[$T_DLLS]},"mfc.dll";
-      # FIXME: Link with the MFC in the Unix sense, until we 
+      # FIXME: Link with the MFC in the Unix sense, until we
       # start exporting the functions properly.
       push @{@$target[$T_LIBRARY_PATH]},"\$(MFC_LIBRARY_PATH)";
       push @{@$target[$T_LIBRARIES]},"mfc";
@@ -877,7 +877,7 @@
   if (@$project_settings[$T_FLAGS] & $TF_MFC) {
     push @{@$project_settings[$T_INCLUDE_PATH]},"\$(MFC_INCLUDE_PATH)";
   }
-  # The sources that did not match, if any, go to the extra 
+  # The sources that did not match, if any, go to the extra
   # source list of the project settings
   foreach $source (@sources_c) {
     if ($source ne "") {
@@ -904,14 +904,14 @@
   }
   @$project_settings[$T_SOURCES_MISC]=[sort @{@$project_settings[$T_SOURCES_MISC]}];
 
-  # Finally if we are building both libraries and programs in 
-  # this directory, then the programs should be linked with all 
+  # Finally if we are building both libraries and programs in
+  # this directory, then the programs should be linked with all
   # the libraries
   if (@local_dlls > 0 and @exe_list > 0) {
     foreach $target (@exe_list) {
       push @{@$target[$T_DLL_PATH]},"-L.";
       push @{@$target[$T_DLLS]},map { "$_.dll" } @local_dlls;
-      # Also link in the Unix sense since none of the functions 
+      # Also link in the Unix sense since none of the functions
       # will be exported.
       push @{@$target[$T_LIBRARY_PATH]},"-L.";
       push @{@$target[$T_LIBRARIES]},@local_dlls;
@@ -960,7 +960,7 @@
 
 #sub analyze_vc_dsp
 #{
-#  
+#
 #}
 
 
@@ -1031,7 +1031,7 @@
       my $new_name=$dentry;
       $new_name =~ s/[ \$]/_/g;
 
-      # Only all lowercase extensions are supported (because of the 
+      # Only all lowercase extensions are supported (because of the
       # transformations ':.c=.o') .
       if (-f "$dirname/$new_name") {
 	if ($new_name =~ /\.C$/) {
@@ -1053,7 +1053,7 @@
       }
 
       # Adjust the case to the user's preferences
-      if (($opt_lower == $OPT_LOWER_ALL and $dentry =~ /[A-Z]/) or 
+      if (($opt_lower == $OPT_LOWER_ALL and $dentry =~ /[A-Z]/) or
           ($opt_lower == $OPT_LOWER_UPPERCASE and $dentry !~ /[a-z]/)
          ) {
 	$new_name=lc $new_name;
@@ -1087,14 +1087,14 @@
 #####
 
 ##
-# This maps a directory name to a reference to an array listing 
+# This maps a directory name to a reference to an array listing
 # its contents (files and directories)
 my %directories;
 
 ##
 # Retrieves the contents of the specified directory.
-# We either get it from the directories hashtable which acts as a 
-# cache, or use opendir, readdir, closedir and store the result 
+# We either get it from the directories hashtable which acts as a
+# cache, or use opendir, readdir, closedir and store the result
 # in the hashtable.
 sub get_directory_contents
 {
@@ -1113,7 +1113,7 @@
     #print "->@$directory\n";
     return $directory;
   }
-  
+
   # Read this directory
   if (opendir(DIRECTORY, "$dirname")) {
     my @files=readdir DIRECTORY;
@@ -1131,8 +1131,8 @@
 }
 
 ##
-# Try to find a file for the specified filename. The attempt is 
-# case-insensitive which is why it's not trivial. If a match is 
+# Try to find a file for the specified filename. The attempt is
+# case-insensitive which is why it's not trivial. If a match is
 # found then we return the pathname with the correct case.
 sub search_from
 {
@@ -1159,7 +1159,7 @@
       $dirname=dirname($dirname) . "/";
       $real_path.="../";
     } else {
-      # The file/directory may have been renamed before. Also try to 
+      # The file/directory may have been renamed before. Also try to
       # match the renamed file.
       my $renamed=$component;
       $renamed =~ s/[ \$]/_/g;
@@ -1192,7 +1192,7 @@
 }
 
 ##
-# Performs a case-insensitive search for the specified file in the 
+# Performs a case-insensitive search for the specified file in the
 # include path.
 # $line is the line number that should be referenced when an error occurs
 # $filename is the file we are looking for
@@ -1220,7 +1220,7 @@
     # - split the filename we look for into its components
     # - then for each directory in the include path
     #   - trace the directory components starting from that directory
-    #   - if we fail to find a match at any point then continue with 
+    #   - if we fail to find a match at any point then continue with
     #     the next directory in the include path
     #   - otherwise, rejoice, our quest is over.
     my @file_components=split /[\/\\]+/, $filename;
@@ -1288,13 +1288,13 @@
 }
 
 ##
-# 'Parses' a source file and fixes constructs that would not work with 
-# Winelib. The parsing is rather simple and not all non-portable features 
-# are corrected. The most important feature that is corrected is the case 
-# and path separator of '#include' directives. This requires that each 
-# source file be associated to a project & target so that the proper 
+# 'Parses' a source file and fixes constructs that would not work with
+# Winelib. The parsing is rather simple and not all non-portable features
+# are corrected. The most important feature that is corrected is the case
+# and path separator of '#include' directives. This requires that each
+# source file be associated to a project & target so that the proper
 # include path is used.
-# Also note that the include path is relative to the directory in which the 
+# Also note that the include path is relative to the directory in which the
 # compiler is run, i.e. that of the project, not to that of the file.
 sub fix_file
 {
@@ -1314,7 +1314,7 @@
   }
 
   print "  $filename\n";
-  #FIXME:assuming that because there is a .bak file, this is what we want is 
+  #FIXME:assuming that because there is a .bak file, this is what we want is
   #probably flawed. Or is it???
   if (! -e "$filename.bak") {
     if (!copy("$filename","$filename.bak")) {
@@ -1351,9 +1351,9 @@
       $_ .= "\n";
     }
     if ($is_rc and !$is_mfc and /^(\s*)(\#\s*include\s*)\"afxres\.h\"/) {
-      # VC6 automatically includes 'afxres.h', an MFC specific header, in 
-      # the RC files it generates (even in non-MFC projects). So we replace 
-      # it with 'winres.h' its very close standard cousin so that non MFC 
+      # VC6 automatically includes 'afxres.h', an MFC specific header, in
+      # the RC files it generates (even in non-MFC projects). So we replace
+      # it with 'winres.h' its very close standard cousin so that non MFC
       # projects can compile in Wine without the MFC sources.
       my $warning="mfc:afxres.h";
       if (!defined $warnings{$warning}) {
@@ -1375,8 +1375,8 @@
     } elsif (s/^(\s*)(\#\s*pragma\s+pack\s*\(\s*)//) {
       # Pragma pack handling
       #
-      # pack_stack is an array of references describing the stack of 
-      # pack directives currently in effect. Each directive if described 
+      # pack_stack is an array of references describing the stack of
+      # pack directives currently in effect. Each directive if described
       # by a reference to an array containing:
       # - "push" for pack(push,...) directives, "" otherwise
       # - the directive's identifier at index 1
@@ -1483,7 +1483,7 @@
       } elsif (/^(push\s*,\s*(\w+)\s*(,\s*(\d+)\s*)?\))/) {
         # pragma pack(push,label[,n])
         # Pushes a new label on the stack. It is possible to push the same
-        # label multiple times. If 'n' is omitted then the alignment is 
+        # label multiple times. If 'n' is omitted then the alignment is
         # unchanged. Otherwise it becomes 'n'.
         print FILEO "$pack_indent/* winemaker: $pack_header$1 */\n";
         my $size;
@@ -1560,7 +1560,7 @@
 }
 
 ##
-# Analyzes each source file in turn to find and correct issues 
+# Analyzes each source file in turn to find and correct issues
 # that would cause it not to compile.
 sub fix_source
 {
@@ -1657,7 +1657,7 @@
     }
   }
 
-  # Don't forget to export the 'Main' function for wrapped executables, 
+  # Don't forget to export the 'Main' function for wrapped executables,
   # except for MFC ones!
   if (@$target[$T_FLAGS] == $TF_WRAP) {
     if (@$target[$T_TYPE] == $TT_GUIEXE) {
@@ -1705,7 +1705,7 @@
 }
 
 ##
-# A convenience function to generate all the lists (defines, 
+# A convenience function to generate all the lists (defines,
 # C sources, C++ source, etc.) in the Makefile
 sub generate_list
 {
@@ -1778,9 +1778,9 @@
   generate_list("VPATH",1,[ "\@srcdir\@" ]);
   print FILEO "\n";
   if (@$project[$P_PATH] eq "") {
-    # This is the main project. It is also responsible for recursively 
+    # This is the main project. It is also responsible for recursively
     # calling the other projects
-    generate_list("SUBDIRS",1,\@projects,sub 
+    generate_list("SUBDIRS",1,\@projects,sub
 		  {
 		    if ($_[0] != \@main_project) {
 		      my $subdir=@{$_[0]}[$P_PATH];
@@ -1921,7 +1921,7 @@
   print FILEO "\n";
   print FILEO "install::\n";
   if (@$project[$P_PATH] eq "") {
-    # This is the main project. It is also responsible for recursively 
+    # This is the main project. It is also responsible for recursively
     # calling the other projects
     print FILEO "\t_list=\"\$(SUBDIRS)\"; for i in \$\$_list; do (cd \$\$i; \$(MAKE) install) || exit 1; done\n";
   }
@@ -1932,7 +1932,7 @@
   print FILEO "\n";
   print FILEO "uninstall::\n";
   if (@$project[$P_PATH] eq "") {
-    # This is the main project. It is also responsible for recursively 
+    # This is the main project. It is also responsible for recursively
     # calling the other projects
     print FILEO "\t_list=\"\$(SUBDIRS)\"; for i in \$\$_list; do (cd \$\$i; \$(MAKE) uninstall) || exit 1; done\n";
   }
@@ -2082,7 +2082,7 @@
 }
 
 ##
-# 
+#
 sub generate_read_templates
 {
   my $file;
@@ -2104,7 +2104,7 @@
 }
 
 ##
-# This is where we finally generate files. In fact this method does not 
+# This is where we finally generate files. In fact this method does not
 # do anything itself but calls the methods that do the actual work.
 sub generate
 {
@@ -2534,7 +2534,7 @@
 ])
 
 dnl AC_PATH_HEADER(variable,header,action-if-not-found,default-locations)
-dnl Note that the above may set variable to an empty value if the header is 
+dnl Note that the above may set variable to an empty value if the header is
 dnl already in the include path
 AC_DEFUN(AC_PATH_HEADER,[
 AC_MSG_CHECKING([for $2 header])
@@ -3012,7 +3012,7 @@
 conf_manext     = 5
 
 OBJS            = $(C_SRCS:.c=.o) $(CXX_SRCS:.cpp=.o) \
-                  $(SPEC_SRCS:.spec=.spec.o) 
+                  $(SPEC_SRCS:.spec=.spec.o)
 CLEAN_FILES     = *.spec.c y.tab.c y.tab.h lex.yy.c \
                   core *.orig *.rej \
                   \\\#*\\\# *~ *% .\\\#*
@@ -3097,26 +3097,26 @@
 #define      APP_TYPE      ##WINEMAKER_APP_TYPE##
 
 /**
- * This is the application library's base name, i.e. 'hello' if the 
+ * This is the application library's base name, i.e. 'hello' if the
  * library is called 'libhello.so'.
  */
 static char* appName     = ##WINEMAKER_APP_NAME##;
 
 /**
- * This is the name of the application's Windows module. If left NULL 
+ * This is the name of the application's Windows module. If left NULL
  * then appName is used.
  */
 static char* appModule   = NULL;
 
 /**
- * This is the application's entry point. This is usually "WinMain" for a 
+ * This is the application's entry point. This is usually "WinMain" for a
  * GUIEXE and 'main' for a CUIEXE application.
  */
 static char* appInit     = ##WINEMAKER_APP_INIT##;
 
 /**
- * This is either non-NULL for MFC-based applications and is the name of the 
- * MFC's module. This is the module in which we will take the 'WinMain' 
+ * This is either non-NULL for MFC-based applications and is the name of the
+ * MFC's module. This is the module in which we will take the 'WinMain'
  * function.
  */
 static char* mfcModule   = ##WINEMAKER_APP_MFC##;
@@ -3149,8 +3149,8 @@
 
     /* Load the application's library */
     libName=(char*)malloc(strlen(appName)+5+3+1);
-    /* FIXME: we should get the wrapper's path and use that as the base for 
-     * the library 
+    /* FIXME: we should get the wrapper's path and use that as the base for
+     * the library
      */
     sprintf(libName,"./lib%s.so",appName);
     appLibrary=dlopen(libName,RTLD_NOW);
@@ -3185,7 +3185,7 @@
             free(msg);
             return 1;
         }
-        /* MFC is a special case: the WinMain is in the MFC library, 
+        /* MFC is a special case: the WinMain is in the MFC library,
          * instead of the application's library.
          */
         hMain=hMFC;
diff --git a/tools/wmc/mcy.y b/tools/wmc/mcy.y
index d4c2680..8722118 100644
--- a/tools/wmc/mcy.y
+++ b/tools/wmc/mcy.y
@@ -675,4 +675,3 @@
 	t.lan = lan;
 	return (cp_xlat_t *)bsearch(&t, cpxlattab, ncpxlattab, sizeof(*cpxlattab), sc_xlat);
 }
-
diff --git a/tools/wrc/parser.l b/tools/wrc/parser.l
index c0d5c5d..d254402 100644
--- a/tools/wrc/parser.l
+++ b/tools/wrc/parser.l
@@ -24,7 +24,7 @@
  *			  preprocessor in here anymore.
  * 02-Jan-2000 BS	- Removed the preprocessor code
  * 23-Dec-1999 BS	- Removed the copyright for Martin von Loewis.
- *			  There is really nothing left of his code in 
+ *			  There is really nothing left of his code in
  *			  this parser.
  * 20-Jun-1998 BS	- Changed the filename conversion. Filenames are
  *			  case-sensitive inder *nix, but not under dos.
diff --git a/tools/wrc/parser.y b/tools/wrc/parser.y
index f271ab3..4ad3bd7 100644
--- a/tools/wrc/parser.y
+++ b/tools/wrc/parser.y
@@ -37,11 +37,11 @@
  *			  except for the # command (line numbers).
  *
  * 06-Nov-1999 JS	- see CHANGES
- * 
+ *
  * 29-Dec-1998 AdH	- Grammar and function extensions.
- *			     grammar: TOOLBAR resources, Named ICONs in 
+ *			     grammar: TOOLBAR resources, Named ICONs in
  *				DIALOGS
- *			     functions: semantic actions for the grammar 
+ *			     functions: semantic actions for the grammar
  *				changes, resource files can now be anywhere
  *				on the include path instead of just in the
  *				current directory
@@ -158,7 +158,7 @@
 	/* #define YYEMPTY -2 */
 	/* #define YYLEX   yylex() */
 
-#else	
+#else
 	/* No yacc we know yet */
 # if !defined(YYEMPTY) || !defined(YYLEX)
 #  error Yacc version/type unknown. This version needs to be verified for settings of YYEMPTY and YYLEX.
@@ -349,7 +349,7 @@
 %type <tlbar>	toolbar
 %type <tlbarItems>	toolbar_items
 %type <dginit>  dlginit
-%type <styles>  optional_style_pair 
+%type <styles>  optional_style_pair
 %type <num>	any_num
 %type <style>   optional_style
 %type <style>   style
@@ -728,7 +728,7 @@
 
 /* ------------------------------ DLGINIT ------------------------------ */
 dlginit	: tDLGINIT loadmemopts file_raw	{ $$ = new_dlginit($3, $2); }
-	;	  
+	;
 
 /* ------------------------------ UserType ------------------------------ */
 userres	: usertype loadmemopts file_raw		{
@@ -994,7 +994,7 @@
 	| '(' style ')'		{ $$ = $2; }
         | any_num       	{ $$ = new_style($1, 0); }
         | tNOT any_num		{ $$ = new_style(0, $2); }
-        ;   
+        ;
 
 ctlclass
 	: expr	{
@@ -1202,7 +1202,7 @@
 	;
 
 /*
- * FIXME: This odd expression is here to nullify an extra token found 
+ * FIXME: This odd expression is here to nullify an extra token found
  * in some appstudio produced resources which appear to do nothing.
  */
 opt_expr: /* Empty */	{ $$ = NULL; }
@@ -1645,7 +1645,7 @@
 		if($2)
 		{
 			$$->memopt = *($2);
-			free($2); 
+			free($2);
 		}
 		else
 		{
@@ -1665,15 +1665,15 @@
 
 toolbar_items
 	:  /* Empty */			{ $$ = NULL; }
-	| toolbar_items tBUTTON expr	{         
+	| toolbar_items tBUTTON expr	{
 		toolbar_item_t *idrec = new_toolbar_item();
 		idrec->id = $3;
-		$$ = ins_tlbr_button($1, idrec); 
+		$$ = ins_tlbr_button($1, idrec);
 		}
-	| toolbar_items tSEPARATOR	{         
+	| toolbar_items tSEPARATOR	{
 		toolbar_item_t *idrec = new_toolbar_item();
 		idrec->id = 0;
-		$$ = ins_tlbr_button($1, idrec); 
+		$$ = ins_tlbr_button($1, idrec);
 	}
 	;
 
@@ -2282,7 +2282,7 @@
 	raw_data_t *rd;
 	if(name->type != str_char)
 		yyerror("Filename must be ASCII string");
-		
+
 	fp = open_include(name->str.cstr, 1, NULL);
 	if(!fp)
 		yyerror("Cannot open file %s", name->str.cstr);
@@ -2654,7 +2654,7 @@
 	{
 		*nitems = 0;
 		return NULL;
-	} 
+	}
 
 	*nitems = 1;
 
@@ -2997,4 +2997,3 @@
 		yywarning("Usertype uses reserved type ID %d, which is used by %s", yylval.num, type);
 	return lookahead;
 }
-
diff --git a/tools/wrc/ppl.l b/tools/wrc/ppl.l
index 4af3a6d..b7d2d06 100644
--- a/tools/wrc/ppl.l
+++ b/tools/wrc/ppl.l
@@ -1013,7 +1013,7 @@
 				break;
 		}
 		if(cptr != &curdef_text[tag])
-		{	
+		{
 			memmove(&curdef_text[tag], cptr, n);
 			curdef_idx -= (curdef_idx - tag) - n;
 		}
@@ -1289,7 +1289,7 @@
 		if(yy_current_state() == pp_macexp)
 			macro_add_expansion();
 		else
-			internal_error(__FILE__, __LINE__, "Pop buffer and state without macro expansion state"); 
+			internal_error(__FILE__, __LINE__, "Pop buffer and state without macro expansion state");
 		yy_pop_state();
 	}
 
@@ -1427,7 +1427,7 @@
 		add_text_to_macro(s, len);
 	else {
            if(pass_data)
-           fwrite(s, 1, len, ppout);           
+           fwrite(s, 1, len, ppout);
         }
 }
 
@@ -1437,8 +1437,8 @@
  * Include management
  *-------------------------------------------------------------------------
  */
-int is_c_h_include(char *fname)  
-{        
+int is_c_h_include(char *fname)
+{
 	int sl=strlen(fname);
 	if (sl < 2) return 0;
 	if ((toupper(fname[sl-1])!='H') && (toupper(fname[sl-1])!='C')) return 0;
@@ -1488,7 +1488,7 @@
 		fprintf(stderr, "do_include: %s:%d: include_state=%d, include_ppp='%s', include_ifdepth=%d ,pass_data=%d\n", input_name, line_number, include_state, include_ppp, include_ifdepth,pass_data);
 	pp_switch_to_buffer(pp_create_buffer(ppin, YY_BUF_SIZE));
 
-	fprintf(ppout, "# 1 \"%s\" 1%s\n", newpath, type ? "" : " 3"); 
+	fprintf(ppout, "# 1 \"%s\" 1%s\n", newpath, type ? "" : " 3");
 }
 
 /*
@@ -1506,5 +1506,3 @@
 {
 	yy_pop_state();
 }
-
-
diff --git a/tools/wrc/ppy.y b/tools/wrc/ppy.y
index 938475a..099a12b 100644
--- a/tools/wrc/ppy.y
+++ b/tools/wrc/ppy.y
@@ -274,13 +274,13 @@
 		}
 	| tLINE tSINT tDQSTRING	tNL	{ fprintf(ppout, "# %d %s\n", $2 , $3); free($3); }
 	| tGCCLINE tSINT tDQSTRING tNL	{ fprintf(ppout, "# %d %s\n", $2 , $3); free($3); }
-	| tGCCLINE tSINT tDQSTRING tSINT tNL	
+	| tGCCLINE tSINT tDQSTRING tSINT tNL
 		{ fprintf(ppout, "# %d %s %d\n", $2, $3, $4); free($3); }
-	| tGCCLINE tSINT tDQSTRING tSINT tSINT tNL	
+	| tGCCLINE tSINT tDQSTRING tSINT tSINT tNL
 		{ fprintf(ppout, "# %d %s %d %d\n", $2 ,$3, $4, $5); free($3); }
-	| tGCCLINE tSINT tDQSTRING tSINT tSINT tSINT  tNL	
+	| tGCCLINE tSINT tDQSTRING tSINT tSINT tSINT  tNL
 		{ fprintf(ppout, "# %d %s %d %d %d\n", $2 ,$3 ,$4 ,$5, $6); free($3); }
-	| tGCCLINE tSINT tDQSTRING tSINT tSINT tSINT tSINT tNL	
+	| tGCCLINE tSINT tDQSTRING tSINT tSINT tSINT tSINT tNL
 		{ fprintf(ppout, "# %d %s %d %d %d %d\n", $2 ,$3 ,$4 ,$5, $6, $7); free($3); }
 	| tGCCLINE tNL		/* The null-token */
 	| tERROR opt_text tNL	{ pperror("#error directive: '%s'", $2); if($2) free($2); }
@@ -566,7 +566,7 @@
 static mtext_t *new_mtext(char *str, int idx, def_exp_t type)
 {
 	mtext_t *mt = (mtext_t *)xmalloc(sizeof(mtext_t));
-	if(str == NULL) 
+	if(str == NULL)
 		mt->subst.argidx = idx;
 	else
 		mt->subst.text = str;
@@ -655,4 +655,3 @@
 	free(s2);
 	return s1;
 }
-