Remove some unused internal functions.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2315 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
xli24
2007-01-25 07:30:10 +00:00
parent 35465f63dd
commit fb5a3ed8c7
6 changed files with 10 additions and 495 deletions

View File

@@ -318,32 +318,6 @@ IsHexDigit (
return FALSE;
}
STATIC
CHAR16
NibbleToHexChar (
IN UINT8 Nibble
)
/*++
Routine Description:
Converts the low nibble of a byte to hex unicode character.
Arguments:
Nibble - lower nibble of a byte.
Returns:
Hex unicode character.
--*/
{
Nibble &= 0x0F;
if (Nibble <= 0x9) {
return (CHAR16)(Nibble + L'0');
}
return (CHAR16)(Nibble - 0xA + L'A');
}
STATIC
EFI_STATUS
HexStringToBuf (
@@ -431,65 +405,6 @@ HexStringToBuf (
return EFI_SUCCESS;
}
STATIC
EFI_STATUS
BufToHexString (
IN OUT CHAR16 *Str,
IN OUT UINTN *HexStringBufferLength,
IN UINT8 *Buf,
IN UINTN Len
)
/*++
Routine Description:
Converts binary buffer to Unicode string.
At a minimum, any blob of data could be represented as a hex string.
Arguments:
Str - Pointer to the string.
HexStringBufferLength - Length in bytes of buffer to hold the hex string. Includes tailing '\0' character.
If routine return with EFI_SUCCESS, containing length of hex string buffer.
If routine return with EFI_BUFFER_TOO_SMALL, containg length of hex string buffer desired.
Buf - Buffer to be converted from.
Len - Length in bytes of the buffer to be converted.
Returns:
EFI_SUCCESS: Routine success.
EFI_BUFFER_TOO_SMALL: The hex string buffer is too small.
--*/
{
UINTN Idx;
UINT8 Byte;
UINTN StrLen;
//
// Make sure string is either passed or allocate enough.
// It takes 2 Unicode characters (4 bytes) to represent 1 byte of the binary buffer.
// Plus the Unicode termination character.
//
StrLen = Len * 2;
if (StrLen > ((*HexStringBufferLength) - 1)) {
*HexStringBufferLength = StrLen + 1;
return EFI_BUFFER_TOO_SMALL;
}
*HexStringBufferLength = StrLen + 1;
//
// Ends the string.
//
Str[StrLen] = L'\0';
for (Idx = 0; Idx < Len; Idx++) {
Byte = Buf[Idx];
Str[StrLen - 1 - Idx * 2] = NibbleToHexChar (Byte);
Str[StrLen - 2 - Idx * 2] = NibbleToHexChar ((UINT8)(Byte >> 4));
}
return EFI_SUCCESS;
}
STATIC
CHAR16 *
TrimHexStr (