]> git.ozlabs.org Git - ccan-lca-2011.git/blobdiff - ccan/cdump/test/test_header.h
cdump: first cut of translation of Tridge's genstruct junkcode.
[ccan-lca-2011.git] / ccan / cdump / test / test_header.h
diff --git a/ccan/cdump/test/test_header.h b/ccan/cdump/test/test_header.h
new file mode 100644 (file)
index 0000000..719d40c
--- /dev/null
@@ -0,0 +1,31 @@
+CDUMP_SAVED enum fruit {APPLE, ORANGE=2, PEAR,
+                     RASBERRY, PEACH};
+
+CDUMP_SAVED
+struct test2 
+{
+       int x1;
+       char *foo;
+       char fstring[20];
+       int dlen;
+       char *dfoo CDUMP_LEN(dlen);
+       enum fruit fvalue;
+       struct test2 *next;
+};
+
+CDUMP_SAVED struct test1 {
+       char foo[100];
+       char *foo2[20];
+       int xlen;
+       int *iarray CDUMP_LEN(xlen);
+       unsigned slen;
+       char **strings CDUMP_LEN(slen);
+       char *s2[5];
+       double d1, d2, d3;
+       struct test2 *test2;
+       int alen;
+       struct test2 *test2_array CDUMP_LEN(alen);
+       struct test2 *test2_fixed[2];
+       int plen;
+       struct test2 **test2_parray CDUMP_LEN(plen);
+};