summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-01-01 12:01:53 -0500
committermidipix <writeonce@midipix.org>2016-01-02 01:39:28 -0500
commitc46a30d75a992c7c061cba8c128b1bf134c45952 (patch)
tree9d1687fc17b6fb5eb9c3ac612f5b8f0fec7345bb
parent7b509c9eb9cabc55216b156711b599799eefff1e (diff)
downloadapimagic-c46a30d75a992c7c061cba8c128b1bf134c45952.tar.bz2
apimagic-c46a30d75a992c7c061cba8c128b1bf134c45952.tar.xz
utility interfaces: initial design.
-rw-r--r--include/apimagic/apimagic.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/apimagic/apimagic.h b/include/apimagic/apimagic.h
index f1bec42..beee461 100644
--- a/include/apimagic/apimagic.h
+++ b/include/apimagic/apimagic.h
@@ -138,6 +138,29 @@ amgc_api int amgc_unmap_input (struct amgc_input *);
amgc_api int amgc_lang_std_from_string (const char * std);
/* utility api */
+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 *);
+
+/* utility helper api */
+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 *);
+amgc_api int amgc_get_struct_index (const struct amgc_unit_ctx *, const char *);
+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 *);