Renamed the proposed squelch and squelch-id to mute and mute-id,

respectively. Updated matching cases in test branch accordingly.
This commit is contained in:
Jim Derry 2017-10-10 08:21:14 -04:00
parent bcf4748b9c
commit 1d91942960
17 changed files with 103 additions and 103 deletions

View file

@ -1245,13 +1245,13 @@ TIDY_EXPORT int TIDY_CALL tidyGetMessageColumn( TidyMessage tmessage );
TIDY_EXPORT TidyReportLevel TIDY_CALL tidyGetMessageLevel( TidyMessage tmessage );
/** Get the squelched status of the message, that is, whether or not the
/** Get the muted status of the message, that is, whether or not the
** current configuration indicated that this message should be muted.
** @param tmessage Specify the message that you are querying.
** @result Returns a Bool indicating that the config indicates muting this
** message.
*/
TIDY_EXPORT Bool TIDY_CALL tidyGetMessageIsSquelched( TidyMessage tmessage );
TIDY_EXPORT Bool TIDY_CALL tidyGetMessageIsMuted( TidyMessage tmessage );
/** Get the default format string, which is the format string for the message
** in Tidy's default localization (en_us).

View file

@ -257,7 +257,7 @@ extern "C" {
FN(SPACE_PRECEDING_XMLDECL) \
FN(STRING_ARGUMENT_BAD) \
FN(STRING_MISSING_MALFORMED) \
FN(STRING_SQUELCHING_TYPE) \
FN(STRING_MUTING_TYPE) \
FN(STRING_UNKNOWN_OPTION) \
FN(SUSPECTED_MISSING_QUOTE) \
FN(TAG_NOT_ALLOWED_IN) \
@ -638,8 +638,8 @@ typedef enum
TidyShowWarnings, /**< However errors are always shown */
TidySkipNested, /**< Skip nested tags in script and style CDATA */
TidySortAttributes, /**< Sort attributes */
TidySquelchReports, /**< Filter these messages from output. */
TidySquelchShow, /**< Show message ID's in the error table */
TidyMuteReports, /**< Filter these messages from output. */
TidyMuteShow, /**< Show message ID's in the error table */
TidyStrictTagsAttr, /**< Ensure tags and attributes match output HTML version */
TidyStyleTags, /**< Move sytle to head */
TidyTabSize, /**< Expand tabs to n spaces */

View file

@ -5,7 +5,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: HTML Tidy poconvert.rb\n"
"Project-Id-Version: \n"
"PO-Revision-Date: 2017-10-08 10:46:33\n"
"PO-Revision-Date: 2017-10-10 08:20:36\n"
"Last-Translator: jderry\n"
"Language-Team: \n"
@ -1305,14 +1305,14 @@ msgstr ""
#. - It's very important that <br/> be self-closing!
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not
#. be translated.
msgctxt "TidySquelchReports"
msgctxt "TidyMuteReports"
msgid ""
"Use this option to prevent Tidy from displaying certain types of "
"report output,for example, for conditions that you wish to ignore."
"<br/>"
"This option takes a list of one or more keys indicating the message "
"type to squelch. You can discover these message keys by using the "
"<code>squelch-id</code> configuration option and examining Tidy's "
"type to mute. You can discover these message keys by using the "
"<code>mute-id</code> configuration option and examining Tidy's "
"output. "
msgstr ""
@ -1324,11 +1324,11 @@ msgstr ""
#. - It's very important that <br/> be self-closing!
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not
#. be translated.
msgctxt "TidySquelchShow"
msgctxt "TidyMuteShow"
msgid ""
"This option indicates whether or not Tidy should display message ID's "
"with each of its error reports. This could be useful if you wanted to "
"use the <code>squelch</code> configuration option in order to filter "
"use the <code>mute</code> configuration option in order to filter "
"out certain report messages. "
msgstr ""
@ -2581,7 +2581,7 @@ msgid "missing or malformed argument for option: %s"
msgstr ""
#, c-format
msgctxt "STRING_SQUELCHING_TYPE"
msgctxt "STRING_MUTING_TYPE"
msgid "messages of type \"%s\" will not be output"
msgstr ""

View file

@ -5,7 +5,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: HTML Tidy poconvert.rb\n"
"Project-Id-Version: \n"
"PO-Revision-Date: 2017-10-08 10:46:33\n"
"PO-Revision-Date: 2017-10-10 08:20:36\n"
"Last-Translator: jderry\n"
"Language-Team: \n"
@ -1268,14 +1268,14 @@ msgstr ""
#. - It's very important that <br/> be self-closing!
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not
#. be translated.
msgctxt "TidySquelchReports"
msgctxt "TidyMuteReports"
msgid ""
"Use this option to prevent Tidy from displaying certain types of "
"report output,for example, for conditions that you wish to ignore."
"<br/>"
"This option takes a list of one or more keys indicating the message "
"type to squelch. You can discover these message keys by using the "
"<code>squelch-id</code> configuration option and examining Tidy's "
"type to mute. You can discover these message keys by using the "
"<code>mute-id</code> configuration option and examining Tidy's "
"output. "
msgstr ""
@ -1287,11 +1287,11 @@ msgstr ""
#. - It's very important that <br/> be self-closing!
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not
#. be translated.
msgctxt "TidySquelchShow"
msgctxt "TidyMuteShow"
msgid ""
"This option indicates whether or not Tidy should display message ID's "
"with each of its error reports. This could be useful if you wanted to "
"use the <code>squelch</code> configuration option in order to filter "
"use the <code>mute</code> configuration option in order to filter "
"out certain report messages. "
msgstr ""
@ -2525,7 +2525,7 @@ msgid "missing or malformed argument for option: %s"
msgstr ""
#, c-format
msgctxt "STRING_SQUELCHING_TYPE"
msgctxt "STRING_MUTING_TYPE"
msgid "messages of type \"%s\" will not be output"
msgstr ""

View file

@ -5,7 +5,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: HTML Tidy poconvert.rb\n"
"Project-Id-Version: \n"
"PO-Revision-Date: 2017-10-08 10:46:33\n"
"PO-Revision-Date: 2017-10-10 08:20:36\n"
"Last-Translator: jderry\n"
"Language-Team: \n"
@ -1263,14 +1263,14 @@ msgstr ""
#. - It's very important that <br/> be self-closing!
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not
#. be translated.
msgctxt "TidySquelchReports"
msgctxt "TidyMuteReports"
msgid ""
"Use this option to prevent Tidy from displaying certain types of "
"report output,for example, for conditions that you wish to ignore."
"<br/>"
"This option takes a list of one or more keys indicating the message "
"type to squelch. You can discover these message keys by using the "
"<code>squelch-id</code> configuration option and examining Tidy's "
"type to mute. You can discover these message keys by using the "
"<code>mute-id</code> configuration option and examining Tidy's "
"output. "
msgstr ""
@ -1282,11 +1282,11 @@ msgstr ""
#. - It's very important that <br/> be self-closing!
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not
#. be translated.
msgctxt "TidySquelchShow"
msgctxt "TidyMuteShow"
msgid ""
"This option indicates whether or not Tidy should display message ID's "
"with each of its error reports. This could be useful if you wanted to "
"use the <code>squelch</code> configuration option in order to filter "
"use the <code>mute</code> configuration option in order to filter "
"out certain report messages. "
msgstr ""
@ -2520,7 +2520,7 @@ msgid "missing or malformed argument for option: %s"
msgstr ""
#, c-format
msgctxt "STRING_SQUELCHING_TYPE"
msgctxt "STRING_MUTING_TYPE"
msgid "messages of type \"%s\" will not be output"
msgstr ""

View file

@ -5,7 +5,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: HTML Tidy poconvert.rb\n"
"Project-Id-Version: \n"
"PO-Revision-Date: 2017-10-08 10:46:33\n"
"PO-Revision-Date: 2017-10-10 08:20:36\n"
"Last-Translator: jderry\n"
"Language-Team: \n"
@ -1498,14 +1498,14 @@ msgstr ""
#. - It's very important that <br/> be self-closing!
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not
#. be translated.
msgctxt "TidySquelchReports"
msgctxt "TidyMuteReports"
msgid ""
"Use this option to prevent Tidy from displaying certain types of "
"report output,for example, for conditions that you wish to ignore."
"<br/>"
"This option takes a list of one or more keys indicating the message "
"type to squelch. You can discover these message keys by using the "
"<code>squelch-id</code> configuration option and examining Tidy's "
"type to mute. You can discover these message keys by using the "
"<code>mute-id</code> configuration option and examining Tidy's "
"output. "
msgstr ""
@ -1517,11 +1517,11 @@ msgstr ""
#. - It's very important that <br/> be self-closing!
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not
#. be translated.
msgctxt "TidySquelchShow"
msgctxt "TidyMuteShow"
msgid ""
"This option indicates whether or not Tidy should display message ID's "
"with each of its error reports. This could be useful if you wanted to "
"use the <code>squelch</code> configuration option in order to filter "
"use the <code>mute</code> configuration option in order to filter "
"out certain report messages. "
msgstr ""
@ -2965,7 +2965,7 @@ msgid "missing or malformed argument for option: %s"
msgstr "argument manquant ou incorrect pour l'option: %s"
#, c-format
msgctxt "STRING_SQUELCHING_TYPE"
msgctxt "STRING_MUTING_TYPE"
msgid "messages of type \"%s\" will not be output"
msgstr ""

View file

@ -5,7 +5,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: HTML Tidy poconvert.rb\n"
"Project-Id-Version: \n"
"PO-Revision-Date: 2017-10-08 10:46:33\n"
"PO-Revision-Date: 2017-10-10 08:20:36\n"
"Last-Translator: jderry\n"
"Language-Team: \n"
@ -1552,14 +1552,14 @@ msgstr ""
#. - It's very important that <br/> be self-closing!
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not
#. be translated.
msgctxt "TidySquelchReports"
msgctxt "TidyMuteReports"
msgid ""
"Use this option to prevent Tidy from displaying certain types of "
"report output,for example, for conditions that you wish to ignore."
"<br/>"
"This option takes a list of one or more keys indicating the message "
"type to squelch. You can discover these message keys by using the "
"<code>squelch-id</code> configuration option and examining Tidy's "
"type to mute. You can discover these message keys by using the "
"<code>mute-id</code> configuration option and examining Tidy's "
"output. "
msgstr ""
@ -1571,11 +1571,11 @@ msgstr ""
#. - It's very important that <br/> be self-closing!
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not
#. be translated.
msgctxt "TidySquelchShow"
msgctxt "TidyMuteShow"
msgid ""
"This option indicates whether or not Tidy should display message ID's "
"with each of its error reports. This could be useful if you wanted to "
"use the <code>squelch</code> configuration option in order to filter "
"use the <code>mute</code> configuration option in order to filter "
"out certain report messages. "
msgstr ""
@ -3053,7 +3053,7 @@ msgid "missing or malformed argument for option: %s"
msgstr "argumento faltando ou malformado para opção: %s"
#, c-format
msgctxt "STRING_SQUELCHING_TYPE"
msgctxt "STRING_MUTING_TYPE"
msgid "messages of type \"%s\" will not be output"
msgstr ""

View file

@ -5,7 +5,7 @@ msgstr ""
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: HTML Tidy poconvert.rb\n"
"Project-Id-Version: \n"
"PO-Revision-Date: 2017-10-08 10:46:33\n"
"PO-Revision-Date: 2017-10-10 08:20:36\n"
"Last-Translator: jderry\n"
"Language-Team: \n"
@ -1263,14 +1263,14 @@ msgstr ""
#. - It's very important that <br/> be self-closing!
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not
#. be translated.
msgctxt "TidySquelchReports"
msgctxt "TidyMuteReports"
msgid ""
"Use this option to prevent Tidy from displaying certain types of "
"report output,for example, for conditions that you wish to ignore."
"<br/>"
"This option takes a list of one or more keys indicating the message "
"type to squelch. You can discover these message keys by using the "
"<code>squelch-id</code> configuration option and examining Tidy's "
"type to mute. You can discover these message keys by using the "
"<code>mute-id</code> configuration option and examining Tidy's "
"output. "
msgstr ""
@ -1282,11 +1282,11 @@ msgstr ""
#. - It's very important that <br/> be self-closing!
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not
#. be translated.
msgctxt "TidySquelchShow"
msgctxt "TidyMuteShow"
msgid ""
"This option indicates whether or not Tidy should display message ID's "
"with each of its error reports. This could be useful if you wanted to "
"use the <code>squelch</code> configuration option in order to filter "
"use the <code>mute</code> configuration option in order to filter "
"out certain report messages. "
msgstr ""
@ -2514,7 +2514,7 @@ msgid "missing or malformed argument for option: %s"
msgstr ""
#, c-format
msgctxt "STRING_SQUELCHING_TYPE"
msgctxt "STRING_MUTING_TYPE"
msgid "messages of type \"%s\" will not be output"
msgstr ""

View file

@ -5,7 +5,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: HTML Tidy poconvert.rb\n"
"Project-Id-Version: \n"
"POT-Creation-Date: 2017-10-08 10:46:33\n"
"POT-Creation-Date: 2017-10-10 08:20:36\n"
"Last-Translator: jderry\n"
"Language-Team: \n"
@ -1263,14 +1263,14 @@ msgstr ""
#. - It's very important that <br/> be self-closing!
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not
#. be translated.
msgctxt "TidySquelchReports"
msgctxt "TidyMuteReports"
msgid ""
"Use this option to prevent Tidy from displaying certain types of "
"report output,for example, for conditions that you wish to ignore."
"<br/>"
"This option takes a list of one or more keys indicating the message "
"type to squelch. You can discover these message keys by using the "
"<code>squelch-id</code> configuration option and examining Tidy's "
"type to mute. You can discover these message keys by using the "
"<code>mute-id</code> configuration option and examining Tidy's "
"output. "
msgstr ""
@ -1282,11 +1282,11 @@ msgstr ""
#. - It's very important that <br/> be self-closing!
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not
#. be translated.
msgctxt "TidySquelchShow"
msgctxt "TidyMuteShow"
msgid ""
"This option indicates whether or not Tidy should display message ID's "
"with each of its error reports. This could be useful if you wanted to "
"use the <code>squelch</code> configuration option in order to filter "
"use the <code>mute</code> configuration option in order to filter "
"out certain report messages. "
msgstr ""
@ -2516,7 +2516,7 @@ msgid "missing or malformed argument for option: %s"
msgstr ""
#, c-format
msgctxt "STRING_SQUELCHING_TYPE"
msgctxt "STRING_MUTING_TYPE"
msgid "messages of type \"%s\" will not be output"
msgstr ""

View file

@ -249,8 +249,8 @@ static const TidyOptionImpl option_defs[] =
{ TidyShowWarnings, DD, "show-warnings", BL, yes, ParsePickList, &boolPicks },
{ TidySkipNested, MR, "skip-nested", BL, yes, ParsePickList, &boolPicks }, /* 1642186 - Issue #65 */
{ TidySortAttributes, PP, "sort-attributes", IN, TidySortAttrNone,ParsePickList, &sorterPicks },
{ TidySquelchReports, DD, "squelch", ST, 0, ParseList, NULL },
{ TidySquelchShow, DD, "squelch-id", BL, no, ParsePickList, &boolPicks },
{ TidyMuteReports, DD, "mute", ST, 0, ParseList, NULL },
{ TidyMuteShow, DD, "mute-id", BL, no, ParsePickList, &boolPicks },
{ TidyStrictTagsAttr, MR, "strict-tags-attributes", BL, no, ParsePickList, &boolPicks }, /* 20160209 - Issue #350 */
{ TidyStyleTags, MR, "fix-style-tags", BL, yes, ParsePickList, &boolPicks },
{ TidyTabSize, PP, "tab-size", IN, 8, ParseInt, NULL },
@ -1196,8 +1196,8 @@ void TY_(DeclareListItem)( TidyDocImpl* doc, const TidyOptionImpl* opt, ctmbstr
TY_(DefinePriorityAttribute)( doc, name );
break;
case TidySquelchReports:
TY_(DefineSquelchedMessage)( doc, opt, name );
case TidyMuteReports:
TY_(DefineMutedMessage)( doc, opt, name );
break;
default:

View file

@ -1184,13 +1184,13 @@ static languageDefinition language_en = { whichPluralForm_en, {
- It's very important that <br/> be self-closing!
- The strings "Tidy" and "HTML Tidy" are the program name and must not
be translated. */
TidySquelchReports, 0,
TidyMuteReports, 0,
"Use this option to prevent Tidy from displaying certain types of "
"report output,for example, for conditions that you wish to ignore."
"<br/>"
"This option takes a list of one or more keys indicating the message "
"type to squelch. You can discover these message keys by using the "
"<code>squelch-id</code> configuration option and examining Tidy's "
"type to mute. You can discover these message keys by using the "
"<code>mute-id</code> configuration option and examining Tidy's "
"output. "
},
{/* Important notes for translators:
@ -1201,10 +1201,10 @@ static languageDefinition language_en = { whichPluralForm_en, {
- It's very important that <br/> be self-closing!
- The strings "Tidy" and "HTML Tidy" are the program name and must not
be translated. */
TidySquelchShow, 0,
TidyMuteShow, 0,
"This option indicates whether or not Tidy should display message ID's "
"with each of its error reports. This could be useful if you wanted to "
"use the <code>squelch</code> configuration option in order to filter "
"use the <code>mute</code> configuration option in order to filter "
"out certain report messages. "
},
{/* Important notes for translators:
@ -1951,7 +1951,7 @@ static languageDefinition language_en = { whichPluralForm_en, {
{ SPACE_PRECEDING_XMLDECL, 0, "removing whitespace preceding XML Declaration" },
{ STRING_ARGUMENT_BAD, 0, "option \"%s\" given bad argument \"%s\"" },
{ STRING_MISSING_MALFORMED, 0, "missing or malformed argument for option: %s" },
{ STRING_SQUELCHING_TYPE, 0, "messages of type \"%s\" will not be output" },
{ STRING_MUTING_TYPE, 0, "messages of type \"%s\" will not be output" },
{ STRING_UNKNOWN_OPTION, 0, "unknown option: %s" },
{ SUSPECTED_MISSING_QUOTE, 0, "suspected missing quote mark for attribute value" },
{ TAG_NOT_ALLOWED_IN, 0, "%s isn't allowed in <%s> elements" },

View file

@ -153,8 +153,8 @@ static void messageOut( TidyMessageImpl *message )
break;
}
/* Suppress report messages if they've been squelched. */
go = go & !message->squelched;
/* Suppress report messages if they've been muted. */
go = go & !message->muted;
/* Suppress report messages if we've already reached the reporting limit. */
if ( message->level <= TidyFatal )
@ -364,8 +364,8 @@ static struct _dispatchTable {
{ STRING_CONTENT_LOOKS, TidyInfo, formatStandard }, /* reportMarkupVersion() */
{ STRING_DOCTYPE_GIVEN, TidyInfo, formatStandard }, /* reportMarkupVersion() */
{ STRING_MISSING_MALFORMED, TidyConfig, formatStandard },
{ STRING_MUTING_TYPE, TidyConfig, formatStandard },
{ STRING_NO_SYSID, TidyInfo, formatStandard }, /* reportMarkupVersion() */
{ STRING_SQUELCHING_TYPE, TidyConfig, formatStandard },
{ STRING_UNKNOWN_OPTION, TidyConfig, formatStandard },
{ SUSPECTED_MISSING_QUOTE, TidyWarning, formatStandard },
{ TAG_NOT_ALLOWED_IN, TidyWarning, formatStandard, PREVIOUS_LOCATION },
@ -728,7 +728,7 @@ TidyMessageImpl *formatStandard(TidyDocImpl* doc, Node *element, Node *node, uin
case STRING_CONTENT_LOOKS:
case STRING_DOCTYPE_GIVEN:
case STRING_MISSING_MALFORMED:
case STRING_SQUELCHING_TYPE:
case STRING_MUTING_TYPE:
{
ctmbstr str;
if ( (str = va_arg( args, ctmbstr)) )
@ -1330,23 +1330,23 @@ void TY_(ReportNumWarnings)( TidyDocImpl* doc )
/*********************************************************************
* Message Squelching
* Message Muting
*********************************************************************/
void TY_(FreeSquelchedMessageList)( TidyDocImpl* doc )
void TY_(FreeMutedMessageList)( TidyDocImpl* doc )
{
TidySquelchedMessages *list = &(doc->squelched);
TidyMutedMessages *list = &(doc->muted);
if ( list->list )
TidyFree( doc->allocator, list->list );
}
void TY_(DefineSquelchedMessage)(TidyDocImpl* doc, const TidyOptionImpl* opt, ctmbstr name)
void TY_(DefineMutedMessage)(TidyDocImpl* doc, const TidyOptionImpl* opt, ctmbstr name)
{
enum { capacity = 10 };
TidySquelchedMessages *list = &(doc->squelched);
TidyMutedMessages *list = &(doc->muted);
tidyStrings message = TY_(tidyErrorCodeFromKey)( name );
if ( message <= REPORT_MESSAGE_FIRST || message >= REPORT_MESSAGE_LAST)
@ -1373,8 +1373,8 @@ void TY_(DefineSquelchedMessage)(TidyDocImpl* doc, const TidyOptionImpl* opt, ct
list->count++;
list->list[list->count] = 0;
/* Must come *after* adding to the list, in case it's squelched, too. */
TY_(Report)( doc, NULL, NULL, STRING_SQUELCHING_TYPE, name );
/* Must come *after* adding to the list, in case it's muted, too. */
TY_(Report)( doc, NULL, NULL, STRING_MUTING_TYPE, name );
}
@ -1518,13 +1518,13 @@ static const TidyOptionId TidyIndentSpacesLinks[] = { TidyIndentContent, Tidy
static const TidyOptionId TidyInlineTagsLinks[] = { TidyBlockTags, TidyEmptyTags, TidyPreTags, TidyUseCustomTags, TidyUnknownOption };
static const TidyOptionId TidyMergeDivsLinks[] = { TidyMakeClean, TidyMergeSpans, TidyUnknownOption };
static const TidyOptionId TidyMergeSpansLinks[] = { TidyMakeClean, TidyMergeDivs, TidyUnknownOption };
static const TidyOptionId TidyMuteLinks[] = { TidyMuteShow };
static const TidyOptionId TidyMuteShowLinks[] = { TidyMuteReports };
static const TidyOptionId TidyNumEntitiesLinks[] = { TidyDoctype, TidyPreserveEntities, TidyUnknownOption };
static const TidyOptionId TidyOutCharEncodingLinks[] = { TidyCharEncoding, TidyUnknownOption };
static const TidyOptionId TidyOutFileLinks[] = { TidyErrFile, TidyUnknownOption };
static const TidyOptionId TidyPreTagsLinks[] = { TidyBlockTags, TidyEmptyTags, TidyInlineTags, TidyUseCustomTags, TidyUnknownOption };
static const TidyOptionId TidySortAttributesLinks[] = { TidyPriorityAttributes, TidyUnknownOption };
static const TidyOptionId TidySquelchLinks[] = { TidySquelchShow };
static const TidyOptionId TidySquelchShowLinks[] = { TidySquelchReports };
static const TidyOptionId TidyUseCustomTagsLinks[] = { TidyBlockTags, TidyEmptyTags, TidyInlineTags, TidyPreTags, TidyUnknownOption };
static const TidyOptionId TidyWrapAttValsLinks[] = { TidyWrapScriptlets, TidyLiteralAttribs, TidyUnknownOption };
static const TidyOptionId TidyWrapScriptletsLinks[] = { TidyWrapAttVals, TidyUnknownOption };
@ -1548,13 +1548,13 @@ static const TidyOptionDoc docs_xrefs[] =
{ TidyInlineTags, TidyInlineTagsLinks },
{ TidyMergeDivs, TidyMergeDivsLinks },
{ TidyMergeSpans, TidyMergeSpansLinks },
{ TidyMuteShow, TidyMuteShowLinks },
{ TidyNumEntities, TidyNumEntitiesLinks },
{ TidyOutCharEncoding, TidyOutCharEncodingLinks },
{ TidyOutFile, TidyOutFileLinks },
{ TidyPreTags, TidyPreTagsLinks },
{ TidySortAttributes, TidySortAttributesLinks },
{ TidySquelchShow, TidySquelchShowLinks },
{ TidySquelchReports, TidySquelchLinks },
{ TidyMuteReports, TidyMuteLinks },
{ TidyUseCustomTags, TidyUseCustomTagsLinks },
{ TidyWrapAttVals, TidyWrapAttValsLinks },
{ TidyWrapScriptlets, TidyWrapScriptletsLinks },

View file

@ -182,36 +182,36 @@ void TY_(ReportNumWarnings)( TidyDocImpl* doc );
/***************************************************************************//**
** @defgroup message_squelching Message Squelching
** @defgroup message_mutinging Message Muting
**
** Message types included in the `squelch` option will be be printed in
** Message types included in the `mute` option will be be printed in
** messageOut().
**
** @{
******************************************************************************/
/** Maintains a list of messages not to display. */
typedef struct _squelchedMessages {
typedef struct _mutedMessages {
tidyStrings* list; /**< A list of messages that won't be output. */
uint count; /**< Current count of the list. */
uint capacity; /**< Current capacity of the list. */
} TidySquelchedMessages;
} TidyMutedMessages;
/** Frees the list of squelched messages.
/** Frees the list of muted messages.
** @param doc The Tidy document.
*/
void TY_(FreeSquelchedMessageList)( TidyDocImpl* doc );
void TY_(FreeMutedMessageList)( TidyDocImpl* doc );
/** Adds a new message ID to the list of squelched messages.
/** Adds a new message ID to the list of muted messages.
** @param doc The Tidy document.
** @param name The message code as a string.
*/
void TY_(DefineSquelchedMessage)( TidyDocImpl* doc, const TidyOptionImpl* opt, ctmbstr name );
void TY_(DefineMutedMessage)( TidyDocImpl* doc, const TidyOptionImpl* opt, ctmbstr name );
/** @} */
/** @} message_squelching group */
/** @} message_muting group */
/***************************************************************************//**

View file

@ -156,7 +156,7 @@ static TidyMessageImpl *tidyMessageCreateInitV( TidyDocImpl *doc,
result->messagePos, result->messagePrefix,
result->message);
if ( ( cfgBool(doc, TidySquelchShow) == yes ) && level <= TidyFatal )
if ( ( cfgBool(doc, TidyMuteShow) == yes ) && level <= TidyFatal )
{
TY_(tmbsnprintf)(result->messageOutputDefault, sizeMessageBuf, "%s (%s)", result->messageOutputDefault, TY_(tidyErrorCodeAsKey)(code) );
TY_(tmbsnprintf)(result->messageOutput, sizeMessageBuf, "%s (%s)", result->messageOutput, TY_(tidyErrorCodeAsKey)(code) );
@ -192,13 +192,13 @@ static TidyMessageImpl *tidyMessageCreateInitV( TidyDocImpl *doc,
}
/* finally, check the document's configuration to determine whether
this message is squelched. */
result->squelched = no;
while ( ( doc->squelched.list ) && ( doc->squelched.list[i] != 0 ) )
this message is muted. */
result->muted = no;
while ( ( doc->muted.list ) && ( doc->muted.list[i] != 0 ) )
{
if ( doc->squelched.list[i] == code )
if ( doc->muted.list[i] == code )
{
result->squelched = yes;
result->muted = yes;
break;
}
i++;
@ -312,9 +312,9 @@ TidyReportLevel TY_(getMessageLevel)( TidyMessageImpl message )
return message.level;
}
Bool TY_(getMessageIsSquelched)( TidyMessageImpl message )
Bool TY_(getMessageIsMuted)( TidyMessageImpl message )
{
return message.squelched;
return message.muted;
}
ctmbstr TY_(getMessageFormatDefault)( TidyMessageImpl message )

View file

@ -80,8 +80,8 @@ int TY_(getMessageColumn)( TidyMessageImpl message );
/** get the TidyReportLevel of the message. */
TidyReportLevel TY_(getMessageLevel)( TidyMessageImpl message );
/** get whether or not the message was squelched by the configuration. */
Bool TY_(getMessageIsSquelched)( TidyMessageImpl message );
/** get whether or not the message was muted by the configuration. */
Bool TY_(getMessageIsMuted)( TidyMessageImpl message );
/** the built-in format string */
ctmbstr TY_(getMessageFormatDefault)( TidyMessageImpl message );

View file

@ -45,7 +45,7 @@ struct _TidyDocImpl
TidyTagImpl tags;
TidyAttribImpl attribs;
TidyAccessImpl access;
TidySquelchedMessages squelched;
TidyMutedMessages muted;
/* The Pretty Print buffer */
TidyPrintImpl pprint;
@ -106,7 +106,7 @@ struct _TidyMessageImpl
int column; /* the column the message applies to */
TidyReportLevel level; /* the severity level of the message */
Bool allowMessage; /* indicates whether or not a filter rejected a message */
Bool squelched; /* indicates whether or not a configuration squelches this message */
Bool muted; /* indicates whether or not a configuration mutes this message */
int argcount; /* the number of arguments */
struct printfArg* arguments; /* the arguments' values and types */

View file

@ -139,7 +139,7 @@ void tidyDocRelease( TidyDocImpl* doc )
TY_(FreeConfig)( doc );
TY_(FreeAttrTable)( doc );
TY_(FreeAttrPriorityList)( doc );
TY_(FreeSquelchedMessageList( doc ));
TY_(FreeMutedMessageList( doc ));
TY_(FreeTags)( doc );
/*\
* Issue #186 - Now FreeNode depend on the doctype, so the lexer is needed
@ -715,10 +715,10 @@ TidyReportLevel TIDY_CALL tidyGetMessageLevel( TidyMessage tmessage )
return TY_(getMessageLevel)(*message);
}
Bool TIDY_CALL tidyGetMessageIsSquelched( TidyMessage tmessage )
Bool TIDY_CALL tidyGetMessageIsMuted( TidyMessage tmessage )
{
TidyMessageImpl *message = tidyMessageToImpl(tmessage);
return TY_(getMessageIsSquelched)(*message);
return TY_(getMessageIsMuted)(*message);
}
ctmbstr TIDY_CALL tidyGetMessageFormatDefault( TidyMessage tmessage )