Extensible Firmware Interface Specification
I-10 12/01/02 Version 1.10
//
// Advance what we have read
//
FillBuf (Sd, Sd->mPTLen[Val]);
if (Val) {
Val = (UINT16)((1U << (Val - 1)) + GetBits (Sd, (UINT16)(Val - 1)));
}
return Val;
}
STATIC
UINT16
ReadPTLen (
IN SCRATCH_DATA *Sd,
IN UINT16 nn,
IN UINT16 nbit,
IN UINT16 Special
)
/*++
Routine Descriptiion:
Reads code lengths for the Extra Set or the Position Set
Arguments:
Sd - The global scratch data
nn - Number of symbols
nbit - Number of bits needed to represent nn
Special - The special symbol that needs to be taken care of
Returns:
0 - OK.
BAD_TABLE - Table is corrupted.
--*/
{
UINT16 n;
UINT16 c;
UINT16 i;
UINT16 Mask;
n = GetBits (Sd, nbit);
if (n == 0) {
c = GetBits (Sd, nbit);
for ( i = 0; i < 256; i ++) {
Sd->mPTTable[i] = c;
}
for ( i = 0; i < nn; i++) {
Sd->mPTLen[i] = 0;
}