HTML Tidy  5.9.15
The HTACG Tidy HTML Project
Configuration Options Utilities

Detailed Description

Provide utilities to manipulate configuration options for output.

Data Structures

struct  AllOption_t
 Array holding all options. More...
 
struct  OptionDesc
 Structure maintains a description of a configuration ption. More...
 

Typedefs

typedef void(* OptionFunc) (TidyDoc, TidyOption, OptionDesc *)
 A type for a function pointer for a function used to print out options descriptions. More...
 

Functions

static int cmpOpt (const void *e1_, const void *e2_)
 A simple option comparator, used for sorting the options. More...
 
static ctmbstr ConfigCategoryId (TidyConfigCategory id)
 Returns the configuration category id for the specified configuration category id. More...
 
static void ForEachOption (TidyDoc tdoc, OptionFunc OptionPrint)
 An iterator for the unsorted options. More...
 
static void ForEachSortedOption (TidyDoc tdoc, OptionFunc OptionPrint)
 An iterator for the sorted options. More...
 
static void GetOption (TidyDoc tdoc, TidyOption topt, OptionDesc *d)
 Create OptionDesc "d" related to "opt". More...
 
static void getSortedOption (TidyDoc tdoc, AllOption_t *tOption)
 Returns options sorted. More...
 
static Bool hasPickList (TidyOption topt)
 Utility to determine if an option has a picklist. More...
 
static void PrintAllowedValues (TidyOption topt, const OptionDesc *d)
 Prints an option's allowed values. More...
 
static void PrintAllowedValuesFromPick (TidyOption topt)
 Prints an option's allowed value as specified in its pick list. More...
 

Data Structure Documentation

◆ AllOption_t

struct AllOption_t

Array holding all options.

Contains a trailing sentinel.

Data Fields
TidyOption topt[N_TIDY_OPTIONS]

◆ OptionDesc

struct OptionDesc

Structure maintains a description of a configuration ption.

Data Fields
ctmbstr cat Category.
uint catid Category ID.
ctmbstr def default
Bool haveVals if yes, vals is valid
ctmbstr name Name.
tmbchar tempdefs[80] storage for default such as integer
ctmbstr type "String, ...
ctmbstr vals Potential values.

If NULL, use an external function

Typedef Documentation

◆ OptionFunc

typedef void(* OptionFunc) (TidyDoc, TidyOption, OptionDesc *)

A type for a function pointer for a function used to print out options descriptions.

Parameters
TidyDocThe document.
TidyOptionThe Tidy option.
OptionDescA pointer to the option description structure.

Function Documentation

◆ cmpOpt()

static int cmpOpt ( const void *  e1_,
const void *  e2_ 
)
static

A simple option comparator, used for sorting the options.

Returns
Returns an integer indicating the result of the comparison.
Parameters
e1_Item A to compare.
e2_Item B to compare.

◆ ConfigCategoryId()

static ctmbstr ConfigCategoryId ( TidyConfigCategory  id)
static

Returns the configuration category id for the specified configuration category id.

This will be used as an XML class attribute value.

Parameters
idThe TidyConfigCategory for which to lookup the category name.
Returns
Returns the configuration category, such as "diagnostics".

◆ ForEachOption()

static void ForEachOption ( TidyDoc  tdoc,
OptionFunc  OptionPrint 
)
static

An iterator for the unsorted options.

Parameters
tdocThe Tidy document.
OptionPrintThe printing function to be used.

◆ ForEachSortedOption()

static void ForEachSortedOption ( TidyDoc  tdoc,
OptionFunc  OptionPrint 
)
static

An iterator for the sorted options.

Parameters
tdocThe Tidy document.
OptionPrintThe printing function to be used.

◆ GetOption()

static void GetOption ( TidyDoc  tdoc,
TidyOption  topt,
OptionDesc d 
)
static

Create OptionDesc "d" related to "opt".

Parameters
tdocThe tidy document.
toptThe option to create a description for.
[out]dThe new option description.

◆ getSortedOption()

static void getSortedOption ( TidyDoc  tdoc,
AllOption_t tOption 
)
static

Returns options sorted.

Parameters
tdocThe Tidy document.
[out]tOptionThe list of options.

◆ hasPickList()

static Bool hasPickList ( TidyOption  topt)
static

Utility to determine if an option has a picklist.

Parameters
toptThe option to check.
Returns
Returns a Bool indicating whether the option has a picklist or not.

◆ PrintAllowedValues()

static void PrintAllowedValues ( TidyOption  topt,
const OptionDesc d 
)
static

Prints an option's allowed values.

Parameters
toptThe Tidy option.
dThe OptionDesc for the option.

◆ PrintAllowedValuesFromPick()

static void PrintAllowedValuesFromPick ( TidyOption  topt)
static

Prints an option's allowed value as specified in its pick list.

Parameters
toptThe Tidy option.