Author: jimtabor
Date: Thu Nov 29 06:48:32 2007
New Revision: 30851
URL:
http://svn.reactos.org/svn/reactos?rev=30851&view=rev
Log:
Fix typos again, use || and != this time.
Modified:
trunk/reactos/dll/win32/gdi32/objects/coord.c
trunk/reactos/dll/win32/gdi32/objects/text.c
Modified: trunk/reactos/dll/win32/gdi32/objects/coord.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/co…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/coord.c (original)
+++ trunk/reactos/dll/win32/gdi32/objects/coord.c Thu Nov 29 06:48:32 2007
@@ -98,8 +98,8 @@
INT i;
PDC_ATTR Dc_Attr;
- if (!GdiGetHandleUserData((HGDIOBJ) hDC, (PVOID) &Dc_Attr) &&
- (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_DC)) return FALSE;
+ if (!GdiGetHandleUserData((HGDIOBJ) hDC, (PVOID) &Dc_Attr) ||
+ (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC)) return FALSE;
if (Dc_Attr->flXform & ( DEVICE_TO_WORLD_INVALID | // Force a full
recalibration!
PAGE_XLATE_CHANGED | // Changes or Updates have been
made,
@@ -126,8 +126,8 @@
INT i;
PDC_ATTR Dc_Attr;
- if (!GdiGetHandleUserData((HGDIOBJ) hDC, (PVOID) &Dc_Attr) &&
- (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_DC)) return FALSE;
+ if (!GdiGetHandleUserData((HGDIOBJ) hDC, (PVOID) &Dc_Attr) ||
+ (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC)) return FALSE;
if (Dc_Attr->flXform & ( PAGE_XLATE_CHANGED | // Check for Changes and
Updates
PAGE_EXTENTS_CHANGED |
@@ -155,8 +155,8 @@
{
PDC_ATTR Dc_Attr;
- if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr) &&
- (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_DC)) return FALSE;
+ if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr) ||
+ (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC)) return FALSE;
if ( lpPoint )
{
@@ -237,8 +237,8 @@
#endif
PDC_ATTR Dc_Attr;
- if (!GdiGetHandleUserData((HGDIOBJ) hDC, (PVOID) &Dc_Attr) &&
- (GDI_HANDLE_GET_TYPE(hDC) == GDI_OBJECT_TYPE_DC)) return FALSE;
+ if (!GdiGetHandleUserData((HGDIOBJ) hDC, (PVOID) &Dc_Attr) ||
+ (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_DC)) return FALSE;
/* Check that graphics mode is GM_ADVANCED */
if ( Dc_Attr->iGraphicsMode != GM_ADVANCED ) return FALSE;
@@ -255,8 +255,8 @@
{
PDC_ATTR Dc_Attr;
- if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr) &&
- (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_DC)) return FALSE;
+ if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr) ||
+ (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC)) return FALSE;
if ((Dc_Attr->flXform & PAGE_EXTENTS_CHANGED) && (Dc_Attr->iMapMode
== MM_ISOTROPIC))
// Something was updated, go to kernel.
@@ -279,8 +279,8 @@
{
PDC_ATTR Dc_Attr;
- if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr) &&
- (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_DC)) return FALSE;
+ if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr) ||
+ (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC)) return FALSE;
lpPoint->x = Dc_Attr->ptlViewportOrg.x;
lpPoint->y = Dc_Attr->ptlViewportOrg.y;
if (Dc_Attr->dwLayout & LAYOUT_RTL) lpPoint->x = -lpPoint->x;
@@ -298,8 +298,8 @@
{
PDC_ATTR Dc_Attr;
- if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr) &&
- (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_DC)) return FALSE;
+ if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr) ||
+ (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC)) return FALSE;
lpSize->cx = Dc_Attr->szlWindowExt.cx;
lpSize->cy = Dc_Attr->szlWindowExt.cy;
if (Dc_Attr->dwLayout & LAYOUT_RTL) lpSize->cx = -lpSize->cx;
@@ -317,8 +317,8 @@
{
PDC_ATTR Dc_Attr;
- if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr) &&
- (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_DC)) return FALSE;
+ if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr) ||
+ (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC)) return FALSE;
lpPoint->x = Dc_Attr->ptlWindowOrg.x;
lpPoint->y = Dc_Attr->ptlWindowOrg.y;
return TRUE;
@@ -357,8 +357,8 @@
}
}
#endif
- if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr) &&
- (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_DC)) return FALSE;
+ if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr) ||
+ (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC)) return FALSE;
if (lpSize)
{
@@ -421,8 +421,8 @@
}
}
#endif
- if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr) &&
- (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_DC)) return FALSE;
+ if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr) ||
+ (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC)) return FALSE;
if (lpPoint)
{
@@ -484,8 +484,8 @@
}
}
#endif
- if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr) &&
- (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_DC)) return FALSE;
+ if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr) ||
+ (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC)) return FALSE;
if (lpSize)
{
@@ -556,8 +556,8 @@
}
}
#endif
- if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr) &&
- (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_DC)) return FALSE;
+ if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr) ||
+ (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC)) return FALSE;
if (lpPoint)
{
@@ -583,8 +583,8 @@
)
{
PDC_ATTR Dc_Attr;
- if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr) &&
- (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_DC)) return GDI_ERROR;
+ if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr) ||
+ (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC)) return GDI_ERROR;
return Dc_Attr->dwLayout;
}
@@ -617,8 +617,8 @@
}
}
#endif
- if (!GdiIsHandleValid((HGDIOBJ) hdc) &&
- (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_DC)) return GDI_ERROR;
+ if (!GdiIsHandleValid((HGDIOBJ) hdc) ||
+ (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC)) return GDI_ERROR;
return NtGdiSetLayout( hdc, -1, dwLayout);
}
@@ -629,8 +629,8 @@
STDCALL
SetLayoutWidth(HDC hdc,LONG wox,DWORD dwLayout)
{
- if (!GdiIsHandleValid((HGDIOBJ) hdc) &&
- (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_DC)) return GDI_ERROR;
+ if (!GdiIsHandleValid((HGDIOBJ) hdc) ||
+ (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC)) return GDI_ERROR;
return NtGdiSetLayout( hdc, wox, dwLayout);
}
Modified: trunk/reactos/dll/win32/gdi32/objects/text.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/te…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/text.c (original)
+++ trunk/reactos/dll/win32/gdi32/objects/text.c Thu Nov 29 06:48:32 2007
@@ -55,8 +55,8 @@
GdiGetCodePage(HDC hdc)
{
PDC_ATTR Dc_Attr;
- if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr) &&
- (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_DC)) return 0;
+ if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr) ||
+ (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC)) return 0;
if (Dc_Attr->ulDirty_ & DIRTY_CHARSET) return LOWORD(NtGdiGetCharSet(hdc));
return LOWORD(Dc_Attr->iCS_CP);
}
@@ -73,8 +73,8 @@
{
PDC_ATTR Dc_Attr;
- if (!GdiGetHandleUserData((HGDIOBJ) hDc, (PVOID) &Dc_Attr) &&
- (GDI_HANDLE_GET_TYPE(hDc) == GDI_OBJECT_TYPE_DC)) return 0;
+ if (!GdiGetHandleUserData((HGDIOBJ) hDc, (PVOID) &Dc_Attr) ||
+ (GDI_HANDLE_GET_TYPE(hDc) != GDI_OBJECT_TYPE_DC)) return 0;
return Dc_Attr->lTextExtra;
// return GetDCDWord( hDc, GdiGetTextCharExtra, 0);
}
@@ -444,8 +444,8 @@
return MFDRV_SetTextCharacterExtra( hDC, CharExtra ); // Wine port.
}
#endif
- if (!GdiGetHandleUserData((HGDIOBJ) hDC, (PVOID) &Dc_Attr) &&
- (GDI_HANDLE_GET_TYPE(hDC) == GDI_OBJECT_TYPE_DC)) return cExtra;
+ if (!GdiGetHandleUserData((HGDIOBJ) hDC, (PVOID) &Dc_Attr) ||
+ (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_DC)) return cExtra;
if (NtCurrentTeb()->GdiTebBatch.HDC == (ULONG)hDC)
{
@@ -470,8 +470,8 @@
GetTextAlign(HDC hdc)
{
PDC_ATTR Dc_Attr;
- if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr) &&
- (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_DC)) return 0;
+ if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr) ||
+ (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC)) return 0;
return Dc_Attr->lTextAlign;
}
@@ -485,8 +485,8 @@
GetTextColor(HDC hdc)
{
PDC_ATTR Dc_Attr;
- if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr) &&
- (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_DC)) return 0;
+ if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr) ||
+ (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC)) return 0;
return Dc_Attr->ulForegroundClr;
}
@@ -502,9 +502,6 @@
{
PDC_ATTR Dc_Attr;
INT OldMode = 0;
-
- if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr) &&
- (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_DC)) return OldMode;
#if 0
if (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_DC)
{
@@ -525,6 +522,9 @@
}
}
#endif
+ if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr) ||
+ (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC)) return OldMode;
+
OldMode = Dc_Attr->lTextAlign;
Dc_Attr->lTextAlign = fMode; // Raw
if (Dc_Attr->dwLayout & LAYOUT_RTL)
@@ -569,8 +569,8 @@
}
}
#endif
- if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr) &&
- (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_DC)) return OldColor;
+ if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr) ||
+ (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC)) return OldColor;
OldColor = (COLORREF) Dc_Attr->ulForegroundClr;
Dc_Attr->ulForegroundClr = (ULONG) crColor;
@@ -606,8 +606,8 @@
return FALSE;
}
#endif
- if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr) &&
- (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_DC)) return FALSE;
+ if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr) ||
+ (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC)) return FALSE;
if (NtCurrentTeb()->GdiTebBatch.HDC == (ULONG)hdc)
{