Index: trunk/src/ddraw/OS2CLIPPER.CPP
===================================================================
--- trunk/src/ddraw/OS2CLIPPER.CPP	(revision 521)
+++ trunk/src/ddraw/OS2CLIPPER.CPP	(revision 522)
@@ -8,5 +8,4 @@
 #include "misc.h"
 #include <winerror.h>
-#include <odincrt.h>
 
 //******************************************************************************
@@ -84,5 +83,5 @@
     if(me->Referenced == 0)
     {
-      ODIN_delete( me);
+      delete( me);
       return(0);
     }
Index: trunk/src/ddraw/OS2D3D.CPP
===================================================================
--- trunk/src/ddraw/OS2D3D.CPP	(revision 521)
+++ trunk/src/ddraw/OS2D3D.CPP	(revision 522)
@@ -11,5 +11,4 @@
 #include <winerror.h>
 #include <builtin.h>
-#include <odincrt.h>
 #undef THIS
 #define THIS VOID*
@@ -52,5 +51,5 @@
     if(me->Referenced == 0)
     {
-      ODIN_delete(me);
+      delete(me);
       return(0);
     }
Index: trunk/src/ddraw/OS2DDRAW.CPP
===================================================================
--- trunk/src/ddraw/OS2DDRAW.CPP	(revision 521)
+++ trunk/src/ddraw/OS2DDRAW.CPP	(revision 522)
@@ -22,5 +22,5 @@
 #include "os2DDWindow.h"
 #include "os2palset.h"
-#include <odincrt.h>
+
 #define KEY_DIRECT2 "\\Software\\Win32OS2\\Direct2"
 #define KEY_DIRECT2DRAW "\\Software\\Win32OS2\\Direct2\\Draw"
@@ -128,9 +128,7 @@
   }
 
-  ODIN_FS_BEGIN
-    rc = DiveOpen( &hDive,
-                   FALSE,
-                   &pFrameBuffer);
-  ODIN_FS_END
+  rc = DiveOpen( &hDive,
+                 FALSE,
+                 &pFrameBuffer);
   if(rc)
   {
@@ -242,5 +240,5 @@
     if(me->Referenced == 0)
     {
-      ODIN_delete(me);
+      delete(me);
       rc = 0;
     }
@@ -271,6 +269,4 @@
  HRESULT                rc;
 
- ODIN_FS_BEGIN
-
   newclip = new OS2IDirectDrawClipper(me);
 
@@ -295,6 +291,4 @@
       *lplpDD = (IDirectDrawClipper *)newclip;
   }
-
-  ODIN_FS_END
 
   return(rc);
@@ -311,6 +305,4 @@
   HRESULT                rc = DD_OK;
   int                    palsize = 0;
-
-  ODIN_FS_BEGIN
 
   if(dwFlags & DDPCAPS_8BITENTRIES)
@@ -360,6 +352,4 @@
   }
 
-  ODIN_FS_END
-
   return(rc);
 }
@@ -373,6 +363,4 @@
  OS2IDirectDrawSurface *newsurf;
  HRESULT                rc;
-
-  ODIN_FS_BEGIN
 
   #ifdef DEBUG
@@ -410,6 +398,4 @@
   }
 
-  ODIN_FS_END
-
   return(rc);
 }
@@ -423,6 +409,4 @@
  OS2IDirectDrawSurface *newsurf;
  HRESULT                rc;
-
-  ODIN_FS_BEGIN
 
   #ifdef DEBUG
@@ -461,6 +445,4 @@
   }
 
-  ODIN_FS_END
-
   return(rc);
 }
@@ -508,6 +490,4 @@
   }
 
-
-  ODIN_FS_BEGIN
 
   // Setting up the surface
@@ -538,5 +518,4 @@
         if(!lpDDEnumModesCallback(&DDSurfAct,lpContext))
         {
-          {ODIN_FS_END
           return (DD_OK);
         }
@@ -610,5 +589,4 @@
         if(!lpDDEnumModesCallback(&DDSurfAct,lpContext))
         {
-          {ODIN_FS_END
           return (DD_OK);
         }
@@ -682,5 +660,4 @@
       if (lpDDSurfaceDesc->dwFlags & !(DDSD_WIDTH|DDSD_HEIGHT|DDSD_PIXELFORMAT))
       {
-        {ODIN_FS_END
         return(DDERR_INVALIDPARAMS);
       }
@@ -717,5 +694,5 @@
   }
 
-  ODIN_FS_END
+  
 
   return(DD_OK);
@@ -786,7 +763,7 @@
     // Clear structure so we only have to set the supported flags
 
-    ODIN_FS_BEGIN
+    
     memset(lpDDDriverCaps,0,sizeof(DDCAPS));
-    ODIN_FS_END
+    
 
     // Reset the size
@@ -1160,5 +1137,5 @@
     return(DDERR_INVALIDPARAMS);
 
-  ODIN_FS_BEGIN
+  
 
   if(DD_OK==DrawWaitForVerticalBlank(This, dwFlags, 0))
@@ -1183,5 +1160,5 @@
   }
 
-  ODIN_FS_END
+  
 
   return(DD_OK);
@@ -1222,14 +1199,14 @@
     return(DDERR_INVALIDPARAMS);
 
-  ODIN_FS_BEGIN
+  
     rc = io_init1();
-  ODIN_FS_END
+  
 
   if(0==rc)  // try to get IOPL for the thread
   {
     *lpbIsInVB = (c_inb1(0x3da)&0x08)!=0;
-    ODIN_FS_BEGIN
+    
       io_exit1(); // reset IOPL
-    ODIN_FS_END
+    
     return(DD_OK);
   }
@@ -1340,7 +1317,7 @@
     return (DDERR_UNSUPPORTED);
 
-  ODIN_FS_BEGIN
+  
     rci = io_init1();
-  ODIN_FS_END
+  
 
   if(rci)  // try to get IOPL for the thread
@@ -1373,7 +1350,7 @@
   }
 
-  ODIN_FS_BEGIN
+  
     io_exit1();
-  ODIN_FS_END
+  
 
   return (rc);
@@ -1472,5 +1449,5 @@
     return DDERR_INVALIDPARAMS;
 
-  ODIN_FS_BEGIN
+  
 
   memset( lpdddi,
@@ -1483,5 +1460,5 @@
           "ODIN DD Emulation Driver");
 
-  ODIN_FS_END
+  
 
   return(DD_OK);
@@ -1494,5 +1471,5 @@
   HKEY hkDirectDraw2;
 
-  ODIN_FS_BEGIN
+  
 
   if (bScale)
@@ -1510,7 +1487,7 @@
   }
 
-  ODIN_FS_END
-}
-//******************************************************************************
-//******************************************************************************
-
+  
+}
+//******************************************************************************
+//******************************************************************************
+
Index: trunk/src/ddraw/OS2PALETTE.CPP
===================================================================
--- trunk/src/ddraw/OS2PALETTE.CPP	(revision 521)
+++ trunk/src/ddraw/OS2PALETTE.CPP	(revision 522)
@@ -10,5 +10,4 @@
 #include "os2palset.h"
 #include <winerror.h>
-#include <odincrt.h>
 
 //******************************************************************************
@@ -97,5 +96,5 @@
     if(me->Referenced == 0)
     {
-      ODIN_delete(me);
+      delete(me);
       return(0);
     }
@@ -142,11 +141,7 @@
     return(DDERR_INVALIDPARAMS);
 
-  ODIN_FS_BEGIN
-
   memcpy( (char *)lpEntries,
           (char *)(me->os2pal + dwBase),
           dwNumEntries*sizeof(PALETTEENTRY));
-
-  ODIN_FS_END
 
   return(DD_OK);
@@ -176,11 +171,7 @@
     return(DDERR_INVALIDPARAMS);
 
-  ODIN_FS_BEGIN
-
   memcpy((char *)(me->os2pal + dwBase),
          (char *)lpNewEntries,
          dwNumEntries*sizeof(PALETTEENTRY));
-
-  ODIN_FS_END
 
   if(me->fAttachedToPrimary)
Index: trunk/src/ddraw/OS2PALSET.CPP
===================================================================
--- trunk/src/ddraw/OS2PALSET.CPP	(revision 521)
+++ trunk/src/ddraw/OS2PALSET.CPP	(revision 522)
@@ -7,5 +7,5 @@
 #include <string.h>
 #include "os2palset.h"
-#include <odincrt.h>
+
 //******************************************************************************
 //******************************************************************************
@@ -18,5 +18,5 @@
  int  i;
 
-  ODIN_FS_BEGIN
+  
 
   hps = WinGetPS(HWND_DESKTOP);
@@ -45,5 +45,5 @@
   WinReleasePS(hps);
 
-  ODIN_FS_END
+  
 
 }
@@ -55,5 +55,5 @@
  HDC hdc;
 
-  ODIN_FS_BEGIN
+  
 
   hps = WinGetPS( HWND_DESKTOP);
@@ -71,5 +71,5 @@
   WinReleasePS(hps);
 
-  ODIN_FS_END
+  
 
 }
Index: trunk/src/ddraw/OS2SURFACE.CPP
===================================================================
--- trunk/src/ddraw/OS2SURFACE.CPP	(revision 521)
+++ trunk/src/ddraw/OS2SURFACE.CPP	(revision 522)
@@ -13,5 +13,4 @@
 #include "asmutil.h"
 #include <winerror.h>
-#include <odincrt.h>
 
 #ifndef __WATCOMC__
@@ -994,7 +993,4 @@
   pFillPos = pLine + dwPitchDB;
 
-  #ifndef USE_ASM
-    ODIN_FS_BEGIN
-  #endif
   for( y=0;y<FillHeight;y++,pFillPos+=dwPitchDB)
   {
@@ -1008,7 +1004,4 @@
     #endif
   }
-  #ifndef USE_ASM
-    ODIN_FS_END
-  #endif
 
   return(DD_OK);
@@ -1234,5 +1227,5 @@
 {
   DDRectangle *pItem = (DDRectangle*) lpItem;
-  ODIN_delete(pItem);
+  delete(pItem);
   return 1;
 }
@@ -1252,5 +1245,4 @@
   OS2IDirectDrawSurface  *AttachedSurface;
 
-  ODIN_FS_BEGIN
 
   if(DDSurfaceDesc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)
@@ -1328,6 +1320,4 @@
 
   lpDraw->Vtbl.Release(lpDraw);
-
-  ODIN_FS_END
 
 }
@@ -1420,5 +1410,5 @@
     if(me->Referenced == 0)
     {
-      ODIN_delete( me);
+      delete( me);
       #ifndef __WATCOMC__
         //_interrupt(3);
@@ -1482,9 +1472,7 @@
       if(me->DDSurfaceDesc.ddsCaps.dwCaps & DDSCAPS_MIPMAP)
       {
-        ODIN_FS_BEGIN
           rc = DPA_InsertPtr( me->DPA_SurfaceMipMaps,
                               DPA_GetPtrCount(me->DPA_SurfaceMipMaps),
                               AttachedSurface);
-        ODIN_FS_END
 
         if( rc>=0)
@@ -1513,9 +1501,7 @@
     else
     {
-      ODIN_FS_BEGIN
         rc = DPA_InsertPtr( me->DPA_SurfaceAttached,
                             DPA_GetPtrCount(me->DPA_SurfaceAttached),
                             AttachedSurface);
-      ODIN_FS_END
 
       if(rc>=0)
@@ -1711,5 +1697,4 @@
   #endif
 
-  ODIN_FS_BEGIN
 
   if (NULL!=lpDestRect)
@@ -1760,10 +1745,7 @@
         WriteLog("Blt: Dest Surface partly locked\n");
       #endif
-      {ODIN_FS_END
       return(DDERR_SURFACEBUSY);
     }
   }
-
-  ODIN_FS_END
 
   DestSurfaceDesc.dwSize = sizeof(DDSURFACEDESC2);
@@ -1853,6 +1835,4 @@
   }
 
-  ODIN_FS_BEGIN
-
   if (NULL!=lpSrcRect)
   {
@@ -1903,10 +1883,7 @@
         WriteLog("Blt: Src Surface partly locked\n");
       #endif
-      {ODIN_FS_END
       return(DDERR_SURFACEBUSY);
     }
   }
-
-  ODIN_FS_END
 
   if( ( (NULL==lpDestRect) && (NULL!=lpSrcRect) ) ||
@@ -1991,5 +1968,4 @@
         #else
         // Solid Blit
-        ODIN_FS_BEGIN
         while(1)
         {
@@ -2000,5 +1976,4 @@
             break;
         }
-        ODIN_FS_END
         #endif
       }
@@ -2055,5 +2030,4 @@
           #else
           // Solid Blit
-          ODIN_FS_BEGIN
           while(1)
           {
@@ -2064,5 +2038,4 @@
               break;
           }
-          ODIN_FS_END
           #endif
         }
@@ -2128,5 +2101,4 @@
         #else
         // Solid Blit
-        ODIN_FS_BEGIN
         while(1)
         {
@@ -2137,5 +2109,4 @@
             break;
         }
-        ODIN_FS_END
         #endif
       }
@@ -2577,6 +2548,4 @@
   }
 
-  ODIN_FS_BEGIN
-
   if (NULL!=lpSrcRect)
   {
@@ -2879,5 +2848,4 @@
   dest->lpVtbl->ChangeUniquenessValue(dest);
 
-  ODIN_FS_END
 
   return(DD_OK);
@@ -3000,5 +2968,4 @@
   }
 
-  ODIN_FS_BEGIN
 
   if ( (!Found) && (AttachedSurface->DDSurfaceDesc.ddsCaps.dwCaps &  DDSCAPS_MIPMAP ) )
@@ -3040,5 +3007,4 @@
   }
 
-  ODIN_FS_END
 
   return(Found?DD_OK:DDERR_SURFACENOTATTACHED);
@@ -3076,13 +3042,9 @@
   if(me->BackBuffer != NULL)
   {
-    ODIN_FS_BEGIN
-      memcpy(&EnumDesc,&(me->DDSurfaceDesc),sizeof(DDSURFACEDESC2));
-    ODIN_FS_END
+    memcpy(&EnumDesc,&(me->DDSurfaceDesc),sizeof(DDSURFACEDESC2));
     rc = lpCallBack((LPDIRECTDRAWSURFACE4)me->BackBuffer,&EnumDesc,lpContext);
   }
 
-  ODIN_FS_BEGIN
-    count = DPA_GetPtrCount(me->DPA_SurfaceMipMaps);
-  ODIN_FS_END
+  count = DPA_GetPtrCount(me->DPA_SurfaceMipMaps);
 
   if(count>0)
@@ -3091,10 +3053,8 @@
     while( (DDENUMRET_OK == rc) && i<count )
     {
-      ODIN_FS_BEGIN
         EnumSurface = (OS2IDirectDrawSurface*) DPA_FastGetPtr(me->DPA_SurfaceMipMaps,i);
         memcpy( &EnumDesc,
                 &(EnumSurface->DDSurfaceDesc),
                 sizeof(DDSURFACEDESC2));
-      ODIN_FS_END
       // Calling back into WIN32 app so we had to reset FS
       rc = lpCallBack((LPDIRECTDRAWSURFACE4)EnumSurface,&EnumDesc,lpContext);
@@ -3103,7 +3063,5 @@
   }
 
-  ODIN_FS_BEGIN
-    count = DPA_GetPtrCount(me->DPA_SurfaceAttached);
-  ODIN_FS_END
+  count = DPA_GetPtrCount(me->DPA_SurfaceAttached);
 
   if(count>0)
@@ -3112,10 +3070,8 @@
     while( (DDENUMRET_OK == rc) && i<count )
     {
-      ODIN_FS_BEGIN
-        EnumSurface = (OS2IDirectDrawSurface*) DPA_FastGetPtr(me->DPA_SurfaceAttached,i);
-        memcpy( &EnumDesc,
-                &(EnumSurface->DDSurfaceDesc),
-                sizeof(DDSURFACEDESC2));
-      ODIN_FS_END
+      EnumSurface = (OS2IDirectDrawSurface*) DPA_FastGetPtr(me->DPA_SurfaceAttached,i);
+      memcpy( &EnumDesc,
+              &(EnumSurface->DDSurfaceDesc),
+              sizeof(DDSURFACEDESC2));
       rc = lpCallBack((LPDIRECTDRAWSURFACE4)EnumSurface,&EnumDesc,lpContext);
       i++;
@@ -3305,5 +3261,4 @@
   }
 
-  ODIN_FS_BEGIN
 
   rc = DD_OK;
@@ -3367,5 +3322,4 @@
   }
 
-  ODIN_FS_END
 
   return rc;
@@ -3410,7 +3364,5 @@
     return(DDERR_INVALIDPARAMS);
 
-  ODIN_FS_BEGIN
-    memcpy(lpDDCaps, &(me->DDSurfaceDesc.ddsCaps), sizeof(DDSCAPS2) );
-  ODIN_FS_END
+  memcpy(lpDDCaps, &(me->DDSurfaceDesc.ddsCaps), sizeof(DDSCAPS2) );
 
   return(DD_OK);
@@ -3455,7 +3407,5 @@
     if(DDCKEY_SRCBLT & dwFlags)
     {
-      ODIN_FS_BEGIN
-        memcpy(lpDDColKey,&(me->DDSurfaceDesc.ddckCKSrcBlt),sizeof(DDCOLORKEY) );
-      ODIN_FS_END
+      memcpy(lpDDColKey,&(me->DDSurfaceDesc.ddckCKSrcBlt),sizeof(DDCOLORKEY) );
     }
     else
@@ -3493,6 +3443,4 @@
     return(DDERR_DCALREADYCREATED);
   }
-
-  ODIN_FS_BEGIN
 
   rc = DD_OK;
@@ -3641,6 +3589,4 @@
   }
 
-  ODIN_FS_END
-
   return rc;
 }
@@ -3717,10 +3663,7 @@
     return DDERR_INVALIDPARAMS;
 
-  ODIN_FS_BEGIN
-    memcpy( (char*)lpPixelFormat,
-            (char*)&(me->DDSurfaceDesc.ddpfPixelFormat),
-            sizeof(DDPIXELFORMAT));
-  ODIN_FS_END
-
+  memcpy( (char*)lpPixelFormat,
+          (char*)&(me->DDSurfaceDesc.ddpfPixelFormat),
+          sizeof(DDPIXELFORMAT));
 
   return(DD_OK);
@@ -3739,9 +3682,7 @@
     return(DDERR_INVALIDPARAMS);
 
-  ODIN_FS_BEGIN
-    memcpy( (char *)lpSurface,
-            (char *)&me->DDSurfaceDesc,
-            sizeof(DDSURFACEDESC));
-  ODIN_FS_END
+  memcpy( (char *)lpSurface,
+          (char *)&me->DDSurfaceDesc,
+          sizeof(DDSURFACEDESC));
 
   return(DD_OK);
@@ -3760,9 +3701,7 @@
     return(DDERR_INVALIDPARAMS);
 
-  ODIN_FS_BEGIN
-    memcpy( (char *)lpSurface,
-            (char *)&me->DDSurfaceDesc,
-            sizeof(DDSURFACEDESC2));
-  ODIN_FS_END
+  memcpy( (char *)lpSurface,
+          (char *)&me->DDSurfaceDesc,
+          sizeof(DDSURFACEDESC2));
 
   return(DD_OK);
@@ -3832,9 +3771,7 @@
   if (DD_OK==rc)
   {
-    ODIN_FS_BEGIN
-      memcpy( (char*)lpSurfaceDesc,
-              (char*)&SurfaceDesc4,
-              sizeof(DDSURFACEDESC) );
-    ODIN_FS_END
+    memcpy( (char*)lpSurfaceDesc,
+            (char*)&SurfaceDesc4,
+            sizeof(DDSURFACEDESC) );
   }
 
@@ -3869,5 +3806,4 @@
     return DDERR_INVALIDPARAMS;
 
-  ODIN_FS_BEGIN
 
   if (NULL!=lpRect)
@@ -3958,5 +3894,4 @@
   }
 
-  ODIN_FS_END
 
   return rc;
@@ -3980,6 +3915,4 @@
   if(hdc != me->hdcImage)
     return(DDERR_INVALIDOBJECT);
-
-  ODIN_FS_BEGIN
 
   //unselect our bitmap
@@ -4029,6 +3962,4 @@
   me->dwLastDCUnique = me->dwUniqueValue; // Store this to see if the surface was locked after we released the DC
 
-  ODIN_FS_END
-
   return(DD_OK);
 }
@@ -4097,6 +4028,4 @@
     return(DDERR_UNSUPPORTED);
 
-  ODIN_FS_BEGIN
-
   if(DDCKEY_SRCBLT & dwFlags)
   {
@@ -4118,6 +4047,4 @@
   else
     rc = DDERR_INVALIDPARAMS; // some other flags where set => error
-
-  ODIN_FS_END
 
   return rc;
@@ -4230,6 +4157,4 @@
     return(DDERR_NOTLOCKED);
   }
-
-  ODIN_FS_BEGIN
 
   #ifdef DEBUG
@@ -4377,6 +4302,4 @@
   }
 
-  ODIN_FS_END
-
   return rc;
 }
@@ -4411,6 +4334,4 @@
   }
 
-  ODIN_FS_BEGIN
-
   if(NULL!=lpSurfaceRect)
   {
@@ -4508,6 +4429,4 @@
   }
 
-  ODIN_FS_END
-
   return rc;
 }
@@ -4611,6 +4530,4 @@
     return DDERR_INVALIDSURFACETYPE; // only work for system alloced surfaces
 
-  ODIN_FS_BEGIN
-
   if (!me->Updated)
   {
@@ -4622,6 +4539,4 @@
   me->lpVtbl->ChangeUniquenessValue(me);
   memcpy((char *)&(me->DDSurfaceDesc), (char *)lpSurfDesc, sizeof(DDSURFACEDESC));
-
-  ODIN_FS_END
 
   return DD_OK;
@@ -4646,6 +4561,4 @@
     return DDERR_INVALIDSURFACETYPE; // only work for system alloced surfaces
 
-  ODIN_FS_BEGIN
-
   if (!me->Updated)
   {
@@ -4657,6 +4570,4 @@
   me->lpVtbl->ChangeUniquenessValue(me);
   memcpy((char *)&(me->DDSurfaceDesc), (char *)lpSurfDesc, sizeof(DDSURFACEDESC2));
-
-  ODIN_FS_END
 
   return DD_OK;
@@ -4686,6 +4597,4 @@
      (dwFlags & ~(DDSPD_IUNKNOWNPOINTER|DDSPD_VOLATILE)))
     return(DDERR_INVALIDPARAMS);
-
-  ODIN_FS_BEGIN
 
   // first check if the refGUID is stored as then the content will be updated
@@ -4849,6 +4758,4 @@
   }
 
-  ODIN_FS_END
-
   return rc;
 }
@@ -4873,6 +4780,4 @@
     return(DDERR_INVALIDPARAMS);
 
-  ODIN_FS_BEGIN
-
   if(DPA_GetPtrCount(me->DPA_SurfacePrivateData)>0)
   {
@@ -4913,5 +4818,4 @@
    rc = DDERR_NOTFOUND;
 
-  ODIN_FS_END
 
   return rc;
@@ -4932,6 +4836,4 @@
   if(NULL==me)
     return(DDERR_INVALIDOBJECT);
-
-  ODIN_FS_BEGIN
 
   if(DPA_GetPtrCount(me->DPA_SurfacePrivateData)>0)
@@ -4967,6 +4869,4 @@
   }
 
-  ODIN_FS_END
-
   return (bFound?DD_OK:DDERR_NOTFOUND);
 }
@@ -4993,5 +4893,4 @@
   PSURFPRIVATEDATA pSData;
 
-  ODIN_FS_BEGIN
 
   #ifdef DEBUG
@@ -5026,6 +4925,4 @@
   }
 
-  ODIN_FS_END
-
   return (DD_OK);
 }
@@ -5043,6 +4940,4 @@
   int BlitWidth,BlitHeight;
   static char Scanline[6400];  // sufficient for 1600 at 32 bit
-
-  ODIN_FS_BEGIN
 
   // Bridge, we may got a problem ;)
@@ -5107,5 +5002,4 @@
   }
 
-  ODIN_FS_END
 }
 
Index: trunk/src/ddraw/OS2UTIL.CPP
===================================================================
--- trunk/src/ddraw/OS2UTIL.CPP	(revision 521)
+++ trunk/src/ddraw/OS2UTIL.CPP	(revision 522)
@@ -1,3 +1,3 @@
-/* $Id: OS2UTIL.CPP,v 1.4 1999-08-16 00:40:48 hugh Exp $ */
+/* $Id: OS2UTIL.CPP,v 1.5 1999-08-17 12:44:46 sandervl Exp $ */
 
 /*
@@ -10,5 +10,5 @@
  */
 #define INCL_DOSMEMMGR
-#include <os2.h>
+#include <os2wrap.h>
 #include "misc.h"
 #include "os2util.h"
@@ -43,7 +43,5 @@
 void OS2MaximizeWindow(HWND hwndClient)
 {
-  ODIN_FS_BEGIN
   WinSetWindowPos(hwndClient, HWND_TOP, 0, 0, 0, 0, SWP_MAXIMIZE);
-  ODIN_FS_END
 }
 
Index: trunk/src/ddraw/ddraw.CPP
===================================================================
--- trunk/src/ddraw/ddraw.CPP	(revision 521)
+++ trunk/src/ddraw/ddraw.CPP	(revision 522)
@@ -2,5 +2,4 @@
 
 #include <builtin.h>
-#include <odincrt.h>
 #define INITGUID
 #include "os2ddraw.h"
@@ -18,6 +17,4 @@
   OS2IDirectDraw *newdraw;
   HRESULT         rc;
-
-  ODIN_FS_BEGIN
 
   WriteLog("DirectDrawCreate %X %X %X\n", lpGUID, lplpDD, pUnkOuter);
@@ -42,6 +39,4 @@
       *lplpDD = (LPDIRECTDRAW)newdraw;
   }
-  ODIN_FS_END
-
   return(rc);
 }
Index: trunk/src/ddraw/divewrap.h
===================================================================
--- trunk/src/ddraw/divewrap.h	(revision 521)
+++ trunk/src/ddraw/divewrap.h	(revision 522)
@@ -8,65 +8,63 @@
   #include <dive.h>
 
+  inline ULONG APIENTRY _DiveQueryCaps ( PDIVE_CAPS a,
+                                        ULONG      b )
+  {
+    ULONG yyrc;
+    USHORT sel = RestoreOS2FS();
+
+    yyrc = DiveQueryCaps(a, b);
+    SetFS(sel);
+
+    return yyrc;
+  }
   #undef  DiveQueryCaps
   #define DiveQueryCaps _DiveQueryCaps
-  inline ULONG APIENTRY DiveQueryCaps ( PDIVE_CAPS a,
-                                        ULONG      b )
-  {
-    ULONG yyrc;
-    USHORT sel = RestoreOS2FS();
-
-    yyrc = DiveQueryCaps(a, b);
-    SetFS(sel);
-
-    return yyrc;
-  }
-
+
+  inline ULONG APIENTRY _DiveOpen ( HDIVE *a,
+                                   BOOL   b,
+                                   PVOID  c )
+  {
+    ULONG yyrc;
+    USHORT sel = RestoreOS2FS();
+
+    yyrc = DiveOpen(a, b, c);
+    SetFS(sel);
+
+    return yyrc;
+  }
   #undef  DiveOpen
   #define DiveOpen _DiveOpen
-  inline ULONG APIENTRY DiveOpen ( HDIVE *a,
-                                   BOOL   b,
-                                   PVOID  c )
-  {
-    ULONG yyrc;
-    USHORT sel = RestoreOS2FS();
-
-    yyrc = DiveOpen(a, b, c);
-    SetFS(sel);
-
-    return yyrc;
-  }
-
+
+  inline ULONG APIENTRY _DiveSetupBlitter ( HDIVE          a,
+                                           PSETUP_BLITTER b )
+  {
+    ULONG yyrc;
+    USHORT sel = RestoreOS2FS();
+
+    yyrc = DiveSetupBlitter(a, b);
+    SetFS(sel);
+
+    return yyrc;
+  }
   #undef  DiveSetupBlitter
   #define DiveSetupBlitter _DiveSetupBlitter
-  inline ULONG APIENTRY DiveSetupBlitter ( HDIVE          a,
-                                           PSETUP_BLITTER b )
-  {
-    ULONG yyrc;
-    USHORT sel = RestoreOS2FS();
-
-    yyrc = DiveSetupBlitter(a, b);
-    SetFS(sel);
-
-    return yyrc;
-  }
-
+
+  inline ULONG APIENTRY _DiveBlitImage ( HDIVE a,
+                                        ULONG b,
+                                        ULONG c )
+  {
+    ULONG yyrc;
+    USHORT sel = RestoreOS2FS();
+
+    yyrc = DiveBlitImage(a, b, c);
+    SetFS(sel);
+
+    return yyrc;
+  }
   #undef  DiveBlitImage
   #define DiveBlitImage _DiveBlitImage
-  inline ULONG APIENTRY DiveBlitImage ( HDIVE a,
-                                        ULONG b,
-                                        ULONG c )
-  {
-    ULONG yyrc;
-    USHORT sel = RestoreOS2FS();
-
-    yyrc = DiveBlitImage(a, b, c);
-    SetFS(sel);
-
-    return yyrc;
-  }
-
-  #undef  DiveBlitImageLines
-  #define DiveBlitImageLines _DiveBlitImageLines
-  inline ULONG APIENTRY DiveBlitImageLines ( HDIVE a,
+
+  inline ULONG APIENTRY _DiveBlitImageLines ( HDIVE a,
                                              ULONG b,
                                              ULONG c,
@@ -81,62 +79,62 @@
     return yyrc;
   }
-
+  #undef  DiveBlitImageLines
+  #define DiveBlitImageLines _DiveBlitImageLines
+
+  inline ULONG APIENTRY _DiveClose ( HDIVE a )
+  {
+    ULONG yyrc;
+    USHORT sel = RestoreOS2FS();
+
+    yyrc = DiveClose(a);
+    SetFS(sel);
+
+    return yyrc;
+  }
   #undef  DiveClose
   #define DiveClose _DiveClose
-  inline ULONG APIENTRY DiveClose ( HDIVE a )
-  {
-    ULONG yyrc;
-    USHORT sel = RestoreOS2FS();
-
-    yyrc = DiveClose(a);
-    SetFS(sel);
-
-    return yyrc;
-  }
-
+
+  inline ULONG APIENTRY _DiveAcquireFrameBuffer ( HDIVE   a,
+                                                 PRECTL  b )
+  {
+    ULONG yyrc;
+    USHORT sel = RestoreOS2FS();
+
+    yyrc = DiveAcquireFrameBuffer(a, b);
+    SetFS(sel);
+
+    return yyrc;
+  }
   #undef  DiveAcquireFrameBuffer
   #define DiveAcquireFrameBuffer _DiveAcquireFrameBuffer
-  inline ULONG APIENTRY DiveAcquireFrameBuffer ( HDIVE   a,
-                                                 PRECTL  b )
-  {
-    ULONG yyrc;
-    USHORT sel = RestoreOS2FS();
-
-    yyrc = DiveAcquireFrameBuffer(a, b);
-    SetFS(sel);
-
-    return yyrc;
-  }
-
+
+  inline ULONG APIENTRY _DiveSwitchBank ( HDIVE a,
+                                         ULONG b )
+  {
+    ULONG yyrc;
+    USHORT sel = RestoreOS2FS();
+
+    yyrc = DiveSwitchBank(a, b);
+    SetFS(sel);
+
+    return yyrc;
+  }
   #undef  DiveSwitchBank
   #define DiveSwitchBank _DiveSwitchBank
-  inline ULONG APIENTRY DiveSwitchBank ( HDIVE a,
-                                         ULONG b )
-  {
-    ULONG yyrc;
-    USHORT sel = RestoreOS2FS();
-
-    yyrc = DiveSwitchBank(a, b);
-    SetFS(sel);
-
-    return yyrc;
-  }
-
+
+  inline ULONG APIENTRY _DiveDeacquireFrameBuffer ( HDIVE a )
+  {
+    ULONG yyrc;
+    USHORT sel = RestoreOS2FS();
+
+    yyrc = DiveDeacquireFrameBuffer(a);
+    SetFS(sel);
+
+    return yyrc;
+  }
   #undef  DiveDeacquireFrameBuffer
   #define DiveDeacquireFrameBuffer _DiveDeacquireFrameBuffer
-  inline ULONG APIENTRY DiveDeacquireFrameBuffer ( HDIVE a )
-  {
-    ULONG yyrc;
-    USHORT sel = RestoreOS2FS();
-
-    yyrc = DiveDeacquireFrameBuffer(a);
-    SetFS(sel);
-
-    return yyrc;
-  }
-
-  #undef  DiveCalcFrameBufferAddress
-  #define DiveCalcFrameBufferAddress _DiveCalcFrameBufferAddress
-  inline ULONG APIENTRY DiveCalcFrameBufferAddress ( HDIVE  a,
+
+  inline ULONG APIENTRY _DiveCalcFrameBufferAddress ( HDIVE  a,
                                                      PRECTL b,
                                                      PBYTE *c,
@@ -152,8 +150,8 @@
       return yyrc;
   }
-
-  #undef  DiveAllocImageBuffer
-  #define DiveAllocImageBuffer _DiveAllocImageBuffer
-  inline ULONG APIENTRY DiveAllocImageBuffer ( HDIVE  a,
+  #undef  DiveCalcFrameBufferAddress
+  #define DiveCalcFrameBufferAddress _DiveCalcFrameBufferAddress
+
+  inline ULONG APIENTRY _DiveAllocImageBuffer ( HDIVE  a,
                                                PULONG b,
                                                FOURCC c,
@@ -171,22 +169,22 @@
     return yyrc;
   }
-
+  #undef  DiveAllocImageBuffer
+  #define DiveAllocImageBuffer _DiveAllocImageBuffer
+
+  inline ULONG APIENTRY _DiveFreeImageBuffer ( HDIVE a,
+                                              ULONG b )
+  {
+    ULONG yyrc;
+    USHORT sel = RestoreOS2FS();
+
+    yyrc = DiveFreeImageBuffer(a, b);
+    SetFS(sel);
+
+    return yyrc;
+  }
   #undef  DiveFreeImageBuffer
   #define DiveFreeImageBuffer _DiveFreeImageBuffer
-  inline ULONG APIENTRY DiveFreeImageBuffer ( HDIVE a,
-                                              ULONG b )
-  {
-    ULONG yyrc;
-    USHORT sel = RestoreOS2FS();
-
-    yyrc = DiveFreeImageBuffer(a, b);
-    SetFS(sel);
-
-    return yyrc;
-  }
-
-  #undef  DiveBeginImageBufferAccess
-  #define DiveBeginImageBufferAccess _DiveBeginImageBufferAccess
-  inline ULONG APIENTRY DiveBeginImageBufferAccess ( HDIVE  a,
+
+  inline ULONG APIENTRY _DiveBeginImageBufferAccess ( HDIVE  a,
                                                      ULONG  b,
                                                      PBYTE *c,
@@ -202,22 +200,22 @@
     return yyrc;
   }
-
+  #undef  DiveBeginImageBufferAccess
+  #define DiveBeginImageBufferAccess _DiveBeginImageBufferAccess
+
+  inline ULONG APIENTRY _DiveEndImageBufferAccess ( HDIVE a,
+                                                   ULONG b )
+  {
+    ULONG yyrc;
+    USHORT sel = RestoreOS2FS();
+
+    yyrc = DiveEndImageBufferAccess(a, b);
+    SetFS(sel);
+
+    return yyrc;
+  }
   #undef  DiveEndImageBufferAccess
   #define DiveEndImageBufferAccess _DiveEndImageBufferAccess
-  inline ULONG APIENTRY DiveEndImageBufferAccess ( HDIVE a,
-                                                   ULONG b )
-  {
-    ULONG yyrc;
-    USHORT sel = RestoreOS2FS();
-
-    yyrc = DiveEndImageBufferAccess(a, b);
-    SetFS(sel);
-
-    return yyrc;
-  }
-
-  #undef  DiveSetDestinationPalette
-  #define DiveSetDestinationPalette _DiveSetDestinationPalette
-  inline ULONG APIENTRY DiveSetDestinationPalette ( HDIVE a,
+
+  inline ULONG APIENTRY _DiveSetDestinationPalette ( HDIVE a,
                                                     ULONG b,
                                                     ULONG c,
@@ -232,8 +230,8 @@
     return yyrc;
   }
-
-  #undef  DiveSetSourcePalette
-  #define DiveSetSourcePalette _DiveSetSourcePalette
-  inline ULONG APIENTRY DiveSetSourcePalette ( HDIVE a,
+  #undef  DiveSetDestinationPalette
+  #define DiveSetDestinationPalette _DiveSetDestinationPalette
+
+  inline ULONG APIENTRY _DiveSetSourcePalette ( HDIVE a,
                                                ULONG b,
                                                ULONG c,
@@ -248,8 +246,8 @@
     return yyrc;
   }
-
-  #undef  DiveSetTransparentBlitMode
-  #define DiveSetTransparentBlitMode _DiveSetTransparentBlitMode
-  inline ULONG APIENTRY DiveSetTransparentBlitMode ( HDIVE a,
+  #undef  DiveSetSourcePalette
+  #define DiveSetSourcePalette _DiveSetSourcePalette
+
+  inline ULONG APIENTRY _DiveSetTransparentBlitMode ( HDIVE a,
                                                      ULONG b,
                                                      ULONG c,
@@ -264,4 +262,6 @@
     return yyrc;
   }
+  #undef  DiveSetTransparentBlitMode
+  #define DiveSetTransparentBlitMode _DiveSetTransparentBlitMode
 
 
Index: trunk/src/ddraw/os2DDWindow.cpp
===================================================================
--- trunk/src/ddraw/os2DDWindow.cpp	(revision 521)
+++ trunk/src/ddraw/os2DDWindow.cpp	(revision 522)
@@ -1,5 +1,4 @@
 #define INCL_WIN
 #include <os2wrap.h>
-#include <odincrt.h>
 #include <odinwrap.h>
 #include "os2DDWindow.h"
@@ -38,6 +37,4 @@
   USHORT usFlags;
 
-  ODIN_FS_BEGIN
-
   switch(ulMsg)
   {
@@ -65,6 +62,4 @@
   }
 
-  ODIN_FS_END
-
   return pfnOrgClientProc(hwnd, ulMsg, mp1,mp2);
 }
