1 | | --- lib/expat.h Thu Jan 16 15:03:42 2003 |
2 | | +++ lib/expat.h Wed May 21 11:38:14 2003 |
3 | | @@ -647,6 +647,32 @@ |
4 | | /* Returns the last value set by XML_SetUserData or NULL. */ |
5 | | #define XML_GetUserData(parser) (*(void **)(parser)) |
6 | | |
7 | | +/* Parses some input. Returns XML_STATUS_ERROR if a fatal error is |
8 | | + detected. The last call to XML_Parse must have isFinal true; len |
9 | | + may be zero for this call (or any other). |
10 | | + |
11 | | + The XML_Status enum gives the possible return values for the |
12 | | + XML_Parse and XML_ParseBuffer functions. Though the return values |
13 | | + for these functions has always been described as a Boolean value, |
14 | | + the implementation, at least for the 1.95.x series, has always |
15 | | + returned exactly one of these values. The preprocessor #defines |
16 | | + are included so this stanza can be added to code that still needs |
17 | | + to support older versions of Expat 1.95.x: |
18 | | + |
19 | | + #ifndef XML_STATUS_OK |
20 | | + #define XML_STATUS_OK 1 |
21 | | + #define XML_STATUS_ERROR 0 |
22 | | + #endif |
23 | | + |
24 | | + Otherwise, the #define hackery is quite ugly and would have been dropped. |
25 | | +*/ |
26 | | +enum XML_Status { |
27 | | + XML_STATUS_ERROR = 0, |
28 | | +#define XML_STATUS_ERROR XML_STATUS_ERROR |
29 | | + XML_STATUS_OK = 1 |
30 | | +#define XML_STATUS_OK XML_STATUS_OK |
31 | | +}; |
32 | | + |
33 | | /* This is equivalent to supplying an encoding argument to |
34 | | XML_ParserCreate. On success XML_SetEncoding returns non-zero, |
35 | | zero otherwise. |
36 | | @@ -712,32 +738,6 @@ |
37 | | */ |
38 | | XMLPARSEAPI(int) |
39 | | XML_GetIdAttributeIndex(XML_Parser parser); |
40 | | - |
41 | | -/* Parses some input. Returns XML_STATUS_ERROR if a fatal error is |
42 | | - detected. The last call to XML_Parse must have isFinal true; len |
43 | | - may be zero for this call (or any other). |
44 | | - |
45 | | - The XML_Status enum gives the possible return values for the |
46 | | - XML_Parse and XML_ParseBuffer functions. Though the return values |
47 | | - for these functions has always been described as a Boolean value, |
48 | | - the implementation, at least for the 1.95.x series, has always |
49 | | - returned exactly one of these values. The preprocessor #defines |
50 | | - are included so this stanza can be added to code that still needs |
51 | | - to support older versions of Expat 1.95.x: |
52 | | - |
53 | | - #ifndef XML_STATUS_OK |
54 | | - #define XML_STATUS_OK 1 |
55 | | - #define XML_STATUS_ERROR 0 |
56 | | - #endif |
57 | | - |
58 | | - Otherwise, the #define hackery is quite ugly and would have been dropped. |
59 | | -*/ |
60 | | -enum XML_Status { |
61 | | - XML_STATUS_ERROR = 0, |
62 | | -#define XML_STATUS_ERROR XML_STATUS_ERROR |
63 | | - XML_STATUS_OK = 1 |
64 | | -#define XML_STATUS_OK XML_STATUS_OK |
65 | | -}; |
66 | | |
67 | | XMLPARSEAPI(enum XML_Status) |
68 | | XML_Parse(XML_Parser parser, const char *s, int len, int isFinal); |
69 | | |