[xml/sgml-commit] r513 - in packages/libxml2: . trunk trunk/debian

Mike Hommey glandium at costa.debian.org
Sat Jan 14 17:41:59 UTC 2006


Author: glandium
Date: 2006-01-14 17:41:57 +0000 (Sat, 14 Jan 2006)
New Revision: 513

Modified:
   packages/libxml2/
   packages/libxml2/trunk/debian/changelog
   packages/libxml2/trunk/parser.c
Log:
 r950 at namakemono:  mh | 2006-01-14 18:38:42 +0100
 Import NMU changes



Property changes on: packages/libxml2
___________________________________________________________________
Name: svk:merge
   - 85a06573-1206-0410-a182-ce9117885d71:/local/libxml2:296
   + 85a06573-1206-0410-a182-ce9117885d71:/local/libxml2:296
a066b643-3b0a-0410-a6ba-ed4cca522822:/local/libxml2:950

Modified: packages/libxml2/trunk/debian/changelog
===================================================================
--- packages/libxml2/trunk/debian/changelog	2006-01-11 19:09:45 UTC (rev 512)
+++ packages/libxml2/trunk/debian/changelog	2006-01-14 17:41:57 UTC (rev 513)
@@ -1,3 +1,10 @@
+libxml2 (2.6.23-1.1) unstable; urgency=high
+
+  * Non-maintainer upload.
+  * Fix XML parser to unbreak xsltproc (Closes: #346594).
+
+ -- Luk Claes <luk at debian.org>  Thu, 12 Jan 2006 15:25:42 +0100
+
 libxml2 (2.6.23-1) unstable; urgency=low
 
   * New upstream release

Modified: packages/libxml2/trunk/parser.c
===================================================================
--- packages/libxml2/trunk/parser.c	2006-01-11 19:09:45 UTC (rev 512)
+++ packages/libxml2/trunk/parser.c	2006-01-14 17:41:57 UTC (rev 513)
@@ -3539,16 +3539,12 @@
 	    ctxt->input->cur = in;
 	    if (*in == 0xD) {
 		in++;
-		if (!*in)	/* if end of current chunk return */
-		    return;
 		if (*in == 0xA) {
 		    ctxt->input->cur = in;
 		    in++;
 		    ctxt->input->line++; ctxt->input->col = 1;
 		    continue; /* while */
 		}
-		if (!*in)	/* if end of current chunk return */
-		    return;
 		in--;
 	    }
 	    if (*in == '<') {
@@ -3931,8 +3927,6 @@
 		ctxt->input->line++; ctxt->input->col = 1;
 		continue; /* while */
 	    }
-	    if (!*in)	/* if end of current chunk return */
-		return;
 	    in--;
 	}
 	SHRINK;
@@ -10407,12 +10401,19 @@
 int
 xmlParseChunk(xmlParserCtxtPtr ctxt, const char *chunk, int size,
               int terminate) {
+    int end_in_lf = 0;
+    
     if (ctxt == NULL)
         return(XML_ERR_INTERNAL_ERROR);
     if ((ctxt->errNo != XML_ERR_OK) && (ctxt->disableSAX == 1))
         return(ctxt->errNo);
     if (ctxt->instate == XML_PARSER_START)
         xmlDetectSAX2(ctxt);
+    if ((size > 0) && (chunk != NULL) && (!terminate) &&
+          (chunk[size - 1] == '\r')) {
+        end_in_lf = 1;
+	size--;
+    }
     if ((size > 0) && (chunk != NULL) && (ctxt->input != NULL) &&
         (ctxt->input->buf != NULL) && (ctxt->instate != XML_PARSER_EOF))  {
 	int base = ctxt->input->base - ctxt->input->buf->buffer->content;
@@ -10451,6 +10452,10 @@
 	}
     }
     xmlParseTryOrFinish(ctxt, terminate);
+    if ((end_in_lf == 1) && (ctxt->input != NULL) &&
+          (ctxt->input->buf != NULL)) {
+        xmlParserInputBufferPush(ctxt->input->buf, 1, "\r");
+    }
     if ((ctxt->errNo != XML_ERR_OK) && (ctxt->disableSAX == 1))
         return(ctxt->errNo);
     if (terminate) {




More information about the debian-xml-sgml-commit mailing list