#endif
#ifndef _di_controller_print_error_rule_setting_
- f_status_t controller_print_error_rule_setting(fl_print_t * const print, controller_cache_action_t * const action, const f_string_t message, const f_string_static_t buffer, const f_number_unsigned_t line_start, const f_number_unsigned_t line_item, f_state_t * const state) {
+ f_status_t controller_print_error_rule_setting(fl_print_t * const print, controller_cache_action_t * const action, const f_string_t message) {
- if (!print || !print->custom || !action || !state) 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_quiet_e) return F_output_not;
controller_t * const main = (controller_t *) print->custom;
- controller_rule_setting_line_action(main, action, buffer, line_start, line_item, state);
-
controller_lock_print(print->to, &main->thread);
fl_print_format("%r%[%QRule setting %S.%]%r", print->to, f_string_eol_s, print->context, print->prefix, message, print->context, f_string_eol_s);
}
#endif // _di_controller_print_error_rule_setting_
-#ifndef _di_controller_print_error_rule_setting_value_unsupported_
- f_status_t controller_print_error_rule_setting_value_unsupported(fl_print_t * const print, controller_cache_action_t * const action, const f_string_t message, const f_number_unsigned_t index, const f_number_unsigned_t line_item) {
+#ifndef _di_controller_print_error_rule_setting_reason_name_
+ f_status_t controller_print_error_rule_setting_reason_name(fl_print_t * const print, controller_cache_action_t * const action, const f_string_t reason, 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_quiet_e) return F_output_not;
+
+ controller_t * const main = (controller_t *) print->custom;
+
+ controller_lock_print(print->to, &main->thread);
+
+ fl_print_format("%r%[%Q%S '%]", print->to, f_string_eol_s, print->context, print->prefix, reason, 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_false);
+
+ controller_unlock_print_flush(print->to, &main->thread);
+
+ return F_okay;
}
-#endif // _di_controller_print_error_rule_setting_value_unsupported_
+#endif // _di_controller_print_error_rule_setting_reason_name_
#ifndef _di_controller_print_error_rule_setting_with_range_
- f_status_t controller_print_error_rule_setting_with_range(fl_print_t * const print, controller_cache_action_t * const action, const f_string_t before, const f_string_static_t buffer, const f_range_t range_content, const f_string_t after, const f_number_unsigned_t line_start, const f_number_unsigned_t line_item, f_state_t * const state) {
+ f_status_t controller_print_error_rule_setting_with_range(fl_print_t * const print, controller_cache_action_t * const action, const f_string_t before, const f_string_static_t buffer, const f_range_t range_content, const f_string_t after, const f_number_unsigned_t start, const f_number_unsigned_t line, f_state_t * const state) {
if (!print || !print->custom || !action) return F_status_set_error(F_output_not);
if (print->verbosity == f_console_verbosity_quiet_e) return F_output_not;
controller_t * const main = (controller_t *) print->custom;
- controller_rule_setting_line_action(main, action, buffer, line_start, line_item, state);
+ controller_rule_setting_line_action(main, action, buffer, start, line, state);
controller_lock_print(print->to, &main->thread);
}
#endif // _di_controller_print_error_rule_setting_mapping_
+#ifndef _di_controller_print_error_rule_setting_name_invalid_
+ f_status_t controller_print_error_rule_setting_name_invalid(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_quiet_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 setting has an invalid name '%]", 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("%[', there must be at least 1 graph character.%]%r", print->to, print->context, print->context, f_string_eol_s);
+
+ controller_print_error_rule_cache(print, action, F_false);
+
+ controller_unlock_print_flush(print->to, &main->thread);
+
+ return F_okay;
+ }
+#endif // _di_controller_print_error_rule_setting_name_invalid_
+
+#ifndef _di_controller_print_error_rule_setting_number_invalid_nice_
+ f_status_t controller_print_error_rule_setting_number_invalid_nice(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_quiet_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 setting has an invalid number '%]", print->to, f_string_eol_s, print->context, print->prefix, print->context);
+ fl_print_format(f_string_format_Q_range_single_s.string, print->to, print->notable, buffer, range, print->notable);
+ fl_print_format("%[', only the whole numbers inclusively between%] ", print->to, print->context, print->context);
+ fl_print_format("%[-20%] %[and%]", print->to, print->notable, print->notable, print->context, print->context);
+ fl_print_format("%[19%] %[are allowed.%]%r", print->to, print->notable, print->notable, print->context, print->context, f_string_eol_s);
+
+ controller_print_error_rule_cache(print, action, F_false);
+
+ controller_unlock_print_flush(print->to, &main->thread);
+
+ return F_okay;
+ }
+#endif // _di_controller_print_error_rule_setting_number_invalid_nice_
+
+#ifndef _di_controller_print_error_rule_setting_number_invalid_on_first_
+ f_status_t controller_print_error_rule_setting_number_invalid_on_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_quiet_e) return F_output_not;
+
+ controller_t * const main = (controller_t *) print->custom;
+
+ controller_lock_print(print->to, &main->thread);
+
+ fl_print_format("%r%[%QThe first value for the 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, controller_on_s, print->notable);
+ fl_print_format("%[' has '%]", print->to, f_string_eol_s, print->context, print->prefix, print->context);
+ fl_print_format(f_string_format_Q_range_single_s.string, print->to, print->notable, buffer, range, print->notable);
+ fl_print_format("%[' but only %r, %r, %r, %r, %r", print->to, print->context, controller_freeze_s, controller_kill_s, controller_pause_s, controller_reload_s, controller_restart_s);
+ fl_print_format("%r, %r, %r, and %r are supported.%]%r", print->to, controller_resume_s, controller_start_s, controller_stop_s, controller_thaw_s, print->context, f_string_eol_s);
+
+ controller_print_error_rule_cache(print, action, F_false);
+
+ controller_unlock_print_flush(print->to, &main->thread);
+
+ return F_okay;
+ }
+#endif // _di_controller_print_error_rule_setting_number_invalid_on_first_
+
+#ifndef _di_controller_print_error_rule_setting_number_invalid_on_second_
+ f_status_t controller_print_error_rule_setting_number_invalid_on_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_quiet_e) return F_output_not;
+
+ controller_t * const main = (controller_t *) print->custom;
+
+ controller_lock_print(print->to, &main->thread);
+
+ fl_print_format("%r%[%QThe second value for the 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, controller_on_s, print->notable);
+ fl_print_format("%[' has '%]", print->to, f_string_eol_s, print->context, print->prefix, print->context);
+ fl_print_format(f_string_format_Q_range_single_s.string, print->to, print->notable, buffer, range, print->notable);
+ fl_print_format("%[' but only supports %r, %r, and %r.%]%r", print->to, print->context, controller_need_s, controller_want_s, controller_wish_s, print->context, f_string_eol_s);
+
+ controller_print_error_rule_cache(print, action, F_false);
+
+ controller_unlock_print_flush(print->to, &main->thread);
+
+ return F_okay;
+ }
+#endif // _di_controller_print_error_rule_setting_number_invalid_on_second_
+
+#ifndef _di_controller_print_error_rule_setting_number_invalid_scheduler_
+ f_status_t controller_print_error_rule_setting_number_invalid_scheduler(fl_print_t * const print, controller_cache_action_t * const action, const f_string_static_t buffer, const f_range_t range, const uint8_t zero_only) {
+
+ if (!print || !print->custom || !action) return F_status_set_error(F_output_not);
+ if (print->verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ controller_t * const main = (controller_t *) print->custom;
+
+ controller_lock_print(print->to, &main->thread);
+
+ fl_print_format("%r%[%QRule setting has an invalid number '%]", print->to, f_string_eol_s, print->context, print->prefix, print->context);
+ fl_print_format(f_string_format_Q_range_single_s.string, print->to, print->notable, buffer, range, print->notable);
+
+ if (zero_only) {
+ fl_print_format("%[', only%] ", print->to, print->context, print->context);
+ fl_print_format("%[0%]%[ is", print->to, print->notable, print->notable, print->context);
+ }
+ else {
+ fl_print_format("%[', only the whole numbers inclusively between%] ", print->to, print->context, print->context);
+ fl_print_format("%[1%] %[and%] ", print->to, print->notable, print->notable, print->context, print->context);
+ fl_print_format("%[99%] %[are", print->to, print->notable, print->notable, print->context);
+ }
+
+ fl_print_format(" allowed for the designated scheduler.%]%r", print->to, print->context, print->context, f_string_eol_s);
+
+ controller_print_error_rule_cache(print, action, F_false);
+
+ controller_unlock_print_flush(print->to, &main->thread);
+
+ return F_okay;
+ }
+#endif // _di_controller_print_error_rule_setting_number_invalid_scheduler_
+
+#ifndef _di_controller_print_error_rule_setting_number_invalid_timeout_
+ f_status_t controller_print_error_rule_setting_number_invalid_timeout(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_quiet_e) return F_output_not;
+
+ controller_t * const main = (controller_t *) print->custom;
+
+ controller_lock_print(print->to, &main->thread);
+
+ fl_print_format("%r%[%QThe first value for the 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, controller_timeout_s, print->notable);
+ fl_print_format("%[' has '%]", print->to, f_string_eol_s, print->context, print->prefix, print->context);
+ fl_print_format(f_string_format_Q_range_single_s.string, print->to, print->notable, buffer, range, print->notable);
+ fl_print_format("%[' but only %r, %r, and %r are supported.%]%r", print->to, print->context, controller_kill_s, controller_start_s, controller_stop_s, print->context, f_string_eol_s);
+
+ controller_print_error_rule_cache(print, action, F_false);
+
+ controller_unlock_print_flush(print->to, &main->thread);
+
+ return F_okay;
+ }
+#endif // _di_controller_print_error_rule_setting_number_invalid_timeout_
+
#ifndef _di_controller_print_error_rule_setting_value_
f_status_t controller_print_error_rule_setting_value(fl_print_t * const print, const f_string_static_t name, const f_string_static_t name_sub, const f_string_static_t value, const f_string_t suffix) {
* Must not be NULL.
* @param message
* The string to append to the message being printed.
- * @param buffer
- * The buffer representing the content where the lines will be counted from.
- * @param line_start
- * The position where to start counting lines.
- * @param line_item
- * The current line number.
- * @param state
- * The state information
*
- * The state.status is modified.
+ * @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_setting_
+ extern f_status_t controller_print_error_rule_setting(fl_print_t * const print, controller_cache_action_t * const action, const f_string_t message);
+#endif // _di_controller_print_error_rule_setting_
+
+/**
+ * Print a message about a rule setting problem given a specified reason and providing the setting name or value.
+ *
+ * @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 reason
+ * The reason for the error.
+ * @param name
+ * The name or value of the setting associated with the error.
*
* @return
* F_okay on success.
*
* F_output_not (with error bit) if setting is NULL.
*/
-#ifndef _di_controller_print_error_rule_setting_
- extern f_status_t controller_print_error_rule_setting(fl_print_t * const print, controller_cache_action_t * const action, const f_string_t message, const f_string_static_t buffer, const f_number_unsigned_t line_start, const f_number_unsigned_t line_item, f_state_t * const state);
-#endif // _di_controller_print_error_rule_setting_
+#ifndef _di_controller_print_error_rule_setting_reason_name_
+ extern f_status_t controller_print_error_rule_setting_reason_name(fl_print_t * const print, controller_cache_action_t * const action, const f_string_t reason, const f_string_static_t name);
+#endif // _di_controller_print_error_rule_setting_reason_name_
/**
* Print a message about a rule setting problem, with additional messages about the value.
* The range within the buffer representing the setting Content.
* @param after
* The string to add to the message being printed (after the value).
- * @param line_start
+ * @param start
* The position where to start counting lines.
- * @param line_item
+ * @param line
* The current line number.
* @param state
* The state information
* F_output_not (with error bit) if setting is NULL.
*/
#ifndef _di_controller_print_error_rule_setting_with_range_
- extern f_status_t controller_print_error_rule_setting_with_range(fl_print_t * const print, controller_cache_action_t * const action, const f_string_t before, const f_string_static_t buffer, const f_range_t range_content, const f_string_t after, const f_number_unsigned_t line_start, const f_number_unsigned_t line_item, f_state_t * const state);
+ extern f_status_t controller_print_error_rule_setting_with_range(fl_print_t * const print, controller_cache_action_t * const action, const f_string_t before, const f_string_static_t buffer, const f_range_t range_content, const f_string_t after, const f_number_unsigned_t start, const f_number_unsigned_t line, f_state_t * const state);
#endif // _di_controller_print_error_rule_setting_with_range_
/**
#endif // _di_controller_print_error_rule_setting_mapping_
/**
+ * Print message regarding the setting being invalid.
+ *
+ * @param print
+ * The error or warning output structure.
+ *
+ * Must not be NULL.
+ * @param action
+ * The Action cache.
+ *
+ * Must not be NULL.
+ * @param name
+ * The name of the setting that is invalid.
+ *
+ * @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_setting_name_invalid_
+ extern f_status_t controller_print_error_rule_setting_name_invalid(fl_print_t * const print, controller_cache_action_t * const action, const f_string_static_t name);
+#endif // _di_controller_print_error_rule_setting_name_invalid_
+
+/**
+ * Print message regarding the "nice" setting value being an invalid number.
+ *
+ * @param print
+ * The error or warning output structure.
+ *
+ * Must not be NULL.
+ * @param action
+ * The Action cache.
+ *
+ * Must not be NULL.
+ * @param buffer
+ * The buffer containing the invalid number.
+ * @param range
+ * The ranger within the buffer representing the invalid number.
+ *
+ * @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_setting_number_invalid_nice_
+ extern f_status_t controller_print_error_rule_setting_number_invalid_nice(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_setting_number_invalid_nice_
+
+/**
+ * Print message regarding the first value for the "on" setting being invalid.
+ *
+ * @param print
+ * The error or warning output structure.
+ *
+ * Must not be NULL.
+ * @param action
+ * The Action cache.
+ *
+ * Must not be NULL.
+ * @param buffer
+ * The buffer containing the invalid value.
+ * @param range
+ * The ranger within the buffer representing the invalid value.
+ *
+ * @return
+ * F_okay on success.
+ * F_output_not on success, but no printing is performed.
+ *
+ * F_output_not (with error bit) if setting is NULL.
+ */
+#ifndef _di_controller_print_error_rule_setting_number_invalid_on_first_
+ extern f_status_t controller_print_error_rule_setting_number_invalid_on_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_setting_number_invalid_on_first_
+
+/**
+ * Print message regarding the second value for the "on" setting being invalid.
+ *
+ * @param print
+ * The error or warning output structure.
+ *
+ * Must not be NULL.
+ * @param action
+ * The Action cache.
+ *
+ * Must not be NULL.
+ * @param buffer
+ * The buffer containing the invalid value.
+ * @param range
+ * The ranger within the buffer representing the invalid value.
+ *
+ * @return
+ * F_okay on success.
+ * F_output_not on success, but no printing is performed.
+ *
+ * F_output_not (with error bit) if setting is NULL.
+ */
+#ifndef _di_controller_print_error_rule_setting_number_invalid_on_second_
+ extern f_status_t controller_print_error_rule_setting_number_invalid_on_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_setting_number_invalid_on_second_
+
+/**
+ * Print message regarding the "scheduler" setting value being an invalid number.
+ *
+ * @param print
+ * The error or warning output structure.
+ *
+ * Must not be NULL.
+ * @param action
+ * The Action cache.
+ *
+ * Must not be NULL.
+ * @param buffer
+ * The buffer containing the invalid number.
+ * @param range
+ * The ranger within the buffer representing the invalid number.
+ * @param zero_only
+ * If TRUE, then only 0 is supported.
+ * If FALSE, then only the range 1 through 99 is supported.
+ *
+ * @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_setting_number_invalid_scheduler_
+ extern f_status_t controller_print_error_rule_setting_number_invalid_scheduler(fl_print_t * const print, controller_cache_action_t * const action, const f_string_static_t buffer, const f_range_t range, const uint8_t zero_only);
+#endif // _di_controller_print_error_rule_setting_number_invalid_scheduler_
+
+/**
+ * Print message regarding the "timeout" setting value being invalid.
+ *
+ * @param print
+ * The error or warning output structure.
+ *
+ * Must not be NULL.
+ * @param action
+ * The Action cache.
+ *
+ * Must not be NULL.
+ * @param buffer
+ * The buffer containing the invalid value.
+ * @param range
+ * The ranger within the buffer representing the invalid value.
+ *
+ * @return
+ * F_okay on success.
+ * F_output_not on success, but no printing is performed.
+ *
+ * F_output_not (with error bit) if setting is NULL.
+ */
+#ifndef _di_controller_print_error_rule_setting_number_invalid_timeout_
+ extern f_status_t controller_print_error_rule_setting_number_invalid_timeout(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_setting_number_invalid_timeout_
+
+/**
* Print message regarding the population of a setting when in simulation or verbose mode.
*
* @param print
type = controller_rule_setting_type_user_e;
}
else {
- if (main->program.warning.verbosity == f_console_verbosity_debug_e) {
- controller_rule_setting_line_action(main, &cache->action, cache->buffer_item, cache->object_actions.array[i].start, cache->action.line_item, &state);
+ controller_rule_setting_line_action(main, &cache->action, cache->buffer_item, cache->object_actions.array[i].start, cache->action.line_item, &state);
- controller_print_warning_rule_setting_unknown(&main->program.warning, &cache->action, cache->action.name_item);
- }
+ controller_print_warning_rule_setting_unknown(&main->program.warning, &cache->action, cache->action.name_item, "Unknown");
continue;
}
}
else {
if (empty_disallow) {
- if (main->program.warning.verbosity == f_console_verbosity_debug_e) {
- controller_rule_setting_line_action(main, &cache->action, cache->buffer_item, cache->object_actions.array[i].start, cache->action.line_item, &state);
-
- controller_lock_print(main->program.warning.to, &main->thread);
-
- fl_print_format("%r%[%QEmpty rule setting.%]%r", main->program.warning.to, f_string_eol_s, main->program.warning.context, main->program.warning.prefix, main->program.warning.context, f_string_eol_s);
-
- controller_print_error_rule_cache(&main->program.warning, &cache->action, F_false);
+ controller_rule_setting_line_action(main, &cache->action, cache->buffer_item, cache->object_actions.array[i].start, cache->action.line_item, &state);
- 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, "Empty");
continue;
}
if (type == controller_rule_setting_type_affinity_e) {
if (!cache->content_actions.array[i].used) {
- controller_print_error_rule_setting(&main->program.error, &cache->action, "requires one or more Content", cache->buffer_item, cache->object_actions.array[i].start, line_item, &state);
+ controller_rule_setting_line_action(main, &cache->action, cache->buffer_item, cache->object_actions.array[i].start, line_item, &state);
+
+ controller_print_error_rule_setting(&main->program.error, &cache->action, "requires one or more Content");
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
if (type == controller_rule_setting_type_define_e || type == controller_rule_setting_type_parameter_e) {
if (cache->content_actions.array[i].used != 2) {
- controller_print_error_rule_setting(&main->program.error, &cache->action, "requires exactly two Content", cache->buffer_item, cache->object_actions.array[i].start, line_item, &state);
+ controller_rule_setting_line_action(main, &cache->action, cache->buffer_item, cache->object_actions.array[i].start, line_item, &state);
+
+ controller_print_error_rule_setting(&main->program.error, &cache->action, "requires exactly two Content");
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
if (type == controller_rule_setting_type_cgroup_e) {
if (cache->content_actions.array[i].used < 2 || rule->has & controller_rule_has_cgroup_d) {
- controller_print_error_rule_setting(&main->program.error, &cache->action, "requires two or more Content", cache->buffer_item, cache->object_actions.array[i].start, line_item, &state);
+ controller_rule_setting_line_action(main, &cache->action, cache->buffer_item, cache->object_actions.array[i].start, line_item, &state);
+
+ controller_print_error_rule_setting(&main->program.error, &cache->action, "requires two or more Content");
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
if (type == controller_rule_setting_type_limit_e) {
if (cache->content_actions.array[i].used != 3) {
- controller_print_error_rule_setting(&main->program.error, &cache->action, "requires three Content", cache->buffer_item, cache->object_actions.array[i].start, line_item, &state);
+ controller_rule_setting_line_action(main, &cache->action, cache->buffer_item, cache->object_actions.array[i].start, line_item, &state);
+
+ controller_print_error_rule_setting(&main->program.error, &cache->action, "requires three Content");
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
type = controller_resource_limit_type_stack_e;
}
else {
- if (main->program.error.verbosity == f_console_verbosity_debug_e) {
- controller_rule_setting_line_action(main, &cache->action, cache->buffer_item, cache->object_actions.array[i].start, cache->action.line_item, &state);
-
- controller_lock_print(main->program.error.to, &main->thread);
-
- fl_print_format("%r%[%QUnknown resource limit type '%]", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, main->program.error.context);
- fl_print_format(f_string_format_Q_single_s.string, main->program.error.to, main->program.error.notable, cache->action.name_action, main->program.error.notable);
- fl_print_format(f_string_format_sentence_end_quote_s.string, main->program.error.to, main->program.error.context, main->program.error.context, f_string_eol_s);
-
- controller_print_error_rule_cache(&main->program.error, &cache->action, F_true);
+ controller_rule_setting_line_action(main, &cache->action, cache->buffer_item, cache->object_actions.array[i].start, cache->action.line_item, &state);
- controller_unlock_print_flush(main->program.error.to, &main->thread);
- }
+ controller_print_error_rule_setting_reason_name(&main->program.error, &cache->action, "Unknown resource limit type", cache->action.name_action);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
for (j = 0; j < rule->limits.used; ++j) {
if (type == rule->limits.array[j].type) {
- if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
- controller_rule_setting_line_action(main, &cache->action, cache->buffer_item, cache->object_actions.array[i].start, cache->action.line_item, &state);
-
- controller_lock_print(main->program.error.to, &main->thread);
-
- fl_print_format("%r%[%QThe resource limit type is already specified%]%r", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, main->program.error.context, f_string_eol_s);
-
- controller_print_error_rule_cache(&main->program.error, &cache->action, F_false);
-
- controller_unlock_print_flush(main->program.error.to, &main->thread);
- }
+ controller_rule_setting_line_action(main, &cache->action, cache->buffer_item, cache->object_actions.array[i].start, cache->action.line_item, &state);
state.status = F_status_set_error(F_valid_not);
+ controller_print_error_rule_setting_reason_name(&main->program.error, &cache->action, "The resource limit type is already specified", cache->action.name_action);
+
if (F_status_is_error_not(status_return)) {
status_return = state.status;
}
}
if (setting_value->used || !cache->content_actions.array[i].used) {
- controller_print_error_rule_setting(&main->program.error, &cache->action, "requires one or more Content", cache->buffer_item, cache->object_actions.array[i].start, line_item, &state);
+ controller_rule_setting_line_action(main, &cache->action, cache->buffer_item, cache->object_actions.array[i].start, line_item, &state);
+
+ controller_print_error_rule_setting(&main->program.error, &cache->action, "requires one or more Content");
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
state.status = controller_validate_has_graph(*setting_value);
if (state.status == F_false || F_status_set_fine(state.status) == F_complete_not_utf) {
- if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ {
const f_status_t original = state.status;
controller_rule_setting_line_action(main, &cache->action, cache->buffer_item, cache->object_actions.array[i].start, cache->action.line_item, &state);
}
if (state.status == F_false) {
- if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(main->program.error.to, &main->thread);
-
- fl_print_format("%r%[%QRule setting has an invalid name '%]", 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, *setting_value, main->program.error.notable);
- fl_print_format("%[', there must be at least 1 graph character.%]%r", main->program.error.to, main->program.error.context, main->program.error.context, f_string_eol_s);
-
- controller_print_error_rule_cache(&main->program.error, &cache->action, F_false);
-
- controller_unlock_print_flush(main->program.error.to, &main->thread);
- }
+ controller_print_error_rule_setting_name_invalid(&main->program.error, &cache->action, *setting_value);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
if (type == controller_rule_setting_type_scheduler_e) {
if (cache->content_actions.array[i].used < 1 || cache->content_actions.array[i].used > 2 || rule->has & controller_rule_has_scheduler_d) {
- controller_print_error_rule_setting(&main->program.error, &cache->action, "requires either one or two Content", cache->buffer_item, cache->object_actions.array[i].start, line_item, &state);
+ controller_rule_setting_line_action(main, &cache->action, cache->buffer_item, cache->object_actions.array[i].start, line_item, &state);
+
+ controller_print_error_rule_setting(&main->program.error, &cache->action, "requires either one or two Content");
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
state.status = F_status_set_fine(state.status);
if ((zero_only && number) || (!zero_only && (number < 1 || number > 99)) || state.status == F_data_not || state.status == F_number || state.status == F_number_overflow || state.status == F_number_negative || state.status == F_number_positive) {
- if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
- {
- const f_status_t original = state.status;
-
- controller_rule_setting_line_action(main, &cache->action, cache->buffer_item, cache->object_actions.array[i].start, cache->action.line_item, &state);
-
- state.status = original;
- }
-
- controller_lock_print(main->program.error.to, &main->thread);
-
- fl_print_format("%r%[%QRule setting has an invalid number '%]", 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_range_single_s.string, main->program.error.to, main->program.error.notable, cache->buffer_item, cache->content_actions.array[i].array[1], main->program.error.notable);
-
- if (zero_only) {
- fl_print_format("%[', only%] ", main->program.error.to, main->program.error.context, main->program.error.context);
- fl_print_format("%[0%]%[ is", main->program.error.to, main->program.error.notable, main->program.error.notable, main->program.error.context);
- }
- else {
- fl_print_format("%[', only the whole numbers inclusively between%] ", main->program.error.to, main->program.error.context, main->program.error.context);
- fl_print_format("%[1%] %[and%] ", main->program.error.to, main->program.error.notable, main->program.error.notable, main->program.error.context, main->program.error.context);
- fl_print_format("%[99%] %[are", main->program.error.to, main->program.error.notable, main->program.error.notable, main->program.error.context);
- }
-
- fl_print_format(" allowed for the designated scheduler.%]%r", main->program.error.to, main->program.error.context, main->program.error.context, f_string_eol_s);
+ {
+ const f_status_t original = state.status;
- controller_print_error_rule_cache(&main->program.error, &cache->action, F_false);
+ controller_rule_setting_line_action(main, &cache->action, cache->buffer_item, cache->object_actions.array[i].start, cache->action.line_item, &state);
- controller_unlock_print_flush(main->program.error.to, &main->thread);
+ state.status = original;
}
+ controller_print_error_rule_setting_number_invalid_scheduler(&main->program.error, &cache->action, cache->buffer_item, cache->content_actions.array[i].array[1], zero_only);
+
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
}
if (type == controller_rule_setting_type_timeout_e) {
if (cache->content_actions.array[i].used != 2) {
- controller_print_error_rule_setting(&main->program.error, &cache->action, "requires exactly two Content", cache->buffer_item, cache->object_actions.array[i].start, line_item, &state);
+ controller_rule_setting_line_action(main, &cache->action, cache->buffer_item, cache->object_actions.array[i].start, line_item, &state);
+
+ controller_print_error_rule_setting(&main->program.error, &cache->action, "requires exactly two Content");
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
timeout_code = controller_rule_timeout_code_stop_d;
}
else {
- if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
- {
- const f_status_t original = state.status;
-
- controller_rule_setting_line_action(main, &cache->action, cache->buffer_item, cache->object_actions.array[i].start, cache->action.line_item, &state);
-
- state.status = original;
- }
-
- controller_lock_print(main->program.error.to, &main->thread);
-
- fl_print_format("%r%[%QRule setting's first value has '%]", 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_range_single_s.string, main->program.error.to, main->program.error.notable, cache->buffer_item, cache->content_actions.array[i].array[0], main->program.error.notable);
- fl_print_format("%[' but only supports %r, %r, and %r.%]%r", main->program.error.to, main->program.error.context, controller_kill_s, controller_start_s, controller_stop_s, main->program.error.context, f_string_eol_s);
+ {
+ const f_status_t original = state.status;
- controller_print_error_rule_cache(&main->program.error, &cache->action, F_false);
+ controller_rule_setting_line_action(main, &cache->action, cache->buffer_item, cache->object_actions.array[i].start, cache->action.line_item, &state);
- controller_unlock_print_flush(main->program.error.to, &main->thread);
+ state.status = original;
}
+ controller_print_error_rule_setting_number_invalid_timeout(&main->program.error, &cache->action, cache->buffer_item, cache->content_actions.array[i].array[0]);
+
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
}
if (type == controller_rule_setting_type_capability_e || type == controller_rule_setting_type_nice_e || type == controller_rule_setting_type_user_e) {
if (cache->content_actions.array[i].used != 1 || type == controller_rule_setting_type_capability_e && rule->capability || type == controller_rule_setting_type_group_e && (rule->has & controller_rule_has_group_d) || type == controller_rule_setting_type_nice_e && (rule->has & controller_rule_has_nice_d) || type == controller_rule_setting_type_user_e && (rule->has & controller_rule_has_user_d)) {
- controller_print_error_rule_setting(&main->program.error, &cache->action, "requires exactly one Content", cache->buffer_item, cache->object_actions.array[i].start, line_item, &state);
+ controller_rule_setting_line_action(main, &cache->action, cache->buffer_item, cache->object_actions.array[i].start, line_item, &state);
+
+ controller_print_error_rule_setting(&main->program.error, &cache->action, "requires exactly one Content");
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
break;
}
- controller_print_error_rule_setting(&main->program.error, &cache->action, "failed to process the capabilities", cache->buffer_item, cache->object_actions.array[i].start, line_item, &state);
+ controller_rule_setting_line_action(main, &cache->action, cache->buffer_item, cache->object_actions.array[i].start, line_item, &state);
+
+ controller_print_error_rule_setting(&main->program.error, &cache->action, "failed to process the capabilities");
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
state.status = F_status_set_fine(state.status);
if (number < -20 || number > 19 || state.status == F_data_not || state.status == F_number || state.status == F_number_overflow || state.status == F_number_underflow || state.status == F_number_decimal) {
- if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
- {
- const f_status_t original = state.status;
-
- controller_rule_setting_line_action(main, &cache->action, cache->buffer_item, cache->object_actions.array[i].start, cache->action.line_item, &state);
-
- state.status = original;
- }
-
- controller_lock_print(main->program.error.to, &main->thread);
-
- fl_print_format("%r%[%QRule setting has an invalid number '%]", 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_range_single_s.string, main->program.error.to, main->program.error.notable, cache->buffer_item, cache->content_actions.array[i].array[0], main->program.error.notable);
- fl_print_format("%[', only the whole numbers inclusively between%] ", main->program.error.to, main->program.error.context, main->program.error.context);
- fl_print_format("%[-20%]", main->program.error.to, main->program.error.notable, main->program.error.notable);
- fl_print_format(" %[and%] ", main->program.error.to, main->program.error.context, main->program.error.context);
- fl_print_format("%[19%]", main->program.error.to, main->program.error.notable, main->program.error.notable);
- fl_print_format(" %[are allowed.%]%r", main->program.error.to, main->program.error.context, main->program.error.context, f_string_eol_s);
+ {
+ const f_status_t original = state.status;
- controller_print_error_rule_cache(&main->program.error, &cache->action, F_false);
+ controller_rule_setting_line_action(main, &cache->action, cache->buffer_item, cache->object_actions.array[i].start, cache->action.line_item, &state);
- controller_unlock_print_flush(main->program.error.to, &main->thread);
+ state.status = original;
}
+ controller_print_error_rule_setting_number_invalid_nice(&main->program.error, &cache->action, cache->buffer_item, cache->content_actions.array[i].array[0]);
+
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
}
if (type == controller_rule_setting_type_group_e) {
if (!cache->content_actions.array[i].used) {
- controller_print_error_rule_setting(&main->program.error, &cache->action, "requires one or more Content", cache->buffer_item, cache->object_actions.array[i].start, line_item, &state);
+ controller_rule_setting_line_action(main, &cache->action, cache->buffer_item, cache->object_actions.array[i].start, line_item, &state);
+
+ controller_print_error_rule_setting(&main->program.error, &cache->action, "requires one or more Content");
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
}
if (state.status == F_false) {
- if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(main->program.error.to, &main->thread);
-
- fl_print_format("%r%[%QRule setting has an invalid environment variable name '%]", 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, setting_values->array[setting_values->used], main->program.error.notable);
- fl_print_format(f_string_format_sentence_end_quote_s.string, main->program.error.to, main->program.error.context, main->program.error.context, f_string_eol_s);
-
- controller_print_error_rule_cache(&main->program.error, &cache->action, F_false);
-
- controller_unlock_print_flush(main->program.error.to, &main->thread);
- }
+ controller_print_error_rule_setting_reason_name(&main->program.error, &cache->action, "Rule setting has an invalid environment variable name", setting_values->array[setting_values->used]);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
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); // TODO: don't forget to update these as well.
controller_unlock_print_flush(main->program.output.to, &main->thread);
}
// The "on" Rule Setting.
if (cache->content_actions.array[i].used != 4) {
- controller_print_error_rule_setting(&main->program.error, &cache->action, "requires exactly four Content", cache->buffer_item, cache->object_actions.array[i].start, line_item, &state);
+ controller_rule_setting_line_action(main, &cache->action, cache->buffer_item, cache->object_actions.array[i].start, line_item, &state);
+
+ controller_print_error_rule_setting(&main->program.error, &cache->action, "requires exactly four Content");
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
action = controller_rule_action_type_thaw_e;
}
else {
- if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
- controller_rule_setting_line_action(main, &cache->action, cache->buffer_item, cache->object_actions.array[i].start, cache->action.line_item, &state);
-
- f_thread_mutex_lock(&main->thread.lock.print);
-
- controller_lock_print(main->program.error.to, &main->thread);
-
- fl_print_format("%r%[%QRule setting's second value has '%]", 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_range_single_s.string, main->program.error.to, main->program.error.notable, cache->buffer_item, cache->content_actions.array[i].array[1], main->program.error.notable);
- fl_print_format("%[' but only supports %r, %r, %r, %r, %r", main->program.error.to, main->program.error.context, controller_freeze_s, controller_kill_s, controller_pause_s, controller_reload_s, controller_restart_s);
- fl_print_format("%r, %r, %r, and %r.%]%r", main->program.error.to, controller_resume_s, controller_start_s, controller_stop_s, controller_thaw_s, main->program.error.context, f_string_eol_s);
-
- controller_print_error_rule_cache(&main->program.error, &cache->action, F_false);
+ controller_rule_setting_line_action(main, &cache->action, cache->buffer_item, cache->object_actions.array[i].start, cache->action.line_item, &state);
- controller_unlock_print_flush(main->program.error.to, &main->thread);
- }
+ controller_print_error_rule_setting_number_invalid_on_first(&main->program.error, &cache->action, cache->buffer_item, cache->content_actions.array[i].array[1]);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
setting_values = &rule->ons.array[j].wish;
}
else {
- if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
- controller_rule_setting_line_action(main, &cache->action, cache->buffer_item, cache->object_actions.array[i].start, cache->action.line_item, &state);
-
- controller_lock_print(main->program.error.to, &main->thread);
-
- fl_print_format("%r%[%QRule setting's second value has '%]", 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_range_single_s.string, main->program.error.to, main->program.error.notable, cache->buffer_item, cache->content_actions.array[i].array[1], main->program.error.notable);
- fl_print_format("%[' but only supports %r, %r, and %r.%]%r", main->program.error.to, main->program.error.context, controller_need_s, controller_want_s, controller_wish_s, main->program.error.context, f_string_eol_s);
-
- controller_print_error_rule_cache(&main->program.error, &cache->action, F_false);
+ controller_rule_setting_line_action(main, &cache->action, cache->buffer_item, cache->object_actions.array[i].start, cache->action.line_item, &state);
- controller_unlock_print_flush(main->program.error.to, &main->thread);
- }
+ controller_print_error_rule_setting_number_invalid_on_second(&main->program.error, &cache->action, cache->buffer_item, cache->content_actions.array[i].array[1]);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);