Changeset 97 for trunk/include/expat/xmltok.h
- Timestamp:
- Aug 12, 2001, 5:34:51 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/expat/xmltok.h
r38 r97 6 6 #ifndef XmlTok_INCLUDED 7 7 #define XmlTok_INCLUDED 1 8 9 #include "expat\expat_setup.h"10 // V0.9.9 (2001-02-10) [umoeller]11 // to save the app from having to include this as well12 8 13 9 #ifdef __cplusplus … … 21 17 #define XML_TOK_NONE -4 /* The string to be scanned is empty */ 22 18 #define XML_TOK_TRAILING_CR -3 /* A CR at the end of the scan; 23 might be part of CRLF sequence */ 19 might be part of CRLF sequence */ 24 20 #define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */ 25 21 #define XML_TOK_PARTIAL -1 /* only part of a token */ … … 116 112 } POSITION; 117 113 118 typedef struct 119 { 120 const char *name; 121 const char *valuePtr; 122 const char *valueEnd; 123 char normalized; 124 } ATTRIBUTE, *PATTRIBUTE; 114 typedef struct { 115 const char *name; 116 const char *valuePtr; 117 const char *valueEnd; 118 char normalized; 119 } ATTRIBUTE; 125 120 126 121 struct encoding; 127 typedef struct encoding ENCODING, *PENCODING; 128 129 typedef int EXPATENTRY SCANNERFUNC(const ENCODING *, 130 const char *, 131 const char *, 132 const char **); 133 typedef SCANNERFUNC *PSCANNERFUNC; 134 135 struct encoding 136 { 137 PSCANNERFUNC scanners[XML_N_STATES]; 138 PSCANNERFUNC literalScanners[XML_N_LITERAL_TYPES]; 139 int (* EXPATENTRY sameName)(const ENCODING *, 140 const char *, 141 const char *); 142 int (* EXPATENTRY nameMatchesAscii)(const ENCODING *, 143 const char *, 144 const char *, 145 const char *); 146 int (* EXPATENTRY nameLength)(const ENCODING *, 147 const char *); 148 const char *(*skipS)(const ENCODING *, 149 const char *); 150 int (* EXPATENTRY getAtts)(const ENCODING *enc, 151 const char *ptr, 152 int attsMax, 153 ATTRIBUTE *atts); 154 int (* EXPATENTRY charRefNumber)(const ENCODING *enc, 155 const char *ptr); 156 int (* EXPATENTRY predefinedEntityName)(const ENCODING *, 157 const char *, 158 const char *); 159 void (* EXPATENTRY updatePosition)(const ENCODING *, 160 const char *ptr, 161 const char *end, 162 POSITION *); 163 int (* EXPATENTRY isPublicId)(const ENCODING *enc, 164 const char *ptr, 165 const char *end, 166 const char **badPtr); 167 void (* EXPATENTRY utf8Convert)(const ENCODING *enc, 168 const char **fromP, 169 const char *fromLim, 170 char **toP, 171 const char *toLim); 172 void (* EXPATENTRY utf16Convert)(const ENCODING *enc, 173 const char **fromP, 174 const char *fromLim, 175 unsigned short **toP, 176 const unsigned short *toLim); 122 typedef struct encoding ENCODING; 123 124 struct encoding { 125 int (*scanners[XML_N_STATES])(const ENCODING *, 126 const char *, 127 const char *, 128 const char **); 129 int (*literalScanners[XML_N_LITERAL_TYPES])(const ENCODING *, 130 const char *, 131 const char *, 132 const char **); 133 int (*sameName)(const ENCODING *, 134 const char *, const char *); 135 int (*nameMatchesAscii)(const ENCODING *, 136 const char *, const char *, const char *); 137 int (*nameLength)(const ENCODING *, const char *); 138 const char *(*skipS)(const ENCODING *, const char *); 139 int (*getAtts)(const ENCODING *enc, const char *ptr, 140 int attsMax, ATTRIBUTE *atts); 141 int (*charRefNumber)(const ENCODING *enc, const char *ptr); 142 int (*predefinedEntityName)(const ENCODING *, const char *, const char *); 143 void (*updatePosition)(const ENCODING *, 144 const char *ptr, 145 const char *end, 146 POSITION *); 147 int (*isPublicId)(const ENCODING *enc, const char *ptr, const char *end, 148 const char **badPtr); 149 void (*utf8Convert)(const ENCODING *enc, 150 const char **fromP, 151 const char *fromLim, 152 char **toP, 153 const char *toLim); 154 void (*utf16Convert)(const ENCODING *enc, 155 const char **fromP, 156 const char *fromLim, 157 unsigned short **toP, 158 const unsigned short *toLim); 177 159 int minBytesPerChar; 178 160 char isUtf8; … … 221 203 222 204 /* This is used for performing a 2nd-level tokenization on 223 the content of a literal that has already been returned by XmlTok. */ 205 the content of a literal that has already been returned by XmlTok. */ 224 206 225 207 #define XmlLiteralTok(enc, literalType, ptr, end, nextTokPtr) \ … … 270 252 271 253 int XmlParseXmlDecl(int isGeneralTextEntity, 272 273 274 275 276 277 278 279 280 254 const ENCODING *enc, 255 const char *ptr, 256 const char *end, 257 const char **badPtr, 258 const char **versionPtr, 259 const char **versionEndPtr, 260 const char **encodingNamePtr, 261 const ENCODING **namedEncodingPtr, 262 int *standalonePtr); 281 263 282 264 int XmlInitEncoding(INIT_ENCODING *, const ENCODING **, const char *name); … … 289 271 ENCODING * 290 272 XmlInitUnknownEncoding(void *mem, 291 292 293 273 int *table, 274 int (*conv)(void *userData, const char *p), 275 void *userData); 294 276 295 277 int XmlParseXmlDeclNS(int isGeneralTextEntity, 296 297 298 299 300 301 302 303 304 278 const ENCODING *enc, 279 const char *ptr, 280 const char *end, 281 const char **badPtr, 282 const char **versionPtr, 283 const char **versionEndPtr, 284 const char **encodingNamePtr, 285 const ENCODING **namedEncodingPtr, 286 int *standalonePtr); 305 287 int XmlInitEncodingNS(INIT_ENCODING *, const ENCODING **, const char *name); 306 288 const ENCODING *XmlGetUtf8InternalEncodingNS(void); … … 308 290 ENCODING * 309 291 XmlInitUnknownEncodingNS(void *mem, 310 311 312 292 int *table, 293 int (*conv)(void *userData, const char *p), 294 void *userData); 313 295 #ifdef __cplusplus 314 296 }
Note:
See TracChangeset
for help on using the changeset viewer.