From 283f8974c3319fe1af07b6701e8cbf25b7c334c9 Mon Sep 17 00:00:00 2001 From: Jim Derry Date: Mon, 4 Sep 2017 11:24:48 -0400 Subject: [PATCH] Migrated reports using formatFileError and formatStandard to flexible messaging system. Migrated old reportNotice() to report(). --- src/clean.c | 20 +-- src/config.c | 2 +- src/lexer.c | 22 +-- src/mappedio.c | 2 +- src/message.c | 161 +--------------------- src/message.h | 3 +- src/parser.c | 366 ++++++++++++++++++++++++------------------------- src/tags.c | 2 +- src/tidylib.c | 36 ++--- 9 files changed, 233 insertions(+), 381 deletions(-) diff --git a/src/clean.c b/src/clean.c index 707e4d9..f3881b3 100644 --- a/src/clean.c +++ b/src/clean.c @@ -1986,7 +1986,7 @@ void TY_(CleanWord2000)( TidyDocImpl* doc, Node *node) * meaning this result would not ordinarily be displayed. */ Node* next; - TY_(ReportNotice)(doc, NULL, node, PROPRIETARY_ELEMENT); + TY_(Report)(doc, NULL, node, PROPRIETARY_ELEMENT); DiscardContainer( doc, node, &next ); node = next; continue; @@ -2358,7 +2358,7 @@ Bool TY_(TidyMetaCharset)(TidyDocImpl* doc) if (charsetFound || !charsetAttr->value) { prevNode = currentNode->prev; - TY_(ReportNotice)(doc, head, currentNode, DISCARDING_UNEXPECTED); + TY_(Report)(doc, head, currentNode, DISCARDING_UNEXPECTED); TY_(DiscardElement)(doc, currentNode); currentNode = prevNode; continue; @@ -2395,7 +2395,7 @@ Bool TY_(TidyMetaCharset)(TidyDocImpl* doc) if (!httpEquivAttr->value) { prevNode = currentNode->prev; - TY_(ReportNotice)(doc, head, currentNode, DISCARDING_UNEXPECTED); + TY_(Report)(doc, head, currentNode, DISCARDING_UNEXPECTED); TY_(DiscardElement)(doc, currentNode); currentNode = prevNode; continue; @@ -2412,7 +2412,7 @@ Bool TY_(TidyMetaCharset)(TidyDocImpl* doc) #if 0 /* 0000000000000000000000000000000000000000000000000 */ prevNode = currentNode->prev; /* maybe need better message here */ - TY_(ReportNotice)(doc, head, currentNode, DISCARDING_UNEXPECTED); + TY_(Report)(doc, head, currentNode, DISCARDING_UNEXPECTED); TY_(DiscardElement)(doc, currentNode); currentNode = prevNode; #endif /* 000000000000000000000000000000000000000000000000 */ @@ -2429,7 +2429,7 @@ Bool TY_(TidyMetaCharset)(TidyDocImpl* doc) if (charsetFound) { prevNode = currentNode->prev; - TY_(ReportNotice)(doc, head, currentNode, DISCARDING_UNEXPECTED); + TY_(Report)(doc, head, currentNode, DISCARDING_UNEXPECTED); TY_(DiscardElement)(doc, currentNode); currentNode = prevNode; continue; @@ -2442,7 +2442,7 @@ Bool TY_(TidyMetaCharset)(TidyDocImpl* doc) if (charsetFound) { prevNode = currentNode->prev; - TY_(ReportNotice)(doc, head, currentNode, DISCARDING_UNEXPECTED); + TY_(Report)(doc, head, currentNode, DISCARDING_UNEXPECTED); TY_(DiscardElement)(doc, currentNode); currentNode = prevNode; } @@ -2469,7 +2469,7 @@ Bool TY_(TidyMetaCharset)(TidyDocImpl* doc) { /* printf("WARN ABOUT HTTP EQUIV AND CHARSET ATTR! \n"); */ prevNode = currentNode->prev; - TY_(ReportNotice)(doc, head, currentNode, DISCARDING_UNEXPECTED); + TY_(Report)(doc, head, currentNode, DISCARDING_UNEXPECTED); TY_(DiscardElement)(doc, currentNode); currentNode = prevNode; } @@ -2496,7 +2496,7 @@ Bool TY_(TidyMetaCharset)(TidyDocImpl* doc) tidyBufFree(&buf); } TY_(InsertNodeAtStart)(head, metaTag); - TY_(ReportNotice)(doc, metaTag, head, ADDED_MISSING_CHARSET); /* actually just 'Info:' */ + TY_(Report)(doc, metaTag, head, ADDED_MISSING_CHARSET); /* actually just 'Info:' */ } tidyBufFree(&charsetString); return yes; @@ -2882,11 +2882,11 @@ static void StyleToHead(TidyDocImpl* doc, Node *head, Node *node, Bool fix, int { TY_(RemoveNode)(node); /* unhook style node from body */ TY_(InsertNodeAtEnd)(head, node); /* add to end of head */ - TY_(ReportNotice)(doc, node, head, MOVED_STYLE_TO_HEAD); /* report move */ + TY_(Report)(doc, node, head, MOVED_STYLE_TO_HEAD); /* report move */ } else { - TY_(ReportNotice)(doc, node, head, FOUND_STYLE_IN_BODY); + TY_(Report)(doc, node, head, FOUND_STYLE_IN_BODY); } } else if (node->content) diff --git a/src/config.c b/src/config.c index 9414491..64003ea 100644 --- a/src/config.c +++ b/src/config.c @@ -788,7 +788,7 @@ int TY_(ParseConfigFileEnc)( TidyDocImpl* doc, ctmbstr file, ctmbstr charenc ) if ( fin == NULL || enc < 0 ) { - TY_(FileError)( doc, fname, TidyConfig, FILE_CANT_OPEN ); + TY_(ReportFileError)( doc, fname, FILE_CANT_OPEN_CFG ); return -1; } else diff --git a/src/lexer.c b/src/lexer.c index 6b1ac31..b98139c 100644 --- a/src/lexer.c +++ b/src/lexer.c @@ -2454,7 +2454,7 @@ static Node *GetCDATA( TidyDocImpl* doc, Node *container ) if ((TY_(IsJavaScript)(container)) && cfgBool(doc, TidyEscapeScripts)) { /* Issue #281 - only warn if adding the escape! */ - TY_(ReportNotice)(doc, NULL, NULL, BAD_CDATA_CONTENT); + TY_(Report)(doc, NULL, NULL, BAD_CDATA_CONTENT); for (i = lexer->lexsize; i > start-1; --i) lexer->lexbuf[i] = lexer->lexbuf[i-1]; @@ -2472,7 +2472,7 @@ static Node *GetCDATA( TidyDocImpl* doc, Node *container ) lexer->txtend = lexer->lexsize; if (c == EndOfStream) - TY_(ReportNotice)(doc, container, NULL, MISSING_ENDTAG_FOR ); + TY_(Report)(doc, container, NULL, MISSING_ENDTAG_FOR ); /* this was disabled for some reason... */ #if 0 @@ -2764,7 +2764,7 @@ static Node* GetTokenFromStream( TidyDocImpl* doc, GetTokenMode mode ) continue; } - TY_(ReportNotice)(doc, NULL, NULL, MALFORMED_COMMENT ); + TY_(Report)(doc, NULL, NULL, MALFORMED_COMMENT ); } else if (c == 'd' || c == 'D') { @@ -3013,9 +3013,9 @@ static Node* GetTokenFromStream( TidyDocImpl* doc, GetTokenMode mode ) for older HTML, because it's not truly supported by the standard, although Tidy will allow it. */ if ( (doc->lexer->doctype & VERS_HTML5) > 0 && TY_(elementIsAutonomousCustomFormat)( lexer->token->element ) ) - TY_(ReportNotice)( doc, NULL, lexer->token, UNKNOWN_ELEMENT_LOOKS_CUSTOM ); + TY_(Report)( doc, NULL, lexer->token, UNKNOWN_ELEMENT_LOOKS_CUSTOM ); else - TY_(ReportNotice)( doc, NULL, lexer->token, UNKNOWN_ELEMENT ); + TY_(Report)( doc, NULL, lexer->token, UNKNOWN_ELEMENT ); } } else if ( !cfgBool(doc, TidyXmlTags) ) @@ -3048,7 +3048,7 @@ static Node* GetTokenFromStream( TidyDocImpl* doc, GetTokenMode mode ) if (c == '>') { if (badcomment) - TY_(ReportNotice)(doc, NULL, NULL, MALFORMED_COMMENT ); + TY_(Report)(doc, NULL, NULL, MALFORMED_COMMENT ); /* do not store closing -- in lexbuf */ lexer->lexsize -= 2; @@ -3163,7 +3163,7 @@ static Node* GetTokenFromStream( TidyDocImpl* doc, GetTokenMode mode ) if (c == EndOfStream) { - TY_(ReportNotice)(doc, NULL, NULL, UNEXPECTED_END_OF_FILE ); + TY_(Report)(doc, NULL, NULL, UNEXPECTED_END_OF_FILE ); TY_(UngetChar)(c, doc->docIn); continue; } @@ -3474,7 +3474,7 @@ static Node* GetTokenFromStream( TidyDocImpl* doc, GetTokenMode mode ) else if (lexer->state == LEX_COMMENT) /* comment */ { if (c == EndOfStream) - TY_(ReportNotice)(doc, NULL, NULL, MALFORMED_COMMENT ); + TY_(Report)(doc, NULL, NULL, MALFORMED_COMMENT ); lexer->txtend = lexer->lexsize; lexer->lexbuf[lexer->lexsize] = '\0'; @@ -4111,7 +4111,7 @@ static tmbstr ParseValue( TidyDocImpl* doc, ctmbstr name, !(TY_(IsUrl)(doc, name) && TY_(tmbstrncmp)(lexer->lexbuf+start, "javascript:", 11) == 0) && !(TY_(tmbstrncmp)(lexer->lexbuf+start, "lexsize - start; @@ -4383,7 +4383,7 @@ static Node *ParseDocTypeDecl(TidyDocImpl* doc) if (!node->element || !IsValidXMLElemName(node->element)) { - TY_(ReportNotice)(doc, NULL, NULL, MALFORMED_DOCTYPE); + TY_(Report)(doc, NULL, NULL, MALFORMED_DOCTYPE); TY_(FreeNode)(doc, node); return NULL; } @@ -4469,7 +4469,7 @@ static Node *ParseDocTypeDecl(TidyDocImpl* doc) } /* document type declaration not finished */ - TY_(ReportNotice)(doc, NULL, NULL, MALFORMED_DOCTYPE); + TY_(Report)(doc, NULL, NULL, MALFORMED_DOCTYPE); TY_(FreeNode)(doc, node); return NULL; } diff --git a/src/mappedio.c b/src/mappedio.c index e5da343..6f6d3b1 100644 --- a/src/mappedio.c +++ b/src/mappedio.c @@ -326,7 +326,7 @@ int TY_(DocParseFileWithMappedFile)( TidyDocImpl* doc, ctmbstr filnam ) { TY_(freeStreamIn)( in ); } else /* Error message! */ - TY_(FileError)( doc, filnam, TidyError, FILE_CANT_OPEN ); + TY_(ReportFileError)( doc, filnam, FILE_CANT_OPEN ); return status; } diff --git a/src/message.c b/src/message.c index a0d2219..a54e337 100755 --- a/src/message.c +++ b/src/message.c @@ -282,6 +282,7 @@ static struct _dispatchTable { { ENCODING_MISMATCH, TidyWarning, NULL }, { ESCAPED_ILLEGAL_URI, TidyWarning, formatAttributeReport }, { FILE_CANT_OPEN, TidyBadDocument, formatFileError }, + { FILE_CANT_OPEN_CFG, TidyBadDocument, formatFileError }, { FILE_NOT_FILE, TidyBadDocument, formatFileError }, { FIXED_BACKSLASH, TidyWarning, formatAttributeReport }, { FOUND_STYLE_IN_BODY, TidyWarning, formatStandard }, @@ -547,6 +548,7 @@ TidyMessageImpl *formatStandard(TidyDocImpl* doc, Node *element, Node *node, uin case MISSING_STARTTAG: case TOO_MANY_ELEMENTS: case UNEXPECTED_ENDTAG: + case UNEXPECTED_ENDTAG_ERR: /* generated by XML docs */ /* Can we use `rpt` here? No; `element` has a value in every case. */ return TY_(tidyMessageCreateWithNode)(doc, node, code, level, node->element ); break; @@ -571,7 +573,9 @@ TidyMessageImpl *formatStandard(TidyDocImpl* doc, Node *element, Node *node, uin break; case ELEMENT_NOT_EMPTY: + case FOUND_STYLE_IN_BODY: case ILLEGAL_NESTING: + case MOVED_STYLE_TO_HEAD: case TRIM_EMPTY_ELEMENT: case UNEXPECTED_END_OF_FILE: return TY_(tidyMessageCreateWithNode)(doc, rpt, code, level, elemdesc ); @@ -583,6 +587,7 @@ TidyMessageImpl *formatStandard(TidyDocImpl* doc, Node *element, Node *node, uin return TY_(tidyMessageCreateWithNode)(doc, rpt, code, level, elemdesc, nodedesc ); break; + case ADDED_MISSING_CHARSET: case BAD_SUMMARY_HTML5: case NESTED_EMPHASIS: case PROPRIETARY_ELEMENT: @@ -711,11 +716,6 @@ void TY_(Report)(TidyDocImpl* doc, Node *element, Node *node, uint code, ...) *********************************************************************/ -//void TY_(ReportFileError)( TidyDocImpl* doc, ctmbstr file, uint code ) -//{ -// TY_(Report)(doc, NULL, NULL, code, file); -//} - void TY_(ReportAttrError)(TidyDocImpl* doc, Node *node, AttVal *av, uint code) { TY_(Report)(doc, NULL, node, code, av); @@ -729,149 +729,9 @@ void TY_(ReportBadArgument)( TidyDocImpl* doc, ctmbstr option ) } -/********************************************************************* - * Legacy High Level Message Writing Functions - General - * These will be transitioned to the new reporting method. - *********************************************************************/ - - -void TY_(ReportNotice)(TidyDocImpl* doc, Node *element, Node *node, uint code) +void TY_(ReportFileError)( TidyDocImpl* doc, ctmbstr file, uint code ) { - TidyMessageImpl *message = NULL; - TidyMessageImpl *message2 = NULL; - Node* rpt = ( element ? element : node ); - char nodedesc[256] = { 0 }; - char elemdesc[256] = { 0 }; - ctmbstr tagtype; - - TagToString(node, nodedesc, sizeof(nodedesc)); - - switch (code) - { - case INSERTING_TAG: - case MISSING_STARTTAG: - case TOO_MANY_ELEMENTS: - case UNEXPECTED_ENDTAG: - message = TY_(tidyMessageCreateWithNode)(doc, node, code, TidyWarning, node->element ); - break; - - case CANT_BE_NESTED: - case NOFRAMES_CONTENT: - case PROPRIETARY_ELEMENT: - case USING_BR_INPLACE_OF: - message = TY_(tidyMessageCreateWithNode)(doc, node, code, TidyWarning, nodedesc ); - break; - - case ELEMENT_NOT_EMPTY: - case FOUND_STYLE_IN_BODY: - case ILLEGAL_NESTING: - case MOVED_STYLE_TO_HEAD: - case TRIM_EMPTY_ELEMENT: - case UNEXPECTED_END_OF_FILE: - TagToString(element, elemdesc, sizeof(elemdesc)); - message = TY_(tidyMessageCreateWithNode)(doc, element, code, TidyWarning, elemdesc); - break; - - case BAD_CDATA_CONTENT: - case CONTENT_AFTER_BODY: - case DOCTYPE_AFTER_TAGS: - case MALFORMED_COMMENT: - case MALFORMED_DOCTYPE: - case MISSING_TITLE_ELEMENT: - case NESTED_QUOTATION: - message = TY_(tidyMessageCreateWithNode)(doc, rpt, code, TidyWarning ); - break; - - case REPLACING_ELEMENT: - TagToString(element, elemdesc, sizeof(elemdesc)); - message = TY_(tidyMessageCreateWithNode)(doc, rpt, code, TidyWarning, elemdesc, nodedesc ); - break; - - case OBSOLETE_ELEMENT: - case REPLACING_UNEX_ELEMENT: - TagToString(element, elemdesc, sizeof(elemdesc)); - message = TY_(tidyMessageCreateWithNode)(doc, rpt, code, TidyWarning, elemdesc, nodedesc ); - break; - - case MISSING_ENDTAG_FOR: - message = TY_(tidyMessageCreateWithNode)(doc, rpt, code, TidyWarning, element->element ); - break; - - case MISSING_ENDTAG_BEFORE: - message = TY_(tidyMessageCreateWithNode)(doc, rpt, code, TidyWarning, element->element, nodedesc ); - break; - - case BAD_SUMMARY_HTML5: - case NESTED_EMPHASIS: - case REMOVED_HTML5: - message = TY_(tidyMessageCreateWithNode)(doc, rpt, code, TidyWarning, nodedesc ); - break; - - case COERCE_TO_ENDTAG: - case NON_MATCHING_ENDTAG: - message = TY_(tidyMessageCreateWithNode)(doc, rpt, code, TidyWarning, node->element, node->element ); - break; - - case MISSING_DOCTYPE: - case SPACE_PRECEDING_XMLDECL: - case XML_DECLARATION_DETECTED: - message = TY_(tidyMessageCreateWithNode)(doc, node, code, TidyWarning ); - break; - - case ELEMENT_VERS_MISMATCH_WARN: - message = TY_(tidyMessageCreateWithNode)(doc, node, code, TidyWarning, nodedesc, HTMLVersion( doc ) ); - break; - - case ELEMENT_VERS_MISMATCH_ERROR: - message = TY_(tidyMessageCreateWithNode)(doc, node, code, TidyError, nodedesc, HTMLVersion( doc ) ); - break; - - case TOO_MANY_ELEMENTS_IN: - message = TY_(tidyMessageCreateWithNode)(doc, node, code, TidyWarning, node->element, node->element ); - message2 = TY_(tidyMessageCreateWithNode)(doc, node, PREVIOUS_LOCATION, TidyInfo, element->element ); - break; - - case DISCARDING_UNEXPECTED: - /* Force error if in a bad form, or - Issue #166 - repeated
element - */ - message = TY_(tidyMessageCreateWithNode)(doc, node, code, doc->badForm ? TidyError : TidyWarning, nodedesc ); - break; - - case TAG_NOT_ALLOWED_IN: - message = TY_(tidyMessageCreateWithNode)(doc, node, code, TidyWarning, nodedesc, element->element ); - message2 = TY_(tidyMessageCreateWithNode)(doc, element, PREVIOUS_LOCATION, TidyInfo, element->element ); - break; - - case ADDED_MISSING_CHARSET: - message = TY_(tidyMessageCreateWithNode)(doc, rpt, code, TidyInfo, nodedesc); - break; - - case DUPLICATE_FRAMESET: - case SUSPECTED_MISSING_QUOTE: - message = TY_(tidyMessageCreateWithNode)(doc, rpt, code, TidyError ); - break; - - case UNKNOWN_ELEMENT: - case UNKNOWN_ELEMENT_LOOKS_CUSTOM: - TagToString(node, nodedesc, sizeof(nodedesc)); - message = TY_(tidyMessageCreateWithNode)(doc, node, code, TidyError, nodedesc ); - break; - - case UNEXPECTED_ENDTAG_IN: - message = TY_(tidyMessageCreateWithNode)(doc, node, code, TidyError, node->element, element->element ); - break; - - case UNEXPECTED_ENDTAG_ERR: /* generated by XML docs */ - message = TY_(tidyMessageCreateWithNode)(doc, node, code, TidyError, node->element ); - break; - } - - messageOut( message ); - - /* is TidyInfo, but only show it if we're showing warnings! */ - if ( cfgBool(doc, TidyShowWarnings) == yes ) - messageOut( message2 ); + TY_(Report)(doc, NULL, NULL, code, file); } @@ -884,13 +744,6 @@ void TY_(ReportNotice)(TidyDocImpl* doc, Node *element, Node *node, uint code) *********************************************************************/ -void TY_(FileError)( TidyDocImpl* doc, ctmbstr file, TidyReportLevel level, uint code ) -{ - TidyMessageImpl *message = TY_(tidyMessageCreate)( doc, code, level, file); - messageOut( message ); -} - - void TY_(ReportEncodingError)(TidyDocImpl* doc, uint code, uint c, Bool discarded) { TidyMessageImpl *message = NULL; diff --git a/src/message.h b/src/message.h index 5a042a6..e3ec9b5 100644 --- a/src/message.h +++ b/src/message.h @@ -48,7 +48,6 @@ ctmbstr TY_(tidyLibraryVersion)(void); /** @{ */ void TY_(Report)(TidyDocImpl* doc, Node *element, Node *node, uint code, ...); -void TY_(ReportNotice)(TidyDocImpl* doc, Node *element, Node *node, uint code); /** @} */ @@ -58,6 +57,7 @@ void TY_(ReportNotice)(TidyDocImpl* doc, Node *element, Node *node, uint code); void TY_(ReportAttrError)(TidyDocImpl* doc, Node *node, AttVal *av, uint code); void TY_(ReportBadArgument)( TidyDocImpl* doc, ctmbstr option ); +void TY_(ReportFileError)( TidyDocImpl* doc, ctmbstr file, uint code ); /** @} */ @@ -65,7 +65,6 @@ void TY_(ReportBadArgument)( TidyDocImpl* doc, ctmbstr option ); /** @{ */ -void TY_(FileError)( TidyDocImpl* doc, ctmbstr file, TidyReportLevel level, uint code ); void TY_(ReportEncodingError)(TidyDocImpl* doc, uint code, uint c, Bool discarded); void TY_(ReportEncodingWarning)(TidyDocImpl* doc, uint code, uint encoding); void TY_(ReportEntityError)( TidyDocImpl* doc, uint code, ctmbstr entity, int c ); diff --git a/src/parser.c b/src/parser.c index fe47a46..56660aa 100644 --- a/src/parser.c +++ b/src/parser.c @@ -86,11 +86,11 @@ void TY_(CoerceNode)(TidyDocImpl* doc, Node *node, TidyTagId tid, Bool obsolete, Node* tmp = TY_(InferredTag)(doc, tag->id); if (obsolete) - TY_(ReportNotice)(doc, node, tmp, OBSOLETE_ELEMENT); + TY_(Report)(doc, node, tmp, OBSOLETE_ELEMENT); else if (unexpected) - TY_(ReportNotice)(doc, node, tmp, REPLACING_UNEX_ELEMENT); + TY_(Report)(doc, node, tmp, REPLACING_UNEX_ELEMENT); else - TY_(ReportNotice)(doc, node, tmp, REPLACING_ELEMENT); + TY_(Report)(doc, node, tmp, REPLACING_ELEMENT); TidyDocFree(doc, tmp->element); TidyDocFree(doc, tmp); @@ -337,7 +337,7 @@ Node *TY_(TrimEmptyElement)( TidyDocImpl* doc, Node *element ) if ( CanPrune(doc, element) ) { if (element->type != TextNode) - TY_(ReportNotice)(doc, element, NULL, TRIM_EMPTY_ELEMENT); + TY_(Report)(doc, element, NULL, TRIM_EMPTY_ELEMENT); return TY_(DiscardElement)(doc, element); } @@ -783,12 +783,12 @@ static void InsertDocType( TidyDocImpl* doc, Node *element, Node *doctype ) Node* existing = TY_(FindDocType)( doc ); if ( existing ) { - TY_(ReportNotice)(doc, element, doctype, DISCARDING_UNEXPECTED ); + TY_(Report)(doc, element, doctype, DISCARDING_UNEXPECTED ); TY_(FreeNode)( doc, doctype ); } else { - TY_(ReportNotice)(doc, element, doctype, DOCTYPE_AFTER_TAGS ); + TY_(Report)(doc, element, doctype, DOCTYPE_AFTER_TAGS ); while ( !nodeIsHTML(element) ) element = element->parent; TY_(InsertNodeBeforeElement)( element, doctype ); @@ -807,7 +807,7 @@ static void MoveToHead( TidyDocImpl* doc, Node *element, Node *node ) if ( TY_(nodeIsElement)(node) ) { - TY_(ReportNotice)(doc, element, node, TAG_NOT_ALLOWED_IN ); + TY_(Report)(doc, element, node, TAG_NOT_ALLOWED_IN ); head = TY_(FindHEAD)(doc); assert(head != NULL); @@ -819,7 +819,7 @@ static void MoveToHead( TidyDocImpl* doc, Node *element, Node *node ) } else { - TY_(ReportNotice)(doc, element, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, element, node, DISCARDING_UNEXPECTED); TY_(FreeNode)( doc, node ); } } @@ -880,7 +880,7 @@ void TY_(ParseBlock)( TidyDocImpl* doc, Node *element, GetTokenMode mode) if ( nodeIsFORM(element) && DescendantOf(element, TidyTag_FORM) ) - TY_(ReportNotice)(doc, element, NULL, ILLEGAL_NESTING ); + TY_(Report)(doc, element, NULL, ILLEGAL_NESTING ); /* InlineDup() asks the lexer to insert inline emphasis tags @@ -962,7 +962,7 @@ void TY_(ParseBlock)( TidyDocImpl* doc, Node *element, GetTokenMode mode) if ( nodeIsHTML(node) || nodeIsHEAD(node) || nodeIsBODY(node) ) { if ( TY_(nodeIsElement)(node) ) - TY_(ReportNotice)(doc, element, node, DISCARDING_UNEXPECTED ); + TY_(Report)(doc, element, node, DISCARDING_UNEXPECTED ); TY_(FreeNode)( doc, node ); continue; } @@ -972,7 +972,7 @@ void TY_(ParseBlock)( TidyDocImpl* doc, Node *element, GetTokenMode mode) { if (node->tag == NULL) { - TY_(ReportNotice)(doc, element, node, DISCARDING_UNEXPECTED ); + TY_(Report)(doc, element, node, DISCARDING_UNEXPECTED ); TY_(FreeNode)( doc, node ); continue; } @@ -1012,7 +1012,7 @@ void TY_(ParseBlock)( TidyDocImpl* doc, Node *element, GetTokenMode mode) if (node->tag == parent->tag) { if (!(element->tag->model & CM_OPT)) - TY_(ReportNotice)(doc, element, node, MISSING_ENDTAG_BEFORE ); + TY_(Report)(doc, element, node, MISSING_ENDTAG_BEFORE ); TY_(UngetToken)( doc ); @@ -1093,7 +1093,7 @@ void TY_(ParseBlock)( TidyDocImpl* doc, Node *element, GetTokenMode mode) } /* otherwise discard it */ - TY_(ReportNotice)(doc, element, node, DISCARDING_UNEXPECTED ); + TY_(Report)(doc, element, node, DISCARDING_UNEXPECTED ); TY_(FreeNode)( doc, node ); continue; } @@ -1108,7 +1108,7 @@ void TY_(ParseBlock)( TidyDocImpl* doc, Node *element, GetTokenMode mode) } /* otherwise discard it */ - TY_(ReportNotice)(doc, element, node, DISCARDING_UNEXPECTED ); + TY_(Report)(doc, element, node, DISCARDING_UNEXPECTED ); TY_(FreeNode)( doc, node ); continue; } @@ -1116,7 +1116,7 @@ void TY_(ParseBlock)( TidyDocImpl* doc, Node *element, GetTokenMode mode) /* ignore unknown start/end tags */ if ( node->tag == NULL ) { - TY_(ReportNotice)(doc, element, node, DISCARDING_UNEXPECTED ); + TY_(Report)(doc, element, node, DISCARDING_UNEXPECTED ); TY_(FreeNode)( doc, node ); continue; } @@ -1139,7 +1139,7 @@ void TY_(ParseBlock)( TidyDocImpl* doc, Node *element, GetTokenMode mode) if ( nodeIsFORM(node) ) BadForm( doc ); - TY_(ReportNotice)(doc, element, node, DISCARDING_UNEXPECTED ); + TY_(Report)(doc, element, node, DISCARDING_UNEXPECTED ); TY_(FreeNode)( doc, node ); continue; } @@ -1167,7 +1167,7 @@ void TY_(ParseBlock)( TidyDocImpl* doc, Node *element, GetTokenMode mode) nodeIsOPTGROUP(node) || nodeIsOPTION(node) ) { - TY_(ReportNotice)(doc, element, node, DISCARDING_UNEXPECTED ); + TY_(Report)(doc, element, node, DISCARDING_UNEXPECTED ); TY_(FreeNode)( doc, node ); /* DSR - 27Apr02 avoid memory leak */ continue; } @@ -1214,7 +1214,7 @@ void TY_(ParseBlock)( TidyDocImpl* doc, Node *element, GetTokenMode mode) if ( lexer->excludeBlocks ) { if ( !TY_(nodeHasCM)(element, CM_OPT) ) - TY_(ReportNotice)(doc, element, node, MISSING_ENDTAG_BEFORE ); + TY_(Report)(doc, element, node, MISSING_ENDTAG_BEFORE ); TY_(UngetToken)( doc ); @@ -1248,14 +1248,14 @@ void TY_(ParseBlock)( TidyDocImpl* doc, Node *element, GetTokenMode mode) { if ( nodeIsTD(node) ) { - TY_(ReportNotice)(doc, element, node, DISCARDING_UNEXPECTED ); + TY_(Report)(doc, element, node, DISCARDING_UNEXPECTED ); TY_(FreeNode)( doc, node ); continue; } if ( nodeIsTH(node) ) { - TY_(ReportNotice)(doc, element, node, DISCARDING_UNEXPECTED ); + TY_(Report)(doc, element, node, DISCARDING_UNEXPECTED ); TY_(FreeNode)( doc, node ); node = element->parent; TidyDocFree(doc, node->element); @@ -1266,7 +1266,7 @@ void TY_(ParseBlock)( TidyDocImpl* doc, Node *element, GetTokenMode mode) } if ( !TY_(nodeHasCM)(element, CM_OPT) && !element->implicit ) - TY_(ReportNotice)(doc, element, node, MISSING_ENDTAG_BEFORE ); + TY_(Report)(doc, element, node, MISSING_ENDTAG_BEFORE ); TY_(UngetToken)( doc ); @@ -1354,7 +1354,7 @@ void TY_(ParseBlock)( TidyDocImpl* doc, Node *element, GetTokenMode mode) && cfgBool(doc, TidyCoerceEndTags) ) { node->type = EndTag; - TY_(ReportNotice)(doc, element, node, COERCE_TO_ENDTAG); + TY_(Report)(doc, element, node, COERCE_TO_ENDTAG); TY_(UngetToken)( doc ); continue; } @@ -1363,7 +1363,7 @@ void TY_(ParseBlock)( TidyDocImpl* doc, Node *element, GetTokenMode mode) { TY_(UngetToken)( doc ); } - TY_(ReportNotice)(doc, element, node, MISSING_ENDTAG_BEFORE); + TY_(Report)(doc, element, node, MISSING_ENDTAG_BEFORE); if (!(mode & Preformatted)) TrimSpaces(doc, element); @@ -1406,7 +1406,7 @@ void TY_(ParseBlock)( TidyDocImpl* doc, Node *element, GetTokenMode mode) TY_(InsertNodeAtEnd)(element, node); if (node->implicit) - TY_(ReportNotice)(doc, element, node, INSERTING_TAG ); + TY_(Report)(doc, element, node, INSERTING_TAG ); /* Issue #212 - WHY is this hard coded to 'IgnoreWhitespace' while an effort has been made above to set a 'MixedContent' mode in some cases? @@ -1419,13 +1419,13 @@ void TY_(ParseBlock)( TidyDocImpl* doc, Node *element, GetTokenMode mode) if (node->type == EndTag) TY_(PopInline)( doc, node ); /* if inline end tag */ - TY_(ReportNotice)(doc, element, node, DISCARDING_UNEXPECTED ); + TY_(Report)(doc, element, node, DISCARDING_UNEXPECTED ); TY_(FreeNode)( doc, node ); continue; } if (!(element->tag->model & CM_OPT)) - TY_(ReportNotice)(doc, element, node, MISSING_ENDTAG_FOR); + TY_(Report)(doc, element, node, MISSING_ENDTAG_FOR); if (element->tag->model & CM_OBJECT) { @@ -1561,7 +1561,7 @@ void TY_(ParseNamespace)(TidyDocImpl* doc, Node *basenode, GetTokenMode mode) { /* n->implicit = yes; */ n->closed = yes; - TY_(ReportNotice)(doc, n->parent, n, MISSING_ENDTAG_BEFORE); + TY_(Report)(doc, n->parent, n, MISSING_ENDTAG_BEFORE); } /* Issue #369 - Since 'assert' is DEBUG only, and there are @@ -1599,8 +1599,8 @@ void TY_(ParseNamespace)(TidyDocImpl* doc, Node *basenode, GetTokenMode mode) else { /* unmatched close tag: report an error and discard */ - /* TY_(ReportNotice)(doc, parent, node, NON_MATCHING_ENDTAG); Issue #308 - Seems wrong warning! */ - TY_(ReportNotice)(doc, parent, node, DISCARDING_UNEXPECTED); + /* TY_(Report)(doc, parent, node, NON_MATCHING_ENDTAG); Issue #308 - Seems wrong warning! */ + TY_(Report)(doc, parent, node, DISCARDING_UNEXPECTED); assert(parent); /* assert(parent->tag != node->tag); Issue #308 - Seems would always be true! */ TY_(FreeNode)( doc, node); /* Issue #308 - Discard unexpected end tag memory */ @@ -1630,7 +1630,7 @@ void TY_(ParseNamespace)(TidyDocImpl* doc, Node *basenode, GetTokenMode mode) } } - TY_(ReportNotice)(doc, basenode->parent, basenode, MISSING_ENDTAG_FOR); + TY_(Report)(doc, basenode->parent, basenode, MISSING_ENDTAG_FOR); } @@ -1763,14 +1763,14 @@ void TY_(ParseInline)( TidyDocImpl* doc, Node *element, GetTokenMode mode ) && TY_(nodeIsText)(element->last) && !TY_(TextNodeEndWithSpace)(doc->lexer, element->last) ) { - TY_(ReportNotice)(doc, element, node, COERCE_TO_ENDTAG); + TY_(Report)(doc, element, node, COERCE_TO_ENDTAG); node->type = EndTag; TY_(UngetToken)(doc); continue; } if (node->attributes == NULL || element->attributes == NULL) - TY_(ReportNotice)(doc, element, node, NESTED_EMPHASIS); + TY_(Report)(doc, element, node, NESTED_EMPHASIS); } else if ( TY_(IsPushed)(doc, node) && node->type == StartTag && nodeIsQ(node) ) @@ -1781,7 +1781,7 @@ void TY_(ParseInline)( TidyDocImpl* doc, Node *element, GetTokenMode mode ) \*/ if (TY_(HTMLVersion)(doc) != HT50) { - TY_(ReportNotice)(doc, element, node, NESTED_QUOTATION); + TY_(Report)(doc, element, node, NESTED_QUOTATION); } } @@ -1810,7 +1810,7 @@ void TY_(ParseInline)( TidyDocImpl* doc, Node *element, GetTokenMode mode ) { if ( TY_(nodeIsElement)(node) ) { - TY_(ReportNotice)(doc, element, node, DISCARDING_UNEXPECTED ); + TY_(Report)(doc, element, node, DISCARDING_UNEXPECTED ); TY_(FreeNode)( doc, node ); continue; } @@ -1858,7 +1858,7 @@ void TY_(ParseInline)( TidyDocImpl* doc, Node *element, GetTokenMode mode ) /* ignore unknown and PARAM tags */ if ( node->tag == NULL || nodeIsPARAM(node) ) { - TY_(ReportNotice)(doc, element, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, element, node, DISCARDING_UNEXPECTED); TY_(FreeNode)( doc, node ); continue; } @@ -1905,7 +1905,7 @@ void TY_(ParseInline)( TidyDocImpl* doc, Node *element, GetTokenMode mode ) bold bold and italic italics */ if ( TY_(SwitchInline)( doc, element, node ) ) { - TY_(ReportNotice)(doc, element, node, NON_MATCHING_ENDTAG); + TY_(Report)(doc, element, node, NON_MATCHING_ENDTAG); TY_(UngetToken)( doc ); /* put this back */ TY_(InlineDup1)( doc, NULL, element ); /* dupe the , after */ if (!(mode & Preformatted)) @@ -1923,12 +1923,12 @@ void TY_(ParseInline)( TidyDocImpl* doc, Node *element, GetTokenMode mode ) { if ( nodeIsA(node) && node->tag != element->tag ) { - TY_(ReportNotice)(doc, element, node, MISSING_ENDTAG_BEFORE ); + TY_(Report)(doc, element, node, MISSING_ENDTAG_BEFORE ); TY_(UngetToken)( doc ); } else { - TY_(ReportNotice)(doc, element, node, NON_MATCHING_ENDTAG); + TY_(Report)(doc, element, node, NON_MATCHING_ENDTAG); TY_(FreeNode)( doc, node); } @@ -1942,7 +1942,7 @@ void TY_(ParseInline)( TidyDocImpl* doc, Node *element, GetTokenMode mode ) } /* if parent is then discard unexpected inline end tag */ - TY_(ReportNotice)(doc, element, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, element, node, DISCARDING_UNEXPECTED); TY_(FreeNode)( doc, node); continue; } /* special case etc. for stuff moved in front of table */ @@ -1965,12 +1965,12 @@ void TY_(ParseInline)( TidyDocImpl* doc, Node *element, GetTokenMode mode ) if ( node->tag == element->tag ) { - TY_(ReportNotice)(doc, element, node, NON_MATCHING_ENDTAG ); + TY_(Report)(doc, element, node, NON_MATCHING_ENDTAG ); TY_(FreeNode)( doc, node); } else { - TY_(ReportNotice)(doc, element, node, MISSING_ENDTAG_BEFORE ); + TY_(Report)(doc, element, node, MISSING_ENDTAG_BEFORE ); TY_(UngetToken)( doc ); } @@ -2001,14 +2001,14 @@ void TY_(ParseInline)( TidyDocImpl* doc, Node *element, GetTokenMode mode ) && cfgBool(doc, TidyCoerceEndTags) ) { node->type = EndTag; - TY_(ReportNotice)(doc, element, node, COERCE_TO_ENDTAG); + TY_(Report)(doc, element, node, COERCE_TO_ENDTAG); /* TY_(PopInline)( doc, node ); */ TY_(UngetToken)( doc ); continue; } TY_(UngetToken)( doc ); - TY_(ReportNotice)(doc, element, node, MISSING_ENDTAG_BEFORE); + TY_(Report)(doc, element, node, MISSING_ENDTAG_BEFORE); /* TY_(PopInline)( doc, element ); */ if (!(mode & Preformatted)) @@ -2027,12 +2027,12 @@ void TY_(ParseInline)( TidyDocImpl* doc, Node *element, GetTokenMode mode ) { if (!TY_(nodeIsElement)(node)) { - TY_(ReportNotice)(doc, element, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, element, node, DISCARDING_UNEXPECTED); TY_(FreeNode)( doc, node); continue; } - TY_(ReportNotice)(doc, element, node, TAG_NOT_ALLOWED_IN); + TY_(Report)(doc, element, node, TAG_NOT_ALLOWED_IN); /* insert center as parent if heading is empty */ if (element->content == NULL) @@ -2056,12 +2056,12 @@ void TY_(ParseInline)( TidyDocImpl* doc, Node *element, GetTokenMode mode ) { if ( !TY_(nodeIsElement)(node) ) { - TY_(ReportNotice)(doc, element, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, element, node, DISCARDING_UNEXPECTED); TY_(FreeNode)( doc, node); continue; } - TY_(ReportNotice)(doc, element, node, TAG_NOT_ALLOWED_IN); + TY_(Report)(doc, element, node, TAG_NOT_ALLOWED_IN); /* insert hr before heading if heading is empty */ if (element->content == NULL) @@ -2089,12 +2089,12 @@ void TY_(ParseInline)( TidyDocImpl* doc, Node *element, GetTokenMode mode ) Node *dd; if ( !TY_(nodeIsElement)(node) ) { - TY_(ReportNotice)(doc, element, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, element, node, DISCARDING_UNEXPECTED); TY_(FreeNode)( doc, node); continue; } - TY_(ReportNotice)(doc, element, node, TAG_NOT_ALLOWED_IN); + TY_(Report)(doc, element, node, TAG_NOT_ALLOWED_IN); dd = TY_(InferredTag)(doc, TidyTag_DD); /* insert hr within dd before dt if dt is empty */ @@ -2131,7 +2131,7 @@ void TY_(ParseInline)( TidyDocImpl* doc, Node *element, GetTokenMode mode ) if (node->tag == parent->tag) { if (!(element->tag->model & CM_OPT) && !element->implicit) - TY_(ReportNotice)(doc, element, node, MISSING_ENDTAG_BEFORE); + TY_(Report)(doc, element, node, MISSING_ENDTAG_BEFORE); if( TY_(IsPushedLast)( doc, element, node ) ) TY_(PopInline)( doc, element ); @@ -2163,7 +2163,7 @@ void TY_(ParseInline)( TidyDocImpl* doc, Node *element, GetTokenMode mode ) { if ( !TY_(nodeIsElement)(node) ) { - TY_(ReportNotice)(doc, element, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, element, node, DISCARDING_UNEXPECTED); TY_(FreeNode)( doc, node); continue; } @@ -2172,7 +2172,7 @@ void TY_(ParseInline)( TidyDocImpl* doc, Node *element, GetTokenMode mode ) TY_(ConstrainVersion)( doc, ~VERS_HTML5 ); } else if (!(element->tag->model & CM_OPT)) - TY_(ReportNotice)(doc, element, node, MISSING_ENDTAG_BEFORE); + TY_(Report)(doc, element, node, MISSING_ENDTAG_BEFORE); if (node->tag->model & CM_HEAD && !(node->tag->model & CM_BLOCK)) { @@ -2216,7 +2216,7 @@ void TY_(ParseInline)( TidyDocImpl* doc, Node *element, GetTokenMode mode ) if (TY_(nodeIsElement)(node)) { if (node->implicit) - TY_(ReportNotice)(doc, element, node, INSERTING_TAG); + TY_(Report)(doc, element, node, INSERTING_TAG); /* trim white space before
*/ if ( nodeIsBR(node) ) @@ -2228,13 +2228,13 @@ void TY_(ParseInline)( TidyDocImpl* doc, Node *element, GetTokenMode mode ) } /* discard unexpected tags */ - TY_(ReportNotice)(doc, element, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, element, node, DISCARDING_UNEXPECTED); TY_(FreeNode)( doc, node ); continue; } if (!(element->tag->model & CM_OPT)) - TY_(ReportNotice)(doc, element, node, MISSING_ENDTAG_FOR); + TY_(Report)(doc, element, node, MISSING_ENDTAG_FOR); #if !defined(NDEBUG) && defined(_MSC_VER) in_parse_inline--; @@ -2252,7 +2252,7 @@ void TY_(ParseEmpty)(TidyDocImpl* doc, Node *element, GetTokenMode mode) { if ( !(node->type == EndTag && node->tag == element->tag) ) { - /* TY_(ReportNotice)(doc, element, node, ELEMENT_NOT_EMPTY); */ + /* TY_(Report)(doc, element, node, ELEMENT_NOT_EMPTY); */ TY_(UngetToken)( doc ); } else @@ -2290,12 +2290,12 @@ void TY_(ParseDefList)(TidyDocImpl* doc, Node *list, GetTokenMode mode) { TY_(UngetToken)( doc ); node = TY_(InferredTag)(doc, TidyTag_DT); - TY_(ReportNotice)(doc, list, node, MISSING_STARTTAG); + TY_(Report)(doc, list, node, MISSING_STARTTAG); } if (node->tag == NULL) { - TY_(ReportNotice)(doc, list, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, list, node, DISCARDING_UNEXPECTED); TY_(FreeNode)( doc, node); continue; } @@ -2310,7 +2310,7 @@ void TY_(ParseDefList)(TidyDocImpl* doc, Node *list, GetTokenMode mode) if ( nodeIsFORM(node) ) { BadForm( doc ); - TY_(ReportNotice)(doc, list, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, list, node, DISCARDING_UNEXPECTED); TY_(FreeNode)( doc, node ); continue; } @@ -2328,7 +2328,7 @@ void TY_(ParseDefList)(TidyDocImpl* doc, Node *list, GetTokenMode mode) } if (node->tag == parent->tag) { - TY_(ReportNotice)(doc, list, node, MISSING_ENDTAG_BEFORE); + TY_(Report)(doc, list, node, MISSING_ENDTAG_BEFORE); TY_(UngetToken)( doc ); return; @@ -2336,7 +2336,7 @@ void TY_(ParseDefList)(TidyDocImpl* doc, Node *list, GetTokenMode mode) } if (discardIt) { - TY_(ReportNotice)(doc, list, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, list, node, DISCARDING_UNEXPECTED); TY_(FreeNode)( doc, node); continue; } @@ -2389,7 +2389,7 @@ void TY_(ParseDefList)(TidyDocImpl* doc, Node *list, GetTokenMode mode) if (!(node->tag->model & (CM_BLOCK | CM_INLINE))) { - TY_(ReportNotice)(doc, list, node, TAG_NOT_ALLOWED_IN); + TY_(Report)(doc, list, node, TAG_NOT_ALLOWED_IN); return; } @@ -2398,12 +2398,12 @@ void TY_(ParseDefList)(TidyDocImpl* doc, Node *list, GetTokenMode mode) return; node = TY_(InferredTag)(doc, TidyTag_DD); - TY_(ReportNotice)(doc, list, node, MISSING_STARTTAG); + TY_(Report)(doc, list, node, MISSING_STARTTAG); } if (node->type == EndTag) { - TY_(ReportNotice)(doc, list, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, list, node, DISCARDING_UNEXPECTED); TY_(FreeNode)( doc, node); continue; } @@ -2413,7 +2413,7 @@ void TY_(ParseDefList)(TidyDocImpl* doc, Node *list, GetTokenMode mode) ParseTag( doc, node, IgnoreWhitespace); } - TY_(ReportNotice)(doc, list, node, MISSING_ENDTAG_FOR); + TY_(Report)(doc, list, node, MISSING_ENDTAG_FOR); } static Bool FindLastLI( Node *list, Node **lastli ) @@ -2471,7 +2471,7 @@ void TY_(ParseList)(TidyDocImpl* doc, Node *list, GetTokenMode ARG_UNUSED(mode)) if (node->type != TextNode && node->tag == NULL) { - TY_(ReportNotice)(doc, list, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, list, node, DISCARDING_UNEXPECTED); TY_(FreeNode)( doc, node); continue; } @@ -2500,14 +2500,14 @@ void TY_(ParseList)(TidyDocImpl* doc, Node *list, GetTokenMode ARG_UNUSED(mode)) if ( nodeIsFORM(node) ) { BadForm( doc ); - TY_(ReportNotice)(doc, list, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, list, node, DISCARDING_UNEXPECTED); TY_(FreeNode)( doc, node ); continue; } if (TY_(nodeHasCM)(node,CM_INLINE)) { - TY_(ReportNotice)(doc, list, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, list, node, DISCARDING_UNEXPECTED); TY_(PopInline)( doc, node ); TY_(FreeNode)( doc, node); continue; @@ -2523,7 +2523,7 @@ void TY_(ParseList)(TidyDocImpl* doc, Node *list, GetTokenMode ARG_UNUSED(mode)) break; if (node->tag == parent->tag) { - TY_(ReportNotice)(doc, list, node, MISSING_ENDTAG_BEFORE); + TY_(Report)(doc, list, node, MISSING_ENDTAG_BEFORE); TY_(UngetToken)( doc ); #if !defined(NDEBUG) && defined(_MSC_VER) in_parse_list--; @@ -2533,7 +2533,7 @@ void TY_(ParseList)(TidyDocImpl* doc, Node *list, GetTokenMode ARG_UNUSED(mode)) } } - TY_(ReportNotice)(doc, list, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, list, node, DISCARDING_UNEXPECTED); TY_(FreeNode)( doc, node); continue; } @@ -2557,7 +2557,7 @@ void TY_(ParseList)(TidyDocImpl* doc, Node *list, GetTokenMode ARG_UNUSED(mode)) if (TY_(nodeHasCM)(node,CM_BLOCK) && lexer->excludeBlocks) { - TY_(ReportNotice)(doc, list, node, MISSING_ENDTAG_BEFORE); + TY_(Report)(doc, list, node, MISSING_ENDTAG_BEFORE); #if !defined(NDEBUG) && defined(_MSC_VER) in_parse_list--; SPRTF("Exit ParseList 4 %d... No End Tag\n",in_parse_list); @@ -2584,7 +2584,7 @@ void TY_(ParseList)(TidyDocImpl* doc, Node *list, GetTokenMode ARG_UNUSED(mode)) { /* Create a node for error reporting */ node = TY_(InferredTag)(doc, TidyTag_LI); - TY_(ReportNotice)(doc, list, node, MISSING_STARTTAG ); + TY_(Report)(doc, list, node, MISSING_STARTTAG ); TY_(FreeNode)( doc, node); node = lastli; } @@ -2600,7 +2600,7 @@ void TY_(ParseList)(TidyDocImpl* doc, Node *list, GetTokenMode ARG_UNUSED(mode)) ? "list-style: none; display: inline" : "list-style: none" ); - TY_(ReportNotice)(doc, list, node, MISSING_STARTTAG ); + TY_(Report)(doc, list, node, MISSING_STARTTAG ); TY_(InsertNodeAtEnd)(list,node); } } @@ -2608,7 +2608,7 @@ void TY_(ParseList)(TidyDocImpl* doc, Node *list, GetTokenMode ARG_UNUSED(mode)) ParseTag( doc, node, IgnoreWhitespace); } - TY_(ReportNotice)(doc, list, node, MISSING_ENDTAG_FOR); + TY_(Report)(doc, list, node, MISSING_ENDTAG_FOR); #if !defined(NDEBUG) && defined(_MSC_VER) in_parse_list--; SPRTF("Exit ParseList 6 %d... missing end tag\n",in_parse_list); @@ -2651,7 +2651,7 @@ static void FixEmptyRow(TidyDocImpl* doc, Node *row) { cell = TY_(InferredTag)(doc, TidyTag_TD); TY_(InsertNodeAtEnd)(row, cell); - TY_(ReportNotice)(doc, row, cell, MISSING_STARTTAG); + TY_(Report)(doc, row, cell, MISSING_STARTTAG); } } @@ -2700,14 +2700,14 @@ void TY_(ParseRow)(TidyDocImpl* doc, Node *row, GetTokenMode ARG_UNUSED(mode)) if ( nodeIsFORM(node) ) BadForm( doc ); - TY_(ReportNotice)(doc, row, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, row, node, DISCARDING_UNEXPECTED); TY_(FreeNode)( doc, node); continue; } if ( nodeIsTD(node) || nodeIsTH(node) ) { - TY_(ReportNotice)(doc, row, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, row, node, DISCARDING_UNEXPECTED); TY_(FreeNode)( doc, node); continue; } @@ -2720,7 +2720,7 @@ void TY_(ParseRow)(TidyDocImpl* doc, Node *row, GetTokenMode ARG_UNUSED(mode)) /* discard unknown tags */ if (node->tag == NULL && node->type != TextNode) { - TY_(ReportNotice)(doc, row, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, row, node, DISCARDING_UNEXPECTED); TY_(FreeNode)( doc, node); continue; } @@ -2728,7 +2728,7 @@ void TY_(ParseRow)(TidyDocImpl* doc, Node *row, GetTokenMode ARG_UNUSED(mode)) /* discard unexpected element */ if ( nodeIsTABLE(node) ) { - TY_(ReportNotice)(doc, row, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, row, node, DISCARDING_UNEXPECTED); TY_(FreeNode)( doc, node); continue; } @@ -2742,7 +2742,7 @@ void TY_(ParseRow)(TidyDocImpl* doc, Node *row, GetTokenMode ARG_UNUSED(mode)) if (node->type == EndTag) { - TY_(ReportNotice)(doc, row, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, row, node, DISCARDING_UNEXPECTED); TY_(FreeNode)( doc, node); continue; } @@ -2758,13 +2758,13 @@ void TY_(ParseRow)(TidyDocImpl* doc, Node *row, GetTokenMode ARG_UNUSED(mode)) { TY_(UngetToken)( doc ); node = TY_(InferredTag)(doc, TidyTag_TD); - TY_(ReportNotice)(doc, row, node, MISSING_STARTTAG); + TY_(Report)(doc, row, node, MISSING_STARTTAG); } else if ( TY_(nodeIsText)(node) || TY_(nodeHasCM)(node, CM_BLOCK | CM_INLINE) ) { MoveBeforeTable( doc, row, node ); - TY_(ReportNotice)(doc, row, node, TAG_NOT_ALLOWED_IN); + TY_(Report)(doc, row, node, TAG_NOT_ALLOWED_IN); lexer->exiled = yes; exclude_state = lexer->excludeBlocks; lexer->excludeBlocks = no; @@ -2778,7 +2778,7 @@ void TY_(ParseRow)(TidyDocImpl* doc, Node *row, GetTokenMode ARG_UNUSED(mode)) } else if (node->tag->model & CM_HEAD) { - TY_(ReportNotice)(doc, row, node, TAG_NOT_ALLOWED_IN); + TY_(Report)(doc, row, node, TAG_NOT_ALLOWED_IN); MoveToHead( doc, row, node); continue; } @@ -2786,7 +2786,7 @@ void TY_(ParseRow)(TidyDocImpl* doc, Node *row, GetTokenMode ARG_UNUSED(mode)) if ( !(nodeIsTD(node) || nodeIsTH(node)) ) { - TY_(ReportNotice)(doc, row, node, TAG_NOT_ALLOWED_IN); + TY_(Report)(doc, row, node, TAG_NOT_ALLOWED_IN); TY_(FreeNode)( doc, node); continue; } @@ -2843,7 +2843,7 @@ void TY_(ParseRowGroup)(TidyDocImpl* doc, Node *rowgroup, GetTokenMode ARG_UNUSE /* discard unknown tags */ if (node->tag == NULL && node->type != TextNode) { - TY_(ReportNotice)(doc, rowgroup, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, rowgroup, node, DISCARDING_UNEXPECTED); TY_(FreeNode)( doc, node); continue; } @@ -2860,13 +2860,13 @@ void TY_(ParseRowGroup)(TidyDocImpl* doc, Node *rowgroup, GetTokenMode ARG_UNUSE { TY_(UngetToken)( doc ); node = TY_(InferredTag)(doc, TidyTag_TR); - TY_(ReportNotice)(doc, rowgroup, node, MISSING_STARTTAG); + TY_(Report)(doc, rowgroup, node, MISSING_STARTTAG); } else if ( TY_(nodeIsText)(node) || TY_(nodeHasCM)(node, CM_BLOCK|CM_INLINE) ) { MoveBeforeTable( doc, rowgroup, node ); - TY_(ReportNotice)(doc, rowgroup, node, TAG_NOT_ALLOWED_IN); + TY_(Report)(doc, rowgroup, node, TAG_NOT_ALLOWED_IN); lexer->exiled = yes; if (node->type != TextNode) @@ -2877,7 +2877,7 @@ void TY_(ParseRowGroup)(TidyDocImpl* doc, Node *rowgroup, GetTokenMode ARG_UNUSE } else if (node->tag->model & CM_HEAD) { - TY_(ReportNotice)(doc, rowgroup, node, TAG_NOT_ALLOWED_IN); + TY_(Report)(doc, rowgroup, node, TAG_NOT_ALLOWED_IN); MoveToHead(doc, rowgroup, node); continue; } @@ -2894,14 +2894,14 @@ void TY_(ParseRowGroup)(TidyDocImpl* doc, Node *rowgroup, GetTokenMode ARG_UNUSE if ( nodeIsFORM(node) ) BadForm( doc ); - TY_(ReportNotice)(doc, rowgroup, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, rowgroup, node, DISCARDING_UNEXPECTED); TY_(FreeNode)( doc, node); continue; } if ( nodeIsTR(node) || nodeIsTD(node) || nodeIsTH(node) ) { - TY_(ReportNotice)(doc, rowgroup, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, rowgroup, node, DISCARDING_UNEXPECTED); TY_(FreeNode)( doc, node); continue; } @@ -2933,7 +2933,7 @@ void TY_(ParseRowGroup)(TidyDocImpl* doc, Node *rowgroup, GetTokenMode ARG_UNUSE if (node->type == EndTag) { - TY_(ReportNotice)(doc, rowgroup, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, rowgroup, node, DISCARDING_UNEXPECTED); TY_(FreeNode)( doc, node); continue; } @@ -2941,7 +2941,7 @@ void TY_(ParseRowGroup)(TidyDocImpl* doc, Node *rowgroup, GetTokenMode ARG_UNUSE if ( !nodeIsTR(node) ) { node = TY_(InferredTag)(doc, TidyTag_TR); - TY_(ReportNotice)(doc, rowgroup, node, MISSING_STARTTAG); + TY_(Report)(doc, rowgroup, node, MISSING_STARTTAG); TY_(UngetToken)( doc ); } @@ -2977,7 +2977,7 @@ void TY_(ParseColGroup)(TidyDocImpl* doc, Node *colgroup, GetTokenMode ARG_UNUSE if ( nodeIsFORM(node) ) { BadForm( doc ); - TY_(ReportNotice)(doc, colgroup, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, colgroup, node, DISCARDING_UNEXPECTED); TY_(FreeNode)( doc, node); continue; } @@ -3007,7 +3007,7 @@ void TY_(ParseColGroup)(TidyDocImpl* doc, Node *colgroup, GetTokenMode ARG_UNUSE /* discard unknown tags */ if (node->tag == NULL) { - TY_(ReportNotice)(doc, colgroup, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, colgroup, node, DISCARDING_UNEXPECTED); TY_(FreeNode)( doc, node); continue; } @@ -3020,7 +3020,7 @@ void TY_(ParseColGroup)(TidyDocImpl* doc, Node *colgroup, GetTokenMode ARG_UNUSE if (node->type == EndTag) { - TY_(ReportNotice)(doc, colgroup, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, colgroup, node, DISCARDING_UNEXPECTED); TY_(FreeNode)( doc, node); continue; } @@ -3064,7 +3064,7 @@ void TY_(ParseTableTag)(TidyDocImpl* doc, Node *table, GetTokenMode ARG_UNUSED(m * this second
*/ TY_(UngetToken)(doc); - TY_(ReportNotice)(doc, table, node, TAG_NOT_ALLOWED_IN); + TY_(Report)(doc, table, node, TAG_NOT_ALLOWED_IN); } lexer->istackbase = istackbase; table->closed = yes; @@ -3082,7 +3082,7 @@ void TY_(ParseTableTag)(TidyDocImpl* doc, Node *table, GetTokenMode ARG_UNUSED(m /* discard unknown tags */ if (node->tag == NULL && node->type != TextNode) { - TY_(ReportNotice)(doc, table, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, table, node, DISCARDING_UNEXPECTED); TY_(FreeNode)( doc, node); continue; } @@ -3095,12 +3095,12 @@ void TY_(ParseTableTag)(TidyDocImpl* doc, Node *table, GetTokenMode ARG_UNUSED(m { TY_(UngetToken)( doc ); node = TY_(InferredTag)(doc, TidyTag_TR); - TY_(ReportNotice)(doc, table, node, MISSING_STARTTAG); + TY_(Report)(doc, table, node, MISSING_STARTTAG); } else if ( TY_(nodeIsText)(node) ||TY_(nodeHasCM)(node,CM_BLOCK|CM_INLINE) ) { TY_(InsertNodeBeforeElement)(table, node); - TY_(ReportNotice)(doc, table, node, TAG_NOT_ALLOWED_IN); + TY_(Report)(doc, table, node, TAG_NOT_ALLOWED_IN); lexer->exiled = yes; if (node->type != TextNode) @@ -3125,7 +3125,7 @@ void TY_(ParseTableTag)(TidyDocImpl* doc, Node *table, GetTokenMode ARG_UNUSED(m if ( nodeIsFORM(node) ) { BadForm( doc ); - TY_(ReportNotice)(doc, table, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, table, node, DISCARDING_UNEXPECTED); TY_(FreeNode)( doc, node); continue; } @@ -3134,7 +3134,7 @@ void TY_(ParseTableTag)(TidyDocImpl* doc, Node *table, GetTokenMode ARG_UNUSED(m if ( TY_(nodeHasCM)(node, CM_TABLE|CM_ROW) || TY_(nodeHasCM)(node, CM_BLOCK|CM_INLINE) ) { - TY_(ReportNotice)(doc, table, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, table, node, DISCARDING_UNEXPECTED); TY_(FreeNode)( doc, node); continue; } @@ -3145,7 +3145,7 @@ void TY_(ParseTableTag)(TidyDocImpl* doc, Node *table, GetTokenMode ARG_UNUSED(m { if (node->tag == parent->tag) { - TY_(ReportNotice)(doc, table, node, MISSING_ENDTAG_BEFORE ); + TY_(Report)(doc, table, node, MISSING_ENDTAG_BEFORE ); TY_(UngetToken)( doc ); lexer->istackbase = istackbase; #if !defined(NDEBUG) && defined(_MSC_VER) @@ -3160,7 +3160,7 @@ void TY_(ParseTableTag)(TidyDocImpl* doc, Node *table, GetTokenMode ARG_UNUSED(m if (!(node->tag->model & CM_TABLE)) { TY_(UngetToken)( doc ); - TY_(ReportNotice)(doc, table, node, TAG_NOT_ALLOWED_IN); + TY_(Report)(doc, table, node, TAG_NOT_ALLOWED_IN); lexer->istackbase = istackbase; #if !defined(NDEBUG) && defined(_MSC_VER) in_parse_table--; @@ -3177,11 +3177,11 @@ void TY_(ParseTableTag)(TidyDocImpl* doc, Node *table, GetTokenMode ARG_UNUSED(m } /* discard unexpected text nodes and end tags */ - TY_(ReportNotice)(doc, table, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, table, node, DISCARDING_UNEXPECTED); TY_(FreeNode)( doc, node); } - TY_(ReportNotice)(doc, table, node, MISSING_ENDTAG_FOR); + TY_(Report)(doc, table, node, MISSING_ENDTAG_FOR); lexer->istackbase = istackbase; #if !defined(NDEBUG) && defined(_MSC_VER) in_parse_table--; @@ -3220,7 +3220,7 @@ void TY_(ParsePre)( TidyDocImpl* doc, Node *pre, GetTokenMode ARG_UNUSED(mode) ) { if (nodeIsBODY(node) || nodeIsHTML(node)) { - TY_(ReportNotice)(doc, pre, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, pre, node, DISCARDING_UNEXPECTED); TY_(FreeNode)(doc, node); continue; } @@ -3230,7 +3230,7 @@ void TY_(ParsePre)( TidyDocImpl* doc, Node *pre, GetTokenMode ARG_UNUSED(mode) ) } else { - TY_(ReportNotice)(doc, pre, node, MISSING_ENDTAG_BEFORE ); + TY_(Report)(doc, pre, node, MISSING_ENDTAG_BEFORE ); TY_(UngetToken)( doc ); } pre->closed = yes; @@ -3250,7 +3250,7 @@ void TY_(ParsePre)( TidyDocImpl* doc, Node *pre, GetTokenMode ARG_UNUSED(mode) ) if (node->tag == NULL) { - TY_(ReportNotice)(doc, pre, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, pre, node, DISCARDING_UNEXPECTED); TY_(FreeNode)(doc, node); continue; } @@ -3272,7 +3272,7 @@ void TY_(ParsePre)( TidyDocImpl* doc, Node *pre, GetTokenMode ARG_UNUSED(mode) ) return; } - TY_(ReportNotice)(doc, pre, node, DISCARDING_UNEXPECTED); + TY_(Report)(doc, pre, node, DISCARDING_UNEXPECTED); TY_(FreeNode)(doc, node); continue; } @@ -3282,7 +3282,7 @@ void TY_(ParsePre)( TidyDocImpl* doc, Node *pre, GetTokenMode ARG_UNUSED(mode) ) { if (!doc->lexer->exiled) /* No missing close warning if exiled. */ - TY_(ReportNotice)(doc, pre, node, MISSING_ENDTAG_BEFORE); + TY_(Report)(doc, pre, node, MISSING_ENDTAG_BEFORE); TY_(UngetToken)(doc); return; @@ -3326,11 +3326,11 @@ void TY_(ParsePre)( TidyDocImpl* doc, Node *pre, GetTokenMode ARG_UNUSED(mode) ) Todo: discarding

is abviously a bug, it should be replaced by
. */ TY_(InsertNodeAfterElement)(pre, node); - TY_(ReportNotice)(doc, pre, node, MISSING_ENDTAG_BEFORE); + TY_(Report)(doc, pre, node, MISSING_ENDTAG_BEFORE); ParseTag(doc, node, IgnoreWhitespace); newnode = TY_(InferredTag)(doc, TidyTag_PRE); - TY_(ReportNotice)(doc, pre, newnode, INSERTING_TAG); + TY_(Report)(doc, pre, newnode, INSERTING_TAG); pre = newnode; TY_(InsertNodeAfterElement)(node, pre); @@ -3341,7 +3341,7 @@ void TY_(ParsePre)( TidyDocImpl* doc, Node *pre, GetTokenMode ARG_UNUSED(mode) ) { if (node->type == StartTag) { - TY_(ReportNotice)(doc, pre, node, USING_BR_INPLACE_OF); + TY_(Report)(doc, pre, node, USING_BR_INPLACE_OF); /* trim white space before

in

*/
                 TrimSpaces(doc, pre);
@@ -3353,7 +3353,7 @@ void TY_(ParsePre)( TidyDocImpl* doc, Node *pre, GetTokenMode ARG_UNUSED(mode) )
             }
             else
             {
-                TY_(ReportNotice)(doc, pre, node, DISCARDING_UNEXPECTED);
+                TY_(Report)(doc, pre, node, DISCARDING_UNEXPECTED);
                 TY_(FreeNode)( doc, node);
             }
             continue;
@@ -3371,11 +3371,11 @@ void TY_(ParsePre)( TidyDocImpl* doc, Node *pre, GetTokenMode ARG_UNUSED(mode) )
         }
 
         /* discard unexpected tags */
-        TY_(ReportNotice)(doc, pre, node, DISCARDING_UNEXPECTED);
+        TY_(Report)(doc, pre, node, DISCARDING_UNEXPECTED);
         TY_(FreeNode)( doc, node);
     }
 
-    TY_(ReportNotice)(doc, pre, node, MISSING_ENDTAG_FOR);
+    TY_(Report)(doc, pre, node, MISSING_ENDTAG_FOR);
 }
 
 void TY_(ParseOptGroup)(TidyDocImpl* doc, Node *field, GetTokenMode ARG_UNUSED(mode))
@@ -3403,7 +3403,7 @@ void TY_(ParseOptGroup)(TidyDocImpl* doc, Node *field, GetTokenMode ARG_UNUSED(m
              (nodeIsOPTION(node) || nodeIsOPTGROUP(node)) )
         {
             if ( nodeIsOPTGROUP(node) )
-                TY_(ReportNotice)(doc, field, node, CANT_BE_NESTED);
+                TY_(Report)(doc, field, node, CANT_BE_NESTED);
 
             TY_(InsertNodeAtEnd)(field, node);
             ParseTag(doc, node, MixedContent);
@@ -3411,7 +3411,7 @@ void TY_(ParseOptGroup)(TidyDocImpl* doc, Node *field, GetTokenMode ARG_UNUSED(m
         }
 
         /* discard unexpected tags */
-        TY_(ReportNotice)(doc, field, node, DISCARDING_UNEXPECTED );
+        TY_(Report)(doc, field, node, DISCARDING_UNEXPECTED );
         TY_(FreeNode)( doc, node);
     }
 }
@@ -3462,11 +3462,11 @@ void TY_(ParseSelect)(TidyDocImpl* doc, Node *field, GetTokenMode ARG_UNUSED(mod
         }
 
         /* discard unexpected tags */
-        TY_(ReportNotice)(doc, field, node, DISCARDING_UNEXPECTED);
+        TY_(Report)(doc, field, node, DISCARDING_UNEXPECTED);
         TY_(FreeNode)( doc, node);
     }
 
-    TY_(ReportNotice)(doc, field, node, MISSING_ENDTAG_FOR);
+    TY_(Report)(doc, field, node, MISSING_ENDTAG_FOR);
 #if !defined(NDEBUG) && defined(_MSC_VER)
     in_parse_select--;
     SPRTF("Exit ParseSelect 2 %d...\n",in_parse_select);
@@ -3519,11 +3519,11 @@ void TY_(ParseDatalist)(TidyDocImpl* doc, Node *field, GetTokenMode ARG_UNUSED(m
         }
 
         /* discard unexpected tags */
-        TY_(ReportNotice)(doc, field, node, DISCARDING_UNEXPECTED);
+        TY_(Report)(doc, field, node, DISCARDING_UNEXPECTED);
         TY_(FreeNode)( doc, node);
     }
 
-    TY_(ReportNotice)(doc, field, node, MISSING_ENDTAG_FOR);
+    TY_(Report)(doc, field, node, MISSING_ENDTAG_FOR);
 #if !defined(NDEBUG) && defined(_MSC_VER)
     in_parse_datalist--;
     SPRTF("Exit ParseDatalist 2 %d...\n",in_parse_datalist);
@@ -3582,14 +3582,14 @@ void TY_(ParseText)(TidyDocImpl* doc, Node *field, GetTokenMode mode)
             && node->tag->model & CM_INLINE
             && !(node->tag->model & CM_FIELD)) /* #487283 - fix by Lee Passey 25 Jan 02 */
         {
-            TY_(ReportNotice)(doc, field, node, DISCARDING_UNEXPECTED);
+            TY_(Report)(doc, field, node, DISCARDING_UNEXPECTED);
             TY_(FreeNode)( doc, node);
             continue;
         }
 
         /* terminate element on other tags */
         if (!(field->tag->model & CM_OPT))
-            TY_(ReportNotice)(doc, field, node, MISSING_ENDTAG_BEFORE);
+            TY_(Report)(doc, field, node, MISSING_ENDTAG_BEFORE);
 
         TY_(UngetToken)( doc );
         TrimSpaces(doc, field);
@@ -3597,7 +3597,7 @@ void TY_(ParseText)(TidyDocImpl* doc, Node *field, GetTokenMode mode)
     }
 
     if (!(field->tag->model & CM_OPT))
-        TY_(ReportNotice)(doc, field, node, MISSING_ENDTAG_FOR);
+        TY_(Report)(doc, field, node, MISSING_ENDTAG_FOR);
 }
 
 
@@ -3609,7 +3609,7 @@ void TY_(ParseTitle)(TidyDocImpl* doc, Node *title, GetTokenMode ARG_UNUSED(mode
         if (node->tag == title->tag && node->type == StartTag
             && cfgBool(doc, TidyCoerceEndTags) )
         {
-            TY_(ReportNotice)(doc, title, node, COERCE_TO_ENDTAG);
+            TY_(Report)(doc, title, node, COERCE_TO_ENDTAG);
             node->type = EndTag;
             TY_(UngetToken)( doc );
             continue;
@@ -3645,19 +3645,19 @@ void TY_(ParseTitle)(TidyDocImpl* doc, Node *title, GetTokenMode ARG_UNUSED(mode
         /* discard unknown tags */
         if (node->tag == NULL)
         {
-            TY_(ReportNotice)(doc, title, node, DISCARDING_UNEXPECTED);
+            TY_(Report)(doc, title, node, DISCARDING_UNEXPECTED);
             TY_(FreeNode)( doc, node);
             continue;
         }
 
         /* pushback unexpected tokens */
-        TY_(ReportNotice)(doc, title, node, MISSING_ENDTAG_BEFORE);
+        TY_(Report)(doc, title, node, MISSING_ENDTAG_BEFORE);
         TY_(UngetToken)( doc );
         TrimSpaces(doc, title);
         return;
     }
 
-    TY_(ReportNotice)(doc, title, node, MISSING_ENDTAG_FOR);
+    TY_(Report)(doc, title, node, MISSING_ENDTAG_FOR);
 }
 
 /*
@@ -3682,7 +3682,7 @@ void TY_(ParseScript)(TidyDocImpl* doc, Node *script, GetTokenMode ARG_UNUSED(mo
     else
     {
         /* handle e.g. a document like "