summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-01-30 19:32:39 -0500
committermidipix <writeonce@midipix.org>2016-01-30 19:32:39 -0500
commitca3de486debc160722d02cbd969a7796894ecd56 (patch)
tree01d4ad7e14e4a04fcd7e11aea1552f86b475a87b
parentd1ebf813bf5f1fd7611bfa37dddfc779649e3668 (diff)
downloadapimagic-ca3de486debc160722d02cbd969a7796894ecd56.tar.bz2
apimagic-ca3de486debc160722d02cbd969a7796894ecd56.tar.xz
amgc_output_struct() and amgc_output_union(): initial implementation.
-rw-r--r--src/output/amgc_output_compound.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/output/amgc_output_compound.c b/src/output/amgc_output_compound.c
index 02923b4..07bd730 100644
--- a/src/output/amgc_output_compound.c
+++ b/src/output/amgc_output_compound.c
@@ -314,3 +314,35 @@ int amgc_output_compound(
else
return -1;
}
+
+int amgc_output_struct(
+ const struct amgc_unit_ctx * uctx,
+ const struct amgc_entity * aentity,
+ const struct amgc_layout * layout,
+ FILE * fout)
+{
+ union entity_t const * entity;
+
+ entity = aentity->entity;
+
+ if (entity->kind == ENTITY_STRUCT)
+ return output_compound_entity(uctx,aentity,layout,fout);
+ else
+ return -1;
+}
+
+int amgc_output_union(
+ const struct amgc_unit_ctx * uctx,
+ const struct amgc_entity * aentity,
+ const struct amgc_layout * layout,
+ FILE * fout)
+{
+ union entity_t const * entity;
+
+ entity = aentity->entity;
+
+ if (entity->kind == ENTITY_UNION)
+ return output_compound_entity(uctx,aentity,layout,fout);
+ else
+ return -1;
+}