From f42f242fbae55f2884e1debe9a079968acd1609a Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Fri, 5 Dec 2025 22:53:11 -0600 Subject: [PATCH] Cleanup: Switch from 'callback' to 'call'. --- sources/c/program/kevux/tools/remove/main/operate.h | 4 ++-- sources/c/program/kevux/tools/remove/main/remove.h | 2 +- sources/c/program/kevux/tools/tacocat/main/common.c | 4 ++-- sources/c/program/kevux/tools/tacocat/main/common.h | 2 +- .../program/kevux/tools/tacocat/main/common/type.h | 21 +++++++++++---------- .../c/program/kevux/tools/tacocat/main/tacocat.h | 2 +- .../c/program/kevux/tools/tacocat/tacocat/main.c | 2 +- 7 files changed, 19 insertions(+), 18 deletions(-) diff --git a/sources/c/program/kevux/tools/remove/main/operate.h b/sources/c/program/kevux/tools/remove/main/operate.h index fb7db05..8ce60dd 100644 --- a/sources/c/program/kevux/tools/remove/main/operate.h +++ b/sources/c/program/kevux/tools/remove/main/operate.h @@ -25,7 +25,7 @@ extern "C" { * The path to the file to operate on. * * This should always be TRUE when calling from the top level. - * This should always be FALSE if calling from within a fl_directory_do() callback. + * This should always be FALSE if calling from within a fl_directory_do() call back. * This is because fl_directory_do() handles directory traversal and processing. * @param recurse * One of the kt_remove_flag_recurse_*_d flags. @@ -79,7 +79,7 @@ extern "C" { * The path to the file to operate on. * * This should always be TRUE when calling from the top level. - * This should always be FALSE if calling from within a fl_directory_do() callback. + * This should always be FALSE if calling from within a fl_directory_do() call back. * This is because fl_directory_do() handles directory traversal and processing. * @param flag_operate * The operate file specific flags from kt_remove_flag_operate_*_e. diff --git a/sources/c/program/kevux/tools/remove/main/remove.h b/sources/c/program/kevux/tools/remove/main/remove.h index c0ed02f..e52bb85 100644 --- a/sources/c/program/kevux/tools/remove/main/remove.h +++ b/sources/c/program/kevux/tools/remove/main/remove.h @@ -94,7 +94,7 @@ extern "C" { * * F_interrupt (with error bit) on (exit) signal received. * - * Errors (with error bit) from: main.callback.process_normal(). + * Errors (with error bit) from: main.call.process_normal(). */ #ifndef _di_kt_remove_main_ extern void kt_remove_main(kt_remove_main_t * const main); diff --git a/sources/c/program/kevux/tools/tacocat/main/common.c b/sources/c/program/kevux/tools/tacocat/main/common.c index b9636ce..3f762f4 100644 --- a/sources/c/program/kevux/tools/tacocat/main/common.c +++ b/sources/c/program/kevux/tools/tacocat/main/common.c @@ -221,8 +221,8 @@ extern "C" { } // Only process these when needed to avoid unnecessary operations. - if (main->callback.setting_load_send_receive && !(main->setting.flag & (kt_tacocat_main_flag_copyright_d | kt_tacocat_main_flag_version_d |kt_tacocat_main_flag_help_d))) { - main->callback.setting_load_send_receive(arguments, main); + if (main->call.setting_load_send_receive && !(main->setting.flag & (kt_tacocat_main_flag_copyright_d | kt_tacocat_main_flag_version_d |kt_tacocat_main_flag_help_d))) { + main->call.setting_load_send_receive(arguments, main); } if (F_status_is_error_not(main->setting.state.status)) { diff --git a/sources/c/program/kevux/tools/tacocat/main/common.h b/sources/c/program/kevux/tools/tacocat/main/common.h index 830c131..6b1732c 100644 --- a/sources/c/program/kevux/tools/tacocat/main/common.h +++ b/sources/c/program/kevux/tools/tacocat/main/common.h @@ -80,7 +80,7 @@ extern "C" { * Errors (with error bit) from: f_network_from_ip_name(). * Errors (with error bit) from: f_string_dynamic_append_nulless(). * - * Errors (with error bit) from: main.callback.setting_load_send_receive(). + * Errors (with error bit) from: main.call.setting_load_send_receive(). * * @see f_file_exists() * @see f_file_open() diff --git a/sources/c/program/kevux/tools/tacocat/main/common/type.h b/sources/c/program/kevux/tools/tacocat/main/common/type.h index 0de9e43..c65bc38 100644 --- a/sources/c/program/kevux/tools/tacocat/main/common/type.h +++ b/sources/c/program/kevux/tools/tacocat/main/common/type.h @@ -404,15 +404,15 @@ extern "C" { * * setting_load_send_receive: Process loading the settings regarding send and receive, handling DNS resolution and file opening as needed. */ -#ifndef _di_kt_tacocat_callback_t_ +#ifndef _di_kt_tacocat_call_t_ typedef struct { void (*setting_load_send_receive)(const f_console_arguments_t arguments, kt_tacocat_main_t * const main); - } kt_tacocat_callback_t; + } kt_tacocat_call_t; - #define kt_tacocat_callback_t_initialize { \ + #define kt_tacocat_call_t_initialize { \ .setting_load_send_receive = 0, \ } -#endif // _di_kt_tacocat_callback_t_ +#endif // _di_kt_tacocat_call_t_ /** * The main thread settings. @@ -432,26 +432,27 @@ extern "C" { /** * The main program data as a single structure. * + * cache: The program cache. + * call: The program callbacks. * program: The main program data. * setting: The settings data. - * callback: The program callbacks. * thread: The program thread data. */ #ifndef _di_kt_tacocat_main_t_ struct kt_tacocat_main_t_ { + kt_tacocat_cache_t cache; + kt_tacocat_call_t call; fll_program_data_t program; kt_tacocat_setting_t setting; - kt_tacocat_callback_t callback; kt_tacocat_thread_t thread; - kt_tacocat_cache_t cache; }; #define kt_tacocat_main_t_initialize { \ + .cache = kt_tacocat_cache_t_initialize, \ + .call = kt_tacocat_call_t_initialize, \ .program = fll_program_data_t_initialize, \ .setting = kt_tacocat_setting_t_initialize, \ - .callback = kt_tacocat_callback_t_initialize, \ .thread = kt_tacocat_thread_t_initialize, \ - .cache = kt_tacocat_cache_t_initialize, \ } #endif // _di_kt_tacocat_main_t_ @@ -496,7 +497,7 @@ extern "C" { #endif // _di_kt_tacocat_setting_delete_ /** - * A callback intended to be passed to f_memory_arrays_resize() for an kt_tacocat_socket_sets_t structure. + * A call back intended to be passed to f_memory_arrays_resize() for an kt_tacocat_socket_sets_t structure. * * This is only called when shrinking the array and generally should perform deallocations. * diff --git a/sources/c/program/kevux/tools/tacocat/main/tacocat.h b/sources/c/program/kevux/tools/tacocat/main/tacocat.h index 030d023..b334398 100644 --- a/sources/c/program/kevux/tools/tacocat/main/tacocat.h +++ b/sources/c/program/kevux/tools/tacocat/main/tacocat.h @@ -116,7 +116,7 @@ extern "C" { * * F_interrupt (with error bit) on (exit) signal received. * - * Errors (with error bit) from: main.callback.process_normal(). + * Errors (with error bit) from: main.call.process_normal(). */ #ifndef _di_kt_tacocat_main_ extern void kt_tacocat_main(kt_tacocat_main_t * const main); diff --git a/sources/c/program/kevux/tools/tacocat/tacocat/main.c b/sources/c/program/kevux/tools/tacocat/tacocat/main.c index 441690d..43aee80 100644 --- a/sources/c/program/kevux/tools/tacocat/tacocat/main.c +++ b/sources/c/program/kevux/tools/tacocat/tacocat/main.c @@ -28,7 +28,7 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) { data.program.parameters.used = kt_tacocat_parameter_total_d; data.program.environment = envp; - data.callback.setting_load_send_receive = kt_tacocat_setting_load_send_receive; + data.call.setting_load_send_receive = kt_tacocat_setting_load_send_receive; if (f_pipe_input_exists()) { data.program.pipe = fll_program_data_pipe_input_e; -- 1.8.3.1