diff options
author | fdrake <fdrake> | 2002-08-02 19:40:09 +0000 |
---|---|---|
committer | fdrake <fdrake> | 2002-08-02 19:40:09 +0000 |
commit | d0591f8989f4b72e3eeb9175bfa91ed021a1832e (patch) | |
tree | 0b14128672259f70e561c1f6b36791ae3751562a /examples | |
parent | dacd0925da4bf3b76ee6ead71c2efd969eef4aec (diff) | |
download | libexpat-d0591f8989f4b72e3eeb9175bfa91ed021a1832e.tar.gz |
Define specific return values for the XML_Parse*() functions, and use them
to test all XML_Parse*() return values in the test and sample code.
This is binary-compatible with previous Expat 1.95.x releases.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/elements.c | 2 | ||||
-rw-r--r-- | examples/outline.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/elements.c b/examples/elements.c index 42f0889..4ed4da6 100644 --- a/examples/elements.c +++ b/examples/elements.c @@ -37,7 +37,7 @@ main(int argc, char *argv[]) do { size_t len = fread(buf, 1, sizeof(buf), stdin); done = len < sizeof(buf); - if (!XML_Parse(parser, buf, len, done)) { + if (XML_Parse(parser, buf, len, done) == XML_STATUS_ERROR) { fprintf(stderr, "%s at line %d\n", XML_ErrorString(XML_GetErrorCode(parser)), diff --git a/examples/outline.c b/examples/outline.c index 2eeca06..10f6d1d 100644 --- a/examples/outline.c +++ b/examples/outline.c @@ -76,7 +76,7 @@ main(int argc, char *argv[]) } done = feof(stdin); - if (! XML_Parse(p, Buff, len, done)) { + if (XML_Parse(p, Buff, len, done) == XML_STATUS_ERROR) { fprintf(stderr, "Parse error at line %d:\n%s\n", XML_GetCurrentLineNumber(p), XML_ErrorString(XML_GetErrorCode(p))); |