Data Structures | |
| struct | AllOption_t |
| Array holding all options. More... | |
| struct | CmdOptDesc |
| The struct and subsequent array keep the help output structured because we also output all of this stuff as as XML. More... | |
| struct | OptionDesc |
| Structure maintains a description of an option. More... | |
Macros | |
| #define | SPRTF printf |
Typedefs | |
| typedef void(* | OptionFunc) (TidyDoc, TidyOption, OptionDesc *) |
Enumerations | |
| enum | CmdOptCategory { CmdOptFileManip, CmdOptCatFIRST = CmdOptFileManip, CmdOptProcDir, CmdOptCharEnc, CmdOptMisc, CmdOptXML, CmdOptCatLAST } |
| This enum is used to categorize the options for help output. More... | |
Functions | |
| static tmbstr | cleanup_description (ctmbstr description) |
| Cleans up the HTML-laden option descriptions for console output. More... | |
| static int | cmpOpt (const void *e1_, const void *e2_) |
| A simple option comparator. More... | |
| static ctmbstr | ConfigCategoryName (TidyConfigCategory id) |
| Returns the configuration category name for the specified configuration category id. More... | |
| static const char * | cutToWhiteSpace (const char *s, uint offset, char *sbuf) |
Used by print2Columns and print3Columns to manage whitespace. 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 tmbstr | get_escaped_name (ctmbstr name) |
| Escape a name for XML output. More... | |
| static ctmbstr | get_final_name (ctmbstr prog) |
| Returns the final name of the tidy executable. More... | |
| static tmbstr | get_option_names (const CmdOptDesc *pos) |
| Retrieve the options' names from the structure as a single string. More... | |
| static tmbstr | GetAllowedValues (TidyOption topt, const OptionDesc *d) |
| Retrieves allowed values for an option. More... | |
| static tmbstr | GetAllowedValuesFromPick (TidyOption topt) |
| Retrieves allowed values from an option's pick list. 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 void | help (ctmbstr prog) |
| Handles the -help service. More... | |
| static Bool | isAutoBool (TidyOption topt) |
| Utility to determine if an option is an AutoBool. More... | |
| static void | lang_help (void) |
| Handles the -lang help service. More... | |
| static void | localize_option_names (CmdOptDesc *pos) |
| Option names aren't localized, but the sample fields are, for example <file> should be <archivo> in Spanish. More... | |
| int | main (int argc, char **argv) |
| MAIN – let's do something here. More... | |
| static void | optionDescribe (TidyDoc tdoc, char *tag) |
| Handles the -help-option service. More... | |
| static void | optionhelp (TidyDoc tdoc) |
| Handles the -help-config service. More... | |
| static void | optionvalues (TidyDoc tdoc) |
| Handles the -show-config service. More... | |
| static void | outOfMemory (void) |
| Exits with an error in the event of an out of memory condition. More... | |
| static void | print1Column (const char *fmt, uint l1, const char *c1) |
| Outputs one column of text. More... | |
| static void | print2Columns (const char *fmt, uint l1, uint l2, const char *c1, const char *c2) |
| Outputs two columns of text. More... | |
| static void | print3Columns (const char *fmt, uint l1, uint l2, uint l3, const char *c1, const char *c2, const char *c3) |
| Outputs three columns of text. More... | |
| static void | print_help_option (void) |
| Outputs a complete help option (text) More... | |
| static void | print_xml_help_option (void) |
| Outputs a complete help option (XML) More... | |
| static void | print_xml_help_option_element (ctmbstr element, ctmbstr name) |
| Outputs an XML element for an option. 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... | |
| static void | printOption (TidyDoc ARG_UNUSED(tdoc), TidyOption topt, OptionDesc *d) |
| Prints a single option. More... | |
| static void | printOptionValues (TidyDoc ARG_UNUSED(tdoc), TidyOption topt, OptionDesc *d) |
| Prints the option value for a given option. More... | |
| static void | printXMLCrossRef (TidyDoc tdoc, TidyOption topt) |
| Prints for XML an option's . More... | |
| static void | printXMLDescription (TidyDoc tdoc, TidyOption topt) |
| Prints for XML an option's . More... | |
| static void | printXMLOption (TidyDoc tdoc, TidyOption topt, OptionDesc *d) |
| Prints for XML an option. More... | |
| static void | printXMLOptionString (TidyDoc tdoc, TidyOption topt, OptionDesc *d) |
| Handles the printing of option description for -xml-options-strings service. More... | |
| static Bool | samefile (ctmbstr filename1, ctmbstr filename2) |
| Indicates whether or not two filenames are the same. More... | |
| static tmbstr | stringWithFormat (const ctmbstr fmt,...) |
| Create a new string with a format and arguments. More... | |
| static void | tidy_cleanup () |
| Handles exit cleanup. More... | |
| void | tidyPrintTidyLanguageNames (ctmbstr format) |
| Prints the languages the are currently built into Tidy, using the specified format string. More... | |
| void | tidyPrintWindowsLanguageNames (ctmbstr format) |
| Prints the Windows language names that Tidy recognizes, using the specified format string. More... | |
| static void | unknownOption (uint c) |
Provides the unknown option output. More... | |
| static void | version (void) |
| Handles the -version service. More... | |
| static void | xml_error_strings (TidyDoc tdoc) |
| Handles the -xml-error-strings service. More... | |
| static void | xml_help (void) |
| Provides the -xml-help service. More... | |
| static void | xml_options_strings (TidyDoc tdoc) |
| Handles the -xml-options-strings service. More... | |
| static void | xml_strings (void) |
| Handles the -xml-strings service. More... | |
| static void | XMLoptionhelp (TidyDoc tdoc) |
| Handles the -xml-config service. More... | |
Variables | |
| struct { | |
| uint | key |
| Key to fetch the localized string. More... | |
| ctmbstr | mnemonic |
| Used in XML as a class. More... | |
| } | cmdopt_catname [] |
| This array contains headings that will be used in help ouput. More... | |
| static const CmdOptDesc | cmdopt_defs [] |
| static FILE * | errout = NULL |
| static const char | fmt [] = "%-27.27s %-9.9s %-40.40s\n" |
| static const char | helpfmt [] = " %-25.25s %-52.52s\n" |
| Format strings and decorations used in output. More... | |
| static const char | helpul [] = "-----------------------------------------------------------------" |
| static const char | ul [] = "=================================================================" |
| static const char | valfmt [] = "%-27.27s %-9.9s %-1.1s%-39.39s\n" |
| struct AllOption_t |
Array holding all options.
Contains a trailing sentinel.
| Data Fields | ||
|---|---|---|
| TidyOption | topt[N_TIDY_OPTIONS] | |
| struct CmdOptDesc |
The struct and subsequent array keep the help output structured because we also output all of this stuff as as XML.
| Data Fields | ||
|---|---|---|
| CmdOptCategory | cat | Category. |
| ctmbstr | eqconfig | Equivalent configuration option. |
| uint | key | Key to fetch the localized description. |
| ctmbstr | name1 | Name. |
| ctmbstr | name2 | Name. |
| ctmbstr | name3 | Name. |
| uint | subKey | Secondary substitution key. |
| struct OptionDesc |
Structure maintains a description of an option.
| Data Fields | ||
|---|---|---|
| ctmbstr | cat | Category. |
| 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 |
| #define SPRTF printf |
| typedef void(* OptionFunc) (TidyDoc, TidyOption, OptionDesc *) |
| enum CmdOptCategory |
Cleans up the HTML-laden option descriptions for console output.
It's just a simple HTML filtering/replacement function. Will return an allocated string.
|
static |
A simple option comparator.
|
static |
Returns the configuration category name for the specified configuration category id.
This will be used as an XML class attribute value.
|
static |
Used by print2Columns and print3Columns to manage whitespace.
|
static |
An iterator for the unsorted options.
|
static |
An iterator for the sorted options.
|
static |
Retrieve the options' names from the structure as a single string.
|
static |
Retrieves allowed values for an option.
|
static |
Retrieves allowed values from an option's pick list.
|
static |
Create OptionDesc "d" related to "opt".
|
static |
Returns options sorted.
|
static |
Handles the -help service.
|
static |
Utility to determine if an option is an AutoBool.
|
static |
Handles the -lang help service.
|
static |
Option names aren't localized, but the sample fields are, for example <file> should be <archivo> in Spanish.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
MAIN – let's do something here.
|
static |
Handles the -help-option service.
|
static |
Handles the -help-config service.
|
static |
Handles the -show-config service.
|
static |
Exits with an error in the event of an out of memory condition.
|
static |
Outputs one column of text.
|
static |
Outputs two columns of text.
|
static |
Outputs three columns of text.
|
static |
Outputs a complete help option (text)
|
static |
Outputs a complete help option (XML)
Outputs an XML element for an option.
|
static |
Prints an option's allowed values.
|
static |
Prints an option's allowed value as specified in its pick list.
|
static |
Prints a single option.
|
static |
Prints the option value for a given option.
|
static |
Prints for XML an option's .
|
static |
Prints for XML an option's .
|
static |
Prints for XML an option.
|
static |
Handles the printing of option description for -xml-options-strings service.
Indicates whether or not two filenames are the same.
Create a new string with a format and arguments.
|
static |
Handles exit cleanup.
| void tidyPrintTidyLanguageNames | ( | ctmbstr | format | ) |
Prints the languages the are currently built into Tidy, using the specified format string.
| void tidyPrintWindowsLanguageNames | ( | ctmbstr | format | ) |
Prints the Windows language names that Tidy recognizes, using the specified format string.
|
static |
Provides the unknown option output.
|
static |
Handles the -version service.
|
static |
Handles the -xml-error-strings service.
This service is primarily helpful to developers who need to generate an updated list of strings to expect when using TidyReportFilter3. Included in the output is the current string associated with the error symbol.
|
static |
Provides the -xml-help service.
|
static |
Handles the -xml-options-strings service.
This service is primarily helpful to developers and localizers to test that option description strings as represented on screen output are correct and do not break tidy.
|
static |
Handles the -xml-strings service.
This service was primarily helpful to developers and localizers to compare localized strings to the built in en strings. It's probably better to use our POT/PO workflow with your favorite tools, or simply diff the language header files directly. Important: The attribute id is not a specification, promise, or part of an API. You must not depend on this value.
|
static |
Handles the -xml-config service.
| const { ... } cmdopt_catname[] |
This array contains headings that will be used in help ouput.
|
static |
|
static |
|
static |
|
static |
Format strings and decorations used in output.
|
static |
|
static |
|
static |