FreeBSD/sys/contrib/dev/acpica/compiler/aslmessages.c
/*******************************************************************************
 *
 * FUNCTION:    AeDecodeMessageId
 *
 * PARAMETERS:  MessageId               - ASL message ID (exception code) to be
 *                                        formatted. Possibly fully encoded.
 *
 * RETURN:      A string containing the exception message text.
 *
 * DESCRIPTION: This function validates and translates an ASL message ID into
 *              an ASCII string.
 *
 ******************************************************************************/
AeDecodeMessageId
PARAMETERS:  MessageId               - ASL message ID (exception code) to be
formatted. Possibly fully encoded.

A string containing the exception message text.

This function validates and translates an ASL message ID into
an ASCII string.
AeDecodeMessageId PARAMETERS : MessageId - ASL message ID ( exception code ) to be formatted . Possibly fully encoded . A string containing the exception message text . This function validates and translates an ASL message ID into an ASCII string .
const char *
AeDecodeMessageId (
    UINT16                  MessageId)
{
    UINT32                  Index;
    const char              **MessageTable;
    if (MessageId <= ASL_MSG_MAIN_COMPILER_END)
    {
        MessageTable = AslCompilerMsgs;
        Index = MessageId;
        if (Index >= ACPI_ARRAY_LENGTH (AslCompilerMsgs))
        {
            return ("[Unknown ASL Compiler exception ID]");
        }
    }
    else if (MessageId <= ASL_MSG_TABLE_COMPILER_END)
    {
        MessageTable = AslTableCompilerMsgs;
        Index = MessageId - ASL_MSG_TABLE_COMPILER;
        if (Index >= ACPI_ARRAY_LENGTH (AslTableCompilerMsgs))
        {
            return ("[Unknown Table Compiler exception ID]");
        }
    }
    else if (MessageId <= ASL_MSG_PREPROCESSOR_END)
    {
        MessageTable = AslPreprocessorMsgs;
        Index = MessageId - ASL_MSG_PREPROCESSOR;
        if (Index >= ACPI_ARRAY_LENGTH (AslPreprocessorMsgs))
        {
            return ("[Unknown Preprocessor exception ID]");
        }
    }
    else
    {
        return ("[Unknown exception/component ID]");
    }
    return (MessageTable[Index]);
}
const char * AeDecodeMessageId ( UINT16 MessageId ) { UINT32 Index ; const char * * MessageTable ; if ( MessageId <= ASL_MSG_MAIN_COMPILER_END ) { MessageTable = AslCompilerMsgs ; Index = MessageId ; if ( Index >= ACPI_ARRAY_LENGTH ( AslCompilerMsgs ) ) { return ( " " ) ; } } else if ( MessageId <= ASL_MSG_TABLE_COMPILER_END ) { MessageTable = AslTableCompilerMsgs ; Index = MessageId - ASL_MSG_TABLE_COMPILER ; if ( Index >= ACPI_ARRAY_LENGTH ( AslTableCompilerMsgs ) ) { return ( " " ) ; } } else if ( MessageId <= ASL_MSG_PREPROCESSOR_END ) { MessageTable = AslPreprocessorMsgs ; Index = MessageId - ASL_MSG_PREPROCESSOR ; if ( Index >= ACPI_ARRAY_LENGTH ( AslPreprocessorMsgs ) ) { return ( " " ) ; } } else { return ( " " ) ; } return ( MessageTable [ Index ] ) ; }
FUNCTION:    AeDecodeMessageId
 PARAMETERS:  MessageId               - ASL message ID (exception code) to be
                                        formatted.
FUNCTION : AeDecodeMessageId PARAMETERS : MessageId - ASL message ID ( exception code ) to be formatted .
/* Main ASL Compiler messages */ /* Data Table Compiler messages */ /* Preprocessor messages */ /* Everything else is unknown */