summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/apimagic/apimagic.h114
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 *);