mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-27 18:50:07 +03:00
error: Remove underscores from xmlRaiseError
This commit is contained in:
parent
3ff8a2c4b8
commit
598ee0d2c6
@ -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);
|
||||
}
|
||||
|
10
catalog.c
10
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();
|
||||
}
|
||||
|
14
error.c
14
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;
|
||||
|
@ -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);
|
||||
|
16
relaxng.c
16
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);
|
||||
}
|
||||
|
38
schematron.c
38
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 {
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
32
xmlwriter.c
32
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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
12
xpath.c
12
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);
|
||||
}
|
||||
|
10
xpointer.c
10
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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user