diff options
author | midipix <writeonce@midipix.org> | 2016-01-08 15:09:12 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-01-09 05:32:50 -0500 |
commit | bbff09033370ecee3ed999fe094494463c338add (patch) | |
tree | 3b655b7e312c697ce4c331b82672b7427f48cb21 /src/driver | |
parent | d4478bf2f9538f5ddb95dedae51d884bb428fcb5 (diff) | |
download | apimagic-bbff09033370ecee3ed999fe094494463c338add.tar.bz2 apimagic-bbff09033370ecee3ed999fe094494463c338add.tar.xz |
amgc_perform_unit_action(): initial implementation and integration.
Diffstat (limited to 'src/driver')
-rw-r--r-- | src/driver/amgc_unit_action.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/driver/amgc_unit_action.c b/src/driver/amgc_unit_action.c new file mode 100644 index 0000000..04cfb8f --- /dev/null +++ b/src/driver/amgc_unit_action.c @@ -0,0 +1,31 @@ +/**********************************************************/ +/* apimagic: cparser-based API normalization utility */ +/* Copyright (C) 2015--2016 Z. Gilboa */ +/* Released under GPLv2 and GPLv3; see COPYING.APIMAGIC. */ +/**********************************************************/ + +#include <apimagic/apimagic.h> +#include "apimagic_driver_impl.h" + +int amgc_perform_unit_action( + const struct amgc_unit_ctx * uctx, + const struct amgc_action * action, + const struct amgc_layout * layout, + FILE * fout) +{ + switch (action->action) { + case AMGC_OUTPUT_ENUM: + if (action->symbol) + return -1; + else + return amgc_output_unit_enums(uctx,0,stdout); + + case AMGC_LIST_ENUM: + if (action->symbol) + return -1; + else + return amgc_list_unit_enums(uctx,0,stdout); + } + + return -1; +} |