summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/apimagic/apimagic.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/apimagic/apimagic.h b/include/apimagic/apimagic.h
index 57a24fa..6c75bdd 100644
--- a/include/apimagic/apimagic.h
+++ b/include/apimagic/apimagic.h
@@ -90,6 +90,15 @@ struct amgc_source_version {
const char * commit;
};
+struct amgc_fd_ctx {
+ int fdin;
+ int fdout;
+ int fderr;
+ int fdlog;
+ int fdcwd;
+ int fddst;
+};
+
struct amgc_action {
enum amgc_action_type type;
int action;
@@ -188,6 +197,7 @@ struct amgc_layout {
/* driver api */
amgc_api int amgc_get_driver_ctx (char **, char **, uint32_t,
+ const struct amgc_fd_ctx *,
struct amgc_driver_ctx **);
amgc_api void amgc_free_driver_ctx (struct amgc_driver_ctx *);
@@ -198,11 +208,14 @@ amgc_api int amgc_get_unit_ctx (const struct amgc_driver_ctx *,
amgc_api void amgc_free_unit_ctx (struct amgc_unit_ctx *);
+amgc_api int amgc_get_driver_fdctx (const struct amgc_driver_ctx *, struct amgc_fd_ctx *);
+amgc_api int amgc_set_driver_fdctx (struct amgc_driver_ctx *, const struct amgc_fd_ctx *);
+
/* driver helper api */
amgc_api int amgc_lang_std_from_string (const char *);
/* utility api */
-amgc_api int amgc_main (int, char **, char **);
+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 *);