Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd |
michael@0 | 2 | See the file COPYING for copying permission. |
michael@0 | 3 | */ |
michael@0 | 4 | |
michael@0 | 5 | #ifndef XmlRole_INCLUDED |
michael@0 | 6 | #define XmlRole_INCLUDED 1 |
michael@0 | 7 | |
michael@0 | 8 | #ifdef __VMS |
michael@0 | 9 | /* 0 1 2 3 0 1 2 3 |
michael@0 | 10 | 1234567890123456789012345678901 1234567890123456789012345678901 */ |
michael@0 | 11 | #define XmlPrologStateInitExternalEntity XmlPrologStateInitExternalEnt |
michael@0 | 12 | #endif |
michael@0 | 13 | |
michael@0 | 14 | #include "xmltok.h" |
michael@0 | 15 | |
michael@0 | 16 | #ifdef __cplusplus |
michael@0 | 17 | extern "C" { |
michael@0 | 18 | #endif |
michael@0 | 19 | |
michael@0 | 20 | enum { |
michael@0 | 21 | XML_ROLE_ERROR = -1, |
michael@0 | 22 | XML_ROLE_NONE = 0, |
michael@0 | 23 | XML_ROLE_XML_DECL, |
michael@0 | 24 | XML_ROLE_INSTANCE_START, |
michael@0 | 25 | XML_ROLE_DOCTYPE_NONE, |
michael@0 | 26 | XML_ROLE_DOCTYPE_NAME, |
michael@0 | 27 | XML_ROLE_DOCTYPE_SYSTEM_ID, |
michael@0 | 28 | XML_ROLE_DOCTYPE_PUBLIC_ID, |
michael@0 | 29 | XML_ROLE_DOCTYPE_INTERNAL_SUBSET, |
michael@0 | 30 | XML_ROLE_DOCTYPE_CLOSE, |
michael@0 | 31 | XML_ROLE_GENERAL_ENTITY_NAME, |
michael@0 | 32 | XML_ROLE_PARAM_ENTITY_NAME, |
michael@0 | 33 | XML_ROLE_ENTITY_NONE, |
michael@0 | 34 | XML_ROLE_ENTITY_VALUE, |
michael@0 | 35 | XML_ROLE_ENTITY_SYSTEM_ID, |
michael@0 | 36 | XML_ROLE_ENTITY_PUBLIC_ID, |
michael@0 | 37 | XML_ROLE_ENTITY_COMPLETE, |
michael@0 | 38 | XML_ROLE_ENTITY_NOTATION_NAME, |
michael@0 | 39 | XML_ROLE_NOTATION_NONE, |
michael@0 | 40 | XML_ROLE_NOTATION_NAME, |
michael@0 | 41 | XML_ROLE_NOTATION_SYSTEM_ID, |
michael@0 | 42 | XML_ROLE_NOTATION_NO_SYSTEM_ID, |
michael@0 | 43 | XML_ROLE_NOTATION_PUBLIC_ID, |
michael@0 | 44 | XML_ROLE_ATTRIBUTE_NAME, |
michael@0 | 45 | XML_ROLE_ATTRIBUTE_TYPE_CDATA, |
michael@0 | 46 | XML_ROLE_ATTRIBUTE_TYPE_ID, |
michael@0 | 47 | XML_ROLE_ATTRIBUTE_TYPE_IDREF, |
michael@0 | 48 | XML_ROLE_ATTRIBUTE_TYPE_IDREFS, |
michael@0 | 49 | XML_ROLE_ATTRIBUTE_TYPE_ENTITY, |
michael@0 | 50 | XML_ROLE_ATTRIBUTE_TYPE_ENTITIES, |
michael@0 | 51 | XML_ROLE_ATTRIBUTE_TYPE_NMTOKEN, |
michael@0 | 52 | XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS, |
michael@0 | 53 | XML_ROLE_ATTRIBUTE_ENUM_VALUE, |
michael@0 | 54 | XML_ROLE_ATTRIBUTE_NOTATION_VALUE, |
michael@0 | 55 | XML_ROLE_ATTLIST_NONE, |
michael@0 | 56 | XML_ROLE_ATTLIST_ELEMENT_NAME, |
michael@0 | 57 | XML_ROLE_IMPLIED_ATTRIBUTE_VALUE, |
michael@0 | 58 | XML_ROLE_REQUIRED_ATTRIBUTE_VALUE, |
michael@0 | 59 | XML_ROLE_DEFAULT_ATTRIBUTE_VALUE, |
michael@0 | 60 | XML_ROLE_FIXED_ATTRIBUTE_VALUE, |
michael@0 | 61 | XML_ROLE_ELEMENT_NONE, |
michael@0 | 62 | XML_ROLE_ELEMENT_NAME, |
michael@0 | 63 | XML_ROLE_CONTENT_ANY, |
michael@0 | 64 | XML_ROLE_CONTENT_EMPTY, |
michael@0 | 65 | XML_ROLE_CONTENT_PCDATA, |
michael@0 | 66 | XML_ROLE_GROUP_OPEN, |
michael@0 | 67 | XML_ROLE_GROUP_CLOSE, |
michael@0 | 68 | XML_ROLE_GROUP_CLOSE_REP, |
michael@0 | 69 | XML_ROLE_GROUP_CLOSE_OPT, |
michael@0 | 70 | XML_ROLE_GROUP_CLOSE_PLUS, |
michael@0 | 71 | XML_ROLE_GROUP_CHOICE, |
michael@0 | 72 | XML_ROLE_GROUP_SEQUENCE, |
michael@0 | 73 | XML_ROLE_CONTENT_ELEMENT, |
michael@0 | 74 | XML_ROLE_CONTENT_ELEMENT_REP, |
michael@0 | 75 | XML_ROLE_CONTENT_ELEMENT_OPT, |
michael@0 | 76 | XML_ROLE_CONTENT_ELEMENT_PLUS, |
michael@0 | 77 | XML_ROLE_PI, |
michael@0 | 78 | XML_ROLE_COMMENT, |
michael@0 | 79 | #ifdef XML_DTD |
michael@0 | 80 | XML_ROLE_TEXT_DECL, |
michael@0 | 81 | XML_ROLE_IGNORE_SECT, |
michael@0 | 82 | XML_ROLE_INNER_PARAM_ENTITY_REF, |
michael@0 | 83 | #endif /* XML_DTD */ |
michael@0 | 84 | XML_ROLE_PARAM_ENTITY_REF |
michael@0 | 85 | }; |
michael@0 | 86 | |
michael@0 | 87 | typedef struct prolog_state { |
michael@0 | 88 | int (PTRCALL *handler) (struct prolog_state *state, |
michael@0 | 89 | int tok, |
michael@0 | 90 | const char *ptr, |
michael@0 | 91 | const char *end, |
michael@0 | 92 | const ENCODING *enc); |
michael@0 | 93 | unsigned level; |
michael@0 | 94 | int role_none; |
michael@0 | 95 | #ifdef XML_DTD |
michael@0 | 96 | unsigned includeLevel; |
michael@0 | 97 | int documentEntity; |
michael@0 | 98 | int inEntityValue; |
michael@0 | 99 | #endif /* XML_DTD */ |
michael@0 | 100 | } PROLOG_STATE; |
michael@0 | 101 | |
michael@0 | 102 | void XmlPrologStateInit(PROLOG_STATE *); |
michael@0 | 103 | #ifdef XML_DTD |
michael@0 | 104 | void XmlPrologStateInitExternalEntity(PROLOG_STATE *); |
michael@0 | 105 | #endif /* XML_DTD */ |
michael@0 | 106 | |
michael@0 | 107 | #define XmlTokenRole(state, tok, ptr, end, enc) \ |
michael@0 | 108 | (((state)->handler)(state, tok, ptr, end, enc)) |
michael@0 | 109 | |
michael@0 | 110 | #ifdef __cplusplus |
michael@0 | 111 | } |
michael@0 | 112 | #endif |
michael@0 | 113 | |
michael@0 | 114 | #endif /* not XmlRole_INCLUDED */ |