summaryrefslogtreecommitdiff
path: root/examples/outline.c
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2009-09-25 16:04:37 -0700
committerElliott Hughes <enh@google.com>2009-09-25 16:04:37 -0700
commitd07d5a72938fd52415368c2320fc29575ae9a0c3 (patch)
tree0c51b66a56e624bcd9729cec0454f4e3febddeb8 /examples/outline.c
parentc5b20fe9deacede72276a0c39142fa8397aa4602 (diff)
downloadexpat-d07d5a72938fd52415368c2320fc29575ae9a0c3.tar.gz
Update expat to 2.0.1.
We had one local patch relative to 2.0.0, in "xmltok_impl.c". That fix isn't in 2.0.1, but an equivalent patch is in expat CVS. I've gone with the upstream change, and surrounded it with BEGIN/END android-changed comments. Bug: 2086506
Diffstat (limited to 'examples/outline.c')
-rw-r--r--examples/outline.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/examples/outline.c b/examples/outline.c
index 807ddb89..3a3c8385 100644
--- a/examples/outline.c
+++ b/examples/outline.c
@@ -25,6 +25,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"
@@ -65,14 +69,8 @@ end(void *data, const char *el)
Depth--;
}
-#ifdef AMIGA_SHARED_LIB
-#include <proto/expat.h>
-int
-amiga_main(int argc, char *argv[])
-#else
int
main(int argc, char *argv[])
-#endif
{
XML_Parser p = XML_ParserCreate(NULL);
if (! p) {
@@ -86,7 +84,7 @@ main(int argc, char *argv[])
int done;
int len;
- len = fread(Buff, 1, BUFFSIZE, stdin);
+ len = (int)fread(Buff, 1, BUFFSIZE, stdin);
if (ferror(stdin)) {
fprintf(stderr, "Read error\n");
exit(-1);
@@ -103,5 +101,6 @@ main(int argc, char *argv[])
if (done)
break;
}
+ XML_ParserFree(p);
return 0;
}