summaryrefslogtreecommitdiff
path: root/yxml.c
diff options
context:
space:
mode:
authorSilvan Jegen <s.jegen@gmail.com>2016-09-06 21:26:43 +0200
committerSilvan Jegen <s.jegen@gmail.com>2016-09-06 21:26:43 +0200
commitd986cd307bd8e85d96624cd53828854e1bad20ae (patch)
tree3d87d4ea6db7f7206e99e63df7c2405ce2cf9fe2 /yxml.c
parented1acd9be46b4e3a4b0a7dbe3d56f483c2c38d00 (diff)
Add the yxml library test program
Diffstat (limited to 'yxml.c')
-rw-r--r--yxml.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/yxml.c b/yxml.c
new file mode 100644
index 0000000..f575a8d
--- /dev/null
+++ b/yxml.c
@@ -0,0 +1,23 @@
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "yxmllib.h"
+
+#define BUFSIZE 8096
+
+int process(char *fn, yxml_t *state) {
+ yxml_init(state, state+1, BUFSIZE);
+
+ return 0;
+}
+
+int main(int argc, char *argv[]) {
+ yxml_t *state = malloc(sizeof(yxml_t) + BUFSIZE);
+
+ for (int i = 1; i < argc; i++) {
+ process(argv[i], state);
+ }
+
+ return 0;
+}
+