#ifndef _di_controller_control_delete_
f_status_t controller_control_delete(controller_control_t * const control) {
- if (!main) return F_status_set_error(F_parameter);
+ if (!control) return F_status_set_error(F_parameter);
f_memory_array_resize(0, sizeof(f_char_t), (void **) &control->cache_1.string, &control->cache_1.used, &control->cache_1.size);
f_memory_array_resize(0, sizeof(f_char_t), (void **) &control->cache_2.string, &control->cache_2.used, &control->cache_2.size);
#ifndef _di_controller_control_payload_type_identify_
uint8_t controller_control_payload_type_identify(const f_string_static_t payload) {
- if (f_compare_dynamic(payload, controller_controller_s) == F_equal_to) {
- return controller_control_payload_type_controller_e;
- }
-
- if (f_compare_dynamic(payload, controller_error_s) == F_equal_to) {
- return controller_control_payload_type_error_e;
- }
-
- if (f_compare_dynamic(payload, controller_init_s) == F_equal_to) {
- return controller_control_payload_type_init_e;
- }
+ if (f_compare_dynamic(payload, controller_controller_s) == F_equal_to) return controller_control_payload_type_controller_e;
+ if (f_compare_dynamic(payload, controller_error_s) == F_equal_to) return controller_control_payload_type_error_e;
+ if (f_compare_dynamic(payload, controller_init_s) == F_equal_to) return controller_control_payload_type_init_e;
return 0;
}
#ifndef _di_controller_entry_action_type_identify_
uint8_t controller_entry_action_type_identify(const f_string_static_t action) {
- if (f_compare_dynamic(action, controller_consider_s) == F_equal_to) {
- return controller_entry_action_type_consider_e;
- }
-
- if (f_compare_dynamic(action, controller_execute_s) == F_equal_to) {
- return controller_entry_action_type_execute_e;
- }
-
- if (f_compare_dynamic(action, controller_failsafe_s) == F_equal_to) {
- return controller_entry_action_type_failsafe_e;
- }
-
- if (f_compare_dynamic(action, controller_freeze_s) == F_equal_to) {
- return controller_entry_action_type_freeze_e;
- }
-
- if (f_compare_dynamic(action, controller_item_s) == F_equal_to) {
- return controller_entry_action_type_item_e;
- }
-
- if (f_compare_dynamic(action, controller_kexec_s) == F_equal_to) {
- return controller_entry_action_type_kexec_e;
- }
-
- if (f_compare_dynamic(action, controller_kill_s) == F_equal_to) {
- return controller_entry_action_type_kill_e;
- }
-
- if (f_compare_dynamic(action, controller_pause_s) == F_equal_to) {
- return controller_entry_action_type_pause_e;
- }
-
- if (f_compare_dynamic(action, controller_ready_s) == F_equal_to) {
- return controller_entry_action_type_ready_e;
- }
-
- if (f_compare_dynamic(action, controller_reboot_s) == F_equal_to) {
- return controller_entry_action_type_reboot_e;
- }
-
- if (f_compare_dynamic(action, controller_reload_s) == F_equal_to) {
- return controller_entry_action_type_reload_e;
- }
-
- if (f_compare_dynamic(action, controller_restart_s) == F_equal_to) {
- return controller_entry_action_type_restart_e;
- }
-
- if (f_compare_dynamic(action, controller_resume_s) == F_equal_to) {
- return controller_entry_action_type_resume_e;
- }
-
- if (f_compare_dynamic(action, controller_shutdown_s) == F_equal_to) {
- return controller_entry_action_type_shutdown_e;
- }
-
- if (f_compare_dynamic(action, controller_start_s) == F_equal_to) {
- return controller_entry_action_type_start_e;
- }
-
- if (f_compare_dynamic(action, controller_stop_s) == F_equal_to) {
- return controller_entry_action_type_stop_e;
- }
-
- if (f_compare_dynamic(action, controller_thaw_s) == F_equal_to) {
- return controller_entry_action_type_thaw_e;
- }
-
- if (f_compare_dynamic(action, controller_timeout_s) == F_equal_to) {
- return controller_entry_action_type_timeout_e;
- }
+ if (f_compare_dynamic(action, controller_consider_s) == F_equal_to) return controller_entry_action_type_consider_e;
+ if (f_compare_dynamic(action, controller_execute_s) == F_equal_to) return controller_entry_action_type_execute_e;
+ if (f_compare_dynamic(action, controller_failsafe_s) == F_equal_to) return controller_entry_action_type_failsafe_e;
+ if (f_compare_dynamic(action, controller_freeze_s) == F_equal_to) return controller_entry_action_type_freeze_e;
+ if (f_compare_dynamic(action, controller_item_s) == F_equal_to) return controller_entry_action_type_item_e;
+ if (f_compare_dynamic(action, controller_kexec_s) == F_equal_to) return controller_entry_action_type_kexec_e;
+ if (f_compare_dynamic(action, controller_kill_s) == F_equal_to) return controller_entry_action_type_kill_e;
+ if (f_compare_dynamic(action, controller_pause_s) == F_equal_to) return controller_entry_action_type_pause_e;
+ if (f_compare_dynamic(action, controller_ready_s) == F_equal_to) return controller_entry_action_type_ready_e;
+ if (f_compare_dynamic(action, controller_reboot_s) == F_equal_to) return controller_entry_action_type_reboot_e;
+ if (f_compare_dynamic(action, controller_reload_s) == F_equal_to) return controller_entry_action_type_reload_e;
+ if (f_compare_dynamic(action, controller_restart_s) == F_equal_to) return controller_entry_action_type_restart_e;
+ if (f_compare_dynamic(action, controller_resume_s) == F_equal_to) return controller_entry_action_type_resume_e;
+ if (f_compare_dynamic(action, controller_shutdown_s) == F_equal_to) return controller_entry_action_type_shutdown_e;
+ if (f_compare_dynamic(action, controller_start_s) == F_equal_to) return controller_entry_action_type_start_e;
+ if (f_compare_dynamic(action, controller_stop_s) == F_equal_to) return controller_entry_action_type_stop_e;
+ if (f_compare_dynamic(action, controller_thaw_s) == F_equal_to) return controller_entry_action_type_thaw_e;
+ if (f_compare_dynamic(action, controller_timeout_s) == F_equal_to) return controller_entry_action_type_timeout_e;
return 0;
}
controller_control_delete(&process->control);
- status = f_memory_arrays_resize(0, sizeof(f_string_map_t), (void **) &process->entry.define.array, &process->entry.define.used, &process->entry.define.size, &f_string_maps_delete_callback);
- status = f_memory_arrays_resize(0, sizeof(f_string_map_t), (void **) &process->entry.parameter.array, &process->entry.parameter.used, &process->entry.parameter.size, &f_string_maps_delete_callback);
- status = f_memory_arrays_resize(0, sizeof(f_string_map_t), (void **) &process->exit.define.array, &process->exit.define.used, &process->exit.define.size, &f_string_maps_delete_callback);
- status = f_memory_arrays_resize(0, sizeof(f_string_map_t), (void **) &process->exit.parameter.array, &process->exit.parameter.used, &process->exit.parameter.size, &f_string_maps_delete_callback);
+ f_memory_arrays_resize(0, sizeof(f_string_map_t), (void **) &process->entry.define.array, &process->entry.define.used, &process->entry.define.size, &f_string_maps_delete_callback);
+ f_memory_arrays_resize(0, sizeof(f_string_map_t), (void **) &process->entry.parameter.array, &process->entry.parameter.used, &process->entry.parameter.size, &f_string_maps_delete_callback);
+ f_memory_arrays_resize(0, sizeof(f_string_map_t), (void **) &process->exit.define.array, &process->exit.define.used, &process->exit.define.size, &f_string_maps_delete_callback);
+ f_memory_arrays_resize(0, sizeof(f_string_map_t), (void **) &process->exit.parameter.array, &process->exit.parameter.used, &process->exit.parameter.size, &f_string_maps_delete_callback);
controller_entry_items_delete(&process->entry.items);
controller_entry_items_delete(&process->exit.items);
- controller_rules_delete_simple(&process->rules);
+ controller_rules_delete(&process->rules);
return F_okay;
}
#endif // _di_controller_setting_delete_
#ifndef _di_controller_setting_load_
- f_status_t controller_setting_load(const f_console_arguments_t arguments, fll_program_data_t * const main) {
+ void controller_setting_load(const f_console_arguments_t arguments, controller_main_t * const main) {
- if (!main) return F_status_set_error(F_parameter);
+ if (!main) return;
main->setting.state.step_small = controller_allocation_console_d;
fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), "f_console_parameter_process", fll_error_file_flag_fallback_e);
if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.error);
+ fll_print_dynamic_raw(f_string_eol_s, main->program.error.to);
}
return;
fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), "fll_program_parameter_process_context_standard", fll_error_file_flag_fallback_e);
if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.error);
+ fll_print_dynamic_raw(f_string_eol_s, main->program.error.to);
}
return;
fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), "fll_program_parameter_process_verbosity_standard", fll_error_file_flag_fallback_e);
if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.error);
+ fll_print_dynamic_raw(f_string_eol_s, main->program.error.to);
}
return;
f_string_static_t * const args = main->program.parameters.arguments.array;
- if (main->program.parameters.array[controller_parameter_strip_invalid_e].result & f_console_result_found_e) {
- main->setting.flag |= controller_main_flag_strip_invalid_e;
+ if (main->process) {
+ main->process->control.server.address = main->process->control.address; // @fixme is this actually f_socket_address_t?
+ main->process->control.server.domain = f_socket_protocol_family_local_e;
+ main->process->control.server.type = f_socket_type_stream_e;
+ main->process->control.server.length = sizeof(struct sockaddr_un);
+
+ memset(&main->process->control.server.address, 0, main->process->control.server.length);
+
+ if (main->program.parameters.remaining.used) {
+ main->setting.state.status = f_string_dynamic_append(arguments.argv[main->program.parameters.remaining.array[0]], &main->process->name_entry);
+ }
+ else {
+ main->setting.state.status = f_string_dynamic_append(controller_default_s, &main->process->name_entry);
+ }
+
+ if (F_status_is_error(main->setting.state.status)) {
+ fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), "f_string_dynamic_append", fll_error_file_flag_fallback_e);
+
+ return;
+ }
+
+ if (main->program.parameters.array[controller_parameter_init_e].result & f_console_result_found_e) {
+ main->setting.flag |= controller_main_flag_init_e;
+ }
+
+ if (main->setting.flag & controller_main_flag_init_e) {
+ main->process->mode = controller_setting_mode_service_e;
+ }
}
- return F_okay;
+ main->setting.state.status = F_okay;
}
#endif // _di_controller_setting_load_
const f_string_static_t controller_rule_action_method_string_extended_list_s = macro_f_string_static_t_initialize_1(CONTROLLER_rule_action_method_string_extended_list_s, 0, CONTROLLER_rule_action_method_string_extended_list_s_length);
#endif // _di_controller_rule_action_t_
-#ifndef _di_controller_rule_action_delete_simple_
- f_status_t controller_rule_action_delete_simple(controller_rule_action_t * const action) {
+#ifndef _di_controller_rule_action_delete_
+ void controller_rule_action_delete(controller_rule_action_t * const action) {
- if (!action) return F_status_set_error(F_parameter);
+ if (!action) return;
f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &action->parameters.array, &action->parameters.used, &action->parameters.size, &f_string_dynamics_delete_callback);
f_memory_array_resize(0, sizeof(f_iki_data_t), (void **) &action->ikis.array, &action->ikis.used, &action->ikis.size);
-
- return F_okay;
}
-#endif // _di_controller_rule_action_delete_simple_
+#endif // _di_controller_rule_action_delete_
-#ifndef _di_controller_rule_actions_delete_simple_
- f_status_t controller_rule_actions_delete_simple(controller_rule_actions_t * const actions) {
+#ifndef _di_controller_rule_actions_delete_
+ void controller_rule_actions_delete(controller_rule_actions_t * const actions) {
- if (!actions) return F_status_set_error(F_parameter);
+ if (!actions) return;
actions->used = actions->size;
while (actions->used) {
- controller_rule_action_delete_simple(&actions->array[--actions->used]);
+ controller_rule_action_delete(&actions->array[--actions->used]);
} // while
f_memory_delete(actions->size, sizeof(controller_rule_action_t), (void **) & actions->array);
actions->size = 0;
-
- return F_okay;
}
-#endif // _di_controller_rule_actions_delete_simple_
+#endif // _di_controller_rule_actions_delete_
#ifndef _di_controller_rule_actions_increase_by_
f_status_t controller_rule_actions_increase_by(const f_number_unsigned_t amount, controller_rule_actions_t * const actions) {
#endif // _di_controller_rule_actions_increase_by_
#ifndef _di_controller_rule_delete_
- f_status_t controller_rule_delete(controller_rule_t * const rule) {
+ void controller_rule_delete(controller_rule_t * const rule) {
if (!rule) return F_status_set_error(F_parameter);
controller_rule_ons_delete(&rule->ons);
controller_rule_items_delete(&rule->items);
-
- return F_okay;
}
#endif // _di_controller_rule_delete_
#ifndef _di_controller_rule_item_delete_
- f_status_t controller_rule_item_delete(controller_rule_item_t * const item) {
+ void controller_rule_item_delete(controller_rule_item_t * const item) {
- if (!item) return F_status_set_error(F_parameter);
+ if (!item) return;
f_memory_array_resize(0, sizeof(f_char_t), (void **) &item->pid_file.string, &item->pid_file.used, &item->pid_file.size);
controller_rule_actions_delete(&item->actions);
-
- return F_okay;
}
#endif // _di_controller_rule_item_delete_
#ifndef _di_controller_rule_items_delete_
- f_status_t controller_rule_items_delete(controller_rule_items_t * const items) {
+ void controller_rule_items_delete(controller_rule_items_t * const items) {
- if (!items) return F_status_set_error(F_parameter);
+ if (!items) return;
items->used = items->size;
f_memory_delete(items->size, sizeof(controller_rule_item_t), (void **) & items->array);
items->size = 0;
-
- return F_okay;
}
#endif // _di_controller_rule_items_delete_
#ifndef _di_controller_rule_on_delete_
- f_status_t controller_rule_on_delete(controller_rule_on_t * const on) {
+ void controller_rule_on_delete(controller_rule_on_t * const on) {
- if (!on) return F_status_set_error(F_parameter);
+ if (!on) return;
f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &on->need.array, &on->need.used, &on->need.size, &f_string_dynamics_delete_callback);
f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &on->want.array, &on->want.used, &on->want.size, &f_string_dynamics_delete_callback);
f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &on->wish.array, &on->wish.used, &on->wish.size, &f_string_dynamics_delete_callback);
-
- return F_okay;
}
#endif // _di_controller_rule_on_delete_
#ifndef _di_controller_rule_ons_delete_
- f_status_t controller_rule_ons_delete(controller_rule_ons_t * const ons) {
+ void controller_rule_ons_delete(controller_rule_ons_t * const ons) {
- if (!ons) return F_status_set_error(F_parameter);
+ if (!ons) return;
ons->used = ons->size;
f_memory_delete(ons->size, sizeof(controller_rule_on_t), (void **) & ons->array);
ons->size = 0;
-
- return F_okay;
}
#endif // _di_controller_rule_ons_delete_
#endif // _di_controller_rule_ons_resize_
#ifndef _di_controller_rules_delete_
- f_status_t controller_rules_delete(controller_rules_t * const rules) {
+ void controller_rules_delete(controller_rules_t * const rules) {
- if (!rules) return F_status_set_error(F_parameter);
+ if (!rules) return;
controller_rules_resize(0, rules);
-
- return F_okay;
}
#endif // _di_controller_rules_delete_
* Flags passed to the main function or program.
*
* controller_main_flag_*_e:
- * - none: No flags set.
- * - copyright: Print copyright.
- * - file_from: Using a specified source file.
- * - file_to: Using a specified destination file.
- * - header: Enable printing of headers.
- * - help: Print help.
- * - init: Operate as an "init" program.
- * - print_first: When set, print new line to message output on program begin after loading settings.
- * - print_last: When set, print new line to message output on program end.
- * - separate: Enable printing of separators.
- * - strip_invalid: Using strip invalid character mode.
- * - verify: Using verify mode.
- * - version: Print version.
+ * - none: No flags set.
+ * - copyright: Print copyright.
+ * - file_from: Using a specified source file.
+ * - file_to: Using a specified destination file.
+ * - header: Enable printing of headers.
+ * - help: Print help.
+ * - init: Operate as an "init" program.
+ * - print_first: When set, print new line to message output on program begin after loading settings.
+ * - print_last: When set, print new line to message output on program end.
+ * - separate: Enable printing of separators.
+ * - strip_invalid: Using strip invalid character mode.
+ * - verify: Using verify mode.
+ * - version: Print version.
+ * - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set.
*/
#ifndef _di_controller_main_flag_e_
enum {
- controller_main_flag_none_e = 0x0,
- controller_main_flag_copyright_e = 0x1,
- controller_main_flag_file_from_e = 0x2,
- controller_main_flag_file_to_e = 0x4,
- controller_main_flag_header_e = 0x8,
- controller_main_flag_help_e = 0x10,
- controller_main_flag_init_e = 0x20,
- controller_main_flag_print_first_e = 0x40,
- controller_main_flag_print_last_e = 0x80,
- controller_main_flag_separate_e = 0x100,
- controller_main_flag_strip_invalid_e = 0x200,
- controller_main_flag_verify_e = 0x400,
- controller_main_flag_version_e = 0x800,
+ controller_main_flag_none_e = 0x0,
+ controller_main_flag_copyright_e = 0x1,
+ controller_main_flag_file_from_e = 0x2,
+ controller_main_flag_file_to_e = 0x4,
+ controller_main_flag_header_e = 0x8,
+ controller_main_flag_help_e = 0x10,
+ controller_main_flag_init_e = 0x20,
+ controller_main_flag_print_first_e = 0x40,
+ controller_main_flag_print_last_e = 0x80,
+ controller_main_flag_separate_e = 0x100,
+ controller_main_flag_strip_invalid_e = 0x200,
+ controller_main_flag_verify_e = 0x400,
+ controller_main_flag_version_e = 0x800,
+ controller_main_flag_version_copyright_help_e = 0x811,
}; // enum
#endif // _di_controller_main_flag_e_
* @see fll_program_parameter_process_context()
*/
#ifndef _di_controller_setting_load_
- extern f_status_t controller_setting_load(const f_console_arguments_t arguments, fll_program_data_t * const main);
+ extern void controller_setting_load(const f_console_arguments_t arguments, controller_main_t * const main);
#endif // _di_controller_setting_load_
/**
}
#endif // _di_controller_pids_resize_
-#ifndef _di_controller_process_delete_simple_
- void controller_process_delete_simple(controller_data_t * const process) {
+#ifndef _di_controller_data_delete_simple_
+ void controller_data_delete_simple(controller_data_t * const data) {
- if (process->id_thread) {
- f_thread_signal_write(process->id_thread, F_signal_kill);
- f_thread_join(process->id_thread, 0);
+ if (data->id_thread) {
+ f_thread_signal_write(data->id_thread, F_signal_kill);
+ f_thread_join(data->id_thread, 0);
- process->id_thread = 0;
+ data->id_thread = 0;
}
- f_thread_condition_delete(&process->wait);
+ f_thread_condition_delete(&data->wait);
- controller_lock_delete_rw(&process->lock);
- controller_lock_delete_rw(&process->active);
- controller_lock_delete_mutex(&process->wait_lock);
+ controller_lock_delete_rw(&data->lock);
+ controller_lock_delete_rw(&data->active);
+ controller_lock_delete_mutex(&data->wait_lock);
- controller_cache_delete_simple(&process->cache);
- controller_pids_resize(0, &process->childs);
- controller_rule_delete_simple(&process->rule);
+ controller_cache_delete_simple(&data->cache);
+ controller_pids_resize(0, &data->childs);
+ controller_rule_delete(&data->rule);
- f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &process->path_pids.array, &process->path_pids.used, &process->path_pids.size, &f_string_dynamics_delete_callback);
+ f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &data->path_pids.array, &data->path_pids.used, &data->path_pids.size, &f_string_dynamics_delete_callback);
- f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &process->stack.array, &process->stack.used, &process->stack.size);
+ f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &data->stack.array, &data->stack.used, &data->stack.size);
}
-#endif // _di_controller_process_delete_simple_
+#endif // _di_controller_data_delete_simple_
#ifndef _di_controller_processs_delete_simple_
void controller_processs_delete_simple(controller_processs_t * const processs) {
for (f_number_unsigned_t i = length; i < processs->size; ++i) {
if (processs->array[i]) {
- controller_process_delete_simple(processs->array[i]);
+ controller_data_delete_simple(processs->array[i]);
f_memory_delete(1, sizeof(f_number_unsigned_t *), (void **) & processs->array[i]);
}
/**
* Fully deallocate all memory for the given process without caring about return status.
*
- * @param process
- * The process to deallocate.
+ * @param data
+ * The data to deallocate.
*
* @see f_memory_array_resize()
* @see f_thread_condition_delete()
* @see f_thread_mutex_delete()
*/
-#ifndef _di_controller_process_delete_simple_
- extern void controller_process_delete_simple(controller_data_t * const process) F_attribute_visibility_internal_d;
-#endif // _di_controller_process_delete_simple_
+#ifndef _di_controller_data_delete_simple_
+ extern void controller_data_delete_simple(controller_data_t * const data) F_attribute_visibility_internal_d;
+#endif // _di_controller_data_delete_simple_
/**
* Fully deallocate all memory for the given processs without caring about return status.
* @return
* F_okay on success.
*
- * Errors (with error bit) from: controller_process_delete_simple().
+ * Errors (with error bit) from: controller_data_delete_simple().
* Errors (with error bit) from: f_memory_resize().
* Errors (with error bit) from: f_thread_condition_create().
* Errors (with error bit) from: f_thread_lock_create().
*
- * @see controller_process_delete_simple()
+ * @see controller_data_delete_simple()
* @see f_memory_resize()
* @see f_thread_condition_create()
* @see f_thread_lock_create()
#ifndef _di_controller_main_
void controller_main(controller_main_t * const main) {
- if (F_status_is_error(status)) return;
+ if (F_status_is_error(main->setting.state.status)) return;
if ((main->setting.flag & controller_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
return;
}
- if ((main->setting.flag & controller_main_flag_operation_build_e) && (main->setting.flag & controller_main_flag_operation_make_e)) {
- main->setting.state.status = F_status_set_error(F_parameter);
+ f_string_static_t * const argv = main->program.parameters.arguments.array;
- controller_print_error_parameter_operation_not_with(&main->program.error, controller_other_operation_build_s, controller_other_operation_make_s);
+ main->setting.state.status = f_path_current(F_false, &main->process->path_current);
- if ((main->setting.flag & controller_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
- return;
- }
-
- f_string_static_t * const argv = main->parameters.arguments.array;
-
- controller_process_t process = controller_process_t_initialize;
-
- process.control.server.address = (struct sockaddr *) &process.control.address;
- process.control.server.domain = f_socket_protocol_family_local_e;
- process.control.server.type = f_socket_type_stream_d;
- process.control.server.length = sizeof(struct sockaddr_un);
-
- memset(process.control.server.address, 0, process.control.server.length);
-
- if (main->parameters.remaining.used) {
- status = f_string_dynamic_append(argv[main->parameters.remaining.array[0]], &process.name_entry);
- }
- else {
- status = f_string_dynamic_append(controller_default_s, &process.name_entry);
- }
-
- if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_append", fll_error_file_flag_fallback_e);
-
- return status;
- }
-
- if (main->parameters.array[controller_parameter_init_e].result & f_console_result_found_e) {
- main->as_init = F_true;
- }
-
- if (main->as_init) {
- process.mode = controller_setting_mode_service_e;
- }
-
- status = f_path_current(F_false, &process.path_current);
-
- if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "f_path_current", fll_error_file_flag_fallback_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), "f_path_current", fll_error_file_flag_fallback_e);
}
else {
- if (main->parameters.array[controller_parameter_settings_e].result & f_console_result_found_e) {
- if (main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(main->error.to, 0);
+ if (main->program.parameters.array[controller_parameter_settings_e].result & f_console_result_found_e) {
+ if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(main->program.error.to, 0);
- fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format(f_string_format_rr_single_s.string, main->error.to, main->context.set.notable, f_console_symbol_long_normal_s, controller_long_settings_s, main->context.set.notable);
- fl_print_format("%[' is specified, but no value is given.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QThe parameter '%]", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, main->program.error.context);
+ fl_print_format(f_string_format_rr_single_s.string, main->program.error.to, main->program.context.set.notable, f_console_symbol_long_normal_s, controller_long_settings_s, main->program.context.set.notable);
+ fl_print_format("%[' is specified, but no value is given.%]%r", main->program.error.to, main->program.error.context, main->program.error.context, f_string_eol_s);
- controller_unlock_print_flush(main->error.to, 0);
+ controller_unlock_print_flush(main->program.error.to, 0);
}
- status = F_status_set_error(F_parameter);
+ main->setting.state.status = F_status_set_error(F_parameter);
}
- else if (main->parameters.array[controller_parameter_settings_e].locations.used) {
- const f_number_unsigned_t index = main->parameters.array[controller_parameter_settings_e].values.array[main->parameters.array[controller_parameter_settings_e].values.used - 1];
+ else if (main->program.parameters.array[controller_parameter_settings_e].locations.used) {
+ const f_number_unsigned_t index = main->program.parameters.array[controller_parameter_settings_e].values.array[main->program.parameters.array[controller_parameter_settings_e].values.used - 1];
- status = controller_path_canonical_relative(&process, argv[index], &process.path_setting);
+ main->setting.state.status = controller_path_canonical_relative(main->process, argv[index], &main->process->path_setting);
- if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "controller_path_canonical_relative", fll_error_file_flag_fallback_e, argv[index], f_file_operation_verify_s, fll_error_file_type_path_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fll_error_file_print(&main->program.error, F_status_set_fine(main->setting.state.status), "controller_path_canonical_relative", fll_error_file_flag_fallback_e, argv[index], f_file_operation_verify_s, fll_error_file_type_path_e);
}
}
else {
- process.path_setting.used = 0;
+ main->process->path_setting.used = 0;
- if (main->as_init) {
- status = f_string_dynamic_append(*main->default_path_setting_init, &process.path_setting);
+ if (main->setting.flag & controller_main_flag_init_e) {
+ main->setting.state.status = f_string_dynamic_append(*main->setting.default_path_setting_init, &main->process->path_setting);
}
else {
- status = f_string_dynamic_append(*main->default_path_setting, &process.path_setting);
+ main->setting.state.status = f_string_dynamic_append(*main->setting.default_path_setting, &main->process->path_setting);
}
- if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_append", fll_error_file_flag_fallback_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), "f_string_dynamic_append", fll_error_file_flag_fallback_e);
}
}
}
- if (F_status_is_error_not(status)) {
- if (main->parameters.array[controller_parameter_pid_e].result & f_console_result_found_e) {
- if (main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(main->error.to, 0);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ if (main->program.parameters.array[controller_parameter_pid_e].result & f_console_result_found_e) {
+ if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(main->program.error.to, 0);
- fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format(f_string_format_rr_single_s.string, main->error.to, main->context.set.notable, f_console_symbol_long_normal_s, controller_long_pid_s, main->context.set.notable);
- fl_print_format("%[' is specified, but no value is given.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QThe parameter '%]", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, main->program.error.context);
+ fl_print_format(f_string_format_rr_single_s.string, main->program.error.to, main->program.context.set.notable, f_console_symbol_long_normal_s, controller_long_pid_s, main->program.context.set.notable);
+ fl_print_format("%[' is specified, but no value is given.%]%r", main->program.error.to, main->program.error.context, main->program.error.context, f_string_eol_s);
- controller_unlock_print_flush(main->error.to, 0);
+ controller_unlock_print_flush(main->program.error.to, 0);
}
- status = F_status_set_error(F_parameter);
+ main->setting.state.status = F_status_set_error(F_parameter);
}
- else if (main->parameters.array[controller_parameter_pid_e].locations.used) {
- process.path_pid.used = 0;
+ else if (main->program.parameters.array[controller_parameter_pid_e].locations.used) {
+ main->process->path_pid.used = 0;
- const f_number_unsigned_t index = main->parameters.array[controller_parameter_pid_e].values.array[main->parameters.array[controller_parameter_pid_e].values.used - 1];
+ const f_number_unsigned_t index = main->program.parameters.array[controller_parameter_pid_e].values.array[main->program.parameters.array[controller_parameter_pid_e].values.used - 1];
if (argv[index].used) {
- status = controller_path_canonical_relative(&process, argv[index], &process.path_pid);
+ main->setting.state.status = controller_path_canonical_relative(main->process, argv[index], &main->process->path_pid);
- if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "controller_path_canonical_relative", fll_error_file_flag_fallback_e, argv[index], f_file_operation_verify_s, fll_error_file_type_path_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fll_error_file_print(&main->program.error, F_status_set_fine(main->setting.state.status), "controller_path_canonical_relative", fll_error_file_flag_fallback_e, argv[index], f_file_operation_verify_s, fll_error_file_type_path_e);
}
}
}
}
- if (F_status_is_error_not(status) && !process.path_pid.used && !main->parameters.array[controller_parameter_pid_e].locations.used) {
- if (main->as_init) {
- status = f_string_dynamic_append(*main->default_path_pid_init, &process.path_pid);
+ if (F_status_is_error_not(main->setting.state.status) && !main->process->path_pid.used && !main->program.parameters.array[controller_parameter_pid_e].locations.used) {
+ if (main->setting.flag & controller_main_flag_init_e) {
+ main->setting.state.status = f_string_dynamic_append(*main->setting.default_path_pid_init, &main->process->path_pid);
}
else {
- status = f_string_dynamic_append(*main->default_path_pid, &process.path_pid);
+ main->setting.state.status = f_string_dynamic_append(*main->setting.default_path_pid, &main->process->path_pid);
}
- if (F_status_is_error_not(status)) {
- status = f_string_dynamic_append(f_path_separator_s, &process.path_pid);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append(f_path_separator_s, &main->process->path_pid);
}
- if (F_status_is_error_not(status)) {
- status = f_string_dynamic_append(*main->default_path_pid_prefix, &process.path_pid);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append(*main->setting.default_path_pid_prefix, &main->process->path_pid);
}
- if (F_status_is_error_not(status)) {
- status = f_string_dynamic_append(process.name_entry, &process.path_pid);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append(main->process->name_entry, &main->process->path_pid);
}
- if (F_status_is_error_not(status)) {
- status = f_string_dynamic_append(*main->default_path_pid_suffix, &process.path_pid);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append(*main->setting.default_path_pid_suffix, &main->process->path_pid);
}
- if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_append", fll_error_file_flag_fallback_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), "f_string_dynamic_append", fll_error_file_flag_fallback_e);
}
}
- if (F_status_is_error_not(status)) {
- if (main->parameters.array[controller_parameter_cgroup_e].result & f_console_result_found_e) {
- if (main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(main->error.to, 0);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ if (main->program.parameters.array[controller_parameter_cgroup_e].result & f_console_result_found_e) {
+ if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(main->program.error.to, 0);
- fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format(f_string_format_rr_single_s.string, main->error.to, main->context.set.notable, f_console_symbol_long_normal_s, controller_long_cgroup_s, main->context.set.notable);
- fl_print_format("%[' is specified, but no value is given.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QThe parameter '%]", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, main->program.error.context);
+ fl_print_format(f_string_format_rr_single_s.string, main->program.error.to, main->program.context.set.notable, f_console_symbol_long_normal_s, controller_long_cgroup_s, main->program.context.set.notable);
+ fl_print_format("%[' is specified, but no value is given.%]%r", main->program.error.to, main->program.error.context, main->program.error.context, f_string_eol_s);
- controller_unlock_print_flush(main->error.to, 0);
+ controller_unlock_print_flush(main->program.error.to, 0);
}
- status = F_status_set_error(F_parameter);
+ main->setting.state.status = F_status_set_error(F_parameter);
}
- else if (main->parameters.array[controller_parameter_cgroup_e].locations.used) {
- const f_number_unsigned_t index = main->parameters.array[controller_parameter_cgroup_e].values.array[main->parameters.array[controller_parameter_cgroup_e].values.used - 1];
+ else if (main->program.parameters.array[controller_parameter_cgroup_e].locations.used) {
+ const f_number_unsigned_t index = main->program.parameters.array[controller_parameter_cgroup_e].values.array[main->program.parameters.array[controller_parameter_cgroup_e].values.used - 1];
if (argv[index].used) {
- status = controller_path_canonical_relative(&process, argv[index], &process.path_cgroup);
+ main->setting.state.status = controller_path_canonical_relative(main->process, argv[index], &main->process->path_cgroup);
- if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "controller_path_canonical_relative", fll_error_file_flag_fallback_e, argv[index], f_file_operation_verify_s, fll_error_file_type_path_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fll_error_file_print(&main->program.error, F_status_set_fine(main->setting.state.status), "controller_path_canonical_relative", fll_error_file_flag_fallback_e, argv[index], f_file_operation_verify_s, fll_error_file_type_path_e);
}
else {
- status = f_string_append_assure(F_path_separator_s, 1, &process.path_cgroup);
+ main->setting.state.status = f_string_append_assure(F_path_separator_s, 1, &main->process->path_cgroup);
- if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "f_string_append_assure", fll_error_file_flag_fallback_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), "f_string_append_assure", fll_error_file_flag_fallback_e);
}
}
}
else {
- if (main->warning.verbosity == f_console_verbosity_debug_e) {
- controller_lock_print(main->warning.to, 0);
+ if (main->program.warning.verbosity == f_console_verbosity_debug_e) {
+ controller_lock_print(main->program.warning.to, 0);
- fl_print_format("%r%[%QThe parameter '%]", main->warning.to, f_string_eol_s, main->warning.context, main->warning.prefix, main->warning.context);
- fl_print_format(f_string_format_rr_single_s.string, main->warning.to, main->context.set.notable, f_console_symbol_long_normal_s, controller_long_cgroup_s, main->context.set.notable);
- fl_print_format("%[' must be a file directory path but instead is an empty string, falling back to the default.%]%r", main->warning.to, main->warning.context, main->warning.context, f_string_eol_s);
+ fl_print_format("%r%[%QThe parameter '%]", main->program.warning.to, f_string_eol_s, main->program.warning.context, main->program.warning.prefix, main->program.warning.context);
+ fl_print_format(f_string_format_rr_single_s.string, main->program.warning.to, main->program.context.set.notable, f_console_symbol_long_normal_s, controller_long_cgroup_s, main->program.context.set.notable);
+ fl_print_format("%[' must be a file directory path but instead is an empty string, falling back to the default.%]%r", main->program.warning.to, main->program.warning.context, main->program.warning.context, f_string_eol_s);
- controller_unlock_print_flush(main->warning.to, 0);
+ controller_unlock_print_flush(main->program.warning.to, 0);
}
}
}
}
- if (F_status_is_error_not(status) && (main->parameters.array[controller_parameter_daemon_e].result & f_console_result_found_e)) {
- if (main->parameters.array[controller_parameter_validate_e].result & f_console_result_found_e) {
- if (main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(main->error.to, 0);
+ if (F_status_is_error_not(main->setting.state.status) && (main->program.parameters.array[controller_parameter_daemon_e].result & f_console_result_found_e)) {
+ if (main->program.parameters.array[controller_parameter_validate_e].result & f_console_result_found_e) {
+ if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(main->program.error.to, 0);
- fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[' must not be specified with the parameter '%]", main->error.to, main->error.context, main->error.context);
- fl_print_format(f_string_format_rr_single_s.string, main->error.to, main->context.set.notable, f_console_symbol_long_normal_s, controller_long_daemon_s, main->context.set.notable);
- fl_print_format(f_string_format_sentence_end_quote_s.string, main->error.to, main->error.context, main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QThe parameter '%]", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, main->program.error.context);
+ fl_print_format("%[' must not be specified with the parameter '%]", main->program.error.to, main->program.error.context, main->program.error.context);
+ fl_print_format(f_string_format_rr_single_s.string, main->program.error.to, main->program.context.set.notable, f_console_symbol_long_normal_s, controller_long_daemon_s, main->program.context.set.notable);
+ fl_print_format(f_string_format_sentence_end_quote_s.string, main->program.error.to, main->program.error.context, main->program.error.context, f_string_eol_s);
- controller_unlock_print_flush(main->error.to, 0);
+ controller_unlock_print_flush(main->program.error.to, 0);
}
- status = F_status_set_error(F_parameter);
+ main->setting.state.status = F_status_set_error(F_parameter);
}
}
// Handle defaults dependent on the "as init" execution state.
- if (main->as_init) {
- process.entry.pid = controller_entry_pid_disable_e;
- process.entry.show = controller_entry_show_init_e;
+ if (main->setting.flag & controller_main_flag_init_e) {
+ main->process->entry.pid = controller_entry_pid_disable_e;
+ main->process->entry.show = controller_entry_show_init_e;
- if (main->parameters.array[controller_parameter_interruptible_e].result & f_console_result_found_e) {
- process.flag |= controller_setting_flag_interruptible_e;
+ if (main->program.parameters.array[controller_parameter_interruptible_e].result & f_console_result_found_e) {
+ main->process->flag |= controller_setting_flag_interruptible_e;
}
else {
- process.flag &= ~controller_setting_flag_interruptible_e;
+ main->process->flag &= ~controller_setting_flag_interruptible_e;
}
}
else {
- if (main->parameters.array[controller_parameter_uninterruptible_e].result & f_console_result_found_e) {
- process.flag &= ~controller_setting_flag_interruptible_e;
+ if (main->program.parameters.array[controller_parameter_uninterruptible_e].result & f_console_result_found_e) {
+ main->process->flag &= ~controller_setting_flag_interruptible_e;
}
else {
- process.flag |= controller_setting_flag_interruptible_e;
+ main->process->flag |= controller_setting_flag_interruptible_e;
}
}
- if (F_status_is_error_not(status)) {
- f_signal_set_fill(&main->signal.set);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ f_signal_set_fill(&main->program.signal.set);
- status = f_thread_signal_mask(SIG_BLOCK, &main->signal.set, 0);
+ main->setting.state.status = f_thread_signal_mask(SIG_BLOCK, &main->program.signal.set, 0);
- if (F_status_is_error_not(status)) {
- status = f_signal_open(&main->signal);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_signal_open(&main->program.signal);
}
// If there is an error opening a signal descriptor, then do not handle signals.
- if (F_status_is_error(status)) {
- f_signal_mask(SIG_UNBLOCK, &main->signal.set, 0);
- f_signal_close(&main->signal);
+ if (F_status_is_error(main->setting.state.status)) {
+ f_signal_mask(SIG_UNBLOCK, &main->program.signal.set, 0);
+ f_signal_close(&main->program.signal);
}
// A control file path is required.
- if (!process.path_cgroup.used) {
- status = f_string_append_nulless(F_control_group_path_system_prefix_s, F_control_group_path_system_prefix_s_length, &process.path_cgroup);
+ if (!main->process->path_cgroup.used) {
+ main->setting.state.status = f_string_append_nulless(F_control_group_path_system_prefix_s, F_control_group_path_system_prefix_s_length, &main->process->path_cgroup);
- if (F_status_is_error_not(status)) {
- status = f_string_append_nulless(F_control_group_path_system_default_s, F_control_group_path_system_default_s_length, &process.path_cgroup);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_append_nulless(F_control_group_path_system_default_s, F_control_group_path_system_default_s_length, &main->process->path_cgroup);
}
- if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "f_string_append_nulless", fll_error_file_flag_fallback_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), "f_string_append_nulless", fll_error_file_flag_fallback_e);
}
else {
- status = f_string_append_assure(F_path_separator_s, 1, &process.path_cgroup);
+ main->setting.state.status = f_string_append_assure(F_path_separator_s, 1, &main->process->path_cgroup);
- if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "f_string_append_assure", fll_error_file_flag_fallback_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), "f_string_append_assure", fll_error_file_flag_fallback_e);
}
}
}
}
- if (F_status_is_error_not(status)) {
- status = controller_thread_main(main, &process);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = controller_thread_main(main, main->process);
}
// Ensure a newline is always put at the end of the program execution, unless in quiet mode.
- if (F_status_is_error(status) && main->output.verbosity != f_console_verbosity_quiet_e) {
- if (F_status_set_fine(status) == F_interrupt) {
- f_file_stream_flush(main->output.to);
+ if (F_status_is_error(main->setting.state.status) && main->program.output.verbosity != f_console_verbosity_quiet_e) {
+ if (F_status_set_fine(main->setting.state.status) == F_interrupt) {
+ f_file_stream_flush(main->program.output.to);
}
- fll_print_dynamic_raw(f_string_eol_s, main->output.to);
+ fll_print_dynamic_raw(f_string_eol_s, main->program.output.to);
}
- if (status != F_child && (process.flag & controller_setting_flag_pid_created_e)) {
- const f_status_t status_delete = controller_file_pid_delete(main->pid, process.path_pid);
+ if (main->setting.state.status != F_child && (main->process->flag & controller_setting_flag_pid_created_e)) {
+ const f_status_t status_delete = controller_file_pid_delete(main->program.pid, main->process->path_pid);
- if (F_status_is_error(status_delete) && main->warning.verbosity == f_console_verbosity_debug_e) {
+ if (F_status_is_error(status_delete) && main->program.warning.verbosity == f_console_verbosity_debug_e) {
if (F_status_set_fine(status_delete) == F_number_not) {
- controller_lock_print(main->warning.to, 0);
+ controller_lock_print(main->program.warning.to, 0);
- fl_print_format("%r%[%QThe pid file '%]", main->warning.to, f_string_eol_s, main->warning.context, main->warning.prefix, main->warning.context);
- fl_print_format(f_string_format_Q_single_s.string, main->warning.to, main->warning.notable, process.path_pid, main->warning.notable);
- fl_print_format("%[' must not be specified with the parameter '%]", main->warning.to, main->warning.context, main->warning.context);
- fl_print_format("%[%i%]", main->warning.to, main->warning.notable, main->pid, main->warning.notable);
- fl_print_format("%[' doesn't contain the expected number, not deleting file.%]%r", main->warning.to, main->warning.context, main->warning.context, f_string_eol_s);
+ fl_print_format("%r%[%QThe pid file '%]", main->program.warning.to, f_string_eol_s, main->program.warning.context, main->program.warning.prefix, main->program.warning.context);
+ fl_print_format(f_string_format_Q_single_s.string, main->program.warning.to, main->program.warning.notable, main->process->path_pid, main->program.warning.notable);
+ fl_print_format("%[' must not be specified with the parameter '%]", main->program.warning.to, main->program.warning.context, main->program.warning.context);
+ fl_print_format("%[%i%]", main->program.warning.to, main->program.warning.notable, main->program.pid, main->program.warning.notable);
+ fl_print_format("%[' doesn't contain the expected number, not deleting file.%]%r", main->program.warning.to, main->program.warning.context, main->program.warning.context, f_string_eol_s);
- controller_unlock_print_flush(main->warning.to, 0);
+ controller_unlock_print_flush(main->program.warning.to, 0);
}
else if (F_status_set_fine(status_delete) != F_interrupt) {
- fll_error_file_print(main->warning, F_status_set_fine(status_delete), "controller_file_pid_delete", fll_error_file_flag_fallback_e, process.path_pid, f_file_operation_delete_s, fll_error_file_type_file_e);
+ fll_error_file_print(&main->program.warning, F_status_set_fine(status_delete), "controller_file_pid_delete", fll_error_file_flag_fallback_e, main->process->path_pid, f_file_operation_delete_s, fll_error_file_type_file_e);
}
}
}
- if (status != F_child && process.path_control.used) {
- f_socket_disconnect(&process.control.server, f_socket_close_read_write_e);
+ if (main->setting.state.status != F_child && main->process->path_control.used) {
+ f_socket_disconnect(&main->process->control.server, f_socket_close_read_write_e);
- if (!(process.control.flag & controller_control_flag_readonly_e)) {
- f_file_remove(process.path_control);
+ if (!(main->process->control.flag & controller_control_flag_readonly_e)) {
+ f_file_remove(main->process->path_control);
}
}
-
- return status;
}
#endif // _di_controller_main_
}
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_string_dynamic_append", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_string_dynamic_append", F_true);
return status;
}
return F_file_found_not;
}
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_print_error_file(global.thread, global.main->error, F_status_set_fine(status), "f_file_stream_open", F_true, path, f_file_operation_open_s, fll_error_file_type_file_e);
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_print_error_file(global.thread, global.main->program.error, F_status_set_fine(status), "f_file_stream_open", F_true, path, f_file_operation_open_s, fll_error_file_type_file_e);
}
}
else {
status = f_file_stream_read(file, &cache->buffer_file);
if (F_status_is_error(status)) {
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_print_error_file(global.thread, global.main->error, F_status_set_fine(status), "f_file_stream_read", F_true, path, f_file_operation_read_s, fll_error_file_type_file_e);
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_print_error_file(global.thread, global.main->program.error, F_status_set_fine(status), "f_file_stream_read", F_true, path, f_file_operation_read_s, fll_error_file_type_file_e);
}
}
}
status = f_file_stat(path, F_true, &stat_file);
if (F_status_is_error(status)) {
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_print_error_file(global.thread, global.main->error, F_status_set_fine(status), "f_file_stat", F_true, path, f_file_operation_stat_s, fll_error_file_type_file_e);
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_print_error_file(global.thread, global.main->program.error, F_status_set_fine(status), "f_file_stat", F_true, path, f_file_operation_stat_s, fll_error_file_type_file_e);
}
}
else {
file.flag = F_file_flag_write_only_d;
- status = f_file_stream_open(path, f_file_open_mode_truncate_s, &file);
+ status = f_file_stream_open(path, f_file_open_mode_read_truncate_s, &file);
if (F_status_is_error(status)) return status;
fll_print_format("%i%r", file, pid, f_string_eol_s);
return F_okay;
}
- if (global->main->parameters.array[controller_parameter_validate_e].result & f_console_result_found_e) {
- if ((global->main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) && global->main->output.verbosity == f_console_verbosity_debug_e) {
- controller_lock_print(global->main->output.to, global->thread);
+ if (global->main->program.parameters.array[controller_parameter_validate_e].result & f_console_result_found_e) {
+ if ((global->main->program.parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) && global->main->program.output.verbosity == f_console_verbosity_debug_e) {
+ controller_lock_print(global->main->program.output.to, global->thread);
- fl_print_format("%rPID file '", global->main->output.to, f_string_eol_s);
- fl_print_format("%[%Q%]'.%r", global->main->output.to, global->main->context.set.notable, global->setting->path_pid, global->main->context.set.notable, f_string_eol_s);
+ fl_print_format("%rPID file '", global->main->program.output.to, f_string_eol_s);
+ fl_print_format("%[%Q%]'.%r", global->main->program.output.to, global->main->program.context.set.notable, global->setting->path_pid, global->main->program.context.set.notable, f_string_eol_s);
if (global->setting->path_control.used) {
- fl_print_format("%rControl socket '", global->main->output.to, f_string_eol_s);
- fl_print_format(f_string_format_Q_single_s.string, global->main->output.to, global->main->context.set.notable, global->setting->path_control, global->main->context.set.notable);
- fl_print_format("'.%r", global->main->output.to, f_string_eol_s);
+ fl_print_format("%rControl socket '", global->main->program.output.to, f_string_eol_s);
+ fl_print_format(f_string_format_Q_single_s.string, global->main->program.output.to, global->main->program.context.set.notable, global->setting->path_control, global->main->program.context.set.notable);
+ fl_print_format("'.%r", global->main->program.output.to, f_string_eol_s);
}
- controller_unlock_print_flush(global->main->output.to, global->thread);
+ controller_unlock_print_flush(global->main->program.output.to, global->thread);
}
return F_okay;
f_status_t status = F_okay;
if (global->setting->entry.pid != controller_entry_pid_disable_e && !global->setting->path_pid.used) {
- status = controller_file_pid_create(global->main->pid, global->setting->path_pid);
+ status = controller_file_pid_create(global->main->program.pid, global->setting->path_pid);
// Report pid file error but because this could be an "init" program, consider the pid file as optional and continue on.
if (F_status_is_error(status)) {
// Always return immediately on memory errors.
if (F_status_set_fine(status) == F_memory_not) {
- if (global->main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(global->main->error.to, global->thread);
+ if (global->main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(global->main->program.error.to, global->thread);
- controller_print_error_file(0, global->main->error, F_status_set_fine(status), "controller_file_pid_create", F_true, global->setting->path_pid, f_file_operation_create_s, fll_error_file_type_file_e);
+ controller_print_error_file(0, global->main->program.error, F_status_set_fine(status), "controller_file_pid_create", F_true, global->setting->path_pid, f_file_operation_create_s, fll_error_file_type_file_e);
- f_file_stream_lock(global->main->error.to);
+ f_file_stream_lock(global->main->program.error.to);
- controller_entry_print_error_cache(is_entry, global->main->error, cache->action);
+ controller_entry_print_error_cache(is_entry, global->main->program.error, cache->action);
- controller_unlock_print_flush(global->main->error.to, global->thread);
+ controller_unlock_print_flush(global->main->program.error.to, global->thread);
}
return status;
}
- if (global->main->warning.verbosity == f_console_verbosity_debug_e) {
- controller_lock_print(global->main->warning.to, global->thread);
+ if (global->main->program.warning.verbosity == f_console_verbosity_debug_e) {
+ controller_lock_print(global->main->program.warning.to, global->thread);
if (F_status_set_fine(status) == F_read_only) {
- fl_print_format("%r%[%QThe pid file '%]", global->main->warning.to, f_string_eol_s, global->main->warning.context, global->main->warning.prefix, global->main->warning.context);
- fl_print_format(f_string_format_Q_single_s.string, global->main->warning.to, global->main->warning.notable, global->setting->path_pid, global->main->warning.notable);
- fl_print_format("%[' could not be written because the destination is read only.%]%r", global->main->warning.to, global->main->warning.context, global->main->warning.context, f_string_eol_s);
+ fl_print_format("%r%[%QThe pid file '%]", global->main->program.warning.to, f_string_eol_s, global->main->program.warning.context, global->main->program.warning.prefix, global->main->program.warning.context);
+ fl_print_format(f_string_format_Q_single_s.string, global->main->program.warning.to, global->main->program.warning.notable, global->setting->path_pid, global->main->program.warning.notable);
+ fl_print_format("%[' could not be written because the destination is read only.%]%r", global->main->program.warning.to, global->main->program.warning.context, global->main->program.warning.context, f_string_eol_s);
}
else {
- controller_print_error_file(0, global->main->warning, F_status_set_fine(status), "controller_file_pid_create", F_true, global->setting->path_pid, f_file_operation_create_s, fll_error_file_type_file_e);
+ controller_print_error_file(0, global->main->program.warning, F_status_set_fine(status), "controller_file_pid_create", F_true, global->setting->path_pid, f_file_operation_create_s, fll_error_file_type_file_e);
}
- controller_entry_print_error_cache(is_entry, global->main->warning, cache->action);
+ controller_entry_print_error_cache(is_entry, global->main->program.warning, cache->action);
- controller_unlock_print_flush(global->main->warning.to, global->thread);
+ controller_unlock_print_flush(global->main->program.warning.to, global->thread);
}
status = F_okay;
else {
global->setting->flag |= controller_setting_flag_pid_created_e;
- if (global->main->output.verbosity == f_console_verbosity_debug_e) {
- controller_lock_print(global->main->output.to, global->thread);
+ if (global->main->program.output.verbosity == f_console_verbosity_debug_e) {
+ controller_lock_print(global->main->program.output.to, global->thread);
- fl_print_format("%rPID file '", global->main->output.to, f_string_eol_s);
- fl_print_format("%[%Q%]' created.%r", global->main->output.to, global->main->context.set.notable, global->setting->path_pid, global->main->context.set.notable, f_string_eol_s);
+ fl_print_format("%rPID file '", global->main->program.output.to, f_string_eol_s);
+ fl_print_format("%[%Q%]' created.%r", global->main->program.output.to, global->main->program.context.set.notable, global->setting->path_pid, global->main->program.context.set.notable, f_string_eol_s);
- controller_unlock_print_flush(global->main->output.to, global->thread);
+ controller_unlock_print_flush(global->main->program.output.to, global->thread);
}
}
}
if (global->setting->control.flag & controller_control_flag_readonly_e) {
if (f_file_exists(global->setting->path_control, F_true) != F_true) {
- if (global->main->output.verbosity == f_console_verbosity_debug_e) {
- controller_lock_print(global->main->output.to, global->thread);
+ if (global->main->program.output.verbosity == f_console_verbosity_debug_e) {
+ controller_lock_print(global->main->program.output.to, global->thread);
- fl_print_format("%r%[%QControl socket '%]", global->main->warning.to, f_string_eol_s, global->main->warning.context, global->main->warning.prefix, global->main->warning.context);
- fl_print_format(f_string_format_Q_single_s.string, global->main->output.to, global->main->context.set.notable, global->setting->path_control, global->main->context.set.notable);
- fl_print_format("' .%r", global->main->output.to, f_string_eol_s);
- fl_print_format("%[' cannot be found while read only mode is enabled and so the Control socket is unavailable.%]%r", global->main->output.to, global->main->warning.context, global->main->warning.context, f_string_eol_s);
+ fl_print_format("%r%[%QControl socket '%]", global->main->program.warning.to, f_string_eol_s, global->main->program.warning.context, global->main->program.warning.prefix, global->main->program.warning.context);
+ fl_print_format(f_string_format_Q_single_s.string, global->main->program.output.to, global->main->program.context.set.notable, global->setting->path_control, global->main->program.context.set.notable);
+ fl_print_format("' .%r", global->main->program.output.to, f_string_eol_s);
+ fl_print_format("%[' cannot be found while read only mode is enabled and so the Control socket is unavailable.%]%r", global->main->program.output.to, global->main->program.warning.context, global->main->program.warning.context, f_string_eol_s);
- controller_unlock_print_flush(global->main->output.to, global->thread);
+ controller_unlock_print_flush(global->main->program.output.to, global->thread);
}
return F_data_not;
if (F_status_is_error(status)) {
if (F_status_set_fine(status) == F_memory_not) {
- controller_print_error(global->thread, global->main->error, F_status_set_fine(status), "f_socket_create", F_true);
+ controller_print_error(global->thread, global->main->program.error, F_status_set_fine(status), "f_socket_create", F_true);
}
- else if (global->main->output.verbosity == f_console_verbosity_debug_e) {
- controller_lock_print(global->main->output.to, global->thread);
+ else if (global->main->program.output.verbosity == f_console_verbosity_debug_e) {
+ controller_lock_print(global->main->program.output.to, global->thread);
- fl_print_format("%r%[%QControl socket '%]", global->main->warning.to, f_string_eol_s, global->main->warning.context, global->main->warning.prefix, global->main->warning.context);
- fl_print_format(f_string_format_Q_single_s.string, global->main->output.to, global->main->context.set.notable, global->setting->path_control, global->main->context.set.notable);
- fl_print_format("%[' could not be created, code %]", global->main->output.to, global->main->warning.context, global->main->warning.context);
- fl_print_format(f_string_format_ui_single_s.string, global->main->output.to, global->main->context.set.notable, F_status_set_fine(status), global->main->context.set.notable);
- fl_print_format(f_string_format_sentence_end_s.string, global->main->output.to, global->main->warning.context, global->main->warning.context, f_string_eol_s);
+ fl_print_format("%r%[%QControl socket '%]", global->main->program.warning.to, f_string_eol_s, global->main->program.warning.context, global->main->program.warning.prefix, global->main->program.warning.context);
+ fl_print_format(f_string_format_Q_single_s.string, global->main->program.output.to, global->main->program.context.set.notable, global->setting->path_control, global->main->program.context.set.notable);
+ fl_print_format("%[' could not be created, code %]", global->main->program.output.to, global->main->program.warning.context, global->main->program.warning.context);
+ fl_print_format(f_string_format_ui_single_s.string, global->main->program.output.to, global->main->program.context.set.notable, F_status_set_fine(status), global->main->program.context.set.notable);
+ fl_print_format(f_string_format_sentence_end_s.string, global->main->program.output.to, global->main->program.warning.context, global->main->program.warning.context, f_string_eol_s);
- controller_unlock_print_flush(global->main->output.to, global->thread);
+ controller_unlock_print_flush(global->main->program.output.to, global->thread);
}
return status;
status = f_file_remove(global->setting->path_control);
if (F_status_set_fine(status) == F_memory_not) {
- controller_print_error(global->thread, global->main->error, F_status_set_fine(status), "f_file_remove", F_true);
+ controller_print_error(global->thread, global->main->program.error, F_status_set_fine(status), "f_file_remove", F_true);
return status;
}
global->setting->control.server.name = global->setting->path_control.string;
- status = f_socket_bind_local(&global->setting->control.server);
+ status = f_socket_bind(&global->setting->control.server);
if (F_status_is_error(status)) {
f_socket_disconnect(&global->setting->control.server, f_socket_close_fast_e);
}
if (F_status_set_fine(status) == F_memory_not) {
- controller_print_error(global->thread, global->main->error, F_status_set_fine(status), "f_socket_bind_local", F_true);
+ controller_print_error(global->thread, global->main->program.error, F_status_set_fine(status), "f_socket_bind", F_true);
}
- else if (global->main->output.verbosity == f_console_verbosity_debug_e) {
- controller_lock_print(global->main->output.to, global->thread);
+ else if (global->main->program.output.verbosity == f_console_verbosity_debug_e) {
+ controller_lock_print(global->main->program.output.to, global->thread);
- fl_print_format("%r%[%QControl socket '%]", global->main->warning.to, f_string_eol_s, global->main->warning.context, global->main->warning.prefix, global->main->warning.context);
- fl_print_format(f_string_format_Q_single_s.string, global->main->output.to, global->main->context.set.notable, global->setting->path_control, global->main->context.set.notable);
- fl_print_format("%[' could not be bound, code %]", global->main->output.to, global->main->warning.context, global->main->warning.context);
- fl_print_format(f_string_format_ui_single_s.string, global->main->output.to, global->main->context.set.notable, F_status_set_fine(status), global->main->context.set.notable);
- fl_print_format(f_string_format_sentence_end_s.string, global->main->output.to, global->main->warning.context, global->main->warning.context, f_string_eol_s);
+ fl_print_format("%r%[%QControl socket '%]", global->main->program.warning.to, f_string_eol_s, global->main->program.warning.context, global->main->program.warning.prefix, global->main->program.warning.context);
+ fl_print_format(f_string_format_Q_single_s.string, global->main->program.output.to, global->main->program.context.set.notable, global->setting->path_control, global->main->program.context.set.notable);
+ fl_print_format("%[' could not be bound, code %]", global->main->program.output.to, global->main->program.warning.context, global->main->program.warning.context);
+ fl_print_format(f_string_format_ui_single_s.string, global->main->program.output.to, global->main->program.context.set.notable, F_status_set_fine(status), global->main->program.context.set.notable);
+ fl_print_format(f_string_format_sentence_end_s.string, global->main->program.output.to, global->main->program.warning.context, global->main->program.warning.context, f_string_eol_s);
- controller_unlock_print_flush(global->main->output.to, global->thread);
+ controller_unlock_print_flush(global->main->program.output.to, global->thread);
}
return status;
}
if (F_status_set_fine(status) == F_memory_not) {
- controller_print_error(global->thread, global->main->error, F_status_set_fine(status), "f_file_role_change", F_true);
+ controller_print_error(global->thread, global->main->program.error, F_status_set_fine(status), "f_file_role_change", F_true);
}
- else if (global->main->output.verbosity == f_console_verbosity_debug_e) {
- controller_lock_print(global->main->output.to, global->thread);
+ else if (global->main->program.output.verbosity == f_console_verbosity_debug_e) {
+ controller_lock_print(global->main->program.output.to, global->thread);
- fl_print_format("%r%[%QControl socket '%]", global->main->warning.to, f_string_eol_s, global->main->warning.context, global->main->warning.prefix, global->main->warning.context);
- fl_print_format(f_string_format_Q_single_s.string, global->main->output.to, global->main->context.set.notable, global->setting->path_control, global->main->context.set.notable);
- fl_print_format("%[' failed to set file roles, code %]", global->main->output.to, global->main->warning.context, global->main->warning.context);
- fl_print_format(f_string_format_ui_single_s.string, global->main->output.to, global->main->context.set.notable, F_status_set_fine(status), global->main->context.set.notable);
- fl_print_format(f_string_format_sentence_end_s.string, global->main->output.to, global->main->warning.context, global->main->warning.context, f_string_eol_s);
+ fl_print_format("%r%[%QControl socket '%]", global->main->program.warning.to, f_string_eol_s, global->main->program.warning.context, global->main->program.warning.prefix, global->main->program.warning.context);
+ fl_print_format(f_string_format_Q_single_s.string, global->main->program.output.to, global->main->program.context.set.notable, global->setting->path_control, global->main->program.context.set.notable);
+ fl_print_format("%[' failed to set file roles, code %]", global->main->program.output.to, global->main->program.warning.context, global->main->program.warning.context);
+ fl_print_format(f_string_format_ui_single_s.string, global->main->program.output.to, global->main->program.context.set.notable, F_status_set_fine(status), global->main->program.context.set.notable);
+ fl_print_format(f_string_format_sentence_end_s.string, global->main->program.output.to, global->main->program.warning.context, global->main->program.warning.context, f_string_eol_s);
- controller_unlock_print_flush(global->main->output.to, global->thread);
+ controller_unlock_print_flush(global->main->program.output.to, global->thread);
}
return status;
}
if (F_status_set_fine(status) == F_memory_not) {
- controller_print_error(global->thread, global->main->error, F_status_set_fine(status), "f_file_role_change", F_true);
+ controller_print_error(global->thread, global->main->program.error, F_status_set_fine(status), "f_file_role_change", F_true);
}
- else if (global->main->output.verbosity == f_console_verbosity_debug_e) {
- controller_lock_print(global->main->output.to, global->thread);
+ else if (global->main->program.output.verbosity == f_console_verbosity_debug_e) {
+ controller_lock_print(global->main->program.output.to, global->thread);
- fl_print_format("%r%[%QControl socket '%]", global->main->warning.to, f_string_eol_s, global->main->warning.context, global->main->warning.prefix, global->main->warning.context);
- fl_print_format(f_string_format_Q_single_s.string, global->main->output.to, global->main->context.set.notable, global->setting->path_control, global->main->context.set.notable);
- fl_print_format("%[' failed to set file mode, code %]", global->main->output.to, global->main->warning.context, global->main->warning.context);
- fl_print_format(f_string_format_ui_single_s.string, global->main->output.to, global->main->context.set.notable, F_status_set_fine(status), global->main->context.set.notable);
- fl_print_format(f_string_format_sentence_end_s.string, global->main->output.to, global->main->warning.context, global->main->warning.context, f_string_eol_s);
+ fl_print_format("%r%[%QControl socket '%]", global->main->program.warning.to, f_string_eol_s, global->main->program.warning.context, global->main->program.warning.prefix, global->main->program.warning.context);
+ fl_print_format(f_string_format_Q_single_s.string, global->main->program.output.to, global->main->program.context.set.notable, global->setting->path_control, global->main->program.context.set.notable);
+ fl_print_format("%[' failed to set file mode, code %]", global->main->program.output.to, global->main->program.warning.context, global->main->program.warning.context);
+ fl_print_format(f_string_format_ui_single_s.string, global->main->program.output.to, global->main->program.context.set.notable, F_status_set_fine(status), global->main->program.context.set.notable);
+ fl_print_format(f_string_format_sentence_end_s.string, global->main->program.output.to, global->main->program.warning.context, global->main->program.warning.context, f_string_eol_s);
- controller_unlock_print_flush(global->main->output.to, global->thread);
+ controller_unlock_print_flush(global->main->program.output.to, global->thread);
}
return status;
}
}
- if (global->main->output.verbosity == f_console_verbosity_debug_e) {
- controller_lock_print(global->main->output.to, global->thread);
+ if (global->main->program.output.verbosity == f_console_verbosity_debug_e) {
+ controller_lock_print(global->main->program.output.to, global->thread);
- fl_print_format("%rControl socket '", global->main->output.to, f_string_eol_s);
- fl_print_format(f_string_format_Q_single_s.string, global->main->output.to, global->main->context.set.notable, global->setting->path_control, global->main->context.set.notable);
- fl_print_format("' created.%r", global->main->output.to, f_string_eol_s);
+ fl_print_format("%rControl socket '", global->main->program.output.to, f_string_eol_s);
+ fl_print_format(f_string_format_Q_single_s.string, global->main->program.output.to, global->main->program.context.set.notable, global->setting->path_control, global->main->program.context.set.notable);
+ fl_print_format("' created.%r", global->main->program.output.to, f_string_eol_s);
- controller_unlock_print_flush(global->main->output.to, global->thread);
+ controller_unlock_print_flush(global->main->program.output.to, global->thread);
}
// Disabled, not yet implemented.
global->thread->id_control = 0;
}
- if (global->main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_print_error(global->thread, global->main->error, F_status_set_fine(status), "f_thread_create", F_true);
+ if (global->main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_print_error(global->thread, global->main->program.error, F_status_set_fine(status), "f_thread_create", F_true);
}
}
f_thread_mutex_lock(&thread->lock.print);
}
- fll_error_print(print, status, function, flag);
+ fll_error_print(&print, status, function, flag); // @fixme the print is a const and it is being passed as a pointer; the function needs to change.
if (thread) {
f_thread_mutex_unlock(&thread->lock.print);
f_thread_mutex_lock(&thread->lock.print);
}
- fll_error_file_print(print, status, function, flag, name, operation, type);
+ fll_error_file_print(&print, status, function, flag, name, operation, type); // @fixme the print is a const and it is being passed as a pointer; the function needs to change.
if (thread) {
f_thread_mutex_unlock(&thread->lock.print);
f_state_t state = macro_f_state_t_initialize_1(controller_common_allocation_large_d, controller_common_allocation_small_d, F_okay, 0, 0, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0);
f_range_t range = content_range;
- status = fll_fss_extended_read(cache->buffer_file, state, &range, &cache->object_actions, &cache->content_actions, 0, 0, &cache->delimits, 0);
+ status = 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_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "fll_fss_extended_read", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "fll_fss_extended_read", F_true, global.thread);
return status;
}
status = f_fss_apply_delimit(state, cache->delimits, &cache->buffer_file);
if (F_status_is_error(status)) {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "f_fss_apply_delimit", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "f_fss_apply_delimit", F_true, global.thread);
return status;
}
status = controller_entry_actions_increase_by(cache->object_actions.used, actions);
if (F_status_is_error(status)) {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "controller_entry_actions_increase_by", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "controller_entry_actions_increase_by", F_true, global.thread);
return status;
}
action->status = F_known_not;
action->parameters.used = 0;
- status = f_fss_count_lines(cache->buffer_file, cache->object_actions.array[i].start, &cache->action.line_action, &setting->state);
+ status = f_fss_count_lines(cache->buffer_file, cache->object_actions.array[i].start, &cache->action.line_action, &global->setting->state);
if (F_status_is_error(status)) {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "f_fss_count_lines", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "f_fss_count_lines", F_true, global.thread);
break;
}
status = f_rip_dynamic_partial_nulless(cache->buffer_file, cache->object_actions.array[i], &cache->action.name_action);
if (F_status_is_error(status)) {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "f_rip_dynamic_partial_nulless", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "f_rip_dynamic_partial_nulless", F_true, global.thread);
break;
}
actions->array[actions->used].type = controller_entry_action_type_timeout_e;
}
else {
- if (global.main->warning.verbosity == f_console_verbosity_debug_e) {
- controller_lock_print(global.main->warning.to, global.thread);
+ if (global.main->program.warning.verbosity == f_console_verbosity_debug_e) {
+ controller_lock_print(global.main->program.warning.to, global.thread);
- fl_print_format("%r%[%QUnknown %r item action '%]", global.main->warning.to, f_string_eol_s, global.main->warning.context, global.main->warning.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->warning.context);
- fl_print_format(f_string_format_Q_single_s.string, global.main->warning.to, global.main->warning.notable, cache->action.name_action, global.main->warning.notable);
- fl_print_format(f_string_format_sentence_end_quote_s.string, global.main->warning.to, global.main->warning.context, global.main->warning.context, f_string_eol_s);
+ fl_print_format("%r%[%QUnknown %r item action '%]", global.main->program.warning.to, f_string_eol_s, global.main->program.warning.context, global.main->program.warning.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->program.warning.context);
+ fl_print_format(f_string_format_Q_single_s.string, global.main->program.warning.to, global.main->program.warning.notable, cache->action.name_action, global.main->program.warning.notable);
+ fl_print_format(f_string_format_sentence_end_quote_s.string, global.main->program.warning.to, global.main->program.warning.context, global.main->program.warning.context, f_string_eol_s);
- controller_entry_print_error_cache(is_entry, global.main->warning, cache->action);
+ controller_entry_print_error_cache(is_entry, global.main->program.warning, cache->action);
- controller_unlock_print_flush(global.main->warning.to, global.thread);
+ controller_unlock_print_flush(global.main->program.warning.to, global.thread);
}
continue;
if (cache->content_actions.array[i].used < at_least || cache->content_actions.array[i].used > at_most) {
action->status = F_status_set_error(F_parameter);
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
f_thread_mutex_lock(&global.thread->lock.print);
- f_file_stream_lock(global.main->error.to);
+ f_file_stream_lock(global.main->program.error.to);
- fl_print_format("%r%[%QThe %r item action '%]", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context);
- fl_print_format(f_string_format_Q_single_s.string, global.main->error.to, global.main->error.notable, cache->action.name_action, global.main->error.notable);
- fl_print_format("%[' requires ", global.main->error.to, global.main->error.context);
+ fl_print_format("%r%[%QThe %r item action '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->program.error.context);
+ fl_print_format(f_string_format_Q_single_s.string, global.main->program.error.to, global.main->program.error.notable, cache->action.name_action, global.main->program.error.notable);
+ fl_print_format("%[' requires ", global.main->program.error.to, global.main->program.error.context);
if (at_least == at_most) {
- f_print_terminated("exactly ", global.main->error.to);
+ f_print_terminated("exactly ", global.main->program.error.to);
}
- fl_print_format("%]%[%un%]", global.main->error.to, global.main->error.context, global.main->error.notable, at_least, global.main->error.notable);
+ fl_print_format("%]%[%un%]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.notable, at_least, global.main->program.error.notable);
if (action->type == controller_entry_action_type_consider_e || controller_entry_action_type_is_rule(action->type)) {
- fl_print_format("%[ or more parameters.%]%r", global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format("%[ or more parameters.%]%r", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
}
else {
if (at_least == at_most) {
- fl_print_format("%[ parameters.%]%r", global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format("%[ parameters.%]%r", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
}
else {
- fl_print_format("%[ to %]", global.main->error.to, global.main->error.context, global.main->error.context);
- fl_print_format("%[%un%]", global.main->error.to, global.main->error.notable, at_most, global.main->error.notable);
- fl_print_format("%[ parameters.%]%r", global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format("%[ to %]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format("%[%un%]", global.main->program.error.to, global.main->program.error.notable, at_most, global.main->program.error.notable);
+ fl_print_format("%[ parameters.%]%r", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
}
}
- f_file_stream_unlock(global.main->error.to);
+ f_file_stream_unlock(global.main->program.error.to);
f_thread_mutex_unlock(&global.thread->lock.print);
}
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_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "f_memory_array_increase_by", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "f_memory_array_increase_by", F_true, global.thread);
action->status = status;
status = f_memory_array_increase_by((cache->content_actions.array[i].array[j].stop - 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_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "f_memory_array_increase_by", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "f_memory_array_increase_by", F_true, global.thread);
break;
}
status = f_string_dynamic_partial_append_nulless(cache->buffer_file, cache->content_actions.array[i].array[j], &action->parameters.array[j]);
if (F_status_is_error(status)) {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, global.thread);
break;
}
status = controller_path_canonical_relative(global.setting, action->parameters.array[0], &cache->buffer_path);
if (F_status_is_error(status)) {
- controller_entry_print_error_file(is_entry, global.main->error, cache->action, F_status_set_fine(status), "controller_path_canonical_relative", F_true, cache->action.generic, f_file_operation_analyze_s, fll_error_file_type_path_e, global.thread);
+ controller_entry_print_error_file(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "controller_path_canonical_relative", F_true, cache->action.generic, f_file_operation_analyze_s, fll_error_file_type_path_e, global.thread);
action->status = status;
status_action = action->status;
}
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
- fll_print_format("%r%[%QThe %r item action must not have an empty string for a path (the first parameter).%]%r", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context, f_string_eol_s);
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ fll_print_format("%r%[%QThe %r item action must not have an empty string for a path (the first parameter).%]%r", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->program.error.context, f_string_eol_s);
}
}
status = f_file_name_base(action->parameters.array[1], &cache->buffer_path);
if (F_status_is_error(status)) {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "f_file_name_base", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "f_file_name_base", F_true, global.thread);
if (F_status_set_fine(status) == F_memory_not) {
status_action = status;
}
else {
if (f_compare_dynamic(action->parameters.array[1], cache->buffer_path) == F_equal_to_not) {
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
- f_file_stream_lock(global.main->error.to);
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ f_file_stream_lock(global.main->program.error.to);
- fl_print_format("%r%[%QThe %r item action second parameter '%]", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context);
- fl_print_format(f_string_format_Q_single_s.string, global.main->error.to, global.main->error.notable, action->parameters.array[1], global.main->error.notable);
- fl_print_format("%[' must be a base path name, such as '%]", global.main->error.to, global.main->error.context, global.main->error.context);
- fl_print_format(f_string_format_Q_single_s.string, global.main->error.to, global.main->error.notable, cache->buffer_path, global.main->error.notable);
- fl_print_format("%['.%]", global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QThe %r item action second parameter '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->program.error.context);
+ fl_print_format(f_string_format_Q_single_s.string, global.main->program.error.to, global.main->program.error.notable, action->parameters.array[1], global.main->program.error.notable);
+ fl_print_format("%[' must be a base path name, such as '%]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format(f_string_format_Q_single_s.string, global.main->program.error.to, global.main->program.error.notable, cache->buffer_path, global.main->program.error.notable);
+ fl_print_format("%['.%]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
- f_file_stream_unlock(global.main->error.to);
+ f_file_stream_unlock(global.main->program.error.to);
}
action->status = F_status_set_error(F_parameter);
status_action = action->status;
}
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
- fll_print_format("%r%[%QThe %r item action must not have an empty string for a rule name (the second parameter).%]", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context, f_string_eol_s);
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ fll_print_format("%r%[%QThe %r item action must not have an empty string for a rule name (the second parameter).%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->program.error.context, f_string_eol_s);
}
}
}
}
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
- f_file_stream_lock(global.main->error.to);
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ f_file_stream_lock(global.main->program.error.to);
- fl_print_format("%r%[%QThe %r item action third parameter (and beyond) must be one of '%]", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context);
- fl_print_format(f_string_format_r_single_s.string, global.main->error.to, global.main->error.notable, controller_asynchronous_s, global.main->error.notable);
- fl_print_format("%[', '%]", global.main->error.to, global.main->error.context, global.main->error.context);
- fl_print_format(f_string_format_r_single_s.string, global.main->error.to, global.main->error.notable, controller_require_s, global.main->error.notable);
- fl_print_format("%[', or '%]", global.main->error.to, global.main->error.context, global.main->error.context);
- fl_print_format(f_string_format_r_single_s.string, global.main->error.to, global.main->error.notable, controller_wait_s, global.main->error.notable);
- fl_print_format("%[' but instead has '%]", global.main->error.to, global.main->error.context, global.main->error.context);
- fl_print_format(f_string_format_Q_single_s.string, global.main->error.to, global.main->error.notable, action->parameters.array[j], global.main->error.notable);
- fl_print_format("%['.%]", global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QThe %r item action third parameter (and beyond) must be one of '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->program.error.context);
+ fl_print_format(f_string_format_r_single_s.string, global.main->program.error.to, global.main->program.error.notable, controller_asynchronous_s, global.main->program.error.notable);
+ fl_print_format("%[', '%]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format(f_string_format_r_single_s.string, global.main->program.error.to, global.main->program.error.notable, controller_require_s, global.main->program.error.notable);
+ fl_print_format("%[', or '%]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format(f_string_format_r_single_s.string, global.main->program.error.to, global.main->program.error.notable, controller_wait_s, global.main->program.error.notable);
+ fl_print_format("%[' but instead has '%]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format(f_string_format_Q_single_s.string, global.main->program.error.to, global.main->program.error.notable, action->parameters.array[j], global.main->program.error.notable);
+ fl_print_format("%['.%]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
- f_file_stream_unlock(global.main->error.to);
+ f_file_stream_unlock(global.main->program.error.to);
}
}
} // for
status_action = action->status;
}
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
- f_file_stream_lock(global.main->error.to);
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ f_file_stream_lock(global.main->program.error.to);
- fl_print_format("%r%[%QThe %r item action may not specify the reserved item '%]", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context);
- fl_print_format(f_string_format_r_single_s.string, global.main->error.to, global.main->error.notable, controller_main_s, global.main->error.notable);
- fl_print_format("%['.%]", global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QThe %r item action may not specify the reserved item '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->program.error.context);
+ fl_print_format(f_string_format_r_single_s.string, global.main->program.error.to, global.main->program.error.notable, controller_main_s, global.main->program.error.notable);
+ fl_print_format("%['.%]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
- f_file_stream_unlock(global.main->error.to);
+ f_file_stream_unlock(global.main->program.error.to);
}
}
}
status_action = action->status;
}
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
- f_file_stream_lock(global.main->error.to);
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ f_file_stream_lock(global.main->program.error.to);
- fl_print_format("%r%[%QThe %r item action must have one of '%]", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context);
- fl_print_format(f_string_format_r_single_s.string, global.main->error.to, global.main->error.notable, controller_kill_s, global.main->error.notable);
- fl_print_format("%[', '%]", global.main->error.to, global.main->error.context, global.main->error.context);
- fl_print_format(f_string_format_r_single_s.string, global.main->error.to, global.main->error.notable, controller_start_s, global.main->error.notable);
- fl_print_format("%[', or '%]", global.main->error.to, global.main->error.context, global.main->error.context);
- fl_print_format(f_string_format_r_single_s.string, global.main->error.to, global.main->error.notable, controller_stop_s, global.main->error.notable);
- fl_print_format("%[' but instead has '%]", global.main->error.to, global.main->error.context, global.main->error.context);
- fl_print_format(f_string_format_Q_single_s.string, global.main->error.to, global.main->error.notable, action->parameters.array[0], global.main->error.notable);
- fl_print_format("%['.%]", global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QThe %r item action must have one of '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->program.error.context);
+ fl_print_format(f_string_format_r_single_s.string, global.main->program.error.to, global.main->program.error.notable, controller_kill_s, global.main->program.error.notable);
+ fl_print_format("%[', '%]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format(f_string_format_r_single_s.string, global.main->program.error.to, global.main->program.error.notable, controller_start_s, global.main->program.error.notable);
+ fl_print_format("%[', or '%]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format(f_string_format_r_single_s.string, global.main->program.error.to, global.main->program.error.notable, controller_stop_s, global.main->program.error.notable);
+ fl_print_format("%[' but instead has '%]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format(f_string_format_Q_single_s.string, global.main->program.error.to, global.main->program.error.notable, action->parameters.array[0], global.main->program.error.notable);
+ fl_print_format("%['.%]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
- f_file_stream_unlock(global.main->error.to);
+ f_file_stream_unlock(global.main->program.error.to);
}
}
}
if (F_status_set_fine(status) == F_memory_not) {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "fl_conversion_dynamic_to_unsigned_detect", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "fl_conversion_dynamic_to_unsigned_detect", F_true, global.thread);
status_action = status;
break;
}
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
- f_file_stream_lock(global.main->error.to);
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ f_file_stream_lock(global.main->program.error.to);
- fl_print_format("%r%[%QThe %r item action parameter '%]", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context);
- fl_print_format(f_string_format_Q_single_s.string, global.main->error.to, global.main->error.notable, action->parameters.array[1], global.main->error.notable);
- fl_print_format("%[' is not a valid supported number.%]", global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QThe %r item action parameter '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->program.error.context);
+ fl_print_format(f_string_format_Q_single_s.string, global.main->program.error.to, global.main->program.error.notable, action->parameters.array[1], global.main->program.error.notable);
+ fl_print_format("%[' is not a valid supported number.%]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
- f_file_stream_unlock(global.main->error.to);
+ f_file_stream_unlock(global.main->program.error.to);
}
}
}
else {
action->status = F_status_set_error(F_support_not);
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
- f_file_stream_lock(global.main->error.to);
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ f_file_stream_lock(global.main->program.error.to);
- fl_print_format("%r%[%QThe %r item action may only have '%]", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context);
- fl_print_format(f_string_format_r_single_s.string, global.main->error.to, global.main->error.notable, controller_wait_s, global.main->error.notable);
- fl_print_format("%[' but instead has '%]", global.main->error.to, global.main->error.context, global.main->error.context);
- fl_print_format(f_string_format_Q_single_s.string, global.main->error.to, global.main->error.notable, action->parameters.array[0], global.main->error.notable);
- fl_print_format("%['.%]", global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QThe %r item action may only have '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->program.error.context);
+ fl_print_format(f_string_format_r_single_s.string, global.main->program.error.to, global.main->program.error.notable, controller_wait_s, global.main->program.error.notable);
+ fl_print_format("%[' but instead has '%]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format(f_string_format_Q_single_s.string, global.main->program.error.to, global.main->program.error.notable, action->parameters.array[0], global.main->program.error.notable);
+ fl_print_format("%['.%]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
- f_file_stream_unlock(global.main->error.to);
+ f_file_stream_unlock(global.main->program.error.to);
}
}
}
macro_f_number_unsigneds_t_increase_by(status, cache->ats, controller_common_allocation_small_d)
if (F_status_is_error(status)) {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "macro_f_number_unsigneds_t_increase_by", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "macro_f_number_unsigneds_t_increase_by", F_true, global.thread);
return status;
}
cache->action.line_item = entry->items.array[0].line;
cache->action.name_item.used = 0;
- status = f_string_dynamic_append_nulless(entry->items.array[0].name, &cache->action.name_item);
+ status = f_string_dynamic_append_nulless(entry->items.array[0].key, &cache->action.name_item);
if (F_status_is_error(status)) {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true, global.thread);
return status;
}
status2 = f_string_dynamic_append_nulless(controller_entry_action_type_name(actions->array[cache->ats.array[at_j]].type), &cache->action.name_action);
if (F_status_is_error(status2)) {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status2), "f_string_dynamic_append_nulless", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status2), "f_string_dynamic_append_nulless", F_true, global.thread);
return status2;
}
if (actions->array[cache->ats.array[at_j]].type == controller_entry_action_type_ready_e) {
if (global.setting->ready == controller_setting_ready_wait_e) {
- if (global.main->warning.verbosity == f_console_verbosity_debug_e) {
- controller_lock_print(global.main->warning.to, global.thread);
+ if (global.main->program.warning.verbosity == f_console_verbosity_debug_e) {
+ controller_lock_print(global.main->program.warning.to, global.thread);
- fl_print_format("%r%[%QMultiple '%]", global.main->warning.to, f_string_eol_s, global.main->warning.context, global.main->warning.prefix, global.main->warning.context);
- fl_print_format(f_string_format_r_single_s.string, global.main->warning.to, global.main->warning.notable, controller_ready_s, global.main->warning.notable);
- fl_print_format("%[' %r item actions detected; only the first will be used.%]%r", global.main->warning.to, global.main->warning.context, is_entry ? controller_entry_s : controller_exit_s, global.main->warning.context, f_string_eol_s);
+ fl_print_format("%r%[%QMultiple '%]", global.main->program.warning.to, f_string_eol_s, global.main->program.warning.context, global.main->program.warning.prefix, global.main->program.warning.context);
+ fl_print_format(f_string_format_r_single_s.string, global.main->program.warning.to, global.main->program.warning.notable, controller_ready_s, global.main->program.warning.notable);
+ fl_print_format("%[' %r item actions detected; only the first will be used.%]%r", global.main->program.warning.to, global.main->program.warning.context, is_entry ? controller_entry_s : controller_exit_s, global.main->program.warning.context, f_string_eol_s);
- controller_entry_print_error_cache(is_entry, global.main->warning, cache->action);
+ controller_entry_print_error_cache(is_entry, global.main->program.warning, cache->action);
- controller_unlock_print_flush(global.main->warning.to, global.thread);
+ controller_unlock_print_flush(global.main->program.warning.to, global.thread);
}
}
else {
// Walk though each items and check to see if the item actually exists.
for (i = 1; i < entry->items.used && controller_thread_is_enabled(is_entry, global.thread); ++i) {
- if (f_compare_dynamic(entry->items.array[i].name, actions->array[cache->ats.array[at_j]].parameters.array[0]) == F_equal_to) {
+ if (f_compare_dynamic(entry->items.array[i].key, actions->array[cache->ats.array[at_j]].parameters.array[0]) == F_equal_to) {
// Check to see if "i" is already in the stack (to prevent recursion) (skipping main).
for (j = 2; j < cache->ats.used; j += 2) {
if (cache->ats.array[j] == i) {
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(global.main->error.to, global.thread);
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(global.main->program.error.to, global.thread);
- fl_print_format("%r%[%QThe %r item named '%]", global.main->error.to, f_string_eol_s, global.main->error.context, is_entry ? controller_entry_s : controller_exit_s, global.main->error.prefix, global.main->error.context);
- fl_print_format(f_string_format_Q_single_s.string, global.main->error.to, global.main->error.notable, entry->items.array[i].name, global.main->error.notable);
- fl_print_format("%[' cannot be executed because recursion is not allowed.%]%r", global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QThe %r item named '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, is_entry ? controller_entry_s : controller_exit_s, global.main->program.error.prefix, global.main->program.error.context);
+ fl_print_format(f_string_format_Q_single_s.string, global.main->program.error.to, global.main->program.error.notable, entry->items.array[i].key, global.main->program.error.notable);
+ fl_print_format("%[' cannot be executed because recursion is not allowed.%]%r", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
- controller_entry_print_error_cache(is_entry, global.main->error, cache->action);
+ controller_entry_print_error_cache(is_entry, global.main->program.error, cache->action);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
}
if (F_status_is_error_not(status)) {
macro_f_number_unsigneds_t_increase_by(status2, cache->ats, controller_common_allocation_small_d)
if (F_status_is_error(status2)) {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status2), "macro_f_number_unsigneds_t_increase_by", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status2), "macro_f_number_unsigneds_t_increase_by", F_true, global.thread);
return status2;
}
cache->action.name_item.used = 0;
cache->action.line_item = entry->items.array[i].line;
- status2 = f_string_dynamic_append_nulless(entry->items.array[i].name, &cache->action.name_item);
+ status2 = f_string_dynamic_append_nulless(entry->items.array[i].key, &cache->action.name_item);
if (F_status_is_error(status2)) {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status2), "f_string_dynamic_append_nulless", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status2), "f_string_dynamic_append_nulless", F_true, global.thread);
return status2;
}
if (error_has || i >= entry->items.used) {
if (i >= entry->items.used) {
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(global.main->error.to, global.thread);
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(global.main->program.error.to, global.thread);
- fl_print_format("%r%[%QThe %r item named '%]", global.main->error.to, f_string_eol_s, global.main->error.context, is_entry ? controller_entry_s : controller_exit_s, global.main->error.prefix, global.main->error.context);
- fl_print_format(f_string_format_Q_single_s.string, global.main->error.to, global.main->error.notable, actions->array[cache->ats.array[at_j]].parameters.array[0], global.main->error.notable);
- fl_print_format("%[' does not exist.%]%r", global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QThe %r item named '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, is_entry ? controller_entry_s : controller_exit_s, global.main->program.error.prefix, global.main->program.error.context);
+ fl_print_format(f_string_format_Q_single_s.string, global.main->program.error.to, global.main->program.error.notable, actions->array[cache->ats.array[at_j]].parameters.array[0], global.main->program.error.notable);
+ fl_print_format("%[' does not exist.%]%r", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
- controller_entry_print_error_cache(is_entry, global.main->error, cache->action);
+ controller_entry_print_error_cache(is_entry, global.main->program.error, cache->action);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
}
if (F_status_is_error_not(status)) {
status2 = f_string_dynamic_append_nulless(entry->items.array[cache->ats.array[at_i]].name, &cache->action.name_item);
if (F_status_is_error(status2)) {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status2), "f_string_dynamic_append_nulless", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status2), "f_string_dynamic_append_nulless", F_true, global.thread);
return status2;
}
macro_f_number_unsigneds_t_increase_by(status, cache->ats, controller_common_allocation_small_d)
if (F_status_is_error(status)) {
- controller_entry_print_error(is_entry, global->main->error, cache->action, F_status_set_fine(status), "macro_f_number_unsigneds_t_increase_by", F_true, global->thread);
+ controller_entry_print_error(is_entry, global->main->program.error, cache->action, F_status_set_fine(status), "macro_f_number_unsigneds_t_increase_by", F_true, global->thread);
return status;
}
status = f_string_dynamic_append_nulless(entry->items.array[cache->ats.array[0]].name, &cache->action.name_item);
if (F_status_is_error(status)) {
- controller_entry_print_error(is_entry, global->main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true, global->thread);
+ controller_entry_print_error(is_entry, global->main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true, global->thread);
return status;
}
- if ((global->main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) || global->main->error.verbosity == f_console_verbosity_verbose_e || global->main->error.verbosity == f_console_verbosity_debug_e) {
- if ((global->main->error.verbosity > f_console_verbosity_error_e)) {
- controller_lock_print(global->main->output.to, global->thread);
+ if ((global->main->program.parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) || global->main->program.error.verbosity == f_console_verbosity_verbose_e || global->main->program.error.verbosity == f_console_verbosity_debug_e) {
+ if ((global->main->program.error.verbosity > f_console_verbosity_error_e)) {
+ controller_lock_print(global->main->program.output.to, global->thread);
- fl_print_format("%rProcessing %r%r item '", global->main->output.to, f_string_eol_s, failsafe ? controller_entry_print_failsafe_s : f_string_empty_s, is_entry ? controller_entry_s : controller_exit_s);
- fl_print_format("%[%Q%]'.%r", global->main->output.to, global->main->context.set.title, cache->action.name_item, global->main->context.set.notable, f_string_eol_s);
+ fl_print_format("%rProcessing %r%r item '", global->main->program.output.to, f_string_eol_s, failsafe ? controller_entry_print_failsafe_s : f_string_empty_s, is_entry ? controller_entry_s : controller_exit_s);
+ fl_print_format("%[%Q%]'.%r", global->main->program.output.to, global->main->program.context.set.title, cache->action.name_item, global->main->program.context.set.notable, f_string_eol_s);
- controller_unlock_print_flush(global->main->output.to, global->thread);
+ controller_unlock_print_flush(global->main->program.output.to, global->thread);
}
}
status = f_string_dynamic_append_nulless(controller_entry_action_type_name(entry_action->type), &cache->action.name_action);
if (F_status_is_error(status)) {
- controller_entry_print_error(is_entry, global->main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true, global->thread);
+ controller_entry_print_error(is_entry, global->main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true, global->thread);
return status;
}
if (F_status_is_error(entry_action->status)) {
- if (global->main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) {
- if (global->main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(global->main->output.to, global->thread);
+ if (global->main->program.parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) {
+ if (global->main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(global->main->program.output.to, global->thread);
- fl_print_format("%rThe %r item action '", global->main->output.to, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s);
- fl_print_format(f_string_format_Q_single_s.string, global->main->output.to, global->main->context.set.title, cache->action.name_action, global->main->context.set.title);
+ fl_print_format("%rThe %r item action '", global->main->program.output.to, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s);
+ fl_print_format(f_string_format_Q_single_s.string, global->main->program.output.to, global->main->program.context.set.title, cache->action.name_action, global->main->program.context.set.title);
if (entry_action->parameters.used) {
- fl_print_format(" %[", global->main->output.to, global->main->context.set.notable);
+ fl_print_format(" %[", global->main->program.output.to, global->main->program.context.set.notable);
- controller_entry_action_parameters_print(global->main->output.to, *entry_action);
+ controller_entry_action_parameters_print(global->main->program.output.to, *entry_action);
- fl_print_format("%]", global->main->output.to, global->main->context.set.notable);
+ fl_print_format("%]", global->main->program.output.to, global->main->program.context.set.notable);
}
- fl_print_format("' is %[%r%] and is in a ", global->main->output.to, global->main->context.set.notable, entry_action->code & controller_entry_rule_code_require_d ? "required" : "optional", global->main->context.set.notable);
+ fl_print_format("' is %[%r%] and is in a ", global->main->program.output.to, global->main->program.context.set.notable, entry_action->code & controller_entry_rule_code_require_d ? "required" : "optional", global->main->program.context.set.notable);
- fl_print_format("%[failed%] state, skipping.%r", global->main->output.to, global->main->context.set.notable, global->main->context.set.notable, global->main->context.set.notable, f_string_eol_s);
+ fl_print_format("%[failed%] state, skipping.%r", global->main->program.output.to, global->main->program.context.set.notable, global->main->program.context.set.notable, global->main->program.context.set.notable, f_string_eol_s);
- controller_unlock_print_flush(global->main->output.to, global->thread);
+ controller_unlock_print_flush(global->main->program.output.to, global->thread);
}
}
else {
- if ((entry_action->code & controller_entry_rule_code_require_d) && global->main->error.verbosity > f_console_verbosity_quiet_e || !(entry_action->code & controller_entry_rule_code_require_d) && (global->main->warning.verbosity == f_console_verbosity_verbose_e || global->main->warning.verbosity == f_console_verbosity_debug_e)) {
+ if ((entry_action->code & controller_entry_rule_code_require_d) && global->main->program.error.verbosity > f_console_verbosity_quiet_e || !(entry_action->code & controller_entry_rule_code_require_d) && (global->main->program.warning.verbosity == f_console_verbosity_verbose_e || global->main->program.warning.verbosity == f_console_verbosity_debug_e)) {
fl_print_t *output = 0;
if (entry_action->code & controller_entry_rule_code_require_d) {
- output = &global->main->error;
+ output = &global->main->program.error;
}
- else if (global->main->error.verbosity != f_console_verbosity_error_e) {
- output = &global->main->warning;
+ else if (global->main->program.error.verbosity != f_console_verbosity_error_e) {
+ output = &global->main->program.warning;
}
if (output) {
if (entry_action->parameters.used) {
- fl_print_format(" %[", output->to, global->main->context.set.notable);
+ fl_print_format(" %[", output->to, global->main->program.context.set.notable);
controller_entry_action_parameters_print(output->to, *entry_action);
- fl_print_format("%]", output->to, global->main->context.set.notable);
+ fl_print_format("%]", output->to, global->main->program.context.set.notable);
}
if (entry_action->code & controller_entry_rule_code_require_d) {
if (entry_action->type == controller_entry_action_type_ready_e) {
if ((entry_action->code & controller_entry_rule_code_wait_d) || global->setting->ready == controller_setting_ready_wait_e) {
- if ((global->main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) || global->main->error.verbosity == f_console_verbosity_verbose_e || global->main->error.verbosity == f_console_verbosity_debug_e || entry->show == controller_entry_show_init_e) {
- if (global->main->output.verbosity != f_console_verbosity_quiet_e && global->main->error.verbosity != f_console_verbosity_error_e) {
- controller_lock_print(global->main->output.to, global->thread);
+ if ((global->main->program.parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) || global->main->program.error.verbosity == f_console_verbosity_verbose_e || global->main->program.error.verbosity == f_console_verbosity_debug_e || entry->show == controller_entry_show_init_e) {
+ if (global->main->program.output.verbosity != f_console_verbosity_quiet_e && global->main->program.error.verbosity != f_console_verbosity_error_e) {
+ controller_lock_print(global->main->program.output.to, global->thread);
- fl_print_format("%rWaiting before processing %r item action '", global->main->output.to, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s);
- fl_print_format(f_string_format_r_single_s.string, global->main->output.to, global->main->context.set.title, controller_ready_s, global->main->context.set.title);
- fl_print_format("'.%r", global->main->output.to, f_string_eol_s);
+ fl_print_format("%rWaiting before processing %r item action '", global->main->program.output.to, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s);
+ fl_print_format(f_string_format_r_single_s.string, global->main->program.output.to, global->main->program.context.set.title, controller_ready_s, global->main->program.context.set.title);
+ fl_print_format("'.%r", global->main->program.output.to, f_string_eol_s);
- controller_unlock_print_flush(global->main->output.to, global->thread);
+ controller_unlock_print_flush(global->main->program.output.to, global->thread);
}
}
- if (!(global->main->parameters.array[controller_parameter_validate_e].result & f_console_result_found_e)) {
+ if (!(global->main->program.parameters.array[controller_parameter_validate_e].result & f_console_result_found_e)) {
status = controller_rule_wait_all(*global, is_entry, F_false);
if (F_status_is_error(status)) return status;
}
}
if (global->setting->ready == controller_setting_ready_yes_e) {
- if ((global->main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) || global->main->error.verbosity == f_console_verbosity_verbose_e || global->main->error.verbosity == f_console_verbosity_debug_e) {
- if (global->main->output.verbosity != f_console_verbosity_quiet_e && global->main->error.verbosity != f_console_verbosity_error_e) {
- controller_lock_print(global->main->output.to, global->thread);
+ if ((global->main->program.parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) || global->main->program.error.verbosity == f_console_verbosity_verbose_e || global->main->program.error.verbosity == f_console_verbosity_debug_e) {
+ if (global->main->program.output.verbosity != f_console_verbosity_quiet_e && global->main->program.error.verbosity != f_console_verbosity_error_e) {
+ controller_lock_print(global->main->program.output.to, global->thread);
- fl_print_format("%rIgnoring %r item action '", global->main->output.to, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s);
- fl_print_format(f_string_format_r_single_s.string, global->main->output.to, global->main->context.set.title, controller_ready_s, global->main->context.set.title);
- fl_print_format("', state already is ready.%r", global->main->output.to, f_string_eol_s);
+ fl_print_format("%rIgnoring %r item action '", global->main->program.output.to, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s);
+ fl_print_format(f_string_format_r_single_s.string, global->main->program.output.to, global->main->program.context.set.title, controller_ready_s, global->main->program.context.set.title);
+ fl_print_format("', state already is ready.%r", global->main->program.output.to, f_string_eol_s);
- controller_unlock_print_flush(global->main->output.to, global->thread);
+ controller_unlock_print_flush(global->main->program.output.to, global->thread);
}
}
}
else {
- if (!failsafe && (global->main->error.verbosity == f_console_verbosity_verbose_e || entry->show == controller_entry_show_init_e) && !(global->main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e)) {
- if (global->main->error.verbosity > f_console_verbosity_error_e) {
- fl_print_format("%rState is now '%[%r%]'.%r", global->main->output.to, f_string_eol_s, global->main->context.set.notable, controller_ready_s, global->main->context.set.notable, f_string_eol_s);
+ if (!failsafe && (global->main->program.error.verbosity == f_console_verbosity_verbose_e || entry->show == controller_entry_show_init_e) && !(global->main->program.parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e)) {
+ if (global->main->program.error.verbosity > f_console_verbosity_error_e) {
+ fl_print_format("%rState is now '%[%r%]'.%r", global->main->program.output.to, f_string_eol_s, global->main->program.context.set.notable, controller_ready_s, global->main->program.context.set.notable, f_string_eol_s);
}
}
if (entry_action->number == 0 || entry_action->number >= entry->items.used || failsafe && entry_action->number == global->setting->failsafe_item_id) {
// This should not happen if the pre-process is working as intended, but in case it doesn't, return a critical error to prevent infinite recursion and similar errors.
- if (global->main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(global->main->error.to, global->thread);
+ if (global->main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(global->main->program.error.to, global->thread);
- fl_print_format("%r%[Invalid %r item index '%]", global->main->error.to, f_string_eol_s, global->main->error.context, is_entry ? controller_entry_s : controller_exit_s, global->main->error.context);
- fl_print_format("%[%un%]", global->main->error.to, global->main->error.notable, entry_action->number, global->main->error.notable);
- fl_print_format("%[' detected.%]%r", global->main->error.to, global->main->error.context, global->main->error.context, f_string_eol_s);
+ fl_print_format("%r%[Invalid %r item index '%]", global->main->program.error.to, f_string_eol_s, global->main->program.error.context, is_entry ? controller_entry_s : controller_exit_s, global->main->program.error.context);
+ fl_print_format("%[%un%]", global->main->program.error.to, global->main->program.error.notable, entry_action->number, global->main->program.error.notable);
+ fl_print_format("%[' detected.%]%r", global->main->program.error.to, global->main->program.error.context, global->main->program.error.context, f_string_eol_s);
- controller_entry_print_error_cache(is_entry, global->main->error, cache->action);
+ controller_entry_print_error_cache(is_entry, global->main->program.error, cache->action);
- controller_unlock_print_flush(global->main->error.to, global->thread);
+ controller_unlock_print_flush(global->main->program.error.to, global->thread);
}
return F_status_is_error(F_critical);
macro_f_number_unsigneds_t_increase_by(status, cache->ats, controller_common_allocation_small_d)
if (F_status_is_error(status)) {
- controller_entry_print_error(is_entry, global->main->error, cache->action, F_status_set_fine(status), "macro_f_number_unsigneds_t_increase_by", F_true, global->thread);
+ controller_entry_print_error(is_entry, global->main->program.error, cache->action, F_status_set_fine(status), "macro_f_number_unsigneds_t_increase_by", F_true, global->thread);
return status;
}
status = f_string_dynamic_append_nulless(entry->items.array[cache->ats.array[at_i]].name, &cache->action.name_item);
if (F_status_is_error(status)) {
- controller_entry_print_error(is_entry, global->main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true, global->thread);
+ controller_entry_print_error(is_entry, global->main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true, global->thread);
return status;
}
- if ((global->main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) || global->main->error.verbosity == f_console_verbosity_verbose_e || global->main->error.verbosity == f_console_verbosity_debug_e) {
- if (global->main->output.verbosity != f_console_verbosity_quiet_e && global->main->error.verbosity != f_console_verbosity_error_e) {
- controller_lock_print(global->main->output.to, global->thread);
+ if ((global->main->program.parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) || global->main->program.error.verbosity == f_console_verbosity_verbose_e || global->main->program.error.verbosity == f_console_verbosity_debug_e) {
+ if (global->main->program.output.verbosity != f_console_verbosity_quiet_e && global->main->program.error.verbosity != f_console_verbosity_error_e) {
+ controller_lock_print(global->main->program.output.to, global->thread);
- fl_print_format("%rProcessing %r item '", global->main->output.to, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s);
- fl_print_format(f_string_format_Q_single_s.string, global->main->output.to, global->main->context.set.title, cache->action.name_item, global->main->context.set.title);
- fl_print_format("'.%r", global->main->output.to, f_string_eol_s);
+ fl_print_format("%rProcessing %r item '", global->main->program.output.to, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s);
+ fl_print_format(f_string_format_Q_single_s.string, global->main->program.output.to, global->main->program.context.set.title, cache->action.name_item, global->main->program.context.set.title);
+ fl_print_format("'.%r", global->main->program.output.to, f_string_eol_s);
- controller_unlock_print_flush(global->main->output.to, global->thread);
+ controller_unlock_print_flush(global->main->program.output.to, global->thread);
}
}
status_lock = controller_lock_write(is_entry, global->thread, &global->thread->lock.rule);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(global->main->error, F_status_set_fine(status_lock), F_false, global->thread);
+ controller_lock_print_error_critical(global->main->program.error, F_status_set_fine(status_lock), F_false, global->thread);
break;
}
f_thread_unlock(&global->thread->lock.rule);
if (F_status_is_error(status)) {
- controller_entry_print_error(is_entry, global->main->error, cache->action, F_status_set_fine(status), "controller_rules_increase", F_true, global->thread);
+ controller_entry_print_error(is_entry, global->main->program.error, cache->action, F_status_set_fine(status), "controller_rules_increase", F_true, global->thread);
return status;
}
status_lock = controller_lock_read(is_entry, global->thread, &global->thread->lock.rule);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(global->main->error, F_status_set_fine(status_lock), F_true, global->thread);
+ controller_lock_print_error_critical(global->main->program.error, F_status_set_fine(status_lock), F_true, global->thread);
break;
}
f_thread_unlock(&global->thread->lock.rule);
- if ((global->main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) || global->main->error.verbosity == f_console_verbosity_verbose_e || global->main->error.verbosity == f_console_verbosity_debug_e || (entry->show == controller_entry_show_init_e && entry_action->type != controller_entry_action_type_consider_e)) {
- if (global->main->output.verbosity != f_console_verbosity_quiet_e && global->main->error.verbosity != f_console_verbosity_error_e) {
- controller_lock_print(global->main->output.to, global->thread);
+ if ((global->main->program.parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) || global->main->program.error.verbosity == f_console_verbosity_verbose_e || global->main->program.error.verbosity == f_console_verbosity_debug_e || (entry->show == controller_entry_show_init_e && entry_action->type != controller_entry_action_type_consider_e)) {
+ if (global->main->program.output.verbosity != f_console_verbosity_quiet_e && global->main->program.error.verbosity != f_console_verbosity_error_e) {
+ controller_lock_print(global->main->program.output.to, global->thread);
- fl_print_format("%r%r %r item rule ", global->main->output.to, f_string_eol_s, entry_action->type == controller_entry_action_type_consider_e ? controller_entry_print_considering_s : controller_entry_print_processing_s, is_entry ? controller_entry_s : controller_exit_s);
- fl_print_format("'%[%Q%]'", global->main->output.to, global->main->context.set.title, alias_rule, global->main->context.set.title);
+ fl_print_format("%r%r %r item rule ", global->main->program.output.to, f_string_eol_s, entry_action->type == controller_entry_action_type_consider_e ? controller_entry_print_considering_s : controller_entry_print_processing_s, is_entry ? controller_entry_s : controller_exit_s);
+ fl_print_format("'%[%Q%]'", global->main->program.output.to, global->main->program.context.set.title, alias_rule, global->main->program.context.set.title);
- if (entry->show == controller_entry_show_init_e && !(global->main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e)) {
- fl_print_format(" [%[%r%]]", global->main->output.to, global->main->context.set.notable, entry_action->code == controller_entry_rule_code_asynchronous_d ? controller_asynchronous_s : controller_synchronous_s, global->main->context.set.notable);
+ if (entry->show == controller_entry_show_init_e && !(global->main->program.parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e)) {
+ fl_print_format(" [%[%r%]]", global->main->program.output.to, global->main->program.context.set.notable, entry_action->code == controller_entry_rule_code_asynchronous_d ? controller_asynchronous_s : controller_synchronous_s, global->main->program.context.set.notable);
if (entry_action->code == controller_entry_rule_code_wait_d) {
- fl_print_format(" [%[%r%]]", global->main->output.to, global->main->context.set.notable, controller_wait_s, global->main->context.set.notable);
+ fl_print_format(" [%[%r%]]", global->main->program.output.to, global->main->program.context.set.notable, controller_wait_s, global->main->program.context.set.notable);
}
if (entry_action->code == controller_entry_rule_code_require_d) {
- fl_print_format(" [%[%r%]]", global->main->output.to, global->main->context.set.notable, controller_required_s, global->main->context.set.notable);
+ fl_print_format(" [%[%r%]]", global->main->program.output.to, global->main->program.context.set.notable, controller_required_s, global->main->program.context.set.notable);
}
}
- fl_print_format(".%r", global->main->output.to, f_string_eol_s);
+ fl_print_format(".%r", global->main->program.output.to, f_string_eol_s);
- controller_unlock_print_flush(global->main->output.to, global->thread);
+ controller_unlock_print_flush(global->main->program.output.to, global->thread);
}
}
cache->action.line_item = cache_line_item;
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(global->main->error, F_status_set_fine(status_lock), F_false, global->thread);
+ controller_lock_print_error_critical(global->main->program.error, F_status_set_fine(status_lock), F_false, global->thread);
break;
}
}
if (F_status_is_error(status)) {
- if (global->main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(global->main->error.to, global->thread);
+ if (global->main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(global->main->program.error.to, global->thread);
- controller_entry_print_error_cache(is_entry, global->main->error, cache->action);
+ controller_entry_print_error_cache(is_entry, global->main->program.error, cache->action);
- controller_unlock_print_flush(global->main->error.to, global->thread);
+ controller_unlock_print_flush(global->main->program.error.to, global->thread);
}
// Designate the action as failed.
entry_action->status = F_status_set_error(F_failure);
- if (!(global->main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e)) {
+ if (!(global->main->program.parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e)) {
f_thread_unlock(&global->thread->lock.rule);
if (entry_action->code & controller_entry_rule_code_require_d) {
options_force = 0;
options_process = 0;
- if (global->main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) {
+ if (global->main->program.parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) {
options_process |= controller_process_option_simulate_d;
}
options_process |= controller_process_option_wait_d;
}
- if (global->main->parameters.array[controller_parameter_validate_e].result & f_console_result_found_e) {
+ if (global->main->program.parameters.array[controller_parameter_validate_e].result & f_console_result_found_e) {
options_process |= controller_process_option_validate_d;
}
if (entry_action->code & controller_entry_rule_code_asynchronous_d) {
- if (!(global->main->parameters.array[controller_parameter_validate_e].result & f_console_result_found_e)) {
+ if (!(global->main->program.parameters.array[controller_parameter_validate_e].result & f_console_result_found_e)) {
options_force |= controller_process_option_asynchronous_d;
}
break;
}
- if (F_status_is_error(status) && !(global->main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) && (entry_action->code & controller_entry_rule_code_require_d)) {
+ if (F_status_is_error(status) && !(global->main->program.parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) && (entry_action->code & controller_entry_rule_code_require_d)) {
return F_status_set_error(F_require);
}
}
}
else if (entry_action->type == controller_entry_action_type_execute_e) {
- if ((global->main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) || global->main->error.verbosity == f_console_verbosity_verbose_e || global->main->error.verbosity == f_console_verbosity_debug_e || entry->show == controller_entry_show_init_e) {
- if (global->main->output.verbosity != f_console_verbosity_quiet_e && global->main->error.verbosity != f_console_verbosity_error_e) {
- controller_lock_print(global->main->output.to, global->thread);
+ if ((global->main->program.parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) || global->main->program.error.verbosity == f_console_verbosity_verbose_e || global->main->program.error.verbosity == f_console_verbosity_debug_e || entry->show == controller_entry_show_init_e) {
+ if (global->main->program.output.verbosity != f_console_verbosity_quiet_e && global->main->program.error.verbosity != f_console_verbosity_error_e) {
+ controller_lock_print(global->main->program.output.to, global->thread);
- fl_print_format("%r%Q is executing '", global->main->output.to, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s);
+ fl_print_format("%r%Q is executing '", global->main->program.output.to, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s);
for (f_number_unsigned_t k = 0; k < entry_action->parameters.used; ++k) {
- fl_print_format(f_string_format_Q_single_s.string, global->main->output.to, global->main->context.set.title, entry_action->parameters.array[k], global->main->context.set.title);
+ fl_print_format(f_string_format_Q_single_s.string, global->main->program.output.to, global->main->program.context.set.title, entry_action->parameters.array[k], global->main->program.context.set.title);
if (k + 1 < entry_action->parameters.used) {
- f_print_dynamic_raw(f_string_space_s, global->main->output.to);
+ f_print_dynamic_raw(f_string_space_s, global->main->program.output.to);
}
} // for
- fl_print_format("'.%r", global->main->output.to, f_string_eol_s);
+ fl_print_format("'.%r", global->main->program.output.to, f_string_eol_s);
- controller_unlock_print_flush(global->main->output.to, global->thread);
+ controller_unlock_print_flush(global->main->program.output.to, global->thread);
}
}
- if (global->main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) return F_execute;
+ if (global->main->program.parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) return F_execute;
controller_thread_process_cancel(*global, is_entry, is_entry ? controller_thread_cancel_execute_e : controller_thread_cancel_exit_execute_e);
if (F_status_is_error(status)) {
if (F_status_set_fine(status) == F_file_found_not) {
- if (global->main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(global->main->error.to, global->thread);
+ if (global->main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(global->main->program.error.to, global->thread);
- fl_print_format("%r%[%QExecution failed, unable to find program or script '%]", global->main->error.to, f_string_eol_s, global->main->error.context, global->main->error.prefix, global->main->error.context);
- fl_print_format(f_string_format_Q_single_s.string, global->main->error.to, global->main->error.notable, entry_action->parameters.array[0], global->main->error.notable);
- fl_print_format(f_string_format_sentence_end_quote_s.string, global->main->error.to, global->main->error.context, global->main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QExecution failed, unable to find program or script '%]", global->main->program.error.to, f_string_eol_s, global->main->program.error.context, global->main->program.error.prefix, global->main->program.error.context);
+ fl_print_format(f_string_format_Q_single_s.string, global->main->program.error.to, global->main->program.error.notable, entry_action->parameters.array[0], global->main->program.error.notable);
+ fl_print_format(f_string_format_sentence_end_quote_s.string, global->main->program.error.to, global->main->program.error.context, global->main->program.error.context, f_string_eol_s);
- controller_entry_print_error_cache(is_entry, global->main->error, cache->action);
+ controller_entry_print_error_cache(is_entry, global->main->program.error, cache->action);
- controller_unlock_print_flush(global->main->error.to, global->thread);
+ controller_unlock_print_flush(global->main->program.error.to, global->thread);
}
}
else {
- controller_entry_print_error(is_entry, global->main->error, cache->action, F_status_set_fine(status), "fll_execute_into", F_true, global->thread);
+ controller_entry_print_error(is_entry, global->main->program.error, cache->action, F_status_set_fine(status), "fll_execute_into", F_true, global->thread);
}
return F_status_set_error(F_execute);
}
else if (result != 0) {
- if (global->main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(global->main->error.to, global->thread);
+ if (global->main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(global->main->program.error.to, global->thread);
- fl_print_format("%r%[%QExecution failed with return value of '%]", global->main->error.to, f_string_eol_s, global->main->error.context, global->main->error.prefix, global->main->error.context);
- fl_print_format("%[%i%]", global->main->error.to, global->main->error.notable, result, global->main->error.notable);
- fl_print_format("$['.%]%r", global->main->error.to, global->main->error.context, global->main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QExecution failed with return value of '%]", global->main->program.error.to, f_string_eol_s, global->main->program.error.context, global->main->program.error.prefix, global->main->program.error.context);
+ fl_print_format("%[%i%]", global->main->program.error.to, global->main->program.error.notable, result, global->main->program.error.notable);
+ fl_print_format("$['.%]%r", global->main->program.error.to, global->main->program.error.context, global->main->program.error.context, f_string_eol_s);
- controller_entry_print_error_cache(is_entry, global->main->error, cache->action);
+ controller_entry_print_error_cache(is_entry, global->main->program.error, cache->action);
- controller_unlock_print_flush(global->main->error.to, global->thread);
+ controller_unlock_print_flush(global->main->program.error.to, global->thread);
}
return F_status_set_error(F_execute);
else if (entry_action->type == controller_entry_action_type_failsafe_e) {
if (failsafe) {
- if (global->main->warning.verbosity == f_console_verbosity_debug_e) {
- controller_lock_print(global->main->warning.to, global->thread);
+ if (global->main->program.warning.verbosity == f_console_verbosity_debug_e) {
+ controller_lock_print(global->main->program.warning.to, global->thread);
- fl_print_format("%r%[%QFailsafe may not be specified when running in failsafe, ignoring.%]%r", global->main->warning.to, f_string_eol_s, global->main->warning.context, global->main->warning.prefix, global->main->warning.context, f_string_eol_s);
+ fl_print_format("%r%[%QFailsafe may not be specified when running in failsafe, ignoring.%]%r", global->main->program.warning.to, f_string_eol_s, global->main->program.warning.context, global->main->program.warning.prefix, global->main->program.warning.context, f_string_eol_s);
- controller_entry_print_error_cache(is_entry, global->main->warning, cache->action);
+ controller_entry_print_error_cache(is_entry, global->main->program.warning, cache->action);
- controller_unlock_print_flush(global->main->warning.to, global->thread);
+ controller_unlock_print_flush(global->main->program.warning.to, global->thread);
}
}
else {
if (entry_action->number == 0 || entry_action->number >= entry->items.used) {
// This should not happen if the pre-process is working as designed, but in case it doesn't, return a critical error to prevent infinite recursion and similar errors.
- if (global->main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(global->main->error.to, global->thread);
+ if (global->main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(global->main->program.error.to, global->thread);
- fl_print_format("%r%[%QInvalid %r item index '%]", global->main->error.to, f_string_eol_s, global->main->error.context, global->main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global->main->error.context);
- fl_print_format("%[%un%]", global->main->error.to, global->main->error.notable, entry_action->number, global->main->error.notable);
- fl_print_format("%[' detected.%]%r", global->main->error.to, global->main->error.context, global->main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QInvalid %r item index '%]", global->main->program.error.to, f_string_eol_s, global->main->program.error.context, global->main->program.error.prefix, is_entry ? controller_entry_s : controller_exit_s, global->main->program.error.context);
+ fl_print_format("%[%un%]", global->main->program.error.to, global->main->program.error.notable, entry_action->number, global->main->program.error.notable);
+ fl_print_format("%[' detected.%]%r", global->main->program.error.to, global->main->program.error.context, global->main->program.error.context, f_string_eol_s);
- controller_entry_print_error_cache(is_entry, global->main->error, cache->action);
+ controller_entry_print_error_cache(is_entry, global->main->program.error, cache->action);
- controller_unlock_print_flush(global->main->error.to, global->thread);
+ controller_unlock_print_flush(global->main->program.error.to, global->thread);
}
return F_status_is_error(F_critical);
status = f_string_dynamic_append_nulless(entry->items.array[cache->ats.array[at_i]].name, &cache->action.name_item);
if (F_status_is_error(status)) {
- controller_entry_print_error(is_entry, global->main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true, global->thread);
+ controller_entry_print_error(is_entry, global->main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true, global->thread);
break;
}
}
// Check to see if any required processes failed, but do not do this if already operating in failsafe.
- if (F_status_is_error_not(status) && !failsafe && !(global->main->parameters.array[controller_parameter_validate_e].result & f_console_result_found_e) && global->setting->mode != controller_setting_mode_helper_e) {
+ if (F_status_is_error_not(status) && !failsafe && !(global->main->program.parameters.array[controller_parameter_validate_e].result & f_console_result_found_e) && global->setting->mode != controller_setting_mode_helper_e) {
const f_status_t status_wait = controller_rule_wait_all(*global, is_entry, F_true);
if (F_status_is_error(status_wait)) return status_wait;
if (status_wait == F_require) return F_status_set_error(F_require);
}
- if (((global->main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) && global->main->error.verbosity > f_console_verbosity_quiet_e) && global->main->error.verbosity != f_console_verbosity_error_e || global->main->error.verbosity == f_console_verbosity_verbose_e) {
- controller_lock_print(global->main->output.to, global->thread);
+ if (((global->main->program.parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) && global->main->program.error.verbosity > f_console_verbosity_quiet_e) && global->main->program.error.verbosity != f_console_verbosity_error_e || global->main->program.error.verbosity == f_console_verbosity_verbose_e) {
+ controller_lock_print(global->main->program.output.to, global->thread);
- fl_print_format("%rDone processing %r item '", global->main->output.to, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s);
- fl_print_format(f_string_format_r_single_s.string, global->main->output.to, global->main->context.set.title, controller_main_s, global->main->context.set.title);
- fl_print_format("'.%r", global->main->output.to, f_string_eol_s);
+ fl_print_format("%rDone processing %r item '", global->main->program.output.to, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s);
+ fl_print_format(f_string_format_r_single_s.string, global->main->program.output.to, global->main->program.context.set.title, controller_main_s, global->main->program.context.set.title);
+ fl_print_format("'.%r", global->main->program.output.to, f_string_eol_s);
// failsafe should not print the extra newline because the failure exit from controller_main should handle this.
if (!failsafe) {
- f_print_dynamic_raw(f_string_eol_s, global->main->output.to);
+ f_print_dynamic_raw(f_string_eol_s, global->main->program.output.to);
}
- controller_unlock_print_flush(global->main->output.to, global->thread);
+ controller_unlock_print_flush(global->main->program.output.to, global->thread);
}
return status;
status = fll_fss_basic_list_read(cache->buffer_file, state, &range, &cache->object_items, &cache->content_items, &cache->delimits, 0, &cache->comments);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "fll_fss_basic_list_read", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "fll_fss_basic_list_read", F_true);
}
else {
status = f_fss_apply_delimit(state, cache->delimits, &cache->buffer_file);
if (F_status_is_error(status)) {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "f_fss_apply_delimit", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "f_fss_apply_delimit", F_true, global.thread);
}
}
}
else {
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(global.main->error.to, global.thread);
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(global.main->program.error.to, global.thread);
- fll_print_format("%r%[%QThe %r file is empty.%]%r", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : is_entry ? controller_entry_s : controller_exit_s, global.main->error.context, f_string_eol_s);
+ fll_print_format("%r%[%QThe %r file is empty.%]%r", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, is_entry ? controller_entry_s : is_entry ? controller_entry_s : controller_exit_s, global.main->program.error.context, f_string_eol_s);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
}
status = F_status_set_error(F_data_not);
status = controller_entry_items_increase_by(cache->object_items.used, &entry->items);
if (F_status_is_error(status)) {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "controller_entry_items_increase_by", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "controller_entry_items_increase_by", F_true, global.thread);
}
else {
status = controller_entry_items_increase_by(controller_common_allocation_small_d, &entry->items);
if (F_status_is_error(status)) {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "controller_entry_items_increase_by", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "controller_entry_items_increase_by", F_true, global.thread);
break;
}
status = f_string_dynamic_partial_append(cache->buffer_file, cache->object_items.array[i], &cache->action.name_item);
if (F_status_is_error(status)) {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append", F_true, global.thread);
break;
}
- status = f_fss_count_lines(cache->buffer_file, cache->object_items.array[i].start, &cache->action.line_item, &setting->state);
+ status = f_fss_count_lines(cache->buffer_file, cache->object_items.array[i].start, &cache->action.line_item, &global.main->setting.state);
if (F_status_is_error(status)) {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "f_fss_count_lines", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "f_fss_count_lines", F_true, global.thread);
break;
}
for (j = (code & 0x1) ? 1 : 0; j < entry->items.used; ++j) {
if (f_compare_dynamic(entry->items.array[j].name, cache->action.name_item) == F_equal_to) {
- if (global.main->warning.verbosity == f_console_verbosity_debug_e) {
- controller_lock_print(global.main->warning.to, global.thread);
+ if (global.main->program.warning.verbosity == f_console_verbosity_debug_e) {
+ controller_lock_print(global.main->program.warning.to, global.thread);
- fl_print_format("%r%[%QIgnoring duplicate %r item '%]", global.main->warning.to, f_string_eol_s, global.main->warning.context, global.main->warning.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->warning.context);
- fl_print_format(f_string_format_Q_single_s.string, global.main->warning.to, global.main->warning.notable, cache->action.name_file, global.main->warning.notable);
- fl_print_format(f_string_format_sentence_end_quote_s.string, global.main->warning.to, global.main->warning.context, global.main->warning.context, f_string_eol_s);
+ fl_print_format("%r%[%QIgnoring duplicate %r item '%]", global.main->program.warning.to, f_string_eol_s, global.main->program.warning.context, global.main->program.warning.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->program.warning.context);
+ fl_print_format(f_string_format_Q_single_s.string, global.main->program.warning.to, global.main->program.warning.notable, cache->action.name_file, global.main->program.warning.notable);
+ fl_print_format(f_string_format_sentence_end_quote_s.string, global.main->program.warning.to, global.main->program.warning.context, global.main->program.warning.context, f_string_eol_s);
- controller_entry_print_error_cache(is_entry, global.main->warning, cache->action);
+ controller_entry_print_error_cache(is_entry, global.main->program.warning, cache->action);
- controller_unlock_print_flush(global.main->warning.to, global.thread);
+ controller_unlock_print_flush(global.main->program.warning.to, global.thread);
}
code |= 0x2;
else {
// skip position 0, which is reserved for "main".
- entry->items.array[0].name.used = 0;
+ entry->items.array[0].key.used = 0;
at = 1;
entry->items.used = 2;
status = f_string_dynamic_append_nulless(cache->action.name_item, &entry->items.array[at].name);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true);
break;
}
if (F_status_is_error(status)) {
if (F_status_set_fine(status) != F_interrupt) {
- controller_lock_print(global.main->error.to, global.thread);
+ controller_lock_print(global.main->program.error.to, global.thread);
- controller_entry_print_error_cache(is_entry, global.main->error, cache->action);
+ controller_entry_print_error_cache(is_entry, global.main->program.error, cache->action);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
}
if (F_status_set_fine(status) == F_memory_not) {
cache->action.name_item.used = 0;
if (!(code & 0x1)) {
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(global.main->error.to, global.thread);
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(global.main->program.error.to, global.thread);
- fl_print_format("%r%[%QThe required %r item '%]", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context);
- fl_print_format(f_string_format_r_single_s.string, global.main->error.to, global.main->error.notable, controller_main_s, global.main->error.notable);
- fl_print_format("%[' is not found.%]%r", global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QThe required %r item '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->program.error.context);
+ fl_print_format(f_string_format_r_single_s.string, global.main->program.error.to, global.main->program.error.notable, controller_main_s, global.main->program.error.notable);
+ fl_print_format("%[' is not found.%]%r", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
}
status = F_status_set_error(F_found_not);
cache->action.line_action = action->line;
cache->action.line_item = entry->items.array[i].line;
- status = f_string_dynamic_append_nulless(entry->items.array[i].name, &cache->action.name_item);
+ status = f_string_dynamic_append_nulless(entry->items.array[i].key, &cache->action.name_item);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true);
break;
}
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(global.main->error.to, global.thread);
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(global.main->program.error.to, global.thread);
- fl_print_format("%r%[%QThe required %r item '%]", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context);
- fl_print_format(f_string_format_Q_single_s.string, global.main->error.to, global.main->error.notable, action->parameters.array[0], global.main->error.notable);
- fl_print_format("%[' does not exist.%]%r", global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QThe required %r item '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->program.error.context);
+ fl_print_format(f_string_format_Q_single_s.string, global.main->program.error.to, global.main->program.error.notable, action->parameters.array[0], global.main->program.error.notable);
+ fl_print_format("%[' does not exist.%]%r", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
- controller_entry_print_error_cache(is_entry, global.main->error, cache->action);
+ controller_entry_print_error_cache(is_entry, global.main->program.error, cache->action);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
}
action->number = 0;
if (F_status_is_error(status)) {
if (F_status_set_fine(status) != F_interrupt) {
- controller_entry_print_error_cache(is_entry, global.main->error, cache->action);
+ controller_entry_print_error_cache(is_entry, global.main->program.error, cache->action);
}
entry->status = controller_status_simplify_error(F_status_set_fine(status));
f_state_t state = macro_f_state_t_initialize_1(controller_common_allocation_large_d, controller_common_allocation_small_d, F_okay, 0, 0, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0);
f_range_t range = content_range;
- status = fll_fss_extended_read(cache->buffer_file, state, &range, &cache->object_actions, &cache->content_actions, 0, 0, &cache->delimits, 0);
+ status = 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_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "fll_fss_extended_read", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "fll_fss_extended_read", F_true, global.thread);
return status;
}
}
if (F_status_is_error(status)) {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "f_fss_apply_delimit", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "f_fss_apply_delimit", F_true, global.thread);
return status;
}
cache->action.line_action = 0;
- status = f_fss_count_lines(cache->buffer_file, cache->object_actions.array[i].start, &cache->action.line_action, &setting->state);
+ status = f_fss_count_lines(cache->buffer_file, cache->object_actions.array[i].start, &cache->action.line_action, &global->setting->state);
if (F_status_is_error(status)) {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "f_fss_count_lines", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "f_fss_count_lines", F_true, global.thread);
break;
}
status = f_rip_dynamic_partial_nulless(cache->buffer_file, cache->object_actions.array[i], &cache->action.name_action);
if (F_status_is_error(status)) {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "f_rip_dynamic_partial_nulless", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "f_rip_dynamic_partial_nulless", F_true, global.thread);
break;
}
global.setting->control.flag |= controller_control_flag_readonly_e;
}
else {
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(global.main->error.to, global.thread);
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(global.main->program.error.to, global.thread);
- fl_print_format("%r%[%QThe %r item setting '%]", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context);
- fl_print_format(f_string_format_Q_single_s.string, global.main->error.to, global.main->error.notable, controller_control_s, global.main->error.notable);
- fl_print_format("%[' does not support the option '%]", global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QThe %r item setting '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->program.error.context);
+ fl_print_format(f_string_format_Q_single_s.string, global.main->program.error.to, global.main->program.error.notable, controller_control_s, global.main->program.error.notable);
+ fl_print_format("%[' does not support the option '%]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
- fl_print_format(f_string_format_Q_range_single_s.string, global.main->error.to, global.main->error.notable, cache->buffer_file, cache->content_actions.array[i].array[1], global.main->error.notable);
+ fl_print_format(f_string_format_Q_range_single_s.string, global.main->program.error.to, global.main->program.error.notable, cache->buffer_file, cache->content_actions.array[i].array[1], global.main->program.error.notable);
- fl_print_format(f_string_format_sentence_end_quote_s.string, global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format(f_string_format_sentence_end_quote_s.string, global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
- controller_entry_print_error_cache(is_entry, global.main->error, cache->action);
+ controller_entry_print_error_cache(is_entry, global.main->program.error, cache->action);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
continue;
}
status = f_rip_dynamic_partial_nulless(cache->buffer_file, cache->content_actions.array[i].array[0], &cache->action.generic);
if (F_status_is_error(status)) {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "f_rip_dynamic_partial_nulless", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "f_rip_dynamic_partial_nulless", F_true, global.thread);
break;
}
status = controller_path_canonical_relative(global.setting, cache->action.generic, &global.setting->path_control);
if (F_status_is_error(status)) {
- controller_entry_print_error_file(is_entry, global.main->error, cache->action, F_status_set_fine(status), "controller_path_canonical_relative", F_true, cache->action.generic, f_file_operation_analyze_s, fll_error_file_type_path_e, global.thread);
+ controller_entry_print_error_file(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "controller_path_canonical_relative", F_true, cache->action.generic, f_file_operation_analyze_s, fll_error_file_type_path_e, global.thread);
continue;
}
status = F_status_set_fine(status);
if (status == F_exist_not) {
- controller_entry_setting_read_print_error_with_range(is_entry, global.main->error, " has an invalid group", cache->content_actions.array[i].array[0], ", because no group was found by that name", global.thread, cache);
+ controller_entry_setting_read_print_error_with_range(is_entry, global.main->program.error, " has an invalid group", cache->content_actions.array[i].array[0], ", because no group was found by that name", global.thread, cache);
}
else if (status == F_number_too_large) {
- controller_entry_setting_read_print_error_with_range(is_entry, global.main->error, " has an invalid group", cache->content_actions.array[i].array[0], ", because the given ID is too large", global.thread, cache);
+ controller_entry_setting_read_print_error_with_range(is_entry, global.main->program.error, " has an invalid group", cache->content_actions.array[i].array[0], ", because the given ID is too large", global.thread, cache);
}
else if (status == F_number) {
- controller_entry_setting_read_print_error_with_range(is_entry, global.main->error, " has an invalid group", cache->content_actions.array[i].array[0], ", because the given ID is not a valid supported number", global.thread, cache);
+ controller_entry_setting_read_print_error_with_range(is_entry, global.main->program.error, " has an invalid group", cache->content_actions.array[i].array[0], ", because the given ID is not a valid supported number", global.thread, cache);
}
else {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "controller_get_id_group", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "controller_get_id_group", F_true, global.thread);
}
continue;
status = f_rip_dynamic_partial_nulless(cache->buffer_file, cache->content_actions.array[i].array[0], &cache->action.generic);
if (F_status_is_error(status)) {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "f_rip_dynamic_partial_nulless", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "f_rip_dynamic_partial_nulless", F_true, global.thread);
break;
}
status = f_file_mode_from_string(cache->action.generic, global.main->umask, &mode_file, &replace);
if (F_status_is_error(status)) {
- controller_entry_setting_read_print_error_with_range(is_entry, global.main->error, " has an unsupported mode", cache->content_actions.array[i].array[0], ", because the format is unknown or contains invalid data", global.thread, cache);
+ controller_entry_setting_read_print_error_with_range(is_entry, global.main->program.error, " has an unsupported mode", cache->content_actions.array[i].array[0], ", because the format is unknown or contains invalid data", global.thread, cache);
continue;
}
status = f_file_mode_to_mode(mode_file, &mode);
if (F_status_is_error(status)) {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "f_file_mode_to_mode", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "f_file_mode_to_mode", F_true, global.thread);
continue;
}
status = F_status_set_fine(status);
if (status == F_exist_not) {
- controller_entry_setting_read_print_error_with_range(is_entry, global.main->error, " has an invalid user", cache->content_actions.array[i].array[0], ", because no user was found by that name", global.thread, cache);
+ controller_entry_setting_read_print_error_with_range(is_entry, global.main->program.error, " has an invalid user", cache->content_actions.array[i].array[0], ", because no user was found by that name", global.thread, cache);
}
else if (status == F_number_too_large) {
- controller_entry_setting_read_print_error_with_range(is_entry, global.main->error, " has an invalid user", cache->content_actions.array[i].array[0], ", because the given ID is too large", global.thread, cache);
+ controller_entry_setting_read_print_error_with_range(is_entry, global.main->program.error, " has an invalid user", cache->content_actions.array[i].array[0], ", because the given ID is too large", global.thread, cache);
}
else if (status == F_number) {
- controller_entry_setting_read_print_error_with_range(is_entry, global.main->error, " has an invalid user", cache->content_actions.array[i].array[0], ", because the given ID is not a valid supported number", global.thread, cache);
+ controller_entry_setting_read_print_error_with_range(is_entry, global.main->program.error, " has an invalid user", cache->content_actions.array[i].array[0], ", because the given ID is not a valid supported number", global.thread, cache);
}
else {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "controller_get_id_user", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "controller_get_id_user", F_true, global.thread);
}
continue;
status = controller_entry_settings_read_map(cache->buffer_file, cache->content_actions.array[i], &entry->define);
if (F_status_is_error(status)) {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "controller_entry_settings_read_map", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "controller_entry_settings_read_map", F_true, global.thread);
continue;
}
status = controller_entry_settings_read_map(cache->buffer_file, cache->content_actions.array[i], &entry->parameter);
if (F_status_is_error(status)) {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "controller_entry_settings_read_map", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "controller_entry_settings_read_map", F_true, global.thread);
continue;
}
continue;
}
- if (global.main->parameters.array[controller_parameter_pid_e].result & f_console_result_value_e) {
+ if (global.main->program.parameters.array[controller_parameter_pid_e].result & f_console_result_value_e) {
controller_entry_settings_read_print_setting_ignored(global, is_entry, *cache, i);
}
else {
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_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "f_rip_dynamic_partial_nulless", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "f_rip_dynamic_partial_nulless", F_true, global.thread);
continue;
}
status = controller_path_canonical_relative(global.setting, cache->action.generic, &global.setting->path_pid);
if (F_status_is_error(status)) {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "controller_path_canonical_relative", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "controller_path_canonical_relative", F_true, global.thread);
continue;
}
*time = time_previous;
if (F_status_set_fine(status) == F_memory_not) {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "fl_conversion_dynamic_partial_to_unsigned_detect", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->program.error, cache->action, F_status_set_fine(status), "fl_conversion_dynamic_partial_to_unsigned_detect", F_true, global.thread);
continue;
}
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
- f_file_stream_lock(global.main->error.to);
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ f_file_stream_lock(global.main->program.error.to);
- fl_print_format("%r%[%QThe %r setting '%]", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context);
- fl_print_format(f_string_format_Q_range_single_s.string, global.main->error.to, global.main->error.notable, cache->buffer_file, cache->content_actions.array[i].array[1], global.main->error.notable);
- fl_print_format("%[' is not a valid supported number.%]", global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QThe %r setting '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->program.error.context);
+ fl_print_format(f_string_format_Q_range_single_s.string, global.main->program.error.to, global.main->program.error.notable, cache->buffer_file, cache->content_actions.array[i].array[1], global.main->program.error.notable);
+ fl_print_format("%[' is not a valid supported number.%]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
- f_file_stream_unlock(global.main->error.to);
+ f_file_stream_unlock(global.main->program.error.to);
}
}
}
else {
- if (global.main->warning.verbosity == f_console_verbosity_debug_e) {
+ if (global.main->program.warning.verbosity == f_console_verbosity_debug_e) {
controller_entry_settings_read_print_setting_unknown_action(global, is_entry, *cache);
}
controller_entry_t * const entry = is_entry ? &global.setting->entry : &global.setting->exit;
- controller_lock_print(global.main->output.to, global.thread);
+ controller_lock_print(global.main->program.output.to, global.thread);
const f_string_static_t *string = 0;
f_number_unsigned_t i = 0;
f_number_unsigned_t j = 0;
- fl_print_format("%r%Q %[%Q%] {%r", global.main->output.to.stream, f_string_eol_s, is_entry ? controller_Entry_s : controller_Exit_s, global.main->context.set.title, controller_settings_s, global.main->context.set.title, f_string_eol_s);
+ fl_print_format("%r%Q %[%Q%] {%r", global.main->program.output.to, f_string_eol_s, is_entry ? controller_Entry_s : controller_Exit_s, global.main->program.context.set.title, controller_settings_s, global.main->program.context.set.title, f_string_eol_s);
// Mode.
string = &f_string_empty_s;
}
- fl_print_format(" %[%r%]", global.main->output.to.stream, global.main->context.set.important, controller_mode_s, global.main->context.set.important, f_string_eol_s);
+ fl_print_format(" %[%r%]", global.main->program.output.to, global.main->program.context.set.important, controller_mode_s, global.main->program.context.set.important, f_string_eol_s);
if (string->used) {
- fl_print_format(" %r", global.main->output.to.stream, *string);
+ fl_print_format(" %r", global.main->program.output.to, *string);
}
- fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+ fl_print_format("%r", global.main->program.output.to, f_string_eol_s);
// Session.
string = &f_string_empty_s;
}
- fl_print_format(" %[%r%]", global.main->output.to.stream, global.main->context.set.important, controller_session_s, global.main->context.set.important, f_string_eol_s);
+ fl_print_format(" %[%r%]", global.main->program.output.to, global.main->program.context.set.important, controller_session_s, global.main->program.context.set.important, f_string_eol_s);
if (string->used) {
- fl_print_format(" %r", global.main->output.to.stream, *string, f_string_eol_s);
+ fl_print_format(" %r", global.main->program.output.to, *string, f_string_eol_s);
}
- fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+ fl_print_format("%r", global.main->program.output.to, f_string_eol_s);
// Show.
string = &f_string_empty_s;
}
- fl_print_format(" %[%r%]", global.main->output.to.stream, global.main->context.set.important, controller_show_s, global.main->context.set.important, f_string_eol_s);
+ fl_print_format(" %[%r%]", global.main->program.output.to, global.main->program.context.set.important, controller_show_s, global.main->program.context.set.important, f_string_eol_s);
if (string->used) {
- fl_print_format(" %r", global.main->output.to.stream, *string, f_string_eol_s);
+ fl_print_format(" %r", global.main->program.output.to, *string, f_string_eol_s);
}
- fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+ fl_print_format("%r", global.main->program.output.to, f_string_eol_s);
// Pid.
string = &f_string_empty_s;
}
- fl_print_format(" %[%r%]", global.main->output.to.stream, global.main->context.set.important, controller_pid_s, global.main->context.set.important);
+ fl_print_format(" %[%r%]", global.main->program.output.to, global.main->program.context.set.important, controller_pid_s, global.main->program.context.set.important);
if (string->used) {
- fl_print_format(" %r", global.main->output.to.stream, *string);
+ fl_print_format(" %r", global.main->program.output.to, *string);
}
- fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+ fl_print_format("%r", global.main->program.output.to, f_string_eol_s);
// Pid File.
- fl_print_format(" %[%r%]", global.main->output.to.stream, global.main->context.set.important, controller_pid_file_s, global.main->context.set.important);
+ fl_print_format(" %[%r%]", global.main->program.output.to, global.main->program.context.set.important, controller_pid_file_s, global.main->program.context.set.important);
if (global.setting->path_pid.used) {
- fl_print_format(" %r", global.main->output.to.stream, global.setting->path_pid);
+ fl_print_format(" %r", global.main->program.output.to, global.setting->path_pid);
}
- fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+ fl_print_format("%r", global.main->program.output.to, f_string_eol_s);
// Control.
- fl_print_format(" %[%r%]", global.main->output.to.stream, global.main->context.set.important, controller_control_s, global.main->context.set.important);
+ fl_print_format(" %[%r%]", global.main->program.output.to, global.main->program.context.set.important, controller_control_s, global.main->program.context.set.important);
if (global.setting->path_control.used) {
- fl_print_format(" %Q", global.main->output.to.stream, global.setting->path_control);
+ fl_print_format(" %Q", global.main->program.output.to, global.setting->path_control);
}
- fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+ fl_print_format("%r", global.main->program.output.to, f_string_eol_s);
// Control Has.
- fl_print_format(" %[%r%]", global.main->output.to.stream, global.main->context.set.important, controller_control_has_s, global.main->context.set.important);
+ fl_print_format(" %[%r%]", global.main->program.output.to, global.main->program.context.set.important, controller_control_has_s, global.main->program.context.set.important);
if (global.setting->control.flag & controller_control_flag_readonly_e) {
- fl_print_format(" %r", global.main->output.to.stream, controller_readonly_s);
+ fl_print_format(" %r", global.main->program.output.to, controller_readonly_s);
}
- fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+ fl_print_format("%r", global.main->program.output.to, f_string_eol_s);
// Control User.
- fl_print_format(" %[%r%]", global.main->output.to.stream, global.main->context.set.important, controller_control_user_s, global.main->context.set.important);
+ fl_print_format(" %[%r%]", global.main->program.output.to, global.main->program.context.set.important, controller_control_user_s, global.main->program.context.set.important);
if (global.setting->control.flag & controller_control_flag_has_user_e) {
- fl_print_format(" %u", global.main->output.to.stream, (unsigned int) global.setting->control.user);
+ fl_print_format(" %u", global.main->program.output.to, (unsigned int) global.setting->control.user);
}
- fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+ fl_print_format("%r", global.main->program.output.to, f_string_eol_s);
// Control Group.
- fl_print_format(" %[%r%]", global.main->output.to.stream, global.main->context.set.important, controller_control_group_s, global.main->context.set.important);
+ fl_print_format(" %[%r%]", global.main->program.output.to, global.main->program.context.set.important, controller_control_group_s, global.main->program.context.set.important);
if (global.setting->control.flag & controller_control_flag_has_group_e) {
- fl_print_format(" %u", global.main->output.to.stream, (unsigned int) global.setting->control.group);
+ fl_print_format(" %u", global.main->program.output.to, (unsigned int) global.setting->control.group);
}
- fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+ fl_print_format("%r", global.main->program.output.to, f_string_eol_s);
// Control Mode.
- fl_print_format(" %[%r%]", global.main->output.to.stream, global.main->context.set.important, controller_control_mode_s, global.main->context.set.important);
+ fl_print_format(" %[%r%]", global.main->program.output.to, global.main->program.context.set.important, controller_control_mode_s, global.main->program.context.set.important);
if (F_status_is_error_not(status)) {
if (global.setting->control.flag & controller_control_flag_has_group_e) {
- fl_print_format(" %@05u", global.main->output.to.stream, (unsigned int) global.setting->control.mode);
+ fl_print_format(" %@05u", global.main->program.output.to, (unsigned int) global.setting->control.mode);
}
}
- fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+ fl_print_format("%r", global.main->program.output.to, f_string_eol_s);
// Timeout: Exit.
- fl_print_format(" %[%r%] %r", global.main->output.to.stream, global.main->context.set.important, controller_timeout_s, global.main->context.set.important, controller_exit_s);
+ fl_print_format(" %[%r%] %r", global.main->program.output.to, global.main->program.context.set.important, controller_timeout_s, global.main->program.context.set.important, controller_exit_s);
if (!(entry->flag & controller_entry_flag_timeout_exit_no_e)) {
- fl_print_format(" %ul", global.main->output.to.stream, entry->timeout_exit, f_string_eol_s);
+ fl_print_format(" %ul", global.main->program.output.to, entry->timeout_exit, f_string_eol_s);
}
- fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+ fl_print_format("%r", global.main->program.output.to, f_string_eol_s);
// Timeout: Kill.
- fl_print_format(" %[%r%] %r", global.main->output.to.stream, global.main->context.set.important, controller_timeout_s, global.main->context.set.important, controller_kill_s);
+ fl_print_format(" %[%r%] %r", global.main->program.output.to, global.main->program.context.set.important, controller_timeout_s, global.main->program.context.set.important, controller_kill_s);
if (!(entry->flag & controller_entry_flag_timeout_kill_no_e)) {
- fl_print_format(" %ul", global.main->output.to.stream, entry->timeout_kill, f_string_eol_s);
+ fl_print_format(" %ul", global.main->program.output.to, entry->timeout_kill, f_string_eol_s);
}
- fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+ fl_print_format("%r", global.main->program.output.to, f_string_eol_s);
// Timeout: Start.
- fl_print_format(" %[%r%] %r", global.main->output.to.stream, global.main->context.set.important, controller_timeout_s, global.main->context.set.important, controller_start_s);
+ fl_print_format(" %[%r%] %r", global.main->program.output.to, global.main->program.context.set.important, controller_timeout_s, global.main->program.context.set.important, controller_start_s);
if (!(entry->flag & controller_entry_flag_timeout_start_no_e)) {
- fl_print_format(" %ul", global.main->output.to.stream, entry->timeout_start, f_string_eol_s);
+ fl_print_format(" %ul", global.main->program.output.to, entry->timeout_start, f_string_eol_s);
}
- fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+ fl_print_format("%r", global.main->program.output.to, f_string_eol_s);
// Timeout: Stop.
- fl_print_format(" %[%r%] %r", global.main->output.to.stream, global.main->context.set.important, controller_timeout_s, global.main->context.set.important, controller_stop_s);
+ fl_print_format(" %[%r%] %r", global.main->program.output.to, global.main->program.context.set.important, controller_timeout_s, global.main->program.context.set.important, controller_stop_s);
if (!(entry->flag & controller_entry_flag_timeout_stop_no_e)) {
- fl_print_format(" %ul", global.main->output.to.stream, entry->timeout_stop, f_string_eol_s);
+ fl_print_format(" %ul", global.main->program.output.to, entry->timeout_stop, f_string_eol_s);
}
- fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+ fl_print_format("%r", global.main->program.output.to, f_string_eol_s);
// Define.
- fl_print_format(" %[%r%] {%r", global.main->output.to.stream, global.main->context.set.important, controller_define_s, global.main->context.set.important, f_string_eol_s);
+ fl_print_format(" %[%r%] {%r", global.main->program.output.to, global.main->program.context.set.important, controller_define_s, global.main->program.context.set.important, f_string_eol_s);
for (i = 0; i < entry->define.used; ++i) {
- fl_print_format(" %Q %Q%r", global.main->output.to.stream, entry->define.array[i].key, entry->define.array[i].value, f_string_eol_s);
+ fl_print_format(" %Q %Q%r", global.main->program.output.to, entry->define.array[i].key, entry->define.array[i].value, f_string_eol_s);
} // for
- fl_print_format(" }%r", global.main->output.to.stream, f_string_eol_s, f_string_eol_s);
+ fl_print_format(" }%r", global.main->program.output.to, f_string_eol_s, f_string_eol_s);
// Parameter.
- fl_print_format(" %[%r%] {%r", global.main->output.to.stream, global.main->context.set.important, controller_parameter_s, global.main->context.set.important, f_string_eol_s);
+ fl_print_format(" %[%r%] {%r", global.main->program.output.to, global.main->program.context.set.important, controller_parameter_s, global.main->program.context.set.important, f_string_eol_s);
for (i = 0; i < entry->parameter.used; ++i) {
- fl_print_format(" %Q %Q%r", global.main->output.to.stream, entry->parameter.array[i].key, entry->parameter.array[i].value, f_string_eol_s);
+ fl_print_format(" %Q %Q%r", global.main->program.output.to, entry->parameter.array[i].key, entry->parameter.array[i].value, f_string_eol_s);
} // for
- fl_print_format(" }%r", global.main->output.to.stream, f_string_eol_s);
+ fl_print_format(" }%r", global.main->program.output.to, f_string_eol_s);
- fl_print_format("}%r", global.main->output.to.stream, f_string_eol_s);
+ fl_print_format("}%r", global.main->program.output.to, f_string_eol_s);
// Entry Items.
for (i = 0; i < entry->items.used; ++i) {
- fl_print_format("%r%Q %Q %[%Q%] {%r", global.main->output.to.stream, f_string_eol_s, is_entry ? controller_Entry_s : controller_Exit_s, controller_Item_s, global.main->context.set.title, entry->items.array[i].key, global.main->context.set.title, f_string_eol_s);
+ fl_print_format("%r%Q %Q %[%Q%] {%r", global.main->program.output.to, f_string_eol_s, is_entry ? controller_Entry_s : controller_Exit_s, controller_Item_s, global.main->program.context.set.title, entry->items.array[i].key, global.main->program.context.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", global.main->output.to.stream, global.main->context.set.important, controller_action_s, global.main->context.set.important, f_string_eol_s);
+ fl_print_format(" %[%r%] {%r", global.main->program.output.to, global.main->program.context.set.important, controller_action_s, global.main->program.context.set.important, f_string_eol_s);
// Item Type.
string = &f_string_empty_s;
}
- fl_print_format(" %[%r%] %r%r", global.main->output.to.stream, global.main->context.set.important, controller_type_s, global.main->context.set.important, *string, f_string_eol_s);
+ fl_print_format(" %[%r%] %r%r", global.main->program.output.to, global.main->program.context.set.important, controller_type_s, global.main->program.context.set.important, *string, f_string_eol_s);
// Item Code (How).
- fl_print_format(" %[%r%]", global.main->output.to.stream, global.main->context.set.important, controller_how_s, global.main->context.set.important);
+ fl_print_format(" %[%r%]", global.main->program.output.to, global.main->program.context.set.important, controller_how_s, global.main->program.context.set.important);
if (action->code) {
if (action->code == controller_entry_rule_code_asynchronous_d) {
- fl_print_format(" %r", global.main->output.to.stream, controller_asynchronous_s);
+ fl_print_format(" %r", global.main->program.output.to, controller_asynchronous_s);
}
if (action->type == controller_entry_rule_code_require_d) {
- fl_print_format(" %r", global.main->output.to.stream, controller_require_s);
+ fl_print_format(" %r", global.main->program.output.to, controller_require_s);
}
if (action->type == controller_entry_rule_code_wait_d) {
- fl_print_format(" %r", global.main->output.to.stream, controller_wait_s);
+ fl_print_format(" %r", global.main->program.output.to, controller_wait_s);
}
}
- fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+ fl_print_format("%r", global.main->program.output.to, f_string_eol_s);
// Parameters.
if (action->type == controller_entry_action_type_item_e) {
- fl_print_format(" %[%r%]", global.main->output.to.stream, global.main->context.set.important, controller_item_s, global.main->context.set.important);
+ fl_print_format(" %[%r%]", global.main->program.output.to, global.main->program.context.set.important, controller_item_s, global.main->program.context.set.important);
if (action->parameters.used && action->parameters.array[0].used) {
- fl_print_format(" %Q", global.main->output.to.stream, action->parameters.array[0], f_string_eol_s);
+ fl_print_format(" %Q", global.main->program.output.to, action->parameters.array[0], f_string_eol_s);
}
- fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+ fl_print_format("%r", global.main->program.output.to, f_string_eol_s);
}
else if (raw) {
for (k = 0; k < action->parameters.used; ++k) {
- fl_print_format(" %[%r%] %Q%r", global.main->output.to.stream, global.main->context.set.important, controller_parameter_s, global.main->context.set.important, action->parameters.array[k], f_string_eol_s);
+ fl_print_format(" %[%r%] %Q%r", global.main->program.output.to, global.main->program.context.set.important, controller_parameter_s, global.main->program.context.set.important, action->parameters.array[k], f_string_eol_s);
} // for
}
else {
// Parameter, Directory.
- fl_print_format(" %[%r%]", global.main->output.to.stream, global.main->context.set.important, controller_directory_s, global.main->context.set.important);
+ fl_print_format(" %[%r%]", global.main->program.output.to, global.main->program.context.set.important, controller_directory_s, global.main->program.context.set.important);
if (action->parameters.used && action->parameters.array[0].used) {
- fl_print_format(" %Q", global.main->output.to.stream, action->parameters.array[0], f_string_eol_s);
+ fl_print_format(" %Q", global.main->program.output.to, action->parameters.array[0], f_string_eol_s);
}
- fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+ fl_print_format("%r", global.main->program.output.to, f_string_eol_s);
// Parameter, File.
- fl_print_format(" %[%r%]", global.main->output.to.stream, global.main->context.set.important, controller_file_s, global.main->context.set.important);
+ fl_print_format(" %[%r%]", global.main->program.output.to, global.main->program.context.set.important, controller_file_s, global.main->program.context.set.important);
if (action->parameters.used && action->parameters.array[0].used > 1) {
- fl_print_format(" %Q", global.main->output.to.stream, action->parameters.array[1], f_string_eol_s);
+ fl_print_format(" %Q", global.main->program.output.to, action->parameters.array[1], f_string_eol_s);
}
- fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+ fl_print_format("%r", global.main->program.output.to, f_string_eol_s);
}
- fl_print_format(" }%r", global.main->output.to.stream, f_string_eol_s);
+ fl_print_format(" }%r", global.main->program.output.to, f_string_eol_s);
} // for
- fl_print_format("}%r", global.main->output.to.stream, f_string_eol_s);
+ fl_print_format("}%r", global.main->program.output.to, f_string_eol_s);
} // for
}
- controller_unlock_print_flush(global.main->output.to, global.thread);
+ controller_unlock_print_flush(global.main->program.output.to, global.thread);
}
#endif // _di_controller_entry_setting_validate_
#ifndef _di_controller_entry_preprocess_print_simulate_setting_value_
void controller_entry_preprocess_print_simulate_setting_value(const controller_global_t global, const bool is_entry, const f_string_static_t name, const f_string_static_t name_sub, const f_string_static_t value, const f_string_static_t suffix) {
- if (global.main->error.verbosity != f_console_verbosity_debug_e && !(global.main->error.verbosity == f_console_verbosity_verbose_e && global.main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e)) {
+ if (global.main->program.error.verbosity != f_console_verbosity_debug_e && !(global.main->program.error.verbosity == f_console_verbosity_verbose_e && global.main->program.parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e)) {
return;
}
- controller_lock_print(global.main->output.to, global.thread);
+ controller_lock_print(global.main->program.output.to, global.thread);
- fl_print_format("%rProcessing %r item action '", global.main->output.to, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s);
+ fl_print_format("%rProcessing %r item action '", global.main->program.output.to, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s);
- fl_print_format("%[%Q%]' setting ", global.main->output.to, global.main->context.set.title, name, global.main->context.set.title);
+ fl_print_format("%[%Q%]' setting ", global.main->program.output.to, global.main->program.context.set.title, name, global.main->program.context.set.title);
if (name_sub.used) {
- fl_print_format("'%[%Q%]'", global.main->output.to, global.main->context.set.notable, name_sub, global.main->context.set.notable);
+ fl_print_format("'%[%Q%]'", global.main->program.output.to, global.main->program.context.set.notable, name_sub, global.main->program.context.set.notable);
}
else {
- fl_print_format("value", global.main->output.to);
+ fl_print_format("value", global.main->program.output.to);
}
- fl_print_format(" to '%[%Q%]", global.main->output.to, global.main->context.set.important, value, global.main->context.set.important);
+ fl_print_format(" to '%[%Q%]", global.main->program.output.to, global.main->program.context.set.important, value, global.main->program.context.set.important);
- fl_print_format("'%Q.%r", global.main->output.to, suffix, f_string_eol_s);
+ fl_print_format("'%Q.%r", global.main->program.output.to, suffix, f_string_eol_s);
- controller_unlock_print_flush(global.main->output.to, global.thread);
+ controller_unlock_print_flush(global.main->program.output.to, global.thread);
}
#endif // _di_controller_entry_preprocess_print_simulate_setting_value_
// fll_error_print() automatically locks, so manually handle only the mutex locking and flushing rather than calling controller_lock_print().
f_thread_mutex_lock(&thread->lock.print);
- fll_error_print(print, status, function, fallback);
+ fll_error_print(&print, status, function, fallback); // @fixme the print is a const and it is being passed as a pointer; the function needs to change.
f_file_stream_lock(print.to);
// fll_error_file_print() automatically locks, so manually handle only the mutex locking and flushing rather than calling controller_lock_print().
f_thread_mutex_lock(&thread->lock.print);
- fll_error_file_print(print, status, function, flag, name, operation, type);
+ fll_error_file_print(&print, status, function, flag, name, operation, type); // @fixme the print is a const and it is being passed as a pointer; the function needs to change.
f_file_stream_lock(print.to);
#ifndef _di_controller_entry_settings_read_print_setting_ignored_
void controller_entry_settings_read_print_setting_ignored(const controller_global_t global, const bool is_entry, const controller_cache_t cache, const f_number_unsigned_t index) {
- if (global.main->warning.verbosity != f_console_verbosity_debug_e) return;
+ if (global.main->program.warning.verbosity != f_console_verbosity_debug_e) return;
- controller_lock_print(global.main->warning.to, global.thread);
+ controller_lock_print(global.main->program.warning.to, global.thread);
- fl_print_format("%r%[%QThe %Q item setting '%]", global.main->warning.to, f_string_eol_s, global.main->warning.context, global.main->warning.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->warning.context);
- fl_print_format(f_string_format_Q_single_s.string, global.main->warning.to, global.main->warning.notable, cache.action.name_action, global.main->warning.notable);
- fl_print_format("%[' is being ignored.%]%r", global.main->warning.to, global.main->warning.context, global.main->warning.context, f_string_eol_s);
+ fl_print_format("%r%[%QThe %Q item setting '%]", global.main->program.warning.to, f_string_eol_s, global.main->program.warning.context, global.main->program.warning.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->program.warning.context);
+ fl_print_format(f_string_format_Q_single_s.string, global.main->program.warning.to, global.main->program.warning.notable, cache.action.name_action, global.main->program.warning.notable);
+ fl_print_format("%[' is being ignored.%]%r", global.main->program.warning.to, global.main->program.warning.context, global.main->program.warning.context, f_string_eol_s);
- controller_entry_print_error_cache(is_entry, global.main->warning, cache.action);
+ controller_entry_print_error_cache(is_entry, global.main->program.warning, cache.action);
- controller_unlock_print_flush(global.main->warning.to, global.thread);
+ controller_unlock_print_flush(global.main->program.warning.to, global.thread);
}
#endif // _di_controller_entry_settings_read_print_setting_ignored_
#ifndef _di_controller_entry_settings_read_print_setting_requires_between_
void controller_entry_settings_read_print_setting_requires_between(const controller_global_t global, const bool is_entry, const controller_cache_t cache, const f_number_unsigned_t minimum, const f_number_unsigned_t maximum) {
- if (global.main->error.verbosity == f_console_verbosity_quiet_e) return;
+ if (global.main->program.error.verbosity == f_console_verbosity_quiet_e) return;
- controller_lock_print(global.main->error.to, global.thread);
+ controller_lock_print(global.main->program.error.to, global.thread);
- fl_print_format("%r%[%QThe %Q item setting '%]", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context);
- fl_print_format(f_string_format_Q_single_s.string, global.main->error.to, global.main->error.notable, cache.action.name_action, global.main->error.notable);
- fl_print_format("%[' requires at least %]", global.main->error.to, global.main->error.context, global.main->error.context);
- fl_print_format("%[%un%]", global.main->error.to, global.main->error.notable, minimum, global.main->error.notable);
- fl_print_format("%[ and at most %]", global.main->error.to, global.main->error.context, global.main->error.context);
- fl_print_format("%[%un%]", global.main->error.to, global.main->error.notable, maximum, global.main->error.notable);
- fl_print_format("%[ Content.%]%r", global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QThe %Q item setting '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->program.error.context);
+ fl_print_format(f_string_format_Q_single_s.string, global.main->program.error.to, global.main->program.error.notable, cache.action.name_action, global.main->program.error.notable);
+ fl_print_format("%[' requires at least %]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format("%[%un%]", global.main->program.error.to, global.main->program.error.notable, minimum, global.main->program.error.notable);
+ fl_print_format("%[ and at most %]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format("%[%un%]", global.main->program.error.to, global.main->program.error.notable, maximum, global.main->program.error.notable);
+ fl_print_format("%[ Content.%]%r", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
- controller_entry_print_error_cache(is_entry, global.main->error, cache.action);
+ controller_entry_print_error_cache(is_entry, global.main->program.error, cache.action);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
}
#endif // _di_controller_entry_settings_read_print_setting_requires_between_
#ifndef _di_controller_entry_settings_read_print_setting_requires_exactly_
void controller_entry_settings_read_print_setting_requires_exactly(const controller_global_t global, const bool is_entry, const controller_cache_t cache, const f_number_unsigned_t total) {
- if (global.main->error.verbosity == f_console_verbosity_quiet_e) return;
+ if (global.main->program.error.verbosity == f_console_verbosity_quiet_e) return;
- controller_lock_print(global.main->error.to, global.thread);
+ controller_lock_print(global.main->program.error.to, global.thread);
- fl_print_format("%r%[%QThe %Q item setting '%]", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context);
- fl_print_format(f_string_format_Q_single_s.string, global.main->error.to, global.main->error.notable, cache.action.name_action, global.main->error.notable);
- fl_print_format("%[' requires exactly %]", global.main->error.to, global.main->error.context, global.main->error.context);
- fl_print_format("%[%un%]", global.main->error.to, global.main->error.notable, total, global.main->error.notable);
- fl_print_format("%[ Content.%]%r", global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QThe %Q item setting '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->program.error.context);
+ fl_print_format(f_string_format_Q_single_s.string, global.main->program.error.to, global.main->program.error.notable, cache.action.name_action, global.main->program.error.notable);
+ fl_print_format("%[' requires exactly %]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format("%[%un%]", global.main->program.error.to, global.main->program.error.notable, total, global.main->program.error.notable);
+ fl_print_format("%[ Content.%]%r", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
- controller_entry_print_error_cache(is_entry, global.main->error, cache.action);
+ controller_entry_print_error_cache(is_entry, global.main->program.error, cache.action);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
}
#endif // _di_controller_entry_settings_read_print_setting_requires_exactly_
#ifndef _di_controller_entry_settings_read_print_setting_unknown_action_
void controller_entry_settings_read_print_setting_unknown_action(const controller_global_t global, const bool is_entry, const controller_cache_t cache) {
- if (global.main->warning.verbosity != f_console_verbosity_debug_e) return;
+ if (global.main->program.warning.verbosity != f_console_verbosity_debug_e) return;
- controller_lock_print(global.main->warning.to, global.thread);
+ controller_lock_print(global.main->program.warning.to, global.thread);
- fl_print_format("%r%[%QUnknown %r item setting '%]", global.main->warning.to, f_string_eol_s, global.main->warning.context, global.main->warning.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->warning.context);
- fl_print_format(f_string_format_Q_single_s.string, global.main->warning.to, global.main->warning.notable, cache.action.name_action, global.main->warning.notable);
- fl_print_format(f_string_format_sentence_end_quote_s.string, global.main->warning.to, global.main->warning.context, global.main->warning.context, f_string_eol_s);
+ fl_print_format("%r%[%QUnknown %r item setting '%]", global.main->program.warning.to, f_string_eol_s, global.main->program.warning.context, global.main->program.warning.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->program.warning.context);
+ fl_print_format(f_string_format_Q_single_s.string, global.main->program.warning.to, global.main->program.warning.notable, cache.action.name_action, global.main->program.warning.notable);
+ fl_print_format(f_string_format_sentence_end_quote_s.string, global.main->program.warning.to, global.main->program.warning.context, global.main->program.warning.context, f_string_eol_s);
- controller_entry_print_error_cache(is_entry, global.main->warning, cache.action);
+ controller_entry_print_error_cache(is_entry, global.main->program.warning, cache.action);
- controller_unlock_print_flush(global.main->warning.to, global.thread);
+ controller_unlock_print_flush(global.main->program.warning.to, global.thread);
}
#endif // _di_controller_entry_settings_read_print_setting_unknown_action_
#ifndef _di_controller_entry_settings_read_print_setting_unknown_action_value_
void controller_entry_settings_read_print_setting_unknown_action_value(const controller_global_t global, const bool is_entry, const controller_cache_t cache, const f_number_unsigned_t index) {
- if (global.main->warning.verbosity != f_console_verbosity_debug_e) return;
+ if (global.main->program.warning.verbosity != f_console_verbosity_debug_e) return;
- controller_lock_print(global.main->warning.to, global.thread);
+ controller_lock_print(global.main->program.warning.to, global.thread);
- fl_print_format("%r%[%QThe %Q item setting '%]", global.main->warning.to, f_string_eol_s, global.main->warning.context, global.main->warning.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->warning.context);
- fl_print_format(f_string_format_Q_single_s.string, global.main->warning.to, global.main->warning.notable, cache.action.name_action, global.main->warning.notable);
- fl_print_format("%[' has an unknown value '%]", global.main->warning.to, global.main->warning.context, global.main->warning.context);
- fl_print_format(f_string_format_Q_range_single_s.string, global.main->warning.to, global.main->warning.notable, cache.buffer_file, cache.content_actions.array[index].array[0], global.main->warning.notable);
- fl_print_format(f_string_format_sentence_end_quote_s.string, global.main->warning.to, global.main->warning.context, global.main->warning.context, f_string_eol_s);
+ fl_print_format("%r%[%QThe %Q item setting '%]", global.main->program.warning.to, f_string_eol_s, global.main->program.warning.context, global.main->program.warning.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->program.warning.context);
+ fl_print_format(f_string_format_Q_single_s.string, global.main->program.warning.to, global.main->program.warning.notable, cache.action.name_action, global.main->program.warning.notable);
+ fl_print_format("%[' has an unknown value '%]", global.main->program.warning.to, global.main->program.warning.context, global.main->program.warning.context);
+ fl_print_format(f_string_format_Q_range_single_s.string, global.main->program.warning.to, global.main->program.warning.notable, cache.buffer_file, cache.content_actions.array[index].array[0], global.main->program.warning.notable);
+ fl_print_format(f_string_format_sentence_end_quote_s.string, global.main->program.warning.to, global.main->program.warning.context, global.main->program.warning.context, f_string_eol_s);
- controller_entry_print_error_cache(is_entry, global.main->warning, cache.action);
+ controller_entry_print_error_cache(is_entry, global.main->program.warning, cache.action);
- controller_unlock_print_flush(global.main->warning.to, global.thread);
+ controller_unlock_print_flush(global.main->program.warning.to, global.thread);
}
#endif // _di_controller_entry_settings_read_print_setting_unknown_action_value_
#include "controller.h"
-#include "private-common.h"
#ifdef __cplusplus
extern "C" {
#endif
-#ifndef _di_controller_print_help_
- f_status_t controller_print_help(fl_print_t * const print) {
+#ifndef _di_controller_print_message_help_
+ f_status_t controller_print_message_help(fl_print_t * const print) {
if (!print || !print->custom) return F_status_set_error(F_output_not);
return F_okay;
}
-#endif // _di_controller_print_help_
+#endif // _di_controller_print_message_help_
#ifdef __cplusplus
} // extern "C"
/**
* Print help.
*
- * @param setting
- * The main program settings.
- *
- * This does not alter setting.state.status.
* @param print
* The output structure to print to.
*
+ * The print.custom is expected to be of type controller_main_t.
+ *
+ * This does not alter print.custom.setting.state.status.
+ *
* @return
* F_okay on success.
* F_output_not on success, but no printing is performed.
+ *
+ * F_output_not (with error bit) if a parameter is NULL.
*/
-#ifndef _di_controller_print_help_
- extern f_status_t controller_print_help(controller_process_t * const setting, const fl_print_t print);
-#endif // _di_controller_print_help_
+#ifndef _di_controller_print_message_help_
+ extern f_status_t controller_print_message_help(fl_print_t * const print);
+#endif // _di_controller_print_message_help_
#ifdef __cplusplus
} // extern "C"
#endif
status = controller_lock_write(is_normal, global.thread, &global.thread->lock.process);
if (F_status_is_error(status)) {
- controller_lock_print_error_critical(global.main->error, F_status_set_fine(status), F_false, global.thread);
+ controller_lock_print_error_critical(global.main->program.error, F_status_set_fine(status), F_false, global.thread);
}
else {
status = controller_processs_increase(&global.thread->processs);
status = controller_lock_write(is_normal, global.thread, &process->lock);
if (F_status_is_error(status)) {
- controller_lock_print_error_critical(global.main->error, F_status_set_fine(status), F_false, global.thread);
+ controller_lock_print_error_critical(global.main->program.error, F_status_set_fine(status), F_false, global.thread);
}
else {
process->action = action;
status_lock = controller_lock_read_process(process, global.thread, &process->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(global.main->error, F_status_set_fine(status_lock), F_true, global.thread);
+ controller_lock_print_error_critical(global.main->program.error, F_status_set_fine(status_lock), F_true, global.thread);
break;
}
}
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), content ? "f_memory_array_increase_by" : "f_memory_array_increase", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), content ? "f_memory_array_increase_by" : "f_memory_array_increase", F_true);
return status;
}
}
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), content ? "f_memory_array_increase_by" : "f_memory_array_increase", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), content ? "f_memory_array_increase_by" : "f_memory_array_increase", F_true);
return status;
}
status = f_string_dynamic_partial_append_nulless(buffer, *object, &action->parameters.array[0]);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true);
return status;
}
status = f_memory_array_increase_by(content->used, sizeof(f_string_dynamic_t), (void **) &action->parameters.array, &action->parameters.used, &action->parameters.size);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_memory_array_increase_by", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_memory_array_increase_by", F_true);
return status;
}
status = f_memory_array_increase_by(content->used, sizeof(f_iki_data_t), (void **) &action->ikis.array, &action->ikis.used, &action->ikis.size);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_memory_array_increase_by", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_memory_array_increase_by", F_true);
return status;
}
status = f_string_dynamic_partial_append_nulless(buffer, content->array[i], &action->parameters.array[action->parameters.used]);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true);
return status;
}
status = fl_iki_read(&action->parameters.array[action->parameters.used], &range, &action->ikis.array[action->ikis.used], state);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "fl_iki_read", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "fl_iki_read", F_true);
action->parameters.array[action->parameters.used].used = 0;
status = fl_fss_extended_list_content_read(cache->buffer_item, state, range, &cache->content_action, &cache->delimits, &cache->comments);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "fl_fss_extended_list_content_read", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "fl_fss_extended_list_content_read", F_true);
return status;
}
status = f_fss_apply_delimit(state, cache->delimits, &cache->buffer_item);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_fss_apply_delimit", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_fss_apply_delimit", F_true);
return status;
}
status = f_memory_array_increase(controller_common_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)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_memory_array_increase", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_memory_array_increase", F_true);
return status;
}
status = f_memory_array_increase(controller_common_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)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_memory_array_increase", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_memory_array_increase", F_true);
return status;
}
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)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true);
actions->array[actions->used++].status = controller_status_simplify_error(F_status_set_fine(status));
status = 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)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "fl_iki_read", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "fl_iki_read", F_true);
actions->array[actions->used++].status = controller_status_simplify_error(F_status_set_fine(status));
status = fll_fss_extended_read(cache->buffer_item, state, &cache->content_action.array[0], &cache->object_actions, &cache->content_actions, 0, 0, &cache->delimits, 0);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "fll_fss_extended_read", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "fll_fss_extended_read", F_true);
return status;
}
status = f_fss_apply_delimit(state, cache->delimits, &cache->buffer_item);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_fss_apply_delimit", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_fss_apply_delimit", F_true);
return status;
}
status = controller_rule_actions_increase_by(controller_common_allocation_small_d, actions);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "controller_rule_actions_increase_by", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "controller_rule_actions_increase_by", F_true);
return status;
}
status = f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &actions->array[actions->used].line, &setting->state);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_fss_count_lines", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_fss_count_lines", F_true);
return status;
}
status = fl_fss_extended_content_read(cache->buffer_item, state, range, &cache->content_action, 0, &cache->delimits);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "fll_fss_extended_content_read", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "fll_fss_extended_content_read", F_true);
}
else if (status == F_fss_found_content) {
status = f_fss_apply_delimit(state, cache->delimits, &cache->buffer_item);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_fss_apply_delimit", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_fss_apply_delimit", F_true);
}
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);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_rip_dynamic_partial", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_rip_dynamic_partial", F_true);
}
}
else if (type == controller_rule_action_type_rerun_e) {
}
if (!type_rerun) {
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(global.main->error.to, global.thread);
-
- fl_print_format("%r%[%QRule item action '%]", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, global.main->error.context);
- fl_print_format(f_string_format_r_single_s.string, global.main->error.to, global.main->error.notable, controller_rerun_s, global.main->error.notable);
- fl_print_format("%[' has '%]", global.main->error.to, global.main->error.context, global.main->error.context);
- fl_print_format(f_string_format_Q_range_single_s.string, global.main->error.to, global.main->error.notable, cache->buffer_item, cache->content_action.array[0], global.main->error.notable);
- fl_print_format("%[' as the first value, only the following are allowed: '%]", global.main->error.to, global.main->error.context, global.main->error.context);
- fl_print_format("%[%r%]%[', '%]", global.main->error.to, global.main->error.notable, controller_freeze_s, global.main->error.notable, global.main->error.context, global.main->error.context);
- fl_print_format("%[%r%]%[', '%]", global.main->error.to, global.main->error.notable, controller_kill_s, global.main->error.notable, global.main->error.context, global.main->error.context);
- fl_print_format("%[%r%]%[', '%]", global.main->error.to, global.main->error.notable, controller_pause_s, global.main->error.notable, global.main->error.context, global.main->error.context);
- fl_print_format("%[%r%]%[', '%]", global.main->error.to, global.main->error.notable, controller_reload_s, global.main->error.notable, global.main->error.context, global.main->error.context);
- fl_print_format("%[%r%]%[', '%]", global.main->error.to, global.main->error.notable, controller_restart_s, global.main->error.notable, global.main->error.context, global.main->error.context);
- fl_print_format("%[%r%]%[', '%]", global.main->error.to, global.main->error.notable, controller_resume_s, global.main->error.notable, global.main->error.context, global.main->error.context);
- fl_print_format("%[%r%]%[', '%]", global.main->error.to, global.main->error.notable, controller_start_s, global.main->error.notable, global.main->error.context, global.main->error.context);
- fl_print_format("%[%r%]%[', or '%]", global.main->error.to, global.main->error.notable, controller_stop_s, global.main->error.notable, global.main->error.context, global.main->error.context);
- fl_print_format(f_string_format_r_single_s.string, global.main->error.to, global.main->error.notable, controller_thaw_s, global.main->error.notable, global.main->error.context);
- fl_print_format(f_string_format_sentence_end_quote_s.string, global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
-
- controller_rule_print_error_cache(global.main->error, cache->action, F_true);
-
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(global.main->program.error.to, global.thread);
+
+ fl_print_format("%r%[%QRule item action '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, global.main->program.error.context);
+ fl_print_format(f_string_format_r_single_s.string, global.main->program.error.to, global.main->program.error.notable, controller_rerun_s, global.main->program.error.notable);
+ fl_print_format("%[' has '%]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format(f_string_format_Q_range_single_s.string, global.main->program.error.to, global.main->program.error.notable, cache->buffer_item, cache->content_action.array[0], global.main->program.error.notable);
+ fl_print_format("%[' as the first value, only the following are allowed: '%]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format("%[%r%]%[', '%]", global.main->program.error.to, global.main->program.error.notable, controller_freeze_s, global.main->program.error.notable, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format("%[%r%]%[', '%]", global.main->program.error.to, global.main->program.error.notable, controller_kill_s, global.main->program.error.notable, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format("%[%r%]%[', '%]", global.main->program.error.to, global.main->program.error.notable, controller_pause_s, global.main->program.error.notable, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format("%[%r%]%[', '%]", global.main->program.error.to, global.main->program.error.notable, controller_reload_s, global.main->program.error.notable, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format("%[%r%]%[', '%]", global.main->program.error.to, global.main->program.error.notable, controller_restart_s, global.main->program.error.notable, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format("%[%r%]%[', '%]", global.main->program.error.to, global.main->program.error.notable, controller_resume_s, global.main->program.error.notable, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format("%[%r%]%[', '%]", global.main->program.error.to, global.main->program.error.notable, controller_start_s, global.main->program.error.notable, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format("%[%r%]%[', or '%]", global.main->program.error.to, global.main->program.error.notable, controller_stop_s, global.main->program.error.notable, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format(f_string_format_r_single_s.string, global.main->program.error.to, global.main->program.error.notable, controller_thaw_s, global.main->program.error.notable, global.main->program.error.context);
+ fl_print_format(f_string_format_sentence_end_quote_s.string, global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
+
+ controller_rule_print_error_cache(global.main->program.error, cache->action, F_true);
+
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
}
return F_status_set_error(F_valid_not);
}
}
else {
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(global.main->error.to, global.thread);
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(global.main->program.error.to, global.thread);
- fl_print_format("%r%[%QRule item action '%]", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, global.main->error.context);
- fl_print_format(f_string_format_r_single_s.string, global.main->error.to, global.main->error.notable, controller_rerun_s, global.main->error.notable);
- fl_print_format("%[' has '%]", global.main->error.to, global.main->error.context, global.main->error.context);
- fl_print_format(f_string_format_Q_range_single_s.string, global.main->error.to, global.main->error.notable, cache->buffer_item, cache->content_action.array[1], global.main->error.notable);
- fl_print_format("%[' as the second value, only the following are allowed: '%]", global.main->error.to, global.main->error.context, global.main->error.context);
- fl_print_format("%[%r%]%[' or '%]", global.main->error.to, global.main->error.notable, controller_stop_s, global.main->error.notable, global.main->error.context, global.main->error.context);
- fl_print_format(f_string_format_r_single_s.string, global.main->error.to, global.main->error.notable, controller_thaw_s, global.main->error.notable, global.main->error.context);
- fl_print_format(f_string_format_sentence_end_quote_s.string, global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QRule item action '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, global.main->program.error.context);
+ fl_print_format(f_string_format_r_single_s.string, global.main->program.error.to, global.main->program.error.notable, controller_rerun_s, global.main->program.error.notable);
+ fl_print_format("%[' has '%]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format(f_string_format_Q_range_single_s.string, global.main->program.error.to, global.main->program.error.notable, cache->buffer_item, cache->content_action.array[1], global.main->program.error.notable);
+ fl_print_format("%[' as the second value, only the following are allowed: '%]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format("%[%r%]%[' or '%]", global.main->program.error.to, global.main->program.error.notable, controller_stop_s, global.main->program.error.notable, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format(f_string_format_r_single_s.string, global.main->program.error.to, global.main->program.error.notable, controller_thaw_s, global.main->program.error.notable, global.main->program.error.context);
+ fl_print_format(f_string_format_sentence_end_quote_s.string, global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
- controller_rule_print_error_cache(global.main->error, cache->action, F_true);
+ controller_rule_print_error_cache(global.main->program.error, cache->action, F_true);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
}
return F_status_set_error(F_valid_not);
item->reruns[type_rerun].is |= rerun_item == &item->reruns[type_rerun].failure ? controller_rule_rerun_is_failure_reset_d : controller_rule_rerun_is_success_reset_d;
}
else {
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(global.main->error.to, global.thread);
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(global.main->program.error.to, global.thread);
- fl_print_format("%r%[%QRule item action '%]", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, global.main->error.context);
- fl_print_format(f_string_format_r_single_s.string, global.main->error.to, global.main->error.notable, controller_rerun_s, global.main->error.notable);
- fl_print_format("%[' has an unknown value '%]", global.main->error.to, global.main->error.context, global.main->error.context);
- fl_print_format(f_string_format_Q_range_single_s.string, global.main->error.to, global.main->error.notable, cache->buffer_item, cache->content_action.array[i], global.main->error.notable);
- fl_print_format(f_string_format_sentence_end_quote_s.string, global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QRule item action '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, global.main->program.error.context);
+ fl_print_format(f_string_format_r_single_s.string, global.main->program.error.to, global.main->program.error.notable, controller_rerun_s, global.main->program.error.notable);
+ fl_print_format("%[' has an unknown value '%]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format(f_string_format_Q_range_single_s.string, global.main->program.error.to, global.main->program.error.notable, cache->buffer_item, cache->content_action.array[i], global.main->program.error.notable);
+ fl_print_format(f_string_format_sentence_end_quote_s.string, global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
- controller_rule_print_error_cache(global.main->error, cache->action, F_true);
+ controller_rule_print_error_cache(global.main->program.error, cache->action, F_true);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
}
return F_status_set_error(F_valid_not);
item->with &= ~controller_with_session_new_d;
}
else {
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(global.main->error.to, global.thread);
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(global.main->program.error.to, global.thread);
- fl_print_format("%r%[%QUnknown value '%]", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, global.main->error.context);
- fl_print_format(f_string_format_Q_range_single_s.string, global.main->error.to, global.main->error.notable, cache->buffer_item, cache->content_action.array[i], global.main->error.notable);
- fl_print_format("%[' for rule item action '%]%[%r%]", global.main->error.to, global.main->error.context, global.main->error.context, global.main->error.notable, controller_with_s, global.main->error.notable);
- fl_print_format(f_string_format_sentence_end_quote_s.string, global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QUnknown value '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, global.main->program.error.context);
+ fl_print_format(f_string_format_Q_range_single_s.string, global.main->program.error.to, global.main->program.error.notable, cache->buffer_item, cache->content_action.array[i], global.main->program.error.notable);
+ fl_print_format("%[' for rule item action '%]%[%r%]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, global.main->program.error.notable, controller_with_s, global.main->program.error.notable);
+ fl_print_format(f_string_format_sentence_end_quote_s.string, global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
- controller_rule_print_error_cache(global.main->error, cache->action, F_true);
+ controller_rule_print_error_cache(global.main->program.error, cache->action, F_true);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
}
status = F_status_set_error(F_valid_not);
status = f_memory_array_increase(controller_common_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)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_memory_array_increase", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_memory_array_increase", F_true);
return status;
}
status = f_memory_array_increase(controller_common_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)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_memory_array_increase", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_memory_array_increase", F_true);
return status;
}
} // for
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_string_dynamic_partial_mash_nulless", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_string_dynamic_partial_mash_nulless", F_true);
actions->array[actions->used++].status = controller_status_simplify_error(F_status_set_fine(status));
status = 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)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "fl_iki_read", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "fl_iki_read", F_true);
actions->array[actions->used++].status = controller_status_simplify_error(F_status_set_fine(status));
status = f_fss_count_lines(cache->buffer_item, range->start, &actions->array[actions->used].line, &setting->state);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_fss_count_lines", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_fss_count_lines", F_true);
return status;
}
}
if (F_status_is_error_not(status) && status == F_data_not) {
- if (global.main->warning.verbosity == f_console_verbosity_debug_e) {
- controller_lock_print(global.main->warning.to, global.thread);
+ if (global.main->program.warning.verbosity == f_console_verbosity_debug_e) {
+ controller_lock_print(global.main->program.warning.to, global.thread);
- fl_print_format("%r%[%QAction is empty, nothing to do.%]%r", global.main->warning.to, f_string_eol_s, global.main->warning.context, global.main->warning.prefix, global.main->warning.context, f_string_eol_s);
+ fl_print_format("%r%[%QAction is empty, nothing to do.%]%r", global.main->program.warning.to, f_string_eol_s, global.main->program.warning.context, global.main->program.warning.prefix, global.main->program.warning.context, f_string_eol_s);
- controller_rule_print_error_cache(global.main->warning, cache->action, F_true);
+ controller_rule_print_error_cache(global.main->program.warning, cache->action, F_true);
- controller_unlock_print_flush(global.main->warning.to, global.thread);
+ controller_unlock_print_flush(global.main->program.warning.to, global.thread);
}
}
}
if (F_status_is_error(status)) {
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
status = F_status_set_fine(status);
if (status != F_valid_not && status != F_number && status != F_number_decimal && status != F_number_overflow && status != F_number_underflow && status != F_number_negative) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "fl_conversion_dynamic_partial_to_signed_detect", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "fl_conversion_dynamic_partial_to_signed_detect", F_true);
}
else {
- controller_lock_print(global.main->error.to, global.thread);
+ controller_lock_print(global.main->program.error.to, global.thread);
- fl_print_format("%r%[%QRule item action '%]", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, global.main->error.context);
- fl_print_format(f_string_format_r_single_s.string, global.main->error.to, global.main->error.notable, controller_rerun_s, global.main->error.notable);
- fl_print_format("%[' requires a positive whole number or 0 for the '%]", global.main->error.to, global.main->error.context, global.main->error.context);
- fl_print_format("%[%S%]", global.main->error.to, global.main->error.notable, name, global.main->error.notable);
- fl_print_format("%[' value", global.main->error.to, global.main->error.context, global.main->error.context);
+ fl_print_format("%r%[%QRule item action '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, global.main->program.error.context);
+ fl_print_format(f_string_format_r_single_s.string, global.main->program.error.to, global.main->program.error.notable, controller_rerun_s, global.main->program.error.notable);
+ fl_print_format("%[' requires a positive whole number or 0 for the '%]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format("%[%S%]", global.main->program.error.to, global.main->program.error.notable, name, global.main->program.error.notable);
+ fl_print_format("%[' value", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context);
if (*index + 1 == cache->content_action.used) {
- fl_print_format(", but none were given.%]%r", global.main->error.to, global.main->error.context, f_string_eol_s);
+ fl_print_format(", but none were given.%]%r", global.main->program.error.to, global.main->program.error.context, f_string_eol_s);
}
else {
- fl_print_format(", but '%]%[%/Q%]", global.main->error.to, global.main->error.context, global.main->error.notable, cache->buffer_item, cache->content_action.array[*index], global.main->error.notable);
+ fl_print_format(", but '%]%[%/Q%]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.notable, cache->buffer_item, cache->content_action.array[*index], global.main->program.error.notable);
if (status == F_number || status == F_number_decimal) {
- fl_print_format("%[' was given.%]%r", global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format("%[' was given.%]%r", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
}
else if (status == F_number_overflow) {
- fl_print_format("%[' is too large.%]%r", global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format("%[' is too large.%]%r", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
}
else {
- fl_print_format("%[' is negative.%]%r", global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format("%[' is negative.%]%r", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
}
}
- controller_rule_print_error_cache(global.main->error, cache->action, F_true);
+ controller_rule_print_error_cache(global.main->program.error, cache->action, F_true);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
}
}
status = fll_control_group_prepare(process->rule.cgroup);
if (F_status_is_error(status)) {
- controller_print_error_file(global.thread, global.main->error, F_status_set_fine(status), "fll_control_group_prepare", F_true, process->rule.cgroup.path, controller_rule_print_control_groups_prepare_s, fll_error_file_type_directory_e);
+ controller_print_error_file(global.thread, global.main->program.error, F_status_set_fine(status), "fll_control_group_prepare", F_true, process->rule.cgroup.path, controller_rule_print_control_groups_prepare_s, fll_error_file_type_directory_e);
return status;
}
status = fl_environment_load_names(process->rule.environment, &environment);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "fl_environment_load_names", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "fl_environment_load_names", F_true);
return status;
}
status = f_string_dynamic_append(entry->define.array[i].value, &environment.array[k].value);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_string_dynamic_append", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_string_dynamic_append", F_true);
return status;
}
status = f_string_maps_append(entry->define.array[i], &environment);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_string_maps_append", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_string_maps_append", F_true);
return status;
}
status = f_string_dynamic_append(process->rule.define.array[i].value, &environment.array[k].value);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_string_dynamic_append", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_string_dynamic_append", F_true);
return status;
}
status = f_string_maps_append(process->rule.define.array[i], &environment);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_string_maps_append", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_string_maps_append", F_true);
return status;
}
status = f_environment_get_all(&environment);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_environment_get_all", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_environment_get_all", F_true);
return status;
}
status = f_string_maps_append(entry->define.array[i], &environment);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_string_maps_append", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_string_maps_append", F_true);
return status;
}
status = f_string_maps_append(process->rule.define.array[i], &environment);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_string_maps_append", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_string_maps_append", F_true);
return status;
}
status = controller_rule_expand(global, process->rule.items.array[i].actions.array[j], process);
if (F_status_is_error(status)) {
- controller_rule_print_error(global.thread, global.main->error, process->cache.action, F_status_set_fine(status), "controller_rule_expand", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, process->cache.action, F_status_set_fine(status), "controller_rule_expand", F_true, F_false);
break;
}
status = controller_rule_expand(global, process->rule.items.array[i].actions.array[j], process);
if (F_status_is_error(status)) {
- controller_rule_print_error(global.thread, global.main->error, process->cache.action, F_status_set_fine(status), "controller_rule_expand", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, process->cache.action, F_status_set_fine(status), "controller_rule_expand", F_true, F_false);
break;
}
status = controller_rule_execute_foreground(process->rule.items.array[i].type, process->rule.engine, process->rule.engine_arguments, options, &execute_set, process);
}
else {
- status = controller_rule_execute_foreground(process->rule.items.array[i].type, *global.main->default_engine, process->rule.engine_arguments, options, &execute_set, process);
+ status = controller_rule_execute_foreground(process->rule.items.array[i].type, *global.main->setting.default_engine, process->rule.engine_arguments, options, &execute_set, process);
}
if (status == F_child || F_status_set_fine(status) == F_lock) break;
status = controller_rule_expand(global, process->rule.items.array[i].actions.array[j], process);
if (F_status_is_error(status)) {
- controller_rule_print_error(global.thread, global.main->error, process->cache.action, F_status_set_fine(status), "controller_rule_expand", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, process->cache.action, F_status_set_fine(status), "controller_rule_expand", F_true, F_false);
break;
}
else {
success = F_status_set_error(F_failure);
- controller_rule_action_print_error_missing_pid(global.main->error, process->rule.alias);
+ controller_rule_action_print_error_missing_pid(global.main->program.error, process->rule.alias);
}
}
else if (process->rule.items.array[i].type == controller_rule_item_type_utility_e) {
status = controller_rule_expand(global, process->rule.items.array[i].actions.array[j], process);
if (F_status_is_error(status)) {
- controller_rule_print_error(global.thread, global.main->error, process->cache.action, F_status_set_fine(status), "controller_rule_expand", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, process->cache.action, F_status_set_fine(status), "controller_rule_expand", F_true, F_false);
break;
}
}
do {
- status = controller_rule_execute_pid_with(process->rule.items.array[i].pid_file, process->rule.items.array[i].type, process->rule.engine.used ? process->rule.engine : *global.main->default_engine, process->rule.engine_arguments, options, process->rule.items.array[i].with, &execute_set, process);
+ status = controller_rule_execute_pid_with(process->rule.items.array[i].pid_file, process->rule.items.array[i].type, process->rule.engine.used ? process->rule.engine : *global.main->setting.default_engine, process->rule.engine_arguments, options, process->rule.items.array[i].with, &execute_set, process);
if (status == F_child || F_status_set_fine(status) == F_interrupt || F_status_set_fine(status) == F_lock) break;
if (F_status_is_error(status) && F_status_set_fine(status) != F_failure) break;
else {
success = F_status_set_error(F_failure);
- controller_rule_action_print_error_missing_pid(global.main->error, process->rule.alias);
+ controller_rule_action_print_error_missing_pid(global.main->program.error, process->rule.alias);
}
}
else {
- if (global.main->warning.verbosity == f_console_verbosity_debug_e) {
- controller_lock_print(global.main->warning.to, global.thread);
+ if (global.main->program.warning.verbosity == f_console_verbosity_debug_e) {
+ controller_lock_print(global.main->program.warning.to, global.thread);
- fl_print_format("%r%[%QAction type is unknown, ignoring.%]%r", global.main->warning.to, f_string_eol_s, global.main->warning.context, global.main->warning.prefix, global.main->warning.context, f_string_eol_s);
+ fl_print_format("%r%[%QAction type is unknown, ignoring.%]%r", global.main->program.warning.to, f_string_eol_s, global.main->program.warning.context, global.main->program.warning.prefix, global.main->program.warning.context, f_string_eol_s);
- controller_rule_print_error_cache(global.main->warning, process->cache.action, F_true);
+ controller_rule_print_error_cache(global.main->program.warning, process->cache.action, F_true);
- controller_unlock_print_flush(global.main->warning.to, global.thread);
+ controller_unlock_print_flush(global.main->program.warning.to, global.thread);
}
if (success == F_false) {
status = controller_pids_increase(&process->childs);
if (F_status_is_error(status)) {
- controller_print_error(thread, main->error, F_status_set_fine(status), "controller_pids_increase", F_true);
+ controller_print_error(thread, main->program.error, F_status_set_fine(status), "controller_pids_increase", F_true);
return status;
}
}
if (options & controller_process_option_simulate_d) {
- if (main->output.verbosity != f_console_verbosity_quiet_e) {
- controller_lock_print(main->output.to, thread);
+ if (main->program.output.verbosity != f_console_verbosity_quiet_e) {
+ controller_lock_print(main->program.output.to, thread);
- fl_print_format("%rSimulating execution of '%[", main->output.to, f_string_eol_s, main->context.set.title);
+ fl_print_format("%rSimulating execution of '%[", main->program.output.to, f_string_eol_s, main->program.context.set.title);
if (program.used) {
- f_print_dynamic_safely(program, main->output.to);
+ f_print_dynamic_safely(program, main->program.output.to);
}
else {
- f_print_dynamic_safely(arguments.array[0], main->output.to);
+ f_print_dynamic_safely(arguments.array[0], main->program.output.to);
}
- fl_print_format("%]' with the arguments: '%[", main->output.to, main->context.set.title, main->context.set.important);
+ fl_print_format("%]' with the arguments: '%[", main->program.output.to, main->program.context.set.title, main->program.context.set.important);
for (f_number_unsigned_t i = program.used ? 0 : 1; i < arguments.used; ++i) {
if (program.used && i || !program.used && i > 1) {
- f_print_dynamic_raw(f_string_space_s, main->output.to);
+ f_print_dynamic_raw(f_string_space_s, main->program.output.to);
}
- f_print_dynamic_safely(arguments.array[i], main->output.to);
+ f_print_dynamic_safely(arguments.array[i], main->program.output.to);
} // for
- fl_print_format("%]' from '", main->output.to, main->context.set.important);
- fl_print_format("%[%Q%]'.%r", main->output.to, main->context.set.notable, process->rule.name, main->context.set.notable, f_string_eol_s);
+ fl_print_format("%]' from '", main->program.output.to, main->program.context.set.important);
+ fl_print_format("%[%Q%]'.%r", main->program.output.to, main->program.context.set.notable, process->rule.name, main->program.context.set.notable, f_string_eol_s);
- controller_unlock_print_flush(main->output.to, thread);
+ controller_unlock_print_flush(main->program.output.to, thread);
}
// Sleep for less than a second to better show simulation of synchronous vs asynchronous.
if (F_status_set_fine(status) != F_interrupt) {
fl_execute_parameter_t simulated_parameter = macro_fl_execute_parameter_t_initialize_1(execute_set->parameter.option, execute_set->parameter.wait, process->rule.has & controller_rule_has_environment_d ? execute_set->parameter.environment : 0, execute_set->parameter.signals, &f_string_empty_s);
- status = fll_execute_program(*main->default_engine, process->rule.engine_arguments, &simulated_parameter, &execute_set->as, (void *) &result);
+ status = fll_execute_program(*main->setting.default_engine, process->rule.engine_arguments, &simulated_parameter, &execute_set->as, (void *) &result);
}
}
else {
status_lock = controller_lock_write_process(process, thread, &process->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(main->error, F_status_set_fine(status_lock), F_false, thread);
+ controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status_lock), F_false, thread);
if (F_status_set_fine(status_lock) != F_interrupt) {
status = controller_lock_read_process(process, thread, &process->lock);
status_lock = controller_lock_read_process(process, thread, &process->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(main->error, F_status_set_fine(status_lock), F_true, thread);
+ controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status_lock), F_true, thread);
}
if (F_status_set_fine(status_lock) != F_interrupt) {
status_lock = controller_lock_write_process(process, thread, &process->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(main->error, F_status_set_fine(status_lock), F_false, thread);
+ controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status_lock), F_false, thread);
if (F_status_set_fine(status_lock) != F_interrupt) {
status = controller_lock_read_process(process, thread, &process->lock);
status_lock = controller_lock_read_process(process, thread, &process->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(main->error, F_status_set_fine(status_lock), F_true, thread);
+ controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status_lock), F_true, thread);
return F_status_set_error(F_lock);
}
}
}
else {
- main->child = result.status;
+ main->program.child = result.status;
if (!controller_thread_is_enabled_process(process, thread)) {
return F_status_set_error(F_interrupt);
controller_rule_item_print_error_execute(type == controller_rule_item_type_script_e, program.used ? program : arguments.array[0], status, process);
}
else {
- controller_print_error(thread, main->error, F_status_set_fine(status), "fll_execute_program", F_true);
+ controller_print_error(thread, main->program.error, F_status_set_fine(status), "fll_execute_program", F_true);
}
status = F_status_set_error(status);
status = controller_pids_increase(&process->childs);
if (F_status_is_error(status)) {
- controller_print_error(thread, main->error, F_status_set_fine(status), "controller_pids_increase", F_true);
+ controller_print_error(thread, main->program.error, F_status_set_fine(status), "controller_pids_increase", F_true);
return status;
}
status = f_memory_array_increase(controller_common_allocation_small_d, sizeof(f_string_dynamic_t), (void **) &process->path_pids.array, &process->path_pids.used, &process->path_pids.size);
if (F_status_is_error(status)) {
- controller_print_error(thread, main->error, F_status_set_fine(status), "f_memory_array_increase", F_true);
+ controller_print_error(thread, main->program.error, F_status_set_fine(status), "f_memory_array_increase", F_true);
return status;
}
status = f_file_exists(pid_file, F_true);
if (F_status_is_error(status)) {
- controller_print_error_file(thread, main->error, F_status_set_fine(status), "f_file_exists", F_true, pid_file, f_file_operation_find_s, fll_error_file_type_file_e);
+ controller_print_error_file(thread, main->program.error, F_status_set_fine(status), "f_file_exists", F_true, pid_file, f_file_operation_find_s, fll_error_file_type_file_e);
return status;
}
if (status == F_true) {
- controller_print_error_file(thread, main->error, F_file_found, "f_file_exists", F_true, pid_file, f_file_operation_find_s, fll_error_file_type_file_e);
+ controller_print_error_file(thread, main->program.error, F_file_found, "f_file_exists", F_true, pid_file, f_file_operation_find_s, fll_error_file_type_file_e);
return F_status_set_error(F_file_found);
}
status = f_string_dynamic_append_nulless(pid_file, child_pid_file);
if (F_status_is_error(status)) {
- controller_print_error(thread, main->error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true);
+ controller_print_error(thread, main->program.error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true);
return status;
}
if (options & controller_process_option_simulate_d) {
- if (main->error.verbosity > f_console_verbosity_error_e) {
- controller_lock_print(main->error.to, thread);
+ if (main->program.error.verbosity > f_console_verbosity_error_e) {
+ controller_lock_print(main->program.error.to, thread);
- fl_print_format("%rSimulating execution of '%[", main->error.to, f_string_eol_s, main->context.set.title);
+ fl_print_format("%rSimulating execution of '%[", main->program.error.to, f_string_eol_s, main->program.context.set.title);
if (program.used) {
- f_print_dynamic_safely(program, main->error.to);
+ f_print_dynamic_safely(program, main->program.error.to);
}
else {
- f_print_dynamic_safely(arguments.array[0], main->error.to);
+ f_print_dynamic_safely(arguments.array[0], main->program.error.to);
}
- fl_print_format("%]' with the arguments: '%[", main->error.to, main->context.set.title, main->context.set.important);
+ fl_print_format("%]' with the arguments: '%[", main->program.error.to, main->program.context.set.title, main->program.context.set.important);
for (f_number_unsigned_t i = program.used ? 0 : 1; i < arguments.used; ++i) {
if (program.used && i || !program.used && i > 1) {
- f_print_dynamic_raw(f_string_space_s, main->error.to);
+ f_print_dynamic_raw(f_string_space_s, main->program.error.to);
}
- f_print_dynamic_safely(arguments.array[i], main->error.to);
+ f_print_dynamic_safely(arguments.array[i], main->program.error.to);
} // for
- fl_print_format("%]' from '", main->error.to, main->context.set.important);
- fl_print_format("%[%Q%]'.%r", main->error.to, main->context.set.notable, process->rule.name, main->context.set.notable, f_string_eol_s);
+ fl_print_format("%]' from '", main->program.error.to, main->program.context.set.important);
+ fl_print_format("%[%Q%]'.%r", main->program.error.to, main->program.context.set.notable, process->rule.name, main->program.context.set.notable, f_string_eol_s);
- controller_unlock_print_flush(main->error.to, thread);
+ controller_unlock_print_flush(main->program.error.to, thread);
}
// Sleep for less than a second to better show simulation of synchronous vs asynchronous.
const f_string_statics_t simulated_arguments = f_string_statics_t_initialize;
fl_execute_parameter_t simulated_parameter = macro_fl_execute_parameter_t_initialize_1(execute_set->parameter.option, execute_set->parameter.wait, process->rule.has & controller_rule_has_environment_d ? execute_set->parameter.environment : 0, execute_set->parameter.signals, &f_string_empty_s);
- status = fll_execute_program(*main->default_engine, simulated_arguments, &simulated_parameter, &execute_set->as, (void *) &result);
+ status = fll_execute_program(*main->setting.default_engine, simulated_arguments, &simulated_parameter, &execute_set->as, (void *) &result);
}
}
else {
status_lock = controller_lock_write_process(process, thread, &process->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(main->error, F_status_set_fine(status_lock), F_false, thread);
+ controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status_lock), F_false, thread);
if (F_status_set_fine(status_lock) != F_interrupt) {
status = controller_lock_read_process(process, thread, &process->lock);
status_lock = controller_lock_read_process(process, thread, &process->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(main->error, F_status_set_fine(status_lock), F_true, thread);
+ controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status_lock), F_true, thread);
}
if (F_status_set_fine(status_lock) != F_interrupt) {
status_lock = controller_lock_write_process(process, thread, &process->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(main->error, F_status_set_fine(status_lock), F_false, thread);
+ controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status_lock), F_false, thread);
if (F_status_set_fine(status_lock) != F_interrupt) {
status = controller_lock_read_process(process, thread, &process->lock);
status_lock = controller_lock_read_process(process, thread, &process->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(main->error, F_status_set_fine(status_lock), F_true, thread);
+ controller_lock_print_error_critical(&main->program.error, F_status_set_fine(status_lock), F_true, thread);
return F_status_set_error(F_lock);
}
}
}
else {
- main->child = result.status;
+ main->program.child = result.status;
if (!controller_thread_is_enabled_process(process, thread)) {
return F_status_set_error(F_interrupt);
controller_rule_item_print_error_execute(type == controller_rule_item_type_utility_e, program.used ? program : arguments.array[0], status, process);
}
else {
- controller_print_error(thread, main->error, F_status_set_fine(status), "fll_execute_program", F_true);
+ controller_print_error(thread, main->program.error, F_status_set_fine(status), "fll_execute_program", F_true);
}
return F_status_set_error(status);
if (!controller_thread_is_enabled_process(process, thread)) return -2;
if (!rerun_item->max || rerun_item->count < rerun_item->max) {
- if (main->error.verbosity == f_console_verbosity_debug_e) {
- controller_lock_print(main->output.to, thread);
+ if (main->program.error.verbosity == f_console_verbosity_debug_e) {
+ controller_lock_print(main->program.output.to, thread);
- fl_print_format("%rRe-running '", main->output.to, f_string_eol_s);
- fl_print_format("%[%r%]' '", main->output.to, main->context.set.title, process->rule.alias, main->context.set.title);
- fl_print_format("%[%r%]' with a ", main->output.to, main->context.set.notable, controller_rule_action_execute_type_name(action), main->context.set.notable);
- fl_print_format("%[%r%] of ", main->output.to, main->context.set.notable, controller_delay_s, main->context.set.notable);
- fl_print_format("%[%ul%] MegaTime", main->output.to, main->context.set.notable, rerun_item->delay, main->context.set.notable);
+ fl_print_format("%rRe-running '", main->program.output.to, f_string_eol_s);
+ fl_print_format("%[%r%]' '", main->program.output.to, main->program.context.set.title, process->rule.alias, main->program.context.set.title);
+ fl_print_format("%[%r%]' with a ", main->program.output.to, main->program.context.set.notable, controller_rule_action_execute_type_name(action), main->program.context.set.notable);
+ fl_print_format("%[%r%] of ", main->program.output.to, main->program.context.set.notable, controller_delay_s, main->program.context.set.notable);
+ fl_print_format("%[%ul%] MegaTime", main->program.output.to, main->program.context.set.notable, rerun_item->delay, main->program.context.set.notable);
if (rerun_item->max) {
- fl_print_format(" for %[%ul%]", main->output.to, main->context.set.notable, rerun_item->count, main->context.set.notable);
- fl_print_format(" of %[%r%] ", main->output.to, main->context.set.notable, controller_max_s, main->context.set.notable);
- fl_print_format(f_string_format_un_single_s.string, main->output.to, main->context.set.notable, rerun_item->max, main->context.set.notable);
- fl_print_format(".%r", main->output.to, f_string_eol_s);
+ fl_print_format(" for %[%ul%]", main->program.output.to, main->program.context.set.notable, rerun_item->count, main->program.context.set.notable);
+ fl_print_format(" of %[%r%] ", main->program.output.to, main->program.context.set.notable, controller_max_s, main->program.context.set.notable);
+ fl_print_format(f_string_format_un_single_s.string, main->program.output.to, main->program.context.set.notable, rerun_item->max, main->program.context.set.notable);
+ fl_print_format(".%r", main->program.output.to, f_string_eol_s);
}
else {
- fl_print_format(" with no %[%r%].%r", main->output.to, main->context.set.notable, controller_max_s, main->context.set.notable, f_string_eol_s);
+ fl_print_format(" with no %[%r%].%r", main->program.output.to, main->program.context.set.notable, controller_max_s, main->program.context.set.notable, f_string_eol_s);
}
- controller_unlock_print_flush(main->output.to, thread);
+ controller_unlock_print_flush(main->program.output.to, thread);
}
if (rerun_item->delay) {
for (; i < process->rule.parameter.used; ++i) {
- if (f_compare_dynamic_partial_string(process->rule.parameter.array[i].name.string, source, process->rule.parameter.array[i].name.used, content) == F_equal_to) {
+ if (f_compare_dynamic_partial_string(process->rule.parameter.array[i].key.string, source, process->rule.parameter.array[i].key.used, content) == F_equal_to) {
status = f_string_dynamic_append(process->rule.parameter.array[i].value, destination);
if (F_status_is_error(status)) return status;
for (i = 0; i < entry->parameter.used; ++i) {
- if (f_compare_dynamic_partial_string(entry->parameter.array[i].name.string, source, entry->parameter.array[i].name.used, content) == F_equal_to) {
+ if (f_compare_dynamic_partial_string(entry->parameter.array[i].key.string, source, entry->parameter.array[i].key.used, content) == F_equal_to) {
status = f_string_dynamic_append(entry->parameter.array[i].value, destination);
if (F_status_is_error(status)) return status;
status = f_string_dynamic_partial_append_nulless(source, directory, alias);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true);
return status;
}
status = f_string_dynamic_append(f_path_separator_s, alias);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_string_dynamic_append", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_string_dynamic_append", F_true);
return status;
}
status = f_string_dynamic_partial_append_nulless(source, basename, alias);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true);
return status;
}
status = fl_fss_extended_list_object_read(cache->buffer_item, state, &range, &cache->range_action, &cache->delimits);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "fl_fss_extended_list_object_read", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "fl_fss_extended_list_object_read", F_true);
break;
}
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(global.thread, global.main->error, F_status_set_fine(status), "fl_fss_extended_object_read", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "fl_fss_extended_object_read", F_true);
break;
}
status = f_fss_apply_delimit(state, cache->delimits, &cache->buffer_item);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_fss_apply_delimit", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_fss_apply_delimit", F_true);
break;
}
status = f_fss_count_lines(cache->buffer_item, cache->range_action.start, &cache->action.line_action, &setting->state);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_fss_count_lines", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_fss_count_lines", F_true);
break;
}
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(global.thread, global.main->error, F_status_set_fine(status), "f_rip_dynamic_partial_nulless", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_rip_dynamic_partial_nulless", F_true);
break;
}
type = controller_rule_action_type_with_e;
}
else {
- if (global.main->warning.verbosity == f_console_verbosity_debug_e) {
- controller_lock_print(global.main->warning.to, global.thread);
+ if (global.main->program.warning.verbosity == f_console_verbosity_debug_e) {
+ controller_lock_print(global.main->program.warning.to, global.thread);
- fl_print_format("%r%[%QUnknown rule item action '%]", global.main->warning.to, f_string_eol_s, global.main->warning.context, global.main->warning.prefix, global.main->warning.context);
- fl_print_format(f_string_format_Q_single_s.string, global.main->warning.to, global.main->warning.notable, cache->action.name_action, global.main->warning.notable);
- fl_print_format(f_string_format_sentence_end_quote_s.string, global.main->warning.to, global.main->warning.context, global.main->warning.context, f_string_eol_s);
+ fl_print_format("%r%[%QUnknown rule item action '%]", global.main->program.warning.to, f_string_eol_s, global.main->program.warning.context, global.main->program.warning.prefix, global.main->program.warning.context);
+ fl_print_format(f_string_format_Q_single_s.string, global.main->program.warning.to, global.main->program.warning.notable, cache->action.name_action, global.main->program.warning.notable);
+ fl_print_format(f_string_format_sentence_end_quote_s.string, global.main->program.warning.to, global.main->program.warning.context, global.main->program.warning.context, f_string_eol_s);
- controller_rule_print_error_cache(global.main->warning, cache->action, F_true);
+ controller_rule_print_error_cache(global.main->program.warning, cache->action, F_true);
- controller_unlock_print_flush(global.main->warning.to, global.thread);
+ controller_unlock_print_flush(global.main->program.warning.to, global.thread);
}
continue;
if (multiple) {
if (type == controller_rule_action_type_group_e || type == controller_rule_action_type_pid_file_e || type == controller_rule_action_type_user_e) {
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(global.main->error.to, global.thread);
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(global.main->program.error.to, global.thread);
- fl_print_format("%r%[%QFSS Extended List is not allowed for the rule item action '%]", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, global.main->error.context);
- fl_print_format(f_string_format_Q_single_s.string, global.main->error.to, global.main->error.notable, cache->action.name_action, global.main->error.notable);
- fl_print_format(f_string_format_sentence_end_quote_s.string, global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QFSS Extended List is not allowed for the rule item action '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, global.main->program.error.context);
+ fl_print_format(f_string_format_Q_single_s.string, global.main->program.error.to, global.main->program.error.notable, cache->action.name_action, global.main->program.error.notable);
+ fl_print_format(f_string_format_sentence_end_quote_s.string, global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
}
status = F_status_set_error(F_support_not);
status = controller_rule_actions_increase_by(controller_common_allocation_small_d, &item->actions);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "controller_rule_actions_increase_by", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "controller_rule_actions_increase_by", F_true);
break;
}
break;
default:
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(global.main->error.to, global.thread);
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(global.main->program.error.to, global.thread);
- fl_print_format("%r%[%QUnsupported action type '%]", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, global.main->error.context);
- fl_print_format(f_string_format_r_single_s.string, global.main->error.to, global.main->error.notable, controller_rule_action_type_name(process->action), global.main->error.notable);
- fl_print_format("%[' while attempting to execute rule.%]%r", global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QUnsupported action type '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, global.main->program.error.context);
+ fl_print_format(f_string_format_r_single_s.string, global.main->program.error.to, global.main->program.error.notable, controller_rule_action_type_name(process->action), global.main->program.error.notable);
+ fl_print_format("%[' while attempting to execute rule.%]%r", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
- controller_rule_print_error_cache(global.main->error, process->cache.action, F_true);
+ controller_rule_print_error_cache(global.main->program.error, process->cache.action, F_true);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
}
return F_status_set_error(F_parameter);
}
if (F_status_is_error(status)) {
- controller_rule_print_error(global.thread, global.main->error, process->cache.action, F_status_set_fine(status), "f_string_dynamic_append", F_true, F_true);
+ controller_rule_print_error(global.thread, global.main->program.error, process->cache.action, F_status_set_fine(status), "f_string_dynamic_append", F_true, F_true);
return status;
}
status = f_string_dynamic_append(process->rule.alias, &process->cache.action.name_file);
if (F_status_is_error(status)) {
- controller_rule_print_error(global.thread, global.main->error, process->cache.action, F_status_set_fine(status), "f_string_dynamic_append", F_true, F_true);
+ controller_rule_print_error(global.thread, global.main->program.error, process->cache.action, F_status_set_fine(status), "f_string_dynamic_append", F_true, F_true);
return status;
}
}
if (F_status_is_error(status)) {
- controller_rule_print_error(global.thread, global.main->error, process->cache.action, F_status_set_fine(status), "f_string_dynamic_append", F_true, F_true);
+ controller_rule_print_error(global.thread, global.main->program.error, process->cache.action, F_status_set_fine(status), "f_string_dynamic_append", F_true, F_true);
return status;
}
status_lock = controller_lock_read_process(process, global.thread, &global.thread->lock.process);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(global.main->error, F_status_set_fine(status_lock), F_true, global.thread);
+ controller_lock_print_error_critical(global.main->program.error, F_status_set_fine(status_lock), F_true, global.thread);
}
else {
status = controller_process_prepare_process_type(global, process->type, process->action, dynamics[i]->array[j], &id_dependency);
}
}
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(global.main->error.to, global.thread);
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(global.main->program.error.to, global.thread);
- controller_rule_item_print_error_rule_not_loaded(global.main->error, dynamics[i]->array[j]);
- controller_rule_print_error_cache(global.main->error, process->cache.action, F_false);
+ controller_rule_item_print_error_rule_not_loaded(global.main->program.error, dynamics[i]->array[j]);
+ controller_rule_print_error_cache(global.main->program.error, process->cache.action, F_false);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
}
return status;
status_lock = controller_lock_read_process(process, global.thread, &dependency->active);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(global.main->error, F_status_set_fine(status_lock), F_true, global.thread);
+ controller_lock_print_error_critical(global.main->program.error, F_status_set_fine(status_lock), F_true, global.thread);
status = F_false;
dependency = 0;
status_lock = controller_lock_read_process(process, global.thread, &global.thread->lock.rule);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(global.main->error, F_status_set_fine(status_lock), F_true, global.thread);
+ controller_lock_print_error_critical(global.main->program.error, F_status_set_fine(status_lock), F_true, global.thread);
status = F_false;
}
id_rule = 0;
if (i == 0) {
- controller_lock_print(global.main->error.to, global.thread);
+ controller_lock_print(global.main->program.error.to, global.thread);
- controller_rule_item_print_error_need_want_wish(global.main->error, strings[i], dynamics[i]->array[j], "is not found");
- controller_rule_print_error_cache(global.main->error, process->cache.action, F_true);
+ controller_rule_item_print_error_need_want_wish(global.main->program.error, strings[i], dynamics[i]->array[j], "is not found");
+ controller_rule_print_error_cache(global.main->program.error, process->cache.action, F_true);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
status = F_status_set_error(F_found_not);
}
}
else {
- if (global.main->warning.verbosity == f_console_verbosity_debug_e) {
- controller_lock_print(global.main->warning.to, global.thread);
+ if (global.main->program.warning.verbosity == f_console_verbosity_debug_e) {
+ controller_lock_print(global.main->program.warning.to, global.thread);
- controller_rule_item_print_error_need_want_wish(global.main->warning, strings[i], dynamics[i]->array[j], "is not found");
+ controller_rule_item_print_error_need_want_wish(global.main->program.warning, strings[i], dynamics[i]->array[j], "is not found");
- controller_rule_print_error_cache(global.main->warning, process->cache.action, F_true);
+ controller_rule_print_error_cache(global.main->program.warning, process->cache.action, F_true);
- controller_unlock_print_flush(global.main->warning.to, global.thread);
+ controller_unlock_print_flush(global.main->program.warning.to, global.thread);
}
}
}
status_lock = controller_lock_read_process(process, global.thread, &global.thread->lock.rule);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(global.main->error, F_status_set_fine(status_lock), F_true, global.thread);
+ controller_lock_print_error_critical(global.main->program.error, F_status_set_fine(status_lock), F_true, global.thread);
found = F_false;
status = status_lock;
status_lock = controller_lock_read_process(process, global.thread, &dependency->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(global.main->error, F_status_set_fine(status_lock), F_true, global.thread);
+ controller_lock_print_error_critical(global.main->program.error, F_status_set_fine(status_lock), F_true, global.thread);
status = status_lock;
}
status_lock = controller_lock_read_process(process, global.thread, &global.thread->lock.rule);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(global.main->error, F_status_set_fine(status_lock), F_true, global.thread);
+ controller_lock_print_error_critical(global.main->program.error, F_status_set_fine(status_lock), F_true, global.thread);
f_thread_unlock(&dependency->lock);
options_process = 0;
- if (global.main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) {
+ if (global.main->program.parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) {
options_process |= controller_process_option_simulate_d;
}
if (F_status_is_error(status)) {
if (i == 0 || i == 1 || F_status_set_fine(status) == F_memory_not) {
- controller_lock_print(global.main->error.to, global.thread);
+ controller_lock_print(global.main->program.error.to, global.thread);
- controller_rule_item_print_error_need_want_wish(global.main->error, strings[i], alias_other_buffer, "failed during execution");
- controller_rule_print_error_cache(global.main->error, process->cache.action, F_true);
+ controller_rule_item_print_error_need_want_wish(global.main->program.error, strings[i], alias_other_buffer, "failed during execution");
+ controller_rule_print_error_cache(global.main->program.error, process->cache.action, F_true);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
if (!(dependency->options & controller_process_option_simulate_d) || F_status_set_fine(status) == F_memory_not) {
f_thread_unlock(&dependency->active);
}
}
else {
- if (global.main->warning.verbosity == f_console_verbosity_debug_e) {
- controller_lock_print(global.main->warning.to, global.thread);
+ if (global.main->program.warning.verbosity == f_console_verbosity_debug_e) {
+ controller_lock_print(global.main->program.warning.to, global.thread);
- controller_rule_item_print_error_need_want_wish(global.main->warning, strings[i], alias_other_buffer, "failed during execution");
+ controller_rule_item_print_error_need_want_wish(global.main->program.warning, strings[i], alias_other_buffer, "failed during execution");
- controller_rule_print_error_cache(global.main->warning, process->cache.action, F_true);
+ controller_rule_print_error_cache(global.main->program.warning, process->cache.action, F_true);
- controller_unlock_print_flush(global.main->warning.to, global.thread);
+ controller_unlock_print_flush(global.main->program.warning.to, global.thread);
}
}
}
status_lock = controller_lock_read_process(process, global.thread, &global.thread->lock.rule);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(global.main->error, F_status_set_fine(status_lock), F_false, global.thread);
+ controller_lock_print_error_critical(global.main->program.error, F_status_set_fine(status_lock), F_false, global.thread);
}
}
if (F_status_is_error(status_lock)) {
if (F_status_is_error(status_lock)) {
- controller_rule_item_print_error_need_want_wish(global.main->error, strings[i], alias_other_buffer, "due to lock failure");
+ controller_rule_item_print_error_need_want_wish(global.main->program.error, strings[i], alias_other_buffer, "due to lock failure");
}
status = status_lock;
f_thread_unlock(&global.thread->lock.rule);
if (i == 0 || i == 1) {
- controller_lock_print(global.main->error.to, global.thread);
+ controller_lock_print(global.main->program.error.to, global.thread);
- controller_rule_item_print_error_need_want_wish(global.main->error, strings[i], alias_other_buffer, "is in a failed state");
+ controller_rule_item_print_error_need_want_wish(global.main->program.error, strings[i], alias_other_buffer, "is in a failed state");
- controller_rule_print_error_cache(global.main->error, process->cache.action, F_true);
+ controller_rule_print_error_cache(global.main->program.error, process->cache.action, F_true);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
status = F_status_set_error(F_found_not);
}
}
else {
- if (global.main->warning.verbosity == f_console_verbosity_debug_e) {
- controller_lock_print(global.main->warning.to, global.thread);
+ if (global.main->program.warning.verbosity == f_console_verbosity_debug_e) {
+ controller_lock_print(global.main->program.warning.to, global.thread);
- controller_rule_item_print_error_need_want_wish(global.main->warning, strings[i], alias_other_buffer, "is in a failed state");
+ controller_rule_item_print_error_need_want_wish(global.main->program.warning, strings[i], alias_other_buffer, "is in a failed state");
- controller_rule_print_error_cache(global.main->warning, process->cache.action, F_true);
+ controller_rule_print_error_cache(global.main->program.warning, process->cache.action, F_true);
- controller_unlock_print_flush(global.main->warning.to, global.thread);
+ controller_unlock_print_flush(global.main->program.warning.to, global.thread);
}
}
}
} // for
if (missing) {
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(global.main->error.to, global.thread);
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(global.main->program.error.to, global.thread);
if (process->rule.items.used) {
- fl_print_format("%r%[%QThe rule '%]", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, global.main->error.context);
- fl_print_format(f_string_format_Q_single_s.string, global.main->error.to, global.main->error.notable, process->rule.name, global.main->error.notable);
- fl_print_format("%[' has no '%]", global.main->error.to, global.main->error.context, global.main->error.context);
- fl_print_format(f_string_format_r_single_s.string, global.main->error.to, global.main->error.notable, controller_rule_action_type_name(process->action), global.main->error.notable);
- fl_print_format("%[' action to execute.%]%r", global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QThe rule '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, global.main->program.error.context);
+ fl_print_format(f_string_format_Q_single_s.string, global.main->program.error.to, global.main->program.error.notable, process->rule.name, global.main->program.error.notable);
+ fl_print_format("%[' has no '%]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format(f_string_format_r_single_s.string, global.main->program.error.to, global.main->program.error.notable, controller_rule_action_type_name(process->action), global.main->program.error.notable);
+ fl_print_format("%[' action to execute.%]%r", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
}
else {
- fl_print_format("%r%[%QThe rule '%]", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, global.main->error.context);
- fl_print_format(f_string_format_Q_single_s.string, global.main->error.to, global.main->error.notable, process->rule.name, global.main->error.notable);
- fl_print_format("%[ has no known '%]", global.main->error.to, global.main->error.context, global.main->error.context);
- fl_print_format("%[%r %r%]", global.main->error.to, global.main->error.notable, controller_rule_s, controller_type_s, global.main->error.notable);
- fl_print_format("%[' (such as '%]", global.main->error.to, global.main->error.context, global.main->error.context);
- fl_print_format(f_string_format_r_single_s.string, global.main->error.to, global.main->error.notable, controller_command_s, global.main->error.notable);
- fl_print_format("%[', '%]", global.main->error.to, global.main->error.context, global.main->error.context);
- fl_print_format(f_string_format_r_single_s.string, global.main->error.to, global.main->error.notable, controller_service_s, global.main->error.notable);
- fl_print_format("%[', '%]", global.main->error.to, global.main->error.context, global.main->error.context);
- fl_print_format(f_string_format_r_single_s.string, global.main->error.to, global.main->error.notable, controller_script_s, global.main->error.notable);
- fl_print_format("%[', or '%]", global.main->error.to, global.main->error.context, global.main->error.context);
- fl_print_format(f_string_format_r_single_s.string, global.main->error.to, global.main->error.notable, controller_utility_s, global.main->error.notable);
- fl_print_format("%[') to execute.%]%r", global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QThe rule '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, global.main->program.error.context);
+ fl_print_format(f_string_format_Q_single_s.string, global.main->program.error.to, global.main->program.error.notable, process->rule.name, global.main->program.error.notable);
+ fl_print_format("%[ has no known '%]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format("%[%r %r%]", global.main->program.error.to, global.main->program.error.notable, controller_rule_s, controller_type_s, global.main->program.error.notable);
+ fl_print_format("%[' (such as '%]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format(f_string_format_r_single_s.string, global.main->program.error.to, global.main->program.error.notable, controller_command_s, global.main->program.error.notable);
+ fl_print_format("%[', '%]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format(f_string_format_r_single_s.string, global.main->program.error.to, global.main->program.error.notable, controller_service_s, global.main->program.error.notable);
+ fl_print_format("%[', '%]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format(f_string_format_r_single_s.string, global.main->program.error.to, global.main->program.error.notable, controller_script_s, global.main->program.error.notable);
+ fl_print_format("%[', or '%]", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format(f_string_format_r_single_s.string, global.main->program.error.to, global.main->program.error.notable, controller_utility_s, global.main->program.error.notable);
+ fl_print_format("%[') to execute.%]%r", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
}
- controller_rule_print_error_cache(global.main->error, process->cache.action, F_true);
+ controller_rule_print_error_cache(global.main->program.error, process->cache.action, F_true);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
}
status = F_status_set_error(F_parameter);
}
if (F_status_is_error(status)) {
- controller_rule_item_print_error(global.thread, global.main->error, process->cache.action, F_true, F_status_set_fine(status));
+ controller_rule_item_print_error(global.thread, global.main->program.error, process->cache.action, F_true, F_status_set_fine(status));
}
}
}
status_lock = controller_lock_write_process(process, global.thread, &process->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(global.main->error, F_status_set_fine(status_lock), F_false, global.thread);
+ controller_lock_print_error_critical(global.main->program.error, F_status_set_fine(status_lock), F_false, global.thread);
if (F_status_set_fine(status) != F_interrupt) {
status = controller_lock_read_process(process, global.thread, &process->lock);
status_lock = controller_lock_write_process(process, global.thread, &global.thread->lock.rule);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(global.main->error, F_status_set_fine(status_lock), F_false, global.thread);
+ controller_lock_print_error_critical(global.main->program.error, F_status_set_fine(status_lock), F_false, global.thread);
f_thread_unlock(&process->lock);
status_lock = controller_lock_read_process(process, global.thread, &process->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(global.main->error, F_status_set_fine(status_lock), F_true, global.thread);
+ controller_lock_print_error_critical(global.main->program.error, F_status_set_fine(status_lock), F_true, global.thread);
return F_status_set_error(F_lock);
}
status = controller_lock_read_process_type(type, global.thread, &global.thread->lock.process);
if (F_status_is_error(status)) {
- controller_lock_print_error_critical(global.main->error, F_status_set_fine(status), F_true, global.thread);
+ controller_lock_print_error_critical(global.main->program.error, F_status_set_fine(status), F_true, global.thread);
return status;
}
if (F_status_is_error(status)) {
f_thread_unlock(&global.thread->lock.process);
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(global.main->error.to, global.thread);
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(global.main->program.error.to, global.thread);
- controller_rule_item_print_error_rule_not_loaded(global.main->error, alias_rule);
- controller_rule_print_error_cache(global.main->error, cache.action, F_false);
+ controller_rule_item_print_error_rule_not_loaded(global.main->program.error, alias_rule);
+ controller_rule_print_error_cache(global.main->program.error, cache.action, F_false);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
}
return status;
status = controller_lock_read_process_type(type, global.thread, &process->active);
if (F_status_is_error(status)) {
- controller_lock_print_error_critical(global.main->error, F_status_set_fine(status), F_true, global.thread);
- controller_rule_item_print_error(global.thread, global.main->error, cache.action, F_false, F_status_set_fine(status));
+ controller_lock_print_error_critical(global.main->program.error, F_status_set_fine(status), F_true, global.thread);
+ controller_rule_item_print_error(global.thread, global.main->program.error, cache.action, F_false, F_status_set_fine(status));
f_thread_unlock(&global.thread->lock.process);
status_lock = controller_lock_write_process(process, global.thread, &process->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(global.main->error, F_status_set_fine(status_lock), F_false, global.thread);
+ controller_lock_print_error_critical(global.main->program.error, F_status_set_fine(status_lock), F_false, global.thread);
f_thread_unlock(&process->active);
f_thread_unlock(&global.thread->lock.process);
status_lock = controller_lock_write_process(process, global.thread, &process->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(global.main->error, F_status_set_fine(status_lock), F_false, global.thread);
+ controller_lock_print_error_critical(global.main->program.error, F_status_set_fine(status_lock), F_false, global.thread);
f_thread_unlock(&process->active);
}
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_memory_array_resize", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_memory_array_resize", F_true);
}
else {
for (f_number_unsigned_t i = 0; i < stack.used; ++i) {
status = f_string_dynamic_append(cache.action.name_item, &process->cache.action.name_item);
}
else {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_string_dynamic_append", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_string_dynamic_append", F_true);
}
}
}
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_thread_create", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_thread_create", F_true);
}
}
else {
status_lock = controller_lock_write_process(process, global.thread, &process->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(global.main->error, F_status_set_fine(status_lock), F_false, global.thread);
+ controller_lock_print_error_critical(global.main->program.error, F_status_set_fine(status_lock), F_false, global.thread);
f_thread_unlock(&process->active);
status_lock = controller_lock_read_process(process, global.thread, &process->active);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(global.main->error, F_status_set_fine(status_lock), F_true, global.thread);
+ controller_lock_print_error_critical(global.main->program.error, F_status_set_fine(status_lock), F_true, global.thread);
return status_lock;
}
status_lock = controller_lock_read_process(process, global.thread, &process->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(global.main->error, F_status_set_fine(status_lock), F_true, global.thread);
+ controller_lock_print_error_critical(global.main->program.error, F_status_set_fine(status_lock), F_true, global.thread);
if (options_force & controller_process_option_asynchronous_d) {
f_thread_unlock(&process->active);
status_lock = controller_lock_read_process(process, global.thread, &global.thread->lock.rule);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(global.main->error, F_status_set_fine(status_lock), F_true, global.thread);
+ controller_lock_print_error_critical(global.main->program.error, F_status_set_fine(status_lock), F_true, global.thread);
f_thread_unlock(&process->lock);
status_lock = controller_lock_write_process(process, global.thread, &process->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(global.main->error, F_status_set_fine(status_lock), F_false, global.thread);
+ controller_lock_print_error_critical(global.main->program.error, F_status_set_fine(status_lock), F_false, global.thread);
f_thread_unlock(&global.thread->lock.rule);
return status_lock;
}
- controller_rule_delete_simple(&process->rule);
+ controller_rule_delete(&process->rule);
status = controller_rule_copy(global.setting->rules.array[id_rule], &process->rule);
status_lock = controller_lock_read_process(process, global.thread, &process->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(global.main->error, F_status_set_fine(status_lock), F_true, global.thread);
+ controller_lock_print_error_critical(global.main->program.error, F_status_set_fine(status_lock), F_true, global.thread);
f_thread_unlock(&global.thread->lock.rule);
f_thread_unlock(&global.thread->lock.rule);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "controller_rule_copy", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "controller_rule_copy", F_true);
}
else if (!process->action) {
for (f_number_unsigned_t i = 0; i < process->stack.used && controller_thread_is_enabled_process(process, global.thread); ++i) {
if (process->stack.array[i] == id_rule) {
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(global.main->error.to, global.thread);
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(global.main->program.error.to, global.thread);
- fl_print_format("%r%[%QThe rule '%]", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, global.main->error.context);
- fl_print_format(f_string_format_Q_single_s.string, global.main->error.to, global.main->error.notable, process->rule.alias, global.main->error.notable);
- fl_print_format("%[' is already on the execution dependency stack, this recursion is prohibited.%]%r", global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QThe rule '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, global.main->program.error.context);
+ fl_print_format(f_string_format_Q_single_s.string, global.main->program.error.to, global.main->program.error.notable, process->rule.alias, global.main->program.error.notable);
+ fl_print_format("%[' is already on the execution dependency stack, this recursion is prohibited.%]%r", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
- controller_rule_print_error_cache(global.main->error, process->cache.action, F_true);
+ controller_rule_print_error_cache(global.main->program.error, process->cache.action, F_true);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
}
// Never continue on circular recursion errors even in simulate mode.
status = f_memory_array_increase(controller_common_allocation_small_d, sizeof(f_number_unsigned_t), (void **) &process->stack.array, &process->stack.used, &process->stack.size);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_memory_array_increase", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_memory_array_increase", F_true);
}
else {
f_thread_unlock(&process->lock);
status_lock = controller_lock_write_process(process, global.thread, &process->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(global.main->error, F_status_set_fine(status_lock), F_false, global.thread);
+ controller_lock_print_error_critical(global.main->program.error, F_status_set_fine(status_lock), F_false, global.thread);
if (options_force & controller_process_option_asynchronous_d) {
f_thread_unlock(&process->active);
status_lock = controller_lock_read_process(process, global.thread, &process->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(global.main->error, F_status_set_fine(status_lock), F_true, global.thread);
+ controller_lock_print_error_critical(global.main->program.error, F_status_set_fine(status_lock), F_true, global.thread);
if (options_force & controller_process_option_asynchronous_d) {
f_thread_unlock(&process->active);
status = F_status_set_error(F_found_not);
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(global.main->error.to, global.thread);
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(global.main->program.error.to, global.thread);
- controller_rule_item_print_error_rule_not_loaded(global.main->error, process->rule.alias);
- controller_rule_print_error_cache(global.main->error, process->cache.action, F_false);
+ controller_rule_item_print_error_rule_not_loaded(global.main->program.error, process->rule.alias);
+ controller_rule_print_error_cache(global.main->program.error, process->cache.action, F_false);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
}
}
status_lock = controller_lock_write_process(process, global.thread, &global.thread->lock.rule);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(global.main->error, F_status_set_fine(status_lock), F_false, global.thread);
+ controller_lock_print_error_critical(global.main->program.error, F_status_set_fine(status_lock), F_false, global.thread);
if (F_status_set_fine(status) != F_lock) {
f_thread_unlock(&process->lock);
status_lock = controller_lock_write_process(process, global.thread, &process->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(global.main->error, F_status_set_fine(status_lock), F_false, global.thread);
+ controller_lock_print_error_critical(global.main->program.error, F_status_set_fine(status_lock), F_false, global.thread);
if (options_force & controller_process_option_asynchronous_d) {
f_thread_unlock(&process->active);
status = f_string_dynamic_append_nulless(alias, &rule->alias);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true);
}
else {
status = controller_file_load(global, F_true, controller_rules_s, rule->alias, controller_rule_s, cache);
status = fll_fss_basic_list_read(cache->buffer_file, state, &range, &cache->object_items, &cache->content_items, &cache->delimits, 0, &cache->comments);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "fll_fss_basic_list_read", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "fll_fss_basic_list_read", F_true);
}
else {
status = f_fss_apply_delimit(state, cache->delimits, &cache->buffer_file);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_fss_apply_delimit", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_fss_apply_delimit", F_true);
}
}
}
status = controller_rule_items_increase_by(cache->object_items.used, &rule->items);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "controller_rule_items_increase_by", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "controller_rule_items_increase_by", F_true);
}
else {
f_number_unsigned_t i = 0;
for_item = F_true;
- status = f_fss_count_lines(cache->buffer_file, cache->object_items.array[i].start, &cache->action.line_item, &setting->state);
+ status = f_fss_count_lines(cache->buffer_file, cache->object_items.array[i].start, &cache->action.line_item, &global.main->setting.state);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_fss_count_lines", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_fss_count_lines", F_true);
break;
}
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(global.thread, global.main->error, F_status_set_fine(status), "f_rip_dynamic_partial_nulless", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_rip_dynamic_partial_nulless", F_true);
break;
}
rule->items.array[rule->items.used].type = controller_rule_item_type_utility_e;
}
else {
- if (global.main->warning.verbosity == f_console_verbosity_debug_e) {
- controller_lock_print(global.main->warning.to, global.thread);
+ if (global.main->program.warning.verbosity == f_console_verbosity_debug_e) {
+ controller_lock_print(global.main->program.warning.to, global.thread);
- fl_print_format("%r%[%QUnknown rule item '%]", global.main->warning.to, f_string_eol_s, global.main->warning.context, global.main->warning.prefix, global.main->warning.context);
- fl_print_format(f_string_format_Q_single_s.string, global.main->warning.to, global.main->warning.notable, cache->action.name_item, global.main->warning.notable);
- fl_print_format(f_string_format_sentence_end_quote_s.string, global.main->warning.to, global.main->warning.context, global.main->warning.context, f_string_eol_s);
+ fl_print_format("%r%[%QUnknown rule item '%]", global.main->program.warning.to, f_string_eol_s, global.main->program.warning.context, global.main->program.warning.prefix, global.main->program.warning.context);
+ fl_print_format(f_string_format_Q_single_s.string, global.main->program.warning.to, global.main->program.warning.notable, cache->action.name_item, global.main->program.warning.notable);
+ fl_print_format(f_string_format_sentence_end_quote_s.string, global.main->program.warning.to, global.main->program.warning.context, global.main->program.warning.context, f_string_eol_s);
- controller_rule_print_error_cache(global.main->warning, cache->action, F_true);
+ controller_rule_print_error_cache(global.main->program.warning, cache->action, F_true);
- controller_unlock_print_flush(global.main->warning.to, global.thread);
+ controller_unlock_print_flush(global.main->program.warning.to, global.thread);
}
continue;
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(global.thread, global.main->error, F_status_set_fine(status), "f_string_dynamic_partial_append", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_string_dynamic_partial_append", F_true);
break;
}
}
if (F_status_is_error(status)) {
- controller_rule_item_print_error(global.thread, global.main->error, cache->action, for_item, F_status_set_fine(status));
+ controller_rule_item_print_error(global.thread, global.main->program.error, cache->action, for_item, F_status_set_fine(status));
rule->status[0] = controller_status_simplify_error(F_status_set_fine(status));
status = fll_fss_extended_read(cache->buffer_item, state, &range, &cache->object_actions, &cache->content_actions, 0, 0, &cache->delimits, 0);
if (F_status_is_error(status)) {
- controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "fll_fss_extended_read", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, cache->action, F_status_set_fine(status), "fll_fss_extended_read", F_true, F_false);
return status;
}
status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->object_actions.array[i], &cache->action.name_item);
if (F_status_is_error(status)) {
- controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
if (F_status_set_fine(status) == F_memory_not) {
status_return = status;
// 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, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &global.main->setting.state);
cache->action.line_action = ++cache->action.line_item;
- controller_rule_item_print_error(global.thread, global.main->error, cache->action, F_false, F_status_set_fine(status));
+ controller_rule_item_print_error(global.thread, global.main->program.error, cache->action, F_false, F_status_set_fine(status));
continue;
}
type = controller_rule_setting_type_user_e;
}
else {
- if (global.main->warning.verbosity == f_console_verbosity_debug_e) {
+ if (global.main->program.warning.verbosity == f_console_verbosity_debug_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, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &global.main->setting.state);
cache->action.line_action = ++cache->action.line_item;
- controller_lock_print(global.main->warning.to, global.thread);
+ controller_lock_print(global.main->program.warning.to, global.thread);
- fl_print_format("%r%[%QUnknown rule setting '%]", global.main->warning.to, f_string_eol_s, global.main->warning.context, global.main->warning.prefix, global.main->warning.context);
- fl_print_format(f_string_format_Q_single_s.string, global.main->warning.to, global.main->warning.notable, cache->action.name_item, global.main->warning.notable);
- fl_print_format(f_string_format_sentence_end_quote_s.string, global.main->warning.to, global.main->warning.context, global.main->warning.context, f_string_eol_s);
+ fl_print_format("%r%[%QUnknown rule setting '%]", global.main->program.warning.to, f_string_eol_s, global.main->program.warning.context, global.main->program.warning.prefix, global.main->program.warning.context);
+ fl_print_format(f_string_format_Q_single_s.string, global.main->program.warning.to, global.main->program.warning.notable, cache->action.name_item, global.main->program.warning.notable);
+ fl_print_format(f_string_format_sentence_end_quote_s.string, global.main->program.warning.to, global.main->program.warning.context, global.main->program.warning.context, f_string_eol_s);
- controller_rule_print_error_cache(global.main->warning, cache->action, F_false);
+ controller_rule_print_error_cache(global.main->program.warning, cache->action, F_false);
- controller_unlock_print_flush(global.main->warning.to, global.thread);
+ controller_unlock_print_flush(global.main->program.warning.to, global.thread);
}
continue;
status = f_string_dynamic_partial_append_nulless(cache->buffer_item, range2, &cache->action.name_action);
if (F_status_is_error(status)) {
- controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &global.main->setting.state);
cache->action.line_action = ++cache->action.line_item;
- controller_rule_item_print_error(global.thread, global.main->error, cache->action, F_false, F_status_set_fine(status));
+ controller_rule_item_print_error(global.thread, global.main->program.error, cache->action, F_false, F_status_set_fine(status));
if (F_status_set_fine(status) == F_memory_not) {
status_return = status;
}
else {
if (empty_disallow) {
- if (global.main->warning.verbosity == f_console_verbosity_debug_e) {
+ if (global.main->program.warning.verbosity == f_console_verbosity_debug_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, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &global.main->setting.state);
cache->action.line_action = ++cache->action.line_item;
- controller_lock_print(global.main->warning.to, global.thread);
+ controller_lock_print(global.main->program.warning.to, global.thread);
- fl_print_format("%r%[%QEmpty rule setting.%]%r", global.main->warning.to, f_string_eol_s, global.main->warning.context, global.main->warning.prefix, global.main->warning.context, f_string_eol_s);
+ fl_print_format("%r%[%QEmpty rule setting.%]%r", global.main->program.warning.to, f_string_eol_s, global.main->program.warning.context, global.main->program.warning.prefix, global.main->program.warning.context, f_string_eol_s);
- controller_rule_print_error_cache(global.main->warning, cache->action, F_false);
+ controller_rule_print_error_cache(global.main->program.warning, cache->action, F_false);
- controller_unlock_print_flush(global.main->warning.to, global.thread);
+ controller_unlock_print_flush(global.main->program.warning.to, global.thread);
}
continue;
if (type == controller_rule_setting_type_affinity_e) {
if (!cache->content_actions.array[i].used) {
- controller_rule_setting_read_print_error(global.main->error, "requires one or more Content", i, line_item, global.thread, cache);
+ controller_rule_setting_read_print_error(global.main->program.error, "requires one or more Content", i, line_item, global.thread, cache);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
status = f_int32s_increase(controller_common_allocation_small_d, &rule->affinity);
if (F_status_is_error(status)) {
- controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "f_int32s_increase", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, cache->action, F_status_set_fine(status), "f_int32s_increase", F_true, F_false);
break;
}
if (status == F_data_not || status == F_number || status == F_number_overflow || status == F_number_underflow || status == F_number_negative || status == F_number_decimal) {
if (status == F_number_underflow) {
- controller_rule_setting_read_print_error_with_range(global.main->error, " has an unsupported number", cache->content_actions.array[i].array[j], ", the number is too small for this system", i, line_item, global.thread, cache);
+ controller_rule_setting_read_print_error_with_range(global.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, global.thread, cache);
}
else if (status == F_number_overflow || status == F_number_positive) {
- controller_rule_setting_read_print_error_with_range(global.main->error, " has an unsupported number", cache->content_actions.array[i].array[j], ", the number is too large for this system", i, line_item, global.thread, cache);
+ controller_rule_setting_read_print_error_with_range(global.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, global.thread, cache);
}
else {
- controller_rule_setting_read_print_error_with_range(global.main->error, " has an invalid number", cache->content_actions.array[i].array[j], ", only whole numbers are allowed for an affinity value", i, line_item, global.thread, cache);
+ controller_rule_setting_read_print_error_with_range(global.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, global.thread, cache);
}
status = F_status_set_error(F_valid_not);
}
}
else {
- controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, cache->action, F_status_set_fine(status), "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
status = F_status_set_error(status);
if (type == controller_rule_setting_type_define_e || type == controller_rule_setting_type_parameter_e) {
if (cache->content_actions.array[i].used != 2) {
- controller_rule_setting_read_print_error(global.main->error, "requires exactly two Content", i, line_item, global.thread, cache);
+ controller_rule_setting_read_print_error(global.main->program.error, "requires exactly two Content", i, line_item, global.thread, cache);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
status = f_memory_array_increase(controller_common_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_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "f_memory_array_increase", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, cache->action, F_status_set_fine(status), "f_memory_array_increase", F_true, F_false);
if (F_status_set_fine(status) == F_memory_not) {
status_return = status;
// 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, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &global.main->setting.state);
cache->action.line_action = ++cache->action.line_item;
- controller_rule_item_print_error(global.thread, global.main->error, cache->action, F_false, F_status_set_fine(status));
+ controller_rule_item_print_error(global.thread, global.main->program.error, cache->action, F_false, F_status_set_fine(status));
continue;
}
status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[0], &setting_maps->array[setting_maps->used].name);
if (F_status_is_error(status)) {
- controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
if (F_status_set_fine(status) == F_memory_not) {
status_return = status;
// 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, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &global.main->setting.state);
cache->action.line_action = ++cache->action.line_item;
- controller_rule_item_print_error(global.thread, global.main->error, cache->action, F_false, F_status_set_fine(status));
+ controller_rule_item_print_error(global.thread, global.main->program.error, cache->action, F_false, F_status_set_fine(status));
continue;
}
status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[1], &setting_maps->array[setting_maps->used].value);
if (F_status_is_error(status)) {
- controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
if (F_status_set_fine(status) == F_memory_not) {
status_return = status;
// 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, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &global.main->setting.state);
cache->action.line_action = ++cache->action.line_item;
- controller_rule_item_print_error(global.thread, global.main->error, cache->action, F_false, F_status_set_fine(status));
+ controller_rule_item_print_error(global.thread, global.main->program.error, cache->action, F_false, F_status_set_fine(status));
continue;
}
if (type == controller_rule_setting_type_cgroup_e) {
if (cache->content_actions.array[i].used < 2 || rule->has & controller_rule_has_cgroup_d) {
- controller_rule_setting_read_print_error(global.main->error, "requires two or more Content", i, line_item, global.thread, cache);
+ controller_rule_setting_read_print_error(global.main->program.error, "requires two or more Content", i, line_item, global.thread, cache);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
rule->cgroup.as_new = F_true;
}
else {
- controller_rule_setting_read_print_error_with_range(global.main->error, " has an unknown option", cache->content_actions.array[i].array[0], "", i, line_item, global.thread, cache);
+ controller_rule_setting_read_print_error_with_range(global.main->program.error, " has an unknown option", cache->content_actions.array[i].array[0], "", i, line_item, global.thread, cache);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
status = f_string_dynamic_append(global.setting->path_cgroup, &rule->cgroup.path);
if (F_status_is_error(status)) {
- controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_append", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_append", F_true, F_false);
}
else {
rule->cgroup.groups.used = 0;
status = f_memory_array_increase(controller_common_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_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "f_memory_array_increase", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, cache->action, F_status_set_fine(status), "f_memory_array_increase", F_true, F_false);
break;
}
status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[j], &rule->cgroup.groups.array[rule->cgroup.groups.used]);
if (F_status_is_error(status)) {
- controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
break;
}
// 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, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &global.main->setting.state);
cache->action.line_action = ++cache->action.line_item;
- controller_rule_item_print_error(global.thread, global.main->error, cache->action, F_false, F_status_set_fine(status));
+ controller_rule_item_print_error(global.thread, global.main->program.error, cache->action, F_false, F_status_set_fine(status));
continue;
}
if (type == controller_rule_setting_type_limit_e) {
if (cache->content_actions.array[i].used != 3) {
- controller_rule_setting_read_print_error(global.main->error, "requires three Content", i, line_item, global.thread, cache);
+ controller_rule_setting_read_print_error(global.main->program.error, "requires three Content", i, line_item, global.thread, cache);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
type = controller_resource_limit_type_stack_e;
}
else {
- if (global.main->error.verbosity == f_console_verbosity_debug_e) {
+ if (global.main->program.error.verbosity == f_console_verbosity_debug_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, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &global.main->setting.state);
cache->action.line_action = ++cache->action.line_item;
- controller_lock_print(global.main->error.to, global.thread);
+ controller_lock_print(global.main->program.error.to, global.thread);
- fl_print_format("%r%[%QUnknown resource limit type '%]", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, global.main->error.context);
- fl_print_format(f_string_format_Q_single_s.string, global.main->error.to, global.main->error.notable, cache->action.name_action, global.main->error.notable);
- fl_print_format(f_string_format_sentence_end_quote_s.string, global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QUnknown resource limit type '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, global.main->program.error.context);
+ fl_print_format(f_string_format_Q_single_s.string, global.main->program.error.to, global.main->program.error.notable, cache->action.name_action, global.main->program.error.notable);
+ fl_print_format(f_string_format_sentence_end_quote_s.string, global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
- controller_rule_print_error_cache(global.main->error, cache->action, F_true);
+ controller_rule_print_error_cache(global.main->program.error, cache->action, F_true);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
}
if (F_status_is_error_not(status_return)) {
for (j = 0; j < rule->limits.used; ++j) {
if (type == rule->limits.array[j].type) {
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
+ if (global.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, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &global.main->setting.state);
cache->action.line_action = ++cache->action.line_item;
- controller_lock_print(global.main->error.to, global.thread);
+ controller_lock_print(global.main->program.error.to, global.thread);
- fl_print_format("%r%[%QThe resource limit type is already specified%]%r", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, global.main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QThe resource limit type is already specified%]%r", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, global.main->program.error.context, f_string_eol_s);
- controller_rule_print_error_cache(global.main->error, cache->action, F_false);
+ controller_rule_print_error_cache(global.main->program.error, cache->action, F_false);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
}
status = F_status_set_error(F_valid_not);
macro_f_limit_sets_t_increase(status, controller_common_allocation_small_d, rule->limits);
if (F_status_is_error(status)) {
- controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "f_limit_sets_increase", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, cache->action, F_status_set_fine(status), "f_limit_sets_increase", F_true, F_false);
if (F_status_set_fine(status) == F_memory_not) {
status_return = 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, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &global.main->setting.state);
cache->action.line_action = ++cache->action.line_item;
- controller_rule_item_print_error(global.thread, global.main->error, cache->action, F_false, F_status_set_fine(status));
+ controller_rule_item_print_error(global.thread, global.main->program.error, cache->action, F_false, F_status_set_fine(status));
continue;
}
if (status == F_data_not || status == F_number || status == F_number_overflow || status == F_number_underflow || status == F_number_negative || status == F_number_positive || status == F_number_decimal) {
if (status == F_number_underflow) {
- controller_rule_setting_read_print_error_with_range(global.main->error, " has an unsupported number", cache->content_actions.array[i].array[j], ", the number is too small for this system", i, line_item, global.thread, cache);
+ controller_rule_setting_read_print_error_with_range(global.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, global.thread, cache);
}
else if (status == F_number_overflow) {
- controller_rule_setting_read_print_error_with_range(global.main->error, " has an unsupported number", cache->content_actions.array[i].array[j], ", the number is too large for this system", i, line_item, global.thread, cache);
+ controller_rule_setting_read_print_error_with_range(global.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, global.thread, cache);
}
else {
- controller_rule_setting_read_print_error_with_range(global.main->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, global.thread, cache);
+ controller_rule_setting_read_print_error_with_range(global.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, global.thread, cache);
}
status = F_status_set_error(F_valid_not);
}
}
else {
- controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, cache->action, F_status_set_fine(status), "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
status = F_status_set_error(status);
}
if (setting_value->used || !cache->content_actions.array[i].used) {
- controller_rule_setting_read_print_error(global.main->error, "requires one or more Content", i, line_item, global.thread, cache);
+ controller_rule_setting_read_print_error(global.main->program.error, "requires one or more Content", i, line_item, global.thread, cache);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_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, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &global.main->setting.state);
cache->action.line_action = ++cache->action.line_item;
- controller_rule_item_print_error(global.thread, global.main->error, cache->action, F_false, F_status_set_fine(status));
+ controller_rule_item_print_error(global.thread, global.main->program.error, cache->action, F_false, F_status_set_fine(status));
continue;
}
status = controller_validate_has_graph(*setting_value);
if (status == F_false || F_status_set_fine(status) == F_complete_not_utf) {
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
+ if (global.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, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &global.main->setting.state);
cache->action.line_action = ++cache->action.line_item;
}
if (status == F_false) {
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(global.main->error.to, global.thread);
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(global.main->program.error.to, global.thread);
- fl_print_format("%r%[%QRule setting has an invalid name '%]", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, global.main->error.context);
- fl_print_format(f_string_format_Q_single_s.string, global.main->error.to, global.main->error.notable, *setting_value, global.main->error.notable);
- fl_print_format("%[', there must be at least 1 graph character.%]%r", global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QRule setting has an invalid name '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, global.main->program.error.context);
+ fl_print_format(f_string_format_Q_single_s.string, global.main->program.error.to, global.main->program.error.notable, *setting_value, global.main->program.error.notable);
+ fl_print_format("%[', there must be at least 1 graph character.%]%r", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
- controller_rule_print_error_cache(global.main->error, cache->action, F_false);
+ controller_rule_print_error_cache(global.main->program.error, cache->action, F_false);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
}
if (F_status_is_error_not(status_return)) {
else {
// This function should only return F_complete_not_utf on error.
- controller_rule_print_error(global.thread, global.main->error, cache->action, F_complete_not_utf, "controller_validate_has_graph", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, cache->action, F_complete_not_utf, "controller_validate_has_graph", F_true, F_false);
if (F_status_is_error_not(status_return)) {
status_return = status;
}
- controller_rule_item_print_error(global.thread, global.main->error, cache->action, F_false, F_status_set_fine(status));
+ controller_rule_item_print_error(global.thread, global.main->program.error, cache->action, F_false, F_status_set_fine(status));
}
setting_value->used = 0;
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_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
if (F_status_set_fine(status) == F_memory_not) {
status_return = status;
// 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, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &global.main->setting.state);
cache->action.line_action = ++cache->action.line_item;
- controller_rule_item_print_error(global.thread, global.main->error, cache->action, F_false, F_status_set_fine(status));
+ controller_rule_item_print_error(global.thread, global.main->program.error, cache->action, F_false, F_status_set_fine(status));
continue;
}
if (type == controller_rule_setting_type_scheduler_e) {
if (cache->content_actions.array[i].used < 1 || cache->content_actions.array[i].used > 2 || rule->has & controller_rule_has_scheduler_d) {
- controller_rule_setting_read_print_error(global.main->error, "requires either one or two Content", i, line_item, global.thread, cache);
+ controller_rule_setting_read_print_error(global.main->program.error, "requires either one or two Content", i, line_item, global.thread, cache);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
rule->scheduler.priority = 49;
}
else {
- controller_rule_setting_read_print_error_with_range(global.main->error, " has an unknown scheduler", cache->content_actions.array[i].array[0], "", i, line_item, global.thread, cache);
+ controller_rule_setting_read_print_error_with_range(global.main->program.error, " has an unknown scheduler", cache->content_actions.array[i].array[0], "", i, line_item, global.thread, cache);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
status = F_status_set_fine(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 (global.main->error.verbosity > f_console_verbosity_quiet_e) {
+ if (global.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, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &global.main->setting.state);
cache->action.line_action = ++cache->action.line_item;
- controller_lock_print(global.main->error.to, global.thread);
+ controller_lock_print(global.main->program.error.to, global.thread);
- fl_print_format("%r%[%QRule setting has an invalid number '%]", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, global.main->error.context);
- fl_print_format(f_string_format_Q_range_single_s.string, global.main->error.to, global.main->error.notable, cache->buffer_item, cache->content_actions.array[i].array[1], global.main->error.notable);
+ fl_print_format("%r%[%QRule setting has an invalid number '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, global.main->program.error.context);
+ fl_print_format(f_string_format_Q_range_single_s.string, global.main->program.error.to, global.main->program.error.notable, cache->buffer_item, cache->content_actions.array[i].array[1], global.main->program.error.notable);
if (zero_only) {
- fl_print_format("%[', only%] ", global.main->error.to, global.main->error.context, global.main->error.context);
- fl_print_format("%[0%]%[ is", global.main->error.to, global.main->error.notable, global.main->error.notable, global.main->error.context);
+ fl_print_format("%[', only%] ", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format("%[0%]%[ is", global.main->program.error.to, global.main->program.error.notable, global.main->program.error.notable, global.main->program.error.context);
}
else {
- fl_print_format("%[', only the whole numbers inclusively between%] ", global.main->error.to, global.main->error.context, global.main->error.context);
- fl_print_format("%[1%] %[and%] ", global.main->error.to, global.main->error.notable, global.main->error.notable, global.main->error.context, global.main->error.context);
- fl_print_format("%[99%] %[are", global.main->error.to, global.main->error.notable, global.main->error.notable, global.main->error.context);
+ fl_print_format("%[', only the whole numbers inclusively between%] ", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format("%[1%] %[and%] ", global.main->program.error.to, global.main->program.error.notable, global.main->program.error.notable, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format("%[99%] %[are", global.main->program.error.to, global.main->program.error.notable, global.main->program.error.notable, global.main->program.error.context);
}
- fl_print_format(" allowed for the designated scheduler.%]%r", global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format(" allowed for the designated scheduler.%]%r", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
- controller_rule_print_error_cache(global.main->error, cache->action, F_false);
+ controller_rule_print_error_cache(global.main->program.error, cache->action, F_false);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
}
if (F_status_is_error_not(status_return)) {
}
}
else {
- controller_rule_print_error(global.thread, global.main->error, cache->action, status, "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, cache->action, status, "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
status = F_status_set_error(status);
if (F_status_is_error_not(status_return)) {
if (type == controller_rule_setting_type_timeout_e) {
if (cache->content_actions.array[i].used != 2) {
- controller_rule_setting_read_print_error(global.main->error, "requires exactly two Content", i, line_item, global.thread, cache);
+ controller_rule_setting_read_print_error(global.main->program.error, "requires exactly two Content", i, line_item, global.thread, cache);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
timeout_code = controller_rule_timeout_code_stop_d;
}
else {
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
+ if (global.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, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &global.main->setting.state);
cache->action.line_action = ++cache->action.line_item;
- controller_lock_print(global.main->error.to, global.thread);
+ controller_lock_print(global.main->program.error.to, global.thread);
- fl_print_format("%r%[%QRule setting's first value has '%]", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, global.main->error.context);
- fl_print_format(f_string_format_Q_range_single_s.string, global.main->error.to, global.main->error.notable, cache->buffer_item, cache->content_actions.array[i].array[0], global.main->error.notable);
- fl_print_format("%[' but only supports %r, %r, and %r.%]%r", global.main->error.to, global.main->error.context, controller_kill_s, controller_start_s, controller_stop_s, global.main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QRule setting's first value has '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, global.main->program.error.context);
+ fl_print_format(f_string_format_Q_range_single_s.string, global.main->program.error.to, global.main->program.error.notable, cache->buffer_item, cache->content_actions.array[i].array[0], global.main->program.error.notable);
+ fl_print_format("%[' but only supports %r, %r, and %r.%]%r", global.main->program.error.to, global.main->program.error.context, controller_kill_s, controller_start_s, controller_stop_s, global.main->program.error.context, f_string_eol_s);
- controller_rule_print_error_cache(global.main->error, cache->action, F_false);
+ controller_rule_print_error_cache(global.main->program.error, cache->action, F_false);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
}
if (F_status_is_error_not(status_return)) {
status = F_status_set_fine(status);
if (status == F_number_overflow) {
- controller_rule_setting_read_print_error_with_range(global.main->error, " has an unsupported number", cache->content_actions.array[i].array[1], ", the number is too large for this system", i, line_item, global.thread, cache);
+ controller_rule_setting_read_print_error_with_range(global.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, global.thread, cache);
}
else if (status == F_data_not || status == F_number || status == F_number_underflow || status == F_number_negative || status == F_number_positive || status == F_number_decimal) {
- controller_rule_setting_read_print_error_with_range(global.main->error, " has an invalid number", cache->content_actions.array[i].array[1], ", only positive whole numbers are allowed", i, line_item, global.thread, cache);
+ controller_rule_setting_read_print_error_with_range(global.main->program.error, " has an invalid number", cache->content_actions.array[i].array[1], ", only positive whole numbers are allowed", i, line_item, global.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, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &global.main->setting.state);
cache->action.line_action = ++cache->action.line_item;
- controller_rule_print_error(global.thread, global.main->error, cache->action, status, "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, cache->action, status, "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
}
if (F_status_is_error_not(status_return)) {
rule->timeout_stop = number;
}
- if (global.main->error.verbosity == f_console_verbosity_debug_e || (global.main->error.verbosity == f_console_verbosity_verbose_e && (global.main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e))) {
+ if (global.main->program.error.verbosity == f_console_verbosity_debug_e || (global.main->program.error.verbosity == f_console_verbosity_verbose_e && (global.main->program.parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e))) {
f_string_static_t name_sub = controller_stop_s;
if (timeout_code == controller_rule_timeout_code_kill_d) {
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(global.thread, global.main->error, F_status_set_fine(status), "f_rip_dynamic_partial_nulless", F_true);
+ controller_print_error(global.thread, global.main->program.error, F_status_set_fine(status), "f_rip_dynamic_partial_nulless", F_true);
break;
}
if (type == controller_rule_setting_type_capability_e || type == controller_rule_setting_type_nice_e || type == controller_rule_setting_type_user_e) {
if (cache->content_actions.array[i].used != 1 || type == controller_rule_setting_type_capability_e && rule->capability || type == controller_rule_setting_type_group_e && (rule->has & controller_rule_has_group_d) || type == controller_rule_setting_type_nice_e && (rule->has & controller_rule_has_nice_d) || type == controller_rule_setting_type_user_e && (rule->has & controller_rule_has_user_d)) {
- controller_rule_setting_read_print_error(global.main->error, "requires exactly one Content", i, line_item, global.thread, cache);
+ controller_rule_setting_read_print_error(global.main->program.error, "requires exactly one Content", i, line_item, global.thread, cache);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_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, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &global.main->setting.state);
cache->action.line_action = ++cache->action.line_item;
- controller_lock_print(global.main->error.to, global.thread);
+ controller_lock_print(global.main->program.error.to, global.thread);
- controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
- controller_rule_print_error_cache(global.main->error, cache->action, F_false);
+ controller_rule_print_error_cache(global.main->program.error, cache->action, F_false);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
if (F_status_set_fine(status) == F_memory_not) {
status_return = 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, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &global.main->setting.state);
cache->action.line_action = ++cache->action.line_item;
- controller_lock_print(global.main->error.to, global.thread);
+ controller_lock_print(global.main->program.error.to, global.thread);
- controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "f_capability_from_text", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, cache->action, F_status_set_fine(status), "f_capability_from_text", F_true, F_false);
- controller_rule_print_error_cache(global.main->error, cache->action, F_false);
+ controller_rule_print_error_cache(global.main->program.error, cache->action, F_false);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
status_return = status;
break;
}
- controller_rule_setting_read_print_error(global.main->error, "failed to process the capabilities", i, line_item, global.thread, cache);
+ controller_rule_setting_read_print_error(global.main->program.error, "failed to process the capabilities", i, line_item, global.thread, cache);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
status = F_status_set_fine(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 (global.main->error.verbosity > f_console_verbosity_quiet_e) {
+ if (global.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, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &global.main->setting.state);
cache->action.line_action = ++cache->action.line_item;
- controller_lock_print(global.main->error.to, global.thread);
+ controller_lock_print(global.main->program.error.to, global.thread);
- fl_print_format("%r%[%QRule setting has an invalid number '%]", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, global.main->error.context);
- fl_print_format(f_string_format_Q_range_single_s.string, global.main->error.to, global.main->error.notable, cache->buffer_item, cache->content_actions.array[i].array[0], global.main->error.notable);
- fl_print_format("%[', only the whole numbers inclusively between%] ", global.main->error.to, global.main->error.context, global.main->error.context);
- fl_print_format("%[-20%]", global.main->error.to, global.main->error.notable, global.main->error.notable);
- fl_print_format(" %[and%] ", global.main->error.to, global.main->error.context, global.main->error.context);
- fl_print_format("%[19%]", global.main->error.to, global.main->error.notable, global.main->error.notable);
- fl_print_format(" %[are allowed.%]%r", global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QRule setting has an invalid number '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, global.main->program.error.context);
+ fl_print_format(f_string_format_Q_range_single_s.string, global.main->program.error.to, global.main->program.error.notable, cache->buffer_item, cache->content_actions.array[i].array[0], global.main->program.error.notable);
+ fl_print_format("%[', only the whole numbers inclusively between%] ", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format("%[-20%]", global.main->program.error.to, global.main->program.error.notable, global.main->program.error.notable);
+ fl_print_format(" %[and%] ", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context);
+ fl_print_format("%[19%]", global.main->program.error.to, global.main->program.error.notable, global.main->program.error.notable);
+ fl_print_format(" %[are allowed.%]%r", global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
- controller_rule_print_error_cache(global.main->error, cache->action, F_false);
+ controller_rule_print_error_cache(global.main->program.error, cache->action, F_false);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
}
if (F_status_is_error_not(status_return)) {
}
}
else {
- controller_rule_print_error(global.thread, global.main->error, cache->action, status, "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, cache->action, status, "fl_conversion_dynamic_partial_to_signed_detect", F_true, F_false);
status = F_status_set_error(status);
if (F_status_is_error_not(status_return)) {
rule->nice = number;
rule->has |= controller_rule_has_nice_d;
- if ((global.main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) || global.main->error.verbosity == f_console_verbosity_verbose_e) {
+ if ((global.main->program.parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) || global.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);
// 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, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &global.main->setting.state);
cache->action.line_action = ++cache->action.line_item;
- controller_lock_print(global.main->error.to, global.thread);
+ controller_lock_print(global.main->program.error.to, global.thread);
- controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
- controller_rule_print_error_cache(global.main->error, cache->action, F_false);
+ controller_rule_print_error_cache(global.main->program.error, cache->action, F_false);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
if (F_status_set_fine(status) == F_memory_not) {
status_return = status;
status = F_status_set_fine(status);
if (status == F_exist_not) {
- controller_rule_setting_read_print_error_with_range(global.main->error, " has an invalid user", cache->content_actions.array[i].array[0], ", because no user was found by that name", i, line_item, global.thread, cache);
+ controller_rule_setting_read_print_error_with_range(global.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, global.thread, cache);
}
else if (status == F_number_too_large) {
- controller_rule_setting_read_print_error_with_range(global.main->error, " has an invalid user", cache->content_actions.array[i].array[0], ", because the given ID is too large", i, line_item, global.thread, cache);
+ controller_rule_setting_read_print_error_with_range(global.main->program.error, " has an invalid user", cache->content_actions.array[i].array[0], ", because the given ID is too large", i, line_item, global.thread, cache);
}
else if (status == F_number) {
- controller_rule_setting_read_print_error_with_range(global.main->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, global.thread, cache);
+ controller_rule_setting_read_print_error_with_range(global.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, global.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, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &global.main->setting.state);
cache->action.line_action = ++cache->action.line_item;
- controller_rule_print_error(global.thread, global.main->error, cache->action, status, "controller_get_id_user", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, cache->action, status, "controller_get_id_user", F_true, F_false);
- controller_rule_item_print_error(global.thread, global.main->error, cache->action, F_false, F_status_set_fine(status));
+ controller_rule_item_print_error(global.thread, global.main->program.error, cache->action, F_false, F_status_set_fine(status));
}
if (F_status_is_error_not(status_return)) {
rule->user = number;
rule->has |= controller_rule_has_user_d;
- if (global.main->error.verbosity == f_console_verbosity_debug_e || (global.main->error.verbosity == f_console_verbosity_verbose_e && (global.main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e))) {
+ if (global.main->program.error.verbosity == f_console_verbosity_debug_e || (global.main->program.error.verbosity == f_console_verbosity_verbose_e && (global.main->program.parameters.array[controller_parameter_simulate_e].result & f_console_result_found_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);
if (type == controller_rule_setting_type_group_e) {
if (!cache->content_actions.array[i].used) {
- controller_rule_setting_read_print_error(global.main->error, "requires one or more Content", i, line_item, global.thread, cache);
+ controller_rule_setting_read_print_error(global.main->program.error, "requires one or more Content", i, line_item, global.thread, cache);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
for (j = 0; j < cache->content_actions.array[i].used; ++j) {
- macro_f_int32s_t_increase_by(status, rule->groups, controller_common_allocation_small_d)
+ macro_f_int32s_t_increase_by(status, rule->groups, controller_common_allocation_small_d);
if (F_status_is_error(status)) {
- controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "macro_f_number_unsigneds_t_increase_by", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, cache->action, F_status_set_fine(status), "macro_f_number_unsigneds_t_increase_by", F_true, F_false);
if (F_status_set_fine(status) == F_memory_not) {
status_return = 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, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &global.main->setting.state);
cache->action.line_action = ++cache->action.line_item;
- controller_rule_item_print_error(global.thread, global.main->error, cache->action, F_false, F_status_set_fine(status));
+ controller_rule_item_print_error(global.thread, global.main->program.error, cache->action, F_false, F_status_set_fine(status));
continue;
}
status = F_status_set_fine(status);
if (status == F_exist_not) {
- controller_rule_setting_read_print_error_with_range(global.main->error, " has an invalid group", cache->content_actions.array[i].array[j], ", because no group was found by that name", i, line_item, global.thread, cache);
+ controller_rule_setting_read_print_error_with_range(global.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, global.thread, cache);
}
else if (status == F_number_too_large) {
- controller_rule_setting_read_print_error_with_range(global.main->error, " has an invalid group", cache->content_actions.array[i].array[j], ", because the given ID is too large", i, line_item, global.thread, cache);
+ controller_rule_setting_read_print_error_with_range(global.main->program.error, " has an invalid group", cache->content_actions.array[i].array[j], ", because the given ID is too large", i, line_item, global.thread, cache);
}
else if (status == F_number) {
- controller_rule_setting_read_print_error_with_range(global.main->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, global.thread, cache);
+ controller_rule_setting_read_print_error_with_range(global.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, global.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, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &global.main->setting.state);
cache->action.line_action = ++cache->action.line_item;
- controller_rule_print_error(global.thread, global.main->error, cache->action, status, "f_account_group_id_by_name", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, cache->action, status, "f_account_group_id_by_name", F_true, F_false);
- controller_rule_item_print_error(global.thread, global.main->error, cache->action, F_false, F_status_set_fine(status));
+ controller_rule_item_print_error(global.thread, global.main->program.error, cache->action, F_false, F_status_set_fine(status));
}
if (F_status_is_error_not(status_return)) {
status = f_memory_array_increase(controller_common_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_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "f_memory_array_increase", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, cache->action, F_status_set_fine(status), "f_memory_array_increase", F_true, F_false);
if (F_status_set_fine(status) == F_memory_not) {
status_return = status;
// 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, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &global.main->setting.state);
cache->action.line_action = ++cache->action.line_item;
- controller_rule_item_print_error(global.thread, global.main->error, cache->action, F_false, F_status_set_fine(status));
+ controller_rule_item_print_error(global.thread, global.main->program.error, cache->action, F_false, F_status_set_fine(status));
continue;
}
status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[j], &setting_values->array[setting_values->used]);
if (F_status_is_error(status)) {
- controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
setting_values->array[setting_values->used].used = 0;
// 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, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &global.main->setting.state);
cache->action.line_action = ++cache->action.line_item;
- controller_rule_item_print_error(global.thread, global.main->error, cache->action, F_false, F_status_set_fine(status));
+ controller_rule_item_print_error(global.thread, global.main->program.error, cache->action, F_false, F_status_set_fine(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, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &global.main->setting.state);
cache->action.line_action = ++cache->action.line_item;
if (status == F_false) {
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(global.main->error.to, global.thread);
+ if (global.main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(global.main->program.error.to, global.thread);
- fl_print_format("%r%[%QRule setting has an invalid environment variable name '%]", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, global.main->error.context);
- fl_print_format(f_string_format_Q_single_s.string, global.main->error.to, global.main->error.notable, setting_values->array[setting_values->used], global.main->error.notable);
- fl_print_format(f_string_format_sentence_end_quote_s.string, global.main->error.to, global.main->error.context, global.main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QRule setting has an invalid environment variable name '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, global.main->program.error.context);
+ fl_print_format(f_string_format_Q_single_s.string, global.main->program.error.to, global.main->program.error.notable, setting_values->array[setting_values->used], global.main->program.error.notable);
+ fl_print_format(f_string_format_sentence_end_quote_s.string, global.main->program.error.to, global.main->program.error.context, global.main->program.error.context, f_string_eol_s);
- controller_rule_print_error_cache(global.main->error, cache->action, F_false);
+ controller_rule_print_error_cache(global.main->program.error, cache->action, F_false);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
}
if (F_status_is_error_not(status_return)) {
else {
// This function should only return F_complete_not_utf on error.
- controller_rule_print_error(global.thread, global.main->error, cache->action, F_complete_not_utf, "controller_validate_environment_name", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, cache->action, F_complete_not_utf, "controller_validate_environment_name", F_true, F_false);
if (F_status_is_error_not(status_return)) {
status_return = status;
setting_values->array[setting_values->used].used = 0;
- controller_rule_item_print_error(global.thread, global.main->error, cache->action, F_false, F_status_set_fine(status));
+ controller_rule_item_print_error(global.thread, global.main->program.error, cache->action, F_false, F_status_set_fine(status));
continue;
}
controller_rule_setting_read_print_values(global, controller_environment_s, i, cache);
}
else {
- if (global.main->error.verbosity == f_console_verbosity_debug_e || (global.main->error.verbosity == f_console_verbosity_verbose_e && (global.main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e))) {
- controller_lock_print(global.main->output.to, global.thread);
+ if (global.main->program.error.verbosity == f_console_verbosity_debug_e || (global.main->program.error.verbosity == f_console_verbosity_verbose_e && (global.main->program.parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e))) {
+ controller_lock_print(global.main->program.output.to, global.thread);
- fl_print_format("%rProcessing rule item action '%[%r%]' setting value to an empty set.%r", global.main->output.to, f_string_eol_s, global.main->context.set.title, controller_environment_s, global.main->context.set.title, f_string_eol_s);
+ fl_print_format("%rProcessing rule item action '%[%r%]' setting value to an empty set.%r", global.main->program.output.to, f_string_eol_s, global.main->program.context.set.title, controller_environment_s, global.main->program.context.set.title, f_string_eol_s);
- controller_unlock_print_flush(global.main->output.to, global.thread);
+ controller_unlock_print_flush(global.main->program.output.to, global.thread);
}
}
// The "on" Rule Setting.
if (cache->content_actions.array[i].used != 4) {
- controller_rule_setting_read_print_error(global.main->error, "requires exactly four Content", i, line_item, global.thread, cache);
+ controller_rule_setting_read_print_error(global.main->program.error, "requires exactly four Content", i, line_item, global.thread, cache);
if (F_status_is_error_not(status_return)) {
status_return = F_status_set_error(F_valid_not);
action = controller_rule_action_type_thaw_e;
}
else {
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
+ if (global.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, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &global.main->setting.state);
cache->action.line_action = ++cache->action.line_item;
f_thread_mutex_lock(&global.thread->lock.print);
- controller_lock_print(global.main->error.to, global.thread);
+ controller_lock_print(global.main->program.error.to, global.thread);
- fl_print_format("%r%[%QRule setting's second value has '%]", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, global.main->error.context);
- fl_print_format(f_string_format_Q_range_single_s.string, global.main->error.to, global.main->error.notable, cache->buffer_item, cache->content_actions.array[i].array[1], global.main->error.notable);
- fl_print_format("%[' but only supports %r, %r, %r, %r, %r", global.main->error.to, global.main->error.context, controller_freeze_s, controller_kill_s, controller_pause_s, controller_reload_s, controller_restart_s);
- fl_print_format("%r, %r, %r, and %r.%]%r", global.main->error.to, controller_resume_s, controller_start_s, controller_stop_s, controller_thaw_s, global.main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QRule setting's second value has '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, global.main->program.error.context);
+ fl_print_format(f_string_format_Q_range_single_s.string, global.main->program.error.to, global.main->program.error.notable, cache->buffer_item, cache->content_actions.array[i].array[1], global.main->program.error.notable);
+ fl_print_format("%[' but only supports %r, %r, %r, %r, %r", global.main->program.error.to, global.main->program.error.context, controller_freeze_s, controller_kill_s, controller_pause_s, controller_reload_s, controller_restart_s);
+ fl_print_format("%r, %r, %r, and %r.%]%r", global.main->program.error.to, controller_resume_s, controller_start_s, controller_stop_s, controller_thaw_s, global.main->program.error.context, f_string_eol_s);
- controller_rule_print_error_cache(global.main->error, cache->action, F_false);
+ controller_rule_print_error_cache(global.main->program.error, cache->action, F_false);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
}
if (F_status_is_error_not(status_return)) {
}
if (F_status_is_error(status)) {
- controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "controller_rule_ons_increase", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, cache->action, F_status_set_fine(status), "controller_rule_ons_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) {
setting_values = &rule->ons.array[j].wish;
}
else {
- if (global.main->error.verbosity > f_console_verbosity_quiet_e) {
+ if (global.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, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &global.main->setting.state);
cache->action.line_action = ++cache->action.line_item;
- controller_lock_print(global.main->error.to, global.thread);
+ controller_lock_print(global.main->program.error.to, global.thread);
- fl_print_format("%r%[%QRule setting's second value has '%]", global.main->error.to, f_string_eol_s, global.main->error.context, global.main->error.prefix, global.main->error.context);
- fl_print_format(f_string_format_Q_range_single_s.string, global.main->error.to, global.main->error.notable, cache->buffer_item, cache->content_actions.array[i].array[1], global.main->error.notable);
- fl_print_format("%[' but only supports %r, %r, and %r.%]%r", global.main->error.to, global.main->error.context, controller_need_s, controller_want_s, controller_wish_s, global.main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QRule setting's second value has '%]", global.main->program.error.to, f_string_eol_s, global.main->program.error.context, global.main->program.error.prefix, global.main->program.error.context);
+ fl_print_format(f_string_format_Q_range_single_s.string, global.main->program.error.to, global.main->program.error.notable, cache->buffer_item, cache->content_actions.array[i].array[1], global.main->program.error.notable);
+ fl_print_format("%[' but only supports %r, %r, and %r.%]%r", global.main->program.error.to, global.main->program.error.context, controller_need_s, controller_want_s, controller_wish_s, global.main->program.error.context, f_string_eol_s);
- controller_rule_print_error_cache(global.main->error, cache->action, F_false);
+ controller_rule_print_error_cache(global.main->program.error, cache->action, F_false);
- controller_unlock_print_flush(global.main->error.to, global.thread);
+ controller_unlock_print_flush(global.main->program.error.to, global.thread);
}
if (F_status_is_error_not(status_return)) {
status = f_memory_array_increase_by(controller_common_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_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "f_memory_array_increase_by", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, cache->action, F_status_set_fine(status), "f_memory_array_increase_by", 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, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &global.main->setting.state);
cache->action.line_action = ++cache->action.line_item;
- controller_rule_item_print_error(global.thread, global.main->error, cache->action, F_false, F_status_set_fine(status));
+ controller_rule_item_print_error(global.thread, global.main->program.error, cache->action, F_false, F_status_set_fine(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, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &global.main->setting.state);
cache->action.line_action = ++cache->action.line_item;
- controller_rule_item_print_error(global.thread, global.main->error, cache->action, F_false, F_status_set_fine(status));
+ controller_rule_item_print_error(global.thread, global.main->program.error, cache->action, F_false, F_status_set_fine(status));
continue;
}
if (F_status_is_error(status)) {
setting_values->array[setting_values->used].used = 0;
- controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "f_file_name_base", F_true, F_false);
+ controller_rule_print_error(global.thread, global.main->program.error, cache->action, F_status_set_fine(status), "f_file_name_base", F_true, F_false);
if (F_status_set_fine(status) == F_memory_not) {
status_return = status;
++rule->ons.used;
}
- if (global.main->error.verbosity == f_console_verbosity_debug_e || (global.main->error.verbosity == f_console_verbosity_verbose_e && (global.main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e))) {
- controller_lock_print(global.main->output.to, global.thread);
+ if (global.main->program.error.verbosity == f_console_verbosity_debug_e || (global.main->program.error.verbosity == f_console_verbosity_verbose_e && (global.main->program.parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e))) {
+ controller_lock_print(global.main->program.output.to, global.thread);
- fl_print_format("%rProcessing rule item action '%[%r%]', adding ", global.main->output.to, f_string_eol_s, global.main->context.set.title, controller_on_s, global.main->context.set.title);
- fl_print_format("'%[%/Q%]' of ", global.main->output.to, global.main->context.set.notable, cache->buffer_item, cache->content_actions.array[i].array[1], global.main->context.set.notable);
- fl_print_format("'%[%/Q%]/", global.main->output.to, global.main->context.set.important, cache->buffer_item, cache->content_actions.array[i].array[2], global.main->context.set.important);
- fl_print_format("%[%/Q%]'.%r", global.main->output.to, global.main->context.set.important, cache->buffer_item, cache->content_actions.array[i].array[3], global.main->context.set.important, f_string_eol_s);
+ fl_print_format("%rProcessing rule item action '%[%r%]', adding ", global.main->program.output.to, f_string_eol_s, global.main->program.context.set.title, controller_on_s, global.main->program.context.set.title);
+ fl_print_format("'%[%/Q%]' of ", global.main->program.output.to, global.main->program.context.set.notable, cache->buffer_item, cache->content_actions.array[i].array[1], global.main->program.context.set.notable);
+ fl_print_format("'%[%/Q%]/", global.main->program.output.to, global.main->program.context.set.important, cache->buffer_item, cache->content_actions.array[i].array[2], global.main->program.context.set.important);
+ fl_print_format("%[%/Q%]'.%r", global.main->program.output.to, global.main->program.context.set.important, cache->buffer_item, cache->content_actions.array[i].array[3], global.main->program.context.set.important, f_string_eol_s);
- controller_unlock_print_flush(global.main->output.to, global.thread);
+ controller_unlock_print_flush(global.main->program.output.to, global.thread);
}
} // for
break;
default:
- if (main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(main->error.to, global.thread);
+ if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(main->program.error.to, global.thread);
- fl_print_format("%r%[%QUnsupported action type '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format(f_string_format_r_single_s.string, main->error.to, main->error.notable, controller_rule_action_type_name(action), main->error.notable);
- fl_print_format("%[' while attempting to validate rule execution.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QUnsupported action type '%]", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, main->program.error.context);
+ fl_print_format(f_string_format_r_single_s.string, main->program.error.to, main->program.error.notable, controller_rule_action_type_name(action), main->program.error.notable);
+ fl_print_format("%[' while attempting to validate rule execution.%]%r", main->program.error.to, main->program.error.context, main->program.error.context, f_string_eol_s);
- controller_rule_print_error_cache(main->error, cache->action, F_true);
+ controller_rule_print_error_cache(main->program.error, cache->action, F_true);
- controller_unlock_print_flush(main->error.to, global.thread);
+ controller_unlock_print_flush(main->program.error.to, global.thread);
}
return;
} // for
if (missing) {
- controller_lock_print(main->output.to, global.thread);
+ controller_lock_print(main->program.output.to, global.thread);
if (rule.items.used) {
- fl_print_format("%rRule '", main->output.to, f_string_eol_s);
- fl_print_format("%[%Q%]' has no '", main->output.to, main->context.set.title, rule.name, main->context.set.title);
- fl_print_format("%[%r%]' action to execute and would '", main->output.to, main->context.set.title, controller_rule_action_type_name(action), main->context.set.title);
- fl_print_format("%[%r%]' because it is '", main->output.to, main->context.set.important, options & controller_process_option_require_d ? controller_fail_s : controller_succeed_s, main->context.set.important);
- fl_print_format("%[%r%]'.%r", main->output.to, main->context.set.important, options & controller_process_option_require_d ? controller_required_s : controller_optional_s, main->context.set.important, f_string_eol_s);
+ fl_print_format("%rRule '", main->program.output.to, f_string_eol_s);
+ fl_print_format("%[%Q%]' has no '", main->program.output.to, main->program.context.set.title, rule.name, main->program.context.set.title);
+ fl_print_format("%[%r%]' action to execute and would '", main->program.output.to, main->program.context.set.title, controller_rule_action_type_name(action), main->program.context.set.title);
+ fl_print_format("%[%r%]' because it is '", main->program.output.to, main->program.context.set.important, options & controller_process_option_require_d ? controller_fail_s : controller_succeed_s, main->program.context.set.important);
+ fl_print_format("%[%r%]'.%r", main->program.output.to, main->program.context.set.important, options & controller_process_option_require_d ? controller_required_s : controller_optional_s, main->program.context.set.important, f_string_eol_s);
}
else {
- fl_print_format("%rRule '", main->output.to, f_string_eol_s);
- fl_print_format("%[%Q%]' has no known '", main->output.to, main->context.set.title, rule.name, main->context.set.title);
- fl_print_format("%[%r %r%]' (such as ", main->output.to, main->context.set.title, controller_rule_s, controller_type_s, main->context.set.title);
- fl_print_format("'%[%r%]', ", main->output.to, main->context.set.title, controller_command_s, main->context.set.title);
- fl_print_format("'%[%r%]', ", main->output.to, main->context.set.title, controller_service_s, main->context.set.title);
- fl_print_format("'%[%r%]', or ", main->output.to, main->context.set.title, controller_script_s, main->context.set.title);
- fl_print_format("'%[%r%]'", main->output.to, main->context.set.title, controller_utility_s, main->context.set.title);
- fl_print_format(") and would '%[%r%]' because it is '", main->output.to, main->context.set.important, options & controller_process_option_require_d ? controller_fail_s : controller_succeed_s, main->context.set.important);
- fl_print_format("%[%r%]'.%r", main->output.to, main->context.set.important, options & controller_process_option_require_d ? controller_required_s : controller_optional_s, main->context.set.important, f_string_eol_s);
+ fl_print_format("%rRule '", main->program.output.to, f_string_eol_s);
+ fl_print_format("%[%Q%]' has no known '", main->program.output.to, main->program.context.set.title, rule.name, main->program.context.set.title);
+ fl_print_format("%[%r %r%]' (such as ", main->program.output.to, main->program.context.set.title, controller_rule_s, controller_type_s, main->program.context.set.title);
+ fl_print_format("'%[%r%]', ", main->program.output.to, main->program.context.set.title, controller_command_s, main->program.context.set.title);
+ fl_print_format("'%[%r%]', ", main->program.output.to, main->program.context.set.title, controller_service_s, main->program.context.set.title);
+ fl_print_format("'%[%r%]', or ", main->program.output.to, main->program.context.set.title, controller_script_s, main->program.context.set.title);
+ fl_print_format("'%[%r%]'", main->program.output.to, main->program.context.set.title, controller_utility_s, main->program.context.set.title);
+ fl_print_format(") and would '%[%r%]' because it is '", main->program.output.to, main->program.context.set.important, options & controller_process_option_require_d ? controller_fail_s : controller_succeed_s, main->program.context.set.important);
+ fl_print_format("%[%r%]'.%r", main->program.output.to, main->program.context.set.important, options & controller_process_option_require_d ? controller_required_s : controller_optional_s, main->program.context.set.important, f_string_eol_s);
}
- controller_unlock_print_flush(main->output.to, global.thread);
+ controller_unlock_print_flush(main->program.output.to, global.thread);
}
}
- controller_lock_print(main->output.to, global.thread);
+ controller_lock_print(main->program.output.to, global.thread);
- fl_print_format("%rRule %[%Q%] {%r", main->output.to, f_string_eol_s, main->context.set.title, rule.alias, main->context.set.title, f_string_eol_s);
+ fl_print_format("%rRule %[%Q%] {%r", main->program.output.to, f_string_eol_s, main->program.context.set.title, rule.alias, main->program.context.set.title, f_string_eol_s);
// Name.
- fl_print_format(" %[%r%] %Q%r", main->output.to, main->context.set.important, controller_name_s, main->context.set.important, rule.name, f_string_eol_s);
+ fl_print_format(" %[%r%] %Q%r", main->program.output.to, main->program.context.set.important, controller_name_s, main->program.context.set.important, rule.name, f_string_eol_s);
// Capability.
- fl_print_format(" %[%r%] ", main->output.to, main->context.set.important, controller_capability_s, main->context.set.important);
+ fl_print_format(" %[%r%] ", main->program.output.to, main->program.context.set.important, controller_capability_s, main->program.context.set.important);
if (f_capability_supported()) {
if (rule.capability) {
cache->action.generic.used = 0;
if (F_status_is_error_not(f_capability_to_text(rule.capability, &cache->action.generic))) {
- f_print_dynamic_safely(cache->action.generic, main->output.to);
+ f_print_dynamic_safely(cache->action.generic, main->program.output.to);
}
}
- f_print_dynamic_raw(f_string_eol_s, main->output.to);
+ f_print_dynamic_raw(f_string_eol_s, main->program.output.to);
}
else {
- fl_print_format("%[(unsupported)%]%r", main->output.to, main->context.set.warning, main->context.set.warning, f_string_eol_s);
+ fl_print_format("%[(unsupported)%]%r", main->program.output.to, main->program.context.set.warning, main->program.context.set.warning, f_string_eol_s);
}
// Control Group.
- fl_print_format(" %[%r%]", main->output.to, main->context.set.important, controller_cgroup_s, main->context.set.important);
+ fl_print_format(" %[%r%]", main->program.output.to, main->program.context.set.important, controller_cgroup_s, main->program.context.set.important);
if (rule.has & controller_rule_has_cgroup_d) {
- fl_print_format(" %r", main->output.to, rule.cgroup.as_new ? controller_new_s : controller_existing_s);
+ fl_print_format(" %r", main->program.output.to, rule.cgroup.as_new ? controller_new_s : controller_existing_s);
for (i = 0; i < rule.cgroup.groups.used; ++i) {
if (rule.cgroup.groups.array[i].used) {
- fl_print_format(" %Q", main->output.to, rule.cgroup.groups.array[i]);
+ fl_print_format(" %Q", main->program.output.to, rule.cgroup.groups.array[i]);
}
} // for
}
- f_print_dynamic_raw(f_string_eol_s, main->output.to);
+ f_print_dynamic_raw(f_string_eol_s, main->program.output.to);
// How.
- fl_print_format(" %[%r%] %r%r", main->output.to, main->context.set.important, controller_how_s, main->context.set.important, options & controller_process_option_asynchronous_d ? controller_asynchronous_s : controller_synchronous_s, f_string_eol_s);
+ fl_print_format(" %[%r%] %r%r", main->program.output.to, main->program.context.set.important, controller_how_s, main->program.context.set.important, options & controller_process_option_asynchronous_d ? controller_asynchronous_s : controller_synchronous_s, f_string_eol_s);
// Nice.
- fl_print_format(" %[%r%]", main->output.to, main->context.set.important, controller_nice_s, main->context.set.important);
+ fl_print_format(" %[%r%]", main->program.output.to, main->program.context.set.important, controller_nice_s, main->program.context.set.important);
if (rule.has & controller_rule_has_nice_d) {
- fl_print_format(" %i", main->output.to, rule.nice);
+ fl_print_format(" %i", main->program.output.to, rule.nice);
}
- f_print_dynamic_raw(f_string_eol_s, main->output.to);
+ f_print_dynamic_raw(f_string_eol_s, main->program.output.to);
// Scheduler.
- fl_print_format(" %[%r%]", main->output.to, main->context.set.important, controller_scheduler_s, main->context.set.important);
+ fl_print_format(" %[%r%]", main->program.output.to, main->program.context.set.important, controller_scheduler_s, main->program.context.set.important);
if (rule.has & controller_rule_has_scheduler_d) {
f_string_static_t policy = f_string_static_t_initialize;
policy = controller_round_robin_s;
}
- fl_print_format(" %r %i", main->output.to, policy, rule.scheduler.priority);
+ fl_print_format(" %r %i", main->program.output.to, policy, rule.scheduler.priority);
}
- f_print_dynamic_raw(f_string_eol_s, main->output.to);
+ f_print_dynamic_raw(f_string_eol_s, main->program.output.to);
// Engine.
if (rule.engine_arguments.used) {
- fl_print_format(" %[%r%] %Q", main->output.to, main->context.set.important, controller_engine_s, main->context.set.important, rule.engine);
+ fl_print_format(" %[%r%] %Q", main->program.output.to, main->program.context.set.important, controller_engine_s, main->program.context.set.important, rule.engine);
for (i = 0; i < rule.engine_arguments.used; ++i) {
if (rule.engine_arguments.array[i].used) {
- fl_print_format(" %Q", main->output.to, rule.engine_arguments.array[i]);
+ fl_print_format(" %Q", main->program.output.to, rule.engine_arguments.array[i]);
}
} // for
- fl_print_format("%r", main->output.to, f_string_eol_s);
+ fl_print_format("%r", main->program.output.to, f_string_eol_s);
}
else {
- fl_print_format(" %[%r%] %Q%r", main->output.to, main->context.set.important, controller_engine_s, main->context.set.important, rule.engine, f_string_eol_s);
+ fl_print_format(" %[%r%] %Q%r", main->program.output.to, main->program.context.set.important, controller_engine_s, main->program.context.set.important, rule.engine, f_string_eol_s);
}
// User.
- fl_print_format(" %[%r%]", main->output.to, main->context.set.important, controller_user_s, main->context.set.important);
+ fl_print_format(" %[%r%]", main->program.output.to, main->program.context.set.important, controller_user_s, main->program.context.set.important);
if (rule.has & controller_rule_has_user_d) {
- fl_print_format(" %i", main->output.to, rule.user);
+ fl_print_format(" %i", main->program.output.to, rule.user);
}
- f_print_dynamic_raw(f_string_eol_s, main->output.to);
+ f_print_dynamic_raw(f_string_eol_s, main->program.output.to);
// Wait.
- fl_print_format(" %[%r%] %r%r", main->output.to, main->context.set.important, controller_wait_s, main->context.set.important, options & controller_process_option_wait_d ? controller_yes_s : controller_no_s, f_string_eol_s);
+ fl_print_format(" %[%r%] %r%r", main->program.output.to, main->program.context.set.important, controller_wait_s, main->program.context.set.important, options & controller_process_option_wait_d ? controller_yes_s : controller_no_s, f_string_eol_s);
// Affinity.
- fl_print_format(" %[%r%] {%r", main->output.to, main->context.set.important, controller_affinity_s, main->context.set.important, f_string_eol_s);
+ fl_print_format(" %[%r%] {%r", main->program.output.to, main->program.context.set.important, controller_affinity_s, main->program.context.set.important, f_string_eol_s);
for (i = 0; i < rule.affinity.used; ++i) {
- fl_print_format(" %i%r", main->output.to, rule.affinity.array[i], f_string_eol_s);
+ fl_print_format(" %i%r", main->program.output.to, rule.affinity.array[i], f_string_eol_s);
} // for
// Define.
- fl_print_format(" }%r %[%r%] {%r", main->output.to, f_string_eol_s, main->context.set.important, controller_define_s, main->context.set.important, f_string_eol_s);
+ fl_print_format(" }%r %[%r%] {%r", main->program.output.to, f_string_eol_s, main->program.context.set.important, controller_define_s, main->program.context.set.important, f_string_eol_s);
for (i = 0; i < rule.define.used; ++i) {
if (rule.define.array[i].key.used && rule.define.array[i].value.used) {
- fl_print_format(" %Q %[=%] %Q%r", main->output.to, rule.define.array[i].key, main->context.set.important, main->context.set.important, rule.define.array[i].value, f_string_eol_s);
+ fl_print_format(" %Q %[=%] %Q%r", main->program.output.to, rule.define.array[i].key, main->program.context.set.important, main->program.context.set.important, rule.define.array[i].value, f_string_eol_s);
}
} // for
// Environment.
- fl_print_format(" }%r %[%r%] {%r", main->output.to, f_string_eol_s, main->context.set.important, controller_environment_s, main->context.set.important, f_string_eol_s);
+ fl_print_format(" }%r %[%r%] {%r", main->program.output.to, f_string_eol_s, main->program.context.set.important, controller_environment_s, main->program.context.set.important, f_string_eol_s);
for (i = 0; i < rule.environment.used; ++i) {
if (rule.environment.array[i].used) {
- fl_print_format(" %Q%r", main->output.to, rule.environment.array[i], f_string_eol_s);
+ fl_print_format(" %Q%r", main->program.output.to, rule.environment.array[i], f_string_eol_s);
}
} // for
- fl_print_format(" }%r %[%r%] {%r", main->output.to, f_string_eol_s, main->context.set.important, controller_parameter_s, main->context.set.important, f_string_eol_s);
+ fl_print_format(" }%r %[%r%] {%r", main->program.output.to, f_string_eol_s, main->program.context.set.important, controller_parameter_s, main->program.context.set.important, f_string_eol_s);
// Parameter.
for (i = 0; i < rule.parameter.used; ++i) {
- if (rule.parameter.array[i].name.used && rule.parameter.array[i].value.used) {
- fl_print_format(" %Q %[=%] %Q%r", main->output.to, rule.parameter.array[i].name, main->context.set.important, main->context.set.important, rule.parameter.array[i].value, f_string_eol_s);
+ if (rule.parameter.array[i].key.used && rule.parameter.array[i].value.used) {
+ fl_print_format(" %Q %[=%] %Q%r", main->program.output.to, rule.parameter.array[i].key, main->program.context.set.important, main->program.context.set.important, rule.parameter.array[i].value, f_string_eol_s);
}
} // for
// Group.
- fl_print_format(" }%r %[%r%] {%r", main->output.to, f_string_eol_s, main->context.set.important, controller_group_s, main->context.set.important, f_string_eol_s);
+ fl_print_format(" }%r %[%r%] {%r", main->program.output.to, f_string_eol_s, main->program.context.set.important, controller_group_s, main->program.context.set.important, f_string_eol_s);
if (rule.has & controller_rule_has_group_d) {
- fl_print_format(" %i%r", main->output.to, rule.group, f_string_eol_s);
+ fl_print_format(" %i%r", main->program.output.to, rule.group, f_string_eol_s);
for (i = 0; i < rule.groups.used; ++i) {
- fl_print_format(" %i%r", main->output.to, rule.groups.array[i], f_string_eol_s);
+ fl_print_format(" %i%r", main->program.output.to, rule.groups.array[i], f_string_eol_s);
} // for
}
// Limit.
- fl_print_format(" }%r %[%r%] {%r", main->output.to, f_string_eol_s, main->context.set.important, controller_limit_s, main->context.set.important, f_string_eol_s);
+ fl_print_format(" }%r %[%r%] {%r", main->program.output.to, f_string_eol_s, main->program.context.set.important, controller_limit_s, main->program.context.set.important, f_string_eol_s);
for (i = 0; i < rule.limits.used; ++i) {
- fl_print_format(" %Q %[=%] %un %un%r", main->output.to, controller_rule_setting_limit_type_name(rule.limits.array[i].type), main->context.set.important, main->context.set.important, rule.limits.array[i].value.rlim_cur, rule.limits.array[i].value.rlim_max, f_string_eol_s);
+ fl_print_format(" %Q %[=%] %un %un%r", main->program.output.to, controller_rule_setting_limit_type_name(rule.limits.array[i].type), main->program.context.set.important, main->program.context.set.important, rule.limits.array[i].value.rlim_cur, rule.limits.array[i].value.rlim_max, f_string_eol_s);
} // for
// On.
- fl_print_format(" }%r %[%r%] {%r", main->output.to, f_string_eol_s, main->context.set.important, controller_on_s, main->context.set.important, f_string_eol_s);
+ fl_print_format(" }%r %[%r%] {%r", main->program.output.to, f_string_eol_s, main->program.context.set.important, controller_on_s, main->program.context.set.important, f_string_eol_s);
for (i = 0; i < rule.ons.used; ++i) {
- fl_print_format(" %[%r%] {%r", main->output.to, main->context.set.important, controller_action_s, main->context.set.important, f_string_eol_s);
+ fl_print_format(" %[%r%] {%r", main->program.output.to, main->program.context.set.important, controller_action_s, main->program.context.set.important, f_string_eol_s);
{
f_string_static_t action = f_string_static_t_initialize;
action = controller_thaw_s;
}
- fl_print_format(" %[%r%] %r%r", main->output.to, main->context.set.important, controller_type_s, main->context.set.important, action, f_string_eol_s);
+ fl_print_format(" %[%r%] %r%r", main->program.output.to, main->program.context.set.important, controller_type_s, main->program.context.set.important, action, f_string_eol_s);
}
- fl_print_format(" %[%r%] {%r", main->output.to, main->context.set.important, controller_need_s, main->context.set.important, f_string_eol_s);
+ fl_print_format(" %[%r%] {%r", main->program.output.to, main->program.context.set.important, controller_need_s, main->program.context.set.important, f_string_eol_s);
for (j = 0; j < rule.ons.array[i].need.used; ++j) {
if (rule.ons.array[i].need.array[j].used) {
- fl_print_format(" %Q%r", main->output.to, rule.ons.array[i].need.array[j], f_string_eol_s);
+ fl_print_format(" %Q%r", main->program.output.to, rule.ons.array[i].need.array[j], f_string_eol_s);
}
} // for
- fl_print_format(" }%r %[%r%] {%r", main->output.to, f_string_eol_s, main->context.set.important, controller_want_s, main->context.set.important, f_string_eol_s);
+ fl_print_format(" }%r %[%r%] {%r", main->program.output.to, f_string_eol_s, main->program.context.set.important, controller_want_s, main->program.context.set.important, f_string_eol_s);
for (j = 0; j < rule.ons.array[i].want.used; ++j) {
if (rule.ons.array[i].want.array[j].used) {
- fl_print_format(" %Q%r", main->output.to, rule.ons.array[i].want.array[j], f_string_eol_s);
+ fl_print_format(" %Q%r", main->program.output.to, rule.ons.array[i].want.array[j], f_string_eol_s);
}
} // for
- fl_print_format(" }%r %[%r%] {%r", main->output.to, f_string_eol_s, main->context.set.important, controller_wish_s, main->context.set.important, f_string_eol_s);
+ fl_print_format(" }%r %[%r%] {%r", main->program.output.to, f_string_eol_s, main->program.context.set.important, controller_wish_s, main->program.context.set.important, f_string_eol_s);
for (j = 0; j < rule.ons.array[i].wish.used; ++j) {
if (rule.ons.array[i].wish.array[j].used) {
- fl_print_format(" %Q%r", main->output.to, rule.ons.array[i].wish.array[j], f_string_eol_s);
+ fl_print_format(" %Q%r", main->program.output.to, rule.ons.array[i].wish.array[j], f_string_eol_s);
}
} // for
- fl_print_format(" }%r }%r", main->output.to, f_string_eol_s, f_string_eol_s);
+ fl_print_format(" }%r }%r", main->program.output.to, f_string_eol_s, f_string_eol_s);
} // for
- fl_print_format(" }%r", main->output.to, f_string_eol_s);
+ fl_print_format(" }%r", main->program.output.to, f_string_eol_s);
// Items.
if (rule.items.used) {
item = &rule.items.array[i];
- fl_print_format(" %[%r%] {%r", main->output.to, main->context.set.important, controller_item_s, main->context.set.important, f_string_eol_s);
+ fl_print_format(" %[%r%] {%r", main->program.output.to, main->program.context.set.important, controller_item_s, main->program.context.set.important, f_string_eol_s);
// Type.
- fl_print_format(" %[%r%] %Q%r", main->output.to, main->context.set.important, controller_type_s, main->context.set.important, controller_rule_item_type_name(item->type), f_string_eol_s);
+ fl_print_format(" %[%r%] %Q%r", main->program.output.to, main->program.context.set.important, controller_type_s, main->program.context.set.important, controller_rule_item_type_name(item->type), f_string_eol_s);
// Pid file.
- fl_print_format(" %[%r%]", main->output.to, main->context.set.important, controller_pid_file_s, main->context.set.important);
+ fl_print_format(" %[%r%]", main->program.output.to, main->program.context.set.important, controller_pid_file_s, main->program.context.set.important);
if (item->pid_file.used) {
- fl_print_format(" %Q", main->output.to, item->pid_file);
+ fl_print_format(" %Q", main->program.output.to, item->pid_file);
}
- f_print_dynamic_raw(f_string_eol_s, main->output.to);
+ f_print_dynamic_raw(f_string_eol_s, main->program.output.to);
// With.
- fl_print_format(" %[%r%]", main->output.to, main->context.set.important, controller_with_s, main->context.set.important);
+ fl_print_format(" %[%r%]", main->program.output.to, main->program.context.set.important, controller_with_s, main->program.context.set.important);
if (item->with & controller_with_full_path_d) {
- fl_print_format(" %r", main->output.to, controller_full_path_s);
+ fl_print_format(" %r", main->program.output.to, controller_full_path_s);
}
if (item->with & controller_with_session_new_d) {
- fl_print_format(" %r", main->output.to, controller_session_new_s);
+ fl_print_format(" %r", main->program.output.to, controller_session_new_s);
}
if (item->with & controller_with_session_same_d) {
- fl_print_format(" %r", main->output.to, controller_session_same_s);
+ fl_print_format(" %r", main->program.output.to, controller_session_same_s);
}
- f_print_dynamic_raw(f_string_eol_s, main->output.to);
+ f_print_dynamic_raw(f_string_eol_s, main->program.output.to);
// Actions.
for (j = 0; j < item->actions.used; ++j) {
action = &item->actions.array[j];
- fl_print_format(" %[%r%] {%r", main->output.to, main->context.set.important, controller_action_s, main->context.set.important, f_string_eol_s);
- fl_print_format(" %[%r%] %r%r", main->output.to, main->context.set.important, controller_type_s, main->context.set.important, controller_rule_action_type_name(action->type), f_string_eol_s);
+ fl_print_format(" %[%r%] {%r", main->program.output.to, main->program.context.set.important, controller_action_s, main->program.context.set.important, f_string_eol_s);
+ fl_print_format(" %[%r%] %r%r", main->program.output.to, main->program.context.set.important, controller_type_s, main->program.context.set.important, controller_rule_action_type_name(action->type), f_string_eol_s);
if (item->type == controller_rule_item_type_script_e || item->type == controller_rule_item_type_utility_e) {
- fl_print_format(" %[%r%] {%r", main->output.to, main->context.set.important, controller_parameter_s, main->context.set.important, f_string_eol_s);
+ fl_print_format(" %[%r%] {%r", main->program.output.to, main->program.context.set.important, controller_parameter_s, main->program.context.set.important, f_string_eol_s);
if (action->parameters.used) {
if (action->parameters.array[0].used) {
- f_print_terminated(" ", main->output.to);
+ f_print_terminated(" ", main->program.output.to);
for (k = 0; k < action->parameters.array[0].used; ++k) {
if (action->parameters.array[0].string[k] == f_fss_eol_s.string[0]) {
if (k + 1 < action->parameters.array[0].used) {
- fl_print_format("%r ", main->output.to, f_string_eol_s);
+ fl_print_format("%r ", main->program.output.to, f_string_eol_s);
}
}
else {
- f_print_character_safely(action->parameters.array[0].string[k], main->output.to);
+ f_print_character_safely(action->parameters.array[0].string[k], main->program.output.to);
}
} // for
}
- f_print_dynamic_raw(f_string_eol_s, main->output.to);
+ f_print_dynamic_raw(f_string_eol_s, main->program.output.to);
}
- fl_print_format(" }%r", main->output.to, f_string_eol_s);
+ fl_print_format(" }%r", main->program.output.to, f_string_eol_s);
}
else {
for (k = 0; k < action->parameters.used; ++k) {
- fl_print_format(" %[%r%] %Q%r", main->output.to, main->context.set.important, controller_parameter_s, main->context.set.important, action->parameters.array[k], f_string_eol_s);
+ fl_print_format(" %[%r%] %Q%r", main->program.output.to, main->program.context.set.important, controller_parameter_s, main->program.context.set.important, action->parameters.array[k], f_string_eol_s);
} // for
}
if (action->ikis.used) {
- fl_print_format(" %[%r%] {%r", main->output.to, main->context.set.important, controller_iki_s, main->context.set.important, f_string_eol_s);
+ fl_print_format(" %[%r%] {%r", main->program.output.to, main->program.context.set.important, controller_iki_s, main->program.context.set.important, f_string_eol_s);
for (k = 0; k < action->ikis.used; ++k) {
for (l = 0; l < action->ikis.array[j].vocabulary.used; ++l) {
- fl_print_format(" %[[%]%ul%[]%]", main->output.to, main->context.set.important, main->context.set.important, k, main->context.set.important, main->context.set.important);
- fl_print_format(" %/Q %[:%] %/Q%r", main->output.to, action->parameters.array[k], action->ikis.array[k].vocabulary.array[l], main->context.set.important, main->context.set.important, action->parameters.array[k], action->ikis.array[k].content.array[l], f_string_eol_s);
+ fl_print_format(" %[[%]%ul%[]%]", main->program.output.to, main->program.context.set.important, main->program.context.set.important, k, main->program.context.set.important, main->program.context.set.important);
+ fl_print_format(" %/Q %[:%] %/Q%r", main->program.output.to, action->parameters.array[k], action->ikis.array[k].vocabulary.array[l], main->program.context.set.important, main->program.context.set.important, action->parameters.array[k], action->ikis.array[k].content.array[l], f_string_eol_s);
} // for
} // for
- fl_print_format(" }%r", main->output.to, f_string_eol_s);
+ fl_print_format(" }%r", main->program.output.to, f_string_eol_s);
}
- fl_print_format(" }%r", main->output.to, f_string_eol_s);
+ fl_print_format(" }%r", main->program.output.to, f_string_eol_s);
} // for
// Rerun.
- fl_print_format(" %[%r%] {%r", main->output.to, main->context.set.important, controller_rerun_s, main->context.set.important, f_string_eol_s);
+ fl_print_format(" %[%r%] {%r", main->program.output.to, main->program.context.set.important, controller_rerun_s, main->program.context.set.important, f_string_eol_s);
for (j = 0; j < controller_rule_action_execute_type__enum_size_e; ++j) {
for (k = 0; k < 2; ++k) {
continue;
}
- fl_print_format(" %[", main->output.to, main->context.set.important);
+ fl_print_format(" %[", main->program.output.to, main->program.context.set.important);
switch (j) {
case controller_rule_action_execute_type_freeze_e:
- f_print_dynamic_raw(controller_freeze_s, main->output.to);
+ f_print_dynamic_raw(controller_freeze_s, main->program.output.to);
break;
case controller_rule_action_execute_type_kill_e:
- f_print_dynamic_raw(controller_kill_s, main->output.to);
+ f_print_dynamic_raw(controller_kill_s, main->program.output.to);
break;
case controller_rule_action_execute_type_pause_e:
- f_print_dynamic_raw(controller_pause_s, main->output.to);
+ f_print_dynamic_raw(controller_pause_s, main->program.output.to);
break;
case controller_rule_action_execute_type_reload_e:
- f_print_dynamic_raw(controller_reload_s, main->output.to);
+ f_print_dynamic_raw(controller_reload_s, main->program.output.to);
break;
case controller_rule_action_execute_type_restart_e:
- f_print_dynamic_raw(controller_restart_s, main->output.to);
+ f_print_dynamic_raw(controller_restart_s, main->program.output.to);
break;
case controller_rule_action_execute_type_resume_e:
- f_print_dynamic_raw(controller_resume_s, main->output.to);
+ f_print_dynamic_raw(controller_resume_s, main->program.output.to);
break;
case controller_rule_action_execute_type_start_e:
- f_print_dynamic_raw(controller_start_s, main->output.to);
+ f_print_dynamic_raw(controller_start_s, main->program.output.to);
break;
case controller_rule_action_execute_type_stop_e:
- f_print_dynamic_raw(controller_stop_s, main->output.to);
+ f_print_dynamic_raw(controller_stop_s, main->program.output.to);
break;
case controller_rule_action_execute_type_thaw_e:
- f_print_dynamic_raw(controller_thaw_s, main->output.to);
+ f_print_dynamic_raw(controller_thaw_s, main->program.output.to);
break;
default:
break;
}
- fl_print_format("%] %r", main->output.to, main->context.set.important, k ? controller_success_s : controller_failure_s);
- fl_print_format(" %r %ul %r %ul", main->output.to, controller_delay_s, rerun_item->delay, controller_max_s, rerun_item->max);
+ fl_print_format("%] %r", main->program.output.to, main->program.context.set.important, k ? controller_success_s : controller_failure_s);
+ fl_print_format(" %r %ul %r %ul", main->program.output.to, controller_delay_s, rerun_item->delay, controller_max_s, rerun_item->max);
if (!k && (item->reruns[j].is & controller_rule_rerun_is_failure_reset_d) || k && (item->reruns[j].is & controller_rule_rerun_is_success_reset_d)) {
- fl_print_format(" %r", main->output.to, controller_reset_s);
+ fl_print_format(" %r", main->program.output.to, controller_reset_s);
}
- f_print_dynamic_raw(f_string_eol_s, main->output.to);
+ f_print_dynamic_raw(f_string_eol_s, main->program.output.to);
} // for
} // for
- fl_print_format(" }%r", main->output.to, f_string_eol_s);
+ fl_print_format(" }%r", main->program.output.to, f_string_eol_s);
- fl_print_format(" }%r", main->output.to, f_string_eol_s);
+ fl_print_format(" }%r", main->program.output.to, f_string_eol_s);
} // for
}
- fl_print_format("}%r", main->output.to, f_string_eol_s);
+ fl_print_format("}%r", main->program.output.to, f_string_eol_s);
- controller_unlock_print_flush(main->output.to, global.thread);
+ controller_unlock_print_flush(main->program.output.to, global.thread);
}
#endif // _di_controller_rule_validate_
f_status_t status_lock = controller_lock_read(is_normal, global.thread, &global.thread->lock.process);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(global.main->error, F_status_set_fine(status_lock), F_true, global.thread);
+ controller_lock_print_error_critical(global.main->program.error, F_status_set_fine(status_lock), F_true, global.thread);
return status_lock;
}
status_lock = controller_lock_write(is_normal, global.thread, &process_list[i]->lock);
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(global.main->error, F_status_set_fine(status_lock), F_false, global.thread);
+ controller_lock_print_error_critical(global.main->program.error, F_status_set_fine(status_lock), F_false, global.thread);
f_thread_unlock(&process_list[i]->active);
} // for
if (F_status_is_error(status_lock)) {
- controller_lock_print_error_critical(global.main->error, F_status_set_fine(status_lock), F_true, global.thread);
+ controller_lock_print_error_critical(global.main->program.error, F_status_set_fine(status_lock), F_true, global.thread);
return status_lock;
}
// fll_error_print() automatically locks, so manually handle only the mutex locking and flushing rather than calling controller_lock_print().
f_thread_mutex_lock(&thread->lock.print);
- fll_error_print(print, status, function, fallback);
+ fll_error_print(&print, status, function, fallback); // @fixme the print is a const and it is being passed as a pointer; the function needs to change.
f_file_stream_lock(print.to);
#ifndef _di_controller_rule_item_print_error_execute_
void controller_rule_item_print_error_execute(const bool script_is, const f_string_static_t name, const f_status_t status, controller_data_t * const process) {
- if (((controller_main_t *) process->main_data)->error.verbosity != f_console_verbosity_quiet_e) {
- fl_print_t * const print = &((controller_main_t *) process->main_data)->error;
+ if (((controller_main_t *) process->main_data)->program.error.verbosity != f_console_verbosity_quiet_e) {
+ fl_print_t * const print = &((controller_main_t *) process->main_data)->program.error;
controller_lock_print(print->to, (controller_thread_t *) process->main_thread);
#ifndef _di_controller_rule_setting_read_print_error_
void controller_rule_setting_read_print_error(const fl_print_t print, const f_string_t message, const f_number_unsigned_t index, const f_number_unsigned_t line_item, controller_thread_t * const thread, controller_cache_t * const cache) {
+ if (!print.custom) return;
if (print.verbosity == f_console_verbosity_quiet_e) return;
+ controller_main_t * const main = (controller_main_t *) print.custom;
+
f_state_t state = f_state_t_initialize;
// 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[index].start, &cache->action.line_item, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[index].start, &cache->action.line_item, &main->setting.state);
cache->action.line_action = ++cache->action.line_item;
#ifndef _di_controller_rule_setting_read_print_error_with_range_
void controller_rule_setting_read_print_error_with_range(const fl_print_t print, const f_string_t before, const f_range_t range, const f_string_t after, const f_number_unsigned_t index, const f_number_unsigned_t line_item, controller_thread_t * const thread, controller_cache_t * const cache) {
+ if (!print.custom) return;
if (print.verbosity == f_console_verbosity_quiet_e) return;
+ controller_main_t * const main = (controller_main_t *) print.custom;
+
f_state_t state = f_state_t_initialize;
// 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[index].start, &cache->action.line_item, &setting->state);
+ f_fss_count_lines(cache->buffer_item, cache->object_actions.array[index].start, &cache->action.line_item, &main->setting.state);
cache->action.line_action = ++cache->action.line_item;
#ifndef _di_controller_rule_setting_read_print_mapping_
void controller_rule_setting_read_print_mapping(const controller_global_t global, const f_string_static_t name, const f_string_map_t map) {
- if (global.main->error.verbosity != f_console_verbosity_debug_e) {
- if (!(global.main->error.verbosity == f_console_verbosity_verbose_e && (global.main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e))) {
+ if (global.main->program.error.verbosity != f_console_verbosity_debug_e) {
+ if (!(global.main->program.error.verbosity == f_console_verbosity_verbose_e && (global.main->program.parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e))) {
return;
}
}
- controller_lock_print(global.main->output.to, global.thread);
+ controller_lock_print(global.main->program.output.to, global.thread);
- fl_print_format("%rProcessing rule item action '%[%Q%]'", global.main->output.to, f_string_eol_s, global.main->context.set.title, name, global.main->context.set.title);
- fl_print_format(" mapping '%[%Q%]'", global.main->output.to, global.main->context.set.important, map.name, global.main->context.set.important);
- fl_print_format(" to value '%[%Q%]'.%r", global.main->output.to, global.main->context.set.important, map.value, global.main->context.set.important, f_string_eol_s);
+ fl_print_format("%rProcessing rule item action '%[%Q%]'", global.main->program.output.to, f_string_eol_s, global.main->program.context.set.title, name, global.main->program.context.set.title);
+ fl_print_format(" mapping '%[%Q%]'", global.main->program.output.to, global.main->program.context.set.important, map.name, global.main->program.context.set.important);
+ fl_print_format(" to value '%[%Q%]'.%r", global.main->program.output.to, global.main->program.context.set.important, map.value, global.main->program.context.set.important, f_string_eol_s);
- controller_unlock_print_flush(global.main->output.to, global.thread);
+ controller_unlock_print_flush(global.main->program.output.to, global.thread);
}
#endif // _di_controller_rule_setting_read_print_mapping_
#ifndef _di_controller_rule_setting_read_print_value_
void controller_rule_setting_read_print_value(const controller_global_t global, const f_string_static_t name, const f_string_static_t name_sub, const f_string_static_t value, const f_string_t suffix) {
- if (global.main->error.verbosity != f_console_verbosity_debug_e) {
- if (!(global.main->error.verbosity == f_console_verbosity_verbose_e && (global.main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e))) {
+ if (global.main->program.error.verbosity != f_console_verbosity_debug_e) {
+ if (!(global.main->program.error.verbosity == f_console_verbosity_verbose_e && (global.main->program.parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e))) {
return;
}
}
- controller_lock_print(global.main->output.to, global.thread);
+ controller_lock_print(global.main->program.output.to, global.thread);
- fl_print_format("%rProcessing rule item action '%[%Q%]' setting ", global.main->output.to, f_string_eol_s, global.main->context.set.title, name, global.main->context.set.title);
+ fl_print_format("%rProcessing rule item action '%[%Q%]' setting ", global.main->program.output.to, f_string_eol_s, global.main->program.context.set.title, name, global.main->program.context.set.title);
if (name_sub.used) {
- fl_print_format("'%[%Q%]'", global.main->output.to, global.main->context.set.notable, name_sub, global.main->context.set.notable);
+ fl_print_format("'%[%Q%]'", global.main->program.output.to, global.main->program.context.set.notable, name_sub, global.main->program.context.set.notable);
}
else {
- f_print_terminated("value", global.main->output.to);
+ f_print_terminated("value", global.main->program.output.to);
}
- fl_print_format(" to '%[%Q%]'", global.main->output.to, global.main->context.set.important, value, global.main->context.set.important);
- fl_print_format("%S.%r", global.main->output.to, suffix, f_string_eol_s);
+ fl_print_format(" to '%[%Q%]'", global.main->program.output.to, global.main->program.context.set.important, value, global.main->program.context.set.important);
+ fl_print_format("%S.%r", global.main->program.output.to, suffix, f_string_eol_s);
- controller_unlock_print_flush(global.main->output.to, global.thread);
+ controller_unlock_print_flush(global.main->program.output.to, global.thread);
}
#endif // _di_controller_rule_setting_read_print_value_
#ifndef _di_controller_rule_setting_read_print_values_
void controller_rule_setting_read_print_values(const controller_global_t global, const f_string_static_t name, const f_number_unsigned_t index, controller_cache_t * const cache) {
- if (global.main->error.verbosity != f_console_verbosity_debug_e) {
- if (!(global.main->error.verbosity == f_console_verbosity_verbose_e && (global.main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e))) {
+ if (global.main->program.error.verbosity != f_console_verbosity_debug_e) {
+ if (!(global.main->program.error.verbosity == f_console_verbosity_verbose_e && (global.main->program.parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e))) {
return;
}
}
- controller_lock_print(global.main->output.to, global.thread);
+ controller_lock_print(global.main->program.output.to, global.thread);
- fl_print_format("%rProcessing rule item action '%[%Q%]' setting value to", global.main->output.to, f_string_eol_s, global.main->context.set.title, name, global.main->context.set.title);
+ fl_print_format("%rProcessing rule item action '%[%Q%]' setting value to", global.main->program.output.to, f_string_eol_s, global.main->program.context.set.title, name, global.main->program.context.set.title);
for (f_number_unsigned_t j = 0; j < cache->content_actions.array[index].used; ++j) {
- fl_print_format(" '%[%/Q%]'", global.main->output.to, global.main->context.set.important, cache->buffer_item, cache->content_actions.array[index].array[j], global.main->context.set.important);
+ fl_print_format(" '%[%/Q%]'", global.main->program.output.to, global.main->program.context.set.important, cache->buffer_item, cache->content_actions.array[index].array[j], global.main->program.context.set.important);
if (j + 2 == cache->content_actions.array[index].used) {
if (cache->content_actions.array[index].used > 2) {
- f_print_terminated(",", global.main->output.to);
+ f_print_terminated(",", global.main->program.output.to);
}
- f_print_terminated(" and", global.main->output.to);
+ f_print_terminated(" and", global.main->program.output.to);
}
else if (j + 1 < cache->content_actions.array[index].used) {
- f_print_terminated(",", global.main->output.to);
+ f_print_terminated(",", global.main->program.output.to);
}
} // for
- fl_print_format(".%r", global.main->output.to, f_string_eol_s);
+ fl_print_format(".%r", global.main->program.output.to, f_string_eol_s);
- controller_unlock_print_flush(global.main->output.to, global.thread);
+ controller_unlock_print_flush(global.main->program.output.to, global.thread);
}
#endif // _di_controller_rule_setting_read_print_value_
if (global->thread->enabled != controller_thread_enabled_e) return 0;
- const struct timespec delay = controller_time_seconds((global->main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) ? controller_thread_cleanup_interval_short_d : controller_thread_cleanup_interval_long_d);
+ const struct timespec delay = controller_time_seconds((global->main->program.parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) ? controller_thread_cleanup_interval_short_d : controller_thread_cleanup_interval_long_d);
f_status_t status = F_okay;
status = f_thread_lock_write(&process->lock);
if (F_status_is_error(status)) {
- controller_lock_print_error_critical(global->main->error, F_status_set_fine(status), F_false, global->thread);
+ controller_lock_print_error_critical(global->main->program.error, F_status_set_fine(status), F_false, global->thread);
f_thread_unlock(&process->active);
continue;
// Deallocate any rules in the space that is declared to be unused.
if (i >= global->thread->processs.used) {
- controller_rule_delete_simple(&process->rule);
+ controller_rule_delete(&process->rule);
}
f_thread_unlock(&process->active);
status = controller_lock_create(&thread.lock);
if (F_status_is_error(status)) {
- if (main->error.verbosity > f_console_verbosity_quiet_e) {
- fll_error_print(main->error, status, "controller_lock_create", fll_error_file_flag_fallback_e);
+ if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ fll_error_print(&main->program.error, status, "controller_lock_create", fll_error_file_flag_fallback_e);
}
}
else {
status = controller_processs_increase(&thread.processs);
if (F_status_is_error(status)) {
- controller_print_error(&thread, main->error, F_status_set_fine(status), "controller_processs_increase", F_true);
+ controller_print_error(&thread, main->program.error, F_status_set_fine(status), "controller_processs_increase", F_true);
}
}
if (F_status_is_error(status)) {
thread.id_signal = 0;
- if (main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_print_error(&thread, main->error, F_status_set_fine(status), "f_thread_create", F_true);
+ if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_print_error(&thread, main->program.error, F_status_set_fine(status), "f_thread_create", F_true);
}
}
else {
- if (main->parameters.array[controller_parameter_daemon_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[controller_parameter_daemon_e].result & f_console_result_found_e) {
setting->ready = controller_setting_ready_done_e;
if (f_file_exists(setting->path_pid, F_true) == F_true) {
- if (main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(main->error.to, &thread);
+ if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(main->program.error.to, &thread);
- fl_print_format("%r%[%QThe pid file '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format(f_string_format_Q_single_s.string, main->error.to, main->error.notable, setting->path_pid, main->error.notable);
- fl_print_format("%[' must not already exist.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QThe pid file '%]", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, main->program.error.context);
+ fl_print_format(f_string_format_Q_single_s.string, main->program.error.to, main->program.error.notable, setting->path_pid, main->program.error.notable);
+ fl_print_format("%[' must not already exist.%]%r", main->program.error.to, main->program.error.context, main->program.error.context, f_string_eol_s);
- controller_unlock_print_flush(main->error.to, &thread);
+ controller_unlock_print_flush(main->program.error.to, &thread);
}
setting->ready = controller_setting_ready_abort_e;
status = f_thread_create(0, &thread.id_entry, &controller_thread_entry, (void *) &entry);
if (F_status_is_error(status)) {
- if (main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_print_error(&thread, main->error, F_status_set_fine(status), "f_thread_create", F_true);
+ if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_print_error(&thread, main->program.error, F_status_set_fine(status), "f_thread_create", F_true);
}
}
else {
// Only make the rule and control threads available once any/all pre-processing and are completed.
if (F_status_is_error_not(status) && status != F_failure && status != F_child && thread.enabled == controller_thread_enabled_e) {
- if (!(main->parameters.array[controller_parameter_validate_e].result & f_console_result_found_e)) {
+ if (!(main->program.parameters.array[controller_parameter_validate_e].result & f_console_result_found_e)) {
// Wait for the entry thread to complete before starting the rule thread.
controller_thread_join(&thread.id_rule);
if (F_status_is_error(status)) {
thread.id_cleanup = 0;
- if (main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_print_error(&thread, main->error, F_status_set_fine(status), "f_thread_create", F_true);
+ if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_print_error(&thread, main->program.error, F_status_set_fine(status), "f_thread_create", F_true);
}
}
}
return F_child;
}
- if (F_status_is_error_not(status) && status != F_failure && !(main->parameters.array[controller_parameter_validate_e].result & f_console_result_found_e) && controller_thread_is_enabled(F_true, &thread)) {
+ if (F_status_is_error_not(status) && status != F_failure && !(main->program.parameters.array[controller_parameter_validate_e].result & f_console_result_found_e) && controller_thread_is_enabled(F_true, &thread)) {
if (setting->mode == controller_setting_mode_service_e) {
controller_thread_join(&thread.id_signal);
}
else if (setting->mode == controller_setting_mode_helper_e) {
- status = controller_rule_wait_all(global, F_true, F_false, 0);
+ status = controller_rule_wait_all(global, F_true, F_false);
}
else if (setting->mode == controller_setting_mode_program_e) {
status = controller_rule_wait_all(global, F_true, F_false);
}
if (F_status_set_fine(status) == F_interrupt) {
- fll_program_print_signal_received(main->warning, thread.signal);
+ fll_program_print_signal_received(&main->program.warning, thread.signal);
- if (main->output.verbosity != f_console_verbosity_quiet_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->output.to);
+ if (main->program.output.verbosity != f_console_verbosity_quiet_e) {
+ fll_print_dynamic_raw(f_string_eol_s, main->program.output.to);
}
return F_status_set_error(F_interrupt);
else if (*status != F_child) {
*status = controller_entry_preprocess(*entry->global, F_true, cache);
- if ((entry->global->main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) && (entry->global->main->parameters.array[controller_parameter_validate_e].result & f_console_result_found_e)) {
+ if ((entry->global->main->program.parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) && (entry->global->main->program.parameters.array[controller_parameter_validate_e].result & f_console_result_found_e)) {
controller_entry_setting_validate(*entry->global, F_true, cache);
}
}
if (F_status_is_error_not(*status) && *status != F_child) {
- if (!(main->parameters.array[controller_parameter_validate_e].result & f_console_result_found_e) || (main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e)) {
+ if (!(main->program.parameters.array[controller_parameter_validate_e].result & f_console_result_found_e) || (main->program.parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e)) {
if (entry->setting->entry.pid == controller_entry_pid_require_e && f_file_exists(entry->setting->path_pid, F_true) == F_true) {
- if (main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(main->error.to, entry->global->thread);
+ if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(main->program.error.to, entry->global->thread);
- fl_print_format("%r%[%QThe pid file '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format(f_string_format_Q_single_s.string, main->error.to, main->error.notable, entry->setting->path_pid, main->error.notable);
- fl_print_format("%[' must not already exist.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QThe pid file '%]", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, main->program.error.context);
+ fl_print_format(f_string_format_Q_single_s.string, main->program.error.to, main->program.error.notable, entry->setting->path_pid, main->program.error.notable);
+ fl_print_format("%[' must not already exist.%]%r", main->program.error.to, main->program.error.context, main->program.error.context, f_string_eol_s);
- controller_unlock_print_flush(main->error.to, entry->global->thread);
+ controller_unlock_print_flush(main->program.error.to, entry->global->thread);
}
entry->setting->ready = controller_setting_ready_fail_e;
const f_status_t status_failsafe = controller_entry_process(entry->global, cache, F_true, F_true);
if (F_status_is_error(status_failsafe)) {
- if (main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(main->error.to, entry->global->thread);
+ if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(main->program.error.to, entry->global->thread);
- fl_print_format("%r%[%QFailed while processing requested failsafe item '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format(f_string_format_Q_single_s.string, main->error.to, main->error.notable, entry->global->setting->entry.items.array[entry->global->setting->failsafe_item_id].name, main->error.notable);
- fl_print_format(f_string_format_sentence_end_quote_s.string, main->error.to, main->error.context, main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QFailed while processing requested failsafe item '%]", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, main->program.error.context);
+ fl_print_format(f_string_format_Q_single_s.string, main->program.error.to, main->program.error.notable, entry->global->setting->entry.items.array[entry->global->setting->failsafe_item_id].name, main->program.error.notable);
+ fl_print_format(f_string_format_sentence_end_quote_s.string, main->program.error.to, main->program.error.context, main->program.error.context, f_string_eol_s);
- controller_unlock_print_flush(main->error.to, entry->global->thread);
+ controller_unlock_print_flush(main->program.error.to, entry->global->thread);
}
*status = F_status_set_error(F_failure);
}
}
- if (F_status_is_error_not(*status) && *status != F_child && entry->global->main->parameters.array[controller_parameter_validate_e].result == f_console_result_none_e && entry->global->setting->mode == controller_setting_mode_helper_e) {
+ if (F_status_is_error_not(*status) && *status != F_child && entry->global->main->program.parameters.array[controller_parameter_validate_e].result == f_console_result_none_e && entry->global->setting->mode == controller_setting_mode_helper_e) {
struct timespec time;
time.tv_sec = controller_thread_exit_helper_timeout_seconds_d;
time.tv_nsec = controller_thread_exit_helper_timeout_nanoseconds_d;
nanosleep(&time, 0);
- controller_thread_process_cancel(*(entry->global), F_true, controller_thread_cancel_exit_e, 0);
+ controller_thread_process_cancel(*(entry->global), F_true, controller_thread_cancel_exit_e);
}
}
}
controller_main_delete(entry->global->main);
// According to the manpages, pthread_exit() calls exit(0), which is not good because a non-zero exit code may be returned.
- if (main->child) exit(main->child);
+ if (main->program.child) exit(main->program.child);
return 0;
}
else if (*status != F_child) {
*status = controller_entry_preprocess(*entry->global, F_false, cache);
- if ((entry->global->main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) && (entry->global->main->parameters.array[controller_parameter_validate_e].result & f_console_result_found_e)) {
+ if ((entry->global->main->program.parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) && (entry->global->main->program.parameters.array[controller_parameter_validate_e].result & f_console_result_found_e)) {
controller_entry_setting_validate(*entry->global, F_false, cache);
}
}
if (F_status_is_error_not(*status) && *status != F_child && *status != F_file_found_not) {
- if (!(main->parameters.array[controller_parameter_validate_e].result & f_console_result_found_e) || (main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e)) {
+ if (!(main->program.parameters.array[controller_parameter_validate_e].result & f_console_result_found_e) || (main->program.parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e)) {
*status = controller_entry_process(entry->global, cache, F_false, F_false);
const f_status_t status_failsafe = controller_entry_process(entry->global, cache, F_true, F_false);
if (F_status_is_error(status_failsafe)) {
- if (main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_lock_print(main->error.to, entry->global->thread);
+ if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_lock_print(main->program.error.to, entry->global->thread);
- fl_print_format("%r%[%QFailed while processing requested failsafe item '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format(f_string_format_Q_single_s.string, main->error.to, main->error.notable, entry->global->setting->entry.items.array[entry->global->setting->failsafe_item_id].name, main->error.notable);
- fl_print_format(f_string_format_sentence_end_quote_s.string, main->error.to, main->error.context, main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QFailed while processing requested failsafe item '%]", main->program.error.to, f_string_eol_s, main->program.error.context, main->program.error.prefix, main->program.error.context);
+ fl_print_format(f_string_format_Q_single_s.string, main->program.error.to, main->program.error.notable, entry->global->setting->entry.items.array[entry->global->setting->failsafe_item_id].name, main->program.error.notable);
+ fl_print_format(f_string_format_sentence_end_quote_s.string, main->program.error.to, main->program.error.context, main->program.error.context, f_string_eol_s);
- controller_unlock_print_flush(main->error.to, entry->global->thread);
+ controller_unlock_print_flush(main->program.error.to, entry->global->thread);
}
*status = F_status_set_error(F_failure);
controller_main_delete(main);
// According to the manpages, pthread_exit() calls exit(0), which is not good because a non-zero exit code may be returned.
- if (main->child) exit(main->child);
+ if (main->program.child) exit(main->program.child);
}
}
#endif // _di_controller_thread_process_
time.tv_sec = 0;
time.tv_nsec = interval_nanoseconds;
- if (global.setting->mode == controller_setting_mode_helper_e && global.main->parameters.array[controller_parameter_validate_e].result == f_console_result_none_e) {
+ if (global.setting->mode == controller_setting_mode_helper_e && global.main->program.parameters.array[controller_parameter_validate_e].result == f_console_result_none_e) {
int value = 0;
f_number_unsigned_t lapsed = 0;
for (i = 0; i < global.thread->processs.used; ++i) {
if (!global.thread->processs.array[i]) continue;
- if (caller && i == caller->id) continue;
+ //if (caller && i == caller->id) continue; // @fixme "caller" disappeared at some point.
process = global.thread->processs.array[i];
global.thread->id_signal = 0;
}
- if (global.setting->mode == controller_setting_mode_helper_e && global.main->parameters.array[controller_parameter_validate_e].result == f_console_result_none_e) {
+ if (global.setting->mode == controller_setting_mode_helper_e && global.main->program.parameters.array[controller_parameter_validate_e].result == f_console_result_none_e) {
f_thread_mutex_unlock(&global.thread->lock.cancel);
return;
f_status_t status = f_thread_create(0, &global->thread->id_entry, &controller_thread_exit, (void *) &entry);
if (F_status_is_error(status)) {
- if (global->main->error.verbosity > f_console_verbosity_quiet_e) {
- controller_print_error(global->thread, global->main->error, F_status_set_fine(status), "f_thread_create", F_true);
+ if (global->main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ controller_print_error(global->thread, global->main->program.error, F_status_set_fine(status), "f_thread_create", F_true);
}
if (F_status_is_error_not(f_thread_mutex_lock(&global->thread->lock.alert))) {
controller_time(controller_thread_exit_ready_timeout_seconds_d, controller_thread_exit_ready_timeout_nanoseconds_d, &time);
- error = sigtimedwait(&global->main->signal.set, &information, &time);
+ error = sigtimedwait(&global->main->program.signal.set, &information, &time);
if (error == -1) {
if (errno == EAGAIN) continue;
#endif // _di_controller_thread_signal_state_fss_
#ifndef _di_controller_thread_signal_state_iki_
- f_status_t controller_thread_signal_state_iki(void * const state, void * const internal) {
+ f_status_t controller_thread_signal_state_iki(f_state_t * const state, void * const internal) {
if (!state || !state->custom) {
return F_interrupt_not;
* F_interrupt (with error bit) if interrupted.
*/
#ifndef _di_controller_thread_signal_state_fss_
- extern f_status_t controller_thread_signal_state_fss(void * const state, void * const internal) F_attribute_visibility_internal_d;
+ extern f_status_t controller_thread_signal_state_fss(f_state_t * const state, void * const internal) F_attribute_visibility_internal_d;
#endif // _di_controller_thread_signal_state_fss_
/**
* F_interrupt (with error bit) if interrupted.
*/
#ifndef _di_controller_thread_signal_state_iki_
- extern f_status_t controller_thread_signal_state_iki(void * const state, void * const internal) F_attribute_visibility_internal_d;
+ extern f_status_t controller_thread_signal_state_iki(f_state_t * const state, void * const internal) F_attribute_visibility_internal_d;
#endif // _di_controller_thread_signal_state_iki_
/**