diff options
Diffstat (limited to 'src/output')
-rw-r--r-- | src/output/amgc_output_compound.c | 28 | ||||
-rw-r--r-- | src/output/amgc_output_entities.c | 6 |
2 files changed, 34 insertions, 0 deletions
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; +} diff --git a/src/output/amgc_output_entities.c b/src/output/amgc_output_entities.c index 9d8d017..c1618c2 100644 --- a/src/output/amgc_output_entities.c +++ b/src/output/amgc_output_entities.c @@ -40,6 +40,12 @@ int amgc_output_unit_entities( case ENTITY_TYPEDEF: return output_typedefs(uctx,subset,layout,fout); + + case ENTITY_STRUCT: + return amgc_output_unit_structs(uctx,layout,fout); + + case ENTITY_UNION: + return amgc_output_unit_unions(uctx,layout,fout); } return -1; |