[FORMATTING]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Thu, 1 May 2014 09:48:40 +0000 (09:48 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Thu, 1 May 2014 09:48:40 +0000 (09:48 +0000)
Fix indentation, no code change

svn path=/trunk/; revision=63090

reactos/win32ss/gdi/eng/gradient.c
reactos/win32ss/gdi/eng/perfcnt.c
reactos/win32ss/gdi/eng/semaphor.c
reactos/win32ss/gdi/eng/sort.c
reactos/win32ss/gdi/eng/string.c
reactos/win32ss/gdi/eng/stubs.c
reactos/win32ss/gdi/eng/transblt.c

index 24a55cc..5dd9008 100644 (file)
@@ -38,7 +38,8 @@ const LONG LINC[2] = {-1, 1};
 
 /* FUNCTIONS ******************************************************************/
 
-BOOL FASTCALL
+BOOL
+FASTCALL
 IntEngGradientFillRect(
     IN SURFOBJ  *psoDest,
     IN CLIPOBJ  *pco,
@@ -50,129 +51,137 @@ IntEngGradientFillRect(
     IN POINTL  *pptlDitherOrg,
     IN BOOL Horizontal)
 {
-  SURFOBJ *psoOutput;
-  TRIVERTEX *v1, *v2;
-  RECTL rcGradient, rcSG;
-  RECT_ENUM RectEnum;
-  BOOL EnumMore;
-  ULONG i;
-  POINTL Translate;
-  INTENG_ENTER_LEAVE EnterLeave;
-  LONG y, dy, c[3], dc[3], ec[3], ic[3];
-
-  v1 = (pVertex + gRect->UpperLeft);
-  v2 = (pVertex + gRect->LowerRight);
-
-  rcGradient.left = min(v1->x, v2->x);
-  rcGradient.right = max(v1->x, v2->x);
-  rcGradient.top = min(v1->y, v2->y);
-  rcGradient.bottom = max(v1->y, v2->y);
-  rcSG = rcGradient;
-  RECTL_vOffsetRect(&rcSG, pptlDitherOrg->x, pptlDitherOrg->y);
-
-  if(Horizontal)
-  {
-    dy = abs(rcGradient.right - rcGradient.left);
-  }
-  else
-  {
-    dy = abs(rcGradient.bottom - rcGradient.top);
-  }
-
-  if(!IntEngEnter(&EnterLeave, psoDest, &rcSG, FALSE, &Translate, &psoOutput))
-  {
-    return FALSE;
-  }
+    SURFOBJ *psoOutput;
+    TRIVERTEX *v1, *v2;
+    RECTL rcGradient, rcSG;
+    RECT_ENUM RectEnum;
+    BOOL EnumMore;
+    ULONG i;
+    POINTL Translate;
+    INTENG_ENTER_LEAVE EnterLeave;
+    LONG y, dy, c[3], dc[3], ec[3], ic[3];
+
+    v1 = (pVertex + gRect->UpperLeft);
+    v2 = (pVertex + gRect->LowerRight);
+
+    rcGradient.left = min(v1->x, v2->x);
+    rcGradient.right = max(v1->x, v2->x);
+    rcGradient.top = min(v1->y, v2->y);
+    rcGradient.bottom = max(v1->y, v2->y);
+    rcSG = rcGradient;
+    RECTL_vOffsetRect(&rcSG, pptlDitherOrg->x, pptlDitherOrg->y);
+
+    if(Horizontal)
+    {
+        dy = abs(rcGradient.right - rcGradient.left);
+    }
+    else
+    {
+        dy = abs(rcGradient.bottom - rcGradient.top);
+    }
 
-  if((v1->Red != v2->Red || v1->Green != v2->Green || v1->Blue != v2->Blue) && dy > 1)
-  {
-    CLIPOBJ_cEnumStart(pco, FALSE, CT_RECTANGLES, CD_RIGHTDOWN, 0);
-    do
+    if(!IntEngEnter(&EnterLeave, psoDest, &rcSG, FALSE, &Translate, &psoOutput))
     {
-      RECTL FillRect;
-      ULONG Color;
+        return FALSE;
+    }
 
-      if(Horizontal)
-      {
-        EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
-        for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <= rcSG.bottom; i++)
+    if((v1->Red != v2->Red || v1->Green != v2->Green || v1->Blue != v2->Blue) && dy > 1)
+    {
+        CLIPOBJ_cEnumStart(pco, FALSE, CT_RECTANGLES, CD_RIGHTDOWN, 0);
+        do
         {
-          if(RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i], &rcSG))
-          {
-            HVINITCOL(Red, 0);
-            HVINITCOL(Green, 1);
-            HVINITCOL(Blue, 2);
+            RECTL FillRect;
+            ULONG Color;
 
-            for(y = rcSG.left; y < FillRect.right; y++)
+            if (Horizontal)
             {
-              if(y >= FillRect.left)
-              {
-                Color = XLATEOBJ_iXlate(pxlo, RGB(c[0], c[1], c[2]));
-                DibFunctionsForBitmapFormat[psoOutput->iBitmapFormat].DIB_VLine(
-                  psoOutput, y + Translate.x, FillRect.top + Translate.y, FillRect.bottom + Translate.y, Color);
-              }
-              HVSTEPCOL(0);
-              HVSTEPCOL(1);
-              HVSTEPCOL(2);
+                EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
+                for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <= rcSG.bottom; i++)
+                {
+                    if (RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i], &rcSG))
+                    {
+                        HVINITCOL(Red, 0);
+                        HVINITCOL(Green, 1);
+                        HVINITCOL(Blue, 2);
+
+                        for (y = rcSG.left; y < FillRect.right; y++)
+                        {
+                            if (y >= FillRect.left)
+                            {
+                                Color = XLATEOBJ_iXlate(pxlo, RGB(c[0], c[1], c[2]));
+                                DibFunctionsForBitmapFormat[psoOutput->iBitmapFormat].DIB_VLine(
+                                    psoOutput, y + Translate.x, FillRect.top + Translate.y, FillRect.bottom + Translate.y, Color);
+                            }
+                            HVSTEPCOL(0);
+                            HVSTEPCOL(1);
+                            HVSTEPCOL(2);
+                        }
+                    }
+                }
+
+                continue;
             }
-          }
-        }
-
-        continue;
-      }
-
-      /* vertical */
-      EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
-      for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <= rcSG.bottom; i++)
-      {
-        if(RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i], &rcSG))
-        {
-          HVINITCOL(Red, 0);
-          HVINITCOL(Green, 1);
-          HVINITCOL(Blue, 2);
 
-          for(y = rcSG.top; y < FillRect.bottom; y++)
-          {
-            if(y >= FillRect.top)
+            /* vertical */
+            EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
+            for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <= rcSG.bottom; i++)
             {
-              Color = XLATEOBJ_iXlate(pxlo, RGB(c[0], c[1], c[2]));
-              DibFunctionsForBitmapFormat[psoOutput->iBitmapFormat].DIB_HLine(
-                psoOutput, FillRect.left + Translate.x, FillRect.right + Translate.x, y + Translate.y, Color);
+                if (RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i], &rcSG))
+                {
+                    HVINITCOL(Red, 0);
+                    HVINITCOL(Green, 1);
+                    HVINITCOL(Blue, 2);
+
+                    for (y = rcSG.top; y < FillRect.bottom; y++)
+                    {
+                        if (y >= FillRect.top)
+                        {
+                            Color = XLATEOBJ_iXlate(pxlo, RGB(c[0], c[1], c[2]));
+                            DibFunctionsForBitmapFormat[psoOutput->iBitmapFormat].DIB_HLine(psoOutput,
+                                                                                            FillRect.left + Translate.x,
+                                                                                            FillRect.right + Translate.x,
+                                                                                            y + Translate.y,
+                                                                                            Color);
+                        }
+                        HVSTEPCOL(0);
+                        HVSTEPCOL(1);
+                        HVSTEPCOL(2);
+                    }
+                }
             }
-            HVSTEPCOL(0);
-            HVSTEPCOL(1);
-            HVSTEPCOL(2);
-          }
-        }
-      }
-
-    } while(EnumMore);
 
-    return IntEngLeave(&EnterLeave);
-  }
+        }
+        while (EnumMore);
 
-  /* rectangle has only one color, no calculation required */
-  CLIPOBJ_cEnumStart(pco, FALSE, CT_RECTANGLES, CD_RIGHTDOWN, 0);
-  do
-  {
-    RECTL FillRect;
-    ULONG Color = XLATEOBJ_iXlate(pxlo, RGB(v1->Red, v1->Green, v1->Blue));
+        return IntEngLeave(&EnterLeave);
+    }
 
-    EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
-    for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <= rcSG.bottom; i++)
+    /* rectangle has only one color, no calculation required */
+    CLIPOBJ_cEnumStart(pco, FALSE, CT_RECTANGLES, CD_RIGHTDOWN, 0);
+    do
     {
-      if(RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i], &rcSG))
-      {
-        for(; FillRect.top < FillRect.bottom; FillRect.top++)
+        RECTL FillRect;
+        ULONG Color = XLATEOBJ_iXlate(pxlo, RGB(v1->Red, v1->Green, v1->Blue));
+
+        EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
+        for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <= rcSG.bottom; i++)
         {
-          DibFunctionsForBitmapFormat[psoOutput->iBitmapFormat].DIB_HLine(
-            psoOutput, FillRect.left + Translate.x, FillRect.right + Translate.x, FillRect.top + Translate.y, Color);
+            if (RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i], &rcSG))
+            {
+                for (; FillRect.top < FillRect.bottom; FillRect.top++)
+                {
+                    DibFunctionsForBitmapFormat[psoOutput->iBitmapFormat].DIB_HLine(psoOutput,
+                                                                                    FillRect.left + Translate.x,
+                                                                                    FillRect.right + Translate.x,
+                                                                                    FillRect.top + Translate.y,
+                                                                                    Color);
+                }
+            }
         }
-      }
     }
-  } while(EnumMore);
+    while (EnumMore);
 
-  return IntEngLeave(&EnterLeave);
+    return IntEngLeave(&EnterLeave);
 }
 
 /* Fill triangle with solid color */
@@ -181,6 +190,7 @@ IntEngGradientFillRect(
     DibFunctionsForBitmapFormat[psoOutput->iBitmapFormat].DIB_HLine(psoOutput, max(sx[lineto], FillRect.left), min(sx[linefrom], FillRect.right), sy, Color); \
   else \
     DibFunctionsForBitmapFormat[psoOutput->iBitmapFormat].DIB_HLine(psoOutput, max(sx[linefrom], FillRect.left), min(sx[lineto], FillRect.right), sy, Color);
+
 #define S_DOLINE(a,b,line) \
   ex[line] += dx[line]; \
   while(ex[line] > 0 && x[line] != destx[line]) \
@@ -189,11 +199,14 @@ IntEngGradientFillRect(
     sx[line] += incx[line]; \
     ex[line] -= dy[line]; \
   }
+
 #define S_GOLINE(a,b,line) \
   if(y >= a->y && y <= b->y) \
   {
+
 #define S_ENDLINE(a,b,line) \
   }
+
 #define S_INITLINE(a,b,line) \
   x[line] = a->x; \
   sx[line] =  a->x + pptlDitherOrg->x; \
@@ -209,6 +222,7 @@ IntEngGradientFillRect(
   dc[line][id] = abs((b->col >> 8) - c[line][id]); \
   ec[line][id] = -(dy[line]>>1); \
   ic[line][id] = LINC[(b->col >> 8) > c[line][id]]
+
 #define STEPCOL(a,b,line,col,id) \
   ec[line][id] += dc[line][id]; \
   while(ec[line][id] > 0) \
@@ -216,11 +230,13 @@ IntEngGradientFillRect(
     c[line][id] += ic[line][id]; \
     ec[line][id] -= dy[line]; \
   }
+
 #define FINITCOL(linefrom,lineto,colid) \
   gc[colid] = c[linefrom][colid]; \
   gd[colid] = abs(c[lineto][colid] - gc[colid]); \
   ge[colid] = -(gx >> 1); \
   gi[colid] = LINC[c[lineto][colid] > gc[colid]]
+
 #define FDOCOL(linefrom,lineto,colid) \
   ge[colid] += gd[colid]; \
   while(ge[colid] > 0) \
@@ -228,6 +244,7 @@ IntEngGradientFillRect(
     gc[colid] += gi[colid]; \
     ge[colid] -= gx; \
   }
+
 #define FILLLINE(linefrom,lineto) \
   gx = abs(sx[lineto] - sx[linefrom]); \
   gxi = LINC[sx[linefrom] < sx[lineto]]; \
@@ -245,6 +262,7 @@ IntEngGradientFillRect(
     FDOCOL(linefrom, lineto, 1); \
     FDOCOL(linefrom, lineto, 2); \
   }
+
 #define DOLINE(a,b,line) \
   STEPCOL(a, b, line, Red, 0); \
   STEPCOL(a, b, line, Green, 1); \
@@ -256,11 +274,14 @@ IntEngGradientFillRect(
     sx[line] += incx[line]; \
     ex[line] -= dy[line]; \
   }
+
 #define GOLINE(a,b,line) \
   if(y >= a->y && y <= b->y) \
   {
+
 #define ENDLINE(a,b,line) \
   }
+
 #define INITLINE(a,b,line) \
   x[line] = a->x; \
   sx[line] =  a->x + pptlDitherOrg->x; \
@@ -269,17 +290,23 @@ IntEngGradientFillRect(
   incx[line] = LINC[b->x > a->x]; \
   ex[line] = -(dy[line]>>1); \
   destx[line] = b->x
+
 #define DOINIT(a, b, line) \
   INITLINE(a, b, line); \
   INITCOL(a, b, line, Red, 0); \
   INITCOL(a, b, line, Green, 1); \
   INITCOL(a, b, line, Blue, 2);
+
 #define SMALLER(a,b)     (a->y < b->y) || (a->y == b->y && a->x < b->x)
+
 #define SWAP(a,b,c)  c = a;\
                      a = b;\
                      b = c
+
 #define NLINES 3
-BOOL FASTCALL
+
+BOOL
+FASTCALL
 IntEngGradientFillTriangle(
     IN SURFOBJ  *psoDest,
     IN CLIPOBJ  *pco,
@@ -290,158 +317,161 @@ IntEngGradientFillTriangle(
     IN RECTL  *prclExtents,
     IN POINTL  *pptlDitherOrg)
 {
-  SURFOBJ *psoOutput;
-  PTRIVERTEX v1, v2, v3;
-  //RECT_ENUM RectEnum;
-  //BOOL EnumMore;
-  //ULONG i;
-  POINTL Translate;
-  INTENG_ENTER_LEAVE EnterLeave;
-  RECTL FillRect = { 0, 0, 0, 0 };
-  //ULONG Color;
-
-  //BOOL sx[NLINES];
-  //LONG x[NLINES], dx[NLINES], dy[NLINES], incx[NLINES], ex[NLINES], destx[NLINES];
-  //LONG c[NLINES][3], dc[NLINES][3], ec[NLINES][3], ic[NLINES][3]; /* colors on lines */
-  //LONG g, gx, gxi, gc[3], gd[3], ge[3], gi[3]; /* colors in triangle */
-  //LONG sy, y, bt;
-
-  v1 = (pVertex + gTriangle->Vertex1);
-  v2 = (pVertex + gTriangle->Vertex2);
-  v3 = (pVertex + gTriangle->Vertex3);
-
-  /* bubble sort */
-  if(SMALLER(v2,v1))
-  {
-    TRIVERTEX *t;
-    SWAP(v1,v2,t);
-  }
-  if(SMALLER(v3,v2))
-  {
-    TRIVERTEX *t;
-    SWAP(v2,v3,t);
-    if(SMALLER(v2,v1))
+    SURFOBJ *psoOutput;
+    PTRIVERTEX v1, v2, v3;
+    //RECT_ENUM RectEnum;
+    //BOOL EnumMore;
+    //ULONG i;
+    POINTL Translate;
+    INTENG_ENTER_LEAVE EnterLeave;
+    RECTL FillRect = { 0, 0, 0, 0 };
+    //ULONG Color;
+
+    //BOOL sx[NLINES];
+    //LONG x[NLINES], dx[NLINES], dy[NLINES], incx[NLINES], ex[NLINES], destx[NLINES];
+    //LONG c[NLINES][3], dc[NLINES][3], ec[NLINES][3], ic[NLINES][3]; /* colors on lines */
+    //LONG g, gx, gxi, gc[3], gd[3], ge[3], gi[3]; /* colors in triangle */
+    //LONG sy, y, bt;
+
+    v1 = (pVertex + gTriangle->Vertex1);
+    v2 = (pVertex + gTriangle->Vertex2);
+    v3 = (pVertex + gTriangle->Vertex3);
+
+    /* bubble sort */
+    if (SMALLER(v2, v1))
     {
-      SWAP(v1,v2,t);
+        TRIVERTEX *t;
+        SWAP(v1, v2, t);
     }
-  }
 
-  DPRINT1("Triangle: (%i,%i) (%i,%i) (%i,%i)\n", v1->x, v1->y, v2->x, v2->y, v3->x, v3->y);
-  /* FIXME: commented out because of an endless loop - fix triangles first */
-  DPRINT1("FIXME: IntEngGradientFillTriangle is broken\n");
+    if (SMALLER(v3, v2))
+    {
+        TRIVERTEX *t;
+        SWAP(v2, v3, t);
+        if (SMALLER(v2, v1))
+        {
+            SWAP(v1, v2, t);
+        }
+    }
 
-  if(!IntEngEnter(&EnterLeave, psoDest, &FillRect, FALSE, &Translate, &psoOutput))
-  {
-    return FALSE;
-  }
+    DPRINT1("Triangle: (%i,%i) (%i,%i) (%i,%i)\n", v1->x, v1->y, v2->x, v2->y, v3->x, v3->y);
+    /* FIXME: commented out because of an endless loop - fix triangles first */
+    DPRINT1("FIXME: IntEngGradientFillTriangle is broken\n");
+
+    if (!IntEngEnter(&EnterLeave, psoDest, &FillRect, FALSE, &Translate, &psoOutput))
+    {
+        return FALSE;
+    }
 
-  //if(VCMPCLRS(v1, v2, v3))
-  //{
-  //  CLIPOBJ_cEnumStart(pco, FALSE, CT_RECTANGLES, CD_RIGHTDOWN, 0);
-  //  do
-  //  {
-  //    EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
-  //    for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <= prclExtents->bottom; i++)
-  //    {
-  //      if(RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i], prclExtents))
-  //      {
-  //        BOOL InY;
-
-  //        DOINIT(v1, v3, 0);
-  //        DOINIT(v1, v2, 1);
-  //        DOINIT(v2, v3, 2);
-
-  //        y = v1->y;
-  //        sy = v1->y + pptlDitherOrg->y;
-  //        bt = min(v3->y + pptlDitherOrg->y, FillRect.bottom);
-
-  //        while(sy < bt)
-  //        {
-  //          InY = !(sy < FillRect.top || sy >= FillRect.bottom);
-  //          GOLINE(v1, v3, 0);
-  //          DOLINE(v1, v3, 0);
-  //          ENDLINE(v1, v3, 0);
-
-  //          GOLINE(v1, v2, 1);
-  //          DOLINE(v1, v2, 1);
-  //          FILLLINE(0, 1);
-  //          ENDLINE(v1, v2, 1);
-
-  //          GOLINE(v2, v3, 2);
-  //          DOLINE(v2, v3, 2);
-  //          FILLLINE(0, 2);
-  //          ENDLINE(23, v3, 2);
-
-  //          y++;
-  //          sy++;
-  //        }
-  //      }
-  //    }
-  //  } while(EnumMore);
-
-  //  return IntEngLeave(&EnterLeave);
-  //}
-
-  ///* fill triangle with one solid color */
-
-  //Color = XLATEOBJ_iXlate(pxlo, RGB(v1->Red >> 8, v1->Green >> 8, v1->Blue >> 8));
-  //CLIPOBJ_cEnumStart(pco, FALSE, CT_RECTANGLES, CD_RIGHTDOWN, 0);
-  //do
-  //{
-  //  EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
-  //  for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <= prclExtents->bottom; i++)
-  //  {
-  //    if(RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i], prclExtents))
-  //    {
-  //      S_INITLINE(v1, v3, 0);
-  //      S_INITLINE(v1, v2, 1);
-  //      S_INITLINE(v2, v3, 2);
-
-  //      y = v1->y;
-  //      sy = v1->y + pptlDitherOrg->y;
-  //      bt = min(v3->y + pptlDitherOrg->y, FillRect.bottom);
-
-  //      while(sy < bt)
-  //      {
-  //        S_GOLINE(v1, v3, 0);
-  //        S_DOLINE(v1, v3, 0);
-  //        S_ENDLINE(v1, v3, 0);
-
-  //        S_GOLINE(v1, v2, 1);
-  //        S_DOLINE(v1, v2, 1);
-  //        S_FILLLINE(0, 1);
-  //        S_ENDLINE(v1, v2, 1);
-
-  //        S_GOLINE(v2, v3, 2);
-  //        S_DOLINE(v2, v3, 2);
-  //        S_FILLLINE(0, 2);
-  //        S_ENDLINE(23, v3, 2);
-
-  //        y++;
-  //        sy++;
-  //      }
-  //    }
-  //  }
-  //} while(EnumMore);
-
-  return IntEngLeave(&EnterLeave);
+    //if (VCMPCLRS(v1, v2, v3))
+    //{
+    //  CLIPOBJ_cEnumStart(pco, FALSE, CT_RECTANGLES, CD_RIGHTDOWN, 0);
+    //  do
+    //  {
+    //    EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
+    //    for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <= prclExtents->bottom; i++)
+    //    {
+    //      if (RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i], prclExtents))
+    //      {
+    //        BOOL InY;
+
+    //        DOINIT(v1, v3, 0);
+    //        DOINIT(v1, v2, 1);
+    //        DOINIT(v2, v3, 2);
+
+    //        y = v1->y;
+    //        sy = v1->y + pptlDitherOrg->y;
+    //        bt = min(v3->y + pptlDitherOrg->y, FillRect.bottom);
+
+    //        while (sy < bt)
+    //        {
+    //          InY = !(sy < FillRect.top || sy >= FillRect.bottom);
+    //          GOLINE(v1, v3, 0);
+    //          DOLINE(v1, v3, 0);
+    //          ENDLINE(v1, v3, 0);
+
+    //          GOLINE(v1, v2, 1);
+    //          DOLINE(v1, v2, 1);
+    //          FILLLINE(0, 1);
+    //          ENDLINE(v1, v2, 1);
+
+    //          GOLINE(v2, v3, 2);
+    //          DOLINE(v2, v3, 2);
+    //          FILLLINE(0, 2);
+    //          ENDLINE(23, v3, 2);
+
+    //          y++;
+    //          sy++;
+    //        }
+    //      }
+    //    }
+    //  } while (EnumMore);
+
+    //  return IntEngLeave(&EnterLeave);
+    //}
+
+    ///* fill triangle with one solid color */
+
+    //Color = XLATEOBJ_iXlate(pxlo, RGB(v1->Red >> 8, v1->Green >> 8, v1->Blue >> 8));
+    //CLIPOBJ_cEnumStart(pco, FALSE, CT_RECTANGLES, CD_RIGHTDOWN, 0);
+    //do
+    //{
+    //  EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
+    //  for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <= prclExtents->bottom; i++)
+    //  {
+    //    if (RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i], prclExtents))
+    //    {
+    //      S_INITLINE(v1, v3, 0);
+    //      S_INITLINE(v1, v2, 1);
+    //      S_INITLINE(v2, v3, 2);
+
+    //      y = v1->y;
+    //      sy = v1->y + pptlDitherOrg->y;
+    //      bt = min(v3->y + pptlDitherOrg->y, FillRect.bottom);
+
+    //      while (sy < bt)
+    //      {
+    //        S_GOLINE(v1, v3, 0);
+    //        S_DOLINE(v1, v3, 0);
+    //        S_ENDLINE(v1, v3, 0);
+
+    //        S_GOLINE(v1, v2, 1);
+    //        S_DOLINE(v1, v2, 1);
+    //        S_FILLLINE(0, 1);
+    //        S_ENDLINE(v1, v2, 1);
+
+    //        S_GOLINE(v2, v3, 2);
+    //        S_DOLINE(v2, v3, 2);
+    //        S_FILLLINE(0, 2);
+    //        S_ENDLINE(23, v3, 2);
+
+    //        y++;
+    //        sy++;
+    //      }
+    //    }
+    //  }
+    //} while (EnumMore);
+
+    return IntEngLeave(&EnterLeave);
 }
 
 
-static BOOL
+static
+BOOL
 IntEngIsNULLTriangle(TRIVERTEX  *pVertex, GRADIENT_TRIANGLE *gt)
 {
-  if(COMPAREVERTEX(VERTEX(Vertex1), VERTEX(Vertex2)))
-    return TRUE;
-  if(COMPAREVERTEX(VERTEX(Vertex1), VERTEX(Vertex3)))
-    return TRUE;
-  if(COMPAREVERTEX(VERTEX(Vertex2), VERTEX(Vertex3)))
-    return TRUE;
-  return FALSE;
+    if(COMPAREVERTEX(VERTEX(Vertex1), VERTEX(Vertex2)))
+        return TRUE;
+    if(COMPAREVERTEX(VERTEX(Vertex1), VERTEX(Vertex3)))
+        return TRUE;
+    if(COMPAREVERTEX(VERTEX(Vertex2), VERTEX(Vertex3)))
+        return TRUE;
+    return FALSE;
 }
 
 
-BOOL APIENTRY
+BOOL
+APIENTRY
 EngGradientFill(
     _Inout_ SURFOBJ *psoDest,
     _In_ CLIPOBJ *pco,
@@ -454,90 +484,119 @@ EngGradientFill(
     _In_ POINTL *pptlDitherOrg,
     _In_ ULONG ulMode)
 {
-  ULONG i;
-  BOOL ret = FALSE;
+    ULONG i;
+    BOOL ret = FALSE;
 
-  if (!pco)
-  {
-    pco = IntEngCreateClipRegion(0, 0, prclExtents);
     if (!pco)
     {
-      return FALSE;
-    }
-  }
-
-  switch(ulMode)
-  {
-    case GRADIENT_FILL_RECT_H:
-    case GRADIENT_FILL_RECT_V:
-    {
-      PGRADIENT_RECT gr = (PGRADIENT_RECT)pMesh;
-      for(i = 0; i < nMesh; i++, gr++)
-      {
-        if(!IntEngGradientFillRect(psoDest, pco, pxlo, pVertex, nVertex, gr, prclExtents,
-                                   pptlDitherOrg, (ulMode == GRADIENT_FILL_RECT_H)))
+        pco = IntEngCreateClipRegion(0, 0, prclExtents);
+        if (!pco)
         {
-          break;
+            return FALSE;
         }
-      }
-      ret = TRUE;
-      break;
     }
-    case GRADIENT_FILL_TRIANGLE:
+
+    switch(ulMode)
     {
-      PGRADIENT_TRIANGLE gt = (PGRADIENT_TRIANGLE)pMesh;
-      for(i = 0; i < nMesh; i++, gt++)
-      {
-        if(IntEngIsNULLTriangle(pVertex, gt))
+        case GRADIENT_FILL_RECT_H:
+        case GRADIENT_FILL_RECT_V:
         {
-          /* skip empty triangles */
-          continue;
+            PGRADIENT_RECT gr = (PGRADIENT_RECT)pMesh;
+            for (i = 0; i < nMesh; i++, gr++)
+            {
+                if (!IntEngGradientFillRect(psoDest,
+                                            pco,
+                                            pxlo,
+                                            pVertex,
+                                            nVertex,
+                                            gr,
+                                            prclExtents,
+                                            pptlDitherOrg,
+                                            (ulMode == GRADIENT_FILL_RECT_H)))
+                {
+                    break;
+                }
+            }
+            ret = TRUE;
+            break;
         }
-        if(!IntEngGradientFillTriangle(psoDest, pco, pxlo, pVertex, nVertex, gt, prclExtents,
-                                       pptlDitherOrg))
+        case GRADIENT_FILL_TRIANGLE:
         {
-          break;
+            PGRADIENT_TRIANGLE gt = (PGRADIENT_TRIANGLE)pMesh;
+            for (i = 0; i < nMesh; i++, gt++)
+            {
+                if (IntEngIsNULLTriangle(pVertex, gt))
+                {
+                    /* skip empty triangles */
+                    continue;
+                }
+                if (!IntEngGradientFillTriangle(psoDest,
+                                                pco,
+                                                pxlo,
+                                                pVertex,
+                                                nVertex,
+                                                gt,
+                                                prclExtents,
+                                                pptlDitherOrg))
+                {
+                    break;
+                }
+            }
+            ret = TRUE;
+            break;
         }
-      }
-      ret = TRUE;
-      break;
     }
-  }
 
-  return ret;
+    return ret;
 }
 
-BOOL APIENTRY
+BOOL
+APIENTRY
 IntEngGradientFill(
-    IN SURFOBJ  *psoDest,
-    IN CLIPOBJ  *pco,
-    IN XLATEOBJ  *pxlo,
-    IN TRIVERTEX  *pVertex,
-    IN ULONG  nVertex,
-    IN PVOID  pMesh,
-    IN ULONG  nMesh,
-    IN RECTL  *prclExtents,
-    IN POINTL  *pptlDitherOrg,
-    IN ULONG  ulMode)
+    IN SURFOBJ *psoDest,
+    IN CLIPOBJ *pco,
+    IN XLATEOBJ *pxlo,
+    IN TRIVERTEX *pVertex,
+    IN ULONG nVertex,
+    IN PVOID pMesh,
+    IN ULONG nMesh,
+    IN RECTL *prclExtents,
+    IN POINTL *pptlDitherOrg,
+    IN ULONG ulMode)
 {
-  BOOL Ret;
-  SURFACE *psurf;
-  ASSERT(psoDest);
+    BOOL Ret;
+    SURFACE *psurf;
+    ASSERT(psoDest);
 
-  psurf = CONTAINING_RECORD(psoDest, SURFACE, SurfObj);
-  ASSERT(psurf);
+    psurf = CONTAINING_RECORD(psoDest, SURFACE, SurfObj);
+    ASSERT(psurf);
 
-  if(psurf->flags & HOOK_GRADIENTFILL)
-  {
-    Ret = GDIDEVFUNCS(psoDest).GradientFill(
-      psoDest, pco, pxlo, pVertex, nVertex, pMesh, nMesh,
-      prclExtents, pptlDitherOrg, ulMode);
-  }
-  else
-  {
-    Ret = EngGradientFill(psoDest, pco, pxlo, pVertex, nVertex, pMesh, nMesh, prclExtents,
-                          pptlDitherOrg, ulMode);
-  }
+    if (psurf->flags & HOOK_GRADIENTFILL)
+    {
+        Ret = GDIDEVFUNCS(psoDest).GradientFill(psoDest,
+                                                pco,
+                                                pxlo,
+                                                pVertex,
+                                                nVertex,
+                                                pMesh,
+                                                nMesh,
+                                                prclExtents,
+                                                pptlDitherOrg,
+                                                ulMode);
+    }
+    else
+    {
+        Ret = EngGradientFill(psoDest,
+                              pco,
+                              pxlo,
+                              pVertex,
+                              nVertex,
+                              pMesh,
+                              nMesh,
+                              prclExtents,
+                              pptlDitherOrg,
+                              ulMode);
+    }
 
-  return Ret;
+    return Ret;
 }
index b8fb979..ddcd7bb 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * COPYRIGHT:         See COPYING in the top level directory
  * PROJECT:           ReactOS kernel
  * PURPOSE:           GDI Driver Performance Counter Functions
 VOID APIENTRY
 EngQueryPerformanceFrequency(LONGLONG *Frequency)
 {
-  LARGE_INTEGER Freq;
+    LARGE_INTEGER Freq;
 
-  KeQueryPerformanceCounter(&Freq);
-  *Frequency = Freq.QuadPart;
+    KeQueryPerformanceCounter(&Freq);
+    *Frequency = Freq.QuadPart;
 }
 
 /*
@@ -29,8 +29,8 @@ EngQueryPerformanceFrequency(LONGLONG *Frequency)
 VOID APIENTRY
 EngQueryPerformanceCounter(LONGLONG *Count)
 {
-  LARGE_INTEGER PerfCount;
+    LARGE_INTEGER PerfCount;
 
-  PerfCount = KeQueryPerformanceCounter(NULL);
-  *Count = PerfCount.QuadPart;
+    PerfCount = KeQueryPerformanceCounter(NULL);
+    *Count = PerfCount.QuadPart;
 }
index cb15505..9e16965 100644 (file)
@@ -8,26 +8,28 @@
  */
 HSEMAPHORE
 APIENTRY
-EngCreateSemaphore ( VOID )
+EngCreateSemaphore(VOID)
 {
-  // www.osr.com/ddk/graphics/gdifncs_95lz.htm
-  PERESOURCE psem = ExAllocatePoolWithTag( NonPagedPool, sizeof(ERESOURCE), GDITAG_SEMAPHORE );
-  if ( !psem )
-    return NULL;
-  if ( !NT_SUCCESS(ExInitializeResourceLite ( psem )) )
-  {
-    ExFreePoolWithTag ( psem, GDITAG_SEMAPHORE );
-    return NULL;
-  }
-  return (HSEMAPHORE)psem;
+    // www.osr.com/ddk/graphics/gdifncs_95lz.htm
+    PERESOURCE psem = ExAllocatePoolWithTag(NonPagedPool, sizeof(ERESOURCE), GDITAG_SEMAPHORE);
+    if (!psem)
+        return NULL;
+
+    if (!NT_SUCCESS(ExInitializeResourceLite(psem)))
+    {
+        ExFreePoolWithTag ( psem, GDITAG_SEMAPHORE );
+        return NULL;
+    }
+
+    return (HSEMAPHORE)psem;
 }
 
 VOID
 FASTCALL
-IntGdiAcquireSemaphore ( HSEMAPHORE hsem )
+IntGdiAcquireSemaphore(HSEMAPHORE hsem)
 {
-  KeEnterCriticalRegion();
-  ExAcquireResourceExclusiveLite ( (PERESOURCE)hsem, TRUE );
+    KeEnterCriticalRegion();
+    ExAcquireResourceExclusiveLite ((PERESOURCE)hsem, TRUE);
 }
 
 /*
@@ -35,14 +37,14 @@ IntGdiAcquireSemaphore ( HSEMAPHORE hsem )
  */
 VOID
 APIENTRY
-EngAcquireSemaphore ( IN HSEMAPHORE hsem )
+EngAcquireSemaphore(IN HSEMAPHORE hsem)
 {
-  // www.osr.com/ddk/graphics/gdifncs_14br.htm
-  PTHREADINFO W32Thread;
-  ASSERT(hsem);
-  IntGdiAcquireSemaphore ( hsem );
-  W32Thread = PsGetThreadWin32Thread(PsGetCurrentThread());
-  if (W32Thread) W32Thread->dwEngAcquireCount++;
+    // www.osr.com/ddk/graphics/gdifncs_14br.htm
+    PTHREADINFO W32Thread;
+    ASSERT(hsem);
+    IntGdiAcquireSemaphore(hsem);
+    W32Thread = PsGetThreadWin32Thread(PsGetCurrentThread());
+    if (W32Thread) W32Thread->dwEngAcquireCount++;
 }
 
 
@@ -50,8 +52,8 @@ VOID
 FASTCALL
 IntGdiReleaseSemaphore ( HSEMAPHORE hsem )
 {
-  ExReleaseResourceLite ( (PERESOURCE)hsem );
-  KeLeaveCriticalRegion();
+    ExReleaseResourceLite((PERESOURCE)hsem);
+    KeLeaveCriticalRegion();
 }
 
 /*
@@ -61,12 +63,12 @@ VOID
 APIENTRY
 EngReleaseSemaphore ( IN HSEMAPHORE hsem )
 {
-  // www.osr.com/ddk/graphics/gdifncs_5u3r.htm
-  PTHREADINFO W32Thread;
-  ASSERT(hsem);
-  W32Thread = PsGetThreadWin32Thread(PsGetCurrentThread());
-  if (W32Thread) --W32Thread->dwEngAcquireCount;
-  IntGdiReleaseSemaphore ( hsem );
+    // www.osr.com/ddk/graphics/gdifncs_5u3r.htm
+    PTHREADINFO W32Thread;
+    ASSERT(hsem);
+    W32Thread = PsGetThreadWin32Thread(PsGetCurrentThread());
+    if (W32Thread) --W32Thread->dwEngAcquireCount;
+    IntGdiReleaseSemaphore(hsem);
 }
 
 VOID
@@ -89,12 +91,11 @@ VOID
 APIENTRY
 EngDeleteSemaphore ( IN HSEMAPHORE hsem )
 {
-  // www.osr.com/ddk/graphics/gdifncs_13c7.htm
-  ASSERT ( hsem );
-
-  ExDeleteResourceLite((PERESOURCE)hsem);
+    // www.osr.com/ddk/graphics/gdifncs_13c7.htm
+    ASSERT(hsem);
 
-  ExFreePoolWithTag( (PVOID)hsem, GDITAG_SEMAPHORE);
+    ExDeleteResourceLite((PERESOURCE)hsem);
+    ExFreePoolWithTag((PVOID)hsem, GDITAG_SEMAPHORE);
 }
 
 /*
@@ -104,9 +105,9 @@ BOOL
 APIENTRY
 EngIsSemaphoreOwned ( IN HSEMAPHORE hsem )
 {
-  // www.osr.com/ddk/graphics/gdifncs_6wmf.htm
-  ASSERT(hsem);
-  return (((PERESOURCE)hsem)->ActiveCount > 0);
+    // www.osr.com/ddk/graphics/gdifncs_6wmf.htm
+    ASSERT(hsem);
+    return (((PERESOURCE)hsem)->ActiveCount > 0);
 }
 
 /*
@@ -116,9 +117,9 @@ BOOL
 APIENTRY
 EngIsSemaphoreOwnedByCurrentThread ( IN HSEMAPHORE hsem )
 {
-  // www.osr.com/ddk/graphics/gdifncs_9yxz.htm
-  ASSERT(hsem);
-  return ExIsResourceAcquiredExclusiveLite ( (PERESOURCE)hsem );
+    // www.osr.com/ddk/graphics/gdifncs_9yxz.htm
+    ASSERT(hsem);
+    return ExIsResourceAcquiredExclusiveLite((PERESOURCE)hsem);
 }
 
 /*
@@ -126,32 +127,32 @@ EngIsSemaphoreOwnedByCurrentThread ( IN HSEMAPHORE hsem )
  */
 BOOL APIENTRY
 EngInitializeSafeSemaphore(
-   OUT ENGSAFESEMAPHORE *Semaphore)
+    OUT ENGSAFESEMAPHORE *Semaphore)
 {
-   HSEMAPHORE hSem;
-
-   if (InterlockedIncrement(&Semaphore->lCount) == 1)
-   {
-      /* Create the semaphore */
-      hSem = EngCreateSemaphore();
-      if (hSem == 0)
-      {
-         InterlockedDecrement(&Semaphore->lCount);
-         return FALSE;
-      }
-      /* FIXME: Not thread-safe! Check result of InterlockedCompareExchangePointer
-                and delete semaphore if already initialized! */
-      (void)InterlockedExchangePointer((volatile PVOID *)&Semaphore->hsem, hSem);
-   }
-   else
-   {
-      /* Wait for the other thread to create the semaphore */
-      ASSERT(Semaphore->lCount > 1);
-      ASSERT_IRQL_LESS_OR_EQUAL(PASSIVE_LEVEL);
-      while (Semaphore->hsem == NULL);
-   }
-
-   return TRUE;
+    HSEMAPHORE hSem;
+
+    if (InterlockedIncrement(&Semaphore->lCount) == 1)
+    {
+        /* Create the semaphore */
+        hSem = EngCreateSemaphore();
+        if (hSem == 0)
+        {
+            InterlockedDecrement(&Semaphore->lCount);
+            return FALSE;
+        }
+        /* FIXME: Not thread-safe! Check result of InterlockedCompareExchangePointer
+                  and delete semaphore if already initialized! */
+        (void)InterlockedExchangePointer((volatile PVOID *)&Semaphore->hsem, hSem);
+    }
+    else
+    {
+        /* Wait for the other thread to create the semaphore */
+        ASSERT(Semaphore->lCount > 1);
+        ASSERT_IRQL_LESS_OR_EQUAL(PASSIVE_LEVEL);
+        while (Semaphore->hsem == NULL);
+    }
+
+    return TRUE;
 }
 
 /*
@@ -159,14 +160,14 @@ EngInitializeSafeSemaphore(
  */
 VOID APIENTRY
 EngDeleteSafeSemaphore(
-   IN OUT ENGSAFESEMAPHORE *Semaphore)
+    IN OUT ENGSAFESEMAPHORE *Semaphore)
 {
-   if (InterlockedDecrement(&Semaphore->lCount) == 0)
-   {
-      /* FIXME: Not thread-safe! Use result of InterlockedCompareExchangePointer! */
-      EngDeleteSemaphore(Semaphore->hsem);
-      (void)InterlockedExchangePointer((volatile PVOID *)&Semaphore->hsem, NULL);
-   }
+    if (InterlockedDecrement(&Semaphore->lCount) == 0)
+    {
+        /* FIXME: Not thread-safe! Use result of InterlockedCompareExchangePointer! */
+        EngDeleteSemaphore(Semaphore->hsem);
+        (void)InterlockedExchangePointer((volatile PVOID *)&Semaphore->hsem, NULL);
+    }
 }
 
 /* EOF */
index 96c629f..b1e2544 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * COPYRIGHT:         See COPYING in the top level directory
  * PROJECT:          ReactOS win32 subsystem
- * PURPOSE:          
+ * PURPOSE:
  * FILE:             subsystems/win32k/eng/sort.c
  * PROGRAMER:        ReactOS Team
  */
 /*
  * @implemented
  */
-void APIENTRY
+void
+APIENTRY
 EngSort(IN OUT PBYTE Buf, IN ULONG ElemSize, IN ULONG ElemCount, IN SORTCOMP CompFunc)
 {
-  qsort(Buf, ElemCount, ElemSize, CompFunc);
+    qsort(Buf, ElemCount, ElemSize, CompFunc);
 }
 
 /* EOF */
index 14cbc5b..3094af3 100644 (file)
@@ -8,82 +8,87 @@
 BOOL
 APIENTRY
 STROBJ_bEnum(
-       IN STROBJ  *pstro,
-       OUT ULONG  *pc,
-       OUT PGLYPHPOS  *ppgpos
-       )
+    IN STROBJ *pstro,
+    OUT ULONG *pc,
+    OUT PGLYPHPOS *ppgpos)
 {
-  // www.osr.com/ddk/graphics/gdifncs_65uv.htm
-  UNIMPLEMENTED;
-  return FALSE;
+    // www.osr.com/ddk/graphics/gdifncs_65uv.htm
+    UNIMPLEMENTED;
+    return FALSE;
 }
 
 DWORD
 APIENTRY
-STROBJ_dwGetCodePage ( IN STROBJ *pstro )
+STROBJ_dwGetCodePage(
+    IN STROBJ *pstro)
 {
-  // www.osr.com/ddk/graphics/gdifncs_9jmv.htm
-  PSTRGDI pStrGdi = (PSTRGDI) pstro;
-  return pStrGdi->dwCodePage;
+    // www.osr.com/ddk/graphics/gdifncs_9jmv.htm
+    PSTRGDI pStrGdi = (PSTRGDI) pstro;
+    return pStrGdi->dwCodePage;
 }
 
 VOID
 APIENTRY
-STROBJ_vEnumStart ( IN STROBJ *pstro )
+STROBJ_vEnumStart(
+    IN STROBJ *pstro)
 {
-  // www.osr.com/ddk/graphics/gdifncs_32uf.htm
-  UNIMPLEMENTED;
+    // www.osr.com/ddk/graphics/gdifncs_32uf.htm
+    UNIMPLEMENTED;
 }
 
 /*
  * @unimplemented
  */
-BOOL APIENTRY
+BOOL
+APIENTRY
 STROBJ_bEnumPositionsOnly(
-   IN STROBJ *StringObj,
-   OUT ULONG *Count,
-   OUT PGLYPHPOS *Pos)
+    IN STROBJ *StringObj,
+    OUT ULONG *Count,
+    OUT PGLYPHPOS *Pos)
 {
-   UNIMPLEMENTED;
-   return (BOOL) DDI_ERROR;
+    UNIMPLEMENTED;
+    return (BOOL) DDI_ERROR;
 }
 
 /*
  * @unimplemented
  */
-BOOL APIENTRY
+BOOL
+APIENTRY
 STROBJ_bGetAdvanceWidths(
-   IN STROBJ *StringObj,
-   IN ULONG First,
-   IN ULONG Count,
-   OUT POINTQF *Widths)
+    IN STROBJ *StringObj,
+    IN ULONG First,
+    IN ULONG Count,
+    OUT POINTQF *Widths)
 {
-   UNIMPLEMENTED;
-   return FALSE;
+    UNIMPLEMENTED;
+    return FALSE;
 }
 
 /*
  * @implemented
  */
-FIX APIENTRY
+FIX
+APIENTRY
 STROBJ_fxBreakExtra(
-   IN STROBJ *StringObj)
+    IN STROBJ *StringObj)
 {
-  PSTRGDI pStrGdi = (PSTRGDI) StringObj;
-  if (pStrGdi->StrObj.flAccel & SO_BREAK_EXTRA) return pStrGdi->fxBreakExtra;
-  return (FIX) 0;
+    PSTRGDI pStrGdi = (PSTRGDI) StringObj;
+    if (pStrGdi->StrObj.flAccel & SO_BREAK_EXTRA) return pStrGdi->fxBreakExtra;
+    return (FIX) 0;
 }
 
 /*
  * @implemented
  */
-FIX APIENTRY
+FIX
+APIENTRY
 STROBJ_fxCharacterExtra(
-   IN STROBJ *StringObj)
+    IN STROBJ *StringObj)
 {
-  PSTRGDI pStrGdi = (PSTRGDI) StringObj;
-  if (pStrGdi->StrObj.flAccel & SO_CHARACTER_EXTRA) return pStrGdi->fxExtra;
-  return (FIX) 0;
+    PSTRGDI pStrGdi = (PSTRGDI) StringObj;
+    if (pStrGdi->StrObj.flAccel & SO_CHARACTER_EXTRA) return pStrGdi->fxExtra;
+    return (FIX)0;
 }
 
 /* EOF */
index 24a6113..1157e79 100644 (file)
@@ -8,28 +8,26 @@
 #define UNIMPLEMENTED DbgPrint("(%s:%i) WIN32K: %s UNIMPLEMENTED\n", __FILE__, __LINE__, __FUNCTION__ )
 
 
-
 /*
  * @unimplemented
  */
 BOOL
 APIENTRY
-EngTextOut (
-       SURFOBJ  *pso,
-       STROBJ   *pstro,
-       FONTOBJ  *pfo,
-       CLIPOBJ  *pco,
-       RECTL    *prclExtra,
-       RECTL    *prclOpaque,
-       BRUSHOBJ *pboFore,
-       BRUSHOBJ *pboOpaque,
-       POINTL   *pptlOrg,
-       MIX       mix
-       )
-{
-  // www.osr.com/ddk/graphics/gdifncs_4tgn.htm
-  UNIMPLEMENTED;
-  return FALSE;
+EngTextOut(
+    SURFOBJ  *pso,
+    STROBJ   *pstro,
+    FONTOBJ  *pfo,
+    CLIPOBJ  *pco,
+    RECTL    *prclExtra,
+    RECTL    *prclOpaque,
+    BRUSHOBJ *pboFore,
+    BRUSHOBJ *pboOpaque,
+    POINTL   *pptlOrg,
+    MIX       mix)
+{
+    // www.osr.com/ddk/graphics/gdifncs_4tgn.htm
+    UNIMPLEMENTED;
+    return FALSE;
 }
 
 /*
@@ -37,11 +35,11 @@ EngTextOut (
  */
 PATHOBJ*
 APIENTRY
-CLIPOBJ_ppoGetPath ( IN CLIPOBJ *pco )
+CLIPOBJ_ppoGetPath(IN CLIPOBJ *pco)
 {
-  // www.osr.com/ddk/graphics/gdifncs_6hbb.htm
-  UNIMPLEMENTED;
-  return 0;
+    // www.osr.com/ddk/graphics/gdifncs_6hbb.htm
+    UNIMPLEMENTED;
+    return 0;
 }
 
 /*
@@ -49,11 +47,11 @@ CLIPOBJ_ppoGetPath ( IN CLIPOBJ *pco )
  */
 BOOL
 APIENTRY
-EngCheckAbort ( IN SURFOBJ *pso )
+EngCheckAbort(IN SURFOBJ *pso)
 {
-  // www.osr.com/ddk/graphics/gdifncs_3u7b.htm
-  UNIMPLEMENTED;
-  return FALSE;
+    // www.osr.com/ddk/graphics/gdifncs_3u7b.htm
+    UNIMPLEMENTED;
+    return FALSE;
 }
 
 /*
@@ -62,14 +60,13 @@ EngCheckAbort ( IN SURFOBJ *pso )
 FD_GLYPHSET*
 APIENTRY
 EngComputeGlyphSet(
-       IN INT nCodePage,
-       IN INT nFirstChar,
-       IN INT cChars
-       )
+    IN INT nCodePage,
+    IN INT nFirstChar,
+    IN INT cChars)
 {
-  // www.osr.com/ddk/graphics/gdifncs_9607.htm
-  UNIMPLEMENTED;
-  return NULL;
+    // www.osr.com/ddk/graphics/gdifncs_9607.htm
+    UNIMPLEMENTED;
+    return NULL;
 }
 
 /*
@@ -77,11 +74,11 @@ EngComputeGlyphSet(
  */
 PATHOBJ*
 APIENTRY
-EngCreatePath ( VOID )
+EngCreatePath(VOID)
 {
-  // www.osr.com/ddk/graphics/gdifncs_4aav.htm
-  UNIMPLEMENTED;
-  return NULL;
+    // www.osr.com/ddk/graphics/gdifncs_4aav.htm
+    UNIMPLEMENTED;
+    return NULL;
 }
 
 /*
@@ -89,10 +86,10 @@ EngCreatePath ( VOID )
  */
 VOID
 APIENTRY
-EngDeletePath ( IN PATHOBJ *ppo )
+EngDeletePath(IN PATHOBJ *ppo)
 {
-  // www.osr.com/ddk/graphics/gdifncs_3fl3.htm
-  UNIMPLEMENTED;
+    // www.osr.com/ddk/graphics/gdifncs_3fl3.htm
+    UNIMPLEMENTED;
 }
 
 /*
@@ -100,18 +97,17 @@ EngDeletePath ( IN PATHOBJ *ppo )
  */
 BOOL
 APIENTRY
-EngEnumForms (
-       IN  HANDLE   hPrinter,
-       IN  DWORD    Level,
-       OUT LPBYTE   pForm,
-       IN  DWORD    cbBuf,
-       OUT LPDWORD  pcbNeeded,
-       OUT LPDWORD  pcReturned
-       )
+EngEnumForms(
+    IN  HANDLE   hPrinter,
+    IN  DWORD    Level,
+    OUT LPBYTE   pForm,
+    IN  DWORD    cbBuf,
+    OUT LPDWORD  pcbNeeded,
+    OUT LPDWORD  pcReturned)
 {
-  // www.osr.com/ddk/graphics/gdifncs_5e07.htm
-  UNIMPLEMENTED;
-  return FALSE;
+    // www.osr.com/ddk/graphics/gdifncs_5e07.htm
+    UNIMPLEMENTED;
+    return FALSE;
 }
 
 /*
@@ -119,19 +115,18 @@ EngEnumForms (
  */
 BOOL
 APIENTRY
-EngFillPath (
-       IN SURFOBJ   *pso,
-       IN PATHOBJ   *ppo,
-       IN CLIPOBJ   *pco,
-       IN BRUSHOBJ  *pbo,
-       IN POINTL    *pptlBrushOrg,
-       IN MIX        mix,
-       IN FLONG      flOptions
-       )
+EngFillPath(
+    IN SURFOBJ   *pso,
+    IN PATHOBJ   *ppo,
+    IN CLIPOBJ   *pco,
+    IN BRUSHOBJ  *pbo,
+    IN POINTL    *pptlBrushOrg,
+    IN MIX        mix,
+    IN FLONG      flOptions)
 {
-  // www.osr.com/ddk/graphics/gdifncs_9pyf.htm
-  UNIMPLEMENTED;
-  return FALSE;
+    // www.osr.com/ddk/graphics/gdifncs_9pyf.htm
+    UNIMPLEMENTED;
+    return FALSE;
 }
 
 /*
@@ -140,15 +135,14 @@ EngFillPath (
 PVOID
 APIENTRY
 EngFindResource(
-       IN  HANDLE  h,
-       IN  int     iName,
-       IN  int     iType,
-       OUT PULONG  pulSize
-       )
+    IN  HANDLE  h,
+    IN  int     iName,
+    IN  int     iType,
+    OUT PULONG  pulSize)
 {
-  // www.osr.com/ddk/graphics/gdifncs_7rjb.htm
-  UNIMPLEMENTED;
-  return NULL;
+    // www.osr.com/ddk/graphics/gdifncs_7rjb.htm
+    UNIMPLEMENTED;
+    return NULL;
 }
 
 /*
@@ -157,13 +151,12 @@ EngFindResource(
 BOOL
 APIENTRY
 EngGetFileChangeTime(
-       IN  HANDLE          h,
-       OUT LARGE_INTEGER  *pChangeTime
-       )
+    IN  HANDLE h,
+    OUT LARGE_INTEGER *pChangeTime)
 {
-  // www.osr.com/ddk/graphics/gdifncs_1i1z.htm
-  UNIMPLEMENTED;
-  return FALSE;
+    // www.osr.com/ddk/graphics/gdifncs_1i1z.htm
+    UNIMPLEMENTED;
+    return FALSE;
 }
 
 /*
@@ -172,13 +165,12 @@ EngGetFileChangeTime(
 BOOL
 APIENTRY
 EngGetFilePath(
-       IN  HANDLE h,
-        OUT WCHAR (*pDest)[MAX_PATH+1]
-       )
+    IN  HANDLE h,
+    OUT WCHAR (*pDest)[MAX_PATH + 1])
 {
-  // www.osr.com/ddk/graphics/gdifncs_5g2v.htm
-  UNIMPLEMENTED;
-  return FALSE;
+    // www.osr.com/ddk/graphics/gdifncs_5g2v.htm
+    UNIMPLEMENTED;
+    return FALSE;
 }
 
 /*
@@ -187,17 +179,16 @@ EngGetFilePath(
 BOOL
 APIENTRY
 EngGetForm(
-       IN  HANDLE   hPrinter,
-       IN  LPWSTR   pFormName,
-       IN  DWORD    Level,
-       OUT LPBYTE   pForm,
-       IN  DWORD    cbBuf,
-       OUT LPDWORD  pcbNeeded
-       )
-{
-  // www.osr.com/ddk/graphics/gdifncs_5vvr.htm
-  UNIMPLEMENTED;
-  return FALSE;
+    IN  HANDLE   hPrinter,
+    IN  LPWSTR   pFormName,
+    IN  DWORD    Level,
+    OUT LPBYTE   pForm,
+    IN  DWORD    cbBuf,
+    OUT LPDWORD  pcbNeeded)
+{
+    // www.osr.com/ddk/graphics/gdifncs_5vvr.htm
+    UNIMPLEMENTED;
+    return FALSE;
 }
 
 /*
@@ -206,16 +197,15 @@ EngGetForm(
 BOOL
 APIENTRY
 EngGetPrinter(
-       IN  HANDLE   hPrinter,
-       IN  DWORD    dwLevel,
-       OUT LPBYTE   pPrinter,
-       IN  DWORD    cbBuf,
-       OUT LPDWORD  pcbNeeded
-       )
+    IN  HANDLE   hPrinter,
+    IN  DWORD    dwLevel,
+    OUT LPBYTE   pPrinter,
+    IN  DWORD    cbBuf,
+    OUT LPDWORD  pcbNeeded)
 {
-  // www.osr.com/ddk/graphics/gdifncs_50h3.htm
-  UNIMPLEMENTED;
-  return FALSE;
+    // www.osr.com/ddk/graphics/gdifncs_50h3.htm
+    UNIMPLEMENTED;
+    return FALSE;
 }
 
 /*
@@ -224,17 +214,16 @@ EngGetPrinter(
 DWORD
 APIENTRY
 EngGetPrinterData(
-       IN  HANDLE   hPrinter,
-       IN  LPWSTR   pValueName,
-       OUT LPDWORD  pType,
-       OUT LPBYTE   pData,
-       IN  DWORD    nSize,
-       OUT LPDWORD  pcbNeeded
-       )
-{
-  // www.osr.com/ddk/graphics/gdifncs_8t5z.htm
-  UNIMPLEMENTED;
-  return 0;
+    IN  HANDLE   hPrinter,
+    IN  LPWSTR   pValueName,
+    OUT LPDWORD  pType,
+    OUT LPBYTE   pData,
+    IN  DWORD    nSize,
+    OUT LPDWORD  pcbNeeded)
+{
+    // www.osr.com/ddk/graphics/gdifncs_8t5z.htm
+    UNIMPLEMENTED;
+    return 0;
 }
 
 /*
@@ -242,11 +231,11 @@ EngGetPrinterData(
  */
 LPWSTR
 APIENTRY
-EngGetPrinterDataFileName ( IN HDEV hdev )
+EngGetPrinterDataFileName(IN HDEV hdev)
 {
-  // www.osr.com/ddk/graphics/gdifncs_2giv.htm
-  UNIMPLEMENTED;
-  return NULL;
+    // www.osr.com/ddk/graphics/gdifncs_2giv.htm
+    UNIMPLEMENTED;
+    return NULL;
 }
 
 /*
@@ -255,17 +244,16 @@ EngGetPrinterDataFileName ( IN HDEV hdev )
 BOOL
 APIENTRY
 EngGetType1FontList(
-       IN  HDEV            hdev,
-       OUT TYPE1_FONT     *pType1Buffer,
-       IN  ULONG           cjType1Buffer,
-       OUT PULONG          pulLocalFonts,
-       OUT PULONG          pulRemoteFonts,
-       OUT LARGE_INTEGER  *pLastModified
-       )
-{
-  // www.osr.com/ddk/graphics/gdifncs_6e5j.htm
-  UNIMPLEMENTED;
-  return FALSE;
+    IN  HDEV            hdev,
+    OUT TYPE1_FONT     *pType1Buffer,
+    IN  ULONG           cjType1Buffer,
+    OUT PULONG          pulLocalFonts,
+    OUT PULONG          pulRemoteFonts,
+    OUT LARGE_INTEGER  *pLastModified)
+{
+    // www.osr.com/ddk/graphics/gdifncs_6e5j.htm
+    UNIMPLEMENTED;
+    return FALSE;
 }
 
 /*
@@ -273,130 +261,123 @@ EngGetType1FontList(
  */
 BOOL
 APIENTRY
-EngMarkBandingSurface ( IN HSURF hsurf )
+EngMarkBandingSurface(IN HSURF hsurf)
 {
-  // www.osr.com/ddk/graphics/gdifncs_2jon.htm
-  UNIMPLEMENTED;
-  return FALSE;
+    // www.osr.com/ddk/graphics/gdifncs_2jon.htm
+    UNIMPLEMENTED;
+    return FALSE;
 }
 
 INT
 APIENTRY
 EngMultiByteToWideChar(
-       IN UINT  CodePage,
-       OUT LPWSTR  WideCharString,
-       IN INT  BytesInWideCharString,
-       IN LPSTR  MultiByteString,
-       IN INT  BytesInMultiByteString
-       )
+    IN UINT  CodePage,
+    OUT LPWSTR  WideCharString,
+    IN INT  BytesInWideCharString,
+    IN LPSTR  MultiByteString,
+    IN INT  BytesInMultiByteString)
 {
-  // www.osr.com/ddk/graphics/gdifncs_32cn.htm
-  UNIMPLEMENTED;
-  return 0;
+    // www.osr.com/ddk/graphics/gdifncs_32cn.htm
+    UNIMPLEMENTED;
+    return 0;
 }
 
 VOID
 APIENTRY
-EngQueryLocalTime ( OUT PENG_TIME_FIELDS ptf )
+EngQueryLocalTime(OUT PENG_TIME_FIELDS ptf)
 {
-  // www.osr.com/ddk/graphics/gdifncs_389z.htm
-  UNIMPLEMENTED;
+    // www.osr.com/ddk/graphics/gdifncs_389z.htm
+    UNIMPLEMENTED;
 }
 
 ULONG
 APIENTRY
 EngQueryPalette(
-       IN HPALETTE  hPal,
-       OUT ULONG  *piMode,
-       IN ULONG  cColors,
-       OUT ULONG  *pulColors
-       )
+    IN HPALETTE  hPal,
+    OUT ULONG  *piMode,
+    IN ULONG  cColors,
+    OUT ULONG  *pulColors)
 {
-  // www.osr.com/ddk/graphics/gdifncs_21t3.htm
-  UNIMPLEMENTED;
-  return 0;
+    // www.osr.com/ddk/graphics/gdifncs_21t3.htm
+    UNIMPLEMENTED;
+    return 0;
 }
 
 DWORD
 APIENTRY
 EngSetPrinterData(
-       IN HANDLE  hPrinter,
-       IN LPWSTR  pType,
-       IN DWORD  dwType,
-       IN LPBYTE  lpbPrinterData,
-       IN DWORD  cjPrinterData
-       )
+    IN HANDLE  hPrinter,
+    IN LPWSTR  pType,
+    IN DWORD  dwType,
+    IN LPBYTE  lpbPrinterData,
+    IN DWORD  cjPrinterData)
 {
-  // www.osr.com/ddk/graphics/gdifncs_8drb.htm
-  UNIMPLEMENTED;
-  return 0;
+    // www.osr.com/ddk/graphics/gdifncs_8drb.htm
+    UNIMPLEMENTED;
+    return 0;
 }
 
 BOOL
 APIENTRY
 EngStrokeAndFillPath(
-       IN SURFOBJ  *pso,
-       IN PATHOBJ  *ppo,
-       IN CLIPOBJ  *pco,
-       IN XFORMOBJ  *pxo,
-       IN BRUSHOBJ  *pboStroke,
-       IN LINEATTRS  *plineattrs,
-       IN BRUSHOBJ  *pboFill,
-       IN POINTL  *pptlBrushOrg,
-       IN MIX  mixFill,
-       IN FLONG  flOptions
-       )
-{
-  // www.osr.com/ddk/graphics/gdifncs_2xwn.htm
-  UNIMPLEMENTED;
-  return FALSE;
+    IN SURFOBJ  *pso,
+    IN PATHOBJ  *ppo,
+    IN CLIPOBJ  *pco,
+    IN XFORMOBJ  *pxo,
+    IN BRUSHOBJ  *pboStroke,
+    IN LINEATTRS  *plineattrs,
+    IN BRUSHOBJ  *pboFill,
+    IN POINTL  *pptlBrushOrg,
+    IN MIX  mixFill,
+    IN FLONG  flOptions)
+{
+    // www.osr.com/ddk/graphics/gdifncs_2xwn.htm
+    UNIMPLEMENTED;
+    return FALSE;
 }
 
 BOOL
 APIENTRY
 EngStrokePath(
-       IN SURFOBJ  *pso,
-       IN PATHOBJ  *ppo,
-       IN CLIPOBJ  *pco,
-       IN XFORMOBJ  *pxo,
-       IN BRUSHOBJ  *pbo,
-       IN POINTL  *pptlBrushOrg,
-       IN LINEATTRS  *plineattrs,
-       IN MIX  mix
-       )
-{
-  // www.osr.com/ddk/graphics/gdifncs_4yaw.htm
-  UNIMPLEMENTED;
-  return FALSE;
+    IN SURFOBJ  *pso,
+    IN PATHOBJ  *ppo,
+    IN CLIPOBJ  *pco,
+    IN XFORMOBJ  *pxo,
+    IN BRUSHOBJ  *pbo,
+    IN POINTL  *pptlBrushOrg,
+    IN LINEATTRS  *plineattrs,
+    IN MIX  mix)
+{
+    // www.osr.com/ddk/graphics/gdifncs_4yaw.htm
+    UNIMPLEMENTED;
+    return FALSE;
 }
 
 INT
 APIENTRY
 EngWideCharToMultiByte(
-       IN UINT  CodePage,
-       IN LPWSTR  WideCharString,
-       IN INT  BytesInWideCharString,
-       OUT LPSTR  MultiByteString,
-       IN INT  BytesInMultiByteString
-       )
+    IN UINT  CodePage,
+    IN LPWSTR  WideCharString,
+    IN INT  BytesInWideCharString,
+    OUT LPSTR  MultiByteString,
+    IN INT  BytesInMultiByteString)
 {
-  // www.osr.com/ddk/graphics/gdifncs_35wn.htm
-  UNIMPLEMENTED;
-  return 0;
+    // www.osr.com/ddk/graphics/gdifncs_35wn.htm
+    UNIMPLEMENTED;
+    return 0;
 }
 
 BOOL
 APIENTRY
-EngWritePrinter (
-       IN HANDLE    hPrinter,
-       IN LPVOID    pBuf,
-       IN DWORD     cbBuf,
-       OUT LPDWORD  pcWritten
-       )
+EngWritePrinter(
+    IN HANDLE    hPrinter,
+    IN LPVOID    pBuf,
+    IN DWORD     cbBuf,
+    OUT LPDWORD  pcWritten)
 {
-  // www.osr.com/ddk/graphics/gdifncs_9v6v.htm
-  UNIMPLEMENTED;
-  return FALSE;
+    // www.osr.com/ddk/graphics/gdifncs_9v6v.htm
+    UNIMPLEMENTED;
+    return FALSE;
 }
 
 /*
@@ -404,13 +385,12 @@ EngWritePrinter (
  */
 ULONG
 APIENTRY
-FONTOBJ_cGetAllGlyphHandles (
-       IN FONTOBJ  *FontObj,
-       IN HGLYPH   *Glyphs
-       )
+FONTOBJ_cGetAllGlyphHandles(
+    IN FONTOBJ  *FontObj,
+    IN HGLYPH   *Glyphs)
 {
-  UNIMPLEMENTED;
-  return 0;
+    UNIMPLEMENTED;
+    return 0;
 }
 
 /*
@@ -419,15 +399,14 @@ FONTOBJ_cGetAllGlyphHandles (
 ULONG
 APIENTRY
 FONTOBJ_cGetGlyphs(
-       IN FONTOBJ *FontObj,
-       IN ULONG    Mode,
-       IN ULONG    NumGlyphs,
-       IN HGLYPH  *GlyphHandles,
-       IN PVOID   *OutGlyphs
-       )
+    IN FONTOBJ *FontObj,
+    IN ULONG    Mode,
+    IN ULONG    NumGlyphs,
+    IN HGLYPH  *GlyphHandles,
+    IN PVOID   *OutGlyphs)
 {
-  UNIMPLEMENTED;
-  return 0;
+    UNIMPLEMENTED;
+    return 0;
 }
 
 /*
@@ -435,10 +414,10 @@ FONTOBJ_cGetGlyphs(
  */
 IFIMETRICS*
 APIENTRY
-FONTOBJ_pifi ( IN FONTOBJ *FontObj )
+FONTOBJ_pifi(IN FONTOBJ *FontObj)
 {
-  UNIMPLEMENTED;
-  return NULL;
+    UNIMPLEMENTED;
+    return NULL;
 }
 
 /*
@@ -446,12 +425,12 @@ FONTOBJ_pifi ( IN FONTOBJ *FontObj )
  */
 PVOID
 APIENTRY
-FONTOBJ_pvTrueTypeFontFile (
-       IN FONTOBJ  *FontObj,
-       IN ULONG    *FileSize)
+FONTOBJ_pvTrueTypeFontFile(
+    IN FONTOBJ  *FontObj,
+    IN ULONG    *FileSize)
 {
-  UNIMPLEMENTED;
-  return NULL;
+    UNIMPLEMENTED;
+    return NULL;
 }
 
 /*
@@ -459,10 +438,10 @@ FONTOBJ_pvTrueTypeFontFile (
  */
 XFORMOBJ*
 APIENTRY
-FONTOBJ_pxoGetXform ( IN FONTOBJ *FontObj )
+FONTOBJ_pxoGetXform(IN FONTOBJ *FontObj)
 {
-  UNIMPLEMENTED;
-  return NULL;
+    UNIMPLEMENTED;
+    return NULL;
 }
 
 /*
@@ -470,157 +449,149 @@ FONTOBJ_pxoGetXform ( IN FONTOBJ *FontObj )
  */
 VOID
 APIENTRY
-FONTOBJ_vGetInfo (
-       IN  FONTOBJ   *FontObj,
-       IN  ULONG      InfoSize,
-       OUT PFONTINFO  FontInfo)
+FONTOBJ_vGetInfo(
+    IN  FONTOBJ *FontObj,
+    IN  ULONG InfoSize,
+    OUT PFONTINFO FontInfo)
 {
-  UNIMPLEMENTED;
+    UNIMPLEMENTED;
 }
 
 LONG
 APIENTRY
 HT_ComputeRGBGammaTable(
-       IN USHORT  GammaTableEntries,
-       IN USHORT  GammaTableType,
-       IN USHORT  RedGamma,
-       IN USHORT  GreenGamma,
-       IN USHORT  BlueGamma,
-       OUT LPBYTE  pGammaTable
-       )
-{
-  // www.osr.com/ddk/graphics/gdifncs_9dpj.htm
-  UNIMPLEMENTED;
-  return 0;
+    IN USHORT  GammaTableEntries,
+    IN USHORT  GammaTableType,
+    IN USHORT  RedGamma,
+    IN USHORT  GreenGamma,
+    IN USHORT  BlueGamma,
+    OUT LPBYTE  pGammaTable)
+{
+    // www.osr.com/ddk/graphics/gdifncs_9dpj.htm
+    UNIMPLEMENTED;
+    return 0;
 }
 
 LONG
 APIENTRY
 HT_Get8BPPFormatPalette(
-       OUT LPPALETTEENTRY  pPaletteEntry,
-       IN USHORT  RedGamma,
-       IN USHORT  GreenGamma,
-       IN USHORT  BlueGamma
-       )
+    OUT LPPALETTEENTRY  pPaletteEntry,
+    IN USHORT  RedGamma,
+    IN USHORT  GreenGamma,
+    IN USHORT  BlueGamma)
 {
-  // www.osr.com/ddk/graphics/gdifncs_8kvb.htm
-  UNIMPLEMENTED;
-  return 0;
+    // www.osr.com/ddk/graphics/gdifncs_8kvb.htm
+    UNIMPLEMENTED;
+    return 0;
 }
 
 BOOL
 APIENTRY
-PATHOBJ_bCloseFigure ( IN PATHOBJ *ppo )
+PATHOBJ_bCloseFigure(IN PATHOBJ *ppo)
 {
-  // www.osr.com/ddk/graphics/gdifncs_5mhz.htm
-  UNIMPLEMENTED;
-  return FALSE;
+    // www.osr.com/ddk/graphics/gdifncs_5mhz.htm
+    UNIMPLEMENTED;
+    return FALSE;
 }
 
 BOOL
 APIENTRY
-PATHOBJ_bEnum (
-       IN  PATHOBJ   *ppo,
-       OUT PATHDATA  *ppd
-       )
+PATHOBJ_bEnum(
+    IN  PATHOBJ   *ppo,
+    OUT PATHDATA  *ppd)
 {
-  // www.osr.com/ddk/graphics/gdifncs_98o7.htm
-  UNIMPLEMENTED;
-  return FALSE;
+    // www.osr.com/ddk/graphics/gdifncs_98o7.htm
+    UNIMPLEMENTED;
+    return FALSE;
 }
 
 BOOL
 APIENTRY
 PATHOBJ_bEnumClipLines(
-       IN PATHOBJ  *ppo,
-       IN ULONG  cb,
-       OUT CLIPLINE  *pcl
-       )
+    IN PATHOBJ  *ppo,
+    IN ULONG  cb,
+    OUT CLIPLINE  *pcl)
 {
-  // www.osr.com/ddk/graphics/gdifncs_4147.htm
-  UNIMPLEMENTED;
-  return FALSE;
+    // www.osr.com/ddk/graphics/gdifncs_4147.htm
+    UNIMPLEMENTED;
+    return FALSE;
 }
 
 BOOL
 APIENTRY
 PATHOBJ_bMoveTo(
-       IN PATHOBJ  *ppo,
-       IN POINTFIX  ptfx
-       )
+    IN PATHOBJ  *ppo,
+    IN POINTFIX  ptfx)
 {
-  // www.osr.com/ddk/graphics/gdifncs_70vb.htm
-  UNIMPLEMENTED;
-  return FALSE;
+    // www.osr.com/ddk/graphics/gdifncs_70vb.htm
+    UNIMPLEMENTED;
+    return FALSE;
 }
 
 BOOL
 APIENTRY
 PATHOBJ_bPolyBezierTo(
-       IN PATHOBJ  *ppo,
-       IN POINTFIX  *pptfx,
-       IN ULONG  cptfx
-       )
+    IN PATHOBJ  *ppo,
+    IN POINTFIX  *pptfx,
+    IN ULONG  cptfx)
 {
-  // www.osr.com/ddk/graphics/gdifncs_2c9z.htm
-  UNIMPLEMENTED;
-  return FALSE;
+    // www.osr.com/ddk/graphics/gdifncs_2c9z.htm
+    UNIMPLEMENTED;
+    return FALSE;
 }
 
 BOOL
 APIENTRY
 PATHOBJ_bPolyLineTo(
-       IN PATHOBJ  *ppo,
-       IN POINTFIX  *pptfx,
-       IN ULONG  cptfx
-       )
+    IN PATHOBJ  *ppo,
+    IN POINTFIX  *pptfx,
+    IN ULONG  cptfx)
 {
-  // www.osr.com/ddk/graphics/gdifncs_0x47.htm
-  UNIMPLEMENTED;
-  return FALSE;
+    // www.osr.com/ddk/graphics/gdifncs_0x47.htm
+    UNIMPLEMENTED;
+    return FALSE;
 }
 
 VOID
 APIENTRY
-PATHOBJ_vEnumStart ( IN PATHOBJ *ppo )
+PATHOBJ_vEnumStart(IN PATHOBJ *ppo)
 {
-  // www.osr.com/ddk/graphics/gdifncs_74br.htm
-  UNIMPLEMENTED;
+    // www.osr.com/ddk/graphics/gdifncs_74br.htm
+    UNIMPLEMENTED;
 }
 
 VOID
 APIENTRY
 PATHOBJ_vEnumStartClipLines(
-       IN PATHOBJ  *ppo,
-       IN CLIPOBJ  *pco,
-       IN SURFOBJ  *pso,
-       IN LINEATTRS  *pla
-       )
+    IN PATHOBJ  *ppo,
+    IN CLIPOBJ  *pco,
+    IN SURFOBJ  *pso,
+    IN LINEATTRS  *pla)
 {
-  // www.osr.com/ddk/graphics/gdifncs_5grr.htm
-  UNIMPLEMENTED;
+    // www.osr.com/ddk/graphics/gdifncs_5grr.htm
+    UNIMPLEMENTED;
 }
 
 VOID
 APIENTRY
 PATHOBJ_vGetBounds(
-       IN PATHOBJ  *ppo,
-       OUT PRECTFX  prectfx
-       )
+    IN PATHOBJ  *ppo,
+    OUT PRECTFX  prectfx)
 {
-  // www.osr.com/ddk/graphics/gdifncs_8qp3.htm
-  UNIMPLEMENTED;
+    // www.osr.com/ddk/graphics/gdifncs_8qp3.htm
+    UNIMPLEMENTED;
 }
 
 /*
  * @unimplemented
  */
-ULONG APIENTRY
+ULONG
+APIENTRY
 EngDitherColor(
-   IN HDEV hdev,
-   IN ULONG iMode,
-   IN ULONG rgb,
-   OUT ULONG *pul)
+    IN HDEV hdev,
+    IN ULONG iMode,
+    IN ULONG rgb,
+    OUT ULONG *pul)
 {
     *pul = 0;
     return DCR_SOLID;
@@ -629,12 +600,13 @@ EngDitherColor(
 /*
  * @unimplemented
  */
-HANDLE APIENTRY
+HANDLE
+APIENTRY
 BRUSHOBJ_hGetColorTransform(
-   IN BRUSHOBJ *Brush)
+    IN BRUSHOBJ *Brush)
 {
-   UNIMPLEMENTED;
-   return NULL;
+    UNIMPLEMENTED;
+    return NULL;
 }
 
 /*
@@ -643,85 +615,90 @@ BRUSHOBJ_hGetColorTransform(
 BOOL
 APIENTRY
 EngDeleteFile(
-   IN LPWSTR FileName)
+    IN LPWSTR FileName)
 {
-   UNIMPLEMENTED;
-   return FALSE;
+    UNIMPLEMENTED;
+    return FALSE;
 }
 
 /*
  * @unimplemented
  */
-BOOL APIENTRY
+BOOL
+APIENTRY
 EngGetPrinterDriver(
-   IN HANDLE Printer,
-   IN LPWSTR Environment,
-   IN DWORD Level,
-   OUT BYTE *DrvInfo,
-   IN DWORD Buf,
-   OUT DWORD *Needed)
+    IN HANDLE Printer,
+    IN LPWSTR Environment,
+    IN DWORD Level,
+    OUT BYTE *DrvInfo,
+    IN DWORD Buf,
+    OUT DWORD *Needed)
 {
-   UNIMPLEMENTED;
-   return FALSE;
+    UNIMPLEMENTED;
+    return FALSE;
 }
 
 /*
  * @unimplemented
  */
-ULONG APIENTRY
+ULONG
+APIENTRY
 EngHangNotification(
-   IN HDEV Dev,
-   IN PVOID Reserved)
+    IN HDEV Dev,
+    IN PVOID Reserved)
 {
-   UNIMPLEMENTED;
-   return EHN_ERROR;
+    UNIMPLEMENTED;
+    return EHN_ERROR;
 }
 
 /*
  * @unimplemented
  */
-BOOL APIENTRY
+BOOL
+APIENTRY
 EngLpkInstalled()
 {
-   UNIMPLEMENTED;
-   return FALSE;
+    UNIMPLEMENTED;
+    return FALSE;
 }
 
 /*
  * @unimplemented
  */
-BOOL APIENTRY
+BOOL
+APIENTRY
 EngPlgBlt(
-   IN SURFOBJ *Dest,
-   IN SURFOBJ *Source,
-   IN SURFOBJ *Mask,
-   IN CLIPOBJ *Clip,
-   IN XLATEOBJ *Xlate,
-   IN COLORADJUSTMENT *ColorAdjustment,
-   IN POINTL *BrusOrigin,
-   IN POINTFIX *DestPoints,
-   IN RECTL *SourceRect,
-   IN POINTL *MaskPoint,
-   IN ULONG Mode)
+    IN SURFOBJ *Dest,
+    IN SURFOBJ *Source,
+    IN SURFOBJ *Mask,
+    IN CLIPOBJ *Clip,
+    IN XLATEOBJ *Xlate,
+    IN COLORADJUSTMENT *ColorAdjustment,
+    IN POINTL *BrusOrigin,
+    IN POINTFIX *DestPoints,
+    IN RECTL *SourceRect,
+    IN POINTL *MaskPoint,
+    IN ULONG Mode)
 {
-   UNIMPLEMENTED;
-   return FALSE;
+    UNIMPLEMENTED;
+    return FALSE;
 }
 
 /*
  * @unimplemented
  */
-BOOL APIENTRY
+BOOL
+APIENTRY
 EngQueryDeviceAttribute(
-   IN HDEV Device,
-   IN ENG_DEVICE_ATTRIBUTE Attribute,
-   IN VOID *In,
-   IN ULONG InSize,
-   OUT VOID *Out,
-   OUT ULONG OutSize)
+    IN HDEV Device,
+    IN ENG_DEVICE_ATTRIBUTE Attribute,
+    IN VOID *In,
+    IN ULONG InSize,
+    OUT VOID *Out,
+    OUT ULONG OutSize)
 {
-   UNIMPLEMENTED;
-   return FALSE;
+    UNIMPLEMENTED;
+    return FALSE;
 }
 
 /*
@@ -731,74 +708,79 @@ LARGE_INTEGER
 APIENTRY
 EngQueryFileTimeStamp(IN LPWSTR FileName)
 {
-   LARGE_INTEGER FileTime;
-   FileTime.QuadPart = 0;
-   UNIMPLEMENTED;
-   return FileTime;
+    LARGE_INTEGER FileTime;
+    FileTime.QuadPart = 0;
+    UNIMPLEMENTED;
+    return FileTime;
 }
 
 /*
  * @unimplemented
  */
-FD_GLYPHSET * APIENTRY
+FD_GLYPHSET *
+APIENTRY
 FONTOBJ_pfdg(
-   IN FONTOBJ *FontObj)
+    IN FONTOBJ *FontObj)
 {
-   UNIMPLEMENTED;
-   return NULL;
+    UNIMPLEMENTED;
+    return NULL;
 }
 
 /*
  * @unimplemented
  */
-PBYTE APIENTRY
+PBYTE
+APIENTRY
 FONTOBJ_pjOpenTypeTablePointer(
-   IN FONTOBJ *FontObj,
-   IN ULONG Tag,
-   OUT ULONG *Table)
+    IN FONTOBJ *FontObj,
+    IN ULONG Tag,
+    OUT ULONG *Table)
 {
-   UNIMPLEMENTED;
-   return NULL;
+    UNIMPLEMENTED;
+    return NULL;
 }
 
 /*
  * @unimplemented
  */
-PFD_GLYPHATTR APIENTRY
+PFD_GLYPHATTR
+APIENTRY
 FONTOBJ_pQueryGlyphAttrs(
-   IN FONTOBJ *FontObj,
-   IN ULONG Mode)
+    IN FONTOBJ *FontObj,
+    IN ULONG Mode)
 {
-   UNIMPLEMENTED;
-   return NULL;
+    UNIMPLEMENTED;
+    return NULL;
 }
 
 /*
  * @unimplemented
  */
-LPWSTR APIENTRY
+LPWSTR
+APIENTRY
 FONTOBJ_pwszFontFilePaths(
-   IN FONTOBJ *FontObj,
-   OUT ULONG *PathLength)
+    IN FONTOBJ *FontObj,
+    OUT ULONG *PathLength)
 {
-   UNIMPLEMENTED;
-   return NULL;
+    UNIMPLEMENTED;
+    return NULL;
 }
 
 /*
  * @unimplemented
  */
-LONG APIENTRY
+LONG
+APIENTRY
 HT_Get8BPPMaskPalette(
-   IN OUT LPPALETTEENTRY PaletteEntry,
-   IN BOOL Use8BPPMaskPal,
-   IN BYTE CMYMask,
-   IN USHORT RedGamma,
-   IN USHORT GreenGamma,
-   IN USHORT BlueGamma)
+    IN OUT LPPALETTEENTRY PaletteEntry,
+    IN BOOL Use8BPPMaskPal,
+    IN BYTE CMYMask,
+    IN USHORT RedGamma,
+    IN USHORT GreenGamma,
+    IN USHORT BlueGamma)
 {
-   UNIMPLEMENTED;
-   return 0;
+    UNIMPLEMENTED;
+    return 0;
 }
 
 /*
@@ -808,8 +790,8 @@ BOOL
 APIENTRY
 NtGdiAnyLinkedFonts()
 {
-   UNIMPLEMENTED;
-   return FALSE;
+    UNIMPLEMENTED;
+    return FALSE;
 }
 
 /*
@@ -848,8 +830,7 @@ NtGdiAddFontMemResourceEx(
     IN DWORD cjBuffer,
     IN DESIGNVECTOR *pdv,
     IN ULONG cjDV,
-    OUT DWORD *pNumFonts
-)
+    OUT DWORD *pNumFonts)
 {
     UNIMPLEMENTED;
     return NULL;
@@ -1208,7 +1189,7 @@ NtGdiGetEudcTimeStampEx(
  */
 BOOL
 APIENTRY
-NtGdiInitSpool()
+NtGdiInitSpool(VOID)
 {
     UNIMPLEMENTED;
     return FALSE;
@@ -1219,9 +1200,10 @@ NtGdiInitSpool()
  */
 INT
 APIENTRY
-NtGdiQueryFonts( OUT PUNIVERSAL_FONT_ID pufiFontList,
-                 IN ULONG nBufferSize,
-                 OUT PLARGE_INTEGER pTimeStamp)
+NtGdiQueryFonts(
+    OUT PUNIVERSAL_FONT_ID pufiFontList,
+    IN ULONG nBufferSize,
+    OUT PLARGE_INTEGER pTimeStamp)
 {
     UNIMPLEMENTED;
     return 0;
@@ -1232,10 +1214,11 @@ NtGdiQueryFonts( OUT PUNIVERSAL_FONT_ID pufiFontList,
  */
 INT
 APIENTRY
-NtGdiGetSpoolMessage( DWORD u1,
-                      DWORD u2,
-                      DWORD u3,
-                      DWORD u4)
+NtGdiGetSpoolMessage(
+    DWORD u1,
+    DWORD u2,
+    DWORD u3,
+    DWORD u4)
 {
     /* FIXME: The prototypes */
     UNIMPLEMENTED;
@@ -1559,7 +1542,7 @@ NtGdiIcmBrushInfo(
  */
 BOOL
 APIENTRY
-NtGdiInit()
+NtGdiInit(VOID)
 {
     return TRUE;
 }
@@ -1686,17 +1669,18 @@ NtGdiUnmapMemFont(
 BOOL
 APIENTRY
 EngControlSprites(
-  IN WNDOBJ  *pwo,
-  IN FLONG  fl)
+    IN WNDOBJ  *pwo,
+    IN FLONG  fl)
 {
-  UNIMPLEMENTED;
-  return FALSE;
+    UNIMPLEMENTED;
+    return FALSE;
 }
 
 PVOID
 APIENTRY
-EngFntCacheAlloc(IN ULONG FastCheckSum,
-                 IN ULONG ulSize)
+EngFntCacheAlloc(
+    IN ULONG FastCheckSum,
+    IN ULONG ulSize)
 {
     UNIMPLEMENTED;
     return NULL;
@@ -1704,16 +1688,18 @@ EngFntCacheAlloc(IN ULONG FastCheckSum,
 
 VOID
 APIENTRY
-EngFntCacheFault(IN ULONG ulFastCheckSum,
-                 IN ULONG iFaultMode)
+EngFntCacheFault(
+    IN ULONG ulFastCheckSum,
+    IN ULONG iFaultMode)
 {
     UNIMPLEMENTED;
 }
 
 PVOID
 APIENTRY
-EngFntCacheLookUp(IN ULONG FastCheckSum,
-                  OUT PULONG pulSize)
+EngFntCacheLookUp(
+    IN ULONG FastCheckSum,
+    OUT PULONG pulSize)
 {
     UNIMPLEMENTED;
     return NULL;
@@ -1721,15 +1707,16 @@ EngFntCacheLookUp(IN ULONG FastCheckSum,
 
 BOOLEAN
 APIENTRY
-EngNineGrid(IN SURFOBJ* pDestSurfaceObj,
-            IN SURFOBJ* pSourceSurfaceObj,
-            IN CLIPOBJ* pClipObj,
-            IN XLATEOBJ* pXlateObj,
-            IN RECTL* prclSource,
-            IN RECTL* prclDest,
-            PVOID pvUnknown1,
-            PVOID pvUnknown2,
-            DWORD dwReserved)
+EngNineGrid(
+    IN SURFOBJ* pDestSurfaceObj,
+    IN SURFOBJ* pSourceSurfaceObj,
+    IN CLIPOBJ* pClipObj,
+    IN XLATEOBJ* pXlateObj,
+    IN RECTL* prclSource,
+    IN RECTL* prclDest,
+    PVOID pvUnknown1,
+    PVOID pvUnknown2,
+    DWORD dwReserved)
 {
     UNIMPLEMENTED;
     return FALSE;
index 0b931cd..a4eaaeb 100644 (file)
 #define NDEBUG
 #include <debug.h>
 
-BOOL APIENTRY
-EngTransparentBlt(SURFOBJ *psoDest,
-                 SURFOBJ *psoSource,
-                 CLIPOBJ *Clip,
-                 XLATEOBJ *ColorTranslation,
-                 PRECTL DestRect,
-                 PRECTL SourceRect,
-                 ULONG iTransColor,
-                 ULONG Reserved)
+BOOL
+APIENTRY
+EngTransparentBlt(
+    SURFOBJ *psoDest,
+    SURFOBJ *psoSource,
+    CLIPOBJ *Clip,
+    XLATEOBJ *ColorTranslation,
+    PRECTL DestRect,
+    PRECTL SourceRect,
+    ULONG iTransColor,
+    ULONG Reserved)
 {
-  BOOL Ret = TRUE;
-  BYTE ClippingType;
-  INTENG_ENTER_LEAVE EnterLeaveSource, EnterLeaveDest;
-  SURFOBJ *InputObj, *OutputObj;
-  RECTL OutputRect, InputRect;
-  POINTL Translate;
-
-  LONG DstHeight;
-  LONG DstWidth;
-  LONG SrcHeight;
-  LONG SrcWidth;
-
-  InputRect = *SourceRect;
-
-  if(!IntEngEnter(&EnterLeaveSource, psoSource, &InputRect, TRUE, &Translate, &InputObj))
-  {
-    return FALSE;
-  }
-  InputRect.left += Translate.x;
-  InputRect.right += Translate.x;
-  InputRect.top += Translate.y;
-  InputRect.bottom += Translate.y;
-
-  OutputRect = *DestRect;
-  if (OutputRect.right < OutputRect.left)
-  {
-    OutputRect.left = DestRect->right;
-    OutputRect.right = DestRect->left;
-  }
-  if (OutputRect.bottom < OutputRect.top)
-  {
-    OutputRect.top = DestRect->bottom;
-    OutputRect.bottom = DestRect->top;
-  }
-
-  if(Clip)
-  {
-    if(OutputRect.left < Clip->rclBounds.left)
+    BOOL Ret = TRUE;
+    BYTE ClippingType;
+    INTENG_ENTER_LEAVE EnterLeaveSource, EnterLeaveDest;
+    SURFOBJ *InputObj, *OutputObj;
+    RECTL OutputRect, InputRect;
+    POINTL Translate;
+
+    LONG DstHeight;
+    LONG DstWidth;
+    LONG SrcHeight;
+    LONG SrcWidth;
+
+    InputRect = *SourceRect;
+
+    if (!IntEngEnter(&EnterLeaveSource, psoSource, &InputRect, TRUE, &Translate, &InputObj))
     {
-      InputRect.left += Clip->rclBounds.left - OutputRect.left;
-      OutputRect.left = Clip->rclBounds.left;
+        return FALSE;
     }
-    if(Clip->rclBounds.right < OutputRect.right)
+    InputRect.left += Translate.x;
+    InputRect.right += Translate.x;
+    InputRect.top += Translate.y;
+    InputRect.bottom += Translate.y;
+
+    OutputRect = *DestRect;
+    if (OutputRect.right < OutputRect.left)
     {
-      InputRect.right -=  OutputRect.right - Clip->rclBounds.right;
-      OutputRect.right = Clip->rclBounds.right;
+        OutputRect.left = DestRect->right;
+        OutputRect.right = DestRect->left;
     }
-    if(OutputRect.top < Clip->rclBounds.top)
+    if (OutputRect.bottom < OutputRect.top)
     {
-      InputRect.top += Clip->rclBounds.top - OutputRect.top;
-      OutputRect.top = Clip->rclBounds.top;
+        OutputRect.top = DestRect->bottom;
+        OutputRect.bottom = DestRect->top;
     }
-    if(Clip->rclBounds.bottom < OutputRect.bottom)
+
+    if (Clip)
     {
-      InputRect.bottom -=  OutputRect.bottom - Clip->rclBounds.bottom;
-      OutputRect.bottom = Clip->rclBounds.bottom;
+        if (OutputRect.left < Clip->rclBounds.left)
+        {
+            InputRect.left += Clip->rclBounds.left - OutputRect.left;
+            OutputRect.left = Clip->rclBounds.left;
+        }
+        if (Clip->rclBounds.right < OutputRect.right)
+        {
+            InputRect.right -=  OutputRect.right - Clip->rclBounds.right;
+            OutputRect.right = Clip->rclBounds.right;
+        }
+        if (OutputRect.top < Clip->rclBounds.top)
+        {
+            InputRect.top += Clip->rclBounds.top - OutputRect.top;
+            OutputRect.top = Clip->rclBounds.top;
+        }
+        if (Clip->rclBounds.bottom < OutputRect.bottom)
+        {
+            InputRect.bottom -=  OutputRect.bottom - Clip->rclBounds.bottom;
+            OutputRect.bottom = Clip->rclBounds.bottom;
+        }
     }
-  }
-
-  /* Check for degenerate case: if height or width of OutputRect is 0 pixels there's
-     nothing to do */
-  if(OutputRect.right <= OutputRect.left || OutputRect.bottom <= OutputRect.top)
-  {
-    IntEngLeave(&EnterLeaveSource);
-    return TRUE;
-  }
 
-  if(!IntEngEnter(&EnterLeaveDest, psoDest, &OutputRect, FALSE, &Translate, &OutputObj))
-  {
-    IntEngLeave(&EnterLeaveSource);
-    return FALSE;
-  }
-
-  OutputRect.left = DestRect->left + Translate.x;
-  OutputRect.right = DestRect->right + Translate.x;
-  OutputRect.top = DestRect->top + Translate.y;
-  OutputRect.bottom = DestRect->bottom + Translate.y;
-
-  ClippingType = (Clip ? Clip->iDComplexity : DC_TRIVIAL);
-
-  DstHeight = OutputRect.bottom - OutputRect.top;
-  DstWidth = OutputRect.right - OutputRect.left;
-  SrcHeight = InputRect.bottom - InputRect.top;
-  SrcWidth = InputRect.right - InputRect.left;
-  switch(ClippingType)
-  {
-    case DC_TRIVIAL:
+    /* Check for degenerate case: if height or width of OutputRect is 0 pixels there's
+       nothing to do */
+    if (OutputRect.right <= OutputRect.left || OutputRect.bottom <= OutputRect.top)
     {
-      Ret = DibFunctionsForBitmapFormat[psoDest->iBitmapFormat].DIB_TransparentBlt(
-        OutputObj, InputObj, &OutputRect, &InputRect, ColorTranslation, iTransColor);
-      break;
+        IntEngLeave(&EnterLeaveSource);
+        return TRUE;
     }
-    case DC_RECT:
+
+    if (!IntEngEnter(&EnterLeaveDest, psoDest, &OutputRect, FALSE, &Translate, &OutputObj))
     {
-      RECTL ClipRect, CombinedRect;
-      RECTL InputToCombinedRect;
-
-      ClipRect.left = Clip->rclBounds.left + Translate.x;
-      ClipRect.right = Clip->rclBounds.right + Translate.x;
-      ClipRect.top = Clip->rclBounds.top + Translate.y;
-      ClipRect.bottom = Clip->rclBounds.bottom + Translate.y;
-      if (RECTL_bIntersectRect(&CombinedRect, &OutputRect, &ClipRect))
-      {
-        InputToCombinedRect.top = InputRect.top + (CombinedRect.top - OutputRect.top) * SrcHeight / DstHeight;
-        InputToCombinedRect.bottom = InputRect.top + (CombinedRect.bottom - OutputRect.top) * SrcHeight / DstHeight;
-        InputToCombinedRect.left = InputRect.left + (CombinedRect.left - OutputRect.left) * SrcWidth / DstWidth;
-        InputToCombinedRect.right = InputRect.left + (CombinedRect.right - OutputRect.left) * SrcWidth / DstWidth;
-        Ret = DibFunctionsForBitmapFormat[psoDest->iBitmapFormat].DIB_TransparentBlt(
-          OutputObj, InputObj, &CombinedRect, &InputToCombinedRect, ColorTranslation, iTransColor);
-      }
-      break;
+        IntEngLeave(&EnterLeaveSource);
+        return FALSE;
     }
-    case DC_COMPLEX:
-    {
-      ULONG Direction, i;
-      RECT_ENUM RectEnum;
-      BOOL EnumMore;
 
-      if(OutputObj == InputObj)
-      {
-        if(OutputRect.top < InputRect.top)
+    OutputRect.left = DestRect->left + Translate.x;
+    OutputRect.right = DestRect->right + Translate.x;
+    OutputRect.top = DestRect->top + Translate.y;
+    OutputRect.bottom = DestRect->bottom + Translate.y;
+
+    ClippingType = (Clip ? Clip->iDComplexity : DC_TRIVIAL);
+
+    DstHeight = OutputRect.bottom - OutputRect.top;
+    DstWidth = OutputRect.right - OutputRect.left;
+    SrcHeight = InputRect.bottom - InputRect.top;
+    SrcWidth = InputRect.right - InputRect.left;
+    switch (ClippingType)
+    {
+        case DC_TRIVIAL:
         {
-          Direction = OutputRect.left < (InputRect.left ? CD_RIGHTDOWN : CD_LEFTDOWN);
+            Ret = DibFunctionsForBitmapFormat[psoDest->iBitmapFormat].DIB_TransparentBlt(
+                      OutputObj, InputObj, &OutputRect, &InputRect, ColorTranslation, iTransColor);
+            break;
         }
-        else
+        case DC_RECT:
         {
-          Direction = OutputRect.left < (InputRect.left ? CD_RIGHTUP : CD_LEFTUP);
+            RECTL ClipRect, CombinedRect;
+            RECTL InputToCombinedRect;
+
+            ClipRect.left = Clip->rclBounds.left + Translate.x;
+            ClipRect.right = Clip->rclBounds.right + Translate.x;
+            ClipRect.top = Clip->rclBounds.top + Translate.y;
+            ClipRect.bottom = Clip->rclBounds.bottom + Translate.y;
+            if (RECTL_bIntersectRect(&CombinedRect, &OutputRect, &ClipRect))
+            {
+                InputToCombinedRect.top = InputRect.top + (CombinedRect.top - OutputRect.top) * SrcHeight / DstHeight;
+                InputToCombinedRect.bottom = InputRect.top + (CombinedRect.bottom - OutputRect.top) * SrcHeight / DstHeight;
+                InputToCombinedRect.left = InputRect.left + (CombinedRect.left - OutputRect.left) * SrcWidth / DstWidth;
+                InputToCombinedRect.right = InputRect.left + (CombinedRect.right - OutputRect.left) * SrcWidth / DstWidth;
+                Ret = DibFunctionsForBitmapFormat[psoDest->iBitmapFormat].DIB_TransparentBlt(
+                          OutputObj, InputObj, &CombinedRect, &InputToCombinedRect, ColorTranslation, iTransColor);
+            }
+            break;
         }
-      }
-      else
-      {
-        Direction = CD_ANY;
-      }
-
-      CLIPOBJ_cEnumStart(Clip, FALSE, CT_RECTANGLES, Direction, 0);
-      do
-      {
-        EnumMore = CLIPOBJ_bEnum(Clip, sizeof(RectEnum), (PVOID)&RectEnum);
-        for (i = 0; i < RectEnum.c; i++)
+        case DC_COMPLEX:
         {
-          RECTL ClipRect, CombinedRect;
-          RECTL InputToCombinedRect;
-
-          ClipRect.left = RectEnum.arcl[i].left + Translate.x;
-          ClipRect.right = RectEnum.arcl[i].right + Translate.x;
-          ClipRect.top = RectEnum.arcl[i].top + Translate.y;
-          ClipRect.bottom = RectEnum.arcl[i].bottom + Translate.y;
-          if (RECTL_bIntersectRect(&CombinedRect, &OutputRect, &ClipRect))
-          {
-            InputToCombinedRect.top = InputRect.top + (CombinedRect.top - OutputRect.top) * SrcHeight / DstHeight;
-            InputToCombinedRect.bottom = InputRect.top + (CombinedRect.bottom - OutputRect.top) * SrcHeight / DstHeight;
-            InputToCombinedRect.left = InputRect.left + (CombinedRect.left - OutputRect.left) * SrcWidth / DstWidth;
-            InputToCombinedRect.right = InputRect.left + (CombinedRect.right - OutputRect.left) * SrcWidth / DstWidth;
+            ULONG Direction, i;
+            RECT_ENUM RectEnum;
+            BOOL EnumMore;
 
-            Ret = DibFunctionsForBitmapFormat[psoDest->iBitmapFormat].DIB_TransparentBlt(
-              OutputObj, InputObj, &CombinedRect, &InputToCombinedRect, ColorTranslation, iTransColor);
-            if(!Ret)
+            if (OutputObj == InputObj)
+            {
+                if (OutputRect.top < InputRect.top)
+                {
+                    Direction = OutputRect.left < (InputRect.left ? CD_RIGHTDOWN : CD_LEFTDOWN);
+                }
+                else
+                {
+                    Direction = OutputRect.left < (InputRect.left ? CD_RIGHTUP : CD_LEFTUP);
+                }
+            }
+            else
+            {
+                Direction = CD_ANY;
+            }
+
+            CLIPOBJ_cEnumStart(Clip, FALSE, CT_RECTANGLES, Direction, 0);
+            do
             {
-              break;
+                EnumMore = CLIPOBJ_bEnum(Clip, sizeof(RectEnum), (PVOID)&RectEnum);
+                for (i = 0; i < RectEnum.c; i++)
+                {
+                    RECTL ClipRect, CombinedRect;
+                    RECTL InputToCombinedRect;
+
+                    ClipRect.left = RectEnum.arcl[i].left + Translate.x;
+                    ClipRect.right = RectEnum.arcl[i].right + Translate.x;
+                    ClipRect.top = RectEnum.arcl[i].top + Translate.y;
+                    ClipRect.bottom = RectEnum.arcl[i].bottom + Translate.y;
+                    if (RECTL_bIntersectRect(&CombinedRect, &OutputRect, &ClipRect))
+                    {
+                        InputToCombinedRect.top = InputRect.top + (CombinedRect.top - OutputRect.top) * SrcHeight / DstHeight;
+                        InputToCombinedRect.bottom = InputRect.top + (CombinedRect.bottom - OutputRect.top) * SrcHeight / DstHeight;
+                        InputToCombinedRect.left = InputRect.left + (CombinedRect.left - OutputRect.left) * SrcWidth / DstWidth;
+                        InputToCombinedRect.right = InputRect.left + (CombinedRect.right - OutputRect.left) * SrcWidth / DstWidth;
+
+                        Ret = DibFunctionsForBitmapFormat[psoDest->iBitmapFormat].DIB_TransparentBlt(
+                                  OutputObj, InputObj, &CombinedRect, &InputToCombinedRect, ColorTranslation, iTransColor);
+                        if (!Ret)
+                        {
+                            break;
+                        }
+                    }
+                }
             }
-          }
+            while (EnumMore && Ret);
+            break;
+        }
+        default:
+        {
+            Ret = FALSE;
+            break;
         }
-      } while(EnumMore && Ret);
-      break;
-    }
-    default:
-    {
-      Ret = FALSE;
-      break;
     }
-  }
 
-  IntEngLeave(&EnterLeaveDest);
-  IntEngLeave(&EnterLeaveSource);
+    IntEngLeave(&EnterLeaveDest);
+    IntEngLeave(&EnterLeaveSource);
 
-  return Ret;
+    return Ret;
 }
 
-BOOL FASTCALL
-IntEngTransparentBlt(SURFOBJ *psoDest,
-                     SURFOBJ *psoSource,
-                     CLIPOBJ *Clip,
-                     XLATEOBJ *ColorTranslation,
-                     PRECTL DestRect,
-                     PRECTL SourceRect,
-                     ULONG iTransColor,
-                     ULONG Reserved)
+BOOL
+FASTCALL
+IntEngTransparentBlt(
+    SURFOBJ *psoDest,
+    SURFOBJ *psoSource,
+    CLIPOBJ *Clip,
+    XLATEOBJ *ColorTranslation,
+    PRECTL DestRect,
+    PRECTL SourceRect,
+    ULONG iTransColor,
+    ULONG Reserved)
 {
-  BOOL Ret;
-  RECTL OutputRect, InputClippedRect;
-  SURFACE *psurfDest;
-  SURFACE *psurfSource;
-  RECTL InputRect;
-  LONG InputClWidth, InputClHeight, InputWidth, InputHeight;
-
-  ASSERT(psoDest);
-  ASSERT(psoSource);
-  ASSERT(DestRect);
-
-  psurfDest = CONTAINING_RECORD(psoDest, SURFACE, SurfObj);
-  psurfSource = CONTAINING_RECORD(psoSource, SURFACE, SurfObj);
-
-  ASSERT(psurfDest);
-  ASSERT(psurfSource);
-
-  /* If no clip object is given, use trivial one */
-  if (!Clip) Clip = &gxcoTrivial.ClipObj;
-
-  InputClippedRect = *DestRect;
-  if(InputClippedRect.right < InputClippedRect.left)
-  {
-    InputClippedRect.left = DestRect->right;
-    InputClippedRect.right = DestRect->left;
-  }
-  if(InputClippedRect.bottom < InputClippedRect.top)
-  {
-    InputClippedRect.top = DestRect->bottom;
-    InputClippedRect.bottom = DestRect->top;
-  }
-
-  InputRect = *SourceRect;
-  /* Clip against the bounds of the clipping region so we won't try to write
-   * outside the surface */
-  if (Clip->iDComplexity != DC_TRIVIAL)
-  {
-    if(!RECTL_bIntersectRect(&OutputRect, &InputClippedRect, &Clip->rclBounds))
+    BOOL Ret;
+    RECTL OutputRect, InputClippedRect;
+    SURFACE *psurfDest;
+    SURFACE *psurfSource;
+    RECTL InputRect;
+    LONG InputClWidth, InputClHeight, InputWidth, InputHeight;
+
+    ASSERT(psoDest);
+    ASSERT(psoSource);
+    ASSERT(DestRect);
+
+    psurfDest = CONTAINING_RECORD(psoDest, SURFACE, SurfObj);
+    psurfSource = CONTAINING_RECORD(psoSource, SURFACE, SurfObj);
+
+    ASSERT(psurfDest);
+    ASSERT(psurfSource);
+
+    /* If no clip object is given, use trivial one */
+    if (!Clip) Clip = &gxcoTrivial.ClipObj;
+
+    InputClippedRect = *DestRect;
+    if (InputClippedRect.right < InputClippedRect.left)
+    {
+        InputClippedRect.left = DestRect->right;
+        InputClippedRect.right = DestRect->left;
+    }
+    if (InputClippedRect.bottom < InputClippedRect.top)
     {
-      return TRUE;
+        InputClippedRect.top = DestRect->bottom;
+        InputClippedRect.bottom = DestRect->top;
     }
-    /* Update source rect */
-    InputClWidth = InputClippedRect.right - InputClippedRect.left;
-    InputClHeight = InputClippedRect.bottom - InputClippedRect.top;
-    InputWidth = InputRect.right - InputRect.left;
-    InputHeight = InputRect.bottom - InputRect.top;
-
-    InputRect.left += (InputWidth * (OutputRect.left - InputClippedRect.left)) / InputClWidth;
-    InputRect.right -= (InputWidth * (InputClippedRect.right - OutputRect.right)) / InputClWidth;
-    InputRect.top += (InputHeight * (OutputRect.top - InputClippedRect.top)) / InputClHeight;
-    InputRect.bottom -= (InputHeight * (InputClippedRect.bottom - OutputRect.bottom)) / InputClHeight;
-  }
-  else
-  {
-    OutputRect = InputClippedRect;
-  }
-
-  if(psurfDest->flags & HOOK_TRANSPARENTBLT)
-  {
-    Ret = GDIDEVFUNCS(psoDest).TransparentBlt(
-      psoDest, psoSource, Clip, ColorTranslation, &OutputRect,
-      &InputRect, iTransColor, Reserved);
-  }
-  else
-    Ret = FALSE;
-
-  if(!Ret)
-  {
-    Ret = EngTransparentBlt(psoDest, psoSource, Clip, ColorTranslation,
-                            &OutputRect, &InputRect, iTransColor, Reserved);
-  }
-
-  return Ret;
+
+    InputRect = *SourceRect;
+    /* Clip against the bounds of the clipping region so we won't try to write
+     * outside the surface */
+    if (Clip->iDComplexity != DC_TRIVIAL)
+    {
+        if (!RECTL_bIntersectRect(&OutputRect, &InputClippedRect, &Clip->rclBounds))
+        {
+            return TRUE;
+        }
+        /* Update source rect */
+        InputClWidth = InputClippedRect.right - InputClippedRect.left;
+        InputClHeight = InputClippedRect.bottom - InputClippedRect.top;
+        InputWidth = InputRect.right - InputRect.left;
+        InputHeight = InputRect.bottom - InputRect.top;
+
+        InputRect.left += (InputWidth * (OutputRect.left - InputClippedRect.left)) / InputClWidth;
+        InputRect.right -= (InputWidth * (InputClippedRect.right - OutputRect.right)) / InputClWidth;
+        InputRect.top += (InputHeight * (OutputRect.top - InputClippedRect.top)) / InputClHeight;
+        InputRect.bottom -= (InputHeight * (InputClippedRect.bottom - OutputRect.bottom)) / InputClHeight;
+    }
+    else
+    {
+        OutputRect = InputClippedRect;
+    }
+
+    if (psurfDest->flags & HOOK_TRANSPARENTBLT)
+    {
+        Ret = GDIDEVFUNCS(psoDest).TransparentBlt(psoDest,
+                                                  psoSource,
+                                                  Clip,
+                                                  ColorTranslation,
+                                                  &OutputRect,
+                                                  &InputRect,
+                                                  iTransColor,
+                                                  Reserved);
+    }
+    else
+        Ret = FALSE;
+
+    if (!Ret)
+    {
+        Ret = EngTransparentBlt(psoDest,
+                                psoSource,
+                                Clip,
+                                ColorTranslation,
+                                &OutputRect,
+                                &InputRect,
+                                iTransColor,
+                                Reserved);
+    }
+
+    return Ret;
 }
 
 /* EOF */