7 modified files
reactos/subsys/win32k/eng
diff -u -r1.30 -r1.31
--- lineto.c 24 Feb 2004 13:27:02 -0000 1.30
+++ lineto.c 27 Mar 2004 00:35:02 -0000 1.31
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: lineto.c,v 1.30 2004/02/24 13:27:02 weiden Exp $
+ * $Id: lineto.c,v 1.31 2004/03/27 00:35:02 weiden Exp $
*/
#include <ddk/winddi.h>
@@ -72,7 +72,7 @@
ClipRect = RectEnum.arcl;
delta = max(deltax, deltay);
i = 0;
- error = delta / 2;
+ error = delta >> 1;
while (i < delta && (ClipRect < RectEnum.arcl + RectEnum.c || EnumMore))
{
while ((ClipRect < RectEnum.arcl + RectEnum.c /* there's still a current clip rect */
@@ -142,7 +142,7 @@
ClipRect = RectEnum.arcl;
delta = max(deltax, deltay);
i = 0;
- error = delta / 2;
+ error = delta >> 1;
while (i < delta && (ClipRect < RectEnum.arcl + RectEnum.c || EnumMore))
{
while ((ClipRect < RectEnum.arcl + RectEnum.c
@@ -211,7 +211,7 @@
ClipRect = RectEnum.arcl;
delta = max(deltax, deltay);
i = 0;
- error = delta / 2;
+ error = delta >> 1;
while (i < delta && (ClipRect < RectEnum.arcl + RectEnum.c || EnumMore))
{
while ((ClipRect < RectEnum.arcl + RectEnum.c
@@ -280,7 +280,7 @@
ClipRect = RectEnum.arcl;
delta = max(deltax, deltay);
i = 0;
- error = delta / 2;
+ error = delta >> 1;
while (i < delta && (ClipRect < RectEnum.arcl + RectEnum.c || EnumMore))
{
while ((ClipRect < RectEnum.arcl + RectEnum.c
reactos/subsys/win32k/objects
diff -u -r1.5 -r1.6
--- bezier.c 19 Feb 2004 21:12:10 -0000 1.5
+++ bezier.c 27 Mar 2004 00:35:02 -0000 1.6
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: bezier.c,v 1.5 2004/02/19 21:12:10 weiden Exp $ */
+/* $Id: bezier.c,v 1.6 2004/03/27 00:35:02 weiden Exp $ */
#include <windows.h>
#include <ddk/ntddk.h>
#include <math.h>
@@ -62,8 +62,8 @@
* */
#define BEZIERMIDDLE(Mid, P1, P2) \
- (Mid).x=((P1).x+(P2).x + 1)/2;\
- (Mid).y=((P1).y+(P2).y + 1)/2;
+ (Mid).x=((P1).x+(P2).x + 1) >> 1;\
+ (Mid).y=((P1).y+(P2).y + 1) >> 1;
static int abs ( int __x )
{
reactos/subsys/win32k/objects
diff -u -r1.34 -r1.35
--- color.c 24 Feb 2004 13:27:03 -0000 1.34
+++ color.c 27 Mar 2004 00:35:02 -0000 1.35
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: color.c,v 1.34 2004/02/24 13:27:03 weiden Exp $ */
+/* $Id: color.c,v 1.35 2004/03/27 00:35:02 weiden Exp $ */
// FIXME: Use PXLATEOBJ logicalToSystem instead of int *mapping
@@ -120,7 +120,7 @@
for (i = 216; i < 246; i++)
{
- int v = (i - 216) * 8;
+ int v = (i - 216) << 3;
Palette.aEntries[i].peRed = v;
Palette.aEntries[i].peGreen = v;
Palette.aEntries[i].peBlue = v;
reactos/subsys/win32k/objects
diff -u -r1.43 -r1.44
--- dib.c 15 Mar 2004 22:06:55 -0000 1.43
+++ dib.c 27 Mar 2004 00:35:02 -0000 1.44
@@ -1,5 +1,5 @@
/*
- * $Id: dib.c,v 1.43 2004/03/15 22:06:55 gvg Exp $
+ * $Id: dib.c,v 1.44 2004/03/27 00:35:02 weiden Exp $
*
* ReactOS W32 Subsystem
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
@@ -1190,12 +1190,12 @@
switch(depth)
{
- case 1: words = (width + 31) / 32; break;
- case 4: words = (width + 7) / 8; break;
- case 8: words = (width + 3) / 4; break;
+ case 1: words = (width + 31) >> 5; break;
+ case 4: words = (width + 7) >> 3; break;
+ case 8: words = (width + 3) >> 2; break;
case 15:
- case 16: words = (width + 1) / 2; break;
- case 24: words = (width * 3 + 3)/4; break;
+ case 16: words = (width + 1) >> 1; break;
+ case 24: words = (width * 3 + 3) >> 2; break;
default:
DPRINT("(%d): Unsupported depth\n", depth );
@@ -1203,7 +1203,7 @@
case 32:
words = width;
}
- return 4 * words;
+ return words << 2;
}
/***********************************************************************
reactos/subsys/win32k/objects
diff -u -r1.44 -r1.45
--- fillshap.c 4 Mar 2004 01:50:26 -0000 1.44
+++ fillshap.c 27 Mar 2004 00:35:02 -0000 1.45
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: fillshap.c,v 1.44 2004/03/04 01:50:26 royce Exp $ */
+/* $Id: fillshap.c,v 1.45 2004/03/27 00:35:02 weiden Exp $ */
#undef WIN32_LEAN_AND_MEAN
#include <windows.h>
@@ -435,7 +435,7 @@
Even = (0 == (Right - Left) % 2);
Right--;
Bottom--;
- Radius = (Right - Left) / 2;
+ Radius = (Right - Left) >> 1;
if (Even)
{
@@ -443,8 +443,8 @@
Y = Radius;
d = 2 - Radius;
X18 = Right;
- X27 = (Left + Right) / 2 + 1;
- X36 = (Left + Right) / 2;
+ X27 = ((Left + Right) >> 1) + 1;
+ X36 = (Left + Right) >> 1;
X45 = Left;
Y14 = Top + Radius;
Y23 = Top;
@@ -466,8 +466,8 @@
Y = Radius;
d = 1 - Radius;
X18 = Right;
- X27 = (Left + Right) / 2;
- X36 = (Left + Right) / 2;
+ X27 = (Left + Right) >> 1;
+ X36 = (Left + Right) >> 1;
X45 = Left;
Y14 = Top + Radius;
Y23 = Top;
@@ -483,7 +483,7 @@
{
if (d < 0)
{
- d += 2 * X + (Even ? 4 : 3);
+ d += (X << 1) + (Even ? 4 : 3);
X27++;
X36--;
@@ -492,7 +492,7 @@
}
else
{
- d += 2 * (X - Y) + 5;
+ d += ((X - Y) << 1) + 5;
Y--;
Y23++;
@@ -524,8 +524,8 @@
LONG x, y, deltax, deltay, i, xchange, ychange, error;
int Type;
- x = (Right + Left) / 2;
- y = (Bottom + Top) / 2;
+ x = (Right + Left) >> 1;
+ y = (Bottom + Top) >> 1;
deltax = XTo - x;
deltay = YTo - y;
reactos/subsys/win32k/objects
diff -u -r1.15 -r1.16
--- palette.c 19 Feb 2004 21:12:10 -0000 1.15
+++ palette.c 27 Mar 2004 00:35:02 -0000 1.16
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: palette.c,v 1.15 2004/02/19 21:12:10 weiden Exp $ */
+/* $Id: palette.c,v 1.16 2004/03/27 00:35:02 weiden Exp $ */
#undef WIN32_LEAN_AND_MEAN
#include <windows.h>
@@ -158,7 +158,7 @@
int i, j = PALETTE_firstFree = NB_RESERVED_COLORS/2;
COLOR_sysPal[j].peFlags = 0;
- for(i = NB_RESERVED_COLORS/2 + 1 ; i < 256 - NB_RESERVED_COLORS/2 ; i++)
+ for(i = (NB_RESERVED_COLORS>>1) + 1 ; i < 256 - (NB_RESERVED_COLORS>>1) ; i++)
{
if( i < COLOR_gapStart || i > COLOR_gapEnd )
{
reactos/subsys/win32k/objects
diff -u -r1.84 -r1.85
--- text.c 23 Mar 2004 19:46:50 -0000 1.84
+++ text.c 27 Mar 2004 00:35:02 -0000 1.85
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: text.c,v 1.84 2004/03/23 19:46:50 gvg Exp $ */
+/* $Id: text.c,v 1.85 2004/03/27 00:35:02 weiden Exp $ */
#undef WIN32_LEAN_AND_MEAN
@@ -743,14 +743,14 @@
}
else
{
- Needed += FamilyNameW.Length + StyleNameW.Length + 2 * sizeof(WCHAR); /* family + " " + style */
+ Needed += FamilyNameW.Length + StyleNameW.Length + (sizeof(WCHAR) << 1); /* family + " " + style */
}
/* length of otmpStyleName */
Needed += StyleNameW.Length + sizeof(WCHAR);
/* length of otmpFullName */
- Needed += FamilyNameW.Length + StyleNameW.Length + 2 * sizeof(WCHAR);
+ Needed += FamilyNameW.Length + StyleNameW.Length + (sizeof(WCHAR) << 1);
if (Size < Needed)
{
@@ -946,7 +946,7 @@
{
wcscat((WCHAR*) Cp, L" ");
wcscat((WCHAR*) Cp, StyleNameW.Buffer);
- Cp += FamilyNameW.Length + StyleNameW.Length + 2 * sizeof(WCHAR);
+ Cp += FamilyNameW.Length + StyleNameW.Length + (sizeof(WCHAR) << 1);
}
else
{
CVSspam 0.2.8