[WIN32K]
authorDmitry Gorbachev <gorbachev@reactos.org>
Wed, 14 Dec 2011 04:07:06 +0000 (04:07 +0000)
committerDmitry Gorbachev <gorbachev@reactos.org>
Wed, 14 Dec 2011 04:07:06 +0000 (04:07 +0000)
Fix indentation, comments, debug messages. Lioncash (mathew1800\AT/gmail\DOT/com), bug #6762.

svn path=/trunk/; revision=54647

99 files changed:
reactos/subsystems/win32/win32k/dib/dib1bpp.c
reactos/subsystems/win32/win32k/dib/stretchblt.c
reactos/subsystems/win32/win32k/eng/bitblt.c
reactos/subsystems/win32/win32k/eng/clip.c
reactos/subsystems/win32/win32k/eng/engmisc.c
reactos/subsystems/win32/win32k/eng/ldevobj.c
reactos/subsystems/win32/win32k/eng/lineto.c
reactos/subsystems/win32/win32k/eng/semaphor.c
reactos/subsystems/win32/win32k/eng/stretchblt.c
reactos/subsystems/win32/win32k/eng/xlate.c
reactos/subsystems/win32/win32k/include/class.h
reactos/subsystems/win32/win32k/include/color.h
reactos/subsystems/win32/win32k/include/desktop.h
reactos/subsystems/win32/win32k/include/engobjects.h
reactos/subsystems/win32/win32k/include/hook.h
reactos/subsystems/win32/win32k/include/input.h
reactos/subsystems/win32/win32k/include/ldevobj.h
reactos/subsystems/win32/win32k/include/monitor.h
reactos/subsystems/win32/win32k/include/msgqueue.h
reactos/subsystems/win32/win32k/include/pdevobj.h
reactos/subsystems/win32/win32k/include/sysparams.h
reactos/subsystems/win32/win32k/include/tags.h
reactos/subsystems/win32/win32k/include/win32.h
reactos/subsystems/win32/win32k/include/win32kdebug.h
reactos/subsystems/win32/win32k/include/win32kp.h
reactos/subsystems/win32/win32k/include/winsta.h
reactos/subsystems/win32/win32k/main/dllmain.c
reactos/subsystems/win32/win32k/misc/math.c
reactos/subsystems/win32/win32k/misc/registry.c
reactos/subsystems/win32/win32k/misc/usrheap.c
reactos/subsystems/win32/win32k/ntddraw/dxeng.c
reactos/subsystems/win32/win32k/ntuser/callback.c
reactos/subsystems/win32/win32k/ntuser/callproc.c
reactos/subsystems/win32/win32k/ntuser/caret.c
reactos/subsystems/win32/win32k/ntuser/class.c
reactos/subsystems/win32/win32k/ntuser/clipboard.c
reactos/subsystems/win32/win32k/ntuser/cursoricon.c
reactos/subsystems/win32/win32k/ntuser/defwnd.c
reactos/subsystems/win32/win32k/ntuser/desktop.c
reactos/subsystems/win32/win32k/ntuser/display.c
reactos/subsystems/win32/win32k/ntuser/event.c
reactos/subsystems/win32/win32k/ntuser/focus.c
reactos/subsystems/win32/win32k/ntuser/hook.c
reactos/subsystems/win32/win32k/ntuser/hotkey.c
reactos/subsystems/win32/win32k/ntuser/input.c
reactos/subsystems/win32/win32k/ntuser/kbdlayout.c
reactos/subsystems/win32/win32k/ntuser/keyboard.c
reactos/subsystems/win32/win32k/ntuser/menu.c
reactos/subsystems/win32/win32k/ntuser/message.c
reactos/subsystems/win32/win32k/ntuser/metric.c
reactos/subsystems/win32/win32k/ntuser/misc.c
reactos/subsystems/win32/win32k/ntuser/monitor.c
reactos/subsystems/win32/win32k/ntuser/mouse.c
reactos/subsystems/win32/win32k/ntuser/msgqueue.c
reactos/subsystems/win32/win32k/ntuser/ntstubs.c
reactos/subsystems/win32/win32k/ntuser/object.c
reactos/subsystems/win32/win32k/ntuser/painting.c
reactos/subsystems/win32/win32k/ntuser/prop.c
reactos/subsystems/win32/win32k/ntuser/scrollbar.c
reactos/subsystems/win32/win32k/ntuser/sysparams.c
reactos/subsystems/win32/win32k/ntuser/timer.c
reactos/subsystems/win32/win32k/ntuser/windc.c
reactos/subsystems/win32/win32k/ntuser/window.c
reactos/subsystems/win32/win32k/ntuser/winpos.c
reactos/subsystems/win32/win32k/ntuser/winsta.c
reactos/subsystems/win32/win32k/objects/arc.c
reactos/subsystems/win32/win32k/objects/bezier.c
reactos/subsystems/win32/win32k/objects/bitblt.c
reactos/subsystems/win32/win32k/objects/bitmaps.c
reactos/subsystems/win32/win32k/objects/brush.c
reactos/subsystems/win32/win32k/objects/cliprgn.c
reactos/subsystems/win32/win32k/objects/coord.c
reactos/subsystems/win32/win32k/objects/dclife.c
reactos/subsystems/win32/win32k/objects/dcobjs.c
reactos/subsystems/win32/win32k/objects/dcstate.c
reactos/subsystems/win32/win32k/objects/dcutil.c
reactos/subsystems/win32/win32k/objects/device.c
reactos/subsystems/win32/win32k/objects/dibobj.c
reactos/subsystems/win32/win32k/objects/drawing.c
reactos/subsystems/win32/win32k/objects/fillshap.c
reactos/subsystems/win32/win32k/objects/font.c
reactos/subsystems/win32/win32k/objects/freetype.c
reactos/subsystems/win32/win32k/objects/gdibatch.c
reactos/subsystems/win32/win32k/objects/gdidbg.c
reactos/subsystems/win32/win32k/objects/gdiobj.c
reactos/subsystems/win32/win32k/objects/gdipool.c
reactos/subsystems/win32/win32k/objects/icm.c
reactos/subsystems/win32/win32k/objects/line.c
reactos/subsystems/win32/win32k/objects/palette.c
reactos/subsystems/win32/win32k/objects/path.c
reactos/subsystems/win32/win32k/objects/pen.c
reactos/subsystems/win32/win32k/objects/polyfill.c
reactos/subsystems/win32/win32k/objects/print.c
reactos/subsystems/win32/win32k/objects/region.c
reactos/subsystems/win32/win32k/objects/stockobj.c
reactos/subsystems/win32/win32k/objects/wingl.c
reactos/subsystems/win32/win32k/objects/xformobj.c
reactos/subsystems/win32/win32k/pch.h
reactos/subsystems/win32/win32k/stubs/stubs.c

index b245c52..12fdc87 100644 (file)
@@ -59,28 +59,28 @@ DIB_1BPP_BitBltSrcCopy_From1BPP (
                                  PRECTL DestRect,
                                  POINTL *SourcePoint )
 {
-  // the 'window' in this sense is the x-position that corresponds
+  // The 'window' in this sense is the x-position that corresponds
   // to the left-edge of the 8-pixel byte we are currently working with.
-  // dwx is current x-window, dwx2 is the 'last' window we need to process
-  int dwx, dwx2; // destination window x-position
-  int swx; // source window y-position
+  // dwx is current x-window, dwx2 is the 'last' window we need to process.
+  int dwx, dwx2;  // Destination window x-position
+  int swx;        // Source window y-position
 
-  // left and right edges of source and dest rectangles
+  // Left and right edges of source and dest rectangles
   int dl = DestRect->left; // dest left
   int dr = DestRect->right-1; // dest right (inclusive)
   int sl = SourcePoint->x; // source left
   int sr = sl + dr - dl; // source right (inclusive)
 
-  // which direction are we going?
+  // Which direction are we going?
   int xinc;
   int yinc;
   int ySrcDelta, yDstDelta;
 
-  // following 4 variables are used for the y-sweep
-  int dy; // dest y
+  // The following 4 variables are used for the y-sweep
+  int dy;  // dest y
   int dy1; // dest y start
   int dy2; // dest y end
-  int sy1; // src y start
+  int sy1; // src  y start
 
   int shift;
   BYTE srcmask, dstmask, xormask;
@@ -96,7 +96,7 @@ DIB_1BPP_BitBltSrcCopy_From1BPP (
 
   if ( DestRect->top <= SourcePoint->y )
   {
-    // moving up ( scan top -> bottom )
+    // Moving up (scan top -> bottom)
     dy1 = DestRect->top;
     dy2 = DestRect->bottom - 1;
     sy1 = SourcePoint->y;
@@ -106,7 +106,7 @@ DIB_1BPP_BitBltSrcCopy_From1BPP (
   }
   else
   {
-    // moving down ( scan bottom -> top )
+    // Moving down (scan bottom -> top)
     dy1 = DestRect->bottom - 1;
     dy2 = DestRect->top;
     sy1 = SourcePoint->y + dy1 - dy2;
@@ -116,7 +116,7 @@ DIB_1BPP_BitBltSrcCopy_From1BPP (
   }
   if ( DestRect->left <= SourcePoint->x )
   {
-    // moving left ( scan left->right )
+    // Moving left (scan left->right)
     dwx = dl&~7;
     swx = (sl-(dl&7))&~7;
     dwx2 = dr&~7;
@@ -124,10 +124,10 @@ DIB_1BPP_BitBltSrcCopy_From1BPP (
   }
   else
   {
-    // moving right ( scan right->left )
-    dwx = dr&~7;
-    swx = (sr-(dr&7))&~7; //(sr-7)&~7; // we need the left edge of this block... thus the -7
-    dwx2 = dl&~7;
+    // Moving right (scan right->left)
+    dwx = dr & ~7;
+    swx = (sr - (dr & 7)) & ~7; // (sr - 7) & ~7; // We need the left edge of this block. Thus the -7
+    dwx2 = dl & ~7;
     xinc = -1;
   }
   d = &(((PBYTE)DestSurf->pvScan0)[dy1*DestSurf->lDelta + (dwx>>3)]);
@@ -150,16 +150,16 @@ DIB_1BPP_BitBltSrcCopy_From1BPP (
     }
     dstmask = ~srcmask;
 
-    // we unfortunately *must* have 5 different versions of the inner
+    // We unfortunately *must* have 5 different versions of the inner
     // loop to be certain we don't try to read from memory that is not
-    // needed and may in fact be invalid
+    // needed and may in fact be invalid.
     if ( !shift )
     {
       for ( ;; )
       {
         *pd = (BYTE)((*pd & dstmask) | ((ps[0]^xormask) & srcmask));
 
-        // this *must* be here, because we could be going up *or* down...
+        // This *must* be here, because we could be going up *or* down...
         if ( dy == dy2 )
           break;
         dy += yinc;
@@ -167,14 +167,14 @@ DIB_1BPP_BitBltSrcCopy_From1BPP (
         ps += ySrcDelta;
       }
     }
-    else if ( !(0xFF00 & (srcmask<<shift) ) ) // check if ps[0] not needed...
+    else if ( !(0xFF00 & (srcmask<<shift) ) ) // Check if ps[0] not needed...
     {
       for ( ;; )
       {
         *pd = (BYTE)((*pd & dstmask)
           | ( ( (ps[1]^xormask) >> shift ) & srcmask ));
 
-        // this *must* be here, because we could be going up *or* down...
+        // This *must* be here, because we could be going up *or* down...
         if ( dy == dy2 )
           break;
         dy += yinc;
@@ -182,14 +182,14 @@ DIB_1BPP_BitBltSrcCopy_From1BPP (
         ps += ySrcDelta;
       }
     }
-    else if ( !(0xFF & (srcmask<<shift) ) ) // check if ps[1] not needed...
+    else if ( !(0xFF & (srcmask<<shift) ) ) // Check if ps[1] not needed...
     {
       for ( ;; )
       {
         *pd = (*pd & dstmask)
           | ( ( (ps[0]^xormask) << ( 8 - shift ) ) & srcmask );
 
-        // this *must* be here, because we could be going up *or* down...
+        // This *must* be here, because we could be going up *or* down...
         if ( dy == dy2 )
           break;
         dy += yinc;
@@ -197,14 +197,14 @@ DIB_1BPP_BitBltSrcCopy_From1BPP (
         ps += ySrcDelta;
       }
     }
-    else // both ps[0] and ps[1] are needed
+    else // Both ps[0] and ps[1] are needed
     {
       for ( ;; )
       {
         *pd = (*pd & dstmask)
           | ( ( ( ((ps[1]^xormask))|((ps[0]^xormask)<<8) ) >> shift ) & srcmask );
 
-        // this *must* be here, because we could be going up *or* down...
+        // This *must* be here, because we could be going up *or* down...
         if ( dy == dy2 )
           break;
         dy += yinc;
@@ -213,7 +213,7 @@ DIB_1BPP_BitBltSrcCopy_From1BPP (
       }
     }
 
-    // this *must* be here, because we could be going right *or* left...
+    // This *must* be here, because we could be going right *or* left...
     if ( dwx == dwx2 )
       break;
     d += xinc;
index 914d672..f8272aa 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * PROJECT:         Win32 subsystem
+ * PROJECT:         ReactOS Win32k subsystem
  * LICENSE:         See COPYING in the top level directory
  * FILE:            subsystems/win32/win32k/dib/stretchblt.c
  * PURPOSE:         StretchBlt implementation suitable for all bit depths
@@ -71,7 +71,7 @@ BOOLEAN DIB_XXBPP_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, SURFOBJ *Ma
   SrcHeight = SourceRect->bottom - SourceRect->top;
   SrcWidth = SourceRect->right - SourceRect->left;
 
-  /* FIXME :  MaskOrigin? */
+  /* FIXME: MaskOrigin? */
 
   switch(DestSurf->iBitmapFormat)
   {
index 9346487..55cafac 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * COPYRIGHT:        See COPYING in the top level directory
- * PROJECT:          ReactOS kernel
+ * PROJECT:          ReactOS Win32k subsystem
  * PURPOSE:          GDI BitBlt Functions
- * FILE:             subsys/win32k/eng/bitblt.c
+ * FILE:             subsystems/win32/win32k/eng/bitblt.c
  * PROGRAMER:        Jason Filby
  *                   Timo Kreuzer
  */
@@ -235,7 +235,7 @@ CallDibBitBlt(SURFOBJ* OutputObj,
         }
         else
         {
-            /* FIXME - What to do here? */
+            /* FIXME: What to do here? */
         }
     }
     else
index 9a54fa9..cdfe2fd 100644 (file)
@@ -2,7 +2,7 @@
  * COPYRIGHT:         See COPYING in the top level directory
  * PROJECT:           ReactOS kernel
  * PURPOSE:           GDI Clipping Functions
- * FILE:              subsys/win32k/eng/clip.c
+ * FILE:              subsystems/win32/win32k/eng/clip.c
  * PROGRAMER:         Jason Filby
  */
 
@@ -346,7 +346,7 @@ CLIPOBJ_bEnum(
     ULONG nCopy, i;
     ENUMRECTS* pERects = (ENUMRECTS*)EnumRects;
 
-    //calculate how many rectangles we should copy
+    // Calculate how many rectangles we should copy
     nCopy = min( ClipGDI->EnumMax - ClipGDI->EnumPos,
             min( ClipGDI->EnumRects.c - ClipGDI->EnumPos,
             (ObjSize - sizeof(ULONG)) / sizeof(RECTL)));
@@ -356,7 +356,7 @@ CLIPOBJ_bEnum(
         return FALSE;
     }
 
-    /* copy rectangles */
+    /* Copy rectangles */
     src = ClipGDI->EnumRects.arcl + ClipGDI->EnumPos;
     for(i = 0, dest = pERects->arcl; i < nCopy; i++, dest++, src++)
     {
index 9e60801..0f4cf87 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * COPYRIGHT:         See COPYING in the top level directory
- * PROJECT:           ReactOS kernel
+ * PROJECT:           ReactOS Win32k subsystem
  * PURPOSE:           ENG misc Functions
  * FILE:              subsystems/win32/win32k/eng/engmisc.c
  * PROGRAMER:         ReactOS Team
@@ -223,7 +223,7 @@ EngGetProcessHandle(VOID)
 {
   /* http://www.osr.com/ddk/graphics/gdifncs_3tif.htm
      In Windows 2000 and later, the EngGetProcessHandle function always returns NULL.
-     FIXME - what does NT4 return? */
+     FIXME: What does NT4 return? */
   return NULL;
 }
 
@@ -286,7 +286,4 @@ EngGetTickCount(VOID)
             (Multiplier * (TickCount.HighPart << 8)));
 }
 
-
-
-
 /* EOF */
index 25375cb..c85c23b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * COPYRIGHT:        See COPYING in the top level directory
- * PROJECT:          ReactOS kernel
+ * PROJECT:          ReactOS Win32k subsystem
  * PURPOSE:          Support for logical devices
  * FILE:             subsystems/win32/win32k/eng/ldevobj.c
  * PROGRAMER:        Timo Kreuzer (timo.kreuzer@reactos.org)
@@ -64,7 +64,7 @@ InitLDEVImpl()
                                      TRUE,
                                      IMAGE_DIRECTORY_ENTRY_EXPORT,
                                      &cbSize);
-    gpldevWin32k->pGdiDriverInfo->ImageLength = 0; // FIXME;
+    gpldevWin32k->pGdiDriverInfo->ImageLength = 0; // FIXME
 
     return STATUS_SUCCESS;
 }
@@ -507,3 +507,4 @@ EngFindImageProcAddress(
     return LDEVOBJ_pvFindImageProcAddress(pldev, lpProcName);
 }
 
+/* EOF */
index 954c81a..afe56b0 100644 (file)
@@ -586,7 +586,7 @@ IntEngPolyline(SURFOBJ *psoDest,
     RECTL rect;
     BOOL ret = FALSE;
 
-    //Draw the Polyline with a call to IntEngLineTo for each segment.
+    // Draw the Polyline with a call to IntEngLineTo for each segment.
     for (i = 1; i < dCount; i++)
     {
         rect.left = min(pt[i-1].x, pt[i].x);
index 8a8a045..cb15505 100644 (file)
@@ -139,8 +139,8 @@ EngInitializeSafeSemaphore(
          InterlockedDecrement(&Semaphore->lCount);
          return FALSE;
       }
-      /* FIXME - not thread-safe! Check result of InterlockedCompareExchangePointer
-                 and delete semaphore if already initialized! */
+      /* FIXME: Not thread-safe! Check result of InterlockedCompareExchangePointer
+                and delete semaphore if already initialized! */
       (void)InterlockedExchangePointer((volatile PVOID *)&Semaphore->hsem, hSem);
    }
    else
@@ -163,10 +163,10 @@ EngDeleteSafeSemaphore(
 {
    if (InterlockedDecrement(&Semaphore->lCount) == 0)
    {
-      /* FIXME - not thread-safe! Use result of InterlockedCompareExchangePointer! */
+      /* FIXME: Not thread-safe! Use result of InterlockedCompareExchangePointer! */
       EngDeleteSemaphore(Semaphore->hsem);
       (void)InterlockedExchangePointer((volatile PVOID *)&Semaphore->hsem, NULL);
    }
 }
 
-
+/* EOF */
index fd11429..56f2293 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * COPYRIGHT:        See COPYING in the top level directory
- * PROJECT:          ReactOS Win32 kernelmode subsystem
+ * PROJECT:          ReactOS Win32k subsystem
  * PURPOSE:          GDI stretch blt functions
  * FILE:             subsystems/win32/win32k/eng/stretchblt.c
  * PROGRAMER:        Jason Filby
@@ -62,7 +62,7 @@ CallDibStretchBlt(SURFOBJ* psoDest,
         }
         else
         {
-            /* FIXME - What to do here? */
+            /* FIXME: What to do here? */
         }
     }
     else
@@ -560,3 +560,4 @@ NtGdiEngStretchBlt(
     return EngStretchBlt(psoDest, psoSource, Mask, ClipRegion, ColorTranslation, &ca, &lBrushOrigin, &rclDest, &rclSrc, &lMaskOrigin, Mode);
 }
 
+/* EOF */
index 58a93b6..9483166 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * COPYRIGHT:        See COPYING in the top level directory
- * PROJECT:          ReactOS kernel
+ * PROJECT:          ReactOS Win32k subsystem
  * PURPOSE:          GDI Color Translation Functions
  * FILE:             subsystems/win32/win32k/eng/xlate.c
  * PROGRAMER:        Timo Kreuzer (timo.kreuzer@reactos.org)
@@ -359,7 +359,7 @@ EXLATEOBJ_vInitialize(
         return;
     }
 
-    /* Chack if both of the pallettes are indexed */
+    /* Check if both of the pallettes are indexed */
     if (!(ppalSrc->flFlags & PAL_INDEXED) || !(ppalDst->flFlags & PAL_INDEXED))
     {
         /* At least one palette is not indexed, calculate shifts/masks */
index 3535e96..e2b5cb5 100644 (file)
@@ -12,7 +12,7 @@ typedef struct _WNDPROC_INFO
 static __inline BOOL
 IsCallProcHandle(IN WNDPROC lpWndProc)
 {
-    /* FIXME - check for 64 bit architectures... */
+    /* FIXME: Check for 64-bit architectures... */
     return ((ULONG_PTR)lpWndProc & 0xFFFF0000) == 0xFFFF0000;
 }
 
index 325b7d4..bde20c2 100644 (file)
@@ -3,11 +3,11 @@
 #ifndef CLR_INVALID
 #define CLR_INVALID         0xffffffff
 #endif
-#define PC_SYS_USED     0x80           /* palentry is used (both system and logical) */
-#define PC_SYS_RESERVED 0x40           /* system palentry is not to be mapped to */
-#define PC_SYS_MAPPED   0x10           /* logical palentry is a direct alias for system palentry */
+#define PC_SYS_USED     0x80           /* Palentry is used (both system and logical) */
+#define PC_SYS_RESERVED 0x40           /* System palentry is not to be mapped to */
+#define PC_SYS_MAPPED   0x10           /* Logical palentry is a direct alias for system palentry */
 
-#define NB_RESERVED_COLORS              20 /* number of fixed colors in system palette */
+#define NB_RESERVED_COLORS              20 /* Number of fixed colors in system palette */
 
 typedef struct _COLORSPACE
 {
index 573a98a..92635b0 100644 (file)
@@ -15,7 +15,7 @@ typedef struct _DESKTOP
     PWIN32HEAP pheapDesktop;
     ULONG_PTR ulHeapSize;
     LIST_ENTRY PtiList;
-    /* use for tracking mouse moves. */
+    /* Use for tracking mouse moves. */
     PWND spwndTrack;
     DWORD htEx;
     RECT rcMouseHover;
index a029a26..459b7a7 100644 (file)
@@ -121,7 +121,7 @@ typedef struct _XFORMGDI {
   /* XFORMOBJ has no public members */
 } XFORMGDI;
 
-/* as the *OBJ structures are located at the beginning of the *GDI structures
+/* As the *OBJ structures are located at the beginning of the *GDI structures
    we can simply typecast the pointer */
 #define ObjToGDI(ClipObj, Type) (Type##GDI *)(ClipObj)
 #define GDIToObj(ClipGDI, Type) (Type##OBJ *)(ClipGDI)
index 951a8e9..7d44cee 100644 (file)
@@ -5,7 +5,7 @@
 #define HOOKID_TO_FLAG(HookId) (1 << ((HookId) + 1))
 #define ISITHOOKED(HookId) (((PTHREADINFO)PsGetCurrentThreadWin32Thread())->fsHooks & HOOKID_TO_FLAG(HookId))
 
-/* NOTE: the following definition is not a real hook but
+/* NOTE: The following definition is not a real hook but
          a pseudo-id that will be used only for 
          injecting user api hook module to all processes.
          It is used internally in win32k */
index 9f68220..93c3561 100644 (file)
@@ -56,7 +56,7 @@ extern PATTACHINFO gpai;
 /* Scan Codes */
 #define SC_KEY_UP        0x8000
 /* lParam bits */
-#define LP_DO_NOT_CARE_BIT (1<<25) // for GetKeyNameText
+#define LP_DO_NOT_CARE_BIT (1<<25) // For GetKeyNameText
 
 /* General */
 INIT_FUNCTION NTSTATUS NTAPI InitInputImpl(VOID);
index 633f5fe..45fe5ee 100644 (file)
@@ -1,6 +1,6 @@
 
 #ifdef __GNUC__
-/* Hack, for bug in ld.  Will be removed soon.  */
+/* HACK, for bug in ld.  Will be removed soon.  */
 #define __ImageBase _image_base__
 #endif
 extern IMAGE_DOS_HEADER __ImageBase;
index d78e067..84cb034 100644 (file)
@@ -1,6 +1,6 @@
 #pragma once
 
-/* monitor object */
+/* Monitor object */
 typedef struct _MONITOR
 {
     HEAD head;
@@ -12,7 +12,7 @@ typedef struct _MONITOR
         {
             DWORD   IsVisible: 1;
             DWORD   IsPalette: 1;
-            DWORD   IsPrimary: 1; /* wether this is the primary monitor */
+            DWORD   IsPrimary: 1; /* Whether this is the primary monitor */
         };
     };
     RECT    rcMonitor;
@@ -23,8 +23,8 @@ typedef struct _MONITOR
     HDEV    hDev;
 
     // ReactOS specific fields:
-    UNICODE_STRING DeviceName;  /* name of the monitor */
-    PDEVOBJ        *GdiDevice;  /* pointer to the GDI device to
+    UNICODE_STRING DeviceName;  /* Name of the monitor */
+    PDEVOBJ        *GdiDevice;  /* Pointer to the GDI device to
                                    which this monitor is attached */
 } MONITOR, *PMONITOR;
 
index d41b198..e23d279 100644 (file)
@@ -95,28 +95,28 @@ typedef struct _USER_MESSAGE_QUEUE
   /* Message Queue Flags */
   DWORD QF_flags;
 
-  /* queue state tracking */
+  /* Queue state tracking */
   // Send list QS_SENDMESSAGE
   // Post list QS_POSTMESSAGE|QS_HOTKEY|QS_PAINT|QS_TIMER|QS_KEY
   // Hard list QS_MOUSE|QS_KEY only
   // Accounting of queue bit sets, the rest are flags. QS_TIMER QS_PAINT counts are handled in thread information.
   DWORD nCntsQBits[QSIDCOUNTS]; // QS_KEY QS_MOUSEMOVE QS_MOUSEBUTTON QS_POSTMESSAGE QS_SENDMESSAGE QS_HOTKEY
 
-  /* extra message information */
+  /* Extra message information */
   LPARAM ExtraInfo;
 
-  /* state of each key */
+  /* State of each key */
   BYTE afKeyRecentDown[256 / 8]; // 1 bit per key
   BYTE afKeyState[256 * 2 / 8]; // 2 bits per key
 
-  /* showing cursor counter (value>=0 - cursor visible, value<0 - cursor hidden) */
+  /* Showing cursor counter (value>=0 - cursor visible, value<0 - cursor hidden) */
   INT ShowingCursor;
-  /* cursor object */
+  /* Cursor object */
   PCURICON_OBJECT CursorObject;
 
-  /* messages that are currently dispatched by other threads */
+  /* Messages that are currently dispatched by other threads */
   LIST_ENTRY DispatchingMessagesHead;
-  /* messages that are currently dispatched by this message queue, required for cleanup */
+  /* Messages that are currently dispatched by this message queue, required for cleanup */
   LIST_ENTRY LocalDispatchingMessagesHead;
 
   /* Desktop that the message queue is attached to */
@@ -142,7 +142,7 @@ typedef struct _USER_MESSAGE_QUEUE
 #define QF_CAPTURELOCKED          0x00100000
 #define QF_ACTIVEWNDTRACKING      0x00200000
 
-/* internal messages codes */
+/* Internal messages codes */
 enum internal_event_message
 {
     WM_ASYNC_SHOWWINDOW = 0x80000000,
index 7deabc1..028b411 100644 (file)
@@ -23,7 +23,7 @@
 
 typedef struct _GDIPOINTER /* should stay private to ENG? No, part of PDEVOBJ aka HDEV aka PDEV. */
 {
-  /* private GDI pointer handling information, required for software emulation */
+  /* Private GDI pointer handling information, required for software emulation */
   BOOL     Enabled;
   SIZEL    Size;
   POINTL   HotSpot;
@@ -32,8 +32,8 @@ typedef struct _GDIPOINTER /* should stay private to ENG? No, part of PDEVOBJ ak
   SURFACE  *psurfMask;
   SURFACE  *psurfSave;
 
-  /* public pointer information */
-  RECTL    Exclude; /* required publicly for SPS_ACCEPT_EXCLUDE */
+  /* Public pointer information */
+  RECTL    Exclude; /* Required publicly for SPS_ACCEPT_EXCLUDE */
 } GDIPOINTER, *PGDIPOINTER;
 
 typedef struct _DEVMODEINFO
index 70d815f..abd7d59 100644 (file)
@@ -1,7 +1,7 @@
 #pragma once
 
-// create one struct
-// make usable for different users (multiple structs!)
+// Create one struct
+// Make usable for different users (multiple structs!)
 
 #define SPI_TABLE1_MIN 1
 #define SPI_TABLE1_MAX 119
index b969966..310050d 100644 (file)
@@ -1,21 +1,21 @@
 #pragma once
 
-#define TAG_STRING      ' RTS' /* string */
-#define TAG_HOOK        'ohsU' /* hook */
-#define TAG_MENUITEM    'emsU' /* menu item */
-#define TAG_MSG         'GSEM' /* message */
-#define TAG_USRMSG      'GSMU' /* user message */
-#define TAG_SBARINFO    'NIBS' /* scrollbar info */
-#define TAG_TIMERBMP    'BMIT' /* timers bitmap */
-#define TAG_WINSTA      'ATSW' /* window station */
-#define TAG_FONT        'ETNF' /* font entry */
-#define TAG_BEZIER      'RZEB' /* bezier */
-#define TAG_SHAPE       'phSG' /* shape */
-#define TAG_COLORMAP    'MLOC' /* color map */
-#define TAG_GDIHNDTBLE  'bthG' /* gdi handle table */
-#define TAG_DIB         ' BID' /* dib */
+#define TAG_STRING      ' RTS' /* String */
+#define TAG_HOOK        'ohsU' /* Hook */
+#define TAG_MENUITEM    'emsU' /* Menu item */
+#define TAG_MSG         'GSEM' /* Message */
+#define TAG_USRMSG      'GSMU' /* User message */
+#define TAG_SBARINFO    'NIBS' /* Scrollbar info */
+#define TAG_TIMERBMP    'BMIT' /* Timers bitmap */
+#define TAG_WINSTA      'ATSW' /* Window station */
+#define TAG_FONT        'ETNF' /* Font entry */
+#define TAG_BEZIER      'RZEB' /* Bezier */
+#define TAG_SHAPE       'phSG' /* Shape */
+#define TAG_COLORMAP    'MLOC' /* Color map */
+#define TAG_GDIHNDTBLE  'bthG' /* GDI handle table */
+#define TAG_DIB         ' BID' /* Dib */
 
-/* gdi objects from the handle table */
+/* GDI objects from the handle table */
 #define TAG_DC          GDITAG_HMGR_LOOKASIDE_DC_TYPE
 #define TAG_REGION      GDITAG_HMGR_LOOKASIDE_RGN_TYPE
 #define TAG_SURFACE     GDITAG_HMGR_LOOKASIDE_SURF_TYPE
 #define TAG_PALETTE     GDITAG_HMGR_LOOKASIDE_PAL_TYPE
 #define TAG_ICMLCS      '90hG'
 #define TAG_LFONT       GDITAG_HMGR_LOOKASIDE_LFONT_TYPE
-#define TAG_RFONT       ';0gG' /* correct? */
+#define TAG_RFONT       ';0gG' /* Correct? */
 #define TAG_PFE         '<0hG'
-#define TAG_PFT         '=0hG' /* correct? */
-#define TAG_ICMCXF      '>0hG' /* correct? */
-#define TAG_SPRITE      '?0hG' /* correct? */
+#define TAG_PFT         '=0hG' /* Correct? */
+#define TAG_ICMCXF      '>0hG' /* Correct? */
+#define TAG_SPRITE      '?0hG' /* Correct? */
 #define TAG_BRUSH       GDITAG_HMGR_LOOKASIDE_BRUSH_TYPE
-#define TAG_UMPD        'A0hG' /* correct? */
-#define TAG_SPACE       'c0hG' /* correct? */
-#define TAG_META        'E0hG' /* correct? */
-#define TAG_EFSTATE     'F0hG' /* correct? */
-#define TAG_BMFD        'G0hG' /* correct? */
-#define TAG_VTFD        'H0hG' /* correct? */
-#define TAG_TTFD        'I0hG' /* correct? */
-#define TAG_RC          'J0hG' /* correct? */
-#define TAG_TEMP        'K0hG' /* correct? */
-#define TAG_DRVOBJ      'L0hG' /* correct? */
-#define TAG_DCIOBJ      'M0hG' /* correct? */
-#define TAG_SPOOL       'N0hG' /* correct? */
+#define TAG_UMPD        'A0hG' /* Correct? */
+#define TAG_SPACE       'c0hG' /* Correct? */
+#define TAG_META        'E0hG' /* Correct? */
+#define TAG_EFSTATE     'F0hG' /* Correct? */
+#define TAG_BMFD        'G0hG' /* Correct? */
+#define TAG_VTFD        'H0hG' /* Correct? */
+#define TAG_TTFD        'I0hG' /* Correct? */
+#define TAG_RC          'J0hG' /* Correct? */
+#define TAG_TEMP        'K0hG' /* Correct? */
+#define TAG_DRVOBJ      'L0hG' /* Correct? */
+#define TAG_DCIOBJ      'M0hG' /* Correct? */
+#define TAG_SPOOL       'N0hG' /* Correct? */
 
 /* Dx internal tags rember I do not known if it right namees */
 #define TAG_DXPVMLIST   'LPXD' /* pmvlist for the driver */
index 77f202b..2cc36a5 100644 (file)
@@ -41,7 +41,7 @@ extern BOOL RegisteredSysClasses;
 typedef struct _WIN32HEAP WIN32HEAP, *PWIN32HEAP;
 
 #include <pshpack1.h>
-// FIXME! Move to ntuser.h
+// FIXME: Move to ntuser.h
 typedef struct _TL
 {
     struct _TL* next;
index 8190299..7545408 100644 (file)
@@ -35,7 +35,7 @@
         ULONG Id;
     } DBG_CHANNEL;
 
-    /* note: the following values don't need to be sorted */
+    /* Note: The following values don't need to be sorted */
     enum _DEBUGCHANNELS
     {
         DbgChEngBlt,
index 12518ab..698c98e 100644 (file)
@@ -22,7 +22,7 @@
 #define DBG_ENABLE_EVENT_LOGGING 0
 #define DBG_ENABLE_SERVICE_HOOKS 0
 
-/* misc headers  */
+/* Misc headers  */
 #include <include/win32kdebug.h>
 #include <include/mmcopy.h>
 #include <include/tags.h>
index 40599d6..d536f96 100644 (file)
@@ -16,7 +16,7 @@ typedef enum
 
 typedef struct _WINSTATION_OBJECT
 {
-    PVOID SharedHeap; /* points to kmode memory! */
+    PVOID SharedHeap; /* Points to kmode memory! */
 
     CSHORT Type;
     CSHORT Size;
@@ -30,7 +30,7 @@ typedef struct _WINSTATION_OBJECT
     HANDLE ShellListView;
 
     /* Effects */
-    BOOL FontSmoothing; /* enable */
+    BOOL FontSmoothing; /* Enable */
     UINT FontSmoothingType; /* 1:Standard,2:ClearType */
     /* FIXME: Big Icons (SPI_GETICONMETRICS?) */
     BOOL DropShadow;
index 11fb9f0..b67a92d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * COPYRIGHT:        See COPYING in the top level directory
- * PROJECT:          ReactOS kernel
+ * PROJECT:          ReactOS Win32k subsystem
  * PURPOSE:          Driver entry and initialization of win32k
  * FILE:             subsystems/win32/win32k/main/main.c
  * PROGRAMER:
@@ -46,7 +46,7 @@ Win32kProcessCallback(struct _EPROCESS *Process,
     /* Allocate one if needed */
     if (!Win32Process)
     {
-        /* FIXME - lock the process */
+        /* FIXME: Lock the process */
         Win32Process = ExAllocatePoolWithTag(NonPagedPool,
                                              sizeof(PROCESSINFO),
                                              USERTAG_PROCESSINFO);
@@ -56,7 +56,7 @@ Win32kProcessCallback(struct _EPROCESS *Process,
         RtlZeroMemory(Win32Process, sizeof(PROCESSINFO));
 
         PsSetProcessWin32Process(Process, Win32Process);
-        /* FIXME - unlock the process */
+        /* FIXME: Unlock the process */
     }
 
     if (Create)
@@ -238,7 +238,7 @@ Win32kThreadCallback(struct _ETHREAD *Thread,
     /* Allocate one if needed */
     if (!ptiCurrent)
     {
-        /* FIXME - lock the process */
+        /* FIXME: Lock the process */
         ptiCurrent = ExAllocatePoolWithTag(NonPagedPool,
                                            sizeof(THREADINFO),
                                            USERTAG_THREADINFO);
@@ -252,7 +252,7 @@ Win32kThreadCallback(struct _ETHREAD *Thread,
         RtlZeroMemory(ptiCurrent, sizeof(THREADINFO));
 
         PsSetThreadWin32Thread(Thread, ptiCurrent);
-        /* FIXME - unlock the process */
+        /* FIXME: Unlock the process */
     }
 
     if (Type == PsW32ThreadCalloutInitialize)
@@ -463,14 +463,14 @@ Win32kInitWin32Thread(PETHREAD Thread)
 
     if (Process->Win32Process == NULL)
     {
-        /* FIXME - lock the process */
+        /* FIXME: Lock the process */
         Process->Win32Process = ExAllocatePoolWithTag(NonPagedPool, sizeof(PROCESSINFO), USERTAG_PROCESSINFO);
 
         if (Process->Win32Process == NULL)
             return STATUS_NO_MEMORY;
 
         RtlZeroMemory(Process->Win32Process, sizeof(PROCESSINFO));
-        /* FIXME - unlock the process */
+        /* FIXME: Unlock the process */
 
         Win32kProcessCallback(Process, TRUE);
     }
@@ -557,7 +557,7 @@ DriverEntry(
     /* Create the global USER heap */
     GlobalUserHeap = UserCreateHeap(&GlobalUserHeapSection,
                                     &GlobalUserHeapBase,
-                                    1 * 1024 * 1024); /* FIXME - 1 MB for now... */
+                                    1 * 1024 * 1024); /* FIXME: 1 MB for now... */
     if (GlobalUserHeap == NULL)
     {
         DPRINT1("Failed to initialize the global heap!\n");
index 11ffc1e..46036ee 100644 (file)
@@ -22,7 +22,7 @@
 #include <win32k.h>
 
 /*
- * FIXME! Is there a better algorithm. like FT_MulDiv
+ * FIXME: Is there a better algorithm, like FT_MulDiv?
  *
  * @implemented
  */
index a572b9e..9dd6e3f 100644 (file)
@@ -262,7 +262,7 @@ RegWriteUserSetting(
     WCHAR awcBuffer[MAX_PATH];
     HKEY hkey;
 
-    // FIXME: logged in user versus current process user?
+    // FIXME: Logged in user versus current process user?
     /* Get the path of the current user's profile */
     Status = RtlFormatCurrentUserKeyPath(&usCurrentUserKey);
     if (!NT_SUCCESS(Status))
index 8254862..702b096 100644 (file)
@@ -39,7 +39,7 @@ IntUserHeapCommitRoutine(IN PVOID Base,
 
     if (W32Process != NULL)
     {
-        /* search for the mapping */
+        /* Search for the mapping */
         Mapping = &W32Process->HeapMappings;
         while (Mapping != NULL)
         {
@@ -63,7 +63,7 @@ IntUserHeapCommitRoutine(IN PVOID Base,
         /* HACK: This needs to be handled during startup only... */
         ASSERT(Base == (PVOID)GlobalUserHeap);
 
-        /* temporarily map it into user space */
+        /* Temporarily map it into user space */
         Offset.QuadPart = 0;
         Status = MmMapViewOfSection(GlobalUserHeapSection,
                                     PsGetCurrentProcess(),
@@ -74,7 +74,7 @@ IntUserHeapCommitRoutine(IN PVOID Base,
                                     &ViewSize,
                                     ViewUnmap,
                                     SEC_NO_CHANGE,
-                                    PAGE_EXECUTE_READ); /* would prefer PAGE_READONLY, but thanks to RTL heaps... */
+                                    PAGE_EXECUTE_READ); /* Would prefer PAGE_READONLY, but thanks to RTL heaps... */
 
         if (!NT_SUCCESS(Status))
             return Status;
@@ -132,7 +132,7 @@ IntUserHeapCreate(IN PSECTION_OBJECT SectionObject,
                                 &ViewSize,
                                 ViewUnmap,
                                 SEC_NO_CHANGE,
-                                PAGE_EXECUTE_READ); /* would prefer PAGE_READONLY, but thanks to RTL heaps... */
+                                PAGE_EXECUTE_READ); /* Would prefer PAGE_READONLY, but thanks to RTL heaps... */
     if (!NT_SUCCESS(Status))
         return NULL;
 
@@ -141,7 +141,7 @@ IntUserHeapCreate(IN PSECTION_OBJECT SectionObject,
                                      0,
                                      &ViewSize,
                                      MEM_COMMIT,
-                                     PAGE_EXECUTE_READ); /* would prefer PAGE_READONLY, but thanks to RTL heaps... */
+                                     PAGE_EXECUTE_READ); /* Would prefer PAGE_READONLY, but thanks to RTL heaps... */
 
     MmUnmapViewOfSection(PsGetCurrentProcess(),
                          MappedView);
@@ -177,12 +177,12 @@ UserCreateHeap(OUT PSECTION_OBJECT *SectionObject,
 
     SizeHeap.QuadPart = HeapSize;
 
-    /* create the section and map it into session space */
+    /* Create the section and map it into session space */
     Status = MmCreateSection((PVOID*)SectionObject,
                              SECTION_ALL_ACCESS,
                              NULL,
                              &SizeHeap,
-                             PAGE_EXECUTE_READWRITE, /* would prefer PAGE_READWRITE, but thanks to RTL heaps... */
+                             PAGE_EXECUTE_READWRITE, /* Would prefer PAGE_READWRITE, but thanks to RTL heaps... */
                              SEC_RESERVE,
                              NULL,
                              NULL);
@@ -205,7 +205,7 @@ UserCreateHeap(OUT PSECTION_OBJECT *SectionObject,
         return FALSE;
     }
 
-    /* create the heap */
+    /* Create the heap */
     pHeap = IntUserHeapCreate(*SectionObject,
                               SystemBase,
                               HeapSize);
index d30871a..1022350 100644 (file)
@@ -297,7 +297,7 @@ DxEngGetHdevData(HDEV hDev,
         break;
       case DxEGShDevData_hSpooler:
         DPRINT1("requested DXEGSHDEVDATA DxEGShDevData_hSpooler\n");
-        retVal = 0;//(DWORD_PTR) PDev->hSpooler; // If the device is a spooler driver.
+        retVal = 0; // (DWORD_PTR) PDev->hSpooler; // If the device is a spooler driver.
         break;
       case DxEGShDevData_DitherFmt:
         DPRINT1("requested DXEGSHDEVDATA DxEGShDevData_DitherFmt\n");
index 52b9018..45641fd 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * COPYRIGHT:        See COPYING in the top level directory
- * PROJECT:          ReactOS kernel
+ * PROJECT:          ReactOS Win32k subsystem
  * PURPOSE:          Callback to usermode support
- * FILE:             subsys/win32k/ntuser/callback.c
+ * FILE:             subsystems/win32/win32k/ntuser/callback.c
  * PROGRAMER:        Casper S. Hornstrup (chorns@users.sourceforge.net)
  *                   Thomas Weidenmueller (w3seek@users.sourceforge.net)
  * NOTES:            Please use the Callback Memory Management functions for
@@ -17,7 +17,7 @@ DBG_DEFAULT_CHANNEL(UserCallback);
 
 typedef struct _INT_CALLBACK_HEADER
 {
-   /* list entry in the THREADINFO structure */
+   /* List entry in the THREADINFO structure */
    LIST_ENTRY ListEntry;
 }
 INT_CALLBACK_HEADER, *PINT_CALLBACK_HEADER;
@@ -37,7 +37,7 @@ IntCbAllocateMemory(ULONG Size)
    W32Thread = PsGetCurrentThreadWin32Thread();
    ASSERT(W32Thread);
 
-   /* insert the callback memory into the thread's callback list */
+   /* Insert the callback memory into the thread's callback list */
 
    InsertTailList(&W32Thread->W32CallbackListHead, &Mem->ListEntry);
 
@@ -57,10 +57,10 @@ IntCbFreeMemory(PVOID Data)
    W32Thread = PsGetCurrentThreadWin32Thread();
    ASSERT(W32Thread);
 
-   /* remove the memory block from the thread's callback list */
+   /* Remove the memory block from the thread's callback list */
    RemoveEntryList(&Mem->ListEntry);
 
-   /* free memory */
+   /* Free memory */
    ExFreePoolWithTag(Mem, USERTAG_CALLBACK);
 }
 
@@ -76,12 +76,11 @@ IntCleanupThreadCallbacks(PTHREADINFO W32Thread)
       Mem = CONTAINING_RECORD(CurrentEntry, INT_CALLBACK_HEADER,
                               ListEntry);
 
-      /* free memory */
+      /* Free memory */
       ExFreePool(Mem);
    }
 }
 
-
 //
 // Pass the Current Window handle and pointer to the Client Callback.
 // This will help user space programs speed up read access with the window object.
@@ -114,7 +113,7 @@ IntRestoreTebWndCallback (HWND hWnd, PWND pWnd, PVOID pActCtx)
 
 /* FUNCTIONS *****************************************************************/
 
-/* calls ClientLoadLibrary in user32 */
+/* Calls ClientLoadLibrary in user32 */
 HMODULE
 co_IntClientLoadLibrary(PUNICODE_STRING pstrLibName, 
                         PUNICODE_STRING pstrInitFunc, 
@@ -144,7 +143,7 @@ co_IntClientLoadLibrary(PUNICODE_STRING pstrLibName,
        ArgumentLength += pstrInitFunc->Length + sizeof(WCHAR);
    }
 
-   /* Allocate the argument*/
+   /* Allocate the argument */
    pArguments = IntCbAllocateMemory(ArgumentLength);
    if(pArguments == NULL)
    {
@@ -825,5 +824,4 @@ co_IntClientThreadSetup(VOID)
    return Status;
 }
 
-
 /* EOF */
index 5ecacbc..5284847 100644 (file)
@@ -13,7 +13,7 @@
 WNDPROC
 GetCallProcHandle(IN PCALLPROCDATA CallProc)
 {
-    /* FIXME - check for 64 bit architectures... */
+    /* FIXME: Check for 64 bit architectures... */
     return (WNDPROC)((ULONG_PTR)UserHMGetHandle(CallProc) | 0xFFFF0000);
 }
 
index fcaad9e..10a8433 100644 (file)
@@ -1,8 +1,8 @@
 /* 
  * COPYRIGHT:        See COPYING in the top level directory
- * PROJECT:          ReactOS kernel
+ * PROJECT:          ReactOS Win32k subsystem
  * PURPOSE:          Caret functions
- * FILE:             subsys/win32k/ntuser/caret.c
+ * FILE:             subsystems/win32/win32k/ntuser/caret.c
  * PROGRAMER:        Thomas Weidenmueller (w3seek@users.sourceforge.net)
  */
 
@@ -63,7 +63,7 @@ IntSetCaretBlinkTime(UINT uMSeconds)
    PTHREADINFO pti = PsGetCurrentThreadWin32Thread();
    PWINSTATION_OBJECT WinStaObject = pti->rpdesk->rpwinstaParent;
 
-   /* windows doesn't do this check */
+   /* Windows doesn't do this check */
    if((uMSeconds < MIN_CARETBLINKRATE) || (uMSeconds > MAX_CARETBLINKRATE))
    {
       EngSetLastError(ERROR_INVALID_PARAMETER);
@@ -157,11 +157,11 @@ IntGetCaretBlinkTime(VOID)
    Ret = WinStaObject->CaretBlinkRate;
    if(!Ret)
    {
-      /* load it from the registry the first call only! */
+      /* Load it from the registry the first call only! */
       Ret = WinStaObject->CaretBlinkRate = IntQueryCaretBlinkRate();
    }
 
-   /* windows doesn't do this check */
+   /* Windows doesn't do this check */
    if((Ret < MIN_CARETBLINKRATE) || (Ret > MAX_CARETBLINKRATE))
    {
       Ret = DEFAULT_CARETBLINKRATE;
@@ -219,7 +219,7 @@ IntSwitchCaretShowing(PVOID Info)
    return FALSE;
 }
 
-#if 0 //unused
+#if 0 // Unused
 static
 VOID FASTCALL
 co_IntDrawCaret(HWND hWnd)
index a8748f1..eb70b89 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * COPYRIGHT:        See COPYING in the top level directory
- * PROJECT:          ReactOS kernel
+ * PROJECT:          ReactOS Win32k subsystem
  * PURPOSE:          Window classes
  * FILE:             subsystems/win32/win32k/ntuser/class.c
  * PROGRAMER:        Thomas Weidenmueller <w3seek@reactos.com>
@@ -115,7 +115,7 @@ LookupFnIdToiCls(int FnId, int *iCls )
 static VOID
 IntFreeClassMenuName(IN OUT PCLS Class)
 {
-    /* free the menu name, if it was changed and allocated */
+    /* Free the menu name, if it was changed and allocated */
     if (Class->lpszClientUnicodeMenuName != NULL && Class->MenuNameIsString)
     {
         UserHeapFree(Class->lpszClientUnicodeMenuName);
@@ -128,7 +128,7 @@ static VOID
 IntDestroyClass(IN OUT PCLS Class)
 {
     PDESKTOP pDesk;
-    /* there shouldn't be any clones anymore */
+    /* There shouldn't be any clones anymore */
     ASSERT(Class->cWndReferenceCount == 0);
     ASSERT(Class->pclsClone == NULL);
 
@@ -161,7 +161,7 @@ IntDestroyClass(IN OUT PCLS Class)
     pDesk = Class->rpdeskParent;
     Class->rpdeskParent = NULL;
 
-    /* free the structure */
+    /* Free the structure */
     if (pDesk != NULL)
     {
         DesktopHeapFree(pDesk, Class);
@@ -173,7 +173,7 @@ IntDestroyClass(IN OUT PCLS Class)
 }
 
 
-/* clean all process classes. all process windows must cleaned first!! */
+/* Clean all process classes. all process windows must cleaned first!! */
 void FASTCALL DestroyProcessClasses(PPROCESSINFO Process )
 {
     PCLS Class;
@@ -181,7 +181,7 @@ void FASTCALL DestroyProcessClasses(PPROCESSINFO Process )
      
     if (pi != NULL)
     {
-        /* free all local classes */
+        /* Free all local classes */
         Class = pi->pclsPrivateList;
         while (Class != NULL)
         {
@@ -193,7 +193,7 @@ void FASTCALL DestroyProcessClasses(PPROCESSINFO Process )
             Class = pi->pclsPrivateList;
         }
 
-        /* free all global classes */
+        /* Free all global classes */
         Class = pi->pclsPublicList;
         while (Class != NULL)
         {
@@ -217,7 +217,7 @@ IntRegisterClassAtom(IN PUNICODE_STRING ClassName,
 
     if (ClassName->Length != 0)
     {
-        /* FIXME - Don't limit to 64 characters! use SEH when allocating memory! */
+        /* FIXME: Don't limit to 64 characters! Use SEH when allocating memory! */
         if (ClassName->Length / sizeof(WCHAR) >= sizeof(szBuf) / sizeof(szBuf[0]))
         {
             EngSetLastError(ERROR_INVALID_PARAMETER);
@@ -281,7 +281,7 @@ IntSetClassAtom(IN OUT PCLS Class,
 {
     RTL_ATOM Atom = (RTL_ATOM)0;
 
-    /* update the base class first */
+    /* Update the base class first */
     Class = Class->pclsBase;
 
     if (!IntRegisterClassAtom(ClassName,
@@ -294,7 +294,7 @@ IntSetClassAtom(IN OUT PCLS Class,
 
     Class->atomClassName = Atom;
 
-    /* update the clones */
+    /* Update the clones */
     Class = Class->pclsClone;
     while (Class != NULL)
     {
@@ -425,7 +425,7 @@ IntSetClassWndProc(IN OUT PCLS Class,
          Class->CSF_flags &= ~CSF_ANSIPROC;
    }
 
-   /* update the clones */
+   /* Update the clones */
    chWndProc = Class->lpfnWndProc;
 
    Class = Class->pclsClone;
@@ -453,7 +453,7 @@ IntGetClassForDesktop(IN OUT PCLS BaseClass,
 
     if (BaseClass->rpdeskParent == Desktop)
     {
-        /* it is most likely that a window is created on the same
+        /* It is most likely that a window is created on the same
            desktop as the window class. */
 
         return BaseClass;
@@ -499,12 +499,12 @@ IntGetClassForDesktop(IN OUT PCLS BaseClass,
                                  ClassSize);
         if (Class != NULL)
         {
-            /* simply clone the class */
+            /* Simply clone the class */
             RtlCopyMemory( Class, BaseClass, ClassSize);
 
             TRACE("Clone Class 0x%x hM 0x%x\n %S\n",Class, Class->hModule, Class->lpszClientUnicodeMenuName);
 
-            /* restore module address if default user class Ref: Bug 4778 */
+            /* Restore module address if default user class Ref: Bug 4778 */
             if ( Class->hModule != hModClient &&
                  Class->fnid <= FNID_GHOST    &&
                  Class->fnid >= FNID_BUTTON )
@@ -513,13 +513,13 @@ IntGetClassForDesktop(IN OUT PCLS BaseClass,
                TRACE("Clone Class 0x%x Reset hM 0x%x\n",Class, Class->hModule);
             }
 
-            /* update some pointers and link the class */
+            /* Update some pointers and link the class */
             Class->rpdeskParent = Desktop;
             Class->cWndReferenceCount = 0;
 
             if (BaseClass->rpdeskParent == NULL)
             {
-                /* we don't really need the base class on the shared
+                /* We don't really need the base class on the shared
                    heap anymore, delete it so the only class left is
                    the clone we just created, which now serves as the
                    new base class */
@@ -528,18 +528,18 @@ IntGetClassForDesktop(IN OUT PCLS BaseClass,
                 Class->pclsBase = Class;
                 Class->pclsNext = BaseClass->pclsNext;
 
-                /* replace the base class */
+                /* Replace the base class */
                 (void)InterlockedExchangePointer((PVOID*)ClassLink,
                                                  Class);
 
-                /* destroy the obsolete copy on the shared heap */
+                /* Destroy the obsolete copy on the shared heap */
                 BaseClass->pclsBase = NULL;
                 BaseClass->pclsClone = NULL;
                 IntDestroyClass(BaseClass);
             }
             else
             {
-                /* link in the clone */
+                /* Link in the clone */
                 Class->pclsClone = NULL;
                 Class->pclsBase = BaseClass;
                 Class->pclsNext = BaseClass->pclsClone;
@@ -589,15 +589,15 @@ IntMakeCloneBaseClass(IN OUT PCLS Class,
     ASSERT(Class->pclsBase->rpdeskParent != NULL);
     ASSERT(Class->pclsBase->cWndReferenceCount == 0);
 
-    /* unlink the clone */
+    /* Unlink the clone */
     *CloneLink = Class->pclsNext;
     Class->pclsClone = Class->pclsBase->pclsClone;
 
-    /* update the class information to make it a base class */
+    /* Update the class information to make it a base class */
     Class->pclsBase = Class;
     Class->pclsNext = (*BaseClassLink)->pclsNext;
 
-    /* update all clones */
+    /* Update all clones */
     Clone = Class->pclsClone;
     while (Clone != NULL)
     {
@@ -607,7 +607,7 @@ IntMakeCloneBaseClass(IN OUT PCLS Class,
         Clone = Clone->pclsNext;
     }
 
-    /* link in the new base class */
+    /* Link in the new base class */
     (void)InterlockedExchangePointer((PVOID*)BaseClassLink,
                                      Class);
 }
@@ -629,7 +629,7 @@ IntDereferenceClass(IN OUT PCLS Class,
             ASSERT(Class->pclsBase == Class);
 
             TRACE("IntDereferenceClass 0x%x\n", Class);
-            /* check if there are clones of the class on other desktops,
+            /* Check if there are clones of the class on other desktops,
                link the first clone in if possible. If there are no clones
                then leave the class on the desktop heap. It will get moved
                to the shared heap when the thread detaches. */
@@ -651,12 +651,12 @@ IntDereferenceClass(IN OUT PCLS Class,
 
                 ASSERT(*PrevLink == BaseClass);
 
-                /* make the first clone become the new base class */
+                /* Make the first clone become the new base class */
                 IntMakeCloneBaseClass(BaseClass->pclsClone,
                                       PrevLink,
                                       &BaseClass->pclsClone);
 
-                /* destroy the class, there's still another clone of the class
+                /* Destroy the class, there's still another clone of the class
                    that now serves as a base class. Make sure we don't destruct
                    resources shared by all classes (Base = NULL)! */
                 BaseClass->pclsBase = NULL;
@@ -668,7 +668,7 @@ IntDereferenceClass(IN OUT PCLS Class,
         {
             TRACE("IntDereferenceClass1 0x%x\n", Class);
 
-            /* locate the cloned class and unlink it */
+            /* Locate the cloned class and unlink it */
             PrevLink = &BaseClass->pclsClone;
             CurrentClass = BaseClass->pclsClone;
             while (CurrentClass != Class)
@@ -687,7 +687,7 @@ IntDereferenceClass(IN OUT PCLS Class,
             ASSERT(Class->pclsBase == BaseClass);
             ASSERT(Class->pclsClone == NULL);
 
-            /* the class was just a clone, we don't need it anymore */
+            /* The class was just a clone, we don't need it anymore */
             IntDestroyClass(Class);
         }
     }
@@ -707,7 +707,7 @@ IntMoveClassToSharedHeap(IN OUT PCLS Class,
 
     ClassSize = sizeof(*Class) + (SIZE_T)Class->cbclsExtra;
 
-    /* allocate the new base class on the shared heap */
+    /* Allocate the new base class on the shared heap */
     NewClass = UserHeapAlloc(ClassSize);
     if (NewClass != NULL)
     {
@@ -718,12 +718,12 @@ IntMoveClassToSharedHeap(IN OUT PCLS Class,
         NewClass->rpdeskParent = NULL;
         NewClass->pclsBase = NewClass;
 
-        /* replace the class in the list */
+        /* Replace the class in the list */
         (void)InterlockedExchangePointer((PVOID*)*ClassLinkPtr,
                                          NewClass);
         *ClassLinkPtr = &NewClass->pclsNext;
 
-        /* free the obsolete class on the desktop heap */
+        /* Free the obsolete class on the desktop heap */
         Class->pclsBase = NULL;
         IntDestroyClass(Class);
         return TRUE;
@@ -760,14 +760,14 @@ IntCheckDesktopClasses(IN PDESKTOP Desktop,
         if (Class->rpdeskParent == Desktop &&
             Class->cWndReferenceCount == 0)
         {
-            /* there shouldn't be any clones around anymore! */
+            /* There shouldn't be any clones around anymore! */
             ASSERT(Class->pclsClone == NULL);
 
-            /* FIXME - If process is terminating, don't move the class but rather destroy it! */
-            /* FIXME - We could move the class to another desktop heap if there's still desktops
+            /* FIXME: If process is terminating, don't move the class but rather destroy it! */
+            /* FIXME: We could move the class to another desktop heap if there's still desktops
                        mapped into the process... */
 
-            /* move the class to the shared heap */
+            /* Move the class to the shared heap */
             if (IntMoveClassToSharedHeap(Class,
                                          &Link))
             {
@@ -779,11 +779,11 @@ IntCheckDesktopClasses(IN PDESKTOP Desktop,
 
                 if (FreeOnFailure)
                 {
-                    /* unlink the base class */
+                    /* Unlink the base class */
                     (void)InterlockedExchangePointer((PVOID*)Link,
                                                      Class->pclsNext);
 
-                    /* we can free the old base class now */
+                    /* We can free the old base class now */
                     Class->pclsBase = NULL;
                     IntDestroyClass(Class);
                 }
@@ -810,13 +810,13 @@ IntCheckProcessDesktopClasses(IN PDESKTOP Desktop,
 
     pi = GetW32ProcessInfo();
 
-    /* check all local classes */
+    /* Check all local classes */
     IntCheckDesktopClasses(Desktop,
                            &pi->pclsPrivateList,
                            FreeOnFailure,
                            &Ret);
 
-    /* check all global classes */
+    /* Check all global classes */
     IntCheckDesktopClasses(Desktop,
                            &pi->pclsPublicList,
                            FreeOnFailure,
@@ -873,9 +873,9 @@ IntCreateClass(IN CONST WNDCLASSEXW* lpwcx,
     }
     else
     {
-        /* FIXME - the class was created before being connected
-                   to a desktop. It is possible for the desktop window,
-                   but should it be allowed for any other case? */
+        /* FIXME: The class was created before being connected
+                  to a desktop. It is possible for the desktop window,
+                  but should it be allowed for any other case? */
         Class = UserHeapAlloc(ClassSize);
     }
 
@@ -900,7 +900,7 @@ IntCreateClass(IN CONST WNDCLASSEXW* lpwcx,
         {
             PWSTR pszMenuNameBuffer = pszMenuName;
 
-            /* need to protect with SEH since accessing the WNDCLASSEX structure
+            /* Need to protect with SEH since accessing the WNDCLASSEX structure
                and string buffers might raise an exception! We don't want to
                leak memory... */
             // What?! If the user interface was written correctly this would not be an issue!
@@ -914,7 +914,7 @@ IntCreateClass(IN CONST WNDCLASSEXW* lpwcx,
             Class->hCursor = lpwcx->hCursor; /* FIXME */
             Class->hbrBackground = lpwcx->hbrBackground;
 
-            /* make a copy of the string */
+            /* Make a copy of the string */
             if (pszMenuNameBuffer != NULL)
             {
                 Class->MenuNameIsString = TRUE;
@@ -930,7 +930,7 @@ IntCreateClass(IN CONST WNDCLASSEXW* lpwcx,
             else
                 Class->lpszClientUnicodeMenuName = MenuName->Buffer;
 
-            /* save an ansi copy of the string */
+            /* Save an ANSI copy of the string */
             if (pszMenuNameBuffer != NULL)
             {
                 ANSI_STRING AnsiString;
@@ -945,7 +945,7 @@ IntCreateClass(IN CONST WNDCLASSEXW* lpwcx,
                 {
                     ERR("Failed to convert unicode menu name to ansi!\n");
 
-                    /* life would've been much prettier if ntoskrnl exported RtlRaiseStatus()... */
+                    /* Life would've been much prettier if ntoskrnl exported RtlRaiseStatus()... */
                     _SEH2_LEAVE;
                 }
             }
@@ -953,8 +953,8 @@ IntCreateClass(IN CONST WNDCLASSEXW* lpwcx,
                 Class->lpszClientAnsiMenuName = (PSTR)MenuName->Buffer;
 
             /* Save kernel use menu name and ansi class name */
-            Class->lpszMenuName = Class->lpszClientUnicodeMenuName; // Fixme!
-            //Class->lpszAnsiClassName = Fixme!
+            Class->lpszMenuName = Class->lpszClientUnicodeMenuName; // FIXME!
+            //Class->lpszAnsiClassName = FIXME
 
             /* Server Side overrides class calling type (A/W)!
                User32 whine test_builtinproc: "deftest"
@@ -968,7 +968,7 @@ IntCreateClass(IN CONST WNDCLASSEXW* lpwcx,
              for match. This method will be used in related code.
            */
                for ( i = FNID_FIRST; i <= FNID_SWITCH; i++)
-               { // Open Ansi or Unicode, just match, set and break.
+               { // Open ANSI or Unicode, just match, set and break.
                    if (GETPFNCLIENTW(i) == Class->lpfnWndProc)
                    {
                       WndProc = GETPFNSERVER(i);
@@ -1080,7 +1080,7 @@ IntGetAtomFromStringOrAtom(IN PUNICODE_STRING ClassName,
 
         if (ClassName->Length != 0)
         {
-            /* FIXME - Don't limit to 64 characters! use SEH when allocating memory! */
+            /* FIXME: Don't limit to 64 characters! use SEH when allocating memory! */
             if (ClassName->Length / sizeof(WCHAR) >= sizeof(szBuf) / sizeof(szBuf[0]))
             {
                 EngSetLastError(ERROR_INVALID_PARAMETER);
@@ -1100,7 +1100,7 @@ IntGetAtomFromStringOrAtom(IN PUNICODE_STRING ClassName,
         else
             AtomName = ClassName->Buffer;
 
-        /* lookup the atom */
+        /* Lookup the atom */
         Status = RtlLookupAtomInAtomTable(gAtomTable,
                                           AtomName,
                                           Atom);
@@ -1147,11 +1147,11 @@ IntGetClassAtom(IN PUNICODE_STRING ClassName,
     {
         PCLS Class;
 
-        /* attempt to locate the class object */
+        /* Attempt to locate the class object */
 
         ASSERT(pi != NULL);
 
-        /* Step 1: try to find an exact match of locally registered classes */
+        /* Step 1: Try to find an exact match of locally registered classes */
         Class = IntFindClass(Atom,
                              hInstance,
                              &pi->pclsPrivateList,
@@ -1161,7 +1161,7 @@ IntGetClassAtom(IN PUNICODE_STRING ClassName,
             goto FoundClass;
         }
 
-        /* Step 2: try to find any globally registered class. The hInstance
+        /* Step 2: Try to find any globally registered class. The hInstance
                    is not relevant for global classes */
         Class = IntFindClass(Atom,
                              NULL,
@@ -1172,7 +1172,7 @@ IntGetClassAtom(IN PUNICODE_STRING ClassName,
             goto FoundClass;
         }
 
-        /* Step 3: try to find any local class registered by user32 */
+        /* Step 3: Try to find any local class registered by user32 */
         Class = IntFindClass(Atom,
                              hModClient,
                              &pi->pclsPrivateList,
@@ -1182,7 +1182,7 @@ IntGetClassAtom(IN PUNICODE_STRING ClassName,
             goto FoundClass;
         }
 
-        /* Step 4: try to find any global class registered by user32 */
+        /* Step 4: Try to find any global class registered by user32 */
         Class = IntFindClass(Atom,
                              hModClient,
                              &pi->pclsPublicList,
@@ -1283,7 +1283,7 @@ UserRegisterClass(IN CONST WNDCLASSEXW* lpwcx,
 
        if (Class != NULL && !Class->Global)
        {
-          // local class already exists
+          // Local class already exists
           TRACE("Local Class 0x%p does already exist!\n", ClassAtom);
           EngSetLastError(ERROR_CLASS_ALREADY_EXISTS);
           return (RTL_ATOM)0;
@@ -1373,17 +1373,17 @@ UserUnregisterClass(IN PUNICODE_STRING ClassName,
         return FALSE;
     }
 
-    /* must be a base class! */
+    /* Must be a base class! */
     ASSERT(Class->pclsBase == Class);
 
-    /* unlink the class */
+    /* Unlink the class */
     *Link = Class->pclsNext;
 
     if (NT_SUCCESS(IntDeregisterClassAtom(Class->atomClassName)))
     {
         TRACE("Class 0x%x\n", Class);
         TRACE("UserUnregisterClass: Good Exit!\n");
-        /* finally free the resources */
+        /* Finally free the resources */
         IntDestroyClass(Class);
         return TRUE;
     }
@@ -1412,14 +1412,14 @@ UserGetClassName(IN PCLS Class,
             PANSI_STRING AnsiClassName = (PANSI_STRING)ClassName;
             UNICODE_STRING UnicodeClassName;
 
-            /* limit the size of the static buffer on the stack to the
+            /* Limit the size of the static buffer on the stack to the
                size of the buffer provided by the caller */
             if (BufLen / sizeof(WCHAR) > AnsiClassName->MaximumLength)
             {
                 BufLen = AnsiClassName->MaximumLength * sizeof(WCHAR);
             }
 
-            /* find out how big the buffer needs to be */
+            /* Find out how big the buffer needs to be */
             Status = RtlQueryAtomInAtomTable(gAtomTable,
                                              Class->atomClassName,
                                              NULL,
@@ -1430,13 +1430,13 @@ UserGetClassName(IN PCLS Class,
             {
                 if (BufLen / sizeof(WCHAR) > AnsiClassName->MaximumLength)
                 {
-                    /* the buffer required exceeds the ansi buffer provided,
+                    /* The buffer required exceeds the ansi buffer provided,
                        pretend like we're using the ansi buffer and limit the
                        size to the buffer size provided */
                     BufLen = AnsiClassName->MaximumLength * sizeof(WCHAR);
                 }
 
-                /* allocate a temporary buffer that can hold the unicode class name */
+                /* Allocate a temporary buffer that can hold the unicode class name */
                 szTemp = ExAllocatePoolWithTag(PagedPool,
                                                BufLen,
                                                USERTAG_CLASS);
@@ -1446,7 +1446,7 @@ UserGetClassName(IN PCLS Class,
                     _SEH2_LEAVE;
                 }
 
-                /* query the class name */
+                /* Query the class name */
                 Status = RtlQueryAtomInAtomTable(gAtomTable,
                                                  Atom ? Atom : Class->atomClassName,
                                                  NULL,
@@ -1459,7 +1459,7 @@ UserGetClassName(IN PCLS Class,
 
             if (NT_SUCCESS(Status))
             {
-                /* convert the atom name to ansi */
+                /* Convert the atom name to ansi */
 
                 RtlInitUnicodeString(&UnicodeClassName,
                                      szTemp);
@@ -1476,11 +1476,11 @@ UserGetClassName(IN PCLS Class,
 
             Ret = BufLen / sizeof(WCHAR);
         }
-        else /* !Ansi */
+        else /* !ANSI */
         {
             BufLen = ClassName->MaximumLength;
 
-            /* query the atom name */
+            /* Query the atom name */
             Status = RtlQueryAtomInAtomTable(gAtomTable,
                                              Atom ? Atom : Class->atomClassName,
                                              NULL,
@@ -1517,7 +1517,7 @@ IntSetClassMenuName(IN PCLS Class,
 {
     BOOL Ret = FALSE;
 
-    /* change the base class first */
+    /* Change the base class first */
     Class = Class->pclsBase;
 
     if (MenuName->Length != 0)
@@ -1535,13 +1535,13 @@ IntSetClassMenuName(IN PCLS Class,
             {
                 NTSTATUS Status;
 
-                /* copy the unicode string */
+                /* Copy the unicode string */
                 RtlCopyMemory(strBufW,
                               MenuName->Buffer,
                               MenuName->Length);
                 strBufW[MenuName->Length / sizeof(WCHAR)] = UNICODE_NULL;
 
-                /* create an ansi copy of the string */
+                /* Create an ANSI copy of the string */
                 AnsiString.Buffer = (PSTR)(strBufW + (MenuName->Length / sizeof(WCHAR)) + 1);
                 Status = RtlUnicodeStringToAnsiString(&AnsiString,
                                                       MenuName,
@@ -1562,13 +1562,13 @@ IntSetClassMenuName(IN PCLS Class,
 
             if (Ret)
             {
-                /* update the base class */
+                /* Update the base class */
                 IntFreeClassMenuName(Class);
                 Class->lpszClientUnicodeMenuName = strBufW;
                 Class->lpszClientAnsiMenuName = AnsiString.Buffer;
                 Class->MenuNameIsString = TRUE;
 
-                /* update the clones */
+                /* Update the clones */
                 Class = Class->pclsClone;
                 while (Class != NULL)
                 {
@@ -1592,13 +1592,13 @@ IntSetClassMenuName(IN PCLS Class,
     {
         ASSERT(IS_INTRESOURCE(MenuName->Buffer));
 
-        /* update the base class */
+        /* Update the base class */
         IntFreeClassMenuName(Class);
         Class->lpszClientUnicodeMenuName = MenuName->Buffer;
         Class->lpszClientAnsiMenuName = (PSTR)MenuName->Buffer;
         Class->MenuNameIsString = FALSE;
 
-        /* update the clones */
+        /* Update the clones */
         Class = Class->pclsClone;
         while (Class != NULL)
         {
@@ -1625,7 +1625,7 @@ UserSetClassLongPtr(IN PCLS Class,
 
     /* NOTE: For GCLP_MENUNAME and GCW_ATOM this function may raise an exception! */
 
-    /* change the information in the base class first, then update the clones */
+    /* Change the information in the base class first, then update the clones */
     Class = Class->pclsBase;
 
     if (Index >= 0)
@@ -1643,13 +1643,13 @@ UserSetClassLongPtr(IN PCLS Class,
 
         Data = (PULONG_PTR)((ULONG_PTR)(Class + 1) + Index);
 
-        /* FIXME - Data might be a unaligned pointer! Might be a problem on
-                   certain architectures, maybe using RtlCopyMemory is a
-                   better choice for those architectures! */
+        /* FIXME: Data might be a unaligned pointer! Might be a problem on
+                  certain architectures, maybe using RtlCopyMemory is a
+                  better choice for those architectures! */
         Ret = *Data;
         *Data = NewLong;
 
-        /* update the clones */
+        /* Update the clones */
         Class = Class->pclsClone;
         while (Class != NULL)
         {
@@ -1666,7 +1666,7 @@ UserSetClassLongPtr(IN PCLS Class,
             Ret = (ULONG_PTR)Class->cbwndExtra;
             Class->cbwndExtra = (INT)NewLong;
 
-            /* update the clones */
+            /* Update the clones */
             Class = Class->pclsClone;
             while (Class != NULL)
             {
@@ -1684,7 +1684,7 @@ UserSetClassLongPtr(IN PCLS Class,
             Ret = (ULONG_PTR)Class->hbrBackground;
             Class->hbrBackground = (HBRUSH)NewLong;
 
-            /* update the clones */
+            /* Update the clones */
             Class = Class->pclsClone;
             while (Class != NULL)
             {
@@ -1694,11 +1694,11 @@ UserSetClassLongPtr(IN PCLS Class,
             break;
 
         case GCLP_HCURSOR:
-            /* FIXME - get handle from pointer to CURSOR object */
+            /* FIXME: Get handle from pointer to CURSOR object */
             Ret = (ULONG_PTR)Class->hCursor;
             Class->hCursor = (HANDLE)NewLong;
 
-            /* update the clones */
+            /* Update the clones */
             Class = Class->pclsClone;
             while (Class != NULL)
             {
@@ -1708,11 +1708,11 @@ UserSetClassLongPtr(IN PCLS Class,
             break;
 
         case GCLP_HICON:
-            /* FIXME - get handle from pointer to ICON object */
+            /* FIXME: Get handle from pointer to ICON object */
             Ret = (ULONG_PTR)Class->hIcon;
             Class->hIcon = (HANDLE)NewLong;
 
-            /* update the clones */
+            /* Update the clones */
             Class = Class->pclsClone;
             while (Class != NULL)
             {
@@ -1722,11 +1722,11 @@ UserSetClassLongPtr(IN PCLS Class,
             break;
 
         case GCLP_HICONSM:
-            /* FIXME - get handle from pointer to ICON object */
+            /* FIXME: Get handle from pointer to ICON object */
             Ret = (ULONG_PTR)Class->hIconSm;
             Class->hIconSm = (HANDLE)NewLong;
 
-            /* update the clones */
+            /* Update the clones */
             Class = Class->pclsClone;
             while (Class != NULL)
             {
@@ -1739,7 +1739,7 @@ UserSetClassLongPtr(IN PCLS Class,
             Ret = (ULONG_PTR)Class->hModule;
             Class->hModule = (HINSTANCE)NewLong;
 
-           /* update the clones */
+           /* Update the clones */
             Class = Class->pclsClone;
             while (Class != NULL)
             {
@@ -1758,7 +1758,7 @@ UserSetClassLongPtr(IN PCLS Class,
                 ERR("Setting the class menu name failed!\n");
             }
 
-            /* FIXME - really return NULL? Wine does so... */
+            /* FIXME: Really return NULL? Wine does so... */
             break;
         }
 
@@ -1766,12 +1766,12 @@ UserSetClassLongPtr(IN PCLS Class,
             Ret = (ULONG_PTR)Class->style;
             Class->style = (UINT)NewLong;
 
-            /* FIXME - what if the CS_GLOBALCLASS style is changed? should we
-                       move the class to the appropriate list? For now, we save
-                       the original value in Class->Global, so we can always
-                       locate the appropriate list */
+            /* FIXME: What if the CS_GLOBALCLASS style is changed? should we
+                      move the class to the appropriate list? For now, we save
+                      the original value in Class->Global, so we can always
+                      locate the appropriate list */
 
-           /* update the clones */
+           /* Update the clones */
             Class = Class->pclsClone;
             while (Class != NULL)
             {
@@ -1825,8 +1825,8 @@ UserGetClassInfo(IN PCLS Class,
     
     lpwcx->cbClsExtra = Class->cbclsExtra;
     lpwcx->cbWndExtra = Class->cbwndExtra;
-    lpwcx->hIcon = Class->hIcon; /* FIXME - get handle from pointer */
-    lpwcx->hCursor = Class->hCursor; /* FIXME - get handle from pointer */
+    lpwcx->hIcon = Class->hIcon;        /* FIXME: Get handle from pointer */
+    lpwcx->hCursor = Class->hCursor;    /* FIXME: Get handle from pointer */
     lpwcx->hbrBackground = Class->hbrBackground;
 
     /* Copy non-string to user first. */
@@ -1835,9 +1835,9 @@ UserGetClassInfo(IN PCLS Class,
     else
        lpwcx->lpszMenuName = Class->lpszClientUnicodeMenuName;
 /*
   FIXME! CLSMENUNAME has the answers! Copy the already made buffers from there!
   Cls: lpszMenuName and lpszAnsiClassName should be used by kernel space.
   lpszClientXxxMenuName should already be mapped to user space.
*  FIXME: CLSMENUNAME has the answers! Copy the already made buffers from there!
*  Cls: lpszMenuName and lpszAnsiClassName should be used by kernel space.
*  lpszClientXxxMenuName should already be mapped to user space.
  */
     /* Copy string ptr to user. */
     if ( Class->lpszClientUnicodeMenuName != NULL && 
@@ -1853,16 +1853,16 @@ UserGetClassInfo(IN PCLS Class,
     else
         lpwcx->hInstance = hInstance;
 
-    /* FIXME - return the string? Okay! This is performed in User32!*/
+    /* FIXME: Return the string? Okay! This is performed in User32! */
     //lpwcx->lpszClassName = (LPCWSTR)((ULONG_PTR)Class->atomClassName);
 
-    lpwcx->hIconSm = Class->hIconSm; /* FIXME - get handle from pointer */
+    lpwcx->hIconSm = Class->hIconSm; /* FIXME: Get handle from pointer */
 
     return TRUE;
 }
 
 //
-//
+// ???
 //
 BOOL
 FASTCALL
@@ -2061,8 +2061,8 @@ InvalidParameter:
         }
 
         if (IsCallProcHandle(lpwcx->lpfnWndProc))
-        {// Never seen this yet, but I'm sure it's a little haxxy trick!
-         // If this pops up we know what todo!
+        {  // Never seen this yet, but I'm sure it's a little haxxy trick!
+           // If this pops up we know what todo!
            ERR("NtUserRegisterClassExWOW WndProc is CallProc!!\n");
         }
 
@@ -2119,7 +2119,7 @@ NtUserSetClassLong(HWND hWnd,
         {
             UNICODE_STRING Value;
 
-            /* probe the parameters */
+            /* Probe the parameters */
             if (Offset == GCW_ATOM || Offset == GCLP_MENUNAME)
             {
                 Value = ProbeForReadUnicodeString((PUNICODE_STRING)dwNewLong);
@@ -2194,7 +2194,7 @@ NtUserUnregisterClass(IN PUNICODE_STRING ClassNameOrAtom,
 
     _SEH2_TRY
     {
-        /* probe the paramters */
+        /* Probe the paramters */
         CapturedClassName = ProbeForReadUnicodeString(ClassNameOrAtom);
         if (CapturedClassName.Length & 1)
         {
@@ -2217,7 +2217,7 @@ InvalidParameter:
             }
         }
 
-        /* unregister the class */
+        /* Unregister the class */
         Ret = UserUnregisterClass(&CapturedClassName,
                                   hInstance,
                                   NULL); // Null for now~
@@ -2232,7 +2232,7 @@ InvalidParameter:
     return Ret;
 }
 
-/* NOTE: for system classes hInstance is not NULL here, but User32Instance */
+/* NOTE: For system classes hInstance is not NULL here, but User32Instance */
 BOOL APIENTRY
 NtUserGetClassInfo(
    HINSTANCE hInstance,
@@ -2248,7 +2248,7 @@ NtUserGetClassInfo(
    PPROCESSINFO ppi;
    BOOL Ret = TRUE;
 
-   /* NOTE: need exclusive lock because getting the wndproc might require the
+   /* NOTE: Need exclusive lock because getting the wndproc might require the
             creation of a call procedure handle */
    UserEnterExclusive();
 
@@ -2261,7 +2261,7 @@ NtUserGetClassInfo(
 
    _SEH2_TRY
    {
-      /* probe the paramters */
+      /* Probe the paramters */
       CapturedClassName = ProbeForReadUnicodeString(ClassName);
 
       if (CapturedClassName.Length == 0)
@@ -2403,7 +2403,7 @@ NtUserGetClassName (IN HWND hWnd,
             ProbeForWriteUnicodeString(ClassName);
             CapturedClassName = *ClassName;
 
-            /* get the class name */
+            /* Get the class name */
             Ret = UserGetClassName(Window->pcls,
                                    &CapturedClassName,
                                    Atom,
@@ -2411,7 +2411,7 @@ NtUserGetClassName (IN HWND hWnd,
 
             if (Ret != 0)
             {
-                /* update the Length field */
+                /* Update the Length field */
                 ClassName->Length = CapturedClassName.Length;
             }
         }
index 0252d89..8a65c99 100644 (file)
@@ -36,7 +36,7 @@ IntGetWinStaForCbAccess()
     return pWinStaObj;
 }
 
-/* if format exists, returns a non zero value (pointing to formated object) */
+/* If format exists, returns a non zero value (pointing to formated object) */
 PCLIP static FASTCALL
 IntIsFormatAvailable(PWINSTATION_OBJECT pWinStaObj, UINT fmt)
 {
@@ -68,7 +68,7 @@ IntFreeElementData(PCLIP pElement)
     }
 }
 
-/* adds a new format and data to the clipboard */
+/* Adds a new format and data to the clipboard */
 PCLIP static NTAPI
 IntAddFormatedData(PWINSTATION_OBJECT pWinStaObj, UINT fmt, HANDLE hData, BOOLEAN fGlobalHandle, BOOL bEnd)
 {
@@ -124,7 +124,7 @@ IntAddFormatedData(PWINSTATION_OBJECT pWinStaObj, UINT fmt, HANDLE hData, BOOLEA
 BOOL static FASTCALL
 IntIsClipboardOpenByMe(PWINSTATION_OBJECT pWinSta)
 {
-    /* check if current thread has opened the clipboard */
+    /* Check if current thread has opened the clipboard */
     if (pWinSta->ptiClipLock &&
         pWinSta->ptiClipLock == PsGetCurrentThreadWin32Thread())
     {
@@ -285,7 +285,7 @@ IntAddSynthesizedFormats(PWINSTATION_OBJECT pWinStaObj)
     if (!pBmEl && pDibEl)
         IntAddFormatedData(pWinStaObj, CF_BITMAP, DATA_SYNTH_KRNL, FALSE, TRUE);
 
-    /* Note: we need to render the DIB or DIBV5 format as soon as possible
+    /* Note: We need to render the DIB or DIBV5 format as soon as possible
        because pallette information may change */
     if (!pDibEl && pBmEl)
         IntSynthesizeDib(pWinStaObj, pBmEl->hData);
@@ -319,19 +319,19 @@ UserClipboardFreeWindow(PWND pWindow)
     if (!pWinStaObj)
         return;
 
-    /* check if clipboard is not locked by this window, if yes, unlock it */
+    /* Check if clipboard is not locked by this window, if yes, unlock it */
     if (pWindow == pWinStaObj->spwndClipOpen)
     {
-        /* the window that opens the clipboard was destroyed */
+        /* The window that opens the clipboard was destroyed */
         pWinStaObj->spwndClipOpen = NULL;
         pWinStaObj->ptiClipLock = NULL;
     }
     if (pWindow == pWinStaObj->spwndClipOwner)
     {
-        /* the owner window was destroyed */
+        /* The owner window was destroyed */
         pWinStaObj->spwndClipOwner = NULL;
     }
-    /* remove window from window chain */
+    /* Remove window from window chain */
     if (pWindow == pWinStaObj->spwndClipViewer)
         pWinStaObj->spwndClipViewer = NULL;
 
@@ -623,10 +623,10 @@ NtUserGetClipboardFormatName(UINT fmt, LPWSTR lpszFormatName, INT cchMaxCount)
 
     UserEnterShared();
 
-    /* if the format is built-in we fail */
+    /* If the format is built-in we fail */
     if (fmt < 0xc000)
     {
-        /* registetrated formats are >= 0xc000 */
+        /* Registetrated formats are >= 0xc000 */
         goto cleanup;
     }
 
@@ -801,12 +801,12 @@ NtUserGetClipboardData(UINT fmt, PGETCLIPBDATA pgcd)
     pElement = IntIsFormatAvailable(pWinStaObj, fmt);
     if (pElement && IS_DATA_DELAYED(pElement) && pWinStaObj->spwndClipOwner)
     {
-        /* send WM_RENDERFORMAT message */
+        /* Send WM_RENDERFORMAT message */
         pWinStaObj->fInDelayedRendering = TRUE;
         co_IntSendMessage(pWinStaObj->spwndClipOwner->head.h, WM_RENDERFORMAT, (WPARAM)fmt, 0);
         pWinStaObj->fInDelayedRendering = FALSE;
 
-        /* data should be in clipboard now */
+        /* Data should be in clipboard now */
         pElement = IntIsFormatAvailable(pWinStaObj, fmt);
     }
 
@@ -816,7 +816,7 @@ NtUserGetClipboardData(UINT fmt, PGETCLIPBDATA pgcd)
 
     if (IS_DATA_SYNTHESIZED(pElement))
     {
-        /* Note: data is synthesized in usermode */
+        /* Note: Data is synthesized in usermode */
         /* TODO: Add more formats */
         switch (fmt)
         {
@@ -920,7 +920,7 @@ UserSetClipboardData(UINT fmt, HANDLE hData, PSETCLIPBDATA scd)
         pWinStaObj->iClipSequenceNumber++;
         pWinStaObj->fClipboardChanged = TRUE;
 
-        /* Note: synthesized formats are added in NtUserCloseClipboard */
+        /* Note: Synthesized formats are added in NtUserCloseClipboard */
     }
     else
     {
index 874fc3b..a2f4a29 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * COPYRIGHT:        See COPYING in the top level directory
- * PROJECT:          ReactOS kernel
+ * PROJECT:          ReactOS Win32k subsystem
  * PURPOSE:          Cursor and icon functions
- * FILE:             subsystem/win32/win32k/ntuser/cursoricon.c
+ * FILE:             subsystems/win32/win32k/ntuser/cursoricon.c
  * PROGRAMER:        ReactOS Team
  */
 /*
@@ -80,7 +80,7 @@ PCURICON_OBJECT FASTCALL UserGetCurIconObject(HCURSOR hCurIcon)
     CurIcon = (PCURICON_OBJECT)UserReferenceObjectByHandle(hCurIcon, otCursorIcon);
     if (!CurIcon)
     {
-        /* we never set ERROR_INVALID_ICON_HANDLE. lets hope noone ever checks for it */
+        /* We never set ERROR_INVALID_ICON_HANDLE. lets hope noone ever checks for it */
         EngSetLastError(ERROR_INVALID_CURSOR_HANDLE);
         return NULL;
     }
@@ -178,7 +178,7 @@ IntFindExistingCurIconObject(HMODULE hModule,
     LIST_FOR_EACH(CurIcon, &gCurIconList, CURICON_OBJECT, ListEntry)
     {
 
-        //    if(NT_SUCCESS(UserReferenceObjectByPointer(Object, otCursorIcon))) //<- huh????
+        // if (NT_SUCCESS(UserReferenceObjectByPointer(Object, otCursorIcon))) // <- huh????
 //      UserReferenceObject(  CurIcon);
 //      {
         if ((CurIcon->hModule == hModule) && (CurIcon->hRsrc == hRsrc))
@@ -295,7 +295,7 @@ IntDestroyCurIconObject(PCURICON_OBJECT CurIcon, BOOL ProcessCleanup)
     bmpMask = CurIcon->IconInfo.hbmMask;
     bmpColor = CurIcon->IconInfo.hbmColor;
 
-    /* delete bitmaps */
+    /* Delete bitmaps */
     if (bmpMask)
     {
         GreSetObjectOwner(bmpMask, GDI_OBJ_HMGR_POWNED);
@@ -358,9 +358,9 @@ APIENTRY
 NtUserGetIconInfo(
     HANDLE hCurIcon,
     PICONINFO IconInfo,
-    PUNICODE_STRING lpInstName, // optional
-    PUNICODE_STRING lpResName,  // optional
-    LPDWORD pbpp,               // optional
+    PUNICODE_STRING lpInstName, // Optional
+    PUNICODE_STRING lpResName,  // Optional
+    LPDWORD pbpp,               // Optional
     BOOL bInternal)
 {
     ICONINFO ii;
@@ -473,7 +473,7 @@ NtUserGetIconSize(
     if (NT_SUCCESS(Status))
         bRet = TRUE;
     else
-        SetLastNtError(Status); // maybe not, test this
+        SetLastNtError(Status); // Maybe not, test this
 
     UserDereferenceObject(CurIcon);
 
@@ -547,7 +547,7 @@ APIENTRY
 UserClipCursor(
     RECTL *prcl)
 {
-    /* FIXME - check if process has WINSTA_WRITEATTRIBUTES */
+    /* FIXME: Check if process has WINSTA_WRITEATTRIBUTES */
     PSYSTEM_CURSORINFO CurInfo;
     PWND DesktopWindow = NULL;
 
@@ -684,7 +684,7 @@ NtUserFindExistingCursorIcon(
     {
         Ret = CurIcon->Self;
 
-//      IntReleaseCurIconObject(CurIcon);//faxme: is this correct? does IntFindExistingCurIconObject add a ref?
+//      IntReleaseCurIconObject(CurIcon); // FIXME: Is this correct? Does IntFindExistingCurIconObject add a ref?
         RETURN(Ret);
     }
 
@@ -706,7 +706,7 @@ APIENTRY
 NtUserGetClipCursor(
     RECTL *lpRect)
 {
-    /* FIXME - check if process has WINSTA_READATTRIBUTES */
+    /* FIXME: Check if process has WINSTA_READATTRIBUTES */
     PSYSTEM_CURSORINFO CurInfo;
     RECTL Rect;
     NTSTATUS Status;
@@ -1157,8 +1157,8 @@ UserDrawIconEx(
     }
 
     /* Set Background/foreground colors */
-    iOldTxtColor = IntGdiSetTextColor(hDc, 0); //black
-    iOldBkColor = IntGdiSetBkColor(hDc, 0x00FFFFFF); //white
+    iOldTxtColor = IntGdiSetTextColor(hDc, 0);          // Black
+    iOldBkColor = IntGdiSetBkColor(hDc, 0x00FFFFFF);    // White
 
        if(bAlpha && (diFlags & DI_IMAGE))
        {
@@ -1183,7 +1183,7 @@ UserDrawIconEx(
             goto CleanupAlpha;
         }
 
-        /* premultiply with the alpha channel value */
+        /* Premultiply with the alpha channel value */
         for (i = 0; i < psurf->SurfObj.sizlBitmap.cy; i++)
         {
                        ptr = (PBYTE)psurf->SurfObj.pvScan0 + i*psurf->SurfObj.lDelta;
@@ -1350,3 +1350,4 @@ NtUserDrawIconEx(
     return Ret;
 }
 
+/* EOF */
index ebed330..6417de9 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * COPYRIGHT:        See COPYING in the top level directory
- * PROJECT:          ReactOS kernel
- * PURPOSE:          Misc User funcs
- * FILE:             subsystem/win32/win32k/ntuser/defwnd.c
+ * PROJECT:          ReactOS Win32k subsystem
+ * PURPOSE:          Miscellaneous User functions
+ * FILE:             subsystems/win32/win32k/ntuser/defwnd.c
  * PROGRAMER:
  */
 
@@ -18,8 +18,8 @@ DBG_DEFAULT_CHANNEL(UserDefwnd);
 #define MCSR_DONOTSHUTDOWN    3
 
 /*
-  Based on CSRSS and described in pages 1115 - 1118 "Windows Internals, Fifth Edition".
-  Apparently CSRSS sends out messages to do this w/o going into win32k internals.
* Based on CSRSS and described in pages 1115 - 1118 "Windows Internals, Fifth Edition".
* Apparently CSRSS sends out messages to do this w/o going into win32k internals.
  */
 static
 LRESULT FASTCALL
@@ -295,7 +295,7 @@ GetNCHitEx(PWND pWnd, POINT pt)
 
    if (!pWnd) return HTNOWHERE;
 
-   if (pWnd == UserGetDesktopWindow())//pWnd->fnid == FNID_DESKTOP)
+   if (pWnd == UserGetDesktopWindow()) // pWnd->fnid == FNID_DESKTOP)
    {
       rcClient.left = rcClient.top = rcWindow.left = rcWindow.top = 0;
       rcWindow.right  = UserGetSystemMetrics(SM_CXSCREEN);
@@ -392,7 +392,7 @@ GetNCHitEx(PWND pWnd, POINT pt)
                 }
 
                 /* Check maximize box */
-                /* In win95 there is automatically a Maximize button when there is a minimize one*/
+                /* In Win95 there is automatically a Maximize button when there is a minimize one */
                 if (min_or_max_box && !(ExStyle & WS_EX_TOOLWINDOW))
                 {
                     rcWindow.left += UserGetSystemMetrics(SM_CXSIZE);
@@ -423,7 +423,7 @@ GetNCHitEx(PWND pWnd, POINT pt)
                 }
 
                 /* Check maximize box */
-                /* In win95 there is automatically a Maximize button when there is a minimize one*/
+                /* In Win95 there is automatically a Maximize button when there is a minimize one */
                 if (min_or_max_box && !(ExStyle & WS_EX_TOOLWINDOW))
                 {
                     rcWindow.right -= UserGetSystemMetrics(SM_CXSIZE);
index 1c68a21..b699287 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  COPYRIGHT:        See COPYING in the top level directory
- *  PROJECT:          ReactOS kernel
+ *  PROJECT:          ReactOS Win32k subsystem
  *  PURPOSE:          Desktops
  *  FILE:             subsystems/win32/win32k/ntuser/desktop.c
  *  PROGRAMER:        Casper S. Hornstrup (chorns@users.sourceforge.net)
@@ -300,7 +300,7 @@ IntParseDesktopPath(PEPROCESS Process,
    if(!WinStaPresent)
    {
 #if 0
-      /* search the process handle table for (inherited) window station
+      /* Search the process handle table for (inherited) window station
          handles, use a more appropriate one than WinSta0 if possible. */
       if (!ObFindHandleForObject(Process,
                                  NULL,
@@ -309,7 +309,7 @@ IntParseDesktopPath(PEPROCESS Process,
                                  (PHANDLE)hWinSta))
 #endif
       {
-            /* we had no luck searching for opened handles, use WinSta0 now */
+            /* We had no luck searching for opened handles, use WinSta0 now */
             RtlInitUnicodeString(&WinSta, L"WinSta0");
       }
    }
@@ -317,7 +317,7 @@ IntParseDesktopPath(PEPROCESS Process,
    if(!DesktopPresent && hDesktop != NULL)
    {
 #if 0
-      /* search the process handle table for (inherited) desktop
+      /* Search the process handle table for (inherited) desktop
          handles, use a more appropriate one than Default if possible. */
       if (!ObFindHandleForObject(Process,
                                  NULL,
@@ -326,7 +326,7 @@ IntParseDesktopPath(PEPROCESS Process,
                                  (PHANDLE)hDesktop))
 #endif
       {
-         /* we had no luck searching for opened handles, use Desktop now */
+         /* We had no luck searching for opened handles, use Desktop now */
          RtlInitUnicodeString(&Desktop, L"Default");
       }
    }
@@ -338,7 +338,7 @@ IntParseDesktopPath(PEPROCESS Process,
          return STATUS_INSUFFICIENT_RESOURCES;
       }
 
-      /* open the window station */
+      /* Open the window station */
       InitializeObjectAttributes(&ObjectAttributes,
                                  &FullName,
                                  OBJ_CASE_INSENSITIVE,
@@ -372,7 +372,7 @@ IntParseDesktopPath(PEPROCESS Process,
          return STATUS_INSUFFICIENT_RESOURCES;
       }
 
-      /* open the desktop object */
+      /* Open the desktop object */
       InitializeObjectAttributes(&ObjectAttributes,
                                  &FullName,
                                  OBJ_CASE_INSENSITIVE,
@@ -443,7 +443,7 @@ IntGetActiveDesktop(VOID)
 }
 
 /*
- * returns or creates a handle to the desktop object
+ * Returns or creates a handle to the desktop object
  */
 HDESK FASTCALL
 IntGetDesktopObjectHandle(PDESKTOP DesktopObject)
@@ -468,7 +468,7 @@ IntGetDesktopObjectHandle(PDESKTOP DesktopObject)
                                      (PHANDLE)&Ret);
       if(!NT_SUCCESS(Status))
       {
-         /* unable to create a handle */
+         /* Unable to create a handle */
          ERR("Unable to create a desktop handle\n");
          return NULL;
       }
@@ -698,7 +698,7 @@ UserBuildShellHookHwndList(PDESKTOP Desktop)
    PSHELL_HOOK_WINDOW Current;
    HWND* list;
 
-   /* fixme: if we save nb elements in desktop, we dont have to loop to find nb entries */
+   /* FIXME: If we save nb elements in desktop, we dont have to loop to find nb entries */
    LIST_FOR_EACH(Current, &Desktop->ShellHookWindows, SHELL_HOOK_WINDOW, ListEntry)
       entries++;
 
@@ -712,7 +712,7 @@ UserBuildShellHookHwndList(PDESKTOP Desktop)
       LIST_FOR_EACH(Current, &Desktop->ShellHookWindows, SHELL_HOOK_WINDOW, ListEntry)
          *cursor++ = Current->hWnd;
 
-      *cursor = NULL; /* nullterm list */
+      *cursor = NULL; /* Nullterm list */
    }
 
    return list;
@@ -731,7 +731,7 @@ VOID co_IntShellHookNotify(WPARAM Message, LPARAM lParam)
    if (!gpsi->uiShellMsg)
    {
 
-      /* Too bad, this doesn't work.*/
+      /* Too bad, this doesn't work. */
 #if 0
       UNICODE_STRING Str;
       RtlInitUnicodeString(&Str, L"SHELLHOOK");
@@ -1002,7 +1002,7 @@ NtUserCreateDesktop(
       InitializeListHead(&DesktopObject->pDeskInfo->aphkStart[i]);
    }
 
-//// why is this here?
+//// Why is this here?
 #if 0
    if (! NT_SUCCESS(Status))
    {
@@ -1395,12 +1395,12 @@ NtUserPaintDesktop(HDC hDC)
             {
                 HBITMAP hOldBitmap;
 
-                /* fill in the area that the bitmap is not going to cover */
+                /* Fill in the area that the bitmap is not going to cover */
                 if (x > 0 || y > 0)
                 {
-                   /* FIXME - clip out the bitmap
-                                                can be replaced with "NtGdiPatBlt(hDC, x, y, WinSta->cxWallpaper, WinSta->cyWallpaper, PATCOPY | DSTINVERT);"
-                                                once we support DSTINVERT */
+                   /* FIXME: Clip out the bitmap
+                                               can be replaced with "NtGdiPatBlt(hDC, x, y, WinSta->cxWallpaper, WinSta->cyWallpaper, PATCOPY | DSTINVERT);"
+                                               once we support DSTINVERT */
                   PreviousBrush = NtGdiSelectBrush(hDC, DesktopBrush);
                   NtGdiPatBlt(hDC, Rect.left, Rect.top, Rect.right, Rect.bottom, PATCOPY);
                   NtGdiSelectBrush(hDC, PreviousBrush);
@@ -1430,7 +1430,7 @@ NtUserPaintDesktop(HDC hDC)
                 }
                 else if (WinSta->WallpaperMode == wmTile)
                 {
-                    /* paint the bitmap across the screen then down */
+                    /* Paint the bitmap across the screen then down */
                     for(y = 0; y < Rect.bottom; y += WinSta->cyWallpaper)
                     {
                         for(x = 0; x < Rect.right; x += WinSta->cxWallpaper)
@@ -1666,14 +1666,14 @@ NtUserGetThreadDesktop(DWORD dwThreadId, DWORD Unknown1)
 
    if(Thread->ThreadsProcess == PsGetCurrentProcess())
    {
-      /* just return the handle, we queried the desktop handle of a thread running
+      /* Just return the handle, we queried the desktop handle of a thread running
          in the same context */
       Ret = ((PTHREADINFO)Thread->Tcb.Win32Thread)->hdesk;
       ObDereferenceObject(Thread);
       RETURN(Ret);
    }
 
-   /* get the desktop handle and the desktop of the thread */
+   /* Get the desktop handle and the desktop of the thread */
    if(!(hThreadDesktop = ((PTHREADINFO)Thread->Tcb.Win32Thread)->hdesk) ||
          !(DesktopObject = ((PTHREADINFO)Thread->Tcb.Win32Thread)->rpdesk))
    {
@@ -1682,9 +1682,9 @@ NtUserGetThreadDesktop(DWORD dwThreadId, DWORD Unknown1)
       RETURN(NULL);
    }
 
-   /* we could just use DesktopObject instead of looking up the handle, but latter
+   /* We could just use DesktopObject instead of looking up the handle, but latter
       may be a bit safer (e.g. when the desktop is being destroyed */
-   /* switch into the context of the thread we're trying to get the desktop from,
+   /* Switch into the context of the thread we're trying to get the desktop from,
       so we can use the handle */
    KeAttachProcess(&Thread->ThreadsProcess->Pcb);
    Status = ObReferenceObjectByHandle(hThreadDesktop,
@@ -1695,18 +1695,18 @@ NtUserGetThreadDesktop(DWORD dwThreadId, DWORD Unknown1)
                                       &HandleInformation);
    KeDetachProcess();
 
-   /* the handle couldn't be found, there's nothing to get... */
+   /* The handle couldn't be found, there's nothing to get... */
    if(!NT_SUCCESS(Status))
    {
       ObDereferenceObject(Thread);
       RETURN(NULL);
    }
 
-   /* lookup our handle table if we can find a handle to the desktop object,
+   /* Lookup our handle table if we can find a handle to the desktop object,
       if not, create one */
    Ret = IntGetDesktopObjectHandle(DesktopObject);
 
-   /* all done, we got a valid handle to the desktop */
+   /* All done, we got a valid handle to the desktop */
    ObDereferenceObject(DesktopObject);
    ObDereferenceObject(Thread);
    RETURN(Ret);
@@ -1730,7 +1730,7 @@ IntUnmapDesktopView(IN PDESKTOP DesktopObject)
     CurrentWin32Process = PsGetCurrentProcessWin32Process();
     PrevLink = &CurrentWin32Process->HeapMappings.Next;
 
-    /* unmap if we're the last thread using the desktop */
+    /* Unmap if we're the last thread using the desktop */
     HeapMapping = *PrevLink;
     while (HeapMapping != NULL)
     {
@@ -1777,7 +1777,7 @@ IntMapDesktopView(IN PDESKTOP DesktopObject)
     CurrentWin32Process = PsGetCurrentProcessWin32Process();
     PrevLink = &CurrentWin32Process->HeapMappings.Next;
 
-    /* find out if another thread already mapped the desktop heap */
+    /* Find out if another thread already mapped the desktop heap */
     HeapMapping = *PrevLink;
     while (HeapMapping != NULL)
     {
@@ -1791,7 +1791,7 @@ IntMapDesktopView(IN PDESKTOP DesktopObject)
         HeapMapping = HeapMapping->Next;
     }
 
-    /* we're the first, map the heap */
+    /* We're the first, map the heap */
     TRACE("Noone mapped the desktop heap %p yet, so - map it!\n", DesktopObject->pheapDesktop);
     Offset.QuadPart = 0;
     Status = MmMapViewOfSection(DesktopObject->hsectionDesktop,
@@ -1803,14 +1803,14 @@ IntMapDesktopView(IN PDESKTOP DesktopObject)
                                 &ViewSize,
                                 ViewUnmap,
                                 SEC_NO_CHANGE,
-                                PAGE_EXECUTE_READ); /* would prefer PAGE_READONLY, but thanks to RTL heaps... */
+                                PAGE_EXECUTE_READ); /* Would prefer PAGE_READONLY, but thanks to RTL heaps... */
     if (!NT_SUCCESS(Status))
     {
         ERR("Failed to map desktop\n");
         return Status;
     }
 
-    /* add the mapping */
+    /* Add the mapping */
     HeapMapping = UserHeapAlloc(sizeof(W32HEAP_USER_MAPPING));
     if (HeapMapping == NULL)
     {
@@ -1930,7 +1930,7 @@ IntSetThreadDesktop(IN HDESK hDesktop,
     {
         ERR("Failed to move process classes to shared heap!\n");
 
-        /* failed to move desktop classes to the shared heap,
+        /* Failed to move desktop classes to the shared heap,
             unmap the view and return the error */
         if (MapHeap && DesktopObject != NULL)
             IntUnmapDesktopView(DesktopObject);
index 4bb036d..a12c14d 100644 (file)
@@ -462,7 +462,7 @@ UserEnumDisplaySettings(
     TRACE("Enter UserEnumDisplaySettings('%wZ', %ld)\n",
             pustrDevice, iModeNum);
 
-    /* Ask gdi for the GRAPHICS_DEVICE */
+    /* Ask GDI for the GRAPHICS_DEVICE */
     pGraphicsDevice = EngpFindGraphicsDevice(pustrDevice, 0, 0);
 
     if (!pGraphicsDevice)
@@ -480,7 +480,7 @@ UserEnumDisplaySettings(
     {
         pdmentry = &pGraphicsDevice->pDevModeList[i];
 
-        /* FIXME: consider EDS_RAWMODE */
+        /* FIXME: Consider EDS_RAWMODE */
 #if 0
         if ((!(dwFlags & EDS_RAWMODE) && (pdmentry->dwFlags & 1)) ||!
             (dwFlags & EDS_RAWMODE))
@@ -520,7 +520,7 @@ UserOpenDisplaySettingsKey(
 
     if (bGlobal)
     {
-        // FIXME: need to fix the registry key somehow
+        // FIXME: Need to fix the registry key somehow
     }
 
     /* Open the registry key */
@@ -627,7 +627,7 @@ NtUserEnumDisplaySettings(
             /* Output what we got */
             RtlCopyMemory(lpDevMode, pdm, min(cbSize, pdm->dmSize));
 
-            /* output private/extra driver data */
+            /* Output private/extra driver data */
             if (cbExtra > 0 && pdm->dmDriverExtra > 0)
             {
                 RtlCopyMemory((PCHAR)lpDevMode + cbSize,
@@ -680,7 +680,7 @@ UserChangeDisplaySettings(
     /* Check params */
     if ((dm.dmFields & (DM_PELSWIDTH | DM_PELSHEIGHT)) != (DM_PELSWIDTH | DM_PELSHEIGHT))
     {
-        ERR("devmode doesn't specify the resolution.\n");
+        ERR("Devmode doesn't specify the resolution.\n");
         return DISP_CHANGE_BADMODE;
     }
 
@@ -688,7 +688,7 @@ UserChangeDisplaySettings(
     ppdev = EngpGetPDEV(pustrDevice);
     if (!ppdev)
     {
-        ERR("failed to get PDEV\n");
+        ERR("Failed to get PDEV\n");
         return DISP_CHANGE_BADPARAM;
     }
 
@@ -762,7 +762,7 @@ UserChangeDisplaySettings(
         /* Check for failure */
         if (!ulResult)
         {
-            ERR("failed to set mode\n");
+            ERR("Failed to set mode\n");
             lResult = (lResult == DISP_CHANGE_NOTUPDATED) ?
                 DISP_CHANGE_FAILED : DISP_CHANGE_RESTART;
 
index 0d14096..66212d8 100644 (file)
@@ -111,7 +111,7 @@ IntCallLowLevelEvent( PEVENTHOOK pEH,
    pEP->idObject = idObject;
    pEP->idChild = idChild;
 
-   /* FIXME should get timeout from
+   /* FIXME: Should get timeout from
     * HKEY_CURRENT_USER\Control Panel\Desktop\LowLevelHooksTimeout */
    Status = co_MsqSendMessage( pEH->head.pti->MessageQueue,
                                hwnd,
@@ -246,8 +246,8 @@ IntNotifyWinEvent(
      // Must be inside the event window.
      if ( (pEH->eventMin <= Event) && (pEH->eventMax >= Event))
      {
-// if all process || all thread || other thread same process
-// if ^skip own thread && ((Pid && CPid == Pid && ^skip own process) || all process)
+// If all process || all thread || other thread same process
+// If ^skip own thread && ((Pid && CPid == Pid && ^skip own process) || all process)
         if ( (!pEH->idProcess || pEH->idProcess == PtrToUint(pti->pEThread->Cid.UniqueProcess)) &&
              (!(pEH->Flags & WINEVENT_SKIPOWNPROCESS) || pEH->head.pti->ppi != pti->ppi) &&
              (!pEH->idThread  || pEH->idThread == PtrToUint(pti->pEThread->Cid.UniqueThread)) &&
index 6cb0702..065a26e 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * COPYRIGHT:        See COPYING in the top level directory
- * PROJECT:          ReactOS kernel
+ * PROJECT:          ReactOS Win32k subsystem
  * PURPOSE:          Focus functions
- * FILE:             subsystem/win32/win32k/ntuser/focus.c
+ * FILE:             subsystems/win32/win32k/ntuser/focus.c
  * PROGRAMER:        ReactOS Team
  */
 
@@ -247,7 +247,7 @@ co_IntSetForegroundAndFocusWindow(PWND Wnd, PWND FocusWindow, BOOL MouseActivate
       return TRUE;
    }
 
-   /* call CBT hook chain */
+   /* Call CBT hook chain */
    cbt.fMouse     = MouseActivate;
    cbt.hWndActive = hWndPrev;
    if (co_HOOK_CallHooks( WH_CBT, HCBT_ACTIVATE, (WPARAM)hWnd, (LPARAM)&cbt))
@@ -284,7 +284,7 @@ co_IntSetForegroundAndFocusWindow(PWND Wnd, PWND FocusWindow, BOOL MouseActivate
 }
 
 BOOL FASTCALL
-co_IntSetForegroundWindow(PWND Window)//FIXME: can Window be NULL??
+co_IntSetForegroundWindow(PWND Window) // FIXME: Can Window be NULL??
 {
    /*if (Window)*/ ASSERT_REFS_CO(Window);
 
@@ -366,7 +366,7 @@ co_IntSetActiveWindow(PWND Wnd OPTIONAL)
       return hWndPrev;
    }
 
-   /* call CBT hook chain */
+   /* Call CBT hook chain */
    cbt.fMouse     = FALSE;
    cbt.hWndActive = hWndPrev;
    if (co_HOOK_CallHooks( WH_CBT, HCBT_ACTIVATE, (WPARAM)hWnd, (LPARAM)&cbt))
@@ -407,7 +407,7 @@ co_UserSetFocus(PWND Window)
    {
       if (hWndPrev == Window->head.h)
       {
-         return hWndPrev; /* nothing to do */
+         return hWndPrev; /* Nothing to do */
       }
 
       /* Check if we can set the focus to this window */
@@ -423,7 +423,7 @@ co_UserSetFocus(PWND Window)
          return 0;
       }
 
-      /* activate pwndTop if needed. */
+      /* Activate pwndTop if needed. */
       if (pwndTop->head.h != ThreadQueue->ActiveWindow)
       {
          co_IntSetActiveWindow(pwndTop);
@@ -542,8 +542,8 @@ co_UserSetCapture(HWND hWnd)
    if (hWnd == NULL) // Release mode.
    {
       MOUSEINPUT mi;
-   /// These are hacks!
-      /* also remove other windows if not capturing anymore */
+   /// These are HACKS!
+      /* Also remove other windows if not capturing anymore */
       MsqSetStateWindow(ThreadQueue, MSQ_STATE_MENUOWNER, NULL);
       MsqSetStateWindow(ThreadQueue, MSQ_STATE_MOVESIZE, NULL);
    ///
index a3c8c75..d5266f6 100644 (file)
@@ -103,9 +103,9 @@ IntHookModuleUnloaded(PDESKTOP pdesk, int iHookID, HHOOK hHook)
     {
         ptiCurrent = CONTAINING_RECORD(ListEntry, THREADINFO, PtiLink);
 
-        /* FIXME: do some more security checks here */
+        /* FIXME: Do some more security checks here */
 
-        /* FIXME: the first check is a reactos specific hack for system threads */
+        /* FIXME: The first check is a reactos specific hack for system threads */
         if(!PsIsSystemProcess(ptiCurrent->ppi->peProcess) && 
            ptiCurrent->ppi != ppiCsr)
         {
@@ -181,7 +181,7 @@ UserRegisterUserApiHook(
             }
             ptiCurrent = pwndCurrent->head.pti;
 
-           /* FIXME: the first check is a reactos specific hack for system threads */
+           /* FIXME: The first check is a reactos specific hack for system threads */
             if(PsIsSystemProcess(ptiCurrent->ppi->peProcess) ||
                 ptiCurrent->ppi == ppiCsr)
             {
@@ -191,7 +191,7 @@ UserRegisterUserApiHook(
             co_MsqSendMessageAsync( ptiCurrent,
                                     0,
                                     WH_APIHOOK,
-                                    FALSE,   /* load the module */
+                                    FALSE,   /* Load the module */
                                     0,
                                     NULL,
                                     0,
@@ -295,7 +295,7 @@ co_IntCallLowLevelHook(PHOOK Hook,
        if (pHP->pHookStructs) RtlCopyMemory(pHP->pHookStructs, (PVOID)lParam, Size);
     }
 
-    /* FIXME should get timeout from
+    /* FIXME: Should get timeout from
      * HKEY_CURRENT_USER\Control Panel\Desktop\LowLevelHooksTimeout */
     Status = co_MsqSendMessage( pti->MessageQueue,
                                 IntToPtr(Code), // hWnd
@@ -439,7 +439,7 @@ co_IntCallDebugHook(PHOOK Hook,
                     Size = sizeof(CBTACTIVATESTRUCT); 
                     break;
 
-                case HCBT_CREATEWND: /* Handle Ansi? */
+                case HCBT_CREATEWND: /* Handle ANSI? */
                     Size = sizeof(CBT_CREATEWND);
                     /* What shall we do? Size += sizeof(HOOKPROC_CBT_CREATEWND_EXTRA_ARGUMENTS); same as CREATESTRUCTEX */
                     break;
@@ -983,7 +983,7 @@ IntGetGlobalHookHandles(PDESKTOP pdo, int HookId)
     return pList;
 }
 
-/* find the next hook in the chain  */
+/* Find the next hook in the chain  */
 PHOOK
 FASTCALL
 IntGetNextHook(PHOOK Hook)
@@ -1009,7 +1009,7 @@ IntGetNextHook(PHOOK Hook)
     return NULL;
 }
 
-/* free a hook, removing it from its chain */
+/* Free a hook, removing it from its chain */
 static
 VOID
 FASTCALL
@@ -1025,7 +1025,7 @@ IntFreeHook(PHOOK Hook)
     UserDeleteObject(UserHMGetHandle(Hook), otHook);
 }
 
-/* remove a hook, freeing it from the chain */
+/* Remove a hook, freeing it from the chain */
 static
 VOID
 FASTCALL
@@ -1118,7 +1118,7 @@ HOOK_DestroyThreadHooks(PETHREAD Thread)
          while (pElem != pGLE)
          {
             HookObj = CONTAINING_RECORD(pElem, HOOK, Chain);
-            pElem = HookObj->Chain.Flink; // get next element before hook is destroyed
+            pElem = HookObj->Chain.Flink; // Get next element before hook is destroyed
             if (HookObj->head.pti == pti)
             {
                IntRemoveHook(HookObj);
@@ -1538,7 +1538,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
           }
        }
     }
-    else  /* system-global hook */
+    else  /* System-global hook */
     {                                                                                
        ptiHook = pti; // gptiCurrent;
        if ( !Mod &&
@@ -1587,7 +1587,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
 
     TRACE("Set Hook Desk 0x%x DeskInfo 0x%x Handle Desk 0x%x\n",pti->rpdesk, pti->pDeskInfo,Hook->head.rpdesk);
 
-    if (ThreadId)  /* thread-local hook */
+    if (ThreadId)  /* Thread-local hook */
     {
        InsertHeadList(&ptiHook->aphkStart[HOOKID_TO_INDEX(HookId)], &Hook->Chain);
        ptiHook->sphkCurrent = NULL;
@@ -1674,7 +1674,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
        }
 
        Hook->ModuleName.Length = ModuleName.Length;
-       /* make proc relative to the module base */
+       /* Make proc relative to the module base */
        Hook->offPfn = (ULONG_PTR)((char *)HookProc - (char *)Mod);
     }
     else
@@ -1779,5 +1779,4 @@ NtUserUnregisterUserApiHook(VOID)
     return ret;
 }
 
-
 /* EOF */
index 0e2fa2d..ff9e743 100644 (file)
@@ -1,18 +1,17 @@
 /*
  * COPYRIGHT:        See COPYING in the top level directory
- * PROJECT:          ReactOS kernel
+ * PROJECT:          ReactOS Win32k subsystem
  * PURPOSE:          HotKey support
- * FILE:             subsys/win32k/ntuser/hotkey.c
+ * FILE:             subsystems/win32/win32k/ntuser/hotkey.c
  * PROGRAMER:        Eric Kohl
  */
 
 /*
-FIXME: Hotkey notifications are triggered by keyboard input (physical or programatically)
-and since only desktops on WinSta0 can recieve input in seems very wrong to allow
-windows/threads on destops not belonging to WinSta0 to set hotkeys (recieve notifications).
-
--Gunnar
-*/
+ * FIXME: Hotkey notifications are triggered by keyboard input (physical or programatically)
+ * and since only desktops on WinSta0 can recieve input in seems very wrong to allow
+ * windows/threads on destops not belonging to WinSta0 to set hotkeys (recieve notifications).
+ *     -- Gunnar
+ */
 
 #include <win32k.h>
 DBG_DEFAULT_CHANNEL(UserHotkey);
@@ -226,7 +225,7 @@ co_UserProcessHotKeys(WORD wVk, BOOL bIsDown)
             {
                 //co_ActivateDebugger(); // FIXME
             }
-            else if (pHotKey->id == IDHK_REACTOS && !pHotKey->pThread) // FIXME: those hotkeys doesn't depend on RegisterHotKey
+            else if (pHotKey->id == IDHK_REACTOS && !pHotKey->pThread) // FIXME: Those hotkeys doesn't depend on RegisterHotKey
             {
                 SendSysCmdMsg(pHotKey->hWnd, SC_HOTKEY, (LPARAM)pHotKey->hWnd);
             }
@@ -386,7 +385,7 @@ NtUserRegisterHotKey(HWND hWnd,
 
     TRACE("Enter NtUserRegisterHotKey\n");
 
-    if (fsModifiers & ~(MOD_ALT|MOD_CONTROL|MOD_SHIFT|MOD_WIN)) //FIXME: does win2k3 supports MOD_NOREPEAT?
+    if (fsModifiers & ~(MOD_ALT|MOD_CONTROL|MOD_SHIFT|MOD_WIN)) // FIXME: Does Win2k3 support MOD_NOREPEAT?
     {
         WARN("Invalid modifiers: %x\n", fsModifiers);
         EngSetLastError(ERROR_INVALID_FLAGS);
index 8452084..25a9429 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * COPYRIGHT:        See COPYING in the top level directory
- * PROJECT:          ReactOS kernel
+ * PROJECT:          ReactOS Win32k subsystem
  * PURPOSE:          General input functions
  * FILE:             subsystems/win32/win32k/ntuser/input.c
  * PROGRAMERS:       Casper S. Hornstrup (chorns@users.sourceforge.net)
@@ -353,15 +353,15 @@ IntBlockInput(PTHREADINFO pti, BOOL BlockIt)
     if(!pti->rpdesk || ((pti->TIF_flags & TIF_INCLEANUP) && BlockIt))
     {
         /*
-         * fail blocking if exiting the thread
+         * Fail blocking if exiting the thread
          */
 
         return FALSE;
     }
 
     /*
-     * FIXME - check access rights of the window station
-     *         e.g. services running in the service window station cannot block input
+     * FIXME: Check access rights of the window station
+     *        e.g. services running in the service window station cannot block input
      */
     if(!ThreadHasInputAccess(pti) ||
        !IntIsActiveDesktop(pti->rpdesk))
@@ -410,7 +410,7 @@ UserAttachThreadInput(PTHREADINFO pti, PTHREADINFO ptiTo, BOOL fAttach)
 {
     PATTACHINFO pai;
 
-    /* Can not be the same thread.*/
+    /* Can not be the same thread. */
     if (pti == ptiTo) return FALSE;
 
     /* Do not attach to system threads or between different desktops. */
@@ -489,8 +489,8 @@ NtUserSendInput(
     }
 
     /*
-     * FIXME - check access rights of the window station
-     *         e.g. services running in the service window station cannot block input
+     * FIXME: Check access rights of the window station
+     *        e.g. services running in the service window station cannot block input
      */
     if (!ThreadHasInputAccess(pti) ||
         !IntIsActiveDesktop(pti->rpdesk))
index 33be436..671c28e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * PROJECT:         ReactOS Kernel
+ * PROJECT:         ReactOS Win32k subsystem
  * LICENSE:         GPL - See COPYING in the top level directory
  * FILE:            subsystems/win32/win32k/ntuser/kbdlayout.c
  * PURPOSE:         Keyboard layout management
@@ -381,14 +381,14 @@ co_UserActivateKbl(PTHREADINFO pti, PKL pKl, UINT Flags)
 
     if (Flags & KLF_SETFORPROCESS)
     {
-        //FIXME
+        // FIXME
     }
 
     // Send WM_INPUTLANGCHANGE to thread's focus window
     co_IntSendMessage(pti->MessageQueue->FocusWindow,
                       WM_INPUTLANGCHANGE,
-                      (WPARAM)pKl->iBaseCharset, // FIXME: how to set it?
-                      (LPARAM)pKl->hkl); //hkl
+                      (WPARAM)pKl->iBaseCharset, // FIXME: How to set it?
+                      (LPARAM)pKl->hkl); // hkl
 
     return pklPrev;
 }
@@ -537,8 +537,8 @@ HKL
 APIENTRY
 NtUserLoadKeyboardLayoutEx(
     IN HANDLE Handle, // hFile (See downloads.securityfocus.com/vulnerabilities/exploits/43774.c)
-    IN DWORD offTable, // offset to KbdTables
-    IN PUNICODE_STRING puszKeyboardName, // not used?
+    IN DWORD offTable, // Offset to KbdTables
+    IN PUNICODE_STRING puszKeyboardName, // Not used?
     IN HKL hklUnload,
     IN PUNICODE_STRING pustrKLID,
     IN DWORD hkl,
@@ -558,7 +558,7 @@ NtUserLoadKeyboardLayoutEx(
         return NULL;
     }
 
-    /* FIXME: it seems KLF_RESET is only supported for WINLOGON */
+    /* FIXME: It seems KLF_RESET is only supported for WINLOGON */
 
     RtlInitEmptyUnicodeString(&ustrSafeKLID, Buffer, sizeof(Buffer));
     _SEH2_TRY
index f10c110..a8cd89f 100644 (file)
@@ -2,7 +2,7 @@
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
  * PURPOSE:          Keyboard functions
- * FILE:             subsys/win32k/ntuser/keyboard.c
+ * FILE:             subsystems/win32/win32k/ntuser/keyboard.c
  * PROGRAMERS:       Casper S. Hornstrup (chorns@users.sourceforge.net)
  *                   Rafal Harabien (rafalh@reactos.org)
  */
@@ -458,7 +458,7 @@ IntToUnicodeEx(UINT wVirtKey,
         TRACE("Final char: %lc (%x)\n", wchTranslatedChar, wchTranslatedChar);
     }
 
-    /* dead char has not been not found */
+    /* Dead char has not been not found */
     if (wchDead)
     {
         /* Treat both characters normally */
@@ -467,7 +467,7 @@ IntToUnicodeEx(UINT wVirtKey,
         bDead = FALSE;
     }
 
-    /* add character to the buffer */
+    /* Add character to the buffer */
     if (cchBuff > iRet)
         pwszBuff[iRet++] = wchTranslatedChar;
 
@@ -861,7 +861,7 @@ ProcessKeyEvent(WORD wVk, WORD wScanCode, DWORD dwFlags, BOOL bInjected, DWORD d
     {
         /* Init message */
         Msg.hwnd = pFocusQueue->FocusWindow;
-        Msg.wParam = wFixedVk & 0xFF; /* Note: it's simplified by msg queue */
+        Msg.wParam = wFixedVk & 0xFF; /* Note: It's simplified by msg queue */
         Msg.lParam = MAKELPARAM(1, wScanCode);
         Msg.time = dwTime;
         Msg.pt = gpsi->ptCursor;
@@ -877,10 +877,10 @@ ProcessKeyEvent(WORD wVk, WORD wScanCode, DWORD dwFlags, BOOL bInjected, DWORD d
                 Msg.lParam |= KF_REPEAT << 16;
             if (!bIsDown)
                 Msg.lParam |= KF_UP << 16;
-            /* FIXME: set KF_DLGMODE and KF_MENUMODE when needed */     
+            /* FIXME: Set KF_DLGMODE and KF_MENUMODE when needed */     
             if (pFocusQueue->QF_flags & QF_DIALOGACTIVE)        
                 Msg.lParam |= KF_DLGMODE << 16;
-            if (pFocusQueue->MenuOwner)//pFocusQueue->MenuState) // MenuState needs a start flag...
+            if (pFocusQueue->MenuOwner) // pFocusQueue->MenuState) // MenuState needs a start flag...
                 Msg.lParam |= KF_MENUMODE << 16;
         }
 
@@ -1008,7 +1008,7 @@ UserProcessKeyboardInput(
     pKbdTbl = pKl->spkf->pKbdTbl;
 
     /* Convert scan code to virtual key.
-       Note: we could call UserSendKeyboardInput using scan code,
+       Note: We could call UserSendKeyboardInput using scan code,
              but it wouldn't interpret E1 key(s) properly */
     wVk = IntVscToVk(wScanCode, pKbdTbl);
     TRACE("UserProcessKeyboardInput: %x (break: %u) -> %x\n",
@@ -1179,7 +1179,7 @@ IntMapVirtualKeyEx(UINT uCode, UINT Type, PKBDTABLES pKbdTbl)
         case MAPVK_VK_TO_VSC:
             uCode = IntFixVk(uCode, FALSE);
             uRet = IntVkToVsc(uCode, pKbdTbl);
-            if (uRet > 0xFF) // fail for scancodes with prefix (e0, e1)
+            if (uRet > 0xFF) // Fail for scancodes with prefix (e0, e1)
                 uRet = 0;
             break;
 
@@ -1308,7 +1308,7 @@ NtUserToUnicodeEx(
     }
     RtlZeroMemory(pwszBuff, sizeof(WCHAR) * cchBuff);
 
-    UserEnterExclusive(); // Note: we modify wchDead static variable
+    UserEnterExclusive(); // Note: We modify wchDead static variable
 
     if (dwhkl)
         pKl = UserHklToKbl(dwhkl);
@@ -1370,7 +1370,7 @@ NtUserGetKeyNameText(LONG lParam, LPWSTR lpString, int cchSize)
     /* "Do not care" flag */
     if(lParam & LP_DO_NOT_CARE_BIT)
     {
-        /* Note: we could do vsc -> vk -> vsc conversion, instead of using
+        /* Note: We could do vsc -> vk -> vsc conversion, instead of using
                  hardcoded scan codes, but it's not what Windows does */
         if (wScanCode == SCANCODE_RSHIFT && !bExtKey)
             wScanCode = SCANCODE_LSHIFT;
@@ -1409,7 +1409,7 @@ NtUserGetKeyNameText(LONG lParam, LPWSTR lpString, int cchSize)
     {
         cchKeyName = wcslen(pKeyName);
         if (cchKeyName > cchSize - 1)
-            cchKeyName = cchSize - 1; // don't count '\0'
+            cchKeyName = cchSize - 1; // Don't count '\0'
 
         _SEH2_TRY
         {
index 0cf4f58..7cd1d3c 100644 (file)
@@ -11,7 +11,7 @@ DBG_DEFAULT_CHANNEL(UserMenu);
 
 /* INTERNAL ******************************************************************/
 
-/* maximum number of menu items a menu can contain */
+/* Maximum number of menu items a menu can contain */
 #define MAX_MENU_ITEMS (0x4000)
 #define MAX_GOINTOSUBMENU (0x10)
 
@@ -208,8 +208,8 @@ IntDestroyMenuObject(PMENU_OBJECT Menu,
       PWINSTATION_OBJECT WindowStation;
       NTSTATUS Status;
 
-      /* remove all menu items */
-      IntDeleteMenuItems(Menu, bRecurse); /* do not destroy submenus */
+      /* Remove all menu items */
+      IntDeleteMenuItems(Menu, bRecurse); /* Do not destroy submenus */
 
       if(RemoveFromProcess)
       {
@@ -260,14 +260,14 @@ IntCreateMenu(PHANDLE Handle, BOOL IsMenuBar)
    }
 
    Menu->Process = PsGetCurrentProcess();
-   Menu->RtoL = FALSE; /* default */
-   Menu->MenuInfo.cbSize = sizeof(MENUINFO); /* not used */
-   Menu->MenuInfo.fMask = 0; /* not used */
+   Menu->RtoL = FALSE; /* Default */
+   Menu->MenuInfo.cbSize = sizeof(MENUINFO); /* Not used */
+   Menu->MenuInfo.fMask = 0; /* Not used */
    Menu->MenuInfo.dwStyle = 0; /* FIXME */
-   Menu->MenuInfo.cyMax = 0; /* default */
-   Menu->MenuInfo.hbrBack = NULL; /* no brush */
-   Menu->MenuInfo.dwContextHelpID = 0; /* default */
-   Menu->MenuInfo.dwMenuData = 0; /* default */
+   Menu->MenuInfo.cyMax = 0; /* Default */
+   Menu->MenuInfo.hbrBack = NULL; /* No brush */
+   Menu->MenuInfo.dwContextHelpID = 0; /* Default */
+   Menu->MenuInfo.dwMenuData = 0; /* Default */
    Menu->MenuInfo.Self = *Handle;
    Menu->MenuInfo.FocusedItem = NO_SELECTED_ITEM;
    Menu->MenuInfo.Flags = (IsMenuBar ? 0 : MF_POPUP);
@@ -369,7 +369,7 @@ IntCloneMenu(PMENU_OBJECT Source)
 
    Menu->Process = PsGetCurrentProcess();
    Menu->RtoL = Source->RtoL;
-   Menu->MenuInfo.cbSize = sizeof(MENUINFO); /* not used */
+   Menu->MenuInfo.cbSize = sizeof(MENUINFO); /* Not used */
    Menu->MenuInfo.fMask = Source->MenuInfo.fMask;
    Menu->MenuInfo.dwStyle = Source->MenuInfo.dwStyle;
    Menu->MenuInfo.cyMax = Source->MenuInfo.cyMax;
@@ -568,12 +568,12 @@ IntInsertMenuItemToList(PMENU_OBJECT Menu, PMENU_ITEM MenuItem, int pos)
 
    if(LastItem)
    {
-      /* insert the item after LastItem */
+      /* Insert the item after LastItem */
       LastItem->Next = MenuItem;
    }
    else
    {
-      /* insert at the beginning */
+      /* Insert at the beginning */
       Menu->MenuItemList = MenuItem;
    }
    MenuItem->Next = CurItem;
@@ -668,7 +668,7 @@ IntSetMenuItemInfo(PMENU_OBJECT MenuObject, PMENU_ITEM MenuItem, PROSMENUITEMINF
       if (lpmii->fMask & ( MIIM_STRING | MIIM_FTYPE | MIIM_BITMAP))
       {
          ERR("IntSetMenuItemInfo: Invalid combination of fMask bits used\n");
-         /* this does not happen on Win9x/ME */
+         /* This does not happen on Win9x/ME */
          SetLastNtError( ERROR_INVALID_PARAMETER);
          return FALSE;
       }
@@ -722,11 +722,11 @@ IntSetMenuItemInfo(PMENU_OBJECT MenuObject, PMENU_ITEM MenuItem, PROSMENUITEMINF
    }
    if(lpmii->fMask & MIIM_STATE)
    {
-      /* remove MFS_DEFAULT flag from all other menu items if this item
+      /* Remove MFS_DEFAULT flag from all other menu items if this item
          has the MFS_DEFAULT state */
       if(lpmii->fState & MFS_DEFAULT)
          UserSetMenuDefaultItem(MenuObject, -1, 0);
-      /* update the menu item state flags */
+      /* Update the menu item state flags */
       UpdateMenuItemState(MenuItem->fState, lpmii->fState);
    }
 
@@ -829,7 +829,7 @@ IntInsertMenuItem(PMENU_OBJECT MenuObject, UINT uItem, BOOL fByPosition,
    }
    if (SubMenu == NULL)
    {
-       /* default to last position of menu */
+       /* Default to last position of menu */
       SubMenu = MenuObject;
       pos = MenuObject->MenuInfo.MenuItemCount;
    }
@@ -965,7 +965,7 @@ IntBuildMenuItemList(PMENU_OBJECT MenuObject, PVOID Buffer, ULONG nMax)
          if (0 != CurItem->Text.Length
                && (nMax >= CurItem->Text.Length + sizeof(WCHAR)))
          {
-            /* copy string */
+            /* Copy string */
             Status = MmCopyToCaller(StrOut, CurItem->Text.Buffer,
                                     CurItem->Text.Length);
             if (! NT_SUCCESS(Status))
@@ -1049,7 +1049,7 @@ IntHiliteMenuItem(PWND WindowObject, PMENU_OBJECT MenuObject,
       MenuItem->fState &= ~MF_HILITE;
    }
 
-   /* FIXME - update the window's menu */
+   /* FIXME: Update the window's menu */
 
    return TRUE;
 }
@@ -1161,12 +1161,12 @@ VOID FASTCALL
 co_IntInitTracking(PWND Window, PMENU_OBJECT Menu, BOOL Popup,
                    UINT Flags)
 {
-   /* FIXME - hide caret */
+   /* FIXME: Hide caret */
 
    if(!(Flags & TPM_NONOTIFY))
       co_IntSendMessage(Window->head.h, WM_SETCURSOR, (WPARAM)Window->head.h, HTCAPTION);
 
-   /* FIXME - send WM_SETCURSOR message */
+   /* FIXME: Send WM_SETCURSOR message */
 
    if(!(Flags & TPM_NONOTIFY))
       co_IntSendMessage(Window->head.h, WM_INITMENU, (WPARAM)Menu->MenuInfo.Self, 0);
@@ -1179,7 +1179,7 @@ co_IntExitTracking(PWND Window, PMENU_OBJECT Menu, BOOL Popup,
    if(!(Flags & TPM_NONOTIFY))
       co_IntSendMessage(Window->head.h, WM_EXITMENULOOP, 0 /* FIXME */, 0);
 
-   /* FIXME - Show caret again */
+   /* FIXME: Show caret again */
 }
 
 INT FASTCALL
@@ -1254,23 +1254,23 @@ intGetTitleBarInfo(PWND pWindowObject, PTITLEBARINFO bti)
         bti->rcTitleBar.right  = pWindowObject->rcWindow.right - pWindowObject->rcWindow.left;
         bti->rcTitleBar.bottom = pWindowObject->rcWindow.bottom - pWindowObject->rcWindow.top;
 
-        /* is it iconiced ? */ 
+        /* Is it iconiced ? */ 
         if ((dwStyle & WS_ICONIC)!=WS_ICONIC)
         {
             /* Remove frame from rectangle */
             if (HAS_THICKFRAME( dwStyle, dwExStyle ))
             {
-                /* FIXME : Note this value should exists in pWindowObject for UserGetSystemMetrics(SM_CXFRAME) and UserGetSystemMetrics(SM_CYFRAME) */
+                /* FIXME: Note this value should exists in pWindowObject for UserGetSystemMetrics(SM_CXFRAME) and UserGetSystemMetrics(SM_CYFRAME) */
                 RECTL_vInflateRect( &bti->rcTitleBar, -UserGetSystemMetrics(SM_CXFRAME), -UserGetSystemMetrics(SM_CYFRAME) );
             }
             else if (HAS_DLGFRAME( dwStyle, dwExStyle ))
             {
-                /* FIXME : Note this value should exists in pWindowObject for UserGetSystemMetrics(SM_CXDLGFRAME) and UserGetSystemMetrics(SM_CYDLGFRAME) */
+                /* FIXME: Note this value should exists in pWindowObject for UserGetSystemMetrics(SM_CXDLGFRAME) and UserGetSystemMetrics(SM_CYDLGFRAME) */
                 RECTL_vInflateRect( &bti->rcTitleBar, -UserGetSystemMetrics(SM_CXDLGFRAME), -UserGetSystemMetrics(SM_CYDLGFRAME));
             }
             else if (HAS_THINFRAME( dwStyle, dwExStyle))
             {
-                /* FIXME : Note this value should exists in pWindowObject for UserGetSystemMetrics(SM_CXBORDER) and UserGetSystemMetrics(SM_CYBORDER) */
+                /* FIXME: Note this value should exists in pWindowObject for UserGetSystemMetrics(SM_CXBORDER) and UserGetSystemMetrics(SM_CYBORDER) */
                 RECTL_vInflateRect( &bti->rcTitleBar, -UserGetSystemMetrics(SM_CXBORDER), -UserGetSystemMetrics(SM_CYBORDER) );
             }
 
@@ -1281,13 +1281,13 @@ intGetTitleBarInfo(PWND pWindowObject, PTITLEBARINFO bti)
             {
                 if (dwExStyle & WS_EX_CLIENTEDGE)
                 {
-                    /* FIXME : Note this value should exists in pWindowObject for UserGetSystemMetrics(SM_CXEDGE) and UserGetSystemMetrics(SM_CYEDGE) */
+                    /* FIXME: Note this value should exists in pWindowObject for UserGetSystemMetrics(SM_CXEDGE) and UserGetSystemMetrics(SM_CYEDGE) */
                     RECTL_vInflateRect (&bti->rcTitleBar, -UserGetSystemMetrics(SM_CXEDGE), -UserGetSystemMetrics(SM_CYEDGE));
                 }
 
                 if (dwExStyle & WS_EX_STATICEDGE)
                 {
-                    /* FIXME : Note this value should exists in pWindowObject for UserGetSystemMetrics(SM_CXBORDER) and UserGetSystemMetrics(SM_CYBORDER) */
+                    /* FIXME: Note this value should exists in pWindowObject for UserGetSystemMetrics(SM_CXBORDER) and UserGetSystemMetrics(SM_CYBORDER) */
                     RECTL_vInflateRect (&bti->rcTitleBar, -UserGetSystemMetrics(SM_CXBORDER), -UserGetSystemMetrics(SM_CYBORDER));
                 }
             }
@@ -1300,12 +1300,12 @@ intGetTitleBarInfo(PWND pWindowObject, PTITLEBARINFO bti)
         bti->rcTitleBar.bottom = bti->rcTitleBar.top;
         if (dwExStyle & WS_EX_TOOLWINDOW)
         {
-            /* FIXME : Note this value should exists in pWindowObject for UserGetSystemMetrics(SM_CYSMCAPTION) */
+            /* FIXME: Note this value should exists in pWindowObject for UserGetSystemMetrics(SM_CYSMCAPTION) */
             bti->rcTitleBar.bottom += UserGetSystemMetrics(SM_CYSMCAPTION);
         }
         else 
         {
-            /* FIXME : Note this value should exists in pWindowObject for UserGetSystemMetrics(SM_CYCAPTION) and UserGetSystemMetrics(SM_CXSIZE) */
+            /* FIXME: Note this value should exists in pWindowObject for UserGetSystemMetrics(SM_CYCAPTION) and UserGetSystemMetrics(SM_CXSIZE) */
             bti->rcTitleBar.bottom += UserGetSystemMetrics(SM_CYCAPTION);
             bti->rcTitleBar.left += UserGetSystemMetrics(SM_CXSIZE);
         }
index c7de8d8..d696bfd 100644 (file)
@@ -1,10 +1,10 @@
 /*
-* COPYRIGHT:        See COPYING in the top level directory
-* PROJECT:          ReactOS kernel
-* PURPOSE:          Messages
-* FILE:             subsystems/win32/win32k/ntuser/message.c
-* PROGRAMER:        Casper S. Hornstrup (chorns@users.sourceforge.net)
-*/
+ * COPYRIGHT:        See COPYING in the top level directory
+ * PROJECT:          ReactOS Win32k subsystem
+ * PURPOSE:          Messages
+ * FILE:             subsystems/win32/win32k/ntuser/message.c
+ * PROGRAMER:        Casper S. Hornstrup (chorns@users.sourceforge.net)
+ */
 
 #include <win32k.h>
 DBG_DEFAULT_CHANNEL(UserMsg);
@@ -764,7 +764,7 @@ co_IntPeekMessage( PMSG Msg,
         if (ProcessMask & QS_POSTMESSAGE)
         {
            pti->pcti->fsChangeBits &= ~(QS_POSTMESSAGE | QS_HOTKEY | QS_TIMER);
-           if (MsgFilterMin == 0 && MsgFilterMax == 0) // wine hack does this; ~0U)
+           if (MsgFilterMin == 0 && MsgFilterMax == 0) // Wine hack does this; ~0U)
            {
               pti->pcti->fsChangeBits &= ~QS_ALLPOSTMESSAGE;
            }
@@ -1023,7 +1023,7 @@ co_IntGetPeekMessage( PMSG pMsg,
     {
        // Clear the spin cycle to fix the mix.
        pti->pClientInfo->cSpins = 0;
-       //if (!(pti->TIF_flags & TIF_SPINNING)) FIXME need to swap vinyl..
+       //if (!(pti->TIF_flags & TIF_SPINNING)) // FIXME: Need to swap vinyl...
     }
     return Present;
 }
@@ -1179,7 +1179,7 @@ UserPostMessage( HWND Wnd,
         if ( Window->state & WNDS_DESTROYED )
         {
             ERR("Attempted to post message to window 0x%x that is being destroyed!\n", Wnd);
-            /* FIXME - last error code? */
+            /* FIXME: Last error code? */
             return FALSE;
         }
 
@@ -1312,14 +1312,14 @@ co_IntSendMessageTimeoutSingle( HWND hWnd,
 
     if (uFlags & SMTO_ABORTIFHUNG && MsqIsHung(Window->head.pti->MessageQueue))
     {
-        // FIXME - Set window hung and add to a list.
-        /* FIXME - Set a LastError? */
+        // FIXME: Set window hung and add to a list.
+        /* FIXME: Set a LastError? */
         RETURN( FALSE);
     }
 
     if (Window->state & WNDS_DESTROYED)
     {
-        /* FIXME - last error? */
+        /* FIXME: Last error? */
         ERR("Attempted to send message to window 0x%x that is being destroyed!\n", hWnd);
         RETURN( FALSE);
     }
@@ -1338,18 +1338,18 @@ co_IntSendMessageTimeoutSingle( HWND hWnd,
     }
     while ((STATUS_TIMEOUT == Status) &&
            (uFlags & SMTO_NOTIMEOUTIFNOTHUNG) &&
-           !MsqIsHung(Window->head.pti->MessageQueue)); // FIXME - Set window hung and add to a list.
+           !MsqIsHung(Window->head.pti->MessageQueue)); // FIXME: Set window hung and add to a list.
 
     if (STATUS_TIMEOUT == Status)
     {
 /*
   MSDN says:
   Microsoft Windows 2000: If GetLastError returns zero, then the function
   timed out.
   XP+ : If the function fails or times out, the return value is zero.
   To get extended error information, call GetLastError. If GetLastError
   returns ERROR_TIMEOUT, then the function timed out.
-*/
*  MSDN says:
*  Microsoft Windows 2000: If GetLastError returns zero, then the function
*  timed out.
*  XP+ : If the function fails or times out, the return value is zero.
*  To get extended error information, call GetLastError. If GetLastError
*  returns ERROR_TIMEOUT, then the function timed out.
+ */
         EngSetLastError(ERROR_TIMEOUT);
         RETURN( FALSE);
     }
@@ -1486,7 +1486,7 @@ co_IntSendMessageWithCallBack( HWND hWnd,
 
     if (Window->state & WNDS_DESTROYED)
     {
-        /* FIXME - last error? */
+        /* FIXME: last error? */
         ERR("Attempted to send message to window 0x%x that is being destroyed!\n", hWnd);
         RETURN(FALSE);
     }
@@ -1746,7 +1746,7 @@ UserSendNotifyMessage( HWND hWnd,
     }
 
     // Basicly the same as IntPostOrSendMessage
-    if (hWnd == HWND_BROADCAST) //Handle Broadcast
+    if (hWnd == HWND_BROADCAST) // Handle Broadcast
     {
         HWND *List;
         PWND DesktopWindow;
index e64217a..5199668 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * COPYRIGHT:        See COPYING in the top level directory
- * PROJECT:          ReactOS kernel
+ * PROJECT:          ReactOS Win32k subsystem
  * PURPOSE:          Window classes
- * FILE:             subsys/win32k/ntuser/metric.c
+ * FILE:             subsystems/win32/win32k/ntuser/metric.c
  * PROGRAMER:        Casper S. Hornstrup (chorns@users.sourceforge.net)
  *                   Timo Kreuzer (timo.kreuzer@reactos.org)
  */
@@ -21,12 +21,12 @@ InitMetrics(VOID)
     INT *piSysMet = gpsi->aiSysMet;
     ULONG Width, Height;
 
-    /* note: used for the SM_CLEANBOOT metric */
+    /* Note: used for the SM_CLEANBOOT metric */
     DWORD dwValue = 0;
     HKEY hKey = 0;
 
     /* Clean boot */
-    piSysMet[SM_CLEANBOOT] = 0; // fallback value of 0 (normal mode)
+    piSysMet[SM_CLEANBOOT] = 0; // Fallback value of 0 (normal mode)
     if(NT_SUCCESS(RegOpenKey(L"\\REGISTRY\\MACHINE\\SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Option", &hKey)))
     {
         if(RegReadDWORD(hKey, L"OptionValue", &dwValue)) piSysMet[SM_CLEANBOOT] = (INT)dwValue;
@@ -54,14 +54,14 @@ InitMetrics(VOID)
     piSysMet[SM_CYVIRTUALSCREEN] = Height;
 
     /* NC area sizes */
-    piSysMet[SM_CYCAPTION] = gspv.ncm.iCaptionHeight + 1; // 19
-    piSysMet[SM_CYSMCAPTION] = gspv.ncm.iSmCaptionHeight + 1; // 15;
-    piSysMet[SM_CXSIZE] = gspv.ncm.iCaptionHeight; // 18;
-    piSysMet[SM_CYSIZE] = gspv.ncm.iCaptionHeight; // 18;
-    piSysMet[SM_CXSMSIZE] = gspv.ncm.iSmCaptionWidth; // 12; xp: piSysMet(SM_CYSMCAPTION) - 1
-    piSysMet[SM_CYSMSIZE] = gspv.ncm.iSmCaptionHeight; // 14;
-    piSysMet[SM_CXBORDER] = 1; // seems to be hardcoded
-    piSysMet[SM_CYBORDER] = 1; // seems to be hardcoded
+    piSysMet[SM_CYCAPTION] = gspv.ncm.iCaptionHeight + 1;       // 19
+    piSysMet[SM_CYSMCAPTION] = gspv.ncm.iSmCaptionHeight + 1;   // 15;
+    piSysMet[SM_CXSIZE] = gspv.ncm.iCaptionHeight;              // 18;
+    piSysMet[SM_CYSIZE] = gspv.ncm.iCaptionHeight;              // 18;
+    piSysMet[SM_CXSMSIZE] = gspv.ncm.iSmCaptionWidth;   // 12; XP: piSysMet(SM_CYSMCAPTION) - 1
+    piSysMet[SM_CYSMSIZE] = gspv.ncm.iSmCaptionHeight;  // 14;
+    piSysMet[SM_CXBORDER] = 1; // Seems to be hardcoded
+    piSysMet[SM_CYBORDER] = 1; // Seems to be hardcoded
     piSysMet[SM_CXFOCUSBORDER] = 1;
     piSysMet[SM_CYFOCUSBORDER] = 1;
     piSysMet[SM_CXDLGFRAME] = 3;
@@ -82,7 +82,7 @@ InitMetrics(VOID)
                          + piSysMet[SM_CYSIZE] + 4
                          + 4 * gspv.tmCaptionFont.tmAveCharWidth
                          + 2 * piSysMet[SM_CXFRAME];
-    piSysMet[SM_CYMIN] = piSysMet[SM_CYCAPTION] + 2 * piSysMet[SM_CYFRAME];// 27
+    piSysMet[SM_CYMIN] = piSysMet[SM_CYCAPTION] + 2 * piSysMet[SM_CYFRAME]; // 27
     piSysMet[SM_CXMAXIMIZED] = piSysMet[SM_CXSCREEN] + 2 * piSysMet[SM_CXFRAME];
     piSysMet[SM_CYMAXIMIZED] = piSysMet[SM_CYSCREEN] - 20;
     piSysMet[SM_CXFULLSCREEN] = piSysMet[SM_CXSCREEN];
@@ -98,34 +98,34 @@ InitMetrics(VOID)
                               + 2 * piSysMet[SM_CYFRAME];
 
     /* Icon */
-    piSysMet[SM_CXVSCROLL] = gspv.ncm.iScrollWidth; //16;
-    piSysMet[SM_CYVTHUMB] = gspv.ncm.iScrollHeight; //16;
-    piSysMet[SM_CYHSCROLL] = gspv.ncm.iScrollWidth; //16;
-    piSysMet[SM_CXHTHUMB] = gspv.ncm.iScrollHeight; //16;
-    piSysMet[SM_CYVSCROLL] = gspv.ncm.iScrollHeight; // 16
-    piSysMet[SM_CXHSCROLL] = gspv.ncm.iScrollHeight; // 16;
+    piSysMet[SM_CXVSCROLL] = gspv.ncm.iScrollWidth;     // 16;
+    piSysMet[SM_CYVTHUMB] = gspv.ncm.iScrollHeight;     // 16;
+    piSysMet[SM_CYHSCROLL] = gspv.ncm.iScrollWidth;     // 16;
+    piSysMet[SM_CXHTHUMB] = gspv.ncm.iScrollHeight;     // 16;
+    piSysMet[SM_CYVSCROLL] = gspv.ncm.iScrollHeight;    // 16
+    piSysMet[SM_CXHSCROLL] = gspv.ncm.iScrollHeight;    // 16;
     piSysMet[SM_CXICON] = 32;
     piSysMet[SM_CYICON] = 32;
     piSysMet[SM_CXSMICON] = 16;
     piSysMet[SM_CYSMICON] = 16;
-    piSysMet[SM_CXICONSPACING] = gspv.im.iHorzSpacing;// 64;
-    piSysMet[SM_CYICONSPACING] = gspv.im.iVertSpacing; // 64;
+    piSysMet[SM_CXICONSPACING] = gspv.im.iHorzSpacing;  // 64;
+    piSysMet[SM_CYICONSPACING] = gspv.im.iVertSpacing;  // 64;
     piSysMet[SM_CXCURSOR] = 32;
     piSysMet[SM_CYCURSOR] = 32;
-    piSysMet[SM_CXMINTRACK] = piSysMet[SM_CXMIN]; // 117
-    piSysMet[SM_CYMINTRACK] = piSysMet[SM_CYMIN]; // 27
+    piSysMet[SM_CXMINTRACK] = piSysMet[SM_CXMIN];       // 117
+    piSysMet[SM_CYMINTRACK] = piSysMet[SM_CYMIN];       // 27
     piSysMet[SM_CXDRAG] = 4;
     piSysMet[SM_CYDRAG] = 4;
-    piSysMet[SM_ARRANGE] = gspv.mm.iArrange; // 8;
+    piSysMet[SM_ARRANGE] = gspv.mm.iArrange;            // 8;
 
     /* Menu */
-    piSysMet[SM_CYMENU] = gspv.ncm.iMenuHeight + 1;//19;
+    piSysMet[SM_CYMENU] = gspv.ncm.iMenuHeight + 1;     // 19;
     piSysMet[SM_MENUDROPALIGNMENT] = gspv.bMenuDropAlign;
     piSysMet[SM_CXMENUCHECK] = ((1 + gspv.tmMenuFont.tmHeight +
                                  gspv.tmMenuFont.tmExternalLeading) & ~1) - 1; // 13;
     piSysMet[SM_CYMENUCHECK] = piSysMet[SM_CXMENUCHECK];
-    piSysMet[SM_CXMENUSIZE] = gspv.ncm.iMenuWidth; //18;
-    piSysMet[SM_CYMENUSIZE] = gspv.ncm.iMenuHeight; //18;
+    piSysMet[SM_CXMENUSIZE] = gspv.ncm.iMenuWidth;      // 18;
+    piSysMet[SM_CYMENUSIZE] = gspv.ncm.iMenuHeight;     // 18;
 
     /* Mouse */
     piSysMet[SM_MOUSEPRESENT] = 1;
index 4542a26..bd5caf8 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * COPYRIGHT:        See COPYING in the top level directory
- * PROJECT:          ReactOS kernel
- * PURPOSE:          Misc User funcs
+ * PROJECT:          ReactOS Win32k subsystem
+ * PURPOSE:          Miscellaneous User functions
  * FILE:             subsystems/win32/win32k/ntuser/misc.c
  * PROGRAMER:        Ge van Geldorp (ge@gse.nl)
  */
@@ -167,7 +167,7 @@ NtUserGetThreadState(
          ret = (DWORD_PTR)IntGetThreadFocusWindow();
          break;
       case THREADSTATE_CAPTUREWINDOW:
-         /* FIXME should use UserEnterShared */
+         /* FIXME: Should use UserEnterShared */
          ret = (DWORD_PTR)IntGetCapture();
          break;
       case THREADSTATE_PROGMANWINDOW:
@@ -197,7 +197,7 @@ NtUserGetThreadState(
                 else
                    ret = ISMEX_NOTIFY;
              }
-             /* if ReplyMessage */
+             /* If ReplyMessage */
              if (Message->QS_Flags & QS_SMRESULT) ret |= ISMEX_REPLIED;
            }
 
@@ -276,7 +276,7 @@ NtUserGetDoubleClickTime(VOID)
 BOOL
 APIENTRY
 NtUserGetGUIThreadInfo(
-   DWORD idThread, /* if NULL use foreground thread */
+   DWORD idThread, /* If NULL use foreground thread */
    LPGUITHREADINFO lpgui)
 {
    NTSTATUS Status;
@@ -317,7 +317,7 @@ NtUserGetGUIThreadInfo(
       Desktop = W32Thread->rpdesk;
    }
    else
-   {  /* get the foreground thread */
+   {  /* Get the foreground thread */
       Thread = PsGetCurrentThread();
       W32Thread = (PTHREADINFO)Thread->Tcb.Win32Thread;
       Desktop = W32Thread->rpdesk;
@@ -348,7 +348,7 @@ NtUserGetGUIThreadInfo(
    if (MsgQueue->MoveSize)
       SafeGui.flags |= GUI_INMOVESIZE;
 
-   /* FIXME add flag GUI_16BITTASK */
+   /* FIXME: Add flag GUI_16BITTASK */
 
    SafeGui.hwndActive = MsgQueue->ActiveWindow;
    SafeGui.hwndFocus = MsgQueue->FocusWindow;
@@ -488,7 +488,7 @@ IntSafeCopyUnicodeString(PUNICODE_STRING Dest,
       return STATUS_SUCCESS;
    }
 
-   /* string is empty */
+   /* String is empty */
    return STATUS_SUCCESS;
 }
 
@@ -531,14 +531,14 @@ IntSafeCopyUnicodeStringTerminateNULL(PUNICODE_STRING Dest,
          return Status;
       }
 
-      /* make sure the string is null-terminated */
+      /* Make sure the string is null-terminated */
       Src = (PWSTR)((PBYTE)Dest->Buffer + Dest->Length);
       *Src = L'\0';
 
       return STATUS_SUCCESS;
    }
 
-   /* string is empty */
+   /* String is empty */
    return STATUS_SUCCESS;
 }
 
@@ -558,10 +558,10 @@ GetW32ThreadInfo(VOID)
 
     if (pti == NULL)
     {
-        /* FIXME - temporary hack for system threads... */
+        /* FIXME: Temporary hack for system threads... */
         return NULL;
     }
-    /* initialize it */
+    /* Initialize it */
     pti->ppi = ppi = GetW32ProcessInfo();
 
     if (pti->rpdesk != NULL)
@@ -572,7 +572,7 @@ GetW32ThreadInfo(VOID)
     {
        pti->pDeskInfo = NULL;
     }
-    /* update the TEB */
+    /* Update the TEB */
     Teb = NtCurrentTeb();
     pci = GetWin32ClientInfo();
     pti->pClientInfo = pci;
@@ -613,5 +613,4 @@ GetW32ThreadInfo(VOID)
     return pti;
 }
 
-
 /* EOF */
index cb62323..fcf835d 100644 (file)
@@ -138,7 +138,7 @@ IntAttachMonitor(IN PDEVOBJ *pGdiDevice,
 
     TRACE("Attaching monitor...\n");
 
-    /* create new monitor object */
+    /* Create new monitor object */
     pMonitor = IntCreateMonitorObject();
     if (pMonitor == NULL)
     {
@@ -565,10 +565,10 @@ NtUserEnumDisplayMonitors(
             return 0;
         if (iRgnType == COMPLEXREGION)
         {
-            /* TODO: warning */
+            /* TODO: Warning */
         }
 
-        /* if hdc and pRect are given the area of interest is pRect with
+        /* If hdc and pRect are given the area of interest is pRect with
            coordinate origin at the DC position */
         if (pUnsafeRect != NULL)
         {
@@ -577,7 +577,7 @@ NtUserEnumDisplayMonitors(
             rc.top += DcRect.top;
             rc.bottom += DcRect.top;
         }
-        /* if hdc is given and pRect is not the area of interest is the
+        /* If hdc is given and pRect is not the area of interest is the
            bounding rect of hdc */
         else
         {
index 7d860f7..a6425e9 100644 (file)
@@ -77,7 +77,7 @@ UserProcessMouseInput(PMOUSE_INPUT_DATA mid)
     if (mid->ButtonFlags & MOUSE_RIGHT_BUTTON_UP)
         mi.dwFlags |= MOUSEEVENTF_RIGHTUP;
 
-    /* Note: next buttons use mouseData field so they cannot be sent in one call */
+    /* Note: Next buttons use mouseData field so they cannot be sent in one call */
 
     /* Button 4 */
     if (mid->ButtonFlags & MOUSE_BUTTON_4_DOWN)
index d2a87fd..b0c9713 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * COPYRIGHT:        See COPYING in the top level directory
- * PROJECT:          ReactOS kernel
+ * PROJECT:          ReactOS Win32k subsystem
  * PURPOSE:          Message queues
  * FILE:             subsystems/win32/win32k/ntuser/msgqueue.c
  * PROGRAMER:        Casper S. Hornstrup (chorns@users.sourceforge.net)
@@ -1005,7 +1005,7 @@ co_MsqSendMessage(PUSER_MESSAGE_QUEUE MessageQueue,
 
    Timeout.QuadPart = (LONGLONG) uTimeout * (LONGLONG) -10000;
 
-   /* FIXME - increase reference counter of sender's message queue here */
+   /* FIXME: Increase reference counter of sender's message queue here */
 
    Message->Msg.hwnd = Wnd;
    Message->Msg.message = Msg;
@@ -1025,22 +1025,22 @@ co_MsqSendMessage(PUSER_MESSAGE_QUEUE MessageQueue,
 
    IntReferenceMessageQueue(MessageQueue);
 
-   /* add it to the list of pending messages */
+   /* Add it to the list of pending messages */
    InsertTailList(&ThreadQueue->DispatchingMessagesHead, &Message->DispatchingListEntry);
 
-   /* queue it in the destination's message queue */
+   /* Queue it in the destination's message queue */
    InsertTailList(&MessageQueue->SentMessagesListHead, &Message->ListEntry);
 
    Message->QS_Flags = QS_SENDMESSAGE;
    MsqWakeQueue(MessageQueue, QS_SENDMESSAGE, TRUE);
 
-   /* we can't access the Message anymore since it could have already been deleted! */
+   /* We can't access the Message anymore since it could have already been deleted! */
 
    if(Block)
    {
       UserLeaveCo();
 
-      /* don't process messages sent to the thread */
+      /* Don't process messages sent to the thread */
       WaitStatus = KeWaitForSingleObject(&CompletionEvent, UserRequest, UserMode,
                                          FALSE, (uTimeout ? &Timeout : NULL));
 
@@ -1048,7 +1048,7 @@ co_MsqSendMessage(PUSER_MESSAGE_QUEUE MessageQueue,
 
       if(WaitStatus == STATUS_TIMEOUT)
       {
-         /* look up if the message has not yet dispatched, if so
+         /* Look up if the message has not yet dispatched, if so
             make sure it can't pass a result and it must not set the completion event anymore */
          Entry = MessageQueue->SentMessagesListHead.Flink;
          while (Entry != &MessageQueue->SentMessagesListHead)
@@ -1056,7 +1056,7 @@ co_MsqSendMessage(PUSER_MESSAGE_QUEUE MessageQueue,
             if ((PUSER_SENT_MESSAGE) CONTAINING_RECORD(Entry, USER_SENT_MESSAGE, ListEntry)
                   == Message)
             {
-               /* we can access Message here, it's secure because the message queue is locked
+               /* We can access Message here, it's secure because the message queue is locked
                   and the message is still hasn't been dispatched */
                Message->CompletionEvent = NULL;
                Message->Result = NULL;
@@ -1065,7 +1065,7 @@ co_MsqSendMessage(PUSER_MESSAGE_QUEUE MessageQueue,
             Entry = Entry->Flink;
          }
 
-         /* remove from the local dispatching list so the other thread knows,
+         /* Remove from the local dispatching list so the other thread knows,
             it can't pass a result and it must not set the completion event anymore */
          Entry = ThreadQueue->DispatchingMessagesHead.Flink;
          while (Entry != &ThreadQueue->DispatchingMessagesHead)
@@ -1073,10 +1073,10 @@ co_MsqSendMessage(PUSER_MESSAGE_QUEUE MessageQueue,
             if ((PUSER_SENT_MESSAGE) CONTAINING_RECORD(Entry, USER_SENT_MESSAGE, DispatchingListEntry)
                   == Message)
             {
-               /* we can access Message here, it's secure because the sender's message is locked
+               /* We can access Message here, it's secure because the sender's message is locked
                   and the message has definitely not yet been destroyed, otherwise it would
                   have been removed from this list by the dispatching routine right after
-               dispatching the message */
+                  dispatching the message */
                Message->CompletionEvent = NULL;
                Message->Result = NULL;
                RemoveEntryList(&Message->DispatchingListEntry);
@@ -1108,7 +1108,7 @@ co_MsqSendMessage(PUSER_MESSAGE_QUEUE MessageQueue,
 
          if(WaitStatus == STATUS_TIMEOUT)
          {
-            /* look up if the message has not yet been dispatched, if so
+            /* Look up if the message has not yet been dispatched, if so
                make sure it can't pass a result and it must not set the completion event anymore */
             Entry = MessageQueue->SentMessagesListHead.Flink;
             while (Entry != &MessageQueue->SentMessagesListHead)
@@ -1116,7 +1116,7 @@ co_MsqSendMessage(PUSER_MESSAGE_QUEUE MessageQueue,
                if ((PUSER_SENT_MESSAGE) CONTAINING_RECORD(Entry, USER_SENT_MESSAGE, ListEntry)
                      == Message)
                {
-                  /* we can access Message here, it's secure because the message queue is locked
+                  /* We can access Message here, it's secure because the message queue is locked
                      and the message is still hasn't been dispatched */
                   Message->CompletionEvent = NULL;
                   Message->Result = NULL;
@@ -1125,7 +1125,7 @@ co_MsqSendMessage(PUSER_MESSAGE_QUEUE MessageQueue,
                Entry = Entry->Flink;
             }
 
-            /* remove from the local dispatching list so the other thread knows,
+            /* Remove from the local dispatching list so the other thread knows,
                it can't pass a result and it must not set the completion event anymore */
             Entry = ThreadQueue->DispatchingMessagesHead.Flink;
             while (Entry != &ThreadQueue->DispatchingMessagesHead)
@@ -1133,10 +1133,10 @@ co_MsqSendMessage(PUSER_MESSAGE_QUEUE MessageQueue,
                if ((PUSER_SENT_MESSAGE) CONTAINING_RECORD(Entry, USER_SENT_MESSAGE, DispatchingListEntry)
                      == Message)
                {
-                  /* we can access Message here, it's secure because the sender's message is locked
+                  /* We can access Message here, it's secure because the sender's message is locked
                      and the message has definitely not yet been destroyed, otherwise it would
                      have been removed from this list by the dispatching routine right after
-                  dispatching the message */
+                     dispatching the message */
                   Message->CompletionEvent = NULL;
                   Message->Result = NULL;
                   RemoveEntryList(&Message->DispatchingListEntry);
@@ -1456,14 +1456,14 @@ BOOL co_IntProcessMouseMessage(MSG* msg, BOOL* RemoveMessages, UINT first, UINT
     hook.pt           = msg->pt;
     hook.hwnd         = msg->hwnd;
     hook.wHitTestCode = hittest;
-    hook.dwExtraInfo  = 0/*extra_info*/;
+    hook.dwExtraInfo  = 0 /* extra_info */ ;
     if (co_HOOK_CallHooks( WH_MOUSE, *RemoveMessages ? HC_ACTION : HC_NOREMOVE,
                         message, (LPARAM)&hook ))
     {
         hook.pt           = msg->pt;
         hook.hwnd         = msg->hwnd;
         hook.wHitTestCode = hittest;
-        hook.dwExtraInfo  = 0/*extra_info*/;
+        hook.dwExtraInfo  = 0 /* extra_info */ ;
         co_HOOK_CallHooks( WH_CBT, HCBT_CLICKSKIPPED, message, (LPARAM)&hook );
 
         ERR("WH_MOUSE dorpped mouse message!\n");
index cd91ff6..6b8709e 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * COPYRIGHT:        See COPYING in the top level directory
- * PROJECT:          ReactOS kernel
+ * PROJECT:          ReactOS Win32k subsystem
  * PURPOSE:          Native User stubs
- * FILE:             subsys/win32k/ntuser/stubs.c
+ * FILE:             subsystems/win32/win32k/ntuser/ntstubs.c
  * PROGRAMER:        Casper S. Hornstrup (chorns@users.sourceforge.net)
  */
 
@@ -256,7 +256,7 @@ NtUserInitializeClientPfnArrays(
       RtlCopyMemory(&gpsi->apfnClientW, pfnClientW, sizeof(PFNCLIENT));
       RtlCopyMemory(&gpsi->apfnClientWorker, pfnClientWorker, sizeof(PFNCLIENTWORKER));
 
-      //// FIXME! HAX! Temporary until server side is finished.
+      //// FIXME: HAX! Temporary until server side is finished.
       //// Copy the client side procs for now.
       RtlCopyMemory(&gpsi->aStoCidPfn, pfnClientW, sizeof(gpsi->aStoCidPfn));
 
@@ -982,7 +982,7 @@ NtUserDrawMenuBarTemp(
    HMENU hMenu,
    HFONT hFont)
 {
-   /* we'll use this function just for caching the menu bar */
+   /* We'll use this function just for caching the menu bar */
    STUB
    return 0;
 }
index 47b7921..a464655 100644 (file)
@@ -49,7 +49,7 @@ __inline static PUSER_HANDLE_ENTRY alloc_user_entry(PUSER_HANDLE_TABLE ht)
       return entry;
    }
 
-   if (ht->nb_handles >= ht->allocated_handles)  /* need to grow the array */
+   if (ht->nb_handles >= ht->allocated_handles)  /* Need to grow the array */
    {
 /**/
       int i, iFree = 0, iWindow = 0, iMenu = 0, iCursorIcon = 0,
@@ -103,7 +103,7 @@ __inline static PUSER_HANDLE_ENTRY alloc_user_entry(PUSER_HANDLE_TABLE ht)
       return NULL;
 #if 0
       PUSER_HANDLE_ENTRY new_handles;
-      /* grow array by 50% (but at minimum 32 entries) */
+      /* Grow array by 50% (but at minimum 32 entries) */
       int growth = max( 32, ht->allocated_handles / 2 );
       int new_size = min( ht->allocated_handles + growth, (LAST_USER_HANDLE-FIRST_USER_HANDLE+1) >> 1 );
       if (new_size <= ht->allocated_handles)
@@ -219,7 +219,7 @@ PVOID UserGetObject(PUSER_HANDLE_TABLE ht, HANDLE handle, USER_OBJECT_TYPE type
 }
 
 
-/* get the full handle (32bit) for a possibly truncated (16bit) handle */
+/* Get the full handle (32bit) for a possibly truncated (16bit) handle */
 HANDLE get_user_full_handle(PUSER_HANDLE_TABLE ht,  HANDLE handle )
 {
    PUSER_HANDLE_ENTRY entry;
@@ -232,7 +232,7 @@ HANDLE get_user_full_handle(PUSER_HANDLE_TABLE ht,  HANDLE handle )
 }
 
 
-/* same as get_user_object plus set the handle to the full 32-bit value */
+/* Same as get_user_object plus set the handle to the full 32-bit value */
 void *get_user_object_handle(PUSER_HANDLE_TABLE ht,  HANDLE* handle, USER_OBJECT_TYPE type )
 {
    PUSER_HANDLE_ENTRY entry;
@@ -250,7 +250,7 @@ BOOL FASTCALL UserCreateHandleTable(VOID)
 
    PVOID mem;
 
-   //FIXME: dont alloc all at once! must be mapped into umode also...
+   // FIXME: Don't alloc all at once! Must be mapped into umode also...
    mem = UserHeapAlloc(sizeof(USER_HANDLE_ENTRY) * 1024*2);
    if (!mem)
    {
@@ -266,7 +266,7 @@ BOOL FASTCALL UserCreateHandleTable(VOID)
        return FALSE;
    }
 
-   //FIXME: make auto growable
+   // FIXME: Make auto growable
    UserInitHandleTable(gHandleTable, mem, sizeof(USER_HANDLE_ENTRY) * 1024*2);
 
    return TRUE;
@@ -353,7 +353,7 @@ UserCreateObject( PUSER_HANDLE_TABLE ht,
    }
    /* Now set default headers. */
    ((PHEAD)Object)->h = hi;
-   ((PHEAD)Object)->cLockObj = 2; // we need this, because we create 2 refs: handle and pointer!
+   ((PHEAD)Object)->cLockObj = 2; // We need this, because we create 2 refs: handle and pointer!
 
    if (h)
       *h = hi;
@@ -376,10 +376,10 @@ UserDereferenceObject(PVOID object)
 
      if (!entry)
      {
-        ERR("warning! Dereference Object without ENTRY! Obj -> 0x%x\n", object);
+        ERR("Warning! Dereference Object without ENTRY! Obj -> 0x%x\n", object);
         return FALSE;
      }
-     TRACE("warning! Dereference to zero! Obj -> 0x%x\n", object);
+     TRACE("Warning! Dereference to zero! Obj -> 0x%x\n", object);
 
      ((PHEAD)object)->cLockObj = 0;
 
index dd2b36a..129c930 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  COPYRIGHT:        See COPYING in the top level directory
- *  PROJECT:          ReactOS kernel
+ *  PROJECT:          ReactOS Win32k subsystem
  *  PURPOSE:          Window painting function
  *  FILE:             subsystems/win32/win32k/ntuser/painting.c
  *  PROGRAMER:        Filip Navara (xnavara@volny.cz)
@@ -697,7 +697,7 @@ co_IntFixCaret(PWND Window, RECTL *lprc, UINT flags)
 
    WndCaret = UserGetWindowObject(hWndCaret);
 
-   //fix: check for WndCaret can be null
+   // FIXME: Check for WndCaret can be NULL
    if (WndCaret == Window ||
          ((flags & SW_SCROLLCHILDREN) && IntIsChildWindow(Window, WndCaret)))
    {
@@ -1694,7 +1694,7 @@ UserDrawCaptionText(
       OldTextColor = IntGdiSetTextColor(hDc, IntGetSysColor(uFlags & DC_ACTIVE
          ? COLOR_CAPTIONTEXT : COLOR_INACTIVECAPTIONTEXT));
 
-   //FIXME: If string doesn't fit to rc, truncate it and add ellipsis.
+   // FIXME: If string doesn't fit to rc, truncate it and add ellipsis.
    GreGetTextExtentW(hDc, Text->Buffer, Text->Length/sizeof(WCHAR), &Size, 0);
    GreExtTextOutW(hDc,
                   lpRc->left, (lpRc->top + lpRc->bottom)/2 - Size.cy/2,
index ab3dd0d..910f1fe 100644 (file)
@@ -100,7 +100,7 @@ NtUserBuildPropList(HWND hWnd,
          RETURN( STATUS_INVALID_PARAMETER);
       }
 
-      /* copy list */
+      /* Copy list */
       li = (PROPLISTITEM *)Buffer;
       ListEntry = Window->PropListHead.Flink;
       while((BufferSize >= sizeof(PROPLISTITEM)) && (ListEntry != &Window->PropListHead))
index f5d2c22..3f7a943 100644 (file)
@@ -18,12 +18,12 @@ DBG_DEFAULT_CHANNEL(UserScrollbar);
  #define SA_SSI_REFRESH          0x0004
  #define SA_SSI_REPAINT_ARROWS   0x0008
 
-#define SBRG_SCROLLBAR     0 /* the scrollbar itself */
-#define SBRG_TOPRIGHTBTN   1 /* the top or right button */
-#define SBRG_PAGEUPRIGHT   2 /* the page up or page right region */
-#define SBRG_SCROLLBOX     3 /* the scroll box */
-#define SBRG_PAGEDOWNLEFT  4 /* the page down or page left region */
-#define SBRG_BOTTOMLEFTBTN 5 /* the bottom or left button */
+#define SBRG_SCROLLBAR     0 /* The scrollbar itself */
+#define SBRG_TOPRIGHTBTN   1 /* The top or right button */
+#define SBRG_PAGEUPRIGHT   2 /* The page up or page right region */
+#define SBRG_SCROLLBOX     3 /* The scroll box */
+#define SBRG_PAGEDOWNLEFT  4 /* The page down or page left region */
+#define SBRG_BOTTOMLEFTBTN 5 /* The bottom or left button */
 
 #define CHANGERGSTATE(item, status) \
   if(Info->rgstate[(item)] != (status)) \
@@ -117,7 +117,7 @@ IntCalculateThumb(PWND Wnd, LONG idObject, PSCROLLBARINFO psbi, LPSCROLLINFO psi
    }
 
    ThumbPos = Thumb;
-   /* calculate Thumb */
+   /* Calculate Thumb */
    if(cxy <= (2 * Thumb))
    {
       Thumb = cxy / 2;
@@ -288,7 +288,7 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw)
    PSCROLLBARINFO psbi;
    UINT new_flags;
    INT action = 0;
-   BOOL bChangeParams = FALSE; /* don't show/hide scrollbar if params don't change */
+   BOOL bChangeParams = FALSE; /* Don't show/hide scrollbar if params don't change */
 
    ASSERT_REFS_CO(Window);
 
@@ -412,7 +412,7 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw)
          }
       }
 
-      if (Window->pSBInfo->WSBflags != new_flags) /* check arrow flags */
+      if (Window->pSBInfo->WSBflags != new_flags) /* Check arrow flags */
       {
          Window->pSBInfo->WSBflags = new_flags;
          action |= SA_SSI_REPAINT_ARROWS;
@@ -497,11 +497,11 @@ co_IntCreateScrollBars(PWND Window)
 
    if (Window->pSBInfo && Window->pSBInfoex)
    {
-      /* no need to create it anymore */
+      /* No need to create it anymore */
       return TRUE;
    }
 
-   /* allocate memory for all scrollbars (HORZ, VERT, CONTROL) */
+   /* Allocate memory for all scrollbars (HORZ, VERT, CONTROL) */
    Size = 3 * (sizeof(SBINFOEX));
    if(!(Window->pSBInfoex = ExAllocatePoolWithTag(PagedPool, Size, TAG_SBARINFO)))
    {
@@ -617,7 +617,7 @@ co_UserShowScrollBar(PWND Wnd, int nBar, BOOL fShowH, BOOL fShowV)
          if (fShowH) set_bits |= WS_HSCROLL;
          else clear_bits |= WS_HSCROLL;
          if( nBar == SB_HORZ ) break;  
-      /* fall through */
+      /* Fall through */
       case SB_VERT:
          if (fShowV) set_bits |= WS_VSCROLL;
          else clear_bits |= WS_VSCROLL;
@@ -806,7 +806,7 @@ NtUserEnableScrollBar(
    {
       case SB_BOTH:
          InfoV = IntGetScrollbarInfoFromWindow(Window, SB_VERT);
-         /* fall through */
+         /* Fall through */
       case SB_HORZ:
          InfoH = IntGetScrollbarInfoFromWindow(Window, SB_HORZ);
          break;
index 28b83a9..649e7e0 100644 (file)
@@ -2,14 +2,14 @@
  * COPYRIGHT:        GPL, see COPYING in the top level directory
  * PROJECT:          ReactOS win32 kernel mode subsystem server
  * PURPOSE:          System parameters functions
- * FILE:             subsystem/win32/win32k/ntuser/sysparams.c
+ * FILE:             subsystems/win32/win32k/ntuser/sysparams.c
  * PROGRAMER:        Timo Kreuzer (timo.kreuzer@reactos.org)
  */
 
 // TODO:
-// - check all values that are in Winsta in ros
-// - does setting invalid fonts work?
-// - save appropriate text metrics
+// - Check all values that are in Winsta in ROS.
+// - Does setting invalid fonts work?
+// - Save appropriate text metrics.
 
 #include <win32k.h>
 DBG_DEFAULT_CHANNEL(UserSysparams);
@@ -189,7 +189,7 @@ SpiFixupValues()
 //                               gspv.tmMenuFont.tmExternalLeading);
     if (gspv.iDblClickTime == 0) gspv.iDblClickTime = 500;
 
-    // FIXME: hack!!!
+    // FIXME: Hack!!!
     gspv.tmMenuFont.tmHeight = 11;
     gspv.tmMenuFont.tmExternalLeading = 2;
 
@@ -948,8 +948,8 @@ SpiGetSet(UINT uiAction, UINT uiParam, PVOID pvParam, FLONG fl)
 
         case SPI_SETWORKAREA:
         {
-            /*FIXME: we should set the work area of the monitor
-                     that contains the specified rectangle*/
+            /* FIXME: We should set the work area of the monitor
+                      that contains the specified rectangle */
             PMONITOR pmonitor = IntGetPrimaryMonitor();
             RECT rcWorkArea;
 
@@ -971,7 +971,7 @@ SpiGetSet(UINT uiAction, UINT uiParam, PVOID pvParam, FLONG fl)
             pmonitor->rcWork = rcWorkArea;
             if (fl & SPIF_UPDATEINIFILE)
             {
-                // FIXME: what to do?
+                // FIXME: What to do?
             }
             return (UINT_PTR)KEY_DESKTOP;
         }
@@ -988,7 +988,7 @@ SpiGetSet(UINT uiAction, UINT uiParam, PVOID pvParam, FLONG fl)
                 return 0;
             if (fl & SPIF_UPDATEINIFILE)
             {
-                // FIXME: what to do?
+                // FIXME: What to do?
             }
             return (UINT_PTR)KEY_DESKTOP;
 
@@ -1000,7 +1000,7 @@ SpiGetSet(UINT uiAction, UINT uiParam, PVOID pvParam, FLONG fl)
                 return 0;
             if (fl & SPIF_UPDATEINIFILE)
             {
-                // FIXME: what to do?
+                // FIXME: What to do?
             }
             return (UINT_PTR)KEY_DESKTOP;
 
@@ -1012,7 +1012,7 @@ SpiGetSet(UINT uiAction, UINT uiParam, PVOID pvParam, FLONG fl)
                 return 0;
             if (fl & SPIF_UPDATEINIFILE)
             {
-                // FIXME: what to do?
+                // FIXME: What to do?
             }
             return (UINT_PTR)KEY_DESKTOP;
 
@@ -1032,7 +1032,7 @@ SpiGetSet(UINT uiAction, UINT uiParam, PVOID pvParam, FLONG fl)
                 return 0;
             if (fl & SPIF_UPDATEINIFILE)
             {
-                // FIXME: what to do?
+                // FIXME: What to do?
             }
             return (UINT_PTR)KEY_DESKTOP;
 
@@ -1046,7 +1046,7 @@ SpiGetSet(UINT uiAction, UINT uiParam, PVOID pvParam, FLONG fl)
                 return 0;
             if (fl & SPIF_UPDATEINIFILE)
             {
-                // FIXME: what to do?
+                // FIXME: What to do?
             }
             return (UINT_PTR)KEY_DESKTOP;
 
@@ -1058,7 +1058,7 @@ SpiGetSet(UINT uiAction, UINT uiParam, PVOID pvParam, FLONG fl)
                 return 0;
             if (fl & SPIF_UPDATEINIFILE)
             {
-                // FIXME: what to do?
+                // FIXME: What to do?
             }
             return (UINT_PTR)KEY_DESKTOP;
 
@@ -1070,7 +1070,7 @@ SpiGetSet(UINT uiAction, UINT uiParam, PVOID pvParam, FLONG fl)
                 return 0;
             if (fl & SPIF_UPDATEINIFILE)
             {
-                // FIXME: what to do?
+                // FIXME: What to do?
             }
             return (UINT_PTR)KEY_DESKTOP;
 
@@ -1082,7 +1082,7 @@ SpiGetSet(UINT uiAction, UINT uiParam, PVOID pvParam, FLONG fl)
                 return 0;
             if (fl & SPIF_UPDATEINIFILE)
             {
-                // FIXME: what to do?
+                // FIXME: What to do?
             }
             return (UINT_PTR)KEY_DESKTOP;
 
@@ -1106,7 +1106,7 @@ SpiGetSet(UINT uiAction, UINT uiParam, PVOID pvParam, FLONG fl)
                 return 0;
             if (fl & SPIF_UPDATEINIFILE)
             {
-                // FIXME: what to do?
+                // FIXME: What to do?
             }
             return (UINT_PTR)KEY_DESKTOP;
 
@@ -1215,7 +1215,7 @@ SpiGetSet(UINT uiAction, UINT uiParam, PVOID pvParam, FLONG fl)
             return SpiGetInt(pvParam, &gspv.iMouseHoverTime, fl);
 
         case SPI_SETMOUSEHOVERTIME:
-           /* see http://msdn2.microsoft.com/en-us/library/ms724947.aspx
+           /* See http://msdn2.microsoft.com/en-us/library/ms724947.aspx
             * copy text from it, if some agument why xp and 2003 behovir diffent
             * only if they do not have SP install
             * " Windows Server 2003 and Windows XP: The operating system does not
@@ -1597,7 +1597,7 @@ NtUserSystemParametersInfo(
     TRACE("Enter NtUserSystemParametersInfo(%d)\n", uiAction);
     UserEnterExclusive();
 
-    // FIXME: get rid of the flags and only use this from um. kernel can access data directly.
+    // FIXME: Get rid of the flags and only use this from um. kernel can access data directly.
     /* Set UM memory protection flag */
     fWinIni |= SPIF_PROTECT;
 
@@ -1609,3 +1609,5 @@ NtUserSystemParametersInfo(
     
     return bResult;
 }
+
+/* EOF */
index 57fdf69..e781aca 100644 (file)
@@ -598,7 +598,7 @@ InitTimerImpl(VOID)
                        WindowLessTimersBitMapBuffer,
                        BitmapBytes * 8);
 
-   /* yes we need this, since ExAllocatePoolWithTag isn't supposed to zero out allocated memory */
+   /* Yes we need this, since ExAllocatePoolWithTag isn't supposed to zero out allocated memory */
    RtlClearAllBits(&WindowLessTimersBitMap);
 
    ExInitializeResourceLite(&TimerLock);
@@ -695,5 +695,4 @@ NtUserValidateTimerCallback(
   return Ret;
 }
 
-
 /* EOF */
index c3704b9..47b07bd 100644 (file)
@@ -1,17 +1,17 @@
 /*
- * PROJECT:         ReactOS Kernel
+ * PROJECT:         ReactOS Win32k subsystem
  * LICENSE:         GPL - See COPYING in the top level directory
  * FILE:            subsystems/win32/win32k/ntuser/windc.c
  * PURPOSE:         Window DC management
- * COPYRIGHT:       Copyright 2007 ReactOS
 */
+ * COPYRIGHT:       Copyright 2007 ReactOS Team
+ */
 
 #include <win32k.h>
 DBG_DEFAULT_CHANNEL(UserDce);
 
 /* GLOBALS *******************************************************************/
 
-/* NOTE - I think we should store this per window station (including gdi objects) */
+/* NOTE: I think we should store this per window station (including GDI objects) */
 /* Answer: No, use the DCE pMonitor to compare with! */
 
 static LIST_ENTRY LEDce;
@@ -100,7 +100,7 @@ DceAllocDCE(PWND Window OPTIONAL, DCE_TYPE Type)
 
   DCU_SetDcUndeletable(pDce->hDC);
 
-  if (Type == DCE_WINDOW_DC || Type == DCE_CLASS_DC) //Window DCE have ownership.
+  if (Type == DCE_WINDOW_DC || Type == DCE_CLASS_DC) // Window DCE have ownership.
   {
      pDce->ptiOwner = GetW32ThreadInfo();
   }
@@ -178,7 +178,7 @@ DceDeleteClipRgn(DCE* Dce)
 
    Dce->hrgnClip = NULL;
 
-   /* make it dirty so that the vis rgn gets recomputed next time */
+   /* Make it dirty so that the vis rgn gets recomputed next time */
    Dce->DCXFlags |= DCX_DCEDIRTY;
 }
 
@@ -190,7 +190,7 @@ DceReleaseDC(DCE* dce, BOOL EndPaint)
       return 0;
    }
 
-   /* restore previous visible region */
+   /* Restore previous visible region */
    if ((dce->DCXFlags & (DCX_INTERSECTRGN | DCX_EXCLUDERGN)) &&
          ((dce->DCXFlags & DCX_CACHE) || EndPaint))
    {
@@ -201,7 +201,7 @@ DceReleaseDC(DCE* dce, BOOL EndPaint)
    {
       if (!(dce->DCXFlags & DCX_NORESETATTRS))
       {
-         /* make the DC clean so that SetDCState doesn't try to update the vis rgn */
+         /* Make the DC clean so that SetDCState doesn't try to update the vis rgn */
          IntGdiSetHookFlags(dce->hDC, DCHF_VALIDATEVISRGN);
 
          // Clean the DC
@@ -209,7 +209,7 @@ DceReleaseDC(DCE* dce, BOOL EndPaint)
 
          if (dce->DCXFlags & DCX_DCEDIRTY)
          {
-           /* don't keep around invalidated entries
+           /* Don't keep around invalidated entries
             * because SetDCState() disables hVisRgn updates
             * by removing dirty bit. */
            dce->hwndCurrent = 0;
@@ -349,7 +349,7 @@ UserGetDCEx(PWND Wnd OPTIONAL, HANDLE ClipRegion, ULONG Flags)
    if (Flags & DCX_USESTYLE)
    {
       Flags &= ~(DCX_CLIPCHILDREN | DCX_CLIPSIBLINGS | DCX_PARENTCLIP);
-      if (!(Flags & DCX_WINDOW)) // not window rectangle
+      if (!(Flags & DCX_WINDOW)) // Not window rectangle
       {
          if (Wnd->pcls->style & CS_PARENTDC)
          {
@@ -414,7 +414,7 @@ UserGetDCEx(PWND Wnd OPTIONAL, HANDLE ClipRegion, ULONG Flags)
       Flags |= DCX_CLIPSIBLINGS;
    }
 
-   /* it seems parent clip is ignored when clipping siblings or children */
+   /* It seems parent clip is ignored when clipping siblings or children */
    if (Flags & (DCX_CLIPSIBLINGS | DCX_CLIPCHILDREN)) Flags &= ~DCX_PARENTCLIP;
 
    if (Flags & DCX_PARENTCLIP)
@@ -525,11 +525,11 @@ UserGetDCEx(PWND Wnd OPTIONAL, HANDLE ClipRegion, ULONG Flags)
    Dce->DCXFlags = Flags | DCX_DCEBUSY;
 
    /*
-      Bump it up! This prevents the random errors in wine dce tests and with
-      proper bits set in DCX_CACHECOMPAREMASK.
-      Reference:
-        http://www.reactos.org/archives/public/ros-dev/2008-July/010498.html
-        http://www.reactos.org/archives/public/ros-dev/2008-July/010499.html
+    * Bump it up! This prevents the random errors in wine dce tests and with
+    * proper bits set in DCX_CACHECOMPAREMASK.
+    * Reference:
+    *   http://www.reactos.org/archives/public/ros-dev/2008-July/010498.html
+    *   http://www.reactos.org/archives/public/ros-dev/2008-July/010499.html
     */
    if (pLE != &LEDce)
    {
@@ -619,7 +619,7 @@ DceFreeDCE(PDCE pdce, BOOLEAN Force)
       GreGetObjectOwner(pdce->hDC) != GDI_OBJ_HMGR_POWNED)
   {
      TRACE("Change ownership for DCE! -> %x\n" , pdce);
-     // Note: Windows sets W32PF_OWNDCCLEANUP and moves on.
+     // NOTE: Windows sets W32PF_OWNDCCLEANUP and moves on.
      if (GreIsHandleValid(pdce->hDC))
      {
          GreSetDCOwner(pdce->hDC, GDI_OBJ_HMGR_POWNED);
@@ -694,11 +694,11 @@ DceFreeWindowDCE(PWND Window)
      if ( pDCE->hwndCurrent == Window->head.h &&
           !(pDCE->DCXFlags & DCX_DCEEMPTY) )
      {
-        if (!(pDCE->DCXFlags & DCX_CACHE)) /* owned or Class DCE*/
+        if (!(pDCE->DCXFlags & DCX_CACHE)) /* Owned or Class DCE */
         {
            if (Window->pcls->style & CS_CLASSDC) /* Test Class first */
            {
-              if (pDCE->DCXFlags & (DCX_INTERSECTRGN | DCX_EXCLUDERGN)) /* Class DCE*/
+              if (pDCE->DCXFlags & (DCX_INTERSECTRGN | DCX_EXCLUDERGN)) /* Class DCE */
                  DceDeleteClipRgn(pDCE);
               // Update and reset Vis Rgn and clear the dirty bit.
               // Should release VisRgn than reset it to default.
@@ -714,7 +714,7 @@ DceFreeWindowDCE(PWND Window)
               }
               /* Do not change owner so thread can clean up! */
            }
-           else if (Window->pcls->style & CS_OWNDC) /* owned DCE*/
+           else if (Window->pcls->style & CS_OWNDC) /* Owned DCE */
            {
               pDCE = DceFreeDCE(pDCE, FALSE);
               if (!pDCE) break;
@@ -728,7 +728,7 @@ DceFreeWindowDCE(PWND Window)
         }
         else
         {
-           if (pDCE->DCXFlags & DCX_DCEBUSY) /* shared cache DCE */
+           if (pDCE->DCXFlags & DCX_DCEBUSY) /* Shared cache DCE */
            {
               /* FIXME: AFAICS we are doing the right thing here so
                * this should be a TRACE. But this is best left as an ERR
@@ -1063,5 +1063,4 @@ NtUserSelectPalette(HDC  hDC,
     return oldPal;
 }
 
-
 /* EOF */
index c6c4949..e32653d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * COPYRIGHT:        See COPYING in the top level directory
- * PROJECT:          ReactOS kernel
+ * PROJECT:          ReactOS Win32k subsystem
  * PURPOSE:          Windows
  * FILE:             subsystems/win32/win32k/ntuser/window.c
  * PROGRAMER:        Casper S. Hornstrup (chorns@users.sourceforge.net)
@@ -59,7 +59,7 @@ PWND FASTCALL IntGetWindowObject(HWND hWnd)
    return Window;
 }
 
-/* temp hack */
+/* Temp HACK */
 PWND FASTCALL UserGetWindowObject(HWND hWnd)
 {
     PWND Window;
@@ -759,21 +759,21 @@ co_DestroyThreadWindows(struct _ETHREAD *Thread)
 
       TRACE("thread cleanup: while destroy wnds, wnd=0x%x\n",Wnd);
 
-      /* window removes itself from the list */
+      /* Window removes itself from the list */
 
       /*
-      fixme: it is critical that the window removes itself! if now, we will loop
-      here forever...
-      */
+       * FIXME: It is critical that the window removes itself! If now, we will loop
+       * here forever...
+       */
 
       //ASSERT(co_UserDestroyWindow(Wnd));
 
-      UserRefObjectCo(Wnd, &Ref);//faxme: temp hack??
+      UserRefObjectCo(Wnd, &Ref); // FIXME: Temp HACK??
       if (!co_UserDestroyWindow(Wnd))
       {
          ERR("Unable to destroy window 0x%x at thread cleanup... This is _VERY_ bad!\n", Wnd);
       }
-      UserDerefObjectCo(Wnd);//faxme: temp hack??
+      UserDerefObjectCo(Wnd); // FIXME: Temp HACK??
    }
 }
 
@@ -839,7 +839,7 @@ IntGetSystemMenu(PWND Window, BOOL bRevert, BOOL RetMenu)
 
       if(W32Thread->rpdesk->rpwinstaParent->SystemMenuTemplate)
       {
-         /* clone system menu */
+         /* Clone system menu */
          Menu = UserGetMenuObject(W32Thread->rpdesk->rpwinstaParent->SystemMenuTemplate);
          if(!Menu)
             return NULL;
@@ -941,7 +941,7 @@ IntIsChildWindow(PWND Parent, PWND BaseWindow)
 }
 
 /*
-   link the window into siblings list
+   Link the window into siblings list
    children and parent are kept in place.
 */
 VOID FASTCALL
@@ -1130,7 +1130,7 @@ co_IntSetParent(PWND Wnd, PWND WndNewParent)
 
    WndOldParent = Wnd->spwndParent;
 
-   if (WndOldParent) UserReferenceObject(WndOldParent); /* caller must deref */
+   if (WndOldParent) UserReferenceObject(WndOldParent); /* Caller must deref */
 
    if (WndNewParent != WndOldParent)
    {
@@ -1140,7 +1140,7 @@ co_IntSetParent(PWND Wnd, PWND WndNewParent)
       /* Set the new parent */
       Wnd->spwndParent = WndNewParent;
 
-      /* Link the window with its new siblings*/
+      /* Link the window with its new siblings */
       IntLinkHwnd(Wnd, HWND_TOP);
 
    }
@@ -1156,8 +1156,8 @@ co_IntSetParent(PWND Wnd, PWND WndNewParent)
                          | (WasVisible ? SWP_SHOWWINDOW : 0));
 
    /*
-    * FIXME: a WM_MOVE is also generated (in the DefWindowProc handler
-    * for WM_WINDOWPOSCHANGED) in Windows, should probably remove SWP_NOMOVE
+    * FIXME: A WM_MOVE is also generated (in the DefWindowProc handler
+    * for WM_WINDOWPOSCHANGED) in Windows, should probably remove SWP_NOMOVE.
     */
    if (WasVisible) co_WinPosShowWindow(Wnd, SW_SHOWNORMAL);
 
@@ -1236,7 +1236,7 @@ IntSetSystemMenu(PWND Window, PMENU_OBJECT Menu)
 
    if(Menu)
    {
-      /* FIXME check window style, propably return FALSE ? */
+      /* FIXME: Check window style, propably return FALSE? */
       Window->SystemMenu = Menu->MenuInfo.Self;
       Menu->MenuInfo.Flags |= MF_SYSMENU;
    }
@@ -1246,7 +1246,7 @@ IntSetSystemMenu(PWND Window, PMENU_OBJECT Menu)
    return TRUE;
 }
 
-/* unlink the window from siblings. children and parent are kept in place. */
+/* Unlink the window from siblings. children and parent are kept in place. */
 VOID FASTCALL
 IntUnlinkWindow(PWND Wnd)
 {
@@ -1542,7 +1542,7 @@ IntFixWindowCoordinates(CREATESTRUCTW* Cs, PWND ParentWindow, DWORD* dwShowMode)
 #undef IS_DEFAULT
 }
 
-/* Allocates and initializes a window*/
+/* Allocates and initializes a window */
 PWND FASTCALL IntCreateWindow(CREATESTRUCTW* Cs,
                                         PLARGE_STRING WindowName,
                                         PCLS Class,
@@ -1569,12 +1569,12 @@ PWND FASTCALL IntCreateWindow(CREATESTRUCTW* Cs,
             Cs->dwExStyle |= WS_EX_LAYOUTRTL;
       }
       else
-      {/*
-        Note from MSDN http://msdn.microsoft.com/en-us/library/aa913269.aspx :
-
-        Dialog boxes and message boxes do not inherit layout, so you must
-        set the layout explicitly.
-       */
+      { /*
+         * Note from MSDN <http://msdn.microsoft.com/en-us/library/aa913269.aspx>:
+         *
+         * Dialog boxes and message boxes do not inherit layout, so you must
+         * set the layout explicitly.
+         */
          if ( Class->fnid != FNID_DIALOG)
          {
             PPROCESSINFO ppi = PsGetCurrentProcessWin32Process();
@@ -1613,7 +1613,7 @@ PWND FASTCALL IntCreateWindow(CREATESTRUCTW* Cs,
    TRACE("Created object with handle %X\n", hWnd);
 
    if (NULL == pti->rpdesk->DesktopWindow)
-   {  /*HACK! Helper for win32csr/desktopbg.c */
+   {  /* HACK: Helper for win32csr/desktopbg.c */
       /* If there is no desktop window yet, we must be creating it */
       pti->rpdesk->DesktopWindow = hWnd;
       pti->rpdesk->pDeskInfo->spwnd = pWnd;
@@ -1622,7 +1622,7 @@ PWND FASTCALL IntCreateWindow(CREATESTRUCTW* Cs,
    /*
     * Fill out the structure describing it.
     */
-   /* Remember, pWnd->head is setup in object.c ...*/
+   /* Remember, pWnd->head is setup in object.c ... */
    pWnd->spwndParent = ParentWindow;
    pWnd->spwndOwner = OwnerWindow;
    pWnd->fnid = 0;
@@ -1653,7 +1653,7 @@ PWND FASTCALL IntCreateWindow(CREATESTRUCTW* Cs,
 
     No where can I see in code or through testing does the window change back
     to ANSI after being created as UNICODE in ROS. I didnt do more testing to
-    see what problems this would cause.*/
+    see what problems this would cause. */
 
    // Set WndProc from Class.
    pWnd->lpfnWndProc  = pWnd->pcls->lpfnWndProc;
@@ -1684,9 +1684,9 @@ PWND FASTCALL IntCreateWindow(CREATESTRUCTW* Cs,
    }
    else
    { /*
-       It seems there can be both an Ansi creator and Unicode Class Window
-       WndProc, unless the following overriding conditions occur:
-     */
+      * It seems there can be both an Ansi creator and Unicode Class Window
+      * WndProc, unless the following overriding conditions occur:
+      */
       if ( !bUnicodeWindow &&
           ( Class->atomClassName == gpsi->atomSysClass[ICLS_BUTTON]    ||
             Class->atomClassName == gpsi->atomSysClass[ICLS_COMBOBOX]  ||
@@ -1768,8 +1768,8 @@ PWND FASTCALL IntCreateWindow(CREATESTRUCTW* Cs,
    if (!(pWnd->style & (WS_CHILD | WS_POPUP)))
       pWnd->state |= WNDS_SENDSIZEMOVEMSGS;
 
-   /* create system menu */
-   if((Cs->style & WS_SYSMENU) )//&& (dwStyle & WS_CAPTION) == WS_CAPTION)
+   /* Create system menu */
+   if ((Cs->style & WS_SYSMENU)) // && (dwStyle & WS_CAPTION) == WS_CAPTION)
    {
       SystemMenu = IntGetSystemMenu(pWnd, TRUE, TRUE);
       if(SystemMenu)
@@ -1809,7 +1809,7 @@ PWND FASTCALL IntCreateWindow(CREATESTRUCTW* Cs,
    /* Insert the window into the thread's window list. */
    InsertTailList (&pti->WindowListHead, &pWnd->ThreadListEntry);
 
-   /*  Handle "CS_CLASSDC", it is tested first. */
+   /* Handle "CS_CLASSDC", it is tested first. */
    if ( (pWnd->pcls->style & CS_CLASSDC) && !(pWnd->pcls->pdce) )
    {  /* One DCE per class to have CLASS. */
       pWnd->pcls->pdce = DceAllocDCE( pWnd, DCE_CLASS_DC );
@@ -1859,7 +1859,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
    if (pti == NULL || pti->rpdesk == NULL)
    {
       ERR("Thread is not attached to a desktop! Cannot create window!\n");
-      return NULL; //There is nothing to cleanup
+      return NULL; // There is nothing to cleanup.
    }
    WinSta = pti->rpdesk->rpwinstaParent;
    ObReferenceObjectByPointer(WinSta, KernelMode, ExWindowStationObjectType, 0);
@@ -1867,7 +1867,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
    pCsw = NULL;
    pCbtCreate = NULL;
 
-   /* Get the class and reference it*/
+   /* Get the class and reference it */
    Class = IntGetAndReferenceClass(ClassName, Cs->hInstance);
    if(!Class)
    {
@@ -1900,7 +1900,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
     ParentWindow = hWndParent ? UserGetWindowObject(hWndParent): NULL;
     OwnerWindow = hWndOwner ? UserGetWindowObject(hWndOwner): NULL;
 
-    /* FIXME: is this correct?*/
+    /* FIXME: Is this correct? */
     if(OwnerWindow)
         OwnerWindow = UserGetAncestor(OwnerWindow, GA_ROOT);
 
@@ -2040,7 +2040,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
    Cs->lpszName = (LPCWSTR) WindowName;
    Cs->lpszClass = (LPCWSTR) ClassName;
 
-   /* Send the WM_GETMINMAXINFO message*/
+   /* Send the WM_GETMINMAXINFO message */
    Size.cx = Cs->cx;
    Size.cy = Cs->cy;
 
@@ -2067,10 +2067,10 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
    }
    Window->rcClient = Window->rcWindow;
 
-   /* Link the window*/
+   /* Link the window */
    if (NULL != ParentWindow)
    {
-      /* link the window into the siblings list */
+      /* Link the window into the siblings list */
       if ((Cs->style & (WS_CHILD|WS_MAXIMIZE)) == WS_CHILD)
           IntLinkHwnd(Window, HWND_BOTTOM);
       else
@@ -2103,7 +2103,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
       goto cleanup;
    }
 
-   /* Send the EVENT_OBJECT_CREATE event*/
+   /* Send the EVENT_OBJECT_CREATE event */
    IntNotifyWinEvent(EVENT_OBJECT_CREATE, Window, OBJID_WINDOW, CHILDID_SELF, 0);
 
    /* By setting the flag below it can be examined to determine if the window
@@ -2380,7 +2380,7 @@ BOOLEAN FASTCALL co_UserDestroyWindow(PWND Window)
    PTHREADINFO ti;
    MSG msg;
 
-   ASSERT_REFS_CO(Window); // FIXME: temp hack?
+   ASSERT_REFS_CO(Window); // FIXME: Temp HACK?
 
    hWnd = Window->head.h;
 
@@ -2480,9 +2480,9 @@ BOOLEAN FASTCALL co_UserDestroyWindow(PWND Window)
                if (IntWndBelongsToThread(Child, PsGetCurrentThreadWin32Thread()))
                {
                   USER_REFERENCE_ENTRY ChildRef;
-                  UserRefObjectCo(Child, &ChildRef);//temp hack?
+                  UserRefObjectCo(Child, &ChildRef); // Temp HACK?
                   co_UserDestroyWindow(Child);
-                  UserDerefObjectCo(Child);//temp hack?
+                  UserDerefObjectCo(Child); // Temp HACK?
 
                   GotOne = TRUE;
                   continue;
@@ -2541,9 +2541,9 @@ NtUserDestroyWindow(HWND Wnd)
       RETURN(FALSE);
    }
 
-   UserRefObjectCo(Window, &Ref);//faxme: dunno if win should be reffed during destroy..
+   UserRefObjectCo(Window, &Ref); // FIXME: Dunno if win should be reffed during destroy...
    ret = co_UserDestroyWindow(Window);
-   UserDerefObjectCo(Window);//faxme: dunno if win should be reffed during destroy..
+   UserDerefObjectCo(Window); // FIXME: Dunno if win should be reffed during destroy...
 
    RETURN(ret);
 
@@ -2805,7 +2805,7 @@ NtUserFindWindowEx(HWND hwndParent,
 
        if(Ret == NULL && hwndParent == NULL && hwndChildAfter == NULL)
        {
-          /* FIXME - if both hwndParent and hwndChildAfter are NULL, we also should
+          /* FIXME:  If both hwndParent and hwndChildAfter are NULL, we also should
                      search the message-only windows. Should this also be done if
                      Parent is the desktop window??? */
           PWND MsgWindows;
@@ -3795,7 +3795,7 @@ NtUserDefSetText(HWND hWnd, PLARGE_STRING WindowText)
           Wnd->strName.Buffer[0] = L'\0';
    }
 
-   // HAX! FIXME! Windows does not do this in here!
+   // FIXME: HAX! Windows does not do this in here!
    // In User32, these are called after: NotifyWinEvent EVENT_OBJECT_NAMECHANGE than
    // RepaintButton, StaticRepaint, NtUserCallHwndLock HWNDLOCK_ROUTINE_REDRAWFRAMEANDHOOK, etc.
    /* Send shell notifications */
index 0e66486..594b37d 100644 (file)
@@ -112,9 +112,9 @@ done:
    if (WndTo) UserRefObjectCo(WndTo, &Ref);
 
    Fg = UserGetForegroundWindow();
-   if ((!Fg || Wnd->head.h == Fg) && WndTo)//fixme: ok if WndTo is NULL??
+   if ((!Fg || Wnd->head.h == Fg) && WndTo) // FIXME: Ok if WndTo is NULL??
    {
-      /* fixme: wine can pass WndTo=NULL to co_IntSetForegroundWindow. hmm */
+      /* FIXME: Wine can pass WndTo = NULL to co_IntSetForegroundWindow. Hmm... */
       if (co_IntSetForegroundWindow(WndTo))
       {
          UserDerefObjectCo(WndTo);
@@ -122,7 +122,7 @@ done:
       }
    }
 
-   if (!co_IntSetActiveWindow(WndTo))  /* ok for WndTo to be NULL here */
+   if (!co_IntSetActiveWindow(WndTo))  /* Ok for WndTo to be NULL here */
       co_IntSetActiveWindow(0);
 
    if (WndTo) UserDerefObjectCo(WndTo);
@@ -782,7 +782,7 @@ co_WinPosGetMinMaxInfo(PWND Window, POINT* MaxSize, POINT* MaxPos,
    if (MaxTrack)
       *MaxTrack = MinMax.ptMaxTrackSize;
 
-   return 0; //FIXME: what does it return?
+   return 0; // FIXME: What does it return?
 }
 
 static
@@ -1808,7 +1808,7 @@ co_WinPosShowWindow(PWND Wnd, INT Cmd)
       }
 
 
-      //temphack
+      // Temp HACK
       ThreadFocusWindow = UserGetWindowObject(IntGetThreadFocusWindow());
 
       /* Revert focus to parent */
@@ -1817,7 +1817,7 @@ co_WinPosShowWindow(PWND Wnd, INT Cmd)
 */
       if (Wnd == ThreadFocusWindow)
       {
-         //faxme: as long as we have ref on Window, we also, indirectly, have ref on parent...
+         // FIXME: As long as we have ref on Window, we also, indirectly, have ref on parent...
          co_UserSetFocus(Wnd->spwndParent);
       }
    }
@@ -2779,8 +2779,8 @@ NtUserWindowFromPoint(LONG X, LONG Y)
       pt.x = X;
       pt.y = Y;
 
-      //hmm... threads live on desktops thus we have a reference on the desktop and indirectly the desktop window
-      //its possible this referencing is useless, thou it shouldnt hurt...
+      // Hmm... Threads live on desktops thus we have a reference on the desktop and indirectly the desktop window.
+      // It is possible this referencing is useless, though it should not hurt...
       UserRefObjectCo(DesktopWindow, &Ref);
 
       //pti = PsGetCurrentThreadWin32Thread();
index 22dbff1..eec529e 100644 (file)
@@ -1,8 +1,8 @@
 /*
  *  COPYRIGHT:        See COPYING in the top level directory
- *  PROJECT:          ReactOS kernel
+ *  PROJECT:          ReactOS Win32k subsystem
  *  PURPOSE:          Window stations
- *  FILE:             subsys/win32k/ntuser/winsta.c
+ *  FILE:             subsystems/win32/win32k/ntuser/winsta.c
  *  PROGRAMER:        Casper S. Hornstrup (chorns@users.sourceforge.net)
  *  TODO:             The process window station is created on
  *                    the first USER32/GDI32 call not related
@@ -17,7 +17,7 @@ DBG_DEFAULT_CHANNEL(UserWinsta);
 /* Currently active window station */
 PWINSTATION_OBJECT InputWindowStation = NULL;
 
-/* Winlogon sas window*/
+/* Winlogon SAS window */
 HWND hwndSAS = NULL;
 
 /* INITALIZATION FUNCTIONS ****************************************************/
@@ -301,7 +301,7 @@ co_IntInitializeDesktopGraphics(VOID)
    NtGdiSelectFont(hSystemBM, NtGdiGetStockObject(SYSTEM_FONT));
    GreSetDCOwner(hSystemBM, GDI_OBJ_HMGR_PUBLIC);
 
-   // FIXME! Move these to a update routine.
+   // FIXME: Move these to a update routine.
    gpsi->Planes        = NtGdiGetDeviceCaps(ScreenDeviceContext, PLANES);
    gpsi->BitsPixel     = NtGdiGetDeviceCaps(ScreenDeviceContext, BITSPIXEL);
    gpsi->BitCount      = gpsi->Planes * gpsi->BitsPixel;
@@ -898,7 +898,7 @@ UserSetProcessWindowStation(HWINSTA hWindowStation)
    }
 
    /*
-    * FIXME - don't allow changing the window station if there are threads that are attached to desktops and own gui objects
+    * FIXME: Don't allow changing the window station if there are threads that are attached to desktops and own GUI objects.
     */
 
    PsSetProcessWindowStation(ppi->peProcess, hWindowStation);
index 4de4747..5f292c0 100644 (file)
@@ -4,7 +4,7 @@
 #include <debug.h>
 
 /*
- * a couple macros to fill a single pixel or a line
+ * A couple of macros to fill a single pixel or a line
  */
 #define PUTPIXEL(x,y,BrushInst)        \
   ret = ret && IntEngLineTo(&psurf->SurfObj, \
index 20590f6..56756ca 100644 (file)
@@ -24,9 +24,9 @@
  */
 
  /*
-  * some macro definitions for bezier drawing
+  * Some macro definitions for bezier drawing.
   *
-  * to avoid trucation errors the coordinates are
+  * To avoid trucation errors the coordinates are
   * shifted upwards. When used in drawing they are
   * shifted down again, including correct rounding
   * and avoiding floating point arithmatic
 #define BEZIERSHIFTUP(x)    ((x)<<BEZIERSHIFTBITS)
 #define BEZIERPIXEL        BEZIERSHIFTUP(1)
 #define BEZIERSHIFTDOWN(x)  (((x)+(1<<(BEZIERSHIFTBITS-1)))>>BEZIERSHIFTBITS)
-/* maximum depth of recursion */
+/* Maximum depth of recursion */
 #define BEZIERMAXDEPTH  8
 
-/* size of array to store points on */
+/* Size of array to store points on */
 /* enough for one curve */
 #define BEZIER_INITBUFSIZE    (150)
 
-/* calculate Bezier average, in this case the middle
+/* Calculate Bezier average, in this case the middle
  * correctly rounded...
  * */
 
@@ -68,9 +68,9 @@ static BOOL FASTCALL BezierCheck( int level, POINT *Points)
 
   dx=Points[3].x-Points[0].x;
   dy=Points[3].y-Points[0].y;
-  if ( abs(dy) <= abs(dx) ) /* shallow line */
+  if ( abs(dy) <= abs(dx) ) /* Shallow line */
   {
-    /* check that control points are between begin and end */
+    /* Check that control points are between begin and end */
     if ( Points[1].x < Points[0].x )
     {
       if ( Points[1].x < Points[3].x )
@@ -98,8 +98,9 @@ static BOOL FASTCALL BezierCheck( int level, POINT *Points)
         return TRUE;
   }
   else
-  { /* steep line */
-      /* check that control points are between begin and end */
+  {   
+      /* Steep line */
+      /* Check that control points are between begin and end */
       if(Points[1].y < Points[0].y)
       {
         if(Points[1].y < Points[3].y)
@@ -149,7 +150,7 @@ static void APIENTRY GDI_InternalBezier( POINT *Points, POINT **PtsOut, INT *dwO
     (*PtsOut)[*nPtsOut].y = BEZIERSHIFTDOWN(Points[3].y);
     (*nPtsOut) ++;
   } else {
-    POINT Points2[4]; /* for the second recursive call */
+    POINT Points2[4]; /* For the second recursive call */
     Points2[3]=Points[3];
     BEZIERMIDDLE(Points2[2], Points[2], Points[3]);
     BEZIERMIDDLE(Points2[0], Points[1], Points[2]);
@@ -161,7 +162,7 @@ static void APIENTRY GDI_InternalBezier( POINT *Points, POINT **PtsOut, INT *dwO
 
     Points2[0]=Points[3];
 
-    /* do the two halves */
+    /* Do the two halves */
     GDI_InternalBezier(Points, PtsOut, dwOut, nPtsOut, level-1);
     GDI_InternalBezier(Points2, PtsOut, dwOut, nPtsOut, level-1);
   }
index 33e8dff..317d7a7 100644 (file)
@@ -124,7 +124,7 @@ NtGdiAlphaBlend(
     EXLATEOBJ_vInitXlateFromDCs(&exlo, DCSrc, DCDest);
 
     /* Perform the alpha blend operation */
-    DPRINT("Performing the alpha Blend\n");
+    DPRINT("Performing the alpha blend\n");
     bResult = IntEngAlphaBlend(&BitmapDest->SurfObj,
                                &BitmapSrc->SurfObj,
                                DCDest->rosdc.CombinedClip,
@@ -158,7 +158,7 @@ NtGdiBitBlt(
     IN FLONG fl)
 {
     /* Forward to NtGdiMaskBlt */
-    // TODO : what's fl for?
+    // TODO: What's fl for?
     return NtGdiMaskBlt(hDCDest,
                         XDest,
                         YDest,
@@ -860,7 +860,6 @@ IntGdiPolyPatBlt(
     return TRUE;
 }
 
-
 BOOL APIENTRY
 NtGdiPatBlt(
     HDC hDC,
@@ -878,7 +877,7 @@ NtGdiPatBlt(
     BOOL UsesSource = ROP_USES_SOURCE(ROP);
     if (UsesSource)
     {
-        /* in this case we call on GdiMaskBlt */
+        /* In this case we call on GdiMaskBlt */
         return NtGdiMaskBlt(hDC, XLeft, YLeft, Width, Height, 0,0,0,0,0,0,ROP,0);
     }
 
index b4e194e..39006f7 100644 (file)
@@ -145,10 +145,10 @@ GreCreateBitmap(
     /* Call the extended function */
     return GreCreateBitmapEx(nWidth,
                              nHeight,
-                             0, /* auto width */
+                             0, /* Auto width */
                              BitmapFormat(cBitsPixel * cPlanes, BI_RGB),
-                             0, /* no bitmap flags */
-                             0, /* auto size */
+                             0, /* No bitmap flags */
+                             0, /* Auto size */
                              pvBits,
                              DDB_SURFACE /* DDB */);
 }
@@ -238,7 +238,7 @@ IntCreateCompatibleBitmap(
         psurf->ppal = PALETTE_ShareLockPalette(Dc->ppdev->devinfo.hpalDefault);
         /* Set flags */
         psurf->flags = API_BITMAP;
-        psurf->hdc = NULL; // Fixme
+        psurf->hdc = NULL; // FIXME:
         SURFACE_ShareUnlockSurface(psurf);
     }
     else
@@ -264,7 +264,7 @@ IntCreateCompatibleBitmap(
             GDIOBJ_vReferenceObjectByPointer((POBJ)psurf->ppal);
             /* Set flags */
             psurfBmp->flags = API_BITMAP;
-            psurfBmp->hdc = NULL; // Fixme
+            psurfBmp->hdc = NULL; // FIXME:
             SURFACE_ShareUnlockSurface(psurfBmp);
         }
         else if (Count == sizeof(DIBSECTION))
@@ -403,7 +403,7 @@ COLORREF APIENTRY
 NtGdiGetPixel(HDC hDC, INT XPos, INT YPos)
 {
     PDC dc = NULL;
-    COLORREF Result = (COLORREF)CLR_INVALID; // default to failure
+    COLORREF Result = (COLORREF)CLR_INVALID; // Default to failure
     BOOL bInRect = FALSE;
     SURFACE *psurf;
     SURFOBJ *pso;
@@ -435,7 +435,7 @@ NtGdiGetPixel(HDC hDC, INT XPos, INT YPos)
         {
                        pso = &psurf->SurfObj;
             EXLATEOBJ_vInitialize(&exlo, psurf->ppal, &gpalRGB, 0, 0xffffff, 0);
-            // check if this DC has a DIB behind it...
+            // Check if this DC has a DIB behind it...
             if (pso->pvScan0) // STYPE_BITMAP == pso->iType
             {
                 ASSERT(pso->lDelta);
@@ -448,7 +448,7 @@ NtGdiGetPixel(HDC hDC, INT XPos, INT YPos)
     }
     DC_UnlockDc(dc);
 
-    // if Result is still CLR_INVALID, then the "quick" method above didn't work
+    // If Result is still CLR_INVALID, then the "quick" method above didn't work
     if (bInRect && Result == CLR_INVALID)
     {
         // FIXME: create a 1x1 32BPP DIB, and blit to it
@@ -481,7 +481,7 @@ NtGdiGetPixel(HDC hDC, INT XPos, INT YPos)
                     NtGdiBitBlt(hDCTmp, 0, 0, 1, 1, hDC, XPos, YPos, SRCCOPY, 0, 0);
                     NtGdiSelectBitmap(hDCTmp, hBmpOld);
 
-                    // our bitmap is no longer selected, so we can access it's stuff...
+                    // Our bitmap is no longer selected, so we can access it's stuff...
                     psurf = SURFACE_ShareLockSurface(hBmpTmp);
                     if (psurf)
                     {
@@ -564,7 +564,7 @@ NtGdiGetBitmapBits(
     /* Don't copy more bytes than the buffer has */
     Bytes = min(Bytes, bmSize);
 
-    // FIXME: use MmSecureVirtualMemory
+    // FIXME: Use MmSecureVirtualMemory
     _SEH2_TRY
     {
         ProbeForWrite(pUnsafeBits, Bytes, 1);
@@ -843,7 +843,7 @@ BITMAP_GetObject(SURFACE *psurf, INT Count, LPVOID buffer)
     if (!buffer) return sizeof(BITMAP);
     if ((UINT)Count < sizeof(BITMAP)) return 0;
 
-    /* always fill a basic BITMAP structure */
+    /* Always fill a basic BITMAP structure */
     pBitmap = buffer;
     pBitmap->bmType = 0;
     pBitmap->bmWidth = psurf->SurfObj.sizlBitmap.cx;
@@ -908,7 +908,7 @@ BITMAP_GetObject(SURFACE *psurf, INT Count, LPVOID buffer)
                    pds->dsBmih.biCompression = BI_PNG;
                    break;
                 default:
-                    ASSERT(FALSE); /* this shouldn't happen */
+                    ASSERT(FALSE); /* This shouldn't happen */
             }
 
             pds->dsBmih.biSizeImage = psurf->SurfObj.cjBits;
@@ -927,7 +927,7 @@ BITMAP_GetObject(SURFACE *psurf, INT Count, LPVOID buffer)
     }
     else
     {
-        /* not set according to wine test, confirmed in win2k */
+        /* Not set according to wine test, confirmed in win2k */
         pBitmap->bmBits = NULL;
     }
 
index b902f45..33ce56b 100644 (file)
@@ -53,7 +53,7 @@ IntGdiSetBrushOwner(PBRUSH pbr, ULONG ulOwner)
     {
         // Allow user access to User Data.
         GDIOBJ_vSetObjectAttr(&pbr->BaseObject, pbr->pBrushAttr);
-        // FIXME: allocate brush attr
+        // FIXME: Allocate brush attr
     }
 
     GDIOBJ_vSetObjectOwner(&pbr->BaseObject, ulOwner);
@@ -164,7 +164,7 @@ BRUSH_GetObject(PBRUSH pbrush, INT Count, LPLOGBRUSH Buffer)
     /* Set Hatch */
     if ((pbrush->flAttrs & GDIBRUSH_IS_HATCH)!=0)
     {
-        /* FIXME : this is not the right value */
+        /* FIXME: This is not the right value */
         Buffer->lbHatch = (LONG)pbrush->hbmPattern;
     }
     else
index b5da499..20ce4e3 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * COPYRIGHT:        GNU GPL, See COPYING in the top level directory
- * PROJECT:          ReactOS kernel
+ * PROJECT:          ReactOS Win32k subsystem
  * PURPOSE:          Clip region functions
- * FILE:             subsys/win32k/objects/cliprgn.c
+ * FILE:             subsystems/win32/win32k/objects/cliprgn.c
  * PROGRAMER:        Unknown
  */
 
@@ -18,9 +18,9 @@ CLIPPING_UpdateGCRegion(DC* Dc)
    //HRGN hRgnVis;
    PREGION prgnClip, prgnGCClip;
 
-    // would prefer this, but the rest of the code sucks
-//    ASSERT(Dc->rosdc.hGCClipRgn);
-//    ASSERT(Dc->rosdc.hClipRgn);
+    /* Would prefer this, but the rest of the code sucks... */
+    //ASSERT(Dc->rosdc.hGCClipRgn);
+    //ASSERT(Dc->rosdc.hClipRgn);
    ASSERT(Dc->prgnVis);
    //hRgnVis = Dc->prgnVis->BaseObject.hHmgr;
 
@@ -34,7 +34,7 @@ CLIPPING_UpdateGCRegion(DC* Dc)
       IntGdiCombineRgn(prgnGCClip, Dc->prgnVis, NULL, RGN_COPY);
    else
    {
-      prgnClip = REGION_LockRgn(Dc->rosdc.hClipRgn); // FIXME: locking order, ugh
+      prgnClip = REGION_LockRgn(Dc->rosdc.hClipRgn); // FIXME: Locking order, ugh!
       IntGdiCombineRgn(prgnGCClip, Dc->prgnVis, prgnClip, RGN_AND);
       REGION_UnlockRgn(prgnClip);
    }
@@ -107,7 +107,7 @@ int FASTCALL GdiExtSelectClipRgn(PDC dc,
                                  HRGN hrgn,
                                  int fnMode)
 {
-  //  dc->fs &= ~DC_FLAG_DIRTY_RAO;
+  // dc->fs &= ~DC_FLAG_DIRTY_RAO;
 
   if (!hrgn)
   {
@@ -132,7 +132,7 @@ int FASTCALL GdiExtSelectClipRgn(PDC dc,
       RECTL rect;
       if(dc->prgnVis)
       {
-               REGION_GetRgnBox(dc->prgnVis, &rect);
+        REGION_GetRgnBox(dc->prgnVis, &rect);
         dc->rosdc.hClipRgn = IntSysCreateRectRgnIndirect(&rect);
       }
       else
@@ -177,14 +177,14 @@ GdiGetClipBox(HDC hDC, PRECTL rc)
    INT retval;
    PDC dc;
    PROSRGNDATA pRgnNew, pRgn = NULL;
-   BOOL Unlock = FALSE; //Small hack
+   BOOL Unlock = FALSE; // Small HACK
 
    if (!(dc = DC_LockDc(hDC)))
    {
       return ERROR;
    }
 
-   /* FIXME! Rao and Vis only! */
+   /* FIXME: Rao and Vis only! */
    if (dc->prgnAPI) // APIRGN
    {
       pRgn = dc->prgnAPI;
index 275a76e..fd39322 100644 (file)
@@ -2,7 +2,7 @@
  * COPYRIGHT:        GNU GPL, See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
  * PURPOSE:          Coordinate systems
- * FILE:             subsys/win32k/objects/coord.c
+ * FILE:             subsystems/win32/win32k/objects/coord.c
  * PROGRAMER:        Unknown
  */
 
@@ -117,7 +117,7 @@ DC_vUpdateViewportExt(PDC pdc)
     }
 }
 
-// FIXME: don't use floating point in the kernel! use XFORMOBJ function
+// FIXME: Don't use floating point in the kernel! use XFORMOBJ function
 BOOL FASTCALL
 IntGdiCombineTransform(
     LPXFORM XFormResult,
@@ -145,7 +145,7 @@ IntGdiCombineTransform(
     return TRUE;
 }
 
-// FIXME: should be XFORML and use XFORMOBJ functions
+// FIXME: Should be XFORML and use XFORMOBJ functions
 BOOL
 APIENTRY
 NtGdiCombineTransform(
@@ -313,7 +313,7 @@ NtGdiTransformPoints(
 
     _SEH2_TRY
     {
-        /* pointer was already probed! */
+        /* Pointer was already probed! */
         RtlCopyMemory(UnsafePtOut, Points, Size);
     }
     _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
@@ -385,7 +385,7 @@ NtGdiModifyWorldTransform(
     DWORD Mode)
 {
     PDC dc;
-    XFORM SafeXForm; //FIXME: use XFORML
+    XFORM SafeXForm; // FIXME: Use XFORML
     BOOL Ret = TRUE;
 
     dc = DC_LockDc(hDC);
index 7a0fe9d..58c176e 100644 (file)
 #define NDEBUG
 #include <debug.h>
 
-//FIXME: windows uses 0x0012009f
+// FIXME: Windows uses 0x0012009f
 #define DIRTY_DEFAULT DIRTY_CHARSET|DIRTY_BACKGROUND|DIRTY_TEXT|DIRTY_LINE|DIRTY_FILL
 
 PSURFACE psurfDefaultBitmap = NULL;
 PBRUSH pbrDefaultBrush = NULL;
 
-// FIXME: these should go to floatobj.h or something
+// FIXME: These should go to floatobj.h or something
 #ifdef _M_IX86
 #define FLOATOBJ_0 {0x00000000, 0x00000000}
 #define FLOATOBJ_1 {0x40000000, 0x00000002}
@@ -198,10 +198,10 @@ DC_vInitDc(
         pdc->erclBounds.bottom = 0;
         pdc->erclBoundsApp = pdc->erclBounds;
         pdc->erclClip = pdc->erclWindow;
-//        pdc->co = NULL
+        //pdc->co = NULL
     }
 
-//        pdc->dcattr.VisRectRegion:
+      //pdc->dcattr.VisRectRegion:
 
     /* Setup coordinate transformation data */
        pdc->dclevel.mxWorldToDevice = gmxWorldToDeviceDefault;
@@ -626,7 +626,7 @@ GreOpenDCW(
 
     DC_UnlockDc(pdc);
 
-    DPRINT("returning hdc = %p\n", hdc);
+    DPRINT("Returning hdc = %p\n", hdc);
 
     return hdc;
 }
@@ -820,8 +820,8 @@ IntGdiDeleteDC(HDC hDC, BOOL Force)
             DC_UnlockDc(DCToDelete);
             if(UserReleaseDC(NULL, hDC, FALSE))
             {
-                /* ReactOs feature : call UserReleaseDC
-                 * I don't think windows does it.
+                /* ReactOS feature: Call UserReleaseDC
+                 * I don't think Windows does it.
                  * Still, complain, no one should ever call DeleteDC
                  * on a window DC */
                  DPRINT1("No, you naughty application!\n");
@@ -858,7 +858,7 @@ APIENTRY
 NtGdiDeleteObjectApp(HANDLE hobj)
 {
     /* Complete all pending operations */
-    NtGdiFlushUserBatch(); // FIXME: we shouldn't need this
+    NtGdiFlushUserBatch(); // FIXME: We shouldn't need this
 
     if (GDI_HANDLE_IS_STOCKOBJ(hobj)) return TRUE;
 
@@ -871,7 +871,7 @@ NtGdiDeleteObjectApp(HANDLE hobj)
     if (GDI_HANDLE_GET_TYPE(hobj) != GDI_OBJECT_TYPE_DC)
         return GreDeleteObject(hobj);
 
-    // FIXME: everything should be callback based
+    // FIXME: Everything should be callback based
     return IntGdiDeleteDC(hobj, FALSE);
 }
 
index 39826dc..2988c08 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * COPYRIGHT:         See COPYING in the top level directory
- * PROJECT:           ReactOS kernel
+ * PROJECT:           ReactOS Win32k subsystem
  * PURPOSE:           Functions for creation and destruction of DCs
- * FILE:              subsystem/win32/win32k/objects/dcobjs.c
+ * FILE:              subsystems/win32/win32k/objects/dcobjs.c
  * PROGRAMER:         Timo Kreuzer (timo.kreuzer@rectos.org)
  */
 
@@ -149,7 +149,7 @@ GdiSelectPalette(
     HPALETTE oldPal = NULL;
     PPALETTE ppal;
 
-    // FIXME: mark the palette as a [fore\back]ground pal
+    // FIXME: Mark the palette as a [fore\back]ground pal
     pdc = DC_LockDc(hDC);
     if (!pdc)
     {
@@ -357,7 +357,7 @@ NtGdiSelectBitmap(
     /* Unlock the DC */
     DC_UnlockDc(pdc);
 
-    /* FIXME; improve by using a region without a handle and selecting it */
+    /* FIXME: Improve by using a region without a handle and selecting it */
     hVisRgn = IntSysCreateRectRgn( 0,
                                    0,
                                    sizlBitmap.cx,
@@ -493,21 +493,21 @@ NtGdiGetDCObject(HDC hDC, INT ObjectType)
     return SelObject;
 }
 
-/* See wine, msdn, osr and  Feng Yuan - Windows Graphics Programming Win32 Gdi And Directdraw
-
  1st: http://www.codeproject.com/gdi/cliprgnguide.asp is wrong!
-
  The intersection of the clip with the meta region is not Rao it's API!
  Go back and read 7.2 Clipping pages 418-19:
  Rao = API & Vis:
  1) The Rao region is the intersection of the API region and the system region,
     named after the Microsoft engineer who initially proposed it.
  2) The Rao region can be calculated from the API region and the system region.
-
  API:
     API region is the intersection of the meta region and the clipping region,
     clearly named after the fact that it is controlled by GDI API calls.
-*/
+/* See WINE, MSDN, OSR and Feng Yuan - Windows Graphics Programming Win32 GDI and DirectDraw
+ *
* 1st: http://www.codeproject.com/gdi/cliprgnguide.asp is wrong!
+ *
* The intersection of the clip with the meta region is not Rao it's API!
* Go back and read 7.2 Clipping pages 418-19:
* Rao = API & Vis:
* 1) The Rao region is the intersection of the API region and the system region,
*    named after the Microsoft engineer who initially proposed it.
* 2) The Rao region can be calculated from the API region and the system region.
+ *
* API:
*    API region is the intersection of the meta region and the clipping region,
*    clearly named after the fact that it is controlled by GDI API calls.
+ */
 INT
 APIENTRY
 NtGdiGetRandomRgn(
@@ -583,3 +583,4 @@ NtGdiEnumObjects(
     return 0;
 }
 
+/* EOF */
index 5af2052..c6f9625 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * COPYRIGHT:         See COPYING in the top level directory
- * PROJECT:           ReactOS kernel
+ * PROJECT:           ReactOS Win32k subsystem
  * PURPOSE:           Functions for saving and restoring dc states
- * FILE:              subsystem/win32/win32k/objects/dcstate.c
+ * FILE:              subsystems/win32/win32k/objects/dcstate.c
  * PROGRAMER:         Timo Kreuzer (timo.kreuzer@rectos.org)
  */
 
@@ -45,7 +45,7 @@ DC_vCopyState(PDC pdcSrc, PDC pdcDst, BOOL To)
     DC_vSelectLineBrush(pdcDst, pdcSrc->dclevel.pbrLine);
     DC_vSelectPalette(pdcDst, pdcSrc->dclevel.ppal);
 
-    // FIXME: handle refs
+    // FIXME: Handle refs
     pdcDst->dclevel.plfnt           = pdcSrc->dclevel.plfnt;
 
     /* Get/SetDCState() don't change hVisRgn field ("Undoc. Windows" p.559). */
@@ -56,7 +56,7 @@ DC_vCopyState(PDC pdcSrc, PDC pdcDst, BOOL To)
            pdcDst->rosdc.hClipRgn = IntSysCreateRectRgn(0, 0, 0, 0);
            NtGdiCombineRgn(pdcDst->rosdc.hClipRgn, pdcSrc->rosdc.hClipRgn, 0, RGN_COPY);
         }
-        // FIXME! Handle prgnMeta!
+        // FIXME: Handle prgnMeta!
     }
     else // Copy "!To" RestoreDC state.
     {  /* The VisRectRegion field needs to be set to a valid state */
@@ -250,13 +250,13 @@ NtGdiSaveDC(
     DC_vInitDc(pdcSave, DCTYPE_MEMORY, pdc->ppdev);
 
     /* Handle references here correctly */
-//    pdcSrc->dclevel.pSurface = NULL;
-//    pdcSrc->dclevel.pbrFill = NULL;
-//    pdcSrc->dclevel.pbrLine = NULL;
-//    pdcSrc->dclevel.ppal = NULL;
+      //pdcSrc->dclevel.pSurface = NULL;
+      //pdcSrc->dclevel.pbrFill = NULL;
+      //pdcSrc->dclevel.pbrLine = NULL;
+      //pdcSrc->dclevel.ppal = NULL;
 
     /* Make it a kernel handle
-       (FIXME: windows handles this different, see wiki)*/
+       (FIXME: Windows handles this differently, see Wiki) */
     GreSetObjectOwner(hdcSave, GDI_OBJ_HMGR_PUBLIC);
 
     /* Copy the current state */
@@ -266,7 +266,8 @@ NtGdiSaveDC(
     if (pdc->dctype == DCTYPE_MEMORY)
         DC_vSelectSurface(pdcSave, pdc->dclevel.pSurface);
 
-    /* Copy path. FIXME: why this way? */
+    /* Copy path */ 
+    /* FIXME: Why this way? */
     pdcSave->dclevel.hPath = pdc->dclevel.hPath;
     pdcSave->dclevel.flPath = pdc->dclevel.flPath | DCPATH_SAVESTATE;
     if (pdcSave->dclevel.hPath) pdcSave->dclevel.flPath |= DCPATH_SAVE;
@@ -285,3 +286,4 @@ NtGdiSaveDC(
     return lSaveDepth;
 }
 
+/* EOF */
index ba22092..e3c8702 100644 (file)
@@ -1,4 +1,3 @@
-
 #include <win32k.h>
 
 #define NDEBUG
@@ -141,7 +140,7 @@ IntSetDefaultRegion(PDC pdc)
     rclWnd.bottom = pdc->dclevel.sizl.cy;
     rclClip = rclWnd;
 
-//    EngAcquireSemaphoreShared(pdc->ppdev->hsemDevLock);
+    //EngAcquireSemaphoreShared(pdc->ppdev->hsemDevLock);
     if (pdc->ppdev->flFlags & PDEV_META_DEVICE)
     {
         pSurface = pdc->dclevel.pSurface;
@@ -153,7 +152,7 @@ IntSetDefaultRegion(PDC pdc)
             rclClip.bottom += pdc->ppdev->ptlOrigion.y;
         }
     }
-//    EngReleaseSemaphore(pdc->ppdev->hsemDevLock);
+    //EngReleaseSemaphore(pdc->ppdev->hsemDevLock);
 
     prgn = pdc->prgnVis;
 
@@ -180,7 +179,7 @@ IntSetDefaultRegion(PDC pdc)
         pdc->ptlDCOrig.y = 0;
         pdc->erclWindow = rclWnd;
         pdc->erclClip = rclClip;
-        /* Might be an InitDC or DCE....*/
+        /* Might be an InitDC or DCE... */
         pdc->ptlFillOrigin.x = pdc->dcattr.VisRectRegion.Rect.right;
         pdc->ptlFillOrigin.y = pdc->dcattr.VisRectRegion.Rect.bottom;
         return TRUE;
@@ -211,11 +210,9 @@ IntGdiSetHookFlags(HDC hDC, WORD Flags)
         return 0;
     }
 
-    wRet = dc->fs & DC_FLAG_DIRTY_RAO; // Fixme wrong flag!
-
-    /* "Undocumented Windows" info is slightly confusing.
-     */
+    wRet = dc->fs & DC_FLAG_DIRTY_RAO; // FIXME: Wrong flag!
 
+    /* Info in "Undocumented Windows" is slightly confusing. */
     DPRINT("DC %p, Flags %04x\n", hDC, Flags);
 
     if (Flags & DCHF_INVALIDATEVISRGN)
index d0d7468..6b8e281 100644 (file)
@@ -32,13 +32,13 @@ IntCreatePrimarySurface()
     SURFOBJ *pso;
     BOOL calledFromUser;
 
-    calledFromUser = UserIsEntered(); //fixme: possibly upgrade a shared lock
+    calledFromUser = UserIsEntered(); // FIXME: Possibly upgrade a shared lock
     if (!calledFromUser)
     {
         UserEnterExclusive();
     }
 
-    /* attach monitor */
+    /* Attach monitor */
     IntAttachMonitor(gppdevPrimary, 0);
 
     DPRINT("IntCreatePrimarySurface, pPrimarySurface=%p, pPrimarySurface->pSurface = %p\n",
index 9aa0760..188e378 100644 (file)
@@ -275,7 +275,7 @@ IntSetDIBits(
 
     if(!(psurfSrc && psurfDst))
     {
-        DPRINT1("Error, could not lock surfaces\n");
+        DPRINT1("Error: Could not lock surfaces\n");
         goto cleanup;
     }
 
@@ -998,7 +998,7 @@ NtGdiStretchDIBitsInternal(
     IN OPTIONAL LPBYTE pjInit,
     IN LPBITMAPINFO pbmi,
     IN DWORD dwUsage,
-    IN DWORD dwRop, // ms ntgdi.h says dwRop4(?)
+    IN DWORD dwRop, // MS ntgdi.h says dwRop4(?)
     IN UINT cjMaxInfo,
     IN UINT cjMaxBits,
     IN HANDLE hcmXform)
@@ -1065,7 +1065,7 @@ NtGdiStretchDIBitsInternal(
     }
     _SEH2_END
 
-    /* FIXME: locking twice is cheesy, coord tranlation in UM will fix it */
+    /* FIXME: Locking twice is cheesy, coord tranlation in UM will fix it */
     if (!(pdc = DC_LockDc(hdc)))
     {
         DPRINT1("Could not lock dc\n");
@@ -1543,7 +1543,7 @@ DIB_CreateDIBSection(
         else
         {
             /* For DIB Brushes */
-            DPRINT1("FIXME : Unsupported DIB_PAL_COLORS without a DC to map colors.\n");
+            DPRINT1("FIXME: Unsupported DIB_PAL_COLORS without a DC to map colors.\n");
             /* HACK */
             hpal = (HPALETTE) 0xFFFFFFFF;
         }
@@ -1555,7 +1555,7 @@ DIB_CreateDIBSection(
 
     if(!hpal)
     {
-        DPRINT1("Error : Could not create a palette for the DIB.\n");
+        DPRINT1("Error: Could not create a palette for the DIB.\n");
         goto cleanup;
     }
 
@@ -1608,7 +1608,7 @@ DIB_CreateDIBSection(
 cleanup:
     if (!res || !bmp || !bm.bmBits)
     {
-        DPRINT("got an error res=%08x, bmp=%p, bm.bmBits=%p\n", res, bmp, bm.bmBits);
+        DPRINT("Got an error res=%08x, bmp=%p, bm.bmBits=%p\n", res, bmp, bm.bmBits);
         if (bm.bmBits)
         {
             // MmUnsecureVirtualMemory(hSecure); // FIXME: Implement this!
@@ -1667,7 +1667,7 @@ DIB_GetBitmapInfo( const BITMAPINFOHEADER *header, LONG *width,
         *size   = 0;
         return 0;
     }
-    if (header->biSize >= sizeof(BITMAPINFOHEADER)) /* assume BITMAPINFOHEADER */
+    if (header->biSize >= sizeof(BITMAPINFOHEADER)) /* Assume BITMAPINFOHEADER */
     {
         *width  = header->biWidth;
         *height = header->biHeight;
@@ -1711,7 +1711,7 @@ INT FASTCALL DIB_BitmapInfoSize(const BITMAPINFO * info, WORD coloruse)
         return sizeof(BITMAPCOREHEADER) + colors *
                ((coloruse == DIB_RGB_COLORS) ? sizeof(RGBTRIPLE) : sizeof(WORD));
     }
-    else  /* assume BITMAPINFOHEADER */
+    else  /* Assume BITMAPINFOHEADER */
     {
         colors = info->bmiHeader.biClrUsed;
         if (colors > 256) colors = 256;
@@ -1888,7 +1888,7 @@ DIB_ConvertBitmapInfo (CONST BITMAPINFO* pbmi, DWORD Usage)
     }
     else if (Usage == DIB_PAL_COLORS)
     {
-        /* Invalid at high Res */
+        /* Invalid at high-res */
         return NULL;
     }
 
@@ -1934,9 +1934,4 @@ DIB_FreeConvertedBitmapInfo(BITMAPINFO* converted, BITMAPINFO* orig)
         ExFreePoolWithTag(converted, TAG_DIB);
 }
 
-
-
-
-
-
 /* EOF */
index 6390071..2847104 100644 (file)
@@ -59,8 +59,8 @@ SUCH DAMAGE.
 
 typedef struct _Rect
 {
-    int x, y;          /* top-left point inside rect */
-    int width, height; /* width and height of rect */
+    int x, y;          /* Top-left point inside rect */
+    int width, height; /* Width and height of rect */
 } Rect, *PRect;
 
 int FASTCALL IntFillRect(DC *dc, INT XLeft, INT YLeft, INT Width, INT Height, PBRUSH pbrush, BOOL Pen);
@@ -186,21 +186,21 @@ app_draw_ellipse(DC *g, Rect r, PBRUSH pbrush)
 
             if (T + A2*Y < XCRIT) /* E(X+1,Y-1/2) <= 0 */
             {
-                /* move outwards to encounter edge */
+                /* Move outwards to encounter edge */
                 X += 1;
                 T += DXT;
                 DXT += D2XT;
             }
             else if (T - B2*X >= YCRIT) /* e(x+1/2,y-1) > 0 */
             {
-                /* drop down one line */
+                /* Drop down one line */
                 Y -= 1;
                 T += DYT;
                 DYT += D2YT;
             }
             else
             {
-                /* drop diagonally down and out */
+                /* Drop diagonally down and out */
                 X += 1;
                 Y -= 1;
                 T += DXT + DYT;
@@ -219,7 +219,7 @@ app_draw_ellipse(DC *g, Rect r, PBRUSH pbrush)
 
         if (t + a2*y < xcrit) /* e(x+1,y-1/2) <= 0 */
         {
-            /* move outwards to encounter edge */
+            /* Move outwards to encounter edge */
             x += 1;
             t += dxt;
             dxt += d2xt;
@@ -228,7 +228,7 @@ app_draw_ellipse(DC *g, Rect r, PBRUSH pbrush)
         }
         else if (t - b2*x >= ycrit) /* e(x+1/2,y-1) > 0 */
         {
-            /* drop down one line */
+            /* Drop down one line */
             y -= 1;
             t += dyt;
             dyt += d2yt;
@@ -237,7 +237,7 @@ app_draw_ellipse(DC *g, Rect r, PBRUSH pbrush)
         }
         else
         {
-            /* drop diagonally down and out */
+            /* Drop diagonally down and out */
             x += 1;
             y -= 1;
             t += dxt + dyt;
@@ -279,7 +279,7 @@ app_draw_ellipse(DC *g, Rect r, PBRUSH pbrush)
             }
             else if (r1.y+r1.height < r2.y)
             {
-                /* draw distinct rectangles */
+                /* Draw distinct rectangles */
                 result &= app_fill_rect(g, rect(r1.x,r1.y,
                                                 W,1), pbrush, TRUE);
                 result &= app_fill_rect(g, rect(
@@ -293,14 +293,14 @@ app_draw_ellipse(DC *g, Rect r, PBRUSH pbrush)
                 prevy = r1.y;
             }
 
-            /* move down */
+            /* Move down */
             r1.y += 1;
             r2.y -= 1;
         }
 
         if (moveout)
         {
-            /* move outwards */
+            /* Move outwards */
             r1.x -= 1;
             r1.width += 2;
             r2.x -= 1;
@@ -309,7 +309,7 @@ app_draw_ellipse(DC *g, Rect r, PBRUSH pbrush)
     }
     if ((x <= a) && (prevy < r2.y))
     {
-        /* draw final line */
+        /* Draw final line */
         r1.height = r1.y+r1.height-r2.y;
         r1.y = r2.y;
 
@@ -390,11 +390,11 @@ app_fill_arc_rect(DC *g,
 
     if (r.y <= p0.y) //
     {
-        /* in top half of arc ellipse */
+        /* In top half of arc ellipse */
 
         if (p1.y <= r.y)
         {
-            /* start_line is in the top half and is */
+            /* Start_line is in the top half and is */
             /* intersected by the current Y scan line */
             if (rise1 == 0)
                 x1 = p1.x;
@@ -404,13 +404,13 @@ app_fill_arc_rect(DC *g,
         }
         else if ((start_angle >= 0) && (start_angle <= 180))
         {
-            /* start_line is above middle */
+            /* Start_line is above middle */
             x1 = p1.x;
             start_above = 1;
         }
         else
         {
-            /* start_line is below middle */
+            /* Start_line is below middle */
             x1 = r.x + r.width;
             start_above = 0;
         }
@@ -450,7 +450,7 @@ app_fill_arc_rect(DC *g,
         {
             if (start_angle > end_angle)
             {
-                /* fill outsides of wedge */
+                /* Fill outsides of wedge */
                 if (! app_fill_rect(g, rect(r.x, r.y,
                                             x1-r.x, r.height), pbrush, Pen))
                     return 0;
@@ -459,7 +459,7 @@ app_fill_arc_rect(DC *g,
             }
             else
             {
-                /* fill inside of wedge */
+                /* Fill inside of wedge */
                 r.width = x1-x2;
                 r.x = x2;
                 return app_fill_rect(g, r, pbrush, Pen);
@@ -467,13 +467,13 @@ app_fill_arc_rect(DC *g,
         }
         else if (start_above)
         {
-            /* fill to the left of the start_line */
+            /* Fill to the left of the start_line */
             r.width = x1-r.x;
             return app_fill_rect(g, r, pbrush, Pen);
         }
         else if (end_above)
         {
-            /* fill right of end_line */
+            /* Fill right of end_line */
             r.width = r.x+r.width-x2;
             r.x = x2;
             return app_fill_rect(g, r, pbrush, Pen);
@@ -488,7 +488,7 @@ app_fill_arc_rect(DC *g,
     }
     else
     {
-        /* in lower half of arc ellipse */
+        /* In lower half of arc ellipse */
 
         if (p1.y >= r.y)
         {
@@ -553,13 +553,13 @@ app_fill_arc_rect(DC *g,
         }
         else if (start_above)
         {
-            /* fill to the left of end_line */
+            /* Fill to the left of end_line */
             r.width = x2-r.x;
             return app_fill_rect(g,r, pbrush, Pen);
         }
         else if (end_above)
         {
-            /* fill right of start_line */
+            /* Fill right of start_line */
             r.width = r.x+r.width-x1;
             r.x = x1;
             return app_fill_rect(g,r, pbrush, Pen);
@@ -568,7 +568,7 @@ app_fill_arc_rect(DC *g,
         {
             if (start_angle > end_angle)
             {
-                /* fill outsides of wedge */
+                /* Fill outsides of wedge */
                 if (! app_fill_rect(g, rect(r.x, r.y,
                                             x2-r.x, r.height), pbrush, Pen))
                     return 0;
@@ -577,7 +577,7 @@ app_fill_arc_rect(DC *g,
             }
             else
             {
-                /* fill inside of wedge */
+                /* Fill inside of wedge */
                 r.width = x2-x1;
                 r.x = x1;
                 return app_fill_rect(g, r, pbrush, Pen);
@@ -653,12 +653,12 @@ app_fill_ellipse(DC *g, Rect r, PBRUSH pbrush)
     {
         if (t + a2*y < xcrit)   /* e(x+1,y-1/2) <= 0 */
         {
-            /* move outwards to encounter edge */
+            /* Move outwards to encounter edge */
             x += 1;
             t += dxt;
             dxt += d2xt;
 
-            /* move outwards */
+            /* Move outwards */
             r1.x -= 1;
             r1.width += 2;
             r2.x -= 1;
@@ -666,19 +666,19 @@ app_fill_ellipse(DC *g, Rect r, PBRUSH pbrush)
         }
         else if (t - b2*x >= ycrit)   /* e(x+1/2,y-1) > 0 */
         {
-            /* drop down one line */
+            /* Drop down one line */
             y -= 1;
             t += dyt;
             dyt += d2yt;
 
-            /* enlarge rectangles */
+            /* Enlarge rectangles */
             r1.height += 1;
             r2.height += 1;
             r2.y -= 1;
         }
         else
         {
-            /* drop diagonally down and out */
+            /* Drop diagonally down and out */
             x += 1;
             y -= 1;
             t += dxt + dyt;
@@ -687,16 +687,16 @@ app_fill_ellipse(DC *g, Rect r, PBRUSH pbrush)
 
             if ((r1.width > 0) && (r1.height > 0))
             {
-                /* draw rectangles first */
+                /* Draw rectangles first */
 
                 if (r1.y+r1.height < r2.y)
                 {
-                    /* distinct rectangles */
+                    /* Distinct rectangles */
                     result &= app_fill_rect(g, r1, pbrush, FALSE);
                     result &= app_fill_rect(g, r2, pbrush, FALSE);
                 }
 
-                /* move down */
+                /* Move down */
                 r1.y += r1.height;
                 r1.height = 1;
                 r2.y -= 1;
@@ -704,15 +704,15 @@ app_fill_ellipse(DC *g, Rect r, PBRUSH pbrush)
             }
             else
             {
-                /* skipped pixels on initial diagonal */
+                /* Skipped pixels on initial diagonal */
 
-                /* enlarge, rather than moving down */
+                /* Enlarge, rather than moving down */
                 r1.height += 1;
                 r2.height += 1;
                 r2.y -= 1;
             }
 
-            /* move outwards */
+            /* Move outwards */
             r1.x -= 1;
             r1.width += 2;
             r2.x -= 1;
@@ -721,7 +721,7 @@ app_fill_ellipse(DC *g, Rect r, PBRUSH pbrush)
     }
     if (r1.y < r2.y)
     {
-        /* overlap */
+        /* Overlap */
         r1.x = r.x;
         r1.width = r.width;
         r1.height = r2.y+r2.height-r1.y;
@@ -729,7 +729,7 @@ app_fill_ellipse(DC *g, Rect r, PBRUSH pbrush)
     }
     else if (x <= a)
     {
-        /* crossover, draw final line */
+        /* Crossover, draw final line */
         r1.x = r.x;
         r1.width = r.width;
         r1.height = r1.y+r1.height-r2.y;
@@ -807,33 +807,33 @@ app_fill_arc(DC *g, Rect r, int start_angle, int end_angle, PBRUSH pbrush, BOOL
     int movedown, moveout;
     int result = 1;
 
-    /* line descriptions */
+    /* Line descriptions */
     POINT p0, p1, p2;
 
 //     START_DEBUG();
 
-    /* if angles differ by 360 degrees or more, close the shape */
+    /* If angles differ by 360 degrees or more, close the shape */
     if ((start_angle + 360 <= end_angle) ||
             (start_angle - 360 >= end_angle))
     {
         return app_fill_ellipse(g, r, pbrush);
     }
 
-    /* make start_angle >= 0 and <= 360 */
+    /* Make start_angle >= 0 and <= 360 */
     while (start_angle < 0)
         start_angle += 360;
     start_angle %= 360;
 
-    /* make end_angle >= 0 and <= 360 */
+    /* Make end_angle >= 0 and <= 360 */
     while (end_angle < 0)
         end_angle += 360;
     end_angle %= 360;
 
-    /* draw nothing if the angles are equal */
+    /* Draw nothing if the angles are equal */
     if (start_angle == end_angle)
         return 1;
 
-    /* find arc wedge line end points */
+    /* Find arc wedge line end points */
     p1 = app_boundary_point(r, start_angle);
     p2 = app_boundary_point(r, end_angle);
     if (Chord)
@@ -841,7 +841,7 @@ app_fill_arc(DC *g, Rect r, int start_angle, int end_angle, PBRUSH pbrush, BOOL
     else
         p0 = pt(r.x + r.width/2, r.y + r.height/2);
 
-    /* initialise rectangles to be drawn */
+    /* Initialise rectangles to be drawn */
     r1.x = r.x + a;
     r1.y = r.y;
     r1.width = r.width & 1; /* i.e. if width is odd */
@@ -856,7 +856,7 @@ app_fill_arc(DC *g, Rect r, int start_angle, int end_angle, PBRUSH pbrush, BOOL
 
         if (t + a2*y < xcrit)   /* e(x+1,y-1/2) <= 0 */
         {
-            /* move outwards to encounter edge */
+            /* Move outwards to encounter edge */
             x += 1;
             t += dxt;
             dxt += d2xt;
@@ -865,7 +865,7 @@ app_fill_arc(DC *g, Rect r, int start_angle, int end_angle, PBRUSH pbrush, BOOL
         }
         else if (t - b2*x >= ycrit)   /* e(x+1/2,y-1) > 0 */
         {
-            /* drop down one line */
+            /* Drop down one line */
             y -= 1;
             t += dyt;
             dyt += d2yt;
@@ -874,7 +874,7 @@ app_fill_arc(DC *g, Rect r, int start_angle, int end_angle, PBRUSH pbrush, BOOL
         }
         else
         {
-            /* drop diagonally down and out */
+            /* Drop diagonally down and out */
             x += 1;
             y -= 1;
             t += dxt + dyt;
@@ -908,7 +908,7 @@ app_fill_arc(DC *g, Rect r, int start_angle, int end_angle, PBRUSH pbrush, BOOL
 
             if ((r1.width > 0) && (r1.y+r1.height < r2.y))
             {
-                /* distinct rectangles */
+                /* Distinct rectangles */
                 result &= app_fill_arc_rect(g, r1,
                                             p0, p1, p2,
                                             start_angle, end_angle, pbrush, FALSE);
@@ -917,14 +917,14 @@ app_fill_arc(DC *g, Rect r, int start_angle, int end_angle, PBRUSH pbrush, BOOL
                                             start_angle, end_angle, pbrush, FALSE);
             }
 
-            /* move down */
+            /* Move down */
             r1.y += 1;
             r2.y -= 1;
         }
 
         if (moveout)
         {
-            /* move outwards */
+            /* Move outwards */
             r1.x -= 1;
             r1.width += 2;
             r2.x -= 1;
@@ -933,7 +933,7 @@ app_fill_arc(DC *g, Rect r, int start_angle, int end_angle, PBRUSH pbrush, BOOL
     }
     if (r1.y < r2.y)
     {
-        /* overlap */
+        /* Overlap */
         r1.x = r.x;
         r1.width = r.width;
         r1.height = r2.y+r2.height-r1.y;
@@ -948,7 +948,7 @@ app_fill_arc(DC *g, Rect r, int start_angle, int end_angle, PBRUSH pbrush, BOOL
     }
     else if (x <= a)
     {
-        /* crossover, draw final line */
+        /* Crossover, draw final line */
         r1.x = r.x;
         r1.width = r.width;
         r1.height = r1.y+r1.height-r2.y;
@@ -1001,39 +1001,39 @@ int app_draw_arc(DC *g, Rect r, int start_angle, int end_angle, PBRUSH pbrushPen
     int D2XT = B2+B2;
     int D2YT = A2+A2;
 
-    /* arc rectangle calculations */
+    /* Arc rectangle calculations */
     int movedown, moveout;
     int innerX = 0, prevx, prevy, W;
     Rect r1, r2;
     int result = 1;
 
-    /* line descriptions */
+    /* Line descriptions */
     POINT p0, p1, p2;
 
 //     START_DEBUG();
 
-    /* if angles differ by 360 degrees or more, close the shape */
+    /* If angles differ by 360 degrees or more, close the shape */
     if ((start_angle + 360 <= end_angle) ||
             (start_angle - 360 >= end_angle))
     {
         return app_draw_ellipse(g, r, pbrushPen);
     }
 
-    /* make start_angle >= 0 and <= 360 */
+    /* Make start_angle >= 0 and <= 360 */
     while (start_angle < 0)
         start_angle += 360;
     start_angle %= 360;
 
-    /* make end_angle >= 0 and <= 360 */
+    /* Make end_angle >= 0 and <= 360 */
     while (end_angle < 0)
         end_angle += 360;
     end_angle %= 360;
 
-    /* draw nothing if the angles are equal */
+    /* Draw nothing if the angles are equal */
     if (start_angle == end_angle)
         return 1;
 
-    /* find arc wedge line end points */
+    /* Find arc wedge line end points */
     p1 = app_boundary_point(r, start_angle);
     p2 = app_boundary_point(r, end_angle);
     if (Chord)
@@ -1041,7 +1041,7 @@ int app_draw_arc(DC *g, Rect r, int start_angle, int end_angle, PBRUSH pbrushPen
     else
         p0 = pt(r.x + r.width/2, r.y + r.height/2);
 
-    /* determine ellipse rectangles */
+    /* Determine ellipse rectangles */
     r1.x = r.x + a;
     r1.y = r.y;
     r1.width = r.width & 1; /* i.e. if width is odd */
@@ -1061,21 +1061,21 @@ int app_draw_arc(DC *g, Rect r, int start_angle, int end_angle, PBRUSH pbrushPen
 
             if (T + A2*Y < XCRIT) /* E(X+1,Y-1/2) <= 0 */
             {
-                /* move outwards to encounter edge */
+                /* Move outwards to encounter edge */
                 X += 1;
                 T += DXT;
                 DXT += D2XT;
             }
             else if (T - B2*X >= YCRIT) /* e(x+1/2,y-1) > 0 */
             {
-                /* drop down one line */
+                /* Drop down one line */
                 Y -= 1;
                 T += DYT;
                 DYT += D2YT;
             }
             else
             {
-                /* drop diagonally down and out */
+                /* Drop diagonally down and out */
                 X += 1;
                 Y -= 1;
                 T += DXT + DYT;
@@ -1094,7 +1094,7 @@ int app_draw_arc(DC *g, Rect r, int start_angle, int end_angle, PBRUSH pbrushPen
 
         if (t + a2*y < xcrit) /* e(x+1,y-1/2) <= 0 */
         {
-            /* move outwards to encounter edge */
+            /* Move outwards to encounter edge */
             x += 1;
             t += dxt;
             dxt += d2xt;
@@ -1103,7 +1103,7 @@ int app_draw_arc(DC *g, Rect r, int start_angle, int end_angle, PBRUSH pbrushPen
         }
         else if (t - b2*x >= ycrit) /* e(x+1/2,y-1) > 0 */
         {
-            /* drop down one line */
+            /* Drop down one line */
             y -= 1;
             t += dyt;
             dyt += d2yt;
@@ -1112,7 +1112,7 @@ int app_draw_arc(DC *g, Rect r, int start_angle, int end_angle, PBRUSH pbrushPen
         }
         else
         {
-            /* drop diagonally down and out */
+            /* Drop diagonally down and out */
             x += 1;
             y -= 1;
             t += dxt + dyt;
@@ -1158,7 +1158,7 @@ int app_draw_arc(DC *g, Rect r, int start_angle, int end_angle, PBRUSH pbrushPen
             }
             else if (r1.y+r1.height < r2.y)
             {
-                /* draw distinct rectangles */
+                /* Draw distinct rectangles */
                 result &= app_fill_arc_rect(g, rect(
                                                 r1.x,r1.y,W,1),
                                             p0, p1, p2,
@@ -1180,14 +1180,14 @@ int app_draw_arc(DC *g, Rect r, int start_angle, int end_angle, PBRUSH pbrushPen
                 prevy = r1.y;
             }
 
-            /* move down */
+            /* Move down */
             r1.y += 1;
             r2.y -= 1;
         }
 
         if (moveout)
         {
-            /* move outwards */
+            /* Move outwards */
             r1.x -= 1;
             r1.width += 2;
             r2.x -= 1;
@@ -1196,7 +1196,7 @@ int app_draw_arc(DC *g, Rect r, int start_angle, int end_angle, PBRUSH pbrushPen
     }
     if ((x <= a) && (prevy < r2.y))
     {
-        /* draw final lines */
+        /* Draw final lines */
         r1.height = r1.y+r1.height-r2.y;
         r1.y = r2.y;
 
@@ -1267,7 +1267,7 @@ IntFillRect( DC *dc,
     {
         pdcattr = dc->pdcattr;
 
-        /* fix negative spaces */
+        /* Fix negative spaces */
         if (Width < 0)
         {
             XLeft += Width;
@@ -1402,7 +1402,7 @@ IntFillRoundRect( PDC dc,
                   PBRUSH pbrush)
 {
     Rect r;
-    int rx, ry; /* radius in x and y directions */
+    int rx, ry; /* Radius in x and y directions */
 
     //           x    y          Width          Height
     r = rect( Left, Top, abs(Right-Left), abs(Bottom-Top));
@@ -1468,7 +1468,7 @@ IntDrawRoundRect( PDC dc,
                   PBRUSH pbrushPen)
 {
     Rect r;
-    int rx, ry; /* radius in x and y directions */
+    int rx, ry; /* Radius in x and y directions */
     int w = pbrushPen->ptPenWidth.x;
 
     r = rect( Left, Top, abs(Right-Left), abs(Bottom-Top));
index 05485c1..8cf969f 100644 (file)
@@ -21,7 +21,7 @@ IntGdiPolygon(PDC    dc,
 {
     SURFACE *psurf;
     PBRUSH pbrLine, pbrFill;
-    BOOL ret = FALSE; // default to failure
+    BOOL ret = FALSE; // Default to failure
     RECTL DestRect;
     int CurrentPoint;
     PDC_ATTR pdcattr;
@@ -29,7 +29,7 @@ IntGdiPolygon(PDC    dc,
 //    int Left;
 //    int Top;
 
-    ASSERT(dc); // caller's responsibility to pass a valid dc
+    ASSERT(dc); // Caller's responsibility to pass a valid dc
 
     if (!Points || Count < 2 )
     {
@@ -38,7 +38,7 @@ IntGdiPolygon(PDC    dc,
     }
 
 /*
-    //Find start x, y
+    // Find start x, y
     Left = Points[0].x;
     Top  = Points[0].y;
     for (CurrentPoint = 1; CurrentPoint < Count; ++CurrentPoint) {
@@ -81,7 +81,7 @@ IntGdiPolygon(PDC    dc,
         pbrFill = dc->dclevel.pbrFill;
         pbrLine = dc->dclevel.pbrLine;
         psurf = dc->dclevel.pSurface;
-        /* FIXME - psurf can be NULL!!!! don't assert but handle this case gracefully! */
+        /* FIXME: psurf can be NULL!!!! don't assert but handle this case gracefully! */
         ASSERT(psurf);
 
         /* Now fill the polygon with the current fill brush. */
@@ -116,7 +116,7 @@ IntGdiPolygon(PDC    dc,
                                    &dc->eboLine.BrushObject,
                                    Points[i].x,          /* From */
                                    Points[i].y,
-                                   Points[i+1].x,          /* To */
+                                   Points[i+1].x,        /* To */
                                    Points[i+1].y,
                                    &DestRect,
                                    ROP2_TO_MIX(pdcattr->jROP2)); /* MIX */
@@ -291,8 +291,8 @@ NtGdiEllipse(
     else
     {
         RtlCopyMemory(&tmpFillBrushObj, pFillBrushObj, sizeof(tmpFillBrushObj));
-//        tmpFillBrushObj.ptOrigin.x += RectBounds.left - Left;
-//        tmpFillBrushObj.ptOrigin.y += RectBounds.top - Top;
+        //tmpFillBrushObj.ptOrigin.x += RectBounds.left - Left;
+        //tmpFillBrushObj.ptOrigin.y += RectBounds.top - Top;
         tmpFillBrushObj.ptOrigin.x += dc->ptlDCOrig.x;
         tmpFillBrushObj.ptOrigin.y += dc->ptlDCOrig.y;
         ret = IntFillEllipse( dc,
@@ -321,14 +321,14 @@ NtGdiEllipse(
 
 #if 0
 
-//When the fill mode is ALTERNATE, GDI fills the area between odd-numbered and
-//even-numbered polygon sides on each scan line. That is, GDI fills the area between the
-//first and second side, between the third and fourth side, and so on.
+// When the fill mode is ALTERNATE, GDI fills the area between odd-numbered and
+// even-numbered polygon sides on each scan line. That is, GDI fills the area between the
+// first and second side, between the third and fourth side, and so on.
 
-//WINDING Selects winding mode (fills any region with a nonzero winding value).
-//When the fill mode is WINDING, GDI fills any region that has a nonzero winding value.
-//This value is defined as the number of times a pen used to draw the polygon would go around the region.
-//The direction of each edge of the polygon is important.
+// WINDING Selects winding mode (fills any region with a nonzero winding value).
+// When the fill mode is WINDING, GDI fills any region that has a nonzero winding value.
+// This value is defined as the number of times a pen used to draw the polygon would go around the region.
+// The direction of each edge of the polygon is important.
 
 extern BOOL FillPolygon(PDC dc,
                             SURFOBJ *SurfObj,
@@ -513,13 +513,13 @@ IntRectangle(PDC dc,
 {
     SURFACE *psurf = NULL;
     PBRUSH pbrLine, pbrFill;
-    BOOL       ret = FALSE; // default to failure
+    BOOL       ret = FALSE; // Default to failure
     RECTL      DestRect;
     MIX        Mix;
     PDC_ATTR pdcattr;
     POINTL BrushOrigin;
 
-    ASSERT ( dc ); // caller's responsibility to set this up
+    ASSERT ( dc ); // Caller's responsibility to set this up
 
     pdcattr = dc->pdcattr;
 
@@ -595,7 +595,7 @@ IntRectangle(PDC dc,
 
     // Draw the rectangle with the current pen
 
-    ret = TRUE; // change default to success
+    ret = TRUE; // Change default to success
 
     if (!(pbrLine->flAttrs & GDIBRUSH_IS_NULL))
     {
@@ -647,7 +647,7 @@ NtGdiRectangle(HDC  hDC,
                int  BottomRect)
 {
     DC   *dc;
-    BOOL ret; // default to failure
+    BOOL ret; // Default to failure
 
     dc = DC_LockDc(hDC);
     if (!dc)
@@ -701,10 +701,10 @@ IntRoundRect(
     PBRUSH   pbrLine, pbrFill;
     RECTL RectBounds;
     LONG PenWidth, PenOrigWidth;
-    BOOL ret = TRUE; // default to success
+    BOOL ret = TRUE; // Default to success
     BRUSH brushTemp;
 
-    ASSERT ( dc ); // caller's responsibility to set this up
+    ASSERT ( dc ); // Caller's responsibility to set this up
 
     if ( PATH_IsPathOpen(dc->dclevel) )
         return PATH_RoundRect ( dc, Left, Top, Right, Bottom,
@@ -818,7 +818,7 @@ NtGdiRoundRect(
     int  Height)
 {
     DC   *dc = DC_LockDc(hDC);
-    BOOL  ret = FALSE; /* default to failure */
+    BOOL  ret = FALSE; /* Default to failure */
 
     DPRINT("NtGdiRoundRect(0x%x,%i,%i,%i,%i,%i,%i)\n",hDC,LeftRect,TopRect,RightRect,BottomRect,Width,Height);
     if ( !dc )
@@ -859,7 +859,7 @@ GreGradientFill(
     ULONG i;
     BOOL bRet;
 
-    /* check parameters */
+    /* Check parameters */
     if (ulMode & GRADIENT_FILL_TRIANGLE)
     {
         PGRADIENT_TRIANGLE pTriangle = (PGRADIENT_TRIANGLE)pMesh;
@@ -908,10 +908,10 @@ GreGradientFill(
     {
         /* Memory DC with no surface selected */
         DC_UnlockDc(pdc);
-        return TRUE; //CHECKME
+        return TRUE; // CHECKME
     }
 
-    /* calculate extent */
+    /* Calculate extent */
     rclExtent.left = rclExtent.right = pVertex->x;
     rclExtent.top = rclExtent.bottom = pVertex->y;
     for (i = 0; i < nVertex; i++)
index ce69036..dfbd9ac 100644 (file)
@@ -384,7 +384,7 @@ IntGetFontLanguageInfo(PDC Dc)
 
   pdcattr = Dc->pdcattr;
 
-  /* this might need a test for a HEBREW- or ARABIC_CHARSET as well */
+  /* This might need a test for a HEBREW- or ARABIC_CHARSET as well */
   if ( pdcattr->lTextAlign & TA_RTLREADING )
      if( (fontsig.fsCsb[0]&GCP_REORDER_MASK)!=0 )
                     result|=GCP_REORDER;
@@ -473,7 +473,7 @@ NtGdiAddFontResourceW(
   NTSTATUS Status;
   int Ret;
 
-  /* FIXME - Protect with SEH? */
+  /* FIXME: Protect with SEH? */
   RtlInitUnicodeString(&SafeFileName, pwszFiles);
 
   /* Reserve for prepending '\??\' */
@@ -916,7 +916,7 @@ NtGdiGetFontResourceInfoInternalW(
         WCHAR FullName[LF_FULLFACESIZE];
     } Buffer;
 
-    /* FIXME: handle cFiles > 0 */
+    /* FIXME: Handle cFiles > 0 */
 
     /* Check for valid dwType values
        dwType == 4 seems to be handled by gdi32 only */
@@ -1116,7 +1116,7 @@ NtGdiHfontCreate(
   if (SafeLogfont.elfEnumLogfontEx.elfLogFont.lfEscapement !=
       SafeLogfont.elfEnumLogfontEx.elfLogFont.lfOrientation)
   {
-    /* this should really depend on whether GM_ADVANCED is set */
+    /* This should really depend on whether GM_ADVANCED is set */
     TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfOrientation =
     TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfEscapement;
   }
@@ -1124,7 +1124,7 @@ NtGdiHfontCreate(
 
   if (pvCliData && hNewFont)
   {
-    // FIXME: use GDIOBJ_InsertUserData
+    // FIXME: Use GDIOBJ_InsertUserData
     KeEnterCriticalRegion();
     {
        INT Index = GDI_HANDLE_GET_INDEX((HGDIOBJ)hNewFont);
index e908e58..4cab296 100644 (file)
@@ -51,9 +51,9 @@ typedef struct _FONT_CACHE_ENTRY
 static LIST_ENTRY FontCacheListHead;
 static UINT FontCacheNumEntries;
 
-static PWCHAR ElfScripts[32] =   /* these are in the order of the fsCsb[0] bits */
+static PWCHAR ElfScripts[32] =   /* These are in the order of the fsCsb[0] bits */
 {
-    L"Western", /*00*/
+    L"Western", /* 00 */
     L"Central_European",
     L"Cyrillic",
     L"Greek",
@@ -61,17 +61,17 @@ static PWCHAR ElfScripts[32] =   /* these are in the order of the fsCsb[0] bits
     L"Hebrew",
     L"Arabic",
     L"Baltic",
-    L"Vietnamese", /*08*/
-    NULL, NULL, NULL, NULL, NULL, NULL, NULL, /*15*/
+    L"Vietnamese", /* 08 */
+    NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 15 */
     L"Thai",
     L"Japanese",
     L"CHINESE_GB2312",
     L"Hangul",
     L"CHINESE_BIG5",
     L"Hangul(Johab)",
-    NULL, NULL, /*23*/
+    NULL, NULL, /* 23 */
     NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-    L"Symbol" /*31*/
+    L"Symbol" /* 31 */
 };
 
 /*
@@ -106,7 +106,7 @@ static const CHARSETINFO FontTci[MAXTCIINDEX] =
     { HANGEUL_CHARSET, 949, {{0,0,0,0},{FS_WANSUNG,0}} },
     { CHINESEBIG5_CHARSET, 950, {{0,0,0,0},{FS_CHINESETRAD,0}} },
     { JOHAB_CHARSET, 1361, {{0,0,0,0},{FS_JOHAB,0}} },
-    /* reserved for alternate ANSI and OEM */
+    /* Reserved for alternate ANSI and OEM */
     { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
     { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
     { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
@@ -115,7 +115,7 @@ static const CHARSETINFO FontTci[MAXTCIINDEX] =
     { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
     { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
     { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
-    /* reserved for system */
+    /* Reserved for system */
     { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
     { SYMBOL_CHARSET, CP_SYMBOL, {{0,0,0,0},{FS_SYMBOL,0}} }
 };
@@ -444,7 +444,7 @@ TextIntCreateFontIndirect(CONST LPLOGFONTW lf, HFONT *NewFont)
     RtlCopyMemory(&TextObj->logfont.elfEnumLogfontEx.elfLogFont, lf, sizeof(LOGFONTW));
     if (lf->lfEscapement != lf->lfOrientation)
     {
-        /* this should really depend on whether GM_ADVANCED is set */
+        /* This should really depend on whether GM_ADVANCED is set */
         TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfOrientation =
             TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfEscapement;
     }
@@ -575,8 +575,8 @@ FillTM(TEXTMETRICW *TM, PFONTGDI FontGDI, TT_OS2 *pOS2, TT_HoriHeader *pHori, FT
     TM->tmAscent = (FT_MulFix(Ascent, YScale) + 32) >> 6;
     TM->tmDescent = (FT_MulFix(Descent, YScale) + 32) >> 6;
 #else /* This (ros) code was previously affected by a FreeType bug, but it works now */
-    TM->tmAscent = (Face->size->metrics.ascender + 32) >> 6; /* units above baseline */
-    TM->tmDescent = (32 - Face->size->metrics.descender) >> 6; /* units below baseline */
+    TM->tmAscent = (Face->size->metrics.ascender + 32) >> 6; /* Units above baseline */
+    TM->tmDescent = (32 - Face->size->metrics.descender) >> 6; /* Units below baseline */
 #endif
     TM->tmInternalLeading = (FT_MulFix(Ascent + Descent - Face->units_per_EM, YScale) + 32) >> 6;
 
@@ -659,9 +659,9 @@ FillTM(TEXTMETRICW *TM, PFONTGDI FontGDI, TT_OS2 *pOS2, TT_HoriHeader *pHori, FT
     case PAN_ANY:
     case PAN_NO_FIT:
     case PAN_FAMILY_TEXT_DISPLAY:
-    case PAN_FAMILY_PICTORIAL: /* symbol fonts get treated as if they were text */
-                               /* which is clearly not what the panose spec says. */
-        if (TM->tmPitchAndFamily == 0) /* fixed */
+    case PAN_FAMILY_PICTORIAL: /* Symbol fonts get treated as if they were text */
+                               /* Which is clearly not what the panose spec says. */
+        if (TM->tmPitchAndFamily == 0) /* Fixed */
         {
             TM->tmPitchAndFamily = FF_MODERN;
         }
@@ -743,24 +743,24 @@ IntGetOutlineTextMetrics(PFONTGDI FontGDI,
 
     /* These names should be read from the TT name table */
 
-    /* length of otmpFamilyName */
+    /* Length of otmpFamilyName */
     Needed += FamilyNameW.Length + sizeof(WCHAR);
 
     RtlInitUnicodeString(&Regular, L"regular");
-    /* length of otmpFaceName */
+    /* Length of otmpFaceName */
     if (0 == RtlCompareUnicodeString(&StyleNameW, &Regular, TRUE))
     {
-        Needed += FamilyNameW.Length + sizeof(WCHAR); /* just the family name */
+        Needed += FamilyNameW.Length + sizeof(WCHAR); /* Just the family name */
     }
     else
     {
         Needed += FamilyNameW.Length + StyleNameW.Length + (sizeof(WCHAR) << 1); /* family + " " + style */
     }
 
-    /* length of otmpStyleName */
+    /* Length of otmpStyleName */
     Needed += StyleNameW.Length + sizeof(WCHAR);
 
-    /* length of otmpFullName */
+    /* Length of otmpFullName */
     Needed += FamilyNameW.Length + StyleNameW.Length + (sizeof(WCHAR) << 1);
 
     if (Size < Needed)
@@ -794,7 +794,7 @@ IntGetOutlineTextMetrics(PFONTGDI FontGDI,
         return 0;
     }
 
-    pPost = FT_Get_Sfnt_Table(FontGDI->face, ft_sfnt_post); /* we can live with this failing */
+    pPost = FT_Get_Sfnt_Table(FontGDI->face, ft_sfnt_post); /* We can live with this failing */
 
     Error = FT_Get_WinFNT_Header(FontGDI->face , &Win);
 
@@ -1050,7 +1050,7 @@ FontFamilyFillInfo(PFONTFAMILYINFO Info, PCWSTR FaceName, PFONTGDI FontGDI)
                 fs.fsCsb[0] |= FS_SYMBOL;
         }
         if (fs.fsCsb[0] == 0)
-        { /* let's see if we can find any interesting cmaps */
+        { /* Let's see if we can find any interesting cmaps */
             for (i = 0; i < FontGDI->face->num_charmaps; i++)
             {
                 switch (FontGDI->face->charmaps[i]->encoding)
@@ -1503,7 +1503,7 @@ ftGdiGetGlyphOutline(
 
     IntLockFreeType;
 
-    /* During testing, I never saw this used. In here just incase.*/
+    /* During testing, I never saw this used. It is here just in case. */
     if (ft_face->charmap == NULL)
     {
         DPRINT("WARNING: No charmap selected!\n");
@@ -1512,7 +1512,7 @@ ftGdiGetGlyphOutline(
         for (n = 0; n < ft_face->num_charmaps; n++)
         {
             charmap = ft_face->charmaps[n];
-            DPRINT("found charmap encoding: %u\n", charmap->encoding);
+            DPRINT("Found charmap encoding: %u\n", charmap->encoding);
             if (charmap->encoding != 0)
             {
                 found = charmap;
@@ -1532,7 +1532,7 @@ ftGdiGetGlyphOutline(
 
 //  FT_Set_Pixel_Sizes(ft_face,
 //                     TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfWidth,
-    /* FIXME should set character height if neg */
+    /* FIXME: Should set character height if neg */
 //                     (TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight == 0 ?
 //                      dc->ppdev->devinfo.lfDefaultFont.lfHeight : abs(TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight)));
 
@@ -1637,7 +1637,7 @@ ftGdiGetGlyphOutline(
         needsTransform = TRUE;
     }
 
-    if (potm) ExFreePoolWithTag(potm, GDITAG_TEXT); /* It looks like we are finished with potm ATM.*/
+    if (potm) ExFreePoolWithTag(potm, GDITAG_TEXT); /* It looks like we are finished with potm ATM. */
 
     if (!needsTransform)
     {
@@ -1681,7 +1681,7 @@ ftGdiGetGlyphOutline(
         bottom = bottom & -64;
         top = (top + 63) & -64;
 
-        DPRINT("transformed box: (%d,%d - %d,%d)\n", left, top, right, bottom);
+        DPRINT("Transformed box: (%d,%d - %d,%d)\n", left, top, right, bottom);
         vec.x = ft_face->glyph->metrics.horiAdvance;
         vec.y = 0;
         FT_Vector_Transform(&vec, &transMat);
@@ -1710,7 +1710,7 @@ ftGdiGetGlyphOutline(
 
     if (ft_face->glyph->format != ft_glyph_format_outline && iFormat != GGO_BITMAP)
     {
-        DPRINT1("loaded a bitmap\n");
+        DPRINT1("Loaded a bitmap\n");
         return GDI_ERROR;
     }
 
@@ -1760,7 +1760,7 @@ ftGdiGetGlyphOutline(
             break;
 
         default:
-            DPRINT1("loaded glyph format %x\n", ft_face->glyph->format);
+            DPRINT1("Loaded glyph format %x\n", ft_face->glyph->format);
             return GDI_ERROR;
         }
         break;
@@ -1830,7 +1830,7 @@ ftGdiGetGlyphOutline(
             }
         }
         default:
-            DPRINT1("loaded glyph format %x\n", ft_face->glyph->format);
+            DPRINT1("Loaded glyph format %x\n", ft_face->glyph->format);
             return GDI_ERROR;
         }
         start = pvBuf;
@@ -1900,7 +1900,7 @@ ftGdiGetGlyphOutline(
                 else if (point <= outline->contours[contour] &&
                          outline->tags[point] & FT_Curve_Tag_On)
                 {
-                    /* add closing pt for bezier */
+                    /* Add closing pt for bezier */
                     if (pvBuf)
                         FTVectorToPOINTFX(&outline->points[point], &ppc->apfx[cpfx]);
                     cpfx++;
@@ -2030,8 +2030,7 @@ ftGdiGetGlyphOutline(
                         (outline->tags[point] & FT_Curve_Tag_On) ==
                         (outline->tags[point-1] & FT_Curve_Tag_On));
                 /* At the end of a contour Windows adds the start point,
-                   but only for Beziers and we've already done that.
-                */
+                   but only for Beziers and we've already done that. */
                 if (point <= outline->contours[contour] &&
                         outline->tags[point] & FT_Curve_Tag_On)
                 {
@@ -2100,7 +2099,7 @@ TextIntGetTextExtentPoint(PDC dc,
         for (n = 0; n < face->num_charmaps; n++)
         {
             charmap = face->charmaps[n];
-            DPRINT("found charmap encoding: %u\n", charmap->encoding);
+            DPRINT("Found charmap encoding: %u\n", charmap->encoding);
             if (charmap->encoding != 0)
             {
                 found = charmap;
@@ -2128,7 +2127,7 @@ TextIntGetTextExtentPoint(PDC dc,
 
     error = FT_Set_Pixel_Sizes(face,
                                TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfWidth,
-                               /* FIXME should set character height if neg */
+                               /* FIXME: Should set character height if neg */
                                (TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight == 0 ?
                                                           dc->ppdev->devinfo.lfDefaultFont.lfHeight : abs(TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight)));
     if (error)
@@ -2166,7 +2165,7 @@ TextIntGetTextExtentPoint(PDC dc,
             }
         }
 
-        /* retrieve kerning distance */
+        /* Retrieve kerning distance */
         if (use_kerning && previous && glyph_index)
         {
             FT_Vector delta;
@@ -2255,7 +2254,7 @@ ftGdiGetTextCharsetInfo(
     }
     DPRINT("Csb 1=%x  0=%x\n", fs.fsCsb[1],fs.fsCsb[0]);
     if (fs.fsCsb[0] == 0)
-    { /* let's see if we can find any interesting cmaps */
+    { /* Let's see if we can find any interesting cmaps */
         for (i = 0; i < Face->num_charmaps; i++)
         {
             switch (Face->charmaps[i]->encoding)
@@ -2295,7 +2294,7 @@ ftGdiGetTextCharsetInfo(
         {
             if (IntTranslateCharsetInfo(&fs0, &csi, TCI_SRCFONTSIG))
             {
-                //*cp = csi.ciACP;
+                // *cp = csi.ciACP;
                 DPRINT("Hit 2\n");
                 Ret = csi.ciCharset;
                 goto Exit;
@@ -2325,7 +2324,7 @@ ftGetFontUnicodeRanges(PFONTGDI Font, PGLYPHSET glyphset)
 
         char_code_prev = char_code = FT_Get_First_Char(face, &glyph_code);
 
-        DPRINT("face encoding FT_ENCODING_UNICODE, number of glyphs %ld, first glyph %u, first char %04lx\n",
+        DPRINT("Face encoding FT_ENCODING_UNICODE, number of glyphs %ld, first glyph %u, first char %04lx\n",
                face->num_glyphs, glyph_code, char_code);
 
         if (!glyph_code) return 0;
@@ -2342,7 +2341,7 @@ ftGetFontUnicodeRanges(PFONTGDI Font, PGLYPHSET glyphset)
         {
             if (char_code < char_code_prev)
             {
-                DPRINT1("expected increasing char code from FT_Get_Next_Char\n");
+                DPRINT1("Expected increasing char code from FT_Get_Next_Char\n");
                 return 0;
             }
             if (char_code - char_code_prev > 1)
@@ -2365,7 +2364,7 @@ ftGetFontUnicodeRanges(PFONTGDI Font, PGLYPHSET glyphset)
         }
     }
     else
-        DPRINT1("encoding %u not supported\n", face->charmap->encoding);
+        DPRINT1("Encoding %u not supported\n", face->charmap->encoding);
 
     size = sizeof(GLYPHSET) + sizeof(WCRANGE) * (num_ranges - 1);
     if (glyphset)
@@ -2415,7 +2414,7 @@ ftGdiGetTextMetricsW(
         IntLockFreeType;
         Error = FT_Set_Pixel_Sizes(Face,
                                    TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfWidth,
-                                   /* FIXME should set character height if neg */
+                                   /* FIXME: Should set character height if neg */
                                    (TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight == 0 ?
                                    dc->ppdev->devinfo.lfDefaultFont.lfHeight : abs(TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight)));
         IntUnLockFreeType;
@@ -2675,7 +2674,7 @@ IntFontType(PFONTGDI Font)
     {
         Font->FontObj.flFontType |= FO_POSTSCRIPT;
     }
-    /* check for the presence of the 'CFF ' table to check if the font is Type1 */
+    /* Check for the presence of the 'CFF ' table to check if the font is Type1 */
     if (!FT_Load_Sfnt_Table(Font->face, FT_MAKE_TAG('C','F','F',' '), 0, NULL, &tmp_size))
     {
         Font->FontObj.flFontType |= (FO_CFF|FO_POSTSCRIPT);
@@ -2783,7 +2782,7 @@ IntGetFullFileName(
 
     Status = ZwOpenFile(
                  &hFile,
-                 0, //FILE_READ_ATTRIBUTES,
+                 0, // FILE_READ_ATTRIBUTES,
                  &ObjectAttributes,
                  &IoStatusBlock,
                  FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
@@ -2861,7 +2860,7 @@ IntGdiGetFontResourceInfo(
             {
                 if (RtlEqualUnicodeString(&NameInfo1->Name, &NameInfo2->Name, FALSE))
                 {
-                    /* found */
+                    /* Found */
                     FontFamilyFillInfo(&Info, FontEntry->FaceName.Buffer, FontEntry->Font);
                     bFound = TRUE;
                     break;
@@ -2884,7 +2883,7 @@ IntGdiGetFontResourceInfo(
 
     switch (dwType)
     {
-    case 0: /* FIXME: returns 1 or 2, don't know what this is atm */
+    case 0: /* FIXME: Returns 1 or 2, don't know what this is atm */
         *(DWORD*)pBuffer = 1;
         *pdwBytes = sizeof(DWORD);
         break;
@@ -2986,11 +2985,11 @@ ftGdiGetKerningPairs( PFONTGDI Font,
 }
 
 
-//////////////////
+///////////////////////////////////////////////////////////////////////////
 //
 // Functions needing sorting.
 //
-///////////////
+///////////////////////////////////////////////////////////////////////////
 int APIENTRY
 NtGdiGetFontFamilyInfo(HDC Dc,
                        LPLOGFONTW UnsafeLogFont,
@@ -3239,7 +3238,7 @@ GreExtTextOutW(
         for (n = 0; n < face->num_charmaps; n++)
         {
             charmap = face->charmaps[n];
-            DPRINT("found charmap encoding: %u\n", charmap->encoding);
+            DPRINT("Found charmap encoding: %u\n", charmap->encoding);
             if (charmap->encoding != 0)
             {
                 found = charmap;
@@ -3266,7 +3265,7 @@ GreExtTextOutW(
     error = FT_Set_Pixel_Sizes(
                 face,
                 TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfWidth,
-                /* FIXME should set character height if neg */
+                /* FIXME: Should set character height if neg */
                 (TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight == 0 ?
                 dc->ppdev->devinfo.lfDefaultFont.lfHeight : abs(TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight)));
     if (error)
@@ -3342,7 +3341,7 @@ GreExtTextOutW(
                 }
 
             }
-            /* retrieve kerning distance */
+            /* Retrieve kerning distance */
             if (use_kerning && previous && glyph_index)
             {
                 FT_Vector delta;
@@ -3530,12 +3529,12 @@ GreExtTextOutW(
         if (NULL == Dx)
         {
             TextLeft += realglyph->root.advance.x >> 10;
-             DPRINT("new TextLeft: %d\n", TextLeft);
+             DPRINT("New TextLeft: %d\n", TextLeft);
         }
         else
         {
             TextLeft += Dx[i<<DxShift] << 6;
-             DPRINT("new TextLeft2: %d\n", TextLeft);
+             DPRINT("New TextLeft2: %d\n", TextLeft);
         }
 
         if (DxShift)
@@ -3804,7 +3803,7 @@ NtGdiGetCharABCWidthsW(
     IntLockFreeType;
     FT_Set_Pixel_Sizes(face,
                        TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfWidth,
-                       /* FIXME should set character height if neg */
+                       /* FIXME: Should set character height if neg */
                        (TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight == 0 ?
                        dc->ppdev->devinfo.lfDefaultFont.lfHeight : abs(TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight)));
 
@@ -3833,7 +3832,7 @@ NtGdiGetCharABCWidthsW(
         adv  = (face->glyph->advance.x + 32) >> 6;
 
 //      int test = (INT)(face->glyph->metrics.horiAdvance + 63) >> 6;
-//      DPRINT1("Advance Wine %d and Advance Ros %d\n",test, adv ); /* It's the same!*/
+//      DPRINT1("Advance Wine %d and Advance Ros %d\n",test, adv ); /* It's the same! */
 
         lsb = left >> 6;
         bbx = (right - left) >> 6;
@@ -3971,7 +3970,7 @@ NtGdiGetCharWidthW(
     IntLockFreeType;
     FT_Set_Pixel_Sizes(face,
                        TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfWidth,
-                       /* FIXME should set character height if neg */
+                       /* FIXME: Should set character height if neg */
                        (TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight == 0 ?
                        dc->ppdev->devinfo.lfDefaultFont.lfHeight : abs(TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight)));
 
@@ -4190,7 +4189,7 @@ NtGdiGetGlyphIndicesW(
 
     for (i = 0; i < cwc; i++)
     {
-        Buffer[i] = FT_Get_Char_Index(face, UnSafepwc[i]); // FIXME: unsafe!
+        Buffer[i] = FT_Get_Char_Index(face, UnSafepwc[i]); // FIXME: Unsafe!
         if (Buffer[i] == 0)
         {
             Buffer[i] = DefChar;
@@ -4221,5 +4220,4 @@ ErrorRet:
     return GDI_ERROR;
 }
 
-
 /* EOF */
index e7dfd28..4c380e6 100644 (file)
@@ -5,7 +5,6 @@
 #include <debug.h>
 
 
-//
 //
 // Gdi Batch Flush support functions.
 //
@@ -217,7 +216,7 @@ NtGdiFlushUserBatch(VOID)
     }
   }
 
-  // FIXME: on xp the function returns &pTeb->RealClientId, maybe VOID?
+  // FIXME: On Windows XP the function returns &pTeb->RealClientId, maybe VOID?
   return STATUS_SUCCESS;
 }
 
index 54b711f..803d41e 100644 (file)
@@ -2,7 +2,7 @@
  * PROJECT:         ReactOS win32 kernel mode subsystem
  * LICENSE:         GPL - See COPYING in the top level directory
  * FILE:            subsystems/win32/win32k/objects/gdidbg.c
- * PURPOSE:         Special debugging functions for gdi
+ * PURPOSE:         Special debugging functions for GDI
  * PROGRAMMERS:     Timo Kreuzer
  */
 
@@ -17,7 +17,7 @@ extern ULONG gulFirstUnused;
 
 ULONG gulLogUnique = 0;
 
-/* note the following values need to be sorted */
+/* Note: the following values need to be sorted */
 DBG_CHANNEL DbgChannels[DbgChCount]={
     {L"EngBlt", DbgChEngBlt},
     {L"EngBrush", DbgChEngBrush},
@@ -125,12 +125,12 @@ DbgDumpGdiHandleTable(void)
 
     if (leak_reported)
     {
-        DPRINT1("gdi handle abusers already reported!\n");
+        DPRINT1("GDI handle abusers already reported!\n");
         return;
     }
 
     leak_reported = 1;
-    DPRINT1("reporting gdi handle abusers:\n");
+    DPRINT1("Reporting GDI handle abusers:\n");
 
     /* We've got serious business to do */
     KeRaiseIrql(DISPATCH_LEVEL, &OldIrql);
@@ -200,7 +200,7 @@ DbgDumpGdiHandleTable(void)
     }
 
     if (i < nTraces)
-        DbgPrint("(list terminated - the remaining entries have 1 allocation only)\n");
+        DbgPrint("(List terminated - the remaining entries have 1 allocation only)\n");
 
     KeLowerIrql(OldIrql);
 
@@ -238,7 +238,7 @@ DbgGdiHTIntegrityCheck()
 
        KeEnterCriticalRegion();
 
-       /* FIXME: check reserved entries */
+       /* FIXME: Check reserved entries */
 
        /* Now go through the deleted objects */
        i = gulFirstFree & 0xffff;
@@ -522,7 +522,7 @@ QueryEnvironmentVariable(PUNICODE_STRING Name,
    PPEB Peb;
    PWSTR Environment; 
 
-   /* Ugly hack for reactos system threads */
+   /* Ugly HACK for ReactOS system threads */
    if(!NtCurrentTeb())
    {
        return(STATUS_VARIABLE_NOT_FOUND);
@@ -704,7 +704,7 @@ BOOL DbgInitDebugChannels()
         /* Get the env var again */
         Status = QueryEnvironmentVariable(&Name, &Value);
     }
-    
+
    /* Check for error */
     if(!NT_SUCCESS(Status))
     {
@@ -719,7 +719,7 @@ BOOL DbgInitDebugChannels()
     /* Parse the variable */
     ret = DbgParseDebugChannels(ppi, &Value);
 
-    /* Clean up*/
+    /* Clean up */
     if(Value.Buffer != valBuffer)
     {
         ExFreePool(Value.Buffer);
@@ -728,3 +728,4 @@ BOOL DbgInitDebugChannels()
     return ret;
 }
 
+/* EOF */
index ed01b75..0b97387 100644 (file)
@@ -37,7 +37,7 @@
 #define NDEBUG
 #include <debug.h>
 
-// move to gdidbg.h
+// Move to gdidbg.h
 #if DBG
 #define DBG_INCREASE_LOCK_COUNT(pti, hobj) \
     if (pti) ((PTHREADINFO)pti)->acExclusiveLockCount[((ULONG_PTR)hobj >> 16) & 0x1f]++;
@@ -160,7 +160,7 @@ InitGdiHandleTable(void)
     SIZE_T cjViewSize = 0;
 
     /* Create a section for the shared handle table */
-    liSize.QuadPart = sizeof(GDI_HANDLE_TABLE);//GDI_HANDLE_COUNT * sizeof(ENTRY);
+    liSize.QuadPart = sizeof(GDI_HANDLE_TABLE); // GDI_HANDLE_COUNT * sizeof(ENTRY);
     status = MmCreateSection(&gpvGdiHdlTblSection,
                              SECTION_ALL_ACCESS,
                              NULL,
@@ -262,7 +262,7 @@ ENTRY_pentPopFreeEntry(VOID)
             /* Check if we have unused entries left */
             if (iFirst >= GDI_HANDLE_COUNT)
             {
-                DPRINT1("No more gdi handles left!\n");
+                DPRINT1("No more GDI handles left!\n");
                 return 0;
             }
 
@@ -353,14 +353,14 @@ ENTRY_ReferenceEntryByHandle(HGDIOBJ hobj, FLONG fl)
         /* Check if the slot is deleted */
         if ((cOldRefs & REF_MASK_VALID) == 0)
         {
-            DPRINT("GDIOBJ: slot not valid: 0x%lx, hobh=%p\n", cOldRefs, hobj);
+            DPRINT("GDIOBJ: Slot is not valid: 0x%lx, hobh=%p\n", cOldRefs, hobj);
             return NULL;
         }
 
         /* Check if the unique value matches */
         if (pentry->FullUnique != (USHORT)((ULONG_PTR)hobj >> 16))
         {
-            DPRINT("GDIOBJ: wrong unique value. Handle: 0x%4x, entry: 0x%4x\n",
+            DPRINT("GDIOBJ: Wrong unique value. Handle: 0x%4x, entry: 0x%4x\n",
                    (USHORT)((ULONG_PTR)hobj >> 16, pentry->FullUnique));
             return NULL;
         }
@@ -536,7 +536,7 @@ GDIOBJ_ReferenceObjectByHandle(
     ASSERT_SHARED_OBJECT_TYPE(objt);
     if ((((ULONG_PTR)hobj >> 16) & 0x1f) != objt)
     {
-        DPRINT("GDIOBJ: wrong type. handle=%p, type=%x\n", hobj, objt);
+        DPRINT("GDIOBJ: Wrong type. handle=%p, type=%x\n", hobj, objt);
         return NULL;
     }
 
@@ -544,7 +544,7 @@ GDIOBJ_ReferenceObjectByHandle(
     pentry = ENTRY_ReferenceEntryByHandle(hobj, 0);
     if (!pentry)
     {
-        DPRINT("GDIOBJ: requested handle 0x%p is not valid.\n", hobj);
+        DPRINT("GDIOBJ: Requested handle 0x%p is not valid.\n", hobj);
         return NULL;
     }
 
@@ -606,7 +606,7 @@ GDIOBJ_LockObject(
     ASSERT_EXCLUSIVE_OBJECT_TYPE(objt);
     if ((((ULONG_PTR)hobj >> 16) & 0x1f) != objt)
     {
-        DPRINT("wrong object type: hobj=0x%p, objt=0x%x\n", hobj, objt);
+        DPRINT("Wrong object type: hobj=0x%p, objt=0x%x\n", hobj, objt);
         return NULL;
     }
 
@@ -614,7 +614,7 @@ GDIOBJ_LockObject(
     pentry = ENTRY_ReferenceEntryByHandle(hobj, 0);
     if (!pentry)
     {
-        DPRINT("GDIOBJ: requested handle 0x%p is not valid.\n", hobj);
+        DPRINT("GDIOBJ: Requested handle 0x%p is not valid.\n", hobj);
         return NULL;
     }
 
@@ -687,7 +687,7 @@ GDIOBJ_hInsertObject(
     pentry = ENTRY_pentPopFreeEntry();
     if (!pentry)
     {
-        DPRINT1("GDIOBJ: could not get a free entry.\n");
+        DPRINT1("GDIOBJ: Could not get a free entry.\n");
         return NULL;
     }
 
@@ -730,7 +730,7 @@ GDIOBJ_vSetObjectOwner(
 {
     PENTRY pentry;
 
-    /* This is a ugly hack, need to fix IntGdiSetDCOwnerEx */
+    /* This is a ugly HACK, needed to fix IntGdiSetDCOwnerEx */
     if (GDI_HANDLE_IS_STOCKOBJ(pobj->hHmgr))
     {
         DPRINT("Trying to set ownership of stock object %p to %lx\n", pobj->hHmgr, ulOwner);
@@ -974,7 +974,7 @@ GreSetObjectOwner(
     /* Check for stock objects */
     if (GDI_HANDLE_IS_STOCKOBJ(hobj))
     {
-        DPRINT("GreSetObjectOwner: got stock object %p\n", hobj);
+        DPRINT("GreSetObjectOwner: Got stock object %p\n", hobj);
         return FALSE;
     }
 
@@ -982,7 +982,7 @@ GreSetObjectOwner(
     pentry = ENTRY_ReferenceEntryByHandle(hobj, 0);
     if (!pentry)
     {
-        DPRINT("GreSetObjectOwner: invalid handle 0x%p.\n", hobj);
+        DPRINT("GreSetObjectOwner: Invalid handle 0x%p.\n", hobj);
         return FALSE;
     }
 
@@ -1013,7 +1013,7 @@ GreGetObject(
         objt != GDIObjType_LFONT_TYPE &&
         objt != GDIObjType_PAL_TYPE)
     {
-        DPRINT1("GreGetObject: invalid object type\n");
+        DPRINT1("GreGetObject: Invalid object type\n");
         return 0;
     }
 
@@ -1143,7 +1143,7 @@ NtGdiCreateClientObj(
     handle = GDIOBJ_hInsertObject(pObject, GDI_OBJ_HMGR_POWNED);
     if (!handle)
     {
-        DPRINT1("NtGdiCreateClientObj Could not create a handle.\n");
+        DPRINT1("NtGdiCreateClientObj: Could not create a handle.\n");
         GDIOBJ_vFreeObject(pObject);
         return NULL;
     }
@@ -1199,7 +1199,7 @@ GDIOBJ_ConvertToStockObj(HGDIOBJ *phObj)
     pentry = ENTRY_ReferenceEntryByHandle(*phObj, 0);
     if (!pentry)
     {
-        DPRINT1("GDIOBJ: requested handle 0x%p is not valid.\n", *phObj);
+        DPRINT1("GDIOBJ: Requested handle 0x%p is not valid.\n", *phObj);
         return FALSE;
     }
 
@@ -1340,3 +1340,4 @@ GDI_CleanupForProcess(struct _EPROCESS *Process)
     return TRUE;
 }
 
+/* EOF */
index 84e12f4..adb5b67 100644 (file)
@@ -33,7 +33,7 @@ typedef struct _GDI_POOL
     ULONG cjSectionSize; // 32 * cjAllocSize, rounded up to pages
     ULONG cSlotsPerSection;
     ULONG cEmptySections;
-    EX_PUSH_LOCK pushlock; // for pool growth
+    EX_PUSH_LOCK pushlock; // For pool growth
 #if DBG_ENABLE_EVENT_LOGGING
     SLIST_HEADER slhLog;
 #endif
index 97028e3..c8f5349 100644 (file)
@@ -268,7 +268,7 @@ UpdateDeviceGammaRamp( HDEV hPDev )
 //
 // ICM registry subkey sets internal brightness range, gamma range is 128 or
 // 256 when icm is init.
-INT IcmGammaRangeSet = 128; // <- make it global
+INT IcmGammaRangeSet = 128; // <- Make it global
 
 BOOL
 FASTCALL
@@ -401,7 +401,7 @@ NtGdiSetIcmMode(HDC  hDC,
                 ULONG nCommand,
                 ULONG EnableICM) // ulMode
 {
-  /* FIXME: this should be coded someday  */
+  /* FIXME: This should be coded someday  */
   if (EnableICM == ICM_OFF)
     {
       return  ICM_OFF;
index 3d4e849..3d93541 100644 (file)
@@ -30,7 +30,7 @@ IntGdiMoveToEx(DC      *dc,
         {
             Point->x = pdcattr->ptfxCurrent.x; // ret prev before change.
             Point->y = pdcattr->ptfxCurrent.y;
-            IntDPtoLP ( dc, Point, 1);         // reconvert back.
+            IntDPtoLP ( dc, Point, 1);         // Reconvert back.
         }
         else
         {
@@ -91,7 +91,7 @@ IntGdiLineTo(DC  *dc,
         Ret = PATH_LineTo(dc, XEnd, YEnd);
         if (Ret)
         {
-            // FIXME - PATH_LineTo should maybe do this? No
+            // FIXME: PATH_LineTo should maybe do this? No
             pdcattr->ptlCurrent.x = XEnd;
             pdcattr->ptlCurrent.y = YEnd;
             pdcattr->ptfxCurrent = pdcattr->ptlCurrent;
@@ -127,7 +127,7 @@ IntGdiLineTo(DC  *dc,
         Bounds.right = max(Points[0].x, Points[1].x);
         Bounds.bottom = max(Points[0].y, Points[1].y);
 
-        /* get BRUSH from current pen. */
+        /* Get BRUSH from current pen. */
         pbrLine = dc->dclevel.pbrLine;
         ASSERT(pbrLine);
 
@@ -161,7 +161,7 @@ IntGdiPolyBezier(DC      *dc,
                  LPPOINT pt,
                  DWORD   Count)
 {
-    BOOL ret = FALSE; // default to FAILURE
+    BOOL ret = FALSE; // Default to FAILURE
 
     if ( PATH_IsPathOpen(dc->dclevel) )
     {
@@ -189,7 +189,7 @@ IntGdiPolyBezierTo(DC      *dc,
                    LPPOINT pt,
                    DWORD  Count)
 {
-    BOOL ret = FALSE; // default to failure
+    BOOL ret = FALSE; // Default to failure
     PDC_ATTR pdcattr = dc->pdcattr;
 
     if ( PATH_IsPathOpen(dc->dclevel) )
@@ -255,7 +255,7 @@ IntGdiPolyline(DC      *dc,
         if (Points != NULL)
         {
             psurf = dc->dclevel.pSurface;
-            /* FIXME - psurf can be NULL!!!!
+            /* FIXME: psurf can be NULL!!!!
                Don't assert but handle this case gracefully! */
             ASSERT(psurf);
 
@@ -294,14 +294,14 @@ IntGdiPolylineTo(DC      *dc,
                  LPPOINT pt,
                  DWORD   Count)
 {
-    BOOL ret = FALSE; // default to failure
+    BOOL ret = FALSE; // Default to failure
     PDC_ATTR pdcattr = dc->pdcattr;
 
     if (PATH_IsPathOpen(dc->dclevel))
     {
         ret = PATH_PolylineTo(dc, pt, Count);
     }
-    else /* do it using Polyline */
+    else /* Do it using Polyline */
     {
         POINT *pts = ExAllocatePoolWithTag(PagedPool,
                                            sizeof(POINT) * (Count + 1),
@@ -337,7 +337,7 @@ IntGdiPolyPolyline(DC      *dc,
     int i;
     LPPOINT pts;
     PULONG pc;
-    BOOL ret = FALSE; // default to failure
+    BOOL ret = FALSE; // Default to failure
     pts = pt;
     pc = PolyPoints;
 
@@ -449,7 +449,7 @@ NtGdiPolyDraw(
            _SEH2_LEAVE;
         }
 
-        /* check for valid point types */
+        /* Check for valid point types */
         for (i = 0; i < cCount; i++)
         {
            switch (lpbTypes[i])
index 17500bc..948d756 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * COPYRIGHT:         See COPYING in the top level directory
- * PROJECT:           ReactOS kernel
+ * PROJECT:           ReactOS Win32k subsystem
  * PURPOSE:           GDI Palette Functions
- * FILE:              subsys/win32k/eng/palette.c
+ * FILE:              subsystems/win32/win32k/objects/palette.c
  * PROGRAMERS:        Jason Filby
  *                    Timo Kreuzer
  */
 #define NDEBUG
 #include <debug.h>
 
-static UINT SystemPaletteUse = SYSPAL_NOSTATIC;  /* the program need save the pallete and restore it */
+static UINT SystemPaletteUse = SYSPAL_NOSTATIC;  /* The program need save the pallete and restore it */
 
 PALETTE gpalRGB, gpalBGR, gpalMono, gpalRGB555, gpalRGB565, *gppalDefault;
 PPALETTE appalSurfaceDefault[11];
 
 const PALETTEENTRY g_sysPalTemplate[NB_RESERVED_COLORS] =
 {
-  // first 10 entries in the system palette
-  // red  green blue  flags
+  // First 10 entries in the system palette
+  // Red  Green Blue  Flags
   { 0x00, 0x00, 0x00, PC_SYS_USED },
   { 0x80, 0x00, 0x00, PC_SYS_USED },
   { 0x00, 0x80, 0x00, PC_SYS_USED },
@@ -45,7 +45,7 @@ const PALETTEENTRY g_sysPalTemplate[NB_RESERVED_COLORS] =
   { 0x00, 0x00, 0xff, PC_SYS_USED },
   { 0xff, 0x00, 0xff, PC_SYS_USED },
   { 0x00, 0xff, 0xff, PC_SYS_USED },
-  { 0xff, 0xff, 0xff, PC_SYS_USED }     // last 10
+  { 0xff, 0xff, 0xff, PC_SYS_USED }     // Last 10
 };
 
 unsigned short GetNumberOfBits(unsigned int dwMask)
@@ -66,7 +66,7 @@ InitPaletteImpl()
     HPALETTE hpalette;
     PLOGPALETTE palPtr;
 
-    // create default palette (20 system colors)
+    // Create default palette (20 system colors)
     palPtr = ExAllocatePoolWithTag(PagedPool,
                                    sizeof(LOGPALETTE) +
                                        (NB_RESERVED_COLORS * sizeof(PALETTEENTRY)),
@@ -362,7 +362,7 @@ ULONG
 NTAPI
 PALETTE_ulGetNearestIndex(PALETTE* ppal, ULONG ulColor)
 {
-    if (ppal->flFlags & PAL_INDEXED) // use fl & PALINDEXED
+    if (ppal->flFlags & PAL_INDEXED) // Use fl & PALINDEXED
         return PALETTE_ulGetNearestPaletteIndex(ppal, ulColor);
     else
         return PALETTE_ulGetNearestBitFieldsIndex(ppal, ulColor);
@@ -523,7 +523,7 @@ NtGdiCreatePaletteInternal ( IN LPLOGPALETTE pLogPal, IN UINT cEntries )
     }
     else
     {
-        /* FIXME - Handle PalGDI == NULL!!!! */
+        /* FIXME: Handle PalGDI == NULL!!!! */
         DPRINT1("PalGDI is NULL\n");
     }
   return NewPalette;
@@ -542,7 +542,7 @@ HPALETTE APIENTRY NtGdiCreateHalftonePalette(HDC  hDC)
     Palette.NumberOfEntries = 256;
     if (IntGetSystemPaletteEntries(hDC, 0, 256, Palette.aEntries) == 0)
     {
-        /* from wine, more that 256 color math */
+        /* From WINE, more that 256 color math */
         Palette.NumberOfEntries = 20;
         for (i = 0; i < Palette.NumberOfEntries; i++)
         {
@@ -556,7 +556,7 @@ HPALETTE APIENTRY NtGdiCreateHalftonePalette(HDC  hDC)
         Palette.aEntries[0].peBlue=0x00;
         Palette.aEntries[0].peGreen=0x00;
 
-        /* the first 6 */
+        /* The first 6 */
         for (i=1; i <= 6; i++)
         {
             Palette.aEntries[i].peRed=(i%2)?0x80:0;
@@ -787,13 +787,13 @@ IntGdiRealizePalette(HDC hDC)
 
     if(!(ppalSurf->flFlags & PAL_INDEXED))
     {
-        // FIXME : set error?
+        // FIXME: Set error?
         goto cleanup;
     }
 
     ASSERT(ppalDC->flFlags & PAL_INDEXED);
 
-    // FIXME : should we resize ppalSurf if it's too small?
+    // FIXME: Should we resize ppalSurf if it's too small?
     realize = (ppalDC->NumColors < ppalSurf->NumColors) ? ppalDC->NumColors : ppalSurf->NumColors;
 
     for(i=0; i<realize; i++)
index 1f75742..5eb62e2 100644 (file)
@@ -369,7 +369,7 @@ PATH_Rectangle ( PDC dc, INT x1, INT y1, INT x2, INT y2 )
  * Should be called when a call to RoundRect is performed on a DC that has
  * an open path. Returns TRUE if successful, else FALSE.
  *
- * FIXME: it adds the same entries to the path as windows does, but there
+ * FIXME: It adds the same entries to the path as windows does, but there
  * is an error in the bezier drawing code so that there are small pixel-size
  * gaps when the resulting path is drawn by StrokePath()
  */
@@ -971,7 +971,7 @@ PATH_PolyPolygon ( PDC dc, const POINT* pts, const INT* counts, UINT polygons )
       if(point == 0) startpt = pt;
         PATH_AddEntry(pPath, &pt, (point == 0) ? PT_MOVETO : PT_LINETO);
     }
-    /* win98 adds an extra line to close the figure for some reason */
+    /* Win98 adds an extra line to close the figure for some reason */
     PATH_AddEntry(pPath, &startpt, PT_LINETO | PT_CLOSEFIGURE);
   }
   PATH_UnlockPath( pPath );
@@ -1688,7 +1688,7 @@ PATH_WidenPath(DC *dc)
                 PATH_AddEntry(pStrokes[numStrokes - 1], &point, pPath->pFlags[i]);
                 break;
             case PT_BEZIERTO:
-                /* should never happen because of the FlattenPath call */
+                /* Should never happen because of the FlattenPath call */
                 DPRINT1("Should never happen\n");
                 break;
             default:
@@ -1946,7 +1946,7 @@ static inline INT int_from_fixed(FIXED f)
 /**********************************************************************
  *      PATH_BezierTo
  *
- * internally used by PATH_add_outline
+ * Internally used by PATH_add_outline
  */
 static
 VOID
@@ -2113,7 +2113,7 @@ PATH_ExtTextOut(PDC dc, INT x, INT y, UINT flags, const RECTL *lprc,
                                        TRUE);
         if (dwSize == GDI_ERROR) return FALSE;
 
-        /* add outline only if char is printable */
+        /* Add outline only if char is printable */
         if (dwSize)
         {
            outline = ExAllocatePoolWithTag(PagedPool, dwSize, TAG_PATH);
@@ -2254,7 +2254,7 @@ BOOL
 APIENTRY
 NtGdiCloseFigure(HDC hDC)
 {
-  BOOL Ret = FALSE; // default to failure
+  BOOL Ret = FALSE; // Default to failure
   PDC pDc;
   PPATH pPath;
 
@@ -2280,7 +2280,7 @@ NtGdiCloseFigure(HDC hDC)
   }
   else
   {
-     // FIXME: check if lasterror is set correctly
+     // FIXME: Check if lasterror is set correctly
      EngSetLastError(ERROR_CAN_NOT_COMPLETE);
   }
 
@@ -2552,7 +2552,7 @@ NtGdiPathToRegion(HDC  hDC)
 
   if (pPath->state!=PATH_Closed)
   {
-     //FIXME: check that setlasterror is being called correctly
+     // FIXME: Check that setlasterror is being called correctly
      EngSetLastError(ERROR_CAN_NOT_COMPLETE);
   }
   else
index 7c15230..2b9eca3 100644 (file)
@@ -81,7 +81,7 @@ IntGdiExtCreatePen(
    pbrushPen->ulPenStyle = dwPenStyle;
    pbrushPen->BrushAttr.lbColor = ulColor;
    pbrushPen->ulStyle = ulBrushStyle;
-   // FIXME: copy the bitmap first ?
+   // FIXME: Copy the bitmap first ?
    pbrushPen->hbmClient = (HANDLE)ulClientHatch;
    pbrushPen->dwStyleCount = dwStyleCount;
    pbrushPen->pStyle = pStyle;
@@ -155,7 +155,7 @@ IntGdiExtCreatePen(
                 goto ExitCleanup;
             }
          }
-         /* FIXME: what style here? */
+         /* FIXME: What style here? */
          pbrushPen->flAttrs |= 0;
          break;
 
@@ -370,6 +370,4 @@ NtGdiExtCreatePen(
    return hPen;
 }
 
-
-
 /* EOF */
index 40a51ec..f8c8aed 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * COPYRIGHT:         See COPYING in the top level directory
- * PROJECT:           ReactOS kernel
+ * PROJECT:           ReactOS Win32k subsystem
  * PURPOSE:           Various Polygon Filling routines for Polygon()
- * FILE:              subsys/win32k/objects/polyfill.c
+ * FILE:              subsystems/win32/win32k/objects/polyfill.c
  * PROGRAMER:         Mark Tempel
  */
 
@@ -18,7 +18,7 @@
 */
 typedef struct _tagFILL_EDGE
 {
-  /*Basic line information*/
+  /* Basic line information */
   int FromX;
   int FromY;
   int ToX;
@@ -29,13 +29,13 @@ typedef struct _tagFILL_EDGE
   int x, y;
   int xmajor;
 
-  /*Active Edge List information*/
+  /* Active Edge List information */
   int XIntercept[2];
   int Error;
   int ErrorMax;
   int XDirection, YDirection;
 
-  /* The next edge in the active Edge List*/
+  /* The next edge in the active Edge List */
   struct _tagFILL_EDGE * pNext;
 } FILL_EDGE;
 
@@ -106,7 +106,7 @@ POLYGONFILL_MakeEdge(POINT From, POINT To)
     return NULL;
 
   //DPRINT1("Making Edge: (%d, %d) to (%d, %d)\n", From.x, From.y, To.x, To.y);
-  //Now Fill the struct.
+  // Now fill the struct.
   if ( To.y < From.y )
   {
     rc->FromX = To.x;
@@ -115,7 +115,7 @@ POLYGONFILL_MakeEdge(POINT From, POINT To)
     rc->ToY = From.y;
     rc->YDirection = -1;
 
-    // lines that go up get walked backwards, so need to be offset
+    // Lines that go up get walked backwards, so need to be offset
     // by -1 in order to make the walk identically on a pixel-level
     rc->Error = -1;
   }
@@ -252,7 +252,7 @@ POLYGONFILL_MakeEdgeList(PPOINT Points, int Count)
     if ( !e )
       goto fail;
 
-    // if a straight horizontal line - who cares?
+    // If a straight horizontal line - who cares?
     if ( !e->absdy )
       EngFreeMem ( e );
     else
@@ -298,11 +298,11 @@ POLYGONFILL_UpdateScanline(FILL_EDGE* pEdge, int Scanline)
 
     ASSERT ( pEdge->y == Scanline );
 
-    // now shoot to end of scanline collision
+    // Now shoot to end of scanline collision
     steps = (pEdge->ErrorMax-pEdge->Error-1)/pEdge->absdy;
     if ( steps )
     {
-      // record first collision with scanline
+      // Record first collision with scanline
       int x1 = pEdge->x;
       pEdge->x += steps * pEdge->XDirection;
       pEdge->Error += steps * pEdge->absdy;
@@ -316,17 +316,17 @@ POLYGONFILL_UpdateScanline(FILL_EDGE* pEdge, int Scanline)
       pEdge->XIntercept[1] = pEdge->x;
     }
 
-    // we should require exactly 1 step to step onto next scanline...
+    // We should require exactly 1 step to step onto next scanline...
     ASSERT ( (pEdge->ErrorMax-pEdge->Error-1) / pEdge->absdy == 0 );
     pEdge->x += pEdge->XDirection;
     pEdge->Error += pEdge->absdy;
     ASSERT ( pEdge->Error >= pEdge->ErrorMax );
 
-    // now step onto next scanline...
+    // Now step onto next scanline...
     pEdge->Error -= pEdge->absdx;
     pEdge->y++;
   }
-  else // then this is a y-major line
+  else // Then this is a y-major line
   {
     pEdge->XIntercept[0] = pEdge->x;
     pEdge->XIntercept[1] = pEdge->x;
@@ -347,8 +347,8 @@ POLYGONFILL_UpdateScanline(FILL_EDGE* pEdge, int Scanline)
 }
 
 /*
-** This method updates the Active edge collection for the scanline Scanline.
-*/
+ * This method updates the Active edge collection for the scanline Scanline.
+ */
 static
 void
 APIENTRY
@@ -414,8 +414,8 @@ POLYGONFILL_FillScanLineAlternate(
                    ScanLine,
                    x2,
                    ScanLine,
-                   &BoundRect, // Bounding rectangle
-                   RopMode); // MIX
+                   &BoundRect,  // Bounding rectangle
+                   RopMode);    // MIX
     }
     pLeft = pRight->pNext;
     pRight = pLeft ? pLeft->pNext : NULL;
@@ -448,7 +448,7 @@ POLYGONFILL_FillScanLineWinding(
   pRight = pLeft->pNext;
   ASSERT(pRight);
 
-  // setup first line...
+  // Setup first line...
   x1 = pLeft->XIntercept[0];
   x2 = pRight->XIntercept[1];
 
@@ -462,20 +462,20 @@ POLYGONFILL_FillScanLineWinding(
     int newx2 = pRight->XIntercept[1];
     if ( winding )
     {
-      // check and see if this new line touches the previous...
+      // Check and see if this new line touches the previous...
       if ( (newx1 >= x1 && newx1 <= x2)
        || (newx2 >= x1 && newx2 <= x2)
        || (x1 >= newx1 && x1 <= newx2)
        || (x2 >= newx2 && x2 <= newx2)
        )
       {
-       // yup, just tack it on to our existing line
+       // Yup, just tack it on to our existing line
        x1 = min(x1,newx1);
        x2 = max(x2,newx2);
       }
       else
       {
-       // nope - render the old line..
+       // Nope - render the old line..
        BoundRect.left = x1;
        BoundRect.right = x2;
 
@@ -487,8 +487,8 @@ POLYGONFILL_FillScanLineWinding(
                      ScanLine,
                      x2,
                      ScanLine,
-                     &BoundRect, // Bounding rectangle
-                     RopMode); // MIX
+                     &BoundRect,  // Bounding rectangle
+                     RopMode);    // MIX
 
        x1 = newx1;
        x2 = newx2;
@@ -498,7 +498,7 @@ POLYGONFILL_FillScanLineWinding(
     pRight = pLeft->pNext;
     winding += pLeft->YDirection;
   }
-  // there will always be a line left-over, render it now...
+  // There will always be a line left-over, render it now...
   BoundRect.left = x1;
   BoundRect.right = x2;
 
@@ -510,18 +510,18 @@ POLYGONFILL_FillScanLineWinding(
                ScanLine,
                x2,
                ScanLine,
-               &BoundRect, // Bounding rectangle
-               RopMode); // MIX
+               &BoundRect,  // Bounding rectangle
+               RopMode);    // MIX
 }
 
-//When the fill mode is ALTERNATE, GDI fills the area between odd-numbered and
-//even-numbered polygon sides on each scan line. That is, GDI fills the area between the
-//first and second side, between the third and fourth side, and so on.
+// When the fill mode is ALTERNATE, GDI fills the area between odd-numbered and
+// even-numbered polygon sides on each scan line. That is, GDI fills the area between the
+// first and second side, between the third and fourth side, and so on.
 
-//WINDING Selects winding mode (fills any region with a nonzero winding value).
-//When the fill mode is WINDING, GDI fills any region that has a nonzero winding value.
-//This value is defined as the number of times a pen used to draw the polygon would go around the region.
-//The direction of each edge of the polygon is important.
+// WINDING Selects winding mode (fills any region with a nonzero winding value).
+// When the fill mode is WINDING, GDI fills any region that has a nonzero winding value.
+// This value is defined as the number of times a pen used to draw the polygon would go around the region.
+// The direction of each edge of the polygon is important.
 
 BOOL
 APIENTRY
@@ -557,7 +557,7 @@ FillPolygon(
 
   if ( WINDING == pdcattr->jFillMode )
     FillScanLine = POLYGONFILL_FillScanLineWinding;
-  else /* default */
+  else /* Default */
     FillScanLine = POLYGONFILL_FillScanLineAlternate;
 
   /* For each Scanline from BoundRect.bottom to BoundRect.top,
index be30012..1363909 100644 (file)
@@ -68,7 +68,7 @@ NtGdiEscape(HDC  hDC,
     return SP_ERROR;
   }
 
-  /* TODO FIXME - don't pass umode buffer to an Int function */
+  /* TODO: FIXME: Don't pass umode buffer to an Int function */
   ret = IntGdiEscape(dc, Escape, InSize, InData, OutData);
 
   DC_UnlockDc( dc );
@@ -172,7 +172,7 @@ NtGdiExtEscape(
 
       _SEH2_TRY
       {
-        /* pointers were already probed! */
+        /* Pointers were already probed! */
         RtlCopyMemory(SafeInData,
                       UnsafeInData,
                       InSize);
@@ -235,7 +235,7 @@ freeout:
    {
       _SEH2_TRY
       {
-        /* pointers were already probed! */
+        /* Pointers were already probed! */
         RtlCopyMemory(UnsafeOutData,
                       SafeOutData,
                       OutSize);
index c3eb3af..13a611b 100644 (file)
@@ -181,10 +181,10 @@ HRGN        hrgnDefault = NULL;
  *  we traverse an entire pixel.
  */
 #define BRESINITPGON(dy, x1, x2, xStart, d, m, m1, incr1, incr2) { \
-    int dx;      /* local storage */ \
+    int dx;      /* Local storage */ \
 \
     /* \
-     *  if the edge is horizontal, then it is ignored \
+     *  If the edge is horizontal, then it is ignored \
      *  and assumed not to be processed.  Otherwise, do this stuff. \
      */ \
     if ((dy) != 0) { \
@@ -237,10 +237,10 @@ HRGN        hrgnDefault = NULL;
  */
 typedef struct
 {
-    INT minor_axis;    /* minor axis        */
-    INT d;             /* decision variable */
-    INT m, m1;         /* slope and slope+1 */
-    INT incr1, incr2;  /* error increments */
+    INT minor_axis;    /* Minor axis        */
+    INT d;             /* Decision variable */
+    INT m, m1;         /* Slope and slope+1 */
+    INT incr1, incr2;  /* Error increments */
 } BRESINFO;
 
 
@@ -300,7 +300,7 @@ typedef struct
  */
 
 /*
- * for the winding number rule
+ * For the winding number rule
  */
 #define CLOCKWISE          1
 #define COUNTERCLOCKWISE  -1
@@ -309,18 +309,18 @@ typedef struct _EdgeTableEntry
 {
      INT ymax;             /* ycoord at which we exit this edge. */
      BRESINFO bres;        /* Bresenham info to run the edge     */
-     struct _EdgeTableEntry *next;       /* next in the list     */
-     struct _EdgeTableEntry *back;       /* for insertion sort   */
-     struct _EdgeTableEntry *nextWETE;   /* for winding num rule */
-     int ClockWise;        /* flag for winding number rule       */
+     struct _EdgeTableEntry *next;       /* Next in the list     */
+     struct _EdgeTableEntry *back;       /* For insertion sort   */
+     struct _EdgeTableEntry *nextWETE;   /* For winding num rule */
+     int ClockWise;        /* Flag for winding number rule       */
 } EdgeTableEntry;
 
 
 typedef struct _ScanLineList
 {
-     INT scanline;                /* the scanline represented */
-     EdgeTableEntry *edgelist;    /* header node              */
-     struct _ScanLineList *next;  /* next in the list       */
+     INT scanline;                /* The scanline represented */
+     EdgeTableEntry *edgelist;    /* Header node              */
+     struct _ScanLineList *next;  /* Next in the list       */
 } ScanLineList;
 
 
@@ -328,7 +328,7 @@ typedef struct
 {
      INT ymax;                 /* ymax for the polygon     */
      INT ymin;                 /* ymin for the polygon     */
-     ScanLineList scanlines;   /* header node              */
+     ScanLineList scanlines;   /* Header node              */
 } EdgeTable;
 
 
@@ -347,8 +347,7 @@ typedef struct _ScanLineListBlock
 
 
 /*
- *
- *     a few macros for the inner loops of the fill code where
+ *     A few macros for the inner loops of the fill code where
  *     performance considerations don't allow a procedure call.
  *
  *     Evaluate the given edge at the given scanline.
@@ -360,7 +359,7 @@ typedef struct _ScanLineListBlock
  *     can reorder the Winding Active Edge Table.
  */
 #define EVALUATEEDGEWINDING(pAET, pPrevAET, y, fixWAET) { \
-   if (pAET->ymax == y) {          /* leaving this edge */ \
+   if (pAET->ymax == y) {          /* Leaving this edge */ \
       pPrevAET->next = pAET->next; \
       pAET = pPrevAET->next; \
       fixWAET = 1; \
@@ -383,7 +382,7 @@ typedef struct _ScanLineListBlock
  *     The even-odd rule is in effect.
  */
 #define EVALUATEEDGEEVENODD(pAET, pPrevAET, y) { \
-   if (pAET->ymax == y) {          /* leaving this edge */ \
+   if (pAET->ymax == y) {          /* Leaving this edge */ \
       pPrevAET->next = pAET->next; \
       pAET = pPrevAET->next; \
       if (pAET) \
@@ -449,7 +448,7 @@ typedef void (FASTCALL *nonOverlapProcp)(PROSRGNDATA, PRECT, PRECT, INT, INT);
 
 #define RGN_DEFAULT_RECTS      2
 
-// used to allocate buffers for points and link the buffers together
+// Used to allocate buffers for points and link the buffers together
 
 typedef struct _POINTBLOCK
 {
@@ -484,7 +483,7 @@ IntDumpRegion(HRGN hRgn)
 
     RGNOBJAPI_Unlock(Data);
 }
-#endif /* not NDEBUG */
+#endif /* Not NDEBUG */
 
 
 INT
@@ -509,7 +508,7 @@ REGION_CopyRegion(
     PROSRGNDATA src
 )
 {
-    if (dst != src) //  don't want to copy to itself
+    if (dst != src) // Don't want to copy to itself
     {
         if (dst->rdh.nRgnSize < src->rdh.nCount * sizeof(RECT))
         {
@@ -520,11 +519,11 @@ REGION_CopyRegion(
                 return FALSE;
 
             if (dst->Buffer && dst->Buffer != &dst->rdh.rcBound)
-                ExFreePoolWithTag(dst->Buffer, TAG_REGION);    //free the old buffer
+                ExFreePoolWithTag(dst->Buffer, TAG_REGION);     // Free the old buffer
             dst->Buffer = temp;
-            dst->rdh.nRgnSize = src->rdh.nCount * sizeof(RECT);  //size of region buffer
+            dst->rdh.nRgnSize = src->rdh.nCount * sizeof(RECT); // Size of region buffer
         }
-        dst->rdh.nCount = src->rdh.nCount;                 //number of rectangles present in Buffer
+        dst->rdh.nCount = src->rdh.nCount;                      // Number of rectangles present in Buffer
         dst->rdh.rcBound.left = src->rdh.rcBound.left;
         dst->rdh.rcBound.top = src->rdh.rcBound.top;
         dst->rdh.rcBound.right = src->rdh.rcBound.right;
@@ -594,7 +593,7 @@ REGION_CropAndOffsetRegion(
 
     if (!off) off = &pt;
 
-    if (!rect) // just copy and offset
+    if (!rect) // Just copy and offset
     {
         PRECTL xrect;
         if (rgnDst == rgnSrc)
@@ -610,7 +609,7 @@ REGION_CropAndOffsetRegion(
                        if(!xrect)
                                return FALSE;
             if (rgnDst->Buffer && rgnDst->Buffer != &rgnDst->rdh.rcBound)
-                ExFreePoolWithTag(rgnDst->Buffer, TAG_REGION); //free the old buffer. will be assigned to xrect below.
+                ExFreePoolWithTag(rgnDst->Buffer, TAG_REGION); // Free the old buffer. Will be assigned to xrect below.
         }
 
         if (rgnDst != rgnSrc)
@@ -646,7 +645,7 @@ REGION_CropAndOffsetRegion(
     {
         goto empty;
     }
-    else // region box and clipping rect appear to intersect
+    else // Region box and clipping rect appear to intersect
     {
         PRECTL lpr, rpr;
         ULONG i, j, clipa, clipb;
@@ -654,7 +653,7 @@ REGION_CropAndOffsetRegion(
         INT right = rgnSrc->rdh.rcBound.left + off->x;
 
         for (clipa = 0; (rgnSrc->Buffer + clipa)->bottom <= rect->top; clipa++)
-            //region and rect intersect so we stop before clipa > rgnSrc->rdh.nCount
+            // Region and rect intersect so we stop before clipa > rgnSrc->rdh.nCount
             ; // skip bands above the clipping rectangle
 
         for (clipb = clipa; clipb < rgnSrc->rdh.nCount; clipb++)
@@ -672,7 +671,7 @@ REGION_CropAndOffsetRegion(
                 return FALSE;
 
             if (rgnDst->Buffer && rgnDst->Buffer != &rgnDst->rdh.rcBound)
-                ExFreePoolWithTag(rgnDst->Buffer, TAG_REGION); //free the old buffer
+                ExFreePoolWithTag(rgnDst->Buffer, TAG_REGION); // free the old buffer
             rgnDst->Buffer = temp;
             rgnDst->rdh.nCount = i;
             rgnDst->rdh.nRgnSize = i * sizeof(RECT);
@@ -709,13 +708,13 @@ REGION_CropAndOffsetRegion(
         right = rect->bottom + off->y;
 
         rgnDst->rdh.nCount = j--;
-        for (i = 0; i <= j; i++) // fixup top band
+        for (i = 0; i <= j; i++) // Fixup top band
             if ((rgnDst->Buffer + i)->top < left)
                 (rgnDst->Buffer + i)->top = left;
             else
                 break;
 
-        for (i = j; i > 0; i--) // fixup bottom band
+        for (i = j; i > 0; i--) // Fixup bottom band
             if ((rgnDst->Buffer + i)->bottom > right)
                 (rgnDst->Buffer + i)->bottom = right;
             else
@@ -772,7 +771,7 @@ REGION_Coalesce(
     RECTL *pRegEnd;            /* End of region */
     INT curNumRects;          /* Number of rectangles in current band */
     INT prevNumRects;         /* Number of rectangles in previous band */
-    INT bandtop;               /* top coordinate for current band */
+    INT bandtop;               /* Top coordinate for current band */
 
     pRegEnd = pReg->Buffer + pReg->rdh.nCount;
     pPrevRect = pReg->Buffer + prevStart;
@@ -925,7 +924,7 @@ REGION_RegionOp(
     INT ytop;                         /* Top of intersection */
     RECTL *oldRects;                   /* Old rects for newReg */
     ULONG prevBand;                   /* Index of start of
-                                                * previous band in newReg */
+                                                * Previous band in newReg */
     ULONG curBand;                    /* Index of start of current band in newReg */
     RECTL *r1BandEnd;                  /* End of current band in r1 */
     RECTL *r2BandEnd;                  /* End of current band in r2 */
@@ -1274,7 +1273,7 @@ REGION_IntersectRegion(
     ROSRGNDATA *reg2
 )
 {
-    /* check for trivial reject */
+    /* Check for trivial reject */
     if ( (!(reg1->rdh.nCount)) || (!(reg2->rdh.nCount))  ||
          (!EXTENTCHECK(&reg1->rdh.rcBound, &reg2->rdh.rcBound)) )
         newReg->rdh.nCount = 0;
@@ -1424,7 +1423,7 @@ REGION_UnionRegion(
     ROSRGNDATA *reg2
 )
 {
-    /*  checks all the simple cases */
+    /* Checks all the simple cases */
 
     /*
      * Region 1 and 2 are the same or region 1 is empty
@@ -1441,7 +1440,7 @@ REGION_UnionRegion(
     }
 
     /*
-     * if nothing to union (region 2 empty)
+     * If nothing to union (region 2 empty)
      */
     if (0 == reg2->rdh.nCount ||
             reg2->rdh.rcBound.right <= reg2->rdh.rcBound.left ||
@@ -1690,7 +1689,7 @@ REGION_SubtractRegion(
     ROSRGNDATA *regS
 )
 {
-    /* check for trivial reject */
+    /* Check for trivial reject */
     if ( (!(regM->rdh.nCount)) || (!(regS->rdh.nCount))  ||
          (!EXTENTCHECK(&regM->rdh.rcBound, &regS->rdh.rcBound)) )
     {
@@ -1724,7 +1723,7 @@ REGION_XorRegion(
     HRGN htra, htrb;
     ROSRGNDATA *tra, *trb;
 
-    // FIXME: don't use a handle
+    // FIXME: Don't use a handle
     tra = REGION_AllocRgnWithHandle(sra->rdh.nCount + 1);
     if (!tra )
     {
@@ -1732,7 +1731,7 @@ REGION_XorRegion(
     }
     htra = tra->BaseObject.hHmgr;
 
-    // FIXME: don't use a handle
+    // FIXME: Don't use a handle
     trb = REGION_AllocRgnWithHandle(srb->rdh.nCount + 1);
     if (!trb)
     {
@@ -1791,7 +1790,7 @@ REGION_CreateSimpleFrameRgn(
         {
             if (y != 0)
             {
-                /* top rectangle */
+                /* Top rectangle */
                 prc->left = rgn->rdh.rcBound.left;
                 prc->top = rgn->rdh.rcBound.top;
                 prc->right = rgn->rdh.rcBound.right;
@@ -1801,14 +1800,14 @@ REGION_CreateSimpleFrameRgn(
 
             if (x != 0)
             {
-                /* left rectangle */
+                /* Left rectangle */
                 prc->left = rgn->rdh.rcBound.left;
                 prc->top = rgn->rdh.rcBound.top + y;
                 prc->right = prc->left + x;
                 prc->bottom = rgn->rdh.rcBound.bottom - y;
                 prc++;
 
-                /* right rectangle */
+                /* Right rectangle */
                 prc->left = rgn->rdh.rcBound.right - x;
                 prc->top = rgn->rdh.rcBound.top + y;
                 prc->right = rgn->rdh.rcBound.right;
@@ -1818,7 +1817,7 @@ REGION_CreateSimpleFrameRgn(
 
             if (y != 0)
             {
-                /* bottom rectangle */
+                /* Bottom rectangle */
                 prc->left = rgn->rdh.rcBound.left;
                 prc->top = rgn->rdh.rcBound.bottom - y;
                 prc->right = rgn->rdh.rcBound.right;
@@ -2455,7 +2454,7 @@ REGION_GetRgnBox(
 
         return ret;
     }
-    return 0; //if invalid region return zero
+    return 0; // If invalid region return zero
 }
 
 INT APIENTRY
@@ -2525,13 +2524,13 @@ IntGdiPaintRgn(
     BrushOrigin.x = pdcattr->ptlBrushOrigin.x;
     BrushOrigin.y = pdcattr->ptlBrushOrigin.y;
     psurf = dc->dclevel.pSurface;
-    /* FIXME - Handle psurf == NULL !!!! */
+    /* FIXME: Handle psurf == NULL !!!! */
 
     bRet = IntEngPaint(&psurf->SurfObj,
                        ClipRegion,
                        &dc->eboFill.BrushObject,
                        &BrushOrigin,
-                       0xFFFF);//FIXME:don't know what to put here
+                       0xFFFF); // FIXME: Don't know what to put here
 
     RGNOBJAPI_Unlock(visrgn);
     GreDeleteObject(tmpVisRgn);
@@ -2550,7 +2549,7 @@ REGION_RectInRegion(
     PRECTL pCurRect, pRectEnd;
     RECT rc;
 
-    /* swap the coordinates to make right >= left and bottom >= top */
+    /* Swap the coordinates to make right >= left and bottom >= top */
     /* (region building rectangles are normalized the same way) */
     if( rect->top > rect->bottom) {
         rc.top = rect->bottom;
@@ -2567,20 +2566,20 @@ REGION_RectInRegion(
         rc.left = rect->left;
     }
 
-    /* this is (just) a useful optimization */
+    /* This is (just) a useful optimization */
     if ((Rgn->rdh.nCount > 0) && EXTENTCHECK(&Rgn->rdh.rcBound, &rc))
     {
         for (pCurRect = Rgn->Buffer, pRectEnd = pCurRect +
          Rgn->rdh.nCount; pCurRect < pRectEnd; pCurRect++)
         {
             if (pCurRect->bottom <= rc.top)
-            continue;             /* not far enough down yet */
+            continue;             /* Not far enough down yet */
 
             if (pCurRect->top >= rc.bottom)
-                break;                /* too far down */
+                break;                /* Too far down */
 
             if (pCurRect->right <= rc.left)
-                continue;              /* not far enough over yet */
+                continue;              /* Not far enough over yet */
 
             if (pCurRect->left >= rc.right) {
                 continue;
@@ -2691,7 +2690,7 @@ REGION_InsertEdgeInET(
     ScanLineListBlock *tmpSLLBlock;
 
     /*
-     * find the right bucket to put the edge into
+     * Find the right bucket to put the edge into
      */
     pPrevSLL = &ET->scanlines;
     pSLL = pPrevSLL->next;
@@ -2702,7 +2701,7 @@ REGION_InsertEdgeInET(
     }
 
     /*
-     * reassign pSLL (pointer to ScanLineList) if necessary
+     * Reassign pSLL (pointer to ScanLineList) if necessary
      */
     if ((!pSLL) || (pSLL->scanline > scanline))
     {
@@ -2712,7 +2711,7 @@ REGION_InsertEdgeInET(
             if (!tmpSLLBlock)
             {
                 DPRINT1("REGION_InsertEdgeInETL(): Can't alloc SLLB\n");
-                /* FIXME - free resources? */
+                /* FIXME: Free resources? */
                 return;
             }
             (*SLLBlock)->next = tmpSLLBlock;
@@ -2729,7 +2728,7 @@ REGION_InsertEdgeInET(
     pSLL->scanline = scanline;
 
     /*
-     * now insert the edge in the right bucket
+     * Now insert the edge in the right bucket
      */
     prev = (EdgeTableEntry *)NULL;
     start = pSLL->edgelist;
@@ -2936,7 +2935,7 @@ REGION_PtsToRegion(
 
     for ( ; numFullPtBlocks >= 0; numFullPtBlocks--)
     {
-        /* the loop uses 2 points per iteration */
+        /* The loop uses 2 points per iteration */
         i = NUMPTSTOBUFFER >> 1;
         if (!numFullPtBlocks)
             i = iCurPtBlock >> 1;
@@ -3026,7 +3025,7 @@ REGION_CreateETandAET(
 
 
     /*
-     *  initialize the Active Edge Table
+     *  Initialize the Active Edge Table
      */
     AET->next = (EdgeTableEntry *)NULL;
     AET->back = (EdgeTableEntry *)NULL;
@@ -3034,7 +3033,7 @@ REGION_CreateETandAET(
     AET->bres.minor_axis = SMALL_COORDINATE;
 
     /*
-     *  initialize the Edge Table.
+     *  Initialize the Edge Table.
      */
     ET->scanlines.next = (ScanLineList *)NULL;
     ET->ymax = SMALL_COORDINATE;
@@ -3052,7 +3051,7 @@ REGION_CreateETandAET(
         PrevPt = EndPt;
 
         /*
-         *  for each vertex in the array of points.
+         *  For each vertex in the array of points.
          *  In this loop we are dealing with two vertices at
          *  a time -- these make up one edge of the polygon.
          */
@@ -3061,7 +3060,7 @@ REGION_CreateETandAET(
             CurrPt = pts++;
 
             /*
-             *  find out which point is above and which is below.
+             *  Find out which point is above and which is below.
              */
             if (PrevPt->y > CurrPt->y)
             {
@@ -3075,7 +3074,7 @@ REGION_CreateETandAET(
             }
 
             /*
-             * don't add horizontal edges to the Edge table.
+             * Don't add horizontal edges to the Edge table.
              */
             if (bottom->y != top->y)
             {
@@ -3083,7 +3082,7 @@ REGION_CreateETandAET(
                 /* -1 so we don't get last scanline */
 
                 /*
-                 *  initialize integer edge algorithm
+                 *  Initialize integer edge algorithm
                  */
                 dy = bottom->y - top->y;
                 BRESINITPGONSTRUCT(dy, top->x, bottom->x, pETEs->bres);
@@ -3113,19 +3112,19 @@ IntCreatePolyPolygonRgn(
 {
     HRGN hrgn;
     ROSRGNDATA *region;
-    EdgeTableEntry *pAET;     /* Active Edge Table       */
-    INT y;                    /* current scanline        */
-    int iPts = 0;             /* number of pts in buffer */
-    EdgeTableEntry *pWETE;    /* Winding Edge Table Entry*/
-    ScanLineList *pSLL;       /* current scanLineList    */
-    POINT *pts;               /* output buffer           */
-    EdgeTableEntry *pPrevAET; /* ptr to previous AET     */
-    EdgeTable ET;             /* header node for ET      */
-    EdgeTableEntry AET;       /* header node for AET     */
-    EdgeTableEntry *pETEs;    /* EdgeTableEntries pool   */
-    ScanLineListBlock SLLBlock; /* header for scanlinelist */
+    EdgeTableEntry *pAET;                       /* Active Edge Table        */
+    INT y;                                      /* Current scanline         */
+    int iPts = 0;                               /* Number of pts in buffer  */
+    EdgeTableEntry *pWETE;                      /* Winding Edge Table Entry */
+    ScanLineList *pSLL;                         /* Current scanLineList     */
+    POINT *pts;                                 /* Output buffer            */
+    EdgeTableEntry *pPrevAET;                   /* Pointer to previous AET  */
+    EdgeTable ET;                               /* Header node for ET       */
+    EdgeTableEntry AET;                         /* Header node for AET      */
+    EdgeTableEntry *pETEs;                      /* EdgeTableEntries pool    */
+    ScanLineListBlock SLLBlock;                 /* Header for scanlinelist  */
     int fixWAET = FALSE;
-    POINTBLOCK FirstPtBlock, *curPtBlock; /* PtBlock buffers    */
+    POINTBLOCK FirstPtBlock, *curPtBlock;       /* PtBlock buffers          */
     POINTBLOCK *tmpPtBlock;
     int numFullPtBlocks = 0;
     INT poly, total;
@@ -3136,7 +3135,7 @@ IntCreatePolyPolygonRgn(
         return 0;
     hrgn = region->BaseObject.hHmgr;
 
-    /* special case a rectangle */
+    /* Special case a rectangle */
 
     if (((nbpolygons == 1) && ((*Count == 4) ||
                                ((*Count == 5) && (Pts[4].x == Pts[0].x) && (Pts[4].y == Pts[0].y)))) &&
@@ -3170,7 +3169,7 @@ IntCreatePolyPolygonRgn(
     if (mode != WINDING)
     {
         /*
-         *  for each scanline
+         *  For each scanline
          */
         for (y = ET.ymin; y < ET.ymax; y++)
         {
@@ -3187,7 +3186,7 @@ IntCreatePolyPolygonRgn(
             pAET = AET.next;
 
             /*
-             *  for each active edge
+             *  For each active edge
              */
             while (pAET)
             {
@@ -3195,7 +3194,7 @@ IntCreatePolyPolygonRgn(
                 pts++, iPts++;
 
                 /*
-                 *  send out the buffer
+                 *  Send out the buffer
                  */
                 if (iPts == NUMPTSTOBUFFER)
                 {
@@ -3220,7 +3219,7 @@ IntCreatePolyPolygonRgn(
     else
     {
         /*
-         *  for each scanline
+         *  For each scanline
          */
         for (y = ET.ymin; y < ET.ymax; y++)
         {
@@ -3239,12 +3238,12 @@ IntCreatePolyPolygonRgn(
             pWETE = pAET;
 
             /*
-             *  for each active edge
+             *  For each active edge
              */
             while (pAET)
             {
                 /*
-                 *  add to the buffer only those edges that
+                 *  Add to the buffer only those edges that
                  *  are in the Winding active edge table.
                  */
                 if (pWETE == pAET)
@@ -3253,7 +3252,7 @@ IntCreatePolyPolygonRgn(
                     pts++, iPts++;
 
                     /*
-                     *  send out the buffer
+                     *  Send out the buffer
                      */
                     if (iPts == NUMPTSTOBUFFER)
                     {
@@ -3278,7 +3277,7 @@ IntCreatePolyPolygonRgn(
             }
 
             /*
-             *  recompute the winding active edge table if
+             *  Recompute the winding active edge table if
              *  we just resorted or have exited an edge.
              */
             if (REGION_InsertionSort(&AET) || fixWAET)
@@ -3478,9 +3477,9 @@ NtGdiCreateRoundRectRgn(
 
     while (xd < yd)
     {
-        if (d > 0)  /* if nearest pixel is toward the center */
+        if (d > 0)  /* If nearest pixel is toward the center */
         {
-            /* move toward center */
+            /* Move toward center */
             rect.top = top++;
             rect.bottom = rect.top + 1;
             REGION_UnionRectWithRgn(obj, &rect);
@@ -3490,7 +3489,7 @@ NtGdiCreateRoundRectRgn(
             yd -= 2*asq;
             d  -= yd;
         }
-        rect.left--;        /* next horiz point */
+        rect.left--;        /* Next horiz point */
         rect.right++;
         xd += 2*bsq;
         d  += bsq + xd;
@@ -3507,9 +3506,9 @@ NtGdiCreateRoundRectRgn(
         rect.top = --bottom;
         rect.bottom = rect.top + 1;
         REGION_UnionRectWithRgn(obj, &rect);
-        if (d < 0)   /* if nearest pixel is outside ellipse */
+        if (d < 0)   /* If nearest pixel is outside ellipse */
         {
-            rect.left--;     /* move away from center */
+            rect.left--;     /* Move away from center */
             rect.right++;
             xd += 2*bsq;
             d  += xd;
@@ -3893,7 +3892,7 @@ NtGdiRectInRegion(
     LPRECTL unsaferc
 )
 {
-    RECTL rc = {0};
+    RECTL rc = { 0 };
     NTSTATUS Status = STATUS_SUCCESS;
 
     _SEH2_TRY
@@ -3910,7 +3909,7 @@ NtGdiRectInRegion(
     if (!NT_SUCCESS(Status))
     {
         SetLastNtError(Status);
-        DPRINT1("NtGdiRectInRegion: bogus rc\n");
+        DPRINT1("NtGdiRectInRegion: Bogus rc\n");
         return ERROR;
     }
 
@@ -3931,7 +3930,7 @@ NtGdiSetRectRgn(
 
     if ( !(rgn = RGNOBJAPI_Lock(hRgn, NULL)) )
     {
-        return 0; //per documentation
+        return 0; // Per documentation
     }
 
     REGION_SetRectRgn(rgn, LeftRect, TopRect, RightRect, BottomRect);
@@ -3946,7 +3945,7 @@ NtGdiUnionRectWithRgn(
     const RECTL *UnsafeRect
 )
 {
-    RECTL SafeRect = {0};
+    RECTL SafeRect = { 0 };
     PROSRGNDATA Rgn;
     NTSTATUS Status = STATUS_SUCCESS;
 
@@ -4007,9 +4006,9 @@ NtGdiGetRegionData(
     if (count < (size + sizeof(RGNDATAHEADER)) || rgndata == NULL)
     {
         RGNOBJAPI_Unlock(obj);
-        if (rgndata) /* buffer is too small, signal it by return 0 */
+        if (rgndata) /* Buffer is too small, signal it by return 0 */
             return 0;
-        else         /* user requested buffer size with rgndata NULL */
+        else         /* User requested buffer size with rgndata NULL */
             return size + sizeof(RGNDATAHEADER);
     }
 
index f03cf2b..40fd5ca 100644 (file)
@@ -64,12 +64,12 @@ static LOGPEN NullPen =
 static LOGFONTW OEMFixedFont =
     { 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, OEM_CHARSET,
       0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Courier New"
-    }; //Bitstream Vera Sans Mono
+    }; // Bitstream Vera Sans Mono
 
 static LOGFONTW AnsiFixedFont =
     { 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
       0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Courier New"
-    }; //Bitstream Vera Sans Mono
+    }; // Bitstream Vera Sans Mono
 
 static LOGFONTW AnsiVarFont =
     { 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
@@ -79,23 +79,23 @@ static LOGFONTW AnsiVarFont =
 static LOGFONTW SystemFont =
     { 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
       0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"Courier New"
-    }; //Bitstream Vera Sans
+    }; // Bitstream Vera Sans
 
 static LOGFONTW DeviceDefaultFont =
     { 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
       0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Sans Serif"
-    }; //Bitstream Vera Sans
+    }; // Bitstream Vera Sans
 
 static LOGFONTW SystemFixedFont =
     { 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
       0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Courier New"
-    }; //Bitstream Vera Sans Mono
+    }; // Bitstream Vera Sans Mono
 
 /* FIXME: Is this correct? */
 static LOGFONTW DefaultGuiFont =
     { 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
       0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Sans Serif"
-    }; //Bitstream Vera Sans
+    }; // Bitstream Vera Sans
 
 HGDIOBJ StockObjects[NB_STOCK_OBJECTS];
 
index 232fc53..1d9e7b6 100644 (file)
@@ -2,7 +2,7 @@
  * PROJECT:         ReactOS win32 kernel mode subsystem
  * LICENSE:         GPL - See COPYING in the top level directory
  * FILE:            subsystems/win32/win32k/objects/wingl.c
- * PURPOSE:         wingl api
+ * PURPOSE:         WinGL API
  * PROGRAMMER:      
  */
 
index 3eb4c42..b3e3e07 100644 (file)
@@ -2,7 +2,7 @@
  * PROJECT:         ReactOS win32 kernel mode subsystem
  * LICENSE:         GPL - See COPYING in the top level directory
  * FILE:            subsystems/win32/win32k/objects/xformobj.c
- * PURPOSE:         XFORMOBJ api
+ * PURPOSE:         XFORMOBJ API
  * PROGRAMMER:      Timo Kreuzer
  */
 
index eb071b7..0906147 100644 (file)
@@ -2,8 +2,8 @@
 #define __W32K_H
 /*
  * COPYRIGHT:       See COPYING in the top level directory
- * PROJECT:         ReactOS Graphics Subsystem
- * FILE:            subsys/win32k/pch.h
+ * PROJECT:         ReactOS Win32k subsystem
+ * FILE:            subsystems/win32/win32k/pch.h
  * PURPOSE:         Main Win32K Header
  * PROGRAMMER:      Alex Ionescu (alex@relsoft.net)
  */
@@ -12,7 +12,7 @@
 
 #define _NO_COM
 
-/* DDK/NDK/SDK Headers */
+/* DDK/NDK/SDK headers */
 #undef NTDDI_VERSION
 #define NTDDI_VERSION NTDDI_WS03SP1
 #include <ntddk.h>
@@ -32,7 +32,7 @@
 #include <ntddkbd.h>
 #include <bugcodes.h>
 
-/* Win32 Headers */
+/* Win32 headers */
 /* FIXME: Defines in winbase.h that we need... */
 typedef struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
 #define WINBASEAPI
@@ -65,13 +65,13 @@ typedef struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
 #define _NOCSECT_TYPE
 #include <ddrawi.h>
 
-/* SEH Support with PSEH */
+/* SEH support with PSEH */
 #include <pseh/pseh2.h>
 
-/* CSRSS Header */
+/* CSRSS header */
 #include <csrss/csrss.h>
 
-/* Public Win32K Headers */
+/* Public Win32K headers */
 #include <win32k/callback.h>
 #include <win32k/ntusrtyp.h>
 #include <win32k/ntuser.h>
@@ -83,7 +83,7 @@ typedef struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
 /* Undocumented user definitions */
 #include <undocuser.h>
 
-/* Freetype headers*/
+/* Freetype headers */
 #include <ft2build.h>
 #include FT_FREETYPE_H
 #include FT_GLYPH_H
@@ -96,7 +96,7 @@ typedef struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
 #include <freetype/ftwinfnt.h>
 #include <freetype/freetype.h>
 
-/* Internal Win32K Header */
+/* Internal Win32K header */
 #include "include/win32kp.h"
 
 #endif /* __W32K_H */
index 36bce9b..f44d832 100644 (file)
@@ -892,7 +892,7 @@ NtGdiFontIsLinked(IN HDC hdc)
     return FALSE;
 }
 
- /*
+/*
  * @unimplemented
  */
 BOOL
@@ -911,7 +911,7 @@ NtGdiCheckBitmapBits(
     return FALSE;
 }
 
- /*
+/*
  * @unimplemented
  */
 HBITMAP
@@ -924,7 +924,7 @@ NtGdiClearBitmapAttributes(
     return NULL;
 }
 
- /*
+/*
  * @unimplemented
  */
 BOOL
@@ -941,7 +941,7 @@ NtGdiGetUFI(
     return FALSE;
 }
 
- /*
+/*
  * @unimplemented
  */
 HBRUSH
@@ -954,7 +954,7 @@ NtGdiClearBrushAttributes(
     return NULL;
 }
 
- /*
+/*
  * @unimplemented
  */
 ULONG
@@ -971,7 +971,7 @@ NtGdiColorCorrectPalette(
     return 0;
 }
 
- /*
+/*
  * @unimplemented
  */
 HANDLE
@@ -990,7 +990,7 @@ NtGdiCreateColorTransform(
     return NULL;
 }
 
- /*
+/*
  * @unimplemented
  */
 BOOL
@@ -1001,7 +1001,7 @@ NtGdiComputeXformCoefficients(IN HDC hdc)
     return FALSE;
 }
 
- /*
+/*
  * @unimplemented
  */
 BOOL
@@ -1016,7 +1016,7 @@ NtGdiConsoleTextOut(
     return FALSE;
 }
 
- /*
+/*
  * @unimplemented
  */
 BOOL
@@ -1029,7 +1029,7 @@ NtGdiDeleteColorTransform(
     return FALSE;
 }
 
- /*
+/*
  * @unimplemented
  */
 ULONG
@@ -1042,7 +1042,7 @@ NtGdiGetPerBandInfo(
     return 0;
 }
 
- /*
+/*
  * @unimplemented
  */
 BOOL
@@ -1057,7 +1057,7 @@ NtGdiDoBanding(
     return FALSE;
 }
 
- /*
+/*
  * @unimplemented
  */
 BOOL
@@ -1073,7 +1073,7 @@ NtGdiEnumFontChunk(
     return FALSE;
 }
 
- /*
+/*
  * @unimplemented
  */
 BOOL
@@ -1085,7 +1085,7 @@ NtGdiEnumFontClose(
     return FALSE;
 }
 
- /*
+/*
  * @unimplemented
  */
 ULONG_PTR
@@ -1103,7 +1103,7 @@ NtGdiEnumFontOpen(
     return 0;
 }
 
- /*
+/*
  * @unimplemented
  */
 BOOL
@@ -1121,7 +1121,7 @@ NtGdiEudcLoadUnloadLink(
     return FALSE;
 }
 
- /*
+/*
  * @unimplemented
  */
 BOOL
@@ -1134,7 +1134,7 @@ NtGdiForceUFIMapping(
     return FALSE;
 }
 
- /*
+/*
  * @unimplemented
  */
 NTSTATUS
@@ -1150,7 +1150,7 @@ NtGdiFullscreenControl(
     return FALSE;
 }
 
- /*
+/*
  * @unimplemented
  */
 BOOL
@@ -1163,7 +1163,7 @@ NtGdiGetCharWidthInfo(
     return FALSE;
 }
 
- /*
+/*
  * @unimplemented
  */
 ULONG_PTR
@@ -1175,7 +1175,7 @@ NtGdiGetColorSpaceforBitmap(
     return 0;
 }
 
- /*
+/*
  * @unimplemented
  */
 BOOL
@@ -1188,7 +1188,7 @@ NtGdiGetETM(
     return FALSE;
 }
 
- /*
+/*
  * @unimplemented
  */
 ULONG
@@ -1202,7 +1202,7 @@ NtGdiGetEudcTimeStampEx(
     return 0;
 }
 
- /*
+/*
  * @unimplemented
  */
 BOOL
@@ -1213,7 +1213,7 @@ NtGdiInitSpool()
     return FALSE;
 }
 
- /*
+/*
  * @unimplemented
  */
 INT
@@ -1226,7 +1226,7 @@ NtGdiQueryFonts( OUT PUNIVERSAL_FONT_ID pufiFontList,
     return 0;
 }
 
- /*
+/*
  * @unimplemented
  */
 INT
@@ -1236,12 +1236,12 @@ NtGdiGetSpoolMessage( DWORD u1,
                       DWORD u3,
                       DWORD u4)
 {
-    /* FIXME the prototypes */
+    /* FIXME: The prototypes */
     UNIMPLEMENTED;
     return 0;
 }
 
- /*
+/*
  * @unimplemented
  */
 DWORD
@@ -1258,7 +1258,7 @@ NtGdiGetGlyphIndicesWInternal(
     return 0;
 }
 
- /*
+/*
  * @unimplemented
  */
 INT
@@ -1272,7 +1272,7 @@ NtGdiGetLinkedUFIs(
     return 0;
 }
 
- /*
+/*
  * @unimplemented
  */
 HBITMAP
@@ -1285,7 +1285,7 @@ NtGdiGetObjectBitmapHandle(
     return 0;
 }
 
- /*
+/*
  * @unimplemented
  */
 BOOL
@@ -1299,7 +1299,7 @@ NtGdiGetMonitorID(
     return FALSE;
 }
 
- /*
+/*
  * @unimplemented
  */
 BOOL
@@ -1313,7 +1313,7 @@ NtGdiDrawStream(
     return FALSE;
 }
 
- /*
+/*
  * @unimplemented
  */
 BOOL
@@ -1324,7 +1324,7 @@ NtGdiUpdateTransform(IN HDC hdc)
     return FALSE;
 }
 
- /*
+/*
  * @unimplemented
  */
 ULONG
@@ -1336,7 +1336,7 @@ NtGdiQueryFontAssocInfo(
     return 0;
 }
 
- /*
+/*
  * @unimplemented
  */
 UINT
@@ -1352,7 +1352,7 @@ NtGdiGetStringBitmapW(
     return 0;
 }
 
- /*
+/*
  * @unimplemented
  */
 BOOL
@@ -1363,7 +1363,8 @@ NtGdiRemoveFontMemResourceEx(
     UNIMPLEMENTED;
     return FALSE;
 }
- /*
+
+/*
  * @unimplemented
  */
 BOOL
@@ -1380,7 +1381,7 @@ NtGdiRemoveFontResourceW(
     return FALSE;
 }
 
- /*
+/*
  * @unimplemented
  */
 BOOL
@@ -1395,7 +1396,7 @@ NtGdiPolyTextOutW(
     return FALSE;
 }
 
- /*
+/*
  * @unimplemented
  */
 NTSTATUS
@@ -1425,7 +1426,7 @@ NtGdiSetupPublicCFONT(
     return 0;
 }
 
- /*
+/*
  * @unimplemented
  */
 HBRUSH
@@ -1438,7 +1439,7 @@ NtGdiSetBrushAttributes(
     return NULL;
 }
 
- /*
+/*
  * @unimplemented
  */
 BOOL
@@ -1456,7 +1457,7 @@ NtGdiGetEmbUFI(
     return FALSE;
 }
 
- /*
+/*
  * @unimplemented
  */
 BOOL
@@ -1477,7 +1478,7 @@ NtGdiGetUFIPathname(
     return FALSE;
 }
 
- /*
+/*
  * @unimplemented
  */
 ULONG
@@ -1489,7 +1490,7 @@ NtGdiGetEmbedFonts(
     return 0;
 }
 
- /*
+/*
  * @unimplemented
  */
 BOOL
@@ -1502,7 +1503,7 @@ NtGdiChangeGhostFont(
     return FALSE;
 }
 
- /*
+/*
  * @unimplemented
  */
 BOOL
@@ -1515,7 +1516,7 @@ NtGdiAddEmbFontToDC(
     return FALSE;
 }
 
- /*
+/*
  * @unimplemented
  */
 BOOL
@@ -1533,7 +1534,7 @@ NtGdiGetWidthTable(
     return FALSE;
 }
 
- /*
+/*
  * @unimplemented
  */
 BOOL
@@ -1552,7 +1553,7 @@ NtGdiIcmBrushInfo(
     return FALSE;
 }
 
- /*
+/*
  * @implemented
  */
 BOOL
@@ -1562,7 +1563,7 @@ NtGdiInit()
     return TRUE;
 }
 
- /*
+/*
  * @unimplemented
  */
 ULONG
@@ -1578,7 +1579,7 @@ NtGdiMakeFontDir(
     return 0;
 }
 
- /*
+/*
  * @unimplemented
  */
 BOOL
@@ -1590,7 +1591,7 @@ NtGdiMonoBitmap(
     return FALSE;
 }
 
- /*
+/*
  * @unimplemented
  */
 HBITMAP
@@ -1603,7 +1604,7 @@ NtGdiSetBitmapAttributes(
     return NULL;
 }
 
- /*
+/*
  * @unimplemented
  */
 ULONG
@@ -1615,7 +1616,7 @@ NtGdiSetFontEnumeration(
     return 0;
 }
 
- /*
+/*
  * @unimplemented
  */
 BOOL
@@ -1629,7 +1630,7 @@ NtGdiSetFontXform(
     return FALSE;
 }
 
- /*
+/*
  * @unimplemented
  */
 BOOL
@@ -1643,7 +1644,7 @@ NtGdiSetLinkedUFIs(
     return FALSE;
 }
 
- /*
+/*
  * @unimplemented
  */
 BOOL
@@ -1657,7 +1658,7 @@ NtGdiSetMagicColors(
     return FALSE;
 }
 
- /*
+/*
  * @unimplemented
  */
 BOOL
@@ -1670,7 +1671,7 @@ NtGdiUnloadPrinterDriver(
     return FALSE;
 }
 
- /*
+/*
  * @implemented
  */
 BOOL
@@ -1732,3 +1733,5 @@ EngNineGrid(IN SURFOBJ* pDestSurfaceObj,
     UNIMPLEMENTED;
     return FALSE;
 }
+
+/* EOF */