const f_string_static_t controller_long_validate_s = macro_f_string_static_t_initialize_1(CONTROLLER_long_validate_s, 0, CONTROLLER_long_validate_s_length);
#endif // _di_controller_parameter_s_
+#ifndef _di_controller_print_entry_s_
+ const f_string_static_t controller_print_entry_considering_s = macro_f_string_static_t_initialize_1(CONTROLLER_print_entry_considering_s, 0, CONTROLLER_print_entry_considering_s_length);
+ const f_string_static_t controller_print_entry_failsafe_s = macro_f_string_static_t_initialize_1(CONTROLLER_print_entry_failsafe_s, 0, CONTROLLER_print_entry_failsafe_s_length);
+ const f_string_static_t controller_print_entry_processing_s = macro_f_string_static_t_initialize_1(CONTROLLER_print_entry_processing_s, 0, CONTROLLER_print_entry_processing_s_length);
+ const f_string_static_t controller_print_entry_suffix_megatime_s = macro_f_string_static_t_initialize_1(CONTROLLER_print_entry_suffix_megatime_s, 0, CONTROLLER_print_entry_suffix_megatime_s_length);
+#endif // _di_controller_print_entry_s_
+
#ifndef _di_controller_print_rule_s_
const f_string_static_t controller_print_rule_control_groups_prepare_s = macro_f_string_static_t_initialize_1(CONTROLLER_print_rule_control_groups_prepare_s, 0, CONTROLLER_print_rule_control_groups_prepare_s_length);
#endif // _di_controller_print_rule_s_
#endif // _di_controller_default_s_
/**
- * Special strings used for printing.
+ * Special strings used for printing for Entrys.
+ */
+#ifndef _di_controller_print_entry_s_
+ #define CONTROLLER_print_entry_considering_s "Considering"
+ #define CONTROLLER_print_entry_failsafe_s "failsafe"
+ #define CONTROLLER_print_entry_processing_s "Processing"
+ #define CONTROLLER_print_entry_suffix_megatime_s " MegaTime (milliseconds)"
+
+ #define CONTROLLER_print_entry_considering_s_length 11
+ #define CONTROLLER_print_entry_failsafe_s_length 8
+ #define CONTROLLER_print_entry_processing_s_length 10
+ #define CONTROLLER_print_entry_suffix_megatime_s_length 24
+
+ extern const f_string_static_t controller_print_entry_considering_s;
+ extern const f_string_static_t controller_print_entry_failsafe_s;
+ extern const f_string_static_t controller_print_entry_processing_s;
+ extern const f_string_static_t controller_print_entry_suffix_megatime_s;
+#endif // _di_controller_print_entry_s_
+
+/**
+ * Special strings used for printing for Rules.
*/
#ifndef _di_controller_print_rule_s_
#define CONTROLLER_print_rule_control_groups_prepare_s "prepare control groups for"
if (!main) return F_status_set_error(F_parameter);
- f_status_t status = F_okay;
+ controller_interrupt_t custom = macro_controller_interrupt_t_initialize_1(entry->flag & controller_entry_flag_is_e, main);
+ f_state_t state = macro_f_state_t_initialize_1(controller_allocation_large_d, controller_allocation_small_d, F_okay, 0, 0, 0, &controller_thread_signal_state_fss, 0, 0, 0);
+
f_number_unsigned_t i = 0;
entry->status = F_known_not;
entry->session = controller_entry_session_same_e;
if (main->callback.process_entry_setup) {
- status = main->callback.process_entry_setup(main, entry);
+ state.status = main->callback.process_entry_setup(main, entry);
}
main->thread.cache.action.line_action = 0;
main->thread.cache.action.name_action.used = 0;
main->thread.cache.action.name_item.used = 0;
- if (F_status_is_error_not(status)) {
+ if (F_status_is_error_not(state.status)) {
if (entry->flag & controller_entry_flag_is_e) {
- status = controller_file_load(main, F_true, controller_entries_s, main->process.name_entry, controller_entry_s);
+ state.status = controller_file_load(main, F_true, controller_entries_s, main->process.name_entry, controller_entry_s);
}
else {
- status = controller_file_load(main, F_false, controller_exits_s, main->process.name_entry, controller_exit_s);
- if (status == F_file_found_not) return F_file_found_not;
+ state.status = controller_file_load(main, F_false, controller_exits_s, main->process.name_entry, controller_exit_s);
+ if (state.status == F_file_found_not) return F_file_found_not;
}
}
- if (F_status_is_error_not(status)) {
+ if (F_status_is_error_not(state.status)) {
if (main->thread.cache.buffer_file.used) {
- controller_interrupt_t custom = macro_controller_interrupt_t_initialize_1(entry->flag & controller_entry_flag_is_e, main);
- f_state_t state = macro_f_state_t_initialize_1(controller_allocation_large_d, controller_allocation_small_d, F_okay, 0, 0, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0);
f_range_t range = macro_f_range_t_initialize_2(main->thread.cache.buffer_file.used);
fll_fss_basic_list_read(main->thread.cache.buffer_file, &range, &main->thread.cache.object_items, &main->thread.cache.content_items, &main->thread.cache.delimits, 0, &main->thread.cache.comments, &state);
- if (F_status_is_error(status)) {
- controller_print_error_status(&main->program.error, macro_controller_f(fll_fss_basic_list_read), F_status_set_fine(status));
+ if (F_status_is_error(state.status)) {
+ controller_print_error_status(&main->program.error, macro_controller_f(fll_fss_basic_list_read), F_status_set_fine(state.status));
}
else {
f_fss_apply_delimit(main->thread.cache.delimits, &main->thread.cache.buffer_file, &state);
- if (F_status_is_error(status)) {
- controller_print_error_entry(&main->program.error, entry->flag & controller_entry_flag_is_e, F_status_set_fine(status), macro_controller_f(f_fss_apply_delimit), F_true);
+ if (F_status_is_error(state.status)) {
+ controller_print_error_entry(&main->program.error, entry->flag & controller_entry_flag_is_e, F_status_set_fine(state.status), macro_controller_f(f_fss_apply_delimit), F_true);
}
}
}
else {
- controller_print_error_file_status(&main->program.error, macro_controller_f(controller_file_load), (entry->flag & controller_entry_flag_is_e) ? controller_entry_s : controller_exit_s, f_file_operation_read_s, fll_error_file_type_file_e, F_status_set_fine(status));
+ controller_print_error_file_status(&main->program.error, macro_controller_f(controller_file_load), (entry->flag & controller_entry_flag_is_e) ? controller_entry_s : controller_exit_s, f_file_operation_read_s, fll_error_file_type_file_e, F_status_set_fine(state.status));
}
}
- if (F_status_is_error_not(status) && main->thread.cache.object_items.used) {
- status = f_memory_array_increase_by(main->thread.cache.object_items.used, sizeof(f_range_t), (void **) &main->thread.cache.object_items.array, &main->thread.cache.object_items.used, &main->thread.cache.object_items.size);
+ if (F_status_is_error_not(state.status) && main->thread.cache.object_items.used) {
+ state.status = f_memory_array_increase_by(main->thread.cache.object_items.used, sizeof(f_range_t), (void **) &main->thread.cache.object_items.array, &main->thread.cache.object_items.used, &main->thread.cache.object_items.size);
- if (F_status_is_error(status)) {
- controller_print_error_entry(&main->program.error, entry->flag & controller_entry_flag_is_e, F_status_set_fine(status), macro_controller_f(f_memory_array_increase_by), F_true);
+ if (F_status_is_error(state.status)) {
+ controller_print_error_entry(&main->program.error, entry->flag & controller_entry_flag_is_e, F_status_set_fine(state.status), macro_controller_f(f_memory_array_increase_by), F_true);
}
else {
f_range_t *range = 0;
f_number_unsigned_t at = 0;
f_number_unsigned_t j = 0;
- f_state_t state = f_state_t_initialize;
for (i = 0; i < main->thread.cache.object_items.used && controller_thread_is_enabled(entry->flag & controller_entry_flag_is_e, &main->thread); ++i) {
main->thread.cache.action.name_action.used = 0;
main->thread.cache.action.name_item.used = 0;
- status = f_memory_array_increase(controller_allocation_small_d, sizeof(controller_entry_item_t), (void **) &entry->items.array, &entry->items.used, &entry->items.size);
+ state.status = f_memory_array_increase(controller_allocation_small_d, sizeof(controller_entry_item_t), (void **) &entry->items.array, &entry->items.used, &entry->items.size);
- if (F_status_is_error(status)) {
- controller_print_error_entry(&main->program.error, entry->flag & controller_entry_flag_is_e, F_status_set_fine(status), macro_controller_f(f_memory_array_increase), F_true);
+ if (F_status_is_error(state.status)) {
+ controller_print_error_entry(&main->program.error, entry->flag & controller_entry_flag_is_e, F_status_set_fine(state.status), macro_controller_f(f_memory_array_increase), F_true);
break;
}
- status = f_string_dynamic_partial_append(main->thread.cache.buffer_file, main->thread.cache.object_items.array[i], &main->thread.cache.action.name_item);
+ state.status = f_string_dynamic_partial_append(main->thread.cache.buffer_file, main->thread.cache.object_items.array[i], &main->thread.cache.action.name_item);
- if (F_status_is_error(status)) {
- controller_print_error_entry(&main->program.error, entry->flag & controller_entry_flag_is_e, F_status_set_fine(status), macro_controller_f(f_string_dynamic_partial_append), F_true);
+ if (F_status_is_error(state.status)) {
+ controller_print_error_entry(&main->program.error, entry->flag & controller_entry_flag_is_e, F_status_set_fine(state.status), macro_controller_f(f_string_dynamic_partial_append), F_true);
break;
}
- f_fss_count_lines(main->thread.cache.buffer_file, main->thread.cache.object_items.array[i].start, &main->thread.cache.action.line_item, &main->setting.state);
+ f_fss_count_lines(main->thread.cache.buffer_file, main->thread.cache.object_items.array[i].start, &main->thread.cache.action.line_item, &state);
- if (F_status_is_error(status)) {
- controller_print_error_entry(&main->program.error, entry->flag & controller_entry_flag_is_e, F_status_set_fine(status), macro_controller_f(f_fss_count_lines), F_true);
+ if (F_status_is_error(state.status)) {
+ controller_print_error_entry(&main->program.error, entry->flag & controller_entry_flag_is_e, F_status_set_fine(state.status), macro_controller_f(f_fss_count_lines), F_true);
break;
}
}
}
else if (f_compare_dynamic(controller_settings_s, main->thread.cache.action.name_item) == F_equal_to) {
- status = controller_entry_setting_read(main, entry->flag & controller_entry_flag_is_e, *range);
+ state.status = controller_entry_setting_read(main, entry->flag & controller_entry_flag_is_e, *range);
continue;
}
entry->items.array[at].line = main->thread.cache.action.line_item;
- status = f_string_dynamic_append_nulless(main->thread.cache.action.name_item, &entry->items.array[at].name);
+ state.status = f_string_dynamic_append_nulless(main->thread.cache.action.name_item, &entry->items.array[at].name);
- if (F_status_is_error(status)) {
- controller_print_error_status(&main->program.error, macro_controller_f(f_string_dynamic_append_nulless), F_status_set_fine(status));
+ if (F_status_is_error(state.status)) {
+ controller_print_error_status(&main->program.error, macro_controller_f(f_string_dynamic_append_nulless), F_status_set_fine(state.status));
break;
}
- status = controller_entry_action_read(main, entry, *range, &entry->items.array[at].actions);
+ state.status = controller_entry_action_read(main, entry, *range, &entry->items.array[at].actions);
- if (F_status_is_error(status)) {
- if (F_status_set_fine(status) != F_interrupt) {
+ if (F_status_is_error(state.status)) {
+ if (F_status_set_fine(state.status) != F_interrupt) {
controller_lock_print(main->program.error.to, &main->thread);
controller_print_error_entry_cache(&main->program.error, &main->thread.cache.action, entry->flag & controller_entry_flag_is_e);
controller_unlock_print_flush(main->program.error.to, &main->thread);
}
- if (F_status_set_fine(status) == F_memory_not) break;
+ if (F_status_set_fine(state.status) == F_memory_not) break;
}
} // for
- if (entry->flag & controller_entry_flag_is_e && F_status_set_fine(status) == F_interrupt) return status;
+ if (entry->flag & controller_entry_flag_is_e && F_status_set_fine(state.status) == F_interrupt) return state.status;
- if (F_status_is_error_not(status)) {
+ if (F_status_is_error_not(state.status)) {
if (!(code & 0x1)) {
- status = F_status_set_error(F_found_not);
+ state.status = F_status_set_error(F_found_not);
controller_print_message_entry_item_required(&main->program.error, entry->flag & controller_entry_flag_is_e, main->thread.cache.action.name_item, "is not found");
}
main->thread.cache.action.name_action.used = 0;
main->thread.cache.action.name_item.used = 0;
- if (F_status_is_error_not(status)) {
+ if (F_status_is_error_not(state.status)) {
controller_entry_action_t *action = 0;
f_number_unsigned_t k = 0;
main->thread.cache.action.line_item = entry->items.array[i].line;
main->thread.cache.action.name_item.used = 0;
- status = f_string_dynamic_append_nulless(entry->items.array[i].name, &main->thread.cache.action.name_item);
+ state.status = f_string_dynamic_append_nulless(entry->items.array[i].name, &main->thread.cache.action.name_item);
- if (F_status_is_error(status)) {
- controller_print_error_status(&main->program.error, macro_controller_f(f_string_dynamic_append_nulless), F_status_set_fine(status));
+ if (F_status_is_error(state.status)) {
+ controller_print_error_status(&main->program.error, macro_controller_f(f_string_dynamic_append_nulless), F_status_set_fine(state.status));
break;
}
}
}
- if (F_status_is_error(status)) {
- entry->status = controller_status_simplify_error(F_status_set_fine(status));
+ if (F_status_is_error(state.status)) {
+ entry->status = controller_status_simplify_error(F_status_set_fine(state.status));
- if (F_status_set_fine(status) != F_interrupt) {
+ if (F_status_set_fine(state.status) != F_interrupt) {
controller_print_error_entry_cache(&main->program.error, &main->thread.cache.action, entry->flag & controller_entry_flag_is_e);
}
}
main->thread.cache.delimits.used = 0;
- status = f_memory_array_increase_by(main->thread.cache.object_actions.used, sizeof(controller_entry_action_t), (void **) &actions->array, &actions->used, &actions->size);
+ state.status = f_memory_array_increase_by(main->thread.cache.object_actions.used, sizeof(controller_entry_action_t), (void **) &actions->array, &actions->used, &actions->size);
- if (F_status_is_error(status)) {
- controller_print_error_entry(&main->program.error, entry->flag & controller_entry_flag_is_e, F_status_set_fine(status), macro_controller_f(f_memory_array_increase_by), F_true);
+ if (F_status_is_error(state.status)) {
+ controller_print_error_entry(&main->program.error, entry->flag & controller_entry_flag_is_e, F_status_set_fine(state.status), macro_controller_f(f_memory_array_increase_by), F_true);
- return status;
+ return state.status;
}
controller_entry_action_t *action = 0;
f_fss_count_lines(main->thread.cache.buffer_file, main->thread.cache.object_actions.array[i].start, &main->thread.cache.action.line_action, &state);
if (F_status_is_error(state.status)) {
- status = state.status;
-
- controller_print_error_entry(&main->program.error, entry->flag & controller_entry_flag_is_e, F_status_set_fine(status), macro_controller_f(f_fss_count_lines), F_true);
+ controller_print_error_entry(&main->program.error, entry->flag & controller_entry_flag_is_e, F_status_set_fine(state.status), macro_controller_f(f_fss_count_lines), F_true);
break;
}
action->line = ++main->thread.cache.action.line_action;
- status = f_rip_dynamic_partial_nulless(main->thread.cache.buffer_file, main->thread.cache.object_actions.array[i], &main->thread.cache.action.name_action);
+ state.status = f_rip_dynamic_partial_nulless(main->thread.cache.buffer_file, main->thread.cache.object_actions.array[i], &main->thread.cache.action.name_action);
- if (F_status_is_error(status)) {
- controller_print_error_entry(&main->program.error, entry->flag & controller_entry_flag_is_e, F_status_set_fine(status), macro_controller_f(f_rip_dynamic_partial_nulless), F_true);
+ if (F_status_is_error(state.status)) {
+ controller_print_error_entry(&main->program.error, entry->flag & controller_entry_flag_is_e, F_status_set_fine(state.status), macro_controller_f(f_rip_dynamic_partial_nulless), F_true);
break;
}
}
if (allocate) {
- status = f_memory_array_increase_by(allocate, sizeof(f_string_dynamic_t), (void **) &action->parameters.array, &action->parameters.used, &action->parameters.size);
+ state.status = f_memory_array_increase_by(allocate, sizeof(f_string_dynamic_t), (void **) &action->parameters.array, &action->parameters.used, &action->parameters.size);
- if (F_status_is_error(status)) {
- controller_print_error_entry(&main->program.error, entry->flag & controller_entry_flag_is_e, F_status_set_fine(status), macro_controller_f(f_memory_array_increase_by), F_true);
+ if (F_status_is_error(state.status)) {
+ controller_print_error_entry(&main->program.error, entry->flag & controller_entry_flag_is_e, F_status_set_fine(state.status), macro_controller_f(f_memory_array_increase_by), F_true);
- action->status = status;
+ action->status = state.status;
if (F_status_is_error_not(status_action)) {
- status_action = status;
+ status_action = state.status;
}
break;
if (main->thread.cache.content_actions.array[i].array[j].start > main->thread.cache.content_actions.array[i].array[j].stop) continue;
- status = f_memory_array_increase_by((main->thread.cache.content_actions.array[i].array[j].stop - main->thread.cache.content_actions.array[i].array[j].start) + 1, sizeof(f_char_t), (void **) &action->parameters.array[j].string, &action->parameters.array[j].used, &action->parameters.array[j].size);
+ state.status = f_memory_array_increase_by((main->thread.cache.content_actions.array[i].array[j].stop - main->thread.cache.content_actions.array[i].array[j].start) + 1, sizeof(f_char_t), (void **) &action->parameters.array[j].string, &action->parameters.array[j].used, &action->parameters.array[j].size);
- if (F_status_is_error(status)) {
- controller_print_error_entry(&main->program.error, entry->flag & controller_entry_flag_is_e, F_status_set_fine(status), macro_controller_f(f_memory_array_increase_by), F_true);
+ if (F_status_is_error(state.status)) {
+ controller_print_error_entry(&main->program.error, entry->flag & controller_entry_flag_is_e, F_status_set_fine(state.status), macro_controller_f(f_memory_array_increase_by), F_true);
break;
}
- status = f_string_dynamic_partial_append_nulless(main->thread.cache.buffer_file, main->thread.cache.content_actions.array[i].array[j], &action->parameters.array[j]);
+ state.status = f_string_dynamic_partial_append_nulless(main->thread.cache.buffer_file, main->thread.cache.content_actions.array[i].array[j], &action->parameters.array[j]);
- if (F_status_is_error(status)) {
- controller_print_error_entry(&main->program.error, entry->flag & controller_entry_flag_is_e, F_status_set_fine(status), macro_controller_f(f_string_dynamic_partial_append_nulless), F_true);
+ if (F_status_is_error(state.status)) {
+ controller_print_error_entry(&main->program.error, entry->flag & controller_entry_flag_is_e, F_status_set_fine(state.status), macro_controller_f(f_string_dynamic_partial_append_nulless), F_true);
break;
}
if (action->parameters.array[0].used) {
// Force the path to be canonical (removing all '../' parts).
- status = controller_path_canonical_relative(main, main->process.path_current, action->parameters.array[0], &main->thread.cache.buffer_path);
+ state.status = controller_path_canonical_relative(main, main->process.path_current, action->parameters.array[0], &main->thread.cache.buffer_path);
- if (F_status_is_error(status)) {
- controller_print_error_entry_file(&main->program.error, entry->flag & controller_entry_flag_is_e, F_status_set_fine(status), macro_controller_f(controller_path_canonical_relative), F_true, main->thread.cache.action.generic, f_file_operation_analyze_s, fll_error_file_type_path_e);
+ if (F_status_is_error(state.status)) {
+ controller_print_error_entry_file(&main->program.error, entry->flag & controller_entry_flag_is_e, F_status_set_fine(state.status), macro_controller_f(controller_path_canonical_relative), F_true, main->thread.cache.action.generic, f_file_operation_analyze_s, fll_error_file_type_path_e);
- action->status = status;
+ action->status = state.status;
- if (F_status_set_fine(status) == F_memory_not) {
- status_action = status;
+ if (F_status_set_fine(state.status) == F_memory_not) {
+ status_action = state.status;
break;
}
if (F_status_is_error_not(status_action)) {
- status_action = status;
+ status_action = state.status;
}
}
}
if (action->parameters.array[1].used) {
main->thread.cache.buffer_path.used = 0;
- status = f_file_name_base(action->parameters.array[1], &main->thread.cache.buffer_path);
+ state.status = f_file_name_base(action->parameters.array[1], &main->thread.cache.buffer_path);
- if (F_status_is_error(status)) {
- controller_print_error_entry(&main->program.error, entry->flag & controller_entry_flag_is_e, F_status_set_fine(status), macro_controller_f(f_file_name_base), F_true);
+ if (F_status_is_error(state.status)) {
+ controller_print_error_entry(&main->program.error, entry->flag & controller_entry_flag_is_e, F_status_set_fine(state.status), macro_controller_f(f_file_name_base), F_true);
- if (F_status_set_fine(status) == F_memory_not) {
- status_action = controller_status_simplify_error(status);
+ if (F_status_set_fine(state.status) == F_memory_not) {
+ status_action = controller_status_simplify_error(state.status);
break;
}
- action->status = controller_status_simplify_error(status);
+ action->status = controller_status_simplify_error(state.status);
if (F_status_is_error_not(status_action)) {
- status_action = status;
+ status_action = state.status;
}
}
else {
if (action->parameters.used == 2) {
action->flag &= ~controller_entry_action_flag_undefined_e;
- status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, action->parameters.array[1], &action->number);
+ state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, action->parameters.array[1], &action->number);
- if (F_status_is_error(status) || status == F_data_not) {
+ if (F_status_is_error(state.status) || state.status == F_data_not) {
action->number = 0;
- if (status == F_data_not) {
+ if (state.status == F_data_not) {
action->status = controller_status_simplify_error(F_number);
}
else {
- action->status = controller_status_simplify_error(F_status_set_fine(status));
+ action->status = controller_status_simplify_error(F_status_set_fine(state.status));
}
- if (F_status_set_fine(status) == F_memory_not) {
- controller_print_error_entry(&main->program.error, entry->flag & controller_entry_flag_is_e, F_status_set_fine(status), macro_controller_f(fl_conversion_dynamic_to_unsigned_detect), F_true);
+ if (F_status_set_fine(state.status) == F_memory_not) {
+ controller_print_error_entry(&main->program.error, entry->flag & controller_entry_flag_is_e, F_status_set_fine(state.status), macro_controller_f(fl_conversion_dynamic_to_unsigned_detect), F_true);
- status_action = status;
+ status_action = state.status;
break;
}
++actions->used;
} // for
- return F_status_is_error(status_action) ? status_action : status;
+ return F_status_is_error(status_action) ? status_action : state.status;
}
#endif // _di_controller_entry_action_read_
if (!main) return F_status_set_error(F_parameter);
- f_status_t status = F_okay;
+ controller_interrupt_t custom = macro_controller_interrupt_t_initialize_1(is_entry, main);
+ f_state_t state = macro_f_state_t_initialize_1(controller_allocation_large_d, controller_allocation_small_d, F_okay, 0, 0, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0);
+ controller_cache_t * const cache = &main->thread.cache;
{
- controller_interrupt_t custom = macro_controller_interrupt_t_initialize_1(is_entry, main);
- f_state_t state = macro_f_state_t_initialize_1(controller_allocation_large_d, controller_allocation_small_d, F_okay, 0, 0, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0);
f_range_t range = content_range;
- fll_fss_extended_read(main->thread.cache.buffer_file, &range, &cache->object_actions, &cache->content_actions, 0, 0, &cache->delimits, 0, &state);
+ fll_fss_extended_read(cache->buffer_file, &range, &cache->object_actions, &cache->content_actions, 0, 0, &cache->delimits, 0, &state);
}
- if (F_status_is_error(status)) {
- controller_print_error_entry(&main->program.error, is_entry, F_status_set_fine(status), macro_controller_f(fll_fss_extended_read), F_true);
+ if (F_status_is_error(state.status)) {
+ controller_print_error_entry(&main->program.error, is_entry, F_status_set_fine(state.status), macro_controller_f(fll_fss_extended_read), F_true);
- return status;
+ return state.status;
}
- {
- f_state_t state = f_state_t_initialize;
-
- f_fss_apply_delimit(cache->delimits, &cache->buffer_file, &state);
- }
+ f_fss_apply_delimit(cache->delimits, &cache->buffer_file, &state);
- if (F_status_is_error(status)) {
- controller_print_error_entry(&main->program.error, is_entry, F_status_set_fine(status), macro_controller_f(f_fss_apply_delimit), F_true);
+ if (F_status_is_error(state.status)) {
+ controller_print_error_entry(&main->program.error, is_entry, F_status_set_fine(state.status), macro_controller_f(f_fss_apply_delimit), F_true);
- return status;
+ return state.status;
}
cache->delimits.used = 0;
f_number_unsigned_t i = 0;
controller_entry_t * const entry = is_entry ? &main->process.entry : &main->process.exit;
- f_state_t state = f_state_t_initialize;
for (; i < cache->object_actions.used; ++i) {
cache->action.line_action = 0;
- f_fss_count_lines(cache->buffer_file, cache->object_actions.array[i].start, &cache->action.line_action, &main->setting.state);
+ f_fss_count_lines(cache->buffer_file, cache->object_actions.array[i].start, &cache->action.line_action, &state);
- if (F_status_is_error(status)) {
- controller_print_error_entry(&main->program.error, is_entry, F_status_set_fine(status), macro_controller_f(f_fss_count_lines), F_true);
+ if (F_status_is_error(state.status)) {
+ controller_print_error_entry(&main->program.error, is_entry, F_status_set_fine(state.status), macro_controller_f(f_fss_count_lines), F_true);
break;
}
++cache->action.line_action;
cache->action.name_action.used = 0;
- status = f_rip_dynamic_partial_nulless(cache->buffer_file, cache->object_actions.array[i], &cache->action.name_action);
+ state.status = f_rip_dynamic_partial_nulless(cache->buffer_file, cache->object_actions.array[i], &cache->action.name_action);
- if (F_status_is_error(status)) {
- controller_print_error_entry(&main->program.error, is_entry, F_status_set_fine(status), macro_controller_f(f_rip_dynamic_partial_nulless), F_true);
+ if (F_status_is_error(state.status)) {
+ controller_print_error_entry(&main->program.error, is_entry, F_status_set_fine(state.status), macro_controller_f(f_rip_dynamic_partial_nulless), F_true);
break;
}
main->process.control.flag |= controller_control_flag_readonly_e;
}
else {
- controller_print_error_entry_item_setting_support_not_option(&main->program.error, cache, is_entry, cache->content_actions.array[i].array[1]);
+ controller_print_error_entry_item_setting_support_not_option(&main->program.error, cache, is_entry, cache->buffer_file, cache->content_actions.array[i].array[1]);
continue;
}
cache->action.generic.used = 0;
main->process.path_control.used = 0;
- status = f_rip_dynamic_partial_nulless(cache->buffer_file, cache->content_actions.array[i].array[0], &cache->action.generic);
+ state.status = f_rip_dynamic_partial_nulless(cache->buffer_file, cache->content_actions.array[i].array[0], &cache->action.generic);
- if (F_status_is_error(status)) {
- controller_print_error_entry(&main->program.error, is_entry, F_status_set_fine(status), macro_controller_f(f_rip_dynamic_partial_nulless), F_true);
+ if (F_status_is_error(state.status)) {
+ controller_print_error_entry(&main->program.error, is_entry, F_status_set_fine(state.status), macro_controller_f(f_rip_dynamic_partial_nulless), F_true);
break;
}
main->process.path_control.used = 0;
- status = controller_path_canonical_relative(main, main->process.path_current, cache->action.generic, &main->process.path_control);
+ state.status = controller_path_canonical_relative(main, main->process.path_current, cache->action.generic, &main->process.path_control);
- if (F_status_is_error(status)) {
- controller_print_error_entry_file(&main->program.error, is_entry, F_status_set_fine(status), macro_controller_f(controller_path_canonical_relative), F_true, cache->action.generic, f_file_operation_analyze_s, fll_error_file_type_path_e);
+ if (F_status_is_error(state.status)) {
+ controller_print_error_entry_file(&main->program.error, is_entry, F_status_set_fine(state.status), macro_controller_f(controller_path_canonical_relative), F_true, cache->action.generic, f_file_operation_analyze_s, fll_error_file_type_path_e);
continue;
}
else if (is_entry && f_compare_dynamic(controller_control_group_s, cache->action.name_action) == F_equal_to) {
gid_t number = 0;
- status = controller_convert_group_id(cache, cache->buffer_file, cache->content_actions.array[i].array[0], &number);
+ state.status = controller_convert_group_id(cache, cache->buffer_file, cache->content_actions.array[i].array[0], &number);
- if (F_status_is_error(status)) {
- status = F_status_set_fine(status);
-
- if (status == F_exist_not) {
+ if (F_status_is_error(state.status)) {
+ if (F_status_set_fine(state.status) == F_exist_not) {
controller_print_error_entry_setting_with_range(&main->program.error, cache, is_entry, " has an invalid group", cache->content_actions.array[i].array[0], ", because no group was found by that name");
}
- else if (status == F_number_too_large) {
+ else if (F_status_set_fine(state.status) == F_number_too_large) {
controller_print_error_entry_setting_with_range(&main->program.error, cache, is_entry, " has an invalid group", cache->content_actions.array[i].array[0], ", because the given ID is too large");
}
- else if (status == F_number) {
+ else if (F_status_set_fine(state.status) == F_number) {
controller_print_error_entry_setting_with_range(&main->program.error, cache, is_entry, " has an invalid group", cache->content_actions.array[i].array[0], ", because the given ID is not a valid supported number");
}
else {
- controller_print_error_entry(&main->program.error, is_entry, F_status_set_fine(status), macro_controller_f(controller_convert_group_id), F_true);
+ controller_print_error_entry(&main->program.error, is_entry, F_status_set_fine(state.status), macro_controller_f(controller_convert_group_id), F_true);
}
continue;
cache->action.generic.used = 0;
- status = f_rip_dynamic_partial_nulless(cache->buffer_file, cache->content_actions.array[i].array[0], &cache->action.generic);
+ state.status = f_rip_dynamic_partial_nulless(cache->buffer_file, cache->content_actions.array[i].array[0], &cache->action.generic);
- if (F_status_is_error(status)) {
- controller_print_error_entry(&main->program.error, is_entry, F_status_set_fine(status), macro_controller_f(f_rip_dynamic_partial_nulless), F_true);
+ if (F_status_is_error(state.status)) {
+ controller_print_error_entry(&main->program.error, is_entry, F_status_set_fine(state.status), macro_controller_f(f_rip_dynamic_partial_nulless), F_true);
break;
}
- status = f_file_mode_from_string(cache->action.generic, main->program.umask, &mode_file, &replace);
+ state.status = f_file_mode_from_string(cache->action.generic, main->program.umask, &mode_file, &replace);
- if (F_status_is_error(status)) {
+ if (F_status_is_error(state.status)) {
controller_print_error_entry_setting_with_range(&main->program.error, cache, is_entry, " has an unsupported mode", cache->content_actions.array[i].array[0], ", because the format is unknown or contains invalid data");
continue;
}
- status = f_file_mode_to_mode(mode_file, &mode);
+ state.status = f_file_mode_to_mode(mode_file, &mode);
- if (F_status_is_error(status)) {
- controller_print_error_entry(&main->program.error, is_entry, F_status_set_fine(status), macro_controller_f(f_file_mode_to_mode), F_true);
+ if (F_status_is_error(state.status)) {
+ controller_print_error_entry(&main->program.error, is_entry, F_status_set_fine(state.status), macro_controller_f(f_file_mode_to_mode), F_true);
continue;
}
else if (is_entry && f_compare_dynamic(controller_control_user_s, cache->action.name_action) == F_equal_to) {
uid_t number = 0;
- status = controller_convert_user_id(cache, cache->buffer_file, cache->content_actions.array[i].array[0], &number);
-
- if (F_status_is_error(status)) {
- status = F_status_set_fine(status);
+ state.status = controller_convert_user_id(cache, cache->buffer_file, cache->content_actions.array[i].array[0], &number);
- if (status == F_exist_not) {
+ if (F_status_is_error(state.status)) {
+ if (F_status_set_fine(state.status) == F_exist_not) {
controller_print_error_entry_setting_with_range(&main->program.error, cache, is_entry, " has an invalid user", cache->content_actions.array[i].array[0], ", because no user was found by that name");
}
- else if (status == F_number_too_large) {
+ else if (F_status_set_fine(state.status) == F_number_too_large) {
controller_print_error_entry_setting_with_range(&main->program.error, cache, is_entry, " has an invalid user", cache->content_actions.array[i].array[0], ", because the given ID is too large");
}
- else if (status == F_number) {
+ else if (F_status_set_fine(state.status) == F_number) {
controller_print_error_entry_setting_with_range(&main->program.error, cache, is_entry, " has an invalid user", cache->content_actions.array[i].array[0], ", because the given ID is not a valid supported number");
}
else {
- controller_print_error_entry(&main->program.error, is_entry, F_status_set_fine(status), macro_controller_f(controller_convert_user_id), F_true);
+ controller_print_error_entry(&main->program.error, is_entry, F_status_set_fine(state.status), macro_controller_f(controller_convert_user_id), F_true);
}
continue;
continue;
}
- status = controller_entry_setting_read_map(cache->buffer_file, cache->content_actions.array[i], &entry->define);
+ state.status = controller_entry_setting_read_map(cache->buffer_file, cache->content_actions.array[i], &entry->define);
- if (F_status_is_error(status)) {
- controller_print_error_entry(&main->program.error, is_entry, F_status_set_fine(status), macro_controller_f(controller_entry_setting_read_map), F_true);
+ if (F_status_is_error(state.status)) {
+ controller_print_error_entry(&main->program.error, is_entry, F_status_set_fine(state.status), macro_controller_f(controller_entry_setting_read_map), F_true);
continue;
}
main->process.mode = controller_process_mode_program_e;
}
else {
- controller_entry_setting_read_print_setting_unknown_action_value(main, cache, is_entry, cache->action.name_action, cache->content_actions.array[i].array[0]);
+ controller_print_warning_entry_setting_unknown_action_value(&main->program.warning, cache, is_entry, cache->action.name_action, cache->buffer_file, cache->content_actions.array[i].array[0]);
continue;
}
continue;
}
- status = controller_entry_setting_read_map(cache->buffer_file, cache->content_actions.array[i], &entry->parameter);
+ state.status = controller_entry_setting_read_map(cache->buffer_file, cache->content_actions.array[i], &entry->parameter);
- if (F_status_is_error(status)) {
- controller_print_error_entry(&main->program.error, is_entry, F_status_set_fine(status), macro_controller_f(controller_entry_setting_read_map), F_true);
+ if (F_status_is_error(state.status)) {
+ controller_print_error_entry(&main->program.error, is_entry, F_status_set_fine(state.status), macro_controller_f(controller_entry_setting_read_map), F_true);
continue;
}
entry->pid = controller_entry_pid_require_e;
}
else {
- controller_print_warning_entry_setting_unknown_action_value(&main->program.warning, cache, is_entry, cache->action.name_action, cache->content_actions.array[i].array[0]);
+ controller_print_warning_entry_setting_unknown_action_value(&main->program.warning, cache, is_entry, cache->action.name_action, cache->buffer_file, cache->content_actions.array[i].array[0]);
continue;
}
}
if (main->setting.flag & controller_main_flag_pid_e) {
- controller_entry_setting_read_print_setting_ignored(main, is_entry, *cache, i);
+ controller_print_error_entry_setting_ignored(&main->program.error, cache, is_entry);
}
else {
cache->action.generic.used = 0;
- status = f_rip_dynamic_partial_nulless(cache->buffer_file, cache->content_actions.array[i].array[0], &cache->action.generic);
+ state.status = f_rip_dynamic_partial_nulless(cache->buffer_file, cache->content_actions.array[i].array[0], &cache->action.generic);
- if (F_status_is_error(status)) {
- controller_print_error_entry(&main->program.error, is_entry, F_status_set_fine(status), macro_controller_f(f_rip_dynamic_partial_nulless), F_true);
+ if (F_status_is_error(state.status)) {
+ controller_print_error_entry(&main->program.error, is_entry, F_status_set_fine(state.status), macro_controller_f(f_rip_dynamic_partial_nulless), F_true);
continue;
}
main->process.path_pid.used = 0;
- status = controller_path_canonical_relative(main, main->process.path_current, cache->action.generic, &main->process.path_pid);
+ state.status = controller_path_canonical_relative(main, main->process.path_current, cache->action.generic, &main->process.path_pid);
- if (F_status_is_error(status)) {
- controller_print_error_entry(&main->program.error, is_entry, F_status_set_fine(status), macro_controller_f(controller_path_canonical_relative), F_true);
+ if (F_status_is_error(state.status)) {
+ controller_print_error_entry(&main->program.error, is_entry, F_status_set_fine(state.status), macro_controller_f(controller_path_canonical_relative), F_true);
continue;
}
entry->session = controller_entry_session_same_e;
}
else {
- controller_print_warning_entry_setting_unknown_action_value(&main->program.warning, cache, is_entry, cache->action.name_action, cache->content_actions.array[i].array[0]);
+ controller_print_warning_entry_setting_unknown_action_value(&main->program.warning, cache, is_entry, cache->action.name_action, cache->buffer_file, cache->content_actions.array[i].array[0]);
continue;
}
entry->show = controller_entry_show_init_e;
}
else {
- controller_print_warning_entry_setting_unknown_action_value(&main->program.warning, cache, is_entry, cache->action.name_action, cache->content_actions.array[i].array[0]);
+ controller_print_warning_entry_setting_unknown_action_value(&main->program.warning, cache, is_entry, cache->action.name_action, cache->buffer_file, cache->content_actions.array[i].array[0]);
continue;
}
time = &entry->timeout_stop;
}
else {
- controller_print_warning_entry_setting_unknown_action_value(&main->program.warning, cache, is_entry, cache->action.name_action, cache->content_actions.array[i].array[0]);
+ controller_print_warning_entry_setting_unknown_action_value(&main->program.warning, cache, is_entry, cache->action.name_action, cache->buffer_file, cache->content_actions.array[i].array[0]);
continue;
}
const f_number_unsigned_t time_previous = *time;
- status = fl_conversion_dynamic_partial_to_unsigned_detect(fl_conversion_data_base_10_c, cache->buffer_file, cache->content_actions.array[i].array[1], time);
+ state.status = fl_conversion_dynamic_partial_to_unsigned_detect(fl_conversion_data_base_10_c, cache->buffer_file, cache->content_actions.array[i].array[1], time);
- if (F_status_is_error(status) || status == F_data_not) {
+ if (F_status_is_error(state.status) || state.status == F_data_not) {
*time = time_previous;
- if (F_status_set_fine(status) == F_memory_not) {
- controller_print_error_entry(&main->program.error, is_entry, F_status_set_fine(status), macro_controller_f(fl_conversion_dynamic_partial_to_unsigned_detect), F_true);
+ if (F_status_set_fine(state.status) == F_memory_not) {
+ controller_print_error_entry(&main->program.error, is_entry, F_status_set_fine(state.status), macro_controller_f(fl_conversion_dynamic_partial_to_unsigned_detect), F_true);
continue;
}
}
}
else {
- if (main->program.warning.verbosity == f_console_verbosity_debug_e) {
- controller_entry_setting_read_print_setting_unknown_action(main, is_entry, *cache);
- }
+ controller_print_warning_entry_setting_unknown_action_value(&main->program.warning, cache, is_entry, cache->action.name_action, cache->buffer_file, cache->content_actions.array[i].array[0]);
continue;
}
} // for
- return F_status_is_error(status) ? status : F_okay;
+ return F_status_is_error(state.status) ? state.status : F_okay;
}
#endif // _di_controller_entry_setting_read_
if (!print || !cache) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
- fl_print_format("%r%[%QWhile processing ", print->to.stream, f_string_eol_s, print->context, print->prefix);
+ fl_print_format("%r%[%QWhile processing ", print->to, f_string_eol_s, print->context, print->prefix);
if (cache->name_action.used) {
- fl_print_format("action '%]", print->to.stream, print->context);
- fl_print_format(f_string_format_Q_single_s.string, print->to.stream, print->notable, cache->name_action, print->notable);
- fl_print_format("%[' on line%] ", print->to.stream, print->context, print->context);
- fl_print_format(f_string_format_un_single_s.string, print->to.stream, print->notable, cache->line_action, print->notable);
- fl_print_format("%[ for ", print->to.stream, print->context);
+ fl_print_format("action '%]", print->to, print->context);
+ fl_print_format(f_string_format_Q_single_s.string, print->to, print->notable, cache->name_action, print->notable);
+ fl_print_format("%[' on line%] ", print->to, print->context, print->context);
+ fl_print_format(f_string_format_un_single_s.string, print->to, print->notable, cache->line_action, print->notable);
+ fl_print_format("%[ for ", print->to, print->context);
}
if (cache->name_item.used) {
- fl_print_format("%r item '%]", print->to.stream, is_entry ? controller_entry_s : controller_exit_s, print->context);
- fl_print_format(f_string_format_Q_single_s.string, print->to.stream, print->notable, cache->name_item, print->notable);
- fl_print_format("%[' on line%] ", print->to.stream, print->context, print->context);
- fl_print_format(f_string_format_un_single_s.string, print->to.stream, print->notable, cache->line_item, print->notable);
- fl_print_format("%[ for ", print->to.stream, print->context);
+ fl_print_format("%r item '%]", print->to, 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->name_item, print->notable);
+ fl_print_format("%[' on line%] ", print->to, print->context, print->context);
+ fl_print_format(f_string_format_un_single_s.string, print->to, print->notable, cache->line_item, print->notable);
+ fl_print_format("%[ for ", print->to, print->context);
}
if (cache->name_file.used) {
- fl_print_format("%r file '%]", print->to.stream, is_entry ? controller_entry_s : controller_exit_s, print->context);
- fl_print_format("%[%Q%]%['", print->to.stream, print->notable, cache->name_file, print->notable, print->context);
+ fl_print_format("%r file '%]", print->to, is_entry ? controller_entry_s : controller_exit_s, print->context);
+ fl_print_format("%[%Q%]%['", print->to, print->notable, cache->name_file, print->notable, print->context);
}
- fl_print_format(".%]%r", print->to.stream, print->context, f_string_eol_s);
+ fl_print_format(".%]%r", print->to, print->context, f_string_eol_s);
return F_okay;
}
#endif // _di_controller_print_error_entry_item_invalid_
#ifndef _di_controller_print_error_entry_item_setting_support_not_option_
- f_status_t controller_print_error_entry_item_setting_support_not_option(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_string_static_t setting) {
+ f_status_t controller_print_error_entry_item_setting_support_not_option(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_string_static_t buffer, const f_range_t range) {
if (!print || !print->custom || !cache) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
fl_print_format(f_string_format_Q_single_s.string, print->to, print->notable, controller_control_s, print->notable);
fl_print_format("%[' does not support the option '%]", print->to, print->context, print->context, f_string_eol_s);
- fl_print_format(f_string_format_Q_range_single_s.string, print->to, print->notable, cache->buffer_file, setting, print->notable);
+ fl_print_format(f_string_format_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_entry_cache(print, &cache->action, is_entry);
* @param is_entry
* If TRUE, then this loads as an entry.
* If FALSE, then this loads as an exit.
- * @param setting
- * The setting name.
+ * @param buffer
+ * The buffer containing the setting name.
+ * @param range
+ * The range within the buffer representing the setting name.
*
* @return
* F_okay on success.
* F_output_not (with error bit) if setting is NULL.
*/
#ifndef _di_controller_print_error_entry_item_setting_support_not_option_
- extern f_status_t controller_print_error_entry_item_setting_support_not_option(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_string_static_t setting);
+ extern f_status_t controller_print_error_entry_item_setting_support_not_option(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_string_static_t buffer, const f_range_t range);
#endif // _di_controller_print_error_entry_item_setting_support_not_option_
#ifdef __cplusplus
controller_lock_print(print->to, &main->thread);
- fl_print_format("%r%[%Q%r setting%S '%]", print->to.stream, f_string_eol_s, print->context, print->prefix, is_entry ? controller_Entry_s : controller_Exit_s, before, print->context);
- fl_print_format("%[%/Q%]", print->to.stream, print->notable, cache->buffer_file, range, print->notable);
- fl_print_format("%['%S.%]%r", print->to.stream, print->context, after, print->context, f_string_eol_s);
+ fl_print_format("%r%[%Q%r setting%S '%]", print->to, f_string_eol_s, print->context, print->prefix, is_entry ? controller_Entry_s : controller_Exit_s, before, print->context);
+ fl_print_format("%[%/Q%]", print->to, print->notable, cache->buffer_file, range, print->notable);
+ fl_print_format("%['%S.%]%r", print->to, print->context, after, print->context, f_string_eol_s);
controller_print_error_entry_cache(print, &cache->action, is_entry);
controller_lock_print(print->to, &main->thread);
- fl_print_format("%r%[%QThe %Q item setting '%]", print->to.stream, f_string_eol_s, print->context, print->prefix, is_entry ? controller_entry_s : controller_exit_s, print->context);
- fl_print_format(f_string_format_Q_single_s.string, print->to.stream, print->notable, cache->action.name_action, print->notable);
- fl_print_format("%[' is being ignored.%]%r", print->to.stream, print->context, print->context, f_string_eol_s);
+ fl_print_format("%r%[%QThe %Q item setting '%]", 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);
+ fl_print_format("%[' is being ignored.%]%r", print->to, print->context, print->context, f_string_eol_s);
controller_print_error_entry_cache(print, &cache->action, is_entry);
controller_lock_print(print->to, &main->thread);
- fl_print_format("%r%[%QThe %Q item setting '%]", print->to.stream, f_string_eol_s, print->context, print->prefix, is_entry ? controller_entry_s : controller_exit_s, print->context);
- fl_print_format(f_string_format_Q_single_s.string, print->to.stream, print->notable, cache->action.name_action, print->notable);
- fl_print_format("%[' requires at least %]", print->to.stream, print->context, print->context);
- fl_print_format(f_string_format_un_single_s.string, print->to.stream, print->notable, minimum, print->notable);
- fl_print_format("%[ and at most %]", print->to.stream, print->context, print->context);
- fl_print_format(f_string_format_un_single_s.string, print->to.stream, print->notable, maximum, print->notable);
- fl_print_format("%[ Content.%]%r", print->to.stream, print->context, print->context, f_string_eol_s);
+ fl_print_format("%r%[%QThe %Q item setting '%]", 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);
+ fl_print_format("%[' requires at least %]", print->to, print->context, print->context);
+ fl_print_format(f_string_format_un_single_s.string, print->to, print->notable, minimum, print->notable);
+ fl_print_format("%[ and at most %]", print->to, print->context, print->context);
+ fl_print_format(f_string_format_un_single_s.string, print->to, print->notable, maximum, print->notable);
+ fl_print_format("%[ Content.%]%r", print->to, print->context, print->context, f_string_eol_s);
controller_print_error_entry_cache(print, &cache->action, is_entry);
controller_lock_print(print->to, &main->thread);
- fl_print_format("%r%[%QThe %Q item setting '%]", print->to.stream, f_string_eol_s, print->context, print->prefix, is_entry ? controller_entry_s : controller_exit_s, print->context);
- fl_print_format(f_string_format_Q_single_s.string, print->to.stream, print->notable, cache->action.name_action, print->notable);
- fl_print_format("%[' requires exactly %]", print->to.stream, print->context, print->context);
- fl_print_format(f_string_format_un_single_s.string, print->to.stream, print->notable, total, print->notable);
- fl_print_format("%[ Content.%]%r", print->to.stream, print->context, print->context, f_string_eol_s);
+ fl_print_format("%r%[%QThe %Q item setting '%]", 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);
+ fl_print_format("%[' requires exactly %]", print->to, print->context, print->context);
+ fl_print_format(f_string_format_un_single_s.string, print->to, print->notable, total, print->notable);
+ fl_print_format("%[ Content.%]%r", print->to, print->context, print->context, f_string_eol_s);
controller_print_error_entry_cache(print, &cache->action, is_entry);
controller_lock_print(print->to, &main->thread);
fl_print_format("%rIgnoring %r item action '", print->to, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s);
- fl_print_format(f_string_format_Q_single_s.string, print->to, print->set.title, name, print->set.title);
+ fl_print_format(f_string_format_Q_single_s.string, print->to, print->set->title, name, print->set->title);
fl_print_format("', state already is ready.%r", print->to, f_string_eol_s);
controller_unlock_print_flush(print->to, &main->thread);
fl_print_format(f_string_format_Q_single_s.string, print->to, print->notable, cache->action.name_action, print->notable);
if (action->parameters.used) {
- fl_print_format(" %[", print->to, context->notable);
+ fl_print_format(" %[", print->to, print->notable);
controller_print_message_entry_action_parameters(print, action);
- fl_print_format("%]", print->to, context->notable);
+ fl_print_format("%]", print->to, print->notable);
}
if (action->code & controller_entry_rule_code_require_d) {
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(f_string_format_Q_single_s.string, print->to, context->set.title, cache->action.name_action, context->set.title);
+ 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) {
- fl_print_format(" %[", print->to, context->notable);
+ fl_print_format(" %[", print->to, print->notable);
controller_print_message_entry_action_parameters(print, action);
- fl_print_format("%]", print->to, context->notable);
+ fl_print_format("%]", print->to, print->notable);
}
- fl_print_format("' is %[%r%] and is in a ", print->to, context->notable, action->code & controller_entry_rule_code_require_d ? "required" : "optional", context->notable);
+ fl_print_format("' is %[%r%] and is in a ", print->to, print->notable, action->code & controller_entry_rule_code_require_d ? "required" : "optional", print->notable);
- fl_print_format("%[failed%] state, skipping.%r", print->to, context->notable, context->notable, context->notable, f_string_eol_s);
+ fl_print_format("%[failed%] state, skipping.%r", print->to, print->notable, print->notable, print->notable, f_string_eol_s);
controller_unlock_print_flush(print->to, &main->thread);
controller_lock_print(print->to, &main->thread);
fl_print_format("%rWaiting before processing %r item action '", print->to, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s);
- fl_print_format(f_string_format_Q_single_s.string, print->to, print->set.title, name, print->set.title);
+ fl_print_format(f_string_format_Q_single_s.string, print->to, print->set->title, name, print->set->title);
fl_print_format("'.%r", print->to, f_string_eol_s);
controller_unlock_print_flush(print->to, &main->thread);
controller_lock_print(print->to, &main->thread);
fl_print_format("%rDone processing %r item '", print->to, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s);
- fl_print_format(f_string_format_Q_single_s.string, print->to, print->set.title, name, print->set.title);
+ fl_print_format(f_string_format_Q_single_s.string, print->to, print->set->title, name, print->set->title);
fl_print_format("'.%r%r", print->to, f_string_eol_s, failsafe ? f_string_eol_s : f_string_empty_s);
controller_unlock_print_flush(print->to, &main->thread);
fl_print_format("%r%Q is executing '", print->to, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s);
- for (f_number_unsigned_t k = 0; k < parameters.used; ++k) {
+ for (f_number_unsigned_t k = 0; k < parameters->used; ++k) {
- fl_print_format(f_string_format_Q_single_s.string, print->to, print->set.title, parameters.array[k], print->set.title);
+ fl_print_format(f_string_format_Q_single_s.string, print->to, print->set->title, parameters->array[k], print->set->title);
- if (k + 1 < parameters.used) {
+ if (k + 1 < parameters->used) {
f_print_dynamic_raw(f_string_space_s, print->to);
}
} // for
#endif // _di_controller_print_message_entry_item_process_
#ifndef _di_controller_print_message_entry_item_required_
- f_status_t controller_print_message_entry_item_required(fl_print_t * const print, const uint8_t is_entry, const f_string_static_t name, const f_string_t detail) {
+ f_status_t controller_print_message_entry_item_required(fl_print_t * const print, const uint8_t is_entry, const f_string_static_t name, const f_string_t reason) {
if (!print || !print->custom) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
controller_lock_print(print->to, &main->thread);
fl_print_format("%r%[%QThe required %r item '%]", print->to, f_string_eol_s, print->context, print->prefix, 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(f_string_format_Q_single_s.string, print->to, print->set->title, name, print->set->title);
fl_print_format("' %Q.", print->to, reason, f_string_eol_s);
controller_print_error_entry_cache(print, &main->thread.cache.action, is_entry);
controller_lock_print(print->to, &main->thread);
fl_print_format("%r%r %r item rule ", print->to, f_string_eol_s, entry_action->type == controller_entry_action_type_consider_e ? controller_print_entry_considering_s : controller_print_entry_processing_s, is_entry ? controller_entry_s : controller_exit_s);
- fl_print_format("'%[%Q%]'", print->to, print->set.title, alias_rule, print->set.title);
+ fl_print_format("'%[%Q%]'", print->to, print->set->title, alias_rule, print->set->title);
if (entry->show == controller_entry_show_init_e && !(main->setting.flag & controller_main_flag_simulate_e)) {
fl_print_format(" [%[%r%]]", print->to, print->notable, entry_action->code == controller_entry_rule_code_asynchronous_d ? controller_asynchronous_s : controller_synchronous_s, print->notable);
* If FALSE, then this loads as an exit.
* @param name
* The item name.
- * @param detail
- * The details regarding the problem with the required entry item.
+ * @param reason
+ * The reason regarding the problem with the required entry item.
*
* @return
* F_okay on success.
* F_output_not (with error bit) if setting is NULL.
*/
#ifndef _di_controller_print_message_entry_item_required_
- extern f_status_t controller_print_message_entry_item_required(fl_print_t * const print, const uint8_t is_entry, const f_string_static_t name, const f_string_t detail);
+ extern f_status_t controller_print_message_entry_item_required(fl_print_t * const print, const uint8_t is_entry, const f_string_static_t name, const f_string_t reason);
#endif // _di_controller_print_message_entry_item_required_
/**
controller_lock_print(print->to, &main->thread);
- fl_print_format("%rProcessing %r item action '", print->to.stream, 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.stream, print->set.title, name, print->set.title);
+ fl_print_format("%[%Q%]' setting ", print->to, print->set->title, name, print->set->title);
if (name_sub.used) {
- fl_print_format("'%[%Q%]'", print->to.stream, print->set.notable, name_sub, print->set.notable);
+ fl_print_format("'%[%Q%]'", print->to, print->set->notable, name_sub, print->set->notable);
}
else {
- fl_print_format("value", print->to.stream);
+ fl_print_format("value", print->to);
}
- fl_print_format(" to '%[%Q%]", print->to.stream, print->set.important, value, print->set.important);
+ fl_print_format(" to '%[%Q%]", print->to, print->set->important, value, print->set->important);
- fl_print_format("'%Q.%r", print->to.stream, suffix, f_string_eol_s);
+ fl_print_format("'%Q.%r", print->to, suffix, f_string_eol_s);
controller_unlock_print_flush(print->to, &main->thread);
f_number_unsigned_t i = 0;
f_number_unsigned_t j = 0;
- fl_print_format("%r%Q %[%Q%] {%r", print->to, f_string_eol_s, is_entry ? controller_Entry_s : controller_Exit_s, print->set.title, controller_settings_s, print->set.title, f_string_eol_s);
+ fl_print_format("%r%Q %[%Q%] {%r", print->to, f_string_eol_s, is_entry ? controller_Entry_s : controller_Exit_s, print->set->title, controller_settings_s, print->set->title, f_string_eol_s);
// Mode.
string = &f_string_empty_s;
}
- fl_print_format(" %[%r%]", print->to, print->set.important, controller_mode_s, print->set.important, f_string_eol_s);
+ fl_print_format(" %[%r%]", print->to, print->set->important, controller_mode_s, print->set->important, f_string_eol_s);
if (string->used) {
fl_print_format(" %r", print->to, *string);
string = &f_string_empty_s;
}
- fl_print_format(" %[%r%]", print->to, print->set.important, controller_session_s, print->set.important, f_string_eol_s);
+ fl_print_format(" %[%r%]", print->to, print->set->important, controller_session_s, print->set->important, f_string_eol_s);
if (string->used) {
fl_print_format(" %r", print->to, *string, f_string_eol_s);
string = &f_string_empty_s;
}
- fl_print_format(" %[%r%]", print->to, print->set.important, controller_show_s, print->set.important, f_string_eol_s);
+ fl_print_format(" %[%r%]", print->to, print->set->important, controller_show_s, print->set->important, f_string_eol_s);
if (string->used) {
fl_print_format(" %r", print->to, *string, f_string_eol_s);
string = &f_string_empty_s;
}
- fl_print_format(" %[%r%]", print->to, print->set.important, controller_pid_s, print->set.important);
+ fl_print_format(" %[%r%]", print->to, print->set->important, controller_pid_s, print->set->important);
if (string->used) {
fl_print_format(" %r", print->to, *string);
// Pid File.
- fl_print_format(" %[%r%]", print->to, print->set.important, controller_pid_file_s, print->set.important);
+ fl_print_format(" %[%r%]", print->to, print->set->important, controller_pid_file_s, print->set->important);
if (main->process.path_pid.used) {
fl_print_format(" %r", print->to, main->process.path_pid);
// Control.
- fl_print_format(" %[%r%]", print->to, print->set.important, controller_control_s, print->set.important);
+ fl_print_format(" %[%r%]", print->to, print->set->important, controller_control_s, print->set->important);
if (main->process.path_control.used) {
fl_print_format(" %Q", print->to, main->process.path_control);
// Control Has.
- fl_print_format(" %[%r%]", print->to, print->set.important, controller_control_has_s, print->set.important);
+ fl_print_format(" %[%r%]", print->to, print->set->important, controller_control_has_s, print->set->important);
if (main->process.control.flag & controller_control_flag_readonly_e) {
fl_print_format(" %r", print->to, controller_readonly_s);
// Control User.
- fl_print_format(" %[%r%]", print->to, print->set.important, controller_control_user_s, print->set.important);
+ fl_print_format(" %[%r%]", print->to, print->set->important, controller_control_user_s, print->set->important);
if (main->process.control.flag & controller_control_flag_has_user_e) {
fl_print_format(" %u", print->to, (unsigned int) main->process.control.user);
// Control Group.
- fl_print_format(" %[%r%]", print->to, print->set.important, controller_control_group_s, print->set.important);
+ fl_print_format(" %[%r%]", print->to, print->set->important, controller_control_group_s, print->set->important);
if (main->process.control.flag & controller_control_flag_has_group_e) {
fl_print_format(" %u", print->to, (unsigned int) main->process.control.group);
// Control Mode.
- fl_print_format(" %[%r%]", print->to, print->set.important, controller_control_mode_s, print->set.important);
+ fl_print_format(" %[%r%]", print->to, print->set->important, controller_control_mode_s, print->set->important);
if (F_status_is_error_not(status)) {
if (main->process.control.flag & controller_control_flag_has_group_e) {
// Timeout: Exit.
- fl_print_format(" %[%r%] %r", print->to, print->set.important, controller_timeout_s, print->set.important, controller_exit_s);
+ fl_print_format(" %[%r%] %r", print->to, print->set->important, controller_timeout_s, print->set->important, controller_exit_s);
if (!(entry->flag & controller_entry_flag_timeout_exit_no_e)) {
fl_print_format(" %ul", print->to, entry->timeout_exit, f_string_eol_s);
// Timeout: Kill.
- fl_print_format(" %[%r%] %r", print->to, print->set.important, controller_timeout_s, print->set.important, controller_kill_s);
+ fl_print_format(" %[%r%] %r", print->to, print->set->important, controller_timeout_s, print->set->important, controller_kill_s);
if (!(entry->flag & controller_entry_flag_timeout_kill_no_e)) {
fl_print_format(" %ul", print->to, entry->timeout_kill, f_string_eol_s);
// Timeout: Start.
- fl_print_format(" %[%r%] %r", print->to, print->set.important, controller_timeout_s, print->set.important, controller_start_s);
+ fl_print_format(" %[%r%] %r", print->to, print->set->important, controller_timeout_s, print->set->important, controller_start_s);
if (!(entry->flag & controller_entry_flag_timeout_start_no_e)) {
fl_print_format(" %ul", print->to, entry->timeout_start, f_string_eol_s);
// Timeout: Stop.
- fl_print_format(" %[%r%] %r", print->to, print->set.important, controller_timeout_s, print->set.important, controller_stop_s);
+ fl_print_format(" %[%r%] %r", print->to, print->set->important, controller_timeout_s, print->set->important, controller_stop_s);
if (!(entry->flag & controller_entry_flag_timeout_stop_no_e)) {
fl_print_format(" %ul", print->to, entry->timeout_stop, f_string_eol_s);
// Define.
- fl_print_format(" %[%r%] {%r", print->to, print->set.important, controller_define_s, print->set.important, f_string_eol_s);
+ fl_print_format(" %[%r%] {%r", print->to, print->set->important, controller_define_s, print->set->important, f_string_eol_s);
for (i = 0; i < entry->define.used; ++i) {
fl_print_format(" %Q %Q%r", print->to, entry->define.array[i].key, entry->define.array[i].value, f_string_eol_s);
// Parameter.
- fl_print_format(" %[%r%] {%r", print->to, print->set.important, controller_parameter_s, print->set.important, f_string_eol_s);
+ fl_print_format(" %[%r%] {%r", print->to, print->set->important, controller_parameter_s, print->set->important, f_string_eol_s);
for (i = 0; i < entry->parameter.used; ++i) {
fl_print_format(" %Q %Q%r", print->to, entry->parameter.array[i].key, entry->parameter.array[i].value, f_string_eol_s);
for (i = 0; i < entry->items.used; ++i) {
- fl_print_format("%r%Q %Q %[%Q%] {%r", print->to, f_string_eol_s, is_entry ? controller_Entry_s : controller_Exit_s, controller_Item_s, print->set.title, entry->items.array[i].name, print->set.title, f_string_eol_s);
+ fl_print_format("%r%Q %Q %[%Q%] {%r", print->to, f_string_eol_s, is_entry ? controller_Entry_s : controller_Exit_s, controller_Item_s, print->set->title, entry->items.array[i].name, print->set->title, f_string_eol_s);
for (j = 0; j < entry->items.array[i].actions.used; ++j) {
action = &entry->items.array[i].actions.array[j];
- fl_print_format(" %[%r%] {%r", print->to, print->set.important, controller_action_s, print->set.important, f_string_eol_s);
+ fl_print_format(" %[%r%] {%r", print->to, print->set->important, controller_action_s, print->set->important, f_string_eol_s);
// Item Type.
string = &f_string_empty_s;
}
- fl_print_format(" %[%r%] %r%r", print->to, print->set.important, controller_type_s, print->set.important, *string, f_string_eol_s);
+ fl_print_format(" %[%r%] %r%r", print->to, print->set->important, controller_type_s, print->set->important, *string, f_string_eol_s);
// Item Code (How).
- fl_print_format(" %[%r%]", print->to, print->set.important, controller_how_s, print->set.important);
+ fl_print_format(" %[%r%]", print->to, print->set->important, controller_how_s, print->set->important);
if (action->code) {
if (action->code == controller_entry_rule_code_asynchronous_d) {
// Parameters.
if (action->type == controller_entry_action_type_item_e) {
- fl_print_format(" %[%r%]", print->to, print->set.important, controller_item_s, print->set.important);
+ fl_print_format(" %[%r%]", print->to, print->set->important, controller_item_s, print->set->important);
if (action->parameters.used && action->parameters.array[0].used) {
fl_print_format(" %Q", print->to, action->parameters.array[0], f_string_eol_s);
}
else if (raw) {
for (k = 0; k < action->parameters.used; ++k) {
- fl_print_format(" %[%r%] %Q%r", print->to, print->set.important, controller_parameter_s, print->set.important, action->parameters.array[k], f_string_eol_s);
+ fl_print_format(" %[%r%] %Q%r", print->to, print->set->important, controller_parameter_s, print->set->important, action->parameters.array[k], f_string_eol_s);
} // for
}
else {
// Parameter, Directory.
- fl_print_format(" %[%r%]", print->to, print->set.important, controller_directory_s, print->set.important);
+ fl_print_format(" %[%r%]", print->to, print->set->important, controller_directory_s, print->set->important);
if (action->parameters.used && action->parameters.array[0].used) {
fl_print_format(" %Q", print->to, action->parameters.array[0], f_string_eol_s);
// Parameter, File.
- fl_print_format(" %[%r%]", print->to, print->set.important, controller_file_s, print->set.important);
+ fl_print_format(" %[%r%]", print->to, print->set->important, controller_file_s, print->set->important);
if (action->parameters.used && action->parameters.array[0].used > 1) {
fl_print_format(" %Q", print->to, action->parameters.array[1], f_string_eol_s);
controller_lock_print(print->to, &main->thread);
- fl_print_format("%r%[%QUnknown %r item setting '%]", print->to.stream, f_string_eol_s, print->context, print->prefix, is_entry ? controller_entry_s : controller_exit_s, print->context);
- fl_print_format(f_string_format_Q_single_s.string, print->to.stream, print->notable, name, print->notable);
- fl_print_format(f_string_format_sentence_end_quote_s.string, print->to.stream, print->context, print->context, f_string_eol_s);
+ fl_print_format("%r%[%QUnknown %r item setting '%]", 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_entry_cache(print, &cache->action, is_entry);
#endif // _di_controller_print_warning_entry_setting_unknown_action_
#ifndef _di_controller_print_warning_entry_setting_unknown_action_value_
- f_status_t controller_print_warning_entry_setting_unknown_action_value(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_string_static_t name, const f_string_static_t unknown) {
+ f_status_t controller_print_warning_entry_setting_unknown_action_value(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_string_static_t name, const f_string_static_t 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_debug_e) return F_output_not;
controller_lock_print(print->to, &main->thread);
- fl_print_format("%r%[%QThe %r item setting '%]", print->to.stream, f_string_eol_s, print->context, print->prefix, is_entry ? controller_entry_s : controller_exit_s, print->context);
- fl_print_format(f_string_format_Q_single_s.string, print->to.stream, print->notable, name, print->notable);
- fl_print_format("%[' has an unknown value '%]", print->to.stream, print->context, print->context);
- fl_print_format(f_string_format_Q_single_s.string, print->to.stream, print->notable, unknown, print->notable);
- fl_print_format(f_string_format_sentence_end_quote_s.string, print->to.stream, print->context, print->context, f_string_eol_s);
+ fl_print_format("%r%[%QThe %r item setting '%]", 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("%[' 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_entry_cache(print, &cache->action, is_entry);
* If FALSE, then this loads as an exit.
* @param name
* The parameter name whose value is unknown.
- * @param unknown
- * The unknown value.
+ * @param buffer
+ * The buffer containing the unknown value.
+ * @param range
+ * The range within the buffer representing the unknown value.
*
* @return
* F_okay on success.
* F_output_not (with error bit) if setting is NULL.
*/
#ifndef _di_controller_print_warning_entry_setting_unknown_action_value_
- extern f_status_t controller_print_warning_entry_setting_unknown_action_value(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_string_static_t name, const f_string_static_t unknown);
+ extern f_status_t controller_print_warning_entry_setting_unknown_action_value(fl_print_t * const print, controller_cache_t * const cache, const uint8_t is_entry, const f_string_static_t name, const f_string_static_t buffer, const f_range_t range);
#endif // _di_controller_print_warning_entry_setting_unknown_action_value_
#ifdef __cplusplus
if (!main || !item || !actions || !range) return F_status_set_error(F_parameter);
- f_status_t status = F_okay;
-
controller_interrupt_t custom = macro_controller_interrupt_t_initialize_1(is_normal, main);
f_state_t state = macro_f_state_t_initialize_1(controller_allocation_large_d, controller_allocation_small_d, F_okay, 0, 0, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0);
if (method == controller_rule_action_method_extended_list_e) {
fl_fss_extended_list_content_read(cache->buffer_item, range, &cache->content_action, &cache->delimits, &cache->comments, &state);
- if (F_status_is_error(status)) {
+ if (F_status_is_error(state.status)) {
controller_print_error(&main->program.error, macro_controller_f(fl_fss_extended_list_content_read));
- return status;
+ return state.status;
}
- if (status == F_fss_found_content) {
+ if (state.status == F_fss_found_content) {
f_fss_apply_delimit(cache->delimits, &cache->buffer_item, &state);
- if (F_status_is_error(status)) {
+ if (F_status_is_error(state.status)) {
controller_print_error(&main->program.error, macro_controller_f(f_fss_apply_delimit));
- return status;
+ return state.status;
}
// The "script" and "utility" types use the entire content and can be directly passed through at index 0.
if (item->type == controller_rule_item_type_script_e || item->type == controller_rule_item_type_utility_e) {
actions->array[actions->used].parameters.used = 0;
- status = f_memory_array_increase(controller_allocation_small_d, sizeof(f_string_dynamic_t), (void **) &actions->array[actions->used].parameters.array, &actions->array[actions->used].parameters.used, &actions->array[actions->used].parameters.size);
+ state.status = f_memory_array_increase(controller_allocation_small_d, sizeof(f_string_dynamic_t), (void **) &actions->array[actions->used].parameters.array, &actions->array[actions->used].parameters.used, &actions->array[actions->used].parameters.size);
- if (F_status_is_error(status)) {
+ if (F_status_is_error(state.status)) {
controller_print_error(&main->program.error, macro_controller_f(f_memory_array_increase));
- return status;
+ return state.status;
}
- status = f_memory_array_increase(controller_allocation_small_d, sizeof(f_iki_data_t), (void **) &actions->array[actions->used].ikis.array, &actions->array[actions->used].ikis.used, &actions->array[actions->used].ikis.size);
+ state.status = f_memory_array_increase(controller_allocation_small_d, sizeof(f_iki_data_t), (void **) &actions->array[actions->used].ikis.array, &actions->array[actions->used].ikis.used, &actions->array[actions->used].ikis.size);
- if (F_status_is_error(status)) {
+ if (F_status_is_error(state.status)) {
controller_print_error(&main->program.error, macro_controller_f(f_memory_array_increase));
- return status;
+ return state.status;
}
actions->array[actions->used].type = type;
actions->array[actions->used].line = cache->action.line_action;
actions->array[actions->used].status = F_known_not;
- status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_action.array[0], &actions->array[actions->used].parameters.array[0]);
+ state.status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_action.array[0], &actions->array[actions->used].parameters.array[0]);
- if (F_status_is_error(status)) {
+ if (F_status_is_error(state.status)) {
controller_print_error(&main->program.error, macro_controller_f(f_string_dynamic_append_nulless));
- actions->array[actions->used++].status = controller_error_simplify(F_status_set_fine(status));
+ actions->array[actions->used++].status = controller_error_simplify(F_status_set_fine(state.status));
- return status;
+ return state.status;
}
if (actions->array[actions->used].parameters.array[0].used) {
fl_iki_read(&actions->array[actions->used].parameters.array[0], &range_iki, &actions->array[actions->used].ikis.array[0], &state);
- if (F_status_is_error(status)) {
+ if (F_status_is_error(state.status)) {
controller_print_error(&main->program.error, macro_controller_f(fl_iki_read));
- actions->array[actions->used++].status = controller_error_simplify(F_status_set_fine(status));
+ actions->array[actions->used++].status = controller_error_simplify(F_status_set_fine(state.status));
- return status;
+ return state.status;
}
}
actions->array[actions->used].ikis.used = 1;
actions->array[actions->used++].parameters.used = 1;
- return status;
+ return state.status;
}
cache->delimits.used = 0;
// The object_actions and content_actions caches are being used for the purposes of getting the parameters a given the action.
fll_fss_extended_read(cache->buffer_item, &cache->content_action.array[0], &cache->object_actions, &cache->content_actions, 0, 0, &cache->delimits, 0, &state);
- if (F_status_is_error(status)) {
+ if (F_status_is_error(state.status)) {
controller_print_error(&main->program.error, macro_controller_f(fll_fss_extended_read));
- return status;
+ return state.status;
}
f_fss_apply_delimit(cache->delimits, &cache->buffer_item, &state);
- if (F_status_is_error(status)) {
+ if (F_status_is_error(state.status)) {
controller_print_error(&main->program.error, macro_controller_f(f_fss_apply_delimit));
- return status;
+ return state.status;
}
for (i = 0; i < cache->object_actions.used; ++i) {
- status = f_memory_array_increase(controller_allocation_small_d, sizeof(controller_rule_action_t), (void **) &actions->array, &actions->used, &actions->size);
+ state.status = f_memory_array_increase(controller_allocation_small_d, sizeof(controller_rule_action_t), (void **) &actions->array, &actions->used, &actions->size);
- if (F_status_is_error(status)) {
+ if (F_status_is_error(state.status)) {
controller_print_error(&main->program.error, macro_controller_f(f_memory_array_increase));
- return status;
+ return state.status;
}
f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &actions->array[actions->used].line, &state);
- if (F_status_is_error(status)) {
+ if (F_status_is_error(state.status)) {
controller_print_error(&main->program.error, macro_controller_f(f_fss_count_lines));
- return status;
+ return state.status;
}
actions->array[actions->used].type = type;
actions->array[actions->used].line += ++item->line;
actions->array[actions->used].status = F_known_not;
- status = controller_rule_parameters_read(main, cache->buffer_item, &cache->object_actions.array[i], &cache->content_actions.array[i], &actions->array[actions->used], &state);
+ state.status = controller_rule_parameters_read(main, cache->buffer_item, &cache->object_actions.array[i], &cache->content_actions.array[i], &actions->array[actions->used], &state);
- if (F_status_is_error(status)) {
- actions->array[actions->used++].status = controller_error_simplify(F_status_set_fine(status));
+ if (F_status_is_error(state.status)) {
+ actions->array[actions->used++].status = controller_error_simplify(F_status_set_fine(state.status));
- return status;
+ return state.status;
}
- actions->array[actions->used++].status = status;
+ actions->array[actions->used++].status = state.status;
} // for
range->start = cache->content_action.array[0].start;
}
else {
- status = F_data_not;
+ state.status = F_data_not;
}
}
else {
fl_fss_extended_content_read(cache->buffer_item, range, &cache->content_action, 0, &cache->delimits, &state);
- if (F_status_is_error(status)) {
+ if (F_status_is_error(state.status)) {
controller_print_error(&main->program.error, macro_controller_f(fll_fss_extended_content_read));
}
- else if (status == F_fss_found_content) {
+ else if (state.status == F_fss_found_content) {
f_fss_apply_delimit(cache->delimits, &cache->buffer_item, &state);
- if (F_status_is_error(status)) {
+ if (F_status_is_error(state.status)) {
controller_print_error(&main->program.error, macro_controller_f(f_fss_apply_delimit));
}
else if (type == controller_rule_action_type_pid_file_e) {
item->pid_file.used = 0;
- status = f_rip_dynamic_partial(cache->buffer_item, cache->content_action.array[0], &item->pid_file);
+ state.status = f_rip_dynamic_partial(cache->buffer_item, cache->content_action.array[0], &item->pid_file);
- if (F_status_is_error(status)) {
+ if (F_status_is_error(state.status)) {
controller_print_error(&main->program.error, macro_controller_f(f_rip_dynamic_partial));
}
}
for (i = 2; i < cache->content_action.used; ++i) {
if (f_compare_dynamic_partial_string(controller_delay_s.string, cache->buffer_item, controller_delay_s.used, cache->content_action.array[i]) == F_equal_to) {
- status = controller_rule_action_read_rerun_number(main, cache, controller_delay_s.string, &i, &rerun_item->delay);
+ state.status = controller_rule_action_read_rerun_number(main, cache, controller_delay_s.string, &i, &rerun_item->delay);
}
else if (f_compare_dynamic_partial_string(controller_max_s.string, cache->buffer_item, controller_max_s.used, cache->content_action.array[i]) == F_equal_to) {
- status = controller_rule_action_read_rerun_number(main, cache, controller_max_s.string, &i, &rerun_item->max);
+ state.status = controller_rule_action_read_rerun_number(main, cache, controller_max_s.string, &i, &rerun_item->max);
}
else if (f_compare_dynamic_partial_string(controller_reset_s.string, cache->buffer_item, controller_reset_s.used, cache->content_action.array[i]) == F_equal_to) {
item->reruns[type_rerun].is |= rerun_item == &item->reruns[type_rerun].failure ? controller_rule_rerun_is_failure_reset_d : controller_rule_rerun_is_success_reset_d;
else {
controller_print_error_rule_item_action_unknown(&main->program.error, cache, controller_with_s, cache->content_action.array[i]);
- status = F_status_set_error(F_valid_not);
+ state.status = F_status_set_error(F_valid_not);
break;
}
} // for
}
else if (item->type == controller_rule_item_type_script_e || item->type == controller_rule_item_type_utility_e) {
- status = f_memory_array_increase(controller_allocation_small_d, sizeof(f_string_dynamic_t), (void **) &actions->array[actions->used].parameters.array, &actions->array[actions->used].parameters.used, &actions->array[actions->used].parameters.size);
+ state.status = f_memory_array_increase(controller_allocation_small_d, sizeof(f_string_dynamic_t), (void **) &actions->array[actions->used].parameters.array, &actions->array[actions->used].parameters.used, &actions->array[actions->used].parameters.size);
- if (F_status_is_error(status)) {
+ if (F_status_is_error(state.status)) {
controller_print_error(&main->program.error, macro_controller_f(f_memory_array_increase));
- return status;
+ return state.status;
}
- status = f_memory_array_increase(controller_allocation_small_d, sizeof(f_iki_data_t), (void **) &actions->array[actions->used].ikis.array, &actions->array[actions->used].ikis.used, &actions->array[actions->used].ikis.size);
+ state.status = f_memory_array_increase(controller_allocation_small_d, sizeof(f_iki_data_t), (void **) &actions->array[actions->used].ikis.array, &actions->array[actions->used].ikis.used, &actions->array[actions->used].ikis.size);
- if (F_status_is_error(status)) {
+ if (F_status_is_error(state.status)) {
controller_print_error(&main->program.error, macro_controller_f(f_memory_array_increase));
- return status;
+ return state.status;
}
// The "script" types use the entire content as a single string piped to the script, so merge all arguments together.
for (i = 0; i < cache->content_action.used; ++i) {
- status = f_string_dynamic_partial_mash_nulless(f_string_space_s, cache->buffer_item, cache->content_action.array[i], &actions->array[actions->used].parameters.array[0]);
- if (F_status_is_error(status)) break;
+ state.status = f_string_dynamic_partial_mash_nulless(f_string_space_s, cache->buffer_item, cache->content_action.array[i], &actions->array[actions->used].parameters.array[0]);
+ if (F_status_is_error(state.status)) break;
} // for
- if (F_status_is_error(status)) {
+ if (F_status_is_error(state.status)) {
controller_print_error(&main->program.error, macro_controller_f(f_string_dynamic_partial_mash_nulless));
- actions->array[actions->used++].status = controller_error_simplify(F_status_set_fine(status));
+ actions->array[actions->used++].status = controller_error_simplify(F_status_set_fine(state.status));
- return status;
+ return state.status;
}
if (actions->array[actions->used].parameters.array[0].used) {
fl_iki_read(&actions->array[actions->used].parameters.array[0], &range_iki, &actions->array[actions->used].ikis.array[0], &state);
- if (F_status_is_error(status)) {
+ if (F_status_is_error(state.status)) {
controller_print_error(&main->program.error, macro_controller_f(fl_iki_read));
- actions->array[actions->used++].status = controller_error_simplify(F_status_set_fine(status));
+ actions->array[actions->used++].status = controller_error_simplify(F_status_set_fine(state.status));
- return status;
+ return state.status;
}
}
else {
f_fss_count_lines(cache->buffer_item, range->start, &actions->array[actions->used].line, &state);
- if (F_status_is_error(status)) {
+ if (F_status_is_error(state.status)) {
controller_print_error(&main->program.error, macro_controller_f(f_fss_count_lines));
- return status;
+ return state.status;
}
actions->array[actions->used].type = type;
actions->array[actions->used].line += ++item->line;
actions->array[actions->used].status = F_known_not;
- status = controller_rule_parameters_read(main, cache->buffer_item, 0, &cache->content_action, &actions->array[actions->used], &state);
+ state.status = controller_rule_parameters_read(main, cache->buffer_item, 0, &cache->content_action, &actions->array[actions->used], &state);
- if (F_status_is_error(status)) {
- actions->array[actions->used++].status = controller_error_simplify(F_status_set_fine(status));
+ if (F_status_is_error(state.status)) {
+ actions->array[actions->used++].status = controller_error_simplify(F_status_set_fine(state.status));
- return status;
+ return state.status;
}
- actions->array[actions->used++].status = status;
+ actions->array[actions->used++].status = state.status;
}
}
else {
- status = F_data_not;
+ state.status = F_data_not;
}
}
- if (F_status_is_error_not(status) && status == F_data_not) {
+ if (F_status_is_error_not(state.status) && state.status == F_data_not) {
controller_print_debug_rule_action_empty(&main->program.debug, cache);
}
- return status;
+ return state.status;
}
#endif // _di_controller_rule_action_read_
if (!main || !cache || !item) return F_status_set_error(F_parameter);
- f_status_t status = F_okay;
controller_interrupt_t custom = macro_controller_interrupt_t_initialize_1(is_normal, main);
f_state_t state = macro_f_state_t_initialize_1(controller_allocation_large_d, controller_allocation_small_d, F_okay, 0, 0, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0);
f_range_t range = macro_f_range_t_initialize_2(cache->buffer_item.used);
fl_fss_extended_list_object_read(cache->buffer_item, &range, &cache->range_action, &cache->delimits, &state);
- if (F_status_is_error(status)) {
- controller_print_error_status(&main->program.error, macro_controller_f(fl_fss_extended_list_object_read), F_status_set_fine(status));
+ if (F_status_is_error(state.status)) {
+ controller_print_error_status(&main->program.error, macro_controller_f(fl_fss_extended_list_object_read), F_status_set_fine(state.status));
break;
}
- if (status == F_fss_found_object) {
+ if (state.status == F_fss_found_object) {
multiple = F_true;
}
else {
// The current line is not an Extended List object, so the next possibility is a Basic List (and Extended List, both use the same Object structure).
fl_fss_extended_object_read(cache->buffer_item, &range, &cache->range_action, 0, &cache->delimits, &state);
- if (F_status_is_error(status)) {
- controller_print_error_status(&main->program.error, macro_controller_f(fl_fss_extended_object_read), F_status_set_fine(status));
+ if (F_status_is_error(state.status)) {
+ controller_print_error_status(&main->program.error, macro_controller_f(fl_fss_extended_object_read), F_status_set_fine(state.status));
break;
}
// Nothing of importance here, so continue onto the next line.
- if (status != F_fss_found_object) continue;
+ if (state.status != F_fss_found_object) continue;
}
f_fss_apply_delimit(cache->delimits, &cache->buffer_item, &state);
- if (F_status_is_error(status)) {
- controller_print_error_status(&main->program.error, macro_controller_f(f_fss_apply_delimit), F_status_set_fine(status));
+ if (F_status_is_error(state.status)) {
+ controller_print_error_status(&main->program.error, macro_controller_f(f_fss_apply_delimit), F_status_set_fine(state.status));
break;
}
f_fss_count_lines(cache->buffer_item, cache->range_action.start, &cache->action.line_action, &state);
- if (F_status_is_error(status)) {
- controller_print_error_status(&main->program.error, macro_controller_f(f_fss_count_lines), F_status_set_fine(status));
+ if (F_status_is_error(state.status)) {
+ controller_print_error_status(&main->program.error, macro_controller_f(f_fss_count_lines), F_status_set_fine(state.status));
break;
}
cache->action.line_action += ++item->line;
cache->action.name_action.used = 0;
- status = f_rip_dynamic_partial_nulless(cache->buffer_item, cache->range_action, &cache->action.name_action);
+ state.status = f_rip_dynamic_partial_nulless(cache->buffer_item, cache->range_action, &cache->action.name_action);
- if (F_status_is_error(status)) {
- controller_print_error_status(&main->program.error, macro_controller_f(f_rip_dynamic_partial_nulless), F_status_set_fine(status));
+ if (F_status_is_error(state.status)) {
+ controller_print_error_status(&main->program.error, macro_controller_f(f_rip_dynamic_partial_nulless), F_status_set_fine(state.status));
break;
}
controller_unlock_print_flush(main->program.error.to, &main->thread);
}
- status = F_status_set_error(F_support_not);
+ state.status = F_status_set_error(F_support_not);
break;
}
method = controller_rule_action_method_extended_e;
}
- status = f_memory_array_increase(controller_allocation_small_d, sizeof(controller_rule_action_t), (void **) &item->actions.array, &item->actions.used, &item->actions.size);
+ state.status = f_memory_array_increase(controller_allocation_small_d, sizeof(controller_rule_action_t), (void **) &item->actions.array, &item->actions.used, &item->actions.size);
- if (F_status_is_error(status)) {
- controller_print_error_status(&main->program.error, macro_controller_f(f_memory_array_increase_by), F_status_set_fine(status));
+ if (F_status_is_error(state.status)) {
+ controller_print_error_status(&main->program.error, macro_controller_f(f_memory_array_increase_by), F_status_set_fine(state.status));
break;
}
- status = controller_rule_action_read(main, is_normal, type, method, cache, item, &item->actions, &range);
- if (F_status_is_error(status)) break;
+ state.status = controller_rule_action_read(main, is_normal, type, method, cache, item, &item->actions, &range);
+ if (F_status_is_error(state.status)) break;
} // for
- return status;
+ return state.status;
}
#endif // _di_controller_rule_item_read_
if (!main || !cache || !entry || !rule) return F_status_set_error(F_parameter);
- f_status_t status = F_okay;
-
bool for_item = F_true;
rule->timeout_kill = entry->timeout_kill ? entry->timeout_kill : 0;
} // for
}
- status = f_string_dynamic_append_nulless(alias, &rule->alias);
+ controller_interrupt_t custom = macro_controller_interrupt_t_initialize_1(is_normal, main);
+ f_state_t state = macro_f_state_t_initialize_1(controller_allocation_large_d, controller_allocation_small_d, F_okay, 0, 0, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0);
+ state.status = f_string_dynamic_append_nulless(alias, &rule->alias);
- if (F_status_is_error(status)) {
- controller_print_error_status(&main->program.error, macro_controller_f(f_string_dynamic_append_nulless), F_status_set_fine(status));
+ if (F_status_is_error(state.status)) {
+ controller_print_error_status(&main->program.error, macro_controller_f(f_string_dynamic_append_nulless), F_status_set_fine(state.status));
}
else {
- status = controller_file_load(main, cache, F_true, controller_rules_s, rule->alias, controller_rule_s);
+ state.status = controller_file_load(main, cache, F_true, controller_rules_s, rule->alias, controller_rule_s);
}
- if (F_status_is_error_not(status)) {
+ if (F_status_is_error_not(state.status)) {
rule->timestamp = cache->timestamp;
if (cache->buffer_file.used) {
- controller_interrupt_t custom = macro_controller_interrupt_t_initialize_1(is_normal, main);
- f_state_t state = macro_f_state_t_initialize_1(controller_allocation_large_d, controller_allocation_small_d, F_okay, 0, 0, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0);
f_range_t range = macro_f_range_t_initialize_2(cache->buffer_file.used);
fll_fss_basic_list_read(cache->buffer_file, &range, &cache->object_items, &cache->content_items, &cache->delimits, 0, &cache->comments, &state);
- if (F_status_is_error(status)) {
- controller_print_error_status(&main->program.error, macro_controller_f(fll_fss_basic_list_read), F_status_set_fine(status));
+ if (F_status_is_error(state.status)) {
+ controller_print_error_status(&main->program.error, macro_controller_f(fll_fss_basic_list_read), F_status_set_fine(state.status));
}
else {
f_fss_apply_delimit(cache->delimits, &cache->buffer_file, &state);
- if (F_status_is_error(status)) {
- controller_print_error_status(&main->program.error, macro_controller_f(f_fss_apply_delimit), F_status_set_fine(status));
+ if (F_status_is_error(state.status)) {
+ controller_print_error_status(&main->program.error, macro_controller_f(f_fss_apply_delimit), F_status_set_fine(state.status));
}
}
}
}
- if (F_status_is_error_not(status) && cache->object_items.used) {
+ if (F_status_is_error_not(state.status) && cache->object_items.used) {
if (rule->items.size < cache->object_items.size) {
- status = f_memory_arrays_resize(cache->object_items.size, sizeof(controller_rule_item_t), (void **) &rule->items.array, &rule->items.used, &rule->items.size, &controller_rule_items_delete_callback);
+ state.status = f_memory_arrays_resize(cache->object_items.size, sizeof(controller_rule_item_t), (void **) &rule->items.array, &rule->items.used, &rule->items.size, &controller_rule_items_delete_callback);
}
- if (F_status_is_error(status)) {
- controller_print_error_status(&main->program.error, macro_controller_f(f_memory_arrays_resize), F_status_set_fine(status));
+ if (F_status_is_error(state.status)) {
+ controller_print_error_status(&main->program.error, macro_controller_f(f_memory_arrays_resize), F_status_set_fine(state.status));
}
else {
f_number_unsigned_t i = 0;
for_item = F_true;
- f_fss_count_lines(cache->buffer_file, cache->object_items.array[i].start, &cache->action.line_item, &main->setting.state);
+ f_fss_count_lines(cache->buffer_file, cache->object_items.array[i].start, &cache->action.line_item, &state);
- if (F_status_is_error(status)) {
- controller_print_error_status(&main->program.error, macro_controller_f(f_fss_count_lines), F_status_set_fine(status));
+ if (F_status_is_error(state.status)) {
+ controller_print_error_status(&main->program.error, macro_controller_f(f_fss_count_lines), F_status_set_fine(state.status));
break;
}
rule->items.array[rule->items.used].line = ++cache->action.line_item;
- status = f_rip_dynamic_partial_nulless(cache->buffer_file, cache->object_items.array[i], &cache->action.name_item);
+ state.status = f_rip_dynamic_partial_nulless(cache->buffer_file, cache->object_items.array[i], &cache->action.name_item);
- if (F_status_is_error(status)) {
- controller_print_error_status(&main->program.error, macro_controller_f(f_rip_dynamic_partial_nulless), F_status_set_fine(status));
+ if (F_status_is_error(state.status)) {
+ controller_print_error_status(&main->program.error, macro_controller_f(f_rip_dynamic_partial_nulless), F_status_set_fine(state.status));
break;
}
continue;
}
- status = f_string_dynamic_partial_append(cache->buffer_file, cache->content_items.array[i].array[0], &cache->buffer_item);
+ state.status = f_string_dynamic_partial_append(cache->buffer_file, cache->content_items.array[i].array[0], &cache->buffer_item);
- if (F_status_is_error(status)) {
- controller_print_error_status(&main->program.error, macro_controller_f(f_rip_dynamic_partial_nulless), F_status_set_fine(status));
+ if (F_status_is_error(state.status)) {
+ controller_print_error_status(&main->program.error, macro_controller_f(f_rip_dynamic_partial_nulless), F_status_set_fine(state.status));
break;
}
rule->items.array[rule->items.used].with |= controller_with_session_same_d;
}
- status = controller_rule_item_read(main, is_normal, cache, &rule->items.array[rule->items.used]);
- if (F_status_is_error(status)) break;
+ state.status = controller_rule_item_read(main, is_normal, cache, &rule->items.array[rule->items.used]);
+ if (F_status_is_error(state.status)) break;
++rule->items.used;
}
else {
for_item = F_false;
- status = controller_rule_setting_read(main, is_normal, cache, rule);
+ state.status = controller_rule_setting_read(main, is_normal, cache, rule);
- if (F_status_is_error(status)) {
- if (F_status_set_fine(status) == F_memory_not) break;
+ if (F_status_is_error(state.status)) {
+ if (F_status_set_fine(state.status) == F_memory_not) break;
}
}
} // for
}
}
- if (F_status_is_error(status)) {
- controller_print_error_rule_item(&main->program.error, cache->action, for_item, F_status_set_fine(status));
+ if (F_status_is_error(state.status)) {
+ controller_print_error_rule_item(&main->program.error, cache->action, for_item, F_status_set_fine(state.status));
- rule->status[0] = controller_error_simplify(F_status_set_fine(status));
+ rule->status[0] = controller_error_simplify(F_status_set_fine(state.status));
return rule->status[0];
}
#endif // _di_controller_rule_setting_limit_type_name_
#ifndef _di_controller_rule_setting_read_
- f_status_t controller_rule_setting_read(controller_t * const main, controller_cache_t * const cache, const bool is_normal, controller_rule_t * const rule) {
+ f_status_t controller_rule_setting_read(controller_t * const main, controller_cache_t * const cache, const uint8_t is_normal, controller_rule_t * const rule) {
if (!main || !cache || !rule) return F_status_set_error(F_parameter);
- f_status_t status = F_okay;
f_status_t status_return = F_okay;
-
f_range_t range = macro_f_range_t_initialize_2(cache->buffer_item.used);
f_range_t range2 = f_range_t_initialize;
fll_fss_extended_read(cache->buffer_item, &range, &cache->object_actions, &cache->content_actions, 0, 0, &cache->delimits, 0, &state);
- if (F_status_is_error(status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "fll_fss_extended_read", F_true, F_false);
+ 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);
- return status;
+ return state.status;
}
f_string_dynamic_t *setting_value = 0;
// The name_item is used to store the setting name.
cache->action.name_item.used = 0;
- status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->object_actions.array[i], &cache->action.name_item);
+ 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(status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ if (F_status_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);
- if (F_status_set_fine(status) == F_memory_not) {
- status_return = status;
+ if (F_status_set_fine(state.status) == F_memory_not) {
+ status_return = state.status;
break;
}
if (F_status_is_error_not(status_return)) {
- status_return = status;
+ status_return = state.status;
}
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &main->setting.state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &state);
cache->action.line_action = ++cache->action.line_item;
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
continue;
}
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &main->setting.state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &state);
cache->action.line_action = ++cache->action.line_item;
range2.start = cache->content_actions.array[i].array[0].start;
range2.stop = cache->content_actions.array[i].array[cache->content_actions.array[i].used - 1].stop;
- status = f_string_dynamic_partial_append_nulless(cache->buffer_item, range2, &cache->action.name_action);
+ state.status = f_string_dynamic_partial_append_nulless(cache->buffer_item, range2, &cache->action.name_action);
- if (F_status_is_error(status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ if (F_status_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);
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &main->setting.state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &state);
cache->action.line_action = ++cache->action.line_item;
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
- if (F_status_set_fine(status) == F_memory_not) {
- status_return = status;
+ if (F_status_set_fine(state.status) == F_memory_not) {
+ status_return = state.status;
break;
}
if (F_status_is_error_not(status_return)) {
- status_return = status;
+ status_return = state.status;
}
continue;
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &main->setting.state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &state);
cache->action.line_action = ++cache->action.line_item;
for (j = 0; j < cache->content_actions.array[i].used; ++j, number = 0) {
- status = f_memory_array_increase(controller_allocation_small_d, sizeof(int32_t), (void **) &rule->affinity.array, &rule->affinity.used, &rule->affinity.size);
+ 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(status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_memory_array_increase", F_true, F_false);
+ if (F_status_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);
break;
}
- status = fl_conversion_dynamic_partial_to_signed_detect(fl_conversion_data_base_10_c, cache->buffer_item, cache->content_actions.array[i].array[j], &number);
+ state.status = fl_conversion_dynamic_partial_to_signed_detect(fl_conversion_data_base_10_c, cache->buffer_item, cache->content_actions.array[i].array[j], &number);
- if (F_status_set_fine(status) == F_number_positive) {
- status = fl_conversion_dynamic_partial_to_signed_detect(fl_conversion_data_base_10_c, cache->buffer_item, controller_range_after_number_sign(cache->buffer_item, cache->content_actions.array[i].array[j]), &number);
+ if (F_status_set_fine(state.status) == F_number_positive) {
+ state.status = fl_conversion_dynamic_partial_to_signed_detect(fl_conversion_data_base_10_c, cache->buffer_item, controller_range_after_number_sign(cache->buffer_item, cache->content_actions.array[i].array[j]), &number);
// Restore error on parameter problem.
- if (F_status_set_fine(status) == F_parameter) {
- status = F_status_set_error(F_number_positive);
+ if (F_status_set_fine(state.status) == F_parameter) {
+ state.status = F_status_set_error(F_number_positive);
}
}
- if (F_status_is_error(status)) {
- status = F_status_set_fine(status);
+ if (F_status_is_error(state.status)) {
+ state.status = F_status_set_fine(state.status);
- if (status == F_data_not || status == F_number || status == F_number_overflow || status == F_number_underflow || status == F_number_negative || status == F_number_decimal) {
- if (status == F_number_underflow) {
+ if (state.status == F_data_not || state.status == F_number || state.status == F_number_overflow || state.status == F_number_underflow || state.status == F_number_negative || state.status == F_number_decimal) {
+ if (state.status == F_number_underflow) {
controller_print_error_rule_setting_with_range(&main->program.error, " has an unsupported number", cache->content_actions.array[i].array[j], ", the number is too small for this system", i, line_item, &main->thread, cache);
}
- else if (status == F_number_overflow || status == F_number_positive) {
+ else if (state.status == F_number_overflow || state.status == F_number_positive) {
controller_print_error_rule_setting_with_range(&main->program.error, " has an unsupported number", cache->content_actions.array[i].array[j], ", the number is too large for this system", i, line_item, &main->thread, cache);
}
else {
controller_print_error_rule_setting_with_range(&main->program.error, " has an invalid number", cache->content_actions.array[i].array[j], ", only whole numbers are allowed for an affinity value", i, line_item, &main->thread, cache);
}
- status = F_status_set_error(F_valid_not);
+ state.status = F_status_set_error(F_valid_not);
if (F_status_is_error_not(status_return)) {
- status_return = status;
+ status_return = state.status;
}
}
else {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
+ 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);
- status = F_status_set_error(status);
+ state.status = F_status_set_error(state.status);
if (F_status_is_error_not(status_return)) {
- status_return = status;
+ status_return = state.status;
}
}
setting_maps = &rule->parameter;
}
- status = f_memory_array_increase(controller_allocation_small_d, sizeof(f_string_map_t), (void **) &setting_maps->array, &setting_maps->used, &setting_maps->size);
+ 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(status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_memory_array_increase", F_true, F_false);
+ if (F_status_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);
- if (F_status_set_fine(status) == F_memory_not) {
- status_return = status;
+ if (F_status_set_fine(state.status) == F_memory_not) {
+ status_return = state.status;
break;
}
if (F_status_is_error_not(status_return)) {
- status_return = status;
+ status_return = state.status;
}
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &main->setting.state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &state);
cache->action.line_action = ++cache->action.line_item;
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
continue;
}
setting_maps->array[setting_maps->used].key.used = 0;
setting_maps->array[setting_maps->used].value.used = 0;
- status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[0], &setting_maps->array[setting_maps->used].key);
+ 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);
- if (F_status_is_error(status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ if (F_status_set_fine(state.status) == F_memory_not) {
+ status_return = state.status;
- if (F_status_set_fine(status) == F_memory_not) {
- status_return = status;
break;
}
if (F_status_is_error_not(status_return)) {
- status_return = status;
+ status_return = state.status;
}
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &main->setting.state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &state);
cache->action.line_action = ++cache->action.line_item;
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
continue;
}
- status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[1], &setting_maps->array[setting_maps->used].value);
+ 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(status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ if (F_status_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);
- if (F_status_set_fine(status) == F_memory_not) {
- status_return = status;
+ if (F_status_set_fine(state.status) == F_memory_not) {
+ status_return = state.status;
break;
}
if (F_status_is_error_not(status_return)) {
- status_return = status;
+ status_return = state.status;
}
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &main->setting.state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &state);
cache->action.line_action = ++cache->action.line_item;
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
continue;
}
rule->cgroup.path.used = 0;
- status = f_string_dynamic_append(main->process.path_cgroup, &rule->cgroup.path);
+ state.status = f_string_dynamic_append(main->process.path_cgroup, &rule->cgroup.path);
- if (F_status_is_error(status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_append", F_true, F_false);
+ 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);
}
else {
rule->cgroup.groups.used = 0;
for (j = 1; j < cache->content_actions.array[i].used; ++j) {
- 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);
+ 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(status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_memory_array_increase", F_true, F_false);
+ if (F_status_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);
break;
}
rule->cgroup.groups.array[rule->cgroup.groups.used].used = 0;
- 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]);
+ 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(status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ if (F_status_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);
break;
}
} // for
}
- if (F_status_is_error(status)) {
- if (F_status_set_fine(status) == F_memory_not) {
- status_return = status;
+ if (F_status_is_error(state.status)) {
+ if (F_status_set_fine(state.status) == F_memory_not) {
+ status_return = state.status;
break;
}
rule->cgroup.path.used = 0;
if (F_status_is_error_not(status_return)) {
- status_return = status;
+ status_return = state.status;
}
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &main->setting.state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &state);
cache->action.line_action = ++cache->action.line_item;
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
continue;
}
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &main->setting.state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &state);
cache->action.line_action = ++cache->action.line_item;
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &main->setting.state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &state);
cache->action.line_action = ++cache->action.line_item;
controller_unlock_print_flush(main->program.error.to, &main->thread);
}
- status = F_status_set_error(F_valid_not);
+ state.status = F_status_set_error(F_valid_not);
if (F_status_is_error_not(status_return)) {
- status_return = status;
+ status_return = state.status;
}
}
} // for
- if (F_status_is_error(status)) continue;
+ if (F_status_is_error(state.status)) continue;
- status = f_memory_array_increase(controller_allocation_small_d, sizeof(f_limit_set_t), (void **) &rule->limits.array, &rule->limits.used, &rule->limits.size);
+ 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(status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_memory_array_increase", F_true, F_false);
+ if (F_status_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);
- if (F_status_set_fine(status) == F_memory_not) {
- status_return = status;
+ if (F_status_set_fine(state.status) == F_memory_not) {
+ status_return = state.status;
break;
}
if (F_status_is_error_not(status_return)) {
- status_return = status;
+ status_return = state.status;
}
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &main->setting.state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &state);
cache->action.line_action = ++cache->action.line_item;
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
continue;
}
for (j = 1; j < 3; ++j, number = 0) {
- status = fl_conversion_dynamic_partial_to_signed_detect(fl_conversion_data_base_10_c, cache->buffer_item, cache->content_actions.array[i].array[j], &number);
+ state.status = fl_conversion_dynamic_partial_to_signed_detect(fl_conversion_data_base_10_c, cache->buffer_item, cache->content_actions.array[i].array[j], &number);
- if (F_status_set_fine(status) == F_number_positive) {
- status = fl_conversion_dynamic_partial_to_signed_detect(fl_conversion_data_base_10_c, cache->buffer_item, controller_range_after_number_sign(cache->buffer_item, cache->content_actions.array[i].array[j]), &number);
+ if (F_status_set_fine(state.status) == F_number_positive) {
+ state.status = fl_conversion_dynamic_partial_to_signed_detect(fl_conversion_data_base_10_c, cache->buffer_item, controller_range_after_number_sign(cache->buffer_item, cache->content_actions.array[i].array[j]), &number);
// Restore error on parameter problem.
- if (F_status_set_fine(status) == F_parameter) {
- status = F_status_set_error(F_number_positive);
+ if (F_status_set_fine(state.status) == F_parameter) {
+ state.status = F_status_set_error(F_number_positive);
}
}
- if (F_status_is_error(status)) {
- status = F_status_set_fine(status);
+ if (F_status_is_error(state.status)) {
+ state.status = F_status_set_fine(state.status);
- if (status == F_data_not || status == F_number || status == F_number_overflow || status == F_number_underflow || status == F_number_negative || status == F_number_positive || status == F_number_decimal) {
- if (status == F_number_underflow) {
+ if (state.status == F_data_not || state.status == F_number || state.status == F_number_overflow || state.status == F_number_underflow || state.status == F_number_negative || state.status == F_number_positive || state.status == F_number_decimal) {
+ if (state.status == F_number_underflow) {
controller_print_error_rule_setting_with_range(&main->program.error, " has an unsupported number", cache->content_actions.array[i].array[j], ", the number is too small for this system", i, line_item, &main->thread, cache);
}
- else if (status == F_number_overflow) {
+ else if (state.status == F_number_overflow) {
controller_print_error_rule_setting_with_range(&main->program.error, " has an unsupported number", cache->content_actions.array[i].array[j], ", the number is too large for this system", i, line_item, &main->thread, cache);
}
else {
controller_print_error_rule_setting_with_range(&main->program.error, " has an unsupported number", cache->content_actions.array[i].array[j], ", only whole numbers are allowed for a resource limit value", i, line_item, &main->thread, cache);
}
- status = F_status_set_error(F_valid_not);
+ state.status = F_status_set_error(F_valid_not);
if (F_status_is_error_not(status_return)) {
- status_return = status;
+ status_return = state.status;
}
}
else {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
+ 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);
- status = F_status_set_error(status);
+ state.status = F_status_set_error(state.status);
if (F_status_is_error_not(status_return)) {
- status_return = status;
+ status_return = state.status;
}
}
}
} // for
- if (F_status_is_error(status)) continue;
+ if (F_status_is_error(state.status)) continue;
rule->limits.array[rule->limits.used++].type = type;
}
if (type == controller_rule_setting_type_name_e || type == controller_rule_setting_type_engine_e) {
- status = f_rip_dynamic_partial_nulless(cache->buffer_item, cache->content_actions.array[i].array[0], setting_value);
+ state.status = f_rip_dynamic_partial_nulless(cache->buffer_item, cache->content_actions.array[i].array[0], setting_value);
if (type == controller_rule_setting_type_engine_e) {
rule->engine_arguments.used = 0;
if (cache->content_actions.array[i].used > 1) {
- status = f_memory_array_increase_by(cache->content_actions.array[i].used - 1, sizeof(f_string_dynamic_t), (void **) &rule->engine_arguments.array, &rule->engine_arguments.used, &rule->engine_arguments.size);
+ state.status = f_memory_array_increase_by(cache->content_actions.array[i].used - 1, sizeof(f_string_dynamic_t), (void **) &rule->engine_arguments.array, &rule->engine_arguments.used, &rule->engine_arguments.size);
- for (j = 1; F_status_is_error_not(status) && j < cache->content_actions.array[i].used; ++j, ++rule->engine_arguments.used) {
+ for (j = 1; F_status_is_error_not(state.status) && j < cache->content_actions.array[i].used; ++j, ++rule->engine_arguments.used) {
rule->engine_arguments.array[rule->engine_arguments.used].used = 0;
- status = f_string_dynamic_partial_append(cache->buffer_item, cache->content_actions.array[i].array[j], &rule->engine_arguments.array[rule->engine_arguments.used]);
+ state.status = f_string_dynamic_partial_append(cache->buffer_item, cache->content_actions.array[i].array[j], &rule->engine_arguments.array[rule->engine_arguments.used]);
} // for
}
}
- if (F_status_is_error(status)) {
+ if (F_status_is_error(state.status)) {
setting_value->used = 0;
if (type == controller_rule_setting_type_engine_e) {
rule->engine_arguments.used = 0;
}
- if (F_status_set_fine(status) == F_memory_not) {
- status_return = status;
+ if (F_status_set_fine(state.status) == F_memory_not) {
+ status_return = state.status;
break;
}
if (F_status_is_error_not(status_return)) {
- status_return = status;
+ status_return = state.status;
}
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &main->setting.state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &state);
cache->action.line_action = ++cache->action.line_item;
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
continue;
}
- status = controller_validate_has_graph(*setting_value);
+ state.status = controller_validate_has_graph(*setting_value);
- if (status == F_false || F_status_set_fine(status) == F_complete_not_utf) {
+ 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) {
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &main->setting.state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &state);
cache->action.line_action = ++cache->action.line_item;
}
- if (status == F_false) {
+ if (state.status == F_false) {
if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
controller_lock_print(main->program.error.to, &main->thread);
controller_print_error_rule(&main->program.error, cache->action, F_complete_not_utf, "controller_validate_has_graph", F_true, F_false);
if (F_status_is_error_not(status_return)) {
- status_return = status;
+ status_return = state.status;
}
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
}
setting_value->used = 0;
controller_print_error_rule_setting_value(main, type == controller_rule_setting_type_name_e ? controller_name_s : controller_engine_s, f_string_empty_s, *setting_value, 0);
}
else if (type == controller_rule_setting_type_path_e) {
- status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[0], setting_value);
+ 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(status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ if (F_status_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);
- if (F_status_set_fine(status) == F_memory_not) {
- status_return = status;
+ if (F_status_set_fine(state.status) == F_memory_not) {
+ status_return = state.status;
break;
}
if (F_status_is_error_not(status_return)) {
- status_return = status;
+ status_return = state.status;
}
setting_value->used = 0;
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &main->setting.state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &state);
cache->action.line_action = ++cache->action.line_item;
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
continue;
}
f_number_signed_t number = 0;
- status = fl_conversion_dynamic_partial_to_signed_detect(fl_conversion_data_base_10_c, cache->buffer_item, cache->content_actions.array[i].array[1], &number);
+ state.status = fl_conversion_dynamic_partial_to_signed_detect(fl_conversion_data_base_10_c, cache->buffer_item, cache->content_actions.array[i].array[1], &number);
- if (F_status_set_fine(status) == F_number_positive) {
- status = fl_conversion_dynamic_partial_to_signed_detect(fl_conversion_data_base_10_c, cache->buffer_item, controller_range_after_number_sign(cache->buffer_item, cache->content_actions.array[i].array[1]), &number);
+ if (F_status_set_fine(state.status) == F_number_positive) {
+ state.status = fl_conversion_dynamic_partial_to_signed_detect(fl_conversion_data_base_10_c, cache->buffer_item, controller_range_after_number_sign(cache->buffer_item, cache->content_actions.array[i].array[1]), &number);
// Restore error on parameter problem.
- if (F_status_set_fine(status) == F_parameter) {
- status = F_status_set_error(F_number_positive);
+ if (F_status_set_fine(state.status) == F_parameter) {
+ state.status = F_status_set_error(F_number_positive);
}
}
- if (F_status_is_error(status) || (zero_only && number) || (!zero_only && (number < 1 || number > 99))) {
- status = F_status_set_fine(status);
+ if (F_status_is_error(state.status) || (zero_only && number) || (!zero_only && (number < 1 || number > 99))) {
+ state.status = F_status_set_fine(state.status);
- if ((zero_only && number) || (!zero_only && (number < 1 || number > 99)) || status == F_data_not || status == F_number || status == F_number_overflow || status == F_number_negative || status == F_number_positive) {
+ 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) {
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &main->setting.state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &state);
cache->action.line_action = ++cache->action.line_item;
}
}
else {
- controller_print_error_rule(&main->program.error, cache->action, status, "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
- status = F_status_set_error(status);
+ controller_print_error_rule(&main->program.error, cache->action, state.status, "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
+ state.status = F_status_set_error(state.status);
if (F_status_is_error_not(status_return)) {
- status_return = status;
+ status_return = state.status;
}
}
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &main->setting.state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &state);
cache->action.line_action = ++cache->action.line_item;
f_number_unsigned_t number = 0;
- status = fl_conversion_dynamic_partial_to_unsigned_detect(fl_conversion_data_base_10_c, cache->buffer_item, cache->content_actions.array[i].array[1], &number);
+ state.status = fl_conversion_dynamic_partial_to_unsigned_detect(fl_conversion_data_base_10_c, cache->buffer_item, cache->content_actions.array[i].array[1], &number);
- if (F_status_set_fine(status) == F_number_positive) {
- status = fl_conversion_dynamic_partial_to_unsigned_detect(fl_conversion_data_base_10_c, cache->buffer_item, controller_range_after_number_sign(cache->buffer_item, cache->content_actions.array[i].array[1]), &number);
+ if (F_status_set_fine(state.status) == F_number_positive) {
+ state.status = fl_conversion_dynamic_partial_to_unsigned_detect(fl_conversion_data_base_10_c, cache->buffer_item, controller_range_after_number_sign(cache->buffer_item, cache->content_actions.array[i].array[1]), &number);
// Restore error on parameter problem.
- if (F_status_set_fine(status) == F_parameter) {
- status = F_status_set_error(F_number_positive);
+ if (F_status_set_fine(state.status) == F_parameter) {
+ state.status = F_status_set_error(F_number_positive);
}
}
- if (F_status_is_error(status)) {
- status = F_status_set_fine(status);
+ if (F_status_is_error(state.status)) {
+ state.status = F_status_set_fine(state.status);
- if (status == F_number_overflow) {
+ if (state.status == F_number_overflow) {
controller_print_error_rule_setting_with_range(&main->program.error, " has an unsupported number", cache->content_actions.array[i].array[1], ", the number is too large for this system", i, line_item, &main->thread, cache);
}
- else if (status == F_data_not || status == F_number || status == F_number_underflow || status == F_number_negative || status == F_number_positive || status == F_number_decimal) {
+ else if (state.status == F_data_not || state.status == F_number || state.status == F_number_underflow || state.status == F_number_negative || state.status == F_number_positive || state.status == F_number_decimal) {
controller_print_error_rule_setting_with_range(&main->program.error, " has an invalid number", cache->content_actions.array[i].array[1], ", only positive whole numbers are allowed", i, line_item, &main->thread, cache);
}
else {
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &main->setting.state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &state);
cache->action.line_action = ++cache->action.line_item;
- controller_print_error_rule(&main->program.error, cache->action, status, "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, state.status, "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
}
if (F_status_is_error_not(status_return)) {
cache->action.generic.used = 0;
- status = f_rip_dynamic_partial_nulless(cache->buffer_item, cache->content_actions.array[i].array[1], &cache->action.generic);
+ state.status = f_rip_dynamic_partial_nulless(cache->buffer_item, cache->content_actions.array[i].array[1], &cache->action.generic);
- if (F_status_is_error(status)) {
- controller_print_error_status(&main->program.error, macro_controller_f(f_rip_dynamic_partial_nulless), F_status_set_fine(status));
+ if (F_status_is_error(state.status)) {
+ controller_print_error_status(&main->program.error, macro_controller_f(f_rip_dynamic_partial_nulless), F_status_set_fine(state.status));
break;
}
if (type == controller_rule_setting_type_capability_e) {
cache->action.generic.used = 0;
- status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[0], &cache->action.generic);
+ state.status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[0], &cache->action.generic);
- if (F_status_is_error(status)) {
+ if (F_status_is_error(state.status)) {
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &main->setting.state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &state);
cache->action.line_action = ++cache->action.line_item;
controller_lock_print(main->program.error.to, &main->thread);
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(state.status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
controller_print_error_rule_cache(&main->program.error, cache->action, F_false);
controller_unlock_print_flush(main->program.error.to, &main->thread);
- if (F_status_set_fine(status) == F_memory_not) {
- status_return = status;
+ if (F_status_set_fine(state.status) == F_memory_not) {
+ status_return = state.status;
break;
}
}
}
- status = f_capability_from_text(cache->action.generic, &rule->capability);
+ state.status = f_capability_from_text(cache->action.generic, &rule->capability);
- if (F_status_is_error(status) && F_status_set_fine(status) != F_support_not) {
- if (F_status_set_fine(status) == F_memory_not) {
+ if (F_status_is_error(state.status) && F_status_set_fine(state.status) != F_support_not) {
+ if (F_status_set_fine(state.status) == F_memory_not) {
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &main->setting.state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &state);
cache->action.line_action = ++cache->action.line_item;
controller_lock_print(main->program.error.to, &main->thread);
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_capability_from_text", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(state.status), "f_capability_from_text", F_true, F_false);
controller_print_error_rule_cache(&main->program.error, cache->action, F_false);
controller_unlock_print_flush(main->program.error.to, &main->thread);
- status_return = status;
+ status_return = state.status;
break;
}
else if (type == controller_rule_setting_type_nice_e) {
f_number_signed_t number = 0;
- status = fl_conversion_dynamic_partial_to_signed_detect(fl_conversion_data_base_10_c, cache->buffer_item, cache->content_actions.array[i].array[0], &number);
+ state.status = fl_conversion_dynamic_partial_to_signed_detect(fl_conversion_data_base_10_c, cache->buffer_item, cache->content_actions.array[i].array[0], &number);
- if (F_status_set_fine(status) == F_number_positive) {
- status = fl_conversion_dynamic_partial_to_signed_detect(fl_conversion_data_base_10_c, cache->buffer_item, controller_range_after_number_sign(cache->buffer_item, cache->content_actions.array[i].array[0]), &number);
+ if (F_status_set_fine(state.status) == F_number_positive) {
+ state.status = fl_conversion_dynamic_partial_to_signed_detect(fl_conversion_data_base_10_c, cache->buffer_item, controller_range_after_number_sign(cache->buffer_item, cache->content_actions.array[i].array[0]), &number);
// Restore error on parameter problem.
- if (F_status_set_fine(status) == F_parameter) {
- status = F_status_set_error(F_number_positive);
+ if (F_status_set_fine(state.status) == F_parameter) {
+ state.status = F_status_set_error(F_number_positive);
}
}
- if (F_status_is_error(status) || number < -20 || number > 19) {
- status = F_status_set_fine(status);
+ if (F_status_is_error(state.status) || number < -20 || number > 19) {
+ state.status = F_status_set_fine(state.status);
- if (number < -20 || number > 19 || status == F_data_not || status == F_number || status == F_number_overflow || status == F_number_underflow || status == F_number_decimal) {
+ 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) {
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &main->setting.state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &state);
cache->action.line_action = ++cache->action.line_item;
}
}
else {
- controller_print_error_rule(&main->program.error, cache->action, status, "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
- status = F_status_set_error(status);
+ controller_print_error_rule(&main->program.error, cache->action, state.status, "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
+ state.status = F_status_set_error(state.status);
if (F_status_is_error_not(status_return)) {
- status_return = status;
+ status_return = state.status;
}
}
}
if ((main->setting.flag & controller_main_flag_simulate_e) || main->program.error.verbosity == f_console_verbosity_verbose_e) {
cache->action.generic.used = 0;
- status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[0], &cache->action.generic);
+ state.status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[0], &cache->action.generic);
- if (F_status_is_error(status)) {
+ if (F_status_is_error(state.status)) {
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &main->setting.state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &state);
cache->action.line_action = ++cache->action.line_item;
controller_lock_print(main->program.error.to, &main->thread);
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(state.status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
controller_print_error_rule_cache(&main->program.error, cache->action, F_false);
controller_unlock_print_flush(main->program.error.to, &main->thread);
- if (F_status_set_fine(status) == F_memory_not) {
- status_return = status;
+ if (F_status_set_fine(state.status) == F_memory_not) {
+ status_return = state.status;
break;
}
}
}
- if (F_status_is_error_not(status)) {
+ if (F_status_is_error_not(state.status)) {
controller_print_error_rule_setting_value(main, controller_nice_s, f_string_empty_s, cache->action.generic, 0);
}
}
else if (type == controller_rule_setting_type_user_e) {
uid_t number = 0;
- status = controller_convert_user_id(cache, cache->buffer_item, cache->content_actions.array[i].array[0], &number);
+ state.status = controller_convert_user_id(cache, cache->buffer_item, cache->content_actions.array[i].array[0], &number);
- if (F_status_is_error(status)) {
- status = F_status_set_fine(status);
+ if (F_status_is_error(state.status)) {
+ state.status = F_status_set_fine(state.status);
- if (status == F_exist_not) {
+ if (state.status == F_exist_not) {
controller_print_error_rule_setting_with_range(&main->program.error, " has an invalid user", cache->content_actions.array[i].array[0], ", because no user was found by that name", i, line_item, &main->thread, cache);
}
- else if (status == F_number_too_large) {
+ else if (state.status == F_number_too_large) {
controller_print_error_rule_setting_with_range(&main->program.error, " has an invalid user", cache->content_actions.array[i].array[0], ", because the given ID is too large", i, line_item, &main->thread, cache);
}
- else if (status == F_number) {
+ else if (state.status == F_number) {
controller_print_error_rule_setting_with_range(&main->program.error, " has an invalid user", cache->content_actions.array[i].array[0], ", because the given ID is not a valid supported number", i, line_item, &main->thread, cache);
}
else {
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &main->setting.state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &state);
cache->action.line_action = ++cache->action.line_item;
- controller_print_error_rule(&main->program.error, cache->action, status, "controller_convert_user_id", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, state.status, "controller_convert_user_id", F_true, F_false);
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
}
if (F_status_is_error_not(status_return)) {
- status_return = F_status_set_error(status);
+ status_return = F_status_set_error(state.status);
}
}
else {
if (main->program.error.verbosity == f_console_verbosity_debug_e || (main->program.error.verbosity == f_console_verbosity_verbose_e && (main->setting.flag & controller_main_flag_simulate_e))) {
cache->action.generic.used = 0;
- status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[0], &cache->action.generic);
+ state.status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[0], &cache->action.generic);
controller_print_error_rule_setting_value(main, controller_user_s, f_string_empty_s, cache->action.generic, 0);
}
for (j = 0; j < cache->content_actions.array[i].used; ++j) {
- status = f_memory_array_increase(controller_allocation_small_d, sizeof(f_int32s_t), (void **) &rule->groups.array, &rule->groups.used, &rule->groups.size);
+ 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(status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_memory_array_increase", F_true, F_false);
+ if (F_status_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);
- if (F_status_set_fine(status) == F_memory_not) {
- status_return = status;
+ if (F_status_set_fine(state.status) == F_memory_not) {
+ status_return = state.status;
break;
}
if (F_status_is_error_not(status_return)) {
- status_return = status;
+ status_return = state.status;
}
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &main->setting.state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &state);
cache->action.line_action = ++cache->action.line_item;
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
continue;
}
- status = controller_convert_group_id(cache, cache->buffer_item, cache->content_actions.array[i].array[j], &number);
+ state.status = controller_convert_group_id(cache, cache->buffer_item, cache->content_actions.array[i].array[j], &number);
- if (F_status_is_error(status)) {
- status = F_status_set_fine(status);
+ if (F_status_is_error(state.status)) {
+ state.status = F_status_set_fine(state.status);
- if (status == F_exist_not) {
+ if (state.status == F_exist_not) {
controller_print_error_rule_setting_with_range(&main->program.error, " has an invalid group", cache->content_actions.array[i].array[j], ", because no group was found by that name", i, line_item, &main->thread, cache);
}
- else if (status == F_number_too_large) {
+ else if (state.status == F_number_too_large) {
controller_print_error_rule_setting_with_range(&main->program.error, " has an invalid group", cache->content_actions.array[i].array[j], ", because the given ID is too large", i, line_item, &main->thread, cache);
}
- else if (status == F_number) {
+ else if (state.status == F_number) {
controller_print_error_rule_setting_with_range(&main->program.error, " has an invalid group", cache->content_actions.array[i].array[j], ", because the given ID is not a valid supported number", i, line_item, &main->thread, cache);
}
else {
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &main->setting.state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &state);
cache->action.line_action = ++cache->action.line_item;
- controller_print_error_rule(&main->program.error, cache->action, status, "f_account_group_id_by_name", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, state.status, "f_account_group_id_by_name", F_true, F_false);
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
}
if (F_status_is_error_not(status_return)) {
- status_return = F_status_set_error(status);
+ status_return = F_status_set_error(state.status);
}
}
else {
for (j = 0; j < cache->content_actions.array[i].used; ++j) {
- status = f_memory_array_increase(controller_allocation_small_d, sizeof(f_string_dynamic_t), (void **) &setting_values->array, &setting_values->used, &setting_values->size);
+ 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(status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_memory_array_increase", F_true, F_false);
+ if (F_status_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);
- if (F_status_set_fine(status) == F_memory_not) {
- status_return = status;
+ if (F_status_set_fine(state.status) == F_memory_not) {
+ status_return = state.status;
break;
}
if (F_status_is_error_not(status_return)) {
- status_return = status;
+ status_return = state.status;
}
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &main->setting.state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &state);
cache->action.line_action = ++cache->action.line_item;
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
continue;
}
setting_values->array[setting_values->used].used = 0;
- status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[j], &setting_values->array[setting_values->used]);
+ 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(status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ if (F_status_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);
setting_values->array[setting_values->used].used = 0;
- if (F_status_set_fine(status) == F_memory_not) {
- status_return = status;
+ if (F_status_set_fine(state.status) == F_memory_not) {
+ status_return = state.status;
break;
}
if (F_status_is_error_not(status_return)) {
- status_return = status;
+ status_return = state.status;
}
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &main->setting.state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &state);
cache->action.line_action = ++cache->action.line_item;
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
continue;
}
- status = controller_validate_environment_name(setting_values->array[setting_values->used]);
+ state.status = controller_validate_environment_name(setting_values->array[setting_values->used]);
- if (status == F_false || F_status_set_fine(status) == F_complete_not_utf) {
+ if (state.status == F_false || F_status_set_fine(state.status) == F_complete_not_utf) {
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &main->setting.state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &state);
cache->action.line_action = ++cache->action.line_item;
- if (status == F_false) {
+ if (state.status == F_false) {
if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
controller_lock_print(main->program.error.to, &main->thread);
controller_print_error_rule(&main->program.error, cache->action, F_complete_not_utf, "controller_validate_environment_name", F_true, F_false);
if (F_status_is_error_not(status_return)) {
- status_return = status;
+ status_return = state.status;
}
}
setting_values->array[setting_values->used].used = 0;
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
continue;
}
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &main->setting.state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &state);
cache->action.line_action = ++cache->action.line_item;
} // for
if (j == rule->ons.used) {
- status = f_memory_array_increase(controller_allocation_small_d, sizeof(controller_rule_on_t), (void **) &rule->ons.array, &rule->ons.used, &rule->ons.size);
+ state.status = f_memory_array_increase(controller_allocation_small_d, sizeof(controller_rule_on_t), (void **) &rule->ons.array, &rule->ons.used, &rule->ons.size);
}
- if (F_status_is_error(status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), macro_controller_f(f_memory_array_increase), F_true, F_false);
+ if (F_status_is_error(state.status)) {
+ controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(state.status), macro_controller_f(f_memory_array_increase), F_true, F_false);
}
else {
if (f_compare_dynamic_partial_string(controller_need_s.string, cache->buffer_item, controller_need_s.used, cache->content_actions.array[i].array[1]) == F_equal_to) {
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &main->setting.state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &state);
cache->action.line_action = ++cache->action.line_item;
continue;
}
- status = f_memory_array_increase(controller_allocation_small_d, sizeof(f_string_dynamic_t), (void **) &setting_values->array, &setting_values->used, &setting_values->size);
+ 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(status)) {
- controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(status), macro_controller_f(f_memory_array_increase), F_true, F_false);
+ if (F_status_is_error(state.status)) {
+ controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(state.status), macro_controller_f(f_memory_array_increase), F_true, F_false);
}
}
- if (F_status_is_error(status)) {
- if (F_status_set_fine(status) == F_memory_not) {
- status_return = status;
+ if (F_status_is_error(state.status)) {
+ if (F_status_set_fine(state.status) == F_memory_not) {
+ status_return = state.status;
break;
}
if (F_status_is_error_not(status_return)) {
- status_return = status;
+ status_return = state.status;
}
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &main->setting.state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &state);
cache->action.line_action = ++cache->action.line_item;
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
continue;
}
- status = controller_rule_id_construct(main, cache->buffer_item, cache->content_actions.array[i].array[2], cache->content_actions.array[i].array[3], &setting_values->array[setting_values->used]);
+ state.status = controller_rule_id_construct(main, cache->buffer_item, cache->content_actions.array[i].array[2], cache->content_actions.array[i].array[3], &setting_values->array[setting_values->used]);
- if (F_status_is_error(status)) {
+ if (F_status_is_error(state.status)) {
setting_values->array[setting_values->used].used = 0;
- if (F_status_set_fine(status) == F_memory_not) {
- status_return = status;
+ if (F_status_set_fine(state.status) == F_memory_not) {
+ status_return = state.status;
break;
}
if (F_status_is_error_not(status_return)) {
- status_return = status;
+ status_return = state.status;
}
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &main->setting.state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &state);
cache->action.line_action = ++cache->action.line_item;
- controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(status));
+ controller_print_error_rule_item(&main->program.error, cache->action, F_false, F_status_set_fine(state.status));
continue;
}
cache->buffer_path.used = 0;
- status = f_file_name_base(setting_values->array[setting_values->used], &cache->buffer_path);
+ state.status = f_file_name_base(setting_values->array[setting_values->used], &cache->buffer_path);
- if (F_status_is_error(status)) {
+ 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(status), "f_file_name_base", F_true, F_false);
+ controller_print_error_rule(&main->program.error, cache->action, F_status_set_fine(state.status), "f_file_name_base", F_true, F_false);
- if (F_status_set_fine(status) == F_memory_not) {
- status_return = status;
+ if (F_status_set_fine(state.status) == F_memory_not) {
+ status_return = state.status;
break;
}
if (F_status_is_error_not(status_return)) {
- status_return = status;
+ status_return = state.status;
}
continue;
* @see controller_path_canonical_relative()
*/
#ifndef _di_controller_rule_setting_read_
- extern f_status_t controller_rule_setting_read(controller_t * const main, controller_cache_t * const cache, const bool is_normal, controller_rule_t * const rule);
+ extern f_status_t controller_rule_setting_read(controller_t * const main, controller_cache_t * const cache, const uint8_t is_normal, controller_rule_t * const rule);
#endif // _di_controller_rule_setting_read_
#ifdef __cplusplus