Diff for /embedaddon/libxml2/xinclude.c between versions 1.1.1.1 and 1.1.1.2

version 1.1.1.1, 2012/02/21 23:37:58 version 1.1.1.2, 2013/07/22 01:22:18
Line 1796  xmlXIncludeLoadTxt(xmlXIncludeCtxtPtr ctxt, const xmlC Line 1796  xmlXIncludeLoadTxt(xmlXIncludeCtxtPtr ctxt, const xmlC
     int i;      int i;
     xmlChar *encoding = NULL;      xmlChar *encoding = NULL;
     xmlCharEncoding enc = (xmlCharEncoding) 0;      xmlCharEncoding enc = (xmlCharEncoding) 0;
       xmlParserCtxtPtr pctxt;
       xmlParserInputPtr inputStream;
   
     /*      /*
      * Check the URL and remove any fragment identifier       * Check the URL and remove any fragment identifier
Line 1870  xmlXIncludeLoadTxt(xmlXIncludeCtxtPtr ctxt, const xmlC Line 1872  xmlXIncludeLoadTxt(xmlXIncludeCtxtPtr ctxt, const xmlC
     /*      /*
      * Load it.       * Load it.
      */       */
    buf = xmlParserInputBufferCreateFilename((const char *)URL, enc);    pctxt = xmlNewParserCtxt();
     inputStream = xmlLoadExternalEntity((const char*)URL, NULL, pctxt);
     if(inputStream == NULL) {
         xmlFreeParserCtxt(pctxt);
         xmlFree(URL);
         return(-1);
     }
     buf = inputStream->buf;
     if (buf == NULL) {      if (buf == NULL) {
           xmlFreeInputStream (inputStream);
           xmlFreeParserCtxt(pctxt);
         xmlFree(URL);          xmlFree(URL);
         return(-1);          return(-1);
     }      }
       if (buf->encoder)
           xmlCharEncCloseFunc(buf->encoder);
       buf->encoder = xmlGetCharEncodingHandler(enc);
     node = xmlNewText(NULL);      node = xmlNewText(NULL);
   
     /*      /*
Line 1905  xmlXIncludeLoadTxt(xmlXIncludeCtxtPtr ctxt, const xmlC Line 1919  xmlXIncludeLoadTxt(xmlXIncludeCtxtPtr ctxt, const xmlC
         }          }
         xmlBufferShrink(buf->buffer, len);          xmlBufferShrink(buf->buffer, len);
     }      }
    xmlFreeParserInputBuffer(buf);    xmlFreeParserCtxt(pctxt);
     xmlXIncludeAddTxt(ctxt, node, URL);      xmlXIncludeAddTxt(ctxt, node, URL);
       xmlFreeInputStream(inputStream);
   
 loaded:  loaded:
     /*      /*

Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>