ReactOS 0.4.16-dev-2206-gc56950d
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
18#include "private/error.h"
19
20#define XML_MAX_ERRORS 100
21
22#define XML_GET_VAR_STR(msg, str) { \
23 int size, prev_size = -1; \
24 int chars; \
25 char *larger; \
26 va_list ap; \
27 \
28 str = (char *) xmlMalloc(150); \
29 if (str != NULL) { \
30 \
31 size = 150; \
32 \
33 while (size < 64000) { \
34 va_start(ap, msg); \
35 chars = vsnprintf(str, size, msg, ap); \
36 va_end(ap); \
37 if ((chars > -1) && (chars < size)) { \
38 if (prev_size == chars) { \
39 break; \
40 } else { \
41 prev_size = chars; \
42 } \
43 } \
44 if (chars > -1) \
45 size += chars + 1; \
46 else \
47 size += 100; \
48 if ((larger = (char *) xmlRealloc(str, size)) == NULL) {\
49 break; \
50 } \
51 str = larger; \
52 }} \
53}
54
55/************************************************************************
56 * *
57 * Handling of out of context errors *
58 * *
59 ************************************************************************/
60
69void
72
75
78 va_end(args);
79}
80
90void
92{
93 if (handler == NULL)
95 else
96 xmlGenericError = (*handler);
97}
98
113void
116 if (handler != NULL)
118 else
120}
121
134void
138}
139
140/************************************************************************
141 * *
142 * Handling of parsing errors *
143 * *
144 ************************************************************************/
145
153void
154xmlParserPrintFileInfo(xmlParserInputPtr input) {
155 if (input != NULL) {
156 if (input->filename)
158 "%s:%d: ", input->filename,
159 input->line);
160 else
162 "Entity: line %d: ", input->line);
163 }
164}
165
173static void
175 xmlGenericErrorFunc channel, void *data ) {
176 const xmlChar *cur, *base, *start;
177 unsigned int n, col; /* GCC warns if signed, because compared with sizeof() */
178 xmlChar content[81]; /* space for 80 chars + line terminator */
179 xmlChar *ctnt;
180
181 if ((input == NULL) || (input->cur == NULL))
182 return;
183
184 cur = input->cur;
185 base = input->base;
186 /* skip backwards over any end-of-lines */
187 while ((cur > base) && ((*(cur) == '\n') || (*(cur) == '\r'))) {
188 cur--;
189 }
190 n = 0;
191 /* search backwards for beginning-of-line (to max buff size) */
192 while ((n < sizeof(content) - 1) && (cur > base) &&
193 (*cur != '\n') && (*cur != '\r')) {
194 cur--;
195 n++;
196 }
197 if ((n > 0) && ((*cur == '\n') || (*cur == '\r'))) {
198 cur++;
199 } else {
200 /* skip over continuation bytes */
201 while ((cur < input->cur) && ((*cur & 0xC0) == 0x80))
202 cur++;
203 }
204 /* calculate the error position in terms of the current position */
205 col = input->cur - cur;
206 /* search forward for end-of-line (to max buff size) */
207 n = 0;
208 start = cur;
209 /* copy selected text to our buffer */
210 while ((*cur != 0) && (*(cur) != '\n') && (*(cur) != '\r')) {
211 int len = input->end - cur;
212 int c = xmlGetUTF8Char(cur, &len);
213
214 if ((c < 0) || (n + len > sizeof(content)-1))
215 break;
216 cur += len;
217 n += len;
218 }
220 content[n] = 0;
221 /* print out the selected text */
222 channel(data ,"%s\n", content);
223 /* create blank line with problem pointer */
224 n = 0;
225 ctnt = content;
226 /* (leave buffer space for pointer + line terminator) */
227 while ((n<col) && (n++ < sizeof(content)-2) && (*ctnt != 0)) {
228 if (*(ctnt) != '\t')
229 *(ctnt) = ' ';
230 ctnt++;
231 }
232 *ctnt++ = '^';
233 *ctnt = 0;
234 channel(data ,"%s\n", content);
235}
236
243void
247}
248
258static void
259xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str,
260 xmlGenericErrorFunc channel, void *data)
261{
262 char *file = NULL;
263 int line = 0;
264 int code = -1;
265 int domain;
266 const xmlChar *name = NULL;
267 xmlNodePtr node;
269 xmlParserInputPtr input = NULL;
270 xmlParserInputPtr cur = NULL;
271
272 if (err == NULL)
273 return;
274
275 if (channel == NULL) {
276 channel = xmlGenericError;
278 }
279 file = err->file;
280 line = err->line;
281 code = err->code;
282 domain = err->domain;
283 level = err->level;
284 node = err->node;
285
286 if (code == XML_ERR_OK)
287 return;
288
289 if ((node != NULL) && (node->type == XML_ELEMENT_NODE))
290 name = node->name;
291
292 /*
293 * Maintain the compatibility with the legacy error handling
294 */
295 if (ctxt != NULL) {
296 input = ctxt->input;
297 if ((input != NULL) && (input->filename == NULL) &&
298 (ctxt->inputNr > 1)) {
299 cur = input;
300 input = ctxt->inputTab[ctxt->inputNr - 2];
301 }
302 if (input != NULL) {
303 if (input->filename)
304 channel(data, "%s:%d: ", input->filename, input->line);
305 else if ((line != 0) && (domain == XML_FROM_PARSER))
306 channel(data, "Entity: line %d: ", input->line);
307 }
308 } else {
309 if (file != NULL)
310 channel(data, "%s:%d: ", file, line);
311 else if ((line != 0) &&
315 channel(data, "Entity: line %d: ", line);
316 }
317 if (name != NULL) {
318 channel(data, "element %s: ", name);
319 }
320 switch (domain) {
321 case XML_FROM_PARSER:
322 channel(data, "parser ");
323 break;
325 channel(data, "namespace ");
326 break;
327 case XML_FROM_DTD:
328 case XML_FROM_VALID:
329 channel(data, "validity ");
330 break;
331 case XML_FROM_HTML:
332 channel(data, "HTML parser ");
333 break;
334 case XML_FROM_MEMORY:
335 channel(data, "memory ");
336 break;
337 case XML_FROM_OUTPUT:
338 channel(data, "output ");
339 break;
340 case XML_FROM_IO:
341 channel(data, "I/O ");
342 break;
344 channel(data, "XInclude ");
345 break;
346 case XML_FROM_XPATH:
347 channel(data, "XPath ");
348 break;
350 channel(data, "parser ");
351 break;
352 case XML_FROM_REGEXP:
353 channel(data, "regexp ");
354 break;
355 case XML_FROM_MODULE:
356 channel(data, "module ");
357 break;
359 channel(data, "Schemas validity ");
360 break;
362 channel(data, "Schemas parser ");
363 break;
365 channel(data, "Relax-NG parser ");
366 break;
368 channel(data, "Relax-NG validity ");
369 break;
370 case XML_FROM_CATALOG:
371 channel(data, "Catalog ");
372 break;
373 case XML_FROM_C14N:
374 channel(data, "C14N ");
375 break;
376 case XML_FROM_XSLT:
377 channel(data, "XSLT ");
378 break;
379 case XML_FROM_I18N:
380 channel(data, "encoding ");
381 break;
383 channel(data, "schematron ");
384 break;
385 case XML_FROM_BUFFER:
386 channel(data, "internal buffer ");
387 break;
388 case XML_FROM_URI:
389 channel(data, "URI ");
390 break;
391 default:
392 break;
393 }
394 switch (level) {
395 case XML_ERR_NONE:
396 channel(data, ": ");
397 break;
398 case XML_ERR_WARNING:
399 channel(data, "warning : ");
400 break;
401 case XML_ERR_ERROR:
402 channel(data, "error : ");
403 break;
404 case XML_ERR_FATAL:
405 channel(data, "error : ");
406 break;
407 }
408 if (str != NULL) {
409 int len;
410 len = xmlStrlen((const xmlChar *)str);
411 if ((len > 0) && (str[len - 1] != '\n'))
412 channel(data, "%s\n", str);
413 else
414 channel(data, "%s", str);
415 } else {
416 channel(data, "%s\n", "out of memory error");
417 }
418
419 if (ctxt != NULL) {
421 if (cur != NULL) {
422 if (cur->filename)
423 channel(data, "%s:%d: \n", cur->filename, cur->line);
424 else if ((line != 0) && (domain == XML_FROM_PARSER))
425 channel(data, "Entity: line %d: \n", cur->line);
427 }
428 }
429 if ((domain == XML_FROM_XPATH) && (err->str1 != NULL) &&
430 (err->int1 < 100) &&
431 (err->int1 < xmlStrlen((const xmlChar *)err->str1))) {
432 xmlChar buf[150];
433 int i;
434
435 channel(data, "%s\n", err->str1);
436 for (i=0;i < err->int1;i++)
437 buf[i] = ' ';
438 buf[i++] = '^';
439 buf[i] = 0;
440 channel(data, "%s\n", buf);
441 }
442}
443
468void
470 xmlGenericErrorFunc channel, void *data, void *ctx,
471 void *nod, int domain, int code, xmlErrorLevel level,
472 const char *file, int line, const char *str1,
473 const char *str2, const char *str3, int int1, int col,
474 const char *msg, ...)
475{
476 xmlParserCtxtPtr ctxt = NULL;
477 xmlNodePtr node = (xmlNodePtr) nod;
478 char *str = NULL;
479 xmlParserInputPtr input = NULL;
481 xmlNodePtr baseptr = NULL;
482
483 if (code == XML_ERR_OK)
484 return;
486 return;
487 if ((domain == XML_FROM_PARSER) || (domain == XML_FROM_HTML) ||
490 ctxt = (xmlParserCtxtPtr) ctx;
491
492 if (ctxt != NULL) {
493 if (level == XML_ERR_WARNING) {
494 if (ctxt->nbWarnings >= XML_MAX_ERRORS)
495 return;
496 ctxt->nbWarnings += 1;
497 } else {
498 if (ctxt->nbErrors >= XML_MAX_ERRORS)
499 return;
500 ctxt->nbErrors += 1;
501 }
502
503 if ((schannel == NULL) && (ctxt->sax != NULL) &&
504 (ctxt->sax->initialized == XML_SAX2_MAGIC) &&
505 (ctxt->sax->serror != NULL)) {
506 schannel = ctxt->sax->serror;
507 data = ctxt->userData;
508 }
509 }
510 }
511 /*
512 * Check if structured error handler set
513 */
514 if (schannel == NULL) {
515 schannel = xmlStructuredError;
516 /*
517 * if user has defined handler, change data ptr to user's choice
518 */
519 if (schannel != NULL)
521 }
522 /*
523 * Formatting the message
524 */
525 if (msg == NULL) {
526 str = (char *) xmlStrdup(BAD_CAST "No error message provided");
527 } else {
529 }
530
531 /*
532 * specific processing if a parser context is provided
533 */
534 if (ctxt != NULL) {
535 if (file == NULL) {
536 input = ctxt->input;
537 if ((input != NULL) && (input->filename == NULL) &&
538 (ctxt->inputNr > 1)) {
539 input = ctxt->inputTab[ctxt->inputNr - 2];
540 }
541 if (input != NULL) {
542 file = input->filename;
543 line = input->line;
544 col = input->col;
545 }
546 }
547 to = &ctxt->lastError;
548 } else if ((node != NULL) && (file == NULL)) {
549 int i;
550
551 if ((node->doc != NULL) && (node->doc->URL != NULL)) {
552 baseptr = node;
553/* file = (const char *) node->doc->URL; */
554 }
555 for (i = 0;
556 ((i < 10) && (node != NULL) && (node->type != XML_ELEMENT_NODE));
557 i++)
558 node = node->parent;
559 if ((baseptr == NULL) && (node != NULL) &&
560 (node->doc != NULL) && (node->doc->URL != NULL))
561 baseptr = node;
562
563 if ((node != NULL) && (node->type == XML_ELEMENT_NODE))
564 line = node->line;
565 if ((line == 0) || (line == 65535))
566 line = xmlGetLineNo(node);
567 }
568
569 /*
570 * Save the information about the error
571 */
572 xmlResetError(to);
573 to->domain = domain;
574 to->code = code;
575 to->message = str;
576 to->level = level;
577 if (file != NULL)
578 to->file = (char *) xmlStrdup((const xmlChar *) file);
579 else if (baseptr != NULL) {
580#ifdef LIBXML_XINCLUDE_ENABLED
581 /*
582 * We check if the error is within an XInclude section and,
583 * if so, attempt to print out the href of the XInclude instead
584 * of the usual "base" (doc->URL) for the node (bug 152623).
585 */
586 xmlNodePtr prev = baseptr;
587 char *href = NULL;
588 int inclcount = 0;
589 while (prev != NULL) {
590 if (prev->prev == NULL)
591 prev = prev->parent;
592 else {
593 prev = prev->prev;
594 if (prev->type == XML_XINCLUDE_START) {
595 if (inclcount > 0) {
596 --inclcount;
597 } else {
598 href = (char *) xmlGetProp(prev, BAD_CAST "href");
599 if (href != NULL)
600 break;
601 }
602 } else if (prev->type == XML_XINCLUDE_END)
603 inclcount++;
604 }
605 }
606 if (href != NULL)
607 to->file = href;
608 else
609#endif
610 to->file = (char *) xmlStrdup(baseptr->doc->URL);
611 if ((to->file == NULL) && (node != NULL) && (node->doc != NULL)) {
612 to->file = (char *) xmlStrdup(node->doc->URL);
613 }
614 }
615 to->line = line;
616 if (str1 != NULL)
617 to->str1 = (char *) xmlStrdup((const xmlChar *) str1);
618 if (str2 != NULL)
619 to->str2 = (char *) xmlStrdup((const xmlChar *) str2);
620 if (str3 != NULL)
621 to->str3 = (char *) xmlStrdup((const xmlChar *) str3);
622 to->int1 = int1;
623 to->int2 = col;
624 to->node = node;
625 to->ctxt = ctx;
626
627 if (to != &xmlLastError)
629
630 if (schannel != NULL) {
631 schannel(data, to);
632 return;
633 }
634
635 /*
636 * Find the callback channel if channel param is NULL
637 */
638 if ((ctxt != NULL) && (channel == NULL) &&
639 (xmlStructuredError == NULL) && (ctxt->sax != NULL)) {
640 if (level == XML_ERR_WARNING)
641 channel = ctxt->sax->warning;
642 else
643 channel = ctxt->sax->error;
644 data = ctxt->userData;
645 } else if (channel == NULL) {
646 channel = xmlGenericError;
647 if (ctxt != NULL) {
648 data = ctxt;
649 } else {
651 }
652 }
653 if (channel == NULL)
654 return;
655
656 if ((channel == xmlParserError) ||
657 (channel == xmlParserWarning) ||
658 (channel == xmlParserValidityError) ||
659 (channel == xmlParserValidityWarning))
660 xmlReportError(to, ctxt, str, NULL, NULL);
661 else if (((void(*)(void)) channel == (void(*)(void)) fprintf) ||
662 (channel == xmlGenericErrorDefaultFunc))
663 xmlReportError(to, ctxt, str, channel, data);
664 else
665 channel(data, "%s", str);
666}
667
677void
678__xmlSimpleError(int domain, int code, xmlNodePtr node,
679 const char *msg, const char *extra)
680{
681
682 if (code == XML_ERR_NO_MEMORY) {
683 if (extra)
686 NULL, NULL, 0, 0,
687 "Memory allocation failed : %s\n", extra);
688 else
691 NULL, NULL, 0, 0, "Memory allocation failed\n");
692 } else {
695 NULL, NULL, 0, 0, msg, extra);
696 }
697}
707void
708xmlParserError(void *ctx, const char *msg, ...)
709{
710 xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
711 xmlParserInputPtr input = NULL;
712 xmlParserInputPtr cur = NULL;
713 char * str;
714
715 if (ctxt != NULL) {
716 input = ctxt->input;
717 if ((input != NULL) && (input->filename == NULL) &&
718 (ctxt->inputNr > 1)) {
719 cur = input;
720 input = ctxt->inputTab[ctxt->inputNr - 2];
721 }
723 }
724
728 if (str != NULL)
729 xmlFree(str);
730
731 if (ctxt != NULL) {
733 if (cur != NULL) {
737 }
738 }
739}
740
750void
751xmlParserWarning(void *ctx, const char *msg, ...)
752{
753 xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
754 xmlParserInputPtr input = NULL;
755 xmlParserInputPtr cur = NULL;
756 char * str;
757
758 if (ctxt != NULL) {
759 input = ctxt->input;
760 if ((input != NULL) && (input->filename == NULL) &&
761 (ctxt->inputNr > 1)) {
762 cur = input;
763 input = ctxt->inputTab[ctxt->inputNr - 2];
764 }
766 }
767
771 if (str != NULL)
772 xmlFree(str);
773
774 if (ctxt != NULL) {
776 if (cur != NULL) {
780 }
781 }
782}
783
784/************************************************************************
785 * *
786 * Handling of validation errors *
787 * *
788 ************************************************************************/
789
799void
800xmlParserValidityError(void *ctx, const char *msg, ...)
801{
802 xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
803 xmlParserInputPtr input = NULL;
804 char * str;
805 int len = xmlStrlen((const xmlChar *) msg);
806 static int had_info = 0;
807
808 if ((len > 1) && (msg[len - 2] != ':')) {
809 if (ctxt != NULL) {
810 input = ctxt->input;
811 if ((input->filename == NULL) && (ctxt->inputNr > 1))
812 input = ctxt->inputTab[ctxt->inputNr - 2];
813
814 if (had_info == 0) {
816 }
817 }
818 xmlGenericError(xmlGenericErrorContext, "validity error: ");
819 had_info = 0;
820 } else {
821 had_info = 1;
822 }
823
826 if (str != NULL)
827 xmlFree(str);
828
829 if ((ctxt != NULL) && (input != NULL)) {
831 }
832}
833
843void
844xmlParserValidityWarning(void *ctx, const char *msg, ...)
845{
846 xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
847 xmlParserInputPtr input = NULL;
848 char * str;
849 int len = xmlStrlen((const xmlChar *) msg);
850
851 if ((ctxt != NULL) && (len != 0) && (msg[len - 1] != ':')) {
852 input = ctxt->input;
853 if ((input->filename == NULL) && (ctxt->inputNr > 1))
854 input = ctxt->inputTab[ctxt->inputNr - 2];
855
857 }
858
859 xmlGenericError(xmlGenericErrorContext, "validity warning: ");
862 if (str != NULL)
863 xmlFree(str);
864
865 if (ctxt != NULL) {
867 }
868}
869
870
871/************************************************************************
872 * *
873 * Extended Error Handling *
874 * *
875 ************************************************************************/
876
885const xmlError *
886xmlGetLastError(void)
887{
889 return (NULL);
890 return (&xmlLastError);
891}
892
899void
901{
902 if (err == NULL)
903 return;
904 if (err->code == XML_ERR_OK)
905 return;
906 if (err->message != NULL)
907 xmlFree(err->message);
908 if (err->file != NULL)
909 xmlFree(err->file);
910 if (err->str1 != NULL)
911 xmlFree(err->str1);
912 if (err->str2 != NULL)
913 xmlFree(err->str2);
914 if (err->str3 != NULL)
915 xmlFree(err->str3);
916 memset(err, 0, sizeof(xmlError));
917 err->code = XML_ERR_OK;
918}
919
926void
928{
930 return;
932}
933
942const xmlError *
944{
945 xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
946
947 if (ctxt == NULL)
948 return (NULL);
949 if (ctxt->lastError.code == XML_ERR_OK)
950 return (NULL);
951 return (&ctxt->lastError);
952}
953
961void
963{
964 xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
965
966 if (ctxt == NULL)
967 return;
968 ctxt->errNo = XML_ERR_OK;
969 if (ctxt->lastError.code == XML_ERR_OK)
970 return;
971 xmlResetError(&ctxt->lastError);
972}
973
983int
985 char *message, *file, *str1, *str2, *str3;
986
987 if ((from == NULL) || (to == NULL))
988 return(-1);
989
990 message = (char *) xmlStrdup((xmlChar *) from->message);
991 file = (char *) xmlStrdup ((xmlChar *) from->file);
992 str1 = (char *) xmlStrdup ((xmlChar *) from->str1);
993 str2 = (char *) xmlStrdup ((xmlChar *) from->str2);
994 str3 = (char *) xmlStrdup ((xmlChar *) from->str3);
995
996 if (to->message != NULL)
997 xmlFree(to->message);
998 if (to->file != NULL)
999 xmlFree(to->file);
1000 if (to->str1 != NULL)
1001 xmlFree(to->str1);
1002 if (to->str2 != NULL)
1003 xmlFree(to->str2);
1004 if (to->str3 != NULL)
1005 xmlFree(to->str3);
1006 to->domain = from->domain;
1007 to->code = from->code;
1008 to->level = from->level;
1009 to->line = from->line;
1010 to->node = from->node;
1011 to->int1 = from->int1;
1012 to->int2 = from->int2;
1013 to->node = from->node;
1014 to->ctxt = from->ctxt;
1015 to->message = message;
1016 to->file = file;
1017 to->str1 = str1;
1018 to->str2 = str2;
1019 to->str3 = str3;
1020
1021 return 0;
1022}
#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:7512
int WINAPIV fprintf(FILE *file, const char *format,...)
Definition: file.c:5549
int CDECL vfprintf(FILE *file, const char *format, va_list valist)
Definition: file.c:5349
#define stderr
#define va_end(v)
Definition: stdarg.h:28
#define va_start(v, l)
Definition: stdarg.h:26
char * va_list
Definition: vadefs.h:50
FxCollectionEntry * cur
GLuint start
Definition: gl.h:1545
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
const GLubyte * c
Definition: glext.h:8905
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
if(dx< 0)
Definition: linetemp.h:194
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static BYTE int1[]
Definition: cert.c:3203
#define err(...)
const WCHAR * str
static void xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str, xmlGenericErrorFunc channel, void *data)
Definition: error.c:259
void xmlGenericErrorDefaultFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg,...)
Definition: error.c:70
void xmlSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler)
Definition: error.c:135
void initGenericErrorDefaultFunc(xmlGenericErrorFunc *handler)
Definition: error.c:91
#define XML_MAX_ERRORS
Definition: error.c:20
void xmlParserPrintFileContext(xmlParserInputPtr input)
Definition: error.c:244
void xmlSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler)
Definition: error.c:114
void xmlParserPrintFileInfo(xmlParserInputPtr input)
Definition: error.c:154
#define XML_GET_VAR_STR(msg, str)
Definition: error.c:22
static void xmlParserPrintFileContextInternal(xmlParserInputPtr input, xmlGenericErrorFunc channel, void *data)
Definition: error.c:174
void * xmlGenericErrorContext
Definition: globals.c:410
xmlFreeFunc xmlFree
Definition: globals.c:184
xmlGenericErrorFunc xmlGenericError
Definition: globals.c:396
xmlError xmlLastError
Definition: globals.c:419
void * xmlStructuredErrorContext
Definition: globals.c:417
xmlStructuredErrorFunc xmlStructuredError
Definition: globals.c:403
int xmlGetWarningsDefaultValue
Definition: globals.c:297
#define XML_SAX2_MAGIC
Definition: parser.h:687
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
Definition: parser.h:35
XML_HIDDEN void xmlParserErrors const char const xmlChar * str1
Definition: parser.h:35
#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: 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 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)
Definition: xmlerror.h:859
XMLPUBFUN void XMLPUBFUN void xmlParserWarning(void *ctx, const char *msg,...) LIBXML_ATTR_FORMAT(2
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 xmlCtxtResetLastError(void *ctx)
XMLPUBFUN void XMLPUBFUN void XMLPUBFUN void xmlParserValidityError(void *ctx, const char *msg,...) LIBXML_ATTR_FORMAT(2
@ 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 const xmlError * xmlGetLastError(void)
void(* xmlGenericErrorFunc)(void *ctx, const char *msg,...) LIBXML_ATTR_FORMAT(2
Definition: xmlerror.h:848
@ XML_ERR_OK
Definition: xmlerror.h:100
@ XML_ERR_NO_MEMORY
Definition: xmlerror.h:102
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)
Definition: xmlstring.c:708
XMLPUBFUN int xmlStrlen(const xmlChar *str)
Definition: xmlstring.c:428
#define BAD_CAST
Definition: xmlstring.h:35
unsigned char xmlChar
Definition: xmlstring.h:28
XMLPUBFUN xmlChar * xmlStrdup(const xmlChar *cur)
Definition: xmlstring.c:69