From 1d9194296034886548cc48904c4924fd9fb40aff Mon Sep 17 00:00:00 2001 From: Jim Derry Date: Tue, 10 Oct 2017 08:21:14 -0400 Subject: [PATCH] Renamed the proposed `squelch` and `squelch-id` to `mute` and `mute-id`, respectively. Updated matching cases in test branch accordingly. --- include/tidy.h | 4 ++-- include/tidyenum.h | 6 ++--- localize/translations/language_en_gb.po | 14 ++++++------ localize/translations/language_es.po | 14 ++++++------ localize/translations/language_es_mx.po | 14 ++++++------ localize/translations/language_fr.po | 14 ++++++------ localize/translations/language_pt_br.po | 14 ++++++------ localize/translations/language_zh_cn.po | 14 ++++++------ localize/translations/tidy.pot | 14 ++++++------ src/config.c | 8 +++---- src/language_en.h | 12 +++++----- src/message.c | 30 ++++++++++++------------- src/message.h | 18 +++++++-------- src/messageobj.c | 16 ++++++------- src/messageobj.h | 4 ++-- src/tidy-int.h | 4 ++-- src/tidylib.c | 6 ++--- 17 files changed, 103 insertions(+), 103 deletions(-) diff --git a/include/tidy.h b/include/tidy.h index 59c5609..bbd1d6a 100644 --- a/include/tidy.h +++ b/include/tidy.h @@ -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). diff --git a/include/tidyenum.h b/include/tidyenum.h index 1cf321e..a76e0ee 100644 --- a/include/tidyenum.h +++ b/include/tidyenum.h @@ -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 */ diff --git a/localize/translations/language_en_gb.po b/localize/translations/language_en_gb.po index 7a32268..78f3eaf 100644 --- a/localize/translations/language_en_gb.po +++ b/localize/translations/language_en_gb.po @@ -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
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." "
" "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 " -"squelch-id configuration option and examining Tidy's " +"type to mute. You can discover these message keys by using the " +"mute-id configuration option and examining Tidy's " "output. " msgstr "" @@ -1324,11 +1324,11 @@ msgstr "" #. - It's very important that
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 squelch configuration option in order to filter " +"use the mute 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 "" diff --git a/localize/translations/language_es.po b/localize/translations/language_es.po index 9980091..02ab42d 100644 --- a/localize/translations/language_es.po +++ b/localize/translations/language_es.po @@ -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
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." "
" "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 " -"squelch-id configuration option and examining Tidy's " +"type to mute. You can discover these message keys by using the " +"mute-id configuration option and examining Tidy's " "output. " msgstr "" @@ -1287,11 +1287,11 @@ msgstr "" #. - It's very important that
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 squelch configuration option in order to filter " +"use the mute 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 "" diff --git a/localize/translations/language_es_mx.po b/localize/translations/language_es_mx.po index a171f40..309e528 100644 --- a/localize/translations/language_es_mx.po +++ b/localize/translations/language_es_mx.po @@ -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
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." "
" "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 " -"squelch-id configuration option and examining Tidy's " +"type to mute. You can discover these message keys by using the " +"mute-id configuration option and examining Tidy's " "output. " msgstr "" @@ -1282,11 +1282,11 @@ msgstr "" #. - It's very important that
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 squelch configuration option in order to filter " +"use the mute 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 "" diff --git a/localize/translations/language_fr.po b/localize/translations/language_fr.po index 14379ad..c871841 100644 --- a/localize/translations/language_fr.po +++ b/localize/translations/language_fr.po @@ -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
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." "
" "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 " -"squelch-id configuration option and examining Tidy's " +"type to mute. You can discover these message keys by using the " +"mute-id configuration option and examining Tidy's " "output. " msgstr "" @@ -1517,11 +1517,11 @@ msgstr "" #. - It's very important that
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 squelch configuration option in order to filter " +"use the mute 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 "" diff --git a/localize/translations/language_pt_br.po b/localize/translations/language_pt_br.po index e3c36c6..3f02fb7 100644 --- a/localize/translations/language_pt_br.po +++ b/localize/translations/language_pt_br.po @@ -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
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." "
" "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 " -"squelch-id configuration option and examining Tidy's " +"type to mute. You can discover these message keys by using the " +"mute-id configuration option and examining Tidy's " "output. " msgstr "" @@ -1571,11 +1571,11 @@ msgstr "" #. - It's very important that
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 squelch configuration option in order to filter " +"use the mute 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 "" diff --git a/localize/translations/language_zh_cn.po b/localize/translations/language_zh_cn.po index c152e6a..4280129 100644 --- a/localize/translations/language_zh_cn.po +++ b/localize/translations/language_zh_cn.po @@ -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
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." "
" "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 " -"squelch-id configuration option and examining Tidy's " +"type to mute. You can discover these message keys by using the " +"mute-id configuration option and examining Tidy's " "output. " msgstr "" @@ -1282,11 +1282,11 @@ msgstr "" #. - It's very important that
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 squelch configuration option in order to filter " +"use the mute 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 "" diff --git a/localize/translations/tidy.pot b/localize/translations/tidy.pot index e480513..0cf1d0a 100644 --- a/localize/translations/tidy.pot +++ b/localize/translations/tidy.pot @@ -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
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." "
" "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 " -"squelch-id configuration option and examining Tidy's " +"type to mute. You can discover these message keys by using the " +"mute-id configuration option and examining Tidy's " "output. " msgstr "" @@ -1282,11 +1282,11 @@ msgstr "" #. - It's very important that
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 squelch configuration option in order to filter " +"use the mute 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 "" diff --git a/src/config.c b/src/config.c index ca4669f..b9ecbba 100644 --- a/src/config.c +++ b/src/config.c @@ -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: diff --git a/src/language_en.h b/src/language_en.h index 6e69f6b..b9e3d5b 100644 --- a/src/language_en.h +++ b/src/language_en.h @@ -1184,13 +1184,13 @@ static languageDefinition language_en = { whichPluralForm_en, { - It's very important that
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." "
" "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 " - "squelch-id configuration option and examining Tidy's " + "type to mute. You can discover these message keys by using the " + "mute-id 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
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 squelch configuration option in order to filter " + "use the mute 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" }, diff --git a/src/message.c b/src/message.c index b420fc8..9d8ca0f 100644 --- a/src/message.c +++ b/src/message.c @@ -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 }, diff --git a/src/message.h b/src/message.h index 6f05e1c..c5191cf 100644 --- a/src/message.h +++ b/src/message.h @@ -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 */ /***************************************************************************//** diff --git a/src/messageobj.c b/src/messageobj.c index f5b055c..9da8e79 100644 --- a/src/messageobj.c +++ b/src/messageobj.c @@ -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 ) diff --git a/src/messageobj.h b/src/messageobj.h index 154fae5..0ee1666 100644 --- a/src/messageobj.h +++ b/src/messageobj.h @@ -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 ); diff --git a/src/tidy-int.h b/src/tidy-int.h index b677ff0..9732dae 100644 --- a/src/tidy-int.h +++ b/src/tidy-int.h @@ -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 */ diff --git a/src/tidylib.c b/src/tidylib.c index 2bc7c08..45aaf04 100644 --- a/src/tidylib.c +++ b/src/tidylib.c @@ -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 )