Re-use the loader directory for the main wine loader, and get rid of
the miscemu directory.

diff --git a/DEVELOPERS-HINTS b/DEVELOPERS-HINTS
index 4c1d87e..22dbf3c 100644
--- a/DEVELOPERS-HINTS
+++ b/DEVELOPERS-HINTS
@@ -169,7 +169,7 @@
 	libs/uuid/		- Windows-compatible UUID numbers
 	libs/wine/		- Wine bootstrap library
 	libs/wpp/		- C preprocessor
-	miscemu/		- the main Wine program
+	loader/			- the main Wine loader
 	server/			- the Wine server
 	tools/			- relay code builder, resource compiler, etc.
 
@@ -181,7 +181,6 @@
 respective dlls.
 
 	files/			- KERNEL file I/O
-	loader/			- KERNEL loader code
 	memory/			- KERNEL memory management
 	misc/			- KERNEL shell, registry, winsock, etc.
 	msdos/			- KERNEL DOS support
diff --git a/Makefile.in b/Makefile.in
index 23820d8..7a5bd02 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -32,7 +32,7 @@
 	documentation \
 	include \
 	libs \
-	miscemu \
+	loader \
 	programs \
 	server \
 	tools
@@ -40,7 +40,7 @@
 # Sub-directories to install for install-lib
 INSTALLLIBSUBDIRS = \
 	documentation \
-	miscemu \
+	loader \
 	programs \
 	server
 
@@ -105,13 +105,13 @@
 
 all: $(SUBDIRS)
 dlls: libs tools
-miscemu server: libs tools
+loader server: libs tools
 programs: dlls libs tools
 tools: libs
 
 dlls/__install-lib__ dlls/__install-dev__: libs tools
 libs/__install-lib__ libs/__install-dev__: libs
-miscemu/__install__ server/__install__: libs tools
+loader/__install__ server/__install__: libs tools
 programs/__install__: libs tools dlls/__install-lib__
 tools/__install__: tools
 
diff --git a/configure b/configure
index 8b98795..2bfa37c 100755
--- a/configure
+++ b/configure
@@ -16891,8 +16891,6 @@
 
           ac_config_commands="$ac_config_commands include/wine"
 
-          ac_config_commands="$ac_config_commands loader"
-
           ac_config_commands="$ac_config_commands memory"
 
           ac_config_commands="$ac_config_commands misc"
@@ -16925,7 +16923,7 @@
 MAKE_PROG_RULES=programs/Makeprog.rules
 
 
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules dlls/Maketest.rules libs/Makelib.rules programs/Makeprog.rules Makefile dlls/Makefile dlls/advapi32/Makefile dlls/advapi32/tests/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/cabinet/Makefile dlls/capi2032/Makefile dlls/cfgmgr32/Makefile dlls/comcat/Makefile dlls/comctl32/Makefile dlls/comctl32/tests/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/ctl3d/Makefile dlls/d3d8/Makefile dlls/d3d9/Makefile dlls/d3dim/Makefile dlls/d3dx8/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dinput8/Makefile dlls/dmband/Makefile dlls/dmcompos/Makefile dlls/dmime/Makefile dlls/dmloader/Makefile dlls/dmscript/Makefile dlls/dmstyle/Makefile dlls/dmsynth/Makefile dlls/dmusic/Makefile dlls/dmusic32/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dpnhpast/Makefile dlls/dsound/Makefile dlls/dsound/tests/Makefile dlls/gdi/Makefile dlls/gdi/tests/Makefile dlls/glu32/Makefile dlls/icmp/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/iphlpapi/Makefile dlls/kernel/Makefile dlls/kernel/tests/Makefile dlls/lzexpand/Makefile dlls/mapi32/Makefile dlls/mpr/Makefile dlls/msacm/Makefile dlls/msacm/imaadp32/Makefile dlls/msacm/msadp32/Makefile dlls/msacm/msg711/Makefile dlls/msacm/winemp3/Makefile dlls/msdmo/Makefile dlls/mshtml/Makefile dlls/msi/Makefile dlls/msimg32/Makefile dlls/msisys/Makefile dlls/msnet32/Makefile dlls/msvcrt/Makefile dlls/msvcrt/tests/Makefile dlls/msvcrt20/Makefile dlls/msvcrtd/Makefile dlls/msvideo/Makefile dlls/msvideo/msrle32/Makefile dlls/mswsock/Makefile dlls/netapi32/Makefile dlls/netapi32/tests/Makefile dlls/ntdll/Makefile dlls/ntdll/tests/Makefile dlls/odbc32/Makefile dlls/ole32/Makefile dlls/oleacc/Makefile dlls/oleaut32/Makefile dlls/oleaut32/tests/Makefile dlls/olecli/Makefile dlls/oledlg/Makefile dlls/olepro32/Makefile dlls/olesvr/Makefile dlls/opengl32/Makefile dlls/psapi/Makefile dlls/qcap/Makefile dlls/quartz/Makefile dlls/rasapi32/Makefile dlls/richedit/Makefile dlls/rpcrt4/Makefile dlls/rpcrt4/tests/Makefile dlls/serialui/Makefile dlls/setupapi/Makefile dlls/shdocvw/Makefile dlls/shell32/Makefile dlls/shell32/tests/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/shlwapi/tests/Makefile dlls/snmpapi/Makefile dlls/sti/Makefile dlls/tapi32/Makefile dlls/ttydrv/Makefile dlls/twain/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/urlmon/tests/Makefile dlls/user/Makefile dlls/user/tests/Makefile dlls/uxtheme/Makefile dlls/version/Makefile dlls/win32s/Makefile dlls/winaspi/Makefile dlls/winedos/Makefile dlls/wineps/Makefile dlls/wininet/Makefile dlls/wininet/tests/Makefile dlls/winmm/Makefile dlls/winmm/joystick/Makefile dlls/winmm/mcianim/Makefile dlls/winmm/mciavi/Makefile dlls/winmm/mcicda/Makefile dlls/winmm/mciseq/Makefile dlls/winmm/mciwave/Makefile dlls/winmm/midimap/Makefile dlls/winmm/tests/Makefile dlls/winmm/wavemap/Makefile dlls/winmm/winealsa/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineaudioio/Makefile dlls/winmm/winenas/Makefile dlls/winmm/winejack/Makefile dlls/winmm/wineoss/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winsock/tests/Makefile dlls/winspool/Makefile dlls/winspool/tests/Makefile dlls/wintab32/Makefile dlls/wintrust/Makefile dlls/wow32/Makefile dlls/wsock32/Makefile dlls/x11drv/Makefile documentation/Makefile include/Makefile libs/Makefile libs/port/Makefile libs/unicode/Makefile libs/uuid/Makefile libs/wine/Makefile libs/wpp/Makefile miscemu/Makefile programs/Makefile programs/avitools/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/expand/Makefile programs/notepad/Makefile programs/osversioncheck/Makefile programs/progman/Makefile programs/regapi/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/regtest/Makefile programs/rpcss/Makefile programs/rundll32/Makefile programs/start/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineboot/Makefile programs/winecfg/Makefile programs/wineconsole/Makefile programs/winedbg/Makefile programs/winefile/Makefile programs/winemenubuilder/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winevdm/Makefile programs/winhelp/Makefile programs/winver/Makefile server/Makefile tools/Makefile tools/widl/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/winegcc/Makefile tools/wmc/Makefile tools/wrc/Makefile"
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules dlls/Maketest.rules libs/Makelib.rules programs/Makeprog.rules Makefile dlls/Makefile dlls/advapi32/Makefile dlls/advapi32/tests/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/cabinet/Makefile dlls/capi2032/Makefile dlls/cfgmgr32/Makefile dlls/comcat/Makefile dlls/comctl32/Makefile dlls/comctl32/tests/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/ctl3d/Makefile dlls/d3d8/Makefile dlls/d3d9/Makefile dlls/d3dim/Makefile dlls/d3dx8/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dinput8/Makefile dlls/dmband/Makefile dlls/dmcompos/Makefile dlls/dmime/Makefile dlls/dmloader/Makefile dlls/dmscript/Makefile dlls/dmstyle/Makefile dlls/dmsynth/Makefile dlls/dmusic/Makefile dlls/dmusic32/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dpnhpast/Makefile dlls/dsound/Makefile dlls/dsound/tests/Makefile dlls/gdi/Makefile dlls/gdi/tests/Makefile dlls/glu32/Makefile dlls/icmp/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/iphlpapi/Makefile dlls/kernel/Makefile dlls/kernel/tests/Makefile dlls/lzexpand/Makefile dlls/mapi32/Makefile dlls/mpr/Makefile dlls/msacm/Makefile dlls/msacm/imaadp32/Makefile dlls/msacm/msadp32/Makefile dlls/msacm/msg711/Makefile dlls/msacm/winemp3/Makefile dlls/msdmo/Makefile dlls/mshtml/Makefile dlls/msi/Makefile dlls/msimg32/Makefile dlls/msisys/Makefile dlls/msnet32/Makefile dlls/msvcrt/Makefile dlls/msvcrt/tests/Makefile dlls/msvcrt20/Makefile dlls/msvcrtd/Makefile dlls/msvideo/Makefile dlls/msvideo/msrle32/Makefile dlls/mswsock/Makefile dlls/netapi32/Makefile dlls/netapi32/tests/Makefile dlls/ntdll/Makefile dlls/ntdll/tests/Makefile dlls/odbc32/Makefile dlls/ole32/Makefile dlls/oleacc/Makefile dlls/oleaut32/Makefile dlls/oleaut32/tests/Makefile dlls/olecli/Makefile dlls/oledlg/Makefile dlls/olepro32/Makefile dlls/olesvr/Makefile dlls/opengl32/Makefile dlls/psapi/Makefile dlls/qcap/Makefile dlls/quartz/Makefile dlls/rasapi32/Makefile dlls/richedit/Makefile dlls/rpcrt4/Makefile dlls/rpcrt4/tests/Makefile dlls/serialui/Makefile dlls/setupapi/Makefile dlls/shdocvw/Makefile dlls/shell32/Makefile dlls/shell32/tests/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/shlwapi/tests/Makefile dlls/snmpapi/Makefile dlls/sti/Makefile dlls/tapi32/Makefile dlls/ttydrv/Makefile dlls/twain/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/urlmon/tests/Makefile dlls/user/Makefile dlls/user/tests/Makefile dlls/uxtheme/Makefile dlls/version/Makefile dlls/win32s/Makefile dlls/winaspi/Makefile dlls/winedos/Makefile dlls/wineps/Makefile dlls/wininet/Makefile dlls/wininet/tests/Makefile dlls/winmm/Makefile dlls/winmm/joystick/Makefile dlls/winmm/mcianim/Makefile dlls/winmm/mciavi/Makefile dlls/winmm/mcicda/Makefile dlls/winmm/mciseq/Makefile dlls/winmm/mciwave/Makefile dlls/winmm/midimap/Makefile dlls/winmm/tests/Makefile dlls/winmm/wavemap/Makefile dlls/winmm/winealsa/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineaudioio/Makefile dlls/winmm/winenas/Makefile dlls/winmm/winejack/Makefile dlls/winmm/wineoss/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winsock/tests/Makefile dlls/winspool/Makefile dlls/winspool/tests/Makefile dlls/wintab32/Makefile dlls/wintrust/Makefile dlls/wow32/Makefile dlls/wsock32/Makefile dlls/x11drv/Makefile documentation/Makefile include/Makefile libs/Makefile libs/port/Makefile libs/unicode/Makefile libs/uuid/Makefile libs/wine/Makefile libs/wpp/Makefile loader/Makefile programs/Makefile programs/avitools/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/expand/Makefile programs/notepad/Makefile programs/osversioncheck/Makefile programs/progman/Makefile programs/regapi/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/regtest/Makefile programs/rpcss/Makefile programs/rundll32/Makefile programs/start/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineboot/Makefile programs/winecfg/Makefile programs/wineconsole/Makefile programs/winedbg/Makefile programs/winefile/Makefile programs/winemenubuilder/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winevdm/Makefile programs/winhelp/Makefile programs/winver/Makefile server/Makefile tools/Makefile tools/widl/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/winegcc/Makefile tools/wmc/Makefile tools/wrc/Makefile"
 
 
 cat >confcache <<\_ACEOF
@@ -17610,7 +17608,7 @@
   "libs/uuid/Makefile" ) CONFIG_FILES="$CONFIG_FILES libs/uuid/Makefile" ;;
   "libs/wine/Makefile" ) CONFIG_FILES="$CONFIG_FILES libs/wine/Makefile" ;;
   "libs/wpp/Makefile" ) CONFIG_FILES="$CONFIG_FILES libs/wpp/Makefile" ;;
-  "miscemu/Makefile" ) CONFIG_FILES="$CONFIG_FILES miscemu/Makefile" ;;
+  "loader/Makefile" ) CONFIG_FILES="$CONFIG_FILES loader/Makefile" ;;
   "programs/Makefile" ) CONFIG_FILES="$CONFIG_FILES programs/Makefile" ;;
   "programs/avitools/Makefile" ) CONFIG_FILES="$CONFIG_FILES programs/avitools/Makefile" ;;
   "programs/clock/Makefile" ) CONFIG_FILES="$CONFIG_FILES programs/clock/Makefile" ;;
@@ -17670,7 +17668,6 @@
   "graphics" ) CONFIG_COMMANDS="$CONFIG_COMMANDS graphics" ;;
   "graphics/x11drv" ) CONFIG_COMMANDS="$CONFIG_COMMANDS graphics/x11drv" ;;
   "include/wine" ) CONFIG_COMMANDS="$CONFIG_COMMANDS include/wine" ;;
-  "loader" ) CONFIG_COMMANDS="$CONFIG_COMMANDS loader" ;;
   "memory" ) CONFIG_COMMANDS="$CONFIG_COMMANDS memory" ;;
   "misc" ) CONFIG_COMMANDS="$CONFIG_COMMANDS misc" ;;
   "msdos" ) CONFIG_COMMANDS="$CONFIG_COMMANDS msdos" ;;
@@ -18398,8 +18395,6 @@
 echo "$as_me: creating graphics/x11drv" >&6;} && mkdir "graphics/x11drv") ;;
     include/wine ) test -d "include/wine" || ({ echo "$as_me:$LINENO: creating include/wine" >&5
 echo "$as_me: creating include/wine" >&6;} && mkdir "include/wine") ;;
-    loader ) test -d "loader" || ({ echo "$as_me:$LINENO: creating loader" >&5
-echo "$as_me: creating loader" >&6;} && mkdir "loader") ;;
     memory ) test -d "memory" || ({ echo "$as_me:$LINENO: creating memory" >&5
 echo "$as_me: creating memory" >&6;} && mkdir "memory") ;;
     misc ) test -d "misc" || ({ echo "$as_me:$LINENO: creating misc" >&5
diff --git a/configure.ac b/configure.ac
index 8dab8ff..552c8eb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1387,7 +1387,6 @@
 WINE_CONFIG_EXTRA_DIR(graphics)
 WINE_CONFIG_EXTRA_DIR(graphics/x11drv)
 WINE_CONFIG_EXTRA_DIR(include/wine)
-WINE_CONFIG_EXTRA_DIR(loader)
 WINE_CONFIG_EXTRA_DIR(memory)
 WINE_CONFIG_EXTRA_DIR(misc)
 WINE_CONFIG_EXTRA_DIR(msdos)
@@ -1568,7 +1567,7 @@
 libs/uuid/Makefile
 libs/wine/Makefile
 libs/wpp/Makefile
-miscemu/Makefile
+loader/Makefile
 programs/Makefile
 programs/avitools/Makefile
 programs/clock/Makefile
diff --git a/miscemu/.cvsignore b/loader/.cvsignore
similarity index 100%
rename from miscemu/.cvsignore
rename to loader/.cvsignore
diff --git a/miscemu/Makefile.in b/loader/Makefile.in
similarity index 100%
rename from miscemu/Makefile.in
rename to loader/Makefile.in
diff --git a/miscemu/main.c b/loader/main.c
similarity index 100%
rename from miscemu/main.c
rename to loader/main.c
diff --git a/tools/winapi/msvcmaker b/tools/winapi/msvcmaker
index 9db7b3b..afc9fc0 100755
--- a/tools/winapi/msvcmaker
+++ b/tools/winapi/msvcmaker
@@ -88,7 +88,7 @@
 }
 
 my @gdi32_dirs = qw(dlls/gdi/enhmfdrv dlls/gdi/mfdrv graphics objects);
-my @ntdll_dirs = qw(files loader/ne loader memory misc msdos scheduler win32);
+my @ntdll_dirs = qw(files memory misc msdos);
 my @user32_dirs = qw(controls dlls/user/dde windows);
 
 push @makefile_in_files, "tools/winebuild/Makefile.in";
diff --git a/tools/winapi_check/modules.dat b/tools/winapi_check/modules.dat
index 0e2d19b..96708cb 100644
--- a/tools/winapi_check/modules.dat
+++ b/tools/winapi_check/modules.dat
@@ -199,25 +199,17 @@
 
 dlls/kernel
 files
-loader/ne
-loader
 memory
 misc
 msdos
-scheduler
-win32
 
 % dlls/kernel/kernel32.spec
 
 dlls/kernel
 files
-loader/ne
-loader
 memory
 msdos
 misc
-scheduler
-win32
 
 % dlls/mapi32/mapi32.spec
 
@@ -263,8 +255,6 @@
 % dlls/kernel/toolhelp.spec
 
 dlls/kernel
-loader/ne
-loader
 memory
 
 % dlls/kernel/win87em.spec
@@ -342,8 +332,6 @@
 % dlls/ntdll/ntdll.spec
 
 dlls/ntdll
-misc
-scheduler
 
 % dlls/odbc32/odbc32.spec
 
@@ -534,7 +522,6 @@
 controls
 dlls/user
 dlls/user/dde
-loader
 objects
 windows
 
diff --git a/tools/winewrapper b/tools/winewrapper
index e709727..3e0c301 100755
--- a/tools/winewrapper
+++ b/tools/winewrapper
@@ -70,7 +70,7 @@
 fi
 WINEDLLPATH="$topdir/dlls:$topdir/programs"
 WINESERVER="$topdir/server/wineserver"
-WINELOADER="$topdir/miscemu/wine"
+WINELOADER="$topdir/loader/wine"
 export LD_LIBRARY_PATH WINEDLLPATH WINESERVER WINELOADER
 
 # any local settings ?