summaryrefslogtreecommitdiffhomepage
path: root/src/driver/slbt_driver_ctx.c
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2021-05-03 02:34:19 +0000
committermidipix <writeonce@midipix.org>2021-05-03 02:34:19 +0000
commit1f2c01c19d001c0e9b8cabc2522ae91e79f70944 (patch)
treebb2f621d1586d332da0436975bf60de10b51683a /src/driver/slbt_driver_ctx.c
parenta94325a743ce01f4f27aeea75ee413504e1b4c32 (diff)
downloadslibtool-1f2c01c19d001c0e9b8cabc2522ae91e79f70944.tar.bz2
slibtool-1f2c01c19d001c0e9b8cabc2522ae91e79f70944.tar.xz
driver api: slbt_get_flavor_settings(): initial implementation.
Diffstat (limited to 'src/driver/slbt_driver_ctx.c')
-rw-r--r--src/driver/slbt_driver_ctx.c20
1 files changed, 20 insertions, 0 deletions
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;