[WIN32K:FORMATTING]

- Indentation and whitespace fixes for ntuser/prop.c. No functional changes.

svn path=/trunk/; revision=69484
This commit is contained in:
Thomas Faber 2015-10-10 13:06:57 +00:00
parent 6da1a0b9b0
commit 34867f7658

View file

@ -11,8 +11,11 @@ DBG_DEFAULT_CHANNEL(UserProp);
/* STATIC FUNCTIONS **********************************************************/
PPROPERTY FASTCALL
IntGetProp(PWND Window, ATOM Atom)
PPROPERTY
FASTCALL
IntGetProp(
PWND Window,
ATOM Atom)
{
PLIST_ENTRY ListEntry;
PPROPERTY Property;
@ -20,7 +23,7 @@ IntGetProp(PWND Window, ATOM Atom)
ListEntry = Window->PropListHead.Flink;
for (i = 0; i < Window->PropListItems; i++ )
for (i = 0; i < Window->PropListItems; i++)
{
Property = CONTAINING_RECORD(ListEntry, PROPERTY, PropListEntry);
@ -42,36 +45,45 @@ IntGetProp(PWND Window, ATOM Atom)
HANDLE
FASTCALL
UserGetProp(PWND pWnd, ATOM Atom)
UserGetProp(
PWND pWnd,
ATOM Atom)
{
PPROPERTY Prop;
Prop = IntGetProp(pWnd, Atom);
return Prop ? Prop->Data : NULL;
}
BOOL FASTCALL
IntRemoveProp(PWND Window, ATOM Atom)
BOOL
FASTCALL
IntRemoveProp(
PWND Window,
ATOM Atom)
{
PPROPERTY Prop;
Prop = IntGetProp(Window, Atom);
Prop = IntGetProp(Window, Atom);
if (Prop == NULL)
{
return FALSE;
}
RemoveEntryList(&Prop->PropListEntry);
UserHeapFree(Prop);
Window->PropListItems--;
return TRUE;
}
BOOL FASTCALL
IntSetProp(PWND pWnd, ATOM Atom, HANDLE Data)
BOOL
FASTCALL
IntSetProp(
PWND pWnd,
ATOM Atom,
HANDLE Data)
{
PPROPERTY Prop;
Prop = IntGetProp(pWnd, Atom);
if (Prop == NULL)
{
Prop = UserHeapAlloc(sizeof(PROPERTY));
@ -88,8 +100,10 @@ IntSetProp(PWND pWnd, ATOM Atom, HANDLE Data)
return TRUE;
}
VOID FASTCALL
IntRemoveWindowProp(PWND Window)
VOID
FASTCALL
IntRemoveWindowProp(
PWND Window)
{
PLIST_ENTRY ListEntry;
PPROPERTY Property;
@ -107,8 +121,10 @@ IntRemoveWindowProp(PWND Window)
/* FUNCTIONS *****************************************************************/
NTSTATUS APIENTRY
NtUserBuildPropList(HWND hWnd,
NTSTATUS
APIENTRY
NtUserBuildPropList(
HWND hWnd,
LPVOID Buffer,
DWORD BufferSize,
DWORD *Count)
@ -126,29 +142,30 @@ NtUserBuildPropList(HWND hWnd,
if (!(Window = UserGetWindowObject(hWnd)))
{
RETURN( STATUS_INVALID_HANDLE);
RETURN(STATUS_INVALID_HANDLE);
}
if(Buffer)
if (Buffer)
{
if(!BufferSize || (BufferSize % sizeof(PROPLISTITEM) != 0))
if (!BufferSize || (BufferSize % sizeof(PROPLISTITEM) != 0))
{
RETURN( STATUS_INVALID_PARAMETER);
RETURN(STATUS_INVALID_PARAMETER);
}
/* Copy list */
li = (PROPLISTITEM *)Buffer;
ListEntry = Window->PropListHead.Flink;
while((BufferSize >= sizeof(PROPLISTITEM)) && (ListEntry != &Window->PropListHead))
while ((BufferSize >= sizeof(PROPLISTITEM)) &&
(ListEntry != &Window->PropListHead))
{
Property = CONTAINING_RECORD(ListEntry, PROPERTY, PropListEntry);
listitem.Atom = Property->Atom;
listitem.Data = Property->Data;
Status = MmCopyToCaller(li, &listitem, sizeof(PROPLISTITEM));
if(!NT_SUCCESS(Status))
if (!NT_SUCCESS(Status))
{
RETURN( Status);
RETURN(Status);
}
BufferSize -= sizeof(PROPLISTITEM);
@ -163,25 +180,28 @@ NtUserBuildPropList(HWND hWnd,
Cnt = Window->PropListItems * sizeof(PROPLISTITEM);
}
if(Count)
if (Count)
{
Status = MmCopyToCaller(Count, &Cnt, sizeof(DWORD));
if(!NT_SUCCESS(Status))
if (!NT_SUCCESS(Status))
{
RETURN( Status);
RETURN(Status);
}
}
RETURN( STATUS_SUCCESS);
RETURN(STATUS_SUCCESS);
CLEANUP:
TRACE("Leave NtUserBuildPropList, ret=%i\n",_ret_);
TRACE("Leave NtUserBuildPropList, ret=%i\n", _ret_);
UserLeave();
END_CLEANUP;
}
HANDLE APIENTRY
NtUserRemoveProp(HWND hWnd, ATOM Atom)
HANDLE
APIENTRY
NtUserRemoveProp(
HWND hWnd,
ATOM Atom)
{
PWND Window;
PPROPERTY Prop;
@ -193,15 +213,15 @@ NtUserRemoveProp(HWND hWnd, ATOM Atom)
if (!(Window = UserGetWindowObject(hWnd)))
{
RETURN( NULL);
RETURN(NULL);
}
Prop = IntGetProp(Window, Atom);
if (Prop == NULL)
{
RETURN(NULL);
}
Data = Prop->Data;
RemoveEntryList(&Prop->PropListEntry);
UserHeapFree(Prop);
@ -215,8 +235,12 @@ CLEANUP:
END_CLEANUP;
}
BOOL APIENTRY
NtUserSetProp(HWND hWnd, ATOM Atom, HANDLE Data)
BOOL
APIENTRY
NtUserSetProp(
HWND hWnd,
ATOM Atom,
HANDLE Data)
{
PWND Window;
DECLARE_RETURN(BOOL);
@ -226,13 +250,13 @@ NtUserSetProp(HWND hWnd, ATOM Atom, HANDLE Data)
if (!(Window = UserGetWindowObject(hWnd)))
{
RETURN( FALSE);
RETURN(FALSE);
}
RETURN( IntSetProp(Window, Atom, Data));
RETURN(IntSetProp(Window, Atom, Data));
CLEANUP:
TRACE("Leave NtUserSetProp, ret=%i\n",_ret_);
TRACE("Leave NtUserSetProp, ret=%i\n", _ret_);
UserLeave();
END_CLEANUP;
}