I did some reviewing of how the enumerations used for flags are used.
These generally are not being used as a type.
An enumeration slightly increases the resulting binary size.
Enumeration values might be limited to just type of int.
This seems like an easy (small) optimization to just use defines rather than enumerations for flags and other bit-wise numbers.
data.program.pipe = fll_program_data_pipe_input_e;
}
- data.setting.flag |= controller_main_flag_interruptible_e;
+ data.setting.flag |= controller_main_flag_interruptible_d;
fll_program_standard_set_up(&data.program);
data.process.entry.pid = controller_entry_pid_disable_e;
data.process.entry.show = controller_entry_show_init_e;
data.process.mode = controller_process_mode_service_e;
- data.setting.flag &= ~controller_main_flag_interruptible_e;
+ data.setting.flag &= ~controller_main_flag_interruptible_d;
fll_program_standard_set_up(&data.program);
}
if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
- main->setting.flag |= controller_main_flag_help_e;
+ main->setting.flag |= controller_main_flag_help_d;
return;
}
if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
- main->setting.flag |= controller_main_flag_version_e;
+ main->setting.flag |= controller_main_flag_version_d;
return;
}
if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
- main->setting.flag |= controller_main_flag_copyright_e;
+ main->setting.flag |= controller_main_flag_copyright_d;
return;
}
if (main->program.pipe & fll_program_data_pipe_input_e) {
- main->setting.flag |= controller_main_flag_pipe_e;
+ main->setting.flag |= controller_main_flag_pipe_d;
}
else {
- main->setting.flag &= ~controller_main_flag_pipe_e;
+ main->setting.flag &= ~controller_main_flag_pipe_d;
}
f_string_static_t * const args = main->program.parameters.arguments.array;
const uint16_t flags[] = {
0,
- controller_main_flag_pid_e,
+ controller_main_flag_pid_d,
0,
0,
};
};
const uint16_t flags[] = {
- controller_main_flag_daemon_e,
- controller_main_flag_simulate_e,
- controller_main_flag_validate_e,
+ controller_main_flag_daemon_d,
+ controller_main_flag_simulate_d,
+ controller_main_flag_validate_d,
};
for (index = 0; index < 3; ++index) {
}
}
- if (!main->process.path_pid.used && !(main->setting.flag & controller_main_flag_pid_e)) {
+ if (!main->process.path_pid.used && !(main->setting.flag & controller_main_flag_pid_d)) {
main->setting.state.status = f_string_dynamic_append(controller_default_path_pid_s, &main->process.path_pid);
if (F_status_is_error_not(main->setting.state.status)) {
if (main->program.parameters.array[controller_parameter_interruptible_e].result & f_console_result_found_e) {
if (main->program.parameters.array[controller_parameter_uninterruptible_e].result & f_console_result_found_e) {
if (main->program.parameters.array[controller_parameter_interruptible_e].location < main->program.parameters.array[controller_parameter_uninterruptible_e].location) {
- main->setting.flag &= ~controller_main_flag_interruptible_e;
+ main->setting.flag &= ~controller_main_flag_interruptible_d;
}
else {
- main->setting.flag |= controller_main_flag_interruptible_e;
+ main->setting.flag |= controller_main_flag_interruptible_d;
}
}
else {
- main->setting.flag |= controller_main_flag_interruptible_e;
+ main->setting.flag |= controller_main_flag_interruptible_d;
}
}
else if (main->program.parameters.array[controller_parameter_uninterruptible_e].result & f_console_result_found_e) {
- main->setting.flag &= ~controller_main_flag_interruptible_e;
+ main->setting.flag &= ~controller_main_flag_interruptible_d;
}
}
#endif // _di_controller_setting_load_
#endif // _di_controller_allocation_d_
/**
+ * Controller lock defines.
+ *
+ * controller_lock_*_d:
+ * - mutex_max_retry: The maximum amount of times to retry the mutex lock before giving up.
+ */
+#ifndef _di_controller_lock_d_
+ #define controller_lock_mutex_max_retry_d 1000000
+#endif // _di_controller_lock_d_
+
+/**
+ * Flags associated with Controller locks.
+ *
+ * controller_lock_flag_*_d:
+ * - setup_not: No locks are initialized, so do not attempt to deallocate them.
+ */
+#ifndef _di_controller_lock_flag_d_
+ #define controller_lock_flag_setup_not_d 0x1
+#endif // _di_controller_lock_flag_d_
+
+/**
+ * Flags passed to the main function or program.
+ *
+ * When number mode is not specified, then mode is "string" mode (there is no flag for "string" mode).
+ *
+ * controller_main_flag_*_d:
+ * - none: No flags set.
+ * - copyright: Print copyright.
+ * - daemon: Run the process in the background and create a PID file.
+ * - error: Check if status is "error".
+ * - fine: Check if status is "fine".
+ * - help: Print help.
+ * - interruptible: The process is interruptible.
+ * - pid: Designate that a custom PID is specified.
+ * - pipe: Use the input pipe.
+ * - simulate: Perform simulation of rules rather than execution.
+ * - validate: Perform validation of rules rather than execution.
+ * - version: Print version.
+ * - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set.
+ */
+#ifndef _di_controller_main_flag_d_
+ #define controller_main_flag_none_d 0x0
+ #define controller_main_flag_copyright_d 0x1
+ #define controller_main_flag_daemon_d 0x2
+ #define controller_main_flag_error_d 0x4
+ #define controller_main_flag_fine_d 0x8
+ #define controller_main_flag_help_d 0x10
+ #define controller_main_flag_interruptible_d 0x20
+ #define controller_main_flag_pid_d 0x40
+ #define controller_main_flag_pipe_d 0x80
+ #define controller_main_flag_simulate_d 0x100
+ #define controller_main_flag_validate_d 0x200
+ #define controller_main_flag_version_d 0x400
+ #define controller_main_flag_version_copyright_help_d 0x411
+#endif // _di_controller_main_flag_d_
+
+/**
* The program signal defines.
*
* controller_signal_*_d:
#define controller_with_session_same_d 0x4
#endif // _di_controller_with_d_
-/**
- * Controller lock defines.
- *
- * controller_lock_*_d:
- * - mutex_max_retry: The maximum amount of times to retry the mutex lock before giving up.
- */
-#ifndef _di_controller_lock_d_
- #define controller_lock_mutex_max_retry_d 1000000
-#endif // _di_controller_lock_d_
-
-/**
- * Flags associated with Controller locks.
- *
- * controller_lock_flag_*_d:
- * - setup_not: No locks are initialized, so do not attempt to deallocate them.
- */
-#ifndef _di_controller_lock_flag_d_
- #define controller_lock_flag_setup_not_d 0x1
-#endif // _di_controller_lock_flag_d_
-
#ifdef __cplusplus
} // extern "C"
#endif
#endif
/**
- * Flags passed to the main function or program.
- *
- * When number mode is not specified, then mode is "string" mode (there is no flag for "string" mode).
- *
- * controller_main_flag_*_e:
- * - none: No flags set.
- * - copyright: Print copyright.
- * - daemon: Run the process in the background and create a PID file.
- * - error: Check if status is "error".
- * - fine: Check if status is "fine".
- * - help: Print help.
- * - interruptible: The process is interruptible.
- * - pid: Designate that a custom PID is specified.
- * - pipe: Use the input pipe.
- * - simulate: Perform simulation of rules rather than execution.
- * - validate: Perform validation of rules rather than execution.
- * - 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_daemon_e = 0x2,
- controller_main_flag_error_e = 0x4,
- controller_main_flag_fine_e = 0x8,
- controller_main_flag_help_e = 0x10,
- controller_main_flag_interruptible_e = 0x20,
- controller_main_flag_pid_e = 0x40,
- controller_main_flag_pipe_e = 0x80,
- controller_main_flag_simulate_e = 0x100,
- controller_main_flag_validate_e = 0x200,
- controller_main_flag_version_e = 0x400,
- controller_main_flag_version_copyright_help_e = 0x411,
- }; // enum
-#endif // _di_controller_main_flag_e_
-
-/**
* The main program parameters.
*/
#ifndef _di_controller_parameter_e_
#define controller_setting_t_initialize \
{ \
- controller_main_flag_none_e, \
+ controller_main_flag_none_d, \
F_okay, \
f_state_t_initialize, \
f_string_dynamic_t_initialize, \
return status;
}
- if ((main->setting.flag & controller_main_flag_simulate_e) || main->program.message.verbosity > f_console_verbosity_normal_e) {
+ if ((main->setting.flag & controller_main_flag_simulate_d) || main->program.message.verbosity > f_console_verbosity_normal_e) {
controller_print_message_entry_item_process(&main->program.message, is_entry, failsafe ? controller_failsafe_s : f_string_empty_s, cache->action.name_item);
}
}
if (F_status_is_error(entry_action->status)) {
- if (main->setting.flag & controller_main_flag_simulate_e) {
+ if (main->setting.flag & controller_main_flag_simulate_d) {
controller_print_message_entry_action_state_failed(&main->program.message, cache, entry_action, is_entry);
}
else {
if (entry_action->type == controller_entry_action_type_ready_e) {
if ((entry_action->code & controller_entry_rule_code_wait_d) || main->process.ready == controller_process_ready_wait_e) {
- if ((main->setting.flag & controller_main_flag_simulate_e) || main->program.error.verbosity == f_console_verbosity_verbose_e || main->program.error.verbosity == f_console_verbosity_debug_e || entry->show == controller_entry_show_init_e) {
+ if ((main->setting.flag & controller_main_flag_simulate_d) || main->program.error.verbosity == f_console_verbosity_verbose_e || main->program.error.verbosity == f_console_verbosity_debug_e || entry->show == controller_entry_show_init_e) {
controller_print_message_entry_action_wait(&main->program.message, is_entry, controller_ready_s);
}
- if (!(main->setting.flag & controller_main_flag_validate_e)) {
+ if (!(main->setting.flag & controller_main_flag_validate_d)) {
status = controller_rule_wait_all(main, is_entry, F_false);
if (F_status_is_error(status)) return status;
}
}
if (main->process.ready == controller_process_ready_yes_e) {
- if ((main->setting.flag & controller_main_flag_simulate_e) || main->program.error.verbosity == f_console_verbosity_verbose_e || main->program.error.verbosity == f_console_verbosity_debug_e) {
+ if ((main->setting.flag & controller_main_flag_simulate_d) || main->program.error.verbosity == f_console_verbosity_verbose_e || main->program.error.verbosity == f_console_verbosity_debug_e) {
controller_print_message_entry_action_ready(&main->program.message, is_entry, controller_ready_s);
}
}
else {
- if (!failsafe && (main->program.error.verbosity == f_console_verbosity_verbose_e || entry->show == controller_entry_show_init_e) && !(main->setting.flag & controller_main_flag_simulate_e)) {
+ if (!failsafe && (main->program.error.verbosity == f_console_verbosity_verbose_e || entry->show == controller_entry_show_init_e) && !(main->setting.flag & controller_main_flag_simulate_d)) {
controller_print_message_entry_state(&main->program.message, is_entry, controller_ready_s);
}
return status;
}
- if ((main->setting.flag & controller_main_flag_simulate_e) || main->program.message.verbosity > f_console_verbosity_normal_e) {
+ if ((main->setting.flag & controller_main_flag_simulate_d) || main->program.message.verbosity > f_console_verbosity_normal_e) {
controller_print_message_entry_item_process(&main->program.message, is_entry, f_string_empty_s, cache->action.name_item);
}
f_thread_unlock(&main->thread.lock.rule);
- if ((main->setting.flag & controller_main_flag_simulate_e) || main->program.error.verbosity == f_console_verbosity_verbose_e || 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 ((main->setting.flag & controller_main_flag_simulate_d) || main->program.error.verbosity == f_console_verbosity_verbose_e || 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)) {
controller_print_message_entry_item_rule(&main->program.message, entry, entry_action, is_entry, alias_rule);
}
// Designate the Action as failed.
entry_action->status = controller_status_simplify_error(F_failure);
- if (!(main->setting.flag & controller_main_flag_simulate_e)) {
+ if (!(main->setting.flag & controller_main_flag_simulate_d)) {
f_thread_unlock(&main->thread.lock.rule);
if (entry_action->code & controller_entry_rule_code_require_d) return F_status_set_error(F_require);
options_force = 0;
options_instance = 0;
- if (main->setting.flag & controller_main_flag_simulate_e) {
+ if (main->setting.flag & controller_main_flag_simulate_d) {
options_instance |= controller_instance_option_simulate_e;
}
options_instance |= controller_instance_option_wait_e;
}
- if (main->setting.flag & controller_main_flag_validate_e) {
+ if (main->setting.flag & controller_main_flag_validate_d) {
options_instance |= controller_instance_option_validate_e;
}
if (entry_action->code & controller_entry_rule_code_asynchronous_d) {
- if (!(main->setting.flag & controller_main_flag_validate_e)) {
+ if (!(main->setting.flag & controller_main_flag_validate_d)) {
options_force |= controller_instance_option_asynchronous_e;
}
status = controller_rule_instance_begin(main, cache, options_force, alias_rule, controller_entry_action_type_to_rule_action_type(entry_action->type), options_instance, is_entry ? controller_instance_type_entry_e : controller_instance_type_exit_e, stack);
if (F_status_set_fine(status) == F_memory_not || status == F_child || F_status_set_fine(status) == F_interrupt) break;
- if (F_status_is_error(status) && !(main->setting.flag & controller_main_flag_simulate_e) && (entry_action->code & controller_entry_rule_code_require_d)) {
+ if (F_status_is_error(status) && !(main->setting.flag & controller_main_flag_simulate_d) && (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 ((main->setting.flag & controller_main_flag_simulate_e) || main->program.message.verbosity > f_console_verbosity_normal_e || entry->show == controller_entry_show_init_e) {
+ if ((main->setting.flag & controller_main_flag_simulate_d) || main->program.message.verbosity > f_console_verbosity_normal_e || entry->show == controller_entry_show_init_e) {
controller_print_message_entry_item_executing(&main->program.message, is_entry, &entry_action->parameters);
}
- if (main->setting.flag & controller_main_flag_simulate_e) return F_execute;
+ if (main->setting.flag & controller_main_flag_simulate_d) return F_execute;
controller_thread_instance_cancel(main, is_entry, is_entry ? controller_thread_cancel_execute_e : controller_thread_cancel_exit_execute_e);
if (F_status_is_error(status_lock)) return status_lock;
// 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 && !(main->setting.flag & controller_main_flag_validate_e) && main->process.mode != controller_process_mode_helper_e) {
+ if (F_status_is_error_not(status) && !failsafe && !(main->setting.flag & controller_main_flag_validate_d) && main->process.mode != controller_process_mode_helper_e) {
const f_status_t status_wait = controller_rule_wait_all(main, 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 (((main->setting.flag & controller_main_flag_simulate_e) && main->program.error.verbosity > f_console_verbosity_error_e) || main->program.error.verbosity > f_console_verbosity_normal_e) {
+ if (((main->setting.flag & controller_main_flag_simulate_d) && main->program.error.verbosity > f_console_verbosity_error_e) || main->program.error.verbosity > f_console_verbosity_normal_e) {
controller_print_message_entry_item_done(&main->program.message, is_entry, failsafe, controller_main_s);
}
continue;
}
- if (main->setting.flag & controller_main_flag_pid_e) {
+ if (main->setting.flag & controller_main_flag_pid_d) {
controller_print_error_entry_setting_ignored(&main->program.error, cache, is_entry);
}
else {
if (!main) return F_status_set_error(F_parameter);
if (!is_entry) return F_okay;
- if (main->setting.flag & controller_main_flag_validate_e) {
- if ((main->setting.flag & controller_main_flag_simulate_e)) {
+ if (main->setting.flag & controller_main_flag_validate_d) {
+ if ((main->setting.flag & controller_main_flag_simulate_d)) {
controller_print_debug_perform_pid_file_control_socket(&main->program.debug);
}
controller_t * const main = (controller_t *) print->custom;
if (print->verbosity != f_console_verbosity_debug_e) {
- if (!(print->verbosity == f_console_verbosity_verbose_e && (main->setting.flag & controller_main_flag_simulate_e))) {
+ if (!(print->verbosity == f_console_verbosity_verbose_e && (main->setting.flag & controller_main_flag_simulate_d))) {
return F_output_not;
}
}
controller_t * const main = (controller_t *) print->custom;
if (print->verbosity != f_console_verbosity_debug_e) {
- if (!(print->verbosity == f_console_verbosity_verbose_e && (main->setting.flag & controller_main_flag_simulate_e))) {
+ if (!(print->verbosity == f_console_verbosity_verbose_e && (main->setting.flag & controller_main_flag_simulate_d))) {
return F_output_not;
}
}
controller_t * const main = (controller_t *) print->custom;
if (print->verbosity != f_console_verbosity_debug_e) {
- if (!(print->verbosity == f_console_verbosity_verbose_e && (main->setting.flag & controller_main_flag_simulate_e))) {
+ if (!(print->verbosity == f_console_verbosity_verbose_e && (main->setting.flag & controller_main_flag_simulate_d))) {
return F_output_not;
}
}
fl_print_format("%r%r %r Item Rule ", print->to, f_string_eol_s, action->type == controller_entry_action_type_consider_e ? controller_print_entry_considering_s : controller_print_entry_processing_s, is_entry ? controller_entry_s : controller_exit_s);
fl_print_format("'%[%Q%]'", print->to, print->set->title, alias_rule, print->set->title);
- if (entry->show == controller_entry_show_init_e && !(main->setting.flag & controller_main_flag_simulate_e)) {
+ if (entry->show == controller_entry_show_init_e && !(main->setting.flag & controller_main_flag_simulate_d)) {
fl_print_format(" [%[%r%]]", print->to, print->notable, action->code == controller_entry_rule_code_asynchronous_d ? controller_asynchronous_s : controller_synchronous_s, print->notable);
if (action->code == controller_entry_rule_code_wait_d) {
controller_t * const main = (controller_t *) print->custom;
- if (print->verbosity < f_console_verbosity_debug_e && !((main->setting.flag & controller_main_flag_simulate_e) && print->verbosity > f_console_verbosity_normal_e)) {
+ if (print->verbosity < f_console_verbosity_debug_e && !((main->setting.flag & controller_main_flag_simulate_d) && print->verbosity > f_console_verbosity_normal_e)) {
return F_output_not;
}
controller_t * const main = (controller_t *) print->custom;
- if (print->verbosity < f_console_verbosity_debug_e && !((main->setting.flag & controller_main_flag_simulate_e) && print->verbosity > f_console_verbosity_normal_e)) {
+ if (print->verbosity < f_console_verbosity_debug_e && !((main->setting.flag & controller_main_flag_simulate_d) && print->verbosity > f_console_verbosity_normal_e)) {
return F_output_not;
}
controller_t * const main = (controller_t *) print->custom;
- if (print->verbosity < f_console_verbosity_debug_e && !((main->setting.flag & controller_main_flag_simulate_e) && print->verbosity > f_console_verbosity_normal_e)) {
+ if (print->verbosity < f_console_verbosity_debug_e && !((main->setting.flag & controller_main_flag_simulate_d) && print->verbosity > f_console_verbosity_normal_e)) {
return F_output_not;
}
main->setting.state.status = F_okay;
- if (main->setting.flag & controller_main_flag_version_copyright_help_e) {
- if (main->setting.flag & controller_main_flag_help_e) {
+ if (main->setting.flag & controller_main_flag_version_copyright_help_d) {
+ if (main->setting.flag & controller_main_flag_help_d) {
controller_print_message_help(&main->program.message, F_false);
}
- else if (main->setting.flag & controller_main_flag_version_e) {
+ else if (main->setting.flag & controller_main_flag_version_d) {
fll_program_print_version(&main->program.message, controller_program_version_s);
}
- else if (main->setting.flag & controller_main_flag_copyright_e) {
+ else if (main->setting.flag & controller_main_flag_copyright_d) {
fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
controller_print_error_status(&main->program.error, macro_controller_f(f_thread_create), status);
}
else {
- if (main->setting.flag & controller_main_flag_daemon_e) {
+ if (main->setting.flag & controller_main_flag_daemon_d) {
main->process.ready = controller_process_ready_done_e;
if (f_file_exists(main->process.path_pid, F_true) == F_true) {
// Only make the Rule and control threads available once any/all pre-processing is complete.
if (F_status_is_error_not(status) && status != F_failure && status != F_child && main->thread.enabled == controller_thread_enabled_e) {
- if (!(main->setting.flag & controller_main_flag_validate_e)) {
+ if (!(main->setting.flag & controller_main_flag_validate_d)) {
// Wait for the Entry thread to complete before starting the Rule thread.
controller_thread_join(&main->thread.id_rule);
return;
}
- if (F_status_is_error_not(status) && status != F_failure && !(main->setting.flag & controller_main_flag_validate_e) && controller_thread_is_enabled(&main->thread, F_true)) {
+ if (F_status_is_error_not(status) && status != F_failure && !(main->setting.flag & controller_main_flag_validate_d) && controller_thread_is_enabled(&main->thread, F_true)) {
if (main->process.mode == controller_process_mode_service_e) {
controller_thread_join(&main->thread.id_signal);
}
options_instance = 0;
- if (main->setting.flag & controller_main_flag_simulate_e) {
+ if (main->setting.flag & controller_main_flag_simulate_d) {
options_instance |= controller_instance_option_simulate_e;
}
rule->timeout_stop = number;
}
- if (main->program.error.verbosity == f_console_verbosity_debug_e || (main->program.error.verbosity == f_console_verbosity_verbose_e && (main->setting.flag & controller_main_flag_simulate_e))) {
+ if (main->program.error.verbosity == f_console_verbosity_debug_e || (main->program.error.verbosity == f_console_verbosity_verbose_e && (main->setting.flag & controller_main_flag_simulate_d))) {
f_string_static_t name_sub = controller_stop_s;
if (timeout_code == controller_rule_timeout_code_kill_d) {
rule->nice = number;
rule->has |= controller_rule_has_nice_d;
- if ((main->setting.flag & controller_main_flag_simulate_e) || main->program.error.verbosity == f_console_verbosity_verbose_e) {
+ if ((main->setting.flag & controller_main_flag_simulate_d) || main->program.error.verbosity == f_console_verbosity_verbose_e) {
cache->action.generic.used = 0;
state.status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[0], &cache->action.generic);
rule->user = number;
rule->has |= controller_rule_has_user_d;
- if (main->program.error.verbosity == f_console_verbosity_debug_e || (main->program.error.verbosity == f_console_verbosity_verbose_e && (main->setting.flag & controller_main_flag_simulate_e))) {
+ if (main->program.error.verbosity == f_console_verbosity_debug_e || (main->program.error.verbosity == f_console_verbosity_verbose_e && (main->setting.flag & controller_main_flag_simulate_d))) {
cache->action.generic.used = 0;
state.status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[0], &cache->action.generic);
if (main->thread.enabled != controller_thread_enabled_e) return 0;
const f_time_spec_t delay = macro_f_time_spec_t_initialize_1(
- (main->setting.flag & controller_main_flag_simulate_e)
+ (main->setting.flag & controller_main_flag_simulate_d)
? controller_thread_cleanup_interval_short_d
: controller_thread_cleanup_interval_long_d,
0
else if (*status != F_child) {
*status = controller_entry_preprocess(main, F_true);
- if ((main->setting.flag & controller_main_flag_simulate_e) && (main->setting.flag & controller_main_flag_validate_e)) {
+ if ((main->setting.flag & controller_main_flag_simulate_d) && (main->setting.flag & controller_main_flag_validate_d)) {
controller_print_output_entry_setting_validate(&main->program.output, F_true);
}
}
if (F_status_is_error_not(*status) && *status != F_child) {
- if (!(main->setting.flag & controller_main_flag_validate_e) || (main->setting.flag & controller_main_flag_simulate_e)) {
+ if (!(main->setting.flag & controller_main_flag_validate_d) || (main->setting.flag & controller_main_flag_simulate_d)) {
if (main->process.entry.pid == controller_entry_pid_require_e && f_file_exists(main->process.path_pid, F_true) == F_true) {
*status = F_status_set_error(F_available_not);
main->process.ready = controller_process_ready_fail_e;
}
}
- if (F_status_is_error_not(*status) && *status != F_child && !(main->setting.flag & controller_main_flag_validate_e) && main->process.mode == controller_process_mode_helper_e) {
+ if (F_status_is_error_not(*status) && *status != F_child && !(main->setting.flag & controller_main_flag_validate_d) && main->process.mode == controller_process_mode_helper_e) {
const f_time_spec_t time = macro_f_time_spec_t_initialize_1(controller_thread_timeout_exit_helper_seconds_d, controller_thread_timeout_exit_helper_nanoseconds_d);
f_time_sleep_spec(time, 0);
else if (*status != F_child) {
*status = controller_entry_preprocess(main, F_false);
- if ((main->setting.flag & controller_main_flag_simulate_e) && (main->setting.flag & controller_main_flag_validate_e)) {
+ if ((main->setting.flag & controller_main_flag_simulate_d) && (main->setting.flag & controller_main_flag_validate_d)) {
controller_print_output_entry_setting_validate(&main->program.output, F_false);
}
}
if (F_status_is_error_not(*status) && *status != F_child && *status != F_file_found_not) {
- if (!(main->setting.flag & controller_main_flag_validate_e) || (main->setting.flag & controller_main_flag_simulate_e)) {
+ if (!(main->setting.flag & controller_main_flag_validate_d) || (main->setting.flag & controller_main_flag_simulate_d)) {
*status = controller_entry_process(main, F_false, F_false);
time.tv_sec = 0;
time.tv_nsec = interval_nanoseconds;
- if (main->process.mode == controller_process_mode_helper_e && !(main->setting.flag & controller_main_flag_validate_e)) {
+ if (main->process.mode == controller_process_mode_helper_e && !(main->setting.flag & controller_main_flag_validate_d)) {
for (i = 0; i < main->thread.instances.used; ++i) {
if (!main->thread.instances.array[i]) continue;
main->thread.id_signal = 0;
}
- if (main->process.mode == controller_process_mode_helper_e && !(main->setting.flag & controller_main_flag_validate_e)) {
+ if (main->process.mode == controller_process_mode_helper_e && !(main->setting.flag & controller_main_flag_validate_d)) {
f_thread_mutex_unlock(&main->thread.lock.cancel);
return;
if (!main) return;
if (!controller_thread_is_enabled(&main->thread, is_normal)) return;
- if (!(main->setting.flag & controller_main_flag_interruptible_e)) return;
+ if (!(main->setting.flag & controller_main_flag_interruptible_d)) return;
siginfo_t information;
f_time_spec_t time = f_time_spec_t_initialize;
if (!main) return F_status_set_error(F_parameter);
// When sleep is a second or more, instead wait for terminating signals if interruptible.
- if ((main->setting.flag & controller_main_flag_interruptible_e) && time.tv_sec) {
+ if ((main->setting.flag & controller_main_flag_interruptible_d) && time.tv_sec) {
siginfo_t information;
f_signal_t signal = f_signal_t_initialize;