ReactOS 0.4.15-dev-8222-g9164419
error.c
Go to the documentation of this file.
1/*
2 * error.c: module displaying/handling XML parser errors
3 *
4 * See Copyright for the status of this software.
5 *
6 * Daniel Veillard <daniel@veillard.com>
7 */
8
9#define IN_LIBXML
10#include "libxml.h"
11
12#include <string.h>
13#include <stdarg.h>
14#include <libxml/parser.h>
15#include <libxml/xmlerror.h>
16#include <libxml/xmlmemory.h>
17#include <libxml/globals.h>
18
20 const char *msg,
21 ...) LIBXML_ATTR_FORMAT(2,3);
22
23#define XML_GET_VAR_STR(msg, str) { \
24 int size, prev_size = -1; \
25 int chars; \
26 char *larger; \
27 va_list ap; \
28 \
29 str = (char *) xmlMalloc(150); \
30 if (str != NULL) { \
31 \
32 size = 150; \
33 \
34 while (size < 64000) { \
35 va_start(ap, msg); \
36 chars = vsnprintf(str, size, msg, ap); \
37 va_end(ap); \
38 if ((chars > -1) && (chars < size)) { \
39 if (prev_size == chars) { \
40 break; \
41 } else { \
42 prev_size = chars; \
43 } \
44 } \
45 if (chars > -1) \
46 size += chars + 1; \
47 else \
48 size += 100; \
49 if ((larger = (char *) xmlRealloc(str, size)) == NULL) {\
50 break; \
51 } \
52 str = larger; \
53 }} \
54}
55
56/************************************************************************
57 * *
58 * Handling of out of context errors *
59 * *
60 ************************************************************************/
61
70void XMLCDECL
73
76
79 va_end(args);
80}
81
89void
91{
92 if (handler == NULL)
94 else
95 xmlGenericError = (*handler);
96}
97
112void
115 if (handler != NULL)
117 else
119}
120
133void
137}
138
139/************************************************************************
140 * *
141 * Handling of parsing errors *
142 * *
143 ************************************************************************/
144
152void
154 if (input != NULL) {
155 if (input->filename)
157 "%s:%d: ", input->filename,
158 input->line);
159 else
161 "Entity: line %d: ", input->line);
162 }
163}
164
172static void
174 xmlGenericErrorFunc channel, void *data ) {
175 const xmlChar *cur, *base;
176 unsigned int n, col; /* GCC warns if signed, because compared with sizeof() */
177 xmlChar content[81]; /* space for 80 chars + line terminator */
178 xmlChar *ctnt;
179
180 if ((input == NULL) || (input->cur == NULL))
181 return;
182
183 cur = input->cur;
184 base = input->base;
185 /* skip backwards over any end-of-lines */
186 while ((cur > base) && ((*(cur) == '\n') || (*(cur) == '\r'))) {
187 cur--;
188 }
189 n = 0;
190 /* search backwards for beginning-of-line (to max buff size) */
191 while ((n++ < (sizeof(content)-1)) && (cur > base) &&
192 (*(cur) != '\n') && (*(cur) != '\r'))
193 cur--;
194 if ((*(cur) == '\n') || (*(cur) == '\r')) cur++;
195 /* calculate the error position in terms of the current position */
196 col = input->cur - cur;
197 /* search forward for end-of-line (to max buff size) */
198 n = 0;
199 ctnt = content;
200 /* copy selected text to our buffer */
201 while ((*cur != 0) && (*(cur) != '\n') &&
202 (*(cur) != '\r') && (n < sizeof(content)-1)) {
203 *ctnt++ = *cur++;
204 n++;
205 }
206 *ctnt = 0;
207 /* print out the selected text */
208 channel(data ,"%s\n", content);
209 /* create blank line with problem pointer */
210 n = 0;
211 ctnt = content;
212 /* (leave buffer space for pointer + line terminator) */
213 while ((n<col) && (n++ < sizeof(content)-2) && (*ctnt != 0)) {
214 if (*(ctnt) != '\t')
215 *(ctnt) = ' ';
216 ctnt++;
217 }
218 *ctnt++ = '^';
219 *ctnt = 0;
220 channel(data ,"%s\n", content);
221}
222
229void
233}
234
244static void
246 xmlGenericErrorFunc channel, void *data)
247{
248 char *file = NULL;
249 int line = 0;
250 int code = -1;
251 int domain;
252 const xmlChar *name = NULL;
257
258 if (err == NULL)
259 return;
260
261 if (channel == NULL) {
262 channel = xmlGenericError;
264 }
265 file = err->file;
266 line = err->line;
267 code = err->code;
268 domain = err->domain;
269 level = err->level;
270 node = err->node;
271
272 if (code == XML_ERR_OK)
273 return;
274
275 if ((node != NULL) && (node->type == XML_ELEMENT_NODE))
276 name = node->name;
277
278 /*
279 * Maintain the compatibility with the legacy error handling
280 */
281 if (ctxt != NULL) {
282 input = ctxt->input;
283 if ((input != NULL) && (input->filename == NULL) &&
284 (ctxt->inputNr > 1)) {
285 cur = input;
286 input = ctxt->inputTab[ctxt->inputNr - 2];
287 }
288 if (input != NULL) {
289 if (input->filename)
290 channel(data, "%s:%d: ", input->filename, input->line);
291 else if ((line != 0) && (domain == XML_FROM_PARSER))
292 channel(data, "Entity: line %d: ", input->line);
293 }
294 } else {
295 if (file != NULL)
296 channel(data, "%s:%d: ", file, line);
297 else if ((line != 0) &&
301 channel(data, "Entity: line %d: ", line);
302 }
303 if (name != NULL) {
304 channel(data, "element %s: ", name);
305 }
306 switch (domain) {
307 case XML_FROM_PARSER:
308 channel(data, "parser ");
309 break;
311 channel(data, "namespace ");
312 break;
313 case XML_FROM_DTD:
314 case XML_FROM_VALID:
315 channel(data, "validity ");
316 break;
317 case XML_FROM_HTML:
318 channel(data, "HTML parser ");
319 break;
320 case XML_FROM_MEMORY:
321 channel(data, "memory ");
322 break;
323 case XML_FROM_OUTPUT:
324 channel(data, "output ");
325 break;
326 case XML_FROM_IO:
327 channel(data, "I/O ");
328 break;
330 channel(data, "XInclude ");
331 break;
332 case XML_FROM_XPATH:
333 channel(data, "XPath ");
334 break;
336 channel(data, "parser ");
337 break;
338 case XML_FROM_REGEXP:
339 channel(data, "regexp ");
340 break;
341 case XML_FROM_MODULE:
342 channel(data, "module ");
343 break;
345 channel(data, "Schemas validity ");
346 break;
348 channel(data, "Schemas parser ");
349 break;
351 channel(data, "Relax-NG parser ");
352 break;
354 channel(data, "Relax-NG validity ");
355 break;
356 case XML_FROM_CATALOG:
357 channel(data, "Catalog ");
358 break;
359 case XML_FROM_C14N:
360 channel(data, "C14N ");
361 break;
362 case XML_FROM_XSLT:
363 channel(data, "XSLT ");
364 break;
365 case XML_FROM_I18N:
366 channel(data, "encoding ");
367 break;
369 channel(data, "schematron ");
370 break;
371 case XML_FROM_BUFFER:
372 channel(data, "internal buffer ");
373 break;
374 case XML_FROM_URI:
375 channel(data, "URI ");
376 break;
377 default:
378 break;
379 }
380 switch (level) {
381 case XML_ERR_NONE:
382 channel(data, ": ");
383 break;
384 case XML_ERR_WARNING:
385 channel(data, "warning : ");
386 break;
387 case XML_ERR_ERROR:
388 channel(data, "error : ");
389 break;
390 case XML_ERR_FATAL:
391 channel(data, "error : ");
392 break;
393 }
394 if (str != NULL) {
395 int len;
396 len = xmlStrlen((const xmlChar *)str);
397 if ((len > 0) && (str[len - 1] != '\n'))
398 channel(data, "%s\n", str);
399 else
400 channel(data, "%s", str);
401 } else {
402 channel(data, "%s\n", "out of memory error");
403 }
404
405 if (ctxt != NULL) {
407 if (cur != NULL) {
408 if (cur->filename)
409 channel(data, "%s:%d: \n", cur->filename, cur->line);
410 else if ((line != 0) && (domain == XML_FROM_PARSER))
411 channel(data, "Entity: line %d: \n", cur->line);
413 }
414 }
415 if ((domain == XML_FROM_XPATH) && (err->str1 != NULL) &&
416 (err->int1 < 100) &&
417 (err->int1 < xmlStrlen((const xmlChar *)err->str1))) {
418 xmlChar buf[150];
419 int i;
420
421 channel(data, "%s\n", err->str1);
422 for (i=0;i < err->int1;i++)
423 buf[i] = ' ';
424 buf[i++] = '^';
425 buf[i] = 0;
426 channel(data, "%s\n", buf);
427 }
428}
429
454void XMLCDECL
455__xmlRaiseError(xmlStructuredErrorFunc schannel,
456 xmlGenericErrorFunc channel, void *data, void *ctx,
457 void *nod, int domain, int code, xmlErrorLevel level,
458 const char *file, int line, const char *str1,
459 const char *str2, const char *str3, int int1, int col,
460 const char *msg, ...)
461{
462 xmlParserCtxtPtr ctxt = NULL;
463 xmlNodePtr node = (xmlNodePtr) nod;
464 char *str = NULL;
467 xmlNodePtr baseptr = NULL;
468
469 if (code == XML_ERR_OK)
470 return;
472 return;
473 if ((domain == XML_FROM_PARSER) || (domain == XML_FROM_HTML) ||
476 ctxt = (xmlParserCtxtPtr) ctx;
477 if ((schannel == NULL) && (ctxt != NULL) && (ctxt->sax != NULL) &&
478 (ctxt->sax->initialized == XML_SAX2_MAGIC) &&
479 (ctxt->sax->serror != NULL)) {
480 schannel = ctxt->sax->serror;
481 data = ctxt->userData;
482 }
483 }
484 /*
485 * Check if structured error handler set
486 */
487 if (schannel == NULL) {
488 schannel = xmlStructuredError;
489 /*
490 * if user has defined handler, change data ptr to user's choice
491 */
492 if (schannel != NULL)
494 }
495 /*
496 * Formatting the message
497 */
498 if (msg == NULL) {
499 str = (char *) xmlStrdup(BAD_CAST "No error message provided");
500 } else {
502 }
503
504 /*
505 * specific processing if a parser context is provided
506 */
507 if (ctxt != NULL) {
508 if (file == NULL) {
509 input = ctxt->input;
510 if ((input != NULL) && (input->filename == NULL) &&
511 (ctxt->inputNr > 1)) {
512 input = ctxt->inputTab[ctxt->inputNr - 2];
513 }
514 if (input != NULL) {
515 file = input->filename;
516 line = input->line;
517 col = input->col;
518 }
519 }
520 to = &ctxt->lastError;
521 } else if ((node != NULL) && (file == NULL)) {
522 int i;
523
524 if ((node->doc != NULL) && (node->doc->URL != NULL)) {
525 baseptr = node;
526/* file = (const char *) node->doc->URL; */
527 }
528 for (i = 0;
529 ((i < 10) && (node != NULL) && (node->type != XML_ELEMENT_NODE));
530 i++)
531 node = node->parent;
532 if ((baseptr == NULL) && (node != NULL) &&
533 (node->doc != NULL) && (node->doc->URL != NULL))
534 baseptr = node;
535
536 if ((node != NULL) && (node->type == XML_ELEMENT_NODE))
537 line = node->line;
538 if ((line == 0) || (line == 65535))
540 }
541
542 /*
543 * Save the information about the error
544 */
545 xmlResetError(to);
546 to->domain = domain;
547 to->code = code;
548 to->message = str;
549 to->level = level;
550 if (file != NULL)
551 to->file = (char *) xmlStrdup((const xmlChar *) file);
552 else if (baseptr != NULL) {
553#ifdef LIBXML_XINCLUDE_ENABLED
554 /*
555 * We check if the error is within an XInclude section and,
556 * if so, attempt to print out the href of the XInclude instead
557 * of the usual "base" (doc->URL) for the node (bug 152623).
558 */
559 xmlNodePtr prev = baseptr;
560 char *href = NULL;
561 int inclcount = 0;
562 while (prev != NULL) {
563 if (prev->prev == NULL)
564 prev = prev->parent;
565 else {
566 prev = prev->prev;
567 if (prev->type == XML_XINCLUDE_START) {
568 if (inclcount > 0) {
569 --inclcount;
570 } else {
571 href = (char *) xmlGetProp(prev, BAD_CAST "href");
572 if (href != NULL)
573 break;
574 }
575 } else if (prev->type == XML_XINCLUDE_END)
576 inclcount++;
577 }
578 }
579 if (href != NULL)
580 to->file = href;
581 else
582#endif
583 to->file = (char *) xmlStrdup(baseptr->doc->URL);
584 if ((to->file == NULL) && (node != NULL) && (node->doc != NULL)) {
585 to->file = (char *) xmlStrdup(node->doc->URL);
586 }
587 }
588 to->line = line;
589 if (str1 != NULL)
590 to->str1 = (char *) xmlStrdup((const xmlChar *) str1);
591 if (str2 != NULL)
592 to->str2 = (char *) xmlStrdup((const xmlChar *) str2);
593 if (str3 != NULL)
594 to->str3 = (char *) xmlStrdup((const xmlChar *) str3);
595 to->int1 = int1;
596 to->int2 = col;
597 to->node = node;
598 to->ctxt = ctx;
599
600 if (to != &xmlLastError)
602
603 if (schannel != NULL) {
604 schannel(data, to);
605 return;
606 }
607
608 /*
609 * Find the callback channel if channel param is NULL
610 */
611 if ((ctxt != NULL) && (channel == NULL) &&
612 (xmlStructuredError == NULL) && (ctxt->sax != NULL)) {
613 if (level == XML_ERR_WARNING)
614 channel = ctxt->sax->warning;
615 else
616 channel = ctxt->sax->error;
617 data = ctxt->userData;
618 } else if (channel == NULL) {
619 channel = xmlGenericError;
620 if (ctxt != NULL) {
621 data = ctxt;
622 } else {
624 }
625 }
626 if (channel == NULL)
627 return;
628
629 if ((channel == xmlParserError) ||
630 (channel == xmlParserWarning) ||
631 (channel == xmlParserValidityError) ||
632 (channel == xmlParserValidityWarning))
633 xmlReportError(to, ctxt, str, NULL, NULL);
634 else if (((void(*)(void)) channel == (void(*)(void)) fprintf) ||
635 (channel == xmlGenericErrorDefaultFunc))
636 xmlReportError(to, ctxt, str, channel, data);
637 else
638 channel(data, "%s", str);
639}
640
650void
651__xmlSimpleError(int domain, int code, xmlNodePtr node,
652 const char *msg, const char *extra)
653{
654
655 if (code == XML_ERR_NO_MEMORY) {
656 if (extra)
657 __xmlRaiseError(NULL, NULL, NULL, NULL, node, domain,
659 NULL, NULL, 0, 0,
660 "Memory allocation failed : %s\n", extra);
661 else
662 __xmlRaiseError(NULL, NULL, NULL, NULL, node, domain,
664 NULL, NULL, 0, 0, "Memory allocation failed\n");
665 } else {
666 __xmlRaiseError(NULL, NULL, NULL, NULL, node, domain,
668 NULL, NULL, 0, 0, msg, extra);
669 }
670}
680void XMLCDECL
681xmlParserError(void *ctx, const char *msg, ...)
682{
686 char * str;
687
688 if (ctxt != NULL) {
689 input = ctxt->input;
690 if ((input != NULL) && (input->filename == NULL) &&
691 (ctxt->inputNr > 1)) {
692 cur = input;
693 input = ctxt->inputTab[ctxt->inputNr - 2];
694 }
696 }
697
701 if (str != NULL)
702 xmlFree(str);
703
704 if (ctxt != NULL) {
706 if (cur != NULL) {
710 }
711 }
712}
713
723void XMLCDECL
724xmlParserWarning(void *ctx, const char *msg, ...)
725{
729 char * str;
730
731 if (ctxt != NULL) {
732 input = ctxt->input;
733 if ((input != NULL) && (input->filename == NULL) &&
734 (ctxt->inputNr > 1)) {
735 cur = input;
736 input = ctxt->inputTab[ctxt->inputNr - 2];
737 }
739 }
740
744 if (str != NULL)
745 xmlFree(str);
746
747 if (ctxt != NULL) {
749 if (cur != NULL) {
753 }
754 }
755}
756
757/************************************************************************
758 * *
759 * Handling of validation errors *
760 * *
761 ************************************************************************/
762
772void XMLCDECL
773xmlParserValidityError(void *ctx, const char *msg, ...)
774{
777 char * str;
778 int len = xmlStrlen((const xmlChar *) msg);
779 static int had_info = 0;
780
781 if ((len > 1) && (msg[len - 2] != ':')) {
782 if (ctxt != NULL) {
783 input = ctxt->input;
784 if ((input->filename == NULL) && (ctxt->inputNr > 1))
785 input = ctxt->inputTab[ctxt->inputNr - 2];
786
787 if (had_info == 0) {
789 }
790 }
791 xmlGenericError(xmlGenericErrorContext, "validity error: ");
792 had_info = 0;
793 } else {
794 had_info = 1;
795 }
796
799 if (str != NULL)
800 xmlFree(str);
801
802 if ((ctxt != NULL) && (input != NULL)) {
804 }
805}
806
816void XMLCDECL
817xmlParserValidityWarning(void *ctx, const char *msg, ...)
818{
821 char * str;
822 int len = xmlStrlen((const xmlChar *) msg);
823
824 if ((ctxt != NULL) && (len != 0) && (msg[len - 1] != ':')) {
825 input = ctxt->input;
826 if ((input->filename == NULL) && (ctxt->inputNr > 1))
827 input = ctxt->inputTab[ctxt->inputNr - 2];
828
830 }
831
832 xmlGenericError(xmlGenericErrorContext, "validity warning: ");
835 if (str != NULL)
836 xmlFree(str);
837
838 if (ctxt != NULL) {
840 }
841}
842
843
844/************************************************************************
845 * *
846 * Extended Error Handling *
847 * *
848 ************************************************************************/
849
859xmlGetLastError(void)
860{
862 return (NULL);
863 return (&xmlLastError);
864}
865
872void
874{
875 if (err == NULL)
876 return;
877 if (err->code == XML_ERR_OK)
878 return;
879 if (err->message != NULL)
880 xmlFree(err->message);
881 if (err->file != NULL)
882 xmlFree(err->file);
883 if (err->str1 != NULL)
884 xmlFree(err->str1);
885 if (err->str2 != NULL)
886 xmlFree(err->str2);
887 if (err->str3 != NULL)
888 xmlFree(err->str3);
889 memset(err, 0, sizeof(xmlError));
890 err->code = XML_ERR_OK;
891}
892
899void
901{
903 return;
905}
906
917{
919
920 if (ctxt == NULL)
921 return (NULL);
922 if (ctxt->lastError.code == XML_ERR_OK)
923 return (NULL);
924 return (&ctxt->lastError);
925}
926
934void
936{
938
939 if (ctxt == NULL)
940 return;
941 ctxt->errNo = XML_ERR_OK;
942 if (ctxt->lastError.code == XML_ERR_OK)
943 return;
944 xmlResetError(&ctxt->lastError);
945}
946
956int
958 char *message, *file, *str1, *str2, *str3;
959
960 if ((from == NULL) || (to == NULL))
961 return(-1);
962
963 message = (char *) xmlStrdup((xmlChar *) from->message);
964 file = (char *) xmlStrdup ((xmlChar *) from->file);
965 str1 = (char *) xmlStrdup ((xmlChar *) from->str1);
966 str2 = (char *) xmlStrdup ((xmlChar *) from->str2);
967 str3 = (char *) xmlStrdup ((xmlChar *) from->str3);
968
969 if (to->message != NULL)
970 xmlFree(to->message);
971 if (to->file != NULL)
972 xmlFree(to->file);
973 if (to->str1 != NULL)
974 xmlFree(to->str1);
975 if (to->str2 != NULL)
976 xmlFree(to->str2);
977 if (to->str3 != NULL)
978 xmlFree(to->str3);
979 to->domain = from->domain;
980 to->code = from->code;
981 to->level = from->level;
982 to->line = from->line;
983 to->node = from->node;
984 to->int1 = from->int1;
985 to->int2 = from->int2;
986 to->node = from->node;
987 to->ctxt = from->ctxt;
988 to->message = message;
989 to->file = file;
990 to->str1 = str1;
991 to->str2 = str2;
992 to->str3 = str3;
993
994 return 0;
995}
996
char * va_list
Definition: acmsvcex.h:78
#define va_end(ap)
Definition: acmsvcex.h:90
#define va_start(ap, A)
Definition: acmsvcex.h:91
#define msg(x)
Definition: auth_time.c:54
#define NULL
Definition: types.h:112
content
Definition: atl_ax.c:994
UINT(* handler)(MSIPACKAGE *)
Definition: action.c:7482
FxCollectionEntry * cur
GLint level
Definition: gl.h:1546
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLdouble n
Definition: glext.h:7729
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLenum GLsizei len
Definition: glext.h:6722
GLenum GLenum GLenum input
Definition: glext.h:9031
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
Definition: glfuncs.h:248
#define ATTRIBUTE_UNUSED
Definition: i386-dis.c:36
@ extra
Definition: id3.c:95
#define stderr
Definition: stdio.h:100
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
_Check_return_opt_ _CRTIMP int __cdecl vfprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format, va_list _ArgList)
if(dx< 0)
Definition: linetemp.h:194
static BYTE int1[]
Definition: cert.c:3154
#define err(...)
const WCHAR * str
XMLPUBVAR void * xmlStructuredErrorContext
Definition: globals.h:361
XMLPUBVAR xmlStructuredErrorFunc xmlStructuredError
Definition: globals.h:345
XMLPUBVAR int xmlGetWarningsDefaultValue
Definition: globals.h:369
XMLPUBVAR xmlError xmlLastError
Definition: globals.h:270
XMLPUBVAR xmlFreeFunc xmlFree
Definition: globals.h:251
XMLPUBVAR void * xmlGenericErrorContext
Definition: globals.h:353
XMLPUBVAR xmlGenericErrorFunc xmlGenericError
Definition: globals.h:337
#define XML_SAX2_MAGIC
Definition: parser.h:671
XMLPUBFUN xmlChar *XMLCALL xmlGetProp(const xmlNode *node, const xmlChar *name)
xmlNode * xmlNodePtr
Definition: tree.h:488
@ XML_XINCLUDE_START
Definition: tree.h:178
@ XML_XINCLUDE_END
Definition: tree.h:179
@ XML_ELEMENT_NODE
Definition: tree.h:160
xmlParserCtxt * xmlParserCtxtPtr
Definition: tree.h:39
XMLPUBFUN long XMLCALL xmlGetLineNo(const xmlNode *node)
static void xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str, xmlGenericErrorFunc channel, void *data)
Definition: error.c:245
void xmlSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler)
Definition: error.c:134
void XMLCDECL xmlGenericErrorDefaultFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg,...) LIBXML_ATTR_FORMAT(2
Definition: error.c:71
void initGenericErrorDefaultFunc(xmlGenericErrorFunc *handler)
Definition: error.c:90
void xmlParserPrintFileContext(xmlParserInputPtr input)
Definition: error.c:230
void xmlSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler)
Definition: error.c:113
void xmlParserPrintFileInfo(xmlParserInputPtr input)
Definition: error.c:153
#define XML_GET_VAR_STR(msg, str)
Definition: error.c:23
static void xmlParserPrintFileContextInternal(xmlParserInputPtr input, xmlGenericErrorFunc channel, void *data)
Definition: error.c:173
#define memset(x, y, z)
Definition: compat.h:39
#define args
Definition: format.c:66
CardRegion * from
Definition: spigame.cpp:19
int code
Definition: xmlerror.h:80
char * file
Definition: xmlerror.h:83
xmlErrorLevel level
Definition: xmlerror.h:82
int int1
Definition: xmlerror.h:88
void * ctxt
Definition: xmlerror.h:90
char * str3
Definition: xmlerror.h:87
char * str1
Definition: xmlerror.h:85
void * node
Definition: xmlerror.h:91
int domain
Definition: xmlerror.h:79
char * str2
Definition: xmlerror.h:86
char * message
Definition: xmlerror.h:81
int line
Definition: xmlerror.h:84
int int2
Definition: xmlerror.h:89
Definition: tree.h:489
struct _xmlDoc * doc
Definition: tree.h:498
xmlElementType type
Definition: tree.h:491
struct _xmlNode * parent
Definition: tree.h:495
struct _xmlNode * prev
Definition: tree.h:497
xmlError lastError
Definition: parser.h:301
struct _xmlSAXHandler * sax
Definition: parser.h:185
xmlParserInputPtr * inputTab
Definition: parser.h:202
void * userData
Definition: parser.h:186
xmlParserInputPtr input
Definition: parser.h:199
Definition: match.c:390
Definition: inflate.c:139
Definition: cookie.c:42
Definition: fci.c:127
Definition: parser.c:49
Definition: tftpd.h:60
Definition: name.c:39
Definition: dlist.c:348
XMLPUBFUN void XMLCDECL XMLPUBFUN void XMLCDECL XMLPUBFUN void XMLCDECL XMLPUBFUN void XMLCDECL xmlParserValidityWarning(void *ctx, const char *msg,...) LIBXML_ATTR_FORMAT(2
void(XMLCDECL * xmlGenericErrorFunc)(void *ctx, const char *msg,...) LIBXML_ATTR_FORMAT(2
Definition: xmlerror.h:847
XMLPUBFUN void XMLCDECL xmlParserError(void *ctx, const char *msg,...) LIBXML_ATTR_FORMAT(2
XMLPUBFUN xmlErrorPtr XMLCALL xmlCtxtGetLastError(void *ctx)
XMLPUBFUN void XMLCDECL XMLPUBFUN void XMLCDECL XMLPUBFUN void XMLCDECL xmlParserValidityError(void *ctx, const char *msg,...) LIBXML_ATTR_FORMAT(2
XMLPUBFUN xmlErrorPtr XMLCALL xmlGetLastError(void)
xmlErrorLevel
Definition: xmlerror.h:24
@ XML_ERR_WARNING
Definition: xmlerror.h:26
@ XML_ERR_ERROR
Definition: xmlerror.h:27
@ XML_ERR_NONE
Definition: xmlerror.h:25
@ XML_ERR_FATAL
Definition: xmlerror.h:28
XMLPUBFUN void XMLCALL xmlCtxtResetLastError(void *ctx)
@ XML_FROM_PARSER
Definition: xmlerror.h:38
@ XML_FROM_XPOINTER
Definition: xmlerror.h:50
@ XML_FROM_SCHEMASP
Definition: xmlerror.h:53
@ XML_FROM_REGEXP
Definition: xmlerror.h:51
@ XML_FROM_CATALOG
Definition: xmlerror.h:57
@ XML_FROM_SCHEMASV
Definition: xmlerror.h:54
@ XML_FROM_MODULE
Definition: xmlerror.h:63
@ XML_FROM_URI
Definition: xmlerror.h:67
@ XML_FROM_IO
Definition: xmlerror.h:45
@ XML_FROM_VALID
Definition: xmlerror.h:60
@ XML_FROM_MEMORY
Definition: xmlerror.h:43
@ XML_FROM_BUFFER
Definition: xmlerror.h:66
@ XML_FROM_XPATH
Definition: xmlerror.h:49
@ XML_FROM_OUTPUT
Definition: xmlerror.h:44
@ XML_FROM_HTML
Definition: xmlerror.h:42
@ XML_FROM_NAMESPACE
Definition: xmlerror.h:40
@ XML_FROM_XSLT
Definition: xmlerror.h:59
@ XML_FROM_SCHEMATRONV
Definition: xmlerror.h:65
@ XML_FROM_RELAXNGV
Definition: xmlerror.h:56
@ XML_FROM_RELAXNGP
Definition: xmlerror.h:55
@ XML_FROM_XINCLUDE
Definition: xmlerror.h:48
@ XML_FROM_C14N
Definition: xmlerror.h:58
@ XML_FROM_I18N
Definition: xmlerror.h:64
@ XML_FROM_DTD
Definition: xmlerror.h:41
XMLPUBFUN void XMLCALL xmlResetError(xmlErrorPtr err)
XMLPUBFUN int XMLCALL xmlCopyError(xmlErrorPtr from, xmlErrorPtr to)
void(XMLCDECL *) typedef void(XMLCALL * xmlStructuredErrorFunc)(void *userData, xmlErrorPtr error)
Definition: xmlerror.h:858
@ XML_ERR_OK
Definition: xmlerror.h:100
@ XML_ERR_NO_MEMORY
Definition: xmlerror.h:102
XMLPUBFUN void XMLCALL xmlResetLastError(void)
XMLPUBFUN void XMLCDECL XMLPUBFUN void XMLCDECL xmlParserWarning(void *ctx, const char *msg,...) LIBXML_ATTR_FORMAT(2
#define XMLCDECL
Definition: xmlexports.h:52
XMLPUBFUN xmlChar *XMLCALL xmlStrdup(const xmlChar *cur)
Definition: xmlstring.c:67
#define BAD_CAST
Definition: xmlstring.h:35
XMLPUBFUN int XMLCALL xmlStrlen(const xmlChar *str)
Definition: xmlstring.c:426
unsigned char xmlChar
Definition: xmlstring.h:28
#define LIBXML_ATTR_FORMAT(fmt, args)
Definition: xmlversion.h:486