fixed teh 2 stupid bugs affecting htmlReadDoc() and htmlReadIO() this

* HTMLparser.c: fixed teh 2 stupid bugs affecting htmlReadDoc() and
  htmlReadIO() this should fix #340322
Daniel
diff --git a/ChangeLog b/ChangeLog
index 4cc76d3..49a57d8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Oct 17 22:04:31 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+	* HTMLparser.c: fixed teh 2 stupid bugs affecting htmlReadDoc() and
+	  htmlReadIO() this should fix #340322
+
 Tue Oct 17 21:39:23 CEST 2006 Daniel Veillard <daniel@veillard.com>
 
 	* xpath.c: applied patch from Olaf Walkowiak which should fix #334104
diff --git a/HTMLparser.c b/HTMLparser.c
index 5555766..aac2a78 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -4347,7 +4347,8 @@
  * Returns the new parser context or NULL
  */
 static htmlParserCtxtPtr
-htmlCreateDocParserCtxt(xmlChar *cur, const char *encoding ATTRIBUTE_UNUSED) {
+htmlCreateDocParserCtxt(const xmlChar *cur,
+                        const char *encoding ATTRIBUTE_UNUSED) {
     int len;
     htmlParserCtxtPtr ctxt;
 
@@ -5936,7 +5937,7 @@
         return (NULL);
 
     xmlInitParser();
-    ctxt = xmlCreateDocParserCtxt(cur);
+    ctxt = htmlCreateDocParserCtxt(cur, NULL);
     if (ctxt == NULL)
         return (NULL);
     return (htmlDoRead(ctxt, URL, encoding, options, 0));
@@ -6060,7 +6061,7 @@
                                          XML_CHAR_ENCODING_NONE);
     if (input == NULL)
         return (NULL);
-    ctxt = xmlNewParserCtxt();
+    ctxt = htmlNewParserCtxt();
     if (ctxt == NULL) {
         xmlFreeParserInputBuffer(input);
         return (NULL);