]> Kevux Git Server - controller/commitdiff
Progress: Continue migrating the project.
authorKevin Day <Kevin@kevux.org>
Mon, 24 Jun 2024 03:08:46 +0000 (22:08 -0500)
committerKevin Day <Kevin@kevux.org>
Mon, 24 Jun 2024 03:08:46 +0000 (22:08 -0500)
28 files changed:
sources/c/main/common/print.c
sources/c/main/common/print.h
sources/c/main/entry/preprocess.c
sources/c/main/entry/process.c
sources/c/main/entry/setting.c
sources/c/main/file.c
sources/c/main/perform.c
sources/c/main/print/debug/perform/control.c
sources/c/main/print/debug/perform/pid.c
sources/c/main/print/error.c
sources/c/main/print/error.h
sources/c/main/print/error/entry/item.c
sources/c/main/print/error/entry/item.h
sources/c/main/print/error/perform/pid.c
sources/c/main/print/output/entry/setting.c
sources/c/main/print/output/entry/setting.h
sources/c/main/print/warning/entry/setting.c
sources/c/main/print/warning/entry/setting.h
sources/c/main/rule/action.c
sources/c/main/rule/instance.c
sources/c/main/rule/instance.h
sources/c/main/rule/item.c
sources/c/main/rule/parameter.h
sources/c/main/rule/read.c
sources/c/main/rule/read.h
sources/c/main/thread/entry.c
sources/c/main/thread/instance.c
sources/c/main/thread/instance.h

index e4e2e5573dcf6329cd7e142acd3b571b4b04b86f..27ee392ae6b80ea013af6019ab97d68786d8f307 100644 (file)
@@ -8,6 +8,7 @@ extern "C" {
   const f_string_t controller_f_a[] = {
     "controller_convert_group_id",
     "controller_convert_user_id",
+    "controller_entry_setting_read_map",
     "controller_file_load",
     "controller_lock_create",
     "controller_rule_copy",
@@ -15,6 +16,7 @@ extern "C" {
     "f_console_parameter_process",
     "f_environment_get_all",
     "f_file_exists",
+    "f_file_mode_to_mode",
     "f_file_name_base",
     "f_file_stat",
     "f_file_stream_open",
index 57bb838427d02d397637bdd1135f218ee2b85bb6..f75af3c65a0cea70e78ce9010a8fed67290f1a75 100644 (file)
@@ -41,6 +41,7 @@ extern "C" {
   enum {
     controller_f_controller_convert_group_id_e,
     controller_f_controller_convert_user_id_e,
+    controller_f_controller_entry_setting_read_map_e,
     controller_f_controller_file_load_e,
     controller_f_controller_lock_create_e,
     controller_f_controller_rule_copy_e,
@@ -48,6 +49,7 @@ extern "C" {
     controller_f_f_console_parameter_process_e,
     controller_f_f_environment_get_all_e,
     controller_f_f_file_exists_e,
+    controller_f_f_file_mode_to_mode_e,
     controller_f_f_file_name_base_e,
     controller_f_f_file_stat_e,
     controller_f_f_file_stream_open_e,
index e8664a159552bce097121eb89ac9e86bfb0de9a1..5fdfd56e0dc77808d6d2e42f3257a3174e36e8b5 100644 (file)
@@ -101,7 +101,7 @@ extern "C" {
               for (j = 2; j < cache->ats.used; j += 2) {
 
                 if (cache->ats.array[j] == i) {
-                  controller_print_error_entry_item_failure(&main->program.error, cache, entry->items.array[i].name, "cannot be executed because recursion is not allowed");
+                  controller_print_error_entry_item_failure(&main->program.error, cache, is_entry, entry->items.array[i].name, "cannot be executed because recursion is not allowed");
 
                   if (F_status_is_error_not(status)) {
                     status = F_status_set_error(F_recurse);
@@ -154,7 +154,7 @@ extern "C" {
 
           if (error_has || i >= entry->items.used) {
             if (i >= entry->items.used) {
-              controller_print_error_entry_item_failure(&main->program.error, cache, actions->array[cache->ats.array[at_j]].parameters.array[0], "does not exist");
+              controller_print_error_entry_item_failure(&main->program.error, cache, is_entry, actions->array[cache->ats.array[at_j]].parameters.array[0], "does not exist");
 
               if (F_status_is_error_not(status)) {
                 status = F_status_set_error(F_valid_not);
index ef1153bfe18a1885496bcd7feb65c5b660ab7dda..e9f6f91cf250840b61808f42b9fab9402bde7436 100644 (file)
@@ -40,8 +40,8 @@ extern "C" {
       return status;
     }
 
-    // utilize the ats cache as an item execution stack (at_i is for item index, and at_j (at_i + 1) is for action index).
-    cache->ats.array[0] = failsafe ? main->setting.failsafe_item_id : 0;
+    // Utilize the "ats" cache as an item execution stack (at_i is for item index, and at_j (at_i + 1) is for action index).
+    cache->ats.array[0] = failsafe ? main->process.failsafe_item_id : 0;
     cache->ats.array[1] = 0;
     cache->ats.used = 2;
 
@@ -57,7 +57,7 @@ extern "C" {
     }
 
     if ((main->setting.flag & controller_main_flag_simulate_e) || main->program.message.verbosity > f_console_verbosity_normal_e) {
-      controller_print_message_entry_item_process(&main->program.message, is_entry, failsafe ? controller_print_entry_failsafe_s : f_string_empty_s, cache->action.name_item);
+      controller_print_message_entry_item_process(&main->program.message, is_entry, failsafe ? controller_failsafe_s : f_string_empty_s, cache->action.name_item);
     }
 
     // The pre-process determines if ready is explicitly specified within the entry file and if it is not start as ready.
@@ -140,7 +140,7 @@ extern "C" {
           }
         }
         else if (entry_action->type == controller_entry_action_type_item_e) {
-          if (entry_action->number == 0 || entry_action->number >= entry->items.used || failsafe && entry_action->number == main->setting.failsafe_item_id) {
+          if (entry_action->number == 0 || entry_action->number >= entry->items.used || failsafe && entry_action->number == main->process.failsafe_item_id) {
 
             // This should not happen if the pre-process is working as intended, but in case it doesn't, return a critical error to prevent infinite recursion and similar errors.
             controller_print_error_entry_item_invalid(&main->program.error, cache, is_entry, entry_action->number);
@@ -190,17 +190,17 @@ extern "C" {
           status_lock = controller_lock_write(is_entry, &main->thread, &main->thread.lock.rule);
 
           if (F_status_is_error(status_lock)) {
-            controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status_lock), F_false, &main->thread);
+            controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status_lock), F_false);
 
             break;
           }
 
-          status = controller_rules_increase(&main->setting.rules);
+          status = f_memory_array_increase(controller_allocation_small_d, sizeof(controller_rule_t), (void **) &main->process.rules.array, &main->process.rules.used, &main->process.rules.size);
 
           f_thread_unlock(&main->thread.lock.rule);
 
           if (F_status_is_error(status)) {
-            controller_print_error_entry(&main->program.error, is_entry, F_status_set_fine(status), macro_controller_f(controller_rules_increase), F_true);
+            controller_print_error_entry(&main->program.error, is_entry, F_status_set_fine(status), macro_controller_f(f_memory_array_increase), F_true);
 
             return status;
           }
@@ -218,17 +218,17 @@ extern "C" {
           status_lock = controller_lock_read(is_entry, &main->thread, &main->thread.lock.rule);
 
           if (F_status_is_error(status_lock)) {
-            controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status_lock), F_true, &main->thread);
+            controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status_lock), F_true);
 
             break;
           }
 
-          status = controller_rule_find(alias_rule, main->setting.rules, 0);
+          status = controller_rule_find(alias_rule, main->process.rules, 0);
 
           f_thread_unlock(&main->thread.lock.rule);
 
           if ((main->setting.flag & controller_main_flag_simulate_e) || main->program.error.verbosity == f_console_verbosity_verbose_e || main->program.error.verbosity == f_console_verbosity_debug_e || (entry->show == controller_entry_show_init_e && entry_action->type != controller_entry_action_type_consider_e)) {
-            controller_print_message_entry_item_rule(&main->program.message, entry, entry_action, is_entry);
+            controller_print_message_entry_item_rule(&main->program.message, entry, entry_action, is_entry, alias_rule);
           }
 
           if (!controller_thread_is_enabled(is_entry, &main->thread)) break;
@@ -255,7 +255,7 @@ extern "C" {
             status_lock = controller_lock_write(is_entry, &main->thread, &main->thread.lock.rule);
 
             if (F_status_is_fine(status_lock)) {
-              status = controller_rule_read(main, is_entry, alias_rule, cache, entry, &main->setting.rules.array[main->setting.rules.used]);
+              status = controller_rule_read(main, cache, is_entry, alias_rule, entry, &main->process.rules.array[main->process.rules.used]);
             }
 
             // Restore cache.
@@ -275,7 +275,7 @@ extern "C" {
             cache->action.line_item = cache_line_item;
 
             if (F_status_is_error(status_lock)) {
-              controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status_lock), F_false, &main->thread);
+              controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status_lock), F_false);
 
               break;
             }
@@ -290,7 +290,7 @@ extern "C" {
               if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
                 controller_lock_print(main->program.error.to, &main->thread);
 
-                controller_print_error_entry_cache(is_entry, &main->program.error, &cache->action);
+                controller_print_error_entry_cache(&main->program.error, &cache->action, is_entry);
 
                 controller_unlock_print_flush(main->program.error.to, &main->thread);
               }
@@ -311,7 +311,7 @@ extern "C" {
               }
             }
             else {
-              ++main->setting.rules.used;
+              ++main->process.rules.used;
             }
 
             f_thread_unlock(&main->thread.lock.rule);
@@ -345,11 +345,8 @@ extern "C" {
               options_instance |= controller_instance_option_asynchronous_e;
             }
 
-            status = controller_rule_process_begin(main, options_force, alias_rule, controller_entry_action_type_to_rule_action_type(entry_action->type), options_instance, is_entry ? controller_instance_type_entry_e : controller_instance_type_exit_e, stack, *cache);
-
-            if (F_status_set_fine(status) == F_memory_not || status == F_child || F_status_set_fine(status) == F_interrupt) {
-              break;
-            }
+            status = controller_rule_instance_begin(main, cache, options_force, alias_rule, controller_entry_action_type_to_rule_action_type(entry_action->type), options_instance, is_entry ? controller_instance_type_entry_e : controller_instance_type_exit_e, stack);
+            if (F_status_set_fine(status) == F_memory_not || status == F_child || F_status_set_fine(status) == F_interrupt) break;
 
             if (F_status_is_error(status) && !(main->setting.flag & controller_main_flag_simulate_e) && (entry_action->code & controller_entry_rule_code_require_d)) {
               return F_status_set_error(F_require);
@@ -363,7 +360,7 @@ extern "C" {
 
           if (main->setting.flag & controller_main_flag_simulate_e) return F_execute;
 
-          controller_thread_process_cancel(main, is_entry, is_entry ? controller_thread_cancel_execute_e : controller_thread_cancel_exit_execute_e);
+          controller_thread_instance_cancel(main, is_entry, is_entry ? controller_thread_cancel_execute_e : controller_thread_cancel_exit_execute_e);
 
           int result = 0;
           int option = FL_execute_parameter_option_path_d;
@@ -396,22 +393,22 @@ extern "C" {
           if (entry_action->code == controller_entry_timeout_code_exit_d) {
             entry->timeout_exit = entry_action->number;
 
-            controller_print_output_entry_setting_simulate_value(&main->program.output, is_entry, controller_timeout_s, controller_exit_s, entry->items.array[main->setting.failsafe_item_id].name, controller_print_entry_suffix_megatime_s);
+            controller_print_output_entry_setting_simulate_value(&main->program.output, is_entry, controller_timeout_s, controller_exit_s, entry->items.array[main->process.failsafe_item_id].name, controller_print_entry_suffix_megatime_s);
           }
           else if (entry_action->code == controller_entry_timeout_code_kill_d) {
             entry->timeout_kill = entry_action->number;
 
-            controller_print_output_entry_setting_simulate_value(&main->program.output, is_entry, controller_timeout_s, controller_kill_s, entry->items.array[main->setting.failsafe_item_id].name, controller_print_entry_suffix_megatime_s);
+            controller_print_output_entry_setting_simulate_value(&main->program.output, is_entry, controller_timeout_s, controller_kill_s, entry->items.array[main->process.failsafe_item_id].name, controller_print_entry_suffix_megatime_s);
           }
           else if (entry_action->code == controller_entry_timeout_code_start_d) {
             entry->timeout_start = entry_action->number;
 
-            controller_print_output_entry_setting_simulate_value(&main->program.output, is_entry, controller_timeout_s, controller_start_s, entry->items.array[main->setting.failsafe_item_id].name, controller_print_entry_suffix_megatime_s);
+            controller_print_output_entry_setting_simulate_value(&main->program.output, is_entry, controller_timeout_s, controller_start_s, entry->items.array[main->process.failsafe_item_id].name, controller_print_entry_suffix_megatime_s);
           }
           else if (entry_action->code == controller_entry_timeout_code_stop_d) {
             entry->timeout_stop = entry_action->number;
 
-            controller_print_output_entry_setting_simulate_value(&main->program.output, is_entry, controller_timeout_s, controller_stop_s, entry->items.array[main->setting.failsafe_item_id].name, controller_print_entry_suffix_megatime_s);
+            controller_print_output_entry_setting_simulate_value(&main->program.output, is_entry, controller_timeout_s, controller_stop_s, entry->items.array[main->process.failsafe_item_id].name, controller_print_entry_suffix_megatime_s);
           }
         }
         else if (entry_action->type == controller_entry_action_type_failsafe_e) {
@@ -428,10 +425,10 @@ extern "C" {
               return F_status_is_error(F_critical);
             }
             else {
-              main->setting.flag |= controller_setting_flag_failsafe_e;
-              main->setting.failsafe_item_id = entry_action->number;
+              main->setting.flag |= controller_process_flag_failsafe_e;
+              main->process.failsafe_item_id = entry_action->number;
 
-              controller_print_output_entry_setting_simulate_value(&main->program.output, is_entry, controller_failsafe_s, f_string_empty_s, entry->items.array[main->setting.failsafe_item_id].name, f_string_empty_s);
+              controller_print_output_entry_setting_simulate_value(&main->program.output, is_entry, controller_failsafe_s, f_string_empty_s, entry->items.array[main->process.failsafe_item_id].name, f_string_empty_s);
             }
           }
         }
@@ -476,7 +473,7 @@ extern "C" {
     if (F_status_is_error(status_lock)) return status_lock;
 
     // Check to see if any required processes failed, but do not do this if already operating in failsafe.
-    if (F_status_is_error_not(status) && !failsafe && !(main->setting.flag & controller_main_flag_validate_e) && main->setting.mode != controller_process_mode_helper_e) {
+    if (F_status_is_error_not(status) && !failsafe && !(main->setting.flag & controller_main_flag_validate_e) && main->process.mode != controller_process_mode_helper_e) {
       const f_status_t status_wait = controller_rule_wait_all(main, is_entry, F_true);
       if (F_status_is_error(status_wait)) return status_wait;
       if (status_wait == F_require) return F_status_set_error(F_require);
index 405fb7da6af2112d5385b623c630e9307e677e52..9b516d641a424e782cdc19e8398b2c4fa24c3c00 100644 (file)
@@ -16,7 +16,7 @@ extern "C" {
       f_state_t state = macro_f_state_t_initialize_1(controller_allocation_large_d, controller_allocation_small_d, F_okay, 0, 0, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0);
       f_range_t range = content_range;
 
-      fll_fss_extended_read(cache->buffer_file, &range, &cache->object_actions, &cache->content_actions, 0, 0, &cache->delimits, 0, &state);
+      fll_fss_extended_read(main->thread.cache.buffer_file, &range, &cache->object_actions, &cache->content_actions, 0, 0, &cache->delimits, 0, &state);
     }
 
     if (F_status_is_error(status)) {
@@ -41,7 +41,7 @@ extern "C" {
 
     f_number_unsigned_t i = 0;
 
-    controller_entry_t * const entry = is_entry ? &main->setting.entry : &main->setting.exit;
+    controller_entry_t * const entry = is_entry ? &main->process.entry : &main->process.exit;
     f_state_t state = f_state_t_initialize;
 
     for (; i < cache->object_actions.used; ++i) {
@@ -69,7 +69,7 @@ extern "C" {
 
       if (is_entry && f_compare_dynamic(controller_control_s, cache->action.name_action) == F_equal_to) {
         if (cache->content_actions.array[i].used < 1 || cache->content_actions.array[i].used > 2) {
-          controller_entry_setting_read_print_setting_requires_between(main, is_entry, *cache, 1, 2);
+          controller_print_error_entry_setting_requires_between(&main->program.error, cache, is_entry, 1, 2);
 
           continue;
         }
@@ -89,7 +89,7 @@ extern "C" {
         }
 
         cache->action.generic.used = 0;
-        main->setting.path_control.used = 0;
+        main->process.path_control.used = 0;
 
         status = f_rip_dynamic_partial_nulless(cache->buffer_file, cache->content_actions.array[i].array[0], &cache->action.generic);
 
@@ -99,7 +99,7 @@ extern "C" {
           break;
         }
 
-        main->setting.path_control.used = 0;
+        main->process.path_control.used = 0;
 
         status = controller_path_canonical_relative(main, main->process.path_current, cache->action.generic, &main->process.path_control);
 
@@ -220,16 +220,16 @@ extern "C" {
         }
 
         if (f_compare_dynamic_partial_string(controller_service_s.string, cache->buffer_file, controller_service_s.used, cache->content_actions.array[i].array[0]) == F_equal_to) {
-          main->setting.mode = controller_process_mode_service_e;
+          main->process.mode = controller_process_mode_service_e;
         }
         else if (f_compare_dynamic_partial_string(controller_helper_s.string, cache->buffer_file, controller_helper_s.used, cache->content_actions.array[i].array[0]) == F_equal_to) {
-          main->setting.mode = controller_process_mode_helper_e;
+          main->process.mode = controller_process_mode_helper_e;
         }
         else if (f_compare_dynamic_partial_string(controller_program_s.string, cache->buffer_file, controller_program_s.used, cache->content_actions.array[i].array[0]) == F_equal_to) {
-          main->setting.mode = controller_process_mode_program_e;
+          main->process.mode = controller_process_mode_program_e;
         }
         else {
-          controller_entry_setting_read_print_setting_unknown_action_value(main, is_entry, *cache, i);
+          controller_entry_setting_read_print_setting_unknown_action_value(main, cache, is_entry, cache->action.name_action, cache->content_actions.array[i].array[0]);
 
           continue;
         }
@@ -266,7 +266,7 @@ extern "C" {
           entry->pid = controller_entry_pid_require_e;
         }
         else {
-          controller_entry_setting_read_print_setting_unknown_action_value(main, is_entry, *cache, i);
+          controller_print_warning_entry_setting_unknown_action_value(&main->program.warning, cache, is_entry, cache->action.name_action, cache->content_actions.array[i].array[0]);
 
           continue;
         }
@@ -292,9 +292,9 @@ extern "C" {
             continue;
           }
 
-          main->setting.path_pid.used = 0;
+          main->process.path_pid.used = 0;
 
-          status = controller_path_canonical_relative(main, main->process.path_current, cache->action.generic, &main->setting.path_pid);
+          status = controller_path_canonical_relative(main, main->process.path_current, cache->action.generic, &main->process.path_pid);
 
           if (F_status_is_error(status)) {
             controller_print_error_entry(&main->program.error, is_entry, F_status_set_fine(status), macro_controller_f(controller_path_canonical_relative), F_true);
@@ -317,7 +317,7 @@ extern "C" {
           entry->session = controller_entry_session_same_e;
         }
         else {
-          controller_entry_setting_read_print_setting_unknown_action_value(main, is_entry, *cache, i);
+          controller_print_warning_entry_setting_unknown_action_value(&main->program.warning, cache, is_entry, cache->action.name_action, cache->content_actions.array[i].array[0]);
 
           continue;
         }
@@ -336,14 +336,14 @@ extern "C" {
           entry->show = controller_entry_show_init_e;
         }
         else {
-          controller_entry_setting_read_print_setting_unknown_action_value(main, is_entry, *cache, i);
+          controller_print_warning_entry_setting_unknown_action_value(&main->program.warning, cache, is_entry, cache->action.name_action, cache->content_actions.array[i].array[0]);
 
           continue;
         }
       }
       else if (f_compare_dynamic(controller_timeout_s, cache->action.name_action) == F_equal_to) {
         if (cache->content_actions.array[i].used < 1 || cache->content_actions.array[i].used > 2) {
-          controller_entry_setting_read_print_setting_requires_between(main, is_entry, *cache, 1, 2);
+          controller_print_error_entry_setting_requires_between(&main->program.error, cache, is_entry, 1, 2);
 
           continue;
         }
@@ -391,7 +391,7 @@ extern "C" {
           time = &entry->timeout_stop;
         }
         else {
-          controller_entry_setting_read_print_setting_unknown_action_value(main, is_entry, *cache, i);
+          controller_print_warning_entry_setting_unknown_action_value(&main->program.warning, cache, is_entry, cache->action.name_action, cache->content_actions.array[i].array[0]);
 
           continue;
         }
index 08455f93e5f082fb3e3a1379d26caea0155ac3e2..a90981c13b88e22a12a9043f81f4d29bb3fdf219 100644 (file)
@@ -42,8 +42,8 @@ extern "C" {
 
     f_string_static_t path = f_string_static_t_initialize;
 
-    if (main->setting.path_setting.used) {
-      path.used = main->setting.path_setting.used + F_path_separator_s_length + main->thread.cache.action.name_file.used;
+    if (main->process.path_setting.used) {
+      path.used = main->process.path_setting.used + F_path_separator_s_length + main->thread.cache.action.name_file.used;
     }
     else {
       path.used = main->thread.cache.action.name_file.used;
@@ -52,11 +52,11 @@ extern "C" {
     f_char_t path_string[path.used + 1];
     path.string = path_string;
 
-    if (main->setting.path_setting.used) {
-      memcpy(path_string, main->setting.path_setting.string, sizeof(f_char_t) * main->setting.path_setting.used);
-      memcpy(path_string + main->setting.path_setting.used + F_path_separator_s_length, main->thread.cache.action.name_file.string, sizeof(f_char_t) * main->thread.cache.action.name_file.used);
+    if (main->process.path_setting.used) {
+      memcpy(path_string, main->process.path_setting.string, sizeof(f_char_t) * main->process.path_setting.used);
+      memcpy(path_string + main->process.path_setting.used + F_path_separator_s_length, main->thread.cache.action.name_file.string, sizeof(f_char_t) * main->thread.cache.action.name_file.used);
 
-      path_string[main->setting.path_setting.used] = f_path_separator_s.string[0];
+      path_string[main->process.path_setting.used] = f_path_separator_s.string[0];
     }
     else {
       memcpy(path_string, main->thread.cache.action.name_file.string, sizeof(f_char_t) * main->thread.cache.action.name_file.used);
index 856e500d3e74a3efcf1a6df5218c9556da522f19..8241e3831881b1d27ce2d26c5293783013219b57 100644 (file)
@@ -20,8 +20,8 @@ extern "C" {
 
     f_status_t status = F_okay;
 
-    if (main->setting.entry.pid != controller_entry_pid_disable_e && !main->setting.path_pid.used) {
-      status = controller_file_pid_create(main->program.pid, main->setting.path_pid);
+    if (main->process.entry.pid != controller_entry_pid_disable_e && !main->process.path_pid.used) {
+      status = controller_file_pid_create(main->program.pid, main->process.path_pid);
 
       // Report pid file error but because this could be an "init" program, consider the pid file as optional and continue on.
       if (F_status_is_error(status)) {
@@ -38,14 +38,14 @@ extern "C" {
         status = F_okay;
       }
       else {
-        main->setting.flag |= controller_setting_flag_pid_created_e;
+        main->setting.flag |= controller_process_flag_pid_created_e;
 
         controller_print_debug_perform_pid_file_create_success(&main->program.debug);
       }
     }
 
     // Disabled, all parts are not yet implemented.
-    /*if (main->setting.path_control.used) {
+    /*if (main->process.path_control.used) {
       status = controller_perform_ready_socket(main, is_entry);
 
       // Do not fail on non-memory errors related to creating the control socket.
@@ -64,7 +64,7 @@ extern "C" {
     f_status_t status = F_okay;
 
     if (main->process.control.flag & controller_control_flag_readonly_e) {
-      if (f_file_exists(main->setting.path_control, F_true) != F_true) {
+      if (f_file_exists(main->process.path_control, F_true) != F_true) {
         controller_print_debug_perform_control_socket_missing_read_only(&main->program.debug);
 
         return F_data_not;
@@ -86,7 +86,7 @@ extern "C" {
     }
 
     if (!(main->process.control.flag & controller_control_flag_readonly_e)) {
-      status = f_file_remove(main->setting.path_control);
+      status = f_file_remove(main->process.path_control);
 
       if (F_status_set_fine(status) == F_memory_not) {
         controller_print_error(global->thread, &main->program.error, F_status_set_fine(status), macro_controller_f(f_file_remove), F_true);
@@ -95,7 +95,7 @@ extern "C" {
       }
     }
 
-    main->process.control.server.name = main->setting.path_control;
+    main->process.control.server.name = main->process.path_control;
 
     status = f_socket_bind(&main->process.control.server);
 
@@ -103,7 +103,7 @@ extern "C" {
       f_socket_disconnect(&main->process.control.server, f_socket_close_fast_e);
 
       if (!(main->process.control.flag & controller_control_flag_readonly_e)) {
-        f_file_remove(main->setting.path_control);
+        f_file_remove(main->process.path_control);
       }
 
       if (F_status_set_fine(status) == F_memory_not) {
@@ -117,13 +117,13 @@ extern "C" {
     }
 
     if (main->process.control.flag & (controller_control_flag_has_user_e | controller_control_flag_has_group_e)) {
-      status = f_file_role_change(main->setting.path_control, main->process.control.user, main->process.control.group, F_true);
+      status = f_file_role_change(main->process.path_control, main->process.control.user, main->process.control.group, F_true);
 
       if (F_status_is_error(status)) {
         f_socket_disconnect(&main->process.control.server, f_socket_close_fast_e);
 
         if (!(main->process.control.flag & controller_control_flag_readonly_e)) {
-          f_file_remove(main->setting.path_control);
+          f_file_remove(main->process.path_control);
         }
 
         if (F_status_set_fine(status) == F_memory_not) {
@@ -138,13 +138,13 @@ extern "C" {
     }
 
     if (main->process.control.flag & controller_control_flag_has_mode_e) {
-      status = f_file_mode_set(main->setting.path_control, main->process.control.mode);
+      status = f_file_mode_set(main->process.path_control, main->process.control.mode);
 
       if (F_status_is_error(status)) {
         f_socket_disconnect(&main->process.control.server, f_socket_close_fast_e);
 
         if (!(main->process.control.flag & controller_control_flag_readonly_e)) {
-          f_file_remove(main->setting.path_control);
+          f_file_remove(main->process.path_control);
         }
 
         if (F_status_set_fine(status) == F_memory_not) {
@@ -169,7 +169,7 @@ extern "C" {
       f_socket_disconnect(&main->process.control.server, f_socket_close_fast_e);
 
       if (!(main->process.control.flag & controller_control_flag_readonly_e)) {
-        f_file_remove(main->setting.path_control);
+        f_file_remove(main->process.path_control);
       }
 
       if (global->thread->id_control) {
index 232eb8be566db8724fa8fe74a103072175c2d6f1..29b7113000d185ea7915c7f173140dd5809ab4b4 100644 (file)
@@ -15,7 +15,7 @@ extern "C" {
     controller_lock_print(print->to, &main->thread);
 
     fl_print_format("%r%[%QControl socket '%]", print->to, f_string_eol_s, print->context, print->prefix, print->context);
-    fl_print_format(f_string_format_Q_single_s.string, print->to, print->notable, main->setting.path_control, print->notable);
+    fl_print_format(f_string_format_Q_single_s.string, print->to, print->notable, main->process.path_control, print->notable);
     fl_print_format("%[' %S, code %]", print->to, print->context, message, print->context);
     fl_print_format(f_string_format_ui_single_s.string, print->to, print->notable, status, print->notable);
     fl_print_format(f_string_format_sentence_end_s.string, print->to, print->context, print->context, f_string_eol_s);
@@ -35,7 +35,7 @@ extern "C" {
     controller_lock_print(print->to, &main->thread);
 
     fl_print_format("%rControl socket '", print->to, f_string_eol_s);
-    fl_print_format(f_string_format_Q_single_s.string, print->to, print->notable, main->setting.path_control, print->notable);
+    fl_print_format(f_string_format_Q_single_s.string, print->to, print->notable, main->process.path_control, print->notable);
     fl_print_format("' created.%r", print->to, f_string_eol_s);
 
     controller_unlock_print_flush(print->to, &main->thread);
@@ -53,7 +53,7 @@ extern "C" {
     controller_lock_print(print->to, &main->thread);
 
     fl_print_format("%r%[%QControl socket '%]", print->to, f_string_eol_s, print->context, print->prefix, print->context);
-    fl_print_format(f_string_format_Q_single_s.string, print->to, print->notable, main->setting.path_control, print->notable);
+    fl_print_format(f_string_format_Q_single_s.string, print->to, print->notable, main->process.path_control, print->notable);
     fl_print_format("' .%r", print->to, f_string_eol_s);
     fl_print_format("%[' cannot be found while read only mode is enabled and so the Control socket is unavailable.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
index 90dfdeb11d0cc9d60f477e13ac8e34c194354e6e..f26dc101f6cde75c60d7e527899cfec5d2e18e0d 100644 (file)
@@ -15,11 +15,11 @@ extern "C" {
     controller_lock_print(print->to, &main->thread);
 
     fl_print_format("%rPID file '", print->to, f_string_eol_s);
-    fl_print_format("%[%Q%]'.%r", print->to, print->notable, main->setting.path_pid, print->notable, f_string_eol_s);
+    fl_print_format("%[%Q%]'.%r", print->to, print->notable, main->process.path_pid, print->notable, f_string_eol_s);
 
-    if (main->setting.path_control.used) {
+    if (main->process.path_control.used) {
       fl_print_format("%rControl socket '", print->to, f_string_eol_s);
-      fl_print_format(f_string_format_Q_single_s.string, print->to, print->notable, main->setting.path_control, print->notable);
+      fl_print_format(f_string_format_Q_single_s.string, print->to, print->notable, main->process.path_control, print->notable);
       fl_print_format("'.%r", print->to, f_string_eol_s);
     }
 
@@ -41,16 +41,16 @@ extern "C" {
 
     if (F_status_set_fine(status) == F_read_only) {
       fl_print_format("%r%[%QThe pid file '%]", print->to, f_string_eol_s, print->context, print->prefix, print->context);
-      fl_print_format(f_string_format_Q_single_s.string, print->to, print->notable, main->setting.path_pid, print->notable);
+      fl_print_format(f_string_format_Q_single_s.string, print->to, print->notable, main->process.path_pid, print->notable);
       fl_print_format("%[' could not be written because the destination is read only.%]%r", print->to, print->context, print->context, f_string_eol_s);
     }
     else {
-      controller_print_error_file_status(print, function, F_true, main->setting.path_pid, f_file_operation_create_s, fll_error_file_type_file_e, status);
+      controller_print_error_file_status(print, function, F_true, main->process.path_pid, f_file_operation_create_s, fll_error_file_type_file_e, status);
     }
 
     f_file_stream_lock(print->to);
 
-    controller_print_error_entry_cache(print->to, &main->thread.cache.action, is_entry);
+    controller_print_error_entry_cache(print, &main->thread.cache.action, is_entry);
 
     controller_unlock_print_flush(print->to, &main->thread);
   }
@@ -67,7 +67,7 @@ extern "C" {
     controller_lock_print(print->to, &main->thread);
 
     fl_print_format("%rPID file '", print->to, f_string_eol_s);
-    fl_print_format("%[%Q%]' created.%r", print->to, print->notable, main->setting.path_pid, print->notable, f_string_eol_s);
+    fl_print_format("%[%Q%]' created.%r", print->to, print->notable, main->process.path_pid, print->notable, f_string_eol_s);
 
     controller_unlock_print_flush(print->to, &main->thread);
   }
index 871ce487fcc1a949b6cb69186a36491f9627780e..7d8f620c76d475c95595f9e541c89fa8a0c00301 100644 (file)
@@ -19,7 +19,7 @@ extern "C" {
 #endif // _di_controller_print_error_
 
 #ifndef _di_controller_print_error_failsafe_item_
-  f_status_t controller_print_error_failsafe_item(fl_print_t * const print, controller_thread_t * const thread, f_string_dynamic_t * const name) {
+  f_status_t controller_print_error_failsafe_item(fl_print_t * const print, controller_thread_t * const thread, const f_string_dynamic_t name) {
 
     if (!print) return F_status_set_error(F_output_not);
     if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
index 2b53e7ea3e7e43291b8a5f3f75aa61fe7664cab8..b087ae2d6cf7bffe05e024347589b70670846e3c 100644 (file)
@@ -54,8 +54,6 @@ extern "C" {
  * @param name
  *   The name of the item.
  *
- *   Must not be NULL.
- *
  * @return
  *   F_okay on success.
  *   F_output_not on success, but no printing is performed.
@@ -63,7 +61,7 @@ extern "C" {
  *   F_output_not (with error bit) if setting is NULL.
  */
 #ifndef _di_controller_print_error_failsafe_item_
-  extern f_status_t controller_print_error_failsafe_item(fl_print_t * const print, controller_thread_t * const thread, f_string_dynamic_t * const name);
+  extern f_status_t controller_print_error_failsafe_item(fl_print_t * const print, controller_thread_t * const thread, const f_string_dynamic_t name);
 #endif // _di_controller_print_error_failsafe_item_
 
 /**
index b5a569e50ecb67308b569a47c42ec4394393c698..6deb7b55a45a13a73ad95bb24fa52e64edc06e25 100644 (file)
@@ -5,7 +5,7 @@ extern "C" {
 #endif
 
 #ifndef _di_controller_print_error_entry_item_failure_
-  f_status_t controller_print_error_entry_item_failure(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_string_static_t name, const f_string_static_t message) {
+  f_status_t controller_print_error_entry_item_failure(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_string_static_t name, const f_string_t message) {
 
     if (!print || !print->custom || !cache) return F_status_set_error(F_output_not);
     if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
index 8e7a0c5265c06d4e9f1e2e13934d57062a608ab2..b8ae7740014f7d2b873f2c2471d6c2891bfae267 100644 (file)
@@ -17,7 +17,7 @@ extern "C" {
 #endif
 
 /**
- * Print the entry item related error.
+ * Print the Entry Item related error.
  *
  * @param print
  *   The output structure to print to.
@@ -46,11 +46,11 @@ extern "C" {
  *   F_output_not (with error bit) if setting is NULL.
  */
 #ifndef _di_controller_print_error_entry_item_failure_
-  extern f_status_t controller_print_error_entry_item_failure(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_string_static_t name, const f_string_static_t message);
+  extern f_status_t controller_print_error_entry_item_failure(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_string_static_t name, const f_string_t message);
 #endif // _di_controller_print_error_entry_item_failure_
 
 /**
- * Print an error message for an invalid entry item.
+ * Print an error message for an invalid Entry Item.
  *
  * @param print
  *   The output structure to print to.
@@ -81,7 +81,7 @@ extern "C" {
 #endif // _di_controller_print_error_entry_item_invalid_
 
 /**
- * Print an error message about an entry it setting option not being supported.
+ * Print an error message about an Entry Item Setting option not being supported.
  *
  * @param print
  *   The output structure to print to.
index cc4d2c014c53374ee047ee91e0a1fc7257d96de4..5050350994ef3898ee7ab3f893568901e852afb5 100644 (file)
@@ -14,7 +14,7 @@ extern "C" {
 
     controller_lock_print(print->to, &main->thread);
 
-    controller_print_error_file_status(print, function, F_true, main->setting.path_pid, f_file_operation_create_s, fll_error_file_type_file_e, status);
+    controller_print_error_file_status(print, function, F_true, main->process.path_pid, f_file_operation_create_s, fll_error_file_type_file_e, status);
 
     f_file_stream_lock(print->to);
 
index b1b5c0263d91838a025427e90f01c5c6dcf8ea57..9a1621c992e6ed4f2ad442a33700c74fd5cc4183 100644 (file)
@@ -38,8 +38,8 @@ extern "C" {
   }
 #endif // _di_controller_print_output_entry_setting_simulate_value_
 
-#ifndef _di_controller_print_entry_output_setting_validate_
-  f_status_t controller_print_entry_output_setting_validate(fl_print_t * const print, const uint8_t is_entry) {
+#ifndef _di_controller_print_output_entry_setting_validate_
+  f_status_t controller_print_output_entry_setting_validate(fl_print_t * const print, const uint8_t is_entry) {
 
     if (!print || !print->custom) return F_status_set_error(F_output_not);
     if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
@@ -60,13 +60,13 @@ extern "C" {
 
 
     // Mode.
-    if (main->setting.mode == controller_process_mode_service_e) {
+    if (main->process.mode == controller_process_mode_service_e) {
       string = &controller_mode_s;
     }
-    else if (main->setting.mode == controller_process_mode_helper_e) {
+    else if (main->process.mode == controller_process_mode_helper_e) {
       string = &controller_helper_s;
     }
-    else if (main->setting.mode == controller_process_mode_program_e) {
+    else if (main->process.mode == controller_process_mode_program_e) {
       string = &controller_program_s;
     }
     else {
@@ -148,8 +148,8 @@ extern "C" {
     // Pid File.
     fl_print_format("  %[%r%]", print->to, print->set.important, controller_pid_file_s, print->set.important);
 
-    if (main->setting.path_pid.used) {
-      fl_print_format(" %r", print->to, main->setting.path_pid);
+    if (main->process.path_pid.used) {
+      fl_print_format(" %r", print->to, main->process.path_pid);
     }
 
     fl_print_format("%r", print->to, f_string_eol_s);
@@ -158,8 +158,8 @@ extern "C" {
     // Control.
     fl_print_format("  %[%r%]", print->to, print->set.important, controller_control_s, print->set.important);
 
-    if (main->setting.path_control.used) {
-      fl_print_format(" %Q", print->to, main->setting.path_control);
+    if (main->process.path_control.used) {
+      fl_print_format(" %Q", print->to, main->process.path_control);
     }
 
     fl_print_format("%r", print->to, f_string_eol_s);
@@ -434,7 +434,7 @@ extern "C" {
 
     return F_okay;
   }
-#endif // _di_controller_print_entry_output_setting_validate_
+#endif // _di_controller_print_output_entry_setting_validate_
 
 #ifdef __cplusplus
 } // extern "C"
index 0de8f61cc53f5f01f97a1ce15e3ef0e641de8808..463f0930752d3a230670e5a6bed029b2802c0d66 100644 (file)
@@ -71,9 +71,9 @@ extern "C" {
  *
  *   F_output_not (with error bit) if setting is NULL.
  */
-#ifndef _di_controller_print_entry_output_setting_validate_
-  extern f_status_t controller_print_entry_output_setting_validate(fl_print_t * const print, const uint8_t is_entry);
-#endif // _di_controller_print_entry_output_setting_validate_
+#ifndef _di_controller_print_output_entry_setting_validate_
+  extern f_status_t controller_print_output_entry_setting_validate(fl_print_t * const print, const uint8_t is_entry);
+#endif // _di_controller_print_output_entry_setting_validate_
 
 #ifdef __cplusplus
 } // extern "C"
index 651ebf4f0134d12fdc48b906509d35a3705c18d1..51aa58b5c360ce3f8d81384cd040a2c154d216d4 100644 (file)
@@ -5,7 +5,7 @@ extern "C" {
 #endif
 
 #ifndef _di_controller_print_warning_entry_setting_unknown_action_
-  f_status_t controller_print_warning_entry_setting_unknown_action(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry) {
+  f_status_t controller_print_warning_entry_setting_unknown_action(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_string_static_t name) {
 
     if (!print || !print->custom || !cache) return F_status_set_error(F_output_not);
     if (print->verbosity < f_console_verbosity_debug_e) return F_output_not;
@@ -15,7 +15,7 @@ extern "C" {
     controller_lock_print(print->to, &main->thread);
 
     fl_print_format("%r%[%QUnknown %r item setting '%]", print->to.stream, f_string_eol_s, print->context, print->prefix, is_entry ? controller_entry_s : controller_exit_s, print->context);
-    fl_print_format(f_string_format_Q_single_s.string, print->to.stream, print->notable, cache->action.name_action, print->notable);
+    fl_print_format(f_string_format_Q_single_s.string, print->to.stream, print->notable, name, print->notable);
     fl_print_format(f_string_format_sentence_end_quote_s.string, print->to.stream, print->context, print->context, f_string_eol_s);
 
     controller_print_error_entry_cache(print, &cache->action, is_entry);
@@ -26,6 +26,30 @@ extern "C" {
   }
 #endif // _di_controller_print_warning_entry_setting_unknown_action_
 
+#ifndef _di_controller_print_warning_entry_setting_unknown_action_value_
+  f_status_t controller_print_warning_entry_setting_unknown_action_value(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_string_static_t name, const f_string_static_t unknown) {
+
+    if (!print || !print->custom || !cache) return F_status_set_error(F_output_not);
+    if (print->verbosity < f_console_verbosity_debug_e) return F_output_not;
+
+    controller_t * const main = (controller_t *) print->custom;
+
+    controller_lock_print(print->to, &main->thread);
+
+    fl_print_format("%r%[%QThe %r item setting '%]", print->to.stream, f_string_eol_s, print->context, print->prefix, is_entry ? controller_entry_s : controller_exit_s, print->context);
+    fl_print_format(f_string_format_Q_single_s.string, print->to.stream, print->notable, name, print->notable);
+    fl_print_format("%[' has an unknown value '%]", print->to.stream, print->context, print->context);
+    fl_print_format(f_string_format_Q_single_s.string, print->to.stream, print->notable, unknown, print->notable);
+    fl_print_format(f_string_format_sentence_end_quote_s.string, print->to.stream, print->context, print->context, f_string_eol_s);
+
+    controller_print_error_entry_cache(print, &cache->action, is_entry);
+
+    controller_unlock_print_flush(print->to, &main->thread);
+
+    return F_okay;
+  }
+#endif // _di_controller_print_warning_entry_setting_unknown_action_value_
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 4b12817f3a7a153741ce86a697ff5d56038c3acb..c3eadcf03f37dc65adf32319b977294d0149f68b 100644 (file)
@@ -17,7 +17,7 @@ extern "C" {
 #endif
 
 /**
- * Print a message for when an entry setting action is unknown.
+ * Print a message for when an Entry Setting Action is unknown.
  *
  * @param print
  *   The output structure to print to.
@@ -34,6 +34,8 @@ extern "C" {
  * @param is_entry
  *   If TRUE, then this loads as an entry.
  *   If FALSE, then this loads as an exit.
+ * @param name
+ *   The parameter name whose value is unknown.
  *
  * @return
  *   F_okay on success.
@@ -42,9 +44,42 @@ extern "C" {
  *   F_output_not (with error bit) if setting is NULL.
  */
 #ifndef _di_controller_print_warning_entry_setting_unknown_action_
-  extern f_status_t controller_print_warning_entry_setting_unknown_action(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry);
+  extern f_status_t controller_print_warning_entry_setting_unknown_action(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_string_static_t name);
 #endif // _di_controller_print_warning_entry_setting_unknown_action_
 
+/**
+ * Print a message for when an Entry Setting Action value is unknown.
+ *
+ * @param print
+ *   The output structure to print to.
+ *
+ *   This requires print.custom to be controller_t.
+ *
+ *   This does not alter print.custom.setting.state.status.
+ *
+ *   Must not be NULL.
+ * @param cache
+ *   The cache.
+ *
+ *   Must not be NULL.
+ * @param is_entry
+ *   If TRUE, then this loads as an entry.
+ *   If FALSE, then this loads as an exit.
+ * @param name
+ *   The parameter name whose value is unknown.
+ * @param unknown
+ *   The unknown value.
+ *
+ * @return
+ *   F_okay on success.
+ *   F_output_not on success, but no printing is performed.
+ *
+ *   F_output_not (with error bit) if setting is NULL.
+ */
+#ifndef _di_controller_print_warning_entry_setting_unknown_action_value_
+  extern f_status_t controller_print_warning_entry_setting_unknown_action_value(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_string_static_t name, const f_string_static_t unknown);
+#endif // _di_controller_print_warning_entry_setting_unknown_action_value_
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 566ad02c2afe554b7a99280896dcdffc2272d05f..8601cadfbf3f14613cc0bffeae92927b7497eddc 100644 (file)
@@ -278,10 +278,10 @@ extern "C" {
           for (i = 2; i < cache->content_action.used; ++i) {
 
             if (f_compare_dynamic_partial_string(controller_delay_s.string, cache->buffer_item, controller_delay_s.used, cache->content_action.array[i]) == F_equal_to) {
-              status = controller_rule_action_read_rerun_number(main, controller_delay_s.string, cache, &i, &rerun_item->delay);
+              status = controller_rule_action_read_rerun_number(main, cache, controller_delay_s.string, &i, &rerun_item->delay);
             }
             else if (f_compare_dynamic_partial_string(controller_max_s.string, cache->buffer_item, controller_max_s.used, cache->content_action.array[i]) == F_equal_to) {
-              status = controller_rule_action_read_rerun_number(main, controller_max_s.string, cache, &i, &rerun_item->max);
+              status = controller_rule_action_read_rerun_number(main, cache, controller_max_s.string, &i, &rerun_item->max);
             }
             else if (f_compare_dynamic_partial_string(controller_reset_s.string, cache->buffer_item, controller_reset_s.used, cache->content_action.array[i]) == F_equal_to) {
               item->reruns[type_rerun].is |= rerun_item == &item->reruns[type_rerun].failure ? controller_rule_rerun_is_failure_reset_d : controller_rule_rerun_is_success_reset_d;
index 3394cdfe164ff5e72e9c03ddd0493b15f4ef08f2..d70b52f569b1d63bc43ad22e425918f9009fbbef 100644 (file)
@@ -747,7 +747,7 @@ extern "C" {
         }
       }
       else {
-        status = controller_rule_instance_do(options_force, instance);
+        status = controller_rule_instance_perform(options_force, instance);
 
         if (status == F_child || F_status_set_fine(status) == F_interrupt) {
           f_thread_unlock(&instance->active);
@@ -794,8 +794,8 @@ extern "C" {
   }
 #endif // _di_controller_rule_instance_begin_
 
-#ifndef _di_controller_rule_instance_do_
-  f_status_t controller_rule_instance_do(const uint8_t options_force, controller_instance_t * const instance) {
+#ifndef _di_controller_rule_instance_perform_
+  f_status_t controller_rule_instance_perform(const uint8_t options_force, controller_instance_t * const instance) {
 
     if (!instance || !instance->main) return F_status_set_error(F_parameter);
 
@@ -1063,7 +1063,7 @@ extern "C" {
 
     return controller_thread_is_enabled_instance(instance) ? status : F_status_set_error(F_interrupt);
   }
-#endif // _di_controller_rule_instance_do_
+#endif // _di_controller_rule_instance_perform_
 
 #ifdef __cplusplus
 } // extern "C"
index 7733ac21a967b97dbab54d8bfca7d562663a0cfe..5e9df5e322c9eea2d4081f888290be28c32385ac 100644 (file)
@@ -101,7 +101,7 @@ extern "C" {
 #endif // _di_controller_rule_instance_begin_
 
 /**
- * Helper for calling controller_rule_instance().
+ * Perform the work
  *
  * This does all the preparation work that needs to be synchronously performed within the same thread.
  * This will copy the rule by the alias to the instance structure.
@@ -114,6 +114,8 @@ extern "C" {
  * @param instance
  *   The instance data.
  *
+ *   Must not be NULL.
+ *
  * @return
  *   F_okay on success.
  *   F_found on the instance was found to already be running (nothing to do).
@@ -131,9 +133,9 @@ extern "C" {
  * @see controller_rule_instance()
  * @see controller_rule_instance_begin()
  */
-#ifndef _di_controller_rule_instance_do_
-  extern f_status_t controller_rule_instance_do(const uint8_t options_force, controller_instance_t * const instance);
-#endif // _di_controller_rule_instance_do_
+#ifndef _di_controller_rule_instance_perform_
+  extern f_status_t controller_rule_instance_perform(const uint8_t options_force, controller_instance_t * const instance);
+#endif // _di_controller_rule_instance_perform_
 
 #ifdef __cplusplus
 } // extern "C"
index 32f91311fe8aaccda36bfc09b35bf4e8331f613c..6b8ede35939d182a31ab2ebb5cd4be59ebca84ec 100644 (file)
@@ -129,7 +129,7 @@ extern "C" {
           fl_print_format(f_string_format_Q_single_s.string, main->program.warning.to, main->program.warning.notable, cache->action.name_action, main->program.warning.notable);
           fl_print_format(f_string_format_sentence_end_quote_s.string, main->program.warning.to, main->program.warning.context, main->program.warning.context, f_string_eol_s);
 
-          controller_print_error_rule_cache(&main->program.warning, cache->action, F_true);
+          controller_print_error_rule_cache(&main->program.warning, &cache->action, F_true);
 
           controller_unlock_print_flush(main->program.warning.to, &main->thread);
         }
index 158fb232e4b86a79580c2f0c71dfe9698881b47e..4924207cdcbb4d9ee4f9c4ee4e2a72830dcfcad4 100644 (file)
@@ -5,12 +5,12 @@
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
- * Provides the rule "read" functionality.
+ * Provides the rule "parameter" functionality.
  *
  * This is auto-included and should not need to be explicitly included.
  */
-#ifndef _controller_main_rule_read_h
-#define _controller_main_rule_read_h
+#ifndef _controller_main_rule_parameter_h
+#define _controller_main_rule_parameter_h
 
 #ifdef __cplusplus
 extern "C" {
@@ -66,4 +66,4 @@ extern "C" {
 } // extern "C"
 #endif
 
-#endif // _controller_main_rule_read_h
+#endif // _controller_main_rule_parameter_h
index 56c042a5c8618095bbe8b13c1a39c4282bc55555..e659e652f61e1cbde7b926575a44ab3472fa525a 100644 (file)
@@ -5,7 +5,7 @@ extern "C" {
 #endif
 
 #ifndef _di_controller_rule_read_
-  f_status_t controller_rule_read(controller_t * const main, controller_cache_t * const cache, const bool is_normal, const f_string_static_t alias, controller_entry_t * const entry, controller_rule_t * const rule) {
+  f_status_t controller_rule_read(controller_t * const main, controller_cache_t * const cache, const uint8_t is_normal, const f_string_static_t alias, controller_entry_t * const entry, controller_rule_t * const rule) {
 
     if (!main || !cache || !entry || !rule) return F_status_set_error(F_parameter);
 
@@ -280,7 +280,7 @@ extern "C" {
               fl_print_format(f_string_format_Q_single_s.string, main->program.warning.to, main->program.warning.notable, cache->action.name_item, main->program.warning.notable);
               fl_print_format(f_string_format_sentence_end_quote_s.string, main->program.warning.to, main->program.warning.context, main->program.warning.context, f_string_eol_s);
 
-              controller_print_error_rule_cache(&main->program.warning, cache->action, F_true);
+              controller_print_error_rule_cache(&main->program.warning, &cache->action, F_true);
 
               controller_unlock_print_flush(main->program.warning.to, &main->thread);
             }
index 0f52db923783dcf7483ae31d1d5b7949ad815b8b..5c2316052d07a14ad7e07952bab80b6ecbe27ad6 100644 (file)
@@ -55,7 +55,7 @@ extern "C" {
  * @see fll_fss_basic_list_read().
  */
 #ifndef _di_controller_rule_read_
-  extern f_status_t controller_rule_read(controller_t * const main, controller_cache_t * const cache, const bool is_normal, const f_string_static_t alias, controller_entry_t * const entry, controller_rule_t * const rule);
+  extern f_status_t controller_rule_read(controller_t * const main, controller_cache_t * const cache, const uint8_t is_normal, const f_string_static_t alias, controller_entry_t * const entry, controller_rule_t * const rule);
 #endif // _di_controller_rule_read_
 
 
index 286ed3e35ce9495339ca5b28b53d8702c80d0d88..168ad7fac811ee5c3628b569b82ea4892ef574c9 100644 (file)
@@ -29,7 +29,7 @@ extern "C" {
       *status = controller_entry_preprocess(main, F_true);
 
       if ((main->setting.flag & controller_main_flag_simulate_e) && (main->setting.flag & controller_main_flag_validate_e)) {
-        controller_print_entry_output_setting_validate(main, F_true);
+        controller_print_output_entry_setting_validate(&main->program.output, F_true);
       }
     }
 
@@ -147,7 +147,7 @@ extern "C" {
       *status = controller_entry_preprocess(main, F_false);
 
       if ((main->setting.flag & controller_main_flag_simulate_e) && (main->setting.flag & controller_main_flag_validate_e)) {
-        controller_print_entry_output_setting_validate(main, F_false);
+        controller_print_output_entry_setting_validate(&main->program.output, F_false);
       }
     }
 
index 8a3ab7c0723b91fbc12be62aa512356710683650..8d484d0dfb16efe32fd75c2d4e6f5a24834b8aa6 100644 (file)
@@ -10,7 +10,7 @@ extern "C" {
     if (!instance || !instance->main) return;
     if (!controller_thread_is_enabled(is_normal, &instance->main->thread)) return;
 
-    const f_status_t status = controller_rule_instance_do(controller_instance_option_asynchronous_e, instance);
+    const f_status_t status = controller_rule_instance_perform(controller_instance_option_asynchronous_e, instance);
 
     // A forked child instance should de-allocate memory on exit.
     // It seems that this function doesn't return to the calling thread for a forked child instance, even with the "return 0;" below.
index 31b0ccb16c36ceca96e79be08e651e16b6a79174..273045f21d1a91c333a3af84ace4a31a3ee56e65 100644 (file)
@@ -27,7 +27,7 @@ extern "C" {
  *
  *   Must not be NULL.
  *
- * @see controller_rule_instance_do()
+ * @see controller_rule_instance_perform()
  */
 #ifndef _di_controller_thread_instance_
   extern void controller_thread_instance(const uint8_t is_normal, controller_instance_t * const instance);