Index: trunk/src/helpers/except.c
===================================================================
--- trunk/src/helpers/except.c	(revision 163)
+++ trunk/src/helpers/except.c	(revision 164)
@@ -887,4 +887,5 @@
  *@@changed V0.9.0 [umoeller]: added support for thread termination
  *@@changed V0.9.2 (2000-03-10) [umoeller]: switched date format to ISO
+ *@@changed V0.9.19 (2002-05-07) [umoeller]: added EXCEPTIONREPORTRECORD info so that catch block can check that
  */
 
@@ -917,15 +918,4 @@
     switch (pReportRec->ExceptionNum)
     {
-        /* case XCPT_PROCESS_TERMINATE:
-        case XCPT_ASYNC_PROCESS_TERMINATE:
-            // thread terminated:
-            // if the handler has been registered to catch
-            // these exceptions, continue;
-            if (pRegRec2->pfnOnKill)
-                // call the "OnKill" function
-                pRegRec2->pfnOnKill(pRegRec2);
-            // get outta here, which will kill the thread
-        break; */
-
         case XCPT_ACCESS_VIOLATION:
         case XCPT_INTEGER_DIVIDE_BY_ZERO:
@@ -971,10 +961,11 @@
             fclose(file);
 
+            // copy report rec to user buffer
+            // V0.9.19 (2002-05-07) [umoeller]
+            memcpy(&pRegRec2->err,
+                   pReportRec,
+                   sizeof(EXCEPTIONREPORTRECORD));
+
             // jump back to failing routine
-            /* DosSetPriority(PRTYS_THREAD,
-                           PRTYC_REGULAR,
-                           0,       // delta
-                           0);      // current thread
-                           */
             longjmp(pRegRec2->jmpThread, pReportRec->ExceptionNum);
         break; }
@@ -1003,4 +994,5 @@
  *
  *@@changed V0.9.0 [umoeller]: added support for thread termination
+ *@@changed V0.9.19 (2002-05-07) [umoeller]: added EXCEPTIONREPORTRECORD info so that catch block can check that
  */
 
@@ -1019,15 +1011,4 @@
     switch (pReportRec->ExceptionNum)
     {
-        /* case XCPT_PROCESS_TERMINATE:
-        case XCPT_ASYNC_PROCESS_TERMINATE:
-            // thread terminated:
-            // if the handler has been registered to catch
-            // these exceptions, continue;
-            if (pRegRec2->pfnOnKill)
-                // call the "OnKill" function
-                pRegRec2->pfnOnKill(pRegRec2);
-            // get outta here, which will kill the thread
-        break; */
-
         case XCPT_ACCESS_VIOLATION:
         case XCPT_INTEGER_DIVIDE_BY_ZERO:
@@ -1049,4 +1030,10 @@
             #endif
 
+            // copy report rec to user buffer
+            // V0.9.19 (2002-05-07) [umoeller]
+            memcpy(&pRegRec2->err,
+                   pReportRec,
+                   sizeof(EXCEPTIONREPORTRECORD));
+
             // jump back to failing routine
             longjmp(pRegRec2->jmpThread, pReportRec->ExceptionNum);
Index: trunk/src/helpers/gpih.c
===================================================================
--- trunk/src/helpers/gpih.c	(revision 163)
+++ trunk/src/helpers/gpih.c	(revision 164)
@@ -546,4 +546,142 @@
 
     return (lHits);
+}
+
+/*
+ *@@ gpihFillBackground:
+ *      fills the specified rectangle in the way
+ *      that is specified by the given BKGNDINFO
+ *      structure. This way one can either use
+ *      a solid color, a color fade, a bitmap,
+ *      or a combination of those.
+ *
+ *      See BKGNDINFO for the various parameters.
+ *
+ *      Since this can potentially be expensive,
+ *      it is strongly recommended to use a buffer
+ *      bitmap for painting with the size of the
+ *      window and bitblt that bitmap into the
+ *      window on repaints. This way the background
+ *      only has to be recreated on window resize.
+ *
+ *@@added V0.9.19 (2002-05-07) [umoeller]
+ */
+
+VOID gpihFillBackground(HPS hps,            // in: PS to paint into
+                        PRECTL prcl,        // in: rectangle (inclusive!)
+                        PBKGNDINFO pInfo)   // in: background into
+{
+    LONG    l;
+    POINTL  ptl;
+
+    switch (pInfo->flPaintMode & PMOD_COLORMASK)
+    {
+        case PMOD_SOLID:
+            // fill with background color
+            GpiSetColor(hps,
+                        pInfo->lcol1);
+            ptl.x = prcl->xLeft;
+            ptl.y = prcl->yBottom;
+            GpiMove(hps,
+                    &ptl);
+            ptl.x = prcl->xRight;
+            ptl.y = prcl->yTop;
+            GpiBox(hps,
+                   DRO_FILL,
+                   &ptl,
+                   0,
+                   0);
+        break;
+
+        case PMOD_TOPBOTTOM:
+        {
+            LONG lDiffRed   = (LONG)GET_RED(pInfo->lcol2) - (LONG)GET_RED(pInfo->lcol1);
+            LONG lDiffGreen = (LONG)GET_GREEN(pInfo->lcol2) - (LONG)GET_GREEN(pInfo->lcol1);
+            LONG lDiffBlue  = (LONG)GET_BLUE(pInfo->lcol2) - (LONG)GET_BLUE(pInfo->lcol1);
+
+            LONG lMax = prcl->yTop - prcl->yBottom;
+
+            // start at top
+            ptl.y = prcl->yTop;
+
+            for (l = 0;
+                 l <= lMax;
+                 ++l)
+            {
+                // compose RGB color for this line;
+                // lcol1 is top, lcol2 is bottom
+                LONG lRed   =   GET_RED(pInfo->lcol1)
+                              + (   lDiffRed
+                                  * l
+                                  / lMax
+                                );
+                LONG lGreen =   GET_GREEN(pInfo->lcol1)
+                              + (   lDiffGreen
+                                  * l
+                                  / lMax
+                                );
+                LONG lBlue  =   GET_BLUE(pInfo->lcol1)
+                              + (   lDiffBlue
+                                  * l
+                                  / lMax
+                                );
+
+                GpiSetColor(hps, MAKE_RGB(lRed, lGreen, lBlue));
+                ptl.x = prcl->xLeft;
+                GpiMove(hps, &ptl);
+                ptl.x = prcl->xRight;
+                GpiLine(hps, &ptl);
+
+                // next line below
+                --(ptl.y);
+            }
+        }
+        break;
+
+        case PMOD_LEFTRIGHT:
+        {
+            LONG lDiffRed   = (LONG)GET_RED(pInfo->lcol2) - (LONG)GET_RED(pInfo->lcol1);
+            LONG lDiffGreen = (LONG)GET_GREEN(pInfo->lcol2) - (LONG)GET_GREEN(pInfo->lcol1);
+            LONG lDiffBlue  = (LONG)GET_BLUE(pInfo->lcol2) - (LONG)GET_BLUE(pInfo->lcol1);
+
+            LONG lMax = prcl->xRight - prcl->xLeft;
+
+            // start at left
+            ptl.x = prcl->xLeft;
+
+            for (l = 0;
+                 l <= lMax;
+                 ++l)
+            {
+                // compose RGB color for this line;
+                // lcol1 is top, lcol2 is bottom
+                LONG lRed   =   GET_RED(pInfo->lcol1)
+                              + (   lDiffRed
+                                  * l
+                                  / lMax
+                                );
+                LONG lGreen =   GET_GREEN(pInfo->lcol1)
+                              + (   lDiffGreen
+                                  * l
+                                  / lMax
+                                );
+                LONG lBlue  =   GET_BLUE(pInfo->lcol1)
+                              + (   lDiffBlue
+                                  * l
+                                  / lMax
+                                );
+
+                GpiSetColor(hps, MAKE_RGB(lRed, lGreen, lBlue));
+                ptl.y = prcl->yBottom;
+                GpiMove(hps, &ptl);
+                ptl.y = prcl->yTop;
+                GpiLine(hps, &ptl);
+
+                // next line to the right
+                ++(ptl.x);
+            }
+        }
+        break;
+    }
 }
 
@@ -1523,10 +1661,8 @@
         // set up the BITMAPINFOHEADER2 and BITMAPINFO2 structures
         bih2.cbFix = (ULONG)sizeof(BITMAPINFOHEADER2);
-        bih2.cx = cx; // (prcl->xRight - prcl->xLeft);       changed V0.9.0
-        bih2.cy = cy; // (prcl->yTop - prcl->yBottom);       changed V0.9.0
+        bih2.cx = cx;
+        bih2.cy = cy;
         bih2.cPlanes = (cPlanes) ? cPlanes : alData[0];
         bih2.cBitCount = (cBitCount) ? cBitCount : alData[1];
-            // _Pmpf((__FUNCTION__ ": cPlanes %d, cBitCount %d",
-               //          bih2.cPlanes, bih2.cBitCount));
         bih2.ulCompression = BCA_UNCOMP;
         bih2.cbImage = (    (   (bih2.cx
Index: trunk/src/helpers/linklist.c
===================================================================
--- trunk/src/helpers/linklist.c	(revision 163)
+++ trunk/src/helpers/linklist.c	(revision 164)
@@ -260,4 +260,5 @@
                                                line,
                                                function);
+
     lstInit(pNewList, fItemsFreeable);
     return (pNewList);
Index: trunk/src/helpers/memdebug.c
===================================================================
--- trunk/src/helpers/memdebug.c	(revision 163)
+++ trunk/src/helpers/memdebug.c	(revision 164)
@@ -488,5 +488,5 @@
                 CheckMagics(__FUNCTION__,
                             pHeapItem,
-                            p,
+                            (PBYTE)p,
                             pcszSourceFile,
                             ulLine,
@@ -581,5 +581,5 @@
                 CheckMagics(__FUNCTION__,
                             pHeapItem,
-                            p,
+                            (PBYTE)p,
                             pcszSourceFile,
                             ulLine,
@@ -748,4 +748,5 @@
      */
 
+    /*
     void memdDumpMemoryBlock(PBYTE pb,       // in: start address
                              ULONG ulSize,   // in: size of block
@@ -766,12 +767,7 @@
         } END_CATCH();
     }
+    */
 #endif
 
-#else
-void memdDummy(void)
-{
-    int i = 0;
-    i++;
-}
 #endif
 
Index: trunk/src/helpers/memdebug_win.c
===================================================================
--- trunk/src/helpers/memdebug_win.c	(revision 163)
+++ trunk/src/helpers/memdebug_win.c	(revision 164)
@@ -512,5 +512,5 @@
  */
 
-static MRESULT EXPENTRY memd_fnwpMemDebug(HWND hwndClient, ULONG msg, MPARAM mp1, MPARAM mp2)
+MRESULT EXPENTRY memd_fnwpMemDebug(HWND hwndClient, ULONG msg, MPARAM mp1, MPARAM mp2)
 {
     MRESULT mrc = 0;
Index: trunk/src/helpers/prfh.c
===================================================================
--- trunk/src/helpers/prfh.c	(revision 163)
+++ trunk/src/helpers/prfh.c	(revision 164)
@@ -138,5 +138,5 @@
  */
 
-PSZ prfhQueryProfileDataDebug(HINI hIni,      // in: INI handle (can be HINI_USER or HINI_SYSTEM)
+PSZ (prfhQueryProfileDataDebug)(HINI hIni,      // in: INI handle (can be HINI_USER or HINI_SYSTEM)
                               const char *pcszApp,      // in: application to query
                               const char *pcszKey,      // in: key to query
@@ -189,5 +189,5 @@
  */
 
-PSZ prfhQueryProfileData(HINI hIni,      // in: INI handle (can be HINI_USER or HINI_SYSTEM)
+PSZ (prfhQueryProfileData)(HINI hIni,      // in: INI handle (can be HINI_USER or HINI_SYSTEM)
                          const char *pcszApp,     // in: application to query
                          const char *pcszKey,     // in: key to query
Index: trunk/src/helpers/stringh.c
===================================================================
--- trunk/src/helpers/stringh.c	(revision 163)
+++ trunk/src/helpers/stringh.c	(revision 164)
@@ -78,12 +78,14 @@
  */
 
-APIRET strhStoreDebug(PSZ *ppszTarget,
-                      PCSZ pcszSource,
-                      PULONG pulLength,        // out: length of new string (ptr can be NULL)
-                      PCSZ pcszSourceFile,
-                      unsigned long ulLine,
-                      PCSZ pcszFunction)
+APIRET (strhStoreDebug)(PSZ *ppszTarget,
+                        PCSZ pcszSource,
+                        PULONG pulLength,        // out: length of new string (ptr can be NULL)
+                        PCSZ pcszSourceFile,
+                        unsigned long ulLine,
+                        PCSZ pcszFunction)
 {
     ULONG ulLength = 0;
+
+
 
     if (ppszTarget)
Index: trunk/src/helpers/textview.c
===================================================================
--- trunk/src/helpers/textview.c	(revision 163)
+++ trunk/src/helpers/textview.c	(revision 164)
@@ -3073,6 +3073,6 @@
             lstClear(&ptxvd->xfd.llRectangles);
             lstClear(&ptxvd->xfd.llWords);
+            GpiDestroyPS(ptxvd->hps);
             free(ptxvd);
-            GpiDestroyPS(ptxvd->hps);
             mrc = WinDefWindowProc(hwndTextView, msg, mp1, mp2);
         break;
Index: trunk/src/helpers/timer.c
===================================================================
--- trunk/src/helpers/timer.c	(revision 163)
+++ trunk/src/helpers/timer.c	(revision 164)
@@ -111,5 +111,5 @@
 #include "helpers\timer.h"
 
-#define DEBUG_XTIMERS
+// #define DEBUG_XTIMERS
 
 /*
