Replaced AdjustConfig() with TY_(AdjustConfig)()

This commit is contained in:
Jim Derry 2017-10-26 18:08:17 -04:00
parent cc08bae5a9
commit 350f7b4af7
2 changed files with 10 additions and 5 deletions

View File

@ -303,7 +303,6 @@ static const struct {
/* forward declarations */
static void AdjustConfig( TidyDocImpl* doc );
static Bool GetPickListValue( ctmbstr value, PickListItems* pickList, uint *result );
@ -620,7 +619,7 @@ void TY_(TakeConfigSnapshot)( TidyDocImpl* doc )
const TidyOptionValue* value = &doc->config.value[ 0 ];
TidyOptionValue* snap = &doc->config.snapshot[ 0 ];
AdjustConfig( doc ); /* Make sure it's consistent */
TY_(AdjustConfig)( doc ); /* Make sure it's consistent */
for ( ixVal=0; ixVal < N_TIDY_OPTIONS; ++option, ++ixVal )
{
assert( ixVal == (uint) option->id );
@ -669,7 +668,7 @@ void TY_(CopyConfig)( TidyDocImpl* docTo, TidyDocImpl* docFrom )
}
if ( needReparseTagsDecls )
ReparseTagDecls( docTo, changedUserTags );
AdjustConfig( docTo ); /* Make sure it's consistent */
TY_(AdjustConfig)( docTo ); /* Make sure it's consistent */
}
}
@ -963,7 +962,7 @@ int TY_(ParseConfigFileEnc)( TidyDocImpl* doc, ctmbstr file, ctmbstr charenc )
if ( fname != (tmbstr) file )
TidyDocFree( doc, fname );
AdjustConfig( doc );
TY_(AdjustConfig)( doc );
/* any new config errors? If so, return warning status. */
return (doc->optionErrors > opterrs ? 1 : 0);
@ -1103,7 +1102,7 @@ Bool TY_(AdjustCharEncoding)( TidyDocImpl* doc, int encoding )
/* ensure that config is self consistent */
void AdjustConfig( TidyDocImpl* doc )
void TY_(AdjustConfig)( TidyDocImpl* doc )
{
if ( cfgBool(doc, TidyEncloseBlockText) )
TY_(SetOptionBool)( doc, TidyEncloseBodyText, yes );

View File

@ -322,6 +322,12 @@ Bool TY_(ParseConfigValue)( TidyDocImpl* doc, TidyOptionId optId, ctmbstr optVa
Bool TY_(AdjustCharEncoding)( TidyDocImpl* doc, int encoding );
/** Ensure that the configuration options are self consistent.
** @param doc The Tidy document to adjust.
*/
void TY_(AdjustConfig)( TidyDocImpl* doc );
/** Indicates whether or not the current configuration is completely default.
** @param doc The Tidy document.
** @returns The result.