diff --git a/console/tidy.c b/console/tidy.c index 86edb9a..7f4659f 100644 --- a/console/tidy.c +++ b/console/tidy.c @@ -828,6 +828,43 @@ static void printXMLCrossRef( TidyDoc tdoc, TidyOption topt ) } +/** + ** Prints for XML an option's . + **/ +static void printXMLCrossRefEqConsole( TidyDoc tdoc, TidyOption topt ) +{ + const CmdOptDesc* pos = cmdopt_defs; + const CmdOptDesc* hit = NULL; + CmdOptDesc localHit; + enum { sizeBuffer = 50 }; /* largest config name is 27 chars so far... */ + char buffer[sizeBuffer]; + + for( pos=cmdopt_defs; pos->name1; ++pos) + { + snprintf(buffer, sizeBuffer, "%s:", tidyOptGetName( topt )); + if ( pos->eqconfig && (strncmp(buffer, pos->eqconfig, strlen(buffer)) == 0) ) + { + hit = pos; + break; + } + } + + if ( hit ) + { + localHit = *hit; + localize_option_names( &localHit ); + printf(" %s\n", localHit.name1); + if ( localHit.name2 ) + printf(" %s\n", localHit.name2); + if ( localHit.name3 ) + printf(" %s\n", localHit.name3); + + } + else + printf(" %s\n", " "); +} + + /** ** Prints for XML an option. **/ @@ -855,6 +892,7 @@ static void printXMLOption( TidyDoc tdoc, TidyOption topt, OptionDesc *d ) } printXMLDescription( tdoc, topt ); printXMLCrossRef( tdoc, topt ); + printXMLCrossRefEqConsole( tdoc, topt ); printf( " \n" ); }