Changeset 98 for trunk/src/helpers/xmltok_impl.c
- Timestamp:
- Aug 21, 2001, 7:29:38 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/xmltok_impl.c
r97 r98 1 1 2 /* 2 Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd 3 See the file COPYING for copying permission. 4 */ 3 *sourcefile xmltok_impl.c 4 * part of the expat implementation. See xmlparse.c. 5 * 6 * NOTE: This file must not be compiled directly. It is 7 * #include'd from xmltok.c several times. 8 */ 9 10 /* 11 * Copyright (C) 2001 Ulrich Mller. 12 * Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd. 13 * and Clark Cooper. 14 * 15 * Permission is hereby granted, free of charge, to any person obtaining 16 * a copy of this software and associated documentation files (the 17 * "Software"), to deal in the Software without restriction, including 18 * without limitation the rights to use, copy, modify, merge, publish, 19 * distribute, sublicense, and/or sell copies of the Software, and to 20 * permit persons to whom the Software is furnished to do so, subject to 21 * the following conditions: 22 * 23 * The above copyright notice and this permission notice shall be included 24 * in all copies or substantial portions of the Software. 25 * 26 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 27 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 28 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 29 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 30 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 31 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 32 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 33 */ 5 34 6 35 #ifndef IS_INVALID_CHAR … … 88 117 /* ptr points to character following "<!-" */ 89 118 90 static 91 int PREFIX(scanComment)(const ENCODING *enc, const char *ptr, const char *end, 92 const char **nextTokPtr) 119 static int EXPATENTRY PREFIX(scanComment)(const ENCODING *enc, 120 const char *ptr, 121 const char *end, 122 const char **nextTokPtr) 93 123 { 94 124 if (ptr != end) { … … 126 156 /* ptr points to character following "<!" */ 127 157 128 static 129 int PREFIX(scanDecl)(const ENCODING *enc, const char *ptr, const char *end, 158 static int EXPATENTRY PREFIX(scanDecl)(const ENCODING *enc, const char *ptr, const char *end, 130 159 const char **nextTokPtr) 131 160 { … … 173 202 } 174 203 175 static 176 int PREFIX(checkPiTarget)(const ENCODING *enc, const char *ptr, const char *end, int *tokPtr) 204 static int EXPATENTRY PREFIX(checkPiTarget)(const ENCODING *enc, const char *ptr, const char *end, int *tokPtr) 177 205 { 178 206 int upper = 0; … … 217 245 /* ptr points to character following "<?" */ 218 246 219 static 220 int PREFIX(scanPi)(const ENCODING *enc, const char *ptr, const char *end, 247 static int EXPATENTRY PREFIX(scanPi)(const ENCODING *enc, const char *ptr, const char *end, 221 248 const char **nextTokPtr) 222 249 { … … 280 307 281 308 282 static 283 int PREFIX(scanCdataSection)(const ENCODING *enc, const char *ptr, const char *end, 309 static int EXPATENTRY PREFIX(scanCdataSection)(const ENCODING *enc, const char *ptr, const char *end, 284 310 const char **nextTokPtr) 285 311 { … … 299 325 } 300 326 301 static 302 int PREFIX(cdataSectionTok)(const ENCODING *enc, const char *ptr, const char *end, 327 static int EXPATENTRY PREFIX(cdataSectionTok)(const ENCODING *enc, const char *ptr, const char *end, 303 328 const char **nextTokPtr) 304 329 { … … 377 402 /* ptr points to character following "</" */ 378 403 379 static 380 int PREFIX(scanEndTag)(const ENCODING *enc, const char *ptr, const char *end, 404 static int EXPATENTRY PREFIX(scanEndTag)(const ENCODING *enc, const char *ptr, const char *end, 381 405 const char **nextTokPtr) 382 406 { … … 425 449 /* ptr points to character following "&#X" */ 426 450 427 static 428 int PREFIX(scanHexCharRef)(const ENCODING *enc, const char *ptr, const char *end, 451 static int EXPATENTRY PREFIX(scanHexCharRef)(const ENCODING *enc, const char *ptr, const char *end, 429 452 const char **nextTokPtr) 430 453 { … … 457 480 /* ptr points to character following "&#" */ 458 481 459 static 460 int PREFIX(scanCharRef)(const ENCODING *enc, const char *ptr, const char *end, 482 static int EXPATENTRY PREFIX(scanCharRef)(const ENCODING *enc, const char *ptr, const char *end, 461 483 const char **nextTokPtr) 462 484 { … … 489 511 /* ptr points to character following "&" */ 490 512 491 static 492 int PREFIX(scanRef)(const ENCODING *enc, const char *ptr, const char *end, 513 static int EXPATENTRY PREFIX(scanRef)(const ENCODING *enc, const char *ptr, const char *end, 493 514 const char **nextTokPtr) 494 515 { … … 519 540 /* ptr points to character following first character of attribute name */ 520 541 521 static 522 int PREFIX(scanAtts)(const ENCODING *enc, const char *ptr, const char *end, 542 static int EXPATENTRY PREFIX(scanAtts)(const ENCODING *enc, const char *ptr, const char *end, 523 543 const char **nextTokPtr) 524 544 { … … 679 699 /* ptr points to character following "<" */ 680 700 681 static 682 int PREFIX(scanLt)(const ENCODING *enc, const char *ptr, const char *end, 701 static int EXPATENTRY PREFIX(scanLt)(const ENCODING *enc, const char *ptr, const char *end, 683 702 const char **nextTokPtr) 684 703 { … … 778 797 } 779 798 780 static 781 int PREFIX(contentTok)(const ENCODING *enc, const char *ptr, const char *end, 799 static int EXPATENTRY PREFIX(contentTok)(const ENCODING *enc, const char *ptr, const char *end, 782 800 const char **nextTokPtr) 783 801 { … … 877 895 /* ptr points to character following "%" */ 878 896 879 static 880 int PREFIX(scanPercent)(const ENCODING *enc, const char *ptr, const char *end, 897 static int EXPATENTRY PREFIX(scanPercent)(const ENCODING *enc, const char *ptr, const char *end, 881 898 const char **nextTokPtr) 882 899 { … … 906 923 } 907 924 908 static 909 int PREFIX(scanPoundName)(const ENCODING *enc, const char *ptr, const char *end, 925 static int EXPATENTRY PREFIX(scanPoundName)(const ENCODING *enc, const char *ptr, const char *end, 910 926 const char **nextTokPtr) 911 927 { … … 933 949 } 934 950 935 static 936 int PREFIX(scanLit)(int open, const ENCODING *enc, 951 static int EXPATENTRY PREFIX(scanLit)(int open, const ENCODING *enc, 937 952 const char *ptr, const char *end, 938 953 const char **nextTokPtr) … … 965 980 } 966 981 967 static 968 int PREFIX(prologTok)(const ENCODING *enc, const char *ptr, const char *end, 982 static int EXPATENTRY PREFIX(prologTok)(const ENCODING *enc, const char *ptr, const char *end, 969 983 const char **nextTokPtr) 970 984 { … … 1193 1207 } 1194 1208 1195 static 1196 int PREFIX(attributeValueTok)(const ENCODING *enc, const char *ptr, const char *end, 1209 static int EXPATENTRY PREFIX(attributeValueTok)(const ENCODING *enc, const char *ptr, const char *end, 1197 1210 const char **nextTokPtr) 1198 1211 { … … 1251 1264 } 1252 1265 1253 static 1254 int PREFIX(entityValueTok)(const ENCODING *enc, const char *ptr, const char *end, 1266 static int EXPATENTRY PREFIX(entityValueTok)(const ENCODING *enc, const char *ptr, const char *end, 1255 1267 const char **nextTokPtr) 1256 1268 { … … 1308 1320 #ifdef XML_DTD 1309 1321 1310 static 1311 int PREFIX(ignoreSectionTok)(const ENCODING *enc, const char *ptr, const char *end, 1322 static int EXPATENTRY PREFIX(ignoreSectionTok)(const ENCODING *enc, const char *ptr, const char *end, 1312 1323 const char **nextTokPtr) 1313 1324 { … … 1361 1372 #endif /* XML_DTD */ 1362 1373 1363 static 1364 int PREFIX(isPublicId)(const ENCODING *enc, const char *ptr, const char *end, 1374 static int EXPATENTRY PREFIX(isPublicId)(const ENCODING *enc, const char *ptr, const char *end, 1365 1375 const char **badPtr) 1366 1376 { … … 1420 1430 are stored in atts. */ 1421 1431 1422 static 1423 int PREFIX(getAtts)(const ENCODING *enc, const char *ptr, 1432 static int EXPATENTRY PREFIX(getAtts)(const ENCODING *enc, const char *ptr, 1424 1433 int attsMax, ATTRIBUTE *atts) 1425 1434 { … … 1513 1522 } 1514 1523 1515 static 1516 int PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) 1524 static int EXPATENTRY PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) 1517 1525 { 1518 1526 int result = 0; … … 1553 1561 } 1554 1562 1555 static 1556 int PREFIX(predefinedEntityName)(const ENCODING *enc, const char *ptr, const char *end) 1563 static int EXPATENTRY PREFIX(predefinedEntityName)(const ENCODING *enc, const char *ptr, const char *end) 1557 1564 { 1558 1565 switch ((end - ptr)/MINBPC(enc)) { … … 1606 1613 } 1607 1614 1608 static 1609 int PREFIX(sameName)(const ENCODING *enc, const char *ptr1, const char *ptr2) 1615 static int EXPATENTRY PREFIX(sameName)(const ENCODING *enc, const char *ptr1, const char *ptr2) 1610 1616 { 1611 1617 for (;;) { … … 1670 1676 } 1671 1677 1672 static 1673 int PREFIX(nameMatchesAscii)(const ENCODING *enc, const char *ptr1, 1678 static int EXPATENTRY PREFIX(nameMatchesAscii)(const ENCODING *enc, const char *ptr1, 1674 1679 const char *end1, const char *ptr2) 1675 1680 { … … 1683 1688 } 1684 1689 1685 static 1686 int PREFIX(nameLength)(const ENCODING *enc, const char *ptr) 1690 static int EXPATENTRY PREFIX(nameLength)(const ENCODING *enc, const char *ptr) 1687 1691 { 1688 1692 const char *start = ptr; … … 1710 1714 } 1711 1715 1712 static 1713 const char *PREFIX(skipS)(const ENCODING *enc, const char *ptr) 1716 static const char* EXPATENTRY PREFIX(skipS)(const ENCODING *enc, const char *ptr) 1714 1717 { 1715 1718 for (;;) { … … 1726 1729 } 1727 1730 1728 static 1729 void PREFIX(updatePosition)(const ENCODING *enc, 1731 static void EXPATENTRY PREFIX(updatePosition)(const ENCODING *enc, 1730 1732 const char *ptr, 1731 1733 const char *end,
Note:
See TracChangeset
for help on using the changeset viewer.