Moved expand.c from libtest to programs/expand.
Removed the rest of the libtest directory.

diff --git a/Makefile.in b/Makefile.in
index 119f654..f5a89ad 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -50,19 +50,14 @@
 	libwine_unicode.$(LIBEXT) \
 	libwine_uuid.a
 
-# Sub-directories to run make depend/clean into
+# Sub-directories to run make depend/clean/install into
 SUBDIRS = \
-	$(INSTALLSUBDIRS) \
-	libtest \
-	miscemu
-
-# Sub-directories to run make install into
-INSTALLSUBDIRS = \
 	debugger \
 	dlls \
 	documentation \
 	include \
 	library \
+	miscemu \
 	ole \
 	programs \
 	server \
@@ -96,10 +91,10 @@
 	$(MKINSTALLDIRS) $(bindir)
 	$(INSTALL_PROGRAM) wine $(bindir)/wine
 
-install:: all install_wine $(INSTALLSUBDIRS:%=%/__install__)
+install:: all install_wine $(SUBDIRS:%=%/__install__)
 	-$(LDCONFIG)
 
-uninstall:: $(INSTALLSUBDIRS:%=%/__uninstall__)
+uninstall:: $(SUBDIRS:%=%/__uninstall__)
 	$(RM) $(bindir)/wine
 
 $(EMUOBJS) $(PROGRAMS) $(LIBRARIES): dummy
diff --git a/configure b/configure
index c2db778..df90427 100755
--- a/configure
+++ b/configure
@@ -13194,7 +13194,7 @@
 MAKE_PROG_RULES=programs/Makeprog.rules
 
 
-ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules programs/Makeprog.rules Makefile debugger/Makefile dlls/Makefile dlls/advapi32/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/comcat/Makefile dlls/comctl32/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dsound/Makefile dlls/gdi/Makefile dlls/glu32/Makefile dlls/icmp/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/kernel/Makefile dlls/lzexpand/Makefile dlls/mapi32/Makefile dlls/mpr/Makefile dlls/msacm/Makefile dlls/msacm/imaadp32/Makefile dlls/msacm/msg711/Makefile dlls/msdmo/Makefile dlls/msimg32/Makefile dlls/msisys/Makefile dlls/msnet32/Makefile dlls/msrle32/Makefile dlls/msvcrt/Makefile dlls/msvcrt20/Makefile dlls/msvideo/Makefile dlls/netapi32/Makefile dlls/ntdll/Makefile dlls/odbc32/Makefile dlls/ole32/Makefile dlls/oleaut32/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/serialui/Makefile dlls/setupapi/Makefile dlls/shdocvw/Makefile dlls/shell32/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/snmpapi/Makefile dlls/sti/Makefile dlls/tapi32/Makefile dlls/ttydrv/Makefile dlls/twain/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/user/Makefile dlls/version/Makefile dlls/win32s/Makefile dlls/winaspi/Makefile dlls/winedos/Makefile dlls/wineps/Makefile dlls/wininet/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/wavemap/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineoss/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winspool/Makefile dlls/wintrust/Makefile dlls/wow32/Makefile dlls/wsock32/Makefile dlls/x11drv/Makefile documentation/Makefile include/Makefile library/Makefile libtest/Makefile miscemu/Makefile ole/Makefile programs/Makefile programs/avitools/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/notepad/Makefile programs/osversioncheck/Makefile programs/progman/Makefile programs/regapi/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/regtest/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineconsole/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winetest/Makefile programs/winhelp/Makefile programs/winver/Makefile server/Makefile tools/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/wmc/Makefile tools/wrc/Makefile tsx11/Makefile unicode/Makefile"
+ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules programs/Makeprog.rules Makefile debugger/Makefile dlls/Makefile dlls/advapi32/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/comcat/Makefile dlls/comctl32/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dsound/Makefile dlls/gdi/Makefile dlls/glu32/Makefile dlls/icmp/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/kernel/Makefile dlls/lzexpand/Makefile dlls/mapi32/Makefile dlls/mpr/Makefile dlls/msacm/Makefile dlls/msacm/imaadp32/Makefile dlls/msacm/msg711/Makefile dlls/msdmo/Makefile dlls/msimg32/Makefile dlls/msisys/Makefile dlls/msnet32/Makefile dlls/msrle32/Makefile dlls/msvcrt/Makefile dlls/msvcrt20/Makefile dlls/msvideo/Makefile dlls/netapi32/Makefile dlls/ntdll/Makefile dlls/odbc32/Makefile dlls/ole32/Makefile dlls/oleaut32/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/serialui/Makefile dlls/setupapi/Makefile dlls/shdocvw/Makefile dlls/shell32/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/snmpapi/Makefile dlls/sti/Makefile dlls/tapi32/Makefile dlls/ttydrv/Makefile dlls/twain/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/user/Makefile dlls/version/Makefile dlls/win32s/Makefile dlls/winaspi/Makefile dlls/winedos/Makefile dlls/wineps/Makefile dlls/wininet/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/wavemap/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineoss/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winspool/Makefile dlls/wintrust/Makefile dlls/wow32/Makefile dlls/wsock32/Makefile dlls/x11drv/Makefile documentation/Makefile include/Makefile library/Makefile miscemu/Makefile ole/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/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineconsole/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winetest/Makefile programs/winhelp/Makefile programs/winver/Makefile server/Makefile tools/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/wmc/Makefile tools/wrc/Makefile tsx11/Makefile unicode/Makefile"
 
 
 cat >confcache <<\_ACEOF
@@ -13769,7 +13769,6 @@
   "documentation/Makefile" ) CONFIG_FILES="$CONFIG_FILES documentation/Makefile" ;;
   "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
   "library/Makefile" ) CONFIG_FILES="$CONFIG_FILES library/Makefile" ;;
-  "libtest/Makefile" ) CONFIG_FILES="$CONFIG_FILES libtest/Makefile" ;;
   "miscemu/Makefile" ) CONFIG_FILES="$CONFIG_FILES miscemu/Makefile" ;;
   "ole/Makefile" ) CONFIG_FILES="$CONFIG_FILES ole/Makefile" ;;
   "programs/Makefile" ) CONFIG_FILES="$CONFIG_FILES programs/Makefile" ;;
@@ -13777,6 +13776,7 @@
   "programs/clock/Makefile" ) CONFIG_FILES="$CONFIG_FILES programs/clock/Makefile" ;;
   "programs/cmdlgtst/Makefile" ) CONFIG_FILES="$CONFIG_FILES programs/cmdlgtst/Makefile" ;;
   "programs/control/Makefile" ) CONFIG_FILES="$CONFIG_FILES programs/control/Makefile" ;;
+  "programs/expand/Makefile" ) CONFIG_FILES="$CONFIG_FILES programs/expand/Makefile" ;;
   "programs/notepad/Makefile" ) CONFIG_FILES="$CONFIG_FILES programs/notepad/Makefile" ;;
   "programs/osversioncheck/Makefile" ) CONFIG_FILES="$CONFIG_FILES programs/osversioncheck/Makefile" ;;
   "programs/progman/Makefile" ) CONFIG_FILES="$CONFIG_FILES programs/progman/Makefile" ;;
diff --git a/configure.ac b/configure.ac
index 68245e6..8aa3387 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1332,7 +1332,6 @@
 documentation/Makefile
 include/Makefile
 library/Makefile
-libtest/Makefile
 miscemu/Makefile
 ole/Makefile
 programs/Makefile
@@ -1340,6 +1339,7 @@
 programs/clock/Makefile
 programs/cmdlgtst/Makefile
 programs/control/Makefile
+programs/expand/Makefile
 programs/notepad/Makefile
 programs/osversioncheck/Makefile
 programs/progman/Makefile
diff --git a/libtest/.cvsignore b/libtest/.cvsignore
deleted file mode 100644
index e4e523f..0000000
--- a/libtest/.cvsignore
+++ /dev/null
@@ -1,22 +0,0 @@
-Makefile
-expand
-expand.spec.c
-hello
-hello.spec.c
-hello2
-hello2.spec.c
-hello3
-hello3.spec.c
-hello3res.res
-hello4
-hello4.spec.c
-hello5
-hello5.spec.c
-new
-new.spec.c
-rolex
-rolex.spec.c
-vartest
-vartest.spec.c
-volinfo
-volinfo.spec.c
diff --git a/libtest/Makefile.in b/libtest/Makefile.in
deleted file mode 100644
index 1b5a2f0..0000000
--- a/libtest/Makefile.in
+++ /dev/null
@@ -1,93 +0,0 @@
-DEFS       = @DLLFLAGS@ -DSTRICT -DNONAMELESSUNION -DNONAMELESSSTRUCT $(EXTRADEFS)
-LDDLLFLAGS = @LDDLLFLAGS@
-TOPSRCDIR  = @top_srcdir@
-TOPOBJDIR  = ..
-SRCDIR     = @srcdir@
-VPATH      = @srcdir@
-MODULE     = none
-PROGRAMS   = expand hello hello2 hello3 hello4 hello5 new rolex volinfo
-ALL_LIBS   = $(LIBWINE) $(LIBS)
-
-C_SRCS = \
-	expand.c \
-	hello.c \
-	hello2.c \
-	hello3.c \
-	hello4.c \
-	hello5.c \
-	new.c \
-	rolex.c \
-	volinfo.c
-
-SPEC_SRCS = \
-	expand.spec \
-	hello.spec \
-	hello2.spec \
-	hello3.spec \
-	hello4.spec \
-	hello5.spec \
-	new.spec \
-	rolex.spec \
-	volinfo.spec
-
-RC_SRCS = \
-	hello3res.rc
-
-all: $(PROGRAMS) $(PROGRAMS:%=%.so)
-
-@MAKE_RULES@
-
-expand.spec.c: expand.o $(WINEBUILD)
-	$(LDPATH) $(WINEBUILD) $(DEFS) -sym expand.o -o expand.spec.c -exe expand -mgui -L$(DLLDIR) -llz32 -lkernel32
-expand.so: expand.o expand.spec.o
-	$(LDSHARED) $(LDDLLFLAGS) -o expand.so $+ $(ALL_LIBS)
-
-hello.spec.c: hello.o $(WINEBUILD)
-	$(LDPATH) $(WINEBUILD) $(DEFS) -sym hello.o -o hello.spec.c -exe hello -mgui -L$(DLLDIR) -luser32 -lgdi32 -lkernel32
-hello.so: hello.o hello.spec.o
-	$(LDSHARED) $(LDDLLFLAGS) -o hello.so $+ $(ALL_LIBS)
-
-hello2.spec.c: hello2.o $(WINEBUILD)
-	$(LDPATH) $(WINEBUILD) $(DEFS) -sym hello2.o -o hello2.spec.c -exe hello2 -mgui -L$(DLLDIR) -luser32 -lkernel32
-hello2.so: hello2.o hello2.spec.o
-	$(LDSHARED) $(LDDLLFLAGS) -o hello2.so $+ $(ALL_LIBS)
-
-hello3.spec.c: hello3.o hello3res.res $(WINEBUILD)
-	$(LDPATH) $(WINEBUILD) $(DEFS) -sym hello3.o -res hello3res.res -o hello3.spec.c -exe hello3 -mgui -L$(DLLDIR) -lcomdlg32 -luser32 -lgdi32 -lkernel32
-hello3.so: hello3.o hello3.spec.o
-	$(LDSHARED) $(LDDLLFLAGS) -o hello3.so $+ $(ALL_LIBS)
-
-hello4.spec.c: hello4.o $(WINEBUILD)
-	$(LDPATH) $(WINEBUILD) $(DEFS) -sym hello4.o -o hello4.spec.c -exe hello4 -mgui -L$(DLLDIR) -luser32 -lgdi32 -lkernel32
-hello4.so: hello4.o hello4.spec.o
-	$(LDSHARED) $(LDDLLFLAGS) -o hello4.so $+ $(ALL_LIBS)
-
-hello5.spec.c: hello5.o $(WINEBUILD)
-	$(LDPATH) $(WINEBUILD) $(DEFS) -sym hello5.o -o hello5.spec.c -exe hello5 -mgui -L$(DLLDIR) -lkernel32
-hello5.so: hello5.o hello5.spec.o
-	$(LDSHARED) $(LDDLLFLAGS) -o hello5.so $+ $(ALL_LIBS)
-
-new.spec.c: new.o $(WINEBUILD)
-	$(LDPATH) $(WINEBUILD) $(DEFS) -sym new.o -o new.spec.c -exe new -mgui -L$(DLLDIR) -luser32 -lgdi32 -lkernel32
-new.so: new.o new.spec.o
-	$(LDSHARED) $(LDDLLFLAGS) -o new.so $+ $(ALL_LIBS)
-
-rolex.spec.c: rolex.o $(WINEBUILD)
-	$(LDPATH) $(WINEBUILD) $(DEFS) -sym rolex.o -o rolex.spec.c -exe rolex -mgui -L$(DLLDIR) -luser32 -lgdi32 -lkernel32
-rolex.so: rolex.o rolex.spec.o
-	$(LDSHARED) $(LDDLLFLAGS) -o rolex.so $+ $(ALL_LIBS)
-
-volinfo.spec.c: volinfo.o $(WINEBUILD)
-	$(LDPATH) $(WINEBUILD) $(DEFS) -sym volinfo.o -o volinfo.spec.c -exe volinfo -mgui -L$(DLLDIR) -lkernel32
-volinfo.so: volinfo.o volinfo.spec.o
-	$(LDSHARED) $(LDDLLFLAGS) -o volinfo.so $+ $(ALL_LIBS)
-
-$(PROGRAMS):
-	$(RM) $@ && $(LN_S) $(TOPOBJDIR)/wine $@
-
-$(PROGRAMS:%=%.so/_checklink_): $(PROGRAMS:%=%.so)
-	$(CC) -o checklink $(TOPSRCDIR)/library/checklink.c `dirname $@` && $(RM) checklink
-
-checklink:: $(PROGRAMS:%=%.so/_checklink_)
-
-### Dependencies:
diff --git a/libtest/guitest.c b/libtest/guitest.c
deleted file mode 100644
index fe76211..0000000
--- a/libtest/guitest.c
+++ /dev/null
@@ -1,767 +0,0 @@
-/* Windows GUI Behaviour Tester
- *
- * Copyright 1999 Ove Kåven
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <windows.h>
-
-#include "guitest.rh"
-
-/* checks to include */
-#define LOGGING /* can be undefined under Wine and use -debugmsg +message instead */
-#define MAIN_STYLE WS_OVERLAPPEDWINDOW|WS_HSCROLL
-#define MAIN_EXSTYLE 0
-#undef TEST_DESTROY_MAIN
-#define SHOW_SUB
-#undef TEST_DIALOG
-#define RESIZE_DIALOG
-#undef TEST_SUBDIALOG
-#undef TEST_COMMCTL
-
-/************************/
-/*** GLOBAL VARIABLES ***/
-/************************/
-
-HINSTANCE hInst;
-DWORD StartTime;
-HWND hListBox,hMainWnd,hSubWnd;
-HWND hButton[4]={0,0,0,0};
-HWND hDialog=0,hGroup=0,hSubDlg=0;
-WNDPROC wndButton[4],wndDialog,wndGroup,wndSubDlg;
-BOOL Clicked=0,Ready=0;
-int State=0,Rec=0;
-#define STATE_CREATE 0
-#define STATE_DESTROY 1
-#define STATE_SHOW 2
-#define STATE_UPDATE 3
-#define STATE_DIALOG 4
-#define STATE_TEST 5
-#define STATE_DIRECT 6
-#define STATE_DISPATCH 7
-#define STATE_RECURS 8
-char*StateName[]={
- "Creat",
- "Destr",
- "Show ",
- "Updat",
- "Dialg",
- "Test ",
- "Call ",
- "Disp ",
- "RCall"
-};
-
-static char wclassname[] = "GUITestClass";
-static char wcclassname[] = "GUITestChildClass";
-static char winname[] = "GUITest";
-
-/**************************/
-/*** LOGGING FACILITIES ***/
-/**************************/
-
-struct MSGNAMES {
- int msg;
- char*name;
-} MsgNames[]={
-#define MSG(x) {x,#x},
-#define MSG2(x,y) {y,#x},
-#define ENDMSG {0}
-
-/* we get these in CreateWindow */
-MSG(WM_GETMINMAXINFO)
-MSG(WM_NCCREATE)
-MSG(WM_NCCALCSIZE)
-MSG(WM_CREATE)
-MSG(WM_PARENTNOTIFY)
-
-/* we get these in ShowWindow */
-MSG(WM_SHOWWINDOW)
-MSG(WM_WINDOWPOSCHANGING)
-MSG(WM_QUERYNEWPALETTE)
-MSG(WM_ACTIVATEAPP)
-MSG(WM_NCACTIVATE)
-MSG(WM_GETTEXT)
-MSG(WM_ACTIVATE)
-MSG(WM_SETFOCUS)
-MSG(WM_NCPAINT)
-MSG(WM_ERASEBKGND)
-MSG(WM_WINDOWPOSCHANGED)
-MSG(WM_SIZE)
-MSG(WM_MOVE)
-
-/* we get these in DestroyWindow */
-MSG(WM_KILLFOCUS)
-MSG(WM_DESTROY)
-MSG(WM_NCDESTROY)
-
-/* we get these directly sent */
-MSG(WM_NCHITTEST)
-MSG(WM_SETCURSOR)
-MSG(WM_MOUSEACTIVATE)
-MSG(WM_CHILDACTIVATE)
-MSG(WM_COMMAND)
-MSG(WM_SYSCOMMAND)
-
-/* posted events */
-MSG(WM_MOUSEMOVE)
-MSG(WM_NCMOUSEMOVE)
-MSG(WM_PAINT)
-MSG(WM_LBUTTONDOWN)
-MSG(WM_LBUTTONUP)
-MSG(WM_LBUTTONDBLCLK)
-MSG(WM_NCLBUTTONDOWN)
-MSG(WM_NCLBUTTONUP)
-MSG(WM_NCLBUTTONDBLCLK)
-
-MSG(WM_KEYDOWN)
-MSG(WM_KEYUP)
-MSG(WM_CHAR)
-
-#ifdef WIN32
-MSG(WM_CTLCOLORBTN)
-MSG(WM_CTLCOLORDLG)
-MSG(WM_CTLCOLORSTATIC)
-#else
-MSG(WM_CTLCOLOR)
-#endif
-
-/* moving and sizing */
-MSG2(WM_ENTERSIZEMOVE,0x0231)
-MSG2(WM_EXITSIZEMOVE,0x0232)
-#ifdef WIN32
-MSG(WM_SIZING)
-#endif
-
-/* menus/dialog boxes */
-MSG(WM_CANCELMODE)
-MSG(WM_ENABLE)
-MSG(WM_SETFONT)
-MSG(WM_INITDIALOG)
-MSG(WM_GETDLGCODE)
-MSG(WM_ENTERIDLE)
-
-/* scroll bars */
-MSG(WM_HSCROLL)
-MSG(WM_VSCROLL)
-
-/* getting these from Wine but not from Windows */
-MSG2(WM_SETVISIBLE,0x0009) /* unheard of in BC++ 4.52 */
-#ifdef WIN32
-MSG(WM_CAPTURECHANGED)
-#endif
-
-ENDMSG};
-
-struct MSGNAMES ButMsgs[]={
-MSG(BM_SETSTATE)
-MSG(BM_SETSTYLE)
-
-ENDMSG};
-
-char*MsgName(UINT msg,HWND hWnd)
-{
- int i;
- static char buffer[64],wclass[64];
- GetClassName(hWnd,wclass,sizeof(wclass));
-
-#define MSGSEARCH(msgs) { \
-  for (i=0; msgs[i].name&&msgs[i].msg!=msg; i++); \
-  if (msgs[i].name) return msgs[i].name; \
- }
-
- if (!stricmp(wclass,"Button")) MSGSEARCH(ButMsgs);
- MSGSEARCH(MsgNames);
- /* WM_USER */
- if (msg>=WM_USER) {
-  sprintf(buffer,"WM_USER+%04x{%s}",msg-WM_USER,wclass);
-  return buffer;
- }
- /* message not found */
- sprintf(buffer,"%04x{%s}",msg,wclass);
- return buffer;
-}
-
-char*WndName(HWND hWnd,int state)
-{
- static char buffer[16];
- if (!hWnd) return "0000";
- if (hWnd==hMainWnd || (state==STATE_CREATE && !hMainWnd)) return "main";
- if (hWnd==hSubWnd || (state==STATE_CREATE && !hSubWnd)) return "chld";
- if (hWnd==hDialog || (state==STATE_DIALOG && !hDialog)) return "tdlg";
- if (hWnd==hGroup) return "tgrp";
- if (hWnd==hButton[0]) return "but1";
- if (hWnd==hButton[1]) return "but2";
- if (hWnd==hButton[2]) return "but3";
- if (hWnd==hButton[3]) return "but4";
- if (hWnd==hSubDlg || (state==STATE_CREATE && !hSubDlg)) return "sdlg";
- if (hDialog) {
-  int id=GetDlgCtrlID(hWnd);
-  if (id) {
-   sprintf(buffer,"dlgitem(%d)",id);
-   return buffer;
-  }
- }
- sprintf(buffer,"%04x",hWnd);
- return buffer;
-}
-
-void Log(const char*fmt)
-{
-#ifdef LOGGING
- if (!Clicked) SendMessage(hListBox,LB_ADDSTRING,0,(LPARAM)fmt);
-#endif
-}
-
-void Logf(const char*fmt,...)
-{
- va_list par;
- static char buffer[256];
-
- va_start(par,fmt);
- vsprintf(buffer,fmt,par);
- va_end(par);
- Log(buffer);
-}
-
-void LogChildOrder(HWND hWnd)
-{
- HWND hWndChild = GetWindow(hWnd,GW_CHILD);
- static char buffer[256];
-
- strcpy(buffer,"child list:");
- while (hWndChild) {
-  strcat(strcat(buffer," "),WndName(hWndChild,State));
-  hWndChild=GetWindow(hWndChild,GW_HWNDNEXT);
- }
- Log(buffer);
-}
-
-void LogMessage(int state,HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam,char*name)
-{
- static char buffer[256];
- DWORD tick=GetTickCount()-StartTime;
- char*msgname=MsgName(msg,hWnd);
- if (!name) name=WndName(hWnd,state);
- switch (msg) {
-  case WM_SETFOCUS:
-  case WM_KILLFOCUS:
-  case WM_SETCURSOR:
-   Logf("%04d[%s(%d):%s]%s(%s,%08x)",tick,StateName[state],Rec,
-        name,msgname,WndName((HWND)wParam,State),lParam);
-   break;
-#ifdef WIN32
-  case WM_ENTERIDLE:
-  case WM_CTLCOLORBTN:
-  case WM_CTLCOLORDLG:
-   Logf("%04d[%s(%d):%s]%s(%08x,%s)",tick,StateName[state],Rec,
-        name,msgname,wParam,WndName((HWND)lParam,State));
-   break;
-#else
-  case WM_ENTERIDLE:
-  case WM_CTLCOLOR:
-   Logf("%04d[%s(%d):%s]%s(%08x,%04x:%s)",tick,StateName[state],Rec,
-        name,msgname,wParam,HIWORD(lParam),WndName((HWND)LOWORD(lParam),State));
-   break;
-#endif
-  case WM_WINDOWPOSCHANGING:
-  case WM_WINDOWPOSCHANGED:
-   {
-    WINDOWPOS*pos=(WINDOWPOS*)lParam;
-#ifdef WIN32
-	 Logf("%04d[%s(%d):%s]%s(%08x,%p)",tick,StateName[state],Rec,
-			name,msgname,wParam,pos);
-#else
-	 Logf("%04d[%s(%d):%s]%s(%04x,%p)",tick,StateName[state],Rec,
-			name,msgname,wParam,pos);
-#endif
-	 strcpy(buffer,"FLAGS:");
-	 if (pos->flags&SWP_DRAWFRAME) strcat(buffer," DRAWFRAME");
-	 if (pos->flags&SWP_HIDEWINDOW) strcat(buffer," HIDEWINDOW");
-	 if (pos->flags&SWP_NOACTIVATE) strcat(buffer," NOACTIVATE");
-	 if (pos->flags&SWP_NOCOPYBITS) strcat(buffer," NOCOPYBITS");
-	 if (pos->flags&SWP_NOMOVE) strcat(buffer," NOMOVE");
-	 if (pos->flags&SWP_NOOWNERZORDER) strcat(buffer," NOOWNERZORDER");
-	 if (pos->flags&SWP_NOSIZE) strcat(buffer," NOSIZE");
-	 if (pos->flags&SWP_NOREDRAW) strcat(buffer," NOREDRAW");
-	 if (pos->flags&SWP_NOZORDER) strcat(buffer," NOZORDER");
-	 if (pos->flags&SWP_SHOWWINDOW) strcat(buffer," SHOWWINDOW");
-	 Log(buffer);
-	}
-	break;
-  case WM_SYSCOMMAND:
-	{
-	 char*cmd=NULL;
-	 switch (wParam&0xFFF0) {
-#define CASE(x) case SC_##x: cmd=#x; break;
-	  CASE(CLOSE)
-	  CASE(DEFAULT)
-	  CASE(HOTKEY)
-	  CASE(HSCROLL)
-	  CASE(KEYMENU)
-	  CASE(MAXIMIZE)
-	  CASE(MINIMIZE)
-	  CASE(MOUSEMENU)
-	  CASE(MOVE)
-	  CASE(NEXTWINDOW)
-	  CASE(PREVWINDOW)
-	  CASE(RESTORE)
-	  CASE(SCREENSAVE)
-	  CASE(SIZE)
-	  CASE(TASKLIST)
-	  CASE(VSCROLL)
-#undef CASE
-	 }
-	 if (cmd) {
-	  Logf("%04d[%s(%d):%s]%s(%s+%x,%08x)",tick,StateName[state],Rec,
-			 name,msgname,cmd,wParam&0xF,lParam);
-	 } else goto GENERIC_MSG;
-	}
-	break;
-  case WM_HSCROLL:
-  case WM_VSCROLL:
-	{
-	 char*cmd=NULL;
-	 switch (LOWORD(wParam)) {
-#define CASE(x) case SB_##x: cmd=#x; break;
-#define CASE2(h,v) case SB_##h: if (msg==WM_HSCROLL) cmd=#h; else cmd=#v; break;
-	  CASE(BOTTOM)
-	  CASE(ENDSCROLL)
-	  CASE2(LINELEFT,LINEUP)
-	  CASE2(LINERIGHT,LINEDOWN)
-	  CASE2(PAGELEFT,PAGEUP)
-	  CASE2(PAGERIGHT,PAGEDOWN)
-	  CASE(THUMBPOSITION)
-	  CASE(THUMBTRACK)
-     CASE(TOP)
-#undef CASE
-	 }
-	 if (cmd) {
-#ifdef WIN32
-	  Logf("%04d[%s(%d):%s]%s(%s,%04x,%s)",tick,StateName[state],Rec,
-			 name,msgname,cmd,HIWORD(wParam),WndName((HWND)lParam,State));
-#else
-	  Logf("%04d[%s(%d):%s]%s(%04x,%04x,%s)",tick,StateName[state],Rec,
-			 name,msgname,cmd,LOWORD(lParam),WndName((HWND)HIWORD(lParam),State));
-#endif
-	 } else goto GENERIC_MSG;
-	}
-	break;
-  default:
-GENERIC_MSG:
-#ifdef WIN32
-	Logf("%04d[%s(%d):%s]%s(%08x,%08x)",tick,StateName[state],Rec,
-		  name,msgname,wParam,lParam);
-#else
-	Logf("%04d[%s(%d):%s]%s(%04x,%08x)",tick,StateName[state],Rec,
-		  name,msgname,wParam,lParam);
-#endif
- }
-}
-
-/***************************/
-/*** GRAPHICS FACILITIES ***/
-/***************************/
-
-void Paint(HWND hWnd)
-{
- HDC dc;
- PAINTSTRUCT ps;
- dc=BeginPaint(hWnd,&ps);
- EndPaint(hWnd,&ps);
-}
-
-void FillPattern(HWND hWnd,HDC pdc)
-{
- HDC dc=pdc?pdc:GetDC(hWnd);
- HBRUSH oldbrush;
- RECT rect;
- if (!dc) {
-  Logf("failed to acquire DC for window %s",WndName(hWnd,State));
-  return;
- } else {
-  Logf("acquired DC for %s window %s, painting",
-       IsWindowVisible(hWnd)?"visible":"invisible",WndName(hWnd,State));
- }
- GetClientRect(hWnd,&rect);
- oldbrush=SelectObject(dc,GetStockObject(LTGRAY_BRUSH));
- PatBlt(dc,0,0,rect.right,rect.bottom,PATCOPY);
- SelectObject(dc,oldbrush);
- if (!pdc) ReleaseDC(hWnd,dc);
-}
-
-void PaintPattern(HWND hWnd)
-{
- HDC dc;
- PAINTSTRUCT ps;
- dc=BeginPaint(hWnd,&ps);
- FillPattern(hWnd,dc);
- EndPaint(hWnd,&ps);
-}
-
-/*************************/
-/*** WINDOW PROCEDURES ***/
-/*************************/
-
-/* MAIN WINDOW */
-LRESULT FAR CALLBACK _export MainWindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- LRESULT lResult=0;
- RECT rect;
- int OldState=State;
-
- State=STATE_RECURS; Rec++;
- if (!Clicked) LogMessage(OldState,hWnd,msg,wParam,lParam,NULL);
- switch (msg) {
-  case WM_NCHITTEST:
-   lResult=DefWindowProc(hWnd,msg,wParam,lParam);
-   break;
-  case WM_LBUTTONDOWN:
-  case WM_CHAR:
-   if (!Clicked) {
-    SetParent(hListBox,hWnd);
-    GetClientRect(hWnd,&rect);
-    MoveWindow(hListBox,0,0,rect.right,rect.bottom,TRUE);
-    ShowWindow(hListBox,SW_SHOW);
-    SetFocus(hListBox);
-    Clicked=TRUE;
-   }
-   break;
-  case WM_SIZE:
-   GetClientRect(hWnd,&rect);
-   if (Clicked) {
-    MoveWindow(hListBox,0,0,rect.right,rect.bottom,TRUE);
-   }
-   MoveWindow(hSubWnd,0,rect.bottom/2,rect.right,rect.bottom-(rect.bottom/2),TRUE);
-   break;
-  case WM_PAINT:
-   Paint(hWnd);
-   break;
-  case WM_DESTROY:
-   PostQuitMessage(0);
-   break;
-  default:
-   lResult=DefWindowProc(hWnd,msg,wParam,lParam);
- }
- State=OldState; Rec--;
- return lResult;
-}
-
-/* CHILD WINDOW */
-LRESULT FAR CALLBACK _export SubWindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- LRESULT lResult=0;
- RECT rect;
- int OldState=State;
-
- State=STATE_RECURS; Rec++;
- if (!Clicked) LogMessage(OldState,hWnd,msg,wParam,lParam,NULL);
- switch (msg) {
-  case WM_PAINT:
-   Paint(hWnd);
-   break;
-  default:
-   lResult=DefWindowProc(hWnd,msg,wParam,lParam);
- }
- State=OldState; Rec--;
- return lResult;
-}
-
-BOOL FAR CALLBACK _export SubDialogProc(HWND hWndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-
-/* SUBCLASSED CONTROLS */
-LRESULT FAR CALLBACK _export SubClassWindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- LRESULT lResult=0;
- RECT rect;
- int OldState=State;
- int But=-1;
-
- if (hWnd==hButton[0]) But=0; else
- if (hWnd==hButton[1]) But=1; else
- if (hWnd==hButton[2]) But=2; else
- if (hWnd==hButton[3]) But=3;
-
- State=STATE_RECURS; Rec++;
- if (!Clicked) {
-  LogMessage(OldState,hWnd,msg,wParam,lParam,NULL);
-  if (But!=-1) {
-   lResult=CallWindowProc((FARPROC)wndButton[But],hWnd,msg,wParam,lParam);
-   if (msg==WM_LBUTTONUP) {
-    LogChildOrder(GetParent(hWnd));
-   }
-  }
-  else if (hWnd==hDialog) {
-   lResult=CallWindowProc((FARPROC)wndDialog,hWnd,msg,wParam,lParam);
-  }
-  else if (hWnd==hSubDlg) {
-   lResult=CallWindowProc((FARPROC)wndSubDlg,hWnd,msg,wParam,lParam);
-  }
-  else if (hWnd==hGroup) {
-   lResult=CallWindowProc((FARPROC)wndGroup,hWnd,msg,wParam,lParam);
-   if (msg==WM_SETFOCUS) {
-    /* create subdialog */
-    if (hSubDlg) {
-#if 0
-     SetRect(&rect,0,0,1,1);
-     InvalidateRect(hWnd,&rect,FALSE);
-#endif
-    } else {
-#ifdef TEST_SUBDIALOG
-     State=STATE_CREATE;
-     hSubDlg=CreateDialog(hInst,MAKEINTRESOURCE(2),hWnd,(FARPROC)SubDialogProc);
-     State=STATE_RECURS;
-#else
-#ifdef RESIZE_DIALOG
-     GetWindowRect(GetParent(hWnd),&rect);
-     rect.right++;
-     SetWindowPos(GetParent(hWnd),0,0,0,
-                  rect.right-rect.left,rect.bottom-rect.top,
-                  SWP_NOMOVE|SWP_NOZORDER);
-#endif
-#endif
-    }
-   }
-  }
- }
- State=OldState; Rec--;
- return lResult;
-}
-
-/* MAIN DIALOG PROCEDURE */
-BOOL FAR CALLBACK _export TestDialogProc(HWND hWndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- BOOL bResult=0;
- RECT rect;
- int OldState=State;
- int But=-1;
-
- State=STATE_RECURS; Rec++;
- if (!Clicked) LogMessage(OldState,hWndDlg,msg,wParam,lParam,"dlgp");
- switch (msg) {
-  case WM_INITDIALOG:
-   hDialog = hWndDlg;
-   /* subclass dialog window proc */
-   wndDialog = (WNDPROC)SetWindowLong(hDialog,GWL_WNDPROC,(LONG)SubClassWindowProc);
-   Logf("dialog visible=%s",IsWindowVisible(hWndDlg)?"TRUE":"FALSE");
-   /* subclass OK button */
-   hButton[3] = GetDlgItem(hWndDlg,IDOK);
-   wndButton[3] = (WNDPROC)SetWindowLong(hButton[3],GWL_WNDPROC,(LONG)SubClassWindowProc);
-   /* subclass group box */
-   hGroup = GetDlgItem(hWndDlg,IDC_GROUPBOX1);
-   wndGroup = (WNDPROC)SetWindowLong(hGroup,GWL_WNDPROC,(LONG)SubClassWindowProc);
-
-#ifdef RESIZE_DIALOG
-   GetWindowRect(hWndDlg,&rect);
-   rect.right--;
-   SetWindowPos(hWndDlg,0,0,0,
-                rect.right-rect.left,rect.bottom-rect.top,
-                SWP_NOMOVE|SWP_NOZORDER);
-//   ShowWindow(GetDlgItem(hWndDlg,IDCANCEL),SW_HIDE);
-#endif
-
-   bResult=TRUE; /* we don't do SetFocus */
-   break;
-  case WM_PAINT:
-   PaintPattern(hWndDlg);
-   bResult=TRUE;
-   break;
-  case WM_COMMAND:
-   EndDialog(hWndDlg,LOWORD(wParam));
-   bResult=TRUE;
-   break;
-  case WM_CLOSE:
-   EndDialog(hWndDlg,IDCANCEL);
-   bResult=TRUE;
-   break;
-  case WM_NCDESTROY:
-   hDialog = 0;
-   break;
- }
- State=OldState; Rec--;
- return bResult;
-}
-
-/* SUBDIALOG PROCEDURE */
-BOOL FAR CALLBACK _export SubDialogProc(HWND hWndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- BOOL bResult=0;
- RECT rect;
- int OldState=State;
- int But=-1;
-
- State=STATE_RECURS; Rec++;
- if (!Clicked) LogMessage(OldState,hWndDlg,msg,wParam,lParam,NULL);
- switch (msg) {
-  case WM_INITDIALOG:
-   hSubDlg = hWndDlg;
-   /* subclass dialog window proc */
-   wndSubDlg = (WNDPROC)SetWindowLong(hDialog,GWL_WNDPROC,(LONG)SubClassWindowProc);
-
-   bResult=TRUE; /* we don't do SetFocus */
-   break;
-  case WM_NCDESTROY:
-   hSubDlg = 0;
-   break;
- }
- State=OldState; Rec--;
- return bResult;
-}
-
-/********************/
-/*** MAIN PROGRAM ***/
-/********************/
-
-BOOL AppInit(void)
-{
- WNDCLASS wclass;
-
- wclass.style = CS_HREDRAW|CS_VREDRAW;
- wclass.lpfnWndProc = MainWindowProc;
- wclass.cbClsExtra = 0;
- wclass.cbWndExtra = 0;
- wclass.hInstance = hInst;
- wclass.hIcon = LoadIcon(hInst,MAKEINTRESOURCE(1));
- wclass.hCursor = LoadCursor(0,IDC_ARROW);
- wclass.hbrBackground = GetStockObject(WHITE_BRUSH);
- wclass.lpszMenuName = NULL;
- wclass.lpszClassName = wclassname;
- if (!RegisterClass(&wclass)) return FALSE;
- wclass.lpfnWndProc = SubWindowProc;
- wclass.lpszClassName = wcclassname;
- if (!RegisterClass(&wclass)) return FALSE;
- return TRUE;
-}
-
-int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
-                   LPSTR lpszCmdLine, int nCmdShow)
-{
- MSG msg;
- RECT rect;
-
- hInst = hInstance;
- if (!hPrevInstance)
-  if (!AppInit())
-   return 0;
-
- StartTime=GetTickCount();
- hListBox = CreateWindow("LISTBOX","Messages",WS_BORDER|WS_VSCROLL|WS_CHILD|
-                                              LBS_HASSTRINGS|LBS_NOTIFY|LBS_WANTKEYBOARDINPUT,
-                         0,0,0,0,GetDesktopWindow(),0,hInst,0);
- if (!hListBox) {
-  MessageBox(0,"Could not create list box","Error",MB_OK);
- }
-
- State=STATE_CREATE;
- hMainWnd = CreateWindowEx(MAIN_EXSTYLE,wclassname,winname,MAIN_STYLE,
-                           CW_USEDEFAULT,0,400,300,0,0,hInst,0);
- if (!hMainWnd) return 0;
- State=STATE_SHOW;
- ShowWindow(hMainWnd,nCmdShow);
-#ifdef TEST_DESTROY_MAIN
- State=STATE_DESTROY;
- DestroyWindow(hMainWnd);
- State=STATE_DIRECT;
- while (GetMessage(&msg,0,0,0)) {
-  TranslateMessage(&msg);
-  State=STATE_DISPATCH;
-  DispatchMessage(&msg);
-  State=STATE_DIRECT;
- }
- State=STATE_CREATE;
- hMainWnd = CreateWindowEx(MAIN_EXSTYLE,wclassname,winname,MAIN_STYLE,
-                           CW_USEDEFAULT,0,400,300,0,0,hInst,0);
- if (!hMainWnd) return 0;
- State=STATE_SHOW;
- ShowWindow(hMainWnd,nCmdShow);
-#endif
-/* update, so no WM_PAINTs are pending */
- State=STATE_UPDATE;
-// UpdateWindow(hMainWnd);
- Ready=TRUE;
-/* fill client area with a pattern */
- FillPattern(hMainWnd,0);
-/* create subwindow */
- State=STATE_CREATE;
- GetClientRect(hMainWnd,&rect);
- hSubWnd = CreateWindow(wcclassname,winname,WS_CHILD|WS_BORDER|WS_CLIPSIBLINGS,
-                        0,rect.bottom/2,rect.right,rect.bottom-(rect.bottom/2),hMainWnd,0,hInst,0);
- if (!hSubWnd) return 0;
-/* create buttons */
- hButton[0] = CreateWindow("BUTTON","1",WS_CHILD|WS_CLIPSIBLINGS|WS_VISIBLE,
-                           8,8,48,20,hMainWnd,0,hInst,0);
- hButton[1] = CreateWindow("BUTTON","2",WS_CHILD|WS_CLIPSIBLINGS|WS_VISIBLE,
-                           32,12,48,20,hMainWnd,0,hInst,0);
- hButton[2] = CreateWindow("BUTTON","3",WS_CHILD|WS_CLIPSIBLINGS|WS_VISIBLE,
-                           56,16,48,20,hMainWnd,0,hInst,0);
-/* subclass them */
- wndButton[0] = (WNDPROC)SetWindowLong(hButton[0],GWL_WNDPROC,(LONG)SubClassWindowProc);
- wndButton[1] = (WNDPROC)SetWindowLong(hButton[1],GWL_WNDPROC,(LONG)SubClassWindowProc);
- wndButton[2] = (WNDPROC)SetWindowLong(hButton[2],GWL_WNDPROC,(LONG)SubClassWindowProc);
-/* show them */
- State=STATE_UPDATE;
- UpdateWindow(hButton[0]);
- LogChildOrder(hMainWnd);
- Logf("but1 visible=%d",IsWindowVisible(hButton[0]));
-
-/* now reparent the button to our (invisible) subwindow */
- State=STATE_TEST;
- /* in different order, seeing who gets topmost */
- SetParent(hButton[0],hSubWnd);
- SetParent(hButton[2],hSubWnd);
- SetParent(hButton[1],hSubWnd);
- LogChildOrder(hSubWnd);
-/* the button should now be invisible */
- Logf("but1 visible=%d",IsWindowVisible(hButton[0]));
-/* see if we can draw on them */
- FillPattern(hButton[0],0);
-
-#ifdef SHOW_SUB
- State=STATE_SHOW;
- ShowWindow(hSubWnd,SW_SHOWNORMAL);
- State=STATE_UPDATE;
- UpdateWindow(hSubWnd);
- FillPattern(hSubWnd,0);
-// InvalidateRect(hMainWnd,NULL,TRUE);
- Logf("but1 visible=%d",IsWindowVisible(hButton[0]));
-#endif
-
-#ifdef TEST_DIALOG
- State=STATE_DIALOG;
- DialogBox(hInst,MAKEINTRESOURCE(1),hMainWnd,(FARPROC)TestDialogProc);
-#endif
-#ifdef TEST_COMMCTL
- {
-  DWORD arr[16];
-  CHOOSECOLOR cc={sizeof(cc),0,hInst,0,arr,0};
-  ChooseColor(&cc);
- }
-#endif
-
- State=STATE_DIRECT;
- while (GetMessage(&msg,0,0,0)) {
-  TranslateMessage(&msg);
-  State=STATE_DISPATCH;
-  DispatchMessage(&msg);
-  State=STATE_DIRECT;
- }
- return 0;
-}
-
-
diff --git a/libtest/guitest.rc b/libtest/guitest.rc
deleted file mode 100644
index 9b284fd..0000000
--- a/libtest/guitest.rc
+++ /dev/null
@@ -1,96 +0,0 @@
-/****************************************************************************
- * GUITEST.RC
- *
- * produced by Borland Resource Workshop
- *
- * Copyright 1999 Ove Kåven
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *****************************************************************************/
-
-#include "guitest.rh"
-
-1 ICON 
-{
-'00 00 01 00 01 00 20 20 10 00 00 00 00 00 E8 02'
-'00 00 16 00 00 00 28 00 00 00 20 00 00 00 40 00'
-'00 00 01 00 04 00 00 00 00 00 80 02 00 00 00 00'
-'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
-'00 00 00 00 80 00 00 80 00 00 00 80 80 00 80 00'
-'00 00 80 00 80 00 80 80 00 00 C0 C0 C0 00 80 80'
-'80 00 00 00 FF 00 00 FF 00 00 00 FF FF 00 FF 00'
-'00 00 FF 00 FF 00 FF FF 00 00 FF FF FF 00 00 00'
-'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
-'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
-'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
-'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
-'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0A'
-'A0 00 00 00 00 00 AA A0 00 00 00 00 00 00 00 00'
-'A0 0A AA A0 00 AA 00 0A 00 00 00 A0 A0 00 00 00'
-'A0 0A 00 00 0A A0 00 0A 00 00 00 A0 00 00 00 00'
-'A0 0A 00 00 AA 00 00 0A 00 00 0A A0 0A 00 00 00'
-'A0 0A 00 00 00 00 00 A0 00 00 0A 00 0A 00 22 22'
-'A2 2A 22 22 22 2A AA 22 22 22 2A 22 2A 22 22 22'
-'AA 2A AA A2 22 A2 22 22 22 22 2A 22 2A 22 00 00'
-'0A 0A 00 00 00 A0 00 00 00 00 0A 00 0A 00 00 00'
-'0A 0A 00 00 00 A0 00 00 00 00 0A 00 0A 00 00 00'
-'0A 00 A0 00 00 AA 00 00 00 00 0A 00 0A 00 00 00'
-'0A 00 AA A0 00 0A AA A0 0A AA AA AA 00 00 0A AA'
-'AA AA A0 00 00 00 00 00 00 00 00 0A A0 00 0A 00'
-'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
-'00 00 77 70 70 00 77 77 00 07 00 00 00 00 00 00'
-'00 07 00 07 07 07 00 00 70 70 70 00 00 00 00 00'
-'00 70 77 70 07 70 77 77 07 70 70 00 00 00 00 00'
-'00 70 70 07 07 70 70 07 07 70 70 00 00 00 00 00'
-'00 70 70 77 07 70 70 07 07 70 70 00 00 00 00 00'
-'00 70 77 00 07 70 70 07 07 70 70 00 00 00 00 00'
-'00 70 70 77 70 70 70 07 07 70 70 00 00 00 00 00'
-'00 70 70 00 70 70 70 07 07 70 70 00 00 00 00 00'
-'00 70 77 77 07 70 70 07 07 70 70 00 00 00 00 00'
-'00 07 00 00 70 70 70 07 07 70 70 00 00 00 00 00'
-'00 00 77 77 00 07 00 00 70 07 00 00 00 00 00 00'
-'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
-'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
-'00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF'
-'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
-'FF FF E7 FF 1F FF F6 1C EF D7 F6 F9 EF DF F6 F3'
-'EF 9B F6 FF DF BB 00 00 00 00 00 00 00 00 FA FD'
-'FF BB FA FD FF BB FB 7C FF BB FB 1E 18 0F 80 7F'
-'FF E7 BF FF FF FF FF 17 0E FF FE 02 04 7F FC 00'
-'00 7F FC 60 60 7F FC 40 60 7F FC 00 60 7F FC 44'
-'60 7F FC 74 60 7F FC 00 60 7F FE 04 60 7F FF 0E'
-'F6 FF FF FF FF FF FF FF FF FF FF FF FF FF'
-}
-
-
-1 DIALOG 6, 15, 196, 119
-STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-CAPTION "Test Dialog"
-FONT 8, "MS Sans Serif"
-{
- DEFPUSHBUTTON "OK", IDOK, 12, 96, 50, 14
- PUSHBUTTON "Cancel", IDCANCEL, 72, 96, 50, 14
- PUSHBUTTON "Help", IDHELP, 132, 96, 50, 14
- GROUPBOX "Group", IDC_GROUPBOX1, 4, 4, 188, 84, BS_GROUPBOX | WS_GROUP | WS_TABSTOP
-}
-
-2 DIALOG 6, 15, 180, 72
-STYLE WS_CHILD | WS_VISIBLE | WS_BORDER
-FONT 8, "MS Sans Serif"
-{
- AUTOCHECKBOX "Checkbox 1", IDC_CHECKBOX1, 8, 8, 80, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
- AUTOCHECKBOX "Checkbox 2", IDC_CHECKBOX2, 8, 28, 80, 12
- AUTOCHECKBOX "Checkbox 3", IDC_CHECKBOX3, 8, 48, 60, 12
-}
diff --git a/libtest/guitest.rh b/libtest/guitest.rh
deleted file mode 100644
index d283519..0000000
--- a/libtest/guitest.rh
+++ /dev/null
@@ -1,29 +0,0 @@
-/****************************************************************************
- * guitest.rh
- *
- * produced by Borland Resource Workshop
- *
- * Copyright 1999 Ove Kåven
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *****************************************************************************/
-
-#define IDC_CHECKBOX1	104
-#define IDC_CHECKBOX2	105
-#define IDC_CHECKBOX3	106
-#define DIALOG_2	2
-#define IDC_GROUPBOX1	10
-#define DIALOG_1	1
-#define ICON_1	1
diff --git a/libtest/hello.c b/libtest/hello.c
deleted file mode 100644
index 618dd3f..0000000
--- a/libtest/hello.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright 1994 Miguel de Icaza
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#include <windows.h>
-
-char szAppName[] = "Hello";
-
-long FAR PASCAL WndProc(HWND, UINT, WPARAM, LPARAM);
-
-int PASCAL WinMain (HINSTANCE hInstance, HINSTANCE hPrevInst, LPSTR lpszCmdLine,
-			 int nCmdShow)
-{
-	HWND hwnd;
-	MSG msg;
-	WNDCLASS wndclass;
-
-	if(!hPrevInst) {
-
-		wndclass.style =  CS_HREDRAW | CS_VREDRAW;
-		wndclass.lpfnWndProc = WndProc;
-		wndclass.cbClsExtra = 0;
-		wndclass.cbWndExtra = 0;
-		wndclass.hInstance = hInstance;
-		wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
-		wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
-		wndclass.hbrBackground = GetStockObject(WHITE_BRUSH);
-		wndclass.lpszMenuName = NULL;
-		wndclass.lpszClassName = szAppName;
-
-		RegisterClass(&wndclass);
-
-					
-	}
-
-	hwnd = CreateWindow(szAppName, szAppName,
-	 WS_HSCROLL | WS_VSCROLL | WS_OVERLAPPEDWINDOW,
-	 CW_USEDEFAULT, CW_USEDEFAULT, 600,
-	 400, NULL, NULL, hInstance, NULL);
-
-	ShowWindow(hwnd, nCmdShow);
-	UpdateWindow(hwnd);
-															
-									
-	while(GetMessage(&msg, NULL, 0, 0)) {
-		TranslateMessage(&msg);
-		DispatchMessage(&msg);
-	}					
-	return msg.wParam;
-}					
-
-
-
-long FAR PASCAL WndProc(HWND hwnd, UINT message, WPARAM wParam,
-				LPARAM lParam)
-{
-	HDC hdc;
-	RECT rect;
-	SIZE size;
-	PAINTSTRUCT ps;
-
-	switch(message) {
-			
-	case WM_PAINT:
-	    	hdc = BeginPaint(hwnd, &ps);
-		GetClientRect(hwnd, &rect);
-		InflateRect(&rect, -10, -10);
-		if( !IsRectEmpty( &rect ) )
-		{
-                    GetTextExtentPoint32(hdc, szAppName, strlen(szAppName), &size);
-		    SelectObject(hdc, GetStockObject(LTGRAY_BRUSH));
-		    Rectangle(hdc, rect.left, rect.top, rect.right, rect.bottom);
-		    rect.left = (rect.right + rect.left - size.cx) / 2;
-		    rect.top  = (rect.bottom + rect.top - size.cy) / 2;
-		    SetBkMode(hdc, TRANSPARENT);
-		    TextOut(hdc, rect.left, rect.top, szAppName, strlen(szAppName) );
-		}
-		EndPaint(hwnd, &ps);
-		return 0;
-							
-	case WM_DESTROY:
-		PostQuitMessage(0);
-		return 0;
-	}
-	return DefWindowProc(hwnd, message, wParam, lParam);
-}												
-
diff --git a/libtest/hello2.c b/libtest/hello2.c
deleted file mode 100644
index a3b4437..0000000
--- a/libtest/hello2.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 1994 Miguel de Icaza
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#include "windows.h"
-
-int PASCAL WinMain (HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
-{
-  return MessageBox((HWND)0,
-		    (LPSTR)"Hello, hello!",
-		    (LPSTR)"Hello Wine Application",
-		    (MB_OK | MB_ICONEXCLAMATION));
-}
diff --git a/libtest/hello3.c b/libtest/hello3.c
deleted file mode 100644
index f71c25c..0000000
--- a/libtest/hello3.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright 1995 Martin von Loewis
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#include <windows.h>
-#include <commdlg.h>
-
-typedef struct
-{
-  HANDLE  hInstance;
-  HWND    hMainWnd;
-  HMENU   hMainMenu;
-} GLOBALS;
-
-GLOBALS Globals;
-
-BOOL FileOpen(HWND hWnd)
-{
-  char filename[80] = "test.c";
-  OPENFILENAME ofn = { sizeof(OPENFILENAME),
-		       hWnd, NULL, "C code\0*.c\0", NULL, 0, 0, filename, 80,
-		       NULL, 0, NULL, NULL, OFN_CREATEPROMPT |
-		       OFN_SHOWHELP, 0, 0, NULL, 0, NULL };
-  return GetOpenFileName(&ofn);
-}
-
-LRESULT CALLBACK DlgProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
-{
-    switch(msg)
-    {
-	case WM_INITDIALOG:
-	    break;
-	case WM_COMMAND:
-	    switch (wParam)
-	    {
-		case 100:
-		    EndDialog(hWnd, 100);
-		    return TRUE;
-	    }
-    }
-    return FALSE;
-}
-
-LRESULT CALLBACK WndProc (HWND wnd, UINT msg, WPARAM w, LPARAM l)
-{
-    switch (msg){
-
-	case WM_COMMAND:
-	switch(w){
-		case 100:
-			DialogBox(Globals.hInstance,
-				"DIADEMO", wnd,
-				(DLGPROC)DlgProc);
-			return 0;
-		case 101:
-		{
-			HDC hdc, hMemDC;
-			HBITMAP hBitmap, hPrevBitmap;
-			BITMAP bmp;
-
-			hBitmap = LoadBitmapA (Globals.hInstance, "BITDEMO");
-			hdc = GetDC (wnd);
-			hMemDC = CreateCompatibleDC (hdc);
-			hPrevBitmap = SelectObject (hMemDC, hBitmap);
-			GetObjectA (hBitmap, sizeof(BITMAP), &bmp);
-			BitBlt (hdc, 0, 0, bmp.bmWidth, bmp.bmHeight,
-				hMemDC, 0, 0, SRCCOPY);
-			SelectObject (hMemDC, hPrevBitmap);
-			DeleteDC (hMemDC);
-			ReleaseDC (wnd, hdc);
-			return 0;
-		}
-	        case 102:
-		        FileOpen(wnd);
-			return 0;
-		default:
-			return DefWindowProc (wnd, msg, w, l);
-	}
-    case WM_DESTROY:
-	PostQuitMessage (0);
-	break;
-
-    default:
-	return DefWindowProc (wnd, msg, w, l);
-    }
-    return 0l;
-}
-
-int PASCAL WinMain (HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
-{
-    MSG      msg;
-    WNDCLASS class;
-    char className[] = "class";  /* To make sure className >= 0x10000 */
-    char winName[] = "Test app";
-
-    Globals.hInstance = inst;
-    if (!prev){
-	class.style = CS_HREDRAW | CS_VREDRAW;
-	class.lpfnWndProc = WndProc;
-	class.cbClsExtra = 0;
-	class.cbWndExtra = 0;
-	class.hInstance  = inst;
-	class.hIcon      = LoadIcon (0, IDI_APPLICATION);
-	class.hCursor    = LoadCursor (0, IDC_ARROW);
-	class.hbrBackground = GetStockObject (WHITE_BRUSH);
-	class.lpszMenuName = 0;
-	class.lpszClassName = className;
-    }
-    if (!RegisterClass (&class))
-	return FALSE;
-
-    Globals.hMainWnd = CreateWindow (className, winName, WS_OVERLAPPEDWINDOW,
-			CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, 0, 
-			LoadMenu(inst,"MAIN"), inst, 0);
-    ShowWindow (Globals.hMainWnd, show);
-    UpdateWindow (Globals.hMainWnd);
-
-    while (GetMessage (&msg, 0, 0, 0)){
-	TranslateMessage (&msg);
-	DispatchMessage (&msg);
-    }
-    return 0;
-}
diff --git a/libtest/hello3res.rc b/libtest/hello3res.rc
deleted file mode 100644
index 9978bcb..0000000
--- a/libtest/hello3res.rc
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 1995 Martin von Loewis
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#include <windows.h>
-
-MAIN MENU 
-{
- POPUP "Menu demo" {
-   MENUITEM "Dialog Demo", 100
-   MENUITEM "Bitmap Demo", 101
-   MENUITEM "Open...", 102
- }
-}
-
-/*BITDEMO BITMAP "../rc/winelogo.bmp"*/
-
-DIADEMO DIALOG 20, 20, 179, 118
-STYLE DS_MODALFRAME | WS_CAPTION | WS_POPUP | WS_VISIBLE | WS_SYSMENU
-CAPTION "Dialog demo"
-FONT 8, "Helv"
-BEGIN
-	CONTROL "Pushbutton", 100, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 14, 92, 52, 13
-	CONTROL "Checkbox", 101, "BUTTON", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 19, 76, 47, 12
-	CONTROL "Static text", 102, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 17, 60, 39, 10
-	CONTROL "Edit control", 103, "EDIT", ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 18, 41, 44, 13
-	CONTROL "Radio button", 104, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 17, 23, 58, 12
-	CONTROL "", 105, "COMBOBOX", CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 86, 13, 86, 85
-	CONTROL "", 106, "LISTBOX", LBS_STANDARD | LBS_DISABLENOSCROLL | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 86, 33, 86, 85
-END
diff --git a/libtest/hello4.c b/libtest/hello4.c
deleted file mode 100644
index 485e417..0000000
--- a/libtest/hello4.c
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright 1996 Jim Peterson
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#include <stdio.h>
-#include <windows.h>
-/* Win32 counterpart for CalcChildScroll16 is not implemented */
-/* even in MS Visual C++ */
-#include "windef.h"
-#include "wingdi.h"
-/*#include <wine/winuser16.h>*/
-
-void Write (HDC dc, int x, int y, char *s)
-{
-    SetBkMode(dc, TRANSPARENT);
-    TextOut (dc, x, y, s, strlen (s));
-}
-
-LRESULT CALLBACK WndProc (HWND wnd, UINT msg, WPARAM w, LPARAM l)
-{
-    static short xChar, yChar;
-    static RECT  rectHola;
-    static char* strHola = "Hola";
-    HDC dc;
-    PAINTSTRUCT ps;
-    TEXTMETRIC tm;
-
-    switch (msg){
-    case WM_CREATE:
-	dc = GetDC (wnd);
-	GetTextMetrics (dc, &tm);
-	xChar = tm.tmAveCharWidth;
-	yChar = tm.tmHeight;
-	GetTextExtentPoint32( dc, strHola, strlen(strHola), ((LPSIZE)&rectHola) + 1 );
-	OffsetRect( &rectHola, xChar, yChar );
-	ReleaseDC (wnd, dc);
-	break;
-
-    case WM_HSCROLL:
-    case WM_VSCROLL:
-	InvalidateRect(wnd, &rectHola, TRUE );
-        ScrollChildren(wnd, msg, w, l);
-        return 0;
-
-    case WM_PAINT:
-	dc = BeginPaint (wnd, &ps);
-	Write (dc, xChar, yChar, strHola);
-	EndPaint (wnd, &ps);
-	break;
-
-    case WM_DESTROY:
-	PostQuitMessage (0);
-	break;
-
-    default:
-	return DefWindowProc (wnd, msg, w, l);
-    }
-    return 0l;
-}
-
-LRESULT CALLBACK WndProc2 (HWND wnd, UINT msg, WPARAM w, LPARAM l)
-{
-    static short xChar, yChar;
-    static RECT  rectInfo;
-    char buf[128];
-    HDC dc;
-    PAINTSTRUCT ps;
-    TEXTMETRIC tm;
-
-    switch (msg){
-    case WM_CREATE:
-	dc = GetDC (wnd);
-	GetTextMetrics (dc, &tm);
-	xChar = tm.tmAveCharWidth;
-	yChar = tm.tmHeight;
-	ReleaseDC (wnd, dc);
-	break;
-
-    case WM_PAINT:
-	dc = BeginPaint (wnd, &ps);
-        sprintf(buf,"ps.rcPaint = {left = %d, top = %d, right = %d, bottom = %d}",
-                ps.rcPaint.left,ps.rcPaint.top,ps.rcPaint.right,ps.rcPaint.bottom);
-	rectInfo.left = rectInfo.top = 0;
-	GetTextExtentPoint32 (dc, buf, strlen(buf), ((LPSIZE)&rectInfo) + 1 );
-	OffsetRect (&rectInfo, xChar, yChar );
-	Write (dc, xChar, yChar, buf);
-	EndPaint (wnd, &ps);
-	break;
-
-    case WM_MOVE:
-    case WM_SIZE:
-	InvalidateRect( wnd, &rectInfo, TRUE );
-	/*CalcChildScroll16( (UINT16)GetParent(wnd), SB_BOTH );*/
-	break;
-
-    case WM_DESTROY:
-	PostQuitMessage (0);
-	break;
-
-    default:
-	return DefWindowProc (wnd, msg, w, l);
-    }
-    return 0l;
-}
-
-int PASCAL WinMain (HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
-{
-    HWND     wnd,wnd2;
-    MSG      msg;
-    WNDCLASS class;
-    char className[] = "class";  /* To make sure className >= 0x10000 */
-    char class2Name[] = "class2";
-    char winName[] = "Test app";
-
-    if (!prev){
-	class.style = CS_HREDRAW | CS_VREDRAW;
-	class.lpfnWndProc = WndProc;
-	class.cbClsExtra = 0;
-	class.cbWndExtra = 0;
-	class.hInstance  = inst;
-	class.hIcon      = LoadIcon (0, IDI_APPLICATION);
-	class.hCursor    = LoadCursor (0, IDC_ARROW);
-	class.hbrBackground = GetStockObject (WHITE_BRUSH);
-	class.lpszMenuName = NULL;
-	class.lpszClassName = className;
-        if (!RegisterClass (&class))
-	    return FALSE;
-    }
-
-    wnd = CreateWindow (className, winName, WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_VSCROLL | WS_HSCROLL,
-			CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, 0, 
-			0, inst, 0);
-
-    if (!prev){
-        class.lpfnWndProc = WndProc2;
-	class.lpszClassName = class2Name;
-	class.hbrBackground = GetStockObject(GRAY_BRUSH);
-        if (!RegisterClass (&class))
-	    return FALSE;
-    }
-
-    wnd2= CreateWindow (class2Name,"Child window", WS_CAPTION | WS_CHILD | WS_THICKFRAME, 
-                        50, 50, 350, 100, wnd, 0, inst, 0);
-
-    ShowWindow (wnd, show);
-    UpdateWindow (wnd);
-    ShowWindow (wnd2, show);
-    UpdateWindow (wnd2);
-
-    while (GetMessage (&msg, 0, 0, 0)){
-	TranslateMessage (&msg);
-	DispatchMessage (&msg);
-    }
-    return 0;
-}
diff --git a/libtest/hello5.c b/libtest/hello5.c
deleted file mode 100644
index c96350c..0000000
--- a/libtest/hello5.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * This example demonstrates dynamical loading of (internal) Win32 DLLS.
- *
- * Copyright 1998 Marcus Meissner
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#include <stdio.h>
-#include <windows.h>
-
-int PASCAL WinMain (HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
-{
-	SYSTEM_INFO	si;
-	void (CALLBACK *fnGetSystemInfo)(LPSYSTEM_INFO si);
-	HMODULE	kernel32;
-
-	kernel32 = LoadLibrary("KERNEL32");
-	if (!kernel32) {
-		fprintf(stderr,"FATAL: could not load KERNEL32!\n");
-		return 0;
-	}
-	fnGetSystemInfo = (void*)GetProcAddress(kernel32,"GetSystemInfo");
-	if (!fnGetSystemInfo) {
-		fprintf(stderr,"FATAL: could not find GetSystemInfo!\n");
-		return 0;
-	}
-	fnGetSystemInfo(&si);
-	fprintf(stderr,"QuerySystemInfo returns:\n");
-	fprintf(stderr,"	wProcessorArchitecture: %d\n",si.u.s.wProcessorArchitecture);
-	fprintf(stderr,"	dwPageSize: %ld\n",si.dwPageSize);
-	fprintf(stderr,"	lpMinimumApplicationAddress: %p\n",si.lpMinimumApplicationAddress);
-	fprintf(stderr,"	lpMaximumApplicationAddress: %p\n",si.lpMaximumApplicationAddress);
-	fprintf(stderr,"	dwActiveProcessorMask: %ld\n",si.dwActiveProcessorMask);
-	fprintf(stderr,"	dwNumberOfProcessors: %ld\n",si.dwNumberOfProcessors);
-	fprintf(stderr,"	dwProcessorType: %ld\n",si.dwProcessorType);
-	fprintf(stderr,"	dwAllocationGranularity: %ld\n",si.dwAllocationGranularity);
-	fprintf(stderr,"	wProcessorLevel: %d\n",si.wProcessorLevel);
-	fprintf(stderr,"	wProcessorRevision: %d\n",si.wProcessorRevision);
-	return 0;
-}
diff --git a/libtest/new.c b/libtest/new.c
deleted file mode 100644
index 85f8165..0000000
--- a/libtest/new.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Copyright 1996 Jim Peterson
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#include <windows.h>
-
-HANDLE ghInstance;
-
-
-LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM);
-LRESULT CALLBACK ChildProc (HWND, UINT, WPARAM, LPARAM);
-
-int PASCAL WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
-		    LPSTR lpszCmdParam, int nCmdShow)
-    {
-    char szAppName[] = "ClassLook" ;
-    HWND        hwnd ;
-    MSG		msg ;
-    WNDCLASS    wndclass ;
-
-    ghInstance = hInstance;
-    if (!hPrevInstance)
-	 {
-	 wndclass.style		= CS_HREDRAW | CS_VREDRAW ;
-	 wndclass.lpfnWndProc	= WndProc ;
-	 wndclass.cbClsExtra	= 0 ;
-	 wndclass.cbWndExtra	= 0 ;
-	 wndclass.hInstance	= hInstance ;
-	 wndclass.hIcon		= LoadIcon (NULL, IDI_APPLICATION) ;
-	 wndclass.hCursor	= LoadCursor (NULL, IDC_ARROW) ;
-	 wndclass.hbrBackground	= GetStockObject (WHITE_BRUSH) ;
-	 wndclass.lpszMenuName	= NULL ;
-	 wndclass.lpszClassName	= szAppName ;
-
-	 RegisterClass (&wndclass) ;
-	 }
-
-    hwnd = CreateWindow (szAppName,	/* window class name */
-		  szAppName,		/* window caption */
-		  WS_OVERLAPPEDWINDOW,	/* window style */
-		  CW_USEDEFAULT,	/* initial x position */
-		  CW_USEDEFAULT,	/* initial y position */
-		  600,	/* initial x size */
-		  400,	/* initial y size */
-		  NULL,			/* parent window handle */
-		  NULL,			/* window menu handle */
-		  hInstance,		/* program instance handle */
-		  NULL) ;		/* creation parameters */
-
-    ShowWindow (hwnd, nCmdShow) ;
-    UpdateWindow (hwnd) ;
-
-    while (GetMessage (&msg, NULL, 0, 0))
-	 {
-	 TranslateMessage (&msg) ;
-	 DispatchMessage (&msg) ;
-	 }
-    return msg.wParam ;
-    }
-
-LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
-    {
-    HDC		hdc ;
-    PAINTSTRUCT	ps ;
-    RECT	rect ;
-    WNDCLASS    wndclass ;
-    char clsName[] = "SecondClass";
-
-    static HWND	hChild;
-
-    switch (message)
-	 {
-	 case WM_CREATE :
-	     wndclass.style		= CS_PARENTDC | CS_HREDRAW | CS_VREDRAW;
-    	     wndclass.lpfnWndProc	= ChildProc ;
-    	     wndclass.cbClsExtra	= 0 ;
-    	     wndclass.cbWndExtra	= 0 ;
-    	     wndclass.hInstance		= ghInstance ;
-    	     wndclass.hIcon		= NULL ;
-    	     wndclass.hCursor		= LoadCursor (NULL, IDC_CROSS) ;
-    	     wndclass.hbrBackground	= GetStockObject (LTGRAY_BRUSH) ;
-    	     wndclass.lpszMenuName	= NULL ;
-    	     wndclass.lpszClassName	= clsName;
-
-	     RegisterClass (&wndclass);
-              
-             hChild = CreateWindow(clsName,"Child Window",
-                 WS_CHILD | WS_VISIBLE | WS_BORDER,
-                 10, 10, 580, 380, hwnd, NULL, ghInstance, NULL);
-             ShowWindow(hChild, SW_SHOW);
-	 case WM_PAINT :
-	      hdc = BeginPaint (hwnd, &ps) ;
-
-	      GetClientRect (hwnd, &rect) ;
-
-	      DrawText (hdc, "Hello, Windows!", -1, &rect,
-			DT_SINGLELINE | DT_CENTER | DT_VCENTER) ;
-
-	      EndPaint (hwnd, &ps);
-	      return 0 ;
-
-	 case WM_DESTROY :
-	      PostQuitMessage (0) ;
-	      return 0 ;
-	 }
-    return DefWindowProc (hwnd, message, wParam, lParam) ;
-    }
-
-LRESULT CALLBACK ChildProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
-{
-    HDC			hDC;
-    PAINTSTRUCT		ps;
-    WNDCLASS		wndClass;
-    char		*classes[]={"EDIT","BUTTON","LISTBOX","STATIC","SCROLLBAR","COMBOBOX","COMBOLBOX", NULL};
-    char**		curr;
-    char		buf[256];
-    RECT	rect ;
-    int i;
-
-    switch (message) {
-        case WM_PAINT:
-            curr = classes;
-            i=0;
-            hDC = BeginPaint(hwnd, &ps);
-            SelectObject(hDC,GetStockObject(ANSI_FIXED_FONT));
-            while (*curr) {
-              wsprintf(buf,"%12s:",*curr);
-              GetClassInfo(NULL, *curr, &wndClass);
-              if(wndClass.style&CS_VREDRAW)  lstrcat(buf," | CS_VREDRAW");
-              if(wndClass.style&CS_HREDRAW)  lstrcat(buf," | CS_HREDRAW" );
-              if(wndClass.style&CS_KEYCVTWINDOW) lstrcat(buf," | CS_KEYCVTWINDOW" );
-              if(wndClass.style&CS_DBLCLKS) lstrcat(buf," | CS_DBLCLKS" );
-              if(wndClass.style&CS_OWNDC) lstrcat(buf," | CS_OWNDC" );
-              if(wndClass.style&CS_CLASSDC) lstrcat(buf," | CS_CLASSDC" );
-              if(wndClass.style&CS_PARENTDC) lstrcat(buf," | CS_PARENTDC" );
-              if(wndClass.style&CS_NOKEYCVT) lstrcat(buf," | CS_NOKEYCVT" );
-              if(wndClass.style&CS_NOCLOSE) lstrcat(buf," | CS_NOCLOSE" );
-              if(wndClass.style&CS_SAVEBITS) lstrcat(buf," | CS_SAVEBITS" );
-              if(wndClass.style&CS_GLOBALCLASS) lstrcat(buf," | CS_GLOBALCLASS");
-	      GetClientRect (hwnd, &rect) ;
-	      TextOut (hDC, 5,20+i,buf,lstrlen(buf)) ;
-              i += 15;
-              curr++;
-            }
-/*            EndPaint(hwnd, &ps);
-            break;
-            hDC = BeginPaint(hwnd, &ps);
-*/
-            MoveToEx(hDC, 0, 0, NULL);
-            LineTo(hDC, 500, 500);
-            EndPaint(hwnd, &ps);
-            break;
-        default:
-            return DefWindowProc (hwnd, message, wParam, lParam) ;
-    }
-    return (0L);
-}
-
diff --git a/libtest/rolex.c b/libtest/rolex.c
deleted file mode 100644
index a3afdad..0000000
--- a/libtest/rolex.c
+++ /dev/null
@@ -1,269 +0,0 @@
-/*********************************************************************
- *                                                                   *
- *  rolex.c: Windows clock application for WINE (by Jim Peterson)    *
- *                                                                   *
- *  This is a translation of a Turbo Pascal OWL application I made   *
- *  once, so it's a little flaky (tons of globals, functions that    *
- *  could have been in-lined, etc.).  The source code should easily  *
- *  compile with a standard Win32 C compiler.                        *
- *                                                                   *
- *  To try it out, type 'make rolex'.                                *
- *
- * Copyright Jim Peterson
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *********************************************************************/
-
-#include <math.h>
-#include <string.h>
-#include "windows.h"
-
-char AppName[] = "Rolex";
-char WindowName[] = "Rolex";
-int WindowWidth = 100;
-int WindowHeight = 121;
-COLORREF FaceColor = RGB(192,192,192);
-COLORREF HandColor = RGB(0,0,0);
-COLORREF EtchColor = RGB(0,0,0);
-
-float Pi=3.1415926;
-
-typedef struct
-{
-  int StartX,StartY,EndX,EndY;
-} HandData;
-
-int MaxX,MaxY;
-HandData OldSecond,OldHour,OldMinute;
-
-HWND HWindow;
-
-void DrawFace(HDC dc)
-{
-  int MidX, MidY, t;
-
-  MidX=MaxX/2;
-  MidY=MaxY/2;
-  SelectObject(dc,CreateSolidBrush(FaceColor));
-  SelectObject(dc,CreatePen(PS_SOLID,1,EtchColor));
-  Ellipse(dc,0,0,MaxX,MaxY);
-
-  for(t=0; t<12; t++)
-  {
-    MoveToEx(dc,MidX+sin(t*Pi/6)*0.9*MidX,MidY-cos(t*Pi/6)*0.9*MidY,NULL);
-    LineTo(dc,MidX+sin(t*Pi/6)*0.8*MidX,MidY-cos(t*Pi/6)*0.8*MidY);
-  }
-  if(MaxX>64 && MaxY>64)
-    for(t=0; t<60; t++)
-      SetPixel(dc,MidX+sin(t*Pi/30)*0.9*MidX,MidY-cos(t*Pi/30)*0.9*MidY
-	       ,EtchColor);
-  DeleteObject(SelectObject(dc,GetStockObject(NULL_BRUSH)));
-  DeleteObject(SelectObject(dc,GetStockObject(NULL_PEN)));
-  memset(&OldSecond,0,sizeof(OldSecond));
-  memset(&OldMinute,0,sizeof(OldMinute));
-  memset(&OldHour,0,sizeof(OldHour));
-}
-
-void DrawHourHand(HDC dc)
-{
-  MoveToEx(dc, OldHour.StartX, OldHour.StartY, NULL);
-  LineTo(dc, OldHour.EndX, OldHour.EndY);
-}
-
-void DrawMinuteHand(HDC dc)
-{
-  MoveToEx(dc, OldMinute.StartX, OldMinute.StartY, NULL);
-  LineTo(dc, OldMinute.EndX, OldMinute.EndY);
-}
-
-void DrawSecondHand(HDC dc)
-{
-  MoveToEx(dc, OldSecond.StartX, OldSecond.StartY, NULL);
-  LineTo(dc, OldSecond.EndX, OldSecond.EndY);
-}
-
-BOOL UpdateHourHand(HDC dc,int MidX,int MidY,int XExt,int YExt,WORD Pos)
-{
-  int Sx, Sy, Ex, Ey;
-  BOOL rv;
-
-  rv = FALSE;
-  Sx = MidX; Sy = MidY;
-  Ex = MidX+sin(Pos*Pi/6000)*XExt;
-  Ey = MidY-cos(Pos*Pi/6000)*YExt;
-  rv = ( Sx!=OldHour.StartX || Ex!=OldHour.EndX || 
-	 Sy!=OldHour.StartY || Ey!=OldHour.EndY );
-  if(rv)DrawHourHand(dc);
-  OldHour.StartX = Sx; OldHour.EndX = Ex;
-  OldHour.StartY = Sy; OldHour.EndY = Ey;
-  return rv;
-}
-
-BOOL UpdateMinuteHand(HDC dc,int MidX,int MidY,int XExt,int YExt,WORD Pos)
-{
-  int Sx, Sy, Ex, Ey;
-  BOOL rv;
-
-  rv = FALSE;
-  Sx = MidX; Sy = MidY;
-  Ex = MidX+sin(Pos*Pi/30000)*XExt;
-  Ey = MidY-cos(Pos*Pi/30000)*YExt;
-  rv = ( Sx!=OldMinute.StartX || Ex!=OldMinute.EndX ||
-	 Sy!=OldMinute.StartY || Ey!=OldMinute.EndY );
-  if(rv)DrawMinuteHand(dc);
-  OldMinute.StartX = Sx; OldMinute.EndX = Ex;
-  OldMinute.StartY = Sy; OldMinute.EndY = Ey;
-  return rv;
-}
-
-BOOL UpdateSecondHand(HDC dc,int MidX,int MidY,int XExt,int YExt,WORD Pos)
-{
-  int Sx, Sy, Ex, Ey;
-  BOOL rv;
-
-  rv = FALSE;
-  Sx = MidX; Sy = MidY;
-  Ex = MidX+sin(Pos*Pi/3000)*XExt;
-  Ey = MidY-cos(Pos*Pi/3000)*YExt;
-  rv = ( Sx!=OldSecond.StartX || Ex!=OldSecond.EndX ||
-	 Sy!=OldSecond.StartY || Ey!=OldSecond.EndY );
-  if(rv)DrawSecondHand(dc);
-  OldSecond.StartX = Sx; OldSecond.EndX = Ex;
-  OldSecond.StartY = Sy; OldSecond.EndY = Ey;
-  return rv;
-}
-
-void Idle(HDC idc)
-{
-  SYSTEMTIME st;
-  WORD H, M, S, F;
-  int MidX, MidY;
-  HDC dc;
-  BOOL Redraw;
-
-  if(idc)
-    dc=idc;
-  else
-    dc=GetDC(HWindow);
-  if(!dc)return;
-
-  GetLocalTime(&st);
-  H = st.wHour;
-  M = st.wMinute;
-  S = st.wSecond;
-  F = st.wMilliseconds / 10;
-  F = F + S*100;
-  M = M*1000+F/6;
-  H = H*1000+M/60;
-  MidX = MaxX/2;
-  MidY = MaxY/2;
-  SelectObject(dc,CreatePen(PS_SOLID,1,FaceColor));
-  Redraw = FALSE;
-  if(UpdateHourHand(dc,MidX,MidY,MidX*0.5,MidY*0.5,H)) Redraw = TRUE;
-  if(UpdateMinuteHand(dc,MidX,MidY,MidX*0.65,MidY*0.65,M)) Redraw = TRUE;
-  if(UpdateSecondHand(dc,MidX,MidY,MidX*0.79,MidY*0.79,F)) Redraw = TRUE;
-  DeleteObject(SelectObject(dc,CreatePen(PS_SOLID,1,HandColor)));
-  if(Redraw)
-  {
-    DrawSecondHand(dc);
-    DrawMinuteHand(dc);
-    DrawHourHand(dc);
-  }
-  DeleteObject(SelectObject(dc,GetStockObject(NULL_PEN)));
-  if(!idc) ReleaseDC(HWindow,dc);
-}
-
-LRESULT CALLBACK ProcessAppMsg(HWND wnd,UINT msg,WPARAM w,LPARAM l)
-{
-  PAINTSTRUCT PaintInfo;
-  HDC dc;
-
-  switch(msg)
-  {
-  case WM_PAINT:
-    if(GetUpdateRect(wnd,NULL,FALSE))
-    {
-      dc=BeginPaint(wnd,&PaintInfo);
-      DrawFace(dc);
-      Idle(dc);
-      EndPaint(wnd,&PaintInfo);
-    }
-    break;
-
-  case WM_SIZE:
-    MaxX = LOWORD(l);
-    MaxY = HIWORD(l);
-    break;
-
-  case WM_DESTROY:
-    PostQuitMessage (0);
-    break;
-
-  default:
-    return DefWindowProc (wnd, msg, w, l);
-  }
-  return 0l;
-}
-
-WPARAM MessageLoop()
-{
-  MSG msg;
-
-  while(1)
-  {
-    Sleep(1); /* sleep 1 millisecond */
-    if(PeekMessage(&msg,0,0,0,PM_REMOVE))
-    {
-      if(msg.message == WM_QUIT) return msg.wParam;
-      TranslateMessage(&msg);
-      DispatchMessage(&msg);
-    }
-    else
-      Idle(NULL);
-  }
-}
-
-int PASCAL WinMain (HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
-{
-  WNDCLASS class;
-  if(!prev)
-  {
-    class.style = CS_HREDRAW | CS_VREDRAW;
-    class.lpfnWndProc = ProcessAppMsg;
-    class.cbClsExtra = 0;
-    class.cbWndExtra = 0;
-    class.hInstance  = inst;
-    class.hIcon      = 0; /* Draw my own icon */
-    class.hCursor    = LoadCursor (0, IDC_ARROW);
-    class.hbrBackground = (HBRUSH)(COLOR_BACKGROUND + 1);
-    class.lpszMenuName = 0;
-    class.lpszClassName = AppName;
-  }
-  if (!RegisterClass (&class)) return -1;
-
-  HWindow=CreateWindowEx(WS_EX_TOPMOST,AppName,WindowName,WS_OVERLAPPEDWINDOW,
-			 CW_USEDEFAULT,CW_USEDEFAULT,WindowWidth,WindowHeight,
-			 0,0,inst,0);
-  memset(&OldSecond,0,sizeof(OldSecond));
-  memset(&OldMinute,0,sizeof(OldMinute));
-  memset(&OldHour,0,sizeof(OldHour));
-  MaxX = WindowWidth;
-  MaxY = WindowHeight;
-
-  ShowWindow (HWindow, show);
-  UpdateWindow (HWindow);
-
-  return MessageLoop();
-}
diff --git a/libtest/volinfo.c b/libtest/volinfo.c
deleted file mode 100644
index 5d0a770..0000000
--- a/libtest/volinfo.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * This test program was copied from the former file documentation/cdrom-label
- *
- * Copyright 1998 Petter Reinholdtsen
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#include <windows.h>
-#include <stdio.h>
-#include <string.h> /* for strcat() */
-
-int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
-                   LPSTR lpszCmdLine, int nCmdShow)
-{
-    char  drive, root[]="C:\\", label[1002], fsname[1002];
-    DWORD serial, flags, filenamelen, labellen = 1000, fsnamelen = 1000;
-
-    printf("Drive Serial     Flags      Filename-Length "
-           "Label                 Fsname\n");
-    for (drive = 'A'; drive <= 'Z'; drive++)
-    {
-        root[0] = drive;
-        if (GetVolumeInformation(root,label,labellen,&serial,
-                                  &filenamelen,&flags,fsname,fsnamelen))
-        {
-            strcat(label,"\""); strcat (fsname,"\"");
-            printf("%c:\\   0x%08lx 0x%08lx %15ld \"%-20s \"%-20s\n",
-                   drive, (long) serial, (long) flags, (long) filenamelen,
-                   label, fsname);
-        }
-    }
-    return 0;
-}
diff --git a/programs/Makefile.in b/programs/Makefile.in
index 5594505..76fe18e 100644
--- a/programs/Makefile.in
+++ b/programs/Makefile.in
@@ -6,6 +6,7 @@
 
 INSTALLSUBDIRS = \
 	control \
+	expand \
 	notepad \
 	progman \
 	regedit \
diff --git a/programs/expand/.cvsignore b/programs/expand/.cvsignore
new file mode 100644
index 0000000..c91b366
--- /dev/null
+++ b/programs/expand/.cvsignore
@@ -0,0 +1,3 @@
+Makefile
+expand.dbg.c
+expand.spec.c
diff --git a/programs/expand/Makefile.in b/programs/expand/Makefile.in
new file mode 100644
index 0000000..e4991b3
--- /dev/null
+++ b/programs/expand/Makefile.in
@@ -0,0 +1,13 @@
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../..
+SRCDIR    = @srcdir@
+VPATH     = @srcdir@
+MODULE    = expand
+APPMODE   = cui
+IMPORTS   = lz32 kernel32
+
+C_SRCS = expand.c
+
+@MAKE_PROG_RULES@
+
+### Dependencies:
diff --git a/libtest/expand.c b/programs/expand/expand.c
similarity index 62%
rename from libtest/expand.c
rename to programs/expand/expand.c
index f1daf8c..94b7183 100644
--- a/libtest/expand.c
+++ b/programs/expand/expand.c
@@ -1,5 +1,6 @@
 /*
  * Copyright 1997 Victor Schneider
+ * Copyright 2002 Alexandre Julliard
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -22,32 +23,29 @@
 #include <windows.h>
 #include <lzexpand.h>
 
-int PASCAL WinMain(HINSTANCE hinstCurrent,
-				HINSTANCE hinstPrevious,
-				LPSTR lpCmdLine,
-				int nCmdShow)
+int main(int argc, char *argv[])
 {
   OFSTRUCT SourceOpenStruct1, SourceOpenStruct2;
-  char OriginalName[256];
-  char FAR *lpzDestFile;
   DWORD dwreturn;
   HFILE hSourceFile, hDestFile;
-  /* Most Windows compilers have something like this: */
-  extern int _ARGC;
-  extern char **_ARGV;
 
-  hSourceFile = LZOpenFile(_ARGV[1], (LPOFSTRUCT) &SourceOpenStruct1, OF_READ);
-  if ((_ARGC == 3) && (_ARGV[2] != NULL))
-	lpzDestFile = _ARGV[2];
-  else {
-  	lpzDestFile = OriginalName;
-  	GetExpandedName(_ARGV[1], lpzDestFile);
-  };
-  hDestFile = LZOpenFile(lpzDestFile, (LPOFSTRUCT) &SourceOpenStruct2,
-			OF_CREATE | OF_WRITE);
+  if (argc < 2)
+  {
+      fprintf( stderr, "Usage: %s infile [outfile]\n", argv[0] );
+      return 1;
+  }
+  hSourceFile = LZOpenFile(argv[1], &SourceOpenStruct1, OF_READ);
+  if (argv[2])
+      hDestFile = LZOpenFile(argv[2], &SourceOpenStruct2, OF_CREATE | OF_WRITE);
+  else
+  {
+      char OriginalName[MAX_PATH];
+      GetExpandedName(argv[1], OriginalName);
+      hDestFile = LZOpenFile(OriginalName, &SourceOpenStruct2, OF_CREATE | OF_WRITE);
+  }
   dwreturn = LZCopy(hSourceFile, hDestFile);
   if (dwreturn != 0)
-	  fprintf(stderr,"LZCopy failed: return is %ld\n",dwreturn);
+      fprintf(stderr,"LZCopy failed: return is %ld\n",dwreturn);
   LZClose(hSourceFile);
   LZClose(hDestFile);
   return dwreturn;