58 #define TIDY_PL_SIZE 16 121 typedef struct _tidy_config
143 const TidyOptionImpl*
TY_(lookupOption)(
ctmbstr optnam );
162 TidyIterator
TY_(getOptionList)( TidyDocImpl* doc );
170 const TidyOptionImpl*
TY_(getNextOption)( TidyDocImpl* doc, TidyIterator* iter );
178 TidyIterator
TY_(getOptionPickList)(
const TidyOptionImpl* option );
186 ctmbstr TY_(getNextOptionPick)(
const TidyOptionImpl* option, TidyIterator* iter );
189 #if SUPPORT_CONSOLE_APP 202 void TY_(InitConfig)( TidyDocImpl* doc );
208 void TY_(FreeConfig)( TidyDocImpl* doc );
248 void TY_(ResetConfigToDefault)( TidyDocImpl* doc );
255 void TY_(TakeConfigSnapshot)( TidyDocImpl* doc );
261 void TY_(ResetConfigToSnapshot)( TidyDocImpl* doc );
268 void TY_(CopyConfig)( TidyDocImpl* docTo, TidyDocImpl* docFrom );
276 int TY_(ParseConfigFile)( TidyDocImpl* doc,
ctmbstr cfgfil );
286 int TY_(ParseConfigFileEnc)( TidyDocImpl* doc,
296 int TY_(SaveConfigFile)( TidyDocImpl* doc,
ctmbstr cfgfil );
335 Bool TY_(AdjustCharEncoding)( TidyDocImpl* doc,
int encoding );
341 void TY_(AdjustConfig)( TidyDocImpl* doc );
348 Bool TY_(ConfigDiffThanDefault)( TidyDocImpl* doc );
356 Bool TY_(ConfigDiffThanSnapshot)( TidyDocImpl* doc );
365 int TY_(CharEncodingId)( TidyDocImpl* doc,
ctmbstr charenc );
372 ctmbstr TY_(CharEncodingName)(
int encoding );
379 ctmbstr TY_(CharEncodingOptName)(
int encoding );
387 void TY_(DeclareListItem)( TidyDocImpl* doc,
const TidyOptionImpl* opt,
ctmbstr name );
397 #define cfg(doc, id) TY_(_cfgGet)( (doc), (id) ) 398 #define cfgBool(doc, id) TY_(_cfgGetBool)( (doc), (id) ) 399 #define cfgAutoBool(doc, id) TY_(_cfgGetAutoBool)( (doc), (id) ) 400 #define cfgStr(doc, id) TY_(_cfgGetString)( (doc), (id) ) 407 #define cfg(doc, id) ((doc)->config.value[ (id) ].v) 410 #define cfgBool(doc, id) ((Bool) cfg(doc, id)) 413 #define cfgAutoBool(doc, id) ((TidyTriState) cfg(doc, id)) 416 #define cfgStr(doc, id) ((ctmbstr) (doc)->config.value[ (id) ].p) Structs of this type contain information needed in order to present picklists, relate picklist entrie...
Definition: config.h:65
TidyConfigCategory category
The category of the option.
Definition: config.h:99
Must be last.
Definition: tidyenum.h:681
ctmbstr label
PickList label for this item.
Definition: config.h:66
Used to build a table of documentation cross-references.
Definition: config.h:133
PickListItems * pickList
The picklist of possible values for this option.
Definition: config.h:104
ctmbstr name
The name of the option.
Definition: config.h:100
TidyOptionId const * links
Cross references.
Definition: config.h:135
uint c
Current char in input stream for reading options.
Definition: config.h:126
TidyOptionId
Option IDs are used used to get and/or set configuration option values and retrieve their description...
Definition: tidyenum.h:569
#define TIDY_PL_SIZE
Determines the maximum number of items in an option's picklist.
Definition: config.h:58
ctmbstr inputs[10]
String values that can select this value.
Definition: config.h:68
TidyOptionType type
The date type for the option.
Definition: config.h:101
Defines HTML Tidy public API implemented by LibTidy.
Stored option values can be one of two internal types.
Definition: config.h:111
ctmbstr pdflt
Default value for TidyString.
Definition: config.h:105
ParseProperty * parser
Function to parse input; read-only if NULL.
Definition: config.h:103
ulong dflt
Default value for TidyInteger and TidyBoolean.
Definition: config.h:102
TidyOptionId id
The unique identifier for this option.
Definition: config.h:98
This type is used to define a structure for keeping track of the values for each option.
Definition: config.h:121
This type defines an output destination capable of accepting raw bytes of output. ...
Definition: tidy.h:1128
uint defined_tags
Tracks user-defined tags.
Definition: config.h:125
const int value
The option value represented by this label.
Definition: config.h:67
char * p
Value for TidyString.
Definition: config.h:114
TidyOptionId opt
Identifier.
Definition: config.h:134
This structure defines the internal representation of a Tidy option.
Definition: config.h:96
#define TY_(str)
Definition: forward.h:23
TidyConfigCategory
Categories of Tidy configuration options, which are used mostly by user interfaces to sort Tidy optio...
Definition: tidyenum.h:694
ulong v
Value for TidyInteger and TidyBoolean.
Definition: config.h:113
TidyOptionType
A Tidy configuration option can have one of these data types.
Definition: tidyenum.h:701
TidyTriState
AutoBool values used by ParseBool, ParseTriState, ParseIndent, ParseBOM.
Definition: tidyenum.h:720
StreamIn * cfgIn
Current input source for reading options.
Definition: config.h:127
Bool( ParseProperty)(TidyDocImpl *doc, const TidyOptionImpl *opt)
This typedef describes a function that is used for parsing the input given for a particular Tidy opti...
Definition: config.h:91
const PickListItem PickListItems[TIDY_PL_SIZE]
An array of PickListItems, fixed in size for in-code declarations.
Definition: config.h:78