20#define XML_MAX_ERRORS 100
22#define XML_GET_VAR_STR(msg, str) { \
23 int size, prev_size = -1; \
28 str = (char *) xmlMalloc(150); \
33 while (size < 64000) { \
35 chars = vsnprintf(str, size, msg, ap); \
37 if ((chars > -1) && (chars < size)) { \
38 if (prev_size == chars) { \
48 if ((larger = (char *) xmlRealloc(str, size)) == NULL) {\
158 "%s:%d: ",
input->filename,
162 "Entity: line %d: ",
input->line);
187 while ((
cur >
base) && ((*(
cur) ==
'\n') || (*(
cur) ==
'\r'))) {
193 (*
cur !=
'\n') && (*
cur !=
'\r')) {
197 if ((
n > 0) && ((*
cur ==
'\n') || (*
cur ==
'\r'))) {
201 while ((cur < input->
cur) && ((*
cur & 0xC0) == 0x80))
210 while ((*
cur != 0) && (*(
cur) !=
'\n') && (*(
cur) !=
'\r')) {
227 while ((
n<col) && (
n++ <
sizeof(
content)-2) && (*ctnt != 0)) {
275 if (channel ==
NULL) {
298 (ctxt->inputNr > 1)) {
300 input = ctxt->inputTab[ctxt->inputNr - 2];
306 channel(
data,
"Entity: line %d: ",
input->line);
311 else if ((
line != 0) &&
315 channel(
data,
"Entity: line %d: ",
line);
318 channel(
data,
"element %s: ",
name);
322 channel(
data,
"parser ");
325 channel(
data,
"namespace ");
329 channel(
data,
"validity ");
332 channel(
data,
"HTML parser ");
335 channel(
data,
"memory ");
338 channel(
data,
"output ");
341 channel(
data,
"I/O ");
344 channel(
data,
"XInclude ");
347 channel(
data,
"XPath ");
350 channel(
data,
"parser ");
353 channel(
data,
"regexp ");
356 channel(
data,
"module ");
359 channel(
data,
"Schemas validity ");
362 channel(
data,
"Schemas parser ");
365 channel(
data,
"Relax-NG parser ");
368 channel(
data,
"Relax-NG validity ");
371 channel(
data,
"Catalog ");
374 channel(
data,
"C14N ");
377 channel(
data,
"XSLT ");
380 channel(
data,
"encoding ");
383 channel(
data,
"schematron ");
386 channel(
data,
"internal buffer ");
389 channel(
data,
"URI ");
399 channel(
data,
"warning : ");
402 channel(
data,
"error : ");
405 channel(
data,
"error : ");
416 channel(
data,
"%s\n",
"out of memory error");
423 channel(
data,
"%s:%d: \n",
cur->filename,
cur->line);
425 channel(
data,
"Entity: line %d: \n",
cur->line);
435 channel(
data,
"%s\n",
err->str1);
436 for (
i=0;
i <
err->int1;
i++)
473 const char *
str2,
const char *str3,
int int1,
int col,
474 const char *
msg, ...)
476 xmlParserCtxtPtr ctxt =
NULL;
477 xmlNodePtr
node = (xmlNodePtr) nod;
481 xmlNodePtr baseptr =
NULL;
490 ctxt = (xmlParserCtxtPtr)
ctx;
496 ctxt->nbWarnings += 1;
503 if ((schannel ==
NULL) && (ctxt->sax !=
NULL) &&
505 (ctxt->sax->serror !=
NULL)) {
506 schannel = ctxt->sax->serror;
507 data = ctxt->userData;
514 if (schannel ==
NULL) {
519 if (schannel !=
NULL)
538 (ctxt->inputNr > 1)) {
539 input = ctxt->inputTab[ctxt->inputNr - 2];
547 to = &ctxt->lastError;
556 ((
i < 10) && (
node !=
NULL) && (
node->type != XML_ELEMENT_NODE));
579 else if (baseptr !=
NULL) {
580#ifdef LIBXML_XINCLUDE_ENABLED
586 xmlNodePtr prev = baseptr;
589 while (prev !=
NULL) {
590 if (prev->prev ==
NULL)
594 if (prev->type == XML_XINCLUDE_START) {
598 href = (
char *) xmlGetProp(prev,
BAD_CAST "href");
602 }
else if (prev->type == XML_XINCLUDE_END)
630 if (schannel !=
NULL) {
638 if ((ctxt !=
NULL) && (channel ==
NULL) &&
641 channel = ctxt->sax->warning;
643 channel = ctxt->sax->error;
644 data = ctxt->userData;
645 }
else if (channel ==
NULL) {
661 else if (((
void(*)(
void)) channel == (
void(*)(
void))
fprintf) ||
687 "Memory allocation failed : %s\n",
extra);
691 NULL,
NULL, 0, 0,
"Memory allocation failed\n");
710 xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr)
ctx;
718 (ctxt->inputNr > 1)) {
720 input = ctxt->inputTab[ctxt->inputNr - 2];
753 xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr)
ctx;
761 (ctxt->inputNr > 1)) {
763 input = ctxt->inputTab[ctxt->inputNr - 2];
802 xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr)
ctx;
806 static int had_info = 0;
808 if ((
len > 1) && (
msg[
len - 2] !=
':')) {
811 if ((
input->filename ==
NULL) && (ctxt->inputNr > 1))
812 input = ctxt->inputTab[ctxt->inputNr - 2];
846 xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr)
ctx;
853 if ((
input->filename ==
NULL) && (ctxt->inputNr > 1))
854 input = ctxt->inputTab[ctxt->inputNr - 2];
945 xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr)
ctx;
951 return (&ctxt->lastError);
964 xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr)
ctx;
UINT(* handler)(MSIPACKAGE *)
int WINAPIV fprintf(FILE *file, const char *format,...)
int CDECL vfprintf(FILE *file, const char *format, va_list valist)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLenum GLuint GLenum GLsizei const GLchar * buf
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
#define memcpy(s1, s2, n)
static void xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str, xmlGenericErrorFunc channel, void *data)
void xmlGenericErrorDefaultFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg,...)
void xmlSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler)
void initGenericErrorDefaultFunc(xmlGenericErrorFunc *handler)
void xmlParserPrintFileContext(xmlParserInputPtr input)
void xmlSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler)
void xmlParserPrintFileInfo(xmlParserInputPtr input)
#define XML_GET_VAR_STR(msg, str)
static void xmlParserPrintFileContextInternal(xmlParserInputPtr input, xmlGenericErrorFunc channel, void *data)
void * xmlGenericErrorContext
xmlGenericErrorFunc xmlGenericError
void * xmlStructuredErrorContext
xmlStructuredErrorFunc xmlStructuredError
int xmlGetWarningsDefaultValue
XML_HIDDEN void XML_HIDDEN void __xmlSimpleError(int domain, int code, struct _xmlNode *node, const char *msg, const char *extra) LIBXML_ATTR_FORMAT(4
XML_HIDDEN void __xmlRaiseError(xmlStructuredErrorFunc schannel, xmlGenericErrorFunc channel, void *data, void *ctx, void *nod, 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
XML_HIDDEN void xmlParserErrors const char const xmlChar const xmlChar * str2
XML_HIDDEN void xmlParserErrors const char const xmlChar * str1
XMLPUBFUN int xmlCopyError(const xmlError *from, xmlErrorPtr to)
XMLPUBFUN void xmlParserError(void *ctx, const char *msg,...) LIBXML_ATTR_FORMAT(2
XMLPUBFUN const xmlError * xmlCtxtGetLastError(void *ctx)
XMLPUBFUN void xmlResetError(xmlErrorPtr err)
XMLPUBFUN void xmlResetLastError(void)
void(*) typedef void(* xmlStructuredErrorFunc)(void *userData, const xmlError *error)
XMLPUBFUN void XMLPUBFUN void xmlParserWarning(void *ctx, const char *msg,...) LIBXML_ATTR_FORMAT(2
XMLPUBFUN void xmlCtxtResetLastError(void *ctx)
XMLPUBFUN void XMLPUBFUN void XMLPUBFUN void xmlParserValidityError(void *ctx, const char *msg,...) LIBXML_ATTR_FORMAT(2
XMLPUBFUN const xmlError * xmlGetLastError(void)
void(* xmlGenericErrorFunc)(void *ctx, const char *msg,...) LIBXML_ATTR_FORMAT(2
XMLPUBFUN void XMLPUBFUN void XMLPUBFUN void XMLPUBFUN void xmlParserValidityWarning(void *ctx, const char *msg,...) LIBXML_ATTR_FORMAT(2
XMLPUBFUN int XMLPUBFUN int XMLPUBFUN int xmlGetUTF8Char(const unsigned char *utf, int *len)
XMLPUBFUN int xmlStrlen(const xmlChar *str)
XMLPUBFUN xmlChar * xmlStrdup(const xmlChar *cur)