23 #define XML_GET_VAR_STR(msg, str) { \ 24 int size, prev_size = -1; \ 29 str = (char *) xmlMalloc(150); \ 34 while (size < 64000) { \ 36 chars = vsnprintf(str, size, msg, ap); \ 38 if ((chars > -1) && (chars < size)) { \ 39 if (prev_size == chars) { \ 49 if ((larger = (char *) xmlRealloc(str, size)) == NULL) {\ 157 "%s:%d: ",
input->filename,
161 "Entity: line %d: ",
input->line);
186 while ((
cur >
base) && ((*(
cur) ==
'\n') || (*(
cur) ==
'\r'))) {
192 (*(
cur) !=
'\n') && (*(
cur) !=
'\r'))
194 if ((*(
cur) ==
'\n') || (*(
cur) ==
'\r'))
cur++;
201 while ((*
cur != 0) && (*(
cur) !=
'\n') &&
213 while ((
n<col) && (
n++ <
sizeof(
content)-2) && (*ctnt != 0)) {
261 if (channel ==
NULL) {
292 channel(
data,
"Entity: line %d: ",
input->line);
297 else if ((
line != 0) &&
301 channel(
data,
"Entity: line %d: ",
line);
304 channel(
data,
"element %s: ",
name);
308 channel(
data,
"parser ");
311 channel(
data,
"namespace ");
315 channel(
data,
"validity ");
318 channel(
data,
"HTML parser ");
321 channel(
data,
"memory ");
324 channel(
data,
"output ");
327 channel(
data,
"I/O ");
330 channel(
data,
"XInclude ");
333 channel(
data,
"XPath ");
336 channel(
data,
"parser ");
339 channel(
data,
"regexp ");
342 channel(
data,
"module ");
345 channel(
data,
"Schemas validity ");
348 channel(
data,
"Schemas parser ");
351 channel(
data,
"Relax-NG parser ");
354 channel(
data,
"Relax-NG validity ");
357 channel(
data,
"Catalog ");
360 channel(
data,
"C14N ");
363 channel(
data,
"XSLT ");
366 channel(
data,
"encoding ");
369 channel(
data,
"schematron ");
372 channel(
data,
"internal buffer ");
375 channel(
data,
"URI ");
385 channel(
data,
"warning : ");
388 channel(
data,
"error : ");
391 channel(
data,
"error : ");
402 channel(
data,
"%s\n",
"out of memory error");
409 channel(
data,
"%s:%d: \n",
cur->filename,
cur->line);
411 channel(
data,
"Entity: line %d: \n",
cur->line);
421 channel(
data,
"%s\n",
err->str1);
422 for (
i=0;
i <
err->int1;
i++)
455 __xmlRaiseError(xmlStructuredErrorFunc schannel,
458 const char *
file,
int line,
const char *str1,
459 const char *str2,
const char *str3,
int int1,
int col,
460 const char *
msg, ...)
480 schannel = ctxt->
sax->serror;
487 if (schannel ==
NULL) {
492 if (schannel !=
NULL)
552 else if (baseptr !=
NULL) {
553 #ifdef LIBXML_XINCLUDE_ENABLED 562 while (prev !=
NULL) {
603 if (schannel !=
NULL) {
611 if ((ctxt !=
NULL) && (channel ==
NULL) &&
614 channel = ctxt->
sax->warning;
616 channel = ctxt->
sax->error;
618 }
else if (channel ==
NULL) {
634 else if (((
void(*)(
void)) channel == (
void(*)(
void))
fprintf) ||
660 "Memory allocation failed : %s\n",
extra);
664 NULL,
NULL, 0, 0,
"Memory allocation failed\n");
779 static int had_info = 0;
781 if ((
len > 1) && (
msg[
len - 2] !=
':')) {
void xmlSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler)
XMLPUBVAR int xmlGetWarningsDefaultValue
XMLPUBVAR xmlStructuredErrorFunc xmlStructuredError
xmlParserInputPtr * inputTab
XMLPUBFUN int XMLCALL xmlStrlen(const xmlChar *str)
XMLPUBFUN xmlChar *XMLCALL xmlGetProp(const xmlNode *node, const xmlChar *name)
GLenum GLuint GLenum GLsizei const GLchar * message
void xmlSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler)
XMLPUBFUN void XMLCALL xmlCtxtResetLastError(void *ctx)
static void xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str, xmlGenericErrorFunc channel, void *data)
void XMLCDECL xmlGenericErrorDefaultFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg,...) LIBXML_ATTR_FORMAT(2
GLenum GLuint GLenum GLsizei const GLchar * buf
XMLPUBVAR void * xmlStructuredErrorContext
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
XMLPUBVAR xmlGenericErrorFunc xmlGenericError
XMLPUBFUN long XMLCALL xmlGetLineNo(const xmlNode *node)
#define LIBXML_ATTR_FORMAT(fmt, args)
XMLPUBFUN int XMLCALL xmlCopyError(xmlErrorPtr from, xmlErrorPtr to)
XMLPUBFUN void XMLCDECL xmlParserError(void *ctx, const char *msg,...) LIBXML_ATTR_FORMAT(2
XMLPUBFUN void XMLCALL xmlResetLastError(void)
#define XML_GET_VAR_STR(msg, str)
XMLPUBVAR xmlFreeFunc xmlFree
static void xmlParserPrintFileContextInternal(xmlParserInputPtr input, xmlGenericErrorFunc channel, void *data)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
void initGenericErrorDefaultFunc(xmlGenericErrorFunc *handler)
struct _xmlSAXHandler * sax
XMLPUBFUN void XMLCALL xmlResetError(xmlErrorPtr err)
XMLPUBFUN void XMLCDECL XMLPUBFUN void XMLCDECL XMLPUBFUN void XMLCDECL XMLPUBFUN void XMLCDECL xmlParserValidityWarning(void *ctx, const char *msg,...) LIBXML_ATTR_FORMAT(2
GLenum GLenum GLenum input
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
XMLPUBFUN void XMLCDECL XMLPUBFUN void XMLCDECL xmlParserWarning(void *ctx, const char *msg,...) LIBXML_ATTR_FORMAT(2
void xmlParserPrintFileContext(xmlParserInputPtr input)
XMLPUBVAR xmlError xmlLastError
xmlParserCtxt * xmlParserCtxtPtr
XMLPUBFUN void XMLCDECL XMLPUBFUN void XMLCDECL XMLPUBFUN void XMLCDECL xmlParserValidityError(void *ctx, const char *msg,...) LIBXML_ATTR_FORMAT(2
void(XMLCDECL * xmlGenericErrorFunc)(void *ctx, const char *msg,...) LIBXML_ATTR_FORMAT(2
UINT(* handler)(MSIPACKAGE *)
_Check_return_opt_ _CRTIMP int __cdecl vfprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format, va_list _ArgList)
void xmlParserPrintFileInfo(xmlParserInputPtr input)
XMLPUBFUN xmlChar *XMLCALL xmlStrdup(const xmlChar *cur)
XMLPUBFUN xmlErrorPtr XMLCALL xmlCtxtGetLastError(void *ctx)
XMLPUBFUN xmlErrorPtr XMLCALL xmlGetLastError(void)
XMLPUBVAR void * xmlGenericErrorContext