build_sources_library main/file.c main/lock.c main/path.c main/process.c
build_sources_library main/rule.c main/rule/action.c main/rule/execute.c main/rule/expand.c main/rule/instance.c main/rule/is.c main/rule/item.c main/rule/parameter.c main/rule/read.c main/rule/setting.c main/rule/validate.c main/rule/wait.c
build_sources_library main/perform.c
-build_sources_library main/print/action.c main/print/data.c main/print/debug.c main/print/error.c main/print/lock.c main/print/message.c main/print/rule.c main/print/verbose.c main/print/warning.c
-build_sources_library main/print/entry/error.c main/print/entry/error/item.c main/print/entry/error/setting.c
-build_sources_library main/print/entry/message.c main/print/entry/message/action.c main/print/entry/message/item.c
-build_sources_library main/print/entry/output/setting.c
-build_sources_library main/print/entry/warning/action.c main/print/entry/warning/setting.c
-build_sources_library main/print/rule/action.c main/print/rule/item.c main/print/rule/setting.c
+build_sources_library main/print/data.c
+build_sources_library main/print/debug.c main/print/debug/rule/action.c main/print/debug/rule/execute.c main/print/debug/perform/control.c main/print/debug/perform/pid.c
+build_sources_library main/print/error.c
+build_sources_library main/print/error/entry.c main/print/error/entry/action.c main/print/error/entry/item.c main/print/error/entry/setting.c
+build_sources_library main/print/error/perform/pid.c
+build_sources_library main/print/error/rule.c main/print/error/rule/action.c main/print/error/rule/item.c main/print/error/rule/setting.c
+build_sources_library main/print/lock.c main/print/error/lock.c
+build_sources_library main/print/output/entry/setting.c main/print/output/rule/execute.c
+build_sources_library main/print/message.c main/print/message/entry.c main/print/message/entry/action.c main/print/message/entry/item.c
+build_sources_library main/print/verbose.c
+build_sources_library main/print/warning.c main/print/warning/entry/action.c main/print/warning/entry/setting.c
build_sources_library main/signal.c main/time.c
build_sources_library main/thread.c main/thread/cleanup.c main/thread/control.c main/thread/entry.c main/thread/instance.c main/thread/is.c main/thread/rule.c main/thread/signal.c
build_sources_library main/validate.c
build_sources_headers main/file.h main/lock.h main/path.h main/process.h
build_sources_headers main/rule.h main/rule/action.h main/rule/execute.h main/rule/expand.h main/rule/instance.h main/rule/is.h main/rule/item.h main/rule/parameter.h main/rule/read.h main/rule/setting.h main/rule/validate.h main/rule/wait.h
build_sources_headers main/perform.h
-build_sources_headers main/print/action.h main/print/data.h main/print/debug.h main/print/error.h main/print/lock.h main/print/message.h main/print/rule.h main/print/verbose.h main/print/warning.h
-build_sources_headers main/print/entry/error.h main/print/entry/error/item.h main/print/entry/error/setting.h
-build_sources_headers main/print/entry/message.h main/print/entry/message/action.h main/print/entry/message/item.h
-build_sources_headers main/print/entry/output/setting.h
-build_sources_headers main/print/entry/warning/action.h main/print/entry/warning/setting.h
-build_sources_headers main/print/rule/action.h main/print/rule/item.h main/print/rule/setting.h
+build_sources_headers main/print/data.h
+build_sources_headers main/print/debug.h main/print/debug/rule/action.h main/print/debug/rule/execute.h main/print/debug/perform/control.h main/print/debug/perform/pid.h
+build_sources_headers main/print/error.h
+build_sources_headers main/print/error/entry.h main/print/error/entry/action.h main/print/error/entry/item.h main/print/error/entry/setting.h
+build_sources_headers main/print/error/perform/pid.h
+build_sources_headers main/print/error/rule.h main/print/error/rule/action.h main/print/error/rule/item.h main/print/error/rule/setting.h
+build_sources_headers main/print/lock.h main/print/error/lock.h
+build_sources_headers main/print/output/entry/setting.h main/print/output/rule/execute.h
+build_sources_headers main/print/message.h main/print/message/entry.h main/print/message/entry/action.h main/print/message/entry/item.h
+build_sources_headers main/print/verbose.h
+build_sources_headers main/print/warning.h main/print/warning/entry/action.h main/print/warning/entry/setting.h
build_sources_headers main/signal.h main/time.h
build_sources_headers main/thread.h main/thread/cleanup.h main/thread/control.h main/thread/entry.h main/thread/instance.h main/thread/is.h main/thread/rule.h main/thread/signal.h
build_sources_headers main/validate.h
#include <program/controller/main/lock.h>
#include <program/controller/main/path.h>
#include <program/controller/main/perform.h>
-#include <program/controller/main/print/action.h>
#include <program/controller/main/print/data.h>
#include <program/controller/main/print/debug.h>
-#include <program/controller/main/print/entry/error.h>
-#include <program/controller/main/print/entry/error/item.h>
-#include <program/controller/main/print/entry/error/setting.h>
-#include <program/controller/main/print/entry/message.h>
-#include <program/controller/main/print/entry/message/action.h>
-#include <program/controller/main/print/entry/message/item.h>
-#include <program/controller/main/print/entry/output/setting.h>
-#include <program/controller/main/print/entry/warning/action.h>
-#include <program/controller/main/print/entry/warning/setting.h>
+#include <program/controller/main/print/debug/perform/control.h>
+#include <program/controller/main/print/debug/perform/pid.h>
+#include <program/controller/main/print/debug/rule/action.h>
+#include <program/controller/main/print/debug/rule/execute.h>
#include <program/controller/main/print/error.h>
+#include <program/controller/main/print/error/entry.h>
+#include <program/controller/main/print/error/entry/action.h>
+#include <program/controller/main/print/error/entry/item.h>
+#include <program/controller/main/print/error/entry/setting.h>
+#include <program/controller/main/print/error/perform/pid.h>
+#include <program/controller/main/print/error/rule.h>
+#include <program/controller/main/print/error/rule/action.h>
+#include <program/controller/main/print/error/rule/item.h>
+#include <program/controller/main/print/error/rule/setting.h>
#include <program/controller/main/print/lock.h>
#include <program/controller/main/print/message.h>
-#include <program/controller/main/print/rule.h>
-#include <program/controller/main/print/rule/action.h>
-#include <program/controller/main/print/rule/item.h>
-#include <program/controller/main/print/rule/setting.h>
+#include <program/controller/main/print/message/entry.h>
+#include <program/controller/main/print/message/entry/action.h>
+#include <program/controller/main/print/message/entry/item.h>
+#include <program/controller/main/print/output/entry/setting.h>
+#include <program/controller/main/print/output/rule/execute.h>
#include <program/controller/main/print/verbose.h>
#include <program/controller/main/print/warning.h>
+#include <program/controller/main/print/warning/entry/action.h>
+#include <program/controller/main/print/warning/entry/setting.h>
#include <program/controller/main/signal.h>
#include <program/controller/main/time.h>
#include <program/controller/main/thread/cleanup.h>
f_fss_apply_delimit(cache->delimits, &cache->buffer_file, &state);
if (F_status_is_error(status)) {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_fss_apply_delimit), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_fss_apply_delimit), F_true);
}
}
}
status = f_memory_array_increase_by(cache->object_items.used, &entry->items.array, &entry->items.used, &entry->items.size);
if (F_status_is_error(status)) {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_memory_array_increase_by), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_memory_array_increase_by), F_true);
}
else {
status = controller_entry_items_increase_by(controller_allocation_small_d, &entry->items);
if (F_status_is_error(status)) {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(controller_entry_items_increase_by), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(controller_entry_items_increase_by), F_true);
break;
}
status = f_string_dynamic_partial_append(cache->buffer_file, cache->object_items.array[i], &cache->action.name_item);
if (F_status_is_error(status)) {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_string_dynamic_partial_append), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_string_dynamic_partial_append), F_true);
break;
}
f_fss_count_lines(cache->buffer_file, cache->object_items.array[i].start, &cache->action.line_item, &main->setting.state);
if (F_status_is_error(status)) {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_fss_count_lines), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_fss_count_lines), F_true);
break;
}
fl_print_format(f_string_format_Q_single_s.string, main->program.warning.to, main->program.warning.notable, cache->action.name_file, 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_entry_error_cache(is_entry, &main->program.warning, &cache->action);
+ controller_print_error_entry_cache(is_entry, &main->program.warning, &cache->action);
controller_unlock_print_flush(main->program.warning.to, &main->thread);
}
if (F_status_set_fine(status) != F_interrupt) {
controller_lock_print(main->program.error.to, &main->thread);
- controller_print_entry_error_cache(is_entry, &main->program.error, &cache->action);
+ controller_print_error_entry_cache(is_entry, &main->program.error, &cache->action);
controller_unlock_print_flush(main->program.error.to, &main->thread);
}
fl_print_format(f_string_format_Q_single_s.string, main->program.error.to, main->program.error.notable, action->parameters.array[0], main->program.error.notable);
fl_print_format("%[' does not exist.%]%r", main->program.error.to, main->program.error.context, main->program.error.context, f_string_eol_s);
- controller_print_entry_error_cache(is_entry, &main->program.error, &cache->action);
+ controller_print_error_entry_cache(is_entry, &main->program.error, &cache->action);
controller_unlock_print_flush(main->program.error.to, &main->thread);
}
if (F_status_is_error(status)) {
if (F_status_set_fine(status) != F_interrupt) {
- controller_print_entry_error_cache(is_entry, &main->program.error, &cache->action);
+ controller_print_error_entry_cache(is_entry, &main->program.error, &cache->action);
}
entry->status = controller_status_simplify_error(F_status_set_fine(status));
status = f_memory_array_increase(controller_allocation_small_d, sizeof(f_number_unsigned_t), (void **) &cache->ats.array, &cache->ats.used, &cache->ats.size);
if (F_status_is_error(status)) {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_memory_array_increase), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_memory_array_increase), F_true);
return status;
}
status = f_string_dynamic_append_nulless(entry->items.array[0].name, &cache->action.name_item);
if (F_status_is_error(status)) {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_string_dynamic_append_nulless), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_string_dynamic_append_nulless), F_true);
return status;
}
status2 = f_string_dynamic_append_nulless(controller_entry_action_type_name(actions->array[cache->ats.array[at_j]].type), &cache->action.name_action);
if (F_status_is_error(status2)) {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status2), macro_controller_f(f_string_dynamic_append_nulless), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status2), macro_controller_f(f_string_dynamic_append_nulless), F_true);
return status2;
}
if (actions->array[cache->ats.array[at_j]].type == controller_entry_action_type_ready_e) {
if (main->setting.ready == controller_setting_ready_wait_e) {
- controller_print_entry_warning_action_multiple(&main->program.warning, cache, is_entry, controller_ready_s);
+ controller_print_warning_entry_action_multiple(&main->program.warning, cache, is_entry, controller_ready_s);
}
else {
main->setting.ready = controller_setting_ready_wait_e;
for (j = 2; j < cache->ats.used; j += 2) {
if (cache->ats.array[j] == i) {
- controller_print_entry_error_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, 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);
status2 = f_memory_array_increase(controller_allocation_small_d, sizeof(f_number_unsigned_t), (void **) &cache->ats.array, &cache->ats.used, &cache->ats.size);
if (F_status_is_error(status2)) {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status2), macro_controller_f(f_memory_array_increase), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status2), macro_controller_f(f_memory_array_increase), F_true);
return status2;
}
status2 = f_string_dynamic_append_nulless(entry->items.array[i].name, &cache->action.name_item);
if (F_status_is_error(status2)) {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status2), macro_controller_f(f_string_dynamic_append_nulless), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status2), macro_controller_f(f_string_dynamic_append_nulless), F_true);
return status2;
}
if (error_has || i >= entry->items.used) {
if (i >= entry->items.used) {
- controller_print_entry_error_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, 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);
status2 = f_string_dynamic_append_nulless(entry->items.array[cache->ats.array[at_i]].name, &cache->action.name_item);
if (F_status_is_error(status2)) {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status2), macro_controller_f(f_string_dynamic_append_nulless), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status2), macro_controller_f(f_string_dynamic_append_nulless), F_true);
return status2;
}
status = f_memory_array_increase(controller_allocation_small_d, sizeof(f_number_unsigned_t), (void **) &cache->ats.array, &cache->ats.used, &cache->ats.size);
if (F_status_is_error(status)) {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_memory_array_increase), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_memory_array_increase), F_true);
return status;
}
status = f_string_dynamic_append_nulless(entry->items.array[cache->ats.array[0]].name, &cache->action.name_item);
if (F_status_is_error(status)) {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_string_dynamic_append_nulless), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_string_dynamic_append_nulless), F_true);
return status;
}
if ((main->setting.flag & controller_main_flag_simulate_e) || main->program.message.verbosity > f_console_verbosity_normal_e) {
- controller_print_entry_message_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_print_entry_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.
status = f_string_dynamic_append_nulless(controller_entry_action_type_name(entry_action->type), &cache->action.name_action);
if (F_status_is_error(status)) {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_string_dynamic_append_nulless), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_string_dynamic_append_nulless), F_true);
return status;
}
if (F_status_is_error(entry_action->status)) {
if (main->setting.flag & controller_main_flag_simulate_e) {
- controller_print_entry_message_action_state_failed(&main->program.message, cache, entry_action, is_entry);
+ controller_print_message_entry_action_state_failed(&main->program.message, cache, entry_action, is_entry);
}
else {
if ((entry_action->code & controller_entry_rule_code_require_d) && main->program.error.verbosity > f_console_verbosity_quiet_e || !(entry_action->code & controller_entry_rule_code_require_d) && (main->program.warning.verbosity == f_console_verbosity_verbose_e || main->program.warning.verbosity == f_console_verbosity_debug_e)) {
}
if (print) {
- controller_print_entry_message_action_state(print, cache, entry_action, is_entry);
+ controller_print_message_entry_action_state(print, cache, entry_action, is_entry);
}
}
if (entry_action->type == controller_entry_action_type_ready_e) {
if ((entry_action->code & controller_entry_rule_code_wait_d) || main->setting.ready == controller_setting_ready_wait_e) {
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) {
- controller_print_entry_message_action_wait(&main->program.message, is_entry, controller_ready_s);
+ controller_print_message_entry_action_wait(&main->program.message, is_entry, controller_ready_s);
}
if (!(main->setting.flag & controller_main_flag_validate_e)) {
if (main->setting.ready == controller_setting_ready_yes_e) {
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) {
- controller_print_entry_message_action_ready(&main->program.message, is_entry, controller_ready_s);
+ controller_print_message_entry_action_ready(&main->program.message, is_entry, controller_ready_s);
}
}
else {
if (!failsafe && (main->program.error.verbosity == f_console_verbosity_verbose_e || entry->show == controller_entry_show_init_e) && !(main->setting.flag & controller_main_flag_simulate_e)) {
- controller_print_entry_message_state(&main->program.message, is_entry, controller_ready_s);
+ controller_print_message_entry_state(&main->program.message, is_entry, controller_ready_s);
}
status = controller_perform_ready(main, is_entry);
if (entry_action->number == 0 || entry_action->number >= entry->items.used || failsafe && entry_action->number == main->setting.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_entry_error_item_invalid(&main->program.error, cache, is_entry, entry_action->number);
+ controller_print_error_entry_item_invalid(&main->program.error, cache, is_entry, entry_action->number);
return F_status_is_error(F_critical);
}
status = f_memory_array_increase(controller_allocation_small_d, sizeof(f_number_unsigned_t), (void **) &cache->ats.array, &cache->ats.used, &cache->ats.size);
if (F_status_is_error(status)) {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_memory_array_increase), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_memory_array_increase), F_true);
return status;
}
status = f_string_dynamic_append_nulless(entry->items.array[cache->ats.array[at_i]].name, &cache->action.name_item);
if (F_status_is_error(status)) {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_string_dynamic_append_nulless), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_string_dynamic_append_nulless), F_true);
return status;
}
if ((main->setting.flag & controller_main_flag_simulate_e) || main->program.message.verbosity > f_console_verbosity_normal_e) {
- controller_print_entry_message_item_process(&main->program.message, is_entry, f_string_empty_s, cache->action.name_item);
+ controller_print_message_entry_item_process(&main->program.message, is_entry, f_string_empty_s, cache->action.name_item);
}
// Exit inner loop to force restarting and start processing the requested item.
status_lock = controller_lock_write(is_entry, &main->thread, &main->thread.lock.rule);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_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, &main->thread);
break;
}
f_thread_unlock(&main->thread.lock.rule);
if (F_status_is_error(status)) {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(controller_rules_increase), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(controller_rules_increase), F_true);
return status;
}
status_lock = controller_lock_read(is_entry, &main->thread, &main->thread.lock.rule);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_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, &main->thread);
break;
}
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_entry_message_item_rule(&main->program.message, entry, entry_action, is_entry);
+ controller_print_message_entry_item_rule(&main->program.message, entry, entry_action, is_entry);
}
if (!controller_thread_is_enabled(is_entry, &main->thread)) break;
cache->action.line_item = cache_line_item;
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_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, &main->thread);
break;
}
if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
controller_lock_print(main->program.error.to, &main->thread);
- controller_print_entry_error_cache(is_entry, &main->program.error, &cache->action);
+ controller_print_error_entry_cache(is_entry, &main->program.error, &cache->action);
controller_unlock_print_flush(main->program.error.to, &main->thread);
}
}
else if (entry_action->type == controller_entry_action_type_execute_e) {
if ((main->setting.flag & controller_main_flag_simulate_e) || main->program.message.verbosity > f_console_verbosity_normal_e || entry->show == controller_entry_show_init_e) {
- controller_print_entry_message_item_executing(&main->program.message, is_entry, &entry_action->parameters);
+ controller_print_message_entry_item_executing(&main->program.message, is_entry, &entry_action->parameters);
}
if (main->setting.flag & controller_main_flag_simulate_e) return F_execute;
if (F_status_is_error(status)) {
if (F_status_set_fine(status) == F_file_found_not) {
- controller_print_entry_error_item_action_execution_missing(&main->program.error, cache, is_entry, entry_action->parameters.array[0]);
+ controller_print_error_entry_action_execution_missing(&main->program.error, cache, is_entry, entry_action->parameters.array[0]);
}
else {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(fll_execute_into), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(fll_execute_into), F_true);
}
return F_status_set_error(F_execute);
}
else if (result != 0) {
- controller_print_entry_error_item_action_execution_failure(&main->program.error, cache, is_entry, result);
+ controller_print_error_entry_action_execution_failure(&main->program.error, cache, is_entry, result);
return F_status_set_error(F_execute);
}
if (entry_action->code == controller_entry_timeout_code_exit_d) {
entry->timeout_exit = entry_action->number;
- controller_print_entry_output_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->setting.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_entry_output_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->setting.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_entry_output_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->setting.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_entry_output_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->setting.failsafe_item_id].name, controller_print_entry_suffix_megatime_s);
}
}
else if (entry_action->type == controller_entry_action_type_failsafe_e) {
if (failsafe) {
- controller_print_entry_warning_action_failsafe_twice(&main->program.warning, cache, is_entry);
+ controller_print_warning_entry_action_failsafe_twice(&main->program.warning, cache, is_entry);
}
else {
if (entry_action->number == 0 || entry_action->number >= entry->items.used) {
// This should not happen if the pre-process is working as designed, but in case it doesn't, return a critical error to prevent infinite recursion and similar errors.
- controller_print_entry_error_item_invalid(&main->program.error, cache, is_entry, entry_action->number);
+ controller_print_error_entry_item_invalid(&main->program.error, cache, is_entry, entry_action->number);
return F_status_is_error(F_critical);
}
main->setting.flag |= controller_setting_flag_failsafe_e;
main->setting.failsafe_item_id = entry_action->number;
- controller_print_entry_output_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->setting.failsafe_item_id].name, f_string_empty_s);
}
}
}
status = f_string_dynamic_append_nulless(entry->items.array[cache->ats.array[at_i]].name, &cache->action.name_item);
if (F_status_is_error(status)) {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_string_dynamic_append_nulless), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_string_dynamic_append_nulless), F_true);
break;
}
}
if ((main->setting.flag & controller_main_flag_simulate_e && main->program.error.verbosity > f_console_verbosity_error_e) || main->program.error.verbosity > f_console_verbosity_normal_e) {
- controller_print_entry_message_item_done(&main->program.message, is_entry, failsafe, controller_main_s);
+ controller_print_message_entry_item_done(&main->program.message, is_entry, failsafe, controller_main_s);
}
return status;
}
if (F_status_is_error(status)) {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(fll_fss_extended_read), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(fll_fss_extended_read), F_true);
return status;
}
}
if (F_status_is_error(status)) {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_fss_apply_delimit), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_fss_apply_delimit), F_true);
return status;
}
f_fss_count_lines(cache->buffer_file, cache->object_actions.array[i].start, &cache->action.line_action, &main->setting.state);
if (F_status_is_error(status)) {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_fss_count_lines), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_fss_count_lines), F_true);
break;
}
status = f_rip_dynamic_partial_nulless(cache->buffer_file, cache->object_actions.array[i], &cache->action.name_action);
if (F_status_is_error(status)) {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_rip_dynamic_partial_nulless), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_rip_dynamic_partial_nulless), F_true);
break;
}
main->process.control.flag |= controller_control_flag_readonly_e;
}
else {
- controller_print_entry_error_item_setting_support_not_option(&main->program.error, cache, is_entry, cache->content_actions.array[i].array[1]);
+ controller_print_error_entry_item_setting_support_not_option(&main->program.error, cache, is_entry, cache->content_actions.array[i].array[1]);
continue;
}
status = f_rip_dynamic_partial_nulless(cache->buffer_file, cache->content_actions.array[i].array[0], &cache->action.generic);
if (F_status_is_error(status)) {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_rip_dynamic_partial_nulless), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_rip_dynamic_partial_nulless), F_true);
break;
}
status = controller_path_canonical_relative(main->setting, cache->action.generic, &main->setting.path_control);
if (F_status_is_error(status)) {
- controller_print_entry_error_file(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(controller_path_canonical_relative), F_true, cache->action.generic, f_file_operation_analyze_s, fll_error_file_type_path_e);
+ controller_print_error_entry_file(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(controller_path_canonical_relative), F_true, cache->action.generic, f_file_operation_analyze_s, fll_error_file_type_path_e);
continue;
}
status = F_status_set_fine(status);
if (status == F_exist_not) {
- controller_print_entry_error_setting_with_range(&main->program.error, cache, is_entry, " has an invalid group", cache->content_actions.array[i].array[0], ", because no group was found by that name");
+ controller_print_error_entry_setting_with_range(&main->program.error, cache, is_entry, " has an invalid group", cache->content_actions.array[i].array[0], ", because no group was found by that name");
}
else if (status == F_number_too_large) {
- controller_print_entry_error_setting_with_range(&main->program.error, cache, is_entry, " has an invalid group", cache->content_actions.array[i].array[0], ", because the given ID is too large");
+ controller_print_error_entry_setting_with_range(&main->program.error, cache, is_entry, " has an invalid group", cache->content_actions.array[i].array[0], ", because the given ID is too large");
}
else if (status == F_number) {
- controller_print_entry_error_setting_with_range(&main->program.error, cache, is_entry, " has an invalid group", cache->content_actions.array[i].array[0], ", because the given ID is not a valid supported number");
+ controller_print_error_entry_setting_with_range(&main->program.error, cache, is_entry, " has an invalid group", cache->content_actions.array[i].array[0], ", because the given ID is not a valid supported number");
}
else {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(controller_convert_group_id), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(controller_convert_group_id), F_true);
}
continue;
status = f_rip_dynamic_partial_nulless(cache->buffer_file, cache->content_actions.array[i].array[0], &cache->action.generic);
if (F_status_is_error(status)) {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_rip_dynamic_partial_nulless), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_rip_dynamic_partial_nulless), F_true);
break;
}
status = f_file_mode_from_string(cache->action.generic, main->program.umask, &mode_file, &replace);
if (F_status_is_error(status)) {
- controller_print_entry_error_setting_with_range(&main->program.error, cache, is_entry, " has an unsupported mode", cache->content_actions.array[i].array[0], ", because the format is unknown or contains invalid data");
+ controller_print_error_entry_setting_with_range(&main->program.error, cache, is_entry, " has an unsupported mode", cache->content_actions.array[i].array[0], ", because the format is unknown or contains invalid data");
continue;
}
status = f_file_mode_to_mode(mode_file, &mode);
if (F_status_is_error(status)) {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_file_mode_to_mode), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_file_mode_to_mode), F_true);
continue;
}
status = F_status_set_fine(status);
if (status == F_exist_not) {
- controller_print_entry_error_setting_with_range(&main->program.error, cache, is_entry, " has an invalid user", cache->content_actions.array[i].array[0], ", because no user was found by that name");
+ controller_print_error_entry_setting_with_range(&main->program.error, cache, is_entry, " has an invalid user", cache->content_actions.array[i].array[0], ", because no user was found by that name");
}
else if (status == F_number_too_large) {
- controller_print_entry_error_setting_with_range(&main->program.error, cache, is_entry, " has an invalid user", cache->content_actions.array[i].array[0], ", because the given ID is too large");
+ controller_print_error_entry_setting_with_range(&main->program.error, cache, is_entry, " has an invalid user", cache->content_actions.array[i].array[0], ", because the given ID is too large");
}
else if (status == F_number) {
- controller_print_entry_error_setting_with_range(&main->program.error, cache, is_entry, " has an invalid user", cache->content_actions.array[i].array[0], ", because the given ID is not a valid supported number");
+ controller_print_error_entry_setting_with_range(&main->program.error, cache, is_entry, " has an invalid user", cache->content_actions.array[i].array[0], ", because the given ID is not a valid supported number");
}
else {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(controller_convert_user_id), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(controller_convert_user_id), F_true);
}
continue;
}
else if (f_compare_dynamic(controller_define_s, cache->action.name_action) == F_equal_to) {
if (cache->content_actions.array[i].used != 2) {
- controller_print_entry_error_setting_requires_exactly(&main->program.error, cache, is_entry, 2);
+ controller_print_error_entry_setting_requires_exactly(&main->program.error, cache, is_entry, 2);
continue;
}
status = controller_entry_setting_read_map(cache->buffer_file, cache->content_actions.array[i], &entry->define);
if (F_status_is_error(status)) {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(controller_entry_setting_read_map), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(controller_entry_setting_read_map), F_true);
continue;
}
}
else if (is_entry && f_compare_dynamic(controller_mode_s, cache->action.name_action) == F_equal_to) {
if (cache->content_actions.array[i].used != 1) {
- controller_print_entry_error_setting_requires_exactly(&main->program.error, cache, is_entry, 1);
+ controller_print_error_entry_setting_requires_exactly(&main->program.error, cache, is_entry, 1);
continue;
}
}
else if (f_compare_dynamic(controller_parameter_s, cache->action.name_action) == F_equal_to) {
if (cache->content_actions.array[i].used != 2) {
- controller_print_entry_error_setting_requires_exactly(&main->program.error, cache, is_entry, 2);
+ controller_print_error_entry_setting_requires_exactly(&main->program.error, cache, is_entry, 2);
continue;
}
status = controller_entry_setting_read_map(cache->buffer_file, cache->content_actions.array[i], &entry->parameter);
if (F_status_is_error(status)) {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(controller_entry_setting_read_map), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(controller_entry_setting_read_map), F_true);
continue;
}
}
else if (f_compare_dynamic(controller_pid_s, cache->action.name_action) == F_equal_to) {
if (cache->content_actions.array[i].used != 1) {
- controller_print_entry_error_setting_requires_exactly(&main->program.error, cache, is_entry, 1);
+ controller_print_error_entry_setting_requires_exactly(&main->program.error, cache, is_entry, 1);
continue;
}
}
else if (is_entry && f_compare_dynamic(controller_pid_file_s, cache->action.name_action) == F_equal_to) {
if (cache->content_actions.array[i].used != 1) {
- controller_print_entry_error_setting_requires_exactly(&main->program.error, cache, is_entry, 1);
+ controller_print_error_entry_setting_requires_exactly(&main->program.error, cache, is_entry, 1);
continue;
}
status = f_rip_dynamic_partial_nulless(cache->buffer_file, cache->content_actions.array[i].array[0], &cache->action.generic);
if (F_status_is_error(status)) {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_rip_dynamic_partial_nulless), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(f_rip_dynamic_partial_nulless), F_true);
continue;
}
status = controller_path_canonical_relative(main->setting, cache->action.generic, &main->setting.path_pid);
if (F_status_is_error(status)) {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(controller_path_canonical_relative), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(controller_path_canonical_relative), F_true);
continue;
}
}
else if (f_compare_dynamic(controller_session_s, cache->action.name_action) == F_equal_to) {
if (cache->content_actions.array[i].used != 1) {
- controller_print_entry_error_setting_requires_exactly(&main->program.error, cache, is_entry, 1);
+ controller_print_error_entry_setting_requires_exactly(&main->program.error, cache, is_entry, 1);
continue;
}
}
else if (f_compare_dynamic(controller_show_s, cache->action.name_action) == F_equal_to) {
if (cache->content_actions.array[i].used != 1) {
- controller_print_entry_error_setting_requires_exactly(&main->program.error, cache, is_entry, 1);
+ controller_print_error_entry_setting_requires_exactly(&main->program.error, cache, is_entry, 1);
continue;
}
*time = time_previous;
if (F_status_set_fine(status) == F_memory_not) {
- controller_print_entry_error(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(fl_conversion_dynamic_partial_to_unsigned_detect), F_true);
+ controller_print_error_entry(&main->program.error, cache, is_entry, F_status_set_fine(status), macro_controller_f(fl_conversion_dynamic_partial_to_unsigned_detect), F_true);
continue;
}
- controller_print_entry_error_setting_support_not_number(&main->program.error, is_entry, cache->buffer_file, cache->content_actions.array[i].array[1]);
+ controller_print_error_entry_setting_support_not_number(&main->program.error, is_entry, cache->buffer_file, cache->content_actions.array[i].array[1]);
}
}
else {
* @return
* F_okay on success.
*
- * Errors (with error bit) from: controller_print_entry_error_file().
+ * Errors (with error bit) from: controller_print_error_entry_file().
*
- * @see controller_print_entry_error_file()
+ * @see controller_print_error_entry_file()
*/
#ifndef _di_controller_entry_setting_read_
extern f_status_t controller_entry_setting_read(controller_t * const main, controller_cache_t * const cache, const uint8_t is_entry, const f_range_t content_range);
status = controller_lock_write(is_normal, &main->thread, &main->thread.lock.instance);
if (F_status_is_error(status)) {
- controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status), F_false);
+ controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status), F_false);
}
else {
status = f_memory_array_increase(controller_allocation_small_d, sizeof(controller_instance_t), (void **) &main->thread.instances.array, &main->thread.instances.used, &main->thread.instances.size);
status = controller_lock_write(is_normal, &main->thread, &instance->lock);
if (F_status_is_error(status)) {
- controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status), F_false);
+ controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status), F_false);
}
else {
instance->action = action;
status_lock = controller_lock_read_instance(instance, &instance->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&instance->main->program.error, F_status_set_fine(status_lock), F_true);
+ controller_print_error_lock_critical(&instance->main->program.error, F_status_set_fine(status_lock), F_true);
break;
}
if (main->setting.flag & controller_main_flag_validate_e) {
if ((main->setting.flag & controller_main_flag_simulate_e)) {
- controller_print_perform_debug_pid_file_control_socket(&main->program.debug);
+ controller_print_debug_perform_pid_file_control_socket(&main->program.debug);
}
return F_okay;
// Always return immediately on memory errors.
if (F_status_set_fine(status) == F_memory_not) {
- controller_print_perform_error_pid_file_create(&main->program.error, macro_controller_f(controller_file_pid_create), is_entry);
+ controller_print_error_perform_pid_file_create(&main->program.error, macro_controller_f(controller_file_pid_create), is_entry);
return status;
}
- controller_print_perform_debug_pid_file_create_problem(&main->program.debug, macro_controller_f(controller_file_pid_create), is_entry);
+ controller_print_debug_perform_pid_file_create_problem(&main->program.debug, macro_controller_f(controller_file_pid_create), is_entry);
status = F_okay;
}
else {
main->setting.flag |= controller_setting_flag_pid_created_e;
- controller_print_perform_debug_pid_file_create_success(&main->program.debug, is_entry);
+ controller_print_debug_perform_pid_file_create_success(&main->program.debug, is_entry);
}
}
if (main->process.control.flag & controller_control_flag_readonly_e) {
if (f_file_exists(main->setting.path_control, F_true) != F_true) {
- controller_print_perform_debug_control_socket_missing_read_only(&main->program.debug);
+ controller_print_debug_perform_control_socket_missing_read_only(&main->program.debug);
return F_data_not;
}
controller_print_error_status(&main->program.error, macro_controller_f(f_socket_create), F_status_set_fine(status));
}
else {
- // @todo make all message strings passed to controller_print_perform_debug_control_socket_failure() into global static strings and update the function accordingly.
- controller_print_perform_debug_control_socket_failure(&main->program.debug, F_status_set_fine(status), "could not be created");
+ // @todo make all message strings passed to controller_print_debug_perform_control_socket_failure() into global static strings and update the function accordingly.
+ controller_print_debug_perform_control_socket_failure(&main->program.debug, F_status_set_fine(status), "could not be created");
}
return status;
controller_print_error(global->thread, &main->program.error, F_status_set_fine(status), macro_controller_f(f_socket_bind), F_true);
}
else {
- controller_print_perform_debug_control_socket_failure(&main->program.debug, F_status_set_fine(status), "could not be bound");
+ controller_print_debug_perform_control_socket_failure(&main->program.debug, F_status_set_fine(status), "could not be bound");
}
return status;
controller_print_error(global->thread, &main->program.error, F_status_set_fine(status), macro_controller_f(f_file_role_change), F_true);
}
else {
- controller_print_perform_debug_control_socket_failure(&main->program.debug, F_status_set_fine(status), "failed to set file roles");
+ controller_print_debug_perform_control_socket_failure(&main->program.debug, F_status_set_fine(status), "failed to set file roles");
}
return status;
controller_print_error(global->thread, &main->program.error, F_status_set_fine(status), macro_controller_f(f_file_role_change), F_true);
}
else {
- controller_print_perform_debug_control_socket_failure(&main->program.debug, F_status_set_fine(status), "failed to set file mode");
+ controller_print_debug_perform_control_socket_failure(&main->program.debug, F_status_set_fine(status), "failed to set file mode");
}
return status;
+++ /dev/null
-#include "../controller.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 3
- *
- * Project: Controller
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Provides the print action functionality.
- *
- * This is auto-included and should not need to be explicitly included.
- */
-#ifndef _controller_main_print_action_h
-#define _controller_main_print_action_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _controller_main_print_action_h
--- /dev/null
+#include "../../controller.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_controller_print_debug_perform_control_socket_failure_
+ f_status_t controller_print_debug_perform_control_socket_failure(fl_print_t * const print, const f_status_t status, const f_string_t message) {
+
+ if (!print || !print->custom) 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%[%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("%[' %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);
+
+ controller_unlock_print_flush(print->to, &main->thread);
+ }
+#endif // _di_controller_print_debug_perform_control_socket_failure_
+
+#ifndef _di_controller_print_debug_perform_control_socket_success_
+ f_status_t controller_print_debug_perform_control_socket_success(fl_print_t * const print, const f_status_t status, const f_string_t message) {
+
+ if (!print || !print->custom) 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("%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("' created.%r", print->to, f_string_eol_s);
+
+ controller_unlock_print_flush(print->to, &main->thread);
+ }
+#endif // _di_controller_print_debug_perform_control_socket_success_
+
+#ifndef _di_controller_print_debug_perform_control_socket_missing_read_only_
+ f_status_t controller_print_debug_perform_control_socket_missing_read_only(fl_print_t * const print) {
+
+ if (!print || !print->custom) 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%[%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("' .%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);
+
+ controller_unlock_print_flush(print->to, &main->thread);
+
+ return F_okay;
+ }
+#endif // _di_controller_print_debug_perform_control_socket_missing_read_only_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: Controller
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides the print debug perform control functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _controller_main_print_debug_perform_control_h
+#define _controller_main_print_debug_perform_control_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Print debug message about control socket failing for the reason specified.
+ *
+ * @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.
+ * @param status
+ * The status code relating to the failure.
+ * @param message
+ * A short message describing the reason for the failure.
+ *
+ * @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_debug_perform_control_socket_failure_
+ extern f_status_t controller_print_debug_perform_control_socket_failure(fl_print_t * const print, const f_status_t status, const f_string_t message);
+#endif // _di_controller_print_debug_perform_control_socket_failure_
+
+/**
+ * Print debug message about control socket being created.
+ *
+ * @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.
+ *
+ * @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_debug_perform_control_socket_success_
+ extern f_status_t controller_print_debug_perform_control_socket_success(fl_print_t * const print);
+#endif // _di_controller_print_debug_perform_control_socket_success_
+
+/**
+ * Print debug message about control socket missing in read only mode.
+ *
+ * @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.
+ *
+ * @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_debug_perform_control_socket_missing_read_only_
+ extern f_status_t controller_print_debug_perform_control_socket_missing_read_only(fl_print_t * const print);
+#endif // _di_controller_print_debug_perform_pid_file_control_socket_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _controller_main_print_debug_perform_control_h
--- /dev/null
+#include "../../controller.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_controller_print_debug_perform_pid_file_control_socket_
+ f_status_t controller_print_debug_perform_pid_file_control_socket(fl_print_t * const print) {
+
+ if (!print || !print->custom) 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("%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);
+
+ if (main->setting.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("'.%r", print->to, f_string_eol_s);
+ }
+
+ controller_unlock_print_flush(print->to, &main->thread);
+
+ return F_okay;
+ }
+#endif // _di_controller_print_debug_perform_pid_file_control_socket_
+
+#ifndef _di_controller_print_debug_perform_pid_file_create_problem_
+ f_status_t controller_print_debug_perform_pid_file_create_problem(fl_print_t * const print, const f_string_t function, const f_status_t status, const uint8_t is_entry) {
+
+ if (!print || !print->custom) 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);
+
+ 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("%[' 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);
+ }
+
+ f_file_stream_lock(print->to);
+
+ controller_print_error_entry_cache(print->to, &main->thread.cache.action, is_entry);
+
+ controller_unlock_print_flush(print->to, &main->thread);
+ }
+#endif // _di_controller_print_debug_perform_pid_file_create_problem_
+
+#ifndef _di_controller_print_debug_perform_pid_file_create_success_
+ f_status_t controller_print_debug_perform_pid_file_create_success(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_debug_e) return F_output_not;
+
+ controller_t * const main = (controller_t *) print->custom;
+
+ 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);
+
+ controller_unlock_print_flush(print->to, &main->thread);
+ }
+#endif // _di_controller_print_debug_perform_pid_file_create_success_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: Controller
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides the print debug perform pid functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _controller_main_print_debug_perform_pid_h
+#define _controller_main_print_debug_perform_pid_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Print debug message about PID file and control socket.
+ *
+ * @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.
+ *
+ * @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_debug_perform_pid_file_control_socket_
+ extern f_status_t controller_print_debug_perform_pid_file_control_socket(fl_print_t * const print);
+#endif // _di_controller_print_debug_perform_pid_file_control_socket_
+
+/**
+ * Print debug message on problems when creating PID file.
+ *
+ * @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.
+ * @param function
+ * The name of the function associated with the error.
+ * @param status
+ * The status code to process.
+ * Make sure this has F_status_set_fine() called if the status code has any error or warning bits.
+ * @param is_entry
+ * If TRUE, then this operates as an entry.
+ * If FALSE, then this operates as an exit.
+ *
+ * @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_debug_perform_pid_file_create_problem_
+ extern f_status_t controller_print_debug_perform_pid_file_create_problem(fl_print_t * const print, const f_string_t function, const f_status_t status, const uint8_t is_entry);
+#endif // _di_controller_print_debug_perform_pid_file_create_problem_
+
+/**
+ * Print debug message on success when creating PID file.
+ *
+ * @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.
+ * @param is_entry
+ * If TRUE, then this operates as an entry.
+ * If FALSE, then this operates as an exit.
+ *
+ * @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_debug_perform_pid_file_create_success_
+ extern f_status_t controller_print_debug_perform_pid_file_create_success(fl_print_t * const print, const uint8_t is_entry);
+#endif // _di_controller_print_debug_perform_pid_file_create_success_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _controller_main_print_debug_perform_pid_h
--- /dev/null
+#include "../../../controller.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_controller_print_debug_rule_action_empty_
+ f_status_t controller_print_debug_rule_action_empty(fl_print_t * const print, controller_cache_t * const cache) {
+
+ 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%[%QAction is empty, nothing to do.%]%r", print->to, f_string_eol_s, print->context, print->prefix, print->context, f_string_eol_s);
+
+ controller_print_error_rule_cache(print, &cache->action, F_true);
+
+ controller_unlock_print_flush(print->to, &main->thread);
+
+ return F_okay;
+ }
+#endif // _di_controller_print_debug_rule_action_empty_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: Controller
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides the print debug entry action functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _controller_main_print_debug_entry_action_h
+#define _controller_main_print_debug_entry_action_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Print debug message about the rule item action being empty.
+ *
+ * @param print
+ * The output structure to print to.
+ *
+ * Must not be NULL.
+ * @param cache
+ * A structure for containing and caching relevant data.
+ *
+ * Must not be NULL.
+ *
+ * @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.
+ *
+ * @see fl_print_format()
+ * @see fll_error_print()
+ *
+ * @see controller_lock_print()
+ * @see controller_print_error_rule_cache()
+ * @see controller_unlock_print_flush()
+ */
+#ifndef _di_controller_print_debug_rule_action_empty_
+ extern f_status_t controller_print_debug_rule_action_empty(fl_print_t * const print, controller_cache_t * const cache);
+#endif // _di_controller_print_debug_rule_action_empty_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _controller_main_print_debug_entry_action_h
--- /dev/null
+#include "../../../controller.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_controller_main_print_debug_rule_execute_rerun_
+ f_status_t controller_main_print_debug_rule_execute_rerun(fl_print_t * const print, controller_rule_rerun_item_t * const rerun, const uint8_t action) {
+
+ if (!print || !print->custom || !rerun) 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("%rRe-running '", print->to, f_string_eol_s);
+ fl_print_format("%[%r%]' '", print->to, print->set->title, instance->rule.alias, print->set->title);
+ fl_print_format("%[%r%]' with a ", print->to, print->set->notable, controller_convert_rule_action_execute_type_string(action), print->set->notable);
+ fl_print_format("%[%r%] of ", print->to, print->set->notable, controller_delay_s, print->set->notable);
+ fl_print_format("%[%ul%] MegaTime", print->to, print->set->notable, rerun->delay, print->set->notable);
+
+ if (rerun->max) {
+ fl_print_format(" for %[%ul%]", print->to, print->set->notable, rerun->count, print->set->notable);
+ fl_print_format(" of %[%r%] ", print->to, print->set->notable, controller_max_s, print->set->notable);
+ fl_print_format(f_string_format_un_single_s.string, print->to, print->set->notable, rerun->max, print->set->notable);
+ fl_print_format(".%r", print->to, f_string_eol_s);
+ }
+ else {
+ fl_print_format(" with no %[%r%].%r", print->to, print->set->notable, controller_max_s, print->set->notable, f_string_eol_s);
+ }
+
+ controller_unlock_print_flush(print->to, &main->thread);
+
+ return F_okay;
+ }
+#endif // _di_controller_main_print_debug_rule_execute_rerun_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: Controller
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides the print debug entry action functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _controller_main_print_debug_rule_execute_h
+#define _controller_main_print_debug_rule_execute_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Print debug message about re-running the execution of some action.
+ *
+ * @param print
+ * The output structure to print to.
+ *
+ * Must not be NULL.
+ * @param rerun
+ * The rerun data.
+ *
+ * Must not be NULL.
+ * @param action
+ * The ID of the action being re-run.
+ *
+ * @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.
+ *
+ * @see fl_print_format()
+ * @see fll_error_print()
+ *
+ * @see controller_lock_print()
+ * @see controller_print_error_rule_cache()
+ * @see controller_unlock_print_flush()
+ */
+#ifndef _di_controller_main_print_debug_rule_execute_rerun_
+ extern f_status_t controller_main_print_debug_rule_execute_rerun(fl_print_t * const print, controller_rule_rerun_item_t * const rerun, const uint8_t action);
+#endif // _di_controller_main_print_debug_rule_execute_rerun_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _controller_main_print_debug_rule_execute_h
extern "C" {
#endif
-#ifndef _di_controller_print_entry_error_
- f_status_t controller_print_entry_error(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_status_t status, const char * const function, const bool fallback) {
+#ifndef _di_controller_print_error_entry_
+ f_status_t controller_print_error_entry(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_status_t status, const char * const function, const bool fallback) {
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;
f_file_stream_lock(print->to);
- controller_print_entry_error_cache(print, &cache->action, is_entry);
+ 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_entry_error_
+#endif // _di_controller_print_error_entry_
-#ifndef _di_controller_print_entry_error_cache_
- f_status_t controller_print_entry_error_cache(fl_print_t * const print, controller_cache_action_t * const cache, const uint8_t is_entry) {
+#ifndef _di_controller_print_error_entry_cache_
+ f_status_t controller_print_error_entry_cache(fl_print_t * const print, controller_cache_action_t * const cache, const uint8_t is_entry) {
if (!print || !cache) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
return F_okay;
}
-#endif // _di_controller_print_entry_error_cache_
+#endif // _di_controller_print_error_entry_cache_
-#ifndef _di_controller_print_entry_error_file_
- f_status_t controller_print_entry_error_file(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_status_t status, const char * const function, const bool fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) {
+#ifndef _di_controller_print_error_entry_file_
+ f_status_t controller_print_error_entry_file(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_status_t status, const char * const function, const bool fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) {
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;
f_file_stream_lock(print->to);
- controller_print_entry_error_cache(print, &cache->action, is_entry);
+ 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_entry_error_file_
+#endif // _di_controller_print_error_entry_file_
#ifdef __cplusplus
} // extern "C"
* F_output_not (with error bit) if setting is NULL.
*
* @see fll_error_print()
- * @see controller_print_entry_error_cache()
+ * @see controller_print_error_entry_cache()
*/
-#ifndef _di_controller_print_entry_error_
- extern f_status_t controller_print_entry_error(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_status_t status, const char * const function, const bool fallback);
-#endif // _di_controller_print_entry_error_
+#ifndef _di_controller_print_error_entry_
+ extern f_status_t controller_print_error_entry(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_status_t status, const char * const function, const bool fallback);
+#endif // _di_controller_print_error_entry_
/**
* Print additional error/warning information in addition to existing error that is found within the cache.
* @see controller_entry_actions_read()
* @see controller_entry_read()
*/
-#ifndef _di_controller_print_entry_error_cache_
- extern f_status_t controller_print_entry_error_cache(fl_print_t * const print, controller_cache_action_t * const cache, const uint8_t is_entry);
-#endif // _di_controller_print_entry_error_cache_
+#ifndef _di_controller_print_error_entry_cache_
+ extern f_status_t controller_print_error_entry_cache(fl_print_t * const print, controller_cache_action_t * const cache, const uint8_t is_entry);
+#endif // _di_controller_print_error_entry_cache_
/**
* Print the entry related file error.
* F_output_not (with error bit) if setting is NULL.
*
* @see fll_error_file_print()
- * @see controller_print_entry_error_cache()
+ * @see controller_print_error_entry_cache()
*/
-#ifndef _di_controller_print_entry_error_file_
- extern f_status_t controller_print_entry_error_file(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_status_t status, const char * const function, const uint8_t fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type);
-#endif // _di_controller_print_entry_error_file_
+#ifndef _di_controller_print_error_entry_file_
+ extern f_status_t controller_print_error_entry_file(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_status_t status, const char * const function, const uint8_t fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type);
+#endif // _di_controller_print_error_entry_file_
#ifdef __cplusplus
} // extern "C"
--- /dev/null
+#include "../../../controller.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_controller_print_error_entry_action_execution_failure_
+ f_status_t controller_print_error_entry_action_execution_failure(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const int code) {
+
+ 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;
+
+ controller_t * const main = (controller_t *) print->custom;
+
+ controller_lock_print(print->to, &main->thread);
+
+ fl_print_format("%r%[%QExecution failed with return value of '%]", print->to, f_string_eol_s, print->context, print->prefix, print->context);
+ fl_print_format(f_string_format_i_single_s.string, print->to, print->notable, code, print->notable);
+ fl_print_format(f_string_format_sentence_end_quote_s.string, print->to, 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_error_entry_action_execution_failure_
+
+#ifndef _di_controller_print_error_entry_action_execution_missing_
+ f_status_t controller_print_error_entry_action_execution_missing(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_error_e) return F_output_not;
+
+ controller_t * const main = (controller_t *) print->custom;
+
+ controller_lock_print(print->to, &main->thread);
+
+ fl_print_format("%r%[%QExecution failed, unable to find program or script '%]", 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, name, print->notable);
+ fl_print_format(f_string_format_sentence_end_quote_s.string, print->to, 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_error_entry_action_execution_missing_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: Controller
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides the print entry error action functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _controller_main_print_entry_error_action_h
+#define _controller_main_print_entry_error_action_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Print an error about a entry item action program or script execution failure.
+ *
+ * @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 code
+ * The return code.
+ *
+ * @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.
+ *
+ * @see fll_error_file_print()
+ * @see controller_print_error_entry_cache()
+ */
+#ifndef _di_controller_print_error_entry_action_execution_failure_
+ extern f_status_t controller_print_error_entry_action_execution_failure(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const int code);
+#endif // _di_controller_print_error_entry_action_execution_failure_
+
+/**
+ * Print an error about a entry item action program or script not being found.
+ *
+ * @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 program or script name.
+ *
+ * @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.
+ *
+ * @see fll_error_file_print()
+ * @see controller_print_error_entry_cache()
+ */
+#ifndef _di_controller_print_error_entry_action_execution_missing_
+ extern f_status_t controller_print_error_entry_action_execution_missing(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_error_entry_action_execution_missing_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _controller_main_print_entry_error_action_h
extern "C" {
#endif
-#ifndef _di_controller_print_entry_error_item_action_execution_failure_
- f_status_t controller_print_entry_error_item_action_execution_failure(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const int code) {
-
- 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;
-
- controller_t * const main = (controller_t *) print->custom;
-
- controller_lock_print(print->to, &main->thread);
-
- fl_print_format("%r%[%QExecution failed with return value of '%]", print->to, f_string_eol_s, print->context, print->prefix, print->context);
- fl_print_format(f_string_format_i_single_s.string, print->to, print->notable, code, print->notable);
- fl_print_format(f_string_format_sentence_end_quote_s.string, print->to, print->context, print->context, f_string_eol_s);
-
- controller_print_entry_error_cache(print, &cache->action, is_entry);
-
- controller_unlock_print_flush(print->to, &main->thread);
-
- return F_okay;
- }
-#endif // _di_controller_print_entry_error_item_action_execution_failure_
-
-#ifndef _di_controller_print_entry_error_item_action_execution_missing_
- f_status_t controller_print_entry_error_item_action_execution_missing(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_error_e) return F_output_not;
-
- controller_t * const main = (controller_t *) print->custom;
-
- controller_lock_print(print->to, &main->thread);
-
- fl_print_format("%r%[%QExecution failed, unable to find program or script '%]", 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, name, print->notable);
- fl_print_format(f_string_format_sentence_end_quote_s.string, print->to, print->context, print->context, f_string_eol_s);
-
- controller_print_entry_error_cache(print, &cache->action, is_entry);
-
- controller_unlock_print_flush(print->to, &main->thread);
-
- return F_okay;
- }
-#endif // _di_controller_print_entry_error_item_action_execution_missing_
-
-#ifndef _di_controller_print_entry_error_item_failure_
- f_status_t controller_print_entry_error_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) {
+#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) {
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;
fl_print_format(f_string_format_Q_single_s.string, print->to, print->notable, parameter, print->notable);
fl_print_format("%[' %S.%]%r", print->to, print->context, message, print->context, f_string_eol_s);
- controller_print_entry_error_cache(print, &cache->action, is_entry);
+ 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_entry_error_item_failure_
+#endif // _di_controller_print_error_entry_item_failure_
-#ifndef _di_controller_print_entry_error_item_invalid_
- f_status_t controller_print_entry_error_item_invalid(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_number_unsigned_t number) {
+#ifndef _di_controller_print_error_entry_item_invalid_
+ f_status_t controller_print_error_entry_item_invalid(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_number_unsigned_t number) {
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;
fl_print_format(f_string_format_un_single_s.string, print->to, print->notable, number, print->notable);
fl_print_format("%[' detected.%]%r", print->to, print->context, print->context, f_string_eol_s);
- controller_print_entry_error_cache(print, &cache->action, is_entry);
+ 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_entry_error_item_invalid_
+#endif // _di_controller_print_error_entry_item_invalid_
-#ifndef _di_controller_print_entry_error_item_setting_support_not_option_
- f_status_t controller_print_entry_error_item_setting_support_not_option(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_string_static_t setting) {
+#ifndef _di_controller_print_error_entry_item_setting_support_not_option_
+ f_status_t controller_print_error_entry_item_setting_support_not_option(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_string_static_t setting) {
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;
fl_print_format(f_string_format_Q_range_single_s.string, print->to, print->notable, cache->buffer_file, setting, print->notable);
fl_print_format(f_string_format_sentence_end_quote_s.string, print->to, print->context, print->context, f_string_eol_s);
- controller_print_entry_error_cache(print, &cache->action, is_entry);
+ 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_entry_error_item_setting_support_not_option_
+#endif // _di_controller_print_error_entry_item_setting_support_not_option_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * Print an error about a entry item action program or script execution failure.
- *
- * @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 code
- * The return code.
- *
- * @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.
- *
- * @see fll_error_file_print()
- * @see controller_print_entry_error_cache()
- */
-#ifndef _di_controller_print_entry_error_item_action_execution_failure_
- extern f_status_t controller_print_entry_error_item_action_execution_failure(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const int code);
-#endif // _di_controller_print_entry_error_item_action_execution_failure_
-
-/**
- * Print an error about a entry item action program or script not being found.
- *
- * @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 program or script name.
- *
- * @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.
- *
- * @see fll_error_file_print()
- * @see controller_print_entry_error_cache()
- */
-#ifndef _di_controller_print_entry_error_item_action_execution_missing_
- extern f_status_t controller_print_entry_error_item_action_execution_missing(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_entry_error_item_action_execution_missing_
-
-/**
* Print the entry item related error.
*
* @param print
* F_output_not (with error bit) if setting is NULL.
*
* @see fll_error_file_print()
- * @see controller_print_entry_error_cache()
+ * @see controller_print_error_entry_cache()
*/
-#ifndef _di_controller_print_entry_error_item_failure_
- extern f_status_t controller_print_entry_error_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);
-#endif // _di_controller_print_entry_error_item_failure_
+#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);
+#endif // _di_controller_print_error_entry_item_failure_
/**
* Print an error message for an invalid entry item.
* F_output_not (with error bit) if setting is NULL.
*
* @see fll_error_file_print()
- * @see controller_print_entry_error_cache()
+ * @see controller_print_error_entry_cache()
*/
-#ifndef _di_controller_print_entry_error_item_invalid_
- extern f_status_t controller_print_entry_error_item_invalid(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_number_unsigned_t number);
-#endif // _di_controller_print_entry_error_item_invalid_
+#ifndef _di_controller_print_error_entry_item_invalid_
+ extern f_status_t controller_print_error_entry_item_invalid(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_number_unsigned_t number);
+#endif // _di_controller_print_error_entry_item_invalid_
/**
* Print an error message about an entry it setting option not being supported.
* F_output_not (with error bit) if setting is NULL.
*
* @see fll_error_file_print()
- * @see controller_print_entry_error_cache()
+ * @see controller_print_error_entry_cache()
*/
-#ifndef _di_controller_print_entry_error_item_setting_support_not_option_
- extern f_status_t controller_print_entry_error_item_setting_support_not_option(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_string_static_t setting);
-#endif // _di_controller_print_entry_error_item_setting_support_not_option_
+#ifndef _di_controller_print_error_entry_item_setting_support_not_option_
+ extern f_status_t controller_print_error_entry_item_setting_support_not_option(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_string_static_t setting);
+#endif // _di_controller_print_error_entry_item_setting_support_not_option_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_controller_print_entry_error_setting_with_range_
- f_status_t controller_print_entry_error_setting_with_range(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_string_t before, const f_range_t range, const f_string_t after) {
+#ifndef _di_controller_print_error_entry_setting_with_range_
+ f_status_t controller_print_error_entry_setting_with_range(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_string_t before, const f_range_t range, const f_string_t after) {
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;
fl_print_format("%[%/Q%]", print->to.stream, print->notable, cache->buffer_file, range, print->notable);
fl_print_format("%['%S.%]%r", print->to.stream, print->context, after, print->context, f_string_eol_s);
- controller_print_entry_error_cache(print, &cache->action, is_entry);
+ 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_entry_error_setting_with_range_
+#endif // _di_controller_print_error_entry_setting_with_range_
-#ifndef _di_controller_print_entry_error_setting_ignored_
- f_status_t controller_print_entry_error_setting_ignored(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry) {
+#ifndef _di_controller_print_error_entry_setting_ignored_
+ f_status_t controller_print_error_entry_setting_ignored(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry) {
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;
fl_print_format(f_string_format_Q_single_s.string, print->to.stream, print->notable, cache->action.name_action, print->notable);
fl_print_format("%[' is being ignored.%]%r", print->to.stream, print->context, print->context, f_string_eol_s);
- controller_print_entry_error_cache(print, &cache->action, is_entry);
+ 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_entry_error_setting_ignored_
+#endif // _di_controller_print_error_entry_setting_ignored_
-#ifndef _di_controller_print_entry_error_setting_requires_between_
- f_status_t controller_print_entry_error_setting_requires_between(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_number_unsigned_t minimum, const f_number_unsigned_t maximum) {
+#ifndef _di_controller_print_error_entry_setting_requires_between_
+ f_status_t controller_print_error_entry_setting_requires_between(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_number_unsigned_t minimum, const f_number_unsigned_t maximum) {
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;
fl_print_format(f_string_format_un_single_s.string, print->to.stream, print->notable, maximum, print->notable);
fl_print_format("%[ Content.%]%r", print->to.stream, print->context, print->context, f_string_eol_s);
- controller_print_entry_error_cache(print, &cache->action, is_entry);
+ 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_entry_error_setting_requires_between_
+#endif // _di_controller_print_error_entry_setting_requires_between_
-#ifndef _di_controller_print_entry_error_setting_requires_exactly_
- f_status_t controller_print_entry_error_setting_requires_exactly(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_number_unsigned_t total) {
+#ifndef _di_controller_print_error_entry_setting_requires_exactly_
+ f_status_t controller_print_error_entry_setting_requires_exactly(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_number_unsigned_t total) {
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;
fl_print_format(f_string_format_un_single_s.string, print->to.stream, print->notable, total, print->notable);
fl_print_format("%[ Content.%]%r", print->to.stream, print->context, print->context, f_string_eol_s);
- controller_print_entry_error_cache(print, &cache->action, is_entry);
+ 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_entry_error_setting_requires_exactly_
+#endif // _di_controller_print_error_entry_setting_requires_exactly_
-#ifndef _di_controller_print_entry_error_setting_support_not_number_
- f_status_t controller_print_entry_error_setting_support_not_number(fl_print_t * const print, const uint8_t is_entry, const f_string_static_t buffer, const f_range_t range) {
+#ifndef _di_controller_print_error_entry_setting_support_not_number_
+ f_status_t controller_print_error_entry_setting_support_not_number(fl_print_t * const print, const uint8_t is_entry, const f_string_static_t buffer, const f_range_t range) {
if (!print || !print->custom) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
return F_okay;
}
-#endif // _di_controller_print_entry_error_setting_support_not_number_
+#endif // _di_controller_print_error_entry_setting_support_not_number_
#ifdef __cplusplus
} // extern "C"
*
* @see controller_entry_settings_read()
*/
-#ifndef _di_controller_print_entry_error_setting_with_range_
- extern f_status_t controller_print_entry_error_setting_with_range(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_string_t before, const f_range_t range, const f_string_t after);
-#endif // _di_controller_print_entry_error_setting_with_range_
+#ifndef _di_controller_print_error_entry_setting_with_range_
+ extern f_status_t controller_print_error_entry_setting_with_range(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_string_t before, const f_range_t range, const f_string_t after);
+#endif // _di_controller_print_error_entry_setting_with_range_
/**
* Print a message for when an entry setting is being ignored.
*
* F_output_not (with error bit) if setting is NULL.
*/
-#ifndef _di_controller_print_entry_error_setting_ignored_
- extern f_status_t controller_print_entry_error_setting_ignored(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry);
-#endif // _di_controller_print_entry_error_setting_ignored_
+#ifndef _di_controller_print_error_entry_setting_ignored_
+ extern f_status_t controller_print_error_entry_setting_ignored(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry);
+#endif // _di_controller_print_error_entry_setting_ignored_
/**
* Print a message for when an entry setting action has the incorrect number of parameters when the required amount is between a range.
*
* F_output_not (with error bit) if setting is NULL.
*/
-#ifndef _di_controller_print_entry_error_setting_requires_between_
- extern f_status_t controller_print_entry_error_setting_requires_between(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_number_unsigned_t minimum, const f_number_unsigned_t maximum);
-#endif // _di_controller_print_entry_error_setting_requires_between_
+#ifndef _di_controller_print_error_entry_setting_requires_between_
+ extern f_status_t controller_print_error_entry_setting_requires_between(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_number_unsigned_t minimum, const f_number_unsigned_t maximum);
+#endif // _di_controller_print_error_entry_setting_requires_between_
/**
* Print a message for when an entry setting action has the incorrect number of parameters when the required amount is fixed.
*
* F_output_not (with error bit) if setting is NULL.
*/
-#ifndef _di_controller_print_entry_error_setting_requires_exactly_
- extern f_status_t controller_print_entry_error_setting_requires_exactly(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_number_unsigned_t total);
-#endif // _di_controller_print_entry_error_setting_requires_exactly_
+#ifndef _di_controller_print_error_entry_setting_requires_exactly_
+ extern f_status_t controller_print_error_entry_setting_requires_exactly(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_number_unsigned_t total);
+#endif // _di_controller_print_error_entry_setting_requires_exactly_
/**
* Print an error message about an entry setting value not being a supported number.
* F_output_not (with error bit) if setting is NULL.
*
* @see fll_error_file_print()
- * @see controller_print_entry_error_cache()
+ * @see controller_print_error_entry_cache()
*/
-#ifndef _di_controller_print_entry_error_setting_support_not_number_
- extern f_status_t controller_print_entry_error_setting_support_not_number(fl_print_t * const print, const uint8_t is_entry, const f_string_static_t buffer, const f_range_t range);
-#endif // _di_controller_print_entry_error_setting_support_not_number_
+#ifndef _di_controller_print_error_entry_setting_support_not_number_
+ extern f_status_t controller_print_error_entry_setting_support_not_number(fl_print_t * const print, const uint8_t is_entry, const f_string_static_t buffer, const f_range_t range);
+#endif // _di_controller_print_error_entry_setting_support_not_number_
#ifdef __cplusplus
} // extern "C"
--- /dev/null
+#include "../../controller.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_controller_print_error_lock_critical_
+ f_status_t controller_print_error_lock_critical(fl_print_t * const print, const f_status_t status, const uint8_t is_read) {
+
+ // A signal is not an error.
+ if (!print || !cache) return F_status_set_error(F_output_not);
+ if (print->verbosity < f_console_verbosity_error_e || status == F_interrupt) return F_output_not;
+
+ controller_t * const main = (controller_t *) print->custom;
+
+ controller_lock_print(print->to, &main->thread);
+
+ fl_print_format("%r%[%QThe pid file '%]", print->to, f_string_eol_s, print->context, print->prefix, print->context);
+ fl_print_format("%['Critical failure while attempting to establish '%]", print->to, print->context, print->context);
+ fl_print_format("%[%r lock%]", print->to, print->notable, is_read ? f_file_operation_read_s : f_file_operation_write_s, print->notable);
+
+ if (status != F_failure) {
+ fl_print_format(" %['due to%] ", print->to, print->context, print->context);
+
+ if (status == F_parameter) {
+ fl_print_format("%[Invalid Parameter%]", print->to, print->notable, print->notable);
+ }
+ else if (status == F_deadlock) {
+ fl_print_format("%[Deadlock%]", print->to, print->notable, print->notable);
+ }
+ else if (status == F_resource_not) {
+ fl_print_format("%[Too Many Locks%]", print->to, print->notable, print->notable);
+ }
+ else {
+ fl_print_format("%[Unknown Error%]", print->to, print->notable, print->notable);
+ }
+ }
+
+ fl_print_format(f_string_format_sentence_end_quote_s.string, print->to, print->context, print->context, f_string_eol_s);
+
+ controller_unlock_print_flush(print->to, &main->thread);
+
+ return F_okay;
+ }
+#endif // _di_controller_print_error_lock_critical_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: Controller
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides the print error lock functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _controller_main_print_error_lock_h
+#define _controller_main_print_error_lock_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Print a r/w lock related error message, locking the print mutex during the print.
+ *
+ * This will ignore F_interrupt and not print any messages, if passed.
+ *
+ * @param print
+ * The output structure to print to.
+ *
+ * Must not be NULL.
+ *
+ * This does not alter print.custom.setting.state.status.
+ * @param status
+ * The status code to process.
+ * Make sure this has F_status_set_fine() called if the status code has any error or warning bits.
+ * @param is_read
+ * If TRUE, then this is for a read lock.
+ * If FALSE, then this is for a write lock.
+ *
+ * @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.
+ *
+ * @see fll_error_print()
+ * @see controller_print_error_entry_cache()
+ */
+#ifndef _di_controller_print_error_lock_critical_
+ extern f_status_t controller_print_error_lock_critical(fl_print_t * const print, const f_status_t status, const uint8_t is_read);
+#endif // _di_controller_print_error_lock_critical_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _controller_main_print_error_lock_h
--- /dev/null
+#include "../../controller.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_controller_print_error_perform_pid_file_create_
+ f_status_t controller_print_error_perform_pid_file_create(fl_print_t * const print, const f_string_t function, const f_status_t status, 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;
+
+ controller_t * const main = (controller_t *) print->custom;
+
+ 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);
+
+ f_file_stream_lock(print->to);
+
+ controller_print_error_entry_cache(print->to, &main->thread.cache.action, is_entry);
+
+ controller_unlock_print_flush(print->to, &main->thread);
+ }
+#endif // _di_controller_print_error_perform_pid_file_create_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: Controller
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides the print error perform pid functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _controller_main_print_error_perform_pid_h
+#define _controller_main_print_error_perform_pid_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Print debug message about PID file and control socket.
+ *
+ * @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.
+ *
+ * @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_debug_perform_pid_file_control_socket_
+ extern f_status_t controller_print_debug_perform_pid_file_control_socket(fl_print_t * const print);
+#endif // _di_controller_print_debug_perform_pid_file_control_socket_
+
+/**
+ * Print debug message on problems when creating PID file.
+ *
+ * @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.
+ * @param function
+ * The name of the function associated with the error.
+ * @param status
+ * The status code to process.
+ * Make sure this has F_status_set_fine() called if the status code has any error or warning bits.
+ * @param is_entry
+ * If TRUE, then this operates as an entry.
+ * If FALSE, then this operates as an exit.
+ *
+ * @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_debug_perform_pid_file_create_problem_
+ extern f_status_t controller_print_debug_perform_pid_file_create_problem(fl_print_t * const print, const f_string_t function, const f_status_t status, const uint8_t is_entry);
+#endif // _di_controller_print_debug_perform_pid_file_create_problem_
+
+/**
+ * Print debug message on success when creating PID file.
+ *
+ * @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.
+ * @param is_entry
+ * If TRUE, then this operates as an entry.
+ * If FALSE, then this operates as an exit.
+ *
+ * @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_debug_perform_pid_file_create_success_
+ extern f_status_t controller_print_debug_perform_pid_file_create_success(fl_print_t * const print, const uint8_t is_entry);
+#endif // _di_controller_print_debug_perform_pid_file_create_success_
+
+/**
+ * Print error message on problems when creating PID file.
+ *
+ * @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.
+ * @param function
+ * The name of the function associated with the error.
+ * @param status
+ * The status code to process.
+ * Make sure this has F_status_set_fine() called if the status code has any error or warning bits.
+ * @param is_entry
+ * If TRUE, then this operates as an entry.
+ * If FALSE, then this operates as an exit.
+ *
+ * @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_error_perform_pid_file_create_
+ extern f_status_t controller_print_error_perform_pid_file_create(fl_print_t * const print, const f_string_t function, const f_status_t status, const uint8_t is_entry);
+#endif // _di_controller_print_error_perform_pid_file_create_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _controller_main_print_error_perform_pid_h
-#include "../controller.h"
+#include "../../controller.h"
#ifdef __cplusplus
extern "C" {
#endif
-#ifndef _di_controller_print_rule_error_
- f_status_t controller_print_rule_error(fl_print_t * const print, const controller_cache_action_t cache, const f_status_t status, const f_string_t function, const bool fallback, const bool item) {
+#ifndef _di_controller_print_error_rule_
+ f_status_t controller_print_error_rule(fl_print_t * const print, controller_cache_action_t * const cache, const f_status_t status, const f_string_t function, const uint8_t fallback, const uint8_t item) {
if (!print || !print->custom) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
f_file_stream_lock(print->to);
- controller_print_rule_error_cache(print, cache, item);
+ controller_print_error_rule_cache(print, cache, item);
controller_unlock_print_flush(print->to, &main->thread);
return F_okay;
}
-#endif // _di_controller_print_rule_error_
+#endif // _di_controller_print_error_rule_
-#ifndef _di_controller_print_rule_error_cache_
- f_status_t controller_print_rule_error_cache(fl_print_t * const print, const controller_cache_action_t cache, const bool item) {
+#ifndef _di_controller_print_error_rule_cache_
+ f_status_t controller_print_error_rule_cache(fl_print_t * const print, controller_cache_action_t * const cache, const uint8_t item) {
- if (!print) return F_status_set_error(F_output_not);
+ if (!print || !cache) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
fl_print_format("%r%[%QWhile processing ", print->to, f_string_eol_s, print->context, print->prefix);
- if (cache.name_action.used) {
+ if (cache->name_action.used) {
fl_print_format("%r '%]", print->to, item ? controller_action_s : controller_value_s, print->context);
- fl_print_format(f_string_format_Q_single_s.string, print->to, print->notable, cache.name_action, print->notable);
+ fl_print_format(f_string_format_Q_single_s.string, print->to, print->notable, cache->name_action, print->notable);
fl_print_format("%[' on line%] ", print->to, print->context, print->context);
- fl_print_format(f_string_format_un_single_s.string, print->to, print->notable, cache.line_action, print->notable);
+ fl_print_format(f_string_format_un_single_s.string, print->to, print->notable, cache->line_action, print->notable);
fl_print_format("%[ for ", print->to, print->context);
}
- if (cache.name_item.used) {
+ if (cache->name_item.used) {
fl_print_format("rule %r '%]", print->to, item ? controller_item_s : controller_settings_s, print->context);
- fl_print_format(f_string_format_Q_single_s.string, print->to, print->notable, cache.name_item, print->notable);
+ fl_print_format(f_string_format_Q_single_s.string, print->to, print->notable, cache->name_item, print->notable);
fl_print_format("%[' on line%] ", print->to, print->context, print->context);
- fl_print_format(f_string_format_un_single_s.string, print->to, print->notable, cache.line_item, print->notable);
+ fl_print_format(f_string_format_un_single_s.string, print->to, print->notable, cache->line_item, print->notable);
fl_print_format("%[ for ", print->to, print->context);
}
- if (cache.name_file.used) {
- fl_print_format("rule file '%]%[%Q%]%['", print->to, print->context, print->notable, cache.name_file, print->notable, print->context);
+ if (cache->name_file.used) {
+ fl_print_format("rule file '%]%[%Q%]%['", print->to, print->context, print->notable, cache->name_file, print->notable, print->context);
}
fl_print_format(".%]%r", print->to, print->context, f_string_eol_s);
return F_okay;
}
-#endif // _di_controller_print_rule_error_cache_
+#endif // _di_controller_print_error_rule_cache_
#ifdef __cplusplus
} // extern "C"
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: Controller
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides the print rule error functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _controller_main_print_rule_error_h
+#define _controller_main_print_rule_error_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Print generic error/warning information.
+ *
+ * This is essentially a wrapper to fll_error_print() that includes locking.
+ *
+ * @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 status
+ * The status code to process.
+ * Make sure this has F_status_set_fine() called if the status code has any error or warning bits.
+ * @param function
+ * The name of the function where the error happened.
+ * Set to 0 to disable.
+ * @param fallback
+ * Set to F_true to print the fallback error message for unknown errors.
+ * @param item
+ * If TRUE, then this error is associated with an item.
+ * If FALSE, then this error is associated with a rule setting.
+ *
+ * @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.
+ *
+ * @see fll_error_print()
+ * @see controller_print_error_rule_cache()
+ */
+#ifndef _di_controller_print_error_rule_
+ extern f_status_t controller_print_error_rule(fl_print_t * const print, controller_cache_action_t * const cache, const f_status_t status, const f_string_t function, const uint8_t fallback, const uint8_t item);
+#endif // _di_controller_print_error_rule_
+
+/**
+ * Print additional error/warning information in addition to existing error.
+ *
+ * This is explicitly intended to be used in addition to the error message.
+ *
+ * This neither locks the thread nor does it check to see if output is enabled or disabled.
+ *
+ * @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 item
+ * If TRUE, then this error is associated with an item.
+ * If FALSE, then this error is associated with a rule setting.
+ *
+ * @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.
+ *
+ * @see fll_error_print()
+ * @see controller_print_error_entry_cache()
+ */
+#ifndef _di_controller_print_error_rule_cache_
+ extern f_status_t controller_print_error_rule_cache(fl_print_t * const print, controller_cache_action_t * const cache, const uint8_t item);
+#endif // _di_controller_print_error_rule_cache_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _controller_main_print_rule_error_h
-#include "../../controller.h"
+#include "../../../controller.h"
#ifdef __cplusplus
extern "C" {
#endif
-#ifndef _di_controller_print_rule_action_error_missing_pid_
- f_status_t controller_print_rule_action_error_missing_pid(fl_print_t * const print, const f_string_static_t alias) {
+#ifndef _di_controller_print_error_rule_action_missing_pid_
+ f_status_t controller_print_error_rule_action_missing_pid(fl_print_t * const print, const f_string_static_t alias) {
if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
return F_okay;
}
-#endif // _di_controller_print_rule_action_error_missing_pid_
+#endif // _di_controller_print_error_rule_action_missing_pid_
#ifdef __cplusplus
} // extern "C"
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*
- * Provides the print rule action functionality.
+ * Provides the print error entry action functionality.
*
* This is auto-included and should not need to be explicitly included.
*/
-#ifndef _controller_main_print_rule_action_h
-#define _controller_main_print_rule_action_h
+#ifndef _controller_main_print_error_entry_action_h
+#define _controller_main_print_error_entry_action_h
#ifdef __cplusplus
extern "C" {
*
* F_output_not (with error bit) if setting is NULL.
*/
-#ifndef _di_controller_print_rule_action_error_missing_pid_
- extern f_status_t controller_print_rule_action_error_missing_pid(fl_print_t * const print, const f_string_static_t alias);
-#endif // _di_controller_print_rule_action_error_missing_pid_
+#ifndef _di_controller_print_error_rule_action_missing_pid_
+ extern f_status_t controller_print_error_rule_action_missing_pid(fl_print_t * const print, const f_string_static_t alias);
+#endif // _di_controller_print_error_rule_action_missing_pid_
#ifdef __cplusplus
} // extern "C"
#endif
-#endif // _controller_main_print_rule_action_h
+#endif // _controller_main_print_error_entry_action_h
-#include "../../controller.h"
+#include "../../../controller.h"
#ifdef __cplusplus
extern "C" {
#endif
-#ifndef _di_controller_print_rule_item_debug_action_empty_
- f_status_t controller_print_rule_item_debug_action_empty(fl_print_t * const print, controller_cache_t * const cache) {
-
- 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%[%QAction is empty, nothing to do.%]%r", print->to, f_string_eol_s, print->context, print->prefix, print->context, f_string_eol_s);
-
- controller_print_rule_error_cache(print, cache->action, F_true);
-
- controller_unlock_print_flush(print->to, &main->thread);
-
- return F_okay;
- }
-#endif // _di_controller_print_rule_item_debug_action_empty_
-
-#ifndef _di_controller_print_rule_item_error_
- f_status_t controller_print_rule_item_error(fl_print_t * const print, const controller_cache_action_t cache, const bool item, const f_status_t status) {
+#ifndef _di_controller_print_error_rule_item_
+ f_status_t controller_print_error_rule_item(fl_print_t * const print, const controller_cache_action_t cache, const bool item, const f_status_t status) {
if (!print || !print->custom) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
// fll_error_print() automatically locks, so manually handle only the mutex locking and flushing rather than calling controller_lock_print().
f_thread_mutex_lock(&main->thread.lock.print);
- controller_print_rule_error_cache(print, cache, item);
+ controller_print_error_rule_cache(print, cache, item);
f_file_stream_lock(print->to);
return F_okay;
}
-#endif // _di_controller_print_rule_item_error_
+#endif // _di_controller_print_error_rule_item_
-#ifndef _di_controller_print_rule_item_error_action_first_
- f_status_t controller_print_rule_item_error_action_first(fl_print_t * const print, controller_cache_t * const cache) {
+#ifndef _di_controller_print_error_rule_item_action_first_
+ f_status_t controller_print_error_rule_item_action_first(fl_print_t * const print, controller_cache_t * const cache) {
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;
fl_print_format(f_string_format_r_single_s.string, print->to, print->notable, controller_thaw_s, print->notable, print->context);
fl_print_format(f_string_format_sentence_end_quote_s.string, print->to, print->context, print->context, f_string_eol_s);
- controller_print_rule_error_cache(print, cache->action, F_true);
+ controller_print_error_rule_cache(print, &cache->action, F_true);
controller_unlock_print_flush(print->to, &main->thread);
return F_okay;
}
-#endif // _di_controller_print_rule_item_error_action_first_
+#endif // _di_controller_print_error_rule_item_action_first_
-#ifndef _di_controller_print_rule_item_error_action_second_
- f_status_t controller_print_rule_item_error_action_second(fl_print_t * const print, controller_cache_t * const cache) {
+#ifndef _di_controller_print_error_rule_item_action_positive_number_not_
+ f_status_t controller_print_error_rule_item_action_positive_number_not(fl_print_t * const print, controller_cache_t * const cache, const f_string_static_t name, const f_number_unsigned_t index) {
+
+ 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;
+
+ controller_t * const main = (controller_t *) print->custom;
+
+ controller_lock_print(print->to, &main->thread);
+
+ fl_print_format("%r%[%QRule item action '%]", print->to, f_string_eol_s, print->context, print->prefix, print->context);
+ fl_print_format(f_string_format_r_single_s.string, print->to, print->notable, controller_rerun_s, print->notable);
+ fl_print_format("%[' requires a positive whole number or 0 for the '%]", print->to, print->context, print->context);
+ fl_print_format(f_string_format_S_single_s.string, print->to, print->notable, name, print->notable);
+ fl_print_format("%[' value", print->to, print->context, print->context);
+
+ if (index + 1 == cache->content_action.used) {
+ fl_print_format(", but none were given.%]%r", print->to, print->context, f_string_eol_s);
+ }
+ else {
+ fl_print_format(", but '%]%[%/Q%]", print->to, print->context, print->notable, cache->buffer_item, cache->content_action.array[index], print->notable);
+
+ if (status == F_number || status == F_number_decimal) {
+ fl_print_format("%[' was given.%]%r", print->to, print->context, print->context, f_string_eol_s);
+ }
+ else if (status == F_number_overflow) {
+ fl_print_format("%[' is too large.%]%r", print->to, print->context, print->context, f_string_eol_s);
+ }
+ else {
+ fl_print_format("%[' is negative.%]%r", print->to, print->context, print->context, f_string_eol_s);
+ }
+ }
+
+ controller_print_error_rule_cache(print, &cache->action, F_true);
+
+ controller_unlock_print_flush(print->to, &main->thread);
+ }
+#endif // _di_controller_print_error_rule_item_action_positive_number_not_
+
+#ifndef _di_controller_print_error_rule_item_action_second_
+ f_status_t controller_print_error_rule_item_action_second(fl_print_t * const print, controller_cache_t * const cache) {
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;
fl_print_format(f_string_format_r_single_s.string, print->to, print->notable, controller_thaw_s, print->notable, print->context);
fl_print_format(f_string_format_sentence_end_quote_s.string, print->to, print->context, print->context, f_string_eol_s);
- controller_print_rule_error_cache(print, cache->action, F_true);
+ controller_print_error_rule_cache(print, &cache->action, F_true);
controller_unlock_print_flush(print->to, &main->thread);
return F_okay;
}
-#endif // _di_controller_print_rule_item_error_action_second_
+#endif // _di_controller_print_error_rule_item_action_second_
-#ifndef _di_controller_print_rule_item_error_action_unknown_
- f_status_t controller_print_rule_item_error_action_unknown(fl_print_t * const print, controller_cache_t * const cache, const f_string_static_t name, const f_string_static_t unknown) {
+#ifndef _di_controller_print_error_rule_item_action_unknown_
+ f_status_t controller_print_error_rule_item_action_unknown(fl_print_t * const print, controller_cache_t * const cache, 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_error_e) return F_output_not;
controller_lock_print(print->to, &main->thread);
fl_print_format("%r%[%QRule item action '%]", print->to, f_string_eol_s, print->context, print->prefix, print->context);
- fl_print_format(f_string_format_r_single_s.string, print->to, print->notable, name, print->notable);
+ fl_print_format(f_string_format_Q_single_s.string, print->to, print->notable, name, print->notable);
fl_print_format("%[' has an unknown value '%]", print->to, print->context, print->context);
fl_print_format(f_string_format_Q_range_single_s.string, print->to, print->notable, cache->buffer_item, unknown, print->notable);
fl_print_format(f_string_format_sentence_end_quote_s.string, print->to, print->context, print->context, f_string_eol_s);
- controller_print_rule_error_cache(print, cache->action, F_true);
+ controller_print_error_rule_cache(print, &cache->action, F_true);
controller_unlock_print_flush(print->to, &main->thread);
return F_okay;
}
-#endif // _di_controller_print_rule_item_error_action_unknown_
+#endif // _di_controller_print_error_rule_item_action_unknown_
-#ifndef _di_controller_print_rule_item_error_execute_
- f_status_t controller_print_rule_item_error_execute(fl_print_t * const print, controller_instance_t * const instance, const bool script_is, const f_string_static_t name, const f_status_t status) {
+#ifndef _di_controller_print_error_rule_item_execute_
+ f_status_t controller_print_error_rule_item_execute(fl_print_t * const print, controller_instance_t * const instance, const bool script_is, const f_string_static_t name, const f_status_t status) {
if (!print || !instance || !instance->main) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
return F_okay;
}
-#endif // _di_controller_print_rule_item_error_execute_
+#endif // _di_controller_print_error_rule_item_execute_
-#ifndef _di_controller_print_rule_item_error_need_want_wish_
- f_status_t controller_print_rule_item_error_need_want_wish(fl_print_t * const print, const f_string_static_t need_want_wish, const f_string_static_t value, const f_string_t why) {
+#ifndef _di_controller_print_error_rule_item_need_want_wish_
+ f_status_t controller_print_error_rule_item_need_want_wish(fl_print_t * const print, const f_string_static_t need_want_wish, const f_string_static_t value, const f_string_t why) {
if (print->verbosity == f_console_verbosity_quiet_e) return F_output_not;
return F_okay;
}
-#endif // _di_controller_print_rule_item_error_need_want_wish_
+#endif // _di_controller_print_error_rule_item_need_want_wish_
-#ifndef _di_controller_print_rule_item_error_rule_not_loaded_
- f_status_t controller_print_rule_item_error_rule_not_loaded(fl_print_t * const print, const f_string_static_t alias) {
+#ifndef _di_controller_print_error_rule_item_rule_not_loaded_
+ f_status_t controller_print_error_rule_item_rule_not_loaded(fl_print_t * const print, const f_string_static_t alias) {
if (print->verbosity == f_console_verbosity_quiet_e) return F_output_not;
return F_okay;
}
-#endif // _di_controller_print_rule_item_error_rule_not_loaded_
+#endif // _di_controller_print_error_rule_item_rule_not_loaded_
#ifdef __cplusplus
} // extern "C"
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*
- * Provides the print rule item functionality.
+ * Provides the print error entry item functionality.
*
* This is auto-included and should not need to be explicitly included.
*/
-#ifndef _controller_main_print_rule_item_h
-#define _controller_main_print_rule_item_h
+#ifndef _controller_main_print_error_entry_item_h
+#define _controller_main_print_error_entry_item_h
#ifdef __cplusplus
extern "C" {
#endif
/**
- * Print rule debug message about the rule item action being empty.
+ * Print additional error/warning information in addition to existing error.
*
- * @param print
- * The output structure to print to.
+ * This is explicitly intended to be used in addition to the error message.
*
- * Must not be NULL.
+ * @param print
+ * The error or warning print structure.
* @param cache
* A structure for containing and caching relevant data.
- *
- * Must not be NULL.
+ * @param item
+ * If TRUE, then this error is associated with an item.
+ * If FALSE, then this error is associated with a rule setting.
+ * @param status
+ * The status code representing the failure (without the error bit set).
*
* @return
* F_okay on success.
*
* F_output_not (with error bit) if setting is NULL.
*
- * @see fl_print_format()
- * @see fll_error_print()
- *
- * @see controller_lock_print()
- * @see controller_print_rule_error_cache()
- * @see controller_unlock_print_flush()
+ * @see controller_print_error_rule_cache()
*/
-#ifndef _di_controller_print_rule_item_debug_action_empty_
- extern f_status_t controller_print_rule_item_debug_action_empty(fl_print_t * const print, controller_cache_t * const cache);
-#endif // _di_controller_print_rule_item_debug_action_empty_
+#ifndef _di_controller_print_error_rule_item_
+ extern f_status_t controller_print_error_rule_item(fl_print_t * const print, const controller_cache_action_t cache, const bool item, const f_status_t status);
+#endif // _di_controller_print_error_rule_item_
/**
- * Print additional error/warning information in addition to existing error.
- *
- * This is explicitly intended to be used in addition to the error message.
+ * Print rule error message about the first rule item action parameter being invalid.
*
* @param print
- * The error or warning print structure.
+ * The output structure to print to.
+ *
+ * Must not be NULL.
* @param cache
* A structure for containing and caching relevant data.
- * @param item
- * If TRUE, then this error is associated with an item.
- * If FALSE, then this error is associated with a rule setting.
- * @param status
- * The status code representing the failure (without the error bit set).
+ *
+ * Must not be NULL.
*
* @return
* F_okay on success.
*
* F_output_not (with error bit) if setting is NULL.
*
- * @see controller_print_rule_error_cache()
+ * @see fl_print_format()
+ * @see fll_error_print()
+ *
+ * @see controller_lock_print()
+ * @see controller_print_error_rule_cache()
+ * @see controller_unlock_print_flush()
*/
-#ifndef _di_controller_print_rule_item_error_
- extern f_status_t controller_print_rule_item_error(fl_print_t * const print, const controller_cache_action_t cache, const bool item, const f_status_t status);
-#endif // _di_controller_print_rule_item_error_
+#ifndef _di_controller_print_error_rule_item_action_first_
+ extern f_status_t controller_print_error_rule_item_action_first(fl_print_t * const print, controller_cache_t * const cache);
+#endif // _di_controller_print_error_rule_item_action_first_
/**
- * Print rule error message about the first rule item action parameter being invalid.
+ * Print rule error message about the item value not being a positive whole number.
*
* @param print
* The output structure to print to.
* A structure for containing and caching relevant data.
*
* Must not be NULL.
+ * @param name
+ * The Object name.
+ * @param index
+ * The index position in cache.content_action representing the Content range for the cache.buffer_item buffer..
*
* @return
* F_okay on success.
* @see fll_error_print()
*
* @see controller_lock_print()
- * @see controller_print_rule_error_cache()
+ * @see controller_print_error_rule_cache()
* @see controller_unlock_print_flush()
*/
-#ifndef _di_controller_print_rule_item_error_action_first_
- extern f_status_t controller_print_rule_item_error_action_first(fl_print_t * const print, controller_cache_t * const cache);
-#endif // _di_controller_print_rule_item_error_action_first_
+#ifndef _di_controller_print_error_rule_item_action_positive_number_not_
+ extern f_status_t controller_print_error_rule_item_action_positive_number_not(fl_print_t * const print, controller_cache_t * const cache, const f_string_static_t name, const f_number_unsigned_t index);
+#endif // _di_controller_print_error_rule_item_action_positive_number_not_
/**
* Print rule error message about the second rule item action parameter being invalid.
* @see fll_error_print()
*
* @see controller_lock_print()
- * @see controller_print_rule_error_cache()
+ * @see controller_print_error_rule_cache()
* @see controller_unlock_print_flush()
*/
-#ifndef _di_controller_print_rule_item_error_action_second_
- extern f_status_t controller_print_rule_item_error_action_second(fl_print_t * const print, controller_cache_t * const cache);
-#endif // _di_controller_print_rule_item_error_action_second_
+#ifndef _di_controller_print_error_rule_item_action_second_
+ extern f_status_t controller_print_error_rule_item_action_second(fl_print_t * const print, controller_cache_t * const cache);
+#endif // _di_controller_print_error_rule_item_action_second_
/**
* Print rule error message about the rule item action being unknown.
* @see fll_error_print()
*
* @see controller_lock_print()
- * @see controller_print_rule_error_cache()
+ * @see controller_print_error_rule_cache()
* @see controller_unlock_print_flush()
*/
-#ifndef _di_controller_print_rule_item_error_action_unknown_
- extern f_status_t controller_print_rule_item_error_action_unknown(fl_print_t * const print, controller_cache_t * const cache, const f_string_static_t name, const f_string_static_t unknown);
-#endif // _di_controller_print_rule_item_error_action_unknown_
+#ifndef _di_controller_print_error_rule_item_action_unknown_
+ extern f_status_t controller_print_error_rule_item_action_unknown(fl_print_t * const print, controller_cache_t * const cache, const f_string_static_t name, const f_string_static_t unknown);
+#endif // _di_controller_print_error_rule_item_action_unknown_
/**
* Print an error or warning message related to the failed execution of some program or script.
*
* F_output_not (with error bit) if setting is NULL.
*/
-#ifndef _di_controller_print_rule_item_error_execute_
- extern f_status_t controller_print_rule_item_error_execute(fl_print_t * const print, controller_instance_t * const instance, const bool script_is, const f_string_static_t name, const f_status_t status);
-#endif // _di_controller_print_rule_item_error_execute_
+#ifndef _di_controller_print_error_rule_item_execute_
+ extern f_status_t controller_print_error_rule_item_execute(fl_print_t * const print, controller_instance_t * const instance, const bool script_is, const f_string_static_t name, const f_status_t status);
+#endif // _di_controller_print_error_rule_item_execute_
/**
* Print an error or warning message related to need/want/wish settings of some rule.
*
* F_output_not (with error bit) if setting is NULL.
*/
-#ifndef _di_controller_print_rule_item_error_need_want_wish_
- extern f_status_t controller_print_rule_item_error_need_want_wish(fl_print_t * const print, const f_string_static_t need_want_wish, const f_string_static_t value, const f_string_t why);
-#endif // _di_controller_print_rule_item_error_need_want_wish_
+#ifndef _di_controller_print_error_rule_item_need_want_wish_
+ extern f_status_t controller_print_error_rule_item_need_want_wish(fl_print_t * const print, const f_string_static_t need_want_wish, const f_string_static_t value, const f_string_t why);
+#endif // _di_controller_print_error_rule_item_need_want_wish_
/**
* Print an error or warning message about some rule not being loaded.
*
* F_output_not (with error bit) if setting is NULL.
*/
-#ifndef _di_controller_print_rule_item_error_rule_not_loaded_
- extern f_status_t controller_print_rule_item_error_rule_not_loaded(fl_print_t * const print, const f_string_static_t alias);
-#endif // _di_controller_print_rule_item_error_rule_not_loaded_
+#ifndef _di_controller_print_error_rule_item_rule_not_loaded_
+ extern f_status_t controller_print_error_rule_item_rule_not_loaded(fl_print_t * const print, const f_string_static_t alias);
+#endif // _di_controller_print_error_rule_item_rule_not_loaded_
#ifdef __cplusplus
} // extern "C"
#endif
-#endif // _controller_main_print_rule_item_h
+#endif // _controller_main_print_error_entry_item_h
-#include "../../controller.h"
+#include "../../../controller.h"
#ifdef __cplusplus
extern "C" {
#endif
-#ifndef _di_controller_print_rule_setting_read_error_
- f_status_t controller_print_rule_setting_read_error(fl_print_t * const print, controller_thread_t * const thread, controller_cache_t * const cache, const f_string_t message, const f_number_unsigned_t index, const f_number_unsigned_t line_item) {
+#ifndef _di_controller_print_error_rule_setting_
+ f_status_t controller_print_error_rule_setting(fl_print_t * const print, controller_thread_t * const thread, controller_cache_t * const cache, const f_string_t message, const f_number_unsigned_t index, const f_number_unsigned_t line_item) {
if (!print->custom) return F_status_set_error(F_output_not);
if (print->verbosity == f_console_verbosity_quiet_e) return F_output_not;
fl_print_format("%r%[%QRule setting %S.%]%r", print->to, f_string_eol_s, print->context, print->prefix, message, print->context, f_string_eol_s);
- controller_print_rule_error_cache(print, cache->action, F_false);
+ controller_print_error_rule_cache(print, &cache->action, F_false);
controller_unlock_print_flush(print->to, thread);
return F_okay;
}
-#endif // _di_controller_print_rule_setting_read_error_
+#endif // _di_controller_print_error_rule_setting_
-#ifndef _di_controller_print_rule_setting_read_error_with_range_
- f_status_t controller_print_rule_setting_read_error_with_range(fl_print_t * const print, controller_thread_t * const thread, controller_cache_t * const cache, const f_string_t before, const f_range_t range, const f_string_t after, const f_number_unsigned_t index, const f_number_unsigned_t line_item) {
+#ifndef _di_controller_print_error_rule_setting_with_range_
+ f_status_t controller_print_error_rule_setting_with_range(fl_print_t * const print, controller_thread_t * const thread, controller_cache_t * const cache, const f_string_t before, const f_range_t range, const f_string_t after, const f_number_unsigned_t index, const f_number_unsigned_t line_item) {
if (!print->custom) return F_status_set_error(F_output_not);
if (print->verbosity == f_console_verbosity_quiet_e) return F_output_not;
fl_print_format(f_string_format_Q_range_single_s.string, print->to, print->notable, cache->buffer_item, range, print->notable);
fl_print_format("%['%S.%]%r", print->to, print->context, after, print->context, f_string_eol_s);
- controller_print_rule_error_cache(print, cache->action, F_false);
+ controller_print_error_rule_cache(print, &cache->action, F_false);
controller_unlock_print_flush(print->to, thread);
return F_okay;
}
-#endif // _di_controller_print_rule_setting_read_error_with_range_
+#endif // _di_controller_print_error_rule_setting_with_range_
-#ifndef _di_controller_print_rule_setting_read_mapping_
- f_status_t controller_print_rule_setting_read_mapping(controller_t * const main, const f_string_static_t name, const f_string_map_t map) {
+#ifndef _di_controller_print_error_rule_setting_mapping_
+ f_status_t controller_print_error_rule_setting_mapping(controller_t * const main, const f_string_static_t name, const f_string_map_t map) {
if (main->program.error.verbosity != f_console_verbosity_debug_e) {
if (!(main->program.error.verbosity == f_console_verbosity_verbose_e && (main->setting.flag & controller_main_flag_simulate_e))) {
return F_okay;
}
-#endif // _di_controller_print_rule_setting_read_mapping_
+#endif // _di_controller_print_error_rule_setting_mapping_
-#ifndef _di_controller_print_rule_setting_read_value_
- f_status_t controller_print_rule_setting_read_value(controller_t * const main, const f_string_static_t name, const f_string_static_t name_sub, const f_string_static_t value, const f_string_t suffix) {
+#ifndef _di_controller_print_error_rule_setting_value_
+ f_status_t controller_print_error_rule_setting_value(controller_t * const main, const f_string_static_t name, const f_string_static_t name_sub, const f_string_static_t value, const f_string_t suffix) {
if (main->program.error.verbosity != f_console_verbosity_debug_e) {
if (!(main->program.error.verbosity == f_console_verbosity_verbose_e && (main->setting.flag & controller_main_flag_simulate_e))) {
return F_okay;
}
-#endif // _di_controller_print_rule_setting_read_value_
+#endif // _di_controller_print_error_rule_setting_value_
-#ifndef _di_controller_print_rule_setting_read_values_
- f_status_t controller_print_rule_setting_read_values(controller_t * const main, controller_cache_t * const cache, const f_string_static_t name, const f_number_unsigned_t index) {
+#ifndef _di_controller_print_error_rule_setting_values_
+ f_status_t controller_print_error_rule_setting_values(controller_t * const main, controller_cache_t * const cache, const f_string_static_t name, const f_number_unsigned_t index) {
if (main->program.error.verbosity != f_console_verbosity_debug_e) {
if (!(main->program.error.verbosity == f_console_verbosity_verbose_e && (main->setting.flag & controller_main_flag_simulate_e))) {
return F_okay;
}
-#endif // _di_controller_print_rule_setting_read_value_
+#endif // _di_controller_print_error_rule_setting_value_
#ifdef __cplusplus
} // extern "C"
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*
- * Provides the print rule setting functionality.
+ * Provides the print error entry setting functionality.
*
* This is auto-included and should not need to be explicitly included.
*/
-#ifndef _controller_main_print_rule_setting_h
-#define _controller_main_print_rule_setting_h
+#ifndef _controller_main_print_error_entry_setting_h
+#define _controller_main_print_error_entry_setting_h
#ifdef __cplusplus
extern "C" {
*
* @see controller_rule_setting_read()
*/
-#ifndef _di_controller_print_rule_setting_read_error_
- extern f_status_t controller_print_rule_setting_read_error(fl_print_t * const print, controller_thread_t * const thread, controller_cache_t * const cache, const f_string_t message, const f_number_unsigned_t index, const f_number_unsigned_t line_item);
-#endif // _di_controller_print_rule_setting_read_error_
+#ifndef _di_controller_print_error_rule_setting_
+ extern f_status_t controller_print_error_rule_setting(fl_print_t * const print, controller_thread_t * const thread, controller_cache_t * const cache, const f_string_t message, const f_number_unsigned_t index, const f_number_unsigned_t line_item);
+#endif // _di_controller_print_error_rule_setting_
/**
* Print a message about a rule setting problem, with additional messages about the value.
*
* @see controller_rule_setting_read()
*/
-#ifndef _di_controller_print_rule_setting_read_error_with_range_
- extern f_status_t controller_print_rule_setting_read_error_with_range(fl_print_t * const print, controller_thread_t * const thread, controller_cache_t * const cache, const f_string_t before, const f_range_t range, const f_string_t after, const f_number_unsigned_t index, const f_number_unsigned_t line_item);
-#endif // _di_controller_print_rule_setting_read_error_with_range_
+#ifndef _di_controller_print_error_rule_setting_with_range_
+ extern f_status_t controller_print_error_rule_setting_with_range(fl_print_t * const print, controller_thread_t * const thread, controller_cache_t * const cache, const f_string_t before, const f_range_t range, const f_string_t after, const f_number_unsigned_t index, const f_number_unsigned_t line_item);
+#endif // _di_controller_print_error_rule_setting_with_range_
/**
* Print message regarding the mapping of a setting when in simulation or verbose mode.
*
* F_output_not (with error bit) if setting is NULL.
*/
-#ifndef _di_controller_print_rule_setting_read_mapping_
- extern f_status_t controller_print_rule_setting_read_mapping(controller_t * const main, const f_string_static_t name, const f_string_map_t map);
-#endif // _di_controller_print_rule_setting_read_mapping_
+#ifndef _di_controller_print_error_rule_setting_mapping_
+ extern f_status_t controller_print_error_rule_setting_mapping(controller_t * const main, const f_string_static_t name, const f_string_map_t map);
+#endif // _di_controller_print_error_rule_setting_mapping_
/**
* Print message regarding the population of a setting when in simulation or verbose mode.
*
* F_output_not (with error bit) if setting is NULL.
*/
-#ifndef _di_controller_print_rule_setting_read_value_
- extern f_status_t controller_print_rule_setting_read_value(controller_t * const main, const f_string_static_t name, const f_string_static_t name_sub, const f_string_static_t value, const f_string_t suffix);
-#endif // _di_controller_print_rule_setting_read_value_
+#ifndef _di_controller_print_error_rule_setting_value_
+ extern f_status_t controller_print_error_rule_setting_value(controller_t * const main, const f_string_static_t name, const f_string_static_t name_sub, const f_string_static_t value, const f_string_t suffix);
+#endif // _di_controller_print_error_rule_setting_value_
/**
* Print message regarding the population of a setting when in simulation or verbose mode.
*
* F_output_not (with error bit) if setting is NULL.
*/
-#ifndef _di_controller_print_rule_setting_read_values_
- extern f_status_t controller_print_rule_setting_read_values(controller_t * const main, controller_cache_t * const cache, const f_string_static_t name, const f_number_unsigned_t index);
-#endif // _di_controller_print_rule_setting_read_values_
+#ifndef _di_controller_print_error_rule_setting_values_
+ extern f_status_t controller_print_error_rule_setting_values(controller_t * const main, controller_cache_t * const cache, const f_string_static_t name, const f_number_unsigned_t index);
+#endif // _di_controller_print_error_rule_setting_values_
#ifdef __cplusplus
} // extern "C"
#endif
-#endif // _controller_main_print_rule_setting_h
+#endif // _controller_main_print_error_entry_setting_h
extern "C" {
#endif
-#ifndef _di_controller_lock_print_error_critical_
- void controller_lock_print_error_critical(fl_print_t * const print, const f_status_t status, const uint8_t is_read) {
-
- // A signal is not an error.
- if (!print || !print->custom || status == F_interrupt) return;
-
- controller_t * const main = (controller_t *) print->custom;
-
- if (print->verbosity != f_console_verbosity_quiet_e) {
- controller_lock_print(print->to, &main->thread);
-
- fl_print_format("%r%[%QThe pid file '%]", print->to, f_string_eol_s, print->context, print->prefix, print->context);
- fl_print_format("%['Critical failure while attempting to establish '%]", print->to, print->context, print->context);
- fl_print_format("%[%r lock%]", print->to, print->notable, is_read ? f_file_operation_read_s : f_file_operation_write_s, print->notable);
-
- if (status != F_failure) {
- fl_print_format(" %['due to%] ", print->to, print->context, print->context);
-
- if (status == F_parameter) {
- fl_print_format("%[Invalid Parameter%]", print->to, print->notable, print->notable);
- }
- else if (status == F_deadlock) {
- fl_print_format("%[Deadlock%]", print->to, print->notable, print->notable);
- }
- else if (status == F_resource_not) {
- fl_print_format("%[Too Many Locks%]", print->to, print->notable, print->notable);
- }
- else {
- fl_print_format("%[Unknown Error%]", print->to, print->notable, print->notable);
- }
- }
-
- fl_print_format(f_string_format_sentence_end_quote_s.string, print->to, print->context, print->context, f_string_eol_s);
-
- controller_unlock_print_flush(print->to, &main->thread);
- }
- }
-#endif // _di_controller_lock_print_error_critical_
-
#ifndef _di_controller_lock_print_
void controller_lock_print(const f_file_t to, controller_thread_t * const thread) {
#endif
/**
- * Print a r/w lock related error message, locking the print mutex during the print.
- *
- * This will ignore F_interrupt and not print any messages, if passed.
- *
- * @param print
- * The output structure to print to.
- *
- * Must not be NULL.
- *
- * This does not alter print.custom.setting.state.status.
- * @param status
- * The status code to process.
- * Make sure this has F_status_set_fine() called if the status code has any error or warning bits.
- * @param is_read
- * If TRUE, then this is for a read lock.
- * If FALSE, then this is for a write lock.
- */
-#ifndef _di_controller_lock_print_error_critical_
- extern void controller_lock_print_error_critical(fl_print_t * const print, const f_status_t status, const uint8_t is_read);
-#endif // _di_controller_lock_print_error_critical_
-
-/**
* Lock the mutex and the stream.
*
* This is implemented as a compliment to controller_unlock_print_flush() for consistency reasons.
extern "C" {
#endif
-#ifndef _di_controller_print_entry_message_state_
- f_status_t controller_print_entry_message_state(fl_print_t * const print, const uint8_t is_entry, const f_string_static_t name) {
+#ifndef _di_controller_print_message_entry_state_
+ f_status_t controller_print_message_entry_state(fl_print_t * const print, const uint8_t is_entry, const f_string_static_t name) {
if (!print || !print->custom) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_normal_e) return F_output_not;
return F_okay;
}
-#endif // _di_controller_print_entry_message_state_
+#endif // _di_controller_print_message_entry_state_
#ifdef __cplusplus
} // extern "C"
* F_output_not (with error bit) if setting is NULL.
*
* @see fll_error_file_print()
- * @see controller_print_entry_error_cache()
+ * @see controller_print_error_entry_cache()
*/
-#ifndef _di_controller_print_entry_message_state_
- extern f_status_t controller_print_entry_message_state(fl_print_t * const print, const uint8_t is_entry, const f_string_static_t name);
-#endif // _di_controller_print_entry_message_state_
+#ifndef _di_controller_print_message_entry_state_
+ extern f_status_t controller_print_message_entry_state(fl_print_t * const print, const uint8_t is_entry, const f_string_static_t name);
+#endif // _di_controller_print_message_entry_state_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_controller_print_entry_message_action_parameters_
- f_status_t controller_print_entry_message_action_parameters(fl_print_t * const print, controller_entry_action_t * const action) {
+#ifndef _di_controller_print_message_entry_action_parameters_
+ f_status_t controller_print_message_entry_action_parameters(fl_print_t * const print, controller_entry_action_t * const action) {
if (!print || !action) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
return F_okay;
}
-#endif // _di_controller_print_entry_message_action_parameters_
+#endif // _di_controller_print_message_entry_action_parameters_
-#ifndef _di_controller_print_entry_message_action_state_
- f_status_t controller_print_entry_message_action_state(fl_print_t * const print, controller_cache_t * const cache, controller_entry_action_t * const action, const uint8_t is_entry) {
+#ifndef _di_controller_print_message_entry_action_state_
+ f_status_t controller_print_message_entry_action_state(fl_print_t * const print, controller_cache_t * const cache, controller_entry_action_t * const action, const uint8_t is_entry) {
if (!print || !print->custom || !cache || !action) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
if (action->parameters.used) {
fl_print_format(" %[", print->to, context->notable);
- controller_print_entry_message_action_parameters(print, action);
+ controller_print_message_entry_action_parameters(print, action);
fl_print_format("%]", print->to, context->notable);
}
fl_print_format(" %[state, skipping.%]%r", print->to, print->context, print->context, f_string_eol_s);
}
- controller_print_entry_error_cache(print, &cache->action, is_entry);
+ 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_entry_message_action_state_
+#endif // _di_controller_print_message_entry_action_state_
-#ifndef _di_controller_print_entry_message_action_state_failed_
- f_status_t controller_print_entry_message_action_state_failed(fl_print_t * const print, controller_cache_t * const cache, controller_entry_action_t * const action, const uint8_t is_entry) {
+#ifndef _di_controller_print_message_entry_action_state_failed_
+ f_status_t controller_print_message_entry_action_state_failed(fl_print_t * const print, controller_cache_t * const cache, controller_entry_action_t * const action, const uint8_t is_entry) {
if (!print || !print->custom || !cache || !action) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
if (action->parameters.used) {
fl_print_format(" %[", print->to, context->notable);
- controller_print_entry_message_action_parameters(print, action);
+ controller_print_message_entry_action_parameters(print, action);
fl_print_format("%]", print->to, context->notable);
}
return F_okay;
}
-#endif // _di_controller_print_entry_message_action_state_failed_
+#endif // _di_controller_print_message_entry_action_state_failed_
-#ifndef _di_controller_print_entry_message_action_ready_
- f_status_t controller_print_entry_message_action_ready(fl_print_t * const print, const uint8_t is_entry, const f_string_static_t name) {
+#ifndef _di_controller_print_message_entry_action_ready_
+ f_status_t controller_print_message_entry_action_ready(fl_print_t * const print, const uint8_t is_entry, const f_string_static_t name) {
if (!print || !print->custom) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_normal_e) return F_output_not;
controller_lock_print(print->to, &main->thread);
fl_print_format("%rIgnoring %r item action '", print->to, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s);
- fl_print_format(f_string_format_r_single_s.string, print->to, print->set.title, name, print->set.title);
+ fl_print_format(f_string_format_Q_single_s.string, print->to, print->set.title, name, print->set.title);
fl_print_format("', state already is ready.%r", print->to, f_string_eol_s);
controller_unlock_print_flush(print->to, &main->thread);
return F_okay;
}
-#endif // _di_controller_print_entry_message_action_ready_
+#endif // _di_controller_print_message_entry_action_ready_
-#ifndef _di_controller_print_entry_message_action_wait_
- f_status_t controller_print_entry_message_action_wait(fl_print_t * const print, const uint8_t is_entry, const f_string_static_t name) {
+#ifndef _di_controller_print_message_entry_action_wait_
+ f_status_t controller_print_message_entry_action_wait(fl_print_t * const print, const uint8_t is_entry, const f_string_static_t name) {
if (!print || !print->custom) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_normal_e) return F_output_not;
controller_lock_print(print->to, &main->thread);
fl_print_format("%rWaiting before processing %r item action '", print->to, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s);
- fl_print_format(f_string_format_r_single_s.string, print->to, print->set.title, name, print->set.title);
+ fl_print_format(f_string_format_Q_single_s.string, print->to, print->set.title, name, print->set.title);
fl_print_format("'.%r", print->to, f_string_eol_s);
controller_unlock_print_flush(print->to, &main->thread);
return F_okay;
}
-#endif // _di_controller_print_entry_message_action_wait_
+#endif // _di_controller_print_message_entry_action_wait_
#ifdef __cplusplus
} // extern "C"
*
* F_output_not (with error bit) if setting is NULL.
*/
-#ifndef _di_controller_print_entry_message_action_parameters_
- extern f_status_t controller_print_entry_message_action_parameters(fl_print_t * const print, controller_entry_action_t * const action);
-#endif // _di_controller_print_entry_message_action_parameters_
+#ifndef _di_controller_print_message_entry_action_parameters_
+ extern f_status_t controller_print_message_entry_action_parameters(fl_print_t * const print, controller_entry_action_t * const action);
+#endif // _di_controller_print_message_entry_action_parameters_
/**
* Print message about entry action state.
*
* F_output_not (with error bit) if setting is NULL.
*/
-#ifndef _di_controller_print_entry_message_action_state_
- extern f_status_t controller_print_entry_message_action_state(fl_print_t * const print, controller_cache_t * const cache, controller_entry_action_t * const action, const uint8_t is_entry);
-#endif // _di_controller_print_entry_message_action_state_
+#ifndef _di_controller_print_message_entry_action_state_
+ extern f_status_t controller_print_message_entry_action_state(fl_print_t * const print, controller_cache_t * const cache, controller_entry_action_t * const action, const uint8_t is_entry);
+#endif // _di_controller_print_message_entry_action_state_
/**
* Print message about entry action state having failed.
*
* F_output_not (with error bit) if setting is NULL.
*/
-#ifndef _di_controller_print_entry_message_action_state_failed_
- extern f_status_t controller_print_entry_message_action_state_failed(fl_print_t * const print, controller_cache_t * const cache, controller_entry_action_t * const action, const uint8_t is_entry);
-#endif // _di_controller_print_entry_message_action_state_failed_
+#ifndef _di_controller_print_message_entry_action_state_failed_
+ extern f_status_t controller_print_message_entry_action_state_failed(fl_print_t * const print, controller_cache_t * const cache, controller_entry_action_t * const action, const uint8_t is_entry);
+#endif // _di_controller_print_message_entry_action_state_failed_
/**
* Print message about the specified entry item action being in the ready state.
* F_output_not (with error bit) if setting is NULL.
*
* @see fll_error_file_print()
- * @see controller_print_entry_error_cache()
+ * @see controller_print_error_entry_cache()
*/
-#ifndef _di_controller_print_entry_message_action_ready_
- extern f_status_t controller_print_entry_message_action_ready(fl_print_t * const print, const uint8_t is_entry, const f_string_static_t name);
-#endif // _di_controller_print_entry_message_action_ready_
+#ifndef _di_controller_print_message_entry_action_ready_
+ extern f_status_t controller_print_message_entry_action_ready(fl_print_t * const print, const uint8_t is_entry, const f_string_static_t name);
+#endif // _di_controller_print_message_entry_action_ready_
/**
* Print message about waiting for the specified entry item action.
* F_output_not (with error bit) if setting is NULL.
*
* @see fll_error_file_print()
- * @see controller_print_entry_error_cache()
+ * @see controller_print_error_entry_cache()
*/
-#ifndef _di_controller_print_entry_message_action_wait_
- extern f_status_t controller_print_entry_message_action_wait(fl_print_t * const print, const uint8_t is_entry, const f_string_static_t name);
-#endif // _di_controller_print_entry_message_action_wait_
+#ifndef _di_controller_print_message_entry_action_wait_
+ extern f_status_t controller_print_message_entry_action_wait(fl_print_t * const print, const uint8_t is_entry, const f_string_static_t name);
+#endif // _di_controller_print_message_entry_action_wait_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_controller_print_entry_message_item_executing_
- f_status_t controller_print_entry_message_item_executing(fl_print_t * const print, const uint8_t is_entry, f_string_dynamics_t * const parameters) {
+#ifndef _di_controller_print_message_entry_item_executing_
+ f_status_t controller_print_message_entry_item_executing(fl_print_t * const print, const uint8_t is_entry, f_string_dynamics_t * const parameters) {
if (!print || !print->custom || !parameters) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_normal_e) return F_output_not;
return F_okay;
}
-#endif // _di_controller_print_entry_message_item_executing_
+#endif // _di_controller_print_message_entry_item_executing_
-#ifndef _di_controller_print_entry_message_item_process_
- f_status_t controller_print_entry_message_item_process(fl_print_t * const print, const uint8_t is_entry, const f_string_static_t prepend, const f_string_static_t name) {
+#ifndef _di_controller_print_message_entry_item_process_
+ f_status_t controller_print_message_entry_item_process(fl_print_t * const print, const uint8_t is_entry, const f_string_static_t prepend, const f_string_static_t name) {
if (!print || !print->custom) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_normal_e) return F_output_not;
return F_okay;
}
-#endif // _di_controller_print_entry_message_item_process_
+#endif // _di_controller_print_message_entry_item_process_
-#ifndef _di_controller_print_entry_message_item_done_
- f_status_t controller_print_entry_message_item_done(fl_print_t * const print, const uint8_t is_entry, const uint8_t failsafe, const f_string_static_t name) {
+#ifndef _di_controller_print_message_entry_item_done_
+ f_status_t controller_print_message_entry_item_done(fl_print_t * const print, const uint8_t is_entry, const uint8_t failsafe, const f_string_static_t name) {
if (!print || !print->custom) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
controller_lock_print(print->to, &main->thread);
fl_print_format("%rDone processing %r item '", print->to, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s);
- fl_print_format(f_string_format_r_single_s.string, print->to, print->set.title, name, print->set.title);
+ fl_print_format(f_string_format_Q_single_s.string, print->to, print->set.title, name, print->set.title);
fl_print_format("'.%r%r", print->to, f_string_eol_s, failsafe ? f_string_eol_s : f_string_empty_s);
controller_unlock_print_flush(print->to, &main->thread);
return F_okay;
}
-#endif // _di_controller_print_entry_message_item_done_
+#endif // _di_controller_print_message_entry_item_done_
-#ifndef _di_controller_print_entry_message_item_rule_
- f_status_t controller_print_entry_message_item_rule(fl_print_t * const print, controller_entry_t * const entry, controller_entry_action_t * const action, const uint8_t is_entry, const f_string_static_t alias_rule) {
+#ifndef _di_controller_print_message_entry_item_rule_
+ f_status_t controller_print_message_entry_item_rule(fl_print_t * const print, controller_entry_t * const entry, controller_entry_action_t * const action, const uint8_t is_entry, const f_string_static_t alias_rule) {
if (!print || !print->custom || !entry || !action) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_normal_e) return F_output_not;
return F_okay;
}
-#endif // _di_controller_print_entry_message_item_rule_
+#endif // _di_controller_print_message_entry_item_rule_
#ifdef __cplusplus
} // extern "C"
* F_output_not (with error bit) if setting is NULL.
*
* @see fll_error_file_print()
- * @see controller_print_entry_error_cache()
+ * @see controller_print_error_entry_cache()
*/
-#ifndef _di_controller_print_entry_message_item_executing_
- extern f_status_t controller_print_entry_message_item_executing(fl_print_t * const print, const uint8_t is_entry, f_string_dynamics_t * const parameters);
-#endif // _di_controller_print_entry_message_item_executing_
+#ifndef _di_controller_print_message_entry_item_executing_
+ extern f_status_t controller_print_message_entry_item_executing(fl_print_t * const print, const uint8_t is_entry, f_string_dynamics_t * const parameters);
+#endif // _di_controller_print_message_entry_item_executing_
/**
* Print message about processing an item.
* F_output_not (with error bit) if setting is NULL.
*
* @see fll_error_file_print()
- * @see controller_print_entry_error_cache()
+ * @see controller_print_error_entry_cache()
*/
-#ifndef _di_controller_print_entry_message_item_process_
- extern f_status_t controller_print_entry_message_item_process(fl_print_t * const print, const uint8_t is_entry, const f_string_static_t prepend, const f_string_static_t name);
-#endif // _di_controller_print_entry_message_item_process_
+#ifndef _di_controller_print_message_entry_item_process_
+ extern f_status_t controller_print_message_entry_item_process(fl_print_t * const print, const uint8_t is_entry, const f_string_static_t prepend, const f_string_static_t name);
+#endif // _di_controller_print_message_entry_item_process_
/**
* Print message about processing an item.
* F_output_not (with error bit) if setting is NULL.
*
* @see fll_error_file_print()
- * @see controller_print_entry_error_cache()
+ * @see controller_print_error_entry_cache()
*/
-#ifndef _di_controller_print_entry_message_item_done_
- extern f_status_t controller_print_entry_message_item_done(fl_print_t * const print, const uint8_t is_entry, const uint8_t failsafe, const f_string_static_t name);
-#endif // _di_controller_print_entry_message_item_done_
+#ifndef _di_controller_print_message_entry_item_done_
+ extern f_status_t controller_print_message_entry_item_done(fl_print_t * const print, const uint8_t is_entry, const uint8_t failsafe, const f_string_static_t name);
+#endif // _di_controller_print_message_entry_item_done_
/**
* Print warning message about multiple actions for a specified item.
* F_output_not (with error bit) if setting is NULL.
*
* @see fll_error_file_print()
- * @see controller_print_entry_error_cache()
+ * @see controller_print_error_entry_cache()
*/
-#ifndef _di_controller_print_entry_message_item_rule_
- extern f_status_t controller_print_entry_message_item_rule(fl_print_t * const print, controller_entry_t * const entry, controller_entry_action_t * const action, const uint8_t is_entry, const f_string_static_t alias_rule);
-#endif // _di_controller_print_entry_message_item_rule_
+#ifndef _di_controller_print_message_entry_item_rule_
+ extern f_status_t controller_print_message_entry_item_rule(fl_print_t * const print, controller_entry_t * const entry, controller_entry_action_t * const action, const uint8_t is_entry, const f_string_static_t alias_rule);
+#endif // _di_controller_print_message_entry_item_rule_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_controller_print_entry_output_setting_simulate_value_
- f_status_t controller_print_entry_output_setting_simulate_value(fl_print_t * const print, const uint8_t is_entry, const f_string_static_t name, const f_string_static_t name_sub, const f_string_static_t value, const f_string_static_t suffix) {
+#ifndef _di_controller_print_output_entry_setting_simulate_value_
+ f_status_t controller_print_output_entry_setting_simulate_value(fl_print_t * const print, const uint8_t is_entry, const f_string_static_t name, const f_string_static_t name_sub, const f_string_static_t value, const f_string_static_t suffix) {
if (!print || !print->custom) return F_status_set_error(F_output_not);
return F_okay;
}
-#endif // _di_controller_print_entry_output_setting_simulate_value_
+#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) {
*
* F_output_not (with error bit) if setting is NULL.
*/
-#ifndef _di_controller_print_entry_output_setting_simulate_value_
- extern f_status_t controller_print_entry_output_setting_simulate_value(fl_print_t * const print, const uint8_t is_entry, const f_string_static_t name, const f_string_static_t name_sub, const f_string_static_t value, const f_string_static_t suffix);
-#endif // _di_controller_print_entry_output_setting_simulate_value_
+#ifndef _di_controller_print_output_entry_setting_simulate_value_
+ extern f_status_t controller_print_output_entry_setting_simulate_value(fl_print_t * const print, const uint8_t is_entry, const f_string_static_t name, const f_string_static_t name_sub, const f_string_static_t value, const f_string_static_t suffix);
+#endif // _di_controller_print_output_entry_setting_simulate_value_
/**
* Print a simulated execution of the given entry.
--- /dev/null
+#include "../../../controller.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_controller_print_entry_output_execute_simulate_
+ f_status_t controller_print_entry_output_execute_simulate(fl_print_t * const print, controller_instance_t * const instance, const f_string_static_t program, const f_string_statics_t arguments) {
+
+ if (!print || !print->custom) return F_status_set_error(F_output_not);
+ if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
+
+ controller_t * const main = (controller_t *) print->custom;
+
+ controller_lock_print(print->to, &main->thread);
+
+ fl_print_format("%rSimulating execution of '%[", print->to, f_string_eol_s, print->set->title);
+
+ if (program.used) {
+ f_print_dynamic_safely(program, print->to);
+ }
+ else {
+ f_print_dynamic_safely(arguments.array[0], print->to);
+ }
+
+ fl_print_format("%]' with the arguments: '%[", print->to, print->set->title, print->set->important);
+
+ for (f_number_unsigned_t i = program.used ? 0 : 1; i < arguments.used; ++i) {
+
+ if (program.used && i || !program.used && i > 1) {
+ f_print_dynamic_raw(f_string_space_s, print->to);
+ }
+
+ f_print_dynamic_safely(arguments.array[i], print->to);
+ } // for
+
+ fl_print_format("%]' from '", print->to, print->set->important);
+ fl_print_format("%[%Q%]'.%r", print->to, print->set->notable, instance->rule.name, print->set->notable, f_string_eol_s);
+
+ controller_unlock_print_flush(print->to, &main->thread);
+
+ return F_okay;
+ }
+#endif // _di_controller_print_entry_output_execute_simulate_
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: Controller
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides the print output rule execute functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _controller_main_print_output_rule_execute_h
+#define _controller_main_print_output_rule_execute_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Print the execute simulation.
+ *
+ * @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 instance
+ * The instance performing the simulation.
+ *
+ * Must not be NULL.
+ * @param program
+ * (optional) The name of the program whose execution is being simulated.
+ * When disabled, arguments.array[0] will be used as the program.
+ *
+ * Set program.used to 0 to disable.
+ * @param arguments
+ * The array of arguments passed to the simulated program.
+ *
+ * @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_entry_output_execute_simulate_
+ extern f_status_t controller_print_entry_output_execute_simulate(fl_print_t * const print, controller_instance_t * const instance, const f_string_static_t program, const f_string_statics_t arguments);
+#endif // _di_controller_print_entry_output_execute_simulate_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _controller_main_print_output_rule_execute_h
+++ /dev/null
-#include "../controller.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _di_controller_print_perform_debug_control_socket_failure_
- f_status_t controller_print_perform_debug_control_socket_failure(fl_print_t * const print, const f_status_t status, const f_string_t message) {
-
- if (!print || !print->custom) 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%[%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("%[' %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);
-
- controller_unlock_print_flush(print->to, &main->thread);
- }
-#endif // _di_controller_print_perform_debug_control_socket_failure_
-
-#ifndef _di_controller_print_perform_debug_control_socket_success_
- f_status_t controller_print_perform_debug_control_socket_success(fl_print_t * const print, const f_status_t status, const f_string_t message) {
-
- if (!print || !print->custom) 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("%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("' created.%r", print->to, f_string_eol_s);
-
- controller_unlock_print_flush(print->to, &main->thread);
- }
-#endif // _di_controller_print_perform_debug_control_socket_success_
-
-#ifndef _di_controller_print_perform_debug_control_socket_missing_read_only_
- f_status_t controller_print_perform_debug_control_socket_missing_read_only(fl_print_t * const print) {
-
- if (!print || !print->custom) 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%[%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("' .%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);
-
- controller_unlock_print_flush(print->to, &main->thread);
-
- return F_okay;
- }
-#endif // _di_controller_print_perform_debug_control_socket_missing_read_only_
-
-#ifndef _di_controller_print_perform_debug_pid_file_control_socket_
- f_status_t controller_print_perform_debug_pid_file_control_socket(fl_print_t * const print) {
-
- if (!print || !print->custom) 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("%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);
-
- if (main->setting.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("'.%r", print->to, f_string_eol_s);
- }
-
- controller_unlock_print_flush(print->to, &main->thread);
-
- return F_okay;
- }
-#endif // _di_controller_print_perform_debug_pid_file_control_socket_
-
-#ifndef _di_controller_print_perform_debug_pid_file_create_problem_
- f_status_t controller_print_perform_debug_pid_file_create_problem(fl_print_t * const print, const f_string_t function, const f_status_t status, const uint8_t is_entry) {
-
- if (!print || !print->custom) 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);
-
- 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("%[' 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);
- }
-
- f_file_stream_lock(print->to);
-
- controller_print_entry_error_cache(print->to, &main->thread.cache.action, is_entry);
-
- controller_unlock_print_flush(print->to, &main->thread);
- }
-#endif // _di_controller_print_perform_debug_pid_file_create_problem_
-
-#ifndef _di_controller_print_perform_debug_pid_file_create_success_
- f_status_t controller_print_perform_debug_pid_file_create_success(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_debug_e) return F_output_not;
-
- controller_t * const main = (controller_t *) print->custom;
-
- 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);
-
- controller_unlock_print_flush(print->to, &main->thread);
- }
-#endif // _di_controller_print_perform_debug_pid_file_create_success_
-
-#ifndef _di_controller_print_perform_error_pid_file_create_
- f_status_t controller_print_perform_error_pid_file_create(fl_print_t * const print, const f_string_t function, const f_status_t status, 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;
-
- controller_t * const main = (controller_t *) print->custom;
-
- 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);
-
- f_file_stream_lock(print->to);
-
- controller_print_entry_error_cache(print->to, &main->thread.cache.action, is_entry);
-
- controller_unlock_print_flush(print->to, &main->thread);
- }
-#endif // _di_controller_print_perform_error_pid_file_create_
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 3
- *
- * Project: Controller
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Provides the print perform functionality.
- *
- * This is auto-included and should not need to be explicitly included.
- */
-#ifndef _controller_main_print_perform_h
-#define _controller_main_print_perform_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Print debug message about control socket failing for the reason specified.
- *
- * @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.
- * @param status
- * The status code relating to the failure.
- * @param message
- * A short message describing the reason for the failure.
- *
- * @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_perform_debug_control_socket_failure_
- extern f_status_t controller_print_perform_debug_control_socket_failure(fl_print_t * const print, const f_status_t status, const f_string_t message);
-#endif // _di_controller_print_perform_debug_control_socket_failure_
-
-/**
- * Print debug message about control socket being created.
- *
- * @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.
- *
- * @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_perform_debug_control_socket_success_
- extern f_status_t controller_print_perform_debug_control_socket_success(fl_print_t * const print);
-#endif // _di_controller_print_perform_debug_control_socket_success_
-
-/**
- * Print debug message about control socket missing in read only mode.
- *
- * @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.
- *
- * @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_perform_debug_control_socket_missing_read_only_
- extern f_status_t controller_print_perform_debug_control_socket_missing_read_only(fl_print_t * const print);
-#endif // _di_controller_print_perform_debug_pid_file_control_socket_
-
-/**
- * Print debug message about PID file and control socket.
- *
- * @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.
- *
- * @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_perform_debug_pid_file_control_socket_
- extern f_status_t controller_print_perform_debug_pid_file_control_socket(fl_print_t * const print);
-#endif // _di_controller_print_perform_debug_pid_file_control_socket_
-
-/**
- * Print debug message on problems when creating PID file.
- *
- * @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.
- * @param function
- * The name of the function associated with the error.
- * @param status
- * The status code to process.
- * Make sure this has F_status_set_fine() called if the status code has any error or warning bits.
- * @param is_entry
- * If TRUE, then this operates as an entry.
- * If FALSE, then this operates as an exit.
- *
- * @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_perform_debug_pid_file_create_problem_
- extern f_status_t controller_print_perform_debug_pid_file_create_problem(fl_print_t * const print, const f_string_t function, const f_status_t status, const uint8_t is_entry);
-#endif // _di_controller_print_perform_debug_pid_file_create_problem_
-
-/**
- * Print debug message on success when creating PID file.
- *
- * @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.
- * @param is_entry
- * If TRUE, then this operates as an entry.
- * If FALSE, then this operates as an exit.
- *
- * @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_perform_debug_pid_file_create_success_
- extern f_status_t controller_print_perform_debug_pid_file_create_success(fl_print_t * const print, const uint8_t is_entry);
-#endif // _di_controller_print_perform_debug_pid_file_create_success_
-
-/**
- * Print error message on problems when creating PID file.
- *
- * @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.
- * @param function
- * The name of the function associated with the error.
- * @param status
- * The status code to process.
- * Make sure this has F_status_set_fine() called if the status code has any error or warning bits.
- * @param is_entry
- * If TRUE, then this operates as an entry.
- * If FALSE, then this operates as an exit.
- *
- * @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_perform_error_pid_file_create_
- extern f_status_t controller_print_perform_error_pid_file_create(fl_print_t * const print, const f_string_t function, const f_status_t status, const uint8_t is_entry);
-#endif // _di_controller_print_perform_error_pid_file_create_
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _controller_main_print_perform_h
+++ /dev/null
-/**
- * FLL - Level 3
- *
- * Project: Controller
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Provides the print rule functionality.
- *
- * This is auto-included and should not need to be explicitly included.
- */
-#ifndef _controller_main_print_rule_h
-#define _controller_main_print_rule_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Print generic error/warning information.
- *
- * This is essentially a wrapper to fll_error_print() that includes locking.
- *
- * @param print
- * Designates how printing is to be performed.
- * @param cache
- * The action cache.
- * @param status
- * The status code to process.
- * Make sure this has F_status_set_fine() called if the status code has any error or warning bits.
- * @param function
- * The name of the function where the error happened.
- * Set to 0 to disable.
- * @param fallback
- * Set to F_true to print the fallback error message for unknown errors.
- * @param item
- * If TRUE, then this error is associated with an item.
- * If FALSE, then this error is associated with a rule setting.
- *
- * @see fll_error_print()
- * @see controller_print_rule_error_cache()
- */
-#ifndef _di_controller_print_rule_error_
- extern f_status_t controller_print_rule_error(fl_print_t * const print, const controller_cache_action_t cache, const f_status_t status, const f_string_t function, const bool fallback, const bool item);
-#endif // _di_controller_print_rule_error_
-
-/**
- * Print additional error/warning information in addition to existing error.
- *
- * This is explicitly intended to be used in addition to the error message.
- *
- * This neither locks the thread nor does it check to see if output is enabled or disabled.
- *
- * @param print
- * The error or warning output structure.
- * @param cache
- * A structure for containing and caching relevant data.
- * @param item
- * If TRUE, then this error is associated with an item.
- * If FALSE, then this error is associated with a rule setting.
- *
- * @see controller_rule_action_read()
- * @see controller_rule_item_read()
- * @see controller_rule_items_read()
- * @see controller_rule_read()
- * @see controller_rule_setting_read()
- */
-#ifndef _di_controller_print_rule_error_cache_
- extern f_status_t controller_print_rule_error_cache(fl_print_t * const print, const controller_cache_action_t cache, const bool item);
-#endif // _di_controller_print_rule_error_cache_
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _controller_main_print_rule_h
extern "C" {
#endif
-#ifndef _di_controller_print_entry_warning_action_failsafe_twice_
- f_status_t controller_print_entry_warning_action_failsafe_twice(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry) {
+#ifndef _di_controller_print_warning_entry_action_failsafe_twice_
+ f_status_t controller_print_warning_entry_action_failsafe_twice(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry) {
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;
fl_print_format("%r%[%QFailsafe may not be specified when running in failsafe, ignoring.%]%r", print->to, f_string_eol_s, print->context, print->prefix, print->context, f_string_eol_s);
- controller_print_entry_error_cache(print, &cache->action, is_entry);
+ 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_entry_warning_action_failsafe_twice_
+#endif // _di_controller_print_warning_entry_action_failsafe_twice_
-#ifndef _di_controller_print_entry_warning_action_multiple_
- f_status_t controller_print_entry_warning_action_multiple(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_string_static_t name) {
+#ifndef _di_controller_print_warning_entry_action_multiple_
+ f_status_t controller_print_warning_entry_action_multiple(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;
fl_print_format(f_string_format_Q_single_s.string, print->to, print->notable, name, print->notable);
fl_print_format("%[' %r item actions detected; only the first will be used.%]%r", print->to, print->context, is_entry ? controller_entry_s : controller_exit_s, print->context, f_string_eol_s);
- controller_print_entry_error_cache(print, &cache->action, is_entry);
+ 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_entry_warning_action_multiple_
+#endif // _di_controller_print_warning_entry_action_multiple_
#ifdef __cplusplus
} // extern "C"
*
* This is auto-included and should not need to be explicitly included.
*/
-#ifndef _controller_main_print_entry_warning_action_h
-#define _controller_main_print_entry_warning_action_h
+#ifndef _controller_main_print_warning_entry_action_h
+#define _controller_main_print_warning_entry_action_h
#ifdef __cplusplus
extern "C" {
* F_output_not (with error bit) if setting is NULL.
*
* @see fll_error_file_print()
- * @see controller_print_entry_error_cache()
+ * @see controller_print_error_entry_cache()
*/
-#ifndef _di_controller_print_entry_warning_action_failsafe_twice_
- extern f_status_t controller_print_entry_warning_action_failsafe_twice(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry);
-#endif // _di_controller_print_entry_warning_action_failsafe_twice_
+#ifndef _di_controller_print_warning_entry_action_failsafe_twice_
+ extern f_status_t controller_print_warning_entry_action_failsafe_twice(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry);
+#endif // _di_controller_print_warning_entry_action_failsafe_twice_
/**
* Print warning message about multiple actions for a specified item.
* F_output_not (with error bit) if setting is NULL.
*
* @see fll_error_file_print()
- * @see controller_print_entry_error_cache()
+ * @see controller_print_error_entry_cache()
*/
-#ifndef _di_controller_print_entry_warning_action_multiple_
- extern f_status_t controller_print_entry_warning_action_multiple(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_entry_warning_action_multiple_
+#ifndef _di_controller_print_warning_entry_action_multiple_
+ extern f_status_t controller_print_warning_entry_action_multiple(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_action_multiple_
#ifdef __cplusplus
} // extern "C"
#endif
-#endif // _controller_main_print_entry_warning_action_h
+#endif // _controller_main_print_warning_entry_action_h
extern "C" {
#endif
-#ifndef _di_controller_print_entry_warning_setting_unknown_action_
- f_status_t controller_print_entry_warning_setting_unknown_action(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry) {
+#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) {
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;
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_sentence_end_quote_s.string, print->to.stream, print->context, print->context, f_string_eol_s);
- controller_print_entry_error_cache(print, &cache->action, is_entry);
+ 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_entry_warning_setting_unknown_action_
+#endif // _di_controller_print_warning_entry_setting_unknown_action_
#ifdef __cplusplus
} // extern "C"
*
* F_output_not (with error bit) if setting is NULL.
*/
-#ifndef _di_controller_print_entry_warning_setting_unknown_action_
- extern f_status_t controller_print_entry_warning_setting_unknown_action(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry);
-#endif // _di_controller_print_entry_warning_setting_unknown_action_
+#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);
+#endif // _di_controller_print_warning_entry_setting_unknown_action_
#ifdef __cplusplus
} // extern "C"
--- /dev/null
+#include "../../../controller.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_controller_print_warning_rule_action_unknown_
+ f_status_t controller_print_warning_rule_action_unknown(fl_print_t * const print, controller_cache_t * const cache) {
+
+ 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%[%QAction type is unknown, ignoring.%]%r", print->to, f_string_eol_s, print->context, print->prefix, print->context, f_string_eol_s);
+
+ controller_print_error_rule_cache(print, cache->action, F_true);
+
+ controller_unlock_print_flush(print->to, &main->thread);
+
+ return F_okay;
+ }
+#endif // _di_controller_print_warning_rule_action_unknown_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: Controller
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides the print entry warning action functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _controller_main_print_warning_rule_action_h
+#define _controller_main_print_warning_rule_action_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Print warning message about rule action being 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.
+ *
+ * @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.
+ *
+ * @see fll_error_file_print()
+ * @see controller_print_error_entry_cache()
+ */
+#ifndef _di_controller_print_warning_entry_action_multiple_
+ extern f_status_t controller_print_warning_rule_action_unknown(fl_print_t * const print, controller_cache_t * const cache);
+#endif // _di_controller_print_warning_entry_action_multiple_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _controller_main_print_warning_rule_action_h
}
if (!type_rerun) {
- controller_print_rule_item_error_action_first(&main->program.error, cache);
+ controller_print_error_rule_item_action_first(&main->program.error, cache);
return F_status_set_error(F_valid_not);
}
}
}
else {
- controller_print_rule_item_error_action_second(&main->program.error, cache);
+ controller_print_error_rule_item_action_second(&main->program.error, cache);
return F_status_set_error(F_valid_not);
}
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;
}
else {
- controller_print_rule_item_error_action_unknown(&main->program.error, cache, controller_rerun_s, cache->content_action.array[i]);
+ controller_print_error_rule_item_action_unknown(&main->program.error, cache, controller_rerun_s, cache->content_action.array[i]);
return F_status_set_error(F_valid_not);
}
item->with &= ~controller_with_session_new_d;
}
else {
- controller_print_rule_item_error_action_unknown(&main->program.error, cache, controller_with_s, cache->content_action.array[i]);
+ controller_print_error_rule_item_action_unknown(&main->program.error, cache, controller_with_s, cache->content_action.array[i]);
status = F_status_set_error(F_valid_not);
}
if (F_status_is_error_not(status) && status == F_data_not) {
- controller_print_rule_item_debug_action_empty(&main->program.debug, cache);
+ controller_print_debug_rule_action_empty(&main->program.debug, cache);
}
return status;
controller_print_error(&main->program.error, macro_controller_f(fl_conversion_dynamic_partial_to_signed_detect));
}
else {
- controller_lock_print(main->program.error.to, &main->thread);
-
- fl_print_format("%r%[%QRule item action '%]", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, main->program.error.context);
- fl_print_format(f_string_format_r_single_s.string, main->program.error.to, main->program.error.notable, controller_rerun_s, main->program.error.notable);
- fl_print_format("%[' requires a positive whole number or 0 for the '%]", main->program.error.to, main->program.error.context, main->program.error.context);
- fl_print_format("%[%S%]", main->program.error.to, main->program.error.notable, name, main->program.error.notable);
- fl_print_format("%[' value", main->program.error.to, main->program.error.context, main->program.error.context);
-
- if (*index + 1 == cache->content_action.used) {
- fl_print_format(", but none were given.%]%r", main->program.error.to, main->program.error.context, f_string_eol_s);
- }
- else {
- fl_print_format(", but '%]%[%/Q%]", main->program.error.to, main->program.error.context, main->program.error.notable, cache->buffer_item, cache->content_action.array[*index], main->program.error.notable);
-
- if (status == F_number || status == F_number_decimal) {
- fl_print_format("%[' was given.%]%r", main->program.error.to, main->program.error.context, main->program.error.context, f_string_eol_s);
- }
- else if (status == F_number_overflow) {
- fl_print_format("%[' is too large.%]%r", main->program.error.to, main->program.error.context, main->program.error.context, f_string_eol_s);
- }
- else {
- fl_print_format("%[' is negative.%]%r", main->program.error.to, main->program.error.context, main->program.error.context, f_string_eol_s);
- }
- }
-
- controller_print_rule_error_cache(&main->program.error, cache->action, F_true);
-
- controller_unlock_print_flush(main->program.error.to, &main->thread);
+ controller_print_error_rule_item_action_positive_number_not(&main->program.error, cache, name, *index);
}
}
status = controller_rule_expand(main, instance->rule.items.array[i].actions.array[j], instance);
if (F_status_is_error(status)) {
- controller_print_rule_error(&main->program.error, instance->cache.action, F_status_set_fine(status), "controller_rule_expand", F_true, F_false);
+ controller_print_error_rule(&main->program.error, instance->cache.action, F_status_set_fine(status), "controller_rule_expand", F_true, F_false);
break;
}
if (status == F_child || F_status_set_fine(status) == F_interrupt || F_status_set_fine(status) == F_lock) break;
if (F_status_is_error(status) && F_status_set_fine(status) != F_failure) break;
- } while (controller_rule_execute_rerun(controller_rule_action_type_to_action_execute_type(action), instance, &instance->rule.items.array[i]) > 0);
+ } while (controller_rule_execute_rerun(instance, &instance->rule.items.array[i], controller_rule_action_type_to_action_execute_type(action)) > 0);
if (status == F_child || F_status_set_fine(status) == F_interrupt || F_status_set_fine(status) == F_lock) break;
status = controller_rule_expand(main, instance->rule.items.array[i].actions.array[j], instance);
if (F_status_is_error(status)) {
- controller_print_rule_error(&main->program.error, instance->cache.action, F_status_set_fine(status), "controller_rule_expand", F_true, F_false);
+ controller_print_error_rule(&main->program.error, instance->cache.action, F_status_set_fine(status), "controller_rule_expand", F_true, F_false);
break;
}
if (status == F_child || F_status_set_fine(status) == F_lock) break;
if (F_status_is_error(status) && F_status_set_fine(status) != F_failure) break;
- } while (controller_rule_execute_rerun(controller_rule_action_type_to_action_execute_type(action), instance, &instance->rule.items.array[i]) > 0);
+ } while (controller_rule_execute_rerun(instance, &instance->rule.items.array[i], controller_rule_action_type_to_action_execute_type(action)) > 0);
if (status == F_child || F_status_set_fine(status) == F_interrupt || F_status_set_fine(status) == F_lock) break;
status = controller_rule_expand(main, instance->rule.items.array[i].actions.array[j], instance);
if (F_status_is_error(status)) {
- controller_print_rule_error(&main->program.error, instance->cache.action, F_status_set_fine(status), "controller_rule_expand", F_true, F_false);
+ controller_print_error_rule(&main->program.error, instance->cache.action, F_status_set_fine(status), "controller_rule_expand", F_true, F_false);
break;
}
if (status == F_child || F_status_set_fine(status) == F_interrupt || F_status_set_fine(status) == F_lock) break;
if (F_status_is_error(status) && F_status_set_fine(status) != F_failure) break;
- } while (controller_rule_execute_rerun(controller_rule_action_type_to_action_execute_type(action), instance, &instance->rule.items.array[i]) > 0);
+ } while (controller_rule_execute_rerun(instance, &instance->rule.items.array[i], controller_rule_action_type_to_action_execute_type(action)) > 0);
if (status == F_child || F_status_set_fine(status) == F_interrupt || F_status_set_fine(status) == F_lock) break;
else {
success = F_status_set_error(F_failure);
- controller_print_rule_action_error_missing_pid(&main->program.error, instance->rule.alias);
+ controller_print_error_rule_action_missing_pid(&main->program.error, instance->rule.alias);
}
}
else if (instance->rule.items.array[i].type == controller_rule_item_type_utility_e) {
status = controller_rule_expand(main, instance->rule.items.array[i].actions.array[j], instance);
if (F_status_is_error(status)) {
- controller_print_rule_error(&main->program.error, instance->cache.action, F_status_set_fine(status), "controller_rule_expand", F_true, F_false);
+ controller_print_error_rule(&main->program.error, instance->cache.action, F_status_set_fine(status), "controller_rule_expand", F_true, F_false);
break;
}
if (status == F_child || F_status_set_fine(status) == F_interrupt || F_status_set_fine(status) == F_lock) break;
if (F_status_is_error(status) && F_status_set_fine(status) != F_failure) break;
- } while (controller_rule_execute_rerun(controller_rule_action_type_to_action_execute_type(action), instance, &instance->rule.items.array[i]) > 0);
+ } while (controller_rule_execute_rerun(instance, &instance->rule.items.array[i], controller_rule_action_type_to_action_execute_type(action)) > 0);
if (status == F_child || F_status_set_fine(status) == F_interrupt || F_status_set_fine(status) == F_lock) break;
else {
success = F_status_set_error(F_failure);
- controller_print_rule_action_error_missing_pid(&main->program.error, instance->rule.alias);
+ controller_print_error_rule_action_missing_pid(&main->program.error, instance->rule.alias);
}
}
else {
- if (main->program.warning.verbosity == f_console_verbosity_debug_e) {
- controller_lock_print(main->program.warning.to, &main->thread);
-
- fl_print_format("%r%[%QAction type is unknown, ignoring.%]%r", main->program.warning.to, f_string_eol_s, main->program.warning.context, main->program.warning.prefix, main->program.warning.context, f_string_eol_s);
-
- controller_print_rule_error_cache(&main->program.warning, instance->cache.action, F_true);
-
- controller_unlock_print_flush(main->program.warning.to, &main->thread);
- }
+ controller_print_warning_rule_action_unknown(&main->program.warning, &instance->cache);
if (success == F_false) {
success = F_ignore;
success = F_false;
}
- if (!controller_thread_is_enabled_instance(instance)) {
- return F_status_set_error(F_interrupt);
- }
-
- if (status == F_child || F_status_is_error(status)) {
- return status;
- }
-
- if (success == F_false || success == F_failure) {
- return F_status_set_error(F_failure);
- }
-
- if (success == F_ignore) {
- return F_ignore;
- }
+ if (!controller_thread_is_enabled_instance(instance)) return F_status_set_error(F_interrupt);
+ if (status == F_child || F_status_is_error(status)) return status;
+ if (success == F_false || success == F_failure) return F_status_set_error(F_failure);
+ if (success == F_ignore) return F_ignore;
return F_okay;
}
}
if (options & controller_instance_option_simulate_e) {
- if (main->program.output.verbosity != f_console_verbosity_quiet_e) {
- controller_lock_print(main->program.output.to, &instance->main->thread);
-
- fl_print_format("%rSimulating execution of '%[", main->program.output.to, f_string_eol_s, main->program.context.set.title);
-
- if (program.used) {
- f_print_dynamic_safely(program, main->program.output.to);
- }
- else {
- f_print_dynamic_safely(arguments.array[0], main->program.output.to);
- }
-
- fl_print_format("%]' with the arguments: '%[", main->program.output.to, main->program.context.set.title, main->program.context.set.important);
-
- for (f_number_unsigned_t i = program.used ? 0 : 1; i < arguments.used; ++i) {
-
- if (program.used && i || !program.used && i > 1) {
- f_print_dynamic_raw(f_string_space_s, main->program.output.to);
- }
-
- f_print_dynamic_safely(arguments.array[i], main->program.output.to);
- } // for
-
- fl_print_format("%]' from '", main->program.output.to, main->program.context.set.important);
- fl_print_format("%[%Q%]'.%r", main->program.output.to, main->program.context.set.notable, instance->rule.name, main->program.context.set.notable, f_string_eol_s);
-
- controller_unlock_print_flush(main->program.output.to, &instance->main->thread);
- }
+ controller_print_entry_output_execute_simulate(&main->program.output, instance, program, arguments);
// Sleep for less than a second to better show simulation of synchronous vs asynchronous.
{
status_lock = controller_lock_write_instance(instance, &instance->active);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status_lock), F_false);
+ controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status_lock), F_false);
if (F_status_set_fine(status_lock) != F_interrupt) {
status = controller_lock_read_instance(instance, &instance->active);
-
- if (status == F_okay) {
- return status_lock;
- }
+ if (status == F_okay) return status_lock;
}
return F_status_set_error(F_lock);
status_lock = controller_lock_read_instance(instance, &instance->active);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status_lock), F_true);
+ controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status_lock), F_true);
}
if (F_status_set_fine(status_lock) != F_interrupt) {
status_lock = controller_lock_write_instance(instance, &instance->active);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status_lock), F_false);
+ controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status_lock), F_false);
if (F_status_set_fine(status_lock) != F_interrupt) {
status = controller_lock_read_instance(instance, &instance->active);
status_lock = controller_lock_read_instance(instance, &instance->active);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status_lock), F_true);
+ controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status_lock), F_true);
return F_status_set_error(F_lock);
}
status = F_status_set_fine(status);
if ((WIFEXITED(instance->result) && WEXITSTATUS(instance->result)) || status == F_control_group || status == F_failure || status == F_limit || status == F_processor || status == F_schedule) {
- controller_print_rule_item_error_execute(&instance->main->program.error, instance, type == controller_rule_item_type_script_e, program.used ? program : arguments.array[0], status);
+ controller_print_error_rule_item_execute(&instance->main->program.error, instance, type == controller_rule_item_type_script_e, program.used ? program : arguments.array[0], status);
}
else {
controller_print_error_status(&instance->main->program.error, macro_controller_f(fll_execute_program), F_status_set_fine(status));
}
if (options & controller_instance_option_simulate_e) {
- if (main->program.error.verbosity > f_console_verbosity_error_e) {
- controller_lock_print(main->program.error.to, &instance->main->thread);
-
- fl_print_format("%rSimulating execution of '%[", main->program.error.to, f_string_eol_s, main->program.context.set.title);
-
- if (program.used) {
- f_print_dynamic_safely(program, main->program.error.to);
- }
- else {
- f_print_dynamic_safely(arguments.array[0], main->program.error.to);
- }
-
- fl_print_format("%]' with the arguments: '%[", main->program.error.to, main->program.context.set.title, main->program.context.set.important);
-
- for (f_number_unsigned_t i = program.used ? 0 : 1; i < arguments.used; ++i) {
-
- if (program.used && i || !program.used && i > 1) {
- f_print_dynamic_raw(f_string_space_s, main->program.error.to);
- }
-
- f_print_dynamic_safely(arguments.array[i], main->program.error.to);
- } // for
-
- fl_print_format("%]' from '", main->program.error.to, main->program.context.set.important);
- fl_print_format("%[%Q%]'.%r", main->program.error.to, main->program.context.set.notable, instance->rule.name, main->program.context.set.notable, f_string_eol_s);
-
- controller_unlock_print_flush(main->program.error.to, &instance->main->thread);
- }
+ controller_print_entry_output_execute_simulate(&main->program.output, instance, program, arguments);
// Sleep for less than a second to better show simulation of synchronous vs asynchronous.
{
status_lock = controller_lock_write_instance(instance, &instance->active);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status_lock), F_false);
+ controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status_lock), F_false);
if (F_status_set_fine(status_lock) != F_interrupt) {
status = controller_lock_read_instance(instance, &instance->active);
-
- if (status == F_okay) {
- return status_lock;
- }
+ if (status == F_okay) return status_lock;
}
return F_status_set_error(F_lock);
status_lock = controller_lock_read_instance(instance, &instance->active);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status_lock), F_true);
+ controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status_lock), F_true);
}
if (F_status_set_fine(status_lock) != F_interrupt) {
}
if (!controller_thread_is_enabled_instance(instance)) {
- if (status_lock == F_okay) {
- return F_status_set_error(F_interrupt);
- }
-
- return F_status_set_error(F_lock);
+ return status_lock == F_okay ? F_status_set_error(F_interrupt) : F_status_set_error(F_lock);
}
if (status_lock == F_okay) {
status_lock = controller_lock_write_instance(instance, &instance->active);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status_lock), F_false);
+ controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status_lock), F_false);
if (F_status_set_fine(status_lock) != F_interrupt) {
status = controller_lock_read_instance(instance, &instance->active);
-
- if (status == F_okay) {
- return status_lock;
- }
+ if (status == F_okay) return status_lock;
}
return F_status_set_error(F_lock);
status_lock = controller_lock_read_instance(instance, &instance->active);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status_lock), F_true);
+ controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status_lock), F_true);
return F_status_set_error(F_lock);
}
else {
main->program.child = result.status;
- if (!controller_thread_is_enabled_instance(instance)) {
- return F_status_set_error(F_interrupt);
- }
+ if (!controller_thread_is_enabled_instance(instance)) return F_status_set_error(F_interrupt);
}
if (F_status_is_error(status)) {
}
}
- if (status == F_child || F_status_set_fine(status) == F_interrupt) {
- return status;
- }
+ if (status == F_child || F_status_set_fine(status) == F_interrupt) return status;
if (F_status_is_error(status)) {
status = F_status_set_fine(status);
if ((WIFEXITED(instance->result) && WEXITSTATUS(instance->result)) || status == F_control_group || status == F_failure || status == F_limit || status == F_processor || status == F_schedule) {
- controller_print_rule_item_error_execute(&instance->main->program.error, instance, type == controller_rule_item_type_utility_e, program.used ? program : arguments.array[0], status);
+ controller_print_error_rule_item_execute(&instance->main->program.error, instance, type == controller_rule_item_type_utility_e, program.used ? program : arguments.array[0], status);
}
else {
controller_print_error_status(&instance->main->program.error, macro_controller_f(fll_execute_program), F_status_set_fine(status));
#endif // _di_controller_rule_execute_pid_with_
#ifndef _di_controller_rule_execute_rerun_
- int8_t controller_rule_execute_rerun(const uint8_t action, controller_instance_t * const instance, controller_rule_item_t * const item) {
+ int8_t controller_rule_execute_rerun(controller_instance_t * const instance, controller_rule_item_t * const item, const uint8_t action) {
if (!instance || !instance->main || !item) return F_false;
if (!controller_thread_is_enabled_instance(instance)) return -2;
if (!rerun_item->max || rerun_item->count < rerun_item->max) {
- if (main->program.error.verbosity == f_console_verbosity_debug_e) {
- controller_lock_print(main->program.output.to, &instance->main->thread);
-
- fl_print_format("%rRe-running '", main->program.output.to, f_string_eol_s);
- fl_print_format("%[%r%]' '", main->program.output.to, main->program.context.set.title, instance->rule.alias, main->program.context.set.title);
- fl_print_format("%[%r%]' with a ", main->program.output.to, main->program.context.set.notable, controller_convert_rule_action_execute_type_string(action), main->program.context.set.notable);
- fl_print_format("%[%r%] of ", main->program.output.to, main->program.context.set.notable, controller_delay_s, main->program.context.set.notable);
- fl_print_format("%[%ul%] MegaTime", main->program.output.to, main->program.context.set.notable, rerun_item->delay, main->program.context.set.notable);
-
- if (rerun_item->max) {
- fl_print_format(" for %[%ul%]", main->program.output.to, main->program.context.set.notable, rerun_item->count, main->program.context.set.notable);
- fl_print_format(" of %[%r%] ", main->program.output.to, main->program.context.set.notable, controller_max_s, main->program.context.set.notable);
- fl_print_format(f_string_format_un_single_s.string, main->program.output.to, main->program.context.set.notable, rerun_item->max, main->program.context.set.notable);
- fl_print_format(".%r", main->program.output.to, f_string_eol_s);
- }
- else {
- fl_print_format(" with no %[%r%].%r", main->program.output.to, main->program.context.set.notable, controller_max_s, main->program.context.set.notable, f_string_eol_s);
- }
-
- controller_unlock_print_flush(main->program.output.to, &instance->main->thread);
- }
+ controller_main_print_debug_rule_execute_rerun(&main->program.output, return_item, action);
if (rerun_item->delay) {
f_time_spec_t delay = f_time_spec_t_initialize;
/**
* Determine whether or not an execute rule should be re-run, applying a delay as requested.
*
- * @param action
- * The action type.
* @param instance
* The instance data for processing this rule.
+ *
+ * Must not be NULL.
* @param item
* The rule item being executed.
*
+ * Must not be NULL.
+ * @param action
+ * The action type.
+ *
* @return
* A positive number to designate re-run.
* 0 to designate do not re-run.
* -2 to designate exit due to signal/disabled thread.
*/
#ifndef _di_controller_rule_execute_rerun_
- extern int8_t controller_rule_execute_rerun(const uint8_t action, controller_instance_t * const instance, controller_rule_item_t * const item);
+ extern int8_t controller_rule_execute_rerun(controller_instance_t * const instance, controller_rule_item_t * const item, const uint8_t action);
#endif // _di_controller_rule_execute_rerun_
#ifdef __cplusplus
controller_lock_print(main->program.error.to, &main->thread);
fl_print_format("%r%[%QUnsupported action type '%]", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, main->program.error.context);
- fl_print_format(f_string_format_r_single_s.string, main->program.error.to, main->program.error.notable, controller_convert_rule_action_type_string(instance->action), main->program.error.notable);
+ fl_print_format(f_string_format_Q_single_s.string, main->program.error.to, main->program.error.notable, controller_convert_rule_action_type_string(instance->action), main->program.error.notable);
fl_print_format("%[' while attempting to execute rule.%]%r", main->program.error.to, main->program.error.context, main->program.error.context, f_string_eol_s);
- controller_print_rule_error_cache(&main->program.error, instance->cache.action, F_true);
+ controller_print_error_rule_cache(&main->program.error, instance->cache.action, F_true);
controller_unlock_print_flush(main->program.error.to, &main->thread);
}
}
if (F_status_is_error(status)) {
- controller_print_rule_error(&main->program.error, instance->cache.action, F_status_set_fine(status), "f_string_dynamic_append", F_true, F_true);
+ controller_print_error_rule(&main->program.error, instance->cache.action, F_status_set_fine(status), "f_string_dynamic_append", F_true, F_true);
return status;
}
status = f_string_dynamic_append(instance->rule.alias, &instance->cache.action.name_file);
if (F_status_is_error(status)) {
- controller_print_rule_error(&main->program.error, instance->cache.action, F_status_set_fine(status), "f_string_dynamic_append", F_true, F_true);
+ controller_print_error_rule(&main->program.error, instance->cache.action, F_status_set_fine(status), "f_string_dynamic_append", F_true, F_true);
return status;
}
}
if (F_status_is_error(status)) {
- controller_print_rule_error(&main->program.error, instance->cache.action, F_status_set_fine(status), "f_string_dynamic_append", F_true, F_true);
+ controller_print_error_rule(&main->program.error, instance->cache.action, F_status_set_fine(status), "f_string_dynamic_append", F_true, F_true);
return status;
}
status_lock = controller_lock_read_instance(instance, &main->thread.lock.instance);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status_lock), F_true);
+ controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status_lock), F_true);
}
else {
status = controller_instance_prepare_instance_type(main, instance->type, instance->action, dynamics[i]->array[j], &id_dependency);
if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
controller_lock_print(main->program.error.to, &main->thread);
- controller_print_rule_item_error_rule_not_loaded(&main->program.error, dynamics[i]->array[j]);
- controller_print_rule_error_cache(&main->program.error, instance->cache.action, F_false);
+ controller_print_error_rule_item_rule_not_loaded(&main->program.error, dynamics[i]->array[j]);
+ controller_print_error_rule_cache(&main->program.error, instance->cache.action, F_false);
controller_unlock_print_flush(main->program.error.to, &main->thread);
}
status_lock = controller_lock_read_instance(instance, &dependency->active);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status_lock), F_true);
+ controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status_lock), F_true);
status = F_false;
dependency = 0;
status_lock = controller_lock_read_instance(instance, &main->thread.lock.rule);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status_lock), F_true);
+ controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status_lock), F_true);
status = F_false;
}
if (i == 0) {
controller_lock_print(main->program.error.to, &main->thread);
- controller_print_rule_item_error_need_want_wish(&main->program.error, strings[i], dynamics[i]->array[j], "is not found");
- controller_print_rule_error_cache(&main->program.error, instance->cache.action, F_true);
+ controller_print_error_rule_item_need_want_wish(&main->program.error, strings[i], dynamics[i]->array[j], "is not found");
+ controller_print_error_rule_cache(&main->program.error, instance->cache.action, F_true);
controller_unlock_print_flush(main->program.error.to, &main->thread);
if (main->program.warning.verbosity == f_console_verbosity_debug_e) {
controller_lock_print(main->program.warning.to, &main->thread);
- controller_print_rule_item_error_need_want_wish(&main->program.warning, strings[i], dynamics[i]->array[j], "is not found");
+ controller_print_error_rule_item_need_want_wish(&main->program.warning, strings[i], dynamics[i]->array[j], "is not found");
- controller_print_rule_error_cache(&main->program.warning, instance->cache.action, F_true);
+ controller_print_error_rule_cache(&main->program.warning, instance->cache.action, F_true);
controller_unlock_print_flush(main->program.warning.to, &main->thread);
}
status_lock = controller_lock_read_instance(instance, &main->thread.lock.rule);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status_lock), F_true);
+ controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status_lock), F_true);
found = F_false;
status = status_lock;
status_lock = controller_lock_read_instance(instance, &dependency->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status_lock), F_true);
+ controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status_lock), F_true);
status = status_lock;
}
status_lock = controller_lock_read_instance(instance, &main->thread.lock.rule);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status_lock), F_true);
+ controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status_lock), F_true);
f_thread_unlock(&dependency->lock);
if (i == 0 || i == 1 || F_status_set_fine(status) == F_memory_not) {
controller_lock_print(main->program.error.to, &main->thread);
- controller_print_rule_item_error_need_want_wish(&main->program.error, strings[i], alias_other_buffer, "failed during execution");
- controller_print_rule_error_cache(&main->program.error, instance->cache.action, F_true);
+ controller_print_error_rule_item_need_want_wish(&main->program.error, strings[i], alias_other_buffer, "failed during execution");
+ controller_print_error_rule_cache(&main->program.error, instance->cache.action, F_true);
controller_unlock_print_flush(main->program.error.to, &main->thread);
if (main->program.warning.verbosity == f_console_verbosity_debug_e) {
controller_lock_print(main->program.warning.to, &main->thread);
- controller_print_rule_item_error_need_want_wish(&main->program.warning, strings[i], alias_other_buffer, "failed during execution");
+ controller_print_error_rule_item_need_want_wish(&main->program.warning, strings[i], alias_other_buffer, "failed during execution");
- controller_print_rule_error_cache(&main->program.warning, instance->cache.action, F_true);
+ controller_print_error_rule_cache(&main->program.warning, instance->cache.action, F_true);
controller_unlock_print_flush(main->program.warning.to, &main->thread);
}
status_lock = controller_lock_read_instance(instance, &main->thread.lock.rule);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status_lock), F_false);
+ controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status_lock), F_false);
}
}
if (F_status_is_error(status_lock)) {
if (F_status_is_error(status_lock)) {
- controller_print_rule_item_error_need_want_wish(&main->program.error, strings[i], alias_other_buffer, "due to lock failure");
+ controller_print_error_rule_item_need_want_wish(&main->program.error, strings[i], alias_other_buffer, "due to lock failure");
}
status = status_lock;
if (i == 0 || i == 1) {
controller_lock_print(main->program.error.to, &main->thread);
- controller_print_rule_item_error_need_want_wish(&main->program.error, strings[i], alias_other_buffer, "is in a failed state");
+ controller_print_error_rule_item_need_want_wish(&main->program.error, strings[i], alias_other_buffer, "is in a failed state");
- controller_print_rule_error_cache(&main->program.error, instance->cache.action, F_true);
+ controller_print_error_rule_cache(&main->program.error, instance->cache.action, F_true);
controller_unlock_print_flush(main->program.error.to, &main->thread);
if (main->program.warning.verbosity == f_console_verbosity_debug_e) {
controller_lock_print(main->program.warning.to, &main->thread);
- controller_print_rule_item_error_need_want_wish(&main->program.warning, strings[i], alias_other_buffer, "is in a failed state");
+ controller_print_error_rule_item_need_want_wish(&main->program.warning, strings[i], alias_other_buffer, "is in a failed state");
- controller_print_rule_error_cache(&main->program.warning, instance->cache.action, F_true);
+ controller_print_error_rule_cache(&main->program.warning, instance->cache.action, F_true);
controller_unlock_print_flush(main->program.warning.to, &main->thread);
}
fl_print_format("%r%[%QThe rule '%]", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, main->program.error.context);
fl_print_format(f_string_format_Q_single_s.string, main->program.error.to, main->program.error.notable, instance->rule.name, main->program.error.notable);
fl_print_format("%[' has no '%]", main->program.error.to, main->program.error.context, main->program.error.context);
- fl_print_format(f_string_format_r_single_s.string, main->program.error.to, main->program.error.notable, controller_convert_rule_action_type_string(instance->action), main->program.error.notable);
+ fl_print_format(f_string_format_Q_single_s.string, main->program.error.to, main->program.error.notable, controller_convert_rule_action_type_string(instance->action), main->program.error.notable);
fl_print_format("%[' action to execute.%]%r", main->program.error.to, main->program.error.context, main->program.error.context, f_string_eol_s);
}
else {
fl_print_format("%[') to execute.%]%r", main->program.error.to, main->program.error.context, main->program.error.context, f_string_eol_s);
}
- controller_print_rule_error_cache(&main->program.error, instance->cache.action, F_true);
+ controller_print_error_rule_cache(&main->program.error, instance->cache.action, F_true);
controller_unlock_print_flush(main->program.error.to, &main->thread);
}
}
if (F_status_is_error(status)) {
- controller_print_rule_item_error(&main->program.error, instance->cache.action, F_true, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, instance->cache.action, F_true, F_status_set_fine(status));
}
}
}
status_lock = controller_lock_write_instance(instance, &instance->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status_lock), F_false);
+ controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status_lock), F_false);
if (F_status_set_fine(status) != F_interrupt) {
status = controller_lock_read_instance(instance, &instance->lock);
status_lock = controller_lock_write_instance(instance, &main->thread.lock.rule);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status_lock), F_false);
+ controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status_lock), F_false);
f_thread_unlock(&instance->lock);
status_lock = controller_lock_read_instance(instance, &instance->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status_lock), F_true);
+ controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status_lock), F_true);
return F_status_set_error(F_lock);
}
status = controller_lock_read_instance_type(type, &main->thread, &main->thread.lock.instance);
if (F_status_is_error(status)) {
- controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status), F_true);
+ controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status), F_true);
return status;
}
if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
controller_lock_print(main->program.error.to, &main->thread);
- controller_print_rule_item_error_rule_not_loaded(&main->program.error, alias_rule);
- controller_print_rule_error_cache(&main->program.error, cache.action, F_false);
+ controller_print_error_rule_item_rule_not_loaded(&main->program.error, alias_rule);
+ controller_print_error_rule_cache(&main->program.error, cache.action, F_false);
controller_unlock_print_flush(main->program.error.to, &main->thread);
}
status = controller_lock_read_instance_type(type, &main->thread, &instance->active);
if (F_status_is_error(status)) {
- controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status), F_true);
- controller_print_rule_item_error(&main->program.error, cache.action, F_false, F_status_set_fine(status));
+ controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status), F_true);
+ controller_print_error_rule_item(&main->program.error, cache.action, F_false, F_status_set_fine(status));
f_thread_unlock(&main->thread.lock.instance);
status_lock = controller_lock_write_instance(instance, &instance->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status_lock), F_false);
+ controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status_lock), F_false);
f_thread_unlock(&instance->active);
f_thread_unlock(&main->thread.lock.instance);
status_lock = controller_lock_write_instance(instance, &instance->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status_lock), F_false);
+ controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status_lock), F_false);
f_thread_unlock(&instance->active);
status_lock = controller_lock_write_instance(instance, &instance->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status_lock), F_false);
+ controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status_lock), F_false);
f_thread_unlock(&instance->active);
status_lock = controller_lock_read_instance(instance, &instance->active);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&instance->main->program.error, F_status_set_fine(status_lock), F_true);
+ controller_print_error_lock_critical(&instance->main->program.error, F_status_set_fine(status_lock), F_true);
return status_lock;
}
status_lock = controller_lock_read_instance(instance, &instance->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&instance->main->program.error, F_status_set_fine(status_lock), F_true);
+ controller_print_error_lock_critical(&instance->main->program.error, F_status_set_fine(status_lock), F_true);
if (options_force & controller_instance_option_asynchronous_e) {
f_thread_unlock(&instance->active);
status_lock = controller_lock_read_instance(instance, &instance->main->thread.lock.rule);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&instance->main->program.error, F_status_set_fine(status_lock), F_true);
+ controller_print_error_lock_critical(&instance->main->program.error, F_status_set_fine(status_lock), F_true);
f_thread_unlock(&instance->lock);
status_lock = controller_lock_write_instance(instance, &instance->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&instance->main->program.error, F_status_set_fine(status_lock), F_false);
+ controller_print_error_lock_critical(&instance->main->program.error, F_status_set_fine(status_lock), F_false);
f_thread_unlock(&instance->main->thread.lock.rule);
status_lock = controller_lock_read_instance(instance, &instance->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&instance->main->program.error, F_status_set_fine(status_lock), F_true);
+ controller_print_error_lock_critical(&instance->main->program.error, F_status_set_fine(status_lock), F_true);
f_thread_unlock(&instance->main->thread.lock.rule);
fl_print_format(f_string_format_Q_single_s.string, instance->main->program.error.to, instance->main->program.error.notable, instance->rule.alias, instance->main->program.error.notable);
fl_print_format("%[' is already on the execution dependency stack, this recursion is prohibited.%]%r", instance->main->program.error.to, instance->main->program.error.context, instance->main->program.error.context, f_string_eol_s);
- controller_print_rule_error_cache(&instance->main->program.error, instance->cache.action, F_true);
+ controller_print_error_rule_cache(&instance->main->program.error, instance->cache.action, F_true);
controller_unlock_print_flush(instance->main->program.error.to, &instance->main->thread);
}
status_lock = controller_lock_write_instance(instance, &instance->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&instance->main->program.error, F_status_set_fine(status_lock), F_false);
+ controller_print_error_lock_critical(&instance->main->program.error, F_status_set_fine(status_lock), F_false);
if (options_force & controller_instance_option_asynchronous_e) {
f_thread_unlock(&instance->active);
status_lock = controller_lock_read_instance(instance, &instance->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&instance->main->program.error, F_status_set_fine(status_lock), F_true);
+ controller_print_error_lock_critical(&instance->main->program.error, F_status_set_fine(status_lock), F_true);
if (options_force & controller_instance_option_asynchronous_e) {
f_thread_unlock(&instance->active);
if (instance->main->program.error.verbosity > f_console_verbosity_quiet_e) {
controller_lock_print(instance->main->program.error.to, &instance->main->thread);
- controller_print_rule_item_error_rule_not_loaded(&instance->main->program.error, instance->rule.alias);
- controller_print_rule_error_cache(&instance->main->program.error, instance->cache.action, F_false);
+ controller_print_error_rule_item_rule_not_loaded(&instance->main->program.error, instance->rule.alias);
+ controller_print_error_rule_cache(&instance->main->program.error, instance->cache.action, F_false);
controller_unlock_print_flush(instance->main->program.error.to, &instance->main->thread);
}
status_lock = controller_lock_write_instance(instance, &instance->main->thread.lock.rule);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&instance->main->program.error, F_status_set_fine(status_lock), F_false);
+ controller_print_error_lock_critical(&instance->main->program.error, F_status_set_fine(status_lock), F_false);
if (F_status_set_fine(status) != F_lock) {
f_thread_unlock(&instance->lock);
status_lock = controller_lock_write_instance(instance, &instance->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&instance->main->program.error, F_status_set_fine(status_lock), F_false);
+ controller_print_error_lock_critical(&instance->main->program.error, F_status_set_fine(status_lock), F_false);
if (options_force & controller_instance_option_asynchronous_e) {
f_thread_unlock(&instance->active);
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_rule_error_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);
}
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_rule_error_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);
}
}
if (F_status_is_error(status)) {
- controller_print_rule_item_error(&main->program.error, cache->action, for_item, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, for_item, F_status_set_fine(status));
rule->status[0] = controller_error_simplify(F_status_set_fine(status));
fll_fss_extended_read(cache->buffer_item, &range, &cache->object_actions, &cache->content_actions, 0, 0, &cache->delimits, 0, &state);
if (F_status_is_error(status)) {
- controller_print_rule_error(&main->program.error, cache->action, F_status_set_fine(status), "fll_fss_extended_read", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "fll_fss_extended_read", F_true, F_false);
return status;
}
status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->object_actions.array[i], &cache->action.name_item);
if (F_status_is_error(status)) {
- controller_print_rule_error(&main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
if (F_status_set_fine(status) == F_memory_not) {
status_return = status;
cache->action.line_action = ++cache->action.line_item;
- controller_print_rule_item_error(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
continue;
}
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_rule_error_cache(&main->program.warning, cache->action, F_false);
+ controller_print_error_rule_cache(&main->program.warning, cache->action, F_false);
controller_unlock_print_flush(main->program.warning.to, &main->thread);
}
status = f_string_dynamic_partial_append_nulless(cache->buffer_item, range2, &cache->action.name_action);
if (F_status_is_error(status)) {
- controller_print_rule_error(&main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
// Get the current line number within the settings item.
cache->action.line_item = line_item;
cache->action.line_action = ++cache->action.line_item;
- controller_print_rule_item_error(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
if (F_status_set_fine(status) == F_memory_not) {
status_return = status;
fl_print_format("%r%[%QEmpty rule setting.%]%r", main->program.warning.to, f_string_eol_s, main->program.warning.context, main->program.warning.prefix, main->program.warning.context, f_string_eol_s);
- controller_print_rule_error_cache(&main->program.warning, cache->action, F_false);
+ controller_print_error_rule_cache(&main->program.warning, cache->action, F_false);
controller_unlock_print_flush(main->program.warning.to, &main->thread);
}
if (type == controller_rule_setting_type_affinity_e) {
if (!cache->content_actions.array[i].used) {
- controller_print_rule_setting_read_error(&main->program.error, "requires one or more Content", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting(&main->program.error, "requires one or more Content", i, line_item, &main->thread, cache);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
status = f_memory_array_increase(controller_allocation_small_d, sizeof(int32_t), (void **) &rule->affinity.array, &rule->affinity.used, &rule->affinity.size);
if (F_status_is_error(status)) {
- controller_print_rule_error(&main->program.error, cache->action, F_status_set_fine(status), "f_memory_array_increase", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_memory_array_increase", F_true, F_false);
break;
}
if (status == F_data_not || status == F_number || status == F_number_overflow || status == F_number_underflow || status == F_number_negative || status == F_number_decimal) {
if (status == F_number_underflow) {
- controller_print_rule_setting_read_error_with_range(&main->program.error, " has an unsupported number", cache->content_actions.array[i].array[j], ", the number is too small for this system", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting_with_range(&main->program.error, " has an unsupported number", cache->content_actions.array[i].array[j], ", the number is too small for this system", i, line_item, &main->thread, cache);
}
else if (status == F_number_overflow || status == F_number_positive) {
- controller_print_rule_setting_read_error_with_range(&main->program.error, " has an unsupported number", cache->content_actions.array[i].array[j], ", the number is too large for this system", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting_with_range(&main->program.error, " has an unsupported number", cache->content_actions.array[i].array[j], ", the number is too large for this system", i, line_item, &main->thread, cache);
}
else {
- controller_print_rule_setting_read_error_with_range(&main->program.error, " has an invalid number", cache->content_actions.array[i].array[j], ", only whole numbers are allowed for an affinity value", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting_with_range(&main->program.error, " has an invalid number", cache->content_actions.array[i].array[j], ", only whole numbers are allowed for an affinity value", i, line_item, &main->thread, cache);
}
status = F_status_set_error(F_valid_not);
}
}
else {
- controller_print_rule_error(&main->program.error, cache->action, F_status_set_fine(status), "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
status = F_status_set_error(status);
rule->affinity.array[rule->affinity.used++] = number;
} // for
- controller_print_rule_setting_read_values(main, controller_affinity_s, i, cache);
+ controller_print_error_rule_setting_values(main, controller_affinity_s, i, cache);
continue;
}
if (type == controller_rule_setting_type_define_e || type == controller_rule_setting_type_parameter_e) {
if (cache->content_actions.array[i].used != 2) {
- controller_print_rule_setting_read_error(&main->program.error, "requires exactly two Content", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting(&main->program.error, "requires exactly two Content", i, line_item, &main->thread, cache);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
status = f_memory_array_increase(controller_allocation_small_d, sizeof(f_string_map_t), (void **) &setting_maps->array, &setting_maps->used, &setting_maps->size);
if (F_status_is_error(status)) {
- controller_print_rule_error(&main->program.error, cache->action, F_status_set_fine(status), "f_memory_array_increase", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_memory_array_increase", F_true, F_false);
if (F_status_set_fine(status) == F_memory_not) {
status_return = status;
cache->action.line_action = ++cache->action.line_item;
- controller_print_rule_item_error(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
continue;
}
status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[0], &setting_maps->array[setting_maps->used].key);
if (F_status_is_error(status)) {
- controller_print_rule_error(&main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
if (F_status_set_fine(status) == F_memory_not) {
status_return = status;
cache->action.line_action = ++cache->action.line_item;
- controller_print_rule_item_error(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
continue;
}
status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[1], &setting_maps->array[setting_maps->used].value);
if (F_status_is_error(status)) {
- controller_print_rule_error(&main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
if (F_status_set_fine(status) == F_memory_not) {
status_return = status;
cache->action.line_action = ++cache->action.line_item;
- controller_print_rule_item_error(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
continue;
}
- controller_print_rule_setting_read_mapping(main, type == controller_rule_setting_type_define_e ? controller_define_s : controller_parameter_s, setting_maps->array[setting_maps->used]);
+ controller_print_error_rule_setting_mapping(main, type == controller_rule_setting_type_define_e ? controller_define_s : controller_parameter_s, setting_maps->array[setting_maps->used]);
++setting_maps->used;
if (type == controller_rule_setting_type_cgroup_e) {
if (cache->content_actions.array[i].used < 2 || rule->has & controller_rule_has_cgroup_d) {
- controller_print_rule_setting_read_error(&main->program.error, "requires two or more Content", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting(&main->program.error, "requires two or more Content", i, line_item, &main->thread, cache);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
rule->cgroup.as_new = F_true;
}
else {
- controller_print_rule_setting_read_error_with_range(&main->program.error, " has an unknown option", cache->content_actions.array[i].array[0], "", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting_with_range(&main->program.error, " has an unknown option", cache->content_actions.array[i].array[0], "", i, line_item, &main->thread, cache);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
status = f_string_dynamic_append(main->process.path_cgroup, &rule->cgroup.path);
if (F_status_is_error(status)) {
- controller_print_rule_error(&main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_append", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_append", F_true, F_false);
}
else {
rule->cgroup.groups.used = 0;
status = f_memory_array_increase(controller_allocation_small_d, sizeof(f_string_dynamic_t), (void **) &rule->cgroup.groups.array, &rule->cgroup.groups.used, &rule->cgroup.groups.size);
if (F_status_is_error(status)) {
- controller_print_rule_error(&main->program.error, cache->action, F_status_set_fine(status), "f_memory_array_increase", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_memory_array_increase", F_true, F_false);
break;
}
status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[j], &rule->cgroup.groups.array[rule->cgroup.groups.used]);
if (F_status_is_error(status)) {
- controller_print_rule_error(&main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
break;
}
cache->action.line_action = ++cache->action.line_item;
- controller_print_rule_item_error(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
continue;
}
rule->has |= controller_rule_has_cgroup_d;
- controller_print_rule_setting_read_values(main, controller_cgroup_s, i, cache);
+ controller_print_error_rule_setting_values(main, controller_cgroup_s, i, cache);
continue;
}
if (type == controller_rule_setting_type_limit_e) {
if (cache->content_actions.array[i].used != 3) {
- controller_print_rule_setting_read_error(&main->program.error, "requires three Content", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting(&main->program.error, "requires three Content", i, line_item, &main->thread, cache);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
fl_print_format(f_string_format_Q_single_s.string, main->program.error.to, main->program.error.notable, cache->action.name_action, main->program.error.notable);
fl_print_format(f_string_format_sentence_end_quote_s.string, main->program.error.to, main->program.error.context, main->program.error.context, f_string_eol_s);
- controller_print_rule_error_cache(&main->program.error, cache->action, F_true);
+ controller_print_error_rule_cache(&main->program.error, cache->action, F_true);
controller_unlock_print_flush(main->program.error.to, &main->thread);
}
fl_print_format("%r%[%QThe resource limit type is already specified%]%r", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, main->program.error.context, f_string_eol_s);
- controller_print_rule_error_cache(&main->program.error, cache->action, F_false);
+ controller_print_error_rule_cache(&main->program.error, cache->action, F_false);
controller_unlock_print_flush(main->program.error.to, &main->thread);
}
status = f_memory_array_increase(controller_allocation_small_d, sizeof(f_limit_set_t), (void **) &rule->limits.array, &rule->limits.used, &rule->limits.size);
if (F_status_is_error(status)) {
- controller_print_rule_error(&main->program.error, cache->action, F_status_set_fine(status), "f_memory_array_increase", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_memory_array_increase", F_true, F_false);
if (F_status_set_fine(status) == F_memory_not) {
status_return = status;
cache->action.line_action = ++cache->action.line_item;
- controller_print_rule_item_error(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
continue;
}
if (status == F_data_not || status == F_number || status == F_number_overflow || status == F_number_underflow || status == F_number_negative || status == F_number_positive || status == F_number_decimal) {
if (status == F_number_underflow) {
- controller_print_rule_setting_read_error_with_range(&main->program.error, " has an unsupported number", cache->content_actions.array[i].array[j], ", the number is too small for this system", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting_with_range(&main->program.error, " has an unsupported number", cache->content_actions.array[i].array[j], ", the number is too small for this system", i, line_item, &main->thread, cache);
}
else if (status == F_number_overflow) {
- controller_print_rule_setting_read_error_with_range(&main->program.error, " has an unsupported number", cache->content_actions.array[i].array[j], ", the number is too large for this system", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting_with_range(&main->program.error, " has an unsupported number", cache->content_actions.array[i].array[j], ", the number is too large for this system", i, line_item, &main->thread, cache);
}
else {
- controller_print_rule_setting_read_error_with_range(&main->program.error, " has an unsupported number", cache->content_actions.array[i].array[j], ", only whole numbers are allowed for a resource limit value", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting_with_range(&main->program.error, " has an unsupported number", cache->content_actions.array[i].array[j], ", only whole numbers are allowed for a resource limit value", i, line_item, &main->thread, cache);
}
status = F_status_set_error(F_valid_not);
}
}
else {
- controller_print_rule_error(&main->program.error, cache->action, F_status_set_fine(status), "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
status = F_status_set_error(status);
rule->limits.array[rule->limits.used++].type = type;
- controller_print_rule_setting_read_values(main, controller_limit_s, i, cache);
+ controller_print_error_rule_setting_values(main, controller_limit_s, i, cache);
continue;
}
}
if (setting_value->used || !cache->content_actions.array[i].used) {
- controller_print_rule_setting_read_error(&main->program.error, "requires one or more Content", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting(&main->program.error, "requires one or more Content", i, line_item, &main->thread, cache);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
cache->action.line_action = ++cache->action.line_item;
- controller_print_rule_item_error(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
continue;
}
fl_print_format(f_string_format_Q_single_s.string, main->program.error.to, main->program.error.notable, *setting_value, main->program.error.notable);
fl_print_format("%[', there must be at least 1 graph character.%]%r", main->program.error.to, main->program.error.context, main->program.error.context, f_string_eol_s);
- controller_print_rule_error_cache(&main->program.error, cache->action, F_false);
+ controller_print_error_rule_cache(&main->program.error, cache->action, F_false);
controller_unlock_print_flush(main->program.error.to, &main->thread);
}
else {
// This function should only return F_complete_not_utf on error.
- controller_print_rule_error(&main->program.error, cache->action, F_complete_not_utf, "controller_validate_has_graph", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, F_complete_not_utf, "controller_validate_has_graph", F_true, F_false);
if (F_status_is_error_not(status_return)) {
status_return = status;
}
- controller_print_rule_item_error(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
}
setting_value->used = 0;
continue;
}
- controller_print_rule_setting_read_value(main, type == controller_rule_setting_type_name_e ? controller_name_s : controller_engine_s, f_string_empty_s, *setting_value, 0);
+ controller_print_error_rule_setting_value(main, type == controller_rule_setting_type_name_e ? controller_name_s : controller_engine_s, f_string_empty_s, *setting_value, 0);
}
else if (type == controller_rule_setting_type_path_e) {
status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[0], setting_value);
if (F_status_is_error(status)) {
- controller_print_rule_error(&main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
if (F_status_set_fine(status) == F_memory_not) {
status_return = status;
cache->action.line_action = ++cache->action.line_item;
- controller_print_rule_item_error(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
continue;
}
- controller_print_rule_setting_read_value(main, controller_path_s, f_string_empty_s, *setting_value, 0);
+ controller_print_error_rule_setting_value(main, controller_path_s, f_string_empty_s, *setting_value, 0);
}
continue;
if (type == controller_rule_setting_type_scheduler_e) {
if (cache->content_actions.array[i].used < 1 || cache->content_actions.array[i].used > 2 || rule->has & controller_rule_has_scheduler_d) {
- controller_print_rule_setting_read_error(&main->program.error, "requires either one or two Content", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting(&main->program.error, "requires either one or two Content", i, line_item, &main->thread, cache);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
rule->scheduler.priority = 49;
}
else {
- controller_print_rule_setting_read_error_with_range(&main->program.error, " has an unknown scheduler", cache->content_actions.array[i].array[0], "", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting_with_range(&main->program.error, " has an unknown scheduler", cache->content_actions.array[i].array[0], "", i, line_item, &main->thread, cache);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
fl_print_format(" allowed for the designated scheduler.%]%r", main->program.error.to, main->program.error.context, main->program.error.context, f_string_eol_s);
- controller_print_rule_error_cache(&main->program.error, cache->action, F_false);
+ controller_print_error_rule_cache(&main->program.error, cache->action, F_false);
controller_unlock_print_flush(main->program.error.to, &main->thread);
}
}
}
else {
- controller_print_rule_error(&main->program.error, cache->action, status, "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, status, "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
status = F_status_set_error(status);
if (F_status_is_error_not(status_return)) {
rule->has |= controller_rule_has_scheduler_d;
- controller_print_rule_setting_read_values(main, controller_scheduler_s, i, cache);
+ controller_print_error_rule_setting_values(main, controller_scheduler_s, i, cache);
continue;
}
if (type == controller_rule_setting_type_timeout_e) {
if (cache->content_actions.array[i].used != 2) {
- controller_print_rule_setting_read_error(&main->program.error, "requires exactly two Content", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting(&main->program.error, "requires exactly two Content", i, line_item, &main->thread, cache);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
fl_print_format(f_string_format_Q_range_single_s.string, main->program.error.to, main->program.error.notable, cache->buffer_item, cache->content_actions.array[i].array[0], main->program.error.notable);
fl_print_format("%[' but only supports %r, %r, and %r.%]%r", main->program.error.to, main->program.error.context, controller_kill_s, controller_start_s, controller_stop_s, main->program.error.context, f_string_eol_s);
- controller_print_rule_error_cache(&main->program.error, cache->action, F_false);
+ controller_print_error_rule_cache(&main->program.error, cache->action, F_false);
controller_unlock_print_flush(main->program.error.to, &main->thread);
}
status = F_status_set_fine(status);
if (status == F_number_overflow) {
- controller_print_rule_setting_read_error_with_range(&main->program.error, " has an unsupported number", cache->content_actions.array[i].array[1], ", the number is too large for this system", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting_with_range(&main->program.error, " has an unsupported number", cache->content_actions.array[i].array[1], ", the number is too large for this system", i, line_item, &main->thread, cache);
}
else if (status == F_data_not || status == F_number || status == F_number_underflow || status == F_number_negative || status == F_number_positive || status == F_number_decimal) {
- controller_print_rule_setting_read_error_with_range(&main->program.error, " has an invalid number", cache->content_actions.array[i].array[1], ", only positive whole numbers are allowed", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting_with_range(&main->program.error, " has an invalid number", cache->content_actions.array[i].array[1], ", only positive whole numbers are allowed", i, line_item, &main->thread, cache);
}
else {
cache->action.line_action = ++cache->action.line_item;
- controller_print_rule_error(&main->program.error, cache->action, status, "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, status, "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
}
if (F_status_is_error_not(status_return)) {
break;
}
- controller_print_rule_setting_read_value(main, controller_timeout_s, name_sub, cache->action.generic, 0);
+ controller_print_error_rule_setting_value(main, controller_timeout_s, name_sub, cache->action.generic, 0);
}
}
if (type == controller_rule_setting_type_capability_e || type == controller_rule_setting_type_nice_e || type == controller_rule_setting_type_user_e) {
if (cache->content_actions.array[i].used != 1 || type == controller_rule_setting_type_capability_e && rule->capability || type == controller_rule_setting_type_group_e && (rule->has & controller_rule_has_group_d) || type == controller_rule_setting_type_nice_e && (rule->has & controller_rule_has_nice_d) || type == controller_rule_setting_type_user_e && (rule->has & controller_rule_has_user_d)) {
- controller_print_rule_setting_read_error(&main->program.error, "requires exactly one Content", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting(&main->program.error, "requires exactly one Content", i, line_item, &main->thread, cache);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
controller_lock_print(main->program.error.to, &main->thread);
- controller_print_rule_error(&main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
- controller_print_rule_error_cache(&main->program.error, cache->action, F_false);
+ controller_print_error_rule_cache(&main->program.error, cache->action, F_false);
controller_unlock_print_flush(main->program.error.to, &main->thread);
controller_lock_print(main->program.error.to, &main->thread);
- controller_print_rule_error(&main->program.error, cache->action, F_status_set_fine(status), "f_capability_from_text", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_capability_from_text", F_true, F_false);
- controller_print_rule_error_cache(&main->program.error, cache->action, F_false);
+ controller_print_error_rule_cache(&main->program.error, cache->action, F_false);
controller_unlock_print_flush(main->program.error.to, &main->thread);
break;
}
- controller_print_rule_setting_read_error(&main->program.error, "failed to process the capabilities", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting(&main->program.error, "failed to process the capabilities", i, line_item, &main->thread, cache);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
continue;
}
- controller_print_rule_setting_read_value(main, controller_capability_s, f_string_empty_s, cache->action.generic, 0);
+ controller_print_error_rule_setting_value(main, controller_capability_s, f_string_empty_s, cache->action.generic, 0);
}
else if (type == controller_rule_setting_type_nice_e) {
f_number_signed_t number = 0;
fl_print_format("%[19%]", main->program.error.to, main->program.error.notable, main->program.error.notable);
fl_print_format(" %[are allowed.%]%r", main->program.error.to, main->program.error.context, main->program.error.context, f_string_eol_s);
- controller_print_rule_error_cache(&main->program.error, cache->action, F_false);
+ controller_print_error_rule_cache(&main->program.error, cache->action, F_false);
controller_unlock_print_flush(main->program.error.to, &main->thread);
}
}
}
else {
- controller_print_rule_error(&main->program.error, cache->action, status, "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, status, "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
status = F_status_set_error(status);
if (F_status_is_error_not(status_return)) {
controller_lock_print(main->program.error.to, &main->thread);
- controller_print_rule_error(&main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
- controller_print_rule_error_cache(&main->program.error, cache->action, F_false);
+ controller_print_error_rule_cache(&main->program.error, cache->action, F_false);
controller_unlock_print_flush(main->program.error.to, &main->thread);
}
if (F_status_is_error_not(status)) {
- controller_print_rule_setting_read_value(main, controller_nice_s, f_string_empty_s, cache->action.generic, 0);
+ controller_print_error_rule_setting_value(main, controller_nice_s, f_string_empty_s, cache->action.generic, 0);
}
}
}
status = F_status_set_fine(status);
if (status == F_exist_not) {
- controller_print_rule_setting_read_error_with_range(&main->program.error, " has an invalid user", cache->content_actions.array[i].array[0], ", because no user was found by that name", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting_with_range(&main->program.error, " has an invalid user", cache->content_actions.array[i].array[0], ", because no user was found by that name", i, line_item, &main->thread, cache);
}
else if (status == F_number_too_large) {
- controller_print_rule_setting_read_error_with_range(&main->program.error, " has an invalid user", cache->content_actions.array[i].array[0], ", because the given ID is too large", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting_with_range(&main->program.error, " has an invalid user", cache->content_actions.array[i].array[0], ", because the given ID is too large", i, line_item, &main->thread, cache);
}
else if (status == F_number) {
- controller_print_rule_setting_read_error_with_range(&main->program.error, " has an invalid user", cache->content_actions.array[i].array[0], ", because the given ID is not a valid supported number", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting_with_range(&main->program.error, " has an invalid user", cache->content_actions.array[i].array[0], ", because the given ID is not a valid supported number", i, line_item, &main->thread, cache);
}
else {
cache->action.line_action = ++cache->action.line_item;
- controller_print_rule_error(&main->program.error, cache->action, status, "controller_convert_user_id", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, status, "controller_convert_user_id", F_true, F_false);
- controller_print_rule_item_error(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
}
if (F_status_is_error_not(status_return)) {
status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[0], &cache->action.generic);
- controller_print_rule_setting_read_value(main, controller_user_s, f_string_empty_s, cache->action.generic, 0);
+ controller_print_error_rule_setting_value(main, controller_user_s, f_string_empty_s, cache->action.generic, 0);
}
}
}
if (type == controller_rule_setting_type_group_e) {
if (!cache->content_actions.array[i].used) {
- controller_print_rule_setting_read_error(&main->program.error, "requires one or more Content", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting(&main->program.error, "requires one or more Content", i, line_item, &main->thread, cache);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
status = f_memory_array_increase(controller_allocation_small_d, sizeof(f_int32s_t), (void **) &rule->groups.array, &rule->groups.used, &rule->groups.size);
if (F_status_is_error(status)) {
- controller_print_rule_error(&main->program.error, cache->action, F_status_set_fine(status), "f_memory_array_increase", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_memory_array_increase", F_true, F_false);
if (F_status_set_fine(status) == F_memory_not) {
status_return = status;
cache->action.line_action = ++cache->action.line_item;
- controller_print_rule_item_error(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
continue;
}
status = F_status_set_fine(status);
if (status == F_exist_not) {
- controller_print_rule_setting_read_error_with_range(&main->program.error, " has an invalid group", cache->content_actions.array[i].array[j], ", because no group was found by that name", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting_with_range(&main->program.error, " has an invalid group", cache->content_actions.array[i].array[j], ", because no group was found by that name", i, line_item, &main->thread, cache);
}
else if (status == F_number_too_large) {
- controller_print_rule_setting_read_error_with_range(&main->program.error, " has an invalid group", cache->content_actions.array[i].array[j], ", because the given ID is too large", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting_with_range(&main->program.error, " has an invalid group", cache->content_actions.array[i].array[j], ", because the given ID is too large", i, line_item, &main->thread, cache);
}
else if (status == F_number) {
- controller_print_rule_setting_read_error_with_range(&main->program.error, " has an invalid group", cache->content_actions.array[i].array[j], ", because the given ID is not a valid supported number", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting_with_range(&main->program.error, " has an invalid group", cache->content_actions.array[i].array[j], ", because the given ID is not a valid supported number", i, line_item, &main->thread, cache);
}
else {
cache->action.line_action = ++cache->action.line_item;
- controller_print_rule_error(&main->program.error, cache->action, status, "f_account_group_id_by_name", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, status, "f_account_group_id_by_name", F_true, F_false);
- controller_print_rule_item_error(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
}
if (F_status_is_error_not(status_return)) {
}
} // for
- controller_print_rule_setting_read_values(main, controller_group_s, i, cache);
+ controller_print_error_rule_setting_values(main, controller_group_s, i, cache);
continue;
}
status = f_memory_array_increase(controller_allocation_small_d, sizeof(f_string_dynamic_t), (void **) &setting_values->array, &setting_values->used, &setting_values->size);
if (F_status_is_error(status)) {
- controller_print_rule_error(&main->program.error, cache->action, F_status_set_fine(status), "f_memory_array_increase", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_memory_array_increase", F_true, F_false);
if (F_status_set_fine(status) == F_memory_not) {
status_return = status;
cache->action.line_action = ++cache->action.line_item;
- controller_print_rule_item_error(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
continue;
}
status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[j], &setting_values->array[setting_values->used]);
if (F_status_is_error(status)) {
- controller_print_rule_error(&main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
setting_values->array[setting_values->used].used = 0;
cache->action.line_action = ++cache->action.line_item;
- controller_print_rule_item_error(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
continue;
}
fl_print_format(f_string_format_Q_single_s.string, main->program.error.to, main->program.error.notable, setting_values->array[setting_values->used], main->program.error.notable);
fl_print_format(f_string_format_sentence_end_quote_s.string, main->program.error.to, main->program.error.context, main->program.error.context, f_string_eol_s);
- controller_print_rule_error_cache(&main->program.error, cache->action, F_false);
+ controller_print_error_rule_cache(&main->program.error, cache->action, F_false);
controller_unlock_print_flush(main->program.error.to, &main->thread);
}
else {
// This function should only return F_complete_not_utf on error.
- controller_print_rule_error(&main->program.error, cache->action, F_complete_not_utf, "controller_validate_environment_name", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, F_complete_not_utf, "controller_validate_environment_name", F_true, F_false);
if (F_status_is_error_not(status_return)) {
status_return = status;
setting_values->array[setting_values->used].used = 0;
- controller_print_rule_item_error(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
continue;
}
rule->has |= controller_rule_has_environment_d;
if (cache->content_actions.array[i].used) {
- controller_print_rule_setting_read_values(main, controller_environment_s, i, cache);
+ controller_print_error_rule_setting_values(main, controller_environment_s, i, cache);
}
else {
if (main->program.error.verbosity == f_console_verbosity_debug_e || (main->program.error.verbosity == f_console_verbosity_verbose_e && (main->setting.flag & controller_main_flag_simulate_e))) {
// The "on" Rule Setting.
if (cache->content_actions.array[i].used != 4) {
- controller_print_rule_setting_read_error(&main->program.error, "requires exactly four Content", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting(&main->program.error, "requires exactly four Content", i, line_item, &main->thread, cache);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
fl_print_format("%[' but only supports %r, %r, %r, %r, %r", main->program.error.to, main->program.error.context, controller_freeze_s, controller_kill_s, controller_pause_s, controller_reload_s, controller_restart_s);
fl_print_format("%r, %r, %r, and %r.%]%r", main->program.error.to, controller_resume_s, controller_start_s, controller_stop_s, controller_thaw_s, main->program.error.context, f_string_eol_s);
- controller_print_rule_error_cache(&main->program.error, cache->action, F_false);
+ controller_print_error_rule_cache(&main->program.error, cache->action, F_false);
controller_unlock_print_flush(main->program.error.to, &main->thread);
}
}
if (F_status_is_error(status)) {
- controller_print_rule_error(&main->program.error, cache->action, F_status_set_fine(status), macro_controller_f(f_memory_array_increase), F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), macro_controller_f(f_memory_array_increase), F_true, F_false);
}
else {
if (f_compare_dynamic_partial_string(controller_need_s.string, cache->buffer_item, controller_need_s.used, cache->content_actions.array[i].array[1]) == F_equal_to) {
fl_print_format(f_string_format_Q_range_single_s.string, main->program.error.to, main->program.error.notable, cache->buffer_item, cache->content_actions.array[i].array[1], main->program.error.notable);
fl_print_format("%[' but only supports %r, %r, and %r.%]%r", main->program.error.to, main->program.error.context, controller_need_s, controller_want_s, controller_wish_s, main->program.error.context, f_string_eol_s);
- controller_print_rule_error_cache(&main->program.error, cache->action, F_false);
+ controller_print_error_rule_cache(&main->program.error, cache->action, F_false);
controller_unlock_print_flush(main->program.error.to, &main->thread);
}
status = f_memory_array_increase_by(controller_allocation_small_d, sizeof(f_string_dynamic_t), (void **) &setting_values->array, &setting_values->used, &setting_values->size);
if (F_status_is_error(status)) {
- controller_print_rule_error(&main->program.error, cache->action, F_status_set_fine(status), "f_memory_array_increase_by", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_memory_array_increase_by", F_true, F_false);
}
}
cache->action.line_action = ++cache->action.line_item;
- controller_print_rule_item_error(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
continue;
}
cache->action.line_action = ++cache->action.line_item;
- controller_print_rule_item_error(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
continue;
}
if (F_status_is_error(status)) {
setting_values->array[setting_values->used].used = 0;
- controller_print_rule_error(&main->program.error, cache->action, F_status_set_fine(status), "f_file_name_base", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_file_name_base", F_true, F_false);
if (F_status_set_fine(status) == F_memory_not) {
status_return = status;
controller_lock_print(main->program.error.to, &main->thread);
fl_print_format("%r%[%QUnsupported action type '%]", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, main->program.error.context);
- fl_print_format(f_string_format_r_single_s.string, main->program.error.to, main->program.error.notable, controller_convert_rule_action_type_string(action), main->program.error.notable);
+ fl_print_format(f_string_format_Q_single_s.string, main->program.error.to, main->program.error.notable, controller_convert_rule_action_type_string(action), main->program.error.notable);
fl_print_format("%[' while attempting to validate rule execution.%]%r", main->program.error.to, main->program.error.context, main->program.error.context, f_string_eol_s);
- controller_print_rule_error_cache(&main->program.error, cache->action, F_true);
+ controller_print_error_rule_cache(&main->program.error, cache->action, F_true);
controller_unlock_print_flush(main->program.error.to, &main->thread);
}
f_status_t status_lock = controller_lock_read(is_normal, &main->thread, &main->thread.lock.instance);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status_lock), F_true);
+ controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status_lock), F_true);
return status_lock;
}
status_lock = controller_lock_write(is_normal, &main->thread, &instance_list[i]->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status_lock), F_false);
+ controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status_lock), F_false);
f_thread_unlock(&instance_list[i]->active);
} // for
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status_lock), F_true);
+ controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status_lock), F_true);
return status_lock;
}
status = f_thread_lock_write(&instance->lock);
if (F_status_is_error(status)) {
- controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status), F_false);
+ controller_print_error_lock_critical(&main->program.error, F_status_set_fine(status), F_false);
f_thread_unlock(&instance->active);