]> Kevux Git Server - controller/commitdiff
Cleanup: Switch from 'callback' to 'call'.
authorKevin Day <Kevin@kevux.org>
Sat, 6 Dec 2025 04:53:28 +0000 (22:53 -0600)
committerKevin Day <Kevin@kevux.org>
Sat, 6 Dec 2025 04:53:28 +0000 (22:53 -0600)
sources/c/program/controller/controller/main.c
sources/c/program/controller/init/init.h
sources/c/program/controller/init/main.c
sources/c/program/controller/main/common/type.h
sources/c/program/controller/main/common/type/instance.h
sources/c/program/controller/main/common/type/rule.h
sources/c/program/controller/main/entry.c
sources/c/program/controller/main/entry.h
sources/c/program/controller/main/process.c
sources/c/program/controller/main/thread/signal.c

index 5121a1372602d3a3dd82de7c658f589c2efaa725..0fc3aec6e6584c2919f05d2f0e99a0f7aae5c531 100644 (file)
@@ -17,9 +17,9 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
   f_console_parameter_t parameters[] = controller_console_parameter_t_initialize;
 
-  data.callback.print_message_help = 0;
-  data.callback.process_entry_setup = 0;
-  data.callback.process_thread_signal = &controller_thread_signal;
+  data.call.print_message_help = 0;
+  data.call.process_entry_setup = 0;
+  data.call.process_thread_signal = &controller_thread_signal;
 
   data.program.parameters.array = parameters;
   data.program.parameters.used = controller_parameter_total_d;
index 08aad9b2e1e566e4b47ecc22917559c66bf68383..730b46cd7112f5e47441d669a51c91df232bd5f0 100644 (file)
@@ -21,7 +21,7 @@ extern "C" {
 #endif
 
 /**
- * The init program implementation of the process_entry_setup() callback.
+ * The init program implementation of the process_entry_setup() call back.
  *
  * @param main
  *   The main program data.
index 19f7ffb61f438694adbbce9e2f8a94dc96979b7d..13c2b3c742768f9dea36c5c73fffd2295bbfcc5d 100644 (file)
@@ -29,9 +29,9 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
     data.program.pipe = fll_program_data_pipe_input_e;
   }
 
-  data.callback.print_message_help = &controller_init_print_message_help;
-  data.callback.process_entry_setup = &controller_init_process_entry_setup;
-  data.callback.process_thread_signal = &controller_init_signal_thread;
+  data.call.print_message_help = &controller_init_print_message_help;
+  data.call.process_entry_setup = &controller_init_process_entry_setup;
+  data.call.process_thread_signal = &controller_init_signal_thread;
 
   data.process.entry.pid = controller_entry_pid_disable_e;
   data.process.entry.show = controller_entry_show_init_e;
index bdfa3429d9b1d76a9fb021d825df765cd3a38111..15bef5172b0605c73e0cdbc405e2e5761f5cabce 100644 (file)
@@ -63,7 +63,7 @@ extern "C" {
 #endif // _di_controller_setting_t_
 
 /**
- * The Controller callbacks.
+ * The Controller call backs.
  *
  * Properties:
  *   - print_message_help:    Callback for printing the help message.
@@ -76,9 +76,9 @@ extern "C" {
 
     f_status_t (*process_entry_setup)(controller_t * const main, controller_entry_t * const entry);
     void (*process_thread_signal)(controller_t * const main, const uint8_t is_normal, f_thread_attribute_t * const attribute);
-  } controller_callback_t;
+  } controller_call_t;
 
-  #define controller_callback_t_initialize { \
+  #define controller_call_t_initialize { \
     .print_message_help    = 0, \
     .process_entry_setup   = 0, \
     .process_thread_signal = 0, \
@@ -93,7 +93,7 @@ extern "C" {
  * Properties:
  *   - program: The main program data.
  *
- *   - callback: The callbacks.
+ *   - call:     The callbacks.
  *   - process:  The process data.
  *   - setting:  The settings data.
  *   - thread:   The thread data.
@@ -102,7 +102,7 @@ extern "C" {
   struct controller_t_ {
     fll_program_data_t program;
 
-    controller_callback_t callback;
+    controller_call_t call;
     controller_process_t process;
     controller_setting_t setting;
     controller_thread_t thread;
@@ -110,7 +110,7 @@ extern "C" {
 
   #define controller_t_initialize { \
     .program  = fll_program_data_t_initialize, \
-    .callback = controller_callback_t_initialize, \
+    .call = controller_call_t_initialize, \
     .process  = controller_process_t_initialize, \
     .setting  = controller_setting_t_initialize, \
     .thread   = controller_thread_t_initialize, \
index e61a27dd30ad09fa3093aef9b92e7fcf814de915..ae2d5feadac0300adf66382cea55df4f452b5fb1 100644 (file)
@@ -167,7 +167,7 @@ extern "C" {
 #endif // _di_controller_instance_initialize_
 
 /**
- * A callback intended to be passed to f_memory_arrays_resize() for an f_instances_t structure.
+ * A call back intended to be passed to f_memory_arrays_resize() for an f_instances_t structure.
  *
  * This is only called when shrinking the array and generally should perform de-allocations.
  *
index cf5705444386fa49f891088c31fc68110adc087b..85554dadd1bf576b2098cda8c20758bf17440b66 100644 (file)
@@ -406,7 +406,7 @@ extern "C" {
 #endif // _di_controller_rule_action_delete_
 
 /**
- * A callback intended to be passed to f_memory_arrays_resize() for an controller_rule_actions_t structure.
+ * A call back intended to be passed to f_memory_arrays_resize() for an controller_rule_actions_t structure.
  *
  * This is only called when shrinking the array and generally should perform de-allocations.
  *
@@ -472,8 +472,9 @@ extern "C" {
 #ifndef _di_controller_rule_item_delete_
   extern void controller_rule_item_delete(controller_rule_item_t * const item);
 #endif // _di_controller_rule_item_delete_
+
 /**
- * A callback intended to be passed to f_memory_arrays_resize() for an controller_rule_items_t structure.
+ * A call back intended to be passed to f_memory_arrays_resize() for an controller_rule_items_t structure.
  *
  * This is only called when shrinking the array and generally should perform de-allocations.
  *
@@ -512,7 +513,7 @@ extern "C" {
 #endif // _di_controller_rule_on_delete_
 
 /**
- * A callback intended to be passed to f_memory_arrays_resize() for an controller_rule_ons_t structure.
+ * A call back intended to be passed to f_memory_arrays_resize() for an controller_rule_ons_t structure.
  *
  * This is only called when shrinking the array and generally should perform de-allocations.
  *
@@ -539,7 +540,7 @@ extern "C" {
 #endif // _di_controller_rule_ons_delete_callback_
 
 /**
- * A callback intended to be passed to f_memory_arrays_resize() for an f_rules_t structure.
+ * A call back intended to be passed to f_memory_arrays_resize() for an f_rules_t structure.
  *
  * This is only called when shrinking the array and generally should perform de-allocations.
  *
index 9a304737383d263d32f179a16d56f405b5fffcf4..3fab5b3ec4936590b8db27444086fade38ae614c 100644 (file)
@@ -557,8 +557,8 @@ extern "C" {
     entry->items.used = 0;
     entry->session = controller_entry_session_same_e;
 
-    if (main->callback.process_entry_setup) {
-      const f_status_t status = main->callback.process_entry_setup(main, entry);
+    if (main->call.process_entry_setup) {
+      const f_status_t status = main->call.process_entry_setup(main, entry);
       if (F_status_is_error(status)) return status;
     }
 
index acf059bfe40dfbc2f3c2d0b627a1eebf0b42dde4..fbabcbb83bb70ac2b7b315ce8937ef4f9f7bd1aa 100644 (file)
@@ -182,7 +182,7 @@ extern "C" {
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *
- *   Errors (with error bit) from: main->callback.process_entry_setup().
+ *   Errors (with error bit) from: main->call.process_entry_setup().
  */
 #ifndef _di_controller_entry_setup_
   extern f_status_t controller_entry_setup(controller_t * const main, controller_entry_t * const entry);
index 08930bfbb2ee70f9bfdf1524652b62d78397601f..0fdaf493e425a0138b9d528c80a99788c31ba6ba 100644 (file)
@@ -11,8 +11,8 @@ extern "C" {
 
     if (main->setting.flag & controller_main_flag_version_copyright_help_d) {
       if (main->setting.flag & controller_main_flag_help_d) {
-        if (main->callback.print_message_help) {
-          main->callback.print_message_help(&main->program.message);
+        if (main->call.print_message_help) {
+          main->call.print_message_help(&main->program.message);
         }
         else {
           controller_print_message_help(&main->program.message);
index eb1c8ffaeb53cceaec0b5a3303bf91c2d13b98f0..a78a11396de1bbcd9de255b3c386421157c95237 100644 (file)
@@ -203,8 +203,8 @@ extern "C" {
     if (argument) {
       controller_thread_arguments_t * const arguments = (controller_thread_arguments_t *) argument;
 
-      if (arguments->main && arguments->main->callback.process_thread_signal) {
-        arguments->main->callback.process_thread_signal(arguments->main, F_true, arguments->attribute);
+      if (arguments->main && arguments->main->call.process_thread_signal) {
+        arguments->main->call.process_thread_signal(arguments->main, F_true, arguments->attribute);
       }
     }
 
@@ -221,8 +221,8 @@ extern "C" {
     if (argument) {
       controller_thread_arguments_t * const arguments = (controller_thread_arguments_t *) argument;
 
-      if (arguments->main && arguments->main->callback.process_thread_signal) {
-        arguments->main->callback.process_thread_signal(arguments->main, F_false, arguments->attribute);
+      if (arguments->main && arguments->main->call.process_thread_signal) {
+        arguments->main->call.process_thread_signal(arguments->main, F_false, arguments->attribute);
       }
     }