From 2c58bc3a9821faa454dcd270815f9e001f825b6a Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sat, 3 Jun 2023 14:33:31 -0700 Subject: til_settings: add an optional til_settings_t.prefix Preparatory commit for bridging the gap separating a baked til_setup_t from a runtime-populated descendant til_settings_t like modules::rtv produces for its channels via til_module_setup_randomize(). For these currently orphaned til_settings_t instances we don't readily have access to the logical ancestor til_settings_t that was used to produce the module_context's bound til_setup_t. But we don't really need the ancestor til_settings_t, all we _really_ want is the ancestral path to prefix the orphan til_settings_t instances. So this commit introduces supplying a prefix which gets prepended to paths printed via the settings instance. A later commit will make use of this in modules::rtv when producing the settings instance passed to til_module_setup_randomize() --- src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 25ae4cd..240dab1 100644 --- a/src/main.c +++ b/src/main.c @@ -221,11 +221,11 @@ static int setup_from_args(til_args_t *args, setup_t *res_setup, const til_setti */ srand(setup.seed); - setup.module_settings = til_settings_new(NULL, "module", args->module); + setup.module_settings = til_settings_new(NULL, NULL, "module", args->module); if (!setup.module_settings) goto _err; - setup.video_settings = til_settings_new(NULL, "video", args->video); + setup.video_settings = til_settings_new(NULL, NULL, "video", args->video); if (!setup.video_settings) goto _err; -- cgit v1.2.1