memcpy -> RtlCopyMemory

assert -> ASSERT


svn path=/trunk/; revision=24257
This commit is contained in:
Saveliy Tretiakov 2006-09-24 17:10:58 +00:00
parent a5b535fee4
commit 2047460d02

View file

@ -467,7 +467,7 @@ VOID
FASTCALL FASTCALL
PATH_InitGdiPath ( GdiPath *pPath ) PATH_InitGdiPath ( GdiPath *pPath )
{ {
assert(pPath!=NULL); ASSERT(pPath!=NULL);
pPath->state=PATH_Null; pPath->state=PATH_Null;
pPath->pPoints=NULL; pPath->pPoints=NULL;
@ -484,7 +484,7 @@ VOID
FASTCALL FASTCALL
PATH_DestroyGdiPath ( GdiPath *pPath ) PATH_DestroyGdiPath ( GdiPath *pPath )
{ {
assert(pPath!=NULL); ASSERT(pPath!=NULL);
ExFreePool(pPath->pPoints); ExFreePool(pPath->pPoints);
ExFreePool(pPath->pFlags); ExFreePool(pPath->pFlags);
@ -504,16 +504,16 @@ BOOL
FASTCALL FASTCALL
PATH_AssignGdiPath ( GdiPath *pPathDest, const GdiPath *pPathSrc ) PATH_AssignGdiPath ( GdiPath *pPathDest, const GdiPath *pPathSrc )
{ {
assert(pPathDest!=NULL && pPathSrc!=NULL); ASSERT(pPathDest!=NULL && pPathSrc!=NULL);
/* Make sure destination arrays are big enough */ /* Make sure destination arrays are big enough */
if ( !PATH_ReserveEntries(pPathDest, pPathSrc->numEntriesUsed) ) if ( !PATH_ReserveEntries(pPathDest, pPathSrc->numEntriesUsed) )
return FALSE; return FALSE;
/* Perform the copy operation */ /* Perform the copy operation */
memcpy(pPathDest->pPoints, pPathSrc->pPoints, RtlCopyMemory(pPathDest->pPoints, pPathSrc->pPoints,
sizeof(POINT)*pPathSrc->numEntriesUsed); sizeof(POINT)*pPathSrc->numEntriesUsed);
memcpy(pPathDest->pFlags, pPathSrc->pFlags, RtlCopyMemory(pPathDest->pFlags, pPathSrc->pFlags,
sizeof(BYTE)*pPathSrc->numEntriesUsed); sizeof(BYTE)*pPathSrc->numEntriesUsed);
pPathDest->state=pPathSrc->state; pPathDest->state=pPathSrc->state;
@ -748,7 +748,7 @@ PATH_Arc ( PDC dc, INT x1, INT y1, INT x2, INT y2,
if ( angleEnd <= angleStart ) if ( angleEnd <= angleStart )
{ {
angleEnd+=2*M_PI; angleEnd+=2*M_PI;
assert(angleEnd>=angleStart); ASSERT(angleEnd>=angleStart);
} }
} }
else else
@ -756,7 +756,7 @@ PATH_Arc ( PDC dc, INT x1, INT y1, INT x2, INT y2,
if(angleEnd>=angleStart) if(angleEnd>=angleStart)
{ {
angleEnd-=2*M_PI; angleEnd-=2*M_PI;
assert(angleEnd<=angleStart); ASSERT(angleEnd<=angleStart);
} }
} }
@ -1087,8 +1087,8 @@ PATH_PathToRegion ( GdiPath *pPath, INT nPolyFillMode, HRGN *pHrgn )
INT *pNumPointsInStroke; INT *pNumPointsInStroke;
HRGN hrgn = 0; HRGN hrgn = 0;
assert ( pPath!=NULL ); ASSERT(pPath!=NULL);
assert ( pHrgn!=NULL ); ASSERT(pHrgn!=NULL);
PATH_FlattenPath ( pPath ); PATH_FlattenPath ( pPath );
@ -1148,7 +1148,7 @@ VOID
FASTCALL FASTCALL
PATH_EmptyPath ( GdiPath *pPath ) PATH_EmptyPath ( GdiPath *pPath )
{ {
assert(pPath!=NULL); ASSERT(pPath!=NULL);
pPath->state=PATH_Null; pPath->state=PATH_Null;
pPath->numEntriesUsed=0; pPath->numEntriesUsed=0;
@ -1164,7 +1164,7 @@ BOOL
FASTCALL FASTCALL
PATH_AddEntry ( GdiPath *pPath, const POINT *pPoint, BYTE flags ) PATH_AddEntry ( GdiPath *pPath, const POINT *pPoint, BYTE flags )
{ {
assert(pPath!=NULL); ASSERT(pPath!=NULL);
/* FIXME: If newStroke is true, perhaps we want to check that we're /* FIXME: If newStroke is true, perhaps we want to check that we're
* getting a PT_MOVETO * getting a PT_MOVETO
@ -1206,8 +1206,8 @@ PATH_ReserveEntries ( GdiPath *pPath, INT numEntries )
POINT *pPointsNew; POINT *pPointsNew;
BYTE *pFlagsNew; BYTE *pFlagsNew;
assert(pPath!=NULL); ASSERT(pPath!=NULL);
assert(numEntries>=0); ASSERT(numEntries>=0);
/* Do we have to allocate more memory? */ /* Do we have to allocate more memory? */
if(numEntries > pPath->numEntriesAllocated) if(numEntries > pPath->numEntriesAllocated)
@ -1237,10 +1237,10 @@ PATH_ReserveEntries ( GdiPath *pPath, INT numEntries )
/* Copy old arrays to new arrays and discard old arrays */ /* Copy old arrays to new arrays and discard old arrays */
if(pPath->pPoints) if(pPath->pPoints)
{ {
assert(pPath->pFlags); ASSERT(pPath->pFlags);
memcpy(pPointsNew, pPath->pPoints, sizeof(POINT)*pPath->numEntriesUsed); RtlCopyMemory(pPointsNew, pPath->pPoints, sizeof(POINT)*pPath->numEntriesUsed);
memcpy(pFlagsNew, pPath->pFlags, sizeof(BYTE)*pPath->numEntriesUsed); RtlCopyMemory(pFlagsNew, pPath->pFlags, sizeof(BYTE)*pPath->numEntriesUsed);
ExFreePool(pPath->pPoints); ExFreePool(pPath->pPoints);
ExFreePool(pPath->pFlags); ExFreePool(pPath->pFlags);
@ -1272,7 +1272,7 @@ PATH_DoArcPart ( GdiPath *pPath, FLOAT_POINT corners[],
POINT point; POINT point;
int i; int i;
assert(fabs(angleEnd-angleStart)<=M_PI_2); ASSERT(fabs(angleEnd-angleStart)<=M_PI_2);
/* FIXME: Is there an easier way of computing this? */ /* FIXME: Is there an easier way of computing this? */