mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
hum try to avoid some troubles when the library is not initialized and one
* HTMLtree.c tree.c threads.c: hum try to avoid some troubles when the library is not initialized and one try to save, the locks in threaded env might not been initialized, playing safe * xmlschemastypes.c: apply patch for hexBinary from Charles Bozeman * test/schemas/hexbinary_* result/schemas/hexbinary_*: also added his tests to the regression suite. Daniel
This commit is contained in:
16
HTMLtree.c
16
HTMLtree.c
@ -383,6 +383,8 @@ htmlNodeDumpFormat(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur,
|
||||
*/
|
||||
int
|
||||
htmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur) {
|
||||
xmlInitParser();
|
||||
|
||||
return(htmlNodeDumpFormat(buf, doc, cur, 1));
|
||||
}
|
||||
|
||||
@ -407,6 +409,8 @@ htmlNodeDumpFileFormat(FILE *out, xmlDocPtr doc,
|
||||
xmlCharEncodingHandlerPtr handler = NULL;
|
||||
int ret;
|
||||
|
||||
xmlInitParser();
|
||||
|
||||
if (encoding != NULL) {
|
||||
xmlCharEncoding enc;
|
||||
|
||||
@ -467,6 +471,8 @@ htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {
|
||||
xmlCharEncodingHandlerPtr handler = NULL;
|
||||
const char *encoding;
|
||||
|
||||
xmlInitParser();
|
||||
|
||||
if (cur == NULL) {
|
||||
#ifdef DEBUG_TREE
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
@ -695,6 +701,8 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
|
||||
xmlNodePtr cur, const char *encoding, int format) {
|
||||
const htmlElemDesc * info;
|
||||
|
||||
xmlInitParser();
|
||||
|
||||
if (cur == NULL) {
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"htmlNodeDumpFormatOutput : node == NULL\n");
|
||||
@ -889,6 +897,8 @@ htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr cur,
|
||||
const char *encoding, int format) {
|
||||
int type;
|
||||
|
||||
xmlInitParser();
|
||||
|
||||
/*
|
||||
* force to output the stuff as HTML, especially for entities
|
||||
*/
|
||||
@ -940,6 +950,8 @@ htmlDocDump(FILE *f, xmlDocPtr cur) {
|
||||
const char *encoding;
|
||||
int ret;
|
||||
|
||||
xmlInitParser();
|
||||
|
||||
if (cur == NULL) {
|
||||
#ifdef DEBUG_TREE
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
@ -1000,6 +1012,8 @@ htmlSaveFile(const char *filename, xmlDocPtr cur) {
|
||||
const char *encoding;
|
||||
int ret;
|
||||
|
||||
xmlInitParser();
|
||||
|
||||
encoding = (const char *) htmlGetMetaEncoding(cur);
|
||||
|
||||
if (encoding != NULL) {
|
||||
@ -1058,6 +1072,8 @@ htmlSaveFileFormat(const char *filename, xmlDocPtr cur,
|
||||
xmlCharEncodingHandlerPtr handler = NULL;
|
||||
int ret;
|
||||
|
||||
xmlInitParser();
|
||||
|
||||
if (encoding != NULL) {
|
||||
xmlCharEncoding enc;
|
||||
|
||||
|
Reference in New Issue
Block a user