]>
Commit | Line | Data |
---|---|---|
6b1805e3 JB |
1 | --- expat-1.95.6/lib/expat.h.orig Thu Jan 16 22:03:42 2003 |
2 | +++ expat-1.95.6/lib/expat.h Tue Mar 11 12:16:14 2003 | |
3 | @@ -488,6 +488,30 @@ | |
4 | void (*release)(void *data); | |
5 | } XML_Encoding; | |
6 | ||
7 | +/* The XML_Status enum gives the possible return values for the | |
8 | + XML_Parse and XML_ParseBuffer functions. Though the return values | |
9 | + for these functions has always been described as a Boolean value, | |
10 | + the implementation, at least for the 1.95.x series, has always | |
11 | + returned exactly one of these values. The preprocessor #defines | |
12 | + are included so this stanza can be added to code that still needs | |
13 | + to support older versions of Expat 1.95.x: | |
14 | + | |
15 | + #ifndef XML_STATUS_OK | |
16 | + #define XML_STATUS_OK 1 | |
17 | + #define XML_STATUS_ERROR 0 | |
18 | + #endif | |
19 | + | |
20 | + Otherwise, the #define hackery is quite ugly and would have been dropped. | |
21 | +*/ | |
22 | + | |
23 | +enum XML_Status { | |
24 | + XML_STATUS_ERROR = 0, | |
25 | +#define XML_STATUS_ERROR XML_STATUS_ERROR | |
26 | + XML_STATUS_OK = 1 | |
27 | +#define XML_STATUS_OK XML_STATUS_OK | |
28 | +}; | |
29 | + | |
30 | + | |
31 | /* This is called for an encoding that is unknown to the parser. | |
32 | ||
33 | The encodingHandlerData argument is that which was passed as the | |
34 | @@ -716,28 +740,7 @@ | |
35 | /* Parses some input. Returns XML_STATUS_ERROR if a fatal error is | |
36 | detected. The last call to XML_Parse must have isFinal true; len | |
37 | may be zero for this call (or any other). | |
38 | - | |
39 | - The XML_Status enum gives the possible return values for the | |
40 | - XML_Parse and XML_ParseBuffer functions. Though the return values | |
41 | - for these functions has always been described as a Boolean value, | |
42 | - the implementation, at least for the 1.95.x series, has always | |
43 | - returned exactly one of these values. The preprocessor #defines | |
44 | - are included so this stanza can be added to code that still needs | |
45 | - to support older versions of Expat 1.95.x: | |
46 | - | |
47 | - #ifndef XML_STATUS_OK | |
48 | - #define XML_STATUS_OK 1 | |
49 | - #define XML_STATUS_ERROR 0 | |
50 | - #endif | |
51 | - | |
52 | - Otherwise, the #define hackery is quite ugly and would have been dropped. | |
53 | */ | |
54 | -enum XML_Status { | |
55 | - XML_STATUS_ERROR = 0, | |
56 | -#define XML_STATUS_ERROR XML_STATUS_ERROR | |
57 | - XML_STATUS_OK = 1 | |
58 | -#define XML_STATUS_OK XML_STATUS_OK | |
59 | -}; | |
60 | ||
61 | XMLPARSEAPI(enum XML_Status) | |
62 | XML_Parse(XML_Parser parser, const char *s, int len, int isFinal); |