HTML Tidy  5.7.0
The HTACG Tidy HTML Project
CLI Options Utilities

Detailed Description

These structures, arrays, declarations, and definitions are used throughout this console application.

Data Structures

struct  CmdOptDesc
 The struct and subsequent array keep the help output structured because we also output all of this stuff as as XML. More...
 

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 get_escaped_name (ctmbstr name)
 Escape a name for XML output. More...
 
static void localize_option_names (CmdOptDesc *pos)
 Option names aren't localized, but the sample fields should be localized. 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 []
 All instances of s will be substituted with localized string specified by the subKey field. More...
 

Format strings and decorations used in output.

static const char helpfmt [] = " %-*.*s %-*.*s\n"
 
static const char helpul [] = "-----------------------------------------------------------------"
 
static const char fmt [] = "%-27.27s %-9.9s %-40.40s\n"
 
static const char ul [] = "================================================================="
 

Data Structure Documentation

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.

Enumeration Type Documentation

This enum is used to categorize the options for help output.

Enumerator
CmdOptFileManip 
CmdOptCatFIRST 
CmdOptProcDir 
CmdOptCharEnc 
CmdOptMisc 
CmdOptXML 
CmdOptCatLAST 

Function Documentation

static tmbstr get_escaped_name ( ctmbstr  name)
static

Escape a name for XML output.

For example, -output <file> becomes -output <file> for use in XML.

Parameters
nameThe option name to escape.
Returns
Returns an allocated string.
static void localize_option_names ( CmdOptDesc pos)
static

Option names aren't localized, but the sample fields should be localized.

For example, <file> should be <archivo> in Spanish.

Parameters
posA CmdOptDesc array with fields that must be localized.

Variable Documentation

const { ... } cmdopt_catname[]
Initial value:
= {
{ "file-manip", TC_STRING_FILE_MANIP },
{ "process-directives", TC_STRING_PROCESS_DIRECTIVES },
{ "char-encoding", TC_STRING_CHAR_ENCODING },
{ "misc", TC_STRING_MISC },
{ "xml", TC_STRING_XML }
}
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436

This array contains headings that will be used in help ouput.

const CmdOptDesc cmdopt_defs[]
static
Initial value:
= {
{ CmdOptFileManip, "-output <%s>", TC_OPT_OUTPUT, TC_LABEL_FILE, "output-file: <%s>", "-o <%s>" },
{ CmdOptFileManip, "-config <%s>", TC_OPT_CONFIG, TC_LABEL_FILE, NULL },
{ CmdOptFileManip, "-file <%s>", TC_OPT_FILE, TC_LABEL_FILE, "error-file: <%s>", "-f <%s>" },
{ CmdOptFileManip, "-modify", TC_OPT_MODIFY, 0, "write-back: yes", "-m" },
{ CmdOptProcDir, "-indent", TC_OPT_INDENT, 0, "indent: auto", "-i" },
{ CmdOptProcDir, "-wrap <%s>", TC_OPT_WRAP, TC_LABEL_COL, "wrap: <%s>", "-w <%s>" },
{ CmdOptProcDir, "-upper", TC_OPT_UPPER, 0, "uppercase-tags: yes", "-u" },
{ CmdOptProcDir, "-clean", TC_OPT_CLEAN, 0, "clean: yes", "-c" },
{ CmdOptProcDir, "-bare", TC_OPT_BARE, 0, "bare: yes", "-b" },
{ CmdOptProcDir, "-gdoc", TC_OPT_GDOC, 0, "gdoc: yes", "-g" },
{ CmdOptProcDir, "-numeric", TC_OPT_NUMERIC, 0, "numeric-entities: yes", "-n" },
{ CmdOptProcDir, "-errors", TC_OPT_ERRORS, 0, "markup: no", "-e" },
{ CmdOptProcDir, "-quiet", TC_OPT_QUIET, 0, "quiet: yes", "-q" },
{ CmdOptProcDir, "-omit", TC_OPT_OMIT, 0, "omit-optional-tags: yes" },
{ CmdOptProcDir, "-xml", TC_OPT_XML, 0, "input-xml: yes" },
{ CmdOptProcDir, "-asxml", TC_OPT_ASXML, 0, "output-xhtml: yes", "-asxhtml" },
{ CmdOptProcDir, "-ashtml", TC_OPT_ASHTML, 0, "output-html: yes" },
{ CmdOptProcDir, "-access <%s>", TC_OPT_ACCESS, TC_LABEL_LEVL, "accessibility-check: <%s>" },
{ CmdOptCharEnc, "-raw", TC_OPT_RAW, 0, NULL },
{ CmdOptCharEnc, "-ascii", TC_OPT_ASCII, 0, NULL },
{ CmdOptCharEnc, "-latin0", TC_OPT_LATIN0, 0, NULL },
{ CmdOptCharEnc, "-latin1", TC_OPT_LATIN1, 0, NULL },
{ CmdOptCharEnc, "-iso2022", TC_OPT_ISO2022, 0, NULL },
{ CmdOptCharEnc, "-utf8", TC_OPT_UTF8, 0, NULL },
{ CmdOptCharEnc, "-mac", TC_OPT_MAC, 0, NULL },
{ CmdOptCharEnc, "-win1252", TC_OPT_WIN1252, 0, NULL },
{ CmdOptCharEnc, "-ibm858", TC_OPT_IBM858, 0, NULL },
{ CmdOptCharEnc, "-utf16le", TC_OPT_UTF16LE, 0, NULL },
{ CmdOptCharEnc, "-utf16be", TC_OPT_UTF16BE, 0, NULL },
{ CmdOptCharEnc, "-utf16", TC_OPT_UTF16, 0, NULL },
{ CmdOptCharEnc, "-big5", TC_OPT_BIG5, 0, NULL },
{ CmdOptCharEnc, "-shiftjis", TC_OPT_SHIFTJIS, 0, NULL },
{ CmdOptMisc, "-version", TC_OPT_VERSION, 0, NULL, "-v" },
{ CmdOptMisc, "-help", TC_OPT_HELP, 0, NULL, "-h", "-?" },
{ CmdOptMisc, "-help-config", TC_OPT_HELPCFG, 0, NULL },
{ CmdOptMisc, "-help-env", TC_OPT_HELPENV, 0, NULL },
{ CmdOptMisc, "-show-config", TC_OPT_SHOWCFG, 0, NULL },
{ CmdOptMisc, "-export-config", TC_OPT_EXP_CFG, 0, NULL },
{ CmdOptMisc, "-export-default-config", TC_OPT_EXP_DEF, 0, NULL },
{ CmdOptMisc, "-help-option <%s>", TC_OPT_HELPOPT, TC_LABEL_OPT, NULL },
{ CmdOptMisc, "-language <%s>", TC_OPT_LANGUAGE, TC_LABEL_LANG, "language: <%s>" },
{ CmdOptXML, "-xml-help", TC_OPT_XMLHELP, 0, NULL },
{ CmdOptXML, "-xml-config", TC_OPT_XMLCFG, 0, NULL },
{ CmdOptXML, "-xml-strings", TC_OPT_XMLSTRG, 0, NULL },
{ CmdOptXML, "-xml-error-strings", TC_OPT_XMLERRS, 0, NULL },
{ CmdOptXML, "-xml-options-strings", TC_OPT_XMLOPTS, 0, NULL },
{ CmdOptMisc, NULL, 0, 0, NULL }
}
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidy.c:304
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidy.c:306
Definition: tidyenum.h:1436
Definition: tidy.c:308
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidy.c:307
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436
Definition: tidy.c:309
Definition: tidyenum.h:1436
Definition: tidyenum.h:1436

All instances of s will be substituted with localized string specified by the subKey field.

const char fmt[] = "%-27.27s %-9.9s %-40.40s\n"
static
const char helpfmt[] = " %-*.*s %-*.*s\n"
static
const char helpul[] = "-----------------------------------------------------------------"
static
uint key

Key to fetch the localized string.

ctmbstr mnemonic

Used in XML as a class.

const char ul[] = "================================================================="
static