Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(396)

Side by Side Diff: third_party/expat/files/lib/xmlrole.c

Issue 2761253002: Update expat to 2.2.0 to fix CVE vulnerability. (Closed)
Patch Set: update README.chromium Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/expat/files/lib/xmlparse.c.original ('k') | third_party/expat/files/lib/xmltok.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd 1 /* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
2 See the file COPYING for copying permission. 2 See the file COPYING for copying permission.
3 */ 3 */
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 6
7 #ifdef COMPILED_FROM_DSP 7 #ifdef WIN32
8 #include "winconfig.h" 8 #include "winconfig.h"
9 #elif defined(MACOS_CLASSIC) 9 #elif defined(MACOS_CLASSIC)
10 #include "macconfig.h" 10 #include "macconfig.h"
11 #elif defined(__amigaos__) 11 #elif defined(__amigaos__)
12 #include "amigaconfig.h" 12 #include "amigaconfig.h"
13 #elif defined(__WATCOMC__) 13 #elif defined(__WATCOMC__)
14 #include "watcomconfig.h" 14 #include "watcomconfig.h"
15 #else 15 #else
16 #ifdef HAVE_EXPAT_CONFIG_H 16 #ifdef HAVE_EXPAT_CONFIG_H
17 #include <expat_config.h> 17 #include <expat_config.h>
18 #endif 18 #endif
19 #endif /* ndef COMPILED_FROM_DSP */ 19 #endif /* ndef WIN32 */
20 20
21 #include "expat_external.h" 21 #include "expat_external.h"
22 #include "internal.h" 22 #include "internal.h"
23 #include "xmlrole.h" 23 #include "xmlrole.h"
24 #include "ascii.h" 24 #include "ascii.h"
25 25
26 /* Doesn't check: 26 /* Doesn't check:
27 27
28 that ,| are not mixed in a model group 28 that ,| are not mixed in a model group
29 content of literals 29 content of literals
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 case XML_TOK_INSTANCE_START: 188 case XML_TOK_INSTANCE_START:
189 state->handler = error; 189 state->handler = error;
190 return XML_ROLE_INSTANCE_START; 190 return XML_ROLE_INSTANCE_START;
191 } 191 }
192 return common(state, tok); 192 return common(state, tok);
193 } 193 }
194 194
195 static int PTRCALL 195 static int PTRCALL
196 prolog2(PROLOG_STATE *state, 196 prolog2(PROLOG_STATE *state,
197 int tok, 197 int tok,
198 const char *ptr, 198 const char *UNUSED_P(ptr),
199 const char *end, 199 const char *UNUSED_P(end),
200 const ENCODING *enc) 200 const ENCODING *UNUSED_P(enc))
201 { 201 {
202 switch (tok) { 202 switch (tok) {
203 case XML_TOK_PROLOG_S: 203 case XML_TOK_PROLOG_S:
204 return XML_ROLE_NONE; 204 return XML_ROLE_NONE;
205 case XML_TOK_PI: 205 case XML_TOK_PI:
206 return XML_ROLE_PI; 206 return XML_ROLE_PI;
207 case XML_TOK_COMMENT: 207 case XML_TOK_COMMENT:
208 return XML_ROLE_COMMENT; 208 return XML_ROLE_COMMENT;
209 case XML_TOK_INSTANCE_START: 209 case XML_TOK_INSTANCE_START:
210 state->handler = error; 210 state->handler = error;
211 return XML_ROLE_INSTANCE_START; 211 return XML_ROLE_INSTANCE_START;
212 } 212 }
213 return common(state, tok); 213 return common(state, tok);
214 } 214 }
215 215
216 static int PTRCALL 216 static int PTRCALL
217 doctype0(PROLOG_STATE *state, 217 doctype0(PROLOG_STATE *state,
218 int tok, 218 int tok,
219 const char *ptr, 219 const char *UNUSED_P(ptr),
220 const char *end, 220 const char *UNUSED_P(end),
221 const ENCODING *enc) 221 const ENCODING *UNUSED_P(enc))
222 { 222 {
223 switch (tok) { 223 switch (tok) {
224 case XML_TOK_PROLOG_S: 224 case XML_TOK_PROLOG_S:
225 return XML_ROLE_DOCTYPE_NONE; 225 return XML_ROLE_DOCTYPE_NONE;
226 case XML_TOK_NAME: 226 case XML_TOK_NAME:
227 case XML_TOK_PREFIXED_NAME: 227 case XML_TOK_PREFIXED_NAME:
228 state->handler = doctype1; 228 state->handler = doctype1;
229 return XML_ROLE_DOCTYPE_NAME; 229 return XML_ROLE_DOCTYPE_NAME;
230 } 230 }
231 return common(state, tok); 231 return common(state, tok);
(...skipping 25 matching lines...) Expand all
257 return XML_ROLE_DOCTYPE_NONE; 257 return XML_ROLE_DOCTYPE_NONE;
258 } 258 }
259 break; 259 break;
260 } 260 }
261 return common(state, tok); 261 return common(state, tok);
262 } 262 }
263 263
264 static int PTRCALL 264 static int PTRCALL
265 doctype2(PROLOG_STATE *state, 265 doctype2(PROLOG_STATE *state,
266 int tok, 266 int tok,
267 const char *ptr, 267 const char *UNUSED_P(ptr),
268 const char *end, 268 const char *UNUSED_P(end),
269 const ENCODING *enc) 269 const ENCODING *UNUSED_P(enc))
270 { 270 {
271 switch (tok) { 271 switch (tok) {
272 case XML_TOK_PROLOG_S: 272 case XML_TOK_PROLOG_S:
273 return XML_ROLE_DOCTYPE_NONE; 273 return XML_ROLE_DOCTYPE_NONE;
274 case XML_TOK_LITERAL: 274 case XML_TOK_LITERAL:
275 state->handler = doctype3; 275 state->handler = doctype3;
276 return XML_ROLE_DOCTYPE_PUBLIC_ID; 276 return XML_ROLE_DOCTYPE_PUBLIC_ID;
277 } 277 }
278 return common(state, tok); 278 return common(state, tok);
279 } 279 }
280 280
281 static int PTRCALL 281 static int PTRCALL
282 doctype3(PROLOG_STATE *state, 282 doctype3(PROLOG_STATE *state,
283 int tok, 283 int tok,
284 const char *ptr, 284 const char *UNUSED_P(ptr),
285 const char *end, 285 const char *UNUSED_P(end),
286 const ENCODING *enc) 286 const ENCODING *UNUSED_P(enc))
287 { 287 {
288 switch (tok) { 288 switch (tok) {
289 case XML_TOK_PROLOG_S: 289 case XML_TOK_PROLOG_S:
290 return XML_ROLE_DOCTYPE_NONE; 290 return XML_ROLE_DOCTYPE_NONE;
291 case XML_TOK_LITERAL: 291 case XML_TOK_LITERAL:
292 state->handler = doctype4; 292 state->handler = doctype4;
293 return XML_ROLE_DOCTYPE_SYSTEM_ID; 293 return XML_ROLE_DOCTYPE_SYSTEM_ID;
294 } 294 }
295 return common(state, tok); 295 return common(state, tok);
296 } 296 }
297 297
298 static int PTRCALL 298 static int PTRCALL
299 doctype4(PROLOG_STATE *state, 299 doctype4(PROLOG_STATE *state,
300 int tok, 300 int tok,
301 const char *ptr, 301 const char *UNUSED_P(ptr),
302 const char *end, 302 const char *UNUSED_P(end),
303 const ENCODING *enc) 303 const ENCODING *UNUSED_P(enc))
304 { 304 {
305 switch (tok) { 305 switch (tok) {
306 case XML_TOK_PROLOG_S: 306 case XML_TOK_PROLOG_S:
307 return XML_ROLE_DOCTYPE_NONE; 307 return XML_ROLE_DOCTYPE_NONE;
308 case XML_TOK_OPEN_BRACKET: 308 case XML_TOK_OPEN_BRACKET:
309 state->handler = internalSubset; 309 state->handler = internalSubset;
310 return XML_ROLE_DOCTYPE_INTERNAL_SUBSET; 310 return XML_ROLE_DOCTYPE_INTERNAL_SUBSET;
311 case XML_TOK_DECL_CLOSE: 311 case XML_TOK_DECL_CLOSE:
312 state->handler = prolog2; 312 state->handler = prolog2;
313 return XML_ROLE_DOCTYPE_CLOSE; 313 return XML_ROLE_DOCTYPE_CLOSE;
314 } 314 }
315 return common(state, tok); 315 return common(state, tok);
316 } 316 }
317 317
318 static int PTRCALL 318 static int PTRCALL
319 doctype5(PROLOG_STATE *state, 319 doctype5(PROLOG_STATE *state,
320 int tok, 320 int tok,
321 const char *ptr, 321 const char *UNUSED_P(ptr),
322 const char *end, 322 const char *UNUSED_P(end),
323 const ENCODING *enc) 323 const ENCODING *UNUSED_P(enc))
324 { 324 {
325 switch (tok) { 325 switch (tok) {
326 case XML_TOK_PROLOG_S: 326 case XML_TOK_PROLOG_S:
327 return XML_ROLE_DOCTYPE_NONE; 327 return XML_ROLE_DOCTYPE_NONE;
328 case XML_TOK_DECL_CLOSE: 328 case XML_TOK_DECL_CLOSE:
329 state->handler = prolog2; 329 state->handler = prolog2;
330 return XML_ROLE_DOCTYPE_CLOSE; 330 return XML_ROLE_DOCTYPE_CLOSE;
331 } 331 }
332 return common(state, tok); 332 return common(state, tok);
333 } 333 }
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 return internalSubset(state, tok, ptr, end, enc); 430 return internalSubset(state, tok, ptr, end, enc);
431 } 431 }
432 return common(state, tok); 432 return common(state, tok);
433 } 433 }
434 434
435 #endif /* XML_DTD */ 435 #endif /* XML_DTD */
436 436
437 static int PTRCALL 437 static int PTRCALL
438 entity0(PROLOG_STATE *state, 438 entity0(PROLOG_STATE *state,
439 int tok, 439 int tok,
440 const char *ptr, 440 const char *UNUSED_P(ptr),
441 const char *end, 441 const char *UNUSED_P(end),
442 const ENCODING *enc) 442 const ENCODING *UNUSED_P(enc))
443 { 443 {
444 switch (tok) { 444 switch (tok) {
445 case XML_TOK_PROLOG_S: 445 case XML_TOK_PROLOG_S:
446 return XML_ROLE_ENTITY_NONE; 446 return XML_ROLE_ENTITY_NONE;
447 case XML_TOK_PERCENT: 447 case XML_TOK_PERCENT:
448 state->handler = entity1; 448 state->handler = entity1;
449 return XML_ROLE_ENTITY_NONE; 449 return XML_ROLE_ENTITY_NONE;
450 case XML_TOK_NAME: 450 case XML_TOK_NAME:
451 state->handler = entity2; 451 state->handler = entity2;
452 return XML_ROLE_GENERAL_ENTITY_NAME; 452 return XML_ROLE_GENERAL_ENTITY_NAME;
453 } 453 }
454 return common(state, tok); 454 return common(state, tok);
455 } 455 }
456 456
457 static int PTRCALL 457 static int PTRCALL
458 entity1(PROLOG_STATE *state, 458 entity1(PROLOG_STATE *state,
459 int tok, 459 int tok,
460 const char *ptr, 460 const char *UNUSED_P(ptr),
461 const char *end, 461 const char *UNUSED_P(end),
462 const ENCODING *enc) 462 const ENCODING *UNUSED_P(enc))
463 { 463 {
464 switch (tok) { 464 switch (tok) {
465 case XML_TOK_PROLOG_S: 465 case XML_TOK_PROLOG_S:
466 return XML_ROLE_ENTITY_NONE; 466 return XML_ROLE_ENTITY_NONE;
467 case XML_TOK_NAME: 467 case XML_TOK_NAME:
468 state->handler = entity7; 468 state->handler = entity7;
469 return XML_ROLE_PARAM_ENTITY_NAME; 469 return XML_ROLE_PARAM_ENTITY_NAME;
470 } 470 }
471 return common(state, tok); 471 return common(state, tok);
472 } 472 }
(...skipping 22 matching lines...) Expand all
495 state->handler = declClose; 495 state->handler = declClose;
496 state->role_none = XML_ROLE_ENTITY_NONE; 496 state->role_none = XML_ROLE_ENTITY_NONE;
497 return XML_ROLE_ENTITY_VALUE; 497 return XML_ROLE_ENTITY_VALUE;
498 } 498 }
499 return common(state, tok); 499 return common(state, tok);
500 } 500 }
501 501
502 static int PTRCALL 502 static int PTRCALL
503 entity3(PROLOG_STATE *state, 503 entity3(PROLOG_STATE *state,
504 int tok, 504 int tok,
505 const char *ptr, 505 const char *UNUSED_P(ptr),
506 const char *end, 506 const char *UNUSED_P(end),
507 const ENCODING *enc) 507 const ENCODING *UNUSED_P(enc))
508 { 508 {
509 switch (tok) { 509 switch (tok) {
510 case XML_TOK_PROLOG_S: 510 case XML_TOK_PROLOG_S:
511 return XML_ROLE_ENTITY_NONE; 511 return XML_ROLE_ENTITY_NONE;
512 case XML_TOK_LITERAL: 512 case XML_TOK_LITERAL:
513 state->handler = entity4; 513 state->handler = entity4;
514 return XML_ROLE_ENTITY_PUBLIC_ID; 514 return XML_ROLE_ENTITY_PUBLIC_ID;
515 } 515 }
516 return common(state, tok); 516 return common(state, tok);
517 } 517 }
518 518
519 static int PTRCALL 519 static int PTRCALL
520 entity4(PROLOG_STATE *state, 520 entity4(PROLOG_STATE *state,
521 int tok, 521 int tok,
522 const char *ptr, 522 const char *UNUSED_P(ptr),
523 const char *end, 523 const char *UNUSED_P(end),
524 const ENCODING *enc) 524 const ENCODING *UNUSED_P(enc))
525 { 525 {
526 switch (tok) { 526 switch (tok) {
527 case XML_TOK_PROLOG_S: 527 case XML_TOK_PROLOG_S:
528 return XML_ROLE_ENTITY_NONE; 528 return XML_ROLE_ENTITY_NONE;
529 case XML_TOK_LITERAL: 529 case XML_TOK_LITERAL:
530 state->handler = entity5; 530 state->handler = entity5;
531 return XML_ROLE_ENTITY_SYSTEM_ID; 531 return XML_ROLE_ENTITY_SYSTEM_ID;
532 } 532 }
533 return common(state, tok); 533 return common(state, tok);
534 } 534 }
(...skipping 17 matching lines...) Expand all
552 return XML_ROLE_ENTITY_NONE; 552 return XML_ROLE_ENTITY_NONE;
553 } 553 }
554 break; 554 break;
555 } 555 }
556 return common(state, tok); 556 return common(state, tok);
557 } 557 }
558 558
559 static int PTRCALL 559 static int PTRCALL
560 entity6(PROLOG_STATE *state, 560 entity6(PROLOG_STATE *state,
561 int tok, 561 int tok,
562 const char *ptr, 562 const char *UNUSED_P(ptr),
563 const char *end, 563 const char *UNUSED_P(end),
564 const ENCODING *enc) 564 const ENCODING *UNUSED_P(enc))
565 { 565 {
566 switch (tok) { 566 switch (tok) {
567 case XML_TOK_PROLOG_S: 567 case XML_TOK_PROLOG_S:
568 return XML_ROLE_ENTITY_NONE; 568 return XML_ROLE_ENTITY_NONE;
569 case XML_TOK_NAME: 569 case XML_TOK_NAME:
570 state->handler = declClose; 570 state->handler = declClose;
571 state->role_none = XML_ROLE_ENTITY_NONE; 571 state->role_none = XML_ROLE_ENTITY_NONE;
572 return XML_ROLE_ENTITY_NOTATION_NAME; 572 return XML_ROLE_ENTITY_NOTATION_NAME;
573 } 573 }
574 return common(state, tok); 574 return common(state, tok);
(...skipping 23 matching lines...) Expand all
598 state->handler = declClose; 598 state->handler = declClose;
599 state->role_none = XML_ROLE_ENTITY_NONE; 599 state->role_none = XML_ROLE_ENTITY_NONE;
600 return XML_ROLE_ENTITY_VALUE; 600 return XML_ROLE_ENTITY_VALUE;
601 } 601 }
602 return common(state, tok); 602 return common(state, tok);
603 } 603 }
604 604
605 static int PTRCALL 605 static int PTRCALL
606 entity8(PROLOG_STATE *state, 606 entity8(PROLOG_STATE *state,
607 int tok, 607 int tok,
608 const char *ptr, 608 const char *UNUSED_P(ptr),
609 const char *end, 609 const char *UNUSED_P(end),
610 const ENCODING *enc) 610 const ENCODING *UNUSED_P(enc))
611 { 611 {
612 switch (tok) { 612 switch (tok) {
613 case XML_TOK_PROLOG_S: 613 case XML_TOK_PROLOG_S:
614 return XML_ROLE_ENTITY_NONE; 614 return XML_ROLE_ENTITY_NONE;
615 case XML_TOK_LITERAL: 615 case XML_TOK_LITERAL:
616 state->handler = entity9; 616 state->handler = entity9;
617 return XML_ROLE_ENTITY_PUBLIC_ID; 617 return XML_ROLE_ENTITY_PUBLIC_ID;
618 } 618 }
619 return common(state, tok); 619 return common(state, tok);
620 } 620 }
621 621
622 static int PTRCALL 622 static int PTRCALL
623 entity9(PROLOG_STATE *state, 623 entity9(PROLOG_STATE *state,
624 int tok, 624 int tok,
625 const char *ptr, 625 const char *UNUSED_P(ptr),
626 const char *end, 626 const char *UNUSED_P(end),
627 const ENCODING *enc) 627 const ENCODING *UNUSED_P(enc))
628 { 628 {
629 switch (tok) { 629 switch (tok) {
630 case XML_TOK_PROLOG_S: 630 case XML_TOK_PROLOG_S:
631 return XML_ROLE_ENTITY_NONE; 631 return XML_ROLE_ENTITY_NONE;
632 case XML_TOK_LITERAL: 632 case XML_TOK_LITERAL:
633 state->handler = entity10; 633 state->handler = entity10;
634 return XML_ROLE_ENTITY_SYSTEM_ID; 634 return XML_ROLE_ENTITY_SYSTEM_ID;
635 } 635 }
636 return common(state, tok); 636 return common(state, tok);
637 } 637 }
638 638
639 static int PTRCALL 639 static int PTRCALL
640 entity10(PROLOG_STATE *state, 640 entity10(PROLOG_STATE *state,
641 int tok, 641 int tok,
642 const char *ptr, 642 const char *UNUSED_P(ptr),
643 const char *end, 643 const char *UNUSED_P(end),
644 const ENCODING *enc) 644 const ENCODING *UNUSED_P(enc))
645 { 645 {
646 switch (tok) { 646 switch (tok) {
647 case XML_TOK_PROLOG_S: 647 case XML_TOK_PROLOG_S:
648 return XML_ROLE_ENTITY_NONE; 648 return XML_ROLE_ENTITY_NONE;
649 case XML_TOK_DECL_CLOSE: 649 case XML_TOK_DECL_CLOSE:
650 setTopLevel(state); 650 setTopLevel(state);
651 return XML_ROLE_ENTITY_COMPLETE; 651 return XML_ROLE_ENTITY_COMPLETE;
652 } 652 }
653 return common(state, tok); 653 return common(state, tok);
654 } 654 }
655 655
656 static int PTRCALL 656 static int PTRCALL
657 notation0(PROLOG_STATE *state, 657 notation0(PROLOG_STATE *state,
658 int tok, 658 int tok,
659 const char *ptr, 659 const char *UNUSED_P(ptr),
660 const char *end, 660 const char *UNUSED_P(end),
661 const ENCODING *enc) 661 const ENCODING *UNUSED_P(enc))
662 { 662 {
663 switch (tok) { 663 switch (tok) {
664 case XML_TOK_PROLOG_S: 664 case XML_TOK_PROLOG_S:
665 return XML_ROLE_NOTATION_NONE; 665 return XML_ROLE_NOTATION_NONE;
666 case XML_TOK_NAME: 666 case XML_TOK_NAME:
667 state->handler = notation1; 667 state->handler = notation1;
668 return XML_ROLE_NOTATION_NAME; 668 return XML_ROLE_NOTATION_NAME;
669 } 669 }
670 return common(state, tok); 670 return common(state, tok);
671 } 671 }
(...skipping 18 matching lines...) Expand all
690 return XML_ROLE_NOTATION_NONE; 690 return XML_ROLE_NOTATION_NONE;
691 } 691 }
692 break; 692 break;
693 } 693 }
694 return common(state, tok); 694 return common(state, tok);
695 } 695 }
696 696
697 static int PTRCALL 697 static int PTRCALL
698 notation2(PROLOG_STATE *state, 698 notation2(PROLOG_STATE *state,
699 int tok, 699 int tok,
700 const char *ptr, 700 const char *UNUSED_P(ptr),
701 const char *end, 701 const char *UNUSED_P(end),
702 const ENCODING *enc) 702 const ENCODING *UNUSED_P(enc))
703 { 703 {
704 switch (tok) { 704 switch (tok) {
705 case XML_TOK_PROLOG_S: 705 case XML_TOK_PROLOG_S:
706 return XML_ROLE_NOTATION_NONE; 706 return XML_ROLE_NOTATION_NONE;
707 case XML_TOK_LITERAL: 707 case XML_TOK_LITERAL:
708 state->handler = notation4; 708 state->handler = notation4;
709 return XML_ROLE_NOTATION_PUBLIC_ID; 709 return XML_ROLE_NOTATION_PUBLIC_ID;
710 } 710 }
711 return common(state, tok); 711 return common(state, tok);
712 } 712 }
713 713
714 static int PTRCALL 714 static int PTRCALL
715 notation3(PROLOG_STATE *state, 715 notation3(PROLOG_STATE *state,
716 int tok, 716 int tok,
717 const char *ptr, 717 const char *UNUSED_P(ptr),
718 const char *end, 718 const char *UNUSED_P(end),
719 const ENCODING *enc) 719 const ENCODING *UNUSED_P(enc))
720 { 720 {
721 switch (tok) { 721 switch (tok) {
722 case XML_TOK_PROLOG_S: 722 case XML_TOK_PROLOG_S:
723 return XML_ROLE_NOTATION_NONE; 723 return XML_ROLE_NOTATION_NONE;
724 case XML_TOK_LITERAL: 724 case XML_TOK_LITERAL:
725 state->handler = declClose; 725 state->handler = declClose;
726 state->role_none = XML_ROLE_NOTATION_NONE; 726 state->role_none = XML_ROLE_NOTATION_NONE;
727 return XML_ROLE_NOTATION_SYSTEM_ID; 727 return XML_ROLE_NOTATION_SYSTEM_ID;
728 } 728 }
729 return common(state, tok); 729 return common(state, tok);
730 } 730 }
731 731
732 static int PTRCALL 732 static int PTRCALL
733 notation4(PROLOG_STATE *state, 733 notation4(PROLOG_STATE *state,
734 int tok, 734 int tok,
735 const char *ptr, 735 const char *UNUSED_P(ptr),
736 const char *end, 736 const char *UNUSED_P(end),
737 const ENCODING *enc) 737 const ENCODING *UNUSED_P(enc))
738 { 738 {
739 switch (tok) { 739 switch (tok) {
740 case XML_TOK_PROLOG_S: 740 case XML_TOK_PROLOG_S:
741 return XML_ROLE_NOTATION_NONE; 741 return XML_ROLE_NOTATION_NONE;
742 case XML_TOK_LITERAL: 742 case XML_TOK_LITERAL:
743 state->handler = declClose; 743 state->handler = declClose;
744 state->role_none = XML_ROLE_NOTATION_NONE; 744 state->role_none = XML_ROLE_NOTATION_NONE;
745 return XML_ROLE_NOTATION_SYSTEM_ID; 745 return XML_ROLE_NOTATION_SYSTEM_ID;
746 case XML_TOK_DECL_CLOSE: 746 case XML_TOK_DECL_CLOSE:
747 setTopLevel(state); 747 setTopLevel(state);
748 return XML_ROLE_NOTATION_NO_SYSTEM_ID; 748 return XML_ROLE_NOTATION_NO_SYSTEM_ID;
749 } 749 }
750 return common(state, tok); 750 return common(state, tok);
751 } 751 }
752 752
753 static int PTRCALL 753 static int PTRCALL
754 attlist0(PROLOG_STATE *state, 754 attlist0(PROLOG_STATE *state,
755 int tok, 755 int tok,
756 const char *ptr, 756 const char *UNUSED_P(ptr),
757 const char *end, 757 const char *UNUSED_P(end),
758 const ENCODING *enc) 758 const ENCODING *UNUSED_P(enc))
759 { 759 {
760 switch (tok) { 760 switch (tok) {
761 case XML_TOK_PROLOG_S: 761 case XML_TOK_PROLOG_S:
762 return XML_ROLE_ATTLIST_NONE; 762 return XML_ROLE_ATTLIST_NONE;
763 case XML_TOK_NAME: 763 case XML_TOK_NAME:
764 case XML_TOK_PREFIXED_NAME: 764 case XML_TOK_PREFIXED_NAME:
765 state->handler = attlist1; 765 state->handler = attlist1;
766 return XML_ROLE_ATTLIST_ELEMENT_NAME; 766 return XML_ROLE_ATTLIST_ELEMENT_NAME;
767 } 767 }
768 return common(state, tok); 768 return common(state, tok);
769 } 769 }
770 770
771 static int PTRCALL 771 static int PTRCALL
772 attlist1(PROLOG_STATE *state, 772 attlist1(PROLOG_STATE *state,
773 int tok, 773 int tok,
774 const char *ptr, 774 const char *UNUSED_P(ptr),
775 const char *end, 775 const char *UNUSED_P(end),
776 const ENCODING *enc) 776 const ENCODING *UNUSED_P(enc))
777 { 777 {
778 switch (tok) { 778 switch (tok) {
779 case XML_TOK_PROLOG_S: 779 case XML_TOK_PROLOG_S:
780 return XML_ROLE_ATTLIST_NONE; 780 return XML_ROLE_ATTLIST_NONE;
781 case XML_TOK_DECL_CLOSE: 781 case XML_TOK_DECL_CLOSE:
782 setTopLevel(state); 782 setTopLevel(state);
783 return XML_ROLE_ATTLIST_NONE; 783 return XML_ROLE_ATTLIST_NONE;
784 case XML_TOK_NAME: 784 case XML_TOK_NAME:
785 case XML_TOK_PREFIXED_NAME: 785 case XML_TOK_PREFIXED_NAME:
786 state->handler = attlist2; 786 state->handler = attlist2;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 case XML_TOK_OPEN_PAREN: 826 case XML_TOK_OPEN_PAREN:
827 state->handler = attlist3; 827 state->handler = attlist3;
828 return XML_ROLE_ATTLIST_NONE; 828 return XML_ROLE_ATTLIST_NONE;
829 } 829 }
830 return common(state, tok); 830 return common(state, tok);
831 } 831 }
832 832
833 static int PTRCALL 833 static int PTRCALL
834 attlist3(PROLOG_STATE *state, 834 attlist3(PROLOG_STATE *state,
835 int tok, 835 int tok,
836 const char *ptr, 836 const char *UNUSED_P(ptr),
837 const char *end, 837 const char *UNUSED_P(end),
838 const ENCODING *enc) 838 const ENCODING *UNUSED_P(enc))
839 { 839 {
840 switch (tok) { 840 switch (tok) {
841 case XML_TOK_PROLOG_S: 841 case XML_TOK_PROLOG_S:
842 return XML_ROLE_ATTLIST_NONE; 842 return XML_ROLE_ATTLIST_NONE;
843 case XML_TOK_NMTOKEN: 843 case XML_TOK_NMTOKEN:
844 case XML_TOK_NAME: 844 case XML_TOK_NAME:
845 case XML_TOK_PREFIXED_NAME: 845 case XML_TOK_PREFIXED_NAME:
846 state->handler = attlist4; 846 state->handler = attlist4;
847 return XML_ROLE_ATTRIBUTE_ENUM_VALUE; 847 return XML_ROLE_ATTRIBUTE_ENUM_VALUE;
848 } 848 }
849 return common(state, tok); 849 return common(state, tok);
850 } 850 }
851 851
852 static int PTRCALL 852 static int PTRCALL
853 attlist4(PROLOG_STATE *state, 853 attlist4(PROLOG_STATE *state,
854 int tok, 854 int tok,
855 const char *ptr, 855 const char *UNUSED_P(ptr),
856 const char *end, 856 const char *UNUSED_P(end),
857 const ENCODING *enc) 857 const ENCODING *UNUSED_P(enc))
858 { 858 {
859 switch (tok) { 859 switch (tok) {
860 case XML_TOK_PROLOG_S: 860 case XML_TOK_PROLOG_S:
861 return XML_ROLE_ATTLIST_NONE; 861 return XML_ROLE_ATTLIST_NONE;
862 case XML_TOK_CLOSE_PAREN: 862 case XML_TOK_CLOSE_PAREN:
863 state->handler = attlist8; 863 state->handler = attlist8;
864 return XML_ROLE_ATTLIST_NONE; 864 return XML_ROLE_ATTLIST_NONE;
865 case XML_TOK_OR: 865 case XML_TOK_OR:
866 state->handler = attlist3; 866 state->handler = attlist3;
867 return XML_ROLE_ATTLIST_NONE; 867 return XML_ROLE_ATTLIST_NONE;
868 } 868 }
869 return common(state, tok); 869 return common(state, tok);
870 } 870 }
871 871
872 static int PTRCALL 872 static int PTRCALL
873 attlist5(PROLOG_STATE *state, 873 attlist5(PROLOG_STATE *state,
874 int tok, 874 int tok,
875 const char *ptr, 875 const char *UNUSED_P(ptr),
876 const char *end, 876 const char *UNUSED_P(end),
877 const ENCODING *enc) 877 const ENCODING *UNUSED_P(enc))
878 { 878 {
879 switch (tok) { 879 switch (tok) {
880 case XML_TOK_PROLOG_S: 880 case XML_TOK_PROLOG_S:
881 return XML_ROLE_ATTLIST_NONE; 881 return XML_ROLE_ATTLIST_NONE;
882 case XML_TOK_OPEN_PAREN: 882 case XML_TOK_OPEN_PAREN:
883 state->handler = attlist6; 883 state->handler = attlist6;
884 return XML_ROLE_ATTLIST_NONE; 884 return XML_ROLE_ATTLIST_NONE;
885 } 885 }
886 return common(state, tok); 886 return common(state, tok);
887 } 887 }
888 888
889 static int PTRCALL 889 static int PTRCALL
890 attlist6(PROLOG_STATE *state, 890 attlist6(PROLOG_STATE *state,
891 int tok, 891 int tok,
892 const char *ptr, 892 const char *UNUSED_P(ptr),
893 const char *end, 893 const char *UNUSED_P(end),
894 const ENCODING *enc) 894 const ENCODING *UNUSED_P(enc))
895 { 895 {
896 switch (tok) { 896 switch (tok) {
897 case XML_TOK_PROLOG_S: 897 case XML_TOK_PROLOG_S:
898 return XML_ROLE_ATTLIST_NONE; 898 return XML_ROLE_ATTLIST_NONE;
899 case XML_TOK_NAME: 899 case XML_TOK_NAME:
900 state->handler = attlist7; 900 state->handler = attlist7;
901 return XML_ROLE_ATTRIBUTE_NOTATION_VALUE; 901 return XML_ROLE_ATTRIBUTE_NOTATION_VALUE;
902 } 902 }
903 return common(state, tok); 903 return common(state, tok);
904 } 904 }
905 905
906 static int PTRCALL 906 static int PTRCALL
907 attlist7(PROLOG_STATE *state, 907 attlist7(PROLOG_STATE *state,
908 int tok, 908 int tok,
909 const char *ptr, 909 const char *UNUSED_P(ptr),
910 const char *end, 910 const char *UNUSED_P(end),
911 const ENCODING *enc) 911 const ENCODING *UNUSED_P(enc))
912 { 912 {
913 switch (tok) { 913 switch (tok) {
914 case XML_TOK_PROLOG_S: 914 case XML_TOK_PROLOG_S:
915 return XML_ROLE_ATTLIST_NONE; 915 return XML_ROLE_ATTLIST_NONE;
916 case XML_TOK_CLOSE_PAREN: 916 case XML_TOK_CLOSE_PAREN:
917 state->handler = attlist8; 917 state->handler = attlist8;
918 return XML_ROLE_ATTLIST_NONE; 918 return XML_ROLE_ATTLIST_NONE;
919 case XML_TOK_OR: 919 case XML_TOK_OR:
920 state->handler = attlist6; 920 state->handler = attlist6;
921 return XML_ROLE_ATTLIST_NONE; 921 return XML_ROLE_ATTLIST_NONE;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 case XML_TOK_LITERAL: 960 case XML_TOK_LITERAL:
961 state->handler = attlist1; 961 state->handler = attlist1;
962 return XML_ROLE_DEFAULT_ATTRIBUTE_VALUE; 962 return XML_ROLE_DEFAULT_ATTRIBUTE_VALUE;
963 } 963 }
964 return common(state, tok); 964 return common(state, tok);
965 } 965 }
966 966
967 static int PTRCALL 967 static int PTRCALL
968 attlist9(PROLOG_STATE *state, 968 attlist9(PROLOG_STATE *state,
969 int tok, 969 int tok,
970 const char *ptr, 970 const char *UNUSED_P(ptr),
971 const char *end, 971 const char *UNUSED_P(end),
972 const ENCODING *enc) 972 const ENCODING *UNUSED_P(enc))
973 { 973 {
974 switch (tok) { 974 switch (tok) {
975 case XML_TOK_PROLOG_S: 975 case XML_TOK_PROLOG_S:
976 return XML_ROLE_ATTLIST_NONE; 976 return XML_ROLE_ATTLIST_NONE;
977 case XML_TOK_LITERAL: 977 case XML_TOK_LITERAL:
978 state->handler = attlist1; 978 state->handler = attlist1;
979 return XML_ROLE_FIXED_ATTRIBUTE_VALUE; 979 return XML_ROLE_FIXED_ATTRIBUTE_VALUE;
980 } 980 }
981 return common(state, tok); 981 return common(state, tok);
982 } 982 }
983 983
984 static int PTRCALL 984 static int PTRCALL
985 element0(PROLOG_STATE *state, 985 element0(PROLOG_STATE *state,
986 int tok, 986 int tok,
987 const char *ptr, 987 const char *UNUSED_P(ptr),
988 const char *end, 988 const char *UNUSED_P(end),
989 const ENCODING *enc) 989 const ENCODING *UNUSED_P(enc))
990 { 990 {
991 switch (tok) { 991 switch (tok) {
992 case XML_TOK_PROLOG_S: 992 case XML_TOK_PROLOG_S:
993 return XML_ROLE_ELEMENT_NONE; 993 return XML_ROLE_ELEMENT_NONE;
994 case XML_TOK_NAME: 994 case XML_TOK_NAME:
995 case XML_TOK_PREFIXED_NAME: 995 case XML_TOK_PREFIXED_NAME:
996 state->handler = element1; 996 state->handler = element1;
997 return XML_ROLE_ELEMENT_NAME; 997 return XML_ROLE_ELEMENT_NAME;
998 } 998 }
999 return common(state, tok); 999 return common(state, tok);
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1065 case XML_TOK_NAME_PLUS: 1065 case XML_TOK_NAME_PLUS:
1066 state->handler = element7; 1066 state->handler = element7;
1067 return XML_ROLE_CONTENT_ELEMENT_PLUS; 1067 return XML_ROLE_CONTENT_ELEMENT_PLUS;
1068 } 1068 }
1069 return common(state, tok); 1069 return common(state, tok);
1070 } 1070 }
1071 1071
1072 static int PTRCALL 1072 static int PTRCALL
1073 element3(PROLOG_STATE *state, 1073 element3(PROLOG_STATE *state,
1074 int tok, 1074 int tok,
1075 const char *ptr, 1075 const char *UNUSED_P(ptr),
1076 const char *end, 1076 const char *UNUSED_P(end),
1077 const ENCODING *enc) 1077 const ENCODING *UNUSED_P(enc))
1078 { 1078 {
1079 switch (tok) { 1079 switch (tok) {
1080 case XML_TOK_PROLOG_S: 1080 case XML_TOK_PROLOG_S:
1081 return XML_ROLE_ELEMENT_NONE; 1081 return XML_ROLE_ELEMENT_NONE;
1082 case XML_TOK_CLOSE_PAREN: 1082 case XML_TOK_CLOSE_PAREN:
1083 state->handler = declClose; 1083 state->handler = declClose;
1084 state->role_none = XML_ROLE_ELEMENT_NONE; 1084 state->role_none = XML_ROLE_ELEMENT_NONE;
1085 return XML_ROLE_GROUP_CLOSE; 1085 return XML_ROLE_GROUP_CLOSE;
1086 case XML_TOK_CLOSE_PAREN_ASTERISK: 1086 case XML_TOK_CLOSE_PAREN_ASTERISK:
1087 state->handler = declClose; 1087 state->handler = declClose;
1088 state->role_none = XML_ROLE_ELEMENT_NONE; 1088 state->role_none = XML_ROLE_ELEMENT_NONE;
1089 return XML_ROLE_GROUP_CLOSE_REP; 1089 return XML_ROLE_GROUP_CLOSE_REP;
1090 case XML_TOK_OR: 1090 case XML_TOK_OR:
1091 state->handler = element4; 1091 state->handler = element4;
1092 return XML_ROLE_ELEMENT_NONE; 1092 return XML_ROLE_ELEMENT_NONE;
1093 } 1093 }
1094 return common(state, tok); 1094 return common(state, tok);
1095 } 1095 }
1096 1096
1097 static int PTRCALL 1097 static int PTRCALL
1098 element4(PROLOG_STATE *state, 1098 element4(PROLOG_STATE *state,
1099 int tok, 1099 int tok,
1100 const char *ptr, 1100 const char *UNUSED_P(ptr),
1101 const char *end, 1101 const char *UNUSED_P(end),
1102 const ENCODING *enc) 1102 const ENCODING *UNUSED_P(enc))
1103 { 1103 {
1104 switch (tok) { 1104 switch (tok) {
1105 case XML_TOK_PROLOG_S: 1105 case XML_TOK_PROLOG_S:
1106 return XML_ROLE_ELEMENT_NONE; 1106 return XML_ROLE_ELEMENT_NONE;
1107 case XML_TOK_NAME: 1107 case XML_TOK_NAME:
1108 case XML_TOK_PREFIXED_NAME: 1108 case XML_TOK_PREFIXED_NAME:
1109 state->handler = element5; 1109 state->handler = element5;
1110 return XML_ROLE_CONTENT_ELEMENT; 1110 return XML_ROLE_CONTENT_ELEMENT;
1111 } 1111 }
1112 return common(state, tok); 1112 return common(state, tok);
1113 } 1113 }
1114 1114
1115 static int PTRCALL 1115 static int PTRCALL
1116 element5(PROLOG_STATE *state, 1116 element5(PROLOG_STATE *state,
1117 int tok, 1117 int tok,
1118 const char *ptr, 1118 const char *UNUSED_P(ptr),
1119 const char *end, 1119 const char *UNUSED_P(end),
1120 const ENCODING *enc) 1120 const ENCODING *UNUSED_P(enc))
1121 { 1121 {
1122 switch (tok) { 1122 switch (tok) {
1123 case XML_TOK_PROLOG_S: 1123 case XML_TOK_PROLOG_S:
1124 return XML_ROLE_ELEMENT_NONE; 1124 return XML_ROLE_ELEMENT_NONE;
1125 case XML_TOK_CLOSE_PAREN_ASTERISK: 1125 case XML_TOK_CLOSE_PAREN_ASTERISK:
1126 state->handler = declClose; 1126 state->handler = declClose;
1127 state->role_none = XML_ROLE_ELEMENT_NONE; 1127 state->role_none = XML_ROLE_ELEMENT_NONE;
1128 return XML_ROLE_GROUP_CLOSE_REP; 1128 return XML_ROLE_GROUP_CLOSE_REP;
1129 case XML_TOK_OR: 1129 case XML_TOK_OR:
1130 state->handler = element4; 1130 state->handler = element4;
1131 return XML_ROLE_ELEMENT_NONE; 1131 return XML_ROLE_ELEMENT_NONE;
1132 } 1132 }
1133 return common(state, tok); 1133 return common(state, tok);
1134 } 1134 }
1135 1135
1136 static int PTRCALL 1136 static int PTRCALL
1137 element6(PROLOG_STATE *state, 1137 element6(PROLOG_STATE *state,
1138 int tok, 1138 int tok,
1139 const char *ptr, 1139 const char *UNUSED_P(ptr),
1140 const char *end, 1140 const char *UNUSED_P(end),
1141 const ENCODING *enc) 1141 const ENCODING *UNUSED_P(enc))
1142 { 1142 {
1143 switch (tok) { 1143 switch (tok) {
1144 case XML_TOK_PROLOG_S: 1144 case XML_TOK_PROLOG_S:
1145 return XML_ROLE_ELEMENT_NONE; 1145 return XML_ROLE_ELEMENT_NONE;
1146 case XML_TOK_OPEN_PAREN: 1146 case XML_TOK_OPEN_PAREN:
1147 state->level += 1; 1147 state->level += 1;
1148 return XML_ROLE_GROUP_OPEN; 1148 return XML_ROLE_GROUP_OPEN;
1149 case XML_TOK_NAME: 1149 case XML_TOK_NAME:
1150 case XML_TOK_PREFIXED_NAME: 1150 case XML_TOK_PREFIXED_NAME:
1151 state->handler = element7; 1151 state->handler = element7;
1152 return XML_ROLE_CONTENT_ELEMENT; 1152 return XML_ROLE_CONTENT_ELEMENT;
1153 case XML_TOK_NAME_QUESTION: 1153 case XML_TOK_NAME_QUESTION:
1154 state->handler = element7; 1154 state->handler = element7;
1155 return XML_ROLE_CONTENT_ELEMENT_OPT; 1155 return XML_ROLE_CONTENT_ELEMENT_OPT;
1156 case XML_TOK_NAME_ASTERISK: 1156 case XML_TOK_NAME_ASTERISK:
1157 state->handler = element7; 1157 state->handler = element7;
1158 return XML_ROLE_CONTENT_ELEMENT_REP; 1158 return XML_ROLE_CONTENT_ELEMENT_REP;
1159 case XML_TOK_NAME_PLUS: 1159 case XML_TOK_NAME_PLUS:
1160 state->handler = element7; 1160 state->handler = element7;
1161 return XML_ROLE_CONTENT_ELEMENT_PLUS; 1161 return XML_ROLE_CONTENT_ELEMENT_PLUS;
1162 } 1162 }
1163 return common(state, tok); 1163 return common(state, tok);
1164 } 1164 }
1165 1165
1166 static int PTRCALL 1166 static int PTRCALL
1167 element7(PROLOG_STATE *state, 1167 element7(PROLOG_STATE *state,
1168 int tok, 1168 int tok,
1169 const char *ptr, 1169 const char *UNUSED_P(ptr),
1170 const char *end, 1170 const char *UNUSED_P(end),
1171 const ENCODING *enc) 1171 const ENCODING *UNUSED_P(enc))
1172 { 1172 {
1173 switch (tok) { 1173 switch (tok) {
1174 case XML_TOK_PROLOG_S: 1174 case XML_TOK_PROLOG_S:
1175 return XML_ROLE_ELEMENT_NONE; 1175 return XML_ROLE_ELEMENT_NONE;
1176 case XML_TOK_CLOSE_PAREN: 1176 case XML_TOK_CLOSE_PAREN:
1177 state->level -= 1; 1177 state->level -= 1;
1178 if (state->level == 0) { 1178 if (state->level == 0) {
1179 state->handler = declClose; 1179 state->handler = declClose;
1180 state->role_none = XML_ROLE_ELEMENT_NONE; 1180 state->role_none = XML_ROLE_ELEMENT_NONE;
1181 } 1181 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
1233 return XML_ROLE_NONE; 1233 return XML_ROLE_NONE;
1234 } 1234 }
1235 break; 1235 break;
1236 } 1236 }
1237 return common(state, tok); 1237 return common(state, tok);
1238 } 1238 }
1239 1239
1240 static int PTRCALL 1240 static int PTRCALL
1241 condSect1(PROLOG_STATE *state, 1241 condSect1(PROLOG_STATE *state,
1242 int tok, 1242 int tok,
1243 const char *ptr, 1243 const char *UNUSED_P(ptr),
1244 const char *end, 1244 const char *UNUSED_P(end),
1245 const ENCODING *enc) 1245 const ENCODING *UNUSED_P(enc))
1246 { 1246 {
1247 switch (tok) { 1247 switch (tok) {
1248 case XML_TOK_PROLOG_S: 1248 case XML_TOK_PROLOG_S:
1249 return XML_ROLE_NONE; 1249 return XML_ROLE_NONE;
1250 case XML_TOK_OPEN_BRACKET: 1250 case XML_TOK_OPEN_BRACKET:
1251 state->handler = externalSubset1; 1251 state->handler = externalSubset1;
1252 state->includeLevel += 1; 1252 state->includeLevel += 1;
1253 return XML_ROLE_NONE; 1253 return XML_ROLE_NONE;
1254 } 1254 }
1255 return common(state, tok); 1255 return common(state, tok);
1256 } 1256 }
1257 1257
1258 static int PTRCALL 1258 static int PTRCALL
1259 condSect2(PROLOG_STATE *state, 1259 condSect2(PROLOG_STATE *state,
1260 int tok, 1260 int tok,
1261 const char *ptr, 1261 const char *UNUSED_P(ptr),
1262 const char *end, 1262 const char *UNUSED_P(end),
1263 const ENCODING *enc) 1263 const ENCODING *UNUSED_P(enc))
1264 { 1264 {
1265 switch (tok) { 1265 switch (tok) {
1266 case XML_TOK_PROLOG_S: 1266 case XML_TOK_PROLOG_S:
1267 return XML_ROLE_NONE; 1267 return XML_ROLE_NONE;
1268 case XML_TOK_OPEN_BRACKET: 1268 case XML_TOK_OPEN_BRACKET:
1269 state->handler = externalSubset1; 1269 state->handler = externalSubset1;
1270 return XML_ROLE_IGNORE_SECT; 1270 return XML_ROLE_IGNORE_SECT;
1271 } 1271 }
1272 return common(state, tok); 1272 return common(state, tok);
1273 } 1273 }
1274 1274
1275 #endif /* XML_DTD */ 1275 #endif /* XML_DTD */
1276 1276
1277 static int PTRCALL 1277 static int PTRCALL
1278 declClose(PROLOG_STATE *state, 1278 declClose(PROLOG_STATE *state,
1279 int tok, 1279 int tok,
1280 const char *ptr, 1280 const char *UNUSED_P(ptr),
1281 const char *end, 1281 const char *UNUSED_P(end),
1282 const ENCODING *enc) 1282 const ENCODING *UNUSED_P(enc))
1283 { 1283 {
1284 switch (tok) { 1284 switch (tok) {
1285 case XML_TOK_PROLOG_S: 1285 case XML_TOK_PROLOG_S:
1286 return state->role_none; 1286 return state->role_none;
1287 case XML_TOK_DECL_CLOSE: 1287 case XML_TOK_DECL_CLOSE:
1288 setTopLevel(state); 1288 setTopLevel(state);
1289 return state->role_none; 1289 return state->role_none;
1290 } 1290 }
1291 return common(state, tok); 1291 return common(state, tok);
1292 } 1292 }
1293 1293
1294 static int PTRCALL 1294 static int PTRCALL
1295 error(PROLOG_STATE *state, 1295 error(PROLOG_STATE *UNUSED_P(state),
1296 int tok, 1296 int UNUSED_P(tok),
1297 const char *ptr, 1297 const char *UNUSED_P(ptr),
1298 const char *end, 1298 const char *UNUSED_P(end),
1299 const ENCODING *enc) 1299 const ENCODING *UNUSED_P(enc))
1300 { 1300 {
1301 return XML_ROLE_NONE; 1301 return XML_ROLE_NONE;
1302 } 1302 }
1303 1303
1304 static int FASTCALL 1304 static int FASTCALL
1305 common(PROLOG_STATE *state, int tok) 1305 common(PROLOG_STATE *state, int tok)
1306 { 1306 {
1307 #ifdef XML_DTD 1307 #ifdef XML_DTD
1308 if (!state->documentEntity && tok == XML_TOK_PARAM_ENTITY_REF) 1308 if (!state->documentEntity && tok == XML_TOK_PARAM_ENTITY_REF)
1309 return XML_ROLE_INNER_PARAM_ENTITY_REF; 1309 return XML_ROLE_INNER_PARAM_ENTITY_REF;
(...skipping 17 matching lines...) Expand all
1327 1327
1328 void 1328 void
1329 XmlPrologStateInitExternalEntity(PROLOG_STATE *state) 1329 XmlPrologStateInitExternalEntity(PROLOG_STATE *state)
1330 { 1330 {
1331 state->handler = externalSubset0; 1331 state->handler = externalSubset0;
1332 state->documentEntity = 0; 1332 state->documentEntity = 0;
1333 state->includeLevel = 0; 1333 state->includeLevel = 0;
1334 } 1334 }
1335 1335
1336 #endif /* XML_DTD */ 1336 #endif /* XML_DTD */
OLDNEW
« no previous file with comments | « third_party/expat/files/lib/xmlparse.c.original ('k') | third_party/expat/files/lib/xmltok.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698