From e9f8636ee7158bf1a67159b93126bd8e1e82e284 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Thu, 8 Apr 2021 19:25:30 -0500 Subject: [PATCH] Cleanup: rename controller_rule_simulate() to controller_rule_validate(). This function is actually for the "validation" part of the simulation. Changing the name makes it less confusing and more semantically accurate. --- level_3/controller/c/private-rule.c | 10 +++++----- level_3/controller/c/private-rule.h | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/level_3/controller/c/private-rule.c b/level_3/controller/c/private-rule.c index 2b71ee2..3c62c3e 100644 --- a/level_3/controller/c/private-rule.c +++ b/level_3/controller/c/private-rule.c @@ -1638,7 +1638,7 @@ extern "C" { } if ((process->options & controller_rule_option_simulate) && main.data->parameters[controller_parameter_validate].result == f_console_result_found) { - controller_rule_simulate(process->rule, controller_rule_action_type_start, process->options, main, &process->cache); + controller_rule_validate(process->rule, controller_rule_action_type_start, process->options, main, &process->cache); } f_array_length_t i = 0; @@ -4306,8 +4306,8 @@ extern "C" { } #endif // _di_controller_rule_setting_read_ -#ifndef _di_controller_rule_simulate_ - void controller_rule_simulate(const controller_rule_t rule, const uint8_t action, const uint8_t options, const controller_main_t main, controller_cache_t *cache) { +#ifndef _di_controller_rule_validate_ + void controller_rule_validate(const controller_rule_t rule, const uint8_t action, const uint8_t options, const controller_main_t main, controller_cache_t *cache) { const controller_data_t *data = main.data; @@ -4327,7 +4327,7 @@ extern "C" { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fprintf(data->error.to.stream, "%s%sUnsupported action type '", data->error.context.before->string, data->error.prefix ? data->error.prefix : f_string_empty_s); fprintf(data->error.to.stream, "%s%s%s%s", data->error.context.after->string, data->error.notable.before->string, controller_rule_action_type_name(action).string, data->error.notable.after->string); - fprintf(data->error.to.stream, "%s' while attempting to simulate rule execution.%s%c", data->error.context.before->string, data->error.context.after->string, f_string_eol_s[0]); + fprintf(data->error.to.stream, "%s' while attempting to validate rule execution.%s%c", data->error.context.before->string, data->error.context.after->string, f_string_eol_s[0]); controller_rule_error_print_cache(data->error, cache->action, F_true); } @@ -4599,7 +4599,7 @@ extern "C" { f_thread_mutex_unlock(&main.thread->lock.print); } -#endif // _di_controller_rule_simulate_ +#endif // _di_controller_rule_validate_ #ifndef _di_controller_rule_wait_all_ void controller_rule_wait_all(const controller_main_t main, controller_process_t *caller) { diff --git a/level_3/controller/c/private-rule.h b/level_3/controller/c/private-rule.h index e6a32f7..5062509 100644 --- a/level_3/controller/c/private-rule.h +++ b/level_3/controller/c/private-rule.h @@ -770,9 +770,9 @@ extern "C" { * @param cache * A structure for containing and caching relevant data. */ -#ifndef _di_controller_rule_simulate_ - extern void controller_rule_simulate(const controller_rule_t rule, const uint8_t action, const uint8_t options, const controller_main_t main, controller_cache_t *cache) f_gcc_attribute_visibility_internal; -#endif // _di_controller_rule_simulate_ +#ifndef _di_controller_rule_validate_ + extern void controller_rule_validate(const controller_rule_t rule, const uint8_t action, const uint8_t options, const controller_main_t main, controller_cache_t *cache) f_gcc_attribute_visibility_internal; +#endif // _di_controller_rule_validate_ /** * Wait until all currently running Rule processes are complete. -- 1.8.3.1