Formatting only. Add a space after if/for/while.

svn path=/trunk/; revision=66527
This commit is contained in:
Timo Kreuzer 2015-03-01 17:59:51 +00:00
parent 5e781d44e0
commit b288b023a8

View file

@ -105,7 +105,7 @@ IntLoadSystenIcons(HICON hcur, DWORD id)
return;
}
for(i = 0 ; i < 6; i++)
for (i = 0 ; i < 6; i++)
{
if (gasysico[i].type == id)
{
@ -177,7 +177,7 @@ BOOL UserSetCursorPos( INT x, INT y, DWORD flags, ULONG_PTR dwExtraInfo, BOOL Ho
RECTL rcClip;
POINT pt;
if(!(DesktopWindow = UserGetDesktopWindow()))
if (!(DesktopWindow = UserGetDesktopWindow()))
{
return FALSE;
}
@ -190,10 +190,10 @@ BOOL UserSetCursorPos( INT x, INT y, DWORD flags, ULONG_PTR dwExtraInfo, BOOL Ho
else
rcClip = CurInfo->rcClip;
if(x >= rcClip.right) x = rcClip.right - 1;
if(x < rcClip.left) x = rcClip.left;
if(y >= rcClip.bottom) y = rcClip.bottom - 1;
if(y < rcClip.top) y = rcClip.top;
if (x >= rcClip.right) x = rcClip.right - 1;
if (x < rcClip.left) x = rcClip.left;
if (y >= rcClip.bottom) y = rcClip.bottom - 1;
if (y < rcClip.top) y = rcClip.top;
pt.x = x;
pt.y = y;
@ -285,7 +285,7 @@ FreeCurIconObject(
{
PCURICON_OBJECT CurIcon = Object;
if(!(CurIcon->CURSORF_flags & CURSORF_ACON))
if (!(CurIcon->CURSORF_flags & CURSORF_ACON))
{
HBITMAP bmpMask = CurIcon->hbmMask;
HBITMAP bmpColor = CurIcon->hbmColor;
@ -316,7 +316,7 @@ FreeCurIconObject(
PACON AniCurIcon = (PACON)CurIcon;
UINT i;
for(i = 0; i < AniCurIcon->cpcur; i++)
for (i = 0; i < AniCurIcon->cpcur; i++)
{
UserDereferenceObject(AniCurIcon->aspcur[i]);
IntDestroyCurIconObject(AniCurIcon->aspcur[i]);
@ -391,10 +391,10 @@ NtUserGetIconInfo(
}
/* Give back the icon information */
if(IconInfo)
if (IconInfo)
{
PCURICON_OBJECT FrameCurIcon = CurIcon;
if(CurIcon->CURSORF_flags & CURSORF_ACON)
if (CurIcon->CURSORF_flags & CURSORF_ACON)
{
/* Get information from first frame. */
FrameCurIcon = ((PACON)CurIcon)->aspcur[0];
@ -439,7 +439,7 @@ NtUserGetIconInfo(
}
/* Give back the module name */
if(lpModule)
if (lpModule)
{
ULONG BufLen = 0;
if (!CurIcon->atomModName)
@ -551,7 +551,7 @@ NtUserGetIconSize(
goto cleanup;
}
if(CurIcon->CURSORF_flags & CURSORF_ACON)
if (CurIcon->CURSORF_flags & CURSORF_ACON)
{
/* Use first frame for animated cursors */
PACON AniCurIcon = (PACON)CurIcon;
@ -823,7 +823,6 @@ NtUserFindExistingCursorIcon(
TRACE("Enter NtUserFindExistingCursorIcon\n");
_SEH2_TRY
{
ProbeForRead(param, sizeof(*param), 1);
@ -837,14 +836,14 @@ NtUserFindExistingCursorIcon(
/* Capture resource name (it can be an INTRESOURCE == ATOM) */
Status = ProbeAndCaptureUnicodeStringOrAtom(&ustrRsrcSafe, pustrRsrc);
if(!NT_SUCCESS(Status))
if (!NT_SUCCESS(Status))
return NULL;
Status = ProbeAndCaptureUnicodeString(&ustrModuleSafe, UserMode, pustrModule);
if(!NT_SUCCESS(Status))
if (!NT_SUCCESS(Status))
goto done;
Status = RtlLookupAtomInAtomTable(gAtomTable, ustrModuleSafe.Buffer, &atomModName);
ReleaseCapturedUnicodeString(&ustrModuleSafe, UserMode);
if(!NT_SUCCESS(Status))
if (!NT_SUCCESS(Status))
{
/* The module is not in the atom table. No chance to find the cursor */
goto done;
@ -852,7 +851,7 @@ NtUserFindExistingCursorIcon(
UserEnterShared();
CurIcon = pProcInfo->pCursorCache;
while(CurIcon)
while (CurIcon)
{
/* Icon/cursor */
if (paramSafe.bIcon != is_icon(CurIcon))
@ -890,10 +889,10 @@ NtUserFindExistingCursorIcon(
//
// Now search Global Cursors or Icons.
//
if(CurIcon == NULL)
if (CurIcon == NULL)
{
CurIcon = gcurFirst;
while(CurIcon)
while (CurIcon)
{
/* Icon/cursor */
if (paramSafe.bIcon != is_icon(CurIcon))
@ -928,12 +927,12 @@ NtUserFindExistingCursorIcon(
CurIcon = CurIcon->pcurNext;
}
}
if(CurIcon)
if (CurIcon)
Ret = CurIcon->head.h;
UserLeave();
done:
if(!IS_INTRESOURCE(ustrRsrcSafe.Buffer))
if (!IS_INTRESOURCE(ustrRsrcSafe.Buffer))
ExFreePoolWithTag(ustrRsrcSafe.Buffer, TAG_STRING);
return Ret;
@ -1100,7 +1099,7 @@ NtUserSetCursorIconData(
_SEH2_TRY
{
ProbeForRead(pCursorData, sizeof(*pCursorData), 1);
if(pCursorData->CURSORF_flags & CURSORF_ACON)
if (pCursorData->CURSORF_flags & CURSORF_ACON)
{
/* This is an animated cursor */
PACON AniCurIcon = (PACON)CurIcon;
@ -1156,48 +1155,48 @@ NtUserSetCursorIconData(
goto done;
}
if(IsAnim)
if (IsAnim)
{
PACON AniCurIcon = (PACON)CurIcon;
/* This is an animated cursor. Create a cursor object for each frame and set up the data */
for(i = 0; i < numFrames; i++)
for (i = 0; i < numFrames; i++)
{
HANDLE hCurFrame = IntCreateCurIconHandle(FALSE);
if(!NtUserSetCursorIconData(hCurFrame, NULL, NULL, pCursorData))
if (!NtUserSetCursorIconData(hCurFrame, NULL, NULL, pCursorData))
goto done;
AniCurIcon->aspcur[i] = UserGetCurIconObject(hCurFrame);
if(!AniCurIcon->aspcur[i])
if (!AniCurIcon->aspcur[i])
goto done;
pCursorData++;
}
}
if(CurIcon->CURSORF_flags & CURSORF_LRSHARED)
if (CurIcon->CURSORF_flags & CURSORF_LRSHARED)
{
IsShared = TRUE;
}
// Support global public cursors and icons too.
if(!IsAnim || IsShared)
if (!IsAnim || IsShared)
{
if(pustrRsrc && pustrModule)
if (pustrRsrc && pustrModule)
{
UNICODE_STRING ustrModuleSafe;
/* We use this convenient function, because INTRESOURCEs and ATOMs are the same */
Status = ProbeAndCaptureUnicodeStringOrAtom(&CurIcon->strName, pustrRsrc);
if(!NT_SUCCESS(Status))
if (!NT_SUCCESS(Status))
goto done;
Status = ProbeAndCaptureUnicodeString(&ustrModuleSafe, UserMode, pustrModule);
if(!NT_SUCCESS(Status))
if (!NT_SUCCESS(Status))
goto done;
Status = RtlAddAtomToAtomTable(gAtomTable, ustrModuleSafe.Buffer, &CurIcon->atomModName);
ReleaseCapturedUnicodeString(&ustrModuleSafe, UserMode);
if(!NT_SUCCESS(Status))
if (!NT_SUCCESS(Status))
goto done;
}
}
if(!CurIcon->hbmMask)
if (!CurIcon->hbmMask)
{
ERR("NtUserSetCursorIconData was got no hbmMask.\n");
EngSetLastError(ERROR_INVALID_PARAMETER);
@ -1206,13 +1205,13 @@ NtUserSetCursorIconData(
GreSetObjectOwner(CurIcon->hbmMask, GDI_OBJ_HMGR_PUBLIC);
if(CurIcon->hbmColor)
if (CurIcon->hbmColor)
GreSetObjectOwner(CurIcon->hbmColor, GDI_OBJ_HMGR_PUBLIC);
if(CurIcon->hbmAlpha)
if (CurIcon->hbmAlpha)
GreSetObjectOwner(CurIcon->hbmAlpha, GDI_OBJ_HMGR_PUBLIC);
if(IsShared)
if (IsShared)
{
/* Update process cache in case of shared cursor */
PPROCESSINFO ppi = CurIcon->head.ppi;
@ -1225,18 +1224,18 @@ NtUserSetCursorIconData(
Ret = TRUE;
done:
if(!Ret && (!IsAnim || IsShared))
if (!Ret && (!IsAnim || IsShared))
{
if(!IS_INTRESOURCE(CurIcon->strName.Buffer))
if (!IS_INTRESOURCE(CurIcon->strName.Buffer))
ExFreePoolWithTag(CurIcon->strName.Buffer, TAG_STRING);
}
if(!Ret && IsAnim)
if (!Ret && IsAnim)
{
PACON AniCurIcon = (PACON)CurIcon;
for(i = 0; i < numFrames; i++)
for (i = 0; i < numFrames; i++)
{
if(AniCurIcon->aspcur[i])
if (AniCurIcon->aspcur[i])
{
UserDereferenceObject(AniCurIcon->aspcur[i]);
IntDestroyCurIconObject(AniCurIcon->aspcur[i]);
@ -1287,7 +1286,7 @@ UserDrawIconEx(
EXLATEOBJ exlo;
/* Stupid case */
if((diFlags & DI_NORMAL) == 0)
if ((diFlags & DI_NORMAL) == 0)
{
ERR("DrawIconEx called without mask or color bitmap to draw.\n");
return FALSE;
@ -1296,7 +1295,7 @@ UserDrawIconEx(
if (pIcon->CURSORF_flags & CURSORF_ACON)
{
ACON* pAcon = (ACON*)pIcon;
if(istepIfAniCur >= pAcon->cicur)
if (istepIfAniCur >= pAcon->cicur)
{
ERR("NtUserDrawIconEx: istepIfAniCur too big!\n");
return FALSE;
@ -1313,14 +1312,14 @@ UserDrawIconEx(
* Shared locks are enough, we are only reading those bitmaps
*/
psurfMask = SURFACE_ShareLockSurface(hbmMask);
if(psurfMask == NULL)
if (psurfMask == NULL)
{
ERR("Unable to lock the mask surface.\n");
return FALSE;
}
/* Color bitmap is not mandatory */
if(hbmColor == NULL)
if (hbmColor == NULL)
{
/* But then the mask bitmap must have the information in it's bottom half */
ASSERT(psurfMask->SurfObj.sizlBitmap.cy == 2*pIcon->cy);
@ -1334,18 +1333,18 @@ UserDrawIconEx(
}
pdc = DC_LockDc(hDc);
if(!pdc)
if (!pdc)
{
ERR("Could not lock the destination DC.\n");
SURFACE_ShareUnlockSurface(psurfMask);
if(psurfColor) SURFACE_ShareUnlockSurface(psurfColor);
if (psurfColor) SURFACE_ShareUnlockSurface(psurfColor);
return FALSE;
}
/* Fix width parameter, if needed */
if (!cxWidth)
{
if(diFlags & DI_DEFAULTSIZE)
if (diFlags & DI_DEFAULTSIZE)
cxWidth = is_icon(pIcon) ?
UserGetSystemMetrics(SM_CXICON) : UserGetSystemMetrics(SM_CXCURSOR);
else
@ -1355,7 +1354,7 @@ UserDrawIconEx(
/* Fix height parameter, if needed */
if (!cyHeight)
{
if(diFlags & DI_DEFAULTSIZE)
if (diFlags & DI_DEFAULTSIZE)
cyHeight = is_icon(pIcon) ?
UserGetSystemMetrics(SM_CYICON) : UserGetSystemMetrics(SM_CYCURSOR);
else
@ -1373,13 +1372,13 @@ UserDrawIconEx(
/* We now have our destination surface and rectangle */
psurfDest = pdc->dclevel.pSurface;
if(psurfDest == NULL)
if (psurfDest == NULL)
{
/* Empty DC */
DC_vFinishBlit(pdc, NULL);
DC_UnlockDc(pdc);
SURFACE_ShareUnlockSurface(psurfMask);
if(psurfColor) SURFACE_ShareUnlockSurface(psurfColor);
if (psurfColor) SURFACE_ShareUnlockSurface(psurfColor);
return FALSE;
}
@ -1398,7 +1397,7 @@ UserDrawIconEx(
TRACE("Performing off-screen rendering.\n");
if(!pbrush)
if (!pbrush)
{
ERR("Failed to get brush object.\n");
goto Cleanup;
@ -1408,7 +1407,7 @@ UserDrawIconEx(
psurfOffScreen = SURFACE_AllocSurface(STYPE_BITMAP,
cxWidth, cyHeight, psurfDest->SurfObj.iBitmapFormat,
0, 0, NULL);
if(!psurfOffScreen)
if (!psurfOffScreen)
{
ERR("Failed to allocate the off-screen surface.\n");
BRUSH_ShareUnlockBrush(pbrush);
@ -1435,7 +1434,7 @@ UserDrawIconEx(
EBRUSHOBJ_vCleanup(&eboFill);
BRUSH_ShareUnlockBrush(pbrush);
if(!Ret)
if (!Ret)
{
ERR("Failed to paint the off-screen surface.\n");
goto Cleanup;
@ -1464,7 +1463,7 @@ UserDrawIconEx(
EBRUSHOBJ_vCleanup(&eboFill);
BRUSH_ShareUnlockBrush(pbrush);
if(!Ret)
if (!Ret)
{
ERR("Failed to paint the off-screen surface.\n");
goto Cleanup;
@ -1480,13 +1479,13 @@ UserDrawIconEx(
}
/* Now do the rendering */
if(hbmAlpha && ((diFlags & DI_NORMAL) == DI_NORMAL))
if (hbmAlpha && ((diFlags & DI_NORMAL) == DI_NORMAL))
{
BLENDOBJ blendobj = { {AC_SRC_OVER, 0, 255, AC_SRC_ALPHA } };
PSURFACE psurf = NULL;
psurf = SURFACE_ShareLockSurface(hbmAlpha);
if(!psurf)
if (!psurf)
{
ERR("SURFACE_LockSurface failed!\n");
goto NoAlpha;
@ -1506,7 +1505,7 @@ UserDrawIconEx(
EXLATEOBJ_vCleanup(&exlo);
SURFACE_ShareUnlockSurface(psurf);
if(Ret) goto done;
if (Ret) goto done;
ERR("NtGdiAlphaBlend failed!\n");
}
NoAlpha:
@ -1531,14 +1530,14 @@ NoAlpha:
EXLATEOBJ_vCleanup(&exlo);
if(!Ret)
if (!Ret)
{
ERR("Failed to mask the bitmap data.\n");
goto Cleanup;
}
}
if(diFlags & DI_IMAGE)
if (diFlags & DI_IMAGE)
{
if (psurfColor)
{
@ -1561,7 +1560,7 @@ NoAlpha:
EXLATEOBJ_vCleanup(&exlo);
if(!Ret)
if (!Ret)
{
ERR("Failed to render the icon bitmap.\n");
goto Cleanup;
@ -1590,7 +1589,7 @@ NoAlpha:
EXLATEOBJ_vCleanup(&exlo);
if(!Ret)
if (!Ret)
{
ERR("Failed to render the icon bitmap.\n");
goto Cleanup;
@ -1601,7 +1600,7 @@ NoAlpha:
done:
#if 0
/* We're done. Was it a double buffered draw ? */
if(bOffScreen)
if (bOffScreen)
{
/* Yes. Draw it back to our DC */
POINTL ptSrc = {0, 0};
@ -1637,7 +1636,7 @@ done:
}
#endif
Cleanup:
if(pdc)
if (pdc)
{
DC_vFinishBlit(pdc, NULL);
DC_UnlockDc(pdc);
@ -1645,13 +1644,13 @@ Cleanup:
#if 0
/* Delete off screen rendering surface */
if(psurfOffScreen)
if (psurfOffScreen)
GDIOBJ_vDeleteObject(&psurfOffScreen->BaseObject);
#endif
/* Unlock other surfaces */
SURFACE_ShareUnlockSurface(psurfMask);
if(psurfColor) SURFACE_ShareUnlockSurface(psurfColor);
if (psurfColor) SURFACE_ShareUnlockSurface(psurfColor);
return Ret;
}
@ -1731,10 +1730,10 @@ NtUserGetCursorFrameInfo(
ret = CurIcon->head.h;
if(CurIcon->CURSORF_flags & CURSORF_ACON)
if (CurIcon->CURSORF_flags & CURSORF_ACON)
{
PACON AniCurIcon = (PACON)CurIcon;
if(istep >= AniCurIcon->cicur)
if (istep >= AniCurIcon->cicur)
{
UserDereferenceObject(CurIcon);
UserLeave();
@ -1804,7 +1803,7 @@ NtUserSetSystemCursor(
ppi = PsGetCurrentProcessWin32Process();
for(i = 0 ; i < 16; i++)
for (i = 0 ; i < 16; i++)
{
if (gasyscur[i].type == id)
{