OLD | NEW |
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 COMPILED_FROM_DSP |
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(__amigaos4__) | 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 COMPILED_FROM_DSP */ |
20 | 20 |
21 #include "expat_external.h" | 21 #include "expat_external.h" |
(...skipping 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1338 } | 1338 } |
1339 else | 1339 else |
1340 (*fromP)++; | 1340 (*fromP)++; |
1341 *(*toP)++ = c; | 1341 *(*toP)++ = c; |
1342 } | 1342 } |
1343 } | 1343 } |
1344 | 1344 |
1345 ENCODING * | 1345 ENCODING * |
1346 XmlInitUnknownEncoding(void *mem, | 1346 XmlInitUnknownEncoding(void *mem, |
1347 int *table, | 1347 int *table, |
1348 CONVERTER convert, | 1348 CONVERTER convert, |
1349 void *userData) | 1349 void *userData) |
1350 { | 1350 { |
1351 int i; | 1351 int i; |
1352 struct unknown_encoding *e = (struct unknown_encoding *)mem; | 1352 struct unknown_encoding *e = (struct unknown_encoding *)mem; |
1353 for (i = 0; i < (int)sizeof(struct normal_encoding); i++) | 1353 for (i = 0; i < (int)sizeof(struct normal_encoding); i++) |
1354 ((char *)mem)[i] = ((char *)&latin1_encoding)[i]; | 1354 ((char *)mem)[i] = ((char *)&latin1_encoding)[i]; |
1355 for (i = 0; i < 128; i++) | 1355 for (i = 0; i < 128; i++) |
1356 if (latin1_encoding.type[i] != BT_OTHER | 1356 if (latin1_encoding.type[i] != BT_OTHER |
1357 && latin1_encoding.type[i] != BT_NONXML | 1357 && latin1_encoding.type[i] != BT_NONXML |
1358 && table[i] != i) | 1358 && table[i] != i) |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1632 #define XML_TOK_NS_C | 1632 #define XML_TOK_NS_C |
1633 #include "xmltok_ns.c" | 1633 #include "xmltok_ns.c" |
1634 #undef XML_TOK_NS_C | 1634 #undef XML_TOK_NS_C |
1635 | 1635 |
1636 #undef NS | 1636 #undef NS |
1637 #undef ns | 1637 #undef ns |
1638 | 1638 |
1639 ENCODING * | 1639 ENCODING * |
1640 XmlInitUnknownEncodingNS(void *mem, | 1640 XmlInitUnknownEncodingNS(void *mem, |
1641 int *table, | 1641 int *table, |
1642 CONVERTER convert, | 1642 CONVERTER convert, |
1643 void *userData) | 1643 void *userData) |
1644 { | 1644 { |
1645 ENCODING *enc = XmlInitUnknownEncoding(mem, table, convert, userData); | 1645 ENCODING *enc = XmlInitUnknownEncoding(mem, table, convert, userData); |
1646 if (enc) | 1646 if (enc) |
1647 ((struct normal_encoding *)enc)->type[ASCII_COLON] = BT_COLON; | 1647 ((struct normal_encoding *)enc)->type[ASCII_COLON] = BT_COLON; |
1648 return enc; | 1648 return enc; |
1649 } | 1649 } |
1650 | 1650 |
1651 #endif /* XML_NS */ | 1651 #endif /* XML_NS */ |
OLD | NEW |