diff --git a/HTMLtree.c b/HTMLtree.c
index 8fa022c1..3aa67e14 100644
--- a/HTMLtree.c
+++ b/HTMLtree.c
@@ -366,10 +366,10 @@ htmlSaveErr(int code, xmlNodePtr node, const char *extra)
msg = "unexpected error number\n";
}
- res = __xmlRaiseError(NULL, NULL, NULL, NULL, node,
- XML_FROM_OUTPUT, code, XML_ERR_ERROR, NULL, 0,
- extra, NULL, NULL, 0, 0,
- msg, extra);
+ res = xmlRaiseError(NULL, NULL, NULL, NULL, node,
+ XML_FROM_OUTPUT, code, XML_ERR_ERROR, NULL, 0,
+ extra, NULL, NULL, 0, 0,
+ msg, extra);
if (res < 0)
xmlRaiseMemoryError(NULL, NULL, NULL, XML_FROM_OUTPUT, NULL);
}
diff --git a/catalog.c b/catalog.c
index 55ea301f..ab2674c0 100644
--- a/catalog.c
+++ b/catalog.c
@@ -222,11 +222,11 @@ xmlCatalogErr(xmlCatalogEntryPtr catal, xmlNodePtr node, int error,
{
int res;
- res = __xmlRaiseError(NULL, NULL, NULL, catal, node,
- XML_FROM_CATALOG, error, XML_ERR_ERROR, NULL, 0,
- (const char *) str1, (const char *) str2,
- (const char *) str3, 0, 0,
- msg, str1, str2, str3);
+ res = xmlRaiseError(NULL, NULL, NULL, catal, node,
+ XML_FROM_CATALOG, error, XML_ERR_ERROR, NULL, 0,
+ (const char *) str1, (const char *) str2,
+ (const char *) str3, 0, 0,
+ msg, str1, str2, str3);
if (res < 0)
xmlCatalogErrMemory();
}
diff --git a/error.c b/error.c
index 84b0e5d2..a3bad356 100644
--- a/error.c
+++ b/error.c
@@ -746,7 +746,7 @@ xmlVRaiseError(xmlStructuredErrorFunc schannel,
}
/**
- * __xmlRaiseError:
+ * xmlRaiseError:
* @schannel: the structured callback channel
* @channel: the old callback channel
* @data: the callback data
@@ -772,12 +772,12 @@ xmlVRaiseError(xmlStructuredErrorFunc schannel,
* Returns 0 on success, -1 if a memory allocation failed.
*/
int
-__xmlRaiseError(xmlStructuredErrorFunc schannel,
- xmlGenericErrorFunc channel, void *data, void *ctx,
- xmlNode *node, int domain, int code, xmlErrorLevel level,
- const char *file, int line, const char *str1,
- const char *str2, const char *str3, int int1, int col,
- const char *msg, ...)
+xmlRaiseError(xmlStructuredErrorFunc schannel,
+ xmlGenericErrorFunc channel, void *data, void *ctx,
+ xmlNode *node, int domain, int code, xmlErrorLevel level,
+ const char *file, int line, const char *str1,
+ const char *str2, const char *str3, int int1, int col,
+ const char *msg, ...)
{
va_list ap;
int res;
diff --git a/include/private/error.h b/include/private/error.h
index 506405a1..8501f237 100644
--- a/include/private/error.h
+++ b/include/private/error.h
@@ -19,12 +19,12 @@ xmlVRaiseError(xmlStructuredErrorFunc schannel, xmlGenericErrorFunc channel,
const char *str2, const char *str3, int int1, int col,
const char *msg, va_list ap);
XML_HIDDEN int
-__xmlRaiseError(xmlStructuredErrorFunc schannel, xmlGenericErrorFunc channel,
- void *data, void *ctx, struct _xmlNode *node,
- int domain, int code, xmlErrorLevel level,
- const char *file, int line, const char *str1,
- const char *str2, const char *str3, int int1, int col,
- const char *msg, ...) LIBXML_ATTR_FORMAT(16,17);
+xmlRaiseError(xmlStructuredErrorFunc schannel, xmlGenericErrorFunc channel,
+ void *data, void *ctx, struct _xmlNode *node,
+ int domain, int code, xmlErrorLevel level,
+ const char *file, int line, const char *str1,
+ const char *str2, const char *str3, int int1, int col,
+ const char *msg, ...) LIBXML_ATTR_FORMAT(16,17);
XML_HIDDEN void
xmlGenericErrorDefaultFunc(void *ctx, const char *msg,
...) LIBXML_ATTR_FORMAT(2,3);
diff --git a/relaxng.c b/relaxng.c
index b0898e02..796527b2 100644
--- a/relaxng.c
+++ b/relaxng.c
@@ -491,10 +491,10 @@ xmlRngPErr(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node, int error,
data = xmlGenericErrorContext;
}
- res = __xmlRaiseError(schannel, channel, data, NULL, node,
- XML_FROM_RELAXNGP, error, XML_ERR_ERROR, NULL, 0,
- (const char *) str1, (const char *) str2, NULL, 0, 0,
- msg, str1, str2);
+ res = xmlRaiseError(schannel, channel, data, NULL, node,
+ XML_FROM_RELAXNGP, error, XML_ERR_ERROR, NULL, 0,
+ (const char *) str1, (const char *) str2, NULL, 0, 0,
+ msg, str1, str2);
if (res < 0)
xmlRngPErrMemory(ctxt);
}
@@ -533,10 +533,10 @@ xmlRngVErr(xmlRelaxNGValidCtxtPtr ctxt, xmlNodePtr node, int error,
data = xmlGenericErrorContext;
}
- res = __xmlRaiseError(schannel, channel, data, NULL, node,
- XML_FROM_RELAXNGV, error, XML_ERR_ERROR, NULL, 0,
- (const char *) str1, (const char *) str2, NULL, 0, 0,
- msg, str1, str2);
+ res = xmlRaiseError(schannel, channel, data, NULL, node,
+ XML_FROM_RELAXNGV, error, XML_ERR_ERROR, NULL, 0,
+ (const char *) str1, (const char *) str2, NULL, 0, 0,
+ msg, str1, str2);
if (res < 0)
xmlRngVErrMemory(ctxt);
}
diff --git a/schematron.c b/schematron.c
index 43ab3958..e02de230 100644
--- a/schematron.c
+++ b/schematron.c
@@ -271,10 +271,10 @@ xmlSchematronPErr(xmlSchematronParserCtxtPtr ctxt, xmlNodePtr node, int error,
data = xmlGenericErrorContext;
}
- res = __xmlRaiseError(schannel, channel, data, ctxt, node,
- XML_FROM_SCHEMASP, error, XML_ERR_ERROR, NULL, 0,
- (const char *) str1, (const char *) str2, NULL, 0, 0,
- msg, str1, str2);
+ res = xmlRaiseError(schannel, channel, data, ctxt, node,
+ XML_FROM_SCHEMASP, error, XML_ERR_ERROR, NULL, 0,
+ (const char *) str1, (const char *) str2, NULL, 0, 0,
+ msg, str1, str2);
if (res < 0)
xmlSchematronPErrMemory(ctxt);
}
@@ -328,10 +328,10 @@ xmlSchematronVErr(xmlSchematronValidCtxtPtr ctxt, int error,
data = xmlGenericErrorContext;
}
- res = __xmlRaiseError(schannel, channel, data, ctxt, NULL,
- XML_FROM_SCHEMASV, error, XML_ERR_ERROR, NULL, 0,
- (const char *) str1, NULL, NULL, 0, 0,
- msg, str1);
+ res = xmlRaiseError(schannel, channel, data, ctxt, NULL,
+ XML_FROM_SCHEMASV, error, XML_ERR_ERROR, NULL, 0,
+ (const char *) str1, NULL, NULL, 0, 0,
+ msg, str1);
if (res < 0)
xmlSchematronVErrMemory(ctxt);
}
@@ -1647,17 +1647,17 @@ xmlSchematronReportSuccess(xmlSchematronValidCtxtPtr ctxt,
data = xmlGenericErrorContext;
}
- res = __xmlRaiseError(schannel, channel, data, NULL, cur,
- XML_FROM_SCHEMATRONV,
- (test->type == XML_SCHEMATRON_ASSERT) ?
- XML_SCHEMATRONV_ASSERT :
- XML_SCHEMATRONV_REPORT,
- XML_ERR_ERROR, NULL, line,
- (pattern == NULL) ?
- NULL :
- (const char *) pattern->name,
- (const char *) path, (const char *) report, 0, 0,
- "%s", msg);
+ res = xmlRaiseError(schannel, channel, data, NULL, cur,
+ XML_FROM_SCHEMATRONV,
+ (test->type == XML_SCHEMATRON_ASSERT) ?
+ XML_SCHEMATRONV_ASSERT :
+ XML_SCHEMATRONV_REPORT,
+ XML_ERR_ERROR, NULL, line,
+ (pattern == NULL) ?
+ NULL :
+ (const char *) pattern->name,
+ (const char *) path, (const char *) report, 0, 0,
+ "%s", msg);
if (res < 0)
xmlSchematronVErrMemory(ctxt);
} else {
diff --git a/xinclude.c b/xinclude.c
index 1df9b4cb..d79bada7 100644
--- a/xinclude.c
+++ b/xinclude.c
@@ -174,10 +174,10 @@ xmlXIncludeErr(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node, int error,
data = xmlGenericErrorContext;
}
- res = __xmlRaiseError(schannel, channel, data, ctxt, node,
- XML_FROM_XINCLUDE, error, XML_ERR_ERROR,
- NULL, 0, (const char *) extra, NULL, NULL, 0, 0,
- msg, (const char *) extra);
+ res = xmlRaiseError(schannel, channel, data, ctxt, node,
+ XML_FROM_XINCLUDE, error, XML_ERR_ERROR,
+ NULL, 0, (const char *) extra, NULL, NULL, 0, 0,
+ msg, (const char *) extra);
if (res < 0) {
ctxt->errNo = XML_ERR_NO_MEMORY;
ctxt->fatalErr = 1;
diff --git a/xmlregexp.c b/xmlregexp.c
index 364e0bb0..94dbd1eb 100644
--- a/xmlregexp.c
+++ b/xmlregexp.c
@@ -385,10 +385,10 @@ xmlRegexpErrCompile(xmlRegParserCtxtPtr ctxt, const char *extra)
ctxt->error = XML_REGEXP_COMPILE_ERROR;
}
- res = __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_REGEXP,
- XML_REGEXP_COMPILE_ERROR, XML_ERR_FATAL,
- NULL, 0, extra, regexp, NULL, idx, 0,
- "failed to compile: %s\n", extra);
+ res = xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_REGEXP,
+ XML_REGEXP_COMPILE_ERROR, XML_ERR_FATAL,
+ NULL, 0, extra, regexp, NULL, idx, 0,
+ "failed to compile: %s\n", extra);
if (res < 0)
xmlRegexpErrMemory(ctxt);
}
diff --git a/xmlsave.c b/xmlsave.c
index 8e30229d..564fa652 100644
--- a/xmlsave.c
+++ b/xmlsave.c
@@ -112,10 +112,10 @@ xmlSaveErr(xmlOutputBufferPtr out, int code, xmlNodePtr node,
msg = "unexpected error number\n";
}
- res = __xmlRaiseError(NULL, NULL, NULL, NULL, node,
- XML_FROM_OUTPUT, code, XML_ERR_ERROR, NULL, 0,
- extra, NULL, NULL, 0, 0,
- msg, extra);
+ res = xmlRaiseError(NULL, NULL, NULL, NULL, node,
+ XML_FROM_OUTPUT, code, XML_ERR_ERROR, NULL, 0,
+ extra, NULL, NULL, 0, 0,
+ msg, extra);
if (res < 0)
xmlSaveErrMemory(out);
}
diff --git a/xmlwriter.c b/xmlwriter.c
index 530a9ba4..aa1748ce 100644
--- a/xmlwriter.c
+++ b/xmlwriter.c
@@ -123,14 +123,14 @@ static void
xmlWriterErrMsg(xmlTextWriterPtr ctxt, xmlParserErrors error,
const char *msg)
{
- if (ctxt != NULL) {
- __xmlRaiseError(NULL, NULL, NULL, ctxt->ctxt,
- NULL, XML_FROM_WRITER, error, XML_ERR_FATAL,
- NULL, 0, NULL, NULL, NULL, 0, 0, "%s", msg);
- } else {
- __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_WRITER, error,
- XML_ERR_FATAL, NULL, 0, NULL, NULL, NULL, 0, 0, "%s", msg);
- }
+ xmlParserCtxtPtr pctxt = NULL;
+
+ if (ctxt != NULL)
+ pctxt = ctxt->ctxt;
+
+ xmlRaiseError(NULL, NULL, NULL, pctxt,
+ NULL, XML_FROM_WRITER, error, XML_ERR_FATAL,
+ NULL, 0, NULL, NULL, NULL, 0, 0, "%s", msg);
}
/**
@@ -146,14 +146,14 @@ static void LIBXML_ATTR_FORMAT(3,0)
xmlWriterErrMsgInt(xmlTextWriterPtr ctxt, xmlParserErrors error,
const char *msg, int val)
{
- if (ctxt != NULL) {
- __xmlRaiseError(NULL, NULL, NULL, ctxt->ctxt,
- NULL, XML_FROM_WRITER, error, XML_ERR_FATAL,
- NULL, 0, NULL, NULL, NULL, val, 0, msg, val);
- } else {
- __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_WRITER, error,
- XML_ERR_FATAL, NULL, 0, NULL, NULL, NULL, val, 0, msg, val);
- }
+ xmlParserCtxtPtr pctxt = NULL;
+
+ if (ctxt != NULL)
+ pctxt = ctxt->ctxt;
+
+ xmlRaiseError(NULL, NULL, NULL, pctxt,
+ NULL, XML_FROM_WRITER, error, XML_ERR_FATAL,
+ NULL, 0, NULL, NULL, NULL, val, 0, msg, val);
}
/**
diff --git a/xpath.c b/xpath.c
index 1b1c438e..119d6a02 100644
--- a/xpath.c
+++ b/xpath.c
@@ -703,12 +703,12 @@ xmlXPathErr(xmlXPathParserContextPtr ctxt, int code)
data = xmlGenericErrorContext;
}
- res = __xmlRaiseError(schannel, channel, data, NULL, node, XML_FROM_XPATH,
- code + XML_XPATH_EXPRESSION_OK - XPATH_EXPRESSION_OK,
- XML_ERR_ERROR, NULL, 0,
- (const char *) ctxt->base, NULL, NULL,
- ctxt->cur - ctxt->base, 0,
- "%s", xmlXPathErrorMessages[code]);
+ res = xmlRaiseError(schannel, channel, data, NULL, node, XML_FROM_XPATH,
+ code + XML_XPATH_EXPRESSION_OK - XPATH_EXPRESSION_OK,
+ XML_ERR_ERROR, NULL, 0,
+ (const char *) ctxt->base, NULL, NULL,
+ ctxt->cur - ctxt->base, 0,
+ "%s", xmlXPathErrorMessages[code]);
if (res < 0)
xmlXPathPErrMemory(ctxt);
}
diff --git a/xpointer.c b/xpointer.c
index e643ab6b..369561d8 100644
--- a/xpointer.c
+++ b/xpointer.c
@@ -99,11 +99,11 @@ xmlXPtrErr(xmlXPathParserContextPtr ctxt, int code,
node = ctxt->context->debugNode;
}
- res = __xmlRaiseError(serror, NULL, data, NULL, node,
- XML_FROM_XPOINTER, code, XML_ERR_ERROR, NULL, 0,
- (const char *) extra, (const char *) ctxt->base,
- NULL, ctxt->cur - ctxt->base, 0,
- msg, extra);
+ res = xmlRaiseError(serror, NULL, data, NULL, node,
+ XML_FROM_XPOINTER, code, XML_ERR_ERROR, NULL, 0,
+ (const char *) extra, (const char *) ctxt->base,
+ NULL, ctxt->cur - ctxt->base, 0,
+ msg, extra);
if (res < 0)
xmlXPathPErrMemory(ctxt);
}