diff options
author | 2007-08-30 18:41:04 +0000 | |
---|---|---|
committer | 2007-08-30 18:41:04 +0000 | |
commit | b26ab0f80a3c3bced9f6189a75fc5482b4b4c4fa (patch) | |
tree | 07c81dd7e928cc20969424e5e46df4cff1b4fed1 /lib/libexpat/examples/elements.c | |
parent | document address ranges, with help from jmc@ (diff) | |
download | wireguard-openbsd-b26ab0f80a3c3bced9f6189a75fc5482b4b4c4fa.tar.xz wireguard-openbsd-b26ab0f80a3c3bced9f6189a75fc5482b4b4c4fa.zip |
Update to expat 2.0.1. ok deraadt@
Diffstat (limited to 'lib/libexpat/examples/elements.c')
-rw-r--r-- | lib/libexpat/examples/elements.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/libexpat/examples/elements.c b/lib/libexpat/examples/elements.c index 421a1ce7793..6b8f85501b6 100644 --- a/lib/libexpat/examples/elements.c +++ b/lib/libexpat/examples/elements.c @@ -8,6 +8,10 @@ #include <stdio.h> #include "expat.h" +#if defined(__amigaos__) && defined(__USE_INLINE__) +#include <proto/expat.h> +#endif + #ifdef XML_LARGE_SIZE #if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400 #define XML_FMT_INT_MOD "I64" @@ -36,14 +40,8 @@ endElement(void *userData, const char *name) *depthPtr -= 1; } -#ifdef AMIGA_SHARED_LIB -#include <proto/expat.h> -int -amiga_main(int argc, char *argv[]) -#else int main(int argc, char *argv[]) -#endif { char buf[BUFSIZ]; XML_Parser parser = XML_ParserCreate(NULL); @@ -52,7 +50,7 @@ main(int argc, char *argv[]) XML_SetUserData(parser, &depth); XML_SetElementHandler(parser, startElement, endElement); do { - size_t len = fread(buf, 1, sizeof(buf), stdin); + int len = (int)fread(buf, 1, sizeof(buf), stdin); done = len < sizeof(buf); if (XML_Parse(parser, buf, len, done) == XML_STATUS_ERROR) { fprintf(stderr, |