mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-04-25 22:50:08 +03:00
Fixed typo in xmlCharEncFirstLine pointed out by Mark Rowe (bug #440159)
* encoding.c: Fixed typo in xmlCharEncFirstLine pointed out by Mark Rowe (bug #440159) * include/libxml/xmlversion.h.in: Added check for definition of _POSIX_C_SOURCE to avoid warnings on Apple OS/X (patch from Wendy Doyle and Mark Rowe, bug #346675) * schematron.c, testapi.c, tree.c, xmlIO.c, xmlsave.c: minor changes to fix compilation warnings - no change to logic. svn path=/trunk/; revision=3618
This commit is contained in:
parent
e882765aa4
commit
38d452ac1c
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
Tue May 22 08:59:48 PDT 2007 William Brack <wbrack@mmm.com.hk>
|
||||||
|
|
||||||
|
* encoding.c: Fixed typo in xmlCharEncFirstLine pointed out
|
||||||
|
by Mark Rowe (bug #440159)
|
||||||
|
* include/libxml/xmlversion.h.in: Added check for definition of
|
||||||
|
_POSIX_C_SOURCE to avoid warnings on Apple OS/X (patch from
|
||||||
|
Wendy Doyle and Mark Rowe, bug #346675)
|
||||||
|
* schematron.c, testapi.c, tree.c, xmlIO.c, xmlsave.c: minor
|
||||||
|
changes to fix compilation warnings - no change to logic.
|
||||||
|
|
||||||
Tue May 15 22:18:08 PDT 2007 William Brack <wbrack@mmm.com.hk>
|
Tue May 15 22:18:08 PDT 2007 William Brack <wbrack@mmm.com.hk>
|
||||||
|
|
||||||
* nanohttp.c: small enhancement to last fix, pointed out
|
* nanohttp.c: small enhancement to last fix, pointed out
|
||||||
|
13
encoding.c
13
encoding.c
@ -1761,19 +1761,20 @@ xmlCharEncFirstLine(xmlCharEncodingHandler *handler, xmlBufferPtr out,
|
|||||||
if (out == NULL) return(-1);
|
if (out == NULL) return(-1);
|
||||||
if (in == NULL) return(-1);
|
if (in == NULL) return(-1);
|
||||||
|
|
||||||
|
/* calculate space available */
|
||||||
written = out->size - out->use;
|
written = out->size - out->use;
|
||||||
toconv = in->use;
|
toconv = in->use;
|
||||||
if (toconv * 2 >= written) {
|
|
||||||
xmlBufferGrow(out, toconv);
|
|
||||||
written = out->size - out->use - 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* echo '<?xml version="1.0" encoding="UCS4"?>' | wc -c => 38
|
* echo '<?xml version="1.0" encoding="UCS4"?>' | wc -c => 38
|
||||||
* 45 chars should be sufficient to reach the end of the encoding
|
* 45 chars should be sufficient to reach the end of the encoding
|
||||||
* declaration without going too far inside the document content.
|
* declaration without going too far inside the document content.
|
||||||
*/
|
*/
|
||||||
written = 45;
|
if (toconv > 45)
|
||||||
|
toconv = 45;
|
||||||
|
if (toconv * 2 >= written) {
|
||||||
|
xmlBufferGrow(out, toconv);
|
||||||
|
written = out->size - out->use - 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (handler->input != NULL) {
|
if (handler->input != NULL) {
|
||||||
ret = handler->input(&out->content[out->use], &written,
|
ret = handler->input(&out->content[out->use], &written,
|
||||||
|
@ -91,7 +91,8 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||||||
* Whether the thread support is configured in
|
* Whether the thread support is configured in
|
||||||
*/
|
*/
|
||||||
#if @WITH_THREADS@
|
#if @WITH_THREADS@
|
||||||
#if defined(_REENTRANT) || defined(__MT__) || (_POSIX_C_SOURCE - 0 >= 199506L)
|
#if defined(_REENTRANT) || defined(__MT__) || \
|
||||||
|
(defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE - 0 >= 199506L))
|
||||||
#define LIBXML_THREAD_ENABLED
|
#define LIBXML_THREAD_ENABLED
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -714,6 +714,7 @@ xmlSchematronFreeParserCtxt(xmlSchematronParserCtxtPtr ctxt)
|
|||||||
xmlFree(ctxt);
|
xmlFree(ctxt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
/**
|
/**
|
||||||
* xmlSchematronPushInclude:
|
* xmlSchematronPushInclude:
|
||||||
* @ctxt: the schema parser context
|
* @ctxt: the schema parser context
|
||||||
@ -782,6 +783,7 @@ xmlSchematronPopInclude(xmlSchematronParserCtxtPtr ctxt)
|
|||||||
return(xmlSchematronPopInclude(ctxt));
|
return(xmlSchematronPopInclude(ctxt));
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlSchematronAddNamespace:
|
* xmlSchematronAddNamespace:
|
||||||
@ -987,6 +989,7 @@ xmlSchematronParsePattern(xmlSchematronParserCtxtPtr ctxt, xmlNodePtr pat)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
/**
|
/**
|
||||||
* xmlSchematronLoadInclude:
|
* xmlSchematronLoadInclude:
|
||||||
* @ctxt: a schema validation context
|
* @ctxt: a schema validation context
|
||||||
@ -1051,6 +1054,7 @@ done:
|
|||||||
xmlFree(URI);
|
xmlFree(URI);
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlSchematronParse:
|
* xmlSchematronParse:
|
||||||
|
@ -128,7 +128,7 @@ int main(int argc, char **argv) {
|
|||||||
int blocks, mem;
|
int blocks, mem;
|
||||||
|
|
||||||
/* access to the proxy can slow up regression tests a lot */
|
/* access to the proxy can slow up regression tests a lot */
|
||||||
putenv("http_proxy=");
|
putenv((char *) "http_proxy=");
|
||||||
|
|
||||||
memset(chartab, 0, sizeof(chartab));
|
memset(chartab, 0, sizeof(chartab));
|
||||||
strncpy((char *) chartab, " chartab\n", 20);
|
strncpy((char *) chartab, " chartab\n", 20);
|
||||||
|
2
tree.c
2
tree.c
@ -4848,7 +4848,7 @@ xmlNodeSetBase(xmlNodePtr cur, const xmlChar* uri) {
|
|||||||
fixed = xmlPathToURI(uri);
|
fixed = xmlPathToURI(uri);
|
||||||
if (fixed != NULL) {
|
if (fixed != NULL) {
|
||||||
xmlSetNsProp(cur, ns, BAD_CAST "base", fixed);
|
xmlSetNsProp(cur, ns, BAD_CAST "base", fixed);
|
||||||
xmlFree(fixed);
|
xmlFree((xmlChar *)fixed);
|
||||||
} else {
|
} else {
|
||||||
xmlSetNsProp(cur, ns, BAD_CAST "base", uri);
|
xmlSetNsProp(cur, ns, BAD_CAST "base", uri);
|
||||||
}
|
}
|
||||||
|
2
xmlIO.c
2
xmlIO.c
@ -3638,7 +3638,7 @@ static int xmlNoNetExists(const char *URL) {
|
|||||||
*
|
*
|
||||||
* Returns a new allocated URL, or NULL.
|
* Returns a new allocated URL, or NULL.
|
||||||
*/
|
*/
|
||||||
xmlChar *
|
static xmlChar *
|
||||||
xmlResolveResourceFromCatalog(const char *URL, const char *ID,
|
xmlResolveResourceFromCatalog(const char *URL, const char *ID,
|
||||||
xmlParserCtxtPtr ctxt) {
|
xmlParserCtxtPtr ctxt) {
|
||||||
xmlChar *resource = NULL;
|
xmlChar *resource = NULL;
|
||||||
|
@ -834,7 +834,6 @@ xmlDocContentDumpOutput(xmlSaveCtxtPtr ctxt, xmlDocPtr cur) {
|
|||||||
xmlCharEncodingOutputFunc oldescape = ctxt->escape;
|
xmlCharEncodingOutputFunc oldescape = ctxt->escape;
|
||||||
xmlCharEncodingOutputFunc oldescapeAttr = ctxt->escapeAttr;
|
xmlCharEncodingOutputFunc oldescapeAttr = ctxt->escapeAttr;
|
||||||
xmlOutputBufferPtr buf = ctxt->buf;
|
xmlOutputBufferPtr buf = ctxt->buf;
|
||||||
xmlCharEncodingHandlerPtr handler = NULL;
|
|
||||||
xmlCharEncoding enc;
|
xmlCharEncoding enc;
|
||||||
|
|
||||||
xmlInitParser();
|
xmlInitParser();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user