fixed bug #132575 about finding the end of the internal subset in push

* parser.c: fixed bug #132575 about finding the end of the
  internal subset in push mode.
* test/intsubset.xml result/intsubset.xml* result/noent/intsubset.xml:
  added the test to the regression suite
Daniel
diff --git a/ChangeLog b/ChangeLog
index 9795295..c5205b5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Thu Feb 12 12:54:26 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+	* parser.c: fixed bug #132575 about finding the end of the
+	  internal subset in push mode.
+	* test/intsubset.xml result/intsubset.xml* result/noent/intsubset.xml:
+	  added the test to the regression suite
+
 Wed Feb 11 14:19:31 CET 2004 Daniel Veillard <daniel@veillard.com>
 
 	* parserInternals.c xmlIO.c encoding.c include/libxml/parser.h
diff --git a/parser.c b/parser.c
index d8b7f3b..92cb382 100644
--- a/parser.c
+++ b/parser.c
@@ -9477,6 +9477,29 @@
 			    quote = 0;
 			continue;    
 		    }
+		    if ((quote == 0) && (buf[base] == '<')) {
+		        int found  = 0;
+			/* special handling of comments */
+		        if (((unsigned int) base + 4 <
+			     ctxt->input->buf->buffer->use) &&
+			    (buf[base + 1] == '!') &&
+			    (buf[base + 2] == '-') &&
+			    (buf[base + 3] == '-')) {
+			    for (;(unsigned int) base + 3 <
+			          ctxt->input->buf->buffer->use; base++) {
+				if ((buf[base] == '-') &&
+				    (buf[base + 1] == '-') &&
+				    (buf[base + 2] == '>')) {
+				    found = 1;
+				    base += 2;
+				    break;
+				}
+		            }
+			    if (!found)
+			        break;
+		            continue;
+			}
+		    }
 		    if (buf[base] == '"') {
 		        quote = '"';
 			continue;
diff --git a/result/intsubset.xml b/result/intsubset.xml
new file mode 100644
index 0000000..bd85795
--- /dev/null
+++ b/result/intsubset.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" standalone="yes"?>
+<!DOCTYPE root [
+<!ELEMENT root EMPTY>
+<!--  " -->]>
+<root/>
diff --git a/result/intsubset.xml.rdr b/result/intsubset.xml.rdr
new file mode 100644
index 0000000..7503422
--- /dev/null
+++ b/result/intsubset.xml.rdr
@@ -0,0 +1,2 @@
+0 10 root 0 0
+0 1 root 1 0
diff --git a/result/intsubset.xml.sax b/result/intsubset.xml.sax
new file mode 100644
index 0000000..a92e2b7
--- /dev/null
+++ b/result/intsubset.xml.sax
@@ -0,0 +1,9 @@
+SAX.setDocumentLocator()
+SAX.startDocument()
+SAX.internalSubset(root, , )
+SAX.elementDecl(root, 1, ...)
+SAX.comment(  " )
+SAX.externalSubset(root, , )
+SAX.startElement(root)
+SAX.endElement(root)
+SAX.endDocument()
diff --git a/result/noent/intsubset.xml b/result/noent/intsubset.xml
new file mode 100644
index 0000000..bd85795
--- /dev/null
+++ b/result/noent/intsubset.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" standalone="yes"?>
+<!DOCTYPE root [
+<!ELEMENT root EMPTY>
+<!--  " -->]>
+<root/>
diff --git a/test/intsubset.xml b/test/intsubset.xml
new file mode 100644
index 0000000..709de15
--- /dev/null
+++ b/test/intsubset.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" standalone="yes"?>
+<!DOCTYPE root [
+<!ELEMENT root  EMPTY>
+<!--  " -->
+]>
+<root/>