Changeset 147 for trunk/src/helpers/xmltok.c
- Timestamp:
- Mar 16, 2002, 8:53:47 AM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/xmltok.c
r98 r147 85 85 #define UTF8_INVALID4(p) ((*p) == 0xF4 && ((p)[1] & 0x30) != 0) 86 86 87 static 88 int EXPATENTRY isNever(const ENCODING * enc, const char *p) 87 static int EXPATENTRY isNever(const ENCODING * enc, const char *p) 89 88 { 90 89 return 0; 91 90 } 92 91 93 static 94 int EXPATENTRY utf8_isName2(const ENCODING * enc, const char *p) 92 static int EXPATENTRY utf8_isName2(const ENCODING * enc, const char *p) 95 93 { 96 94 return UTF8_GET_NAMING2(namePages, (const unsigned char *)p); 97 95 } 98 96 99 static 100 int EXPATENTRY utf8_isName3(const ENCODING * enc, const char *p) 97 static int EXPATENTRY utf8_isName3(const ENCODING * enc, const char *p) 101 98 { 102 99 return UTF8_GET_NAMING3(namePages, (const unsigned char *)p); … … 105 102 #define utf8_isName4 isNever 106 103 107 static 108 int EXPATENTRY utf8_isNmstrt2(const ENCODING * enc, const char *p) 104 static int EXPATENTRY utf8_isNmstrt2(const ENCODING * enc, const char *p) 109 105 { 110 106 return UTF8_GET_NAMING2(nmstrtPages, (const unsigned char *)p); 111 107 } 112 108 113 static 114 int EXPATENTRY utf8_isNmstrt3(const ENCODING * enc, const char *p) 109 static int EXPATENTRY utf8_isNmstrt3(const ENCODING * enc, const char *p) 115 110 { 116 111 return UTF8_GET_NAMING3(nmstrtPages, (const unsigned char *)p); … … 121 116 #define utf8_isInvalid2 isNever 122 117 123 static 124 int EXPATENTRY utf8_isInvalid3(const ENCODING * enc, const char *p) 118 static int EXPATENTRY utf8_isInvalid3(const ENCODING * enc, const char *p) 125 119 { 126 120 return UTF8_INVALID3((const unsigned char *)p); 127 121 } 128 122 129 static 130 int EXPATENTRY utf8_isInvalid4(const ENCODING * enc, const char *p) 123 static int EXPATENTRY utf8_isInvalid4(const ENCODING * enc, const char *p) 131 124 { 132 125 return UTF8_INVALID4((const unsigned char *)p); … … 276 269 277 270 static void EXPATENTRY utf8_toUtf8(const ENCODING * enc, 278 const char **fromP,279 const char *fromLim,280 char **toP,281 const char *toLim)271 const char **fromP, 272 const char *fromLim, 273 char **toP, 274 const char *toLim) 282 275 { 283 276 char *to; … … 302 295 303 296 static void EXPATENTRY utf8_toUtf16(const ENCODING * enc, 304 const char **fromP,305 const char *fromLim,306 unsigned short **toP,307 const unsigned short *toLim)297 const char **fromP, 298 const char *fromLim, 299 unsigned short **toP, 300 const unsigned short *toLim) 308 301 { 309 302 unsigned short *to = *toP; … … 397 390 398 391 static void EXPATENTRY latin1_toUtf8(const ENCODING * enc, 399 const char **fromP,400 const char *fromLim,401 char **toP,402 const char *toLim)392 const char **fromP, 393 const char *fromLim, 394 char **toP, 395 const char *toLim) 403 396 { 404 397 for (;;) … … 427 420 428 421 static void EXPATENTRY latin1_toUtf16(const ENCODING * enc, 429 const char **fromP,430 const char *fromLim,431 unsigned short **toP,432 const unsigned short *toLim)422 const char **fromP, 423 const char *fromLim, 424 unsigned short **toP, 425 const unsigned short *toLim) 433 426 { 434 427 while (*fromP != fromLim && *toP != toLim) … … 463 456 464 457 static void EXPATENTRY ascii_toUtf8(const ENCODING * enc, 465 const char **fromP,466 const char *fromLim,467 char **toP,468 const char *toLim)458 const char **fromP, 459 const char *fromLim, 460 char **toP, 461 const char *toLim) 469 462 { 470 463 while (*fromP != fromLim && *toP != toLim) … … 918 911 } 919 912 920 static void EXPATENTRY initUpdatePosition(const ENCODING * enc, const char *ptr, 921 const char *end, POSITION * pos) 913 static void EXPATENTRY initUpdatePosition(const ENCODING * enc, 914 const char *ptr, 915 const char *end, 916 POSITION * pos) 922 917 { 923 918 normal_updatePosition(&utf8_encoding.enc, ptr, end, pos); 924 919 } 925 920 926 static int EXPATENTRY toAscii(const ENCODING * enc, const char *ptr, const char *end) 921 static int EXPATENTRY toAscii(const ENCODING * enc, 922 const char *ptr, 923 const char *end) 927 924 { 928 925 char buf[1]; … … 952 949 * or there's an S followed by name=val. */ 953 950 static int EXPATENTRY parsePseudoAttribute(const ENCODING * enc, 954 const char *ptr,955 const char *end,956 const char **namePtr,957 const char **nameEndPtr,958 const char **valPtr,959 const char **nextTokPtr)951 const char *ptr, 952 const char *end, 953 const char **namePtr, 954 const char **nameEndPtr, 955 const char **valPtr, 956 const char **nextTokPtr) 960 957 { 961 958 int c; … … 1312 1309 1313 1310 static void EXPATENTRY unknown_toUtf8(const ENCODING * enc, 1314 const char **fromP,1315 const char *fromLim,1316 char **toP,1317 const char *toLim)1311 const char **fromP, 1312 const char *fromLim, 1313 char **toP, 1314 const char *toLim) 1318 1315 { 1319 1316 char buf[XML_UTF8_ENCODE_MAX]; … … 1355 1352 1356 1353 static void EXPATENTRY unknown_toUtf16(const ENCODING * enc, 1357 const char **fromP,1358 const char *fromLim,1359 unsigned short **toP,1360 const unsigned short *toLim)1354 const char **fromP, 1355 const char *fromLim, 1356 unsigned short **toP, 1357 const unsigned short *toLim) 1361 1358 { 1362 1359 while (*fromP != fromLim && *toP != toLim) … … 1559 1556 1560 1557 static int EXPATENTRY initScan(const ENCODING ** encodingTable, 1561 const INIT_ENCODING * enc,1562 int state,1563 const char *ptr,1564 const char *end,1565 const char **nextTokPtr)1558 const INIT_ENCODING * enc, 1559 int state, 1560 const char *ptr, 1561 const char *end, 1562 const char **nextTokPtr) 1566 1563 { 1567 1564 const ENCODING **encPtr;
Note:
See TracChangeset
for help on using the changeset viewer.