From 0c91ec9d3ffdcc3a978eaa3bc02470462d34df7a Mon Sep 17 00:00:00 2001 From: midipix Date: Sat, 30 Jan 2016 20:15:20 -0500 Subject: driver: --print-structs and --print-unions: initial integration. --- src/output/amgc_output_compound.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'src/output/amgc_output_compound.c') diff --git a/src/output/amgc_output_compound.c b/src/output/amgc_output_compound.c index 07bd730..fc95af7 100644 --- a/src/output/amgc_output_compound.c +++ b/src/output/amgc_output_compound.c @@ -346,3 +346,31 @@ int amgc_output_union( else return -1; } + +int amgc_output_unit_structs( + const struct amgc_unit_ctx * uctx, + const struct amgc_layout * layout, + FILE * fout) +{ + const struct amgc_entity * aentity; + + for (aentity=uctx->entities->structs; aentity->entity; aentity++) + if (output_compound_entity(uctx,aentity,layout,fout)) + return -1; + + return 0; +} + +int amgc_output_unit_unions( + const struct amgc_unit_ctx * uctx, + const struct amgc_layout * layout, + FILE * fout) +{ + const struct amgc_entity * aentity; + + for (aentity=uctx->entities->unions; aentity->entity; aentity++) + if (output_compound_entity(uctx,aentity,layout,fout)) + return -1; + + return 0; +} -- cgit v1.2.3