FreeBSD/sys/contrib/dev/acpica/components/debugger/dbutils.c
/*******************************************************************************
 *
 * FUNCTION:    AcpiDbUint32ToHexString
 *
 * PARAMETERS:  Value           - The value to be converted to string
 *              Buffer          - Buffer for result (not less than 11 bytes)
 *
 * RETURN:      None
 *
 * DESCRIPTION: Convert the unsigned 32-bit value to the hexadecimal image
 *
 * NOTE: It is the caller's responsibility to ensure that the length of buffer
 *       is sufficient.
 *
 ******************************************************************************/
AcpiDbUint32ToHexString
PARAMETERS:  Value           - The value to be converted to string
Buffer          - Buffer for result (not less than 11 bytes)

None

Convert the unsigned 32-bit value to the hexadecimal image

It is the caller's responsibility to ensure that the length of buffer
is sufficient.
AcpiDbUint32ToHexString PARAMETERS : Value - The value to be converted to string Buffer - Buffer for result ( not less than 11 bytes ) None Convert the unsigned 32 - bit value to the hexadecimal image It is the caller ' s responsibility to ensure that the length of buffer is sufficient .
void
AcpiDbUint32ToHexString (
    UINT32                  Value,
    char                    *Buffer)
{
    int                     i;
    if (Value == 0)
    {
        strcpy (Buffer, "0");
        return;
    }
    Buffer[8] = '\0';
    for (i = 7; i >= 0; i--)
    {
        Buffer[i] = AcpiGbl_UpperHexDigits [Value & 0x0F];
        Value = Value >> 4;
    }
}
void AcpiDbUint32ToHexString ( UINT32 Value , char * Buffer ) { int i ; if ( Value == 0 ) { strcpy ( Buffer , " " ) ; return ; } Buffer [ 8 ] = ' \0 ' ; for ( i = 7 ; i >= 0 ; i -- ) { Buffer [ i ] = AcpiGbl_UpperHexDigits [ Value & 0x0F ] ; Value = Value >> 4 ; } }
FUNCTION:    AcpiDbUint32ToHexString
 PARAMETERS:  Value           - The value to be converted to string
              Buffer          - Buffer for result (not less than 11 bytes)
FUNCTION : AcpiDbUint32ToHexString PARAMETERS : Value - The value to be converted to string Buffer - Buffer for result ( not less than 11 bytes )