Skip to content

Commit 350f7b4

Browse files
committed
Replaced AdjustConfig() with TY_(AdjustConfig)()
1 parent cc08bae commit 350f7b4

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/config.c

+4-5
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,6 @@ static const struct {
303303

304304

305305
/* forward declarations */
306-
static void AdjustConfig( TidyDocImpl* doc );
307306
static Bool GetPickListValue( ctmbstr value, PickListItems* pickList, uint *result );
308307

309308

@@ -620,7 +619,7 @@ void TY_(TakeConfigSnapshot)( TidyDocImpl* doc )
620619
const TidyOptionValue* value = &doc->config.value[ 0 ];
621620
TidyOptionValue* snap = &doc->config.snapshot[ 0 ];
622621

623-
AdjustConfig( doc ); /* Make sure it's consistent */
622+
TY_(AdjustConfig)( doc ); /* Make sure it's consistent */
624623
for ( ixVal=0; ixVal < N_TIDY_OPTIONS; ++option, ++ixVal )
625624
{
626625
assert( ixVal == (uint) option->id );
@@ -669,7 +668,7 @@ void TY_(CopyConfig)( TidyDocImpl* docTo, TidyDocImpl* docFrom )
669668
}
670669
if ( needReparseTagsDecls )
671670
ReparseTagDecls( docTo, changedUserTags );
672-
AdjustConfig( docTo ); /* Make sure it's consistent */
671+
TY_(AdjustConfig)( docTo ); /* Make sure it's consistent */
673672
}
674673
}
675674

@@ -963,7 +962,7 @@ int TY_(ParseConfigFileEnc)( TidyDocImpl* doc, ctmbstr file, ctmbstr charenc )
963962
if ( fname != (tmbstr) file )
964963
TidyDocFree( doc, fname );
965964

966-
AdjustConfig( doc );
965+
TY_(AdjustConfig)( doc );
967966

968967
/* any new config errors? If so, return warning status. */
969968
return (doc->optionErrors > opterrs ? 1 : 0);
@@ -1103,7 +1102,7 @@ Bool TY_(AdjustCharEncoding)( TidyDocImpl* doc, int encoding )
11031102

11041103

11051104
/* ensure that config is self consistent */
1106-
void AdjustConfig( TidyDocImpl* doc )
1105+
void TY_(AdjustConfig)( TidyDocImpl* doc )
11071106
{
11081107
if ( cfgBool(doc, TidyEncloseBlockText) )
11091108
TY_(SetOptionBool)( doc, TidyEncloseBodyText, yes );

src/config.h

+6
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,12 @@ Bool TY_(ParseConfigValue)( TidyDocImpl* doc, TidyOptionId optId, ctmbstr optVa
322322
Bool TY_(AdjustCharEncoding)( TidyDocImpl* doc, int encoding );
323323

324324

325+
/** Ensure that the configuration options are self consistent.
326+
** @param doc The Tidy document to adjust.
327+
*/
328+
void TY_(AdjustConfig)( TidyDocImpl* doc );
329+
330+
325331
/** Indicates whether or not the current configuration is completely default.
326332
** @param doc The Tidy document.
327333
** @returns The result.

0 commit comments

Comments
 (0)