From: Kevin Day Date: Sat, 29 Jun 2024 04:03:48 +0000 (-0500) Subject: Progress: Continue migrating the project. X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=65679c64b8f6db47d313e3430c5f6252c2d8b5de;p=controller Progress: Continue migrating the project. --- diff --git a/data/build/settings b/data/build/settings index 7efa038..40c0813 100644 --- a/data/build/settings +++ b/data/build/settings @@ -58,7 +58,7 @@ 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 print/warning.c print/warning/entry/action.c print/warning/entry/item.c print/warning/entry/setting.c print/warning/rule/action.c print/warning/rule/item.c print/warning/rule/setting.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 @@ -83,7 +83,7 @@ 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 print/warning.h print/warning/entry/action.h print/warning/entry/item.h print/warning/entry/setting.h print/warning/rule/action.h print/warning/rule/item.h print/warning/rule/setting.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 diff --git a/sources/c/main/common/print.c b/sources/c/main/common/print.c index 48217c4..0c1ef4c 100644 --- a/sources/c/main/common/print.c +++ b/sources/c/main/common/print.c @@ -15,6 +15,10 @@ extern "C" { "controller_rule_copy", "controller_rule_expand", "controller_path_canonical_relative", + "controller_validate_environment_name", + "controller_validate_has_graph", + "f_account_group_id_by_name", + "f_capability_from_text", "f_console_parameter_process", "f_environment_get_all", "f_file_exists", diff --git a/sources/c/main/common/print.h b/sources/c/main/common/print.h index bd7034f..8931bdb 100644 --- a/sources/c/main/common/print.h +++ b/sources/c/main/common/print.h @@ -48,6 +48,10 @@ extern "C" { controller_f_controller_rule_copy_e, controller_f_controller_rule_expand_e, controller_f_controller_path_canonical_relative_e, + controller_f_controller_validate_environment_name_e, + controller_f_controller_validate_has_graph_e, + controller_f_f_account_group_id_by_name_e, + controller_f_f_capability_from_text_e, controller_f_f_console_parameter_process_e, controller_f_f_environment_get_all_e, controller_f_f_file_exists_e, diff --git a/sources/c/main/controller.h b/sources/c/main/controller.h index ab16cc0..10fe4b0 100644 --- a/sources/c/main/controller.h +++ b/sources/c/main/controller.h @@ -140,6 +140,8 @@ #include #include #include +#include +#include #include #include #include diff --git a/sources/c/main/convert.h b/sources/c/main/convert.h index d07096a..7241c68 100644 --- a/sources/c/main/convert.h +++ b/sources/c/main/convert.h @@ -105,10 +105,10 @@ extern "C" { #endif // _di_controller_convert_rule_action_type_string_ /** - * Convert the rule item type code to the string representation. + * Convert the Rule Item type code to the string representation. * * @param type - * The rule item type code. + * The Rule Item type code. * * @return * The string with used > 0 on success. diff --git a/sources/c/main/entry/action.c b/sources/c/main/entry/action.c index 6c773af..1653d08 100644 --- a/sources/c/main/entry/action.c +++ b/sources/c/main/entry/action.c @@ -145,7 +145,7 @@ extern "C" { actions->array[actions->used].type = controller_entry_action_type_timeout_e; } else { - controller_print_warning_entry_action_unknown(&main->program.warning, &main->thread.cache, entry->flag & controller_entry_flag_is_e, main->thread.cache.action.name_action); + controller_print_warning_entry_action_unknown(&main->program.warning, &main->thread.cache.action, entry->flag & controller_entry_flag_is_e, main->thread.cache.action.name_action); continue; } @@ -184,7 +184,7 @@ extern "C" { f_file_stream_lock(main->program.error.to); - fl_print_format("%r%[%QThe %r item action '%]", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, entry->flag & controller_entry_flag_is_e ? controller_entry_s : controller_exit_s, main->program.error.context); + fl_print_format("%r%[%QThe %r Item Action '%]", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, entry->flag & controller_entry_flag_is_e ? controller_entry_s : controller_exit_s, main->program.error.context); fl_print_format(f_string_format_Q_single_s.string, main->program.error.to, main->program.error.notable, main->thread.cache.action.name_action, main->program.error.notable); fl_print_format("%[' requires ", main->program.error.to, main->program.error.context); @@ -296,7 +296,7 @@ extern "C" { } if (main->program.error.verbosity > f_console_verbosity_quiet_e) { - fll_print_format("%r%[%QThe %r item action must not have an empty string for a path (the first parameter).%]%r", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, entry->flag & controller_entry_flag_is_e ? controller_entry_s : controller_exit_s, main->program.error.context, f_string_eol_s); + fll_print_format("%r%[%QThe %r Item Action must not have an empty string for a path (the first parameter).%]%r", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, entry->flag & controller_entry_flag_is_e ? controller_entry_s : controller_exit_s, main->program.error.context, f_string_eol_s); } } @@ -325,7 +325,7 @@ extern "C" { if (main->program.error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(main->program.error.to); - fl_print_format("%r%[%QThe %r item action second parameter '%]", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, entry->flag & controller_entry_flag_is_e ? controller_entry_s : controller_exit_s, main->program.error.context); + fl_print_format("%r%[%QThe %r Item Action second parameter '%]", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, entry->flag & controller_entry_flag_is_e ? controller_entry_s : controller_exit_s, main->program.error.context); fl_print_format(f_string_format_Q_single_s.string, main->program.error.to, main->program.error.notable, action->parameters.array[1], main->program.error.notable); fl_print_format("%[' must be a base path name, such as '%]", main->program.error.to, main->program.error.context, main->program.error.context); fl_print_format(f_string_format_Q_single_s.string, main->program.error.to, main->program.error.notable, main->thread.cache.buffer_path, main->program.error.notable); @@ -350,7 +350,7 @@ extern "C" { } if (main->program.error.verbosity > f_console_verbosity_quiet_e) { - fll_print_format("%r%[%QThe %r item action must not have an empty string for a rule name (the second parameter).%]", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, entry->flag & controller_entry_flag_is_e ? controller_entry_s : controller_exit_s, main->program.error.context, f_string_eol_s); + fll_print_format("%r%[%QThe %r Item Action must not have an empty string for a rule name (the second parameter).%]", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, entry->flag & controller_entry_flag_is_e ? controller_entry_s : controller_exit_s, main->program.error.context, f_string_eol_s); } } @@ -377,7 +377,7 @@ extern "C" { if (main->program.error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(main->program.error.to); - fl_print_format("%r%[%QThe %r item action third parameter (and beyond) must be one of '%]", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, entry->flag & controller_entry_flag_is_e ? controller_entry_s : controller_exit_s, main->program.error.context); + fl_print_format("%r%[%QThe %r Item Action third parameter (and beyond) must be one of '%]", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, entry->flag & controller_entry_flag_is_e ? controller_entry_s : controller_exit_s, main->program.error.context); fl_print_format(f_string_format_r_single_s.string, main->program.error.to, main->program.error.notable, controller_asynchronous_s, main->program.error.notable); fl_print_format("%[', '%]", main->program.error.to, main->program.error.context, main->program.error.context); fl_print_format(f_string_format_r_single_s.string, main->program.error.to, main->program.error.notable, controller_require_s, main->program.error.notable); @@ -403,7 +403,7 @@ extern "C" { if (main->program.error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(main->program.error.to); - fl_print_format("%r%[%QThe %r item action may not specify the reserved item '%]", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, entry->flag & controller_entry_flag_is_e ? controller_entry_s : controller_exit_s, main->program.error.context); + fl_print_format("%r%[%QThe %r Item Action may not specify the reserved item '%]", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, entry->flag & controller_entry_flag_is_e ? controller_entry_s : controller_exit_s, main->program.error.context); fl_print_format(f_string_format_r_single_s.string, main->program.error.to, main->program.error.notable, controller_main_s, main->program.error.notable); fl_print_format("%['.%]", main->program.error.to, main->program.error.context, main->program.error.context, f_string_eol_s); @@ -432,7 +432,7 @@ extern "C" { if (main->program.error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(main->program.error.to); - fl_print_format("%r%[%QThe %r item action must have one of '%]", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, entry->flag & controller_entry_flag_is_e ? controller_entry_s : controller_exit_s, main->program.error.context); + fl_print_format("%r%[%QThe %r Item Action must have one of '%]", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, entry->flag & controller_entry_flag_is_e ? controller_entry_s : controller_exit_s, main->program.error.context); fl_print_format(f_string_format_r_single_s.string, main->program.error.to, main->program.error.notable, controller_kill_s, main->program.error.notable); fl_print_format("%[', '%]", main->program.error.to, main->program.error.context, main->program.error.context); fl_print_format(f_string_format_r_single_s.string, main->program.error.to, main->program.error.notable, controller_start_s, main->program.error.notable); @@ -473,7 +473,7 @@ extern "C" { if (main->program.error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(main->program.error.to); - fl_print_format("%r%[%QThe %r item action parameter '%]", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, entry->flag & controller_entry_flag_is_e ? controller_entry_s : controller_exit_s, main->program.error.context); + fl_print_format("%r%[%QThe %r Item Action parameter '%]", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, entry->flag & controller_entry_flag_is_e ? controller_entry_s : controller_exit_s, main->program.error.context); fl_print_format(f_string_format_Q_single_s.string, main->program.error.to, main->program.error.notable, action->parameters.array[1], main->program.error.notable); fl_print_format("%[' is not a valid supported number.%]", main->program.error.to, main->program.error.context, main->program.error.context, f_string_eol_s); @@ -497,7 +497,7 @@ extern "C" { if (main->program.error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(main->program.error.to); - fl_print_format("%r%[%QThe %r item action may only have '%]", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, entry->flag & controller_entry_flag_is_e ? controller_entry_s : controller_exit_s, main->program.error.context); + fl_print_format("%r%[%QThe %r Item Action may only have '%]", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, entry->flag & controller_entry_flag_is_e ? controller_entry_s : controller_exit_s, main->program.error.context); fl_print_format(f_string_format_r_single_s.string, main->program.error.to, main->program.error.notable, controller_wait_s, main->program.error.notable); fl_print_format("%[' but instead has '%]", main->program.error.to, main->program.error.context, main->program.error.context); fl_print_format(f_string_format_Q_single_s.string, main->program.error.to, main->program.error.notable, action->parameters.array[0], main->program.error.notable); diff --git a/sources/c/main/entry/preprocess.h b/sources/c/main/entry/preprocess.h index fdbc1ab..6a36e76 100644 --- a/sources/c/main/entry/preprocess.h +++ b/sources/c/main/entry/preprocess.h @@ -30,7 +30,7 @@ extern "C" { * @return * F_okay on success. * F_recurse (with error bit) on a recursion error. - * F_valid_not (with error bit) on invalid entry item, entry item action, or entry item action value. + * F_valid_not (with error bit) on invalid entry item, Entry Item Action, or Entry Item Action value. * * Errors (with error bit) from: macro_f_number_unsigneds_t_increase_by(). * Errors (with error bit) from: f_string_dynamic_append(). diff --git a/sources/c/main/instance/prepare.h b/sources/c/main/instance/prepare.h index a9c2412..8e400ce 100644 --- a/sources/c/main/instance/prepare.h +++ b/sources/c/main/instance/prepare.h @@ -19,7 +19,7 @@ extern "C" { /** * Prepare the instance. * - * The instance is initialized with the instance id, the rule alias, and the rule action type. + * The instance is initialized with the instance id, the Rule alias, and the rule action type. * These are the necessary parts for uniquely identifying the instance. * * If a instance by the given Rule alias and Rule Action already exists, then nothing is done. @@ -65,7 +65,7 @@ extern "C" { /** * Prepare the instance for some instance type. * - * The instance is initialized with the instance id, the rule alias, and the rule action type. + * The instance is initialized with the instance id, the Rule alias, and the rule action type. * These are the necessary parts for uniquely identifying the instance. * * If a instance by the given Rule alias and Rule Action already exists, then nothing is done. diff --git a/sources/c/main/print/debug.h b/sources/c/main/print/debug.h index a80f7da..c3c297d 100644 --- a/sources/c/main/print/debug.h +++ b/sources/c/main/print/debug.h @@ -22,9 +22,11 @@ extern "C" { * @param print * The output structure to print to. * - * Must not be NULL. + * This requires print.custom to be controller_t. * * This does not alter print.custom.setting.state.status. + * + * Must not be NULL. * @param symbol * The symbol string prepended to the parameter. * This locks, uses, and unlocks the file stream. diff --git a/sources/c/main/print/debug/perform/control.h b/sources/c/main/print/debug/perform/control.h index 72c230f..cced187 100644 --- a/sources/c/main/print/debug/perform/control.h +++ b/sources/c/main/print/debug/perform/control.h @@ -5,7 +5,7 @@ * API Version: 0.7 * Licenses: lgpl-2.1-or-later * - * Provides the print debug perform control functionality. + * Provides the print perform control debug functionality. * * This is auto-included and should not need to be explicitly included. */ diff --git a/sources/c/main/print/debug/perform/pid.h b/sources/c/main/print/debug/perform/pid.h index a706838..2df94d7 100644 --- a/sources/c/main/print/debug/perform/pid.h +++ b/sources/c/main/print/debug/perform/pid.h @@ -5,7 +5,7 @@ * API Version: 0.7 * Licenses: lgpl-2.1-or-later * - * Provides the print debug perform pid functionality. + * Provides the print perform pid debug functionality. * * This is auto-included and should not need to be explicitly included. */ diff --git a/sources/c/main/print/debug/rule/action.h b/sources/c/main/print/debug/rule/action.h index 56f41eb..feb2038 100644 --- a/sources/c/main/print/debug/rule/action.h +++ b/sources/c/main/print/debug/rule/action.h @@ -5,7 +5,7 @@ * API Version: 0.7 * Licenses: lgpl-2.1-or-later * - * Provides the print debug entry action functionality. + * Provides the print entry action debug functionality. * * This is auto-included and should not need to be explicitly included. */ @@ -17,11 +17,15 @@ extern "C" { #endif /** - * Print debug message about the rule item action being empty. + * Print debug message about the Rule Item Action being empty. * * @param print * The output structure to print to. * + * This requires print.custom to be controller_t. + * + * This does not alter print.custom.setting.state.status. + * * Must not be NULL. * @param cache * A structure for containing and caching relevant data. diff --git a/sources/c/main/print/debug/rule/execute.h b/sources/c/main/print/debug/rule/execute.h index 0ccfb6a..9c827be 100644 --- a/sources/c/main/print/debug/rule/execute.h +++ b/sources/c/main/print/debug/rule/execute.h @@ -5,7 +5,7 @@ * API Version: 0.7 * Licenses: lgpl-2.1-or-later * - * Provides the print debug entry action functionality. + * Provides the print entry action debug functionality. * * This is auto-included and should not need to be explicitly included. */ @@ -22,6 +22,10 @@ extern "C" { * @param print * The output structure to print to. * + * This requires print.custom to be controller_t. + * + * This does not alter print.custom.setting.state.status. + * * Must not be NULL. * @param instance * The Controller Instance. diff --git a/sources/c/main/print/error.h b/sources/c/main/print/error.h index b087ae2..75d906f 100644 --- a/sources/c/main/print/error.h +++ b/sources/c/main/print/error.h @@ -22,9 +22,11 @@ extern "C" { * @param print * The output structure to print to. * - * Must not be NULL. + * This requires print.custom to be controller_t. * * This does not alter print.custom.setting.state.status. + * + * Must not be NULL. * @param function * The name of the function associated with the error. * @@ -44,9 +46,11 @@ extern "C" { * @param print * The output structure to print to. * - * Must not be NULL. + * This requires print.custom to be controller_t. * * This does not alter print.custom.setting.state.status. + * + * Must not be NULL. * @param thread * The name of the function associated with the error. * @@ -70,11 +74,11 @@ extern "C" { * @param print * The output structure to print to. * - * Must not be NULL. - * - * The print.custom is expected to be of type fss_read_main_t. + * This requires print.custom to be controller_t. * * This does not alter print.custom.setting.state.status. + * + * Must not be NULL. * @param function * The name of the function where the error happened. * Set to 0 to disable. @@ -101,11 +105,11 @@ extern "C" { * @param print * The output structure to print to. * - * Must not be NULL. - * - * The print.custom is expected to be of type fss_read_main_t. + * This requires print.custom to be controller_t. * * This does not alter print.custom.setting.state.status. + * + * Must not be NULL. * @param function * The name of the function where the error happened. * Set to 0 to disable. @@ -134,9 +138,11 @@ extern "C" { * @param print * The output structure to print to. * - * Must not be NULL. + * This requires print.custom to be controller_t. * * This does not alter print.custom.setting.state.status. + * + * Must not be NULL. * @param function * The name of the function associated with the error. * @param status @@ -158,9 +164,11 @@ extern "C" { * @param print * The output structure to print to. * - * Must not be NULL. + * This requires print.custom to be controller_t. * * This does not alter print.custom.setting.state.status. + * + * Must not be NULL. * @param thread * The name of the function associated with the error. * diff --git a/sources/c/main/print/error/entry/action.h b/sources/c/main/print/error/entry/action.h index 276e046..de59294 100644 --- a/sources/c/main/print/error/entry/action.h +++ b/sources/c/main/print/error/entry/action.h @@ -5,7 +5,7 @@ * API Version: 0.7 * Licenses: lgpl-2.1-or-later * - * Provides the print entry error action functionality. + * Provides the print entry action error functionality. * * This is auto-included and should not need to be explicitly included. */ @@ -17,7 +17,7 @@ extern "C" { #endif /** - * Print an error about a entry item action program or script execution failure. + * Print an error about a Entry Item Action program or script execution failure. * * @param print * The output structure to print to. @@ -48,7 +48,7 @@ extern "C" { #endif // _di_controller_print_error_entry_action_execution_failure_ /** - * Print an error about a entry item action program or script not being found. + * Print an error about a Entry Item Action program or script not being found. * * @param print * The output structure to print to. diff --git a/sources/c/main/print/error/entry/item.h b/sources/c/main/print/error/entry/item.h index 37b6615..5ff9468 100644 --- a/sources/c/main/print/error/entry/item.h +++ b/sources/c/main/print/error/entry/item.h @@ -5,7 +5,7 @@ * API Version: 0.7 * Licenses: lgpl-2.1-or-later * - * Provides the print entry error item functionality. + * Provides the print entry item error functionality. * * This is auto-included and should not need to be explicitly included. */ diff --git a/sources/c/main/print/error/entry/setting.h b/sources/c/main/print/error/entry/setting.h index efb65de..dc8f582 100644 --- a/sources/c/main/print/error/entry/setting.h +++ b/sources/c/main/print/error/entry/setting.h @@ -5,7 +5,7 @@ * API Version: 0.7 * Licenses: lgpl-2.1-or-later * - * Provides the print entry error setting functionality. + * Provides the print entry setting error functionality. * * This is auto-included and should not need to be explicitly included. */ diff --git a/sources/c/main/print/error/lock.h b/sources/c/main/print/error/lock.h index 14a237d..52af779 100644 --- a/sources/c/main/print/error/lock.h +++ b/sources/c/main/print/error/lock.h @@ -5,7 +5,7 @@ * API Version: 0.7 * Licenses: lgpl-2.1-or-later * - * Provides the print error lock functionality. + * Provides the print lock error functionality. * * This is auto-included and should not need to be explicitly included. */ @@ -24,9 +24,11 @@ extern "C" { * @param print * The output structure to print to. * - * Must not be NULL. + * 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 to process. * Make sure this has F_status_set_fine() called if the status code has any error or warning bits. diff --git a/sources/c/main/print/error/perform/pid.h b/sources/c/main/print/error/perform/pid.h index 88a8c6c..3148616 100644 --- a/sources/c/main/print/error/perform/pid.h +++ b/sources/c/main/print/error/perform/pid.h @@ -5,7 +5,7 @@ * API Version: 0.7 * Licenses: lgpl-2.1-or-later * - * Provides the print error perform pid functionality. + * Provides the print perform pid error functionality. * * This is auto-included and should not need to be explicitly included. */ diff --git a/sources/c/main/print/error/rule/action.c b/sources/c/main/print/error/rule/action.c index 1862027..2cc6ca9 100644 --- a/sources/c/main/print/error/rule/action.c +++ b/sources/c/main/print/error/rule/action.c @@ -4,6 +4,62 @@ extern "C" { #endif +#ifndef _di_controller_print_error_rule_action_first_ + f_status_t controller_print_error_rule_action_first(fl_print_t * const print, controller_cache_action_t * const action, const f_string_static_t buffer, const f_range_t range) { + + 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; + + controller_t * const main = (controller_t *) print->custom; + + controller_lock_print(print->to, &main->thread); + + fl_print_format("%r%[%QRule Item Action '%]", print->to, f_string_eol_s, print->context, print->prefix, print->context); + fl_print_format(f_string_format_r_single_s.string, print->to, print->notable, controller_rerun_s, print->notable); + fl_print_format("%[' has '%]", print->to, print->context, print->context); + fl_print_format(f_string_format_Q_range_single_s.string, print->to, print->notable, buffer, range, print->notable); + fl_print_format("%[' as the first value, only the following are allowed: '%]", print->to, print->context, print->context); + fl_print_format("%[%r%]%[', '%]", print->to, print->notable, controller_freeze_s, print->notable, print->context, print->context); + fl_print_format("%[%r%]%[', '%]", print->to, print->notable, controller_kill_s, print->notable, print->context, print->context); + fl_print_format("%[%r%]%[', '%]", print->to, print->notable, controller_pause_s, print->notable, print->context, print->context); + fl_print_format("%[%r%]%[', '%]", print->to, print->notable, controller_reload_s, print->notable, print->context, print->context); + fl_print_format("%[%r%]%[', '%]", print->to, print->notable, controller_restart_s, print->notable, print->context, print->context); + fl_print_format("%[%r%]%[', '%]", print->to, print->notable, controller_resume_s, print->notable, print->context, print->context); + fl_print_format("%[%r%]%[', '%]", print->to, print->notable, controller_start_s, print->notable, print->context, print->context); + fl_print_format("%[%r%]%[', or '%]", print->to, print->notable, controller_stop_s, print->notable, print->context, print->context); + fl_print_format(f_string_format_r_single_s.string, print->to, print->notable, controller_thaw_s, print->notable, print->context); + fl_print_format(f_string_format_sentence_end_quote_s.string, print->to, print->context, print->context, f_string_eol_s); + + controller_print_error_rule_cache(print, action, F_true); + + controller_unlock_print_flush(print->to, &main->thread); + + return F_okay; + } +#endif // _di_controller_print_error_rule_action_first_ + +#ifndef _di_controller_print_error_rule_action_fss_0003_unsupported_ + f_status_t controller_print_error_rule_action_fss_0003_unsupported(fl_print_t * const print, controller_cache_action_t * const action, const f_string_static_t name) { + + 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; + + controller_t * const main = (controller_t *) print->custom; + + controller_lock_print(print->to, &main->thread); + + controller_print_error_rule_cache(print, action, F_true); + + fl_print_format("%r%[%QFSS Extended List (FSS-0003) is not allowed for the Rule 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(f_string_format_sentence_end_quote_s.string, print->to, print->context, print->context, f_string_eol_s); + + controller_unlock_print_flush(print->to, &main->thread); + + return F_okay; + } +#endif // _di_controller_print_error_rule_action_fss_0003_unsupported_ + #ifndef _di_controller_print_error_rule_action_missing_pid_ f_status_t controller_print_error_rule_action_missing_pid(fl_print_t * const print, const f_string_static_t alias) { @@ -24,8 +80,76 @@ extern "C" { } #endif // _di_controller_print_error_rule_action_missing_pid_ -#ifndef _di_controller_print_error_rule_action_type_supported_not_ - f_status_t controller_print_error_rule_action_type_supported_not(fl_print_t * const print, controller_cache_action_t * const action, const f_string_static_t type) { +#ifndef _di_controller_print_error_rule_action_positive_number_not_ + f_status_t controller_print_error_rule_action_positive_number_not(fl_print_t * const print, controller_cache_action_t * const action, const f_string_static_t name, const f_string_static_t buffer, const f_ranges_t contents, const f_number_unsigned_t index, const f_status_t status) { + + 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; + + controller_t * const main = (controller_t *) print->custom; + + controller_lock_print(print->to, &main->thread); + + fl_print_format("%r%[%QRule Item Action '%]", print->to, f_string_eol_s, print->context, print->prefix, print->context); + fl_print_format(f_string_format_r_single_s.string, print->to, print->notable, controller_rerun_s, print->notable); + fl_print_format("%[' requires a positive whole number or 0 for the '%]", print->to, print->context, print->context); + fl_print_format(f_string_format_S_single_s.string, print->to, print->notable, name, print->notable); + fl_print_format("%[' value", print->to, print->context, print->context); + + if (index + 1 == contents.used) { + fl_print_format(", but none were given.%]%r", print->to, print->context, f_string_eol_s); + } + else { + fl_print_format(", but '%]%[%/Q%]", print->to, print->context, print->notable, buffer, contents.array[index], print->notable); + + if (status == F_number || status == F_number_decimal) { + fl_print_format("%[' was given.%]%r", print->to, print->context, print->context, f_string_eol_s); + } + else if (status == F_number_overflow) { + fl_print_format("%[' is too large.%]%r", print->to, print->context, print->context, f_string_eol_s); + } + else { + fl_print_format("%[' is negative.%]%r", print->to, print->context, print->context, f_string_eol_s); + } + } + + controller_print_error_rule_cache(print, action, F_true); + + controller_unlock_print_flush(print->to, &main->thread); + + return F_okay; + } +#endif // _di_controller_print_error_rule_action_positive_number_not_ + +#ifndef _di_controller_print_error_rule_action_second_ + f_status_t controller_print_error_rule_action_second(fl_print_t * const print, controller_cache_action_t * const action, const f_string_static_t buffer, const f_range_t range) { + + 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; + + controller_t * const main = (controller_t *) print->custom; + + controller_lock_print(print->to, &main->thread); + + fl_print_format("%r%[%QRule Item Action '%]", print->to, f_string_eol_s, print->context, print->prefix, print->context); + fl_print_format(f_string_format_r_single_s.string, print->to, print->notable, controller_rerun_s, print->notable); + fl_print_format("%[' has '%]", print->to, print->context, print->context); + fl_print_format(f_string_format_Q_range_single_s.string, print->to, print->notable, buffer, range, print->notable); + fl_print_format("%[' as the second value, only the following are allowed: '%]", print->to, print->context, print->context); + fl_print_format("%[%r%]%[' or '%]", print->to, print->notable, controller_stop_s, print->notable, print->context, print->context); + fl_print_format(f_string_format_r_single_s.string, print->to, print->notable, controller_thaw_s, print->notable, print->context); + fl_print_format(f_string_format_sentence_end_quote_s.string, print->to, print->context, print->context, f_string_eol_s); + + controller_print_error_rule_cache(print, action, F_true); + + controller_unlock_print_flush(print->to, &main->thread); + + return F_okay; + } +#endif // _di_controller_print_error_rule_action_second_ + +#ifndef _di_controller_print_error_rule_action_type_unsupported_ + f_status_t controller_print_error_rule_action_type_unsupported(fl_print_t * const print, controller_cache_action_t * const action, const f_string_static_t type) { 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; @@ -44,7 +168,31 @@ extern "C" { return F_okay; } -#endif // _di_controller_print_error_rule_action_type_supported_not_ +#endif // _di_controller_print_error_rule_action_type_unsupported_ + +#ifndef _di_controller_print_error_rule_action_unknown_ + f_status_t controller_print_error_rule_action_unknown(fl_print_t * const print, controller_cache_action_t * const action, const f_string_static_t name, const f_string_static_t buffer, const f_range_t range) { + + 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; + + controller_t * const main = (controller_t *) print->custom; + + controller_lock_print(print->to, &main->thread); + + fl_print_format("%r%[%QRule Item Action '%]", print->to, f_string_eol_s, print->context, print->prefix, print->context); + fl_print_format(f_string_format_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, 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, action, F_true); + + controller_unlock_print_flush(print->to, &main->thread); + + return F_okay; + } +#endif // _di_controller_print_error_rule_action_unknown_ #ifndef _di_controller_print_error_rule_action_unknown_execute_ f_status_t controller_print_error_rule_action_unknown_execute(fl_print_t * const print, controller_cache_action_t * const action, const f_string_static_t name, const f_string_static_t type, const f_number_unsigned_t total) { diff --git a/sources/c/main/print/error/rule/action.h b/sources/c/main/print/error/rule/action.h index 0d50391..15f217b 100644 --- a/sources/c/main/print/error/rule/action.h +++ b/sources/c/main/print/error/rule/action.h @@ -5,7 +5,7 @@ * API Version: 0.7 * Licenses: lgpl-2.1-or-later * - * Provides the print error entry action functionality. + * Provides the print entry action error functionality. * * This is auto-included and should not need to be explicitly included. */ @@ -17,7 +17,69 @@ extern "C" { #endif /** - * Print an error or warning message about some rule not having the pid file information. + * Print Rule error message about the first Rule Item Action parameter being invalid. + * + * @param print + * The output structure to print to. + * + * This requires print.custom to be controller_t. + * + * This does not alter print.custom.setting.state.status. + * + * Must not be NULL. + * @param action + * The Action cache. + * + * Must not be NULL. + * @param action + * The Action cache. + * + * Must not be NULL. + * @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 on success, but no printing is performed. + * + * F_output_not (with error bit) if setting is NULL. + */ +#ifndef _di_controller_print_error_rule_action_first_ + extern f_status_t controller_print_error_rule_action_first(fl_print_t * const print, controller_cache_action_t * const action, const f_string_static_t buffer, const f_range_t range); +#endif // _di_controller_print_error_rule_action_first_ + +/** + * Print an error message about the FSS-0003 standard not being supported for a particular Rule Action. + * + * @param print + * The output structure to print to. + * + * This requires print.custom to be controller_t. + * + * This does not alter print.custom.setting.state.status. + * + * Must not be NULL. + * @param action + * The Action cache. + * + * Must not be NULL. + * @param alias + * The Rule alias of the Rule that is missing the pid file designation. + * + * @return + * F_okay on success. + * F_output_not on success, but no printing is performed. + * + * F_output_not (with error bit) if setting is NULL. + */ +#ifndef _di_controller_print_error_rule_action_fss_0003_unsupported_ + extern f_status_t controller_print_error_rule_action_fss_0003_unsupported(fl_print_t * const print, controller_cache_action_t * const action, const f_string_static_t name); +#endif // _di_controller_print_error_rule_action_fss_0003_unsupported_ + +/** + * Print an error or warning message about some rule not having the PID file information. * * @param print * The output structure to print to. @@ -28,7 +90,7 @@ extern "C" { * * Must not be NULL. * @param alias - * The rule alias of the rule that is missing the pid file designation. + * The Rule alias of the Rule that is missing the pid file designation. * * @return * F_okay on success. @@ -41,6 +103,72 @@ extern "C" { #endif // _di_controller_print_error_rule_action_missing_pid_ /** + * Print Rule error message about the Item value not being a positive whole number. + * + * @param print + * The output structure to print to. + * + * This requires print.custom to be controller_t. + * + * This does not alter print.custom.setting.state.status. + * + * Must not be NULL. + * @param action + * The Action cache. + * + * Must not be NULL. + * @param name + * The Object name. + * @param buffer + * The buffer containing the number. + * @param contents + * The array of ranges representing the Content. + * @param index + * The index position in content representing the Content range for the buffer. + * @param status + * The status code of the error. + * + * @return + * F_okay on success. + * F_output_not on success, but no printing is performed. + * + * F_output_not (with error bit) if setting is NULL. + */ +#ifndef _di_controller_print_error_rule_action_positive_number_not_ + extern f_status_t controller_print_error_rule_action_positive_number_not(fl_print_t * const print, controller_cache_action_t * const action, const f_string_static_t name, const f_string_static_t buffer, const f_ranges_t contents, const f_number_unsigned_t index, const f_status_t status); +#endif // _di_controller_print_error_rule_action_positive_number_not_ + +/** + * Print Rule error message about the second Rule Item Action parameter being invalid. + * + * @param print + * The output structure to print to. + * + * This requires print.custom to be controller_t. + * + * This does not alter print.custom.setting.state.status. + * + * Must not be NULL. + * @param action + * The Action cache. + * + * Must not be NULL. + * @param buffer + * The buffer containing the second Action. + * @param range + * The range within the buffer representing the second Action. + * + * @return + * F_okay on success. + * F_output_not on success, but no printing is performed. + * + * F_output_not (with error bit) if setting is NULL. + */ +#ifndef _di_controller_print_error_rule_action_second_ + extern f_status_t controller_print_error_rule_action_second(fl_print_t * const print, controller_cache_action_t * const action, const f_string_static_t buffer, const f_range_t range); +#endif // _di_controller_print_error_rule_action_second_ + +/** * Print an error about Rule Action type not being supported. * * @param print @@ -64,9 +192,41 @@ extern "C" { * * F_output_not (with error bit) if setting is NULL. */ -#ifndef _di_controller_print_error_rule_action_type_supported_not_ - extern f_status_t controller_print_error_rule_action_type_supported_not(fl_print_t * const print, controller_cache_action_t * const action, const f_string_static_t type); -#endif // _di_controller_print_error_rule_action_type_supported_not_ +#ifndef _di_controller_print_error_rule_action_type_unsupported_ + extern f_status_t controller_print_error_rule_action_type_unsupported(fl_print_t * const print, controller_cache_action_t * const action, const f_string_static_t type); +#endif // _di_controller_print_error_rule_action_type_unsupported_ + +/** + * Print Rule error message about the Rule Item Action being unknown. + * + * @param print + * The output structure to print to. + * + * This requires print.custom to be controller_t. + * + * This does not alter print.custom.setting.state.status. + * + * Must not be NULL. + * @param action + * The Action cache. + * + * Must not be NULL. + * @param name + * The parameter name whose value is unknown. + * @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 on success, but no printing is performed. + * + * F_output_not (with error bit) if setting is NULL. + */ +#ifndef _di_controller_print_error_rule_action_unknown_ + extern f_status_t controller_print_error_rule_action_unknown(fl_print_t * const print, controller_cache_action_t * const action, const f_string_static_t name, const f_string_static_t buffer, const f_range_t range); +#endif // _di_controller_print_error_rule_action_unknown_ /** * Print an error about Rule Action type not being supported. diff --git a/sources/c/main/print/error/rule/item.c b/sources/c/main/print/error/rule/item.c index 437ba63..a32e019 100644 --- a/sources/c/main/print/error/rule/item.c +++ b/sources/c/main/print/error/rule/item.c @@ -25,132 +25,6 @@ extern "C" { } #endif // _di_controller_print_error_rule_item_ -#ifndef _di_controller_print_error_rule_item_action_first_ - f_status_t controller_print_error_rule_item_action_first(fl_print_t * const print, controller_cache_t * const cache) { - - if (!print || !print->custom || !cache) return F_status_set_error(F_output_not); - if (print->verbosity < f_console_verbosity_error_e) return F_output_not; - - controller_t * const main = (controller_t *) print->custom; - - controller_lock_print(print->to, &main->thread); - - fl_print_format("%r%[%QRule item action '%]", print->to, f_string_eol_s, print->context, print->prefix, print->context); - fl_print_format(f_string_format_r_single_s.string, print->to, print->notable, controller_rerun_s, print->notable); - fl_print_format("%[' has '%]", print->to, print->context, print->context); - fl_print_format(f_string_format_Q_range_single_s.string, print->to, print->notable, cache->buffer_item, cache->content_action.array[0], print->notable); - fl_print_format("%[' as the first value, only the following are allowed: '%]", print->to, print->context, print->context); - fl_print_format("%[%r%]%[', '%]", print->to, print->notable, controller_freeze_s, print->notable, print->context, print->context); - fl_print_format("%[%r%]%[', '%]", print->to, print->notable, controller_kill_s, print->notable, print->context, print->context); - fl_print_format("%[%r%]%[', '%]", print->to, print->notable, controller_pause_s, print->notable, print->context, print->context); - fl_print_format("%[%r%]%[', '%]", print->to, print->notable, controller_reload_s, print->notable, print->context, print->context); - fl_print_format("%[%r%]%[', '%]", print->to, print->notable, controller_restart_s, print->notable, print->context, print->context); - fl_print_format("%[%r%]%[', '%]", print->to, print->notable, controller_resume_s, print->notable, print->context, print->context); - fl_print_format("%[%r%]%[', '%]", print->to, print->notable, controller_start_s, print->notable, print->context, print->context); - fl_print_format("%[%r%]%[', or '%]", print->to, print->notable, controller_stop_s, print->notable, print->context, print->context); - fl_print_format(f_string_format_r_single_s.string, print->to, print->notable, controller_thaw_s, print->notable, print->context); - fl_print_format(f_string_format_sentence_end_quote_s.string, print->to, print->context, print->context, f_string_eol_s); - - controller_print_error_rule_cache(print, &cache->action, F_true); - - controller_unlock_print_flush(print->to, &main->thread); - - return F_okay; - } -#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, 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; - - controller_t * const main = (controller_t *) print->custom; - - controller_lock_print(print->to, &main->thread); - - fl_print_format("%r%[%QRule item action '%]", print->to, f_string_eol_s, print->context, print->prefix, print->context); - fl_print_format(f_string_format_r_single_s.string, print->to, print->notable, controller_rerun_s, print->notable); - fl_print_format("%[' requires a positive whole number or 0 for the '%]", print->to, print->context, print->context); - fl_print_format(f_string_format_S_single_s.string, print->to, print->notable, name, print->notable); - fl_print_format("%[' value", print->to, print->context, print->context); - - if (index + 1 == cache->content_action.used) { - fl_print_format(", but none were given.%]%r", print->to, print->context, f_string_eol_s); - } - else { - fl_print_format(", but '%]%[%/Q%]", print->to, print->context, print->notable, cache->buffer_item, cache->content_action.array[index], print->notable); - - if (status == F_number || status == F_number_decimal) { - fl_print_format("%[' was given.%]%r", print->to, print->context, print->context, f_string_eol_s); - } - else if (status == F_number_overflow) { - fl_print_format("%[' is too large.%]%r", print->to, print->context, print->context, f_string_eol_s); - } - else { - fl_print_format("%[' is negative.%]%r", print->to, print->context, print->context, f_string_eol_s); - } - } - - controller_print_error_rule_cache(print, &cache->action, F_true); - - controller_unlock_print_flush(print->to, &main->thread); - - return F_okay; - } -#endif // _di_controller_print_error_rule_item_action_positive_number_not_ - -#ifndef _di_controller_print_error_rule_item_action_second_ - f_status_t controller_print_error_rule_item_action_second(fl_print_t * const print, controller_cache_t * const cache) { - - if (!print || !print->custom || !cache) return F_status_set_error(F_output_not); - if (print->verbosity < f_console_verbosity_error_e) return F_output_not; - - controller_t * const main = (controller_t *) print->custom; - - controller_lock_print(print->to, &main->thread); - - fl_print_format("%r%[%QRule item action '%]", print->to, f_string_eol_s, print->context, print->prefix, print->context); - fl_print_format(f_string_format_r_single_s.string, print->to, print->notable, controller_rerun_s, print->notable); - fl_print_format("%[' has '%]", print->to, print->context, print->context); - fl_print_format(f_string_format_Q_range_single_s.string, print->to, print->notable, cache->buffer_item, cache->content_action.array[1], print->notable); - fl_print_format("%[' as the second value, only the following are allowed: '%]", print->to, print->context, print->context); - fl_print_format("%[%r%]%[' or '%]", print->to, print->notable, controller_stop_s, print->notable, print->context, print->context); - fl_print_format(f_string_format_r_single_s.string, print->to, print->notable, controller_thaw_s, print->notable, print->context); - fl_print_format(f_string_format_sentence_end_quote_s.string, print->to, print->context, print->context, f_string_eol_s); - - controller_print_error_rule_cache(print, &cache->action, F_true); - - controller_unlock_print_flush(print->to, &main->thread); - - return F_okay; - } -#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 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; - - controller_t * const main = (controller_t *) print->custom; - - controller_lock_print(print->to, &main->thread); - - fl_print_format("%r%[%QRule item action '%]", print->to, f_string_eol_s, print->context, print->prefix, print->context); - fl_print_format(f_string_format_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, 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); - - controller_unlock_print_flush(print->to, &main->thread); - - return F_okay; - } -#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 uint8_t script_is, const f_string_static_t name, const f_status_t status) { diff --git a/sources/c/main/print/error/rule/item.h b/sources/c/main/print/error/rule/item.h index 84601ba..a2607d3 100644 --- a/sources/c/main/print/error/rule/item.h +++ b/sources/c/main/print/error/rule/item.h @@ -5,7 +5,7 @@ * API Version: 0.7 * Licenses: lgpl-2.1-or-later * - * Provides the print error entry item functionality. + * Provides the print entry item error functionality. * * This is auto-included and should not need to be explicitly included. */ @@ -24,6 +24,10 @@ extern "C" { * @param print * The output structure to print to. * + * This requires print.custom to be controller_t. + * + * This does not alter print.custom.setting.state.status. + * * Must not be NULL. * @param cache * A structure for containing and caching relevant data. @@ -46,110 +50,14 @@ extern "C" { #endif // _di_controller_print_error_rule_item_ /** - * Print rule error message about the first rule item action parameter being invalid. - * - * @param print - * The output structure to print to. - * - * Must not be NULL. - * @param cache - * A structure for containing and caching relevant data. - * - * Must not be NULL. - * - * @return - * F_okay on success. - * F_output_not on success, but no printing is performed. - * - * F_output_not (with error bit) if setting is NULL. - */ -#ifndef _di_controller_print_error_rule_item_action_first_ - extern f_status_t controller_print_error_rule_item_action_first(fl_print_t * const print, controller_cache_t * const cache); -#endif // _di_controller_print_error_rule_item_action_first_ - -/** - * Print rule error message about the item value not being a positive whole number. - * - * @param print - * The output structure to print to. - * - * Must not be NULL. - * @param cache - * A structure for containing and caching relevant data. - * - * Must not be NULL. - * @param name - * 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 on success, but no printing is performed. - * - * 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, const f_status_t status); -#endif // _di_controller_print_error_rule_item_action_positive_number_not_ - -/** - * Print rule error message about the second rule item action parameter being invalid. - * - * @param print - * The output structure to print to. - * - * Must not be NULL. - * @param cache - * A structure for containing and caching relevant data. - * - * Must not be NULL. - * - * @return - * F_okay on success. - * F_output_not on success, but no printing is performed. - * - * F_output_not (with error bit) if setting is NULL. - */ -#ifndef _di_controller_print_error_rule_item_action_second_ - extern f_status_t controller_print_error_rule_item_action_second(fl_print_t * const print, controller_cache_t * const cache); -#endif // _di_controller_print_error_rule_item_action_second_ - -/** - * Print rule error message about the rule item action being unknown. + * Print an error or warning message related to the failed execution of some program or script. * * @param print * The output structure to print to. * - * Must not be NULL. - * @param cache - * A structure for containing and caching relevant data. - * - * Must not be NULL. - * @param name - * The parameter name whose value is unknown. - * @param buffer - * The buffer containing the setting name. - * @param range - * The range within the buffer representing the unknown action name. + * This requires print.custom to be controller_t. * - * @return - * F_okay on success. - * F_output_not on success, but no printing is performed. - * - * F_output_not (with error bit) if setting is NULL. - */ -#ifndef _di_controller_print_error_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 buffer, const f_range_t range); -#endif // _di_controller_print_error_rule_item_action_unknown_ - -/** - * Print an error or warning message related to the failed execution of some program or script. - * - * @param print - * The output structure to print to. + * This does not alter print.custom.setting.state.status. * * Must not be NULL. * @param instance @@ -205,7 +113,7 @@ extern "C" { * @param print * The error or warning output structure. * @param alias - * The rule alias of the rule that is not loaded. + * The Rule alias of the Rule that is not loaded. * * @return * F_okay on success. diff --git a/sources/c/main/print/error/rule/setting.c b/sources/c/main/print/error/rule/setting.c index e0de63b..3a49420 100644 --- a/sources/c/main/print/error/rule/setting.c +++ b/sources/c/main/print/error/rule/setting.c @@ -77,7 +77,7 @@ extern "C" { controller_lock_print(print->to, &main->thread); - fl_print_format("%rProcessing rule item action '%[%Q%]'", print->to, f_string_eol_s, print->set->title, name, print->set->title); + 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); @@ -102,7 +102,7 @@ extern "C" { controller_lock_print(print->to, &main->thread); - fl_print_format("%rProcessing rule item action '%[%Q%]' setting ", print->to, f_string_eol_s, print->set->title, name, print->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%]'", print->to, print->set->notable, name_sub, print->set->notable); @@ -135,7 +135,7 @@ extern "C" { controller_lock_print(print->to, &main->thread); - fl_print_format("%rProcessing rule item action '%[%Q%]' setting value to", print->to, f_string_eol_s, print->set->title, name, print->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) { diff --git a/sources/c/main/print/error/rule/setting.h b/sources/c/main/print/error/rule/setting.h index b77fa4c..a00afd5 100644 --- a/sources/c/main/print/error/rule/setting.h +++ b/sources/c/main/print/error/rule/setting.h @@ -5,7 +5,7 @@ * API Version: 0.7 * Licenses: lgpl-2.1-or-later * - * Provides the print error entry setting functionality. + * Provides the print entry setting error functionality. * * This is auto-included and should not need to be explicitly included. */ diff --git a/sources/c/main/print/message/entry.h b/sources/c/main/print/message/entry.h index 3708ebc..c228911 100644 --- a/sources/c/main/print/message/entry.h +++ b/sources/c/main/print/message/entry.h @@ -19,7 +19,7 @@ extern "C" { /** * Print message about the specified entry being in the given state. * - * This generally only applies to the "ready" entry item action. + * This generally only applies to the "ready" Entry Item Action. * * @param print * The output structure to print to. diff --git a/sources/c/main/print/message/entry/action.c b/sources/c/main/print/message/entry/action.c index 64d7275..09432ad 100644 --- a/sources/c/main/print/message/entry/action.c +++ b/sources/c/main/print/message/entry/action.c @@ -35,7 +35,7 @@ extern "C" { controller_lock_print(print->to, &main->thread); - fl_print_format("%rIgnoring %r item action '", print->to, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s); + fl_print_format("%rIgnoring %r Item Action '", print->to, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s); fl_print_format(f_string_format_Q_single_s.string, print->to, print->set->title, name, print->set->title); fl_print_format("', state already is ready.%r", print->to, f_string_eol_s); @@ -55,7 +55,7 @@ extern "C" { controller_lock_print(print->to, &main->thread); - fl_print_format("%r%[%QThe %r item action '%]", print->to, f_string_eol_s, print->context, print->prefix, is_entry ? controller_entry_s : controller_exit_s, print->context); + fl_print_format("%r%[%QThe %r Item Action '%]", print->to, f_string_eol_s, print->context, print->prefix, is_entry ? controller_entry_s : controller_exit_s, print->context); fl_print_format(f_string_format_Q_single_s.string, print->to, print->notable, cache->action.name_action, print->notable); if (action->parameters.used) { @@ -100,7 +100,7 @@ extern "C" { controller_lock_print(print->to, &main->thread); - fl_print_format("%rThe %r item action '", print->to, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s); + fl_print_format("%rThe %r Item Action '", print->to, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s); fl_print_format(f_string_format_Q_single_s.string, print->to, print->set->title, cache->action.name_action, print->set->title); if (action->parameters.used) { @@ -131,7 +131,7 @@ extern "C" { controller_lock_print(print->to, &main->thread); - fl_print_format("%rWaiting before processing %r item action '", print->to, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s); + fl_print_format("%rWaiting before processing %r Item Action '", print->to, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s); fl_print_format(f_string_format_Q_single_s.string, print->to, print->set->title, name, print->set->title); fl_print_format("'.%r", print->to, f_string_eol_s); diff --git a/sources/c/main/print/message/entry/action.h b/sources/c/main/print/message/entry/action.h index 460d1c9..0f60e84 100644 --- a/sources/c/main/print/message/entry/action.h +++ b/sources/c/main/print/message/entry/action.h @@ -5,7 +5,7 @@ * API Version: 0.7 * Licenses: lgpl-2.1-or-later * - * Provides the print entry message action functionality. + * Provides the print entry action message functionality. * * This is auto-included and should not need to be explicitly included. */ @@ -43,9 +43,9 @@ extern "C" { #endif // _di_controller_print_message_entry_action_parameters_ /** - * Print message about the specified entry item action being in the ready state. + * Print message about the specified Entry Item Action being in the ready state. * - * This generally only applies to the "ready" entry item action. + * This generally only applies to the "ready" Entry Item Action. * * @param print * The output structure to print to. @@ -135,9 +135,9 @@ extern "C" { #endif // _di_controller_print_message_entry_action_state_failed_ /** - * Print message about waiting for the specified entry item action. + * Print message about waiting for the specified Entry Item Action. * - * This generally only applies to the "ready" entry item action. + * This generally only applies to the "ready" Entry Item Action. * * @param print * The output structure to print to. diff --git a/sources/c/main/print/message/entry/item.h b/sources/c/main/print/message/entry/item.h index 5629401..f2a08e4 100644 --- a/sources/c/main/print/message/entry/item.h +++ b/sources/c/main/print/message/entry/item.h @@ -5,7 +5,7 @@ * API Version: 0.7 * Licenses: lgpl-2.1-or-later * - * Provides the print entry message item functionality. + * Provides the print entry item message functionality. * * This is auto-included and should not need to be explicitly included. */ @@ -153,7 +153,7 @@ extern "C" { * If TRUE, then this loads as an entry. * If FALSE, then this loads as an exit. * @param alias_rule - * The rule alias name. + * The Rule alias name. * * @return * F_okay on success. diff --git a/sources/c/main/print/output/entry/setting.c b/sources/c/main/print/output/entry/setting.c index 61f3acc..9b5eea1 100644 --- a/sources/c/main/print/output/entry/setting.c +++ b/sources/c/main/print/output/entry/setting.c @@ -17,7 +17,7 @@ extern "C" { controller_lock_print(print->to, &main->thread); - fl_print_format("%rProcessing %r item action '", print->to, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s); + fl_print_format("%rProcessing %r Item Action '", print->to, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s); fl_print_format("%[%Q%]' setting ", print->to, print->set->title, name, print->set->title); diff --git a/sources/c/main/print/output/entry/setting.h b/sources/c/main/print/output/entry/setting.h index 463f093..91601eb 100644 --- a/sources/c/main/print/output/entry/setting.h +++ b/sources/c/main/print/output/entry/setting.h @@ -5,7 +5,7 @@ * API Version: 0.7 * Licenses: lgpl-2.1-or-later * - * Provides the print entry output setting functionality. + * Provides the print entry setting output functionality. * * This is auto-included and should not need to be explicitly included. */ diff --git a/sources/c/main/print/output/rule/execute.h b/sources/c/main/print/output/rule/execute.h index 303c318..e99e65f 100644 --- a/sources/c/main/print/output/rule/execute.h +++ b/sources/c/main/print/output/rule/execute.h @@ -5,7 +5,7 @@ * API Version: 0.7 * Licenses: lgpl-2.1-or-later * - * Provides the print output rule execute functionality. + * Provides the print rule execute output functionality. * * This is auto-included and should not need to be explicitly included. */ diff --git a/sources/c/main/print/warning/entry/action.c b/sources/c/main/print/warning/entry/action.c index 7533c39..ee2cadb 100644 --- a/sources/c/main/print/warning/entry/action.c +++ b/sources/c/main/print/warning/entry/action.c @@ -36,7 +36,7 @@ extern "C" { fl_print_format("%r%[%QMultiple '%]", 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("%[' %r item actions detected; only the first will be used.%]%r", print->to, print->context, is_entry ? controller_entry_s : controller_exit_s, print->context, f_string_eol_s); + fl_print_format("%[' %r Item Actions detected; only the first will be used.%]%r", print->to, print->context, is_entry ? controller_entry_s : controller_exit_s, print->context, f_string_eol_s); controller_print_error_entry_cache(print, &cache->action, is_entry); @@ -47,20 +47,20 @@ extern "C" { #endif // _di_controller_print_warning_entry_action_multiple_ #ifndef _di_controller_print_warning_entry_action_unknown_ - f_status_t controller_print_warning_entry_action_unknown(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_string_static_t name) { + f_status_t controller_print_warning_entry_action_unknown(fl_print_t * const print, controller_cache_action_t * const action, const uint8_t is_entry, const f_string_static_t name) { - if (!print || !print->custom || !cache) return F_status_set_error(F_output_not); + if (!print || !print->custom || !action) return F_status_set_error(F_output_not); if (print->verbosity < f_console_verbosity_debug_e) return F_output_not; controller_t * const main = (controller_t *) print->custom; controller_lock_print(print->to, &main->thread); - fl_print_format("%r%[%QUnknown %r item action '%]", print->to, f_string_eol_s, print->context, print->prefix, is_entry ? controller_entry_s : controller_exit_s, print->context); + fl_print_format("%r%[%QUnknown %r Item Action '%]", print->to, f_string_eol_s, print->context, print->prefix, is_entry ? controller_entry_s : controller_exit_s, print->context); fl_print_format(f_string_format_Q_single_s.string, print->to, print->notable, name, print->notable); fl_print_format(f_string_format_sentence_end_quote_s.string, print->to, print->context, print->context, f_string_eol_s); - controller_print_error_rule_cache(print, &cache->action, F_true); + controller_print_error_rule_cache(print, action, F_true); controller_unlock_print_flush(print->to, &main->thread); diff --git a/sources/c/main/print/warning/entry/action.h b/sources/c/main/print/warning/entry/action.h index 1821396..731de6f 100644 --- a/sources/c/main/print/warning/entry/action.h +++ b/sources/c/main/print/warning/entry/action.h @@ -17,7 +17,7 @@ extern "C" { #endif /** - * Print warning the "failsafe" entry item action being specified while already in failsafe mode. + * Print warning the "failsafe" Entry Item Action being specified while already in failsafe mode. * * @param print * The output structure to print to. @@ -77,14 +77,18 @@ extern "C" { #endif // _di_controller_print_warning_entry_action_multiple_ /** - * Print warnng message about a entry item action being unknown. + * Print warnng message about a Entry Item Action being unknown. * * @param print * The output structure to print to. * + * This requires print.custom to be controller_t. + * + * This does not alter print.custom.setting.state.status. + * * Must not be NULL. - * @param cache - * A structure for containing and caching relevant data. + * @param action + * The Action cache. * * Must not be NULL. * @param name @@ -99,7 +103,7 @@ extern "C" { * F_output_not (with error bit) if setting is NULL. */ #ifndef _di_controller_print_warning_entry_action_unknown_ - extern f_status_t controller_print_warning_entry_action_unknown(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_string_static_t name); + extern f_status_t controller_print_warning_entry_action_unknown(fl_print_t * const print, controller_cache_action_t * const action, const uint8_t is_entry, const f_string_static_t name); #endif // _di_controller_print_warning_entry_action_unknown_ #ifdef __cplusplus diff --git a/sources/c/main/print/warning/rule/action.c b/sources/c/main/print/warning/rule/action.c index 923a8db..66a954e 100644 --- a/sources/c/main/print/warning/rule/action.c +++ b/sources/c/main/print/warning/rule/action.c @@ -5,18 +5,20 @@ extern "C" { #endif #ifndef _di_controller_print_warning_rule_action_unknown_ - f_status_t controller_print_warning_rule_action_unknown(fl_print_t * const print, controller_cache_t * const cache) { + f_status_t controller_print_warning_rule_action_unknown(fl_print_t * const print, controller_cache_action_t * const action, const f_string_static_t name) { - if (!print || !print->custom || !cache) 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_debug_e) return F_output_not; controller_t * const main = (controller_t *) print->custom; controller_lock_print(print->to, &main->thread); - fl_print_format("%r%[%QAction type is unknown, ignoring.%]%r", print->to, f_string_eol_s, print->context, print->prefix, print->context, f_string_eol_s); + fl_print_format("%r%[%QUnknown Rule 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(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); + controller_print_error_rule_cache(print, action, F_true); controller_unlock_print_flush(print->to, &main->thread); diff --git a/sources/c/main/print/warning/rule/action.h b/sources/c/main/print/warning/rule/action.h index 1b2f64f..c4f2e8b 100644 --- a/sources/c/main/print/warning/rule/action.h +++ b/sources/c/main/print/warning/rule/action.h @@ -5,7 +5,7 @@ * API Version: 0.7 * Licenses: lgpl-2.1-or-later * - * Provides the print rule warning action functionality. + * Provides the print rule action warning functionality. * * This is auto-included and should not need to be explicitly included. */ @@ -17,7 +17,7 @@ extern "C" { #endif /** - * Print warning message about rule action being unknown. + * Print warning message about the Rule Action being unknown. * * @param print * The output structure to print to. @@ -27,10 +27,12 @@ extern "C" { * 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 name + * The Action name that is unknown. * * @return * F_okay on success. @@ -38,9 +40,9 @@ extern "C" { * * F_output_not (with error bit) if setting is NULL. */ -#ifndef _di_controller_print_warning_entry_action_multiple_ - extern f_status_t controller_print_warning_rule_action_unknown(fl_print_t * const print, controller_cache_t * const cache); -#endif // _di_controller_print_warning_entry_action_multiple_ +#ifndef _di_controller_print_warning_rule_action_unknown_ + extern f_status_t controller_print_warning_rule_action_unknown(fl_print_t * const print, controller_cache_action_t * const action, const f_string_static_t name); +#endif // _di_controller_print_warning_rule_action_unknown_ #ifdef __cplusplus } // extern "C" diff --git a/sources/c/main/print/warning/rule/item.c b/sources/c/main/print/warning/rule/item.c new file mode 100644 index 0000000..ef72d33 --- /dev/null +++ b/sources/c/main/print/warning/rule/item.c @@ -0,0 +1,31 @@ +#include "../../../controller.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_controller_print_warning_rule_item_unknown_ + f_status_t controller_print_warning_rule_item_unknown(fl_print_t * const print, controller_cache_action_t * const action, const f_string_static_t name) { + + if (!print || !print->custom || !action) return F_status_set_error(F_output_not); + if (print->verbosity < f_console_verbosity_debug_e) return F_output_not; + + controller_t * const main = (controller_t *) print->custom; + + controller_lock_print(print->to, &main->thread); + + fl_print_format("%r%[%QUnknown Rule Item '%]", print->to, f_string_eol_s, print->context, print->prefix, print->context); + fl_print_format(f_string_format_Q_single_s.string, print->to, print->notable, name, print->notable); + fl_print_format(f_string_format_sentence_end_quote_s.string, print->to, print->context, print->context, f_string_eol_s); + + controller_print_error_rule_cache(print, action, F_true); + + controller_unlock_print_flush(print->to, &main->thread); + + return F_okay; + } +#endif // _di_controller_print_warning_rule_item_unknown_ + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/sources/c/main/print/warning/rule/item.h b/sources/c/main/print/warning/rule/item.h new file mode 100644 index 0000000..dc178ac --- /dev/null +++ b/sources/c/main/print/warning/rule/item.h @@ -0,0 +1,51 @@ +/** + * FLL - Level 3 + * + * Project: Controller + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * Provides the print Rule Item warning functionality. + * + * This is auto-included and should not need to be explicitly included. + */ +#ifndef _controller_main_print_warning_rule_item_h +#define _controller_main_print_warning_rule_item_h + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Print warning message about the Rule Item being unknown. + * + * @param print + * The output structure to print to. + * + * This requires print.custom to be controller_t. + * + * This does not alter print.custom.setting.state.status. + * + * Must not be NULL. + * @param action + * The action cache. + * + * Must not be NULL. + * @param name + * The Item name that is unknown. + * + * @return + * F_okay on success. + * F_output_not on success, but no printing is performed. + * + * F_output_not (with error bit) if setting is NULL. + */ +#ifndef _di_controller_print_warning_rule_item_unknown_ + extern f_status_t controller_print_warning_rule_item_unknown(fl_print_t * const print, controller_cache_action_t * const action, const f_string_static_t name); +#endif // _di_controller_print_warning_rule_item_unknown_ + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _controller_main_print_warning_rule_item_h diff --git a/sources/c/main/print/warning/rule/setting.c b/sources/c/main/print/warning/rule/setting.c new file mode 100644 index 0000000..12cb864 --- /dev/null +++ b/sources/c/main/print/warning/rule/setting.c @@ -0,0 +1,31 @@ +#include "../../../controller.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_controller_print_warning_setting_item_unknown_ + f_status_t controller_print_warning_rule_setting_unknown(fl_print_t * const print, controller_cache_action_t * const action, const f_string_static_t name) { + + if (!print || !print->custom || !action) return F_status_set_error(F_output_not); + if (print->verbosity < f_console_verbosity_debug_e) return F_output_not; + + controller_t * const main = (controller_t *) print->custom; + + controller_lock_print(print->to, &main->thread); + + fl_print_format("%r%[%QUnknown Rule setting '%]", print->to, f_string_eol_s, print->context, print->prefix, print->context); + fl_print_format(f_string_format_Q_single_s.string, print->to, print->notable, name, print->notable); + fl_print_format(f_string_format_sentence_end_quote_s.string, print->to, print->context, print->context, f_string_eol_s); + + controller_print_error_rule_cache(print, action, F_true); + + controller_unlock_print_flush(print->to, &main->thread); + + return F_okay; + } +#endif // _di_controller_print_warning_setting_item_unknown_ + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/sources/c/main/print/warning/rule/setting.h b/sources/c/main/print/warning/rule/setting.h new file mode 100644 index 0000000..5deec88 --- /dev/null +++ b/sources/c/main/print/warning/rule/setting.h @@ -0,0 +1,51 @@ +/** + * FLL - Level 3 + * + * Project: Controller + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * Provides the print Rule Setting warning functionality. + * + * This is auto-included and should not need to be explicitly included. + */ +#ifndef _controller_main_print_warning_rule_setting_h +#define _controller_main_print_warning_rule_setting_h + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Print warning message about the Rule Item being unknown. + * + * @param print + * The output structure to print to. + * + * This requires print.custom to be controller_t. + * + * This does not alter print.custom.setting.state.status. + * + * Must not be NULL. + * @param action + * The action cache. + * + * Must not be NULL. + * @param name + * The Item name that is unknown. + * + * @return + * F_okay on success. + * F_output_not on success, but no printing is performed. + * + * F_output_not (with error bit) if setting is NULL. + */ +#ifndef _di_controller_print_warning_rule_setting_unknown_ + extern f_status_t controller_print_warning_rule_setting_unknown(fl_print_t * const print, controller_cache_action_t * const action, const f_string_static_t name); +#endif // _di_controller_print_warning_rule_setting_unknown_ + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _controller_main_print_warning_rule_setting_h diff --git a/sources/c/main/rule/action.c b/sources/c/main/rule/action.c index 3cb719c..5f07b9f 100644 --- a/sources/c/main/rule/action.c +++ b/sources/c/main/rule/action.c @@ -250,7 +250,7 @@ extern "C" { } if (!type_rerun) { - controller_print_error_rule_item_action_first(&main->program.error, cache); + controller_print_error_rule_action_first(&main->program.error, &cache->action, cache->buffer_item, cache->content_action.array[0]); return F_status_set_error(F_valid_not); } @@ -268,7 +268,7 @@ extern "C" { } } else { - controller_print_error_rule_item_action_second(&main->program.error, cache); + controller_print_error_rule_action_second(&main->program.error, &cache->action, cache->buffer_item, cache->content_action.array[1]); return F_status_set_error(F_valid_not); } @@ -285,7 +285,7 @@ extern "C" { 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->buffer_item, cache->content_action.array[i]); + controller_print_error_rule_action_unknown(&main->program.error, &cache->action, controller_rerun_s, cache->buffer_item, cache->content_action.array[i]); return F_status_set_error(F_valid_not); } @@ -310,7 +310,7 @@ extern "C" { item->with &= ~controller_with_session_new_d; } else { - controller_print_error_rule_item_action_unknown(&main->program.error, cache, controller_with_s, cache->buffer_item, cache->content_action.array[i]); + controller_print_error_rule_action_unknown(&main->program.error, &cache->action, controller_with_s, cache->buffer_item, cache->content_action.array[i]); state.status = F_status_set_error(F_valid_not); @@ -441,7 +441,7 @@ extern "C" { 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, status); + controller_print_error_rule_action_positive_number_not(&main->program.error, &cache->action, name, cache->buffer_item, cache->content_action, *index, status); } } diff --git a/sources/c/main/rule/execute.c b/sources/c/main/rule/execute.c index 4f28c08..2b294f7 100644 --- a/sources/c/main/rule/execute.c +++ b/sources/c/main/rule/execute.c @@ -402,8 +402,7 @@ extern "C" { } } else { - controller_print_warning_rule_action_unknown(&main->program.warning, &instance->cache); - + // A warning about the Action being unknown would have been printed on load and so no warning should be needed here. if (success == F_false) { success = F_ignore; } diff --git a/sources/c/main/rule/execute.h b/sources/c/main/rule/execute.h index 9cde8f5..c2d3e86 100644 --- a/sources/c/main/rule/execute.h +++ b/sources/c/main/rule/execute.h @@ -145,7 +145,7 @@ extern "C" { * * Must not be NULL. * @param item - * The rule item being executed. + * The Rule Item being executed. * * Must not be NULL. * @param action diff --git a/sources/c/main/rule/instance.c b/sources/c/main/rule/instance.c index 749a056..9a969da 100644 --- a/sources/c/main/rule/instance.c +++ b/sources/c/main/rule/instance.c @@ -24,7 +24,7 @@ extern "C" { break; default: - controller_print_error_rule_action_type_supported_not(&main->program.error, &instance->cache.action, controller_convert_rule_action_type_string(instance->action)); + controller_print_error_rule_action_type_unsupported(&main->program.error, &instance->cache.action, controller_convert_rule_action_type_string(instance->action)); return F_status_set_error(F_parameter); } @@ -497,7 +497,7 @@ extern "C" { controller_rule_item_t *rule_item = 0; - // Copy all rule item action statuses from the rule instance to the rule. + // Copy all Rule Item Action statuses from the rule instance to the rule. for (i = 0; i < rule->items.used; ++i) { rule_item = &rule->items.array[i]; diff --git a/sources/c/main/rule/item.c b/sources/c/main/rule/item.c index 59ad593..6822344 100644 --- a/sources/c/main/rule/item.c +++ b/sources/c/main/rule/item.c @@ -121,36 +121,17 @@ extern "C" { type = controller_rule_action_type_with_e; } else { - if (main->program.warning.verbosity == f_console_verbosity_debug_e) { - controller_lock_print(main->program.warning.to, &main->thread); - - fl_print_format("%r%[%QUnknown rule item action '%]", main->program.warning.to, f_string_eol_s, main->program.warning.context, main->program.warning.prefix, main->program.warning.context); - fl_print_format(f_string_format_Q_single_s.string, main->program.warning.to, main->program.warning.notable, cache->action.name_action, main->program.warning.notable); - fl_print_format(f_string_format_sentence_end_quote_s.string, main->program.warning.to, main->program.warning.context, main->program.warning.context, f_string_eol_s); - - controller_print_error_rule_cache(&main->program.warning, &cache->action, F_true); - - controller_unlock_print_flush(main->program.warning.to, &main->thread); - } + controller_print_warning_rule_action_unknown(&main->program.warning, &cache->action, cache->action.name_action); continue; } if (multiple) { if (type == controller_rule_action_type_group_e || type == controller_rule_action_type_pid_file_e || type == controller_rule_action_type_user_e) { - - if (main->program.error.verbosity > f_console_verbosity_quiet_e) { - controller_lock_print(main->program.error.to, &main->thread); - - fl_print_format("%r%[%QFSS Extended List is not allowed for the rule item action '%]", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, main->program.error.context); - fl_print_format(f_string_format_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_unlock_print_flush(main->program.error.to, &main->thread); - } - state.status = F_status_set_error(F_support_not); + controller_print_error_rule_action_fss_0003_unsupported(&main->program.error, &cache->action, cache->action.name_action); + break; } diff --git a/sources/c/main/rule/read.c b/sources/c/main/rule/read.c index f4b2be0..24b6450 100644 --- a/sources/c/main/rule/read.c +++ b/sources/c/main/rule/read.c @@ -271,17 +271,7 @@ extern "C" { rule->items.array[rule->items.used].type = controller_rule_item_type_utility_e; } else { - if (main->program.warning.verbosity == f_console_verbosity_debug_e) { - controller_lock_print(main->program.warning.to, &main->thread); - - fl_print_format("%r%[%QUnknown rule item '%]", main->program.warning.to, f_string_eol_s, main->program.warning.context, main->program.warning.prefix, main->program.warning.context); - fl_print_format(f_string_format_Q_single_s.string, main->program.warning.to, main->program.warning.notable, cache->action.name_item, main->program.warning.notable); - fl_print_format(f_string_format_sentence_end_quote_s.string, main->program.warning.to, main->program.warning.context, main->program.warning.context, f_string_eol_s); - - controller_print_error_rule_cache(&main->program.warning, &cache->action, F_true); - - controller_unlock_print_flush(main->program.warning.to, &main->thread); - } + controller_print_warning_rule_item_unknown(&main->program.warning, &cache->action, cache->action.name_item); continue; } diff --git a/sources/c/main/rule/setting.c b/sources/c/main/rule/setting.c index 0040bd5..a74c64c 100644 --- a/sources/c/main/rule/setting.c +++ b/sources/c/main/rule/setting.c @@ -100,7 +100,7 @@ extern "C" { 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), macro_controller_f(fll_fss_extended_read), F_true, F_false); return state.status; } @@ -135,7 +135,7 @@ extern "C" { 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), macro_controller_f(f_string_dynamic_partial_append_nulless), F_true, F_false); if (F_status_set_fine(state.status) == F_memory_not) { status_return = state.status; @@ -218,15 +218,7 @@ extern "C" { cache->action.line_action = ++cache->action.line_item; - controller_lock_print(main->program.warning.to, &main->thread); - - fl_print_format("%r%[%QUnknown rule setting '%]", main->program.warning.to, f_string_eol_s, main->program.warning.context, main->program.warning.prefix, main->program.warning.context); - 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_unlock_print_flush(main->program.warning.to, &main->thread); + controller_print_warning_rule_setting_unknown(&main->program.warning, &cache->action, cache->action.name_item); } continue; @@ -239,7 +231,7 @@ extern "C" { 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), macro_controller_f(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; @@ -305,7 +297,7 @@ extern "C" { 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), macro_controller_f(f_memory_array_increase), F_true, F_false); break; } @@ -342,7 +334,7 @@ extern "C" { } } 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), macro_controller_f(fl_conversion_dynamic_partial_to_signed_detect), F_true, F_false); state.status = F_status_set_error(state.status); @@ -383,7 +375,7 @@ extern "C" { 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), macro_controller_f(f_memory_array_increase), F_true, F_false); if (F_status_set_fine(state.status) == F_memory_not) { status_return = state.status; @@ -412,7 +404,7 @@ extern "C" { 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), macro_controller_f(f_string_dynamic_partial_append_nulless), F_true, F_false); if (F_status_set_fine(state.status) == F_memory_not) { status_return = state.status; @@ -438,7 +430,7 @@ extern "C" { 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), macro_controller_f(f_string_dynamic_partial_append_nulless), F_true, F_false); if (F_status_set_fine(state.status) == F_memory_not) { status_return = state.status; @@ -500,7 +492,7 @@ extern "C" { 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), macro_controller_f(f_string_dynamic_append), F_true, F_false); } else { rule->cgroup.groups.used = 0; @@ -510,7 +502,7 @@ extern "C" { 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), macro_controller_f(f_memory_array_increase), F_true, F_false); break; } @@ -520,7 +512,7 @@ extern "C" { 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), macro_controller_f(f_string_dynamic_partial_append_nulless), F_true, F_false); break; } @@ -679,7 +671,7 @@ extern "C" { 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), macro_controller_f(f_memory_array_increase), F_true, F_false); if (F_status_set_fine(state.status) == F_memory_not) { status_return = state.status; @@ -738,7 +730,7 @@ extern "C" { } } 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), macro_controller_f(fl_conversion_dynamic_partial_to_signed_detect), F_true, F_false); state.status = F_status_set_error(state.status); @@ -867,7 +859,7 @@ extern "C" { 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, macro_controller_f(controller_validate_has_graph), F_true, F_false); if (F_status_is_error_not(status_return)) { status_return = state.status; @@ -887,7 +879,7 @@ extern "C" { 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), macro_controller_f(f_string_dynamic_partial_append_nulless), F_true, F_false); if (F_status_set_fine(state.status) == F_memory_not) { status_return = state.status; @@ -1018,7 +1010,7 @@ extern "C" { } } 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, macro_controller_f(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)) { @@ -1118,7 +1110,7 @@ extern "C" { 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, macro_controller_f(fl_conversion_dynamic_partial_to_signed_detect), F_true, F_false); } if (F_status_is_error_not(status_return)) { @@ -1189,7 +1181,7 @@ extern "C" { 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), macro_controller_f(f_string_dynamic_partial_append_nulless), F_true, F_false); controller_print_error_rule_cache(&main->program.error, &cache->action, F_false); @@ -1219,7 +1211,7 @@ extern "C" { 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), macro_controller_f(f_capability_from_text), F_true, F_false); controller_print_error_rule_cache(&main->program.error, &cache->action, F_false); @@ -1287,7 +1279,7 @@ extern "C" { } } 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, macro_controller_f(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)) { @@ -1314,7 +1306,7 @@ extern "C" { 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), macro_controller_f(f_string_dynamic_partial_append_nulless), F_true, F_false); controller_print_error_rule_cache(&main->program.error, &cache->action, F_false); @@ -1362,7 +1354,7 @@ extern "C" { 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, macro_controller_f(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)); } @@ -1408,7 +1400,7 @@ extern "C" { 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), macro_controller_f(f_memory_array_increase), F_true, F_false); if (F_status_set_fine(state.status) == F_memory_not) { status_return = state.status; @@ -1453,7 +1445,7 @@ extern "C" { 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, macro_controller_f(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)); } @@ -1486,7 +1478,7 @@ extern "C" { 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), macro_controller_f(f_memory_array_increase), F_true, F_false); if (F_status_set_fine(state.status) == F_memory_not) { status_return = state.status; @@ -1514,7 +1506,7 @@ extern "C" { 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), macro_controller_f(f_string_dynamic_partial_append_nulless), F_true, F_false); setting_values->array[setting_values->used].used = 0; @@ -1569,7 +1561,7 @@ extern "C" { 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, macro_controller_f(controller_validate_environment_name), F_true, F_false); if (F_status_is_error_not(status_return)) { status_return = state.status; @@ -1595,7 +1587,7 @@ extern "C" { 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))) { controller_lock_print(main->program.output.to, &main->thread); - fl_print_format("%rProcessing rule item action '%[%r%]' setting value to an empty set.%r", main->program.output.to, f_string_eol_s, main->program.context.set.title, controller_environment_s, main->program.context.set.title, f_string_eol_s); + fl_print_format("%rProcessing Rule Item Action '%[%r%]' setting value to an empty set.%r", main->program.output.to, f_string_eol_s, main->program.context.set.title, controller_environment_s, main->program.context.set.title, f_string_eol_s); controller_unlock_print_flush(main->program.output.to, &main->thread); } @@ -1782,7 +1774,7 @@ extern "C" { 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), macro_controller_f(f_file_name_base), F_true, F_false); if (F_status_set_fine(state.status) == F_memory_not) { status_return = state.status; @@ -1808,7 +1800,7 @@ extern "C" { 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))) { controller_lock_print(main->program.output.to, &main->thread); - fl_print_format("%rProcessing rule item action '%[%r%]', adding ", main->program.output.to, f_string_eol_s, main->program.context.set.title, controller_on_s, main->program.context.set.title); + fl_print_format("%rProcessing Rule Item Action '%[%r%]', adding ", main->program.output.to, f_string_eol_s, main->program.context.set.title, controller_on_s, main->program.context.set.title); fl_print_format("'%[%/Q%]' of ", main->program.output.to, main->program.context.set.notable, cache->buffer_item, cache->content_actions.array[i].array[1], main->program.context.set.notable); fl_print_format("'%[%/Q%]/", main->program.output.to, main->program.context.set.important, cache->buffer_item, cache->content_actions.array[i].array[2], main->program.context.set.important); fl_print_format("%[%/Q%]'.%r", main->program.output.to, main->program.context.set.important, cache->buffer_item, cache->content_actions.array[i].array[3], main->program.context.set.important, f_string_eol_s); diff --git a/sources/c/main/rule/setting.h b/sources/c/main/rule/setting.h index c7975fb..aecc3b5 100644 --- a/sources/c/main/rule/setting.h +++ b/sources/c/main/rule/setting.h @@ -17,13 +17,13 @@ extern "C" { #endif /** - * Identify the rule item code the given name represents. + * Identify the Rule Item code the given name represents. * * @param item * The string representing an rule action. * * @return - * The rule item type code on success. + * The Rule Item type code on success. * 0 if name is unknown. */ #ifndef _di_controller_rule_setting_limit_type_identify_