Intel Extensible Firmware Interface User Manual

Page 971

Advertising
background image

Compression Source Code

Version 1.10

12/01/02

H-7


//
// Return
//

if (mCompSize + 1 + 8 > *DstSize) {
*DstSize = mCompSize + 1 + 8;
return EFI_BUFFER_TOO_SMALL;
} else {
*DstSize = mCompSize + 1 + 8;
return EFI_SUCCESS;
}

}

STATIC
VOID
PutDword(
IN UINT32 Data
)
/*++

Routine Description:

Put a dword to output stream

Arguments:

Data - the dword to put

Returns: (VOID)

--*/
{
if (mDst < mDstUpperLimit) {
*mDst++ = (UINT8)(((UINT8)(Data )) & 0xff);
}

if (mDst < mDstUpperLimit) {
*mDst++ = (UINT8)(((UINT8)(Data >> 0x08)) & 0xff);
}

if (mDst < mDstUpperLimit) {
*mDst++ = (UINT8)(((UINT8)(Data >> 0x10)) & 0xff);
}

if (mDst < mDstUpperLimit) {
*mDst++ = (UINT8)(((UINT8)(Data >> 0x18)) & 0xff);
}
}

STATIC
EFI_STATUS
AllocateMemory ()
/*++

Advertising