1) Add BufToHexString, HexStringToBuf and IsHexDigit to BaseLib.

2) Remove the duplicated functions implementation  from the modules that reference these APIs 

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5283 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qwang12
2008-05-23 05:30:08 +00:00
parent d9e5c1fffb
commit 36fe40c2ea
21 changed files with 146 additions and 974 deletions

View File

@ -84,33 +84,6 @@ IP4_ADDR mIp4AllMasks[IP4_MASK_NUM] = {
EFI_IPv4_ADDRESS mZeroIp4Addr = {{0, 0, 0, 0}};
/**
Converts the low nibble of a byte to hex unicode character.
@param Nibble lower nibble of a byte.
@return Hex unicode character.
**/
CHAR16
NibbleToHexChar (
IN UINT8 Nibble
)
{
//
// Porting Guide:
// This library interface is simply obsolete.
// Include the source code to user code.
//
Nibble &= 0x0F;
if (Nibble <= 0x9) {
return (CHAR16)(Nibble + L'0');
}
return (CHAR16)(Nibble - 0xA + L'A');
}
/**
Return the length of the mask. If the mask is invalid,
return the invalid length 33, which is IP4_MASK_NUM.