• Home
  • Raw
  • Download

Lines Matching +full:test +full:- +full:docs

15 ---
18 test/XInclude/docs/invalid_char.xml | 3 ++
19 test/XInclude/ents/invalid_char.txt | 1 +
20 xinclude.c | 61 ++++++++++++----------------
21 5 files changed, 39 insertions(+), 35 deletions(-)
24 create mode 100644 test/XInclude/docs/invalid_char.xml
25 create mode 100644 test/XInclude/ents/invalid_char.txt
27 diff --git a/result/XInclude/invalid_char.xml.err b/result/XInclude/invalid_char.xml.err
30 --- /dev/null
32 @@ -0,0 +1,2 @@
33 +./test/XInclude/docs/invalid_char.xml:2: element include: XInclude error : test/XInclude/ents/inva…
34 +./test/XInclude/docs/invalid_char.xml:2: element include: XInclude error : could not load test/XIn…
35 diff --git a/result/XInclude/invalid_char.xml.rdr b/result/XInclude/invalid_char.xml.rdr
38 --- /dev/null
40 @@ -0,0 +1,7 @@
48 diff --git a/test/XInclude/docs/invalid_char.xml b/test/XInclude/docs/invalid_char.xml
51 --- /dev/null
52 +++ b/test/XInclude/docs/invalid_char.xml
53 @@ -0,0 +1,3 @@
57 diff --git a/test/XInclude/ents/invalid_char.txt b/test/XInclude/ents/invalid_char.txt
60 --- /dev/null
61 +++ b/test/XInclude/ents/invalid_char.txt
62 @@ -0,0 +1 @@
65 diff --git a/xinclude.c b/xinclude.c
67 --- a/xinclude.c
69 @@ -1798,7 +1798,9 @@ xmlXIncludeLoadTxt(xmlXIncludeCtxtPtr ctxt, const xmlChar *url, int nr) {
73 - int xinclude_multibyte_fallback_used = 0;
79 if (xmlStrcmp(url, BAD_CAST "-") == 0)
80 @@ -1905,41 +1907,30 @@ xmlXIncludeLoadTxt(xmlXIncludeCtxtPtr ctxt, const xmlChar *url, int nr) {
84 -xinclude_multibyte_fallback:
85 - while (xmlParserInputBufferRead(buf, 128) > 0) {
86 - int len;
87 - const xmlChar *content;
88 -
89 - content = xmlBufContent(buf->buffer);
90 - len = xmlBufLength(buf->buffer);
91 - for (i = 0;i < len;) {
92 - int cur;
93 - int l;
94 -
95 - cur = xmlStringCurrentChar(NULL, &content[i], &l);
96 - if (!IS_CHAR(cur)) {
97 - /* Handle split multibyte char at buffer boundary */
98 - if (((len - i) < 4) && (!xinclude_multibyte_fallback_used)) {
99 - xinclude_multibyte_fallback_used = 1;
100 - xmlBufShrink(buf->buffer, i);
101 - goto xinclude_multibyte_fallback;
102 - } else {
103 - xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
104 - XML_XINCLUDE_INVALID_CHAR,
105 - "%s contains invalid char\n", URL);
106 - xmlFreeParserCtxt(pctxt);
107 - xmlFreeParserInputBuffer(buf);
108 - xmlFree(URL);
109 - return(-1);
110 - }
111 - } else {
112 - xinclude_multibyte_fallback_used = 0;
113 - xmlNodeAddContentLen(node, &content[i], l);
114 - }
115 - i += l;
116 - }
117 - xmlBufShrink(buf->buffer, len);
121 + content = xmlBufContent(buf->buffer);
122 + len = xmlBufLength(buf->buffer);
129 + xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, XML_XINCLUDE_INVALID_CHAR,
135 + return(-1);
143 xmlXIncludeAddTxt(ctxt, node->content, URL);
145 --