[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))
          &