HTML Tidy  5.8.0
The HTACG Tidy HTML Project
Key Discovery

Detailed Description

LibTidy users may want to use TidyReportCallback to enable their own localization lookup features.

Because Tidy's report codes are enums the specific values can change over time. Using these functions provides the ability for LibTidy users to use LibTidy's enum values as strings for lookup purposes.

Functions

TY_PRIVATE TidyIterator TY_❪getErrorCodeList❫ (void)
 Initializes the TidyIterator to point to the first item in Tidy's list of error codes that can be return with TidyReportFilter3. More...
 
TY_PRIVATE uint TY_❪getNextErrorCode❫ (TidyIterator *iter)
 Returns the next error code having initialized the iterator with getErrorCodeList(). More...
 
TY_PRIVATE ctmbstr TY_❪tidyErrorCodeAsKey❫ (uint code)
 This function returns a string representing the enum value name that can be used as a lookup key independent of changing string values. More...
 
TY_PRIVATE uint TY_❪tidyErrorCodeFromKey❫ (ctmbstr code)
 Given an error code string, return the integer value of it, or UINT_MAX as an error flag. More...
 

Function Documentation

◆ TY_❪getErrorCodeList❫()

TY_PRIVATE TidyIterator TY_❪getErrorCodeList❫ ( void  )

Initializes the TidyIterator to point to the first item in Tidy's list of error codes that can be return with TidyReportFilter3.

Items can be retrieved with getNextErrorCode();

◆ TY_❪getNextErrorCode❫()

TY_PRIVATE uint TY_❪getNextErrorCode❫ ( TidyIterator *  iter)

Returns the next error code having initialized the iterator with getErrorCodeList().

You can use tidyErrorCodeAsKey to determine the key for this value.

◆ TY_❪tidyErrorCodeAsKey❫()

TY_PRIVATE ctmbstr TY_❪tidyErrorCodeAsKey❫ ( uint  code)

This function returns a string representing the enum value name that can be used as a lookup key independent of changing string values.

TidyReportCallback will return this general string as the report message key.

◆ TY_❪tidyErrorCodeFromKey❫()

TY_PRIVATE uint TY_❪tidyErrorCodeFromKey❫ ( ctmbstr  code)

Given an error code string, return the integer value of it, or UINT_MAX as an error flag.