Merge branch 'improve_console_output' into next
This commit is contained in:
commit
cefe56dda5
|
@ -473,26 +473,20 @@ static tmbstr get_escaped_name( ctmbstr name )
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/** Utility to determine if an option is an AutoBool.
|
/** Utility to determine if an option has a picklist.
|
||||||
** @param topt The option to check.
|
** @param topt The option to check.
|
||||||
** @result Returns a Bool indicating whether the option is an Autobool or not.
|
** @result Returns a Bool indicating whether the option has a picklist or not.
|
||||||
*/
|
*/
|
||||||
static Bool isAutoBool( TidyOption topt )
|
static Bool hasPickList( TidyOption topt )
|
||||||
{
|
{
|
||||||
TidyIterator pos;
|
TidyIterator pos;
|
||||||
ctmbstr def;
|
|
||||||
|
|
||||||
if ( tidyOptGetType( topt ) != TidyInteger)
|
if ( tidyOptGetType( topt ) != TidyInteger)
|
||||||
return no;
|
return no;
|
||||||
|
|
||||||
pos = tidyOptGetPickList( topt );
|
pos = tidyOptGetPickList( topt );
|
||||||
while ( pos )
|
|
||||||
{
|
return tidyOptGetNextPick( topt, &pos ) != NULL;
|
||||||
def = tidyOptGetNextPick( topt, &pos );
|
|
||||||
if (0==strcmp(def,"yes"))
|
|
||||||
return yes;
|
|
||||||
}
|
|
||||||
return no;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns the configuration category name for the specified configuration
|
/** Returns the configuration category name for the specified configuration
|
||||||
|
@ -555,16 +549,6 @@ static void GetOption(TidyDoc tdoc, /**< The tidy document. */
|
||||||
/* Handle special cases first. */
|
/* Handle special cases first. */
|
||||||
switch ( optId )
|
switch ( optId )
|
||||||
{
|
{
|
||||||
case TidyDuplicateAttrs:
|
|
||||||
case TidySortAttributes:
|
|
||||||
case TidyNewline:
|
|
||||||
case TidyAccessibilityCheckLevel:
|
|
||||||
case TidyUseCustomTags:
|
|
||||||
d->type = "enum";
|
|
||||||
d->vals = NULL;
|
|
||||||
d->def = tidyOptGetCurrPick( tdoc, optId );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case TidyDoctype:
|
case TidyDoctype:
|
||||||
d->type = "DocType";
|
d->type = "DocType";
|
||||||
d->vals = NULL;
|
d->vals = NULL;
|
||||||
|
@ -581,7 +565,7 @@ static void GetOption(TidyDoc tdoc, /**< The tidy document. */
|
||||||
case TidyBlockTags:
|
case TidyBlockTags:
|
||||||
case TidyEmptyTags:
|
case TidyEmptyTags:
|
||||||
case TidyPreTags:
|
case TidyPreTags:
|
||||||
d->type = "Tag names";
|
d->type = "Tag Names";
|
||||||
d->vals = "tagX, tagY, ...";
|
d->vals = "tagX, tagY, ...";
|
||||||
d->def = NULL;
|
d->def = NULL;
|
||||||
break;
|
break;
|
||||||
|
@ -602,15 +586,13 @@ static void GetOption(TidyDoc tdoc, /**< The tidy document. */
|
||||||
{
|
{
|
||||||
case TidyBoolean:
|
case TidyBoolean:
|
||||||
d->type = "Boolean";
|
d->type = "Boolean";
|
||||||
d->vals = "y/n, yes/no, t/f, true/false, 1/0";
|
|
||||||
d->def = tidyOptGetCurrPick( tdoc, optId );
|
d->def = tidyOptGetCurrPick( tdoc, optId );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TidyInteger:
|
case TidyInteger:
|
||||||
if (isAutoBool(topt))
|
if (hasPickList(topt))
|
||||||
{
|
{
|
||||||
d->type = "AutoBool";
|
d->type = "Enum";
|
||||||
d->vals = "auto, y/n, yes/no, t/f, true/false, 1/0";
|
|
||||||
d->def = tidyOptGetCurrPick( tdoc, optId );
|
d->def = tidyOptGetCurrPick( tdoc, optId );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue