From ca3de486debc160722d02cbd969a7796894ecd56 Mon Sep 17 00:00:00 2001 From: midipix Date: Sat, 30 Jan 2016 19:32:39 -0500 Subject: amgc_output_struct() and amgc_output_union(): initial implementation. --- src/output/amgc_output_compound.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'src/output') 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; +} -- cgit v1.2.3