summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/slibtool/slibtool.h2
-rw-r--r--src/driver/slbt_driver_ctx.c20
2 files changed, 22 insertions, 0 deletions
diff --git a/include/slibtool/slibtool.h b/include/slibtool/slibtool.h
index 31252d6..b10698a 100644
--- a/include/slibtool/slibtool.h
+++ b/include/slibtool/slibtool.h
@@ -294,6 +294,8 @@ slbt_api int slbt_exec_uninstall (const struct slbt_driver_ctx *, struct
slbt_api int slbt_set_alternate_host (const struct slbt_driver_ctx *, const char * host, const char * flavor);
slbt_api void slbt_reset_alternate_host (const struct slbt_driver_ctx *);
+slbt_api int slbt_get_flavor_settings (const char *, const struct slbt_flavor_settings **);
+
/* helper api */
slbt_api int slbt_archive_import (const struct slbt_driver_ctx *, struct slbt_exec_ctx *,
char * dstarchive, char * srcarchive);
diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c
index fecf27d..37d5660 100644
--- a/src/driver/slbt_driver_ctx.c
+++ b/src/driver/slbt_driver_ctx.c
@@ -1882,6 +1882,26 @@ int slbt_set_alternate_host(
return 0;
}
+int slbt_get_flavor_settings(
+ const char * flavor,
+ const struct slbt_flavor_settings ** settings)
+{
+ if (!strcmp(flavor,"midipix"))
+ *settings = &host_flavor_midipix;
+ else if (!strcmp(flavor,"mingw"))
+ *settings = &host_flavor_mingw;
+ else if (!strcmp(flavor,"cygwin"))
+ *settings = &host_flavor_cygwin;
+ else if (!strcmp(flavor,"darwin"))
+ *settings = &host_flavor_darwin;
+ else if (!strcmp(flavor,"default"))
+ *settings = &host_flavor_default;
+ else
+ *settings = 0;
+
+ return *settings ? 0 : -1;
+}
+
const struct slbt_source_version * slbt_source_version(void)
{
return &slbt_src_version;