fixed to not send NULL to %s printing cleaning up some of the regression

* HTMLparser.c: fixed to not send NULL to %s printing
* python/tests/error.py result/HTML/doc3.htm.err
  result/HTML/test3.html.err result/HTML/wired.html.err
  result/valid/t8.xml.err result/valid/t8a.xml.err: cleaning
  up some of the regression tests error
Daniel
diff --git a/ChangeLog b/ChangeLog
index ff6811e..8128534 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Sun Oct 19 16:24:19 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+	* HTMLparser.c: fixed to not send NULL to %s printing
+	* python/tests/error.py result/HTML/doc3.htm.err
+	  result/HTML/test3.html.err result/HTML/wired.html.err
+	  result/valid/t8.xml.err result/valid/t8a.xml.err: cleaning
+	  up some of the regression tests error
+
 Sun Oct 19 15:31:43 CEST 2003 Daniel Veillard <daniel@veillard.com>
 
 	* include/libxml/nanohttp.h include/libxml/parserInternals.h 
diff --git a/HTMLparser.c b/HTMLparser.c
index 881821a..ba12ecc 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -1132,7 +1132,7 @@
         if ((info != NULL) && (info->endTag == 3)) {
             htmlParseErr(ctxt, XML_ERR_TAG_NAME_MISMATCH,
 	                 "Opening and ending tag mismatch: %s and %s\n",
-			 NULL, NULL);
+			 newtag, ctxt->name);
         }
         if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL))
             ctxt->sax->endElement(ctxt->userData, ctxt->name);
diff --git a/python/tests/error.py b/python/tests/error.py
index cc771de..150f379 100755
--- a/python/tests/error.py
+++ b/python/tests/error.py
@@ -9,7 +9,7 @@
 # Memory debug specific
 libxml2.debugMemory(1)
 
-expect='--> warning: --> failed to load external entity "missing.xml"\n'
+expect='--> I/O --> warning : --> failed to load external entity "missing.xml"\n'
 err=""
 def callback(ctx, str):
      global err
diff --git a/result/HTML/doc3.htm.err b/result/HTML/doc3.htm.err
index 1edc25b..ef71f43 100644
--- a/result/HTML/doc3.htm.err
+++ b/result/HTML/doc3.htm.err
@@ -46,8 +46,8 @@
 ./test/HTML/doc3.htm:820: HTML parser error : Unexpected end tag : noscript
             </A></A></B><B></NOSCRIPT></B><B><!-- END GoTo.com Search Box --></B
                                       ^
-ID submit already defined
-./test/HTML/doc3.htm:826: HTML parser error : Opening and ending tag mismatch: (null) and (null)
+./test/HTML/doc3.htm:0: element input: validity error : ID submit already defined
+./test/HTML/doc3.htm:826: HTML parser error : Opening and ending tag mismatch: form and center
             </FORM><!-- Pricewatch Search Box --><A 
                    ^
 ./test/HTML/doc3.htm:833: HTML parser error : Unexpected end tag : p
diff --git a/result/HTML/test3.html.err b/result/HTML/test3.html.err
index d967d1f..c743503 100644
--- a/result/HTML/test3.html.err
+++ b/result/HTML/test3.html.err
@@ -4,7 +4,7 @@
 ./test/HTML/test3.html:13: HTML parser error : Unexpected end tag : p
 <p><hr></p>
            ^
-./test/HTML/test3.html:27: HTML parser error : Opening and ending tag mismatch: (null) and (null)
+./test/HTML/test3.html:27: HTML parser error : Opening and ending tag mismatch: h4 and b
 <h4><b>Links</h4></b>
                  ^
 ./test/HTML/test3.html:27: HTML parser error : Unexpected end tag : b
diff --git a/result/HTML/wired.html.err b/result/HTML/wired.html.err
index 7377931..70db11b 100644
--- a/result/HTML/wired.html.err
+++ b/result/HTML/wired.html.err
@@ -190,19 +190,19 @@
 ./test/HTML/wired.html:265: HTML parser error : Unexpected end tag : form
         </tr>  </form>
                       ^
-./test/HTML/wired.html:346: HTML parser error : Opening and ending tag mismatch: (null) and (null)
+./test/HTML/wired.html:346: HTML parser error : Opening and ending tag mismatch: td and font
 </td>
      ^
 ./test/HTML/wired.html:374: HTML parser error : htmlParseEntityRef: no name
 a, sans-serif"><b><a href="/news/commentarySection/0,1292,31926,00.html">Rants &
                                                                                ^
-./test/HTML/wired.html:374: HTML parser error : Opening and ending tag mismatch: (null) and (null)
+./test/HTML/wired.html:374: HTML parser error : Opening and ending tag mismatch: td and font
 Readers on Apple's G4 ... AOL's passwords ... MS vs. Linux.</font><br><br>  </td
                                                                                ^
-./test/HTML/wired.html:374: HTML parser error : Opening and ending tag mismatch: (null) and (null)
+./test/HTML/wired.html:374: HTML parser error : Opening and ending tag mismatch: td and font
 Readers on Apple's G4 ... AOL's passwords ... MS vs. Linux.</font><br><br>  </td
                                                                                ^
-./test/HTML/wired.html:402: HTML parser error : Opening and ending tag mismatch: (null) and (null)
+./test/HTML/wired.html:402: HTML parser error : Opening and ending tag mismatch: a and font
 w.vignette.com/" style="text-decoration:none"><font color="#000000">Vignette</a>
                                                                                ^
 ./test/HTML/wired.html:407: HTML parser error : htmlParseEntityRef: expecting ';'
@@ -214,34 +214,34 @@
 ./test/HTML/wired.html:408: HTML parser error : htmlParseEntityRef: expecting ';'
 wired.com&BANNER=Sprint" style="text-decoration:none"><font color="#000000">Spri
                 ^
-./test/HTML/wired.html:408: HTML parser error : Opening and ending tag mismatch: (null) and (null)
+./test/HTML/wired.html:408: HTML parser error : Opening and ending tag mismatch: a and font
 com&BANNER=Sprint" style="text-decoration:none"><font color="#000000">Sprint</a>
                                                                                ^
 ./test/HTML/wired.html:408: HTML parser error : End tag : expected '>'
 =Sprint" style="text-decoration:none"><font color="#000000">Sprint</a></i></font
                                                                                ^
-./test/HTML/wired.html:414: HTML parser error : Opening and ending tag mismatch: (null) and (null)
+./test/HTML/wired.html:414: HTML parser error : Opening and ending tag mismatch: td and font
 </td>
      ^
-./test/HTML/wired.html:414: HTML parser error : Opening and ending tag mismatch: (null) and (null)
+./test/HTML/wired.html:414: HTML parser error : Opening and ending tag mismatch: td and font
 </td>
      ^
-./test/HTML/wired.html:414: HTML parser error : Opening and ending tag mismatch: (null) and (null)
+./test/HTML/wired.html:414: HTML parser error : Opening and ending tag mismatch: td and font
 </td>
      ^
-./test/HTML/wired.html:414: HTML parser error : Opening and ending tag mismatch: (null) and (null)
+./test/HTML/wired.html:414: HTML parser error : Opening and ending tag mismatch: td and font
 </td>
      ^
-./test/HTML/wired.html:414: HTML parser error : Opening and ending tag mismatch: (null) and (null)
+./test/HTML/wired.html:414: HTML parser error : Opening and ending tag mismatch: td and font
 </td>
      ^
-./test/HTML/wired.html:414: HTML parser error : Opening and ending tag mismatch: (null) and (null)
+./test/HTML/wired.html:414: HTML parser error : Opening and ending tag mismatch: td and font
 </td>
      ^
-./test/HTML/wired.html:414: HTML parser error : Opening and ending tag mismatch: (null) and (null)
+./test/HTML/wired.html:414: HTML parser error : Opening and ending tag mismatch: td and font
 </td>
      ^
-./test/HTML/wired.html:414: HTML parser error : Opening and ending tag mismatch: (null) and (null)
+./test/HTML/wired.html:414: HTML parser error : Opening and ending tag mismatch: td and font
 </td>
      ^
 ./test/HTML/wired.html:432: HTML parser error : htmlParseEntityRef: expecting ';'
diff --git a/result/valid/t8.xml.err b/result/valid/t8.xml.err
index fa56316..7ae7bb4 100644
--- a/result/valid/t8.xml.err
+++ b/result/valid/t8.xml.err
@@ -1,4 +1,5 @@
-Entity: line 1: parser error : internal error %defroot; 
+Entity: line 1: parser error : internal error
+ %defroot; 
           ^
 Entity: line 1: 
 &lt;!ELEMENT root (middle) >
diff --git a/result/valid/t8a.xml.err b/result/valid/t8a.xml.err
index fa56316..7ae7bb4 100644
--- a/result/valid/t8a.xml.err
+++ b/result/valid/t8a.xml.err
@@ -1,4 +1,5 @@
-Entity: line 1: parser error : internal error %defroot; 
+Entity: line 1: parser error : internal error
+ %defroot; 
           ^
 Entity: line 1: 
 &lt;!ELEMENT root (middle) >