From 58c2cb3cf89a9eb1fa572051881256594a36eaac Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Tue, 30 May 2023 15:23:25 -0700 Subject: til: s/til_module_randomize_setup/til_module_setup_randomize/ Mechanical rename just to make this consistent with til_module_setup()/til_module_setup_finalize() I should probably do a cleanup pass throughout the til APIs to standardize on a subject-verb-object or subject-object-verb order... Things have become a little inconsistent organically over time --- src/modules/montage/montage.c | 2 +- src/modules/rkt/rkt.c | 2 +- src/modules/rtv/rtv.c | 2 +- src/til.c | 3 +-- src/til.h | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/modules/montage/montage.c b/src/modules/montage/montage.c index 301f323..08fd1b3 100644 --- a/src/modules/montage/montage.c +++ b/src/modules/montage/montage.c @@ -90,7 +90,7 @@ static til_module_context_t * montage_create_context(const til_module_t *module, const til_module_t *module = ctxt->modules[i]; til_setup_t *setup = NULL; - (void) til_module_randomize_setup(module, rand_r(&seed), &setup, NULL); + (void) til_module_setup_randomize(module, rand_r(&seed), &setup, NULL); /* FIXME errors */ (void) til_module_create_context(module, stream, rand_r(&seed), ticks, 1, setup, &ctxt->contexts[i]); diff --git a/src/modules/rkt/rkt.c b/src/modules/rkt/rkt.c index e76070a..77b3b49 100644 --- a/src/modules/rkt/rkt.c +++ b/src/modules/rkt/rkt.c @@ -75,7 +75,7 @@ static til_module_context_t * rkt_create_context(const til_module_t *module, til { til_setup_t *module_setup = NULL; - (void) til_module_randomize_setup(ctxt->seq_module, rand_r(&seed), &module_setup, NULL); + (void) til_module_setup_randomize(ctxt->seq_module, rand_r(&seed), &module_setup, NULL); (void) til_module_create_context(ctxt->seq_module, stream, rand_r(&seed), ticks, 0, module_setup, &ctxt->seq_module_ctxt); til_setup_free(module_setup); diff --git a/src/modules/rtv/rtv.c b/src/modules/rtv/rtv.c index c3555c5..9d006bc 100644 --- a/src/modules/rtv/rtv.c +++ b/src/modules/rtv/rtv.c @@ -174,7 +174,7 @@ static void setup_next_channel(rtv_context_t *ctxt, unsigned ticks) char *settings_as_arg = NULL; txt_t *caption; - (void) til_module_randomize_setup(ctxt->channel->module, rand_r(&ctxt->til_module_context.seed), &ctxt->channel->module_setup, &settings_as_arg); + (void) til_module_setup_randomize(ctxt->channel->module, rand_r(&ctxt->til_module_context.seed), &ctxt->channel->module_setup, &settings_as_arg); caption = txt_newf("Title: %s%s%s\nDescription: %s%s%s", ctxt->channel->module->name, ctxt->channel->module->author ? "\nAuthor: " : "", diff --git a/src/til.c b/src/til.c index 26738d8..c680db8 100644 --- a/src/til.c +++ b/src/til.c @@ -308,11 +308,10 @@ int til_module_setup(const til_settings_t *settings, til_setting_t **res_setting } -/* TODO: rename to til_module_setup_randomize() */ /* originally taken from rtv, this randomizes a module's setup @res_setup, args @res_arg * returns 0 on on setup successful with results stored @res_*, -errno on error. */ -int til_module_randomize_setup(const til_module_t *module, unsigned seed, til_setup_t **res_setup, char **res_arg) +int til_module_setup_randomize(const til_module_t *module, unsigned seed, til_setup_t **res_setup, char **res_arg) { til_settings_t *settings; til_setting_t *setting; diff --git a/src/til.h b/src/til.h index 355dfdd..6388a32 100644 --- a/src/til.h +++ b/src/til.h @@ -46,7 +46,7 @@ void til_module_render(til_module_context_t *context, til_stream_t *stream, unsi int til_module_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup, til_module_context_t **res_context); til_module_context_t * til_module_destroy_context(til_module_context_t *context, til_stream_t *stream); int til_module_setup(const til_settings_t *settings, til_setting_t **res_setting, const til_setting_desc_t **res_desc, til_setup_t **res_setup); -int til_module_randomize_setup(const til_module_t *module, unsigned seed, til_setup_t **res_setup, char **res_arg); +int til_module_setup_randomize(const til_module_t *module, unsigned seed, til_setup_t **res_setup, char **res_arg); int til_module_setup_finalize(const til_module_t *module, const til_settings_t *module_settings, til_setup_t **res_setup); int til_fragmenter_slice_per_cpu(til_module_context_t *context, const til_fb_fragment_t *fragment, unsigned number, til_fb_fragment_t *res_fragment); int til_fragmenter_tile64(til_module_context_t *context, const til_fb_fragment_t *fragment, unsigned number, til_fb_fragment_t *res_fragment); -- cgit v1.2.3