diff options
author | midipix <writeonce@midipix.org> | 2018-08-05 00:48:15 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2018-08-05 03:22:21 -0400 |
commit | b8225b67f6e452b4751150e52b3dfee54744f4bf (patch) | |
tree | 748f2bac1ad7fb7041507ff7251ac0b9b4bac754 /include | |
parent | abf92311681c10ed589ac05f0f2b451e01fbc63e (diff) | |
download | apimagic-b8225b67f6e452b4751150e52b3dfee54744f4bf.tar.bz2 apimagic-b8225b67f6e452b4751150e52b3dfee54744f4bf.tar.xz |
output interfaces: revised API and implementation to use fdctx and pure fdio.
Diffstat (limited to 'include')
-rw-r--r-- | include/apimagic/apimagic.h | 114 |
1 files changed, 87 insertions, 27 deletions
diff --git a/include/apimagic/apimagic.h b/include/apimagic/apimagic.h index 6c75bdd..cbd15c5 100644 --- a/include/apimagic/apimagic.h +++ b/include/apimagic/apimagic.h @@ -216,31 +216,66 @@ amgc_api int amgc_lang_std_from_string (const char *); /* utility api */ amgc_api int amgc_main (int, char **, char **, const struct amgc_fd_ctx *); -amgc_api int amgc_list_unit_defines (const struct amgc_unit_ctx *, const struct amgc_layout *, FILE *); -amgc_api int amgc_list_unit_enums (const struct amgc_unit_ctx *, const struct amgc_layout *, FILE *); -amgc_api int amgc_list_unit_typedefs (const struct amgc_unit_ctx *, const struct amgc_layout *, FILE *); -amgc_api int amgc_list_unit_structs (const struct amgc_unit_ctx *, const struct amgc_layout *, FILE *); -amgc_api int amgc_list_unit_unions (const struct amgc_unit_ctx *, const struct amgc_layout *, FILE *); -amgc_api int amgc_list_unit_functions (const struct amgc_unit_ctx *, const struct amgc_layout *, FILE *); - -amgc_api int amgc_output_unit_defines (const struct amgc_unit_ctx *, const struct amgc_layout *, FILE *); -amgc_api int amgc_output_unit_enums (const struct amgc_unit_ctx *, const struct amgc_layout *, FILE *); -amgc_api int amgc_output_unit_typedefs (const struct amgc_unit_ctx *, const struct amgc_layout *, FILE *); -amgc_api int amgc_output_unit_structs (const struct amgc_unit_ctx *, const struct amgc_layout *, FILE *); -amgc_api int amgc_output_unit_unions (const struct amgc_unit_ctx *, const struct amgc_layout *, FILE *); -amgc_api int amgc_output_unit_functions(const struct amgc_unit_ctx *, const struct amgc_layout *, FILE *); + +amgc_api int amgc_list_unit_defines (const struct amgc_driver_ctx *, + const struct amgc_unit_ctx *, + const struct amgc_layout *); + +amgc_api int amgc_list_unit_enums (const struct amgc_driver_ctx *, + const struct amgc_unit_ctx *, + const struct amgc_layout *); + +amgc_api int amgc_list_unit_typedefs (const struct amgc_driver_ctx *, + const struct amgc_unit_ctx *, + const struct amgc_layout *); + +amgc_api int amgc_list_unit_structs (const struct amgc_driver_ctx *, + const struct amgc_unit_ctx *, + const struct amgc_layout *); + +amgc_api int amgc_list_unit_unions (const struct amgc_driver_ctx *, + const struct amgc_unit_ctx *, + const struct amgc_layout *); + +amgc_api int amgc_list_unit_functions (const struct amgc_driver_ctx *, + const struct amgc_unit_ctx *, + const struct amgc_layout *); + +amgc_api int amgc_output_unit_defines (const struct amgc_driver_ctx *, + const struct amgc_unit_ctx *, + const struct amgc_layout *); + +amgc_api int amgc_output_unit_enums (const struct amgc_driver_ctx *, + const struct amgc_unit_ctx *, + const struct amgc_layout *); + +amgc_api int amgc_output_unit_typedefs (const struct amgc_driver_ctx *, + const struct amgc_unit_ctx *, + const struct amgc_layout *); + +amgc_api int amgc_output_unit_structs (const struct amgc_driver_ctx *, + const struct amgc_unit_ctx *, + const struct amgc_layout *); + +amgc_api int amgc_output_unit_unions (const struct amgc_driver_ctx *, + const struct amgc_unit_ctx *, + const struct amgc_layout *); + +amgc_api int amgc_output_unit_functions(const struct amgc_driver_ctx *, + const struct amgc_unit_ctx *, + const struct amgc_layout *); /* utility helper api */ -amgc_api int amgc_perform_unit_action (const struct amgc_unit_ctx *, +amgc_api int amgc_perform_unit_action (const struct amgc_driver_ctx *, + const struct amgc_unit_ctx *, const struct amgc_action *, - const struct amgc_layout *, - FILE *); + const struct amgc_layout *); -amgc_api int amgc_output_unit_entities (const struct amgc_unit_ctx *, - int, int, const struct amgc_layout *, - FILE *); +amgc_api int amgc_output_unit_entities (const struct amgc_driver_ctx *, + const struct amgc_unit_ctx *, + int, int, const struct amgc_layout *); -amgc_api int amgc_get_entity_index (const struct amgc_entity[], const char *); +amgc_api int amgc_get_entity_index (const struct amgc_entity *, const char *); amgc_api int amgc_get_define_index (const struct amgc_unit_ctx *, const char *); amgc_api int amgc_get_enum_index (const struct amgc_unit_ctx *, const char *); amgc_api int amgc_get_typedef_index (const struct amgc_unit_ctx *, const char *); @@ -248,13 +283,38 @@ amgc_api int amgc_get_struct_index (const struct amgc_unit_ctx *, const cha amgc_api int amgc_get_union_index (const struct amgc_unit_ctx *, const char *); amgc_api int amgc_get_function_index (const struct amgc_unit_ctx *, const char *); -amgc_api int amgc_output_pad_symbol (const char *, const struct amgc_layout *, FILE *); -amgc_api int amgc_output_unit_enum (const struct amgc_unit_ctx *, const union entity_t *, const struct amgc_layout *, FILE *); -amgc_api int amgc_output_custom_enum (const struct amgc_entity *, const struct amgc_entity[], const struct amgc_layout *, FILE *); -amgc_api int amgc_output_typedef (const struct amgc_unit_ctx *, const struct amgc_entity *, const struct amgc_layout *, FILE *); -amgc_api int amgc_output_compound (const struct amgc_unit_ctx *, const struct amgc_entity *, const struct amgc_layout *, FILE *); -amgc_api int amgc_output_struct (const struct amgc_unit_ctx *, const struct amgc_entity *, const struct amgc_layout *, FILE *); -amgc_api int amgc_output_union (const struct amgc_unit_ctx *, const struct amgc_entity *, const struct amgc_layout *, FILE *); +amgc_api int amgc_output_pad_symbol (const struct amgc_driver_ctx *, + const char *, const struct amgc_layout *); + +amgc_api int amgc_output_unit_enum (const struct amgc_driver_ctx *, + const struct amgc_unit_ctx *, + const union entity_t *, + const struct amgc_layout *); + +amgc_api int amgc_output_custom_enum (const struct amgc_driver_ctx *, + const struct amgc_entity *, + const struct amgc_entity *, + const struct amgc_layout *); + +amgc_api int amgc_output_typedef (const struct amgc_driver_ctx *, + const struct amgc_unit_ctx *, + const struct amgc_entity *, + const struct amgc_layout *); + +amgc_api int amgc_output_compound (const struct amgc_driver_ctx *, + const struct amgc_unit_ctx *, + const struct amgc_entity *, + const struct amgc_layout *); + +amgc_api int amgc_output_struct (const struct amgc_driver_ctx *, + const struct amgc_unit_ctx *, + const struct amgc_entity *, + const struct amgc_layout *); + +amgc_api int amgc_output_union (const struct amgc_driver_ctx *, + const struct amgc_unit_ctx *, + const struct amgc_entity *, + const struct amgc_layout *); /* error trace api */ amgc_api int amgc_output_error_record (const struct amgc_driver_ctx *, const struct amgc_error_info *); |