The migration is not complete.
This simply has all of the compilation problems addressed.
There are still several print functions that need to be migrated.
There are probably a lot of out of date comments, which will be fixed as discovered.
I need to walk through each and every function, from a start to finish perspective, and make sure that all the logic is still valid.
I have good reason to believe that there are a lot of things to correct.
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
-build_sources_library main/common.c main/common/define.c main/common/enumeration.c main/common/print.c main/common/string.c main/common/type.c
-build_sources_library main/common/type/cache.c main/common/type/control.c main/common/type/entry.c main/common/type/execute.c main/common/type/instance.c main/common/type/interrupt.c main/common/type/lock.c main/common/type/process.c main/common/type/rule.c main/common/type/thread.c
-build_sources_library main/common/string/general.c main/common/string/rule.c
-build_sources_library main/convert.c main/instance.c main/instance/prepare.c main/instance/wait.c
-build_sources_library main/entry.c main/entry/action.c main/entry/preprocess.c main/entry/process.c main/entry/setting.c
-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/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/item.c main/print/warning/entry/setting.c
-build_sources_library main/signal.c main/status.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/common.h main/controller.h main/common/define.h main/common/enumeration.h main/common/print.h main/common/string.h main/common/thread.h main/common/type.h
-build_sources_headers main/common/define/control.h main/common/define/entry.h main/common/define/rule.h main/common/define/thread.h
-build_sources_headers main/common/enumeration/control.h main/common/enumeration/entry.h main/common/enumeration/instance.h main/common/enumeration/process.h main/common/enumeration/rule.h main/common/enumeration/thread.h
-build_sources_headers main/common/string/general.h main/common/string/rule.h
-build_sources_headers main/common/type/cache.h main/common/type/control.h main/common/type/defs.h main/common/type/entry.h main/common/type/execute.h main/common/type/instance.h main/common/type/interrupt.h main/common/type/lock.h main/common/type/process.h main/common/type/rule.h main/common/type/thread.h
-build_sources_headers main/convert.h main/instance.h main/instance/prepare.h main/instance/wait.h
-build_sources_headers main/entry.h main/entry/action.h main/entry/preprocess.h main/entry/process.h main/entry/setting.h
-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/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/item.h main/print/warning/entry/setting.h
-build_sources_headers main/signal.h main/status.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
+build_sources_library common.c common/define.c common/enumeration.c common/print.c common/string.c common/type.c
+build_sources_library common/type/cache.c common/type/control.c common/type/entry.c common/type/execute.c common/type/instance.c common/type/interrupt.c common/type/lock.c common/type/process.c common/type/rule.c common/type/thread.c
+build_sources_library common/string/general.c common/string/rule.c
+build_sources_library convert.c instance.c instance/prepare.c instance/wait.c
+build_sources_library entry.c entry/action.c entry/preprocess.c entry/process.c entry/setting.c
+build_sources_library file.c lock.c path.c process.c
+build_sources_library rule.c rule/action.c rule/execute.c rule/expand.c rule/instance.c rule/is.c rule/item.c rule/parameter.c rule/read.c rule/setting.c rule/validate.c rule/wait.c
+build_sources_library perform.c
+build_sources_library print/data.c
+build_sources_library print/debug.c print/debug/rule/action.c print/debug/rule/execute.c print/debug/perform/control.c print/debug/perform/pid.c
+build_sources_library print/error.c
+build_sources_library print/error/entry.c print/error/entry/action.c print/error/entry/item.c print/error/entry/setting.c
+build_sources_library print/error/perform/pid.c
+build_sources_library print/error/rule.c print/error/rule/action.c print/error/rule/item.c print/error/rule/setting.c
+build_sources_library print/lock.c print/error/lock.c
+build_sources_library print/output/entry/setting.c print/output/rule/execute.c
+build_sources_library print/message.c print/message/entry.c print/message/entry/action.c print/message/entry/item.c
+build_sources_library print/verbose.c
+build_sources_library print/warning.c print/warning/entry/action.c print/warning/entry/item.c print/warning/entry/setting.c print/warning/rule/action.c
+build_sources_library signal.c status.c time.c
+build_sources_library thread.c thread/cleanup.c thread/control.c thread/entry.c thread/instance.c thread/is.c thread/rule.c thread/signal.c
+build_sources_library validate.c
+
+build_sources_headers common.h controller.h common/define.h common/enumeration.h common/print.h common/string.h common/thread.h common/type.h
+build_sources_headers common/define/control.h common/define/entry.h common/define/rule.h common/define/thread.h
+build_sources_headers common/enumeration/control.h common/enumeration/entry.h common/enumeration/instance.h common/enumeration/process.h common/enumeration/rule.h common/enumeration/thread.h
+build_sources_headers common/string/general.h common/string/rule.h
+build_sources_headers common/type/cache.h common/type/control.h common/type/defs.h common/type/entry.h common/type/execute.h common/type/instance.h common/type/interrupt.h common/type/lock.h common/type/process.h common/type/rule.h common/type/thread.h
+build_sources_headers convert.h instance.h instance/prepare.h instance/wait.h
+build_sources_headers entry.h entry/action.h entry/preprocess.h entry/process.h entry/setting.h
+build_sources_headers file.h lock.h path.h process.h
+build_sources_headers rule.h rule/action.h rule/execute.h rule/expand.h rule/instance.h rule/is.h rule/item.h rule/parameter.h rule/read.h rule/setting.h rule/validate.h rule/wait.h
+build_sources_headers perform.h
+build_sources_headers print/data.h
+build_sources_headers print/debug.h print/debug/rule/action.h print/debug/rule/execute.h print/debug/perform/control.h print/debug/perform/pid.h
+build_sources_headers print/error.h
+build_sources_headers print/error/entry.h print/error/entry/action.h print/error/entry/item.h print/error/entry/setting.h
+build_sources_headers print/error/perform/pid.h
+build_sources_headers print/error/rule.h print/error/rule/action.h print/error/rule/item.h print/error/rule/setting.h
+build_sources_headers print/lock.h print/error/lock.h
+build_sources_headers print/output/entry/setting.h print/output/rule/execute.h
+build_sources_headers print/message.h print/message/entry.h print/message/entry/action.h print/message/entry/item.h
+build_sources_headers print/verbose.h
+build_sources_headers print/warning.h print/warning/entry/action.h print/warning/entry/item.h print/warning/entry/setting.h print/warning/rule/action.h
+build_sources_headers signal.h status.h time.h
+build_sources_headers thread.h thread/cleanup.h thread/control.h thread/entry.h thread/instance.h thread/is.h thread/rule.h thread/signal.h
+build_sources_headers validate.h
build_sources_documentation man
build_shared yes
build_static no
-path_headers program/controller
+path_headers program/controller/main
path_library_script script
path_library_shared shared
path_library_static static
path_program_script script
path_program_shared shared
path_program_static static
+path_sources sources/c/main
-has_path_standard yes
+has_path_standard no
preserve_path_headers yes
search_exclusive yes
}
data.callback.process_entry_setup = &controller_init_process_entry_setup;
+ data.process.entry.pid = controller_entry_pid_disable_e;
+ data.process.entry.show = controller_entry_show_init_e;
+ data.process.mode = controller_process_mode_service_e;
data.setting.flag &= ~controller_main_flag_interruptible_e;
- process.entry.pid = controller_entry_pid_disable_e;
- process.entry.show = controller_entry_show_init_e;
- process.mode = controller_process_mode_service_e;
-
fll_program_standard_set_up(&data.program);
f_file_umask_get(&data.program.umask);
"controller_convert_user_id",
"controller_entry_setting_read_map",
"controller_file_load",
+ "controller_file_pid_create",
"controller_lock_create",
"controller_rule_copy",
+ "controller_rule_expand",
"controller_path_canonical_relative",
"f_console_parameter_process",
"f_environment_get_all",
"f_file_exists",
"f_file_mode_to_mode",
"f_file_name_base",
+ "f_file_remove",
+ "f_file_role_change",
"f_file_stat",
"f_file_stream_open",
"f_file_stream_read",
"f_path_current",
"f_rip_dynamic_partial",
"f_rip_dynamic_partial_nulless",
+ "f_socket_bind",
+ "f_socket_create",
"f_string_append_assure",
"f_string_dynamic_append",
"f_string_dynamic_append_assure",
controller_f_controller_convert_user_id_e,
controller_f_controller_entry_setting_read_map_e,
controller_f_controller_file_load_e,
+ controller_f_controller_file_pid_create_e,
controller_f_controller_lock_create_e,
controller_f_controller_rule_copy_e,
+ controller_f_controller_rule_expand_e,
controller_f_controller_path_canonical_relative_e,
controller_f_f_console_parameter_process_e,
controller_f_f_environment_get_all_e,
controller_f_f_file_exists_e,
controller_f_f_file_mode_to_mode_e,
controller_f_f_file_name_base_e,
+ controller_f_f_file_remove_e,
+ controller_f_f_file_role_change_e,
controller_f_f_file_stat_e,
controller_f_f_file_stream_open_e,
controller_f_f_file_stream_read_e,
controller_f_f_path_current_e,
controller_f_f_rip_dynamic_partial_e,
controller_f_f_rip_dynamic_partial_nulless_e,
- controller_f_f_string_append_assure_e,
+ controller_f_f_socket_bind_e,
+ controller_f_f_socket_create_e,
controller_f_f_string_dynamic_append_e,
+ controller_f_f_string_append_assure_e,
controller_f_f_string_dynamic_append_assure_e,
controller_f_f_string_dynamic_append_nulless_e,
controller_f_f_string_dynamic_partial_append_e,
controller_rules_t rules;
};
- #define controller_process_tinitialize { \
+ #define controller_process_t_initialize { \
0, \
0, \
0, \
#include <program/controller/main/print/warning/entry/action.h>
#include <program/controller/main/print/warning/entry/item.h>
#include <program/controller/main/print/warning/entry/setting.h>
+#include <program/controller/main/print/warning/rule/action.h>
#include <program/controller/main/signal.h>
#include <program/controller/main/status.h>
#include <program/controller/main/time.h>
if (!main || !entry || !actions) return F_status_set_error(F_parameter);
- f_status_t status = F_okay;
f_status_t status_action = F_okay;
actions->used = 0;
#endif
#ifndef _di_controller_entry_process_
- f_status_t controller_entry_process(controller_t * const main, const bool failsafe, const uint8_t is_entry) {
+ f_status_t controller_entry_process(controller_t * const main, const uint8_t failsafe, const uint8_t is_entry) {
f_status_t status = F_okay;
f_status_t status_lock = F_okay;
* @see controller_perform_ready()
*/
#ifndef _di_controller_entry_process_
- extern f_status_t controller_entry_process(controller_t * const main, const bool failsafe, const uint8_t is_entry);
+ extern f_status_t controller_entry_process(controller_t * const main, const uint8_t failsafe, const uint8_t is_entry);
#endif // _di_controller_entry_process_
#ifdef __cplusplus
#endif
#ifndef _di_controller_instance_prepare_
- f_status_t controller_instance_prepare(controller_t * const main, const bool is_normal, const uint8_t action, const f_string_static_t alias, f_number_unsigned_t *id) {
+ f_status_t controller_instance_prepare(controller_t * const main, const uint8_t is_normal, const uint8_t action, const f_string_static_t alias, f_number_unsigned_t *id) {
if (!main) return F_status_set_error(F_parameter);
* @see controller_lock_write()
*/
#ifndef _di_controller_instance_prepare_
- extern f_status_t controller_instance_prepare(controller_t * const main, const bool is_normal, const uint8_t action, const f_string_static_t alias, f_number_unsigned_t *id);
+ extern f_status_t controller_instance_prepare(controller_t * const main, const uint8_t is_normal, const uint8_t action, const f_string_static_t alias, f_number_unsigned_t *id);
#endif // _di_controller_instance_prepare_
/**
#endif // _di_controller_lock_create_
#ifndef _di_controller_lock_read_
- f_status_t controller_lock_read(const bool is_normal, controller_thread_t * const thread, f_thread_lock_t * const lock) {
+ f_status_t controller_lock_read(const uint8_t is_normal, controller_thread_t * const thread, f_thread_lock_t * const lock) {
if (!thread || !lock) return F_status_set_error(F_parameter);
#endif // _di_controller_lock_read_instance_type_
#ifndef _di_controller_lock_write_
- f_status_t controller_lock_write(const bool is_normal, controller_thread_t * const thread, f_thread_lock_t * const lock) {
+ f_status_t controller_lock_write(const uint8_t is_normal, controller_thread_t * const thread, f_thread_lock_t * const lock) {
if (!thread || !lock) return F_status_set_error(F_parameter);
* @see f_thread_lock_read_timed()
*/
#ifndef _di_controller_lock_read_
- extern f_status_t controller_lock_read(const bool is_normal, controller_thread_t * const thread, f_thread_lock_t * const lock);
+ extern f_status_t controller_lock_read(const uint8_t is_normal, controller_thread_t * const thread, f_thread_lock_t * const lock);
#endif // _di_controller_lock_read_
/**
* @see f_thread_lock_write_timed()
*/
#ifndef _di_controller_lock_write_
- extern f_status_t controller_lock_write(const bool is_normal, controller_thread_t * const thread, f_thread_lock_t * const lock);
+ extern f_status_t controller_lock_write(const uint8_t is_normal, controller_thread_t * const thread, f_thread_lock_t * const lock);
#endif // _di_controller_lock_write_
/**
status = f_file_remove(main->process.path_control);
if (F_status_set_fine(status) == F_memory_not) {
- controller_print_error(global->thread, &main->program.error, F_status_set_fine(status), macro_controller_f(f_file_remove), F_true);
+ controller_print_error_status(&main->program.error, macro_controller_f(f_file_remove), F_status_set_fine(status));
return status;
}
}
if (F_status_set_fine(status) == F_memory_not) {
- controller_print_error(global->thread, &main->program.error, F_status_set_fine(status), macro_controller_f(f_socket_bind), F_true);
+ controller_print_error_status(&main->program.error, macro_controller_f(f_socket_bind), F_status_set_fine(status));
}
else {
controller_print_debug_perform_control_socket_failure(&main->program.debug, F_status_set_fine(status), "could not be bound");
}
if (F_status_set_fine(status) == F_memory_not) {
- controller_print_error(global->thread, &main->program.error, F_status_set_fine(status), macro_controller_f(f_file_role_change), F_true);
+ controller_print_error_status(&main->program.error, macro_controller_f(f_file_role_change), F_status_set_fine(status));
}
else {
controller_print_debug_perform_control_socket_failure(&main->program.debug, F_status_set_fine(status), "failed to set file roles");
}
if (F_status_set_fine(status) == F_memory_not) {
- controller_print_error(global->thread, &main->program.error, F_status_set_fine(status), macro_controller_f(f_file_role_change), F_true);
+ controller_print_error_status(&main->program.error, macro_controller_f(f_file_role_change), F_status_set_fine(status));
}
else {
controller_print_debug_perform_control_socket_failure(&main->program.debug, F_status_set_fine(status), "failed to set file mode");
}
}
- controller_print_perform_debug_control_socket_success(&main->program.debug);
+ controller_print_debug_perform_control_socket_success(&main->program.debug);
// Disabled, not yet implemented.
- //status = f_thread_create(0, &global->thread->id_control, &controller_thread_control, (void *) global);
+ //status = f_thread_create(0, &main->thread.id_control, &controller_thread_control, (void *) main);
if (status == F_child) return status;
f_file_remove(main->process.path_control);
}
- if (global->thread->id_control) {
- f_thread_cancel(global->thread->id_control);
- f_thread_join(global->thread->id_control, 0);
+ if (main->thread.id_control) {
+ f_thread_cancel(main->thread.id_control);
+ f_thread_join(main->thread.id_control, 0);
- global->thread->id_control = 0;
+ main->thread.id_control = 0;
}
controller_print_error_status(&main->program.error, macro_controller_f(f_thread_create), F_status_set_fine(status));
-#include "../../controller.h"
+#include "../../../controller.h"
#ifdef __cplusplus
extern "C" {
#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) {
+ f_status_t controller_print_debug_perform_control_socket_success(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;
* This requires print.custom to be controller_t.
*
* This does not alter print.custom.setting.state.status.
+ *
+ * Must not be NULL.
* @param status
* The status code relating to the failure.
* @param message
*
* This does not alter print.custom.setting.state.status.
*
+ * Must not be NULL.
+ *
* @return
* F_okay on success.
* F_output_not on success, but no printing is performed.
*
* This does not alter print.custom.setting.state.status.
*
+ * Must not be NULL.
+ *
* @return
* F_okay on success.
* F_output_not on success, but no printing is performed.
-#include "../../controller.h"
+#include "../../../controller.h"
#ifdef __cplusplus
extern "C" {
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->process.path_pid, f_file_operation_create_s, fll_error_file_type_file_e, status);
+ controller_print_error_file_status(print, function, main->process.path_pid, f_file_operation_create_s, fll_error_file_type_file_e, status);
}
f_file_stream_lock(print->to);
#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) {
+ f_status_t controller_main_print_debug_rule_execute_rerun(fl_print_t * const print, controller_instance_t * const instance, 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 || !print->custom || !instance || !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;
* The output structure to print to.
*
* Must not be NULL.
+ * @param instance
+ * The Controller Instance.
+ *
+ * Must not be NULL.
* @param rerun
* The rerun data.
*
* F_output_not (with error bit) if setting is NULL.
*/
#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);
+ extern f_status_t controller_main_print_debug_rule_execute_rerun(fl_print_t * const print, controller_instance_t * const instance, controller_rule_rerun_item_t * const rerun, const uint8_t action);
#endif // _di_controller_main_print_debug_rule_execute_rerun_
#ifdef __cplusplus
#endif
#ifndef _di_controller_print_error_entry_
- f_status_t controller_print_error_entry(fl_print_t * const print, const uint8_t is_entry, const f_status_t status, const char * const function, const bool fallback) {
+ f_status_t controller_print_error_entry(fl_print_t * const print, const uint8_t is_entry, const f_status_t status, const f_string_t function, const uint8_t fallback) {
if (!print || !print->custom) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
#endif // _di_controller_print_error_entry_cache_
#ifndef _di_controller_print_error_entry_file_
- f_status_t controller_print_error_entry_file(fl_print_t * const print, 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) {
+ f_status_t controller_print_error_entry_file(fl_print_t * const print, const uint8_t is_entry, const f_status_t status, const f_string_t function, const uint8_t 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 || !print->custom) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
if (status == F_interrupt) return F_status_set_error(F_output_not);
* F_output_not (with error bit) if setting is NULL.
*/
#ifndef _di_controller_print_error_entry_
- extern f_status_t controller_print_error_entry(fl_print_t * const print, const uint8_t is_entry, const f_status_t status, const char * const function, const bool fallback);
+ extern f_status_t controller_print_error_entry(fl_print_t * const print, const uint8_t is_entry, const f_status_t status, const f_string_t function, const uint8_t fallback);
#endif // _di_controller_print_error_entry_
/**
* F_output_not (with error bit) if setting is NULL.
*/
#ifndef _di_controller_print_error_entry_file_
- extern f_status_t controller_print_error_entry_file(fl_print_t * const print, 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);
+ extern f_status_t controller_print_error_entry_file(fl_print_t * const print, const uint8_t is_entry, const f_status_t status, const f_string_t 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
controller_lock_print(print->to, &main->thread);
fl_print_format("%r%[%QThe %r item named '%]", print->to, f_string_eol_s, print->context, is_entry ? controller_entry_s : controller_exit_s, print->prefix, print->context);
- fl_print_format(f_string_format_Q_single_s.string, print->to, print->notable, parameter, print->notable);
+ fl_print_format(f_string_format_Q_single_s.string, print->to, print->notable, name, print->notable);
fl_print_format("%[' %S.%]%r", print->to, print->context, message, print->context, f_string_eol_s);
controller_print_error_entry_cache(print, &cache->action, is_entry);
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 || !print->custom) 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;
-#include "../../controller.h"
+#include "../../../controller.h"
#ifdef __cplusplus
extern "C" {
controller_lock_print(print->to, &main->thread);
- controller_print_error_file_status(print, function, F_true, main->process.path_pid, f_file_operation_create_s, fll_error_file_type_file_e, status);
+ controller_print_error_file_status(print, function, main->process.path_pid, f_file_operation_create_s, fll_error_file_type_file_e, status);
f_file_stream_lock(print->to);
- controller_print_error_entry_cache(print->to, &main->thread.cache.action, is_entry);
+ controller_print_error_entry_cache(print, &main->thread.cache.action, is_entry);
controller_unlock_print_flush(print->to, &main->thread);
}
#endif
#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) {
+ f_status_t controller_print_error_rule(fl_print_t * const print, controller_cache_action_t * const action, 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_error_rule_cache(print, cache, item);
+ controller_print_error_rule_cache(print, action, item);
controller_unlock_print_flush(print->to, &main->thread);
#endif // _di_controller_print_error_rule_
#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) {
+ f_status_t controller_print_error_rule_cache(fl_print_t * const print, controller_cache_action_t * const action, const uint8_t item) {
- if (!print || !cache) return F_status_set_error(F_output_not);
+ if (!print || !action) 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 (action->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, action->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, action->line_action, print->notable);
fl_print_format("%[ for ", print->to, print->context);
}
- if (cache->name_item.used) {
+ if (action->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, action->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, action->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 (action->name_file.used) {
+ fl_print_format("rule file '%]%[%Q%]%['", print->to, print->context, print->notable, action->name_file, print->notable, print->context);
}
fl_print_format(".%]%r", print->to, print->context, f_string_eol_s);
* This does not alter print.custom.setting.state.status.
*
* Must not be NULL.
- * @param cache
- * The cache.
+ * @param action
+ * The action cache.
*
* Must not be NULL.
* @param status
* F_output_not (with error bit) if setting is NULL.
*/
#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);
+ extern f_status_t controller_print_error_rule(fl_print_t * const print, controller_cache_action_t * const action, const f_status_t status, const f_string_t function, const uint8_t fallback, const uint8_t item);
#endif // _di_controller_print_error_rule_
/**
* This does not alter print.custom.setting.state.status.
*
* Must not be NULL.
- * @param cache
- * The cache.
+ * @param action
+ * The action cache.
*
* Must not be NULL.
* @param item
* F_output_not (with error bit) if setting is NULL.
*/
#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);
+ extern f_status_t controller_print_error_rule_cache(fl_print_t * const print, controller_cache_action_t * const action, const uint8_t item);
#endif // _di_controller_print_error_rule_cache_
#ifdef __cplusplus
#endif
#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) {
+ f_status_t controller_print_error_rule_item(fl_print_t * const print, controller_cache_action_t * const action, const uint8_t item, const f_status_t status) {
- if (!print || !print->custom) return F_status_set_error(F_output_not);
+ if (!print || !print->custom || !action) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
if (status == F_interrupt) return F_status_set_error(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_error_rule_cache(print, cache, item);
+ controller_print_error_rule_cache(print, action, item);
f_file_stream_lock(print->to);
#endif // _di_controller_print_error_rule_item_action_first_
#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) {
+ 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, const f_status_t status) {
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;
#endif // _di_controller_print_error_rule_item_action_second_
#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) {
+ 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 buffer, const f_range_t range) {
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("%r%[%QRule item action '%]", 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("%[' 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_Q_range_single_s.string, print->to, print->notable, buffer, range, 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_rule_cache(print, &cache->action, F_true);
#endif // _di_controller_print_error_rule_item_action_unknown_
#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) {
+ f_status_t controller_print_error_rule_item_execute(fl_print_t * const print, controller_instance_t * const instance, const uint8_t 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;
* This is explicitly intended to be used in addition to the error message.
*
* @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.
+ *
+ * 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.
* F_output_not (with error bit) if setting is NULL.
*/
#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);
+ extern f_status_t controller_print_error_rule_item(fl_print_t * const print, controller_cache_action_t * const cache, const uint8_t item, const f_status_t status);
#endif // _di_controller_print_error_rule_item_
/**
* The Object name.
* @param index
* The index position in cache.content_action representing the Content range for the cache.buffer_item buffer..
+ * @param status
+ * The status code of the error.
*
* @return
* F_okay on success.
* F_output_not (with error bit) if setting is NULL.
*/
#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);
+ 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, const f_status_t status);
#endif // _di_controller_print_error_rule_item_action_positive_number_not_
/**
* Must not be NULL.
* @param name
* The parameter name whose value is unknown.
- * @param unknown
- * The unknown value.
+ * @param buffer
+ * The buffer containing the setting name.
+ * @param range
+ * The range within the buffer representing the unknown action name.
*
* @return
* F_okay on success.
* F_output_not (with error bit) if setting is NULL.
*/
#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);
+ 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 buffer, const f_range_t range);
#endif // _di_controller_print_error_rule_item_action_unknown_
/**
* F_output_not (with error bit) if setting is NULL.
*/
#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);
+ extern f_status_t controller_print_error_rule_item_execute(fl_print_t * const print, controller_instance_t * const instance, const uint8_t script_is, const f_string_static_t name, const f_status_t status);
#endif // _di_controller_print_error_rule_item_execute_
/**
#endif
#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) {
+ f_status_t controller_print_error_rule_setting(fl_print_t * const print, 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 || !print->custom || !cache) return F_status_set_error(F_output_not);
if (print->verbosity == f_console_verbosity_quiet_e) return F_output_not;
controller_t * const main = (controller_t *) print->custom;
cache->action.line_action = ++cache->action.line_item;
- controller_lock_print(print->to, thread);
+ controller_lock_print(print->to, &main->thread);
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_error_rule_cache(print, &cache->action, F_false);
- controller_unlock_print_flush(print->to, thread);
+ controller_unlock_print_flush(print->to, &main->thread);
return F_okay;
}
#endif // _di_controller_print_error_rule_setting_
#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) {
+ f_status_t controller_print_error_rule_setting_with_range(fl_print_t * const print, 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 || !print->custom || !cache) return F_status_set_error(F_output_not);
if (print->verbosity == f_console_verbosity_quiet_e) return F_output_not;
controller_t * const main = (controller_t *) print->custom;
cache->action.line_action = ++cache->action.line_item;
- controller_lock_print(print->to, thread);
+ controller_lock_print(print->to, &main->thread);
fl_print_format("%r%[%QRule setting%S '%]", print->to, f_string_eol_s, print->context, print->prefix, before, print->context);
fl_print_format(f_string_format_Q_range_single_s.string, print->to, print->notable, cache->buffer_item, range, print->notable);
controller_print_error_rule_cache(print, &cache->action, F_false);
- controller_unlock_print_flush(print->to, thread);
+ controller_unlock_print_flush(print->to, &main->thread);
return F_okay;
}
#endif // _di_controller_print_error_rule_setting_with_range_
#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) {
+ f_status_t controller_print_error_rule_setting_mapping(fl_print_t * const print, 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))) {
+ if (!print || !print->custom) return F_status_set_error(F_output_not);
+
+ controller_t * const main = (controller_t *) print->custom;
+
+ if (print->verbosity != f_console_verbosity_debug_e) {
+ if (!(print->verbosity == f_console_verbosity_verbose_e && (main->setting.flag & controller_main_flag_simulate_e))) {
return F_output_not;
}
}
- controller_lock_print(main->program.output.to, &main->thread);
+ controller_lock_print(print->to, &main->thread);
- fl_print_format("%rProcessing rule item action '%[%Q%]'", main->program.output.to, f_string_eol_s, main->program.context.set.title, name, main->program.context.set.title);
- fl_print_format(" mapping '%[%Q%]'", main->program.output.to, main->program.context.set.important, map.key, main->program.context.set.important);
- fl_print_format(" to value '%[%Q%]'.%r", main->program.output.to, main->program.context.set.important, map.value, main->program.context.set.important, f_string_eol_s);
+ fl_print_format("%rProcessing rule item action '%[%Q%]'", print->to, f_string_eol_s, print->set->title, name, print->set->title);
+ fl_print_format(" mapping '%[%Q%]'", print->to, print->set->important, map.key, print->set->important);
+ fl_print_format(" to value '%[%Q%]'.%r", print->to, print->set->important, map.value, print->set->important, f_string_eol_s);
- controller_unlock_print_flush(main->program.output.to, &main->thread);
+ controller_unlock_print_flush(print->to, &main->thread);
return F_okay;
}
#endif // _di_controller_print_error_rule_setting_mapping_
#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) {
+ f_status_t controller_print_error_rule_setting_value(fl_print_t * const print, 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))) {
+ if (!print || !print->custom) return F_status_set_error(F_output_not);
+
+ controller_t * const main = (controller_t *) print->custom;
+
+ if (print->verbosity != f_console_verbosity_debug_e) {
+ if (!(print->verbosity == f_console_verbosity_verbose_e && (main->setting.flag & controller_main_flag_simulate_e))) {
return F_output_not;
}
}
- controller_lock_print(main->program.output.to, &main->thread);
+ controller_lock_print(print->to, &main->thread);
- fl_print_format("%rProcessing rule item action '%[%Q%]' setting ", main->program.output.to, f_string_eol_s, main->program.context.set.title, name, main->program.context.set.title);
+ fl_print_format("%rProcessing rule item action '%[%Q%]' setting ", print->to, f_string_eol_s, print->set->title, name, print->set->title);
if (name_sub.used) {
- fl_print_format("'%[%Q%]'", main->program.output.to, main->program.context.set.notable, name_sub, main->program.context.set.notable);
+ fl_print_format("'%[%Q%]'", print->to, print->set->notable, name_sub, print->set->notable);
}
else {
- f_print_terminated("value", main->program.output.to);
+ f_print_terminated("value", print->to);
}
- fl_print_format(" to '%[%Q%]'", main->program.output.to, main->program.context.set.important, value, main->program.context.set.important);
- fl_print_format("%S.%r", main->program.output.to, suffix, f_string_eol_s);
+ fl_print_format(" to '%[%Q%]'", print->to, print->set->important, value, print->set->important);
+ fl_print_format("%S.%r", print->to, suffix, f_string_eol_s);
- controller_unlock_print_flush(main->program.output.to, &main->thread);
+ controller_unlock_print_flush(print->to, &main->thread);
return F_okay;
}
#endif // _di_controller_print_error_rule_setting_value_
#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) {
+ f_status_t controller_print_error_rule_setting_values(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) return F_status_set_error(F_output_not);
+
+ controller_t * const main = (controller_t *) print->custom;
- 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))) {
+ if (print->verbosity != f_console_verbosity_debug_e) {
+ if (!(print->verbosity == f_console_verbosity_verbose_e && (main->setting.flag & controller_main_flag_simulate_e))) {
return F_output_not;
}
}
- controller_lock_print(main->program.output.to, &main->thread);
+ controller_lock_print(print->to, &main->thread);
- fl_print_format("%rProcessing rule item action '%[%Q%]' setting value to", main->program.output.to, f_string_eol_s, main->program.context.set.title, name, main->program.context.set.title);
+ fl_print_format("%rProcessing rule item action '%[%Q%]' setting value to", print->to, f_string_eol_s, print->set->title, name, print->set->title);
for (f_number_unsigned_t j = 0; j < cache->content_actions.array[index].used; ++j) {
- fl_print_format(" '%[%/Q%]'", main->program.output.to, main->program.context.set.important, cache->buffer_item, cache->content_actions.array[index].array[j], main->program.context.set.important);
+ fl_print_format(" '%[%/Q%]'", print->to, print->set->important, cache->buffer_item, cache->content_actions.array[index].array[j], print->set->important);
if (j + 2 == cache->content_actions.array[index].used) {
if (cache->content_actions.array[index].used > 2) {
- f_print_terminated(",", main->program.output.to);
+ f_print_terminated(",", print->to);
}
- f_print_terminated(" and", main->program.output.to);
+ f_print_terminated(" and", print->to);
}
else if (j + 1 < cache->content_actions.array[index].used) {
- f_print_terminated(",", main->program.output.to);
+ f_print_terminated(",", print->to);
}
} // for
- fl_print_format(".%r", main->program.output.to, f_string_eol_s);
+ fl_print_format(".%r", print->to, f_string_eol_s);
- controller_unlock_print_flush(main->program.output.to, &main->thread);
+ controller_unlock_print_flush(print->to, &main->thread);
return F_okay;
}
*
* @param print
* The error or warning output structure.
+ *
+ * Must not be NULL.
+ * @param cache
+ * A structure for containing and caching relevant data.
+ *
+ * Must not be NULL.
* @param message
* The string to append to the message being printed.
* @param index
* The current line number.
* @param thread
* The thread data.
- * @param cache
- * A structure for containing and caching relevant data.
*
* @return
* F_okay on success.
* F_output_not (with error bit) if setting is NULL.
*/
#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);
+ extern f_status_t controller_print_error_rule_setting(fl_print_t * const print, 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_
/**
*
* @param print
* The error or warning output structure.
+ *
+ * Must not be NULL.
+ * @param cache
+ * A structure for containing and caching relevant data.
+ *
+ * Must not be NULL.
* @param before
* The string to add to the message being printed (before the value).
* @param range
* The current line number.
* @param thread
* The thread data.
- * @param cache
- * A structure for containing and caching relevant data.
*
* @return
* F_okay on success.
* F_output_not (with error bit) if setting is NULL.
*/
#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);
+ extern f_status_t controller_print_error_rule_setting_with_range(fl_print_t * const print, 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.
*
- * @param main
- * The main program data.
+ * @param print
+ * The error or warning output structure.
*
* Must not be NULL.
* @param name
* F_output_not (with error bit) if setting is NULL.
*/
#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);
+ extern f_status_t controller_print_error_rule_setting_mapping(fl_print_t * const print, 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.
*
- * @param main
- * The main program data.
+ * @param print
+ * The error or warning output structure.
*
* Must not be NULL.
* @param name
* F_output_not (with error bit) if setting is NULL.
*/
#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);
+ extern f_status_t controller_print_error_rule_setting_value(fl_print_t * const print, 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_
/**
*
* This handles the case where there are multiple values stored in the buffer_item at a given content_actions position.
*
- * @param main
- * The main program data.
+ * @param print
+ * The error or warning output structure.
+ *
+ * Must not be NULL.
+ * @param cache
+ * A structure for containing and caching relevant data.
*
* Must not be NULL.
* @param name
* The Object name of the setting being populated.
* @param index
* Position within the content_actions range cache array.
- * @param cache
- * A structure for containing and caching relevant data.
*
* @return
* F_okay on success.
* F_output_not (with error bit) if setting is NULL.
*/
#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);
+ extern f_status_t controller_print_error_rule_setting_values(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_setting_values_
#ifdef __cplusplus
if (!print || !action) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
- for (f_array_length_t index = 0; ;) {
+ for (f_number_unsigned_t i = 0; ;) {
- f_print_dynamic_safely(action.parameters.array[index], stream);
+ f_print_dynamic_safely(action->parameters.array[i], print->to);
- ++index;
+ ++i;
- if (index == action.parameters.used) break;
+ if (i == action->parameters.used) break;
- f_print_dynamic_raw(f_string_space_s, stream);
+ f_print_dynamic_raw(f_string_space_s, print->to);
} // for
return F_okay;
fl_print_format("%r ", print->to, prepend);
}
- fl_print_format("%r item '%[%Q%]'.%r", print->to, is_entry ? controller_entry_s : controller_exit_s, print->title, name, print->title, f_string_eol_s);
+ fl_print_format("%r item '%[%Q%]'.%r", print->to, is_entry ? controller_entry_s : controller_exit_s, print->set->title, name, print->set->title, f_string_eol_s);
controller_unlock_print_flush(print->to, &main->thread);
controller_lock_print(print->to, &main->thread);
- fl_print_format("%r%r %r item rule ", print->to, f_string_eol_s, entry_action->type == controller_entry_action_type_consider_e ? controller_print_entry_considering_s : controller_print_entry_processing_s, is_entry ? controller_entry_s : controller_exit_s);
+ fl_print_format("%r%r %r item rule ", print->to, f_string_eol_s, action->type == controller_entry_action_type_consider_e ? controller_print_entry_considering_s : controller_print_entry_processing_s, is_entry ? controller_entry_s : controller_exit_s);
fl_print_format("'%[%Q%]'", print->to, print->set->title, alias_rule, print->set->title);
if (entry->show == controller_entry_show_init_e && !(main->setting.flag & controller_main_flag_simulate_e)) {
- fl_print_format(" [%[%r%]]", print->to, print->notable, entry_action->code == controller_entry_rule_code_asynchronous_d ? controller_asynchronous_s : controller_synchronous_s, print->notable);
+ fl_print_format(" [%[%r%]]", print->to, print->notable, action->code == controller_entry_rule_code_asynchronous_d ? controller_asynchronous_s : controller_synchronous_s, print->notable);
- if (entry_action->code == controller_entry_rule_code_wait_d) {
+ if (action->code == controller_entry_rule_code_wait_d) {
fl_print_format(" [%[%r%]]", print->to, print->notable, controller_wait_s, print->notable);
}
- if (entry_action->code == controller_entry_rule_code_require_d) {
+ if (action->code == controller_entry_rule_code_require_d) {
fl_print_format(" [%[%r%]]", print->to, print->notable, controller_required_s, print->notable);
}
}
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_print_error_rule_cache(print, &cache->action, F_true);
controller_unlock_print_flush(print->to, &main->thread);
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*
- * Provides the print entry warning action functionality.
+ * Provides the print rule warning action functionality.
*
* This is auto-included and should not need to be explicitly included.
*/
#endif // _di_controller_rule_action_type_to_action_execute_type_
#ifndef _di_controller_rule_action_read_
- f_status_t controller_rule_action_read(controller_t * const main, controller_cache_t * const cache, const bool is_normal, const uint8_t type, const uint8_t method, controller_rule_item_t * const item, controller_rule_actions_t * const actions, f_range_t * const range) {
+ f_status_t controller_rule_action_read(controller_t * const main, controller_cache_t * const cache, const uint8_t is_normal, const uint8_t type, const uint8_t method, controller_rule_item_t * const item, controller_rule_actions_t * const actions, f_range_t * const range) {
if (!main || !item || !actions || !range) return F_status_set_error(F_parameter);
for (i = 2; i < cache->content_action.used; ++i) {
if (f_compare_dynamic_partial_string(controller_delay_s.string, cache->buffer_item, controller_delay_s.used, cache->content_action.array[i]) == F_equal_to) {
- state.status = controller_rule_action_read_rerun_number(main, cache, controller_delay_s.string, &i, &rerun_item->delay);
+ state.status = controller_rule_action_read_rerun_number(main, cache, controller_delay_s, &i, &rerun_item->delay);
}
else if (f_compare_dynamic_partial_string(controller_max_s.string, cache->buffer_item, controller_max_s.used, cache->content_action.array[i]) == F_equal_to) {
- state.status = controller_rule_action_read_rerun_number(main, cache, controller_max_s.string, &i, &rerun_item->max);
+ state.status = controller_rule_action_read_rerun_number(main, cache, controller_max_s, &i, &rerun_item->max);
}
else if (f_compare_dynamic_partial_string(controller_reset_s.string, cache->buffer_item, controller_reset_s.used, cache->content_action.array[i]) == F_equal_to) {
item->reruns[type_rerun].is |= rerun_item == &item->reruns[type_rerun].failure ? controller_rule_rerun_is_failure_reset_d : controller_rule_rerun_is_success_reset_d;
}
else {
- controller_print_error_rule_item_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->buffer_item, cache->content_action.array[i]);
return F_status_set_error(F_valid_not);
}
item->with &= ~controller_with_session_new_d;
}
else {
- controller_print_error_rule_item_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->buffer_item, cache->content_action.array[i]);
state.status = F_status_set_error(F_valid_not);
#endif // _di_controller_rule_action_read_
#ifndef _di_controller_rule_action_read_rerun_number_
- f_status_t controller_rule_action_read_rerun_number(controller_t * const main, controller_cache_t * const cache, const f_string_t name, f_number_unsigned_t * const index, f_number_unsigned_t * const number) {
+ f_status_t controller_rule_action_read_rerun_number(controller_t * const main, controller_cache_t * const cache, const f_string_static_t name, f_number_unsigned_t * const index, f_number_unsigned_t * const number) {
f_status_t status = F_okay;
f_number_signed_t parsed = 0;
controller_print_error(&main->program.error, macro_controller_f(fl_conversion_dynamic_partial_to_signed_detect));
}
else {
- controller_print_error_rule_item_action_positive_number_not(&main->program.error, cache, name, *index);
+ controller_print_error_rule_item_action_positive_number_not(&main->program.error, cache, name, *index, status);
}
}
* Must not be NULL.
*
* This does not alter main.setting.state.status.
+ * @param cache
+ * A structure for containing and caching relevant data.
+ *
+ * Must not be NULL.
* @param is_normal
* If TRUE, then process as if this operates during a normal operation (entry and control).
* If FALSE, then process as if this operates during a an exit operation.
* The action type for this action or set of actions.
* @param method
* The action method for this action or set of actions.
- * @param cache
- * A structure for containing and caching relevant data.
- *
- * Must not be NULL.
* @param item
* The processed item.
*
* @see f_memory_array_increase_by()
*/
#ifndef _di_controller_rule_action_read_
- extern f_status_t controller_rule_action_read(controller_t * const main, controller_cache_t * const cache, const bool is_normal, const uint8_t type, const uint8_t method, controller_rule_item_t * const item, controller_rule_actions_t * const actions, f_range_t * const range);
+ extern f_status_t controller_rule_action_read(controller_t * const main, controller_cache_t * const cache, const uint8_t is_normal, const uint8_t type, const uint8_t method, controller_rule_item_t * const item, controller_rule_actions_t * const actions, f_range_t * const range);
#endif // _di_controller_rule_action_read_
/**
* Must not be NULL.
*
* This does not alter main.setting.state.status.
- * @param name
- * The name representing the value whose number is being processed.
* @param cache
* A structure for containing and caching relevant data.
+ *
+ * Must not be NULL.
+ * @param name
+ * The name representing the value whose number is being processed.
* @param index
* The position within the content action array for some rule to process.
* @param number
* @see fl_conversion_dynamic_partial_to_signed_detect()
*/
#ifndef _di_controller_rule_action_read_rerun_number_
- extern f_status_t controller_rule_action_read_rerun_number(controller_t * const main, controller_cache_t * const cache, const f_string_t name, f_number_unsigned_t * const index, f_number_unsigned_t * const number);
+ extern f_status_t controller_rule_action_read_rerun_number(controller_t * const main, controller_cache_t * const cache, const f_string_static_t name, f_number_unsigned_t * const index, f_number_unsigned_t * const number);
#endif // _di_controller_rule_action_read_rerun_number_
status = controller_rule_expand(main, instance->rule.items.array[i].actions.array[j], instance);
if (F_status_is_error(status)) {
- controller_print_error_rule(&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), macro_controller_f(controller_rule_expand), F_true, F_false);
break;
}
status = controller_rule_expand(main, instance->rule.items.array[i].actions.array[j], instance);
if (F_status_is_error(status)) {
- controller_print_error_rule(&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), macro_controller_f(controller_rule_expand), F_true, F_false);
break;
}
status = controller_rule_expand(main, instance->rule.items.array[i].actions.array[j], instance);
if (F_status_is_error(status)) {
- controller_print_error_rule(&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), macro_controller_f(controller_rule_expand), F_true, F_false);
break;
}
status = controller_rule_expand(main, instance->rule.items.array[i].actions.array[j], instance);
if (F_status_is_error(status)) {
- controller_print_error_rule(&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), macro_controller_f(controller_rule_expand), F_true, F_false);
break;
}
// Lock failed, attempt to re-establish lock before returning.
if (F_status_set_fine(status) == F_lock) {
- status = controller_lock_read(instance, &main->thread, &instance->lock);
+ status = controller_lock_read(instance->type != controller_instance_type_exit_e, &main->thread, &instance->lock);
if (F_status_is_error(status)) return F_status_set_error(F_lock);
success = F_false;
if (!controller_thread_is_enabled_instance(instance)) return -2;
if (!rerun_item->max || rerun_item->count < rerun_item->max) {
- controller_main_print_debug_rule_execute_rerun(&main->program.output, return_item, action);
+ controller_main_print_debug_rule_execute_rerun(&main->program.output, instance, rerun_item, action);
if (rerun_item->delay) {
f_time_spec_t delay = f_time_spec_t_initialize;
};
// F_false = only with option, F_true with option and value.
- const bool values[] = {
+ const uint8_t values[] = {
F_false, // light.
F_false, // dark.
F_false, // no_color.
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_error_rule_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_error_rule(&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), macro_controller_f(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_error_rule(&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), macro_controller_f(f_string_dynamic_append), F_true, F_true);
return status;
}
}
if (F_status_is_error(status)) {
- controller_print_error_rule(&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), macro_controller_f(f_string_dynamic_append), F_true, F_true);
return status;
}
if ((instance->options & controller_instance_option_simulate_validate_e) == controller_instance_option_simulate_validate_e) {
- controller_rule_validate(main, instance->rule, instance->action, instance->options, &instance->cache);
+ controller_rule_validate(main, &instance->cache, instance->rule, instance->action, instance->options);
}
f_number_unsigned_t i = 0;
controller_lock_print(main->program.error.to, &main->thread);
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_print_error_rule_cache(&main->program.error, &instance->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_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_print_error_rule_cache(&main->program.error, &instance->cache.action, F_true);
controller_unlock_print_flush(main->program.error.to, &main->thread);
controller_print_error_rule_item_need_want_wish(&main->program.warning, strings[i], dynamics[i]->array[j], "is not found");
- controller_print_error_rule_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);
}
}
// Synchronously execute dependency.
- status = controller_rule_instance_begin(main, 0, alias_other_buffer, instance->action, options_instance, instance->type, instance->stack, dependency->cache);
+ status = controller_rule_instance_begin(main, &dependency->cache, 0, alias_other_buffer, instance->action, options_instance, instance->type, instance->stack);
if (status == F_child || F_status_set_fine(status) == F_interrupt) {
f_thread_unlock(&dependency->active);
controller_lock_print(main->program.error.to, &main->thread);
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_print_error_rule_cache(&main->program.error, &instance->cache.action, F_true);
controller_unlock_print_flush(main->program.error.to, &main->thread);
controller_print_error_rule_item_need_want_wish(&main->program.warning, strings[i], alias_other_buffer, "failed during execution");
- controller_print_error_rule_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);
}
controller_print_error_rule_item_need_want_wish(&main->program.error, strings[i], alias_other_buffer, "is in a failed state");
- controller_print_error_rule_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);
controller_print_error_rule_item_need_want_wish(&main->program.warning, strings[i], alias_other_buffer, "is in a failed state");
- controller_print_error_rule_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("%[') to execute.%]%r", main->program.error.to, main->program.error.context, main->program.error.context, f_string_eol_s);
}
- controller_print_error_rule_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_error_rule_item(&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));
}
}
}
#ifndef _di_controller_rule_instance_begin_
f_status_t controller_rule_instance_begin(controller_t * const main, controller_cache_t * const cache, const uint8_t options_force, const f_string_static_t alias_rule, const uint8_t action, const uint8_t options, const uint8_t type, const f_number_unsigneds_t stack) {
- if (!main) return F_status_set_error(F_parameter);
+ if (!main || !cache) return F_status_set_error(F_parameter);
if (!controller_thread_is_enabled_instance_type(type, &main->thread)) {
return F_status_set_error(F_interrupt);
controller_lock_print(main->program.error.to, &main->thread);
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_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_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));
+ controller_print_error_rule_item(&main->program.error, &cache->action, F_false, F_status_set_fine(status));
f_thread_unlock(&main->thread.lock.instance);
instance->cache.buffer_item.used = 0;
instance->cache.buffer_path.used = 0;
instance->cache.expanded.used = 0;
- instance->cache.action.line_action = cache.action.line_action;
- instance->cache.action.line_item = cache.action.line_item;
+ instance->cache.action.line_action = cache->action.line_action;
+ instance->cache.action.line_item = cache->action.line_item;
instance->cache.action.name_action.used = 0;
instance->cache.action.name_file.used = 0;
instance->cache.action.name_item.used = 0;
}
if (F_status_is_error_not(status)) {
- status = f_string_dynamic_append(cache.action.name_action, &instance->cache.action.name_action);
+ status = f_string_dynamic_append(cache->action.name_action, &instance->cache.action.name_action);
if (F_status_is_error_not(status)) {
- status = f_string_dynamic_append(cache.action.name_file, &instance->cache.action.name_file);
+ status = f_string_dynamic_append(cache->action.name_file, &instance->cache.action.name_file);
}
if (F_status_is_error_not(status)) {
- status = f_string_dynamic_append(cache.action.name_item, &instance->cache.action.name_item);
+ status = f_string_dynamic_append(cache->action.name_item, &instance->cache.action.name_item);
}
else {
controller_print_error_status(&main->program.error, macro_controller_f(f_string_dynamic_append), F_status_set_fine(status));
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_error_rule_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);
}
controller_lock_print(instance->main->program.error.to, &instance->main->thread);
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_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);
}
#endif
#ifndef _di_controller_rule_item_read_
- f_status_t controller_rule_item_read(controller_t * const main, controller_cache_t * const cache, const bool is_normal, controller_rule_item_t * const item) {
+ f_status_t controller_rule_item_read(controller_t * const main, controller_cache_t * const cache, const uint8_t is_normal, controller_rule_item_t * const item) {
if (!main || !cache || !item) return F_status_set_error(F_parameter);
break;
}
- state.status = controller_rule_action_read(main, is_normal, type, method, cache, item, &item->actions, &range);
+ state.status = controller_rule_action_read(main, cache, is_normal, type, method, item, &item->actions, &range);
if (F_status_is_error(state.status)) break;
} // for
* @see f_string_dynamic_partial_append_nulless()
*/
#ifndef _di_controller_rule_item_read_
- extern f_status_t controller_rule_item_read(controller_t * const main, controller_cache_t * const cache, const bool is_normal, controller_rule_item_t * const item);
+ extern f_status_t controller_rule_item_read(controller_t * const main, controller_cache_t * const cache, const uint8_t is_normal, controller_rule_item_t * const item);
#endif // _di_controller_rule_item_read_
#ifdef __cplusplus
controller_print_error_status(&main->program.error, macro_controller_f(f_string_dynamic_append_nulless), F_status_set_fine(state.status));
}
else {
- state.status = controller_file_load(main, cache, F_true, controller_rules_s, rule->alias, controller_rule_s);
+ state.status = controller_file_load(main, F_true, controller_rules_s, rule->alias, controller_rule_s);
}
if (F_status_is_error_not(state.status)) {
rule->items.array[rule->items.used].with |= controller_with_session_same_d;
}
- state.status = controller_rule_item_read(main, is_normal, cache, &rule->items.array[rule->items.used]);
+ state.status = controller_rule_item_read(main, cache, is_normal, &rule->items.array[rule->items.used]);
if (F_status_is_error(state.status)) break;
++rule->items.used;
else {
for_item = F_false;
- state.status = controller_rule_setting_read(main, is_normal, cache, rule);
+ state.status = controller_rule_setting_read(main, cache, is_normal, rule);
if (F_status_is_error(state.status)) {
if (F_status_set_fine(state.status) == F_memory_not) break;
}
if (F_status_is_error(state.status)) {
- controller_print_error_rule_item(&main->program.error, cache->action, for_item, F_status_set_fine(state.status));
+ controller_print_error_rule_item(&main->program.error, &cache->action, for_item, F_status_set_fine(state.status));
rule->status[0] = controller_error_simplify(F_status_set_fine(state.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(state.status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(state.status), "fll_fss_extended_read", F_true, F_false);
+ controller_print_error_rule(&main->program.error, &cache->action, F_status_set_fine(state.status), "fll_fss_extended_read", F_true, F_false);
return state.status;
}
state.status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->object_actions.array[i], &cache->action.name_item);
if (F_status_is_error(state.status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(state.status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ controller_print_error_rule(&main->program.error, &cache->action, F_status_set_fine(state.status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
if (F_status_set_fine(state.status) == F_memory_not) {
status_return = state.status;
cache->action.line_action = ++cache->action.line_item;
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
+ controller_print_error_rule_item(&main->program.error, &cache->action, F_false, F_status_set_fine(state.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_error_rule_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);
}
state.status = f_string_dynamic_partial_append_nulless(cache->buffer_item, range2, &cache->action.name_action);
if (F_status_is_error(state.status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(state.status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ controller_print_error_rule(&main->program.error, &cache->action, F_status_set_fine(state.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_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
+ controller_print_error_rule_item(&main->program.error, &cache->action, F_false, F_status_set_fine(state.status));
if (F_status_set_fine(state.status) == F_memory_not) {
status_return = state.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_error_rule_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_error_rule_setting(&main->program.error, "requires one or more Content", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting(&main->program.error, cache, "requires one or more Content", i, line_item);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
state.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(state.status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(state.status), "f_memory_array_increase", F_true, F_false);
+ controller_print_error_rule(&main->program.error, &cache->action, F_status_set_fine(state.status), "f_memory_array_increase", F_true, F_false);
break;
}
if (state.status == F_data_not || state.status == F_number || state.status == F_number_overflow || state.status == F_number_underflow || state.status == F_number_negative || state.status == F_number_decimal) {
if (state.status == F_number_underflow) {
- 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);
+ controller_print_error_rule_setting_with_range(&main->program.error, cache, " has an unsupported number", cache->content_actions.array[i].array[j], ", the number is too small for this system", i, line_item);
}
else if (state.status == F_number_overflow || state.status == F_number_positive) {
- 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);
+ controller_print_error_rule_setting_with_range(&main->program.error, cache, " has an unsupported number", cache->content_actions.array[i].array[j], ", the number is too large for this system", i, line_item);
}
else {
- 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);
+ controller_print_error_rule_setting_with_range(&main->program.error, cache, " has an invalid number", cache->content_actions.array[i].array[j], ", only whole numbers are allowed for an affinity value", i, line_item);
}
state.status = F_status_set_error(F_valid_not);
}
}
else {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(state.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(state.status), "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
state.status = F_status_set_error(state.status);
rule->affinity.array[rule->affinity.used++] = number;
} // for
- controller_print_error_rule_setting_values(main, controller_affinity_s, i, cache);
+ controller_print_error_rule_setting_values(&main->program.error, cache, controller_affinity_s, i);
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_error_rule_setting(&main->program.error, "requires exactly two Content", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting(&main->program.error, cache, "requires exactly two Content", i, line_item);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
state.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(state.status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(state.status), "f_memory_array_increase", F_true, F_false);
+ controller_print_error_rule(&main->program.error, &cache->action, F_status_set_fine(state.status), "f_memory_array_increase", F_true, F_false);
if (F_status_set_fine(state.status) == F_memory_not) {
status_return = state.status;
cache->action.line_action = ++cache->action.line_item;
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
+ controller_print_error_rule_item(&main->program.error, &cache->action, F_false, F_status_set_fine(state.status));
continue;
}
state.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(state.status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(state.status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ controller_print_error_rule(&main->program.error, &cache->action, F_status_set_fine(state.status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
if (F_status_set_fine(state.status) == F_memory_not) {
status_return = state.status;
cache->action.line_action = ++cache->action.line_item;
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
+ controller_print_error_rule_item(&main->program.error, &cache->action, F_false, F_status_set_fine(state.status));
continue;
}
state.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(state.status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(state.status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ controller_print_error_rule(&main->program.error, &cache->action, F_status_set_fine(state.status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
if (F_status_set_fine(state.status) == F_memory_not) {
status_return = state.status;
cache->action.line_action = ++cache->action.line_item;
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
+ controller_print_error_rule_item(&main->program.error, &cache->action, F_false, F_status_set_fine(state.status));
continue;
}
- 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]);
+ controller_print_error_rule_setting_mapping(&main->program.error, 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_error_rule_setting(&main->program.error, "requires two or more Content", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting(&main->program.error, cache, "requires two or more Content", i, line_item);
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_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);
+ controller_print_error_rule_setting_with_range(&main->program.error, cache, " has an unknown option", cache->content_actions.array[i].array[0], "", i, line_item);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
state.status = f_string_dynamic_append(main->process.path_cgroup, &rule->cgroup.path);
if (F_status_is_error(state.status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(state.status), "f_string_dynamic_append", F_true, F_false);
+ controller_print_error_rule(&main->program.error, &cache->action, F_status_set_fine(state.status), "f_string_dynamic_append", F_true, F_false);
}
else {
rule->cgroup.groups.used = 0;
state.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(state.status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(state.status), "f_memory_array_increase", F_true, F_false);
+ controller_print_error_rule(&main->program.error, &cache->action, F_status_set_fine(state.status), "f_memory_array_increase", F_true, F_false);
break;
}
state.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(state.status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(state.status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ controller_print_error_rule(&main->program.error, &cache->action, F_status_set_fine(state.status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
break;
}
cache->action.line_action = ++cache->action.line_item;
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
+ controller_print_error_rule_item(&main->program.error, &cache->action, F_false, F_status_set_fine(state.status));
continue;
}
rule->has |= controller_rule_has_cgroup_d;
- controller_print_error_rule_setting_values(main, controller_cgroup_s, i, cache);
+ controller_print_error_rule_setting_values(&main->program.error, cache, controller_cgroup_s, i);
continue;
}
if (type == controller_rule_setting_type_limit_e) {
if (cache->content_actions.array[i].used != 3) {
- controller_print_error_rule_setting(&main->program.error, "requires three Content", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting(&main->program.error, cache, "requires three Content", i, line_item);
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_error_rule_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_error_rule_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);
}
state.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(state.status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(state.status), "f_memory_array_increase", F_true, F_false);
+ controller_print_error_rule(&main->program.error, &cache->action, F_status_set_fine(state.status), "f_memory_array_increase", F_true, F_false);
if (F_status_set_fine(state.status) == F_memory_not) {
status_return = state.status;
cache->action.line_action = ++cache->action.line_item;
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
+ controller_print_error_rule_item(&main->program.error, &cache->action, F_false, F_status_set_fine(state.status));
continue;
}
if (state.status == F_data_not || state.status == F_number || state.status == F_number_overflow || state.status == F_number_underflow || state.status == F_number_negative || state.status == F_number_positive || state.status == F_number_decimal) {
if (state.status == F_number_underflow) {
- 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);
+ controller_print_error_rule_setting_with_range(&main->program.error, cache, " has an unsupported number", cache->content_actions.array[i].array[j], ", the number is too small for this system", i, line_item);
}
else if (state.status == F_number_overflow) {
- 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);
+ controller_print_error_rule_setting_with_range(&main->program.error, cache, " has an unsupported number", cache->content_actions.array[i].array[j], ", the number is too large for this system", i, line_item);
}
else {
- 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);
+ controller_print_error_rule_setting_with_range(&main->program.error, cache, " has an unsupported number", cache->content_actions.array[i].array[j], ", only whole numbers are allowed for a resource limit value", i, line_item);
}
state.status = F_status_set_error(F_valid_not);
}
}
else {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(state.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(state.status), "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
state.status = F_status_set_error(state.status);
rule->limits.array[rule->limits.used++].type = type;
- controller_print_error_rule_setting_values(main, controller_limit_s, i, cache);
+ controller_print_error_rule_setting_values(&main->program.error, cache, controller_limit_s, i);
continue;
}
}
if (setting_value->used || !cache->content_actions.array[i].used) {
- controller_print_error_rule_setting(&main->program.error, "requires one or more Content", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting(&main->program.error, cache, "requires one or more Content", i, line_item);
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_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
+ controller_print_error_rule_item(&main->program.error, &cache->action, F_false, F_status_set_fine(state.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_error_rule_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_error_rule(&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 = state.status;
}
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
+ controller_print_error_rule_item(&main->program.error, &cache->action, F_false, F_status_set_fine(state.status));
}
setting_value->used = 0;
continue;
}
- 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);
+ controller_print_error_rule_setting_value(&main->program.error, 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) {
state.status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[0], setting_value);
if (F_status_is_error(state.status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(state.status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ controller_print_error_rule(&main->program.error, &cache->action, F_status_set_fine(state.status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
if (F_status_set_fine(state.status) == F_memory_not) {
status_return = state.status;
cache->action.line_action = ++cache->action.line_item;
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
+ controller_print_error_rule_item(&main->program.error, &cache->action, F_false, F_status_set_fine(state.status));
continue;
}
- controller_print_error_rule_setting_value(main, controller_path_s, f_string_empty_s, *setting_value, 0);
+ controller_print_error_rule_setting_value(&main->program.error, 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_error_rule_setting(&main->program.error, "requires either one or two Content", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting(&main->program.error, cache, "requires either one or two Content", i, line_item);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
rule->scheduler.priority = 49;
}
else {
- 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);
+ controller_print_error_rule_setting_with_range(&main->program.error, cache, " has an unknown scheduler", cache->content_actions.array[i].array[0], "", i, line_item);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
}
if (cache->content_actions.array[i].used > 1) {
- const bool zero_only = rule->scheduler.policy == SCHED_BATCH || rule->scheduler.policy == SCHED_IDLE || rule->scheduler.policy == SCHED_OTHER;
+ const uint8_t zero_only = rule->scheduler.policy == SCHED_BATCH || rule->scheduler.policy == SCHED_IDLE || rule->scheduler.policy == SCHED_OTHER;
f_number_signed_t number = 0;
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_error_rule_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_error_rule(&main->program.error, cache->action, state.status, "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
+ controller_print_error_rule(&main->program.error, &cache->action, state.status, "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
state.status = F_status_set_error(state.status);
if (F_status_is_error_not(status_return)) {
rule->has |= controller_rule_has_scheduler_d;
- controller_print_error_rule_setting_values(main, controller_scheduler_s, i, cache);
+ controller_print_error_rule_setting_values(&main->program.error, cache, controller_scheduler_s, i);
continue;
}
if (type == controller_rule_setting_type_timeout_e) {
if (cache->content_actions.array[i].used != 2) {
- controller_print_error_rule_setting(&main->program.error, "requires exactly two Content", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting(&main->program.error, cache, "requires exactly two Content", i, line_item);
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_error_rule_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);
}
state.status = F_status_set_fine(state.status);
if (state.status == F_number_overflow) {
- 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);
+ controller_print_error_rule_setting_with_range(&main->program.error, cache, " has an unsupported number", cache->content_actions.array[i].array[1], ", the number is too large for this system", i, line_item);
}
else if (state.status == F_data_not || state.status == F_number || state.status == F_number_underflow || state.status == F_number_negative || state.status == F_number_positive || state.status == F_number_decimal) {
- 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);
+ controller_print_error_rule_setting_with_range(&main->program.error, cache, " has an invalid number", cache->content_actions.array[i].array[1], ", only positive whole numbers are allowed", i, line_item);
}
else {
cache->action.line_action = ++cache->action.line_item;
- controller_print_error_rule(&main->program.error, cache->action, state.status, "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
+ controller_print_error_rule(&main->program.error, &cache->action, state.status, "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
}
if (F_status_is_error_not(status_return)) {
break;
}
- controller_print_error_rule_setting_value(main, controller_timeout_s, name_sub, cache->action.generic, 0);
+ controller_print_error_rule_setting_value(&main->program.error, 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_error_rule_setting(&main->program.error, "requires exactly one Content", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting(&main->program.error, cache, "requires exactly one Content", i, line_item);
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_error_rule(&main->program.error, cache->action, F_status_set_fine(state.status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ controller_print_error_rule(&main->program.error, &cache->action, F_status_set_fine(state.status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
- controller_print_error_rule_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_error_rule(&main->program.error, cache->action, F_status_set_fine(state.status), "f_capability_from_text", F_true, F_false);
+ controller_print_error_rule(&main->program.error, &cache->action, F_status_set_fine(state.status), "f_capability_from_text", F_true, F_false);
- controller_print_error_rule_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_error_rule_setting(&main->program.error, "failed to process the capabilities", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting(&main->program.error, cache, "failed to process the capabilities", i, line_item);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
continue;
}
- controller_print_error_rule_setting_value(main, controller_capability_s, f_string_empty_s, cache->action.generic, 0);
+ controller_print_error_rule_setting_value(&main->program.error, 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_error_rule_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_error_rule(&main->program.error, cache->action, state.status, "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
+ controller_print_error_rule(&main->program.error, &cache->action, state.status, "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
state.status = F_status_set_error(state.status);
if (F_status_is_error_not(status_return)) {
controller_lock_print(main->program.error.to, &main->thread);
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(state.status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ controller_print_error_rule(&main->program.error, &cache->action, F_status_set_fine(state.status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
- controller_print_error_rule_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(state.status)) {
- controller_print_error_rule_setting_value(main, controller_nice_s, f_string_empty_s, cache->action.generic, 0);
+ controller_print_error_rule_setting_value(&main->program.error, controller_nice_s, f_string_empty_s, cache->action.generic, 0);
}
}
}
state.status = F_status_set_fine(state.status);
if (state.status == F_exist_not) {
- 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);
+ controller_print_error_rule_setting_with_range(&main->program.error, cache, " has an invalid user", cache->content_actions.array[i].array[0], ", because no user was found by that name", i, line_item);
}
else if (state.status == F_number_too_large) {
- 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);
+ controller_print_error_rule_setting_with_range(&main->program.error, cache, " has an invalid user", cache->content_actions.array[i].array[0], ", because the given ID is too large", i, line_item);
}
else if (state.status == F_number) {
- 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);
+ controller_print_error_rule_setting_with_range(&main->program.error, cache, " has an invalid user", cache->content_actions.array[i].array[0], ", because the given ID is not a valid supported number", i, line_item);
}
else {
cache->action.line_action = ++cache->action.line_item;
- controller_print_error_rule(&main->program.error, cache->action, state.status, "controller_convert_user_id", F_true, F_false);
+ controller_print_error_rule(&main->program.error, &cache->action, state.status, "controller_convert_user_id", F_true, F_false);
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
+ controller_print_error_rule_item(&main->program.error, &cache->action, F_false, F_status_set_fine(state.status));
}
if (F_status_is_error_not(status_return)) {
state.status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[0], &cache->action.generic);
- controller_print_error_rule_setting_value(main, controller_user_s, f_string_empty_s, cache->action.generic, 0);
+ controller_print_error_rule_setting_value(&main->program.error, 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_error_rule_setting(&main->program.error, "requires one or more Content", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting(&main->program.error, cache, "requires one or more Content", i, line_item);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
state.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(state.status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(state.status), "f_memory_array_increase", F_true, F_false);
+ controller_print_error_rule(&main->program.error, &cache->action, F_status_set_fine(state.status), "f_memory_array_increase", F_true, F_false);
if (F_status_set_fine(state.status) == F_memory_not) {
status_return = state.status;
cache->action.line_action = ++cache->action.line_item;
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
+ controller_print_error_rule_item(&main->program.error, &cache->action, F_false, F_status_set_fine(state.status));
continue;
}
state.status = F_status_set_fine(state.status);
if (state.status == F_exist_not) {
- 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);
+ controller_print_error_rule_setting_with_range(&main->program.error, cache, " has an invalid group", cache->content_actions.array[i].array[j], ", because no group was found by that name", i, line_item);
}
else if (state.status == F_number_too_large) {
- 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);
+ controller_print_error_rule_setting_with_range(&main->program.error, cache, " has an invalid group", cache->content_actions.array[i].array[j], ", because the given ID is too large", i, line_item);
}
else if (state.status == F_number) {
- 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);
+ controller_print_error_rule_setting_with_range(&main->program.error, cache, " has an invalid group", cache->content_actions.array[i].array[j], ", because the given ID is not a valid supported number", i, line_item);
}
else {
cache->action.line_action = ++cache->action.line_item;
- controller_print_error_rule(&main->program.error, cache->action, state.status, "f_account_group_id_by_name", F_true, F_false);
+ controller_print_error_rule(&main->program.error, &cache->action, state.status, "f_account_group_id_by_name", F_true, F_false);
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
+ controller_print_error_rule_item(&main->program.error, &cache->action, F_false, F_status_set_fine(state.status));
}
if (F_status_is_error_not(status_return)) {
}
} // for
- controller_print_error_rule_setting_values(main, controller_group_s, i, cache);
+ controller_print_error_rule_setting_values(&main->program.error, cache, controller_group_s, i);
continue;
}
state.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(state.status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(state.status), "f_memory_array_increase", F_true, F_false);
+ controller_print_error_rule(&main->program.error, &cache->action, F_status_set_fine(state.status), "f_memory_array_increase", F_true, F_false);
if (F_status_set_fine(state.status) == F_memory_not) {
status_return = state.status;
cache->action.line_action = ++cache->action.line_item;
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
+ controller_print_error_rule_item(&main->program.error, &cache->action, F_false, F_status_set_fine(state.status));
continue;
}
state.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(state.status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(state.status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ controller_print_error_rule(&main->program.error, &cache->action, F_status_set_fine(state.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_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
+ controller_print_error_rule_item(&main->program.error, &cache->action, F_false, F_status_set_fine(state.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_error_rule_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_error_rule(&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 = state.status;
setting_values->array[setting_values->used].used = 0;
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
+ controller_print_error_rule_item(&main->program.error, &cache->action, F_false, F_status_set_fine(state.status));
continue;
}
rule->has |= controller_rule_has_environment_d;
if (cache->content_actions.array[i].used) {
- controller_print_error_rule_setting_values(main, controller_environment_s, i, cache);
+ controller_print_error_rule_setting_values(&main->program.error, cache, controller_environment_s, i);
}
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_error_rule_setting(&main->program.error, "requires exactly four Content", i, line_item, &main->thread, cache);
+ controller_print_error_rule_setting(&main->program.error, cache, "requires exactly four Content", i, line_item);
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_error_rule_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(state.status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(state.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(state.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_error_rule_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);
}
state.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(state.status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(state.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(state.status), macro_controller_f(f_memory_array_increase), F_true, F_false);
}
}
cache->action.line_action = ++cache->action.line_item;
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
+ controller_print_error_rule_item(&main->program.error, &cache->action, F_false, F_status_set_fine(state.status));
continue;
}
cache->action.line_action = ++cache->action.line_item;
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
+ controller_print_error_rule_item(&main->program.error, &cache->action, F_false, F_status_set_fine(state.status));
continue;
}
if (F_status_is_error(state.status)) {
setting_values->array[setting_values->used].used = 0;
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(state.status), "f_file_name_base", F_true, F_false);
+ controller_print_error_rule(&main->program.error, &cache->action, F_status_set_fine(state.status), "f_file_name_base", F_true, F_false);
if (F_status_set_fine(state.status) == F_memory_not) {
status_return = state.status;
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_error_rule_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);
}
#endif
#ifndef _di_controller_rule_wait_all_
- f_status_t controller_rule_wait_all(controller_t * const main, const bool is_normal, const bool required) {
+ f_status_t controller_rule_wait_all(controller_t * const main, const uint8_t is_normal, const uint8_t required) {
if (!main) return F_status_set_error(F_parameter);
#endif // _di_controller_rule_wait_all_
#ifndef _di_controller_rule_wait_all_instance_type_
- f_status_t controller_rule_wait_all_instance_type(controller_t * const main, const uint8_t type, const bool required) {
+ f_status_t controller_rule_wait_all_instance_type(controller_t * const main, const uint8_t type, const uint8_t required) {
if (!main) return F_status_set_error(F_parameter);
* F_require (with error bit set) if a required process is in failed status when required is TRUE.
*/
#ifndef _di_controller_rule_wait_all_
- extern f_status_t controller_rule_wait_all(controller_t * const main, const bool is_normal, const bool required);
+ extern f_status_t controller_rule_wait_all(controller_t * const main, const uint8_t is_normal, const uint8_t required);
#endif // _di_controller_rule_wait_all_
/**
* @see controller_rule_wait_all()
*/
#ifndef _di_controller_rule_wait_all_instance_type_
- extern f_status_t controller_rule_wait_all_instance_type(controller_t * const main, const uint8_t type, const bool required);
+ extern f_status_t controller_rule_wait_all_instance_type(controller_t * const main, const uint8_t type, const uint8_t required);
#endif // _di_controller_rule_wait_all_instance_type_
#ifdef __cplusplus
#endif
#ifndef _di_controller_thread_signal_
- void controller_thread_signal(controller_t * const main, const bool is_normal) {
+ void controller_thread_signal(controller_t * const main, const uint8_t is_normal) {
if (!main) return;
if (!controller_thread_is_enabled(is_normal, &main->thread)) return;
* If FALSE, then process as if this operates during a an exit operation.
*/
#ifndef _di_controller_thread_signal_
- extern void controller_thread_signal(controller_t * const main, const bool is_normal);
+ extern void controller_thread_signal(controller_t * const main, const uint8_t is_normal);
#endif // _di_controller_thread_signal_
/**