From 350f7b4af758558e9c93c4c791f616244ed85b42 Mon Sep 17 00:00:00 2001 From: Jim Derry Date: Thu, 26 Oct 2017 18:08:17 -0400 Subject: [PATCH] Replaced AdjustConfig() with TY_(AdjustConfig)() --- src/config.c | 9 ++++----- src/config.h | 6 ++++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/config.c b/src/config.c index 171da5e..cd270f9 100644 --- a/src/config.c +++ b/src/config.c @@ -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 ); diff --git a/src/config.h b/src/config.h index a1f62ca..f5704e8 100644 --- a/src/config.h +++ b/src/config.h @@ -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.