Index: trunk/src/NTDLL/makefile
===================================================================
--- trunk/src/NTDLL/makefile	(revision 45)
+++ trunk/src/NTDLL/makefile	(revision 46)
@@ -1,3 +1,3 @@
-# $Id: makefile,v 1.2 1999-06-01 21:52:15 phaller Exp $
+# $Id: makefile,v 1.3 1999-06-07 20:57:55 sandervl Exp $
 
 #
@@ -28,4 +28,5 @@
        sec.obj     \
        sync.obj    \
+       initterm.obj \
        time.obj
 
@@ -47,24 +48,25 @@
 
 
-ntdll.obj:  .\ntdll.c  .\ntdll.h
+ntdll.obj:  .\ntdll.cpp  .\ntdll.h
 
-file.obj:   .\file.c   .\ntdll.h
+file.obj:   .\file.cpp   .\ntdll.h
 
-nt.obj:     .\nt.c     .\ntdll.h
+nt.obj:     .\nt.cpp     .\ntdll.h
 
-om.obj:     .\om.c     .\ntdll.h
+om.obj:     .\om.cpp     .\ntdll.h
 
-reg.obj:    .\reg.c    .\ntdll.h
+reg.obj:    .\reg.cpp    .\ntdll.h
 
-rtl.obj:    .\rtl.c    .\ntdll.h
+rtl.obj:    .\rtl.cpp    .\ntdll.h
 
-rtlstr.obj: .\rtlstr.c .\ntdll.h
+rtlstr.obj: .\rtlstr.cpp .\ntdll.h
 
-sec.obj:    .\sec.c    .\ntdll.h
+sec.obj:    .\sec.cpp    .\ntdll.h
 
-sync.obj:   .\sync.c   .\ntdll.h
+sync.obj:   .\sync.cpp   .\ntdll.h
 
-time.obj:   .\time.c   .\ntdll.h
+time.obj:   .\time.cpp   .\ntdll.h
 
+initterm.obj: .\initterm.cpp
 
 
Index: trunk/src/capi2032/capi2032.cpp
===================================================================
--- trunk/src/capi2032/capi2032.cpp	(revision 45)
+++ trunk/src/capi2032/capi2032.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: capi2032.cpp,v 1.1 1999-05-24 20:19:34 ktk Exp $ */
-
 /*
  * CAPI2032 implementation
Index: trunk/src/capi2032/capi2032.h
===================================================================
--- trunk/src/capi2032/capi2032.h	(revision 45)
+++ trunk/src/capi2032/capi2032.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: capi2032.h,v 1.1 1999-05-24 20:19:34 ktk Exp $ */
-
 /*
  * CAPI2032 implementation
Index: trunk/src/capi2032/makefile
===================================================================
--- trunk/src/capi2032/makefile	(revision 45)
+++ trunk/src/capi2032/makefile	(revision 46)
@@ -1,4 +1,2 @@
-# $Id: makefile,v 1.1 1999-05-24 20:19:34 ktk Exp $ 
-
 #
 # PD-Win32 API 
@@ -39,5 +37,5 @@
 
 capi2032.obj: capi2032.cpp capi2032.h
-initterm.obj: initterm.c
+initterm.obj: initterm.cpp
 
 clean:
Index: trunk/src/comctl32/comctl32.h
===================================================================
--- trunk/src/comctl32/comctl32.h	(revision 45)
+++ trunk/src/comctl32/comctl32.h	(revision 46)
@@ -20,7 +20,14 @@
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* registers window classes inside this DLL */
-void RegisterCOMCTL32WindowClasses(unsigned long hinstDLL);
-
+void CDECL RegisterCOMCTL32WindowClasses(unsigned long hinstDLL);
+void CDECL UnregisterCOMCTL32WindowClasses(void);
+#ifdef __cplusplus
+}
+#endif
 
 
Index: trunk/src/comctl32/makefile
===================================================================
--- trunk/src/comctl32/makefile	(revision 45)
+++ trunk/src/comctl32/makefile	(revision 46)
@@ -41,5 +41,5 @@
 
 comctl32.obj: comctl32.c
-initterm.obj: initterm.c
+initterm.obj: initterm.cpp
 progress.obj: progress.c
 comctl32undoc.obj: comctl32undoc.c
@@ -58,5 +58,5 @@
 header.obj: header.c
 updown.obj: updown.c
-rebar:obj: rebar.c
+rebar.obj: rebar.c
 cache.obj: cache.c
 trackbar.obj: trackbar.c
Index: trunk/src/comdlg32/comdlg32.cpp
===================================================================
--- trunk/src/comdlg32/comdlg32.cpp	(revision 45)
+++ trunk/src/comdlg32/comdlg32.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: comdlg32.cpp,v 1.2 1999-05-31 22:08:08 phaller Exp $ */
-
 /*
  * COMDLG32 implementation
@@ -10,9 +8,8 @@
  *
  */
+#include <os2win.h>
 #include <stdarg.h>
-
-#include <os2win.h>
 #include <misc.h>
-#include "wndproc.h"
+#include <wndproc.h>
 
 //******************************************************************************
Index: trunk/src/comdlg32/makefile
===================================================================
--- trunk/src/comdlg32/makefile	(revision 45)
+++ trunk/src/comdlg32/makefile	(revision 46)
@@ -1,4 +1,2 @@
-# $Id: makefile,v 1.1 1999-05-24 20:19:35 ktk Exp $ 
-
 #
 # PD-Win32 API 
@@ -38,5 +36,5 @@
 
 comdlg32.obj: comdlg32.cpp
-initterm.obj: initterm.c
+initterm.obj: initterm.cpp
 
 clean:
Index: trunk/src/ddraw/OS2CLIPPER.CPP
===================================================================
--- trunk/src/ddraw/OS2CLIPPER.CPP	(revision 45)
+++ trunk/src/ddraw/OS2CLIPPER.CPP	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: OS2CLIPPER.CPP,v 1.1 1999-05-24 20:19:36 ktk Exp $ */
-
 /*
  * DirectDraw Clipper Class
Index: trunk/src/ddraw/OS2CLIPPER.H
===================================================================
--- trunk/src/ddraw/OS2CLIPPER.H	(revision 45)
+++ trunk/src/ddraw/OS2CLIPPER.H	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: OS2CLIPPER.H,v 1.1 1999-05-24 20:19:36 ktk Exp $ */
-
 /*
  * DirectDraw Clipper Class
Index: trunk/src/ddraw/OS2D3D.CPP
===================================================================
--- trunk/src/ddraw/OS2D3D.CPP	(revision 45)
+++ trunk/src/ddraw/OS2D3D.CPP	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: OS2D3D.CPP,v 1.1 1999-05-24 20:19:36 ktk Exp $ */
-
 //******************************************************************************
 //******************************************************************************
Index: trunk/src/ddraw/OS2DDRAW.CPP
===================================================================
--- trunk/src/ddraw/OS2DDRAW.CPP	(revision 45)
+++ trunk/src/ddraw/OS2DDRAW.CPP	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: OS2DDRAW.CPP,v 1.1 1999-05-24 20:19:36 ktk Exp $ */
-
 /*
  * DirectDraw main class
Index: trunk/src/ddraw/OS2DDRAW.H
===================================================================
--- trunk/src/ddraw/OS2DDRAW.H	(revision 45)
+++ trunk/src/ddraw/OS2DDRAW.H	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: OS2DDRAW.H,v 1.1 1999-05-24 20:19:36 ktk Exp $ */
-
 /*
  * DirectDraw main class
Index: trunk/src/ddraw/OS2PALETTE.CPP
===================================================================
--- trunk/src/ddraw/OS2PALETTE.CPP	(revision 45)
+++ trunk/src/ddraw/OS2PALETTE.CPP	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: OS2PALETTE.CPP,v 1.1 1999-05-24 20:19:36 ktk Exp $ */
-
 /*
  * DirectDraw Palette class
Index: trunk/src/ddraw/OS2PALETTE.H
===================================================================
--- trunk/src/ddraw/OS2PALETTE.H	(revision 45)
+++ trunk/src/ddraw/OS2PALETTE.H	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: OS2PALETTE.H,v 1.1 1999-05-24 20:19:37 ktk Exp $ */
-
 /*
  * DirectDraw Palette class
Index: trunk/src/ddraw/OS2PALSET.CPP
===================================================================
--- trunk/src/ddraw/OS2PALSET.CPP	(revision 45)
+++ trunk/src/ddraw/OS2PALSET.CPP	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: OS2PALSET.CPP,v 1.1 1999-05-24 20:19:37 ktk Exp $ */
-
 /*
  * OS/2 Palette functions
Index: trunk/src/ddraw/OS2PALSET.H
===================================================================
--- trunk/src/ddraw/OS2PALSET.H	(revision 45)
+++ trunk/src/ddraw/OS2PALSET.H	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: OS2PALSET.H,v 1.1 1999-05-24 20:19:37 ktk Exp $ */
-
 /*
  * OS/2 Palette function definitions
Index: trunk/src/ddraw/OS2SURFACE.CPP
===================================================================
--- trunk/src/ddraw/OS2SURFACE.CPP	(revision 45)
+++ trunk/src/ddraw/OS2SURFACE.CPP	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: OS2SURFACE.CPP,v 1.1 1999-05-24 20:19:37 ktk Exp $ */
-
 /*
  * DirectDraw Surface class
Index: trunk/src/ddraw/OS2SURFACE.H
===================================================================
--- trunk/src/ddraw/OS2SURFACE.H	(revision 45)
+++ trunk/src/ddraw/OS2SURFACE.H	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: OS2SURFACE.H,v 1.1 1999-05-24 20:19:37 ktk Exp $ */
-
 /*
  * DirectDraw Surface class
Index: trunk/src/ddraw/OS2UTIL.CPP
===================================================================
--- trunk/src/ddraw/OS2UTIL.CPP	(revision 45)
+++ trunk/src/ddraw/OS2UTIL.CPP	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: OS2UTIL.CPP,v 1.1 1999-05-24 20:19:37 ktk Exp $ */
-
 /*
  * OS/2 Utility functions
Index: trunk/src/ddraw/OS2UTIL.H
===================================================================
--- trunk/src/ddraw/OS2UTIL.H	(revision 45)
+++ trunk/src/ddraw/OS2UTIL.H	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: OS2UTIL.H,v 1.1 1999-05-24 20:19:37 ktk Exp $ */
-
 /*
  * OS/2 Utility functions
Index: trunk/src/ddraw/asmutil.asm
===================================================================
--- trunk/src/ddraw/asmutil.asm	(revision 45)
+++ trunk/src/ddraw/asmutil.asm	(revision 46)
@@ -1,4 +1,2 @@
-; $Id: asmutil.asm,v 1.1 1999-05-24 20:19:37 ktk Exp $ 
-
 ; asmutil.asm Color key bit blitting for DirectDraw
 ;
Index: trunk/src/ddraw/asmutil.h
===================================================================
--- trunk/src/ddraw/asmutil.h	(revision 45)
+++ trunk/src/ddraw/asmutil.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: asmutil.h,v 1.1 1999-05-24 20:19:37 ktk Exp $ */
-
 /*
  * asmutil.asm function definition
Index: trunk/src/ddraw/ddraw.CPP
===================================================================
--- trunk/src/ddraw/ddraw.CPP	(revision 45)
+++ trunk/src/ddraw/ddraw.CPP	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: ddraw.CPP,v 1.1 1999-05-24 20:19:37 ktk Exp $ */
-
 /*
  * DirectDraw exported APIs
Index: trunk/src/ddraw/makefile
===================================================================
--- trunk/src/ddraw/makefile	(revision 45)
+++ trunk/src/ddraw/makefile	(revision 46)
@@ -1,4 +1,2 @@
-# $Id: makefile,v 1.1 1999-05-24 20:19:37 ktk Exp $ 
-
 #
 # PD-Win32 API 
@@ -84,5 +82,5 @@
     os2ddraw.h 
 
-initterm.obj: initterm.c
+initterm.obj: initterm.cpp
 
 asmutil.obj: asmutil.asm
Index: trunk/src/ddraw/misc.c
===================================================================
--- trunk/src/ddraw/misc.c	(revision 45)
+++ trunk/src/ddraw/misc.c	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: misc.c,v 1.1 1999-05-24 20:19:38 ktk Exp $ */
-
 /*
  * Logging procedures
Index: trunk/src/ddraw/no.h
===================================================================
--- trunk/src/ddraw/no.h	(revision 45)
+++ trunk/src/ddraw/no.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: no.h,v 1.1 1999-05-24 20:19:38 ktk Exp $ */
-
 /*
  * Window.h NO* defines for the ddraw module.
Index: trunk/src/dsound/DSOUND.CPP
===================================================================
--- trunk/src/dsound/DSOUND.CPP	(revision 45)
+++ trunk/src/dsound/DSOUND.CPP	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: DSOUND.CPP,v 1.1 1999-05-24 20:19:38 ktk Exp $ */
-
 /*
  * DirectSound exported APIs
Index: trunk/src/dsound/OS2DSOUND.CPP
===================================================================
--- trunk/src/dsound/OS2DSOUND.CPP	(revision 45)
+++ trunk/src/dsound/OS2DSOUND.CPP	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: OS2DSOUND.CPP,v 1.1 1999-05-24 20:19:38 ktk Exp $ */
-
 /*
  * DirectSound main class
Index: trunk/src/dsound/OS2DSOUND.H
===================================================================
--- trunk/src/dsound/OS2DSOUND.H	(revision 45)
+++ trunk/src/dsound/OS2DSOUND.H	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: OS2DSOUND.H,v 1.1 1999-05-24 20:19:38 ktk Exp $ */
-
 /*
  * DirectSound main class
Index: trunk/src/dsound/OS2SNDBUFFER.CPP
===================================================================
--- trunk/src/dsound/OS2SNDBUFFER.CPP	(revision 45)
+++ trunk/src/dsound/OS2SNDBUFFER.CPP	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: OS2SNDBUFFER.CPP,v 1.1 1999-05-24 20:19:38 ktk Exp $ */
-
 /*
  * DirectSound SoundBuffer class
Index: trunk/src/dsound/OS2SNDBUFFER.H
===================================================================
--- trunk/src/dsound/OS2SNDBUFFER.H	(revision 45)
+++ trunk/src/dsound/OS2SNDBUFFER.H	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: OS2SNDBUFFER.H,v 1.1 1999-05-24 20:19:38 ktk Exp $ */
-
 /*
  * DirectSound SoundBuffer class
Index: trunk/src/dsound/makefile
===================================================================
--- trunk/src/dsound/makefile	(revision 45)
+++ trunk/src/dsound/makefile	(revision 46)
@@ -1,4 +1,2 @@
-# $Id: makefile,v 1.1 1999-05-24 20:19:38 ktk Exp $ 
-
 #
 # PD-Win32 API
@@ -58,5 +56,5 @@
           $(PDWIN32_INCLUDE)\misc.h
 
-initterm.obj: initterm.c
+initterm.obj: initterm.cpp
 
 
Index: trunk/src/dsound/misc.c
===================================================================
--- trunk/src/dsound/misc.c	(revision 45)
+++ trunk/src/dsound/misc.c	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: misc.c,v 1.1 1999-05-24 20:19:38 ktk Exp $ */
-
 /*
  * Logging procedures
Index: trunk/src/dsound/no.h
===================================================================
--- trunk/src/dsound/no.h	(revision 45)
+++ trunk/src/dsound/no.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: no.h,v 1.1 1999-05-24 20:19:39 ktk Exp $ */
-
 /*
  * Window.h NO* defines for the dsound module.
Index: trunk/src/gdi32/CALLBACK.CPP
===================================================================
--- trunk/src/gdi32/CALLBACK.CPP	(revision 45)
+++ trunk/src/gdi32/CALLBACK.CPP	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: CALLBACK.CPP,v 1.1 1999-05-24 20:19:39 ktk Exp $ */
-
 /*
  * GDI32 support code for Line DDA callbacks
Index: trunk/src/gdi32/CALLBACK.H
===================================================================
--- trunk/src/gdi32/CALLBACK.H	(revision 45)
+++ trunk/src/gdi32/CALLBACK.H	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: CALLBACK.H,v 1.1 1999-05-24 20:19:39 ktk Exp $ */
-
 /*
  * GDI32 support code for Line DDA callbacks
Index: trunk/src/gdi32/dibsect.cpp
===================================================================
--- trunk/src/gdi32/dibsect.cpp	(revision 45)
+++ trunk/src/gdi32/dibsect.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: dibsect.cpp,v 1.1 1999-05-24 20:19:39 ktk Exp $ */
-
 /*
  * GDI32 DIB sections
Index: trunk/src/gdi32/dibsect.h
===================================================================
--- trunk/src/gdi32/dibsect.h	(revision 45)
+++ trunk/src/gdi32/dibsect.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: dibsect.h,v 1.1 1999-05-24 20:19:39 ktk Exp $ */
-
 /*
  * GDI32 DIB sections
Index: trunk/src/gdi32/gdi32.cpp
===================================================================
--- trunk/src/gdi32/gdi32.cpp	(revision 45)
+++ trunk/src/gdi32/gdi32.cpp	(revision 46)
@@ -1,3 +1,3 @@
-/* $Id: gdi32.cpp,v 1.2 1999-06-06 12:25:48 cbratschi Exp $ */
+/* $Id: gdi32.cpp,v 1.3 1999-06-07 20:57:59 sandervl Exp $ */
 
 /*
@@ -43,4 +43,30 @@
 } POLYTEXTW;
 
+
+static ULONG QueryPaletteSize(BITMAPINFOHEADER *pBHdr)
+{
+        ULONG cbPalette;
+
+        switch (pBHdr->biBitCount)
+        {
+                case 1:
+                case 4:
+                case 8:
+                        cbPalette = (1 << pBHdr->biBitCount) * sizeof(RGBQUAD);
+                        break;
+
+                case 16:
+                case 24:
+                case 32:
+                        cbPalette = 0;
+                        break;
+
+                default:
+                        dprintf(("QueryPaletteSize: error pBHdr->biBitCount = %d", pBHdr->biBitCount));
+                        cbPalette = -1;
+        }
+
+   return cbPalette;
+}
 
 static ULONG CalcBitmapSize(ULONG cBits, LONG cx, LONG cy)
@@ -1876,5 +1902,5 @@
     // Dont't like dirty pointers, but Open32 needs a bit help.
     // Only tested with winmine.
-    palsize = (1 << info->bmiHeader.biBitCount) * sizeof(RGBQUAD);
+    palsize = QueryPaletteSize((BITMAPINFOHEADER*)&info->bmiHeader);
     imgsize = CalcBitmapSize(info->bmiHeader.biBitCount,
                              info->bmiHeader.biWidth, info->bmiHeader.biHeight);
Index: trunk/src/gdi32/makefile
===================================================================
--- trunk/src/gdi32/makefile	(revision 45)
+++ trunk/src/gdi32/makefile	(revision 46)
@@ -1,4 +1,2 @@
-# $Id: makefile,v 1.1 1999-05-24 20:19:40 ktk Exp $ 
-
 #
 # PD-Win32 API 
@@ -55,5 +53,5 @@
     $(PDWIN32_INCLUDE)\misc.h \
 
-initterm.obj: initterm.c
+initterm.obj: initterm.cpp
 
 
Index: trunk/src/gdi32/opengl.cpp
===================================================================
--- trunk/src/gdi32/opengl.cpp	(revision 45)
+++ trunk/src/gdi32/opengl.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: opengl.cpp,v 1.1 1999-05-24 20:19:40 ktk Exp $ */
-
 /*
  * GDI32 OpenGl stubs
Index: trunk/src/kernel32/Fileio.cpp
===================================================================
--- trunk/src/kernel32/Fileio.cpp	(revision 45)
+++ trunk/src/kernel32/Fileio.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: Fileio.cpp,v 1.2 1999-05-31 22:08:11 phaller Exp $ */
-
 /*
  *
@@ -17,7 +15,4 @@
 #include <string.h>
 #include "unicode.h"
-#include "misc.h"
-
-
 #include "handlemanager.h"
 #include "devio.h"
Index: trunk/src/kernel32/HandleManager.h
===================================================================
--- trunk/src/kernel32/HandleManager.h	(revision 45)
+++ trunk/src/kernel32/HandleManager.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: HandleManager.h,v 1.1 1999-05-24 20:19:41 ktk Exp $ */
-
 /*
  *
Index: trunk/src/kernel32/KERNEL32.CPP
===================================================================
--- trunk/src/kernel32/KERNEL32.CPP	(revision 45)
+++ trunk/src/kernel32/KERNEL32.CPP	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: KERNEL32.CPP,v 1.1 1999-05-24 20:19:41 ktk Exp $ */
-
 /*
  *
Index: trunk/src/kernel32/KERNEL32.DEF
===================================================================
--- trunk/src/kernel32/KERNEL32.DEF	(revision 45)
+++ trunk/src/kernel32/KERNEL32.DEF	(revision 46)
@@ -5,4 +5,7 @@
 
 IMPORTS
+  _Dos32QueryModFromEIP        =  DOSCALLS.360
+   Dos32QueryModFromEIP        =  DOSCALLS.360
+  _DosQueryModFromEIP          =  DOSCALLS.360
    DosQueryModFromEIP          =  DOSCALLS.360
 
@@ -123,7 +126,7 @@
      AddAtomA                   = _AddAtomA@4                      @50
      AddAtomW                   = _AddAtomW@4                      @102
-;    AddConsoleAliasA           = _OS2AddConsoleAliasA@??             @2    ;NT
-;    AddConsoleAliasW           = _OS2AddConsoleAliasW@??             @3     ;NT
-     AllocConsole               = _OS2AllocConsole@0                  @103
+;    AddConsoleAliasA           = _AddConsoleAliasA@??             @2    ;NT
+;    AddConsoleAliasW           = _AddConsoleAliasW@??             @3     ;NT
+     AllocConsole               = _AllocConsole@0                  @103
 ;    AllocLSCallback            = _AllocLSCallback@??              @104  ;W95
 ;    AllocSLCallback            = _AllocSLCallback@??              @105  ;W95
@@ -163,5 +166,5 @@
      ClearCommError             = _ClearCommError@12               @136
      CloseHandle                = _CloseHandle@4                   @137
-;    CloseConsoleHandle         = _OS2CloseConsoleHandle@??           @22   ;NT
+;    CloseConsoleHandle         = _CloseConsoleHandle@??           @22   ;NT
 ;    CloseProfileUserMapping    = _CloseProfileUserMapping@??      @138
 ;    CloseSystemHandle          = _CloseSystemHandle@??            @139  ;W95
@@ -173,5 +176,5 @@
      CompareStringW             = _CompareStringW@24               @144
      ConnectNamedPipe           = _ConnectNamedPipe@8              @145
-;    ConsoleMenuControl         = _OS2ConsoleMenuControl@??           @33   ;NT
+;    ConsoleMenuControl         = _ConsoleMenuControl@??           @33   ;NT
      ContinueDebugEvent         = _ContinueDebugEvent@12           @146
      ConvertDefaultLocale       = _ConvertDefaultLocale@4          @147
@@ -181,5 +184,5 @@
      CopyFileExW                = _CopyFileExW@24                  @39   ;NT
      CopyFileW                  = _CopyFileW@12                    @150
-     CreateConsoleScreenBuffer  = _OS2CreateConsoleScreenBuffer@20    @151
+     CreateConsoleScreenBuffer  = _CreateConsoleScreenBuffer@20    @151
      CreateDirectoryA           = _CreateDirectoryA@8              @152
      CreateDirectoryExA         = _CreateDirectoryExA@12           @153
@@ -227,5 +230,5 @@
      DisconnectNamedPipe        = _DisconnectNamedPipe@4           @190
      DosDateTimeToFileTime      = _DosDateTimeToFileTime@12        @191
-;    DuplicateConsoleHandle     = _OS2DuplicateConsoleHandle@??             ;NT
+;    DuplicateConsoleHandle     = _DuplicateConsoleHandle@??             ;NT
      DuplicateHandle            = _DuplicateHandle@28              @192
      EndUpdateResourceA         = _EndUpdateResourceA@8            @193
@@ -255,6 +258,6 @@
      ExpandEnvironmentStringsA  = _ExpandEnvironmentStringsA@12    @216
      ExpandEnvironmentStringsW  = _ExpandEnvironmentStringsW@12    @217
-;    ExpungeConsoleCommandHistoryA = _OS2ExpungeConsoleCommandHistoryA@??   ;NT
-;    ExpungeConsoleCommandHistoryW = _OS2ExpungeConsoleCommandHistoryW@??   ;NT
+;    ExpungeConsoleCommandHistoryA = _ExpungeConsoleCommandHistoryA@??   ;NT
+;    ExpungeConsoleCommandHistoryW = _ExpungeConsoleCommandHistoryW@??   ;NT
 ;    ExtendVirtualBuffer        = _ExtendVirtualBuffer@??                ;NT
 ;    FT_Exit0                   = _FT_Exit0@??                    @218   ;W95
@@ -281,7 +284,7 @@
      FileTimeToLocalFileTime    = _FileTimeToLocalFileTime@8      @239
      FileTimeToSystemTime       = _FileTimeToSystemTime@8         @240
-     FillConsoleOutputAttribute  = _OS2FillConsoleOutputAttribute@20 @241
-     FillConsoleOutputCharacterA  = _OS2FillConsoleOutputCharacterA@20 @242
-     FillConsoleOutputCharacterW  = _OS2FillConsoleOutputCharacterW@20 @243
+     FillConsoleOutputAttribute  = _FillConsoleOutputAttribute@20 @241
+     FillConsoleOutputCharacterA  = _FillConsoleOutputCharacterA@20 @242
+     FillConsoleOutputCharacterW  = _FillConsoleOutputCharacterW@20 @243
      FindAtomA                  = _FindAtomA@4                    @244
      FindAtomW                  = _FindAtomW@4                    @245
@@ -302,5 +305,5 @@
      FindResourceExW            = _FindResourceExW@16             @257
      FindResourceW              = _FindResourceW@12               @258
-     FlushConsoleInputBuffer    = _OS2FlushConsoleInputBuffer@4      @259
+     FlushConsoleInputBuffer    = _FlushConsoleInputBuffer@4      @259
      FlushFileBuffers           = _FlushFileBuffers@4             @260
      FlushInstructionCache      = _FlushInstructionCache@12       @261
@@ -310,5 +313,5 @@
      FormatMessageA             = _FormatMessageA@28              @265
      FormatMessageW             = _FormatMessageW@28              @266
-     FreeConsole                = _OS2FreeConsole@0                  @267
+     FreeConsole                = _FreeConsole@0                  @267
      FreeEnvironmentStringsA    = _FreeEnvironmentStringsA@4      @268
      FreeEnvironmentStringsW    = _FreeEnvironmentStringsW@4      @269
@@ -319,5 +322,5 @@
 ;    FreeSLCallback             = _FreeSLCallback@??              @274   ;W95
 ;    FreeVirtualBuffer          = _FreeVirtualBuffer@??                  ;NT
-     GenerateConsoleCtrlEvent   = _OS2GenerateConsoleCtrlEvent@8     @275
+     GenerateConsoleCtrlEvent   = _GenerateConsoleCtrlEvent@8     @275
      GetACP                     = _GetACP@0                       @276
      GetAtomNameA               = _GetAtomNameA@12                @277
@@ -339,37 +342,37 @@
      GetComputerNameA           = _GetComputerNameA@8             @293
      GetComputerNameW           = _GetComputerNameW@8             @294
-;    GetConsoleAliasA           = _OS2GetConsoleAliasA@??                   ;NT
-;    GetConsoleAliasExesA       = _OS2GetConsoleAliasExesA@??               ;NT
-;    GetConsoleAliasExesLengthA = _OS2GetConsoleAliasExesLengthA@??         ;NT
-;    GetConsoleAliasExesLengthW = _OS2GetConsoleAliasExesLengthW@??         ;NT
-;    GetConsoleAliasExesW       = _OS2GetConsoleAliasExesW@??               ;NT
-;    GetConsoleAliasW           = _OS2GetConsoleAliasW@??                   ;NT
-;    GetConsoleAliasesA         = _OS2GetConsoleAliasesA@??                 ;NT
-;    GetConsoleAliasesLengthA   = _OS2GetConsoleAliasesLengthA@??           ;NT
-;    GetConsoleAliasesLengthW   = _OS2GetConsoleAliasesLengthW@??           ;NT
-;    GetConsoleAliasesW         = _OS2GetConsoleAliasesW@??                 ;NT
-     GetConsoleCP               = _OS2GetConsoleCP@0                 @295
-;    GetConsoleCommandHistoryA       = _OS2GetConsoleCommandHistoryA@??     ;NT
-;    GetConsoleCommandHistoryLengthA = _OS2GetConsoleCommandHistoryLengthA@?? ;NT
-;    GetConsoleCommandHistoryLengthW = _OS2GetConsoleCommandHistoryLengthW@?? ;NT
-;    GetConsoleCommandHistoryW       = _OS2GetConsoleCommandHistoryW@??     ;NT
-     GetConsoleCursorInfo       = _OS2GetConsoleCursorInfo@8         @296
-;    GetConsoleDisplayMode         = _OS2GetConsoleDisplayMode@??           ;NT
-;    GetConsoleFontInfo            = _OS2GetConsoleFontInfo@??              ;NT
-;    GetConsoleFontSize            = _OS2GetConsoleFontSize@??              ;NT
-;    GetConsoleHardwareState       = _OS2GetConsoleHardwareState@??         ;NT
-;    GetConsoleInputExeNameA       = _OS2GetConsoleInputExeNameA@??         ;NT
-;    GetConsoleInputExeNameW       = _OS2GetConsoleInputExeNameW@??         ;NT
-;    GetConsoleInputWaitHandle     = _OS2GetConsoleInputWaitHandle@??       ;NT
-;    GetConsoleKeyboardLayoutNameA = _OS2GetConsoleKeyboardLayoutNameA@??   ;NT
-;    GetConsoleKeyboardLayoutNameW = _OS2GetConsoleKeyboardLayoutNameW@??   ;NT
-     GetConsoleMode             = _OS2GetConsoleMode@8           @297
-     GetConsoleOutputCP         = _OS2GetConsoleOutputCP@0       @298
-     GetConsoleScreenBufferInfo  = _OS2GetConsoleScreenBufferInfo@8 @299
-     GetConsoleTitleA           = _OS2GetConsoleTitleA@8         @300
-     GetConsoleTitleW           = _OS2GetConsoleTitleW@8         @301
+;    GetConsoleAliasA           = _GetConsoleAliasA@??                   ;NT
+;    GetConsoleAliasExesA       = _GetConsoleAliasExesA@??               ;NT
+;    GetConsoleAliasExesLengthA = _GetConsoleAliasExesLengthA@??         ;NT
+;    GetConsoleAliasExesLengthW = _GetConsoleAliasExesLengthW@??         ;NT
+;    GetConsoleAliasExesW       = _GetConsoleAliasExesW@??               ;NT
+;    GetConsoleAliasW           = _GetConsoleAliasW@??                   ;NT
+;    GetConsoleAliasesA         = _GetConsoleAliasesA@??                 ;NT
+;    GetConsoleAliasesLengthA   = _GetConsoleAliasesLengthA@??           ;NT
+;    GetConsoleAliasesLengthW   = _GetConsoleAliasesLengthW@??           ;NT
+;    GetConsoleAliasesW         = _GetConsoleAliasesW@??                 ;NT
+     GetConsoleCP               = _GetConsoleCP@0                 @295
+;    GetConsoleCommandHistoryA       = _GetConsoleCommandHistoryA@??     ;NT
+;    GetConsoleCommandHistoryLengthA = _GetConsoleCommandHistoryLengthA@?? ;NT
+;    GetConsoleCommandHistoryLengthW = _GetConsoleCommandHistoryLengthW@?? ;NT
+;    GetConsoleCommandHistoryW       = _GetConsoleCommandHistoryW@??     ;NT
+     GetConsoleCursorInfo       = _GetConsoleCursorInfo@8         @296
+;    GetConsoleDisplayMode         = _GetConsoleDisplayMode@??           ;NT
+;    GetConsoleFontInfo            = _GetConsoleFontInfo@??              ;NT
+;    GetConsoleFontSize            = _GetConsoleFontSize@??              ;NT
+;    GetConsoleHardwareState       = _GetConsoleHardwareState@??         ;NT
+;    GetConsoleInputExeNameA       = _GetConsoleInputExeNameA@??         ;NT
+;    GetConsoleInputExeNameW       = _GetConsoleInputExeNameW@??         ;NT
+;    GetConsoleInputWaitHandle     = _GetConsoleInputWaitHandle@??       ;NT
+;    GetConsoleKeyboardLayoutNameA = _GetConsoleKeyboardLayoutNameA@??   ;NT
+;    GetConsoleKeyboardLayoutNameW = _GetConsoleKeyboardLayoutNameW@??   ;NT
+     GetConsoleMode             = _GetConsoleMode@8           @297
+     GetConsoleOutputCP         = _GetConsoleOutputCP@0       @298
+     GetConsoleScreenBufferInfo  = _GetConsoleScreenBufferInfo@8 @299
+     GetConsoleTitleA           = _GetConsoleTitleA@8         @300
+     GetConsoleTitleW           = _GetConsoleTitleW@8         @301
      GetCurrencyFormatA         = _GetCurrencyFormatA@24      @302
      GetCurrencyFormatW         = _GetCurrencyFormatW@24      @303
-;    GetCurrentConsoleFont      = _OS2GetCurrentConsoleFont@??              ;NT
+;    GetCurrentConsoleFont      = _GetCurrentConsoleFont@??              ;NT
      GetCurrentDirectoryA       = _GetCurrentDirectoryA@8     @304
      GetCurrentDirectoryW       = _GetCurrentDirectoryW@8     @305
@@ -407,5 +410,5 @@
 ;    GetLSCallbackTarget        = _GetLSCallbackTarget@??     @337      ;W95
 ;    GetLSCallbackTemplate      = _GetLSCallbackTemplate@??   @338      ;W95
-     GetLargestConsoleWindowSize  = _OS2GetLargestConsoleWindowSize@4 @339
+     GetLargestConsoleWindowSize  = _GetLargestConsoleWindowSize@4 @339
      GetLastError               = _GetLastError@0             @340
      GetLocalTime               = _GetLocalTime@4             @341
@@ -426,7 +429,7 @@
      GetNumberFormatA           = _GetNumberFormatA@24        @355
      GetNumberFormatW           = _GetNumberFormatW@24        @356
-;    GetNumberOfConsoleFonts    = _OS2GetNumberOfConsoleFonts@??           ;NT
-     GetNumberOfConsoleInputEvents  = _OS2GetNumberOfConsoleInputEvents@8 @357
-     GetNumberOfConsoleMouseButtons  = _OS2GetNumberOfConsoleMouseButtons@4 @358
+;    GetNumberOfConsoleFonts    = _GetNumberOfConsoleFonts@??           ;NT
+     GetNumberOfConsoleInputEvents  = _GetNumberOfConsoleInputEvents@8 @357
+     GetNumberOfConsoleMouseButtons  = _GetNumberOfConsoleMouseButtons@4 @358
      GetOEMCP                   = _GetOEMCP@0                 @359
      GetOverlappedResult        = _GetOverlappedResult@16     @360
@@ -543,5 +546,5 @@
 ;    HeapQueryTagsW             = _HeapQueryTagsW@??                    ;NT
 ;    HeapSetFlags               = _HeapSetFlags@??            @466
-     "HeapSize"                   = _HeapSize@12                @467      ; reserved linker word
+     "HeapSize"                 = _HeapSize@12                @467      ; reserved linker word
      HeapUnlock                 = _HeapUnlock@4               @468
 ;    HeapUsage                  = _HeapUsage@??                         ;NT
@@ -558,5 +561,5 @@
     InterlockedIncrement       = _InterlockedIncrement@4     @475
 ;   InvalidateNLSCache         = _InvalidateNLSCache@??      @476       ;W95
-;   InvalidateConsoleDIBits    = _OS2InvalidateConsoleDIBits@??            ;NT
+;   InvalidateConsoleDIBits    = _InvalidateConsoleDIBits@??            ;NT
     IsBadCodePtr               = _IsBadCodePtr@4             @477
     IsBadHugeReadPtr           = _IsBadHugeReadPtr@8         @478
@@ -621,5 +624,5 @@
     MultiByteToWideChar        = _MultiByteToWideChar@24     @534
 ;   NotifyNLSUserCache         = _NotifyNLSUserCache@??      @535       ;W95
-;   OpenConsoleW               = _OS2OpenConsoleW@??                       ;NT
+;   OpenConsoleW               = _OpenConsoleW@??                       ;NT
     OpenEventA                 = _OpenEventA@12              @536
     OpenEventW                 = _OpenEventW@12              @537
@@ -638,6 +641,6 @@
     OutputDebugStringA         = _OutputDebugStringA@4       @548
     OutputDebugStringW         = _OutputDebugStringW@4       @549
-    PeekConsoleInputA          = _OS2PeekConsoleInputA@16       @550
-    PeekConsoleInputW          = _OS2PeekConsoleInputW@16       @551
+    PeekConsoleInputA          = _PeekConsoleInputA@16       @550
+    PeekConsoleInputW          = _PeekConsoleInputW@16       @551
     PeekNamedPipe              = _PeekNamedPipe@24           @552
     PostQueuedCompletionStatus  = _PostQueuedCompletionStatus@16 @553
@@ -657,15 +660,15 @@
 ;   QueueUserAPC               = _QueueUserAPC@??            @566
     RaiseException             = RaiseExceptionAsm           @567
-    ReadConsoleA               = _OS2ReadConsoleA@20            @568
-    ReadConsoleInputA          = _OS2ReadConsoleInputA@16       @569
-;   ReadConsoleInputExA        = _OS2ReadConsoleInputExA@??                ;NT
-;   ReadConsoleInputExW        = _OS2ReadConsoleInputExW@??                ;NT
-    ReadConsoleInputW          = _OS2ReadConsoleInputW@16       @570
-    ReadConsoleOutputA         = _OS2ReadConsoleOutputA@20      @571
-    ReadConsoleOutputAttribute  = _OS2ReadConsoleOutputAttribute@20 @572
-    ReadConsoleOutputCharacterA  = _OS2ReadConsoleOutputCharacterA@20 @573
-    ReadConsoleOutputCharacterW  = _OS2ReadConsoleOutputCharacterW@20 @574
-    ReadConsoleOutputW         = _OS2ReadConsoleOutputW@20      @575
-    ReadConsoleW               = _OS2ReadConsoleW@20            @576
+    ReadConsoleA               = _ReadConsoleA@20            @568
+    ReadConsoleInputA          = _ReadConsoleInputA@16       @569
+;   ReadConsoleInputExA        = _ReadConsoleInputExA@??                ;NT
+;   ReadConsoleInputExW        = _ReadConsoleInputExW@??                ;NT
+    ReadConsoleInputW          = _ReadConsoleInputW@16       @570
+    ReadConsoleOutputA         = _ReadConsoleOutputA@20      @571
+    ReadConsoleOutputAttribute  = _ReadConsoleOutputAttribute@20 @572
+    ReadConsoleOutputCharacterA  = _ReadConsoleOutputCharacterA@20 @573
+    ReadConsoleOutputCharacterW  = _ReadConsoleOutputCharacterW@20 @574
+    ReadConsoleOutputW         = _ReadConsoleOutputW@20      @575
+    ReadConsoleW               = _ReadConsoleW@20            @576
 ;   ReadDirectoryChangesW      = _ReadDirectoryChangesW@??              ;NT
     ReadFile                   = _ReadFile@20                @577
@@ -675,5 +678,5 @@
 ;   RegisterServiceProcess     = _RegisterServiceProcess@??  @580       ;W95
 ;   ReinitializeCriticalSection  = _ReinitializeCriticalSection@?? @581 ;W95
-;   RegisterConsoleVDM         = _OS2RegisterConsoleVDM@??                 ;NT
+;   RegisterConsoleVDM         = _RegisterConsoleVDM@??                 ;NT
 ;   RegisterWaitForInputIdle   = _RegisterWaitForInputIdle@??           ;NT
 ;   RegisterWowBaseHandlers    = _RegisterWowBaseHandlers@??            ;NT
@@ -709,6 +712,6 @@
 ;   SUnMapLS_IP_EBP_40         = _SUnMapLS_IP_EBP_40@??      @610       ;W95
 ;   SUnMapLS_IP_EBP_8          = _SUnMapLS_IP_EBP_8@??       @611       ;W95
-    ScrollConsoleScreenBufferA  = _OS2ScrollConsoleScreenBufferA@20 @612
-    ScrollConsoleScreenBufferW  = _OS2ScrollConsoleScreenBufferW@20 @613
+    ScrollConsoleScreenBufferA  = _ScrollConsoleScreenBufferA@20 @612
+    ScrollConsoleScreenBufferW  = _ScrollConsoleScreenBufferW@20 @613
     SearchPathA                = _SearchPathA@24             @614
     SearchPathW                = _SearchPathW@24             @615
@@ -720,30 +723,30 @@
     SetComputerNameA           = _SetComputerNameA@4         @621
     SetComputerNameW           = _SetComputerNameW@4         @622
-    SetConsoleActiveScreenBuffer  = _OS2SetConsoleActiveScreenBuffer@4 @623
-    SetConsoleCP               = _OS2SetConsoleCP@4             @624
-;   SetConsoleCommandHistoryMode = _OS2SetConsoleCommandHistoryMode@??     ;NT
-    SetConsoleCtrlHandler      = _OS2SetConsoleCtrlHandler@8    @625
-;   SetConsoleCursor           = _OS2SetConsoleCursor@??                   ;NT
-    SetConsoleCursorInfo       = _OS2SetConsoleCursorInfo@8      @626
-    SetConsoleCursorPosition   = _OS2SetConsoleCursorPosition@8  @627
-;   SetConsoleDisplayMode        = _OS2SetConsoleDisplayMode@??            ;NT
-;   SetConsoleFont               = _OS2SetConsoleFont@??                   ;NT
-;   SetConsoleHardwareState      = _OS2SetConsoleHardwareState@??          ;NT
-;   SetConsoleIcon               = _OS2SetConsoleIcon@??                   ;NT
-;   SetConsoleInputExeNameA      = _OS2SetConsoleInputExeNameA@??          ;NT
-;   SetConsoleInputExeNameW      = _OS2SetConsoleInputExeNameW@??          ;NT
-;   SetConsoleKeyShortcuts       = _OS2SetConsoleKeyShortcuts@??           ;NT
-;   SetConsoleMaximumWindowSize  = _OS2SetConsoleMaximumWindowSize@??      ;NT
-;   SetConsoleMenuClose          = _OS2SetConsoleMenuClose@??              ;NT
-    SetConsoleMode             = _OS2SetConsoleMode@8           @628
-;   SetConsoleNumberOfCommandsA  = _OS2SetConsoleNumberOfCommandsA@??      ;NT
-;   SetConsoleNumberOfCommandsW  = _OS2SetConsoleNumberOfCommandsW@??      ;NT
-    SetConsoleOutputCP         = _OS2SetConsoleOutputCP@4       @629
-;   SetConsolePalette           = _OS2SetConsolePalette@??                 ;NT
-    SetConsoleScreenBufferSize  = _OS2SetConsoleScreenBufferSize@8 @630
-    SetConsoleTextAttribute    = _OS2SetConsoleTextAttribute@8  @631
-    SetConsoleTitleA           = _OS2SetConsoleTitleA@4         @632
-    SetConsoleTitleW           = _OS2SetConsoleTitleW@4         @633
-    SetConsoleWindowInfo       = _OS2SetConsoleWindowInfo@12     @634
+    SetConsoleActiveScreenBuffer  = _SetConsoleActiveScreenBuffer@4 @623
+    SetConsoleCP               = _SetConsoleCP@4             @624
+;   SetConsoleCommandHistoryMode = _SetConsoleCommandHistoryMode@??     ;NT
+    SetConsoleCtrlHandler      = _SetConsoleCtrlHandler@8    @625
+;   SetConsoleCursor           = _SetConsoleCursor@??                   ;NT
+    SetConsoleCursorInfo       = _SetConsoleCursorInfo@8      @626
+    SetConsoleCursorPosition   = _SetConsoleCursorPosition@8  @627
+;   SetConsoleDisplayMode        = _SetConsoleDisplayMode@??            ;NT
+;   SetConsoleFont               = _SetConsoleFont@??                   ;NT
+;   SetConsoleHardwareState      = _SetConsoleHardwareState@??          ;NT
+;   SetConsoleIcon               = _SetConsoleIcon@??                   ;NT
+;   SetConsoleInputExeNameA      = _SetConsoleInputExeNameA@??          ;NT
+;   SetConsoleInputExeNameW      = _SetConsoleInputExeNameW@??          ;NT
+;   SetConsoleKeyShortcuts       = _SetConsoleKeyShortcuts@??           ;NT
+;   SetConsoleMaximumWindowSize  = _SetConsoleMaximumWindowSize@??      ;NT
+;   SetConsoleMenuClose          = _SetConsoleMenuClose@??              ;NT
+    SetConsoleMode             = _SetConsoleMode@8           @628
+;   SetConsoleNumberOfCommandsA  = _SetConsoleNumberOfCommandsA@??      ;NT
+;   SetConsoleNumberOfCommandsW  = _SetConsoleNumberOfCommandsW@??      ;NT
+    SetConsoleOutputCP         = _SetConsoleOutputCP@4       @629
+;   SetConsolePalette           = _SetConsolePalette@??                 ;NT
+    SetConsoleScreenBufferSize  = _SetConsoleScreenBufferSize@8 @630
+    SetConsoleTextAttribute    = _SetConsoleTextAttribute@8  @631
+    SetConsoleTitleA           = _SetConsoleTitleA@4         @632
+    SetConsoleTitleW           = _SetConsoleTitleW@4         @633
+    SetConsoleWindowInfo       = _SetConsoleWindowInfo@12     @634
 ;   SetCriticalSectionSpinCount = _SetCriticalSectionSpinCount@??       ;NT
     SetCurrentDirectoryA       = _SetCurrentDirectoryA@4     @635
@@ -766,5 +769,5 @@
     SetHandleCount             = _SetHandleCount@4           @652
     SetHandleInformation       = _SetHandleInformation@12    @653
-;   SetLastConsoleEventActive  = _OS2SetLastConsoleEventActive@??          ;NT
+;   SetLastConsoleEventActive  = _SetLastConsoleEventActive@??          ;NT
     SetLastError               = _SetLastError@4             @654
     SetLocalTime               = _SetLocalTime@4             @655
@@ -797,5 +800,5 @@
 ;   SetWaitableTimer           = _SetWaitableTimer@??                   ;NT
     SetupComm                  = _SetupComm@12               @677
-;   ShowConsoleCursor          = _OS2ShowConsoleCursor@??                  ;NT
+;   ShowConsoleCursor          = _ShowConsoleCursor@??                  ;NT
 ;   SignalObjectAndWait        = _SignalObjectAndWait@??                ;NT
     SizeofResource             = _SizeofResource@8           @678
@@ -834,9 +837,9 @@
     UpdateResourceA            = _UpdateResourceA@24         @707
     UpdateResourceW            = _UpdateResourceW@24         @708
-;   VDMConsoleOperation        = _OS2VDMConsoleOperation@??                ;NT
-;   VDMOperationStarted        = _OS2VDMOperationStarted@??                ;NT
+;   VDMConsoleOperation        = _VDMConsoleOperation@??                ;NT
+;   VDMOperationStarted        = _VDMOperationStarted@??                ;NT
     VerLanguageNameA           = _VerLanguageNameA@12        @709
     VerLanguageNameW           = _VerLanguageNameW@12        @710
-;   VerifyConsoleToHandle      = _OS2VerifyConsoleToHandle@??              ;NT
+;   VerifyConsoleToHandle      = _VerifyConsoleToHandle@??              ;NT
     VirtualAlloc               = _VirtualAlloc@16            @711
 ;   VirtualAllocEx             = _VirtualAllocEx@??                     ;NT
@@ -860,15 +863,15 @@
     WideCharToMultiByte        = _WideCharToMultiByte@32     @727
     WinExec                    = _WinExec@8                  @728
-    WriteConsoleA              = _OS2WriteConsoleA@20           @729
-    WriteConsoleInputA         = _OS2WriteConsoleInputA@16       @730
-;   WriteConsoleInputVDMA      = _OS2WriteConsoleInputVDMA@??              ;NT
-;   WriteConsoleInputVDMW      = _OS2WriteConsoleInputVDMW@??              ;NT
-    WriteConsoleInputW         = _OS2WriteConsoleInputW@16      @731
-    WriteConsoleOutputA        = _OS2WriteConsoleOutputA@20     @732
-    WriteConsoleOutputAttribute  = _OS2WriteConsoleOutputAttribute@20 @733
-    WriteConsoleOutputCharacterA  = _OS2WriteConsoleOutputCharacterA@20 @734
-    WriteConsoleOutputCharacterW  = _OS2WriteConsoleOutputCharacterW@20 @735
-    WriteConsoleOutputW        = _OS2WriteConsoleOutputW@20     @736
-    WriteConsoleW              = _OS2WriteConsoleW@20           @737
+    WriteConsoleA              = _WriteConsoleA@20           @729
+    WriteConsoleInputA         = _WriteConsoleInputA@16       @730
+;   WriteConsoleInputVDMA      = _WriteConsoleInputVDMA@??              ;NT
+;   WriteConsoleInputVDMW      = _WriteConsoleInputVDMW@??              ;NT
+    WriteConsoleInputW         = _WriteConsoleInputW@16      @731
+    WriteConsoleOutputA        = _WriteConsoleOutputA@20     @732
+    WriteConsoleOutputAttribute  = _WriteConsoleOutputAttribute@20 @733
+    WriteConsoleOutputCharacterA  = _WriteConsoleOutputCharacterA@20 @734
+    WriteConsoleOutputCharacterW  = _WriteConsoleOutputCharacterW@20 @735
+    WriteConsoleOutputW        = _WriteConsoleOutputW@20     @736
+    WriteConsoleW              = _WriteConsoleW@20           @737
     WriteFile                  = _WriteFile@20               @738
     WriteFileEx                = _WriteFileEx@20             @739
@@ -954,2 +957,5 @@
 
    Win32QueryModuleName = Win32QueryModuleName                     @1225
+
+   GetFS		= GetFS					   @1226
+   SetFS		= SetFS					   @1227
Index: trunk/src/kernel32/async.cpp
===================================================================
--- trunk/src/kernel32/async.cpp	(revision 45)
+++ trunk/src/kernel32/async.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: async.cpp,v 1.1 1999-05-24 20:19:43 ktk Exp $ */
-
 /*
  * Win32 Asynchronous I/O Subsystem for OS/2
Index: trunk/src/kernel32/atom.cpp
===================================================================
--- trunk/src/kernel32/atom.cpp	(revision 45)
+++ trunk/src/kernel32/atom.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: atom.cpp,v 1.2 1999-05-31 22:08:10 phaller Exp $ */
-
 /*
  * Win32 ATOM api functions
@@ -12,6 +10,4 @@
 #include <os2win.h>
 #include "unicode.h"
-#include "misc.h"
-
 
 //******************************************************************************
Index: trunk/src/kernel32/cio.h
===================================================================
--- trunk/src/kernel32/cio.h	(revision 45)
+++ trunk/src/kernel32/cio.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: cio.h,v 1.2 1999-05-31 23:22:40 phaller Exp $ */
-
 /* Copyright (C) 1995 by Holger Veit (Holger.Veit@gmd.de) */
 /* Use at your own risk! No Warranty! The author is not responsible for
@@ -10,24 +8,23 @@
 #define _CIO_H_
 
+#include <odin.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#include <odin.h>
-#include <builtin.h>
+int CDECL io_init(void);
+int CDECL io_exit(void);
 
-extern int CDECL io_init(void);
-extern int CDECL io_exit(void);
+int CDECL io_init1(void);
+int CDECL io_exit1(void);
 
-extern int CDECL io_init1(void);
-extern int CDECL io_exit1(void);
-
-extern char CDECL  c_inb(short);
-extern short CDECL c_inw(short);
-extern long CDECL  c_inl(short);
-extern void CDECL  c_outb(short,char);
-extern void CDECL  c_outw(short,short);
-extern void CDECL  c_outl(short,long);
-extern void CDECL  c_readmsr(long, long *);
+char CDECL  c_inb(short);
+short CDECL c_inw(short);
+long CDECL  c_inl(short);
+void CDECL  c_outb(short,char);
+void CDECL  c_outw(short,short);
+void CDECL  c_outl(short,long);
+void CDECL  c_readmsr(long, long *);
 
 #ifdef __cplusplus
Index: trunk/src/kernel32/console.cpp
===================================================================
--- trunk/src/kernel32/console.cpp	(revision 45)
+++ trunk/src/kernel32/console.cpp	(revision 46)
@@ -4,5 +4,8 @@
  * 1998/02/10 Patrick Haller (haller@zebra.fh-weingarten.de)
  *
- * @(#) console.cpp     	1.0.0   1998/02/10 PH Start from scratch
+ * @(#) console.cpp         1.0.0   1998/02/10 PH Start from scratch
+ *
+ * Project Odin Software License can be found in LICENSE.TXT
+ *
  */
 
@@ -20,28 +23,28 @@
  * Remark                                                                    *
  *****************************************************************************
- 
+
  - DWORD HandlerRoutine (DWORD dwCtrlType)
    basically an exception handler routine. handles a few signals / excpts.
    should be somewhere near the exception handling code ... :)
-   
+
    Hmm, however as PM applications don't really get a ctrl-c signal,
    I'll have to do this on my own ...
- 
+
  - supply unicode<->ascii conversions for all the _A and _W function pairs.
- 
+
  - problem: we can't prevent thread1 from blocking the message queue ?
             what will happen if a WinTerminate() is issued there ?
             will the message queue be closed and provide smooth tasking ?
             how will open32 react on this ?
- 
+
  - ECHO_LINE_INPUT / ReadFile blocks till CR
- 
+
  - scrollbars
  * do some flowchart to exactly determine WHEN to use WHICH setting
    and perform WHAT action
- 
+
  - clipboard support
 */
- 
+
 
 /*****************************************************************************
@@ -62,13 +65,11 @@
 #include <stdlib.h>
 #include <string.h>
-#include <odin.h>
-
 #include "win32type.h"
-#include "unicode.h"
 #include "misc.h"
-#include "HandleManager.h"
 #include "console.h"
 #include "console2.h"
 #include "conprop.h"
+#include "unicode.h"
+#include "HandleManager.h"
 
 
@@ -77,13 +78,84 @@
  ***********************************/
 
-extern "C" 
-{
-  void   _System SetLastError(DWORD  dwError);
-  DWORD  _System GetLastError(void);
-  LPSTR  _System GetCommandLineA(void);
-  void   _System ReplaceExceptionHandler(void);
-  void   _System ExitProcess(UINT exitcode);
-  HANDLE _System GetStdHandle(DWORD dwDevice);
-  DWORD  _System GetFileType(HANDLE hFile);
+#include <os2sel.h>
+
+extern "C"
+{
+  void   _System _O32_SetLastError(DWORD  dwError);
+  DWORD  _System _O32_GetLastError(void);
+  LPSTR  _System _O32_GetCommandLine(void);
+  void   _System _O32_ReplaceExceptionHandler(void);
+  void   _System _O32_ExitProcess(UINT exitcode);
+  HANDLE _System _O32_GetStdHandle(DWORD dwDevice);
+  DWORD  _System _O32_GetFileType(HANDLE hFile);
+
+inline void SetLastError(DWORD a)
+{
+ USHORT sel = GetFS();
+
+    _O32_SetLastError(a);
+    SetFS(sel);
+} 
+
+inline DWORD GetLastError()
+{
+ DWORD yyrc;
+ USHORT sel = GetFS();
+
+    yyrc = _O32_GetLastError();
+    SetFS(sel);
+
+    return yyrc;
+} 
+
+inline LPSTR GetCommandLine()
+{
+ LPSTR yyrc;
+ USHORT sel = GetFS();
+
+    yyrc = _O32_GetCommandLine();
+    SetFS(sel);
+
+    return yyrc;
+} 
+
+inline void ReplaceExceptionHandler()
+{
+ USHORT sel = GetFS();
+
+    _O32_ReplaceExceptionHandler();
+    SetFS(sel);
+} 
+
+inline void ExitProcess(UINT a)
+{
+ USHORT sel = GetFS();
+
+    _O32_ExitProcess(a);
+    SetFS(sel);
+} 
+
+inline HANDLE GetStdHandle(DWORD a)
+{
+ HANDLE yyrc;
+ USHORT sel = GetFS();
+
+    yyrc = _O32_GetStdHandle(a);
+    SetFS(sel);
+
+    return yyrc;
+} 
+
+inline DWORD GetFileType(HANDLE a)
+{
+ DWORD yyrc;
+ USHORT sel = GetFS();
+
+    yyrc = _O32_GetFileType(a);
+    SetFS(sel);
+
+    return yyrc;
+} 
+
 }
 
@@ -180,5 +252,5 @@
  *****************************************************************************/
 
-                                        
+
 static APIRET ConsoleTerminate(void);/* termination of the console subsystem */
 
@@ -243,6 +315,6 @@
     HEV    hevConsole;                            /* console event semaphore */
     APIRET rcConsole;                /* initialization status of the console */
-    HAB	   hab;                                       /* anchor block handle */
-    HMQ	   hmq;               /* message queue handle for the console window */
+    HAB    hab;                                       /* anchor block handle */
+    HMQ    hmq;               /* message queue handle for the console window */
     QMSG   qmsg;                           /* message for the console window */
     ULONG  flFrameFlags;                      /* frame window creation flags */
@@ -250,29 +322,29 @@
     HWND   hwndFrame;                                 /* frame window handle */
     HWND   hwndClient;                               /* client window handle */
-  
+
     HWND   hwndHorzScroll;                /* handle of horizontal scroll bar */
     HWND   hwndVertScroll;                  /* handle of vertical scroll bar */
     BOOL   fHasVertScroll;            /* indicates if scrollbars are visible */
     BOOL   fHasHorzScroll;
-  
+
     HDC    hdcConsole;                             /* console device context */
     PFNWP  pfnwpFrameOriginal;            /* original frame window procedure */
-  
+
     HWND     hwndMenuConsole;                          /* console popup menu */
     HMODULE  hmodResource;           /* resources are stored in KERNEL32.DLL */
     HPOINTER hPtrConsole;                                    /* console icon */
-  
+
     HANDLE hConsoleBuffer;            /* handle of the active console buffer */
     HANDLE hConsoleBufferDefault;    /* handle of the default console buffer */
-  
+
     HVPS   hvpsConsole;                   /* console AVIO presentation space */
-  
+
     COORD  coordMaxWindowPels;              /* maximum window size in pixels */
     COORD  coordWindowSize;                   /* current console window size */
     COORD  coordWindowPos;                           /* scroller's positions */
-  
+
     SHORT  sCellCX; /* height and width of a avio cell with the current font */
     SHORT  sCellCY;
-  
+
     BOOL   fUpdateRequired; /* set to TRUE if next WM_TIMER shall update the */
                            /* AVIO presentation space from the consolebuffer */
@@ -281,5 +353,5 @@
     ULONG  ulTimerFrequency;             /* cursor + blitter timer frequency */
     ULONG  ulTimerCursor;                 /* cursor loop counter for divisor */
-  
+
     CONSOLEOPTIONS Options;            /* the console's options / properties */
 
@@ -307,25 +379,25 @@
 
 /*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-APIRET EXPORT ConsoleInit(void)         /* creation of the console subsystem */
+APIRET ConsoleInit(void)                /* creation of the console subsystem */
 {
   APIRET rc;                                              /* API return code */
   ULONG  ulPostCount;                              /* semaphore post counter */
-  
-  
-  
+
+
+
   if (ConsoleGlobals.hevConsole != NULLHANDLE) /* we're already initialized ?*/
     return (NO_ERROR);                             /* then abort immediately */
-    
+
                                  /* create console synchronization semaphore */
   rc = DosCreateEventSem (NULL,
@@ -335,6 +407,6 @@
   if (rc != NO_ERROR)                                       /* other error ? */
     return (rc);                                    /* raise error condition */
-  
-  
+
+
                                      /* create console input queue semaphore */
   rc = DosCreateEventSem (NULL,
@@ -347,10 +419,10 @@
     return (rc);                                    /* raise error condition */
   }
-  
+
 
   /***************************************************************************
    * Create pseudo-devices and initialize ConsoleGlobals                     *
    ***************************************************************************/
-  
+
   rc = ConsoleDevicesRegister();                 /* ensure devices are there */
   if (rc != NO_ERROR)                                    /* check for errors */
@@ -360,10 +432,10 @@
     return (rc);                                    /* raise error condition */
   }
-  
-  
+
+
   /***************************************************************************
    * Presentation Manager Initialization phase                               *
    ***************************************************************************/
-  
+
     /* OK, we're about to initialize the console subsystem for this process. */
                            /* start message thread for console object window */
@@ -373,5 +445,5 @@
                                            NULL);
                                    /* has the thread been created properly ? */
-  if (ConsoleGlobals.tidConsole == -1) 
+  if (ConsoleGlobals.tidConsole == -1)
   {
     DosCloseEventSem(ConsoleInput.hevInputQueue);   /* close other semaphore */
@@ -385,6 +457,6 @@
                    ConsoleGlobals.Options.ulConsoleThreadPriorityDelta,
                    ConsoleGlobals.tidConsole);
-                   
-  
+
+
                       /* wait for the child thread to do it's initialization */
                                               /* timeout isn't really useful */
@@ -398,10 +470,10 @@
     return (rc);                                    /* raise error condition */
   }
-  
+
   DosResetEventSem(ConsoleGlobals.hevConsole,       /* reset event semaphore */
                    &ulPostCount);
-  
+
   rc = ConsoleGlobals.rcConsole;   /* pass thru console thread's return code */
-  
+
   return (rc);                                                         /* OK */
 }
@@ -412,14 +484,14 @@
  * Purpose   : creates and registers console devices if the standard handles
  *             are not redirected to a file
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/03/17 01:55]
  *****************************************************************************/
 
-APIRET EXPORT ConsoleDevicesRegister(void)
+APIRET ConsoleDevicesRegister(void)
 {
   DWORD  dwType;                                       /* device handle type */
@@ -427,21 +499,21 @@
   HANDLE hStandardOut;                           /* stdout handle to CONOUT$ */
   HANDLE hStandardError;                         /* stderr handle to CONOUT$ */
-  
+
   HMDeviceConsoleInClass     *pHMDeviceConsoleIn;
   HMDeviceConsoleOutClass    *pHMDeviceConsoleOut;
   HMDeviceConsoleBufferClass *pHMDeviceConsoleBuffer;
-  
+
   DWORD rc;
-  
+
   static fDevicesInitialized;          /* have we been initialized already ? */
-  
+
   if (fDevicesInitialized == TRUE)                 /* OK, we're already done */
     return (NO_ERROR);
   else
     fDevicesInitialized = TRUE;
-  
+
   dprintf(("KERNEL32:ConsoleDevicesRegister\n"));
-  
-  
+
+
   /*************************************
    * Initialize Console Window Options *
@@ -450,5 +522,5 @@
   ConsoleGlobals.Options.fTerminateAutomatically = FALSE;
   ConsoleGlobals.Options.fSpeakerEnabled         = TRUE;
-  
+
   ConsoleGlobals.Options.fSetWindowPosition      = FALSE;
   ConsoleGlobals.Options.coordDefaultPosition.X  = 0;
@@ -460,24 +532,24 @@
   ConsoleGlobals.coordWindowPos.X                = 0;
   ConsoleGlobals.coordWindowPos.Y                = 0;
-  
+
   ConsoleGlobals.Options.fQuickInsert            = FALSE;
   ConsoleGlobals.Options.fInsertMode             = FALSE;
   ConsoleGlobals.Options.fMouseActions           = FALSE;
-  ConsoleGlobals.Options.fToolbarActive          = FALSE;      
+  ConsoleGlobals.Options.fToolbarActive          = FALSE;
 
   ConsoleGlobals.Options.ucDefaultAttribute = 0x0007;  /* 07 = grey on black */
-  
+
   ConsoleGlobals.Options.ulTabSize               = 8;      /* tabulator size */
   ConsoleGlobals.Options.ulUpdateLimit           = 8; /* scroll max. n lines */
-  
+
                                      /* priority settings for message thread */
   ConsoleGlobals.Options.ulConsoleThreadPriorityClass = PRTYC_REGULAR;
   ConsoleGlobals.Options.ulConsoleThreadPriorityDelta = +10;
-  
+
   ConsoleGlobals.Options.ucCursorDivisor = 10; /* timer divisor for blinking */
-  
+
   ConsoleGlobals.ulTimerFrequency = 10;  /* cursor + blitter timer frequency */
 
-  
+
   ConsoleGlobals.flFrameFlags = FCF_SIZEBORDER   |   /* frame creation flags */
                                 FCF_TITLEBAR     |
@@ -489,8 +561,8 @@
                                 FCF_VERTSCROLL   |
                                 FCF_MINMAX;
-  
+
                                                    /* generate copy of title */
-  ConsoleGlobals.pszWindowTitle = strdup(GetCommandLineA());
-  
+  ConsoleGlobals.pszWindowTitle = strdup(GetCommandLine());
+
                                     /* obtain module handle to our resources */
   rc = DosQueryModuleHandle("KERNEL32",
@@ -499,20 +571,20 @@
     WriteLog("KERNEL32/CONSOLE: Can't get handle to KERNEL32 (%u).\n",
              rc);
-  
+
                                              /* standard console input modes */
   ConsoleInput.dwConsoleMode = ENABLE_LINE_INPUT      |
                                ENABLE_PROCESSED_INPUT;
   /* @@@PH ENABLE_ECHO_INPUT || ENABLE_MOUSE_INPUT; */
-    
+
   ConsoleGlobals.hConsoleBufferDefault = INVALID_HANDLE_VALUE;
   ConsoleGlobals.hConsoleBuffer        = INVALID_HANDLE_VALUE;
-  
-  
+
+
   /***************************************************************************
    * Standard handles     Initialization phase                               *
    ***************************************************************************/
-    
+
                    /* create devices and register devices with handlemanager */
-    
+
     pHMDeviceConsoleIn  = new HMDeviceConsoleInClass("CONIN$");
     rc = HMDeviceRegister ("CONIN$",
@@ -521,6 +593,6 @@
       dprintf(("KERNEL32:ConsoleDevicesRegister: registering CONIN$ failed with %u.\n",
                rc));
-    
-    
+
+
     pHMDeviceConsoleOut = new HMDeviceConsoleOutClass("CONOUT$");
     rc = HMDeviceRegister ("CONOUT$",
@@ -528,7 +600,7 @@
     if (rc != NO_ERROR)                                  /* check for errors */
       dprintf(("KERNEL32:ConsoleDevicesRegister: registering CONOUT$ failed with %u.\n",
-               rc));    
-    
-    
+               rc));
+
+
     pHMDeviceConsoleBuffer = new HMDeviceConsoleBufferClass("CONBUFFER$");
     rc = HMDeviceRegister ("CONBUFFER$",
@@ -536,7 +608,7 @@
     if (rc != NO_ERROR)                                  /* check for errors */
       dprintf(("KERNEL32:ConsoleDevicesRegister: registering CONBUFFER$ failed with %u.\n",
-               rc));    
-    
-    
+               rc));
+
+
       /***********************************************************************
        * initialize stdin handle                                             *
@@ -552,8 +624,8 @@
                                    CONSOLE_TEXTMODE_BUFFER,
                                    0);
-    
+
       HMSetStdHandle(STD_INPUT_HANDLE,
                      hStandardIn);
-        
+
       /***********************************************************************
        * initialize stdout handle                                            *
@@ -568,10 +640,10 @@
                                    0,
                                    CONSOLE_TEXTMODE_BUFFER,
-                                   0);     
-    
+                                   0);
+
       HMSetStdHandle(STD_OUTPUT_HANDLE,
                      hStandardOut);
-    
-  
+
+
       /***********************************************************************
        * initialize stderr handle                                            *
@@ -587,5 +659,5 @@
                                    CONSOLE_TEXTMODE_BUFFER,
                                    0);
-    
+
       HMSetStdHandle(STD_ERROR_HANDLE,
                      hStandardError);
@@ -605,5 +677,5 @@
  *             leak if an application keeps opening and closing the console
  *             frequently.
- * Status    : 
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
@@ -613,5 +685,5 @@
 {
   APIRET rc;
-  
+
   WinPostMsg (ConsoleGlobals.hwndFrame,         /* force thread to terminate */
               WM_CLOSE,
@@ -621,7 +693,7 @@
   rc = DosWaitThread(&ConsoleGlobals.tidConsole,/* wait until thd terminates */
                      DCWW_WAIT);
-  
+
                                            /* close the consolebuffer handle */
-  HMCloseHandle(ConsoleGlobals.hConsoleBufferDefault); 
+  HMCloseHandle(ConsoleGlobals.hConsoleBufferDefault);
   free(ConsoleGlobals.pszWindowTitle);   /* free previously allocated memory */
 
@@ -635,30 +707,30 @@
  * Parameters: VOID
  * Variables :
- * Result    : 
- * Remark    : 
- * Status    : 
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-void EXPORT ConsoleWaitClose(void)
+void ConsoleWaitClose(void)
 {
   CHAR szBuffer[128];                                /* buffer for the title */
   BOOL fResult;                /* result from subsequent calls to Win32 APIs */
-  
+
                                 /* check if there is a console window at all */
   if (ConsoleIsActive() == FALSE)
     return;                                                          /* nope */
-  
+
   strcpy (szBuffer,               /* indicate console process has terminated */
           "Completed: ");
-  
-  fResult = OS2GetConsoleTitleA(szBuffer + 11,/* 11 is length of Completed:_ */
+
+  fResult = GetConsoleTitleA(szBuffer + 11,/* 11 is length of Completed:_ */
                                 sizeof(szBuffer) - 11);
 
-  
+
                                 /* Set new title: Win32 Console - Terminated */
-  fResult = OS2SetConsoleTitleA(szBuffer);
-  
+  fResult = SetConsoleTitleA(szBuffer);
+
                                           /* terminate console immediately ? */
   if (ConsoleGlobals.Options.fTerminateAutomatically == FALSE)
@@ -673,12 +745,12 @@
  * Parameters: VOID
  * Variables :
- * Result    : 
- * Remark    : 
- * Status    : 
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL EXPORT ConsoleIsActive(void)
+BOOL ConsoleIsActive(void)
 {
   return (NULLHANDLE != ConsoleGlobals.hevConsole);
@@ -693,5 +765,5 @@
  * Result    : is placed in Globals.rcConsole
  * Remark    : the main thread has to wait for this thread
- * Status    : 
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 02:49]
@@ -701,20 +773,20 @@
 {
   APIRET rc;                                              /* API return code */
-  
-  
+
+
   ConsoleGlobals.rcConsole = NO_ERROR;                     /* initialization */
-  
+
   ConsoleGlobals.hab = WinInitialize(0);             /* enable thread for PM */
   if (ConsoleGlobals.hab == NULLHANDLE) /* if anchor block allocation failed */
-    ConsoleGlobals.rcConsole = ERROR_NOT_ENOUGH_MEMORY;    
+    ConsoleGlobals.rcConsole = ERROR_NOT_ENOUGH_MEMORY;
   else
   {
                                                      /* create message queue */
-    ConsoleGlobals.hmq = WinCreateMsgQueue(ConsoleGlobals.hab,  
+    ConsoleGlobals.hmq = WinCreateMsgQueue(ConsoleGlobals.hab,
                                            0);
     if (ConsoleGlobals.hmq == NULLHANDLE)  /* if msg queue allocation failed */
     {
       WinTerminate(ConsoleGlobals.hab);     /* stop thread from accessing PM */
-      ConsoleGlobals.rcConsole = ERROR_NOT_ENOUGH_MEMORY;  
+      ConsoleGlobals.rcConsole = ERROR_NOT_ENOUGH_MEMORY;
     }
     else
@@ -724,5 +796,5 @@
                            ConsoleWindowProc,
                            CS_SIZEREDRAW,
-                           0) 
+                           0)
           == FALSE)
       {
@@ -751,9 +823,9 @@
     } /* WinCreateMsgQueue */
   } /* WinInitialize */
-  
-  
+
+
   DosPostEventSem(ConsoleGlobals.hevConsole);      /* signal the main thread */
-  
-  
+
+
   if (ConsoleGlobals.rcConsole != NO_ERROR)      /* if we ran into a problem */
   {
@@ -763,26 +835,26 @@
     return;                    /* abort the message queue thread immediately */
   }
-  
-  
+
+
   while( WinGetMsg(ConsoleGlobals.hab,                       /* message loop */
                    &ConsoleGlobals.qmsg,
                    NULLHANDLE,
                    0,
-                   0) ) 
+                   0) )
     WinDispatchMsg(ConsoleGlobals.hab,               /* dispatch the message */
                    &ConsoleGlobals.qmsg);
-  
+
                                     /* do the cleanup, destroy window, queue */
                                     /* and stop thread from using PM         */
-  WinDestroyWindow  (ConsoleGlobals.hwndFrame);   
-  WinDestroyMsgQueue(ConsoleGlobals.hmq);         
+  WinDestroyWindow  (ConsoleGlobals.hwndFrame);
+  WinDestroyMsgQueue(ConsoleGlobals.hmq);
   WinTerminate      (ConsoleGlobals.hab);
-  
+
                    /* destruction of semaphore indicates console is shutdown */
   DosCloseEventSem(ConsoleInput.hevInputQueue);     /* close other semaphore */
-  DosCloseEventSem(ConsoleGlobals.hevConsole); 
+  DosCloseEventSem(ConsoleGlobals.hevConsole);
   ConsoleGlobals.hevConsole  = NULLHANDLE;          /* for ConsoleIsActive() */
   ConsoleInput.hevInputQueue = NULLHANDLE;
-  
+
   /* @@@PH we've got to exit the process here ! */
   ExitProcess(1);
@@ -799,6 +871,6 @@
  * Variables :
  * Result    : MRESULT for PM
- * Remark    : 
- * Status    : 
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 03:24]
@@ -813,10 +885,10 @@
   static HPS   hps;
 
-  switch(msg) 
+  switch(msg)
   {
     /*************************************************************************
      * WM_CREATE window creation                                             *
      *************************************************************************/
-    
+
     case WM_CREATE:
       WinPostMsg(hwnd,                            /* deferred initialization */
@@ -825,6 +897,6 @@
                  (MPARAM)NULL);
       break;
-    
-    
+
+
     case UM_CONSOLE_CREATE:
     {
@@ -835,5 +907,5 @@
       hwndFrame = ConsoleGlobals.hwndFrame;
       ConsoleGlobals.pfnwpFrameOriginal = WinSubclassWindow(hwndFrame,
-                                                            ConsoleFrameWindowProc);      
+                                                            ConsoleFrameWindowProc);
 
       ConsoleGlobals.hwndMenuConsole
@@ -850,22 +922,22 @@
                  (MPARAM)ConsoleGlobals.hPtrConsole,
                  0L );
-      
+
                /* determine handles of the horizontal / vertical scroll bars */
       ConsoleGlobals.hwndVertScroll = WinWindowFromID(ConsoleGlobals.hwndFrame,
                                                       FID_VERTSCROLL);
-      
+
       ConsoleGlobals.hwndHorzScroll = WinWindowFromID(ConsoleGlobals.hwndFrame,
                                                       FID_HORZSCROLL);
-      
+
                             /* the initial state of the controls is DETACHED */
       WinSetParent(ConsoleGlobals.hwndHorzScroll,          /* detach control */
                    HWND_OBJECT,
                    FALSE);
-      
+
       WinSetParent(ConsoleGlobals.hwndVertScroll,          /* detach control */
                    HWND_OBJECT,
-                   FALSE);    
-      
-      
+                   FALSE);
+
+
                                            /* create AVIO presentation space */
       rc = VioCreatePS(&ConsoleGlobals.hvpsConsole,
@@ -878,10 +950,10 @@
         WriteLog("KERNEL32/CONSOLE:VioCreatePS=%u\n",
                  rc);
-      
+
  /* PH 1998/02/12 this seems to be an OS/2 PM bug:
     when doing a WinOpenWindowDC here, PM hangs. Seems it never gets back into
     the message loop. To investigate and report to IBM
   */
-  
+
                                /* get a device context for the client window */
       ConsoleGlobals.hdcConsole = WinOpenWindowDC(hwnd);
@@ -891,8 +963,8 @@
       if (rc != NO_ERROR)                                    /* check errors */
         WriteLog("KERNEL32/CONSOLE:VioAssociate=%u\n",
-                 rc);    
+                 rc);
 
       ConsoleFontQuery();                        /* query current cell sizes */
-      
+
                                           /* adjust window size and position */
       HMDeviceRequest(ConsoleGlobals.hConsoleBuffer,
@@ -901,8 +973,8 @@
                       0,
                       0,
-                      0);      
-      
+                      0);
+
             /* @@@PH if console is maximized - now switched on per default ! */
-      WinSetWindowPos (ConsoleGlobals.hwndFrame,  
+      WinSetWindowPos (ConsoleGlobals.hwndFrame,
                        HWND_DESKTOP,
                        0,
@@ -916,8 +988,8 @@
                          2 * WinQuerySysValue(HWND_DESKTOP, SV_CYSIZEBORDER),
                        SWP_SIZE);
-      
+
                              /* do we have to set the window position also ? */
       if (ConsoleGlobals.Options.fSetWindowPosition == TRUE)
-        WinSetWindowPos (ConsoleGlobals.hwndFrame,   
+        WinSetWindowPos (ConsoleGlobals.hwndFrame,
                          HWND_DESKTOP,
                          ConsoleGlobals.Options.coordDefaultPosition.X,
@@ -926,8 +998,8 @@
                          0,
                          SWP_MOVE);
-      
+
                      /* start timer service for blitting and cursor blinking */
       ConsoleGlobals.idTimer = WinStartTimer (ConsoleGlobals.hab,
-                                              hwnd,      
+                                              hwnd,
                                               CONSOLE_TIMER_ID,  /* timer id */
                                               ConsoleGlobals.ulTimerFrequency);
@@ -939,28 +1011,28 @@
     }
     break;
-    
-    
+
+
     /*************************************************************************
      * WM_DESTROY window destruction                                         *
      *************************************************************************/
-    
+
     case WM_DESTROY:
       WinStopTimer (ConsoleGlobals.hab,                      /* anchor block */
                     hwnd,
                     ConsoleGlobals.idTimer);                     /* timer ID */
-    
+
       VioAssociate(NULL,
                    ConsoleGlobals.hvpsConsole); /* disassociates the AVIO PS */
       VioDestroyPS(ConsoleGlobals.hvpsConsole); /* destroys the AVIO PS      */
-    
+
       WinDestroyWindow(ConsoleGlobals.hwndMenuConsole);
       WinDestroyPointer(ConsoleGlobals.hPtrConsole);
       break;
-    
-    
+
+
     /*************************************************************************
      * WM_TIMER display cursor and update AVIO PS if required                *
      *************************************************************************/
-    
+
     case WM_TIMER:
                                        /* check if console has to be updated */
@@ -968,5 +1040,5 @@
       {
         ConsoleGlobals.fUpdateRequired = FALSE;     /* as soon as possible ! */
-        
+
                                 /* as device to map itself to the VIO buffer */
         HMDeviceRequest(ConsoleGlobals.hConsoleBuffer,
@@ -976,5 +1048,5 @@
                         0,
                         0);
-        
+
         { /* DEBUG */
           APIRET rc;
@@ -984,5 +1056,5 @@
                        0,
                        ConsoleGlobals.hvpsConsole);
-        
+
           dprintf(("KERNEL32::Console::1 VioShowPS(%u,%u,%u)=%u\n",
                    ConsoleGlobals.coordWindowSize.Y,
@@ -991,5 +1063,5 @@
                    rc));
         }
-          
+
                                              /* cursor is overwritten here ! */
         HMDeviceRequest(ConsoleGlobals.hConsoleBuffer,
@@ -998,5 +1070,5 @@
                         0,
                         0,
-                        0);      
+                        0);
       }
       else
@@ -1017,13 +1089,13 @@
       break;
 
-    
+
     /*************************************************************************
      * WM_MINMAXFRAME handle window repaint in case of iconized window       *
      *************************************************************************/
-    
+
     case WM_MINMAXFRAME :
     {
       BOOL  fShow = ! (((PSWP) mp1)->fl & SWP_MINIMIZE);
-      HENUM henum; 
+      HENUM henum;
       HWND  hwndChild;
 
@@ -1038,6 +1110,6 @@
     }
     break;
-    
-    
+
+
     /*************************************************************************
      * WM_PAINT repaint the window                                           *
@@ -1055,5 +1127,5 @@
                        0,
                        ConsoleGlobals.hvpsConsole);
-        
+
         dprintf(("KERNEL32::Console::2 VioShowPS(%u,%u,%u)=%u\n",
                  ConsoleGlobals.coordWindowSize.Y,
@@ -1062,9 +1134,9 @@
                  rc));
       }
-    
+
       WinEndPaint(hps);
       break;
-    
-    
+
+
     /*************************************************************************
      * WM_SIZE resize the window                                             *
@@ -1078,6 +1150,6 @@
                       0,
                       0,
-                      0);      
-      
+                      0);
+
       return WinDefAVioWindowProc(hwnd,
                                   (USHORT)msg,
@@ -1085,6 +1157,6 @@
                                   (ULONG)mp2);
     }
-    
-    
+
+
     /*************************************************************************
      * context menue                                                         *
@@ -1098,5 +1170,5 @@
                     SHORT2FROMMP(mp1),
                     CM_CONSOLE_PROPERTIES,                        /* item id */
-                    PU_HCONSTRAIN | 
+                    PU_HCONSTRAIN |
                     PU_VCONSTRAIN |
                     PU_KEYBOARD   |
@@ -1106,6 +1178,6 @@
     }
     return (MPARAM)FALSE;
-    
-    
+
+
     /*************************************************************************
      * WM_COMMAND command processing                                         *
@@ -1117,5 +1189,5 @@
         /* close console window, however we can't call ConsoleTerminate here!*/
         case CM_CONSOLE_EXIT:
-          WinPostMsg (ConsoleGlobals.hwndFrame,     
+          WinPostMsg (ConsoleGlobals.hwndFrame,
                       WM_CLOSE,
                       (MPARAM)NULL,
@@ -1123,6 +1195,6 @@
 
           return (MPARAM)FALSE;
-        
-        
+
+
         case CM_CONSOLE_REPAINT:
           WinInvalidateRect(ConsoleGlobals.hwndClient,/* redraw frame window */
@@ -1135,8 +1207,8 @@
         {
           ULONG ulResult;                              /* response from user */
-          
+
           ConsoleGlobals.Options.hmodResources =       /* save module handle */
             ConsoleGlobals.hmodResource;
-          
+
           ulResult = WinDlgBox(HWND_DESKTOP,
                                ConsoleGlobals.hwndClient,
@@ -1145,6 +1217,4 @@
                                DLG_CONSOLE_PROPERTIES,
                                (PVOID)&ConsoleGlobals.Options);
-          /* @@@PH update settings if necessary */
-          
           return (MPARAM) FALSE;
         }
@@ -1153,28 +1223,28 @@
     break;
 
-    
+
     /*************************************************************************
      * WM_CHAR keyboard char processing                                      *
      *************************************************************************/
-    
+
     case WM_CHAR:
       ConsoleInputEventPushKey(mp1,                 /* push event into queue */
                                mp2);
       break;                                  /* enable further processing ! */
-    
-    
+
+
     /*************************************************************************
      * WM_SETFOCUS focus changing processing                                 *
      *************************************************************************/
-    
+
     case WM_SETFOCUS:
       ConsoleInputEventPushFocus((BOOL)mp2);        /* push event into queue */
       break;                                  /* enable further processing ! */
-    
-    
+
+
     /*************************************************************************
      * WM_MOUSEMOVE mouse event processing                                   *
      *************************************************************************/
-    
+
     case WM_MOUSEMOVE:
     case WM_BUTTON1UP:
@@ -1192,5 +1262,5 @@
       break;                                  /* enable further processing ! */
   }
-  
+
   return WinDefWindowProc(hwnd,                     /* to default processing */
                           msg,
@@ -1209,6 +1279,6 @@
  * Variables :
  * Result    : MRESULT for PM
- * Remark    : 
- * Status    : 
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 03:24]
@@ -1220,10 +1290,10 @@
                                                MPARAM mp2)
 {
-  switch(msg) 
+  switch(msg)
   {
     /*************************************************************************
      * WM_QUERYTRACKINFO handling                                            *
      *************************************************************************/
-    case WM_QUERYTRACKINFO: 
+    case WM_QUERYTRACKINFO:
     {
        MRESULT    mr;                                      /* message result */
@@ -1234,5 +1304,5 @@
                                               msg,
                                               mp1,
-                                              mp2);       
+                                              mp2);
 
        pTrackInfo = (PTRACKINFO)mp2;                /* get track information */
@@ -1262,6 +1332,6 @@
  * Variables :
  * Result    : none
- * Remark    : 
- * Status    : 
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/17 12:57]
@@ -1271,24 +1341,24 @@
 {
   ULONG ulLine;
-  
+
   ULONG ulSizeX;                               /* blitting length and height */
   ULONG ulSizeY;
-  
+
   ulSizeX = 2 * min(ConsoleGlobals.coordWindowSize.X,
                     pConsoleBuffer->coordBufferSize.X -
                     ConsoleGlobals.coordWindowPos.X);
-  
+
   ulSizeY = min(ConsoleGlobals.coordWindowSize.Y,
                 pConsoleBuffer->coordBufferSize.Y -
                 ConsoleGlobals.coordWindowPos.Y);
-  
+
                       /* check if we're called with non-existing line buffer */
   if (pConsoleBuffer->ppszLine == NULL)
     return;
-  
+
   for (ulLine = ConsoleGlobals.coordWindowPos.Y;
        ulLine < ulSizeY;
        ulLine++)
-    VioWrtCellStr(pConsoleBuffer->ppszLine[ulLine] + 
+    VioWrtCellStr(pConsoleBuffer->ppszLine[ulLine] +
                     ConsoleGlobals.coordWindowPos.X,
                   ulSizeX,
@@ -1305,6 +1375,6 @@
  * Variables :
  * Result    : none
- * Remark    : 
- * Status    : 
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/17 12:57]
@@ -1316,5 +1386,5 @@
 {
   ULONG  ulCounter;
-  
+
   for (ulCounter = 0;
        ulCounter < (ulSize >> 1);
@@ -1322,5 +1392,5 @@
        pusTarget+=2)
     *(PULONG)pusTarget = ulPattern;
-  
+
   if (ulSize & 0x00000001)
     *pusTarget = (USHORT)ulPattern;
@@ -1336,6 +1406,6 @@
  * Variables :
  * Result    : none
- * Remark    : 
- * Status    : 
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/17 12:57]
@@ -1348,11 +1418,11 @@
   ULONG ulPosition;
   ULONG ulScrollLine;
-  
+
   static ULONG ulUpdateCounter;                /* counter for jump-scrolling */
-  
+
                               /* calculate new line offset to the first line */
   pConsoleBuffer->ulScrollLineOffset += ulLines;
   pConsoleBuffer->ulScrollLineOffset %= pConsoleBuffer->coordBufferSize.Y;
-  
+
                                                    /* do we have to scroll ? */
   if (ulLines < pConsoleBuffer->coordBufferSize.Y)
@@ -1362,26 +1432,26 @@
          ulLine++)
     {
-      ulScrollLine = (ulLine + pConsoleBuffer->ulScrollLineOffset) 
+      ulScrollLine = (ulLine + pConsoleBuffer->ulScrollLineOffset)
                      % pConsoleBuffer->coordBufferSize.Y;
-      
+
       ulPosition = (ULONG)pConsoleBuffer->ppszLine
                    + (pConsoleBuffer->coordBufferSize.Y * sizeof (PSZ) )
                    + (pConsoleBuffer->coordBufferSize.X * 2 * ulScrollLine);
-      
+
       pConsoleBuffer->ppszLine[ulLine] = (PSZ)ulPosition;
     }
   }
-  
+
                                                   /* enforce the upper limit */
   if (ulLines > pConsoleBuffer->coordBufferSize.Y)
     ulLines = pConsoleBuffer->coordBufferSize.Y;
-  
+
   ulPosition = ( ((ULONG)(pConsoleBuffer->ucDefaultAttribute) << 8) +
                  ((ULONG)' ') +
                  ((ULONG)(pConsoleBuffer->ucDefaultAttribute) << 24) +
                  ((ULONG)' ' << 16) );
-  
+
                                                     /* scroll the line index */
-  for (ulLine = pConsoleBuffer->coordBufferSize.Y - ulLines; 
+  for (ulLine = pConsoleBuffer->coordBufferSize.Y - ulLines;
        ulLine < pConsoleBuffer->coordBufferSize.Y;
        ulLine++)
@@ -1389,5 +1459,5 @@
                           (PUSHORT)(pConsoleBuffer->ppszLine[ulLine]),
                           pConsoleBuffer->coordBufferSize.X);
-  
+
     /* this code ensures frequent screen updating, even if the timer prooves */
                                                             /* to be to slow */
@@ -1413,5 +1483,5 @@
  * Result    : API returncode
  * Remark    :
- * Status    : 
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/03/07 16:55]
@@ -1422,5 +1492,5 @@
   PINPUT_RECORD pirFree;                           /* pointer to free record */
   APIRET        rc;                                        /* API-returncode */
-  
+
 #ifdef DEBUG_LOCAL2
   dprintf(("KERNEL32/CONSOLE:ConsoleInputEventPush(%08x).\n",
@@ -1431,16 +1501,16 @@
   if (pirFree->EventType != 0x0000)
     return (ERROR_QUE_NO_MEMORY);                         /* queue is full ! */
-      
+
                                                        /* put event in queue */
   memcpy(pirFree,                                               /* copy data */
          pInputRecord,
          sizeof (INPUT_RECORD) );
-  
+
   ConsoleInput.ulIndexFree++;                        /* update index counter */
   if (ConsoleInput.ulIndexFree >= CONSOLE_INPUTQUEUESIZE)
     ConsoleInput.ulIndexFree = 0;
-  
+
   ConsoleInput.ulEvents++;                   /* increate queue event counter */
-  
+
                                                   /* unblock reading threads */
   rc = DosPostEventSem(ConsoleInput.hevInputQueue);
@@ -1456,5 +1526,5 @@
  * Result    : API returncode
  * Remark    :
- * Status    : 
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/03/07 16:55]
@@ -1465,32 +1535,32 @@
   PINPUT_RECORD pirEvent;                         /* pointer to event record */
   APIRET        rc;                                        /* API-returncode */
-  
+
 #ifdef DEBUG_LOCAL2
   dprintf(("KERNEL32/CONSOLE:ConsoleInputEventPop(%08x).\n",
            pInputRecord));
 #endif
-  
+
   if (ConsoleInput.ulEvents == 0)                         /* empty console ? */
     return (ERROR_QUE_EMPTY);                            /* queue is empty ! */
-  
+
                                                           /* get first event */
   pirEvent = &ConsoleInput.arrInputRecord[ConsoleInput.ulIndexEvent];
   if (pirEvent->EventType == 0x0000)
     return (ERROR_QUE_EMPTY);                            /* queue is empty ! */
-      
+
                                                        /* put event in queue */
   memcpy(pInputRecord,                                          /* copy data */
          pirEvent,
          sizeof (INPUT_RECORD) );
-  
+
   pirEvent->EventType = 0x0000;                 /* mark event as read = free */
-  
+
   if (ConsoleInput.ulEvents >= 0)       /* decrease number of console events */
     ConsoleInput.ulEvents--;
-  
+
   ConsoleInput.ulIndexEvent++;                       /* update index counter */
   if (ConsoleInput.ulIndexEvent >= CONSOLE_INPUTQUEUESIZE)
     ConsoleInput.ulIndexEvent = 0;
-  
+
   return (NO_ERROR);                                                   /* OK */
 }
@@ -1505,5 +1575,5 @@
  * Remark    : @@@PH: 2nd table that learns codes automatically from "down"
  *                    messages from PM. With Alt-a, etc. it is 0 for "up" ?
- * Status    : 
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/03/07 16:55]
@@ -1624,5 +1694,5 @@
    /* VK_M_BUTTONRELEASE  0x006B */ 0,
    /* VK_M_DOUBLECLICK    0x006C */ 0,
-   
+
 #if 0
 0xA4, /* WIN_VK_LMENU   ??? */
@@ -1673,5 +1743,5 @@
   USHORT       usVk       = ((ULONG)mp2 & 0xffff0000) >> 16;
   UCHAR        ucChar     = usCh & 0x00ff;
-  
+
 #ifdef DEBUG_LOCAL2
   dprintf(("KERNEL32/CONSOLE:ConsoleInputEventPushKey(%08x,%08x).\n",
@@ -1680,18 +1750,18 @@
 #endif
 
- 
+
   InputRecord.EventType = KEY_EVENT;                 /* fill event structure */
   InputRecord.Event.KeyEvent.dwControlKeyState = 0;
-  
+
   if (fsFlags & KC_SHIFT) InputRecord.Event.KeyEvent.dwControlKeyState |= SHIFT_PRESSED;
   if (fsFlags & KC_ALT)   InputRecord.Event.KeyEvent.dwControlKeyState |= LEFT_ALT_PRESSED;
   if (fsFlags & KC_CTRL)  InputRecord.Event.KeyEvent.dwControlKeyState |= LEFT_CTRL_PRESSED;
-  
-  /* @@@PH no support for RIGHT_ALT_PRESSED, 
+
+  /* @@@PH no support for RIGHT_ALT_PRESSED,
                           RIGHT_CTRL_PRESSED,
-                          NUMLOCK_ON, 
-                          SCROLLLOCK_ON, 
-                          CAPSLOCK_ON, 
-                          ENHANCED_KEY 
+                          NUMLOCK_ON,
+                          SCROLLLOCK_ON,
+                          CAPSLOCK_ON,
+                          ENHANCED_KEY
    */
 
@@ -1700,5 +1770,5 @@
   InputRecord.Event.KeyEvent.wVirtualKeyCode  = usVk;
   InputRecord.Event.KeyEvent.wVirtualScanCode = ucScanCode;
-  
+
              /* check if ascii is valid, if so then wVirtualKeyCode = ascii, */
              /* else go through the table                                    */
@@ -1712,5 +1782,5 @@
       InputRecord.Event.KeyEvent.wVirtualKeyCode = usCh & 0xDF;
     else
-      InputRecord.Event.KeyEvent.wVirtualKeyCode = usCh;    
+      InputRecord.Event.KeyEvent.wVirtualKeyCode = usCh;
   }
   else
@@ -1721,5 +1791,5 @@
           tabVirtualKeyCodes[usVk];                     /* translate keycode */
     }
-    
+
                 /* this is a workaround for empty / invalid wVirtualKeyCodes */
   if (InputRecord.Event.KeyEvent.wVirtualKeyCode == 0x0000)
@@ -1730,8 +1800,8 @@
       InputRecord.Event.KeyEvent.wVirtualKeyCode = usCh & 0xDF;
     else
-      InputRecord.Event.KeyEvent.wVirtualKeyCode = usCh;    
-  }
-  
-    
+      InputRecord.Event.KeyEvent.wVirtualKeyCode = usCh;
+  }
+
+
   /* @@@PH handle special keys */
   if ( (ucChar != 0xe0) && (ucChar != 0x00) )
@@ -1743,5 +1813,5 @@
     InputRecord.Event.KeyEvent.uChar.AsciiChar  = (ucChar >> 8);
   }
-  
+
               /* further processing according the current input console mode */
   if (ConsoleInput.dwConsoleMode & ENABLE_PROCESSED_INPUT)
@@ -1749,5 +1819,5 @@
     /* filter ctrl-c, etc. */
   }
-  
+
 #if 0
   /* DEBUG */
@@ -1762,10 +1832,10 @@
            SHORT1FROMMP(mp2),
            SHORT2FROMMP(mp2)));
-  
+
   dprintf(("DEBUG: ascii=[%c] (%02x)",
            InputRecord.Event.KeyEvent.uChar.AsciiChar,
            InputRecord.Event.KeyEvent.uChar.AsciiChar));
 #endif
-  
+
   rc = ConsoleInputEventPush(&InputRecord);           /* add it to the queue */
   return (rc);                                                         /* OK */
@@ -1780,5 +1850,5 @@
  * Result    : API returncode
  * Remark    :
- * Status    : 
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/03/07 16:55]
@@ -1793,67 +1863,67 @@
   USHORT             fsFlags = SHORT2FROMMP(mp2);           /* get key flags */
   static USHORT      usButtonState;     /* keeps track of mouse button state */
-  
+
                                       /* do we have to process mouse input ? */
   if ( !(ConsoleInput.dwConsoleMode & ENABLE_MOUSE_INPUT))
     return (NO_ERROR);                                 /* return immediately */
-  
+
   dprintf(("KERNEL32/CONSOLE:ConsoleInputEventPushMouse(%08x,%08x,%08x).\n",
            ulMessage,
            mp1,
            mp2));
-  
+
   memset(&InputRecord,                                 /* zero the structure */
          0,
          sizeof (INPUT_RECORD) );
-  
+
   InputRecord.EventType = MOUSE_EVENT;               /* fill event structure */
-  
+
   switch (ulMessage)
   {
-    case WM_MOUSEMOVE: 
+    case WM_MOUSEMOVE:
       InputRecord.Event.MouseEvent.dwEventFlags      = MOUSE_MOVED;
       InputRecord.Event.MouseEvent.dwMousePosition.X = SHORT1FROMMP(mp1);
       InputRecord.Event.MouseEvent.dwMousePosition.Y = SHORT2FROMMP(mp1);
-      
+
       InputRecord.Event.MouseEvent.dwButtonState     = usButtonState;
-     
+
       if (fsFlags & KC_SHIFT) InputRecord.Event.MouseEvent.dwControlKeyState |= SHIFT_PRESSED;
       if (fsFlags & KC_ALT)   InputRecord.Event.MouseEvent.dwControlKeyState |= LEFT_ALT_PRESSED;
       if (fsFlags & KC_CTRL)  InputRecord.Event.MouseEvent.dwControlKeyState |= LEFT_CTRL_PRESSED;
-      
-      /* @@@PH no support for RIGHT_ALT_PRESSED, 
+
+      /* @@@PH no support for RIGHT_ALT_PRESSED,
                               RIGHT_CTRL_PRESSED,
-                              NUMLOCK_ON, 
-                              SCROLLLOCK_ON, 
-                              CAPSLOCK_ON, 
-                              ENHANCED_KEY 
+                              NUMLOCK_ON,
+                              SCROLLLOCK_ON,
+                              CAPSLOCK_ON,
+                              ENHANCED_KEY
        */
       break;
-    
+
     case WM_BUTTON1UP:
       usButtonState            &= ~FROM_LEFT_1ST_BUTTON_PRESSED;
       InputRecord.Event.MouseEvent.dwButtonState = usButtonState;
       break;
-    
+
     case WM_BUTTON1DOWN:
       usButtonState            |=  FROM_LEFT_1ST_BUTTON_PRESSED;
       InputRecord.Event.MouseEvent.dwButtonState = usButtonState;
       break;
-  
+
     case WM_BUTTON2UP:
       usButtonState &= ~FROM_LEFT_2ND_BUTTON_PRESSED;
       InputRecord.Event.MouseEvent.dwButtonState = usButtonState;
       break;
-    
+
     case WM_BUTTON2DOWN:
       usButtonState |= FROM_LEFT_2ND_BUTTON_PRESSED;
       InputRecord.Event.MouseEvent.dwButtonState = usButtonState;
       break;
-    
+
     case WM_BUTTON3UP:
       usButtonState &= ~FROM_LEFT_3RD_BUTTON_PRESSED;
       InputRecord.Event.MouseEvent.dwButtonState = usButtonState;
       break;
-    
+
     case WM_BUTTON3DOWN:
       usButtonState |=  FROM_LEFT_3RD_BUTTON_PRESSED;
@@ -1866,5 +1936,5 @@
       usButtonState &= ~FROM_LEFT_1ST_BUTTON_PRESSED;
       break;
-  
+
     case WM_BUTTON2DBLCLK:
       InputRecord.Event.MouseEvent.dwEventFlags = DOUBLE_CLICK;
@@ -1872,5 +1942,5 @@
       usButtonState &= ~FROM_LEFT_2ND_BUTTON_PRESSED;
       break;
-      
+
     case WM_BUTTON3DBLCLK:
       InputRecord.Event.MouseEvent.dwEventFlags = DOUBLE_CLICK;
@@ -1879,9 +1949,9 @@
       break;
   }
-  
+
                         /* @@@PH pseudo-support for RIGHTMOST_BUTTON_PRESSED */
   if (InputRecord.Event.MouseEvent.dwButtonState & FROM_LEFT_3RD_BUTTON_PRESSED)
     InputRecord.Event.MouseEvent.dwButtonState |= RIGHTMOST_BUTTON_PRESSED;
-  
+
   rc = ConsoleInputEventPush(&InputRecord);           /* add it to the queue */
   return (rc);                                                         /* OK */
@@ -1896,5 +1966,5 @@
  * Result    : API returncode
  * Remark    :
- * Status    : 
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/03/07 16:55]
@@ -1909,13 +1979,13 @@
   if ( !(ConsoleInput.dwConsoleMode & ENABLE_WINDOW_INPUT))
     return (NO_ERROR);                                 /* return immediately */
-  
+
   dprintf(("KERNEL32/CONSOLE:ConsoleInputEventPushWindow(x = %u, y = %u).\n",
            coordWindowSize.X,
            coordWindowSize.Y));
-  
+
   InputRecord.EventType = WINDOW_BUFFER_SIZE_EVENT;  /* fill event structure */
-  
+
   InputRecord.Event.WindowBufferSizeEvent.dwSize = coordWindowSize;
-  
+
   rc = ConsoleInputEventPush(&InputRecord);           /* add it to the queue */
   return (rc);                                                         /* OK */
@@ -1930,5 +2000,5 @@
  * Result    : API returncode
  * Remark    :
- * Status    : 
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/03/07 16:55]
@@ -1939,17 +2009,17 @@
   INPUT_RECORD     InputRecord;                /* the input record structure */
   APIRET           rc;                                     /* API-returncode */
-  
+
   /* @@@PH this is unknown to me - there's no separate bit for menu events ? */
                                      /* do we have to process window input ? */
   if ( !(ConsoleInput.dwConsoleMode & ENABLE_WINDOW_INPUT))
     return (NO_ERROR);                                 /* return immediately */
-  
+
   dprintf(("KERNEL32/CONSOLE:ConsoleInputEventPushMenu(%08x).\n",
            dwCommandId));
-  
+
   InputRecord.EventType = MENU_EVENT;                /* fill event structure */
-  
+
   InputRecord.Event.MenuEvent.dwCommandId = dwCommandId;
-  
+
   rc = ConsoleInputEventPush(&InputRecord);           /* add it to the queue */
   return (rc);                                                         /* OK */
@@ -1964,5 +2034,5 @@
  * Result    : API returncode
  * Remark    :
- * Status    : 
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/03/07 16:55]
@@ -1973,17 +2043,17 @@
   INPUT_RECORD     InputRecord;                /* the input record structure */
   APIRET           rc;                                     /* API-returncode */
-  
+
   /* @@@PH this is unknown to me - there's no separate bit for menu events ? */
                                      /* do we have to process window input ? */
   if ( !(ConsoleInput.dwConsoleMode & ENABLE_WINDOW_INPUT))
     return (NO_ERROR);                                 /* return immediately */
-  
+
   dprintf(("KERNEL32/CONSOLE:ConsoleInputEventPushFocus(%08x).\n",
            bSetFocus));
-  
+
   InputRecord.EventType = FOCUS_EVENT;               /* fill event structure */
-  
+
   InputRecord.Event.FocusEvent.bSetFocus = bSetFocus;
-  
+
   rc = ConsoleInputEventPush(&InputRecord);           /* add it to the queue */
   return (rc);                                                         /* OK */
@@ -1994,9 +2064,9 @@
  * Name      : static ULONG ConsoleInputQueueEvents
  * Purpose   : query number of events in the queue
- * Parameters: 
+ * Parameters:
  * Variables :
  * Result    : number of events
  * Remark    :
- * Status    : 
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/03/07 16:55]
@@ -2012,9 +2082,9 @@
  * Name      : static void ConsoleCursorShow
  * Purpose   : query number of events in the queue
- * Parameters: 
+ * Parameters:
  * Variables :
  * Result    : number of events
  * Remark    :
- * Status    : 
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/03/07 16:55]
@@ -2028,13 +2098,13 @@
   static BOOL fState;                                /* current cursor state */
   RECTL rclWindow;                                    /* current window size */
-  
+
 #ifdef DEBUG_LOCAL2
   dprintf(("KERNEL32:Console:ConsoleCursorShow(%u)\n",
            ulCursorMode));
 #endif
-  
+
   if (pConsoleBuffer->CursorInfo.bVisible == FALSE)/* cursor is switched off */
     return;                                            /* return immediately */
-  
+
   switch (ulCursorMode)
   {
@@ -2045,5 +2115,5 @@
         fState = FALSE;       /* set to invisible and invert our cursor rect */
       break;
-    
+
     case CONSOLECURSOR_SHOW:
       if (fState == TRUE)                        /* cursor currently shown ? */
@@ -2052,19 +2122,19 @@
         fState = TRUE;          /* set to visible and invert our cursor rect */
       break;
-    
+
     case CONSOLECURSOR_BLINK:
       fState = !fState;      /* let there be on off on off on off on off ... */
       break;
-  
+
     case CONSOLECURSOR_OVERWRITTEN:       /* our cursor has been overwritten */
       fState = TRUE;                       /* so show the cursor immediately */
       break;
   }
-  
-  
+
+
                                               /* query current window's size */
   WinQueryWindowRect(ConsoleGlobals.hwndClient,
                      &rclWindow);
-  
+
                                       /* calculate coordinates of the cursor */
   rclCursor.xLeft   = ConsoleGlobals.sCellCX * pConsoleBuffer->coordCursorPosition.X;
@@ -2076,11 +2146,11 @@
                        pConsoleBuffer->CursorInfo.dwSize /
                        100);
-                       
+
   hps = WinGetPS(ConsoleGlobals.hwndClient);                      /* get HPS */
-  
+
   /* @@@PH invert coordinates here ... */
   WinInvertRect(hps,                  /* our cursor is an inverted rectangle */
                 &rclCursor);
-  
+
   WinReleasePS(hps);                                /* release the hps again */
 }
@@ -2090,9 +2160,9 @@
  * Name      : static APIRET ConsoleFontQuery
  * Purpose   : queries the current font cell sizes
- * Parameters: 
+ * Parameters:
  * Variables :
  * Result    : API returncode
  * Remark    :
- * Status    : 
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/03/07 16:55]
@@ -2110,9 +2180,9 @@
  * Name      : static void ConsoleCursorShow
  * Purpose   : query number of events in the queue
- * Parameters: 
+ * Parameters:
  * Variables :
  * Result    : number of events
  * Remark    : called during INIT, FONTCHANGE, RESIZE, BUFFERCHANGE
- * Status    : 
+ * Status    :
  *
  * Author    : Patrick Haller [Wed, 1998/04/29 16:55]
@@ -2125,63 +2195,63 @@
   PRECTL pRcl = &rcl;
   ULONG  flStyle;                              /* window frame control style */
-  
+
   BOOL fNeedVertScroll;                      /* indicates need of scrollbars */
   BOOL fNeedHorzScroll;
-  
+
   LONG lScrollX;                           /* width and height of scrollbars */
   LONG lScrollY;
-  
+
                                          /* now calculate actual window size */
   lX = ConsoleGlobals.sCellCX * ConsoleGlobals.coordWindowSize.X;
   lY = ConsoleGlobals.sCellCY * ConsoleGlobals.coordWindowSize.Y;
-  
+
   if ( (ConsoleGlobals.sCellCX == 0) ||          /* prevent division by zero */
        (ConsoleGlobals.sCellCY == 0) )
-    return;    
-  
+    return;
+
          /* calculate maximum console window size in pixels for the tracking */
   ConsoleGlobals.coordMaxWindowPels.X = ConsoleGlobals.sCellCX * pConsoleBuffer->coordWindowSize.X
                                         + WinQuerySysValue(HWND_DESKTOP, SV_CXSIZEBORDER) * 2;
-  
+
   ConsoleGlobals.coordMaxWindowPels.Y = ConsoleGlobals.sCellCY * pConsoleBuffer->coordWindowSize.Y
                                         + WinQuerySysValue(HWND_DESKTOP, SV_CYSIZEBORDER) * 2
                                         + WinQuerySysValue(HWND_DESKTOP, SV_CYTITLEBAR);
-  
+
   /***************************/
   /* @@@PH broken code below */
   /***************************/
   return;
-  
+
                              /* add the window border height and width, etc. */
   WinQueryWindowRect (ConsoleGlobals.hwndClient,
                       pRcl);
-  
+
                                                    /* calculate visible area */
    /* calculate real client window rectangle and take care of the scrollbars */
   lScrollX = WinQuerySysValue(HWND_DESKTOP, SV_CXVSCROLL);
   lScrollY = WinQuerySysValue(HWND_DESKTOP, SV_CYHSCROLL);
-  if (ConsoleGlobals.fHasHorzScroll) 
+  if (ConsoleGlobals.fHasHorzScroll)
   {
     lY += lScrollY;
     ConsoleGlobals.coordMaxWindowPels.Y += lScrollY;
   }
-  
-  if (ConsoleGlobals.fHasVertScroll) 
+
+  if (ConsoleGlobals.fHasVertScroll)
   {
     lX += lScrollX;
     ConsoleGlobals.coordMaxWindowPels.X += lScrollX;
   }
-  
+
   /* @@@PH might NOT exceed maximum VioPS size ! */
-  ConsoleGlobals.coordWindowSize.X = (pRcl->xRight - pRcl->xLeft)   
+  ConsoleGlobals.coordWindowSize.X = (pRcl->xRight - pRcl->xLeft)
                                      / ConsoleGlobals.sCellCX;
-  
-  ConsoleGlobals.coordWindowSize.Y = (pRcl->yTop   - pRcl->yBottom) 
+
+  ConsoleGlobals.coordWindowSize.Y = (pRcl->yTop   - pRcl->yBottom)
                                      / ConsoleGlobals.sCellCY;
-  
+
                                     /* do we have to enable the scrollbars ? */
   fNeedHorzScroll = lX < pConsoleBuffer->coordWindowSize.X * ConsoleGlobals.sCellCX;
   fNeedVertScroll = lY < pConsoleBuffer->coordWindowSize.Y * ConsoleGlobals.sCellCY;
-  
+
 
   if ( (ConsoleGlobals.fHasVertScroll != fNeedVertScroll) ||
@@ -2190,5 +2260,5 @@
     flStyle = WinQueryWindowULong(ConsoleGlobals.hwndFrame,
                                   QWL_STYLE);
-  
+
                                            /* now set or remove the controls */
     if (ConsoleGlobals.fHasHorzScroll != fNeedHorzScroll)
@@ -2208,5 +2278,5 @@
         ConsoleGlobals.coordWindowPos.X = 0;    /* we can see the whole buffer */
       }
-  
+
     if (ConsoleGlobals.fHasVertScroll != fNeedVertScroll)
       if (fNeedVertScroll)
@@ -2222,23 +2292,23 @@
         WinSetParent(ConsoleGlobals.hwndVertScroll,        /* detach control */
                      HWND_OBJECT,
-                     FALSE);    
+                     FALSE);
         ConsoleGlobals.coordWindowPos.Y = 0;  /* we can see the whole buffer */
       }
-  
-  
+
+
     WinSendMsg(ConsoleGlobals.hwndFrame,                     /* update frame */
                WM_UPDATEFRAME,
                MPFROMLONG(flStyle),
                MPVOID);
-    
+
     WinInvalidateRect(ConsoleGlobals.hwndFrame,       /* redraw frame window */
                       NULL,
                       TRUE);
-    
+
     ConsoleGlobals.fHasVertScroll = fNeedVertScroll;       /* update globals */
     ConsoleGlobals.fHasHorzScroll = fNeedHorzScroll;       /* update globals */
   }
-    
-  
+
+
                                     /* setup the scrollbars and scrollranges */
   if (ConsoleGlobals.fHasVertScroll)
@@ -2246,19 +2316,19 @@
     /* setup vertical scrollbar */
   }
-  
-  
+
+
   if (ConsoleGlobals.fHasHorzScroll)
   {
     /* setup horizonal scrollbar */
   }
-   
-  
+
+
   WinCalcFrameRect(ConsoleGlobals.hwndFrame,    /* calculate frame rectangle */
                    pRcl,
                    FALSE);
-  
+
   /* @@@PH client may not overlap frame ! */
   /* @@@PH write values to TRACKINFO      */
-  
+
 #if 0
   /* @@@PH this results in recursion */
@@ -2270,5 +2340,5 @@
                    lY,
                    SWP_SIZE);
-  
+
   WinSetWindowPos (ConsoleGlobals.hwndFrame,    /* adjust client window size */
                    HWND_DESKTOP,
@@ -2283,6 +2353,6 @@
 
 /*****************************************************************************
- * Name      : BOOL WIN32API OS2AllocConsole
- * Purpose   : The AllocConsole function allocates a new console 
+ * Name      : BOOL WIN32API AllocConsole
+ * Purpose   : The AllocConsole function allocates a new console
  *             for the calling process
  * Parameters: VOID
@@ -2297,12 +2367,12 @@
  *****************************************************************************/
 
-BOOL WIN32API OS2AllocConsole(VOID)
+BOOL WIN32API AllocConsole(VOID)
 {
   APIRET rc;                                               /* API returncode */
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2AllocConsole() called.\n");
 #endif
-  
+
   rc = ConsoleInit();                    /* initialize subsystem if required */
   if (rc != NO_ERROR)                                    /* check for errors */
@@ -2317,5 +2387,5 @@
 
 /*****************************************************************************
- * Name      : HANDLE WIN32API OS2CreateConsoleScreenBuffer
+ * Name      : HANDLE WIN32API CreateConsoleScreenBuffer
  * Purpose   : The CreateConsoleScreenBuffer function creates a console
  *             screen buffer and returns a handle of it.
@@ -2326,5 +2396,5 @@
  *             LPVOID lpScreenBufferData - reserved
  * Variables :
- * Result    : 
+ * Result    :
  * Remark    : a console buffer is a kernel heap object equipped with
  *             share modes, access rights, etc.
@@ -2332,10 +2402,10 @@
  *             console device driver for it ... maybe this turns out to
  *             be necessary since we've got to handle CONIN$ and CONOUT$, too.
- * Status    : 
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 03:55]
  *****************************************************************************/
 
-HANDLE WIN32API OS2CreateConsoleScreenBuffer(DWORD  dwDesiredAccess,
+HANDLE WIN32API CreateConsoleScreenBuffer(DWORD  dwDesiredAccess,
                                              DWORD  dwShareMode,
                                              LPVOID lpSecurityAttributes,
@@ -2344,5 +2414,5 @@
 {
   HANDLE hResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE:OS2CreateConsoleScreenBuffer(%08x,%08x,%08x,%08x,%08x).\n",
@@ -2361,5 +2431,5 @@
                          dwFlags,
                          INVALID_HANDLE_VALUE);
-  
+
   return hResult;
 }
@@ -2367,16 +2437,16 @@
 
 /*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2FillConsoleOutputAttribute(HANDLE  hConsoleOutput,
+BOOL WIN32API FillConsoleOutputAttribute(HANDLE  hConsoleOutput,
                                             WORD    wAttribute,
                                             DWORD   nLength,
@@ -2385,5 +2455,5 @@
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2FillConsoleOutputAttribute(%08x,%04x,%08x,%08x,%08x).\n",
@@ -2394,5 +2464,5 @@
            lpNumberOfAttrsWritten);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleOutput,
                                   DRQ_FILLCONSOLEOUTPUTATTRIBUTE,
@@ -2400,6 +2470,6 @@
                                   (ULONG)nLength,
                                   COORD2ULONG(dwWriteCoord),
-                                  (ULONG)lpNumberOfAttrsWritten);  
-  
+                                  (ULONG)lpNumberOfAttrsWritten);
+
   return fResult;
 }
@@ -2407,16 +2477,16 @@
 
 /*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2FillConsoleOutputCharacterA(HANDLE  hConsoleOutput,
+BOOL WIN32API FillConsoleOutputCharacterA(HANDLE  hConsoleOutput,
                                              UCHAR   cCharacter,
                                              DWORD   nLength,
@@ -2425,5 +2495,5 @@
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2FillConsoleOutputCharacterA(%08x,%c,%08x,%08x,%08x).\n",
@@ -2434,5 +2504,5 @@
            lpNumberOfCharsWritten);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleOutput,
                                   DRQ_FILLCONSOLEOUTPUTCHARACTERA,
@@ -2440,23 +2510,23 @@
                                   (ULONG)nLength,
                                   COORD2ULONG(dwWriteCoord),
-                                  (ULONG)lpNumberOfCharsWritten);  
-  
-  return fResult;  
-}
-
-
-/*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+                                  (ULONG)lpNumberOfCharsWritten);
+
+  return fResult;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2FillConsoleOutputCharacterW(HANDLE  hConsoleOutput,
+BOOL WIN32API FillConsoleOutputCharacterW(HANDLE  hConsoleOutput,
                                              WCHAR   cCharacter,
                                              DWORD   nLength,
@@ -2465,5 +2535,5 @@
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2FillConsoleOutputCharacterW(%08x,%c,%08x,%08x,%08x) .\n",
@@ -2474,5 +2544,5 @@
            lpNumberOfCharsWritten);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleOutput,
                                   DRQ_FILLCONSOLEOUTPUTCHARACTERW,
@@ -2487,24 +2557,24 @@
 
 /*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2FlushConsoleInputBuffer( HANDLE hConsoleInput )
+BOOL WIN32API FlushConsoleInputBuffer( HANDLE hConsoleInput )
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2FlushConsoleInputBuffer(%08x).\n",
            hConsoleInput);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleInput,
                                   DRQ_FLUSHCONSOLEINPUTBUFFER,
@@ -2519,5 +2589,5 @@
 
 /*****************************************************************************
- * Name      : BOOL WIN32API OS2FreeConsole
+ * Name      : BOOL WIN32API FreeConsole
  * Purpose   : The FreeConsole function detaches the calling process
  *             from its console.
@@ -2533,12 +2603,12 @@
  *****************************************************************************/
 
-BOOL WIN32API OS2FreeConsole( VOID )
+BOOL WIN32API FreeConsole( VOID )
 {
   APIRET rc;                                               /* API returncode */
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2FreeConsole() called.\n");
 #endif
-  
+
   rc = ConsoleTerminate();                /* terminate subsystem if required */
   if (rc != NO_ERROR)                                    /* check for errors */
@@ -2549,22 +2619,22 @@
   else
     return TRUE;                                                /* Fine ! :) */
-  
-  return TRUE;  
-}
-
-
-/*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+
+  return TRUE;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2GenerateConsoleCtrlEvent(DWORD dwCtrlEvent,
+BOOL WIN32API GenerateConsoleCtrlEvent(DWORD dwCtrlEvent,
                                           DWORD dwProcessGroupId)
 {
@@ -2574,5 +2644,5 @@
            dwProcessGroupId);
 #endif
-  
+
   return TRUE;
 }
@@ -2580,21 +2650,21 @@
 
 /*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-UINT WIN32API OS2GetConsoleCP(VOID)
+UINT WIN32API GetConsoleCP(VOID)
 {
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2GetConsoleCP not implemented.\n");
 #endif
-  
+
   return 1;
 }
@@ -2602,20 +2672,20 @@
 
 /*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2GetConsoleCursorInfo(HANDLE               hConsoleOutput,
+BOOL WIN32API GetConsoleCursorInfo(HANDLE               hConsoleOutput,
                                       PCONSOLE_CURSOR_INFO lpConsoleCursorInfo)
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2GetConsoleCursorInfo(%08x,%08x).\n",
@@ -2623,5 +2693,5 @@
            lpConsoleCursorInfo);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleOutput,
                                   DRQ_GETCONSOLECURSORINFO,
@@ -2636,20 +2706,20 @@
 
 /*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2GetConsoleMode(HANDLE  hConsole,
+BOOL WIN32API GetConsoleMode(HANDLE  hConsole,
                                 LPDWORD lpMode)
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2GetConsoleMode(%08x,%08x).\n",
@@ -2657,5 +2727,5 @@
            lpMode);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsole,
                                   DRQ_GETCONSOLEMODE,
@@ -2664,5 +2734,5 @@
                                   0,
                                   0);
-  
+
   return fResult;
 }
@@ -2670,21 +2740,21 @@
 
 /*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-UINT WIN32API OS2GetConsoleOutputCP(VOID)
+UINT WIN32API GetConsoleOutputCP(VOID)
 {
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2GetConsoleOutputCP not implemented.\n");
 #endif
-  
+
   return 1;
 }
@@ -2692,16 +2762,16 @@
 
 /*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2GetConsoleScreenBufferInfo(HANDLE                      hConsoleOutput,
+BOOL WIN32API GetConsoleScreenBufferInfo(HANDLE                      hConsoleOutput,
                                             PCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo)
 {
@@ -2713,5 +2783,5 @@
            lpConsoleScreenBufferInfo);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleOutput,
                                   DRQ_GETCONSOLESCREENBUFFERINFO,
@@ -2726,5 +2796,5 @@
 
 /*****************************************************************************
- * Name      : DWORD WIN32API OS2GetConsoleTitle
+ * Name      : DWORD WIN32API GetConsoleTitle
  * Purpose   : Query the current console window title
  * Parameters: LPTSTR lpConsoleTitle
@@ -2738,5 +2808,5 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2GetConsoleTitleA(LPTSTR lpConsoleTitle,
+DWORD WIN32API GetConsoleTitleA(LPTSTR lpConsoleTitle,
                                    DWORD  nSize)
 {
@@ -2748,14 +2818,14 @@
            nSize);
 #endif
-  
+
   if (ConsoleGlobals.pszWindowTitle == NULL)    /* is there a window title ? */
     return 0;                                           /* abort immediately */
-  
+
   ulLength = strlen(ConsoleGlobals.pszWindowTitle);        /* length of text */
-  
+
   strncpy(lpConsoleTitle,
           ConsoleGlobals.pszWindowTitle,
           nSize);
-  
+
   return (nSize < ulLength) ? nSize : ulLength;
 }
@@ -2763,5 +2833,5 @@
 
 /*****************************************************************************
- * Name      : DWORD WIN32API OS2GetConsoleTitle
+ * Name      : DWORD WIN32API GetConsoleTitle
  * Purpose   : Query the current console window title
  * Parameters: LPTSTR lpConsoleTitle
@@ -2775,5 +2845,5 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2GetConsoleTitleW(LPTSTR lpConsoleTitle,
+DWORD WIN32API GetConsoleTitleW(LPTSTR lpConsoleTitle,
                                    DWORD  nSize)
 {
@@ -2785,16 +2855,16 @@
            nSize);
 #endif
-  
+
   if (ConsoleGlobals.pszWindowTitle == NULL)    /* is there a window title ? */
     return 0;                                           /* abort immediately */
-  
+
   ulLength = strlen(ConsoleGlobals.pszWindowTitle);        /* length of text */
-  
+
   strncpy(lpConsoleTitle,
           ConsoleGlobals.pszWindowTitle,
           nSize);
-  
+
   /* @@@PH Ascii2Unicode */
-  
+
   return (nSize < ulLength) ? nSize : ulLength;
 }
@@ -2802,25 +2872,25 @@
 
 /*****************************************************************************
- * Name      : COORD WIN32API OS2GetLargestConsoleWindowSize
+ * Name      : COORD WIN32API GetLargestConsoleWindowSize
  * Purpose   : Determine maximum AVIO size
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-COORD WIN32API OS2GetLargestConsoleWindowSize(HANDLE hConsoleOutput)
+COORD WIN32API GetLargestConsoleWindowSize(HANDLE hConsoleOutput)
 {
   DWORD dwResult;
   COORD coordResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2GetLargestConsoleWindowSize(%08x).\n",
            hConsoleOutput);
 #endif
-  
+
   dwResult = HMDeviceRequest(hConsoleOutput,
                              DRQ_GETLARGESTCONSOLEWINDOWSIZE,
@@ -2828,6 +2898,6 @@
                              0,
                              0,
-                             0);  
-  
+                             0);
+
   ULONG2COORD(coordResult,dwResult)
   return ( coordResult );
@@ -2836,16 +2906,16 @@
 
 /*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2GetNumberOfConsoleInputEvents(HANDLE  hConsoleInput,
+BOOL WIN32API GetNumberOfConsoleInputEvents(HANDLE  hConsoleInput,
                                                LPDWORD lpNumberOfEvents)
 {
@@ -2857,5 +2927,5 @@
            lpNumberOfEvents);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleInput,
                                   DRQ_GETNUMBEROFCONSOLEINPUTEVENTS,
@@ -2864,5 +2934,5 @@
                                   0,
                                   0);
-  
+
   return fResult;
 }
@@ -2870,29 +2940,29 @@
 
 /*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2GetNumberOfConsoleMouseButtons(LPDWORD lpcNumberOfMouseButtons)
+BOOL WIN32API GetNumberOfConsoleMouseButtons(LPDWORD lpcNumberOfMouseButtons)
 {
   LONG lMouseButtons;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2GetNumberOfConsoleMouseButtons(%08x).\n",
            lpcNumberOfMouseButtons);
 #endif
-  
+
   lMouseButtons = WinQuerySysValue(HWND_DESKTOP,        /* query PM for that */
                                    SV_CMOUSEBUTTONS);
-  
+
   *lpcNumberOfMouseButtons = (DWORD)lMouseButtons;
-  
+
   return TRUE;
 }
@@ -2900,16 +2970,16 @@
 
 /*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2PeekConsoleInputW(HANDLE        hConsoleInput,
+BOOL WIN32API PeekConsoleInputW(HANDLE        hConsoleInput,
                                    PINPUT_RECORD pirBuffer,
                                    DWORD         cInRecords,
@@ -2925,5 +2995,5 @@
            lpcRead);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleInput,
                                   DRQ_PEEKCONSOLEINPUTW,
@@ -2932,5 +3002,5 @@
                                   (ULONG)lpcRead,
                                   0);
-  
+
   return fResult;
 }
@@ -2938,16 +3008,16 @@
 
 /*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2PeekConsoleInputA(HANDLE        hConsoleInput,
+BOOL WIN32API PeekConsoleInputA(HANDLE        hConsoleInput,
                                    PINPUT_RECORD pirBuffer,
                                    DWORD         cInRecords,
@@ -2955,5 +3025,5 @@
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2PeekConsoleInputA(%08x,%08x,%08x,%08x).\n",
@@ -2963,5 +3033,5 @@
            lpcRead);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleInput,
                                   DRQ_PEEKCONSOLEINPUTA,
@@ -2970,22 +3040,22 @@
                                   (ULONG)lpcRead,
                                   0);
-  
-  return fResult;  
-}
-
-
-/*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+
+  return fResult;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2ReadConsoleA(HANDLE  hConsoleInput,
+BOOL WIN32API ReadConsoleA(HANDLE  hConsoleInput,
                               LPVOID  lpvBuffer,
                               DWORD   cchToRead,
@@ -2994,5 +3064,5 @@
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2ReadConsoleA(%08x,%08x,%08x,%08x,%08x).\n",
@@ -3003,5 +3073,5 @@
            lpvReserved);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleInput,
                                   DRQ_READCONSOLEA,
@@ -3010,22 +3080,22 @@
                                   (ULONG)lpcchRead,
                                   (ULONG)lpvReserved);
-  
-  return fResult;  
-}
-
-
-/*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+
+  return fResult;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2ReadConsoleW(HANDLE  hConsoleInput,
+BOOL WIN32API ReadConsoleW(HANDLE  hConsoleInput,
                               LPVOID  lpvBuffer,
                               DWORD   cchToRead,
@@ -3034,5 +3104,5 @@
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2ReadConsoleW(%08x,%08x,%08x,%08x,%08x).\n",
@@ -3043,5 +3113,5 @@
            lpvReserved);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleInput,
                                   DRQ_READCONSOLEW,
@@ -3050,22 +3120,22 @@
                                   (ULONG)lpcchRead,
                                   (ULONG)lpvReserved);
-  
-  return fResult;  
-}
-
-
-/*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+
+  return fResult;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2ReadConsoleInputA(HANDLE        hConsoleInput,
+BOOL WIN32API ReadConsoleInputA(HANDLE        hConsoleInput,
                                    PINPUT_RECORD pirBuffer,
                                    DWORD         cInRecords,
@@ -3073,5 +3143,5 @@
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2ReadConsoleInputA(%08x,%08x,%08x,%08x).\n",
@@ -3081,5 +3151,5 @@
            lpcRead);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleInput,
                                   DRQ_READCONSOLEINPUTA,
@@ -3088,22 +3158,22 @@
                                   (ULONG)lpcRead,
                                   0);
-  
-  return fResult;  
-}
-
-
-/*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+
+  return fResult;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2ReadConsoleInputW(HANDLE        hConsoleInput,
+BOOL WIN32API ReadConsoleInputW(HANDLE        hConsoleInput,
                                    PINPUT_RECORD pirBuffer,
                                    DWORD         cInRecords,
@@ -3111,5 +3181,5 @@
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2ReadConsoleInputW(%08x,%08x,%08x,%08x).\n",
@@ -3119,5 +3189,5 @@
            lpcRead);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleInput,
                                   DRQ_READCONSOLEINPUTW,
@@ -3126,22 +3196,22 @@
                                   (ULONG)lpcRead,
                                   0);
-  
-  return fResult;  
-}
-
-
-/*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+
+  return fResult;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2ReadConsoleOutputA(HANDLE      hConsoleOutput,
+BOOL WIN32API ReadConsoleOutputA(HANDLE      hConsoleOutput,
                                     PCHAR_INFO  pchiDestBuffer,
                                     COORD       coordDestBufferSize,
@@ -3150,5 +3220,5 @@
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2ReadConsoleOutputA(%08x,%08x,%08x,%08x,%08x).\n",
@@ -3159,5 +3229,5 @@
            psrctSourceRect);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleOutput,
                                   DRQ_READCONSOLEOUTPUTA,
@@ -3166,22 +3236,22 @@
                                   COORD2ULONG(coordDestBufferCoord),
                                   (ULONG)psrctSourceRect);
-  
-  return fResult;  
-}
-
-
-/*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+
+  return fResult;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2ReadConsoleOutputW(HANDLE      hConsoleOutput,
+BOOL WIN32API ReadConsoleOutputW(HANDLE      hConsoleOutput,
                                     PCHAR_INFO  pchiDestBuffer,
                                     COORD       coordDestBufferSize,
@@ -3190,5 +3260,5 @@
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2ReadConsoleOutputW(%08x,%08x,%08x,%08x,%08x).\n",
@@ -3199,5 +3269,5 @@
            psrctSourceRect);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleOutput,
                                   DRQ_READCONSOLEOUTPUTW,
@@ -3206,22 +3276,22 @@
                                   COORD2ULONG(coordDestBufferCoord),
                                   (ULONG)psrctSourceRect);
-  
-  return fResult;  
-}
-
-
-/*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+
+  return fResult;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2ReadConsoleOutputAttribute(HANDLE  hConsoleOutput,
+BOOL WIN32API ReadConsoleOutputAttribute(HANDLE  hConsoleOutput,
                                             LPWORD  lpwAttribute,
                                             DWORD   cReadCells,
@@ -3230,5 +3300,5 @@
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2ReadConsoleOutputAttribute(%08x,%08x,%08x,%08x,%08x).\n",
@@ -3239,5 +3309,5 @@
            lpcNumberRead);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleOutput,
                                   DRQ_READCONSOLEOUTPUTATTRIBUTE,
@@ -3246,22 +3316,22 @@
                                   COORD2ULONG(coordReadCoord),
                                   (ULONG)lpcNumberRead);
-  
-  return fResult;  
-}
-
-
-/*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+
+  return fResult;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2ReadConsoleOutputCharacterA(HANDLE  hConsoleOutput,
+BOOL WIN32API ReadConsoleOutputCharacterA(HANDLE  hConsoleOutput,
                                              LPTSTR  lpReadBuffer,
                                              DWORD   cchRead,
@@ -3270,5 +3340,5 @@
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2ReadConsoleOutputCharacterA(%08x,%08x,%08x,%08x,%08x).\n",
@@ -3279,5 +3349,5 @@
            lpcNumberRead);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleOutput,
                                   DRQ_READCONSOLEOUTPUTCHARACTERA,
@@ -3286,22 +3356,22 @@
                                   COORD2ULONG(coordReadCoord),
                                   (ULONG)lpcNumberRead);
-  
-  return fResult;  
-}
-
-
-/*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+
+  return fResult;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2ReadConsoleOutputCharacterW(HANDLE  hConsoleOutput,
+BOOL WIN32API ReadConsoleOutputCharacterW(HANDLE  hConsoleOutput,
                                              LPTSTR  lpReadBuffer,
                                              DWORD   cchRead,
@@ -3310,5 +3380,5 @@
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2ReadConsoleOutputCharacterW(%08x,%08x,%08x,%08x,%08x).\n",
@@ -3319,5 +3389,5 @@
            lpcNumberRead);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleOutput,
                                   DRQ_READCONSOLEOUTPUTCHARACTERW,
@@ -3326,22 +3396,22 @@
                                   COORD2ULONG(coordReadCoord),
                                   (ULONG)lpcNumberRead);
-  
-  return fResult;  
-}
-
-
-/*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+
+  return fResult;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2ScrollConsoleScreenBufferA(HANDLE      hConsoleOutput,
+BOOL WIN32API ScrollConsoleScreenBufferA(HANDLE      hConsoleOutput,
                                             PSMALL_RECT psrctSourceRect,
                                             PSMALL_RECT psrctClipRect,
@@ -3350,5 +3420,5 @@
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2ScrollConsoleScreenBufferA(%08x,%08x,%08x,%08x,%08x).\n",
@@ -3359,5 +3429,5 @@
            pchiFill);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleOutput,
                                   DRQ_SCROLLCONSOLESCREENBUFFERA,
@@ -3366,22 +3436,22 @@
                                   COORD2ULONG(coordDestOrigin),
                                   (ULONG)pchiFill);
-  
-  return fResult;  
-}
-
-
-/*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+
+  return fResult;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2ScrollConsoleScreenBufferW(HANDLE      hConsoleOutput,
+BOOL WIN32API ScrollConsoleScreenBufferW(HANDLE      hConsoleOutput,
                                             PSMALL_RECT psrctSourceRect,
                                             PSMALL_RECT psrctClipRect,
@@ -3390,5 +3460,5 @@
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2ScrollConsoleScreenBufferW(%08x,%08x,%08x,%08x,%08x).\n",
@@ -3399,5 +3469,5 @@
            pchiFill);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleOutput,
                                   DRQ_SCROLLCONSOLESCREENBUFFERW,
@@ -3406,29 +3476,29 @@
                                   COORD2ULONG(coordDestOrigin),
                                   (ULONG)pchiFill);
-  
-  return fResult;  
-}
-
-/*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+
+  return fResult;
+}
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2SetConsoleActiveScreenBuffer(HANDLE hConsoleOutput)
+BOOL WIN32API SetConsoleActiveScreenBuffer(HANDLE hConsoleOutput)
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2SetConsoleActiveScreenBuffer(%08x).\n",
            hConsoleOutput);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleOutput,
                                   DRQ_SETCONSOLEACTIVESCREENBUFFER,
@@ -3437,22 +3507,22 @@
                                   0,
                                   0);
-  
-  return fResult;  
-}
-
-
-/*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+
+  return fResult;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2SetConsoleCP(UINT IDCodePage)
+BOOL WIN32API SetConsoleCP(UINT IDCodePage)
 {
 #ifdef DEBUG_LOCAL2
@@ -3460,5 +3530,5 @@
            IDCodePage);
 #endif
-  
+
   return TRUE;
 }
@@ -3466,16 +3536,16 @@
 
 /*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2SetConsoleCtrlHandler(PHANDLER_ROUTINE pHandlerRoutine,
+BOOL WIN32API SetConsoleCtrlHandler(PHANDLER_ROUTINE pHandlerRoutine,
                                        BOOL             fAdd)
 {
@@ -3485,5 +3555,5 @@
            fAdd);
 #endif
-  
+
   return TRUE;
 }
@@ -3491,20 +3561,20 @@
 
 /*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2SetConsoleCursorInfo(HANDLE               hConsoleOutput,
+BOOL WIN32API SetConsoleCursorInfo(HANDLE               hConsoleOutput,
                                       PCONSOLE_CURSOR_INFO lpConsoleCursorInfo)
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2SetConsoleCursorInfo(%08x,%08x).\n",
@@ -3512,5 +3582,5 @@
            lpConsoleCursorInfo);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleOutput,
                                   DRQ_SETCONSOLECURSORINFO,
@@ -3519,17 +3589,17 @@
                                   0,
                                   0);
-  
-  return fResult;  
-}
-
-
-/*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+
+  return fResult;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
@@ -3537,9 +3607,9 @@
  *****************************************************************************/
 
-BOOL WIN32API OS2SetConsoleCursorPosition(HANDLE hConsoleOutput,
+BOOL WIN32API SetConsoleCursorPosition(HANDLE hConsoleOutput,
                                           COORD  coordCursor)
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2SetConsoleCursorPosition(%08x,%08x).\n",
@@ -3547,5 +3617,5 @@
            coordCursor);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleOutput,
                                   DRQ_SETCONSOLECURSORPOSITION,
@@ -3554,26 +3624,26 @@
                                   0,
                                   0);
-  
-  return fResult;  
-}
-
-
-/*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+
+  return fResult;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2SetConsoleMode(HANDLE hConsole,
+BOOL WIN32API SetConsoleMode(HANDLE hConsole,
                                 DWORD  fdwMode)
 {
  BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2SetConsoleMode(%08x,%08x).\n",
@@ -3581,5 +3651,5 @@
            fdwMode);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsole,
                                   DRQ_SETCONSOLEMODE,
@@ -3588,5 +3658,5 @@
                                   0,
                                   0);
-  
+
   return fResult;
 }
@@ -3594,16 +3664,16 @@
 
 /*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2SetConsoleOutputCP(UINT IDCodePage)
+BOOL WIN32API SetConsoleOutputCP(UINT IDCodePage)
 {
 #ifdef DEBUG_LOCAL2
@@ -3611,5 +3681,5 @@
            IDCodePage);
 #endif
-  
+
   return TRUE;
 }
@@ -3617,20 +3687,20 @@
 
 /*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2SetConsoleScreenBufferSize(HANDLE hConsoleOutput,
+BOOL WIN32API SetConsoleScreenBufferSize(HANDLE hConsoleOutput,
                                             COORD  coordSize)
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2SetConsoleScreenBufferSize(%08x,%08x).\n",
@@ -3638,5 +3708,5 @@
            coordSize);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleOutput,
                                   DRQ_SETCONSOLESCREENBUFFERSIZE,
@@ -3645,26 +3715,26 @@
                                   0,
                                   0);
-  
-  return fResult;  
-}
-
-
-/*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+
+  return fResult;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2SetConsoleTextAttribute(HANDLE hConsoleOutput,
+BOOL WIN32API SetConsoleTextAttribute(HANDLE hConsoleOutput,
                                          WORD   wAttr)
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2SetConsoleTextAttribute(%08x,%04x).\n",
@@ -3672,5 +3742,5 @@
            wAttr);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleOutput,
                                   DRQ_SETCONSOLETEXTATTRIBUTE,
@@ -3679,15 +3749,15 @@
                                   0,
                                   0);
-  
-  return fResult;  
-}
-
-
-/*****************************************************************************
- * Name      : BOOL WIN32API OS2SetConsoleTitleA
+
+  return fResult;
+}
+
+
+/*****************************************************************************
+ * Name      : BOOL WIN32API SetConsoleTitleA
  * Purpose   : Set new title text for the console window
  * Parameters: LPTSTR lpszTitle
  * Variables :
- * Result    : 
+ * Result    :
  * Remark    :
  * Status    : REWRITTEN UNTESTED
@@ -3696,5 +3766,5 @@
  *****************************************************************************/
 
-BOOL WIN32API OS2SetConsoleTitleA(LPTSTR lpszTitle)
+BOOL WIN32API SetConsoleTitleA(LPTSTR lpszTitle)
 {
 #ifdef DEBUG_LOCAL2
@@ -3702,13 +3772,13 @@
            lpszTitle);
 #endif
-  
+
   if (ConsoleGlobals.pszWindowTitle != NULL)           /* previously set name */
     free (ConsoleGlobals.pszWindowTitle);                     /* then free it */
-  
+
   ConsoleGlobals.pszWindowTitle = strdup(lpszTitle);     /* copy the new name */
-  
+
   WinSetWindowText(ConsoleGlobals.hwndFrame,           /* set new title text */
                    ConsoleGlobals.pszWindowTitle);
-  
+
   return TRUE;
 }
@@ -3716,9 +3786,9 @@
 
 /*****************************************************************************
- * Name      : BOOL WIN32API OS2SetConsoleTitleW
+ * Name      : BOOL WIN32API SetConsoleTitleW
  * Purpose   : Set new title text for the console window
  * Parameters: LPTSTR lpszTitle
  * Variables :
- * Result    : 
+ * Result    :
  * Remark    :
  * Status    : REWRITTEN UNTESTED
@@ -3727,5 +3797,5 @@
  *****************************************************************************/
 
-BOOL WIN32API OS2SetConsoleTitleW(LPTSTR lpszTitle)
+BOOL WIN32API SetConsoleTitleW(LPTSTR lpszTitle)
 {
 #ifdef DEBUG_LOCAL2
@@ -3733,15 +3803,15 @@
            lpszTitle);
 #endif
-  
+
   /* @@@PH Unicode2Ascii */
-  
+
   if (ConsoleGlobals.pszWindowTitle != NULL)           /* previously set name */
     free (ConsoleGlobals.pszWindowTitle);                     /* then free it */
-  
+
   ConsoleGlobals.pszWindowTitle = strdup(lpszTitle);     /* copy the new name */
-  
+
   WinSetWindowText(ConsoleGlobals.hwndFrame,           /* set new title text */
                    ConsoleGlobals.pszWindowTitle);
-  
+
   return TRUE;
 }
@@ -3749,21 +3819,21 @@
 
 /*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2SetConsoleWindowInfo(HANDLE      hConsoleOutput,
+BOOL WIN32API SetConsoleWindowInfo(HANDLE      hConsoleOutput,
                                       BOOL        fAbsolute,
                                       PSMALL_RECT psrctWindowRect)
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2SetConsoleWindowInfo(%08x,%08x,%08x).\n",
@@ -3772,5 +3842,5 @@
            psrctWindowRect);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleOutput,
                                   DRQ_SETCONSOLEWINDOWINFO,
@@ -3779,22 +3849,22 @@
                                   0,
                                   0);
-  
-  return fResult;  
-}
-
-
-/*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+
+  return fResult;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2WriteConsoleA(HANDLE      hConsoleOutput,
+BOOL WIN32API WriteConsoleA(HANDLE      hConsoleOutput,
                                CONST VOID* lpvBuffer,
                                DWORD       cchToWrite,
@@ -3803,5 +3873,5 @@
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2WriteConsoleA(%08x,%08x,%08x,%08x,%08x).\n",
@@ -3812,5 +3882,5 @@
            lpvReserved);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleOutput,
                                   DRQ_WRITECONSOLEA,
@@ -3819,22 +3889,22 @@
                                   (ULONG)lpcchWritten,
                                   (ULONG)lpvReserved);
-  
-  return fResult;  
-}
-
-
-/*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+
+  return fResult;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2WriteConsoleW(HANDLE      hConsoleOutput,
+BOOL WIN32API WriteConsoleW(HANDLE      hConsoleOutput,
                                CONST VOID* lpvBuffer,
                                DWORD       cchToWrite,
@@ -3843,5 +3913,5 @@
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2WriteConsoleW(%08x,%08x,%08x,%08x,%08x).\n",
@@ -3852,5 +3922,5 @@
            lpvReserved);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleOutput,
                                   DRQ_WRITECONSOLEW,
@@ -3859,22 +3929,22 @@
                                   (ULONG)lpcchWritten,
                                   (ULONG)lpvReserved);
-  
-  return fResult;  
-}
-
-
-/*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+
+  return fResult;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2WriteConsoleInputA(HANDLE        hConsoleInput,
+BOOL WIN32API WriteConsoleInputA(HANDLE        hConsoleInput,
                                     PINPUT_RECORD pirBuffer,
                                     DWORD         cInRecords,
@@ -3882,5 +3952,5 @@
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2WriteConsoleInputA(%08x,%08x,%08x,%08x).\n",
@@ -3890,5 +3960,5 @@
            lpcWritten);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleInput,
                                   DRQ_WRITECONSOLEINPUTA,
@@ -3897,22 +3967,22 @@
                                   (ULONG)lpcWritten,
                                   0);
-  
-  return fResult;  
-}
-
-
-/*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+
+  return fResult;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2WriteConsoleInputW(HANDLE        hConsoleInput,
+BOOL WIN32API WriteConsoleInputW(HANDLE        hConsoleInput,
                                     PINPUT_RECORD pirBuffer,
                                     DWORD         cInRecords,
@@ -3920,5 +3990,5 @@
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2WriteConsoleInputW(%08x,%08x,%08x,%08x).\n",
@@ -3928,5 +3998,5 @@
            lpcWritten);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleInput,
                                   DRQ_WRITECONSOLEINPUTW,
@@ -3935,22 +4005,22 @@
                                   (ULONG)lpcWritten,
                                   0);
-  
-  return fResult;  
-}
-
-
-/*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+
+  return fResult;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2WriteConsoleOutputA(HANDLE      hConsoleOutput,
+BOOL WIN32API WriteConsoleOutputA(HANDLE      hConsoleOutput,
                                      PCHAR_INFO  pchiSrcBuffer,
                                      COORD       coordSrcBufferSize,
@@ -3959,5 +4029,5 @@
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2WriteConsoleOutputA(%08x,%08x,%08x,%08x,%08x).\n",
@@ -3968,5 +4038,5 @@
            psrctDestRect);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleOutput,
                                   DRQ_WRITECONSOLEOUTPUTA,
@@ -3975,22 +4045,22 @@
                                   COORD2ULONG(coordSrcBufferCoord),
                                   (ULONG)psrctDestRect);
-  
-  return fResult;  
-}
-
-
-/*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+
+  return fResult;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2WriteConsoleOutputW(HANDLE      hConsoleOutput,
+BOOL WIN32API WriteConsoleOutputW(HANDLE      hConsoleOutput,
                                      PCHAR_INFO  pchiSrcBuffer,
                                      COORD       coordSrcBufferSize,
@@ -3999,5 +4069,5 @@
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2WriteConsoleOutputW(%08x,%08x,%08x,%08x,%08x).\n",
@@ -4008,5 +4078,5 @@
            psrctDestRect);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleOutput,
                                   DRQ_WRITECONSOLEOUTPUTW,
@@ -4015,21 +4085,21 @@
                                   COORD2ULONG(coordSrcBufferCoord),
                                   (ULONG)psrctDestRect);
-  
-  return fResult;  
-}
-
-/*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+
+  return fResult;
+}
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2WriteConsoleOutputAttribute(HANDLE  hConsoleOutput,
+BOOL WIN32API WriteConsoleOutputAttribute(HANDLE  hConsoleOutput,
                                              LPWORD  lpwAttribute,
                                              DWORD   cWriteCells,
@@ -4038,5 +4108,5 @@
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2WriteConsoleOutputAttribute(%08x,%08x,%08x,%08x,%08x).\n",
@@ -4047,5 +4117,5 @@
            lpcNumberWritten);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleOutput,
                                   DRQ_WRITECONSOLEOUTPUTATTRIBUTE,
@@ -4054,22 +4124,22 @@
                                   COORD2ULONG(coordWriteCoord),
                                   (ULONG)lpcNumberWritten);
-  
-  return fResult;  
-}
-
-
-/*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+
+  return fResult;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2WriteConsoleOutputCharacterA(HANDLE  hConsoleOutput,
+BOOL WIN32API WriteConsoleOutputCharacterA(HANDLE  hConsoleOutput,
                                               LPTSTR  lpWriteBuffer,
                                               DWORD   cchWrite,
@@ -4078,5 +4148,5 @@
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2WriteConsoleOutputCharacterA(%08x,%08x,%08x,%08x,%08x).\n",
@@ -4087,5 +4157,5 @@
            lpcWritten);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleOutput,
                                   DRQ_WRITECONSOLEOUTPUTCHARACTERA,
@@ -4094,22 +4164,22 @@
                                   COORD2ULONG(coordWriteCoord),
                                   (ULONG)lpcWritten);
-  
-  return fResult;  
-}
-
-
-/*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+
+  return fResult;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
  *****************************************************************************/
 
-BOOL WIN32API OS2WriteConsoleOutputCharacterW(HANDLE  hConsoleOutput,
+BOOL WIN32API WriteConsoleOutputCharacterW(HANDLE  hConsoleOutput,
                                               LPTSTR  lpWriteBuffer,
                                               DWORD   cchWrite,
@@ -4118,5 +4188,5 @@
 {
   BOOL fResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: OS2WriteConsoleOutputCharacterW(%08x,%08x,%08x,%08x,%08x).\n",
@@ -4127,5 +4197,5 @@
            lpcWritten);
 #endif
-  
+
   fResult = (BOOL)HMDeviceRequest(hConsoleOutput,
                                   DRQ_WRITECONSOLEOUTPUTCHARACTERW,
@@ -4134,6 +4204,6 @@
                                   COORD2ULONG(coordWriteCoord),
                                   (ULONG)lpcWritten);
-  
-  return fResult;  
+
+  return fResult;
 }
 
@@ -4148,5 +4218,5 @@
  *             PHMHANDLEDATA pHMHandleDataTemplate data of the template handle
  * Variables :
- * Result    : 
+ * Result    :
  * Remark    : @@@PH CONIN$ handles should be exclusive
  *                   reject other requests to this device
@@ -4170,7 +4240,7 @@
            pHMHandleDataTemplate);
 #endif
-  
+
   pHMHandleData->dwType = FILE_TYPE_CHAR;        /* we're a character device */
-  
+
   return(NO_ERROR);
 }
@@ -4178,11 +4248,11 @@
 
 /*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    : 
- * Status    : 
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Wed, 1998/02/11 20:44]
@@ -4200,5 +4270,5 @@
   INPUT_RECORD InputRecord;               /* buffer for the event to be read */
   ULONG  ulPostCounter;                            /* semaphore post counter */
-  
+
 #ifdef DEBUG_LOCAL
   WriteLog("KERNEL32/CONSOLE:HMDeviceConsoleInClass::ReadFile %s(%08x,%08x,%08x,%08x,%08x)\n",
@@ -4210,10 +4280,10 @@
            lpOverlapped);
 #endif
-  
+
   ulCounter = 0;                              /* read ascii chars from queue */
   pszTarget = (PSZ)lpBuffer;
-  
+
   /* @@@PH: ConsoleMode: ENABLE_LINE_INPUT - blocks until CR is read */
-  
+
                                   /* block if no key events are in the queue */
   for (;ulCounter==0;)                       /* until we got some characters */
@@ -4226,5 +4296,5 @@
                        &ulPostCounter);            /* post counter - ignored */
     }
-    
+
     do
     {
@@ -4237,5 +4307,5 @@
           pszTarget++;
           ulCounter++;
-          
+
                                                      /* local echo enabled ? */
           if (ConsoleInput.dwConsoleMode & ENABLE_ECHO_INPUT)
@@ -4245,5 +4315,5 @@
                         &ulPostCounter,                      /* dummy result */
                         NULL);
-          
+
           if (ulCounter >= nNumberOfBytesToRead)        /* at buffer's end ? */
             goto __readfile_exit;
@@ -4254,7 +4324,7 @@
     while (rc == NO_ERROR);
   }
-  
+
 __readfile_exit:
-  
+
   *lpNumberOfBytesRead = ulCounter;                          /* write result */
 
@@ -4264,11 +4334,11 @@
 
 /*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    : 
- * Status    : 
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Wed, 1998/02/11 20:44]
@@ -4291,5 +4361,5 @@
            lpOverlapped);
 #endif
-  
+
   return(ERROR_ACCESS_DENIED);
 }
@@ -4297,11 +4367,11 @@
 
 /*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    : 
- * Status    : 
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Wed, 1998/02/11 20:44]
@@ -4320,10 +4390,10 @@
       return (HMDeviceConsoleInClass::
               FlushConsoleInputBuffer(pHMHandleData));
-    
+
     case DRQ_GETNUMBEROFCONSOLEINPUTEVENTS:
       return (HMDeviceConsoleInClass::
               GetNumberOfConsoleInputEvents(pHMHandleData,
                                             (LPDWORD)arg1));
-    
+
     case DRQ_PEEKCONSOLEINPUTA:
       return (HMDeviceConsoleInClass::
@@ -4332,5 +4402,5 @@
                                 (DWORD)        arg2,
                                 (LPDWORD)      arg3));
-    
+
     case DRQ_PEEKCONSOLEINPUTW:
       return (HMDeviceConsoleInClass::
@@ -4339,6 +4409,6 @@
                                 (DWORD)        arg2,
                                 (LPDWORD)      arg3));
-  
-  
+
+
     case DRQ_READCONSOLEA:
       return (HMDeviceConsoleInClass::
@@ -4348,5 +4418,5 @@
                            (LPDWORD)     arg3,
                            (LPVOID)      arg4));
-  
+
     case DRQ_READCONSOLEW:
       return (HMDeviceConsoleInClass::
@@ -4356,5 +4426,5 @@
                            (LPDWORD)     arg3,
                            (LPVOID)      arg4));
-    
+
     case DRQ_READCONSOLEINPUTA:
       return (HMDeviceConsoleInClass::
@@ -4362,6 +4432,6 @@
                                 (PINPUT_RECORD)arg1,
                                 (DWORD)arg2,
-                                (LPDWORD)arg3));    
-    
+                                (LPDWORD)arg3));
+
     case DRQ_READCONSOLEINPUTW:
       return (HMDeviceConsoleInClass::
@@ -4377,5 +4447,5 @@
                                 (DWORD)arg2,
                                 (LPDWORD)arg3));
-    
+
     case DRQ_WRITECONSOLEINPUTW:
       return (HMDeviceConsoleInClass::
@@ -4384,7 +4454,7 @@
                                 (DWORD)arg2,
                                 (LPDWORD)arg3));
-  
-  }
-  
+
+  }
+
 #ifdef DEBUG_LOCAL
   WriteLog("KERNEL32/CONSOLE:HMDeviceConsoleInClass:_DeviceRequest %s(%08x,%08x,%08x,%08x,%08x,%08x) unknown request\n",
@@ -4409,5 +4479,5 @@
  * Variables :
  * Result    :
- * Remark    : 
+ * Remark    :
  * Status    : UNTESTED
  *
@@ -4418,14 +4488,14 @@
 {
   ULONG ulCounter;                                           /* loop counter */
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: CONIN$::FlushConsoleInputBuffer(%08x).\n",
            pHMHandleData);
 #endif
-  
+
   ConsoleInput.ulIndexFree  = 0;
   ConsoleInput.ulIndexEvent = 0;
   ConsoleInput.ulEvents     = 0;
-  
+
   for (ulCounter = 0;
        ulCounter < CONSOLE_INPUTQUEUESIZE;
@@ -4445,5 +4515,5 @@
  * Result    :
 
- * Remark    : 
+ * Remark    :
  * Status    : UNTESTED
  *
@@ -4459,5 +4529,5 @@
            lpMode);
 #endif
-  
+
   *lpMode = ConsoleInput.dwConsoleMode;       /* return current console mode */
 
@@ -4473,5 +4543,5 @@
  * Variables :
  * Result    :
- * Remark    : 
+ * Remark    :
  * Status    : UNTESTED
  *
@@ -4487,5 +4557,5 @@
            lpNumberOfEvents);
 #endif
-  
+
   *lpNumberOfEvents = ConsoleInput.ulEvents;      /* return number of events */
 
@@ -4520,5 +4590,5 @@
   ULONG         ulCurrentEvent;       /* index of current event in the queue */
   PINPUT_RECORD pirEvent;                /* pointer to current queue element */
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: HMDeviceConsoleInClass::PeekConsoleInputA(%08x,%08x,%08x,%08x).\n",
@@ -4528,5 +4598,5 @@
            lpcRead);
 #endif
-  
+
   if (ConsoleInputQueryEvents() == 0)         /* if queue is currently empty */
   {
@@ -4534,12 +4604,12 @@
     return (TRUE);                                         /* OK, we're done */
   }
-  
-  
+
+
   for (ulCounter = 0,
        ulCurrentEvent = ConsoleInput.ulIndexEvent,
        pirEvent = &ConsoleInput.arrInputRecord[ConsoleInput.ulIndexEvent];
-       
+
        ulCounter < cInRecords;
-       
+
        ulCounter++,
        ulCurrentEvent++,
@@ -4552,8 +4622,8 @@
       pirEvent       = ConsoleInput.arrInputRecord;
     }
-    
+
     if (pirEvent->EventType == 0x0000)                   /* no more events ? */
       break;                                              /* leave loop then */
-    
+
     memcpy(pirEvent,                                      /* copy event data */
            pirBuffer,
@@ -4592,5 +4662,5 @@
   ULONG         ulCurrentEvent;       /* index of current event in the queue */
   PINPUT_RECORD pirEvent;                /* pointer to current queue element */
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: HMDeviceConsoleInClass::PeekConsoleInputW(%08x,%08x,%08x,%08x).\n",
@@ -4600,5 +4670,5 @@
            lpcRead);
 #endif
-  
+
   if (ConsoleInputQueryEvents() == 0)         /* if queue is currently empty */
   {
@@ -4606,12 +4676,12 @@
     return (TRUE);                                         /* OK, we're done */
   }
-  
-  
+
+
   for (ulCounter = 0,
        ulCurrentEvent = ConsoleInput.ulIndexEvent,
        pirEvent = &ConsoleInput.arrInputRecord[ConsoleInput.ulIndexEvent];
-       
+
        ulCounter < cInRecords;
-       
+
        ulCounter++,
        ulCurrentEvent++,
@@ -4624,8 +4694,8 @@
       pirEvent       = ConsoleInput.arrInputRecord;
     }
-    
+
     if (pirEvent->EventType == 0x0000)                   /* no more events ? */
       break;                                              /* leave loop then */
-    
+
     memcpy(pirEvent,                                      /* copy event data */
            pirBuffer,
@@ -4648,5 +4718,5 @@
  * Variables :
  * Result    :
- * Remark    : 
+ * Remark    :
  * Status    : UNTESTED
  *
@@ -4661,5 +4731,5 @@
 {
   PCONSOLEBUFFER pConsoleBuffer = (PCONSOLEBUFFER)pHMHandleData->lpHandlerData;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: CONIN$::ReadConsoleA(%08x,%08x,%u,%08x,%08x).\n",
@@ -4670,5 +4740,5 @@
            lpvReserved);
 #endif
-  
+
                                /* simply forward the request to that routine */
   return (HMDeviceConsoleInClass::ReadFile(pHMHandleData,
@@ -4690,5 +4760,5 @@
  * Variables :
  * Result    :
- * Remark    : 
+ * Remark    :
  * Status    : UNTESTED
  *
@@ -4704,5 +4774,5 @@
   PCONSOLEBUFFER pConsoleBuffer = (PCONSOLEBUFFER)pHMHandleData->lpHandlerData;
   DWORD          dwResult;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: CONIN$::ReadConsoleW(%08x,%08x,%u,%08x,%08x).\n",
@@ -4713,5 +4783,5 @@
            lpvReserved);
 #endif
-  
+
                                /* simply forward the request to that routine */
   dwResult = HMDeviceConsoleInClass::ReadFile(pHMHandleData,
@@ -4721,5 +4791,5 @@
                                               NULL);
   /* @@@PH AScii -> unicode translation */
-  
+
   return (dwResult);                                  /* deliver return code */
 }
@@ -4748,5 +4818,5 @@
   ULONG  ulPostCounter;                  /* semaphore post counter - ignored */
   APIRET rc;                                               /* API returncode */
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: HMDeviceConsoleInClass::ReadConsoleInputA(%08x,%08x,%08x,%08x).\n",
@@ -4756,5 +4826,5 @@
            lpcRead);
 #endif
-  
+
   if (ConsoleInputQueryEvents() == 0)         /* if queue is currently empty */
   {
@@ -4764,6 +4834,6 @@
                      &ulPostCounter);              /* post counter - ignored */
   }
-  
-  
+
+
   /* now read events into target buffer */
   for (ulPostCounter = 0;
@@ -4776,5 +4846,5 @@
       break;
   }
-  
+
   *lpcRead = ulPostCounter;                 /* return number of records read */
   return (TRUE);                                                       /* OK */
@@ -4804,5 +4874,5 @@
   ULONG ulPostCounter;                   /* semaphore post counter - ignored */
   APIRET rc;                                               /* API returncode */
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: HMDeviceConsoleInClass::ReadConsoleInputW(%08x,%08x,%08x,%08x).\n",
@@ -4812,5 +4882,5 @@
            lpcRead);
 #endif
-  
+
   if (ConsoleInputQueryEvents() == 0)         /* if queue is currently empty */
   {
@@ -4820,6 +4890,6 @@
                      &ulPostCounter);              /* post counter - ignored */
   }
-  
-  
+
+
   /* now read events into target buffer */
   for (ulPostCounter = 0;
@@ -4832,5 +4902,5 @@
       break;
   }
-  
+
   *lpcRead = ulPostCounter;                 /* return number of records read */
   return (TRUE);                                                       /* OK */
@@ -4845,5 +4915,5 @@
  * Variables :
  * Result    :
- * Remark    : 
+ * Remark    :
  * Status    : UNTESTED
  *
@@ -4855,5 +4925,5 @@
 {
   PCONSOLEBUFFER pConsoleBuffer = (PCONSOLEBUFFER)pHMHandleData->lpHandlerData;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: CONIN$::SetConsoleMode(%08x,%08x).\n",
@@ -4861,7 +4931,7 @@
            dwMode);
 #endif
-  
+
   ConsoleInput.dwConsoleMode = dwMode;           /* set current console mode */
-  
+
   return (TRUE);
 }
@@ -4871,11 +4941,11 @@
  * Name      : DWORD HMDeviceConsoleInClass::WriteConsoleInputA
  * Purpose   : this writes event records directly into the queue
- * Parameters: PHMHANDLEDATA pHMHandleData         
+ * Parameters: PHMHANDLEDATA pHMHandleData
  *             PINPUT_RECORD pirBuffer
  *             DWORD         cInRecords
  *             LPDWORD       lpcWritten
  * Variables :
- * Result    : 
- * Remark    : 
+ * Result    :
+ * Remark    :
  * Status    : NO_ERROR - API succeeded
  *             other    - what is to be set in SetLastError
@@ -4892,5 +4962,5 @@
   APIRET         rc;                                       /* API returncode */
   ULONG          ulCounter;                                  /* loop counter */
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: CONIN$::WriteConsoleInputA(%08x,%08x,%u,%08x).\n",
@@ -4900,5 +4970,5 @@
            lpcWritten);
 #endif
-  
+
   for (ulCounter = 0;
        ulCounter < cInRecords;
@@ -4910,5 +4980,5 @@
       break;
   }
-  
+
   *lpcWritten = ulCounter;                /* return number of events written */
   return (TRUE);                                                       /* OK */
@@ -4919,11 +4989,11 @@
  * Name      : DWORD HMDeviceConsoleInClass::WriteConsoleInputW
  * Purpose   : this writes event records directly into the queue
- * Parameters: PHMHANDLEDATA pHMHandleData         
+ * Parameters: PHMHANDLEDATA pHMHandleData
  *             PINPUT_RECORD pirBuffer
  *             DWORD         cInRecords
  *             LPDWORD       lpcWritten
  * Variables :
- * Result    : 
- * Remark    : 
+ * Result    :
+ * Remark    :
  * Status    : NO_ERROR - API succeeded
  *             other    - what is to be set in SetLastError
@@ -4940,5 +5010,5 @@
   APIRET         rc;                                       /* API returncode */
   ULONG          ulCounter;                                  /* loop counter */
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: CONIN$::WriteConsoleInputW(%08x,%08x,%u,%08x).\n",
@@ -4948,5 +5018,5 @@
            lpcWritten);
 #endif
-  
+
   for (ulCounter = 0;
        ulCounter < cInRecords;
@@ -4958,5 +5028,5 @@
       break;
   }
-  
+
   *lpcWritten = ulCounter;                /* return number of events written */
   return (TRUE);                                                       /* OK */
@@ -4974,6 +5044,6 @@
  *             PHMHANDLEDATA pHMHandleDataTemplate data of the template handle
  * Variables :
- * Result    : 
- * Remark    : 
+ * Result    :
+ * Remark    :
  * Status    : NO_ERROR - API succeeded
  *             other    - what is to be set in SetLastError
@@ -4990,5 +5060,5 @@
   BOOL   fResult;
   HANDLE hConsole;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE:HMDeviceConsoleOutClass %s(%s,%08x,%08x,%08x)\n",
@@ -4999,13 +5069,13 @@
            pHMHandleDataTemplate);
 #endif
-  
+
   pHMHandleData->dwType = FILE_TYPE_CHAR;        /* we're a character device */
-  
-  
+
+
                  /* if no default buffer is available, then do default setup */
   if (ConsoleGlobals.hConsoleBuffer == INVALID_HANDLE_VALUE)
   {
                 /* now we need a default screen buffer with the default size */
-    hConsole = OS2CreateConsoleScreenBuffer(0,
+    hConsole = CreateConsoleScreenBuffer(0,
                                             0,
                                             NULL,
@@ -5020,6 +5090,6 @@
       return INVALID_HANDLE_VALUE;   /* abort further processing immediately */
     }
-    
-    fResult = OS2SetConsoleTextAttribute(hConsole,
+
+    fResult = SetConsoleTextAttribute(hConsole,
                                          ConsoleGlobals.Options.ucDefaultAttribute);
 #ifdef DEBUG_LOCAL
@@ -5028,6 +5098,6 @@
                GetLastError());
 #endif
-    
-    fResult = OS2SetConsoleScreenBufferSize(hConsole,
+
+    fResult = SetConsoleScreenBufferSize(hConsole,
                                             ConsoleGlobals.Options.coordDefaultSize);
     if (fResult == FALSE)
@@ -5040,6 +5110,6 @@
       return (INVALID_HANDLE_VALUE);            /* abort further processing */
     }
-  
-    fResult = OS2SetConsoleActiveScreenBuffer(hConsole);
+
+    fResult = SetConsoleActiveScreenBuffer(hConsole);
     if (fResult == FALSE)
     {
@@ -5057,5 +5127,5 @@
     }
   }
-  
+
   return(NO_ERROR);
 }
@@ -5063,11 +5133,11 @@
 
 /*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    : 
- * Status    : 
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Wed, 1998/02/11 20:44]
@@ -5080,5 +5150,5 @@
                                         LPOVERLAPPED  lpOverlapped)
 {
-  
+
 #ifdef DEBUG_LOCAL
   WriteLog("KERNEL32/CONSOLE:HMDeviceConsoleOutClass::ReadFile %s(%08x,%08x,%08x,%08x,%08x)\n",
@@ -5090,5 +5160,5 @@
            lpOverlapped);
 #endif
-  
+
   return(ERROR_ACCESS_DENIED);
 }
@@ -5096,11 +5166,11 @@
 
 /*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    : 
- * Status    : 
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Wed, 1998/02/11 20:44]
@@ -5114,5 +5184,5 @@
 {
   DWORD dwResult;                        /* result from subsequent WriteFile */
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE:HMDeviceConsoleOutClass:WriteFile %s(%08x,%08x,%08x,%08x,%08x)\n",
@@ -5124,5 +5194,5 @@
            lpOverlapped);
 #endif
-  
+
         /* just prevent an endless loop, although this condition might never */
                                                                 /* be true ! */
@@ -5137,5 +5207,5 @@
                     0);
 #endif
-    
+
     dwResult = HMWriteFile(ConsoleGlobals.hConsoleBuffer,
                            lpBuffer,
@@ -5143,5 +5213,5 @@
                            lpNumberOfBytesWritten,
                            lpOverlapped);
-    
+
 #if 0
     HMDeviceRequest(ConsoleGlobals.hConsoleBuffer,        /* show the cursor */
@@ -5152,5 +5222,5 @@
                     0);
 #endif
-    
+
     return (dwResult);                                 /* return result code */
   }
@@ -5164,8 +5234,8 @@
  * Purpose   : we just forward those device requests to the console buffer
  *             currently associated with the console itself.
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    : 
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
  * Status    : UNTESTED
  *
@@ -5214,5 +5284,5 @@
  * Variables :
  * Result    :
- * Remark    : 
+ * Remark    :
  * Status    : NO_ERROR - API succeeded
  *             other    - what is to be set in SetLastError
@@ -5227,5 +5297,5 @@
 {
   PCONSOLEBUFFER pConsoleBuffer;                 /* console buffer structure */
-  
+
 #ifdef DEBUG_LOCAL
   WriteLog("KERNEL32/CONSOLE:HMDeviceConsoleBufferClass %s(%s,%08x,%08x,%08x)\n",
@@ -5236,9 +5306,9 @@
            pHMHandleDataTemplate);
 #endif
-  
+
   pHMHandleData->dwType = FILE_TYPE_CHAR;        /* we're a character device */
-  
+
   pHMHandleData->lpHandlerData = malloc ( sizeof(CONSOLEBUFFER) );
-  
+
 #ifdef DEBUG_LOCAL
   WriteLog("KERNEL32/CONSOLE:CheckPoint1: %s pHMHandleData=%08xh, lpHandlerData=%08xh\n",
@@ -5247,6 +5317,6 @@
            pHMHandleData->lpHandlerData);
 #endif
-  
-  
+
+
   if (pHMHandleData->lpHandlerData == NULL)              /* check allocation */
   {
@@ -5257,17 +5327,17 @@
   {
     pConsoleBuffer = (PCONSOLEBUFFER)pHMHandleData->lpHandlerData;
-    
+
     memset(pHMHandleData->lpHandlerData,             /* initialize structure */
            0,
            sizeof (CONSOLEBUFFER) );
-  
+
                                                       /* set buffer defaults */
     pConsoleBuffer->dwConsoleMode = ENABLE_PROCESSED_OUTPUT |
                                     ENABLE_WRAP_AT_EOL_OUTPUT;
-  
+
     pConsoleBuffer->CursorInfo.dwSize   = 2;                  /* 2 scanlines */
     pConsoleBuffer->CursorInfo.bVisible = TRUE;
   }
-  
+
   return(NO_ERROR);
 }
@@ -5275,11 +5345,11 @@
 
 /*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    : 
- * Status    : 
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Wed, 1998/02/11 20:44]
@@ -5288,5 +5358,5 @@
 DWORD HMDeviceConsoleBufferClass::CloseHandle(PHMHANDLEDATA pHMHandleData)
 {
-  
+
 #ifdef DEBUG_LOCAL
   WriteLog("KERNEL32/CONSOLE:HMDeviceConsoleBufferClass::CloseHandle %s(%08x)\n",
@@ -5294,17 +5364,17 @@
            pHMHandleData);
 #endif
-  
+
   if (pHMHandleData->lpHandlerData != NULL)                 /* check pointer */
   {
     PCONSOLEBUFFER pConsoleBuffer = (PCONSOLEBUFFER)pHMHandleData->lpHandlerData;
-    
+
 
     if (pConsoleBuffer->ppszLine != NULL)        /* free line buffer array ! */
       free (pConsoleBuffer->ppszLine);
-      
+
     free (pHMHandleData->lpHandlerData);          /* free device object data */
     pHMHandleData->lpHandlerData = NULL;
   }
-  
+
   return(NO_ERROR);
 }
@@ -5312,11 +5382,11 @@
 
 /*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    : 
- * Status    : 
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Wed, 1998/02/11 20:44]
@@ -5329,5 +5399,5 @@
                                            LPOVERLAPPED  lpOverlapped)
 {
-  
+
 #ifdef DEBUG_LOCAL
   WriteLog("KERNEL32/CONSOLE:HMDeviceConsoleBufferClass::ReadFile %s(%08x,%08x,%08x,%08x,%08x)\n",
@@ -5339,5 +5409,5 @@
            lpOverlapped);
 #endif
-  
+
   return(ERROR_ACCESS_DENIED);
 }
@@ -5345,11 +5415,11 @@
 
 /*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    : 
- * Status    : 
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Wed, 1998/02/11 20:44]
@@ -5366,5 +5436,5 @@
            PSZ   pszBuffer = (PSZ)lpBuffer;
   register UCHAR ucChar;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE:HMDeviceConsoleBufferClass:WriteFile %s(%08x,%08x,%08x,%08x,%08x)\n",
@@ -5376,9 +5446,9 @@
            lpOverlapped);
 #endif
-  
+
                       /* check if we're called with non-existing line buffer */
   if (pConsoleBuffer->ppszLine == NULL)
     return (ERROR_SYS_INTERNAL);
-  
+
   for (ulCounter = 0;
        ulCounter < nNumberOfBytesToWrite;
@@ -5386,5 +5456,5 @@
   {
     ucChar = pszBuffer[ulCounter];                        /* map to register */
-    
+
     if ( (pConsoleBuffer->dwConsoleMode & ENABLE_PROCESSED_OUTPUT) &&
          (ucChar < 32) )     /* this is faster than a large switch statement */
@@ -5397,17 +5467,17 @@
                     ConsoleGlobals.Options.ulSpeakerDuration);
           break;
-      
+
         case 8: /* Backspace */
           if (pConsoleBuffer->coordCursorPosition.X > 0)
             pConsoleBuffer->coordCursorPosition.X--;
           break;
-  
+
         case 9: /* Tab */
           pConsoleBuffer->coordCursorPosition.X =
-            (pConsoleBuffer->coordCursorPosition.X 
-             / ConsoleGlobals.Options.ulTabSize 
+            (pConsoleBuffer->coordCursorPosition.X
+             / ConsoleGlobals.Options.ulTabSize
              + 1)
             * ConsoleGlobals.Options.ulTabSize;
-        
+
           if (pConsoleBuffer->coordCursorPosition.X >=
               pConsoleBuffer->coordBufferSize.X)
@@ -5415,5 +5485,5 @@
             pConsoleBuffer->coordCursorPosition.X = 0;
             pConsoleBuffer->coordCursorPosition.Y++;
-            
+
             if (pConsoleBuffer->coordCursorPosition.Y >=
                 pConsoleBuffer->coordBufferSize.Y)
@@ -5428,8 +5498,8 @@
           }
           break;
-          
+
         case 10: /* LINEFEED */
           pConsoleBuffer->coordCursorPosition.Y++;
-          
+
           if (pConsoleBuffer->coordCursorPosition.Y >=
               pConsoleBuffer->coordBufferSize.Y)
@@ -5440,9 +5510,9 @@
           }
           break;
-          
+
         case 13: /* CARRIAGE RETURN */
           pConsoleBuffer->coordCursorPosition.X = 0;
           break;
-        
+
         default:
           break;
@@ -5454,7 +5524,7 @@
       *(pConsoleBuffer->ppszLine[pConsoleBuffer->coordCursorPosition.Y] +
         pConsoleBuffer->coordCursorPosition.X * 2) = pszBuffer[ulCounter];
-        
+
       pConsoleBuffer->coordCursorPosition.X++;
-    
+
       if (pConsoleBuffer->coordCursorPosition.X >=
           pConsoleBuffer->coordBufferSize.X)
@@ -5462,5 +5532,5 @@
         pConsoleBuffer->coordCursorPosition.X = 0;
         pConsoleBuffer->coordCursorPosition.Y++;
-        
+
         if (pConsoleBuffer->coordCursorPosition.Y >=
             pConsoleBuffer->coordBufferSize.Y)
@@ -5482,11 +5552,11 @@
     }
   }
-  
+
                                           /* update screen if active console */
   if (pHMHandleData->hHandle == ConsoleGlobals.hConsoleBuffer)
     ConsoleGlobals.fUpdateRequired = TRUE;      /* update with next WM_TIMER */
-  
+
   *lpNumberOfBytesWritten = ulCounter;
-  
+
   return(ulCounter);
 }
@@ -5494,11 +5564,11 @@
 
 /*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    : 
- * Status    : 
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Wed, 1998/02/11 20:44]
@@ -5517,7 +5587,7 @@
     {
       COORD coordWrite;
-      
+
       ULONG2COORD(coordWrite,arg3);
-        
+
       return (HMDeviceConsoleBufferClass
               ::FillConsoleOutputAttribute(pHMHandleData,
@@ -5527,12 +5597,12 @@
                                            (LPDWORD)arg4));
     }
-              
+
 
     case DRQ_FILLCONSOLEOUTPUTCHARACTERA:
     {
       COORD coordWrite;
-      
+
       ULONG2COORD(coordWrite,arg3);
-        
+
       return (HMDeviceConsoleBufferClass
               ::FillConsoleOutputCharacterA(pHMHandleData,
@@ -5542,12 +5612,12 @@
                                             (LPDWORD)arg4));
     }
-    
-    
+
+
     case DRQ_FILLCONSOLEOUTPUTCHARACTERW:
     {
       COORD coordWrite;
-      
+
       ULONG2COORD(coordWrite,arg3);
-        
+
       return (HMDeviceConsoleBufferClass
               ::FillConsoleOutputCharacterW(pHMHandleData,
@@ -5558,5 +5628,5 @@
     }
 
-    
+
     case DRQ_GETCONSOLECURSORINFO:
       return (HMDeviceConsoleBufferClass
@@ -5564,5 +5634,5 @@
                                      (PCONSOLE_CURSOR_INFO)arg1));
 
-    
+
     case DRQ_GETCONSOLEMODE:
       return (HMDeviceConsoleBufferClass
@@ -5570,15 +5640,15 @@
                                (LPDWORD)arg1));
 
-              
+
     case DRQ_GETCONSOLESCREENBUFFERINFO:
       return (HMDeviceConsoleBufferClass
               ::GetConsoleScreenBufferInfo(pHMHandleData,
                                            (PCONSOLE_SCREEN_BUFFER_INFO)arg1));
-    
+
 
     case DRQ_GETLARGESTCONSOLEWINDOWSIZE:
       return (HMDeviceConsoleBufferClass
               ::GetLargestConsoleWindowSize(pHMHandleData));
-    
+
 
     case DRQ_READCONSOLEOUTPUTA:
@@ -5586,8 +5656,8 @@
       COORD coordDestBufferSize;
       COORD coordDestBufferCoord;
-      
+
       ULONG2COORD(coordDestBufferSize,  arg2);
       ULONG2COORD(coordDestBufferCoord, arg3);
-      
+
       return (HMDeviceConsoleBufferClass
               ::ReadConsoleOutputA(pHMHandleData,
@@ -5597,14 +5667,14 @@
                                    (PSMALL_RECT)arg4));
     }
-    
-    
+
+
     case DRQ_READCONSOLEOUTPUTW:
     {
       COORD coordDestBufferSize;
       COORD coordDestBufferCoord;
-      
+
       ULONG2COORD(coordDestBufferSize,  arg2);
       ULONG2COORD(coordDestBufferCoord, arg3);
-      
+
       return (HMDeviceConsoleBufferClass
               ::ReadConsoleOutputW(pHMHandleData,
@@ -5614,12 +5684,12 @@
                                    (PSMALL_RECT)arg4));
     }
-    
+
 
     case DRQ_READCONSOLEOUTPUTATTRIBUTE:
     {
       COORD coordReadCoord;
-      
+
       ULONG2COORD(coordReadCoord, arg3);
-      
+
       return (HMDeviceConsoleBufferClass
               ::ReadConsoleOutputAttribute(pHMHandleData,
@@ -5629,12 +5699,12 @@
                                    (LPDWORD)arg4));
     }
-    
-    
+
+
     case DRQ_READCONSOLEOUTPUTCHARACTERA:
     {
       COORD coordReadCoord;
-      
+
       ULONG2COORD(coordReadCoord, arg3);
-      
+
       return (HMDeviceConsoleBufferClass
               ::ReadConsoleOutputCharacterA(pHMHandleData,
@@ -5643,13 +5713,13 @@
                                             coordReadCoord,
                                             (LPDWORD)arg4));
-    }    
-    
-    
+    }
+
+
     case DRQ_READCONSOLEOUTPUTCHARACTERW:
     {
       COORD coordReadCoord;
-      
+
       ULONG2COORD(coordReadCoord, arg3);
-      
+
       return (HMDeviceConsoleBufferClass
               ::ReadConsoleOutputCharacterW(pHMHandleData,
@@ -5658,13 +5728,13 @@
                                             coordReadCoord,
                                             (LPDWORD)arg4));
-    }    
-    
+    }
+
 
     case DRQ_SCROLLCONSOLESCREENBUFFERA:
     {
       COORD coordDestOrigin;
-      
+
       ULONG2COORD(coordDestOrigin, arg3);
-      
+
       return (HMDeviceConsoleBufferClass
               ::ScrollConsoleScreenBufferA(pHMHandleData,
@@ -5673,13 +5743,13 @@
                                            coordDestOrigin,
                                            (PCHAR_INFO)arg4));
-    }    
-    
-    
+    }
+
+
     case DRQ_SCROLLCONSOLESCREENBUFFERW:
     {
       COORD coordDestOrigin;
-      
+
       ULONG2COORD(coordDestOrigin, arg3);
-      
+
       return (HMDeviceConsoleBufferClass
               ::ScrollConsoleScreenBufferW(pHMHandleData,
@@ -5688,7 +5758,7 @@
                                            coordDestOrigin,
                                            (PCHAR_INFO)arg4));
-    }    
-
-  
+    }
+
+
     case DRQ_SETCONSOLEACTIVESCREENBUFFER:
       return (HMDeviceConsoleBufferClass
@@ -5700,17 +5770,17 @@
               ::SetConsoleCursorInfo(pHMHandleData,
                                      (PCONSOLE_CURSOR_INFO)arg1));
-    
+
 
     case DRQ_SETCONSOLECURSORPOSITION:
     {
       COORD coordCursor;
-      
+
       ULONG2COORD(coordCursor, arg1);
-      
+
       return (HMDeviceConsoleBufferClass
               ::SetConsoleCursorPosition(pHMHandleData,
                                          coordCursor));
     }
-    
+
 
     case DRQ_SETCONSOLEMODE:
@@ -5719,16 +5789,16 @@
                                (DWORD)arg1));
 
-              
+
     case DRQ_SETCONSOLESCREENBUFFERSIZE:
     {
       COORD coordSize;
-      
+
       ULONG2COORD(coordSize,arg1);
-      
+
       return (HMDeviceConsoleBufferClass::
                 SetConsoleScreenBufferSize(pHMHandleData,
                                            coordSize));
     }
-              
+
 
     case DRQ_SETCONSOLETEXTATTRIBUTE:
@@ -5736,5 +5806,5 @@
                 SetConsoleTextAttribute(pHMHandleData,
                                         (WORD)arg1));
-              
+
 
     case DRQ_SETCONSOLEWINDOWINFO:
@@ -5744,5 +5814,5 @@
                                      (PSMALL_RECT)arg2));
 
-  
+
     case DRQ_WRITECONSOLEA:
       return (HMDeviceConsoleBufferClass
@@ -5752,6 +5822,6 @@
                               (LPDWORD)arg3,
                               (LPVOID)arg4));
-              
-              
+
+
     case DRQ_WRITECONSOLEW:
       return (HMDeviceConsoleBufferClass
@@ -5761,5 +5831,5 @@
                               (LPDWORD)arg3,
                               (LPVOID)arg4));
-  
+
 
     case DRQ_WRITECONSOLEOUTPUTA:
@@ -5767,8 +5837,8 @@
       COORD coordSrcBufferSize;
       COORD coordSrcBufferCoord;
-      
+
       ULONG2COORD(coordSrcBufferSize,  arg2);
       ULONG2COORD(coordSrcBufferCoord, arg3);
-      
+
       return (HMDeviceConsoleBufferClass
               ::WriteConsoleOutputA(pHMHandleData,
@@ -5778,14 +5848,14 @@
                                     (PSMALL_RECT)arg4));
     }
-              
-              
+
+
     case DRQ_WRITECONSOLEOUTPUTW:
     {
       COORD coordSrcBufferSize;
       COORD coordSrcBufferCoord;
-      
+
       ULONG2COORD(coordSrcBufferSize,  arg2);
       ULONG2COORD(coordSrcBufferCoord, arg3);
-      
+
       return (HMDeviceConsoleBufferClass
               ::WriteConsoleOutputA(pHMHandleData,
@@ -5794,13 +5864,13 @@
                                     coordSrcBufferCoord,
                                     (PSMALL_RECT)arg4));
-    }  
-
-              
+    }
+
+
     case DRQ_WRITECONSOLEOUTPUTATTRIBUTE:
     {
       COORD coordWriteCoord;
-      
+
       ULONG2COORD(coordWriteCoord,  arg3);
-      
+
       return (HMDeviceConsoleBufferClass
               ::WriteConsoleOutputAttribute(pHMHandleData,
@@ -5809,13 +5879,13 @@
                                             coordWriteCoord,
                                             (LPDWORD)arg4));
-    }  
-              
-              
+    }
+
+
     case DRQ_WRITECONSOLEOUTPUTCHARACTERA:
     {
       COORD coordWriteCoord;
-      
+
       ULONG2COORD(coordWriteCoord,  arg3);
-      
+
       return (HMDeviceConsoleBufferClass
               ::WriteConsoleOutputCharacterA(pHMHandleData,
@@ -5824,13 +5894,13 @@
                                              coordWriteCoord,
                                              (LPDWORD)arg4));
-    }  
-  
-  
+    }
+
+
     case DRQ_WRITECONSOLEOUTPUTCHARACTERW:
     {
       COORD coordWriteCoord;
-      
+
       ULONG2COORD(coordWriteCoord,  arg3);
-      
+
       return (HMDeviceConsoleBufferClass
               ::WriteConsoleOutputCharacterW(pHMHandleData,
@@ -5841,22 +5911,22 @@
     }
 
-    
+
     case DRQ_INTERNAL_CONSOLEBUFFERMAP:
       ConsoleBufferMap((PCONSOLEBUFFER)pHMHandleData->lpHandlerData);
       return (NO_ERROR);
-    
-    
+
+
     case DRQ_INTERNAL_CONSOLECURSORSHOW:
       ConsoleCursorShow((PCONSOLEBUFFER)pHMHandleData->lpHandlerData,
                         (ULONG)arg1);
       return (NO_ERROR);
-    
-    
+
+
     case DRQ_INTERNAL_CONSOLEADJUSTWINDOW:
       ConsoleAdjustWindow((PCONSOLEBUFFER)pHMHandleData->lpHandlerData);
-      return (NO_ERROR);    
-  }
-  
-  
+      return (NO_ERROR);
+  }
+
+
 #ifdef DEBUG_LOCAL
   WriteLog("KERNEL32/CONSOLE:HMDeviceConsoleBufferClass:_DeviceRequest %s(%08x,%08x,%08x,%08x,%08x,%08x) unknown request\n",
@@ -5885,5 +5955,5 @@
  * Variables :
  * Result    :
- * Remark    : 
+ * Remark    :
  * Status    : UNTESTED
  *
@@ -5899,5 +5969,5 @@
   PCONSOLEBUFFER pConsoleBuffer = (PCONSOLEBUFFER)pHMHandleData->lpHandlerData;
   ULONG          ulCounter;                     /* current character counter */
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: CONBUFFER$::FillConsoleOutputAttribute(%08x,attr=%04x,%u,x=%u y=%u,res=%08x).\n",
@@ -5909,5 +5979,5 @@
            lpNumberOfAttrsWritten);
 #endif
-  
+
   if ( (dwWriteCoord.X < 0) ||
        (dwWriteCoord.Y < 0) )
@@ -5915,9 +5985,9 @@
     if (lpNumberOfAttrsWritten != NULL)           /* ensure pointer is valid */
       *lpNumberOfAttrsWritten = 0;                /* complete error handling */
-    
+
     SetLastError(ERROR_INVALID_PARAMETER);
     return (FALSE);
   }
-  
+
                                     /* check if dwWriteCoord is within specs */
   if ( (dwWriteCoord.X >= pConsoleBuffer->coordBufferSize.X) ||
@@ -5926,9 +5996,9 @@
     if (lpNumberOfAttrsWritten != NULL)           /* ensure pointer is valid */
       *lpNumberOfAttrsWritten = 0;                /* complete error handling */
-    
+
     SetLastError(ERROR_INVALID_PARAMETER);
     return (FALSE);
   }
-  
+
 
                                         /* OK, now write the attribute lines */
@@ -5942,5 +6012,5 @@
      ) = (UCHAR)(wAttribute & 0xFF);
                                  /* write attribute, don't change characters */
-    
+
     dwWriteCoord.X++;                                 /* move write position */
     if (dwWriteCoord.X >= pConsoleBuffer->coordBufferSize.X)
@@ -5948,5 +6018,5 @@
       dwWriteCoord.X = 0;                               /* skip to next line */
       dwWriteCoord.Y++;
-      
+
                          /* oops, we're at the end of the buffer. Abort now. */
       if (dwWriteCoord.Y >= pConsoleBuffer->coordBufferSize.Y)
@@ -5954,21 +6024,21 @@
         if (lpNumberOfAttrsWritten != NULL)       /* ensure pointer is valid */
           *lpNumberOfAttrsWritten = ulCounter;
-        
+
                                           /* update screen if active console */
         if (pHMHandleData->hHandle == ConsoleGlobals.hConsoleBuffer)
           ConsoleGlobals.fUpdateRequired = TRUE;/* update with next WM_TIMER */
-        
+
         return (TRUE);
       }
     }
   }
-  
+
                                           /* update screen if active console */
   if (pHMHandleData->hHandle == ConsoleGlobals.hConsoleBuffer)
     ConsoleGlobals.fUpdateRequired = TRUE;      /* update with next WM_TIMER */
-  
+
   if (lpNumberOfAttrsWritten != NULL)             /* ensure pointer is valid */
     *lpNumberOfAttrsWritten = nLength;
-  
+
   return (TRUE);
 }
@@ -5985,5 +6055,5 @@
  * Variables :
  * Result    :
- * Remark    : 
+ * Remark    :
  * Status    : UNTESTED
  *
@@ -5999,5 +6069,5 @@
   PCONSOLEBUFFER pConsoleBuffer = (PCONSOLEBUFFER)pHMHandleData->lpHandlerData;
   ULONG          ulCounter;                     /* current character counter */
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: CONBUFFER$::FillConsoleOutputCharacterA(%08x,char=%02x,%u,x=%u y=%u,res=%08x).\n",
@@ -6015,10 +6085,10 @@
     if (lpNumberOfCharsWritten != NULL)           /* ensure pointer is valid */
       *lpNumberOfCharsWritten = 0;                /* complete error handling */
-    
+
     SetLastError(ERROR_INVALID_PARAMETER);
     return (FALSE);
   }
-  
-  
+
+
                                     /* check if dwWriteCoord is within specs */
   if ( (dwWriteCoord.X >= pConsoleBuffer->coordBufferSize.X) ||
@@ -6027,9 +6097,9 @@
     if (lpNumberOfCharsWritten != NULL)           /* ensure pointer is valid */
       *lpNumberOfCharsWritten = 0;                /* complete error handling */
-    
+
     SetLastError(ERROR_INVALID_PARAMETER);
     return (FALSE);
   }
-  
+
 
                                         /* OK, now write the attribute lines */
@@ -6042,5 +6112,5 @@
                               (dwWriteCoord.X * 2)
      ) = ucCharacter;
-    
+
     dwWriteCoord.X++;                                 /* move write position */
     if (dwWriteCoord.X >= pConsoleBuffer->coordBufferSize.X)
@@ -6048,5 +6118,5 @@
       dwWriteCoord.X = 0;                               /* skip to next line */
       dwWriteCoord.Y++;
-      
+
                          /* oops, we're at the end of the buffer. Abort now. */
       if (dwWriteCoord.Y >= pConsoleBuffer->coordBufferSize.Y)
@@ -6054,21 +6124,21 @@
         if (lpNumberOfCharsWritten != NULL)       /* ensure pointer is valid */
           *lpNumberOfCharsWritten = ulCounter;
-        
+
                                           /* update screen if active console */
         if (pHMHandleData->hHandle == ConsoleGlobals.hConsoleBuffer)
           ConsoleGlobals.fUpdateRequired = TRUE;/* update with next WM_TIMER */
-        
+
         return (TRUE);
       }
     }
   }
-  
+
                                           /* update screen if active console */
   if (pHMHandleData->hHandle == ConsoleGlobals.hConsoleBuffer)
     ConsoleGlobals.fUpdateRequired = TRUE;      /* update with next WM_TIMER */
-  
+
   if (lpNumberOfCharsWritten != NULL)             /* ensure pointer is valid */
     *lpNumberOfCharsWritten = nLength;
-  
+
   return (TRUE);
 }
@@ -6085,5 +6155,5 @@
  * Variables :
  * Result    :
- * Remark    : 
+ * Remark    :
  * Status    : UNTESTED
  *
@@ -6099,5 +6169,5 @@
   PCONSOLEBUFFER pConsoleBuffer = (PCONSOLEBUFFER)pHMHandleData->lpHandlerData;
   ULONG          ulCounter;                     /* current character counter */
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: CONBUFFER$::FillConsoleOutputCharacterW(%08x,char=%02x,%u,x=%u y=%u,res=%08x).\n",
@@ -6109,5 +6179,5 @@
            lpNumberOfCharsWritten);
 #endif
-  
+
   if ( (dwWriteCoord.X < 0) ||
        (dwWriteCoord.Y < 0) )
@@ -6115,10 +6185,10 @@
     if (lpNumberOfCharsWritten != NULL)           /* ensure pointer is valid */
       *lpNumberOfCharsWritten = 0;                /* complete error handling */
-    
+
     SetLastError(ERROR_INVALID_PARAMETER);
     return (FALSE);
   }
-  
-  
+
+
                                     /* check if dwWriteCoord is within specs */
   if ( (dwWriteCoord.X >= pConsoleBuffer->coordBufferSize.X) ||
@@ -6127,9 +6197,9 @@
     if (lpNumberOfCharsWritten != NULL)           /* ensure pointer is valid */
       *lpNumberOfCharsWritten = 0;                /* complete error handling */
-    
+
     SetLastError(ERROR_INVALID_PARAMETER);
     return (FALSE);
   }
-  
+
 
                                         /* OK, now write the attribute lines */
@@ -6142,5 +6212,5 @@
                               (dwWriteCoord.X * 2)
      ) = (UCHAR)wcCharacter;          /* @@@PH unicode to ascii conversion ! */
-    
+
     dwWriteCoord.X++;                                 /* move write position */
     if (dwWriteCoord.X >= pConsoleBuffer->coordBufferSize.X)
@@ -6148,5 +6218,5 @@
       dwWriteCoord.X = 0;                               /* skip to next line */
       dwWriteCoord.Y++;
-      
+
                          /* oops, we're at the end of the buffer. Abort now. */
       if (dwWriteCoord.Y >= pConsoleBuffer->coordBufferSize.Y)
@@ -6154,21 +6224,21 @@
         if (lpNumberOfCharsWritten != NULL)       /* ensure pointer is valid */
           *lpNumberOfCharsWritten = ulCounter;
-        
+
                                           /* update screen if active console */
         if (pHMHandleData->hHandle == ConsoleGlobals.hConsoleBuffer)
           ConsoleGlobals.fUpdateRequired = TRUE;/* update with next WM_TIMER */
-        
+
         return (TRUE);
       }
     }
   }
-  
+
                                           /* update screen if active console */
   if (pHMHandleData->hHandle == ConsoleGlobals.hConsoleBuffer)
     ConsoleGlobals.fUpdateRequired = TRUE;      /* update with next WM_TIMER */
-  
+
   if (lpNumberOfCharsWritten != NULL)             /* ensure pointer is valid */
     *lpNumberOfCharsWritten = nLength;
-  
+
   return (TRUE);
 }
@@ -6183,5 +6253,5 @@
  * Variables :
  * Result    :
- * Remark    : 
+ * Remark    :
  * Status    : UNTESTED
  *
@@ -6193,5 +6263,5 @@
 {
   PCONSOLEBUFFER pConsoleBuffer = (PCONSOLEBUFFER)pHMHandleData->lpHandlerData;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: CONBUFFER$::GetConsoleMode(%08x,%08x).\n",
@@ -6199,7 +6269,7 @@
            lpMode);
 #endif
-  
+
   *lpMode = pConsoleBuffer->dwConsoleMode;    /* return current console mode */
-  
+
   return (TRUE);
 }
@@ -6213,5 +6283,5 @@
  * Variables :
  * Result    :
- * Remark    : 
+ * Remark    :
  * Status    : UNTESTED
  *
@@ -6223,5 +6293,5 @@
 {
   PCONSOLEBUFFER pConsoleBuffer = (PCONSOLEBUFFER)pHMHandleData->lpHandlerData;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: CONBUFFER$::GetConsoleCursorInfo(%08x,%08x).\n",
@@ -6229,9 +6299,9 @@
            pCCI);
 #endif
-  
+
   memcpy(pCCI,                      /* just copy the whole information block */
          &pConsoleBuffer->CursorInfo,
          sizeof (pConsoleBuffer->CursorInfo) );
-    
+
   return (TRUE);
 }
@@ -6245,5 +6315,5 @@
  * Variables :
  * Result    :
- * Remark    : 
+ * Remark    :
  * Status    : UNTESTED
  *
@@ -6255,5 +6325,5 @@
 {
   PCONSOLEBUFFER pConsoleBuffer = (PCONSOLEBUFFER)pHMHandleData->lpHandlerData;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: CONBUFFER$::GetConsoleScreenBufferInfo(%08x,%08x).\n",
@@ -6261,9 +6331,9 @@
            pCSBI);
 #endif
-  
+
   pCSBI->dwSize           = pConsoleBuffer->coordBufferSize;
   pCSBI->dwCursorPosition = pConsoleBuffer->coordCursorPosition;
   pCSBI->wAttributes      = (USHORT)pConsoleBuffer->ucDefaultAttribute;
-  
+
   /* @@@PH unsure, but should be OK */
   pCSBI->srWindow.Left   = pConsoleBuffer->coordWindowPosition.X;
@@ -6273,8 +6343,8 @@
   pCSBI->srWindow.Bottom = pConsoleBuffer->coordWindowPosition.Y +
                            pConsoleBuffer->coordWindowSize.Y - 1;
-  
+
   pCSBI->dwMaximumWindowSize = pConsoleBuffer->coordBufferSize;
 
-  return (TRUE);    
+  return (TRUE);
 }
 
@@ -6283,9 +6353,9 @@
  * Name      : DWORD HMDeviceConsoleBufferClass::GetLargestConsoleWindowSize
  * Purpose   : Determine maximum AVIO size
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
@@ -6299,43 +6369,43 @@
   LONG           lScreenCY;
   APIRET         rc;                                       /* API returncode */
-  
-  
+
+
 #ifdef DEBUG_LOCAL
   WriteLog("KERNEL32/CONSOLE: CONBUFFER$::GetLargestConsoleWindowSize(%08x).\n",
            pHMHandleData);
 #endif
-  
+
   /* @@@PH determine maximum console window size in characters
     based on display size and current avio font */
-  
+
   lScreenCX = WinQuerySysValue(HWND_DESKTOP,            /* query PM for that */
                                SV_CXSCREEN);
-  
+
   lScreenCY = WinQuerySysValue(HWND_DESKTOP,            /* query PM for that */
                                SV_CYFULLSCREEN);
-  
+
   if (rc != NO_ERROR)
   {
     WriteLog("KERNEL32/CONSOLE: VioGetDeviceCellSize failed with #%u.\n",
              rc);
-    
+
     return (FALSE);                                        /* say API failed */
   }
-  
+
   if ( (ConsoleGlobals.sCellCX == 0) ||          /* prevent division by zero */
        (ConsoleGlobals.sCellCY == 0) )
   {
     WriteLog("KERNEL32/CONSOLE: VioGetDeviceCellSize returned 0 value.\n");
-    
+
     return (FALSE);                                        /* say API failed */
   }
-  
+
   coordSize.X = lScreenCX / ConsoleGlobals.sCellCX;                            /* calculate */
   coordSize.Y = lScreenCY / ConsoleGlobals.sCellCY;
-  
+
                 /* these limitations are due to OS/2's current VIO subsystem */
   coordSize.X = min(coordSize.X, MAX_OS2_COLUMNS);
   coordSize.Y = min(coordSize.Y, MAX_OS2_ROWS);
-  
+
   return (COORD2ULONG(coordSize));                           /* return value */
 }
@@ -6352,5 +6422,5 @@
  * Variables :
  * Result    :
- * Remark    : 
+ * Remark    :
  * Status    : UNTESTED
  *
@@ -6369,7 +6439,7 @@
   ULONG ulReadX, ulReadY;                      /* position data is read from */
   WORD  wCell;                                        /* currently read data */
-  
+
   PCHAR_INFO pchi;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: CONBUFFER$::ReadConsoleOutputA(%08x,%08x,x=%u y=%u,x=%u y=%u, %08x).\n",
@@ -6382,6 +6452,6 @@
            psrctSourceRect);
 #endif
-  
-  
+
+
   /* verify psrctSourceRect first */
   psrctSourceRect->Left  = max(psrctSourceRect->Left,  0);
@@ -6389,5 +6459,5 @@
   psrctSourceRect->Right = min(psrctSourceRect->Right, pConsoleBuffer->coordBufferSize.X - 1);
   psrctSourceRect->Bottom= min(psrctSourceRect->Bottom,pConsoleBuffer->coordBufferSize.Y - 1);
-  
+
                                                      /* verify target buffer */
   if ( (coordDestBufferSize.X < coordDestBufferCoord.X) ||
@@ -6397,21 +6467,21 @@
     return (FALSE);                                            /* API failed */
   }
-  
+
   ulCX = coordDestBufferSize.X - coordDestBufferCoord.X;
   ulCY = coordDestBufferSize.Y - coordDestBufferCoord.Y;
-  
+
   ulCX = min(ulCX, (psrctSourceRect->Right  - psrctSourceRect->Left));
   ulCY = min(ulCY, (psrctSourceRect->Bottom - psrctSourceRect->Top));
-  
+
                                   /* final calculation of the copy rectangle */
   psrctSourceRect->Right  = psrctSourceRect->Left + ulCX;
   psrctSourceRect->Bottom = psrctSourceRect->Top  + ulCY;
-  
-  
+
+
   for (ulY = 0,
        ulReadY = psrctSourceRect->Top;
-       
+
        ulY <= ulCY;
-       
+
        ulY++,
        ulReadY++)
@@ -6422,7 +6492,7 @@
     for (ulX = 0,
          ulReadX = psrctSourceRect->Left;
-         
+
          ulX <= ulCX;
-         
+
          ulX++,
          ulReadX++,
@@ -6431,10 +6501,10 @@
                                                            /* read character */
       wCell = *(pConsoleBuffer->ppszLine[ulReadY] + ulReadX * 2);
-      
+
       pchi->Char.AsciiChar = (UCHAR)(wCell & 0x00FF);
       pchi->Attributes     = wCell >> 8;
     }
   }
-  
+
   return (TRUE);                                            /* OK, that's it */
 }
@@ -6451,5 +6521,5 @@
  * Variables :
  * Result    :
- * Remark    : 
+ * Remark    :
  * Status    : UNTESTED
  *
@@ -6468,7 +6538,7 @@
   ULONG ulReadX, ulReadY;                      /* position data is read from */
   WORD  wCell;                                        /* currently read data */
-  
+
   PCHAR_INFO pchi;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: CONBUFFER$::ReadConsoleOutputW(%08x,%08x,x=%u y=%u,x=%u y=%u, %08x).\n",
@@ -6481,6 +6551,6 @@
            psrctSourceRect);
 #endif
-  
-  
+
+
   /* verify psrctSourceRect first */
   psrctSourceRect->Left  = max(psrctSourceRect->Left,  0);
@@ -6488,5 +6558,5 @@
   psrctSourceRect->Right = min(psrctSourceRect->Right, pConsoleBuffer->coordBufferSize.X - 1);
   psrctSourceRect->Bottom= min(psrctSourceRect->Bottom,pConsoleBuffer->coordBufferSize.Y - 1);
-  
+
                                                      /* verify target buffer */
   if ( (coordDestBufferSize.X < coordDestBufferCoord.X) ||
@@ -6496,21 +6566,21 @@
     return (FALSE);                                            /* API failed */
   }
-  
+
   ulCX = coordDestBufferSize.X - coordDestBufferCoord.X;
   ulCY = coordDestBufferSize.Y - coordDestBufferCoord.Y;
-  
+
   ulCX = min(ulCX, (psrctSourceRect->Right  - psrctSourceRect->Left));
   ulCY = min(ulCY, (psrctSourceRect->Bottom - psrctSourceRect->Top));
-  
+
                                   /* final calculation of the copy rectangle */
   psrctSourceRect->Right  = psrctSourceRect->Left + ulCX;
   psrctSourceRect->Bottom = psrctSourceRect->Top  + ulCY;
-  
-  
+
+
   for (ulY = 0,
        ulReadY = psrctSourceRect->Top;
-       
+
        ulY <= ulCY;
-       
+
        ulY++,
        ulReadY++)
@@ -6521,7 +6591,7 @@
     for (ulX = 0,
          ulReadX = psrctSourceRect->Left;
-         
+
          ulX <= ulCX;
-         
+
          ulX++,
          ulReadX++,
@@ -6530,5 +6600,5 @@
                                                            /* read character */
       wCell = *(pConsoleBuffer->ppszLine[ulReadY] + ulReadX * 2);
-      
+
                                                      /* @@@PH Ascii->Unicode */
       pchi->Char.UnicodeChar = (UCHAR)(wCell & 0x00FF);
@@ -6536,5 +6606,5 @@
     }
   }
-  
+
   return (TRUE);                                            /* OK, that's it */
 }
@@ -6551,5 +6621,5 @@
  * Variables :
  * Result    :
- * Remark    : 
+ * Remark    :
  * Status    : UNTESTED
  *
@@ -6565,5 +6635,5 @@
   PCONSOLEBUFFER pConsoleBuffer = (PCONSOLEBUFFER)pHMHandleData->lpHandlerData;
   ULONG          ulCounter;                     /* current character counter */
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: CONBUFFER$::ReadConsoleOutputAttribute(%08x,pattr=%08x,%u,x=%u y=%u,res=%08x).\n",
@@ -6575,5 +6645,5 @@
            lpcNumberRead);
 #endif
-  
+
   if ( (dwReadCoord.X < 0) ||
        (dwReadCoord.Y < 0) )
@@ -6581,9 +6651,9 @@
     if (lpcNumberRead != NULL)                       /* ensure pointer is valid */
       *lpcNumberRead = 0;                            /* complete error handling */
-    
+
     SetLastError(ERROR_INVALID_PARAMETER);
     return (FALSE);
   }
-  
+
                                     /* check if dwReadCoord is within specs */
   if ( (dwReadCoord.X >= pConsoleBuffer->coordBufferSize.X) ||
@@ -6592,9 +6662,9 @@
     if (lpcNumberRead != NULL)                       /* ensure pointer is valid */
       *lpcNumberRead = 0;                            /* complete error handling */
-    
+
     SetLastError(ERROR_INVALID_PARAMETER);
     return (FALSE);
   }
-  
+
 
                                         /* OK, now write the attribute lines */
@@ -6608,5 +6678,5 @@
       *(pConsoleBuffer->ppszLine[dwReadCoord.Y] +
                                 (dwReadCoord.X * 2 + 1));
-    
+
     dwReadCoord.X++;                                 /* move write position */
     if (dwReadCoord.X >= pConsoleBuffer->coordBufferSize.X)
@@ -6614,5 +6684,5 @@
       dwReadCoord.X = 0;                               /* skip to next line */
       dwReadCoord.Y++;
-      
+
                          /* oops, we're at the end of the buffer. Abort now. */
       if (dwReadCoord.Y >= pConsoleBuffer->coordBufferSize.Y)
@@ -6620,13 +6690,13 @@
         if (lpcNumberRead != NULL)                   /* ensure pointer is valid */
           *lpcNumberRead = ulCounter;
-        
+
         return (TRUE);
       }
     }
   }
-  
+
   if (lpcNumberRead != NULL)                         /* ensure pointer is valid */
     *lpcNumberRead = cReadCells;
-  
+
   return (TRUE);
 }
@@ -6643,5 +6713,5 @@
  * Variables :
  * Result    :
- * Remark    : 
+ * Remark    :
  * Status    : UNTESTED
  *
@@ -6657,5 +6727,5 @@
   PCONSOLEBUFFER pConsoleBuffer = (PCONSOLEBUFFER)pHMHandleData->lpHandlerData;
   ULONG          ulCounter;                     /* current character counter */
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: CONBUFFER$::ReadConsoleOutputCharacterA(%08x,pattr=%08x,%u,x=%u y=%u,res=%08x).\n",
@@ -6667,5 +6737,5 @@
            lpcNumberRead);
 #endif
-  
+
   if ( (coordReadCoord.X < 0) ||
        (coordReadCoord.Y < 0) )
@@ -6673,9 +6743,9 @@
     if (lpcNumberRead != NULL)                    /* ensure pointer is valid */
       *lpcNumberRead = 0;                         /* complete error handling */
-    
+
     SetLastError(ERROR_INVALID_PARAMETER);
     return (FALSE);
   }
-  
+
                                   /* check if coordReadCoord is within specs */
   if ( (coordReadCoord.X >= pConsoleBuffer->coordBufferSize.X) ||
@@ -6684,9 +6754,9 @@
     if (lpcNumberRead != NULL)                    /* ensure pointer is valid */
       *lpcNumberRead = 0;                         /* complete error handling */
-    
+
     SetLastError(ERROR_INVALID_PARAMETER);
     return (FALSE);
   }
-  
+
 
                                         /* OK, now write the attribute lines */
@@ -6700,5 +6770,5 @@
       *(pConsoleBuffer->ppszLine[coordReadCoord.Y] +
                                 (coordReadCoord.X * 2));
-    
+
     coordReadCoord.X++;                               /* move write position */
     if (coordReadCoord.X >= pConsoleBuffer->coordBufferSize.X)
@@ -6706,5 +6776,5 @@
       coordReadCoord.X = 0;                             /* skip to next line */
       coordReadCoord.Y++;
-      
+
                          /* oops, we're at the end of the buffer. Abort now. */
       if (coordReadCoord.Y >= pConsoleBuffer->coordBufferSize.Y)
@@ -6712,13 +6782,13 @@
         if (lpcNumberRead != NULL)                /* ensure pointer is valid */
           *lpcNumberRead = ulCounter;
-        
+
         return (TRUE);
       }
     }
   }
-  
+
   if (lpcNumberRead != NULL)                         /* ensure pointer is valid */
     *lpcNumberRead = cchRead;
-  
+
   return (TRUE);
 }
@@ -6735,5 +6805,5 @@
  * Variables :
  * Result    :
- * Remark    : 
+ * Remark    :
  * Status    : UNTESTED
  *
@@ -6749,5 +6819,5 @@
   PCONSOLEBUFFER pConsoleBuffer = (PCONSOLEBUFFER)pHMHandleData->lpHandlerData;
   ULONG          ulCounter;                     /* current character counter */
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: CONBUFFER$::ReadConsoleOutputCharacterW(%08x,pattr=%08x,%u,x=%u y=%u,res=%08x).\n",
@@ -6759,5 +6829,5 @@
            lpcNumberRead);
 #endif
-  
+
   if ( (coordReadCoord.X < 0) ||
        (coordReadCoord.Y < 0) )
@@ -6765,9 +6835,9 @@
     if (lpcNumberRead != NULL)                    /* ensure pointer is valid */
       *lpcNumberRead = 0;                         /* complete error handling */
-    
+
     SetLastError(ERROR_INVALID_PARAMETER);
     return (FALSE);
   }
-  
+
                                   /* check if coordReadCoord is within specs */
   if ( (coordReadCoord.X >= pConsoleBuffer->coordBufferSize.X) ||
@@ -6776,9 +6846,9 @@
     if (lpcNumberRead != NULL)                    /* ensure pointer is valid */
       *lpcNumberRead = 0;                         /* complete error handling */
-    
+
     SetLastError(ERROR_INVALID_PARAMETER);
     return (FALSE);
   }
-  
+
 
                                         /* OK, now write the attribute lines */
@@ -6793,5 +6863,5 @@
       *(pConsoleBuffer->ppszLine[coordReadCoord.Y] +
                                 (coordReadCoord.X * 2));
-    
+
     coordReadCoord.X++;                               /* move write position */
     if (coordReadCoord.X >= pConsoleBuffer->coordBufferSize.X)
@@ -6799,5 +6869,5 @@
       coordReadCoord.X = 0;                             /* skip to next line */
       coordReadCoord.Y++;
-      
+
                          /* oops, we're at the end of the buffer. Abort now. */
       if (coordReadCoord.Y >= pConsoleBuffer->coordBufferSize.Y)
@@ -6805,13 +6875,13 @@
         if (lpcNumberRead != NULL)                /* ensure pointer is valid */
           *lpcNumberRead = ulCounter;
-        
+
         return (TRUE);
       }
     }
   }
-  
+
   if (lpcNumberRead != NULL)                         /* ensure pointer is valid */
     *lpcNumberRead = cchRead;
-  
+
   return (TRUE);
 }
@@ -6851,5 +6921,5 @@
   WORD           wAttr;                      /* fill character and attribute */
   int            iBlitDirection;             /* to handle overlapped buffers */
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: CONBUFFER$::ScrollConsoleScreenBufferA(%08x,%08x,%08x,x=%u y=%u,%08x).\n",
@@ -6861,5 +6931,5 @@
            pchiFill);
 #endif
-  
+
                                    /* calculate effective clipping rectangle */
   if (psrctClipRect != NULL)          /* if clipping rectangle was specified */
@@ -6868,5 +6938,5 @@
            psrctClipRect,
            sizeof (SMALL_RECT) );
-      
+
                                           /* check boundary with buffer size */
     srctView.Left   = max(0, srctView.Left);
@@ -6882,5 +6952,5 @@
     srctView.Bottom = pConsoleBuffer->coordBufferSize.Y;
   }
-  
+
   memcpy(&srctSource,                               /* copy source rectangle */
          psrctSourceRect,
@@ -6891,18 +6961,18 @@
   srctSource.Right  = min(srctSource.Right, srctView.Right );
   srctSource.Bottom = min(srctSource.Bottom,srctView.Bottom);
-  
+
   srctDest.Left  = max(srctView.Left,   coordDestOrigin.X);
   srctDest.Top   = max(srctView.Top,    coordDestOrigin.Y);
   srctDest.Right = min(srctView.Right,  srctDest.Left + srctSource.Right  - srctSource.Left);
   srctDest.Bottom= min(srctView.Bottom, srctDest.Top  + srctSource.Bottom - srctSource.Top);
-  
+
   /****************************
    * first copy the rectangle *
    ****************************/
-  
+
   if (srctDest.Left >  srctSource.Left) iBlitDirection  = 0;
   else                                  iBlitDirection  = 1;
   if (srctDest.Top  >  srctSource.Top)  iBlitDirection += 2;
-  
+
                                /* this leaves us with three different cases: */
                                /*                                            */
@@ -6923,11 +6993,11 @@
       {
                          /* calculate pointer to start of target screen line */
-        pusTarget = (PUSHORT) (pConsoleBuffer->ppszLine[iY + srctDest.Top] + 
+        pusTarget = (PUSHORT) (pConsoleBuffer->ppszLine[iY + srctDest.Top] +
                                (srctDest.Left << 1) );
-        
+
                          /* calculate pointer to start of source screen line */
-        pusSource = (PUSHORT) (pConsoleBuffer->ppszLine[iY + srctSource.Top] + 
+        pusSource = (PUSHORT) (pConsoleBuffer->ppszLine[iY + srctSource.Top] +
                                (srctSource.Left << 1) );
-        
+
         for (iX = srctDest.Left;
              iX <= srctDest.Right;
@@ -6938,5 +7008,5 @@
       }
       break;
-  
+
     /***************
      * upper right *
@@ -6948,11 +7018,11 @@
       {
                            /* calculate pointer to end of target screen line */
-        pusTarget = (PUSHORT) (pConsoleBuffer->ppszLine[iY + srctDest.Top] + 
+        pusTarget = (PUSHORT) (pConsoleBuffer->ppszLine[iY + srctDest.Top] +
                                ( srctDest.Right << 1) );
-        
+
                            /* calculate pointer to end of source screen line */
-        pusSource = (PUSHORT) (pConsoleBuffer->ppszLine[iY + srctSource.Top] + 
+        pusSource = (PUSHORT) (pConsoleBuffer->ppszLine[iY + srctSource.Top] +
                                ( srctSource.Right << 1) );
-        
+
         for (iX = srctDest.Right;
              iX >= srctDest.Left;
@@ -6963,5 +7033,5 @@
       }
       break;
-    
+
     /***************
      * lower left  *
@@ -6973,11 +7043,11 @@
       {
                          /* calculate pointer to start of target screen line */
-        pusTarget = (PUSHORT) (pConsoleBuffer->ppszLine[iY + srctDest.Top] + 
+        pusTarget = (PUSHORT) (pConsoleBuffer->ppszLine[iY + srctDest.Top] +
                                (srctDest.Left << 1) );
-        
+
                          /* calculate pointer to start of source screen line */
-        pusSource = (PUSHORT) (pConsoleBuffer->ppszLine[iY + srctSource.Top] + 
+        pusSource = (PUSHORT) (pConsoleBuffer->ppszLine[iY + srctSource.Top] +
                                (srctSource.Left << 1) );
-        
+
         for (iX = srctDest.Left;
              iX <= srctDest.Right;
@@ -6998,11 +7068,11 @@
       {
                            /* calculate pointer to end of target screen line */
-        pusTarget = (PUSHORT) (pConsoleBuffer->ppszLine[iY + srctDest.Top] + 
+        pusTarget = (PUSHORT) (pConsoleBuffer->ppszLine[iY + srctDest.Top] +
                                ( srctDest.Right << 1) );
-        
+
                            /* calculate pointer to end of source screen line */
-        pusSource = (PUSHORT) (pConsoleBuffer->ppszLine[iY + srctSource.Top] + 
+        pusSource = (PUSHORT) (pConsoleBuffer->ppszLine[iY + srctSource.Top] +
                                (srctSource.Right << 1) );
-        
+
         for (iX = srctDest.Right;
              iX >= srctDest.Left;
@@ -7014,6 +7084,6 @@
       break;
   }
-    
-    
+
+
               /* this is the character and attribute for the uncovered cells */
   wAttr = (pchiFill->Char.AsciiChar) + (pchiFill->Attributes << 8);
@@ -7024,5 +7094,5 @@
   {
     pusTarget = (PUSHORT) (pConsoleBuffer->ppszLine[iY] + srctSource.Left);
-    
+
     for (iX = srctSource.Left;
          iX < srctSource.Right;
@@ -7039,5 +7109,5 @@
         *pusTarget = wAttr;            /* write fill character and attribute */
   }
-  
+
                                           /* update screen if active console */
   if (pHMHandleData->hHandle == ConsoleGlobals.hConsoleBuffer)
@@ -7079,5 +7149,5 @@
   PUSHORT        pusTarget, pusSource;      /* pointer to source, dest cells */
   WORD           wAttr;                      /* fill character and attribute */
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: CONBUFFER$::ScrollConsoleScreenBufferW(%08x,%08x,%08x,x=%u y=%u,%08x).\n",
@@ -7089,5 +7159,5 @@
            pchiFill);
 #endif
-  
+
                                    /* calculate effective clipping rectangle */
   if (psrctClipRect != NULL)          /* if clipping rectangle was specified */
@@ -7096,5 +7166,5 @@
            psrctClipRect,
            sizeof (SMALL_RECT) );
-      
+
                                           /* check boundary with buffer size */
     srctView.Left   = max(0, srctView.Left);
@@ -7110,5 +7180,5 @@
     srctView.Bottom = pConsoleBuffer->coordBufferSize.Y;
   }
-  
+
   memcpy(&srctSource,                               /* copy source rectangle */
          psrctSourceRect,
@@ -7119,10 +7189,10 @@
   srctSource.Right  = min(srctSource.Right, srctView.Right );
   srctSource.Bottom = min(srctSource.Bottom,srctView.Bottom);
-  
+
   srctDest.Left  = max(srctView.Left,   coordDestOrigin.X);
   srctDest.Top   = max(srctView.Top,    coordDestOrigin.Y);
   srctDest.Right = min(srctView.Right,  srctDest.Left + srctSource.Right  - srctSource.Left);
   srctDest.Bottom= min(srctView.Bottom, srctDest.Top  + srctSource.Bottom - srctSource.Top);
-  
+
   /* first copy the rectangle */
   for (ulY = 0;
@@ -7131,11 +7201,11 @@
   {
                          /* calculate pointer to start of target screen line */
-    pusTarget = (PUSHORT) (pConsoleBuffer->ppszLine[ulY + srctDest.Top] + 
+    pusTarget = (PUSHORT) (pConsoleBuffer->ppszLine[ulY + srctDest.Top] +
                            srctDest.Left);
-    
+
                          /* calculate pointer to start of source screen line */
-    pusSource = (PUSHORT) (pConsoleBuffer->ppszLine[ulY + srctSource.Top] + 
+    pusSource = (PUSHORT) (pConsoleBuffer->ppszLine[ulY + srctSource.Top] +
                            srctSource.Left);
-    
+
     for (ulX = srctDest.Left;
          ulX < srctDest.Right;
@@ -7145,6 +7215,6 @@
       *pusTarget = *pusSource;                             /* copy character */
   }
-  
-  
+
+
               /* this is the character and attribute for the uncovered cells */
   /* @@@PH Unicode->Ascii translation */
@@ -7156,5 +7226,5 @@
   {
     pusTarget = (PUSHORT) (pConsoleBuffer->ppszLine[ulY] + srctSource.Left);
-    
+
     for (ulX = srctSource.Left;
          ulX < srctSource.Right;
@@ -7163,9 +7233,9 @@
       *pusTarget = wAttr;              /* write fill character and attribute */
   }
-  
+
                                           /* update screen if active console */
   if (pHMHandleData->hHandle == ConsoleGlobals.hConsoleBuffer)
     ConsoleGlobals.fUpdateRequired = TRUE;      /* update with next WM_TIMER */
-  
+
   return (TRUE);
 }
@@ -7179,5 +7249,5 @@
  * Variables :
  * Result    :
- * Remark    : 
+ * Remark    :
  * Status    : UNTESTED
  *
@@ -7189,5 +7259,5 @@
 {
   PCONSOLEBUFFER pConsoleBuffer = (PCONSOLEBUFFER)pHMHandleData->lpHandlerData;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: CONBUFFER$::SetConsoleCursorInfo(%08x,%08x).\n",
@@ -7195,5 +7265,5 @@
            pCCI);
 #endif
-  
+
                                                        /* validate structure */
   if ( (pCCI->dwSize < 1) ||
@@ -7203,14 +7273,14 @@
     return (FALSE);                                            /* API failed */
   }
-  
+
               /* if we're the active buffer, remove cursor from screen first */
   if (pHMHandleData->hHandle == ConsoleGlobals.hConsoleBuffer)
     ConsoleCursorShow(pConsoleBuffer,
                       CONSOLECURSOR_HIDE);
-    
+
   memcpy(&pConsoleBuffer->CursorInfo,    /* copy the whole information block */
          pCCI,
          sizeof (pConsoleBuffer->CursorInfo) );
-    
+
   return (TRUE);
 }
@@ -7224,5 +7294,5 @@
  * Variables :
  * Result    :
- * Remark    : 
+ * Remark    :
  * Status    : UNTESTED
  *
@@ -7234,5 +7304,5 @@
 {
   PCONSOLEBUFFER pConsoleBuffer = (PCONSOLEBUFFER)pHMHandleData->lpHandlerData;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: CONBUFFER$::SetConsoleCursorPosition(%08x,x=%u.y=%u).\n",
@@ -7241,8 +7311,8 @@
            coordCursorPosition.Y);
 #endif
-  
+
                                   /* @@@PH remove cursor from screen first ! */
   pConsoleBuffer->coordCursorPosition = coordCursorPosition;
-  
+
   return (TRUE);
 }
@@ -7256,5 +7326,5 @@
  * Variables :
  * Result    :
- * Remark    : 
+ * Remark    :
  * Status    : UNTESTED
  *
@@ -7266,5 +7336,5 @@
 {
   PCONSOLEBUFFER pConsoleBuffer = (PCONSOLEBUFFER)pHMHandleData->lpHandlerData;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: CONBUFFER$::SetConsoleMode(%08x,%08x).\n",
@@ -7272,7 +7342,7 @@
            dwMode);
 #endif
-  
+
   pConsoleBuffer->dwConsoleMode = dwMode;        /* set current console mode */
-  
+
   return (TRUE);
 }
@@ -7287,5 +7357,5 @@
  * Variables :
  * Result    :
- * Remark    : 
+ * Remark    :
  * Status    : UNTESTED
  *
@@ -7300,5 +7370,5 @@
   PCONSOLEBUFFER pConsoleBuffer = (PCONSOLEBUFFER)pHMHandleData->lpHandlerData;
   ULONG ulLine;                                        /* line index counter */
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: CONBUFFER$::SetConsoleScreenBufferSize(%u,%u).\n",
@@ -7306,6 +7376,6 @@
            coordSize.Y);
 #endif
-  
-  
+
+
                                  /* re-allocate the whole line-pointer array */
   ulSize = coordSize.Y * (coordSize.X * 2 + sizeof (PSZ) );
@@ -7314,5 +7384,5 @@
     if (pConsoleBuffer->ppszLine != NULL)        /* if old buffer is present */
       free (pConsoleBuffer->ppszLine);                    /* free old buffer */
-    
+
     pConsoleBuffer->ppszLine          = NULL;
     pConsoleBuffer->coordBufferSize.X = 0;
@@ -7322,9 +7392,9 @@
     pConsoleBuffer->coordWindowPosition.X = 0;
     pConsoleBuffer->coordWindowPosition.Y = 0;
-    
+
     return (TRUE);                                                     /* OK */
   }
 
-  
+
   ppszNew = (PSZ *) malloc(ulSize);                        /* allocate array */
   if (ppszNew == NULL)                            /* check proper allocation */
@@ -7333,5 +7403,5 @@
     return (FALSE);                                 /* raise error condition */
   }
-  
+
 
   for (ulLine = 0;                               /* setup line pointer array */
@@ -7349,5 +7419,5 @@
                  ((ULONG)(pConsoleBuffer->ucDefaultAttribute) << 24) +
                  ((ULONG)' ' << 16) );
-  
+
                                                     /* scroll the line index */
   for (ulLine = 0;
@@ -7357,16 +7427,16 @@
                           (PUSHORT)(ppszNew[ulLine]),
                           coordSize.X);
-  
-  
-  
+
+
+
                                                    /* copy lines as required */
   if (pConsoleBuffer->ppszLine != NULL)         /* previous buffer present ? */
   {
     ULONG x, y;
-    
+
                                           /* copy old characters as required */
     x = min(pConsoleBuffer->coordBufferSize.X, coordSize.X);
     y = min(pConsoleBuffer->coordBufferSize.Y, coordSize.Y);
-    
+
     for (ulLine = 0;                                    /* copy line by line */
          ulLine < y;
@@ -7375,8 +7445,8 @@
              pConsoleBuffer->ppszLine[ulLine],
              x * 2);
-    
+
     free (pConsoleBuffer->ppszLine);    /* free previous screen buffer array */
   }
-  
+
 
   pConsoleBuffer->ppszLine          = ppszNew;     /* poke in the new values */
@@ -7385,5 +7455,5 @@
   pConsoleBuffer->coordCursorPosition.X = 0;
   pConsoleBuffer->coordCursorPosition.Y = 0;
-  
+
   /* @@@PH to be changed ! */
   pConsoleBuffer->coordWindowSize.X = coordSize.X;                /* default */
@@ -7395,5 +7465,5 @@
   if (pHMHandleData->hHandle == ConsoleGlobals.hConsoleBuffer)
     ConsoleGlobals.fUpdateRequired = TRUE;      /* update with next WM_TIMER */
-  
+
   return TRUE;
 }
@@ -7401,11 +7471,11 @@
 
 /*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
@@ -7416,10 +7486,10 @@
 {
   PCONSOLEBUFFER pConsoleBuffer = (PCONSOLEBUFFER)pHMHandleData->lpHandlerData;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: CONBUFFER$::SetConsoleTextAttribute(%u).\n",
            wAttr);
 #endif
-  
+
   pConsoleBuffer->ucDefaultAttribute = (UCHAR)wAttr;
   return (TRUE);
@@ -7428,11 +7498,11 @@
 
 /*****************************************************************************
- * Name      : 
- * Purpose   : 
- * Parameters: 
- * Variables :
- * Result    : 
- * Remark    :
- * Status    : 
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
  *
  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
@@ -7442,13 +7512,13 @@
 {
   PCONSOLEBUFFER pConsoleBuffer = (PCONSOLEBUFFER)pHMHandleData->lpHandlerData;
-  
+
 #ifdef DEBUG_LOCAL
   WriteLog("KERNEL32/CONSOLE: CONBUFFER$::SetConsoleActiveScreenBuffer().\n");
 #endif
-  
+
                               /* set new buffer handle to the global console */
   ConsoleGlobals.hConsoleBuffer  = pHMHandleData->hHandle;
   ConsoleGlobals.fUpdateRequired = TRUE;      /* update with next WM_TIMER */
-  
+
   return (TRUE);
 }
@@ -7463,5 +7533,5 @@
  * Variables :
  * Result    :
- * Remark    : 
+ * Remark    :
  * Status    : UNTESTED
  *
@@ -7474,5 +7544,5 @@
 {
   PCONSOLEBUFFER pConsoleBuffer = (PCONSOLEBUFFER)pHMHandleData->lpHandlerData;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: CONBUFFER$::SetConsoleWindowInfo(%08x,%u,%08x).\n",
@@ -7481,5 +7551,5 @@
            psrctWindowRect);
 #endif
-  
+
   if (fAbsolute == TRUE)                  /* absolute coordinates provided ? */
   {
@@ -7495,5 +7565,5 @@
       return (FALSE);                                               /* error */
     }
-    
+
                                  /* check we don't go beyond screen buffer ! */
     if ( ((psrctWindowRect->Right  - psrctWindowRect->Left) > pConsoleBuffer->coordBufferSize.X) ||
@@ -7506,10 +7576,10 @@
       return (FALSE);                                               /* error */
     }
-        
+
     pConsoleBuffer->coordWindowSize.X     = psrctWindowRect->Right -
                                             psrctWindowRect->Left;
     pConsoleBuffer->coordWindowSize.Y     = psrctWindowRect->Bottom -
                                             psrctWindowRect->Top;
-    
+
     pConsoleBuffer->coordWindowPosition.X = psrctWindowRect->Left;
     pConsoleBuffer->coordWindowPosition.Y = psrctWindowRect->Top;
@@ -7521,10 +7591,10 @@
     int iPosX;
     int iPosY;
-    
+
     iSizeX = pConsoleBuffer->coordWindowSize.X + psrctWindowRect->Left + psrctWindowRect->Right;
     iSizeY = pConsoleBuffer->coordWindowSize.Y + psrctWindowRect->Top  + psrctWindowRect->Bottom;
     iPosX  = pConsoleBuffer->coordWindowPosition.X  + psrctWindowRect->Left;
     iPosY  = pConsoleBuffer->coordWindowPosition.Y  + psrctWindowRect->Top;
-    
+
                                  /* check we don't go beyond screen buffer ! */
     if ( (iSizeX > pConsoleBuffer->coordBufferSize.X) ||
@@ -7541,5 +7611,5 @@
       return (FALSE);                                               /* error */
     }
-  
+
                                        /* Values are verified for being OK ! */
     pConsoleBuffer->coordWindowPosition.X  = iPosX;
@@ -7548,13 +7618,13 @@
     pConsoleBuffer->coordWindowSize.Y = iSizeY;
   }
-  
+
   /* update window */
-  /* @@@PH 
-   
+  /* @@@PH
+
    ConsoleWindowResize(COORD coordWindowSize,
                        COORD coordWindowPos,
-   
+
    */
-  
+
                                           /* update window contents (scroll) */
                                           /* update screen if active console */
@@ -7576,5 +7646,5 @@
  * Variables :
  * Result    :
- * Remark    : 
+ * Remark    :
  * Status    : UNTESTED
  *
@@ -7589,5 +7659,5 @@
 {
   PCONSOLEBUFFER pConsoleBuffer = (PCONSOLEBUFFER)pHMHandleData->lpHandlerData;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: CONBUFFER$::WriteConsoleA(%08x,%08x,%u,%08x,%08x).\n",
@@ -7598,5 +7668,5 @@
            lpvReserved);
 #endif
-  
+
   /* simply forward the request to that routine */
   return (HMDeviceConsoleBufferClass::WriteFile(pHMHandleData,
@@ -7618,5 +7688,5 @@
  * Variables :
  * Result    :
- * Remark    : 
+ * Remark    :
  * Status    : UNTESTED
  *
@@ -7631,5 +7701,5 @@
 {
   PCONSOLEBUFFER pConsoleBuffer = (PCONSOLEBUFFER)pHMHandleData->lpHandlerData;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: CONBUFFER$::WriteConsoleW(%08x,%08x,%u,%08x,%08x).\n",
@@ -7640,7 +7710,7 @@
            lpvReserved);
 #endif
-  
+
   /* @@@PH AScii -> unicode translation */
-  
+
   /* simply forward the request to that routine */
   return (HMDeviceConsoleBufferClass::WriteFile(pHMHandleData,
@@ -7662,5 +7732,5 @@
  * Variables :
  * Result    :
- * Remark    : 
+ * Remark    :
  * Status    : UNTESTED
  *
@@ -7679,8 +7749,8 @@
   ULONG ulWriteX, ulWriteY;                    /* position data is read from */
   WORD  wCell;                                        /* currently read data */
-  
+
   PCHAR_INFO pchi;
   PSZ        pszTarget;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: CONBUFFER$::WriteConsoleOutputA(%08x,%08x,x=%u y=%u,x=%u y=%u, %08x).\n",
@@ -7693,6 +7763,6 @@
            psrctDestRect);
 #endif
-  
-  
+
+
   /* verify psrctDestRect first */
   psrctDestRect->Left  = max(psrctDestRect->Left,  0);
@@ -7700,5 +7770,5 @@
   psrctDestRect->Right = min(psrctDestRect->Right, pConsoleBuffer->coordBufferSize.X - 1);
   psrctDestRect->Bottom= min(psrctDestRect->Bottom,pConsoleBuffer->coordBufferSize.Y - 1);
-  
+
                                                      /* verify target buffer */
   if ( (coordSrcBufferSize.X < coordSrcBufferCoord.X) ||
@@ -7708,21 +7778,21 @@
     return (FALSE);                                            /* API failed */
   }
-  
+
   ulCX = coordSrcBufferSize.X - coordSrcBufferCoord.X;
   ulCY = coordSrcBufferSize.Y - coordSrcBufferCoord.Y;
-  
+
   ulCX = min(ulCX, (psrctDestRect->Right  - psrctDestRect->Left));
   ulCY = min(ulCY, (psrctDestRect->Bottom - psrctDestRect->Top));
-  
+
                                   /* final calculation of the copy rectangle */
   psrctDestRect->Right  = psrctDestRect->Left + ulCX;
   psrctDestRect->Bottom = psrctDestRect->Top  + ulCY;
-  
-  
+
+
   for (ulY = 0,
        ulWriteY = psrctDestRect->Top;
-       
+
        ulY <= ulCY;
-       
+
        ulY++,
        ulWriteY++)
@@ -7731,13 +7801,13 @@
                           + sizeof(CHAR_INFO) * (coordSrcBufferCoord.Y + ulY)
                             * coordSrcBufferSize.X;
-    
+
                                 /* calculate pointer to start of screen line */
     pszTarget = pConsoleBuffer->ppszLine[ulWriteY] + psrctDestRect->Left;
-    
+
     for (ulX = 0,
          ulWriteX = psrctDestRect->Left;
-         
+
          ulX <= ulCX;
-         
+
          ulX++,
          ulWriteX++,
@@ -7749,9 +7819,9 @@
     }
   }
-  
+
                                           /* update screen if active console */
   if (pHMHandleData->hHandle == ConsoleGlobals.hConsoleBuffer)
     ConsoleGlobals.fUpdateRequired = TRUE;      /* update with next WM_TIMER */
-    
+
   return (TRUE);                                            /* OK, that's it */
 }
@@ -7768,5 +7838,5 @@
  * Variables :
  * Result    :
- * Remark    : 
+ * Remark    :
  * Status    : UNTESTED
  *
@@ -7785,8 +7855,8 @@
   ULONG ulWriteX, ulWriteY;                    /* position data is read from */
   WORD  wCell;                                        /* currently read data */
-  
+
   PCHAR_INFO pchi;
   PSZ        pszTarget;
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: CONBUFFER$::WriteConsoleOutputW(%08x,%08x,x=%u y=%u,x=%u y=%u, %08x).\n",
@@ -7799,6 +7869,6 @@
            psrctDestRect);
 #endif
-  
-  
+
+
   /* verify psrctDestRect first */
   psrctDestRect->Left  = max(psrctDestRect->Left,  0);
@@ -7806,5 +7876,5 @@
   psrctDestRect->Right = min(psrctDestRect->Right, pConsoleBuffer->coordBufferSize.X - 1);
   psrctDestRect->Bottom= min(psrctDestRect->Bottom,pConsoleBuffer->coordBufferSize.Y - 1);
-  
+
                                                      /* verify target buffer */
   if ( (coordSrcBufferSize.X < coordSrcBufferCoord.X) ||
@@ -7814,21 +7884,21 @@
     return (FALSE);                                            /* API failed */
   }
-  
+
   ulCX = coordSrcBufferSize.X - coordSrcBufferCoord.X;
   ulCY = coordSrcBufferSize.Y - coordSrcBufferCoord.Y;
-  
+
   ulCX = min(ulCX, (psrctDestRect->Right  - psrctDestRect->Left));
   ulCY = min(ulCY, (psrctDestRect->Bottom - psrctDestRect->Top));
-  
+
                                   /* final calculation of the copy rectangle */
   psrctDestRect->Right  = psrctDestRect->Left + ulCX;
   psrctDestRect->Bottom = psrctDestRect->Top  + ulCY;
-  
-  
+
+
   for (ulY = 0,
        ulWriteY = psrctDestRect->Top;
-       
+
        ulY <= ulCY;
-       
+
        ulY++,
        ulWriteY++)
@@ -7837,13 +7907,13 @@
                           + sizeof(CHAR_INFO) * (coordSrcBufferCoord.Y + ulY)
                             * coordSrcBufferSize.X;
-    
+
                                 /* calculate pointer to start of screen line */
     pszTarget = pConsoleBuffer->ppszLine[ulWriteY] + psrctDestRect->Left;
-    
+
     for (ulX = 0,
          ulWriteX = psrctDestRect->Left;
-         
+
          ulX <= ulCX;
-         
+
          ulX++,
          ulWriteX++,
@@ -7855,9 +7925,9 @@
     }
   }
-  
+
                                           /* update screen if active console */
   if (pHMHandleData->hHandle == ConsoleGlobals.hConsoleBuffer)
     ConsoleGlobals.fUpdateRequired = TRUE;      /* update with next WM_TIMER */
-    
+
   return (TRUE);                                            /* OK, that's it */
 }
@@ -7874,5 +7944,5 @@
  * Variables :
  * Result    :
- * Remark    : 
+ * Remark    :
  * Status    : UNTESTED
  *
@@ -7888,5 +7958,5 @@
   PCONSOLEBUFFER pConsoleBuffer = (PCONSOLEBUFFER)pHMHandleData->lpHandlerData;
   ULONG          ulCounter;                     /* current character counter */
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: CONBUFFER$::WriteConsoleOutputAttribute(%08x,pattr=%08x,%u,x=%u y=%u,res=%08x).\n",
@@ -7900,5 +7970,5 @@
            lpcWritten);
 #endif
-  
+
   if ( (dwWriteCoord.X < 0) ||
        (dwWriteCoord.Y < 0) )
@@ -7906,9 +7976,9 @@
     if (lpcWritten != NULL)                       /* ensure pointer is valid */
       *lpcWritten = 0;                            /* complete error handling */
-    
+
     SetLastError(ERROR_INVALID_PARAMETER);
     return (FALSE);
   }
-  
+
                                     /* check if dwWriteCoord is within specs */
   if ( (dwWriteCoord.X >= pConsoleBuffer->coordBufferSize.X) ||
@@ -7917,9 +7987,9 @@
     if (lpcWritten != NULL)                       /* ensure pointer is valid */
       *lpcWritten = 0;                            /* complete error handling */
-    
+
     SetLastError(ERROR_INVALID_PARAMETER);
     return (FALSE);
   }
-  
+
 
                                         /* OK, now write the attribute lines */
@@ -7933,5 +8003,5 @@
                               (dwWriteCoord.X * 2 + 1)
      ) = (UCHAR)*lpwAttribute;           /* write attribute and skip to next */
-    
+
     dwWriteCoord.X++;                                 /* move write position */
     if (dwWriteCoord.X >= pConsoleBuffer->coordBufferSize.X)
@@ -7939,5 +8009,5 @@
       dwWriteCoord.X = 0;                               /* skip to next line */
       dwWriteCoord.Y++;
-      
+
                          /* oops, we're at the end of the buffer. Abort now. */
       if (dwWriteCoord.Y >= pConsoleBuffer->coordBufferSize.Y)
@@ -7945,21 +8015,21 @@
         if (lpcWritten != NULL)                   /* ensure pointer is valid */
           *lpcWritten = ulCounter;
-        
+
                                           /* update screen if active console */
         if (pHMHandleData->hHandle == ConsoleGlobals.hConsoleBuffer)
           ConsoleGlobals.fUpdateRequired = TRUE;/* update with next WM_TIMER */
-        
+
         return (TRUE);
       }
     }
   }
-  
+
                                           /* update screen if active console */
   if (pHMHandleData->hHandle == ConsoleGlobals.hConsoleBuffer)
     ConsoleGlobals.fUpdateRequired = TRUE;      /* update with next WM_TIMER */
-  
+
   if (lpcWritten != NULL)                         /* ensure pointer is valid */
     *lpcWritten = cWriteCells;
-  
+
   return (TRUE);
 }
@@ -7976,5 +8046,5 @@
  * Variables :
  * Result    :
- * Remark    : 
+ * Remark    :
  * Status    : UNTESTED
  *
@@ -7990,5 +8060,5 @@
   PCONSOLEBUFFER pConsoleBuffer = (PCONSOLEBUFFER)pHMHandleData->lpHandlerData;
   ULONG          ulCounter;                     /* current character counter */
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: CONBUFFER$::WriteConsoleOutputCharacterA(%08x,pstr=%08x,%u,x=%u y=%u,res=%08x).\n",
@@ -8000,5 +8070,5 @@
            lpcWritten);
 #endif
-  
+
   if ( (dwWriteCoord.X < 0) ||
        (dwWriteCoord.Y < 0) )
@@ -8006,9 +8076,9 @@
     if (lpcWritten != NULL)                       /* ensure pointer is valid */
       *lpcWritten = 0;                            /* complete error handling */
-    
+
     SetLastError(ERROR_INVALID_PARAMETER);
     return (FALSE);
   }
-  
+
                                     /* check if dwWriteCoord is within specs */
   if ( (dwWriteCoord.X >= pConsoleBuffer->coordBufferSize.X) ||
@@ -8017,9 +8087,9 @@
     if (lpcWritten != NULL)                       /* ensure pointer is valid */
       *lpcWritten = 0;                            /* complete error handling */
-    
+
     SetLastError(ERROR_INVALID_PARAMETER);
     return (FALSE);
   }
-  
+
 
                                         /* OK, now write the character lines */
@@ -8033,5 +8103,5 @@
                               (dwWriteCoord.X * 2)
      ) = (UCHAR)*lpWriteBuffer;          /* write character and skip to next */
-    
+
     dwWriteCoord.X++;                                 /* move write position */
     if (dwWriteCoord.X >= pConsoleBuffer->coordBufferSize.X)
@@ -8039,5 +8109,5 @@
       dwWriteCoord.X = 0;                               /* skip to next line */
       dwWriteCoord.Y++;
-      
+
                          /* oops, we're at the end of the buffer. Abort now. */
       if (dwWriteCoord.Y >= pConsoleBuffer->coordBufferSize.Y)
@@ -8045,21 +8115,21 @@
         if (lpcWritten != NULL)                   /* ensure pointer is valid */
           *lpcWritten = ulCounter;
-        
+
                                           /* update screen if active console */
         if (pHMHandleData->hHandle == ConsoleGlobals.hConsoleBuffer)
           ConsoleGlobals.fUpdateRequired = TRUE;/* update with next WM_TIMER */
-        
+
         return (TRUE);
       }
     }
   }
-  
+
                                           /* update screen if active console */
   if (pHMHandleData->hHandle == ConsoleGlobals.hConsoleBuffer)
     ConsoleGlobals.fUpdateRequired = TRUE;      /* update with next WM_TIMER */
-  
+
   if (lpcWritten != NULL)                         /* ensure pointer is valid */
     *lpcWritten = cchWrite;
-  
+
   return (TRUE);
 }
@@ -8090,5 +8160,5 @@
   PCONSOLEBUFFER pConsoleBuffer = (PCONSOLEBUFFER)pHMHandleData->lpHandlerData;
   ULONG          ulCounter;                     /* current character counter */
-  
+
 #ifdef DEBUG_LOCAL2
   WriteLog("KERNEL32/CONSOLE: CONBUFFER$::WriteConsoleOutputCharacterW(%08x,pstr=%08x,%u,x=%u y=%u,res=%08x).\n",
@@ -8100,5 +8170,5 @@
            lpcWritten);
 #endif
-  
+
   if ( (dwWriteCoord.X < 0) ||
        (dwWriteCoord.Y < 0) )
@@ -8106,9 +8176,9 @@
     if (lpcWritten != NULL)                       /* ensure pointer is valid */
       *lpcWritten = 0;                            /* complete error handling */
-    
+
     SetLastError(ERROR_INVALID_PARAMETER);
     return (FALSE);
   }
-  
+
                                     /* check if dwWriteCoord is within specs */
   if ( (dwWriteCoord.X >= pConsoleBuffer->coordBufferSize.X) ||
@@ -8117,9 +8187,9 @@
     if (lpcWritten != NULL)                       /* ensure pointer is valid */
       *lpcWritten = 0;                            /* complete error handling */
-    
+
     SetLastError(ERROR_INVALID_PARAMETER);
     return (FALSE);
   }
-  
+
 
                                         /* OK, now write the character lines */
@@ -8134,5 +8204,5 @@
      ) = (UCHAR)*lpWriteBuffer;          /* write character and skip to next */
                                        /* @@@PH unicode to ascii translation */
-    
+
     dwWriteCoord.X++;                                 /* move write position */
     if (dwWriteCoord.X >= pConsoleBuffer->coordBufferSize.X)
@@ -8140,5 +8210,5 @@
       dwWriteCoord.X = 0;                               /* skip to next line */
       dwWriteCoord.Y++;
-      
+
                          /* oops, we're at the end of the buffer. Abort now. */
       if (dwWriteCoord.Y >= pConsoleBuffer->coordBufferSize.Y)
@@ -8146,21 +8216,21 @@
         if (lpcWritten != NULL)                   /* ensure pointer is valid */
           *lpcWritten = ulCounter;
-        
+
                                           /* update screen if active console */
         if (pHMHandleData->hHandle == ConsoleGlobals.hConsoleBuffer)
           ConsoleGlobals.fUpdateRequired = TRUE;/* update with next WM_TIMER */
-        
+
         return (TRUE);
       }
     }
   }
-  
+
                                           /* update screen if active console */
   if (pHMHandleData->hHandle == ConsoleGlobals.hConsoleBuffer)
     ConsoleGlobals.fUpdateRequired = TRUE;      /* update with next WM_TIMER */
-  
+
   if (lpcWritten != NULL)                         /* ensure pointer is valid */
     *lpcWritten = cchWrite;
-  
+
   return (TRUE);
 }
Index: trunk/src/kernel32/console2.h
===================================================================
--- trunk/src/kernel32/console2.h	(revision 45)
+++ trunk/src/kernel32/console2.h	(revision 46)
@@ -1,2 +1,7 @@
+/*
+ *
+ * Project Odin Software License can be found in LICENSE.TXT
+ *
+ */
 /*
  * Win32 Console Subsystem for OS/2
@@ -4,5 +9,5 @@
  * 1998/02/11 PH Patrick Haller (haller@zebra.fh-weingarten.de)
  *
- * @(#) HandleManager.Cpp       1.0.0	1998/02/11 PH start
+ * @(#) HandleManager.Cpp       1.0.0   1998/02/11 PH start
  */
 
@@ -14,7 +19,7 @@
  * Remark                                                                    *
  *****************************************************************************
- 
+
  */
- 
+
 
 /*****************************************************************************
@@ -53,12 +58,12 @@
   PSZ   *ppszLine;                  /* an array of line pointers             */
   ULONG ulScrollLineOffset;          /* offset to the 1st line in the buffer */
-  
+
                 /* the following structures reflect the Win32 API structures */
   CONSOLE_CURSOR_INFO        CursorInfo;
   COORD                      coordCursorPosition;
-  
+
                                      /* the mode the console is currently in */
   DWORD                      dwConsoleMode;
-  
+
                               /* information about the current screen buffer */
   //  CONSOLE_SCREEN_BUFFER_INFO ConsoleScreenBufferInfo;
@@ -79,15 +84,18 @@
 #endif
 
-  
-DWORD EXPORT ConsoleInit(void);        /* creation of the console subsystem */  
-DWORD EXPORT ConsoleDevicesRegister(void);        /* create console devices */  
-void  EXPORT ConsoleWaitClose(void);      /* wait for user to close console */
-BOOL  EXPORT ConsoleIsActive(void);  /* returns TRUE if console window open */
-
-
-
-BOOL   WIN32API OS2AllocConsole                  (VOID);
-
-HANDLE WIN32API OS2CreateConsoleScreenBuffer     (DWORD         dwDesiredAccess,
+
+DWORD ConsoleInit(void);       /* creation of the console subsystem */
+
+DWORD ConsoleDevicesRegister(void);       /* create console devices */
+
+void  ConsoleWaitClose(void);      /* wait for user to close console */
+
+BOOL  ConsoleIsActive(void);  /* returns TRUE if console window open */
+
+#ifndef _OS2WIN_H
+
+BOOL   WIN32API AllocConsole                  (VOID);
+
+HANDLE WIN32API CreateConsoleScreenBuffer     (DWORD         dwDesiredAccess,
                                                   DWORD         dwShareMode,
                                                   LPVOID        lpSecurityAttributes,
@@ -95,5 +103,5 @@
                                                   LPVOID        lpScreenBufferData);
 
-BOOL   WIN32API OS2FillConsoleOutputAttribute    (HANDLE        hConsoleOutput,
+BOOL   WIN32API FillConsoleOutputAttribute    (HANDLE        hConsoleOutput,
                                                   WORD          wAttribute,
                                                   DWORD         nLength,
@@ -101,5 +109,5 @@
                                                   LPDWORD       lpNumberOfAttrsWritten);
 
-BOOL   WIN32API OS2FillConsoleOutputCharacterW   (HANDLE        hConsoleOutput,
+BOOL   WIN32API FillConsoleOutputCharacterW   (HANDLE        hConsoleOutput,
                                                   WCHAR         cCharacter,
                                                   DWORD         nLength,
@@ -107,5 +115,5 @@
                                                   LPDWORD       lpNumberOfCharsWritten);
 
-BOOL   WIN32API OS2FillConsoleOutputCharacterA   (HANDLE        hConsoleOutput,
+BOOL   WIN32API FillConsoleOutputCharacterA   (HANDLE        hConsoleOutput,
                                                   UCHAR         cCharacter,
                                                   DWORD         nLength,
@@ -114,48 +122,48 @@
 
 
-BOOL   WIN32API OS2FlushConsoleInputBuffer       (HANDLE        hConsoleInput);
-
-BOOL   WIN32API OS2FreeConsole                   (VOID);
-
-BOOL   WIN32API OS2GenerateConsoleCtrlEvent      (DWORD         dwCtrlEvent,
+BOOL   WIN32API FlushConsoleInputBuffer       (HANDLE        hConsoleInput);
+
+BOOL   WIN32API FreeConsole                   (VOID);
+
+BOOL   WIN32API GenerateConsoleCtrlEvent      (DWORD         dwCtrlEvent,
                                                   DWORD         dwProcessGroupId);
 
-UINT   WIN32API OS2GetConsoleCP                  (VOID);
-
-BOOL   WIN32API OS2GetConsoleCursorInfo          (HANDLE               hConsoleOutput,
+UINT   WIN32API GetConsoleCP                  (VOID);
+
+BOOL   WIN32API GetConsoleCursorInfo          (HANDLE               hConsoleOutput,
                                                   PCONSOLE_CURSOR_INFO lpConsoleCursorInfo);
 
-BOOL   WIN32API OS2GetConsoleMode                (HANDLE        hConsole,
+BOOL   WIN32API GetConsoleMode                (HANDLE        hConsole,
                                                   LPDWORD       lpMode);
 
-UINT   WIN32API OS2GetConsoleOutputCP            (VOID);
-
-BOOL   WIN32API OS2GetConsoleScreenBufferInfo    (HANDLE                      hConsoleOutput,
+UINT   WIN32API GetConsoleOutputCP            (VOID);
+
+BOOL   WIN32API GetConsoleScreenBufferInfo    (HANDLE                      hConsoleOutput,
                                                   PCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo);
 
-DWORD  WIN32API OS2GetConsoleTitleA              (LPTSTR        lpConsoleTitle,
+DWORD  WIN32API GetConsoleTitleA              (LPTSTR        lpConsoleTitle,
                                                   DWORD         nSize);
 
-DWORD  WIN32API OS2GetConsoleTitleW              (LPTSTR        lpConsoleTitle,
+DWORD  WIN32API GetConsoleTitleW              (LPTSTR        lpConsoleTitle,
                                                   DWORD         nSize);
 
-COORD  WIN32API OS2GetLargestConsoleWindowSize   (HANDLE        hConsoleOutput);
-
-BOOL   WIN32API OS2GetNumberOfConsoleInputEvents (HANDLE        hConsoleInput,
+COORD  WIN32API GetLargestConsoleWindowSize   (HANDLE        hConsoleOutput);
+
+BOOL   WIN32API GetNumberOfConsoleInputEvents (HANDLE        hConsoleInput,
                                                   LPDWORD       lpNumberOfEvents);
 
-BOOL   WIN32API OS2GetNumberOfConsoleMouseButtons(LPDWORD       lpcNumberOfMouseButtons);
-
-BOOL   WIN32API OS2PeekConsoleInputA             (HANDLE        hConsoleInput,
+BOOL   WIN32API GetNumberOfConsoleMouseButtons(LPDWORD       lpcNumberOfMouseButtons);
+
+BOOL   WIN32API PeekConsoleInputA             (HANDLE        hConsoleInput,
                                                   PINPUT_RECORD pirBuffer,
                                                   DWORD         cInRecords,
                                                   LPDWORD       lpcRead);
 
-BOOL   WIN32API OS2PeekConsoleInputW             (HANDLE        hConsoleInput,
+BOOL   WIN32API PeekConsoleInputW             (HANDLE        hConsoleInput,
                                                   PINPUT_RECORD pirBuffer,
                                                   DWORD         cInRecords,
                                                   LPDWORD       lpcRead);
 
-BOOL   WIN32API OS2ReadConsoleA                  (HANDLE        hConsoleInput,
+BOOL   WIN32API ReadConsoleA                  (HANDLE        hConsoleInput,
                                                   LPVOID        lpvBuffer,
                                                   DWORD         cchToRead,
@@ -163,15 +171,15 @@
                                                   LPVOID        lpvReserved);
 
-BOOL   WIN32API OS2ReadConsoleInputA             (HANDLE        hConsoleInput,
+BOOL   WIN32API ReadConsoleInputA             (HANDLE        hConsoleInput,
                                                   PINPUT_RECORD pirBuffer,
                                                   DWORD         cInRecords,
                                                   LPDWORD       lpcRead);
 
-BOOL   WIN32API OS2ReadConsoleInputW             (HANDLE        hConsoleInput,
+BOOL   WIN32API ReadConsoleInputW             (HANDLE        hConsoleInput,
                                                   PINPUT_RECORD pirBuffer,
                                                   DWORD         cInRecords,
                                                   LPDWORD       lpcRead);
 
-BOOL   WIN32API OS2ReadConsoleOutputA            (HANDLE        hConsoleOutput,
+BOOL   WIN32API ReadConsoleOutputA            (HANDLE        hConsoleOutput,
                                                   PCHAR_INFO    pchiDestBuffer,
                                                   COORD         coordDestBufferSize,
@@ -179,5 +187,5 @@
                                                   PSMALL_RECT   psrctSourceRect);
 
-BOOL   WIN32API OS2ReadConsoleOutputW            (HANDLE        hConsoleOutput,
+BOOL   WIN32API ReadConsoleOutputW            (HANDLE        hConsoleOutput,
                                                   PCHAR_INFO    pchiDestBuffer,
                                                   COORD         coordDestBufferSize,
@@ -185,5 +193,5 @@
                                                   PSMALL_RECT   psrctSourceRect);
 
-BOOL   WIN32API OS2ReadConsoleOutputAttribute    (HANDLE        hConsoleOutput,
+BOOL   WIN32API ReadConsoleOutputAttribute    (HANDLE        hConsoleOutput,
                                                   LPWORD        lpwAttribute,
                                                   DWORD         cReadCells,
@@ -191,5 +199,5 @@
                                                   LPDWORD       lpcNumberRead);
 
-BOOL   WIN32API OS2ReadConsoleOutputCharacter    (HANDLE        hConsoleOutput,
+BOOL   WIN32API ReadConsoleOutputCharacter    (HANDLE        hConsoleOutput,
                                                   LPTSTR        lpReadBuffer,
                                                   DWORD         cchRead,
@@ -197,5 +205,5 @@
                                                   LPDWORD       lpcNumberRead);
 
-BOOL   WIN32API OS2ScrollConsoleScreenBufferA    (HANDLE        hConsoleOutput,
+BOOL   WIN32API ScrollConsoleScreenBufferA    (HANDLE        hConsoleOutput,
                                                   PSMALL_RECT   psrctSourceRect,
                                                   PSMALL_RECT   psrctClipRect,
@@ -203,5 +211,5 @@
                                                   PCHAR_INFO    pchiFill);
 
-BOOL   WIN32API OS2ScrollConsoleScreenBufferW    (HANDLE        hConsoleOutput,
+BOOL   WIN32API ScrollConsoleScreenBufferW    (HANDLE        hConsoleOutput,
                                                   PSMALL_RECT   psrctSourceRect,
                                                   PSMALL_RECT   psrctClipRect,
@@ -209,37 +217,37 @@
                                                   PCHAR_INFO    pchiFill);
 
-BOOL   WIN32API OS2SetConsoleActiveScreenBuffer  (HANDLE        hConsoleOutput);
-
-BOOL   WIN32API OS2SetConsoleCP                  (UINT          IDCodePage);
-
-BOOL   WIN32API OS2SetConsoleCtrlHandler         (PHANDLER_ROUTINE pHandlerRoutine,
+BOOL   WIN32API SetConsoleActiveScreenBuffer  (HANDLE        hConsoleOutput);
+
+BOOL   WIN32API SetConsoleCP                  (UINT          IDCodePage);
+
+BOOL   WIN32API SetConsoleCtrlHandler         (PHANDLER_ROUTINE pHandlerRoutine,
                                                   BOOL             fAdd);
 
-BOOL   WIN32API OS2SetConsoleCursorInfo          (HANDLE               hConsoleOutput,
+BOOL   WIN32API SetConsoleCursorInfo          (HANDLE               hConsoleOutput,
                                                   PCONSOLE_CURSOR_INFO lpConsoleCursorInfo);
 
-BOOL   WIN32API OS2SetConsoleCursorPosition      (HANDLE        hConsoleOutput,
+BOOL   WIN32API SetConsoleCursorPosition      (HANDLE        hConsoleOutput,
                                                   COORD         coordCursor);
 
-BOOL   WIN32API OS2SetConsoleMode                (HANDLE        hConsole,
+BOOL   WIN32API SetConsoleMode                (HANDLE        hConsole,
                                                   DWORD         fdwMode);
 
-BOOL   WIN32API OS2SetConsoleOutputCP            (UINT          IDCodePage);
-
-BOOL   WIN32API OS2SetConsoleScreenBufferSize    (HANDLE        hConsoleOutput,
+BOOL   WIN32API SetConsoleOutputCP            (UINT          IDCodePage);
+
+BOOL   WIN32API SetConsoleScreenBufferSize    (HANDLE        hConsoleOutput,
                                                   COORD         coordSize);
 
-BOOL   WIN32API OS2SetConsoleTextAttribute       (HANDLE        hConsoleOutput,
+BOOL   WIN32API SetConsoleTextAttribute       (HANDLE        hConsoleOutput,
                                                   WORD          wAttr);
 
-BOOL   WIN32API OS2SetConsoleTitleA              (LPTSTR        lpszTitle);
-
-BOOL   WIN32API OS2SetConsoleTitleW              (LPTSTR        lpszTitle);
-
-BOOL   WIN32API OS2SetConsoleWindowInfo          (HANDLE        hConsoleOutput,
+BOOL   WIN32API SetConsoleTitleA              (LPTSTR        lpszTitle);
+
+BOOL   WIN32API SetConsoleTitleW              (LPTSTR        lpszTitle);
+
+BOOL   WIN32API SetConsoleWindowInfo          (HANDLE        hConsoleOutput,
                                                   BOOL          fAbsolute,
                                                   PSMALL_RECT   psrctWindowRect);
 
-BOOL   WIN32API OS2WriteConsoleA                 (HANDLE        hConsoleOutput,
+BOOL   WIN32API WriteConsoleA                 (HANDLE        hConsoleOutput,
                                                   CONST VOID*   lpvBuffer,
                                                   DWORD         cchToWrite,
@@ -247,15 +255,15 @@
                                                   LPVOID        lpvReserved);
 
-BOOL   WIN32API OS2WriteConsoleInputA            (HANDLE        hConsoleInput,
+BOOL   WIN32API WriteConsoleInputA            (HANDLE        hConsoleInput,
                                                   PINPUT_RECORD pirBuffer,
                                                   DWORD         cInRecords,
                                                   LPDWORD       lpcWritten);
 
-BOOL   WIN32API OS2WriteConsoleInputW            (HANDLE        hConsoleInput,
+BOOL   WIN32API WriteConsoleInputW            (HANDLE        hConsoleInput,
                                                   PINPUT_RECORD pirBuffer,
                                                   DWORD         cInRecords,
                                                   LPDWORD       lpcWritten);
 
-BOOL   WIN32API OS2WriteConsoleOutputA           (HANDLE        hConsoleOutput,
+BOOL   WIN32API WriteConsoleOutputA           (HANDLE        hConsoleOutput,
                                                   PCHAR_INFO    pchiSrcBuffer,
                                                   COORD         coordSrcBufferSize,
@@ -263,5 +271,5 @@
                                                   PSMALL_RECT   psrctDestRect);
 
-BOOL   WIN32API OS2WriteConsoleOutputW           (HANDLE        hConsoleOutput,
+BOOL   WIN32API WriteConsoleOutputW           (HANDLE        hConsoleOutput,
                                                   PCHAR_INFO    pchiSrcBuffer,
                                                   COORD         coordSrcBufferSize,
@@ -269,5 +277,5 @@
                                                   PSMALL_RECT   psrctDestRect);
 
-BOOL   WIN32API OS2WriteConsoleOutputAttribute   (HANDLE        hConsoleOutput,
+BOOL   WIN32API WriteConsoleOutputAttribute   (HANDLE        hConsoleOutput,
                                                   LPWORD        lpwAttribute,
                                                   DWORD         cWriteCells,
@@ -275,5 +283,5 @@
                                                   LPDWORD       lpcNumberWritten);
 
-BOOL   WIN32API OS2WriteConsoleOutputCharacterA  (HANDLE        hConsoleOutput,
+BOOL   WIN32API WriteConsoleOutputCharacterA  (HANDLE        hConsoleOutput,
                                                   LPTSTR        lpWriteBuffer,
                                                   DWORD         cchWrite,
@@ -281,5 +289,5 @@
                                                   LPDWORD       lpcWritten);
 
-BOOL   WIN32API OS2WriteConsoleOutputCharacterW  (HANDLE        hConsoleOutput,
+BOOL   WIN32API WriteConsoleOutputCharacterW  (HANDLE        hConsoleOutput,
                                                   LPTSTR        lpWriteBuffer,
                                                   DWORD         cchWrite,
@@ -287,7 +295,8 @@
                                                   LPDWORD       lpcWritten);
 
-  
-  
-  
+
+#endif // _OS2WIN_H
+
+
 #ifdef __cplusplus
 }
@@ -315,9 +324,9 @@
     /* input queue */
     DWORD dwNumberOfInputEvents;   /* number of unread events in input queue */
-  
+
   public:
     HMDeviceConsoleInClass(LPCSTR lpDeviceName)
       : HMDeviceHandler(lpDeviceName) {}
-  
+
                        /* this is a handler method for calls to CreateFile() */
   virtual DWORD  CreateFile (LPCSTR        lpFileName,
@@ -325,5 +334,5 @@
                              PVOID         lpSecurityAttributes,
                              PHMHANDLEDATA pHMHandleDataTemplate);
-  
+
                            /* this is a handler method for calls to ReadFile() */
   virtual DWORD  ReadFile   (PHMHANDLEDATA pHMHandleData,
@@ -350,10 +359,10 @@
    * non-standard console I/O methods *
    ************************************/
-  
+
   virtual BOOL  FlushConsoleInputBuffer(PHMHANDLEDATA pHMHandleData);
-  
+
   virtual DWORD GetConsoleMode(PHMHANDLEDATA pHMHandleData,
                                LPDWORD       lpMode);
-  
+
   virtual BOOL  GetNumberOfConsoleInputEvents(PHMHANDLEDATA pHMHandleData,
                                               LPDWORD       lpNumberOfEvents);
@@ -363,16 +372,16 @@
                                   DWORD         cInRecords,
                                   LPDWORD       lpcRead);
-  
+
   virtual DWORD PeekConsoleInputW(PHMHANDLEDATA pHMHandleData,
                                   PINPUT_RECORD pirBuffer,
                                   DWORD         cInRecords,
                                   LPDWORD       lpcRead);
-  
+
   virtual DWORD ReadConsoleA(PHMHANDLEDATA pHMHandleData,
                              CONST VOID*   lpvBuffer,
                              DWORD         cchToRead,
                              LPDWORD       lpcchRead,
-                             LPVOID        lpvReserved);  
-  
+                             LPVOID        lpvReserved);
+
   virtual DWORD ReadConsoleW(PHMHANDLEDATA pHMHandleData,
                              CONST VOID*   lpvBuffer,
@@ -380,28 +389,28 @@
                              LPDWORD       lpcchRead,
                              LPVOID        lpvReserved);
-  
+
   virtual DWORD ReadConsoleInputA(PHMHANDLEDATA pHMHandleData,
                                   PINPUT_RECORD pirBuffer,
                                   DWORD         cInRecords,
                                   LPDWORD       lpcRead);
-  
+
   virtual DWORD ReadConsoleInputW(PHMHANDLEDATA pHMHandleData,
                                   PINPUT_RECORD pirBuffer,
                                   DWORD         cInRecords,
                                   LPDWORD       lpcRead);
-  
+
   virtual DWORD SetConsoleMode(PHMHANDLEDATA pHMHandleData,
                                DWORD         dwMode);
-  
+
   virtual DWORD WriteConsoleInputA (PHMHANDLEDATA pHMHandleData,
                                     PINPUT_RECORD pirBuffer,
                                     DWORD         cInRecords,
-                                    LPDWORD       lpcWritten);  
-  
+                                    LPDWORD       lpcWritten);
+
   virtual DWORD WriteConsoleInputW (PHMHANDLEDATA pHMHandleData,
                                     PINPUT_RECORD pirBuffer,
                                     DWORD         cInRecords,
                                     LPDWORD       lpcWritten);
-  
+
 };
 
@@ -415,9 +424,9 @@
   protected:
     HANDLE hConsoleBuffer;            /* handle to the active console buffer */
-  
+
   public:
     HMDeviceConsoleOutClass(LPCSTR lpDeviceName)
       : HMDeviceHandler(lpDeviceName) {}
-  
+
                        /* this is a handler method for calls to CreateFile() */
   virtual DWORD  CreateFile (LPCSTR        lpFileName,
@@ -425,5 +434,5 @@
                              PVOID         lpSecurityAttributes,
                              PHMHANDLEDATA pHMHandleDataTemplate);
-  
+
                            /* this is a handler method for calls to ReadFile() */
   virtual DWORD  ReadFile   (PHMHANDLEDATA pHMHandleData,
@@ -439,6 +448,6 @@
                              LPDWORD       lpNumberOfBytesWritten,
                              LPOVERLAPPED  lpOverlapped);
-  
-  
+
+
                                                 /* handling non-standard I/O */
   virtual DWORD _DeviceRequest (PHMHANDLEDATA pHMHandleData,
@@ -461,5 +470,5 @@
     HMDeviceConsoleBufferClass(LPCSTR lpDeviceName)
       : HMDeviceHandler(lpDeviceName) {}
-  
+
                        /* this is a handler method for calls to CreateFile() */
   virtual DWORD  CreateFile (LPCSTR        lpFileName,
@@ -467,5 +476,5 @@
                              PVOID         lpSecurityAttributes,
                              PHMHANDLEDATA pHMHandleDataTemplate);
-  
+
                            /* this is a handler method for calls to ReadFile() */
   virtual DWORD  ReadFile   (PHMHANDLEDATA pHMHandleData,
@@ -481,7 +490,7 @@
                              LPDWORD       lpNumberOfBytesWritten,
                              LPOVERLAPPED  lpOverlapped);
-  
+
   virtual DWORD  CloseHandle(PHMHANDLEDATA pHMHandleData);
-  
+
   virtual DWORD  _DeviceRequest (PHMHANDLEDATA pHMHandleData,
                                  ULONG         ulRequestCode,
@@ -490,10 +499,10 @@
                                  ULONG         arg3,
                                  ULONG         arg4);
-  
-  
+
+
   /************************************
    * non-standard console I/O methods *
    ************************************/
-  
+
   virtual DWORD  FillConsoleOutputAttribute(PHMHANDLEDATA pHMHandleData,
                                             WORD          wAttribute,
@@ -501,5 +510,5 @@
                                             COORD         dwWriteCoord,
                                             LPDWORD       lpNumberOfAttrsWritten);
-  
+
   virtual DWORD  FillConsoleOutputCharacterA(PHMHANDLEDATA pHMHandleData,
                                              UCHAR         ucCharacter,
@@ -507,28 +516,28 @@
                                              COORD         dwWriteCoord,
                                              LPDWORD       lpNumberOfCharsWritten);
-  
+
   virtual DWORD  FillConsoleOutputCharacterW(PHMHANDLEDATA pHMHandleData,
                                              WCHAR         wcCharacter,
                                              DWORD         nLength,
                                              COORD         dwWriteCoord,
-                                             LPDWORD       lpNumberOfCharsWritten);  
-  
+                                             LPDWORD       lpNumberOfCharsWritten);
+
   virtual DWORD  GetConsoleCursorInfo(PHMHANDLEDATA        pHMHandleData,
                                       PCONSOLE_CURSOR_INFO pCCI);
-  
+
   virtual DWORD  GetConsoleMode(PHMHANDLEDATA pHMHandleData,
                                 LPDWORD       lpMode);
-  
+
   virtual DWORD  GetLargestConsoleWindowSize(PHMHANDLEDATA pHMHandleData);
-  
+
   virtual DWORD  GetConsoleScreenBufferInfo(PHMHANDLEDATA               pHMHandleData,
                                             PCONSOLE_SCREEN_BUFFER_INFO pCSBI);
-  
+
   virtual DWORD  ReadConsoleOutputA(PHMHANDLEDATA pHMHandleData,
                                     PCHAR_INFO    pchiDestBuffer,
                                     COORD         coordDestBufferSize,
                                     COORD         coordDestBufferCoord,
-                                    PSMALL_RECT   psrctSourceRect);  
-  
+                                    PSMALL_RECT   psrctSourceRect);
+
   virtual DWORD  ReadConsoleOutputW(PHMHANDLEDATA pHMHandleData,
                                     PCHAR_INFO    pchiDestBuffer,
@@ -554,5 +563,5 @@
                                              COORD         coordReadCoord,
                                              LPDWORD       lpcNumberRead);
-  
+
   virtual DWORD  ScrollConsoleScreenBufferA(PHMHANDLEDATA pHMHandleData,
                                             PSMALL_RECT   psrctSourceRect,
@@ -560,5 +569,5 @@
                                             COORD         coordDestOrigin,
                                             PCHAR_INFO    pchiFill);
-  
+
   virtual DWORD  ScrollConsoleScreenBufferW(PHMHANDLEDATA pHMHandleData,
                                             PSMALL_RECT   psrctSourceRect,
@@ -569,29 +578,29 @@
   virtual DWORD  SetConsoleScreenBufferSize (PHMHANDLEDATA pHMHandleData,
                                              COORD         coordSize);
-  
+
   virtual DWORD  SetConsoleCursorInfo(PHMHANDLEDATA        pHMHandleData,
                                       PCONSOLE_CURSOR_INFO pCCI);
-  
+
   virtual DWORD  SetConsoleCursorPosition(PHMHANDLEDATA pHMHandleData,
                                           COORD         coordCursorPosition);
-  
+
   virtual DWORD  SetConsoleMode(PHMHANDLEDATA pHMHandleData,
                                 DWORD         dwMode);
-  
+
   virtual DWORD  SetConsoleTextAttribute    (PHMHANDLEDATA pHMHandleData,
                                              WORD          wAttr);
-  
+
   virtual DWORD  SetConsoleActiveScreenBuffer(PHMHANDLEDATA pHMHandleData);
-  
+
   virtual BOOL   SetConsoleWindowInfo(PHMHANDLEDATA pHMHandleData,
                                       BOOL          fAbsolute,
                                       PSMALL_RECT   psrctWindowRect);
-  
+
   virtual DWORD  WriteConsoleA(PHMHANDLEDATA pHMHandleData,
                                CONST VOID*   lpvBuffer,
                                DWORD         cchToWrite,
                                LPDWORD       lpcchWritten,
-                               LPVOID        lpvReserved);  
-  
+                               LPVOID        lpvReserved);
+
   virtual DWORD  WriteConsoleW(PHMHANDLEDATA pHMHandleData,
                                CONST VOID*   lpvBuffer,
@@ -599,11 +608,11 @@
                                LPDWORD       lpcchWritten,
                                LPVOID        lpvReserved);
-  
+
   virtual DWORD  WriteConsoleOutputA(PHMHANDLEDATA pHMHandleData,
                                      PCHAR_INFO    pchiSrcBuffer,
                                      COORD         coordSrcBufferSize,
                                      COORD         coordSrcBufferCoord,
-                                     PSMALL_RECT   psrctDestRect);  
-  
+                                     PSMALL_RECT   psrctDestRect);
+
   virtual DWORD  WriteConsoleOutputW(PHMHANDLEDATA pHMHandleData,
                                      PCHAR_INFO    pchiSrcBuffer,
@@ -611,5 +620,5 @@
                                      COORD         coordSrcBufferCoord,
                                      PSMALL_RECT   psrctDestRect);
-  
+
   virtual DWORD  WriteConsoleOutputAttribute(PHMHANDLEDATA pHMHandleData,
                                              LPWORD        lpwAttribute,
@@ -617,5 +626,5 @@
                                              COORD         dwWriteCoord,
                                              LPDWORD       lpcWritten);
-  
+
   virtual DWORD  WriteConsoleOutputCharacterA(PHMHANDLEDATA pHMHandleData,
                                               LPTSTR        lpWriteBuffer,
@@ -623,10 +632,10 @@
                                               COORD         dwWriteCoord,
                                               LPDWORD       lpcWritten);
-  
+
   virtual DWORD  WriteConsoleOutputCharacterW(PHMHANDLEDATA pHMHandleData,
                                               LPWSTR        lpWriteBuffer,
                                               DWORD         cchWrite,
                                               COORD         dwWriteCoord,
-                                              LPDWORD       lpcWritten);  
+                                              LPDWORD       lpcWritten);
 };
 
Index: trunk/src/kernel32/devio.h
===================================================================
--- trunk/src/kernel32/devio.h	(revision 45)
+++ trunk/src/kernel32/devio.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: devio.h,v 1.1 1999-05-24 20:19:46 ktk Exp $ */
-
 #ifndef __DEVIO_H__
 #define __DEVIO_H__
Index: trunk/src/kernel32/directory.cpp
===================================================================
--- trunk/src/kernel32/directory.cpp	(revision 45)
+++ trunk/src/kernel32/directory.cpp	(revision 46)
@@ -1,9 +1,2 @@
-/* $Id: directory.cpp,v 1.2 1999-05-31 22:08:11 phaller Exp $ */
-
-/*
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- */
 /*
  * Win32 Directory functions for OS/2
@@ -11,10 +4,11 @@
  * Copyright 1998 Sander van Leeuwen
  *
+ *
+ * Project Odin Software License can be found in LICENSE.TXT
+ *
  */
 #include <os2win.h>
 #include <stdlib.h>
 #include "unicode.h"
-#include "misc.h"
-
 
 //******************************************************************************
Index: trunk/src/kernel32/disk.cpp
===================================================================
--- trunk/src/kernel32/disk.cpp	(revision 45)
+++ trunk/src/kernel32/disk.cpp	(revision 46)
@@ -1,9 +1,2 @@
-/* $Id: disk.cpp,v 1.2 1999-05-31 22:08:11 phaller Exp $ */
-
-/*
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- */
 /*
  * Win32 Disk API functions for OS/2
@@ -11,10 +4,11 @@
  * Copyright 1998 Sander van Leeuwen
  *
+ *
+ * Project Odin Software License can be found in LICENSE.TXT
+ *
  */
 #include <os2win.h>
 #include <stdlib.h>
 #include "unicode.h"
-#include "misc.h"
-
 
 //******************************************************************************
Index: trunk/src/kernel32/except.asm
===================================================================
--- trunk/src/kernel32/except.asm	(revision 45)
+++ trunk/src/kernel32/except.asm	(revision 46)
@@ -1,4 +1,2 @@
-; $Id: except.asm,v 1.1 1999-05-24 20:19:46 ktk Exp $ 
-
 ;/*
 ; *
@@ -157,12 +155,25 @@
         PUBLIC getEAX
         PUBLIC getEBX
-getEAX proc near
+getEAX 	proc near
         ret
-getEAX endp
+getEAX 	endp
 
-getEBX proc near
+getEBX 	proc near
         mov  eax, ebx
         ret
-getEBX endp
+getEBX 	endp
+
+        PUBLIC GetFS
+GetFS  	proc near
+	mov	eax, fs
+	ret
+GetFS  	endp
+
+        PUBLIC SetFS
+SetFS	proc near
+	mov  	eax, [esp+4]
+	mov	fs, eax
+	ret
+SetFS	endp
 
 CODE32          ENDS
Index: trunk/src/kernel32/except.h
===================================================================
--- trunk/src/kernel32/except.h	(revision 45)
+++ trunk/src/kernel32/except.h	(revision 46)
@@ -1,13 +1,9 @@
-/* $Id: except.h,v 1.1 1999-05-24 20:19:46 ktk Exp $ */
-
-/*
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- */
 /*
  * Exception + misc functions for OS/2
  *
  * Copyright 1998 Sander van Leeuwen
+ *
+ *
+ * Project Odin Software License can be found in LICENSE.TXT
  *
  */
Index: trunk/src/kernel32/exceptions.cpp
===================================================================
--- trunk/src/kernel32/exceptions.cpp	(revision 45)
+++ trunk/src/kernel32/exceptions.cpp	(revision 46)
@@ -1,9 +1,2 @@
-/* $Id: exceptions.cpp,v 1.1 1999-05-24 20:19:41 ktk Exp $ */
-
-/*
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- */
 /*
  * Win32 Device IOCTL API functions for OS/2
@@ -12,4 +5,8 @@
  *
  * Copyright 1998 Sander van Leeuwen (OS/2 port)
+ *
+ *
+ * Project Odin Software License can be found in LICENSE.TXT
+ *
  *
  * (win32\except.c)
@@ -72,6 +69,8 @@
 {
  UINT oldmode = CurrentErrorMode;
+
   dprintf(("OS2SetErrorMode to %d\n", fuErrorMode));
   CurrentErrorMode = fuErrorMode;
+
   return(oldmode);
 }
@@ -683,4 +682,10 @@
 
     return (ERR)(XCPT_CONTINUE_EXECUTION);
+
+  case XCPT_PROCESS_TERMINATE:
+  case XCPT_ASYNC_PROCESS_TERMINATE:
+    SetExceptionChain((ULONG)0);
+    return (XCPT_CONTINUE_SEARCH);
+
   case XCPT_ACCESS_VIOLATION:
   case XCPT_BREAKPOINT:
@@ -696,5 +701,4 @@
   case XCPT_UNABLE_TO_GROW_STACK:
   case XCPT_IN_PAGE_ERROR:
-  case XCPT_ASYNC_PROCESS_TERMINATE:
   case XCPT_SIGNAL:
     dprintf(("Continue and kill\n"));
@@ -719,5 +723,5 @@
  PWINEXCEPTION_FRAME orgframe;
  APIRET          rc;
- LONGLONG            timerval;
+ ULONGULONG            timerval;
 
   DisableFPUExceptions();
Index: trunk/src/kernel32/heap.cpp
===================================================================
--- trunk/src/kernel32/heap.cpp	(revision 45)
+++ trunk/src/kernel32/heap.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: heap.cpp,v 1.5 1999-06-06 12:25:49 cbratschi Exp $ */
-
 /*
  *
@@ -15,7 +13,5 @@
 #include <stdlib.h>
 #include <string.h>
-#include <builtin.h>
-#include "misc.h"
-
+#include <misc.h>
 #define  _WIN32
 #include "os2heap.h"
@@ -71,9 +67,9 @@
   curheap = new OS2Heap(hHeap, flOptions, dwInitialSize, dwMaximumSize);
   if(curheap == NULL) {
-        O32_HeapDestroy(hHeap);
+    	O32_HeapDestroy(hHeap);
         return(NULL);
   }
   if(curheap->getHeapHandle() == NULL) {
-        O32_HeapDestroy(hHeap);
+    	O32_HeapDestroy(hHeap);
         delete curheap;
         return(NULL);
@@ -96,8 +92,4 @@
 //******************************************************************************
 //******************************************************************************
-/* PH: Though "HeapSize" is a reserved word for the linker, ILINK can be
-   tricked by placing the word HEAPSIZE in quotes. It then exports it properly
-   to the target DLL.
- */
 DWORD WIN32API HeapSize(HANDLE hHeap, DWORD arg2, PVOID  arg3)
 {
@@ -154,12 +146,12 @@
     //SvL: Only one process heap per process
     if(processheap == NULL) {
-        //TODO: I haven't thought real hard about this.  I added it just to make "hdr.exe" happy.
-        hHeap = O32_HeapCreate(HEAP_GENERATE_EXCEPTIONS, 1, 0x4000);
-        OS2ProcessHeap = new OS2Heap(hHeap, HEAP_GENERATE_EXCEPTIONS, 0x4000, 0);
-        if(OS2ProcessHeap == NULL) {
-                O32_HeapDestroy(hHeap);
-                return(NULL);
-        }
-        processheap = hHeap;
+     	//TODO: I haven't thought real hard about this.  I added it just to make "hdr.exe" happy.
+     	hHeap = O32_HeapCreate(HEAP_GENERATE_EXCEPTIONS, 1, 0x4000);
+     	OS2ProcessHeap = new OS2Heap(hHeap, HEAP_GENERATE_EXCEPTIONS, 0x4000, 0);
+     	if(OS2ProcessHeap == NULL) {
+        	O32_HeapDestroy(hHeap);
+            	return(NULL);
+     	}
+     	processheap = hHeap;
     }
     return(processheap);
@@ -173,6 +165,6 @@
 
   if(processheap == NULL) {
-        if(GetProcessHeap() == NULL)
-                return(NULL);
+    	if(GetProcessHeap() == NULL)
+        	return(NULL);
   }
   if(fuFlags & LMEM_ZEROINIT)
@@ -209,9 +201,9 @@
 
     if(OS2ProcessHeap->GetLockCnt((LPVOID)hMem) != 0) {
-        dprintf(("LocalFree, lock count != 0\n"));
-        return(hMem);   //TODO: SetLastError
+    	dprintf(("LocalFree, lock count != 0\n"));
+    	return(hMem);   //TODO: SetLastError
     }
     if(OS2ProcessHeap->Free(0, (LPVOID)hMem) == FALSE) {
-        return(hMem);   //TODO: SetLastError
+    	return(hMem);   //TODO: SetLastError
     }
     return NULL; //success
@@ -238,19 +230,14 @@
 HLOCAL WIN32API LocalReAlloc(HLOCAL hMem, DWORD cbBytes, UINT fuFlags)
 {
- HLOCAL lpMem;
+ LPVOID lpMem;
 
     dprintf(("KERNEL32: LocalReAlloc %X %d %X\n", hMem, cbBytes, fuFlags));
     //SvL: 8-8-'98: Notepad bugfix (assumes address is identical when new size < old size)
-    if(OS2ProcessHeap->Size(0, (LPVOID)hMem) >= cbBytes)
-    {
-        dprintf(("KERNEL32:  LocalReAlloc returned %X\n", hMem));
-        return hMem;
-    }
-
-    lpMem = LocalAlloc(fuFlags, cbBytes);
-    memcpy((LPVOID)lpMem, (LPVOID)hMem, min(cbBytes, OS2ProcessHeap->Size(0, (LPVOID)hMem)));
+    if(OS2ProcessHeap->Size(0, (LPVOID)hMem) > cbBytes)
+    	return hMem;
+
+    lpMem = (LPVOID)O32_LocalAlloc(fuFlags, cbBytes);
+    memcpy(lpMem, (LPVOID)hMem, min(cbBytes, OS2ProcessHeap->Size(0, (LPVOID)hMem)));
     OS2ProcessHeap->Free(0, (LPVOID)hMem);
-
-    dprintf(("KERNEL32:  LocalReAlloc returned %X\n", lpMem));
     return((HLOCAL)lpMem);
 }
Index: trunk/src/kernel32/heap.h
===================================================================
--- trunk/src/kernel32/heap.h	(revision 45)
+++ trunk/src/kernel32/heap.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: heap.h,v 1.1 1999-05-24 20:19:41 ktk Exp $ */
-
 /*
  *
Index: trunk/src/kernel32/iccio.asm
===================================================================
--- trunk/src/kernel32/iccio.asm	(revision 45)
+++ trunk/src/kernel32/iccio.asm	(revision 46)
@@ -1,4 +1,2 @@
-; $Id: iccio.asm,v 1.1 1999-05-24 20:19:46 ktk Exp $ 
-
 ; **********************************************************************
 ; Copyright (C) 1995 by Holger Veit (Holger.Veit@gmd.de)
Index: trunk/src/kernel32/kernel32exp.def
===================================================================
--- trunk/src/kernel32/kernel32exp.def	(revision 45)
+++ trunk/src/kernel32/kernel32exp.def	(revision 46)
@@ -824,2 +824,4 @@
 Win32QueryModuleName                     @1225
 
+GetFS					   @1226
+SetFS					   @1227
Index: trunk/src/kernel32/lang.cpp
===================================================================
--- trunk/src/kernel32/lang.cpp	(revision 45)
+++ trunk/src/kernel32/lang.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: lang.cpp,v 1.2 1999-05-31 22:08:09 phaller Exp $ */
-
 /*
  *
@@ -16,5 +14,5 @@
 #include <winnls.h>
 #include "unicode.h"
-#include "misc.h"
+
 
 //******************************************************************************
Index: trunk/src/kernel32/makefile
===================================================================
--- trunk/src/kernel32/makefile	(revision 45)
+++ trunk/src/kernel32/makefile	(revision 46)
@@ -1,4 +1,2 @@
-# $Id: makefile,v 1.1 1999-05-24 20:19:46 ktk Exp $ 
-
 #
 # PD-Win32 API
@@ -69,5 +67,5 @@
 TARGET = kernel32
 
-all: $(TARGET).dll $(TARGET).LIB
+all: $(PDWIN32_LIB)\pmwinx.lib $(TARGET).dll $(TARGET).LIB 
 
 
@@ -82,4 +80,6 @@
         $(CP) $@ $(PDWIN32_LIB)
 
+$(PDWIN32_LIB)\pmwinx.lib:
+        $(IMPLIB) $(IMPLIBFLAGS) $@ $(PDWIN32_LIB)\pmwinx.def
 
 kernel32.OBJ: kernel32.cpp \
@@ -92,5 +92,5 @@
 
 comm.OBJ: \
-    .\comm.c \
+    .\comm.cpp \
     $(PDWIN32_INCLUDE)\unicode.h
 
@@ -127,8 +127,8 @@
     os2heap.h
 
-initterm.OBJ: .\initterm.c
+initterm.OBJ: .\initterm.cpp
 
 thunk.OBJ: \
-    .\thunk.c \
+    .\thunk.cpp \
     thunk.h
 
@@ -146,5 +146,5 @@
 
 devio.OBJ: \
-    .\devio.c \
+    .\devio.cpp \
     devio.h \
     map.h \
@@ -167,10 +167,10 @@
 
 map.OBJ: \
-    .\map.c \
+    .\map.cpp \
     map.h \
     mapos2.h
 
 os2native.OBJ: \
-    .\os2native.c \
+    .\os2native.cpp \
     $(PDWIN32_INCLUDE)\unicode.h 
 
@@ -180,13 +180,13 @@
 
 misc.OBJ: \
-    .\misc.c \
+    .\misc.cpp \
     $(PDWIN32_INCLUDE)\misc.h
 
 win32util.OBJ: \
-    .\win32util.c \
+    .\win32util.cpp \
     $(PDWIN32_INCLUDE)\win32util.h
 
 npipe.OBJ: \
-    .\npipe.c \
+    .\npipe.cpp \
     $(PDWIN32_INCLUDE)\misc.h
 
@@ -208,10 +208,10 @@
 
 lfile.OBJ: \
-    .\lfile.c \
+    .\lfile.cpp \
     wprocess.h \
     os2util.h 
 
 obsolete.OBJ: \
-    .\obsolete.c
+    .\obsolete.cpp
 
 nameid.OBJ: \
@@ -255,5 +255,5 @@
     $(PDWIN32_INCLUDE)\misc.h
 
-os2util.OBJ: .\os2util.c
+os2util.OBJ: .\os2util.cpp
 
 handlemanager.OBJ:  \
Index: trunk/src/kernel32/map.h
===================================================================
--- trunk/src/kernel32/map.h	(revision 45)
+++ trunk/src/kernel32/map.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: map.h,v 1.1 1999-05-24 20:19:47 ktk Exp $ */
-
 /* Copyright (C) 1995 by Holger Veit (Holger.Veit@gmd.de)
  * Use at your own risk! No Warranty! The author is not responsible for
Index: trunk/src/kernel32/mapos2.h
===================================================================
--- trunk/src/kernel32/mapos2.h	(revision 45)
+++ trunk/src/kernel32/mapos2.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: mapos2.h,v 1.1 1999-05-24 20:19:47 ktk Exp $ */
-
 /* Copyright (C) 1995 by Holger Veit (Holger.Veit@gmd.de) */
 /* Use at your own risk! No Warranty! The author is not responsible for
Index: trunk/src/kernel32/message.cpp
===================================================================
--- trunk/src/kernel32/message.cpp	(revision 45)
+++ trunk/src/kernel32/message.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: message.cpp,v 1.2 1999-05-31 22:08:11 phaller Exp $ */
-
 /*
  *
@@ -24,6 +22,4 @@
 #include <stdarg.h>
 #include "unicode.h"
-#include "misc.h"
-
 
 //******************************************************************************
Index: trunk/src/kernel32/mmap.cpp
===================================================================
--- trunk/src/kernel32/mmap.cpp	(revision 45)
+++ trunk/src/kernel32/mmap.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: mmap.cpp,v 1.2 1999-05-31 22:08:09 phaller Exp $ */
-
 /*
  *
@@ -9,6 +7,4 @@
 #include "unicode.h"
 #include "mmap.h"
-#include "misc.h"
-
 
 //******************************************************************************
Index: trunk/src/kernel32/mmap.h
===================================================================
--- trunk/src/kernel32/mmap.h	(revision 45)
+++ trunk/src/kernel32/mmap.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: mmap.h,v 1.1 1999-05-24 20:19:42 ktk Exp $ */
-
 #ifndef __MMAP_H__
 #define __MMAP_H__
Index: trunk/src/kernel32/nameid.cpp
===================================================================
--- trunk/src/kernel32/nameid.cpp	(revision 45)
+++ trunk/src/kernel32/nameid.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: nameid.cpp,v 1.2 1999-05-31 22:08:12 phaller Exp $ */
-
 /*
  *
@@ -20,12 +18,10 @@
 #include <stdlib.h>
 #include <string.h>
-
-#include <odin.h>
-#include "win32type.h"
-#include "misc.h"
+#include <win32type.h>
+#include <misc.h>
 #include "nameid.h"
 #include "win32util.h"
-#include "winimage.h"
-#include "winexe.h"
+#include <winimage.h>
+#include <winexe.h>
 #include "os2util.h"
 
Index: trunk/src/kernel32/network.cpp
===================================================================
--- trunk/src/kernel32/network.cpp	(revision 45)
+++ trunk/src/kernel32/network.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: network.cpp,v 1.1 1999-05-24 20:19:47 ktk Exp $ */
-
 /*
  *
Index: trunk/src/kernel32/os2heap.cpp
===================================================================
--- trunk/src/kernel32/os2heap.cpp	(revision 45)
+++ trunk/src/kernel32/os2heap.cpp	(revision 46)
@@ -1,13 +1,9 @@
-/* $Id: os2heap.cpp,v 1.1 1999-05-24 20:19:47 ktk Exp $ */
-
-/*
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- */
 /*
  * Heap class for OS/2
  *
  * Copyright 1998 Sander van Leeuwen
+ *
+ *
+ * Project Odin Software License can be found in LICENSE.TXT
  *
  */
Index: trunk/src/kernel32/os2heap.h
===================================================================
--- trunk/src/kernel32/os2heap.h	(revision 45)
+++ trunk/src/kernel32/os2heap.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: os2heap.h,v 1.1 1999-05-24 20:19:47 ktk Exp $ */
-
 /*
  *
Index: trunk/src/kernel32/os2util.h
===================================================================
--- trunk/src/kernel32/os2util.h	(revision 45)
+++ trunk/src/kernel32/os2util.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: os2util.h,v 1.1 1999-05-24 20:19:47 ktk Exp $ */
-
 /*
  *
Index: trunk/src/kernel32/pefile.cpp
===================================================================
--- trunk/src/kernel32/pefile.cpp	(revision 45)
+++ trunk/src/kernel32/pefile.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: pefile.cpp,v 1.1 1999-05-24 20:19:47 ktk Exp $ */
-
 /*
  * PE2LX PE utility functions
Index: trunk/src/kernel32/profile.cpp
===================================================================
--- trunk/src/kernel32/profile.cpp	(revision 45)
+++ trunk/src/kernel32/profile.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: profile.cpp,v 1.2 1999-05-31 22:08:12 phaller Exp $ */
-
 /*
  *
@@ -17,5 +15,4 @@
 #include <string.h>
 #include "unicode.h"
-#include "misc.h"
 
 //******************************************************************************
Index: trunk/src/kernel32/resource.cpp
===================================================================
--- trunk/src/kernel32/resource.cpp	(revision 45)
+++ trunk/src/kernel32/resource.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: resource.cpp,v 1.4 1999-06-06 12:25:49 cbratschi Exp $ */
-
 /*
  *
@@ -14,11 +12,8 @@
  */
 #include <os2win.h>
-#include "misc.h"
-
 #include "unicode.h"
 #include "winres.h"
 #include "winimage.h"
 #include "winexe.h"
-
 
 //******************************************************************************
@@ -31,12 +26,13 @@
 
     dprintf(("FindResourceA %X", hModule));
-    // EB: ->>> added real exe module handle
-    if(hModule == 0 || hModule == -1 || (WinExe != NULL && hModule == WinExe->getOS2InstanceHandle()))
-      module = (Win32Image *)WinExe;
-    else
-      module = (Win32Image *)Win32Dll::findModule(hModule);
+    if(hModule == 0 || hModule == -1 || (WinExe != NULL && hModule ==
+       WinExe->getOS2InstanceHandle()))
+    {
+         module = (Win32Image *)WinExe;
+    }
+    else module = (Win32Image *)Win32Dll::findModule(hModule);
 
     if(module == NULL)
-    return(NULL);
+    	return(NULL);
 
     return module->findResourceA(lpszName, (LPSTR)lpszType);
@@ -45,15 +41,18 @@
 //******************************************************************************
 HRSRC WIN32API FindResourceW(HINSTANCE hModule, LPCWSTR lpszName,
-                             LPCWSTR lpszType)
+                    	     LPCWSTR lpszType)
 {
  Win32Image *module;
 
     dprintf(("FindResourceW %X", hModule));
-    if(hModule == 0 || hModule == -1)
+    if(hModule == 0 || hModule == -1 || (WinExe != NULL && hModule ==
+       WinExe->getOS2InstanceHandle()))
+    {
          module = (Win32Image *)WinExe;
+    }
     else module = (Win32Image *)Win32Dll::findModule(hModule);
 
     if(module == NULL)
-        return(NULL);
+	return(NULL);
 
     return module->findResourceW((LPWSTR)lpszName, (LPWSTR)lpszType);
Index: trunk/src/kernel32/stubs.cpp
===================================================================
--- trunk/src/kernel32/stubs.cpp	(revision 45)
+++ trunk/src/kernel32/stubs.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: stubs.cpp,v 1.2 1999-05-31 22:08:13 phaller Exp $ */
-
 /*
  *
@@ -21,6 +19,4 @@
 #include "unicode.h"
 #include <builtin.h>
-#include "misc.h"
-
 #include "handlemanager.h"
 
Index: trunk/src/kernel32/stubs.h
===================================================================
--- trunk/src/kernel32/stubs.h	(revision 45)
+++ trunk/src/kernel32/stubs.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: stubs.h,v 1.1 1999-05-24 20:19:48 ktk Exp $ */
-
 /*
  *
Index: trunk/src/kernel32/thread.H
===================================================================
--- trunk/src/kernel32/thread.H	(revision 45)
+++ trunk/src/kernel32/thread.H	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: thread.H,v 1.1 1999-05-24 20:19:48 ktk Exp $ */
-
 /*
  *
Index: trunk/src/kernel32/thunk.h
===================================================================
--- trunk/src/kernel32/thunk.h	(revision 45)
+++ trunk/src/kernel32/thunk.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: thunk.h,v 1.1 1999-05-24 20:19:49 ktk Exp $ */
-
 #ifndef __THUNK_H__
 #define __THUNK_H__
Index: trunk/src/kernel32/time.cpp
===================================================================
--- trunk/src/kernel32/time.cpp	(revision 45)
+++ trunk/src/kernel32/time.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: time.cpp,v 1.2 1999-05-31 22:08:13 phaller Exp $ */
-
 /*
  *
@@ -14,6 +12,4 @@
 #include <os2win.h>
 #include <winnls.h>
-#include "misc.h"
-
 
 //******************************************************************************
Index: trunk/src/kernel32/unicode.cpp
===================================================================
--- trunk/src/kernel32/unicode.cpp	(revision 45)
+++ trunk/src/kernel32/unicode.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: unicode.cpp,v 1.1 1999-05-24 20:19:43 ktk Exp $ */
-
 /*
  *
Index: trunk/src/kernel32/vmutex.cpp
===================================================================
--- trunk/src/kernel32/vmutex.cpp	(revision 45)
+++ trunk/src/kernel32/vmutex.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: vmutex.cpp,v 1.1 1999-05-24 20:19:49 ktk Exp $ */
-
 /*
  *
Index: trunk/src/kernel32/windll.cpp
===================================================================
--- trunk/src/kernel32/windll.cpp	(revision 45)
+++ trunk/src/kernel32/windll.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: windll.cpp,v 1.1 1999-05-24 20:19:49 ktk Exp $ */
-
 /*
  *
Index: trunk/src/kernel32/winexe.cpp
===================================================================
--- trunk/src/kernel32/winexe.cpp	(revision 45)
+++ trunk/src/kernel32/winexe.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: winexe.cpp,v 1.1 1999-05-24 20:19:49 ktk Exp $ */
-
 /*
  *
Index: trunk/src/kernel32/winimage.cpp
===================================================================
--- trunk/src/kernel32/winimage.cpp	(revision 45)
+++ trunk/src/kernel32/winimage.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: winimage.cpp,v 1.1 1999-05-24 20:19:49 ktk Exp $ */
-
 /*
  * Win32 PE Image class
Index: trunk/src/kernel32/winimgres.cpp
===================================================================
--- trunk/src/kernel32/winimgres.cpp	(revision 45)
+++ trunk/src/kernel32/winimgres.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: winimgres.cpp,v 1.1 1999-05-24 20:19:49 ktk Exp $ */
-
 /*
  *
Index: trunk/src/kernel32/winmod.cpp
===================================================================
--- trunk/src/kernel32/winmod.cpp	(revision 45)
+++ trunk/src/kernel32/winmod.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: winmod.cpp,v 1.1 1999-05-24 20:19:50 ktk Exp $ */
-
 /*
  *
Index: trunk/src/kernel32/winres.h
===================================================================
--- trunk/src/kernel32/winres.h	(revision 45)
+++ trunk/src/kernel32/winres.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: winres.h,v 1.1 1999-05-24 20:19:43 ktk Exp $ */
-
 /*
  *
Index: trunk/src/kernel32/wprocess.cpp
===================================================================
--- trunk/src/kernel32/wprocess.cpp	(revision 45)
+++ trunk/src/kernel32/wprocess.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: wprocess.cpp,v 1.2 1999-05-31 22:08:14 phaller Exp $ */
-
 /*
  *
@@ -19,6 +17,4 @@
 #include "windll.h"
 #include "winexe.h"
-#include "misc.h"
-
 #ifdef __IBMCPP__
 #include <builtin.h>
@@ -53,10 +49,7 @@
     DebugInt3();
   }
-
-  char *modname = getenv("WIN32MODULE");
-
-  if(modname != NULL)
-  {
-    dprintf(("KERNEL32: RegisterExe: Set full path for exe to %s", modname));
+  char *modname;
+  if(modname = getenv("WIN32MODULE")) {
+    dprintf(("Set full path for exe to %s", modname));
     winexe->setFullPath(modname);
   }
Index: trunk/src/kernel32/wprocess.h
===================================================================
--- trunk/src/kernel32/wprocess.h	(revision 45)
+++ trunk/src/kernel32/wprocess.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: wprocess.h,v 1.1 1999-05-24 20:19:50 ktk Exp $ */
-
 #ifndef __WPROCESS_H__
 #define __WPROCESS_H__
Index: trunk/src/makefile
===================================================================
--- trunk/src/makefile	(revision 45)
+++ trunk/src/makefile	(revision 46)
@@ -1,3 +1,3 @@
-# $Id: makefile,v 1.2 1999-06-03 17:50:29 achimha Exp $ 
+# $Id: makefile,v 1.3 1999-06-07 20:57:55 sandervl Exp $ 
 
 #
@@ -30,4 +30,6 @@
         $(MAKE_CMD)
         cd ..\comdlg32
+        $(MAKE_CMD)
+        cd ..\comctl32
         $(MAKE_CMD)
         cd ..\capi2032
@@ -76,4 +78,6 @@
         cd ..\comdlg32
         $(MAKE_CMD) clean
+        cd ..\comctl32
+        $(MAKE_CMD) clean
         cd ..\ole32
         $(MAKE_CMD) clean
Index: trunk/src/makefile.vac
===================================================================
--- trunk/src/makefile.vac	(revision 45)
+++ trunk/src/makefile.vac	(revision 46)
@@ -1,3 +1,3 @@
-# $Id: makefile.vac,v 1.2 1999-05-31 14:21:50 phaller Exp $ 
+# $Id: makefile.vac,v 1.3 1999-06-07 20:57:55 sandervl Exp $ 
 
 #
@@ -30,4 +30,6 @@
         $(MAKE_CMD)
         cd ..\comdlg32
+        $(MAKE_CMD)
+        cd ..\comctl32
         $(MAKE_CMD)
         cd ..\capi2032
@@ -75,4 +77,6 @@
         cd ..\comdlg32
         $(MAKE_CMD) clean
+        cd ..\comctl32
+        $(MAKE_CMD) clean
         cd ..\ole32
         $(MAKE_CMD) clean
Index: trunk/src/mpr/MPR.CPP
===================================================================
--- trunk/src/mpr/MPR.CPP	(revision 45)
+++ trunk/src/mpr/MPR.CPP	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: MPR.CPP,v 1.1 1999-05-24 20:19:51 ktk Exp $ */
-
 /*
  *
Index: trunk/src/mpr/makefile
===================================================================
--- trunk/src/mpr/makefile	(revision 45)
+++ trunk/src/mpr/makefile	(revision 46)
@@ -1,4 +1,2 @@
-# $Id: makefile,v 1.1 1999-05-24 20:19:51 ktk Exp $ 
-
 #
 # PD-Win32 API 
@@ -39,5 +37,5 @@
 
 mpr.obj: mpr.cpp mpr.h	
-initterm.obj: initterm.c
+initterm.obj: initterm.cpp
 
 clean:
Index: trunk/src/mpr/mpr.h
===================================================================
--- trunk/src/mpr/mpr.h	(revision 45)
+++ trunk/src/mpr/mpr.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: mpr.h,v 1.1 1999-05-24 20:19:51 ktk Exp $ */
-
 /*
  *
Index: trunk/src/ole32/makefile
===================================================================
--- trunk/src/ole32/makefile	(revision 45)
+++ trunk/src/ole32/makefile	(revision 46)
@@ -1,4 +1,2 @@
-# $Id: makefile,v 1.1 1999-05-24 20:19:52 ktk Exp $ 
-
 #
 # PD-Win32 API 
@@ -40,5 +38,5 @@
 
 ole32.obj: ole32.cpp ole32.h
-initterm.obj: initterm.c
+initterm.obj: initterm.cpp
 
 
Index: trunk/src/ole32/ole32.cpp
===================================================================
--- trunk/src/ole32/ole32.cpp	(revision 45)
+++ trunk/src/ole32/ole32.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: ole32.cpp,v 1.1 1999-05-24 20:19:52 ktk Exp $ */
-
 /*
  *
@@ -14,7 +12,8 @@
  */
 
-#include <os2win.h>
-#include <ole2.h>
-
+// ><DJR 17.05.99 Force to use C-interfaces for now to prevent CALLBACK definition compiler error
+#define CINTERFACE
+
+// ><DJR 17.05.99 Move standard includes to before os2win.h [memcmp]
 #include <stdarg.h>
 #include <stdio.h>
@@ -23,6 +22,390 @@
 #include <memory.h>
 
-#include "misc.h"
-#include "unicode.h"
+// ><DJR 17.05.99 Prevent CALLCONV becoming _System
+#include <winbase.h>
+#include <uconv.h>
+#undef CALLCONV
+
+#include <os2win.h>
+#include <ole2ver.h>
+#include <ole.h>
+
+#include "wine/obj_base.h"
+#include "wine/obj_misc.h"
+#include "wine/obj_inplace.h"
+#include "wine/obj_dataobject.h"
+#include "wine/obj_oleobj.h"
+#include "wine/obj_marshal.h"
+#include "wine/obj_moniker.h"
+#include "wine/obj_clientserver.h"
+#include "wine/obj_dragdrop.h"
+
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CLSIDFromProgID(LPCOLESTR lpszProgID, LPCLSID pclsid)
+{
+   dprintf(("CLSIDFromProgID- stub\n"));
+   return OLE_ERROR_GENERIC;
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CLSIDFromString(LPCOLESTR lpsz, LPCLSID pclisid)
+{
+   dprintf(("CLSIDFromString- stub\n"));
+   return OLE_ERROR_GENERIC;
+}
+//*******************************************************************************
+//*******************************************************************************
+DWORD WIN32API CoBuildVersion()
+{
+   dprintf(("CoBuildVersion, obsolete\n"));
+   return 0;
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CoCreateFreeThreadedMarshaler(LPUNKNOWN punkOuter,
+                                                  LPUNKNOWN *ppunkMarshaler)
+{
+   dprintf(("CoCreateFreeThreadedMarshaler- stub\n"));
+   return E_OUTOFMEMORY;
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CoCreateGuid(GUID *pguid)
+{
+   dprintf(("CoCreateGuid - partial\n"));
+   memset(pguid, 0, sizeof(GUID));      //TODO: should be random GUID
+   return S_OK;
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter,
+                                     DWORD dwClsContext, REFIID riid,
+                                     LPVOID *ppv)
+{
+   dprintf(("CoCreateInstance - stub\n"));
+   return REGDB_E_CLASSNOTREG;
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CoDisconnectObject(IUnknown *pUnk, DWORD dwReserved)
+{
+   dprintf(("CoDisconnectObject - stub\n"));
+   return S_OK;
+}
+//*******************************************************************************
+//*******************************************************************************
+BOOL WIN32API CoDosDateTimeToFileTime(WORD nDosDate, WORD nDosTime,
+                                         FILETIME *lpFileTime)
+{
+   dprintf(("CoDosDateTimeToFileTime, redundant\n"));
+   return DosDateTimeToFileTime(nDosDate, nDosTime, lpFileTime);
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CoFileTimeNow(FILETIME *lpFileTime)
+{
+ SYSTEMTIME systime;
+
+   dprintf(("CoFileTimeNow\n"));
+   GetSystemTime(&systime);
+   return SystemTimeToFileTime(&systime, lpFileTime);
+}
+//*******************************************************************************
+//*******************************************************************************
+BOOL WIN32API CoFileTimeToDosDateTime(FILETIME *lpFileTime, LPWORD lpDosDate,
+                                         LPWORD lpDosTime)
+{
+   dprintf(("CoFileTimeToDosDateTime\n"));
+   return FileTimeToDosDateTime(lpFileTime, lpDosDate, lpDosTime);
+}
+//*******************************************************************************
+//Frees all libs loaded with CoLoadLibrary
+//*******************************************************************************
+void WIN32API CoFreeAllLibraries()
+{
+   dprintf(("CoFreeAllLibraries - stub\n"));
+   return ;
+}
+//*******************************************************************************
+//*******************************************************************************
+void WIN32API CoFreeLibrary(HINSTANCE hInst)
+{
+   dprintf(("CoFreeLibrary\n"));
+   FreeLibrary(hInst);
+}
+//*******************************************************************************
+//*******************************************************************************
+void WIN32API CoFreeUnusedLibraries()
+{
+   dprintf(("CoFreeUnusedLibraries - stub\n"));
+   return ;
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CoGetCallerTID()
+{
+   dprintf(("CoGetCallerTID, UNKNOWN API - stub\n"));
+   return 0;
+}
+//*******************************************************************************
+//*******************************************************************************
+//HRESULT WIN32API CoGetClassObject(REFCLSID rclsid, DWORD dwClsContext, COSERVERINFO *pServerInfo, REFIID riid, LPVOID *ppv)
+HRESULT WIN32API CoGetClassObject(REFCLSID rclsid, DWORD dwClsContext, LPVOID pServerInfo, REFIID riid, LPVOID *ppv)
+{
+   dprintf(("CoGetClassObject - stub\n"));
+   return REGDB_E_CLASSNOTREG;
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CoGetCurrentLogicalThreadId()
+{
+   dprintf(("CoGetCurrentLogicalThreadId, UNKNOWN API - stub\n"));
+   return 0;
+}
+//*******************************************************************************
+//*******************************************************************************
+DWORD WIN32API CoGetCurrentProcess()
+{
+   dprintf(("CoGetCurrentProcess - stub\n"));
+   return 666;
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CoGetInterfaceAndReleaseStream(LPSTREAM pStm, REFIID riid,
+                                                   LPVOID *ppv)
+{
+   dprintf(("CoGetInterfaceAndReleaseStream - stub\n"));
+   return E_INVALIDARG;
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CoGetMalloc(DWORD dwMemContext, LPMALLOC *ppMalloc)
+{
+   dprintf(("CoGetMalloc - stub\n"));
+   return E_OUTOFMEMORY;
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CoGetMarshalSizeMax(ULONG *pulSize, REFIID riid, IUnknown *pUnk,
+                                        DWORD dwDestContext, LPVOID pvDestContext,
+                                        DWORD mshlflags)
+{
+   dprintf(("CoGetMarshalSizeMax - stub\n"));
+   return CO_E_NOTINITIALIZED;
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CoGetPSClsid(REFIID riid, CLSID *pclsid)
+{
+   dprintf(("CoGetPSClsid - stub\n"));
+   return E_OUTOFMEMORY;
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CoGetStandardMarshal(REFIID riid, IUnknown *pUnk, DWORD dwDestContext,
+                                         LPVOID pvDestContext, DWORD mshlflags,
+                                         LPMARSHAL *ppMarshal)
+{
+   dprintf(("CoGetStandardMarshal - stub\n"));
+   return E_OUTOFMEMORY;
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CoGetState()
+{
+   dprintf(("CoGetState, UNKNOWN API - stub\n"));
+   return 0;
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CoGetTreatAsClass(REFCLSID clsidOld, LPCLSID pclsidNew)
+{
+   dprintf(("CoGetTreatAsClass - stub\n"));
+   return S_FALSE;
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CoInitialize(LPVOID lpReserved)
+{
+   dprintf(("CoInitialize, UNKNOWN API - stub\n"));
+   return 0;
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CoInitializeWOW()
+{
+   dprintf(("CoInitializeWOW, UNKNOWN API - stub\n"));
+   return 0;
+}
+//*******************************************************************************
+//*******************************************************************************
+BOOL WIN32API CoIsHandlerConnected(LPUNKNOWN pUnk)
+{
+   dprintf(("CoIsHandlerConnected - stub\n"));
+   return FALSE;
+}
+//*******************************************************************************
+//*******************************************************************************
+BOOL WIN32API CoIsOle1Class(REFCLSID rclsid)
+{
+   dprintf(("CoIsOle1Class - stub\n"));
+   return S_FALSE;
+}
+//*******************************************************************************
+//*******************************************************************************
+HINSTANCE WIN32API CoLoadLibrary(LPSTR lpszLibName, BOOL bAutoFree)
+{
+   dprintf(("CoLoadLibrary\n"));
+   return LoadLibraryA(lpszLibName);
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CoLockObjectExternal(IUnknown *pUnk, BOOL fLock, BOOL fLastUnlockReleases)
+{
+   dprintf(("CoLockObjectExternal - stub\n"));
+   return E_OUTOFMEMORY;
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CoMarshalHresult(IStream *pStm, HRESULT hresult)
+{
+   dprintf(("CoMarshalHresult - stub\n"));
+   return E_OUTOFMEMORY;
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CoMarshalInterThreadInterfaceInStream(REFIID riid,
+                                                          LPUNKNOWN pUnk,
+                                                          LPSTREAM *ppStm)
+{
+   dprintf(("CoMarshalInterThreadInterfaceInStream - stub\n"));
+   return E_OUTOFMEMORY;
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CoMarshalInterface(IStream *pStm, REFIID riid, IUnknown *pUnk,
+                                       DWORD dwDestContext, void *pvDestContext,
+                                       DWORD mshlflags)
+{
+   dprintf(("CoMarshalInterface - stub\n"));
+   return E_OUTOFMEMORY;
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CoQueryReleaseObject()
+{
+   dprintf(("CoQueryReleaseObject, UNKNOWN API - stub\n"));
+   return 0;
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CoRegisterClassObject(REFCLSID rclsid, IUnknown *pUnk,
+                                          DWORD dwClsContext, DWORD flags,
+                                          LPDWORD lpdwRegister)
+{
+   dprintf(("CoRegisterClassObject - stub\n"));
+   return E_OUTOFMEMORY;
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CoRegisterMallocSpy(LPMALLOCSPY pMallocSpy)
+{
+   dprintf(("CoRegisterMallocSpy - stub\n"));
+   return CO_E_OBJISREG;
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CoRegisterMessageFilter(LPMESSAGEFILTER lpMessageFilter,
+                                            LPMESSAGEFILTER *lplpMessageFilter)
+{
+   dprintf(("CoRegisterMessageFilter - stub\n"));
+   return S_FALSE;
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CoReleaseMarshalData(IStream *pStm)
+{
+   dprintf(("CoReleaseMarshalData - stub\n"));
+   return E_OUTOFMEMORY;
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CoRevokeClassObject(DWORD dwRegister)
+{
+   dprintf(("CoRevokeClassObject - stub\n"));
+   return E_OUTOFMEMORY;
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CoRevokeMallocSpy()
+{
+   dprintf(("CoRevokeMallocSpy - stub\n"));
+   return E_ACCESSDENIED;
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CoSetState()
+{
+   dprintf(("CoSetState, UNKNOWN API - stub\n"));
+   return 0;
+}
+//*******************************************************************************
+//*******************************************************************************
+LPVOID WIN32API CoTaskMemAlloc(ULONG cb)
+{
+   dprintf(("CoTaskMemAlloc\n"));
+   return malloc(cb);
+}
+//*******************************************************************************
+//*******************************************************************************
+void WIN32API CoTaskMemFree(void *pv)
+{
+   dprintf(("CoTaskMemFree\n"));
+   free(pv);
+   return;
+}
+//*******************************************************************************
+//*******************************************************************************
+LPVOID WIN32API CoTaskMemRealloc(LPVOID pv, ULONG cb)
+{
+   dprintf(("CoTaskMemRealloc - stub\n"));
+   return NULL;
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CoTreatAsClass(REFCLSID clsidOld, REFCLSID clsidNew)
+{
+   dprintf(("CoTreatAsClass - stub\n"));
+   return E_INVALIDARG;
+}
+//*******************************************************************************
+//*******************************************************************************
+void WIN32API CoUninitialize()
+{
+   dprintf(("CoUninitialize - stub\n"));
+   return ;
+}
+//*******************************************************************************
+//*******************************************************************************
+void WIN32API CoUnloadingWOW()
+{
+   dprintf(("CoUnloadingWOW, UNKNOWN API - stub\n"));
+   return ;
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CoUnmarshalHresult(LPSTREAM pStm, HRESULT *phresult)
+{
+   dprintf(("CoUnmarshalHresult - stub\n"));
+   return S_OK;
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API CoUnmarshalInterface(IStream *pSTm, REFIID riid, void **ppv)
+{
+   dprintf(("CoUnmarshalInterface - stub\n"));
+   return S_OK;
+}
 
 //******************************************************************************
@@ -36,5 +419,5 @@
 //******************************************************************************
 HRESULT WIN32API BindMoniker(LPMONIKER pmk, DWORD grfOpt, REFIID iidResult,
-                                LPVOID FAR *ppvResult)
+                                LPVOID *ppvResult)
 {
    dprintf(("BindMoniker- stub\n"));
@@ -43,373 +426,5 @@
 //*******************************************************************************
 //*******************************************************************************
-HRESULT WIN32API CLSIDFromProgID(LPCOLESTR lpszProgID, LPCLSID pclsid)
-{
-   dprintf(("CLSIDFromProgID- stub\n"));
-   return CO_E_CLASSSTRING;
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CLSIDFromString(LPOLESTR lpsz, LPCLSID pclisid)
-{
-   dprintf(("CLSIDFromString- stub\n"));
-   return CO_E_CLASSSTRING;
-}
-//*******************************************************************************
-//*******************************************************************************
-DWORD WIN32API CoBuildVersion()
-{
-   dprintf(("CoBuildVersion, obsolete\n"));
-   return 0;
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CoCreateFreeThreadedMarshaler(LPUNKNOWN punkOuter,
-                                                  LPUNKNOWN *ppunkMarshaler)
-{
-   dprintf(("CoCreateFreeThreadedMarshaler- stub\n"));
-   return E_OUTOFMEMORY;
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CoCreateGuid(GUID *pguid)
-{
-   dprintf(("CoCreateGuid - partial\n"));
-   memset(pguid, 0, sizeof(GUID));      //TODO: should be random GUID
-   return S_OK;
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter,
-                                     DWORD dwClsContext, REFIID riid,
-                                     LPVOID *ppv)
-{
-   dprintf(("CoCreateInstance - stub\n"));
-   return REGDB_E_CLASSNOTREG;
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CoDisconnectObject(IUnknown *pUnk, DWORD dwReserved)
-{
-   dprintf(("CoDisconnectObject - stub\n"));
-   return S_OK;
-}
-//*******************************************************************************
-//*******************************************************************************
-BOOL WIN32API CoDosDateTimeToFileTime(WORD nDosDate, WORD nDosTime,
-                                         FILETIME *lpFileTime)
-{
-   dprintf(("CoDosDateTimeToFileTime, redundant\n"));
-   return DosDateTimeToFileTime(nDosDate, nDosTime, lpFileTime);
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CoFileTimeNow(FILETIME *lpFileTime)
-{
- SYSTEMTIME systime;
-
-   dprintf(("CoFileTimeNow\n"));
-   GetSystemTime(&systime);
-   return SystemTimeToFileTime(&systime, lpFileTime);
-}
-//*******************************************************************************
-//*******************************************************************************
-BOOL WIN32API CoFileTimeToDosDateTime(FILETIME *lpFileTime, LPWORD lpDosDate,
-                                         LPWORD lpDosTime)
-{
-   dprintf(("CoFileTimeToDosDateTime\n"));
-   return FileTimeToDosDateTime(lpFileTime, lpDosDate, (PWORD)lpDosTime);
-}
-//*******************************************************************************
-//Frees all libs loaded with CoLoadLibrary
-//*******************************************************************************
-void WIN32API CoFreeAllLibraries()
-{
-   dprintf(("CoFreeAllLibraries - stub\n"));
-   return ;
-}
-//*******************************************************************************
-//*******************************************************************************
-void WIN32API CoFreeLibrary(HINSTANCE hInst)
-{
-   dprintf(("CoFreeLibrary\n"));
-   FreeLibrary(hInst);
-}
-//*******************************************************************************
-//*******************************************************************************
-void WIN32API CoFreeUnusedLibraries()
-{
-   dprintf(("CoFreeUnusedLibraries - stub\n"));
-   return ;
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CoGetCallerTID()
-{
-   dprintf(("CoGetCallerTID, UNKNOWN API - stub\n"));
-   return 0;
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CoGetClassObject(REFCLSID rclsid, DWORD dwClsContext,
-                                     COSERVERINFO *pServerInfo, REFIID riid,
-                                     LPVOID *ppv)
-{
-   dprintf(("CoGetClassObject - stub\n"));
-   return REGDB_E_CLASSNOTREG;
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CoGetCurrentLogicalThreadId()
-{
-   dprintf(("CoGetCurrentLogicalThreadId, UNKNOWN API - stub\n"));
-   return 0;
-}
-//*******************************************************************************
-//*******************************************************************************
-DWORD WIN32API CoGetCurrentProcess()
-{
-   dprintf(("CoGetCurrentProcess - stub\n"));
-   return 666;
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CoGetInterfaceAndReleaseStream(LPSTREAM pStm, REFIID riid,
-                                                   LPVOID *ppv)
-{
-   dprintf(("CoGetInterfaceAndReleaseStream - stub\n"));
-   return E_INVALIDARG;
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CoGetMalloc(DWORD dwMemContext, LPMALLOC *ppMalloc)
-{
-   dprintf(("CoGetMalloc - stub\n"));
-   return E_OUTOFMEMORY;
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CoGetMarshalSizeMax(ULONG *pulSize, REFIID riid, IUnknown *pUnk,
-                                        DWORD dwDestContext, LPVOID pvDestContext,
-                                        DWORD mshlflags)
-{
-   dprintf(("CoGetMarshalSizeMax - stub\n"));
-   return CO_E_NOTINITIALIZED;
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CoGetPSClsid(REFIID riid, CLSID *pclsid)
-{
-   dprintf(("CoGetPSClsid - stub\n"));
-   return E_OUTOFMEMORY;
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CoGetStandardMarshal(REFIID riid, IUnknown *pUnk, DWORD dwDestContext,
-                                         LPVOID pvDestContext, DWORD mshlflags,
-                                         LPMARSHALL *ppMarshal)
-{
-   dprintf(("CoGetStandardMarshal - stub\n"));
-   return E_OUTOFMEMORY;
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CoGetState()
-{
-   dprintf(("CoGetState, UNKNOWN API - stub\n"));
-   return 0;
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CoGetTreatAsClass(REFCLSID clsidOld, LPCLSID pclsidNew)
-{
-   dprintf(("CoGetTreatAsClass - stub\n"));
-   return S_FALSE;
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CoInitialize(LPVOID lpReserved)
-{
-   dprintf(("CoInitialize, UNKNOWN API - stub\n"));
-   return 0;
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CoInitializeWOW()
-{
-   dprintf(("CoInitializeWOW, UNKNOWN API - stub\n"));
-   return 0;
-}
-//*******************************************************************************
-//*******************************************************************************
-BOOL WIN32API CoIsHandlerConnected(LPUNKNOWN pUnk)
-{
-   dprintf(("CoIsHandlerConnected - stub\n"));
-   return FALSE;
-}
-//*******************************************************************************
-//*******************************************************************************
-BOOL WIN32API CoIsOle1Class(REFCLSID rclsid)
-{
-   dprintf(("CoIsOle1Class - stub\n"));
-   return S_FALSE;
-}
-//*******************************************************************************
-//*******************************************************************************
-HINSTANCE WIN32API CoLoadLibrary(LPSTR lpszLibName, BOOL bAutoFree)
-{
-   dprintf(("CoLoadLibrary\n"));
-   return LoadLibrary(lpszLibName);
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CoLockObjectExternal(IUnknown *pUnk, BOOL fLock, BOOL fLastUnlockReleases)
-{
-   dprintf(("CoLockObjectExternal - stub\n"));
-   return E_OUTOFMEMORY;
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CoMarshalHresult(IStream *pStm, HRESULT hresult)
-{
-   dprintf(("CoMarshalHresult - stub\n"));
-   return E_OUTOFMEMORY;
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CoMarshalInterThreadInterfaceInStream(REFIID riid,
-                                                          LPUNKNOWN pUnk,
-                                                          LPSTREAM *ppStm)
-{
-   dprintf(("CoMarshalInterThreadInterfaceInStream - stub\n"));
-   return E_OUTOFMEMORY;
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CoMarshalInterface(IStream *pStm, REFIID riid, IUnknown *pUnk,
-                                       DWORD dwDestContext, void *pvDestContext,
-                                       DWORD mshlflags)
-{
-   dprintf(("CoMarshalInterface - stub\n"));
-   return E_OUTOFMEMORY;
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CoQueryReleaseObject()
-{
-   dprintf(("CoQueryReleaseObject, UNKNOWN API - stub\n"));
-   return 0;
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CoRegisterClassObject(REFCLSID rclsid, IUnknown *pUnk,
-                                          DWORD dwClsContext, DWORD flags,
-                                          LPDWORD *lpdwRegister)
-{
-   dprintf(("CoRegisterClassObject - stub\n"));
-   return E_OUTOFMEMORY;
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CoRegisterMallocSpy(LPMALLOCSPY pMallocSpy)
-{
-   dprintf(("CoRegisterMallocSpy - stub\n"));
-   return CO_E_OBJISREG;
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CoRegisterMessageFilter(LPMESSAGEFILTER lpMessageFilter,
-                                            LPMESSAGEFILTER *lplpMessageFilter)
-{
-   dprintf(("CoRegisterMessageFilter - stub\n"));
-   return S_FALSE;
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CoReleaseMarshalData(IStream *pStm)
-{
-   dprintf(("CoReleaseMarshalData - stub\n"));
-   return E_OUTOFMEMORY;
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CoRevokeClassObject(DWORD dwRegister)
-{
-   dprintf(("CoRevokeClassObject - stub\n"));
-   return E_OUTOFMEMORY;
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CoRevokeMallocSpy()
-{
-   dprintf(("CoRevokeMallocSpy - stub\n"));
-   return E_ACCESSDENIED;
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CoSetState()
-{
-   dprintf(("CoSetState, UNKNOWN API - stub\n"));
-   return 0;
-}
-//*******************************************************************************
-//*******************************************************************************
-LPVOID WIN32API CoTaskMemAlloc(ULONG cb)
-{
-   dprintf(("CoTaskMemAlloc\n"));
-   return malloc(cb);
-}
-//*******************************************************************************
-//*******************************************************************************
-void WIN32API CoTaskMemFree(void *pv)
-{
-   dprintf(("CoTaskMemFree\n"));
-   free(pv);
-   return;
-}
-//*******************************************************************************
-//*******************************************************************************
-LPVOID WIN32API CoTaskMemRealloc(LPVOID pv, ULONG cb)
-{
-   dprintf(("CoTaskMemRealloc - stub\n"));
-   return NULL;
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CoTreatAsClass(REFCLSID clsidOld, REFCLSID clsidNew)
-{
-   dprintf(("CoTreatAsClass - stub\n"));
-   return E_INVALIDARG;
-}
-//*******************************************************************************
-//*******************************************************************************
-void WIN32API CoUninitialize()
-{
-   dprintf(("CoUninitialize - stub\n"));
-   return ;
-}
-//*******************************************************************************
-//*******************************************************************************
-void WIN32API CoUnloadingWOW()
-{
-   dprintf(("CoUnloadingWOW, UNKNOWN API - stub\n"));
-   return ;
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CoUnmarshalHresult(LPSTREAM pStm, HRESULT *phresult)
-{
-   dprintf(("CoUnmarshalHresult - stub\n"));
-   return S_OK;
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CoUnmarshalInterface(IStream *pSTm, REFIID riid, void **ppv)
-{
-   dprintf(("CoUnmarshalInterface - stub\n"));
-   return S_OK;
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API CreateAntiMoniker(LPMONIKER FAR *ppmk)
+HRESULT WIN32API CreateAntiMoniker(LPMONIKER *ppmk)
 {
    dprintf(("CreateAntiMoniker - stub\n"));
@@ -418,5 +433,5 @@
 //*******************************************************************************
 //*******************************************************************************
-HRESULT WIN32API CreateBindCtx(DWORD reserved, LPBC FAR *ppbc)
+HRESULT WIN32API CreateBindCtx(DWORD reserved, LPBC *ppbc)
 {
    dprintf(("CreateBindCtx - stub\n"));
@@ -433,5 +448,5 @@
 //*******************************************************************************
 HRESULT WIN32API CreateDataCache(LPUNKNOWN pUnkOuter, REFCLSID rclsid,
-                                    REFIID riid, LPVOID FAR *ppvObj)
+                                    REFIID riid, LPVOID *ppvObj)
 {
    dprintf(("CreateDataCache - stub\n"));
@@ -440,5 +455,5 @@
 //*******************************************************************************
 //*******************************************************************************
-HRESULT WIN32API CreateFileMoniker(LPSTR lpszPathName, LPMONIKER FAR *ppmk)
+HRESULT WIN32API CreateFileMoniker(LPCOLESTR lpszPathName, LPMONIKER *ppmk)
 {
    dprintf(("CreateFileMoniker - stub\n"));
@@ -448,5 +463,5 @@
 //*******************************************************************************
 HRESULT WIN32API CreateGenericComposite(LPMONIKER pmkFirst, LPMONIKER pmkRest,
-                                           LPMONIKER FAR *ppmkComposite)
+                                           LPMONIKER *ppmkComposite)
 {
    dprintf(("CreateGenericComposite - stub\n"));
@@ -463,5 +478,5 @@
 //*******************************************************************************
 //*******************************************************************************
-HRESULT WIN32API CreateItemMoniker(LPSTR lpszDelim, LPSTR lpszItem, LPMONIKER FAR *ppmk)
+HRESULT WIN32API CreateItemMoniker(LPCOLESTR lpszDelim, LPCOLESTR lpszItem, LPMONIKER *ppmk)
 {
    dprintf(("CreateItemMoniker - stub\n"));
@@ -477,5 +492,5 @@
 //*******************************************************************************
 //*******************************************************************************
-HRESULT WIN32API CreatePointerMoniker(LPUNKNOWN punk, LPMONIKER FAR *ppmk)
+HRESULT WIN32API CreatePointerMoniker(LPUNKNOWN punk, LPMONIKER *ppmk)
 {
    dprintf(("CreatePointerMoniker - stub\n"));
@@ -570,5 +585,6 @@
 //*******************************************************************************
 //*******************************************************************************
-HRESULT WIN32API GetRunningObjectTable(DWORD reserved, LPRUNNINGOBJECTTABLE *pprot)
+//HRESULT WIN32API GetRunningObjectTable(DWORD reserved, LPRUNNINGOBJECTTABLE *pprot)
+HRESULT WIN32API GetRunningObjectTable(DWORD reserved, LPVOID *pprot)
 {
    dprintf(("GetRunningObjectTable - stub\n"));
@@ -592,5 +608,5 @@
 //*******************************************************************************
 //*******************************************************************************
-BOOL WIN32API IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
+BOOL WIN32API CONCRETE_IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
 {
    dprintf(("IsEqualGUID - stub\n"));
@@ -627,6 +643,6 @@
 //*******************************************************************************
 //*******************************************************************************
-HRESULT WIN32API MkParseDisplayName(LPBC pbc, LPSTR szUserName, ULONG FAR *lpchEaten,
-                                        LPMONIKER FAR *ppmk)
+HRESULT WIN32API MkParseDisplayName(LPBC pbc, LPSTR szUserName, ULONG *lpchEaten,
+                                        LPMONIKER *ppmk)
 {
    dprintf(("MkParseDisplayName - stub\n"));
@@ -636,5 +652,5 @@
 //*******************************************************************************
 HRESULT WIN32API MonikerCommonPrefixWith(LPMONIKER pmkThis, LPMONIKER pmkOther,
-                                            LPMONIKER FAR *ppmkCommon)
+                                            LPMONIKER *ppmkCommon)
 {
    dprintf(("MonikerCommonPrefixWith - stub\n"));
@@ -644,5 +660,5 @@
 //*******************************************************************************
 HRESULT WIN32API MonikerRelativePathTo(LPMONIKER pmkSrc, LPMONIKER pmkDest,
-                                          LPMONIKER FAR *ppmkRelPath, BOOL dwReserved )
+                                          LPMONIKER *ppmkRelPath, BOOL dwReserved )
 {
    dprintf(("MonikerRelativePathTo - stub\n"));
@@ -665,8 +681,11 @@
 //*******************************************************************************
 //*******************************************************************************
-HRESULT WIN32API OleConvertIStorageToOLESTREAMEx(IStorage *pStg, CLIPFORMAT ctFormat,
-                                                    LONG lWidth, LONG lHeight,
-                                                    DWORD dwSize, STGMEDIUM pmedium,
-                                                    LPOLESTREAM lpolestream)
+HRESULT WIN32API OleConvertIStorageToOLESTREAMEx(LPSTORAGE	pStg,
+						 CLIPFORMAT	ctFormat,
+						 LONG		lWidth,
+						 LONG		lHeight,
+						 DWORD		dwSize,
+						 LPSTGMEDIUM	pmedium,
+						 LPOLESTREAM	lpolestream)
 {
    dprintf(("OleConvertIStorageToOLESTREAMEx - stub\n"));
@@ -684,8 +703,11 @@
 //*******************************************************************************
 //*******************************************************************************
-HRESULT WIN32API OleConvertOLESTREAMToIStorageEx(LPOLESTREAM lpolestream,
-                                                    IStorage *pstg, CLIPFORMAT *ctFormat,
-                                                    LONG *plWidth, LONG *plHeight,
-                                                    DWORD *pdwSize, STGMEDIUM pmedium)
+HRESULT WIN32API OleConvertOLESTREAMToIStorageEx(LPOLESTREAM	lpolestream,
+                                                 LPSTORAGE	pstg,
+                                                 CLIPFORMAT *	ctFormat,
+                                                 LONG *		plWidth,
+                                                 LONG *		plHeight,
+                                                 DWORD *	pdwSize,
+                                                 LPSTGMEDIUM	pmedium)
 {
    dprintf(("OleConvertOLESTREAMToIStorageEx - stub\n"));
@@ -704,5 +726,5 @@
 //*******************************************************************************
 HRESULT WIN32API OleCreateDefaultHandler(REFCLSID clsid, LPUNKNOWN pUnkOuter,
-                                            REFIID riid, LPVOID FAR *ppvObj)
+                                            REFIID riid, LPVOID *ppvObj)
 {
    dprintf(("OleCreateDefaultHandler - stub\n"));
@@ -723,5 +745,5 @@
                                       DWORD renderopt, LPFORMATETC pFormatEtc,
                                       LPOLECLIENTSITE pClientSite, LPSTORAGE pStg,
-                                      LPVOID FAR *ppvObj)
+                                      LPVOID *ppvObj)
 {
    dprintf(("OleCreateFromData - stub\n"));
@@ -734,5 +756,5 @@
                                       DWORD renderopt, LPFORMATETC pFormatEtc,
                                       LPOLECLIENTSITE pClientSite, LPSTORAGE pStg,
-                                      LPVOID FAR *ppvObj)
+                                      LPVOID *ppvObj)
 {
    dprintf(("OleCreateFromFile - stub\n"));
@@ -744,8 +766,8 @@
                                   DWORD renderopt, LPFORMATETC pFormatEtc,
                                   LPOLECLIENTSITE lpClientSite, LPSTORAGE pStg,
-                                  LPVOID FAR *ppvObj)
+                                  LPVOID *ppvObj)
 {
    dprintf(("OleCreateLink - stub\n"));
-   return(OLE_E_CANT_BINDTOSOURCE);
+   return(E_OUTOFMEMORY);
 }
 //*******************************************************************************
@@ -754,12 +776,12 @@
                                           DWORD renderopt, LPFORMATETC pFormatEtc,
                                           LPOLECLIENTSITE pClientSite, LPSTORAGE pStg,
-                                          LPVOID FAR *ppvObj)
+                                          LPVOID *ppvObj)
 {
    dprintf(("OleCreateLinkFromData - stub\n"));
-   return(OLE_E_CANT_BINDTOSOURCE);
-}
-//*******************************************************************************
-//*******************************************************************************
-HRESULT WIN32API OleCreateLinkToFile(LPWSTR lpszFileName, REFIID riid, DWORD renderopt,
+   return(E_OUTOFMEMORY);
+}
+//*******************************************************************************
+//*******************************************************************************
+HRESULT WIN32API OleCreateLinkToFile(LPCOLESTR lpszFileName, REFIID riid, DWORD renderopt,
                                         LPFORMATETC pFormatEtc, IOleClientSite *pClientSite,
                                         IStorage *pStg, void **ppvObj)
@@ -780,5 +802,5 @@
                                             DWORD renderopt, LPFORMATETC pFormatEtc,
                                             LPOLECLIENTSITE pClientSite, LPSTORAGE pStg,
-                                            LPVOID FAR *ppvObj)
+                                            LPVOID *ppvObj)
 {
    dprintf(("OleCreateStaticFromData - stub\n"));
@@ -787,8 +809,8 @@
 //*******************************************************************************
 //*******************************************************************************
-void WIN32API OleDestroyMenuDescriptor(HOLEMENU holemenu)
+HRESULT WIN32API OleDestroyMenuDescriptor(HOLEMENU holemenu)
 {
    dprintf(("OleDestroyMenuDescriptor - stub\n"));
-   return;
+   return E_OUTOFMEMORY;
 }
 //*******************************************************************************
@@ -993,5 +1015,5 @@
 {
    dprintf(("OleSetClipboard - stub\n"));
-   return(CLIPBRD_E_CANT_OPEN);
+   return(E_OUTOFMEMORY);
 }
 //*******************************************************************************
@@ -1116,5 +1138,5 @@
 //*******************************************************************************
 //*******************************************************************************
-HRESULT WIN32API StgCreateDocfileOnILockBytes(const WCHAR *pwcsName, DWORD grfMode,
+HRESULT WIN32API StgCreateDocfileOnILockBytes(ILockBytes *plkbyt, DWORD grfMode,
                                                  DWORD reserved, IStorage **ppstgOpen)
 {
@@ -1182,5 +1204,5 @@
 //*******************************************************************************
 //*******************************************************************************
-DWORD WIN32API StringFromGUID2(REFGUID rguid, LPOLESTR lpsz, int cbMax)
+int WIN32API StringFromGUID2(REFGUID rguid, LPOLESTR lpsz, int cbMax)
 {
  char szclsid[64];
Index: trunk/src/ole32/ole32.def
===================================================================
--- trunk/src/ole32/ole32.def	(revision 45)
+++ trunk/src/ole32/ole32.def	(revision 46)
@@ -86,5 +86,5 @@
     IIDFromString              = _IIDFromString@8            @74
     IsAccelerator              = _IsAccelerator@16           @75
-    IsEqualGUID                = _IsEqualGUID@8              @76
+;    IsEqualGUID                = _IsEqualGUID@8              @76
     IsValidIid                 = _IsValidIid@4               @77
     IsValidInterface           = _IsValidInterface@4         @78
Index: trunk/src/ole32/ole32.h
===================================================================
--- trunk/src/ole32/ole32.h	(revision 45)
+++ trunk/src/ole32/ole32.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: ole32.h,v 1.1 1999-05-24 20:19:52 ktk Exp $ */
-
 /*
  *
Index: trunk/src/pe2lx/LX.CPP
===================================================================
--- trunk/src/pe2lx/LX.CPP	(revision 45)
+++ trunk/src/pe2lx/LX.CPP	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: LX.CPP,v 1.1 1999-05-24 20:19:52 ktk Exp $ */
-
 /*
  * PE2LX LX code
@@ -40,4 +38,7 @@
 #define min(a,b)  ((a<b) ? (a) : (b))
 #endif
+
+//In pe.cpp
+char *hex(ULONG num);
 
 LXHeader OS2Exe;
@@ -642,5 +643,5 @@
   type = GetSectionByAddress(address);
   if(type == -1) {
-        cout << "Oops, fixup error 1...." << endl;
+        cout << "Oops, fixup error 1.... at " << hex(address) << endl;
         return;     //hmmmmmmmmmm
   }
@@ -659,5 +660,5 @@
   type = GetRealSectionByAddress(targetaddr);
   if(type == -1){
-        cout << "Oops, fixup error 2...." << endl;
+        cout << "Oops, fixup error 2.... at " << hex(targetaddr) << endl;
         return;     //hmmmmmmmmmm
   }
Index: trunk/src/pe2lx/LX.H
===================================================================
--- trunk/src/pe2lx/LX.H	(revision 45)
+++ trunk/src/pe2lx/LX.H	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: LX.H,v 1.1 1999-05-24 20:19:52 ktk Exp $ */
-
 /*
  * PE2LX LX
Index: trunk/src/pe2lx/accelerator.cpp
===================================================================
--- trunk/src/pe2lx/accelerator.cpp	(revision 45)
+++ trunk/src/pe2lx/accelerator.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: accelerator.cpp,v 1.1 1999-05-24 20:19:53 ktk Exp $ */
-
 /*
  * PE2LX accelerator resource support code
Index: trunk/src/pe2lx/accelerator.h
===================================================================
--- trunk/src/pe2lx/accelerator.h	(revision 45)
+++ trunk/src/pe2lx/accelerator.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: accelerator.h,v 1.1 1999-05-24 20:19:53 ktk Exp $ */
-
 /*
  * PE2LX accelerator resource support code
Index: trunk/src/pe2lx/bitmap.cpp
===================================================================
--- trunk/src/pe2lx/bitmap.cpp	(revision 45)
+++ trunk/src/pe2lx/bitmap.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: bitmap.cpp,v 1.1 1999-05-24 20:19:53 ktk Exp $ */
-
 /*
  * PE2LX bitmap conversion code
Index: trunk/src/pe2lx/bitmap.h
===================================================================
--- trunk/src/pe2lx/bitmap.h	(revision 45)
+++ trunk/src/pe2lx/bitmap.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: bitmap.h,v 1.1 1999-05-24 20:19:53 ktk Exp $ */
-
 /*
  * PE2LX bitmaps
Index: trunk/src/pe2lx/cursor.cpp
===================================================================
--- trunk/src/pe2lx/cursor.cpp	(revision 45)
+++ trunk/src/pe2lx/cursor.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: cursor.cpp,v 1.1 1999-05-24 20:19:53 ktk Exp $ */
-
 /*
  * PE2LX cursor conversion code
Index: trunk/src/pe2lx/cursor.h
===================================================================
--- trunk/src/pe2lx/cursor.h	(revision 45)
+++ trunk/src/pe2lx/cursor.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: cursor.h,v 1.1 1999-05-24 20:19:53 ktk Exp $ */
-
 /*
  * PE2LX cursor conversion code
Index: trunk/src/pe2lx/cursorgrp.cpp
===================================================================
--- trunk/src/pe2lx/cursorgrp.cpp	(revision 45)
+++ trunk/src/pe2lx/cursorgrp.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: cursorgrp.cpp,v 1.1 1999-05-24 20:19:53 ktk Exp $ */
-
 /*
  * PE2LX cursor group code
Index: trunk/src/pe2lx/cursorgrp.h
===================================================================
--- trunk/src/pe2lx/cursorgrp.h	(revision 45)
+++ trunk/src/pe2lx/cursorgrp.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: cursorgrp.h,v 1.1 1999-05-24 20:19:54 ktk Exp $ */
-
 /*
  * PE2LX cursor group
Index: trunk/src/pe2lx/dialog.cpp
===================================================================
--- trunk/src/pe2lx/dialog.cpp	(revision 45)
+++ trunk/src/pe2lx/dialog.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: dialog.cpp,v 1.1 1999-05-24 20:19:54 ktk Exp $ */
-
 /*
  * PE2LX dialog conversion code
Index: trunk/src/pe2lx/dialog.h
===================================================================
--- trunk/src/pe2lx/dialog.h	(revision 45)
+++ trunk/src/pe2lx/dialog.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: dialog.h,v 1.1 1999-05-24 20:19:54 ktk Exp $ */
-
 /*
  * PE2LX dialog conversion code
Index: trunk/src/pe2lx/icon.cpp
===================================================================
--- trunk/src/pe2lx/icon.cpp	(revision 45)
+++ trunk/src/pe2lx/icon.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: icon.cpp,v 1.1 1999-05-24 20:19:54 ktk Exp $ */
-
 /*
  * PE2LX icons
Index: trunk/src/pe2lx/icon.h
===================================================================
--- trunk/src/pe2lx/icon.h	(revision 45)
+++ trunk/src/pe2lx/icon.h	(revision 46)
@@ -1,5 +1,3 @@
-/* $Id: icon.h,v 1.1 1999-05-24 20:19:55 ktk Exp $ */
-
-/* $Header: /home/ktk/tmp/odin/2007/netlabs.cvs/odin32/src/pe2lx/icon.h,v 1.1 1999-05-24 20:19:55 ktk Exp $
+/* $Header: /home/ktk/tmp/odin/2007/netlabs.cvs/odin32/src/pe2lx/icon.h,v 1.2 1999-06-07 20:58:12 sandervl Exp $
  *
  * Declarations, protypes and defintions for conversion of icons.
Index: trunk/src/pe2lx/icongrp.cpp
===================================================================
--- trunk/src/pe2lx/icongrp.cpp	(revision 45)
+++ trunk/src/pe2lx/icongrp.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: icongrp.cpp,v 1.1 1999-05-24 20:19:55 ktk Exp $ */
-
 /*
  * PE2LX Icon group code
Index: trunk/src/pe2lx/icongrp.h
===================================================================
--- trunk/src/pe2lx/icongrp.h	(revision 45)
+++ trunk/src/pe2lx/icongrp.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: icongrp.h,v 1.1 1999-05-24 20:19:55 ktk Exp $ */
-
 /*
  * PE2LX icon groups
Index: trunk/src/pe2lx/makefile
===================================================================
--- trunk/src/pe2lx/makefile	(revision 45)
+++ trunk/src/pe2lx/makefile	(revision 46)
@@ -1,4 +1,2 @@
-# $Id: makefile,v 1.1 1999-05-24 20:19:55 ktk Exp $ 
-
 #
 # PD-Win32 API 
Index: trunk/src/pe2lx/menu.cpp
===================================================================
--- trunk/src/pe2lx/menu.cpp	(revision 45)
+++ trunk/src/pe2lx/menu.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: menu.cpp,v 1.1 1999-05-24 20:19:55 ktk Exp $ */
-
 /*
  * PE2LX menu conversion code
Index: trunk/src/pe2lx/menu.h
===================================================================
--- trunk/src/pe2lx/menu.h	(revision 45)
+++ trunk/src/pe2lx/menu.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: menu.h,v 1.1 1999-05-24 20:19:56 ktk Exp $ */
-
 /*
  * PE2LX menus
Index: trunk/src/pe2lx/misc.cpp
===================================================================
--- trunk/src/pe2lx/misc.cpp	(revision 45)
+++ trunk/src/pe2lx/misc.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: misc.cpp,v 1.1 1999-05-24 20:19:56 ktk Exp $ */
-
 /*
  * PE2LX ascii to unicode conversion
Index: trunk/src/pe2lx/misc.h
===================================================================
--- trunk/src/pe2lx/misc.h	(revision 45)
+++ trunk/src/pe2lx/misc.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: misc.h,v 1.1 1999-05-24 20:19:56 ktk Exp $ */
-
 /*
  * PE2LX ascii to unicode
Index: trunk/src/pe2lx/pe.cpp
===================================================================
--- trunk/src/pe2lx/pe.cpp	(revision 45)
+++ trunk/src/pe2lx/pe.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: pe.cpp,v 1.1 1999-05-24 20:19:56 ktk Exp $ */
-
 /*
  * PE2LX PE image interpreter
Index: trunk/src/pe2lx/pefile.cpp
===================================================================
--- trunk/src/pe2lx/pefile.cpp	(revision 45)
+++ trunk/src/pe2lx/pefile.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: pefile.cpp,v 1.1 1999-05-24 20:19:56 ktk Exp $ */
-
 /*
  * PE2LX PE utility functions
Index: trunk/src/pe2lx/rcdata.cpp
===================================================================
--- trunk/src/pe2lx/rcdata.cpp	(revision 45)
+++ trunk/src/pe2lx/rcdata.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: rcdata.cpp,v 1.1 1999-05-24 20:19:56 ktk Exp $ */
-
 /*
  * PE2LX RCDATA resources
Index: trunk/src/pe2lx/rcdata.h
===================================================================
--- trunk/src/pe2lx/rcdata.h	(revision 45)
+++ trunk/src/pe2lx/rcdata.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: rcdata.h,v 1.1 1999-05-24 20:19:56 ktk Exp $ */
-
 /*
  * PE2LX RCDATA resources
Index: trunk/src/pe2lx/strings.cpp
===================================================================
--- trunk/src/pe2lx/strings.cpp	(revision 45)
+++ trunk/src/pe2lx/strings.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: strings.cpp,v 1.1 1999-05-24 20:19:56 ktk Exp $ */
-
 /*
  * PE2LX String conversion
Index: trunk/src/pe2lx/strings.h
===================================================================
--- trunk/src/pe2lx/strings.h	(revision 45)
+++ trunk/src/pe2lx/strings.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: strings.h,v 1.1 1999-05-24 20:19:56 ktk Exp $ */
-
 /*
  * PE2LX Strings
Index: trunk/src/peldr/makefile
===================================================================
--- trunk/src/peldr/makefile	(revision 45)
+++ trunk/src/peldr/makefile	(revision 46)
@@ -1,4 +1,2 @@
-# $Id: makefile,v 1.1 1999-05-24 20:19:56 ktk Exp $ 
-
 #
 # PD-Win32 API
Index: trunk/src/peldr/pe.h
===================================================================
--- trunk/src/peldr/pe.h	(revision 45)
+++ trunk/src/peldr/pe.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: pe.h,v 1.1 1999-05-24 20:19:57 ktk Exp $ */
-
 /*
  *
Index: trunk/src/shell32/makefile
===================================================================
--- trunk/src/shell32/makefile	(revision 45)
+++ trunk/src/shell32/makefile	(revision 46)
@@ -1,4 +1,2 @@
-# $Id: makefile,v 1.1 1999-05-24 20:19:57 ktk Exp $ 
-
 #
 # PD-Win32 API
@@ -40,5 +38,5 @@
 
 shell32.obj: shell32.cpp shell32.h
-initterm.obj: initterm.c
+initterm.obj: initterm.cpp
 
 clean:
Index: trunk/src/shell32/shell32.h
===================================================================
--- trunk/src/shell32/shell32.h	(revision 45)
+++ trunk/src/shell32/shell32.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: shell32.h,v 1.1 1999-05-24 20:19:58 ktk Exp $ */
-
 #ifndef __shell32_H__
 #define __shell32_H__
Index: trunk/src/tapi32/makefile
===================================================================
--- trunk/src/tapi32/makefile	(revision 45)
+++ trunk/src/tapi32/makefile	(revision 46)
@@ -1,4 +1,2 @@
-# $Id: makefile,v 1.1 1999-05-24 20:19:58 ktk Exp $ 
-
 #
 # PD-Win32 API 
@@ -40,5 +38,5 @@
 
 tapi32.obj: tapi32.cpp tapi32.h
-initterm.obj: initterm.c
+initterm.obj: initterm.cpp
 
 
Index: trunk/src/tapi32/tapi32.cpp
===================================================================
--- trunk/src/tapi32/tapi32.cpp	(revision 45)
+++ trunk/src/tapi32/tapi32.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: tapi32.cpp,v 1.1 1999-05-24 20:19:58 ktk Exp $ */
-
 /*
  *
Index: trunk/src/tapi32/tapi32.h
===================================================================
--- trunk/src/tapi32/tapi32.h	(revision 45)
+++ trunk/src/tapi32/tapi32.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: tapi32.h,v 1.1 1999-05-24 20:19:58 ktk Exp $ */
-
 /*
  *
Index: trunk/src/user32/DLGCONVERT.H
===================================================================
--- trunk/src/user32/DLGCONVERT.H	(revision 45)
+++ trunk/src/user32/DLGCONVERT.H	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: DLGCONVERT.H,v 1.1 1999-05-24 20:19:59 ktk Exp $ */
-
 /*
  *
Index: trunk/src/user32/HOOK.CPP
===================================================================
--- trunk/src/user32/HOOK.CPP	(revision 45)
+++ trunk/src/user32/HOOK.CPP	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: HOOK.CPP,v 1.1 1999-05-24 20:19:59 ktk Exp $ */
-
 /*
  * Win32 hook API functions for OS/2
Index: trunk/src/user32/IMAGE.H
===================================================================
--- trunk/src/user32/IMAGE.H	(revision 45)
+++ trunk/src/user32/IMAGE.H	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: IMAGE.H,v 1.1 1999-05-24 20:19:59 ktk Exp $ */
-
 #ifndef __IMAGE_H__
 #define __IMAGE_H__
Index: trunk/src/user32/Makefile
===================================================================
--- trunk/src/user32/Makefile	(revision 45)
+++ trunk/src/user32/Makefile	(revision 46)
@@ -1,4 +1,2 @@
-# $Id: Makefile,v 1.1 1999-05-24 20:19:59 ktk Exp $ 
-
 #
 # PD-Win32 API
@@ -68,5 +66,5 @@
               $(PDWIN32_INCLUDE)\wndproc.h $(PDWIN32_INCLUDE)\wndclass.h
 
-initterm.obj: initterm.c
+initterm.obj: initterm.cpp
 
 
Index: trunk/src/user32/RESSTRING.C
===================================================================
--- trunk/src/user32/RESSTRING.C	(revision 45)
+++ trunk/src/user32/RESSTRING.C	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: RESSTRING.C,v 1.1 1999-05-24 20:19:59 ktk Exp $ */
-
 /*
  *
Index: trunk/src/user32/RESSTRING.H
===================================================================
--- trunk/src/user32/RESSTRING.H	(revision 45)
+++ trunk/src/user32/RESSTRING.H	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: RESSTRING.H,v 1.1 1999-05-24 20:19:59 ktk Exp $ */
-
 /*
  *
Index: trunk/src/user32/SYSCLR.CPP
===================================================================
--- trunk/src/user32/SYSCLR.CPP	(revision 45)
+++ trunk/src/user32/SYSCLR.CPP	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: SYSCLR.CPP,v 1.1 1999-05-24 20:19:59 ktk Exp $ */
-
 /*
  * Win32 system color API functions for OS/2
Index: trunk/src/user32/SYSCLR.H
===================================================================
--- trunk/src/user32/SYSCLR.H	(revision 45)
+++ trunk/src/user32/SYSCLR.H	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: SYSCLR.H,v 1.1 1999-05-24 20:20:00 ktk Exp $ */
-
 /*
  *
Index: trunk/src/user32/USER32.DEF
===================================================================
--- trunk/src/user32/USER32.DEF	(revision 45)
+++ trunk/src/user32/USER32.DEF	(revision 46)
@@ -593,5 +593,4 @@
     CreateWindowProc     		@2000
     GetOS2Callback__15Win32WindowProcFv @2001
-
 ; Wine helper function
     GetSysColorPen              = _GetSysColorPen@4              @2002
Index: trunk/src/user32/USRCALL.CPP
===================================================================
--- trunk/src/user32/USRCALL.CPP	(revision 45)
+++ trunk/src/user32/USRCALL.CPP	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: USRCALL.CPP,v 1.1 1999-05-24 20:20:00 ktk Exp $ */
-
 /*
  *
Index: trunk/src/user32/USRCALL.H
===================================================================
--- trunk/src/user32/USRCALL.H	(revision 45)
+++ trunk/src/user32/USRCALL.H	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: USRCALL.H,v 1.1 1999-05-24 20:20:00 ktk Exp $ */
-
 /*
  *
Index: trunk/src/user32/char.cpp
===================================================================
--- trunk/src/user32/char.cpp	(revision 45)
+++ trunk/src/user32/char.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: char.cpp,v 1.1 1999-05-24 20:20:01 ktk Exp $ */
-
 /*
  * Win32 character API functions for OS/2
Index: trunk/src/user32/dde.cpp
===================================================================
--- trunk/src/user32/dde.cpp	(revision 45)
+++ trunk/src/user32/dde.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: dde.cpp,v 1.1 1999-05-24 20:20:01 ktk Exp $ */
-
 /*
  * Win32 default window API functions for OS/2
Index: trunk/src/user32/dialog.cpp
===================================================================
--- trunk/src/user32/dialog.cpp	(revision 45)
+++ trunk/src/user32/dialog.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: dialog.cpp,v 1.2 1999-05-31 22:08:14 phaller Exp $ */
-
 /*
  * Win32 dialog API functions for OS/2
@@ -12,6 +10,4 @@
 #include <os2win.h>
 #include <nameid.h>
-#include <misc.h>
-
 #include "user32.h"
 #include "wndproc.h"
Index: trunk/src/user32/dlgconvert.cpp
===================================================================
--- trunk/src/user32/dlgconvert.cpp	(revision 45)
+++ trunk/src/user32/dlgconvert.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: dlgconvert.cpp,v 1.1 1999-05-24 20:20:01 ktk Exp $ */
-
 /*
  * Win32 runtime dialog conversion functions for OS/2
Index: trunk/src/user32/hooks.cpp
===================================================================
--- trunk/src/user32/hooks.cpp	(revision 45)
+++ trunk/src/user32/hooks.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: hooks.cpp,v 1.1 1999-05-24 20:20:01 ktk Exp $ */
-
 /*
  * Win32 hook class for OS/2
Index: trunk/src/user32/hooks.h
===================================================================
--- trunk/src/user32/hooks.h	(revision 45)
+++ trunk/src/user32/hooks.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: hooks.h,v 1.1 1999-05-24 20:20:01 ktk Exp $ */
-
 /*
  *
Index: trunk/src/user32/icon.cpp
===================================================================
--- trunk/src/user32/icon.cpp	(revision 45)
+++ trunk/src/user32/icon.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: icon.cpp,v 1.1 1999-05-24 20:20:01 ktk Exp $ */
-
 /*
  *
Index: trunk/src/user32/icon.h
===================================================================
--- trunk/src/user32/icon.h	(revision 45)
+++ trunk/src/user32/icon.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: icon.h,v 1.1 1999-05-24 20:20:01 ktk Exp $ */
-
 /*
  *
Index: trunk/src/user32/loadres.cpp
===================================================================
--- trunk/src/user32/loadres.cpp	(revision 45)
+++ trunk/src/user32/loadres.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: loadres.cpp,v 1.2 1999-05-31 22:08:15 phaller Exp $ */
-
 /*
  *
@@ -13,6 +11,4 @@
  */
 #include <os2win.h>
-#include <misc.h>
-
 #include "user32.h"
 #include "resstring.h"
Index: trunk/src/user32/menu.cpp
===================================================================
--- trunk/src/user32/menu.cpp	(revision 45)
+++ trunk/src/user32/menu.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: menu.cpp,v 1.2 1999-05-31 22:08:15 phaller Exp $ */
-
 /*
  * Win32 menu API functions for OS/2
@@ -16,9 +14,5 @@
  *
  */
-
-#include <os2win.h>
-#include <misc.h>
 #include "user32.h"
-
 
 //******************************************************************************
Index: trunk/src/user32/user32.h
===================================================================
--- trunk/src/user32/user32.h	(revision 45)
+++ trunk/src/user32/user32.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: user32.h,v 1.2 1999-05-31 22:08:16 phaller Exp $ */
-
 /*****************************************************************************
  * Name      : USER32.H
@@ -12,6 +10,4 @@
 
 #include <os2win.h>
-#include "misc.h"
-
 #include <nameid.h>
 #include <stdlib.h>
Index: trunk/src/user32/user32exp.def
===================================================================
--- trunk/src/user32/user32exp.def	(revision 45)
+++ trunk/src/user32/user32exp.def	(revision 46)
@@ -596,4 +596,5 @@
 CreateWindowProc     			@2000
 GetOS2Callback__15Win32WindowProcFv 	@2001
+_GetSysColorPen@4                       @2002
 
-_GetSysColorPen@4                       @2002
+
Index: trunk/src/user32/wndclass.cpp
===================================================================
--- trunk/src/user32/wndclass.cpp	(revision 45)
+++ trunk/src/user32/wndclass.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: wndclass.cpp,v 1.1 1999-05-24 20:20:00 ktk Exp $ */
-
 /*
  * Win32 Window Class Managment Code for OS/2
@@ -92,29 +90,29 @@
  WNDCLASSA wndclass;
 
-   if(GetClassInfoA(NULL, "BUTTON", &wndclass)) {
+   if(O32_GetClassInfo(NULL, "BUTTON", &wndclass)) {
 	new Win32WindowClass(ButtonCallback, "BUTTON", hModule);
 	ButtonHandler = (WNDPROC_O32)wndclass.lpfnWndProc;
    }
-   if(GetClassInfoA(NULL, "LISTBOX", &wndclass)) {
+   if(O32_GetClassInfo(NULL, "LISTBOX", &wndclass)) {
 	new Win32WindowClass(ListboxCallback, "LISTBOX", hModule);
 	ListboxHandler = (WNDPROC_O32)wndclass.lpfnWndProc;
    }
-   if(GetClassInfoA(NULL, "COMBOBOX", &wndclass)) {
+   if(O32_GetClassInfo(NULL, "COMBOBOX", &wndclass)) {
 	new Win32WindowClass(ComboboxCallback, "COMBOBOX", hModule);
 	ComboboxHandler = (WNDPROC_O32)wndclass.lpfnWndProc;
    }
-   if(GetClassInfoA(NULL, "EDIT", &wndclass)) {
+   if(O32_GetClassInfo(NULL, "EDIT", &wndclass)) {
 	new Win32WindowClass(EditCallback, "EDIT", hModule);
 	EditHandler = (WNDPROC_O32)wndclass.lpfnWndProc;
    }
-   if(GetClassInfoA(NULL, "MDICLIENT", &wndclass)) {
+   if(O32_GetClassInfo(NULL, "MDICLIENT", &wndclass)) {
 	new Win32WindowClass(MdiClientCallback, "MDICLIENT", hModule);
 	MdiClientHandler = (WNDPROC_O32)wndclass.lpfnWndProc;
    }
-   if(GetClassInfoA(NULL, "SCROLLBAR", &wndclass)) {
+   if(O32_GetClassInfo(NULL, "SCROLLBAR", &wndclass)) {
 	new Win32WindowClass(ScrollbarCallback, "SCROLLBAR", hModule);
 	ScrollbarHandler = (WNDPROC_O32)wndclass.lpfnWndProc;
    }
-   if(GetClassInfoA(NULL, "STATIC", &wndclass)) {
+   if(O32_GetClassInfo(NULL, "STATIC", &wndclass)) {
 	new Win32WindowClass(StaticCallback, "STATIC", hModule);
 	StaticHandler = (WNDPROC_O32)wndclass.lpfnWndProc;
Index: trunk/src/user32/wndproc.cpp
===================================================================
--- trunk/src/user32/wndproc.cpp	(revision 45)
+++ trunk/src/user32/wndproc.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: wndproc.cpp,v 1.2 1999-06-02 16:00:38 cbratschi Exp $ */
-
 /*
  *
@@ -94,17 +92,17 @@
 {
   Win32WindowProc *window = Win32WindowProc::windows;
-
+  
   /* @@@PH 98/07/13 what's this whole code good for ? */
-  if(window == this)
+  if(window == this) 
   {
     windows = next;
   }
-  else
+  else 
   {
     /* @@@PH 98/07/13 window can be NULL */
     if (window != NULL)
-      while(window->next != NULL)
+      while(window->next != NULL) 
       {
-        if(window->next == this)
+        if(window->next == this) 
         {
           window->next = next;
@@ -114,6 +112,6 @@
       }
   }
-
-  if(os2dlg)
+  
+  if(os2dlg) 
   {
     DeleteWin32DlgTemplate(os2dlg);
@@ -240,5 +238,5 @@
                         lParam = MapOEMToRealKey(wParam, lParam);
                 }
-#ifdef DEBUG1
+#ifdef DEBUG
                 WriteLog("***************Message %s for window/dialog %X\n", GetMsgText(Msg), hwnd);
 #endif
Index: trunk/src/user32/wndsubproc.cpp
===================================================================
--- trunk/src/user32/wndsubproc.cpp	(revision 45)
+++ trunk/src/user32/wndsubproc.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: wndsubproc.cpp,v 1.1 1999-05-24 20:20:00 ktk Exp $ */
-
 /*
  * Win32 window subproc class for OS/2
Index: trunk/src/user32/wndsubproc.h
===================================================================
--- trunk/src/user32/wndsubproc.h	(revision 45)
+++ trunk/src/user32/wndsubproc.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: wndsubproc.h,v 1.1 1999-05-24 20:20:00 ktk Exp $ */
-
 /*
  *
Index: trunk/src/version/makefile
===================================================================
--- trunk/src/version/makefile	(revision 45)
+++ trunk/src/version/makefile	(revision 46)
@@ -1,4 +1,2 @@
-# $Id: makefile,v 1.1 1999-05-24 20:20:05 ktk Exp $ 
-
 #
 # PD-Win32 API 
@@ -38,6 +36,6 @@
 
 
-version.obj: version.c
-initterm.obj: initterm.c
+version.obj: version.cpp
+initterm.obj: initterm.cpp
 
 
Index: trunk/src/winmm/IRTMidi.cpp
===================================================================
--- trunk/src/winmm/IRTMidi.cpp	(revision 45)
+++ trunk/src/winmm/IRTMidi.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: IRTMidi.cpp,v 1.1 1999-05-24 20:20:05 ktk Exp $ */
-
 /*******************************************************************************
 * FILE NAME: IRTMidi.cpp                                                       *
Index: trunk/src/winmm/MIDI.HPP
===================================================================
--- trunk/src/winmm/MIDI.HPP	(revision 45)
+++ trunk/src/winmm/MIDI.HPP	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: MIDI.HPP,v 1.1 1999-05-24 20:20:05 ktk Exp $ */
-
 /*
  * RTMIDI code
Index: trunk/src/winmm/aux.cpp
===================================================================
--- trunk/src/winmm/aux.cpp	(revision 45)
+++ trunk/src/winmm/aux.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: aux.cpp,v 1.1 1999-05-24 20:20:06 ktk Exp $ */
-
 /*
  * Auxilary multimedia apis
Index: trunk/src/winmm/aux.h
===================================================================
--- trunk/src/winmm/aux.h	(revision 45)
+++ trunk/src/winmm/aux.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: aux.h,v 1.1 1999-05-24 20:20:06 ktk Exp $ */
-
 /*
  * Auxilary multimedia apis
Index: trunk/src/winmm/auxos2.cpp
===================================================================
--- trunk/src/winmm/auxos2.cpp	(revision 45)
+++ trunk/src/winmm/auxos2.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: auxos2.cpp,v 1.1 1999-05-24 20:20:06 ktk Exp $ */
-
 /*
  * Auxilary multimedia OS/2 implementation
Index: trunk/src/winmm/driver.cpp
===================================================================
--- trunk/src/winmm/driver.cpp	(revision 45)
+++ trunk/src/winmm/driver.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: driver.cpp,v 1.1 1999-05-24 20:20:06 ktk Exp $ */
-
 /*
  * Driver multimedia apis
Index: trunk/src/winmm/dwaveout.cpp
===================================================================
--- trunk/src/winmm/dwaveout.cpp	(revision 45)
+++ trunk/src/winmm/dwaveout.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: dwaveout.cpp,v 1.1 1999-05-24 20:20:06 ktk Exp $ */
-
 /*
  * Wave playback class
Index: trunk/src/winmm/dwaveout.h
===================================================================
--- trunk/src/winmm/dwaveout.h	(revision 45)
+++ trunk/src/winmm/dwaveout.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: dwaveout.h,v 1.1 1999-05-24 20:20:06 ktk Exp $ */
-
 /*
  * Wave playback class
Index: trunk/src/winmm/irtmidi.hpp
===================================================================
--- trunk/src/winmm/irtmidi.hpp	(revision 45)
+++ trunk/src/winmm/irtmidi.hpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: irtmidi.hpp,v 1.1 1999-05-24 20:20:06 ktk Exp $ */
-
 /*******************************************************************************
 * FILE NAME: IRTMidi.hpp                                                       *
Index: trunk/src/winmm/joy.cpp
===================================================================
--- trunk/src/winmm/joy.cpp	(revision 45)
+++ trunk/src/winmm/joy.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: joy.cpp,v 1.1 1999-05-24 20:20:06 ktk Exp $ */
-
 /*
  * joystick stubs
Index: trunk/src/winmm/makefile
===================================================================
--- trunk/src/winmm/makefile	(revision 45)
+++ trunk/src/winmm/makefile	(revision 46)
@@ -1,4 +1,2 @@
-# $Id: makefile,v 1.1 1999-05-24 20:20:06 ktk Exp $ 
-
 #
 # PD-Win32 API
@@ -58,7 +56,7 @@
 irtmidi.obj:    irtmidi.cpp irtmidi.hpp
 dwaveout.obj:   dwaveout.cpp dwaveout.h $(PDWIN32_INCLUDE)\vmutex.h
-timegettime.obj: timegettime.c
-initterm.obj:   initterm.c aux.h
-playsound.obj:  playsound.c
+timegettime.obj: timegettime.cpp
+initterm.obj:   initterm.cpp aux.h
+playsound.obj:  playsound.cpp
 
 clean:
Index: trunk/src/winmm/mci.cpp
===================================================================
--- trunk/src/winmm/mci.cpp	(revision 45)
+++ trunk/src/winmm/mci.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: mci.cpp,v 1.1 1999-05-24 20:20:06 ktk Exp $ */
-
 /*
  * MCI stubs
Index: trunk/src/winmm/midi.cpp
===================================================================
--- trunk/src/winmm/midi.cpp	(revision 45)
+++ trunk/src/winmm/midi.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: midi.cpp,v 1.1 1999-05-24 20:20:06 ktk Exp $ */
-
 /*
  * RTMIDI code
Index: trunk/src/winmm/midistrm.cpp
===================================================================
--- trunk/src/winmm/midistrm.cpp	(revision 45)
+++ trunk/src/winmm/midistrm.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: midistrm.cpp,v 1.1 1999-05-24 20:20:06 ktk Exp $ */
-
 /*
  * RTMIDI code
Index: trunk/src/winmm/mixer.cpp
===================================================================
--- trunk/src/winmm/mixer.cpp	(revision 45)
+++ trunk/src/winmm/mixer.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: mixer.cpp,v 1.1 1999-05-24 20:20:06 ktk Exp $ */
-
 /*
  * Mixer stubs
Index: trunk/src/winmm/mmio.cpp
===================================================================
--- trunk/src/winmm/mmio.cpp	(revision 45)
+++ trunk/src/winmm/mmio.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: mmio.cpp,v 1.1 1999-05-24 20:20:07 ktk Exp $ */
-
 /*
  * MMIO stubs
Index: trunk/src/winmm/os2timer.cpp
===================================================================
--- trunk/src/winmm/os2timer.cpp	(revision 45)
+++ trunk/src/winmm/os2timer.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: os2timer.cpp,v 1.1 1999-05-24 20:20:07 ktk Exp $ */
-
 /*
  * OS/2 Timer class
Index: trunk/src/winmm/os2timer.h
===================================================================
--- trunk/src/winmm/os2timer.h	(revision 45)
+++ trunk/src/winmm/os2timer.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: os2timer.h,v 1.1 1999-05-24 20:20:07 ktk Exp $ */
-
 #ifndef __OS2TIMER_H__
 #define __OS2TIMER_H__
Index: trunk/src/winmm/wavein.cpp
===================================================================
--- trunk/src/winmm/wavein.cpp	(revision 45)
+++ trunk/src/winmm/wavein.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: wavein.cpp,v 1.1 1999-05-24 20:20:07 ktk Exp $ */
-
 /*
  * Wave in stubs
Index: trunk/src/winmm/waveout.cpp
===================================================================
--- trunk/src/winmm/waveout.cpp	(revision 45)
+++ trunk/src/winmm/waveout.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: waveout.cpp,v 1.1 1999-05-24 20:20:07 ktk Exp $ */
-
 /*
  * Wave out MM apis
Index: trunk/src/winmm/winmm.cpp
===================================================================
--- trunk/src/winmm/winmm.cpp	(revision 45)
+++ trunk/src/winmm/winmm.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: winmm.cpp,v 1.1 1999-05-24 20:20:07 ktk Exp $ */
-
 /*
  * Timer MM apis
Index: trunk/src/winmm/winmm.h
===================================================================
--- trunk/src/winmm/winmm.h	(revision 45)
+++ trunk/src/winmm/winmm.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: winmm.h,v 1.1 1999-05-24 20:20:07 ktk Exp $ */
-
 /*
  *
Index: trunk/src/winmm/winmmtype.h
===================================================================
--- trunk/src/winmm/winmmtype.h	(revision 45)
+++ trunk/src/winmm/winmmtype.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: winmmtype.h,v 1.1 1999-05-24 20:20:07 ktk Exp $ */
-
 /*
  *
Index: trunk/src/winmm/wintimer.h
===================================================================
--- trunk/src/winmm/wintimer.h	(revision 45)
+++ trunk/src/winmm/wintimer.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: wintimer.h,v 1.1 1999-05-24 20:20:07 ktk Exp $ */
-
 /*
  *
Index: trunk/src/winspool/makefile
===================================================================
--- trunk/src/winspool/makefile	(revision 45)
+++ trunk/src/winspool/makefile	(revision 46)
@@ -1,4 +1,2 @@
-# $Id: makefile,v 1.1 1999-05-24 20:20:08 ktk Exp $ 
-
 #
 # PD-Win32 API 
@@ -38,6 +36,6 @@
 
 
-winspool.obj: winspool.c
-initterm.obj: initterm.c
+winspool.obj: winspool.cpp
+initterm.obj: initterm.cpp
 
 
Index: trunk/src/wnetap32/makefile
===================================================================
--- trunk/src/wnetap32/makefile	(revision 45)
+++ trunk/src/wnetap32/makefile	(revision 46)
@@ -1,4 +1,2 @@
-# $Id: makefile,v 1.1 1999-05-24 20:20:08 ktk Exp $ 
-
 #
 # PD-Win32 API 
@@ -39,5 +37,5 @@
 
 wnetap32.obj: wnetap32.cpp
-initterm.obj: initterm.c
+initterm.obj: initterm.cpp
 
 
Index: trunk/src/wnetap32/wnetap32.cpp
===================================================================
--- trunk/src/wnetap32/wnetap32.cpp	(revision 45)
+++ trunk/src/wnetap32/wnetap32.cpp	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: wnetap32.cpp,v 1.1 1999-05-24 20:20:08 ktk Exp $ */
-
 /*
  *
Index: trunk/src/wsock32/makefile
===================================================================
--- trunk/src/wsock32/makefile	(revision 45)
+++ trunk/src/wsock32/makefile	(revision 46)
@@ -1,4 +1,2 @@
-# $Id: makefile,v 1.1 1999-05-24 20:20:09 ktk Exp $ 
-
 #
 # PD-Win32 API 
@@ -37,7 +35,7 @@
 
 
-wsock32.obj: wsock32.c wsock32.h
-notify.obj:  notify.c wsock32.h
-initterm.obj: initterm.c
+wsock32.obj: wsock32.cpp wsock32.h
+notify.obj:  notify.cpp wsock32.h
+initterm.obj: initterm.cpp
 
 clean:
Index: trunk/src/wsock32/wsock32.def
===================================================================
--- trunk/src/wsock32/wsock32.def	(revision 45)
+++ trunk/src/wsock32/wsock32.def	(revision 46)
@@ -1,84 +1,86 @@
 ;Created by BLAST for IBM's compiler
-
 LIBRARY WSOCK32 INITINSTANCE
 DATA MULTIPLE NONSHARED
 EXPORTS
+;   _WSAFDIsSet =       _OS2_WSAFDIsSet@8      
+;   Arecv = _OS2Arecv 
+;   Asend = _OS2Asend
+;   EnumProtocolsA = _OS2EnumProtocolsA
+;   EnumProtocolsW = _OS2EnumProtocolsW
+;   GetAddressByNameA = _OS2GetAddressByNameA
+;   GetAddressByNameW = _OS2GetAddressByNameW
+;   GetNameByTypeA = _OS2GetNameByTypeA
+;   GetNameByTypeW = _OS2GetNameByTypeW
+;   GetServiceA = _OS2GetServiceA
+;   GetServiceW = _OS2GetServiceW
+;   GetTypeByNameA = _OS2GetTypeByNameA
+;   GetTypeByNameW = _OS2GetTypeByNameW
+;   NPLoadNameSpaces = _OS2NPLoadNameSpaces
+;   SetServiceA = _OS2SetServiceA
+;   SetServiceW = _OS2SetServiceW
+;   TransmitFile = _OS2TransmitFile
+   accept =       		_OS2accept@12      			@1
+   bind =       		_OS2bind@12      			@2
+   closesocket =       	_OS2closesocket@4      			@3
+   connect =       		_OS2connect@12      			@4
+   getpeername =       	_OS2getpeername@12      		@5
+   getsockname =       	_OS2getsockname@12      		@6
+   getsockopt =       	_OS2getsockopt@20      			@7
+   htonl =       		_OS2htonl@4      			@8
+   htons =       		_OS2htons@4      			@9
+   inet_addr =       	_OS2inet_addr@4      			@10
+   inet_ntoa =       	_OS2inet_ntoa@4      			@11
+   ioctlsocket =       	_OS2ioctlsocket@12      		@12
+   listen =       		_OS2listen@8      			@13
+   ntohl =       		_OS2ntohl@4      			@14
+   ntohs =       		_OS2ntohs@4      			@15
+   recv =       		_OS2recv@16      			@16
+   recvfrom =       		_OS2recvfrom@24      			@17
+   select =       		_OS2select@20      			@18
+   send =       		_OS2send@16      			@19
+   sendto =       		_OS2sendto@24      			@20
+   setsockopt =       	_OS2setsockopt@20      			@21
+   shutdown =       		_OS2shutdown@8      			@22
+   socket =       		_OS2socket@12      			@23
 
-  accept                   = _OS2accept@12                     @1
-  bind                     = _OS2bind@12                       @2
-  closesocket              = _OS2closesocket@4                 @3
-  connect                  = _OS2connect@12                    @4
-  getpeername              = _OS2getpeername@12                @5
-  getsockname              = _OS2getsockname@12                @6
-  getsockopt               = _OS2getsockopt@20                 @7
-  htonl                    = _OS2htonl@4                       @8
-  htons                    = _OS2htons@4                       @9
-  inet_addr                = _OS2inet_addr@4                   @10
-  inet_ntoa                = _OS2inet_ntoa@4                   @11
-  ioctlsocket              = _OS2ioctlsocket@12                @12
-  listen                   = _OS2listen@8                      @13
-  ntohl                    = _OS2ntohl@4                       @14
-  ntohs                    = _OS2ntohs@4                       @15
-  recv                     = _OS2recv@16                       @16
-  recvfrom                 = _OS2recvfrom@24                   @17
-  select                   = _OS2select@20                     @18
-  send                     = _OS2send@16                       @19
-  sendto                   = _OS2sendto@24                     @20
-  setsockopt               = _OS2setsockopt@20                 @21
-  shutdown                 = _OS2shutdown@8                    @22
-  socket                   = _OS2socket@12                     @23
-  gethostbyaddr            = _OS2gethostbyaddr@12              @51
-  gethostbyname            = _OS2gethostbyname@4               @52
-  getprotobyname           = _OS2getprotobyname@4              @53
-  getprotobynumber         = _OS2getprotobynumber@4            @54
-  getservbyname            = _OS2getservbyname@8               @55
-  getservbyport            = _OS2getservbyport@8               @56
-  gethostname              = _OS2gethostname@8                 @57
+   gethostbyaddr =       	_OS2gethostbyaddr@12      		@51
+   gethostbyname =       	_OS2gethostbyname@4      		@52
+   getprotobyname =       	_OS2getprotobyname@4      		@53
+   getprotobynumber =       	_OS2getprotobynumber@4      		@54
+   getservbyname =       	_OS2getservbyname@8      		@55
+   getservbyport =       	_OS2getservbyport@8      		@56
+   gethostname =       	_OS2gethostname@8      			@57
 
-  WSAAsyncSelect           = _OS2WSAAsyncSelect@16             @101
-  WSAAsyncGetHostByAddr    = _OS2WSAAsyncGetHostByAddr@28      @102
-  WSAAsyncGetHostByName    = _OS2WSAAsyncGetHostByName@20      @103
-  WSAAsyncGetProtoByNumber = _OS2WSAAsyncGetProtoByNumber@20   @104
-  WSAAsyncGetProtoByName   = _OS2WSAAsyncGetProtoByName@20     @105   
-  WSAAsyncGetServByPort    = _OS2WSAAsyncGetServByPort@24      @106 
-  WSAAsyncGetServByName    = _OS2WSAAsyncGetServByName@24      @107 
-  WSACancelAsyncRequest    = _OS2WSACancelAsyncRequest@4       @108
-  WSASetBlockingHook       = _OS2WSASetBlockingHook@4          @109
-  WSAUnhookBlockingHook    = _OS2WSAUnhookBlockingHook@0       @110
-  WSAGetLastError          = _OS2WSAGetLastError@0             @111      
-  WSASetLastError          = _OS2WSASetLastError@4             @112
-  WSACancelBlockingCall    = _OS2WSACancelBlockingCall@0       @113
-  WSAIsBlocking            = _OS2WSAIsBlocking@0               @114
-  WSAStartup               = _OS2WSAStartup@8                  @115
-  WSACleanup               = _OS2WSACleanup@0                  @116
-  __WSAFDIsSet             = _OS2__WSAFDIsSet@8                @151
+   WSAAsyncSelect =       	_OS2WSAAsyncSelect@16      		@101
+   WSAAsyncGetHostByAddr =  	_OS2WSAAsyncGetHostByAddr@28   		@102
+   WSAAsyncGetHostByName =   _OS2WSAAsyncGetHostByName@20  		@103
+   WSAAsyncGetProtoByNumber =_OS2WSAAsyncGetProtoByNumber@20  	@104
+   WSAAsyncGetProtoByName =  _OS2WSAAsyncGetProtoByName@20	  	@105   
+   WSAAsyncGetServByPort =   _OS2WSAAsyncGetServByPort@24     	@106 
+   WSAAsyncGetServByName =   _OS2WSAAsyncGetServByName@24     	@107 
+   WSACancelAsyncRequest =   _OS2WSACancelAsyncRequest@4      	@108
+   WSASetBlockingHook =      _OS2WSASetBlockingHook@4      		@109
+   WSAUnhookBlockingHook =   _OS2WSAUnhookBlockingHook@0      	@110
+   WSAGetLastError =       	_OS2WSAGetLastError@0			@111      
+   WSASetLastError =       	_OS2WSASetLastError@4      		@112
+   WSACancelBlockingCall =   _OS2WSACancelBlockingCall@0      	@113
+   WSAIsBlocking =       	_OS2WSAIsBlocking@0     		@114
+   WSAStartup =       	_OS2WSAStartup@8      			@115
+   WSACleanup =       	_OS2WSACleanup@0			@116
 
-; Arecv                    = _OS2Arecv
-; Asend                    = _OS2Asend
-; EnumProtocolsA           = _OS2EnumProtocolsA
-; EnumProtocolsW           = _OS2EnumProtocolsW
-; GetAddressByNameA        = _OS2GetAddressByNameA
-; GetAddressByNameW        = _OS2GetAddressByNameW
-; GetNameByTypeA           = _OS2GetNameByTypeA
-; GetNameByTypeW           = _OS2GetNameByTypeW
-; GetServiceA              = _OS2GetServiceA
-; GetServiceW              = _OS2GetServiceW
-; GetTypeByNameA           = _OS2GetTypeByNameA
-; GetTypeByNameW           = _OS2GetTypeByNameW
-; NPLoadNameSpaces         = _OS2NPLoadNameSpaces
-; SetServiceA              = _OS2SetServiceA
-; SetServiceW              = _OS2SetServiceW
-; TransmitFile             = _OS2TransmitFile
-; WsControl                = _OS2WsControl                     @1000
-; closesockinfo            = _OS2closesockinfo                 @1001
-; WSHEnumProtocols         = _OS2WSHEnumProtocols              @1004
-; inet_network             = _OS2inet_network                  @1100
-; getnetbyname             = _OS2getnetbyname                  @1101
-; rcmd                     = _OS2rcmd                          @1102
-; rexec                    = _OS2rexec                         @1103
-; rresvport                = _OS2rresvport                     @1104
-; sethostname              = _OS2sethostname                   @1105
-; dn_expand                = _OS2dn_expand                     @1106
+   __WSAFDIsSet =       	_OS2__WSAFDIsSet@8      		@151
 
-  WSARecvEx                = _OS2WSARecvEx@16                  @1107      	
-  s_perror                 = _OS2s_perror@8                    @1108
+;   WsControl = 		_OS2WsControl				@1000
+;   closesockinfo = 		_OS2closesockinfo			@1001
+;   WSHEnumProtocols = 	_OS2WSHEnumProtocols			@1004
+;   inet_network = 		_OS2inet_network			@1100
+;   getnetbyname = 		_OS2getnetbyname			@1101
+;   rcmd = 			_OS2rcmd				@1102
+;   rexec =       		_OS2rexec				@1103
+;   rresvport = 		_OS2rresvport				@1104
+;   sethostname = 		_OS2sethostname				@1105
+;   dn_expand = 		_OS2dn_expand				@1106
+   WSARecvEx =       	_OS2WSARecvEx@16			@1107      	
+   s_perror = 		_OS2s_perror@8				@1108
+
+_OS2gethostname@8                            @2000
Index: trunk/src/wsock32/wsock32.h
===================================================================
--- trunk/src/wsock32/wsock32.h	(revision 45)
+++ trunk/src/wsock32/wsock32.h	(revision 46)
@@ -1,4 +1,2 @@
-/* $Id: wsock32.h,v 1.1 1999-05-24 20:20:10 ktk Exp $ */
-
 /* WSOCK32.H--definitions & conversions for Odin's wsock32.dll. 
  * Unused/unneeded Microsoft declarations removed.
@@ -17,7 +15,4 @@
 
 #define FAR
-#define PASCAL __stdcall
-#define WINAPI __stdcall
-#define WIN32API __stdcall
 
 #ifndef IN
@@ -669,125 +664,125 @@
 #endif
 
-SOCKET PASCAL FAR OS2accept (SOCKET s, struct sockaddr *addr,
+SOCKET WIN32API FAR OS2accept (SOCKET s, struct sockaddr *addr,
                           int *addrlen);
 
-int PASCAL FAR OS2bind (SOCKET s, const struct sockaddr FAR *addr, int namelen);
-
-int PASCAL FAR OS2closesocket (SOCKET s);
-
-int PASCAL FAR OS2connect (SOCKET s, const struct sockaddr FAR *name, int namelen);
-
-int PASCAL FAR OS2ioctlsocket (SOCKET s, long cmd, u_long FAR *argp);
-
-int PASCAL FAR OS2getpeername (SOCKET s, struct sockaddr FAR *name,
+int WIN32API FAR OS2bind (SOCKET s, const struct sockaddr FAR *addr, int namelen);
+
+int WIN32API FAR OS2closesocket (SOCKET s);
+
+int WIN32API FAR OS2connect (SOCKET s, const struct sockaddr FAR *name, int namelen);
+
+int WIN32API FAR OS2ioctlsocket (SOCKET s, long cmd, u_long FAR *argp);
+
+int WIN32API FAR OS2getpeername (SOCKET s, struct sockaddr FAR *name,
                             int FAR * namelen);
 
-int PASCAL FAR OS2getsockname (SOCKET s, struct sockaddr FAR *name,
+int WIN32API FAR OS2getsockname (SOCKET s, struct sockaddr FAR *name,
                             int FAR * namelen);
 
-int PASCAL FAR OS2getsockopt (SOCKET s, int level, int optname,
+int WIN32API FAR OS2getsockopt (SOCKET s, int level, int optname,
                            char FAR * optval, int FAR *optlen);
 
-u_long PASCAL FAR OS2htonl (u_long hostlong);
-
-u_short PASCAL FAR OS2htons (u_short hostshort);
-
-unsigned long PASCAL FAR OS2inet_addr (const char FAR * cp);
-
-char FAR * PASCAL FAR OS2inet_ntoa (struct in_addr in);
-
-int PASCAL FAR OS2listen (SOCKET s, int backlog);
-
-u_long PASCAL FAR OS2ntohl (u_long netlong);
-
-u_short PASCAL FAR OS2ntohs (u_short netshort);
-
-int PASCAL FAR OS2recv (SOCKET s, char FAR * buf, int len, int flags);
-
-int PASCAL FAR OS2recvfrom (SOCKET s, char FAR * buf, int len, int flags,
+u_long WIN32API FAR OS2htonl (u_long hostlong);
+
+u_short WIN32API FAR OS2htons (u_short hostshort);
+
+unsigned long WIN32API FAR OS2inet_addr (const char FAR * cp);
+
+char FAR * WIN32API FAR OS2inet_ntoa (struct in_addr in);
+
+int WIN32API FAR OS2listen (SOCKET s, int backlog);
+
+u_long WIN32API FAR OS2ntohl (u_long netlong);
+
+u_short WIN32API FAR OS2ntohs (u_short netshort);
+
+int WIN32API FAR OS2recv (SOCKET s, char FAR * buf, int len, int flags);
+
+int WIN32API FAR OS2recvfrom (SOCKET s, char FAR * buf, int len, int flags,
                          struct sockaddr FAR *from, int FAR * fromlen);
 
-int PASCAL FAR OS2select (int nfds, Wfd_set FAR *readfds, Wfd_set FAR *writefds,
+int WIN32API FAR OS2select (int nfds, Wfd_set FAR *readfds, Wfd_set FAR *writefds,
                        Wfd_set FAR *exceptfds, const struct Wtimeval FAR *timeout);
 
-int PASCAL FAR OS2send (SOCKET s, const char FAR * buf, int len, int flags);
-
-int PASCAL FAR OS2sendto (SOCKET s, const char FAR * buf, int len, int flags,
+int WIN32API FAR OS2send (SOCKET s, const char FAR * buf, int len, int flags);
+
+int WIN32API FAR OS2sendto (SOCKET s, const char FAR * buf, int len, int flags,
                        const struct sockaddr FAR *to, int tolen);
 
-int PASCAL FAR OS2setsockopt (SOCKET s, int level, int optname,
+int WIN32API FAR OS2setsockopt (SOCKET s, int level, int optname,
                            const char FAR * optval, int optlen);
 
-int PASCAL FAR OS2shutdown (SOCKET s, int how);
-
-SOCKET PASCAL FAR OS2socket (int af, int type, int protocol);
+int WIN32API FAR OS2shutdown (SOCKET s, int how);
+
+SOCKET WIN32API FAR OS2socket (int af, int type, int protocol);
 
 /* Database function prototypes */
 
-struct Whostent FAR * PASCAL FAR OS2gethostbyaddr(const char FAR * addr,
+struct Whostent FAR * WIN32API FAR OS2gethostbyaddr(const char FAR * addr,
                                               int len, int type);
 
-struct Whostent FAR * PASCAL FAR OS2gethostbyname(const char FAR * name);
-
-int PASCAL FAR OS2gethostname (char FAR * name, int namelen);
-
-struct Wservent FAR * PASCAL FAR OS2getservbyport(int port, const char FAR * proto);
-
-struct Wservent FAR * PASCAL FAR OS2getservbyname(const char FAR * name,
+struct Whostent FAR * WIN32API FAR OS2gethostbyname(const char FAR * name);
+
+int WIN32API FAR OS2gethostname (char FAR * name, int namelen);
+
+struct Wservent FAR * WIN32API FAR OS2getservbyport(int port, const char FAR * proto);
+
+struct Wservent FAR * WIN32API FAR OS2getservbyname(const char FAR * name,
                                               const char FAR * proto);
 
-struct Wprotoent FAR * PASCAL FAR OS2getprotobynumber(int proto);
-
-struct Wprotoent FAR * PASCAL FAR OS2getprotobyname(const char FAR * name);
+struct Wprotoent FAR * WIN32API FAR OS2getprotobynumber(int proto);
+
+struct Wprotoent FAR * WIN32API FAR OS2getprotobyname(const char FAR * name);
 
 /* Microsoft Windows Extension function prototypes */
 
-int PASCAL FAR OS2WSAStartup(WORD wVersionRequired, LPWSADATA lpWSAData);
-
-int PASCAL FAR OS2WSACleanup(void);
-
-void PASCAL FAR OS2WSASetLastError(int iError);
-
-int PASCAL FAR OS2WSAGetLastError(void);
-
-BOOL PASCAL FAR OS2WSAIsBlocking(void);
-
-int PASCAL FAR OS2WSAUnhookBlockingHook(void);
-
-FARPROC PASCAL FAR OS2WSASetBlockingHook(FARPROC lpBlockFunc);
-
-int PASCAL FAR OS2WSACancelBlockingCall(void);
-
-HANDLE PASCAL FAR OS2WSAAsyncGetServByName(HWND hWnd, u_int wMsg,
+int WIN32API FAR OS2WSAStartup(WORD wVersionRequired, LPWSADATA lpWSAData);
+
+int WIN32API FAR OS2WSACleanup(void);
+
+void WIN32API FAR OS2WSASetLastError(int iError);
+
+int WIN32API FAR OS2WSAGetLastError(void);
+
+BOOL WIN32API FAR OS2WSAIsBlocking(void);
+
+int WIN32API FAR OS2WSAUnhookBlockingHook(void);
+
+FARPROC WIN32API FAR OS2WSASetBlockingHook(FARPROC lpBlockFunc);
+
+int WIN32API FAR OS2WSACancelBlockingCall(void);
+
+HANDLE WIN32API FAR OS2WSAAsyncGetServByName(HWND hWnd, u_int wMsg,
                                         const char FAR * name,
                                         const char FAR * proto,
                                         char FAR * buf, int buflen);
 
-HANDLE PASCAL FAR OS2WSAAsyncGetServByPort(HWND hWnd, u_int wMsg, int port,
+HANDLE WIN32API FAR OS2WSAAsyncGetServByPort(HWND hWnd, u_int wMsg, int port,
                                         const char FAR * proto, char FAR * buf,
                                         int buflen);
 
-HANDLE PASCAL FAR OS2WSAAsyncGetProtoByName(HWND hWnd, u_int wMsg,
+HANDLE WIN32API FAR OS2WSAAsyncGetProtoByName(HWND hWnd, u_int wMsg,
                                          const char FAR * name, char FAR * buf,
                                          int buflen);
 
-HANDLE PASCAL FAR OS2WSAAsyncGetProtoByNumber(HWND hWnd, u_int wMsg,
+HANDLE WIN32API FAR OS2WSAAsyncGetProtoByNumber(HWND hWnd, u_int wMsg,
                                            int number, char FAR * buf,
                                            int buflen);
 
-HANDLE PASCAL FAR OS2WSAAsyncGetHostByName(HWND hWnd, u_int wMsg,
+HANDLE WIN32API FAR OS2WSAAsyncGetHostByName(HWND hWnd, u_int wMsg,
                                         const char FAR * name, char FAR * buf,
                                         int buflen);
 
-HANDLE PASCAL FAR OS2WSAAsyncGetHostByAddr(HWND hWnd, u_int wMsg,
+HANDLE WIN32API FAR OS2WSAAsyncGetHostByAddr(HWND hWnd, u_int wMsg,
                                         const char FAR * addr, int len, int type,
                                         char FAR * buf, int buflen);
 
-int PASCAL FAR OS2WSACancelAsyncRequest(HANDLE hAsyncTaskHandle);
-
-int PASCAL FAR OS2WSAAsyncSelect(SOCKET s, HWND hWnd, u_int wMsg,
+int WIN32API FAR OS2WSACancelAsyncRequest(HANDLE hAsyncTaskHandle);
+
+int WIN32API FAR OS2WSAAsyncSelect(SOCKET s, HWND hWnd, u_int wMsg,
                                long lEvent);
 
-int PASCAL FAR OS2WSARecvEx (SOCKET s, char FAR * buf, int len, int FAR *flags);
+int WIN32API FAR OS2WSARecvEx (SOCKET s, char FAR * buf, int len, int FAR *flags);
 
 typedef struct _TRANSMIT_FILE_BUFFERS {
@@ -809,5 +804,5 @@
 
 BOOL
-PASCAL FAR
+WIN32API FAR
 OS2TransmitFile (
     IN SOCKET hSocket,
