This should make the commonly used code slightly easier to maintain.
The control project is omitted because I am in the process of migrating it.
The migrated version will contain the appropriate changes from this.
#endif // _di_f_console_parameters_t_
/**
+ * Provide enumerations for the console parameters.
+ *
+ * See the f_console_standard_*_s strings for details.
+ *
+ * The f_console_standard_parameter_last_e is not a parameter.
+ * f_console_standard_parameter_last_e represents the end of the enumeration.
+ * Use f_console_standard_parameter_last_e as the starting enum for any custom project.
+ */
+#ifndef _di_f_console_parameter_state_type_e_
+ enum {
+ f_console_standard_parameter_help_e = 0,
+ f_console_standard_parameter_copyright_e,
+ f_console_standard_parameter_light_e,
+ f_console_standard_parameter_dark_e,
+ f_console_standard_parameter_no_color_e,
+ f_console_standard_parameter_verbosity_quiet_e,
+ f_console_standard_parameter_verbosity_error_e,
+ f_console_standard_parameter_verbosity_normal_e,
+ f_console_standard_parameter_verbosity_verbose_e,
+ f_console_standard_parameter_verbosity_debug_e,
+ f_console_standard_parameter_version_e,
+ f_console_standard_parameter_line_first_no_e,
+ f_console_standard_parameter_line_last_no_e,
+ f_console_standard_parameter_last_e,
+ }; // enum
+#endif // _di_f_console_standard_parameter_e_
+
+/**
* Create some standard command line parameter options required/expected by the kevux/fss/fll specifications.
*
* It is expected that all of the "+" and "++" console options described below are reserved for these purposes.
extern "C" {
#endif
+#if !defined(_di_fll_program_parameter_process_context_) || !defined(_di_fll_program_parameter_process_context_standard_)
+ f_status_t private_fll_program_parameter_process_context(const f_uint16s_t choices, const uint8_t modes[], const bool right, fll_program_data_t * const main) {
+
+ {
+ if (choices.used) {
+ f_status_t status = F_none;
+ f_number_unsigned_t choice = 0;
+
+ if (right) {
+ status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
+ }
+ else {
+ status = f_console_parameter_prioritize_left(main->parameters, choices, &choice);
+ }
+
+ if (F_status_is_error(status)) return status;
+
+ if (status == F_data_not) {
+ main->context.mode = modes[choices.used - 1];
+ }
+ else {
+ main->context.mode = modes[choice];
+ }
+
+ if (main->context.mode == f_color_mode_dark_e || main->context.mode == f_color_mode_light_e) {
+ status = f_color_load_context(main->context.mode, &main->context);
+ if (F_status_is_error(status)) return status;
+ }
+ }
+ else {
+ main->context.mode = f_color_mode_not_e;
+ }
+ }
+
+ main->message.set =
+ main->output.set =
+ main->error.set =
+ main->warning.set = &main->context.set;
+
+ if (main->context.set.error.before) {
+ main->message.context = f_color_set_empty_s;
+ main->message.notable = main->context.set.notable;
+
+ main->output.context = f_color_set_empty_s;
+ main->output.notable = main->context.set.notable;
+
+ main->error.context = main->context.set.error;
+ main->error.notable = main->context.set.notable;
+
+ main->warning.context = main->context.set.warning;
+ main->warning.notable = main->context.set.notable;
+ }
+ else {
+ f_color_set_t * const sets[] = { &main->message.context, &main->message.notable, &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+
+ private_fll_program_parameter_process_empty(&main->context, sets);
+ }
+
+ return F_none;
+ }
+#endif // !defined(_di_fll_program_parameter_process_context_) || !defined(_di_fll_program_parameter_process_context_standard_)
+
#if !defined(_di_fll_program_print_help_option_) || !defined(_di_fll_program_print_help_option_standard_)
f_status_t private_fll_program_print_help_option(fl_print_t * const print, const f_string_static_t option_short, const f_string_static_t option_long, const f_string_static_t symbol_short, const f_string_static_t symbol_long, const char *description) {
}
#endif // !defined(_di_fll_program_standard_signal_received_) || !defined(_di_fll_program_standard_signal_handle_)
-#if !defined(_di_fll_program_parameter_process_context_) || !defined(_di_fll_program_parameter_process_empty_)
+#if !defined(_di_fll_program_parameter_process_context_) || !defined(_di_fll_program_parameter_process_context_standard_) || !defined(_di_fll_program_parameter_process_empty_)
void private_fll_program_parameter_process_empty(f_color_context_t * const context, f_color_set_t * const sets[]) {
- context->set.error = f_color_set_empty_s;
- context->set.important = f_color_set_empty_s;
- context->set.normal = f_color_set_empty_s;
- context->set.normal_reset = f_color_set_empty_s;
- context->set.notable = f_color_set_empty_s;
- context->set.reset = f_color_set_empty_s;
- context->set.standout = f_color_set_empty_s;
- context->set.success = f_color_set_empty_s;
- context->set.title = f_color_set_empty_s;
- context->set.warning = f_color_set_empty_s;
+ context->set.error =
+ context->set.important =
+ context->set.normal =
+ context->set.normal_reset =
+ context->set.notable =
+ context->set.reset =
+ context->set.standout =
+ context->set.success =
+ context->set.title =
+ context->set.warning = f_color_set_empty_s;
if (sets) {
for (f_number_unsigned_t i = 0; sets[i]; ++i) {
} // for
}
}
-#endif // !defined(_di_fll_program_parameter_process_context_) || !defined(_di_fll_program_parameter_process_empty_)
+#endif // !defined(_di_fll_program_parameter_process_context_) || !defined(_di_fll_program_parameter_process_context_standard_) || !defined(_di_fll_program_parameter_process_empty_)
#ifdef __cplusplus
} // extern "C"
#endif
/**
+ * Private implementation of fll_program_parameter_process_context().
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param choices
+ * An array of color modes.
+ * The default, if no mode is specified, will be the last value in the array.
+ * @param modes
+ * An array designating the context modes associated with each choice.
+ * This must exactly match the size of the choices array.
+ * No bounds checking is performed.
+ * @param right
+ * If TRUE, use the right-most parameter on conflict.
+ * If FALSE, use the left-most parameter on conflict.
+ * @param main
+ * The main program data.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not if "values" parameters were expected but not found.
+ *
+ * F_memory_not (with error bit) on out of memory.
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_console_parameter_prioritize_left().
+ * Errors (with error bit) from: f_console_parameter_prioritize_right().
+ * Errors (with error bit) from: f_color_load_context().
+ *
+ * @see f_console_parameter_prioritize_left()
+ * @see f_console_parameter_prioritize_right()
+ * @see f_color_load_context()
+ */
+#if !defined(_di_fll_program_parameter_process_context_) || !defined(_di_fll_program_parameter_process_context_standard_)
+ extern f_status_t private_fll_program_parameter_process_context(const f_uint16s_t choices, const uint8_t modes[], const bool right, fll_program_data_t * const main);
+#endif // !defined(_di_fll_program_parameter_process_context_) || !defined(_di_fll_program_parameter_process_context_standard_)
+
+/**
* Print standard help option.
*
* This print function does not use locking, be sure something like flockfile() and funlockfile() are appropriately called.
* Set to NULL to not use.
*
* @see fll_program_parameter_process_context()
+ * @see fll_program_parameter_process_context_standard()
* @see fll_program_parameter_process_empty()
*/
-#if !defined(_di_fll_program_parameter_process_context_) || !defined(_di_fll_program_parameter_process_empty_)
+#if !defined(_di_fll_program_parameter_process_context_) || !defined(_di_fll_program_parameter_process_context_standard_) || !defined(_di_fll_program_parameter_process_empty_)
extern void private_fll_program_parameter_process_empty(f_color_context_t * const context, f_color_set_t * const sets[]) F_attribute_visibility_internal_d;
-#endif // !defined(_di_fll_program_parameter_process_context_) || !defined(_di_fll_program_parameter_process_empty_)
+#endif // !defined(_di_fll_program_parameter_process_context_) || !defined(_di_fll_program_parameter_process_context_standard_) || !defined(_di_fll_program_parameter_process_empty_)
#ifdef __cplusplus
} // extern "C"
#ifndef _di_fll_program_parameter_process_context_
f_status_t fll_program_parameter_process_context(const f_uint16s_t choices, const uint8_t modes[], const bool right, fll_program_data_t * const main) {
+ #ifndef _di_level_2_parameter_checking_
+ if (!main) return F_status_set_error(F_parameter);
+ #endif // _di_level_2_parameter_checking_
- {
- if (choices.used) {
- f_status_t status = F_none;
- f_number_unsigned_t choice = 0;
-
- if (right) {
- status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
- }
- else {
- status = f_console_parameter_prioritize_left(main->parameters, choices, &choice);
- }
-
- if (F_status_is_error(status)) return status;
-
- if (status == F_data_not) {
- main->context.mode = modes[choices.used - 1];
- }
- else {
- main->context.mode = modes[choice];
- }
-
- if (main->context.mode == f_color_mode_dark_e || main->context.mode == f_color_mode_light_e) {
- status = f_color_load_context(main->context.mode, &main->context);
- if (F_status_is_error(status)) return status;
- }
- }
- else {
- main->context.mode = f_color_mode_not_e;
- }
- }
-
- main->message.set = &main->context.set;
- main->output.set = &main->context.set;
- main->error.set = &main->context.set;
- main->warning.set = &main->context.set;
-
- if (main->context.set.error.before) {
- main->message.context = f_color_set_empty_s;
- main->message.notable = main->context.set.notable;
-
- main->output.context = f_color_set_empty_s;
- main->output.notable = main->context.set.notable;
-
- main->error.context = main->context.set.error;
- main->error.notable = main->context.set.notable;
+ return private_fll_program_parameter_process_context(choices, modes, right, main);
+ }
+#endif // _di_fll_program_parameter_process_context_
- main->warning.context = main->context.set.warning;
- main->warning.notable = main->context.set.notable;
- }
- else {
- f_color_set_t *sets[] = { &main->message.context, &main->message.notable, &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+#ifndef _di_fll_program_parameter_process_context_standard_
+ f_status_t fll_program_parameter_process_context_standard(const bool right, fll_program_data_t * const main) {
+ #ifndef _di_level_2_parameter_checking_
+ if (!main) return F_status_set_error(F_parameter);
+ #endif // _di_level_2_parameter_checking_
- private_fll_program_parameter_process_empty(&main->context, sets);
- }
+ uint16_t array[3] = { f_console_standard_parameter_no_color_e, f_console_standard_parameter_light_e, f_console_standard_parameter_dark_e };
+ const f_uint16s_t choices = macro_f_uint16s_t_initialize_1(array, 0, 3);
+ const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
- return F_none;
+ return private_fll_program_parameter_process_context(choices, modes, right, main);
}
-#endif // _di_fll_program_parameter_process_context_
+#endif // _di_fll_program_parameter_process_context_standard_
#ifndef _di_fll_program_parameter_process_empty_
f_status_t fll_program_parameter_process_empty(f_color_context_t * const context, f_color_set_t * const sets[]) {
#ifndef _di_level_2_parameter_checking_
if (!context) return F_status_set_error(F_parameter);
- if (!sets) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
private_fll_program_parameter_process_empty(context, sets);
}
#endif // _di_fll_program_parameter_process_verbosity_
+#ifndef _di_fll_program_parameter_process_verbosity_standard_
+ f_status_t fll_program_parameter_process_verbosity_standard(const bool right, fll_program_data_t * const main) {
+ #ifndef _di_level_2_parameter_checking_
+ if (!main) return F_status_set_error(F_parameter);
+ #endif // _di_level_2_parameter_checking_
+
+ uint16_t array[5] = { f_console_standard_parameter_verbosity_quiet_e, f_console_standard_parameter_verbosity_error_e, f_console_standard_parameter_verbosity_verbose_e, f_console_standard_parameter_verbosity_debug_e, f_console_standard_parameter_verbosity_normal_e };
+ const f_uint16s_t choices = macro_f_uint16s_t_initialize_1(array, 0, 5);
+
+ const uint8_t verbosity[5] = { f_console_verbosity_quiet_e, f_console_verbosity_error_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, f_console_verbosity_normal_e };
+
+
+ f_number_unsigned_t choice = 0;
+
+ {
+ const f_status_t status = right ? f_console_parameter_prioritize_right(main->parameters, choices, &choice) : f_console_parameter_prioritize_left(main->parameters, choices, &choice);
+
+ if (F_status_is_error(status)) return status;
+
+ if (status == F_data_not) {
+ choice = choices.used - 1;
+ }
+ }
+
+ main->message.verbosity = verbosity[choice];
+ main->output.verbosity = main->message.verbosity;
+ main->error.verbosity = main->message.verbosity;
+ main->warning.verbosity = main->message.verbosity;
+
+ return F_none;
+ }
+#endif // _di_fll_program_parameter_process_verbosity_standard_
+
#ifndef _di_fll_program_parameter_additional_append_
f_status_t fll_program_parameter_additional_append(const f_string_static_t * const arguments, const f_number_unsigneds_t values, f_string_dynamics_t * const destination) {
#ifndef _di_level_2_parameter_checking_
- if (!arguments) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
+ if (!arguments || !destination) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
f_status_t status = F_none;
#ifndef _di_fll_program_parameter_additional_mash_
f_status_t fll_program_parameter_additional_mash(const f_string_static_t glue, const f_string_static_t * const arguments, const f_number_unsigneds_t values, f_string_dynamic_t * const destination) {
#ifndef _di_level_2_parameter_checking_
- if (!arguments) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
+ if (!arguments || !destination) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
f_status_t status = F_none;
#ifndef _di_fll_program_parameter_additional_rip_
f_status_t fll_program_parameter_additional_rip(const f_string_static_t * const arguments, const f_number_unsigneds_t values, f_string_dynamics_t * const destination) {
#ifndef _di_level_2_parameter_checking_
- if (!arguments) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
+ if (!arguments || !destination) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
f_status_t status = F_none;
#ifndef _di_fll_program_parameter_additional_rip_mash_
f_status_t fll_program_parameter_additional_rip_mash(const f_string_static_t glue, const f_string_static_t * const arguments, const f_number_unsigneds_t values, f_string_dynamic_t * const destination) {
#ifndef _di_level_2_parameter_checking_
- if (!arguments) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
+ if (!arguments || !destination) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
f_status_t status = F_none;
#endif // _di_fll_program_parameter_process_context_
/**
+ * Determine the color context from the parameters and then set the color context based on the choice.
+ *
+ * This will allow for the color context and the color sets to be safely used when colors are disabled.
+ *
+ * This is identical to fll_program_parameter_process_context() except it provides the standard choices and modes.
+ *
+ * @param right
+ * If TRUE, use the right-most parameter on conflict.
+ * If FALSE, use the left-most parameter on conflict.
+ * @param main
+ * The main program data.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not if "values" parameters were expected but not found.
+ *
+ * F_memory_not (with error bit) on out of memory.
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_console_parameter_prioritize_left().
+ * Errors (with error bit) from: f_console_parameter_prioritize_right().
+ * Errors (with error bit) from: f_color_load_context().
+ *
+ * @see f_console_parameter_prioritize_left()
+ * @see f_console_parameter_prioritize_right()
+ * @see f_color_load_context()
+ */
+#ifndef _di_fll_program_parameter_process_context_standard_
+ extern f_status_t fll_program_parameter_process_context_standard(const bool right, fll_program_data_t * const main);
+#endif // _di_fll_program_parameter_process_context_standard_
+
+/**
* Set the provided context to empty along with all additional color sets.
*
* This will allow for safe usage of the color context and color sets to be safely processed when colors are disabled.
#endif // _di_fll_program_parameter_process_verbosity_
/**
+ * Determine the verbosity from the parameters and then set the verbosity based on the choice.
+ *
+ * This is identical to fll_program_parameter_process_verbosity() except it provides the standard choices and modes.
+ *
+ * @param right
+ * If TRUE, use the right-most parameter on conflict.
+ * If FALSE, use the left-most parameter on conflict.
+ * @param main
+ * The main program data.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_console_parameter_prioritize_left().
+ * Errors (with error bit) from: f_console_parameter_prioritize_right().
+ *
+ * @see f_console_parameter_prioritize_left()
+ * @see f_console_parameter_prioritize_right()
+ */
+#ifndef _di_fll_program_parameter_process_verbosity_standard_
+ extern f_status_t fll_program_parameter_process_verbosity_standard(const bool right, fll_program_data_t * const main);
+#endif // _di_fll_program_parameter_process_verbosity_standard_
+
+/**
* Allocate new strings from all of the provided locations.
*
* These new strings are appended onto the destination.
main->setting.state.step_small = byte_dump_allocation_small_d;
// Identify and process first/last parameters.
- if (main->program.parameters.array[byte_dump_parameter_line_first_no_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
main->setting.flag -= main->setting.flag & byte_dump_main_flag_print_first_e;
}
else {
main->setting.flag |= byte_dump_main_flag_print_first_e;
}
- if (main->program.parameters.array[byte_dump_parameter_line_last_no_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
main->setting.flag -= main->setting.flag & byte_dump_main_flag_print_last_e;
}
else {
return;
}
- {
- f_number_unsigned_t choice = 0;
- f_uint16s_t choices = f_uint16s_t_initialize;
-
- // Identify and prioritize "color context" parameters.
- {
- uint16_t choices_array[3] = { byte_dump_parameter_no_color_e, byte_dump_parameter_light_e, byte_dump_parameter_dark_e };
- choices.array = choices_array;
- choices.used = 3;
+ main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
- static const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
+ if (F_status_is_error(main->setting.state.status)) {
+ if ((main->setting.flag & byte_dump_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);
+ }
- main->setting.state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
+ byte_dump_print_error(&main->program.error, macro_byte_dump_f(fll_program_parameter_process_context_standard));
- if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & byte_dump_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;
+ }
- byte_dump_print_error(&main->program.error, macro_byte_dump_f(fll_program_parameter_process_context));
+ main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
- return;
- }
+ if (F_status_is_error(main->setting.state.status)) {
+ if ((main->setting.flag & byte_dump_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);
}
- // Identify and prioritize "verbosity" parameters.
- {
- uint16_t choices_array[5] = { byte_dump_parameter_verbosity_quiet_e, byte_dump_parameter_verbosity_error_e, byte_dump_parameter_verbosity_verbose_e, byte_dump_parameter_verbosity_debug_e, byte_dump_parameter_verbosity_normal_e };
- choices.array = choices_array;
- choices.used = 5;
-
- static const uint8_t verbosity[5] = { f_console_verbosity_quiet_e, f_console_verbosity_error_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, f_console_verbosity_normal_e };
-
- main->setting.state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
-
- if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & byte_dump_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);
- }
+ byte_dump_print_error(&main->program.error, macro_byte_dump_f(fll_program_parameter_process_verbosity_standard));
- byte_dump_print_error(&main->program.error, macro_byte_dump_f(fll_program_parameter_process_verbosity));
+ return;
+ }
- return;
- }
- }
+ {
+ f_number_unsigned_t choice = 0;
+ f_uint16s_t choices = f_uint16s_t_initialize;
// Identify priority of mode parameters.
{
}
}
- if (main->program.parameters.array[byte_dump_parameter_help_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
main->setting.flag |= byte_dump_main_flag_help_e;
return;
}
- if (main->program.parameters.array[byte_dump_parameter_version_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
main->setting.flag |= byte_dump_main_flag_version_e;
return;
}
- if (main->program.parameters.array[byte_dump_parameter_copyright_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
main->setting.flag |= byte_dump_main_flag_copyright_e;
return;
* F_none on success.
*
* Errors (with error bit) from: f_console_parameter_process().
- * Errors (with error bit) from: fll_program_parameter_process_context().
+ * Errors (with error bit) from: fll_program_parameter_process_context_standard().
+ * Errors (with error bit) from: fll_program_parameter_process_verbosity_standard().
*
* @see f_console_parameter_process()
- * @see fll_program_parameter_process_context()
+ * @see fll_program_parameter_process_context_standard()
+ * @see fll_program_parameter_process_verbosity_standard()
*/
#ifndef _di_byte_dump_setting_load_
extern void byte_dump_setting_load(const f_console_arguments_t arguments, byte_dump_main_t * const main);
*/
#ifndef _di_byte_dump_parameter_e_
enum {
- byte_dump_parameter_help_e,
- byte_dump_parameter_copyright_e,
- byte_dump_parameter_light_e,
- byte_dump_parameter_dark_e,
- byte_dump_parameter_no_color_e,
- byte_dump_parameter_verbosity_quiet_e,
- byte_dump_parameter_verbosity_error_e,
- byte_dump_parameter_verbosity_normal_e,
- byte_dump_parameter_verbosity_verbose_e,
- byte_dump_parameter_verbosity_debug_e,
- byte_dump_parameter_version_e,
- byte_dump_parameter_line_first_no_e,
- byte_dump_parameter_line_last_no_e,
-
- byte_dump_parameter_binary_e,
+ byte_dump_parameter_binary_e = f_console_standard_parameter_last_e,
byte_dump_parameter_decimal_e,
byte_dump_parameter_duodecimal_e,
byte_dump_parameter_hexidecimal_e,
"f_string_dynamics_increase_by",
"f_thread_create",
"fl_conversion_dynamic_to_unsigned_detect",
- "fll_program_parameter_process_context",
- "fll_program_parameter_process_verbosity",
+ "fll_program_parameter_process_context_standard",
+ "fll_program_parameter_process_verbosity_standard",
};
#endif // _di_byte_dump_f_a_
byte_dump_f_f_string_dynamics_increase_by_e,
byte_dump_f_f_thread_create_e,
byte_dump_f_fl_conversion_dynamic_to_unsigned_detect_e,
- byte_dump_f_fll_program_parameter_process_context_e,
- byte_dump_f_fll_program_parameter_process_verbosity_e,
+ byte_dump_f_fll_program_parameter_process_context_standard_e,
+ byte_dump_f_fll_program_parameter_process_verbosity_standard_e,
}; // enum
#endif // _di_byte_dump_f_e_
main->setting.state.step_small = controller_allocation_small_d;
// Identify and process first/last parameters.
- if (main->program.parameters.array[controller_parameter_line_first_no_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
main->setting.flag -= main->setting.flag & controller_main_flag_print_first_e;
}
else {
main->setting.flag |= controller_main_flag_print_first_e;
}
- if (main->program.parameters.array[controller_parameter_line_last_no_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
main->setting.flag -= main->setting.flag & controller_main_flag_print_last_e;
}
else {
return;
}
- {
- f_number_unsigned_t choice = 0;
- f_uint16s_t choices = f_uint16s_t_initialize;
+ main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
- // Identify and prioritize "color context" parameters.
- {
- uint16_t choices_array[3] = { controller_parameter_no_color_e, controller_parameter_light_e, controller_parameter_dark_e };
- choices.array = choices_array;
- choices.used = 3;
-
- static const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
-
- main->setting.state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
-
- if (F_status_is_error(main->setting.state.status)) {
- fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), "fll_program_parameter_process_context", 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);
- }
+ if (F_status_is_error(main->setting.state.status)) {
+ 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);
- return;
- }
+ if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ fll_print_dynamic_raw(f_string_eol_s, main->program.error);
}
- // Identify and prioritize "verbosity" parameters.
- {
- uint16_t choices_array[5] = { controller_parameter_verbosity_quiet_e, controller_parameter_verbosity_error_e, controller_parameter_verbosity_verbose_e, controller_parameter_verbosity_debug_e, controller_parameter_verbosity_normal_e };
- choices.array = choices_array;
- choices.used = 5;
-
- static const uint8_t verbosity[5] = { f_console_verbosity_quiet_e, f_console_verbosity_error_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, f_console_verbosity_normal_e };
-
- main->setting.state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
+ return;
+ }
- if (F_status_is_error(main->setting.state.status)) {
- fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
+ main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
- if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.error);
- }
+ if (F_status_is_error(main->setting.state.status)) {
+ 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);
- return;
- }
+ if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ fll_print_dynamic_raw(f_string_eol_s, main->program.error);
}
+
+ return;
}
main->program.output.to.id = F_type_descriptor_output_d;
main->program.output.to.stream = F_type_output_d;
main->program.output.to.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d;
- if (main->program.parameters.array[controller_parameter_help_e].result & f_console_result_found_e) {
+ 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;
return;
}
- if (main->program.parameters.array[controller_parameter_version_e].result & f_console_result_found_e) {
+ 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;
return;
}
- if (main->program.parameters.array[controller_parameter_copyright_e].result & f_console_result_found_e) {
+ 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;
return;
extern const f_string_static_t controller_long_validate_s;
enum {
- controller_parameter_help_e,
- controller_parameter_copyright_e,
- controller_parameter_light_e,
- controller_parameter_dark_e,
- controller_parameter_no_color_e,
- controller_parameter_verbosity_quiet_e,
- controller_parameter_verbosity_error_e,
- controller_parameter_verbosity_normal_e,
- controller_parameter_verbosity_verbose_e,
- controller_parameter_verbosity_debug_e,
- controller_parameter_version_e,
- controller_parameter_line_first_no_e,
- controller_parameter_line_last_no_e,
-
- controller_parameter_cgroup_e,
+ controller_parameter_cgroup_e = f_console_standard_parameter_last_e,
controller_parameter_daemon_e,
controller_parameter_init_e,
controller_parameter_interruptible_e,
if (F_status_is_error(status)) return;
- {
- f_number_unsigned_t choice = 0;
- f_uint16s_t choices = f_uint16s_t_initialize;
+ status = fll_program_parameter_process_context_standard(F_true, &main->program);
- // Identify and prioritize "color context" parameters.
- {
- uint16_t choices_array[3] = { controller_parameter_no_color_e, controller_parameter_light_e, controller_parameter_dark_e };
- choices.array = choices_array;
- choices.used = 3;
-
- static const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
-
- status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
-
- if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e);
-
- if (main->error.verbosity > f_console_verbosity_quiet_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->error);
- }
+ if (F_status_is_error(status)) {
+ fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context_standard", fll_error_file_flag_fallback_e);
- return;
- }
+ if (main->error.verbosity > f_console_verbosity_quiet_e) {
+ fll_print_dynamic_raw(f_string_eol_s, main->error);
}
- // Identify and prioritize "verbosity" parameters.
- {
- uint16_t choices_array[5] = { controller_parameter_verbosity_quiet_e, controller_parameter_verbosity_error_e, controller_parameter_verbosity_verbose_e, controller_parameter_verbosity_debug_e, controller_parameter_verbosity_normal_e };
- choices.array = choices_array;
- choices.used = 5;
-
- const uint8_t verbosity[5] = { f_console_verbosity_quiet_e, f_console_verbosity_error_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, f_console_verbosity_normal_e };
-
- status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
+ return;
+ }
- if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
+ status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
- if (main->error.verbosity > f_console_verbosity_quiet_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->error);
- }
+ if (F_status_is_error(status)) {
+ fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity_standard", fll_error_file_flag_fallback_e);
- return;
- }
+ if (main->error.verbosity > f_console_verbosity_quiet_e) {
+ fll_print_dynamic_raw(f_string_eol_s, main->error);
}
+
+ return;
}
- if (main->parameters.array[controller_parameter_help_e].result & f_console_result_found_e) {
+ if (main->parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
controller_print_help(main);
return F_none;
}
- if (main->parameters.array[controller_parameter_version_e].result & f_console_result_found_e) {
+ if (main->parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
fll_program_print_version(main->message, controller_program_version_s);
return F_none;
}
- if (main->parameters.array[controller_parameter_copyright_e].result & f_console_result_found_e) {
+ if (main->parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
fll_program_print_copyright(main->message);
return F_none;
};
const uint8_t codes[] = {
- controller_parameter_help_e,
- controller_parameter_dark_e,
- controller_parameter_no_color_e,
- controller_parameter_verbosity_quiet_e,
- controller_parameter_verbosity_normal_e,
- controller_parameter_verbosity_verbose_e,
- controller_parameter_verbosity_debug_e,
+ f_console_standard_parameter_help_e,
+ f_console_standard_parameter_dark_e,
+ f_console_standard_parameter_no_color_e,
+ f_console_standard_parameter_verbosity_quiet_e,
+ f_console_standard_parameter_verbosity_normal_e,
+ f_console_standard_parameter_verbosity_verbose_e,
+ f_console_standard_parameter_verbosity_debug_e,
controller_parameter_init_e,
controller_parameter_interruptible_e,
controller_parameter_daemon_e,
}
// Identify and process first/last parameters.
- if (main->program.parameters.array[fake_parameter_line_first_no_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
main->setting.flag -= main->setting.flag & fake_main_flag_print_first_e;
}
else {
main->setting.flag |= fake_main_flag_print_first_e;
}
- if (main->program.parameters.array[fake_parameter_line_last_no_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
main->setting.flag -= main->setting.flag & fake_main_flag_print_last_e;
}
else {
return;
}
- {
- f_uint16s_t choices = f_uint16s_t_initialize;
-
- // Identify and prioritize "color context" parameters.
- {
- uint16_t choices_array[3] = { fake_parameter_no_color_e, fake_parameter_light_e, fake_parameter_dark_e };
- choices.array = choices_array;
- choices.used = 3;
+ main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
- static const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
-
- main->setting.state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
-
- if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fake_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);
- }
-
- fake_print_error(&main->program.error, macro_fake_f(fll_program_parameter_process_context));
-
- return;
- }
+ if (F_status_is_error(main->setting.state.status)) {
+ if ((main->setting.flag & fake_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);
}
- // Identify and prioritize "verbosity" parameters.
- {
- uint16_t choices_array[5] = { fake_parameter_verbosity_quiet_e, fake_parameter_verbosity_error_e, fake_parameter_verbosity_verbose_e, fake_parameter_verbosity_debug_e, fake_parameter_verbosity_normal_e };
- choices.array = choices_array;
- choices.used = 5;
+ fake_print_error(&main->program.error, macro_fake_f(fll_program_parameter_process_context_standard));
- static const uint8_t verbosity[5] = { f_console_verbosity_quiet_e, f_console_verbosity_error_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, f_console_verbosity_normal_e };
+ return;
+ }
- main->setting.state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
+ main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
- if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fake_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);
- }
+ if (F_status_is_error(main->setting.state.status)) {
+ if ((main->setting.flag & fake_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);
+ }
- fake_print_error(&main->program.error, macro_fake_f(fll_program_parameter_process_verbosity));
+ fake_print_error(&main->program.error, macro_fake_f(fll_program_parameter_process_verbosity_standard));
- return;
- }
- }
+ return;
}
- if (main->program.parameters.array[fake_parameter_help_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
main->setting.flag |= fake_main_flag_help_e;
return;
}
- if (main->program.parameters.array[fake_parameter_version_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
main->setting.flag |= fake_main_flag_version_e;
return;
}
- if (main->program.parameters.array[fake_parameter_copyright_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
main->setting.flag |= fake_main_flag_copyright_e;
return;
* Errors (with error bit) from: f_uint8s_increase_by().
* Errors (with error bit) from: fll_program_parameter_additional_rip().
* Errors (with error bit) from: fll_program_parameter_process_context().
- * Errors (with error bit) from: fll_program_parameter_process_verbosity().
+ * Errors (with error bit) from: fll_program_parameter_process_verbosity_standard().
*
* @see f_console_parameter_process()
* @see f_path_directory_cleanup()
* @see f_uint8s_increase_by()
* @see fll_program_parameter_additional_rip()
* @see fll_program_parameter_process_context()
- * @see fll_program_parameter_process_verbosity()
+ * @see fll_program_parameter_process_verbosity_standard()
*/
#ifndef _di_fake_setting_load_
extern void fake_setting_load(const f_console_arguments_t arguments, fake_main_t * const main);
*/
#ifndef _di_fake_parameter_e_
enum {
- fake_parameter_help_e,
- fake_parameter_copyright_e,
- fake_parameter_light_e,
- fake_parameter_dark_e,
- fake_parameter_no_color_e,
- fake_parameter_verbosity_quiet_e,
- fake_parameter_verbosity_error_e,
- fake_parameter_verbosity_normal_e,
- fake_parameter_verbosity_verbose_e,
- fake_parameter_verbosity_debug_e,
- fake_parameter_version_e,
- fake_parameter_line_first_no_e,
- fake_parameter_line_last_no_e,
-
- fake_parameter_build_e,
+ fake_parameter_build_e = f_console_standard_parameter_last_e,
fake_parameter_data_e,
fake_parameter_define_e,
fake_parameter_documents_e,
"fll_fss_snatch_apart",
"fll_fss_snatch_map_apart",
"fll_program_parameter_additional_rip",
- "fll_program_parameter_process_context",
- "fll_program_parameter_process_verbosity",
+ "fll_program_parameter_process_context_standard",
+ "fll_program_parameter_process_verbosity_standard",
"fake_build_arguments_standard_add",
"fake_build_get_file_name_without_extension",
"fake_build_load_setting",
fake_f_fll_fss_snatch_apart_e,
fake_f_fll_fss_snatch_map_apart_e,
fake_f_fll_program_parameter_additional_rip_e,
- fake_f_fll_program_parameter_process_context_e,
- fake_f_fll_program_parameter_process_verbosity_e,
+ fake_f_fll_program_parameter_process_context_standard_e,
+ fake_f_fll_program_parameter_process_verbosity_standard_e,
fake_f_fake_build_arguments_standard_add_e,
fake_f_fake_build_get_file_name_without_extension_e,
fake_f_fake_build_load_setting_e,
}
if (main->program.context.mode == f_color_mode_not_e) {
- if (main->program.parameters.array[fake_parameter_no_color_e].flag & f_console_flag_normal_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_no_color_e].flag & f_console_flag_normal_e) {
main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
}
- else if (main->program.parameters.array[fake_parameter_no_color_e].flag & f_console_flag_normal_e) {
+ else if (main->program.parameters.array[f_console_standard_parameter_no_color_e].flag & f_console_flag_normal_e) {
main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
}
}
}
else if (main->program.context.mode == f_color_mode_dark_e) {
- if (main->program.parameters.array[fake_parameter_dark_e].flag & f_console_flag_normal_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_dark_e].flag & f_console_flag_normal_e) {
main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
}
- else if (main->program.parameters.array[fake_parameter_dark_e].flag & f_console_flag_normal_e) {
+ else if (main->program.parameters.array[f_console_standard_parameter_dark_e].flag & f_console_flag_normal_e) {
main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
}
}
}
else {
- if (main->program.parameters.array[fake_parameter_light_e].flag & f_console_flag_normal_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_light_e].flag & f_console_flag_normal_e) {
main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
}
- else if (main->program.parameters.array[fake_parameter_light_e].flag & f_console_flag_normal_e) {
+ else if (main->program.parameters.array[f_console_standard_parameter_light_e].flag & f_console_flag_normal_e) {
main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
}
}
if (main->program.error.verbosity == f_console_verbosity_quiet_e) {
- if (main->program.parameters.array[fake_parameter_verbosity_quiet_e].flag & f_console_flag_normal_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_verbosity_quiet_e].flag & f_console_flag_normal_e) {
main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
- else if (main->program.parameters.array[fake_parameter_verbosity_quiet_e].flag & f_console_flag_normal_e) {
+ else if (main->program.parameters.array[f_console_standard_parameter_verbosity_quiet_e].flag & f_console_flag_normal_e) {
main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
}
}
else if (main->program.error.verbosity == f_console_verbosity_error_e) {
- if (main->program.parameters.array[fake_parameter_verbosity_error_e].flag & f_console_flag_normal_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_verbosity_error_e].flag & f_console_flag_normal_e) {
main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
- else if (main->program.parameters.array[fake_parameter_verbosity_error_e].flag & f_console_flag_normal_e) {
+ else if (main->program.parameters.array[f_console_standard_parameter_verbosity_error_e].flag & f_console_flag_normal_e) {
main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
}
}
else if (main->program.error.verbosity >= f_console_verbosity_verbose_e) {
- if (main->program.parameters.array[fake_parameter_verbosity_verbose_e].flag & f_console_flag_normal_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_verbosity_verbose_e].flag & f_console_flag_normal_e) {
main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
- else if (main->program.parameters.array[fake_parameter_verbosity_verbose_e].flag & f_console_flag_normal_e) {
+ else if (main->program.parameters.array[f_console_standard_parameter_verbosity_verbose_e].flag & f_console_flag_normal_e) {
main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
}
}
else {
- if (main->program.parameters.array[fake_parameter_verbosity_debug_e].flag & f_console_flag_normal_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_verbosity_debug_e].flag & f_console_flag_normal_e) {
main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
- else if (main->program.parameters.array[fake_parameter_verbosity_debug_e].flag & f_console_flag_normal_e) {
+ else if (main->program.parameters.array[f_console_standard_parameter_verbosity_debug_e].flag & f_console_flag_normal_e) {
main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
F_true,
main->setting.work.used,
main->program.parameters.array[fake_parameter_build_e].result & f_console_result_value_e,
- (main->program.parameters.array[fake_parameter_light_e].result & f_console_result_found_e) || (main->program.parameters.array[fake_parameter_dark_e].result & f_console_result_found_e) || (main->program.parameters.array[fake_parameter_no_color_e].result & f_console_result_found_e),
+ (main->program.parameters.array[f_console_standard_parameter_light_e].result & f_console_result_found_e) || (main->program.parameters.array[f_console_standard_parameter_dark_e].result & f_console_result_found_e) || (main->program.parameters.array[f_console_standard_parameter_no_color_e].result & f_console_result_found_e),
main->program.parameters.array[fake_parameter_data_e].result & f_console_result_value_e,
main->program.parameters.array[fake_parameter_define_e].result & f_console_result_value_e,
main->program.parameters.array[fake_parameter_fakefile_e].result & f_console_result_value_e,
main->program.parameters.array[fake_parameter_process_e].result & f_console_result_value_e,
main->program.parameters.array[fake_parameter_settings_e].result & f_console_result_value_e,
main->program.parameters.array[fake_parameter_sources_e].result & f_console_result_value_e,
- (main->program.parameters.array[fake_parameter_verbosity_quiet_e].result & f_console_result_found_e) || (main->program.parameters.array[fake_parameter_verbosity_normal_e].result & f_console_result_found_e) || (main->program.parameters.array[fake_parameter_verbosity_verbose_e].result & f_console_result_found_e) || (main->program.parameters.array[fake_parameter_verbosity_debug_e].result & f_console_result_found_e),
+ (main->program.parameters.array[f_console_standard_parameter_verbosity_quiet_e].result & f_console_result_found_e) || (main->program.parameters.array[f_console_standard_parameter_verbosity_normal_e].result & f_console_result_found_e) || (main->program.parameters.array[f_console_standard_parameter_verbosity_verbose_e].result & f_console_result_found_e) || (main->program.parameters.array[f_console_standard_parameter_verbosity_debug_e].result & f_console_result_found_e),
main->program.parameters.array[fake_parameter_work_e].result & f_console_result_value_e,
data_make->parameter_value.build.used,
data_make->parameter_value.color.used,
main->setting.state.status = f_console_parameter_process(state, arguments, &main->program.parameters, &main->setting.state, 0);
// Identify and process first/last parameters.
- if (main->program.parameters.array[firewall_parameter_line_first_no_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
main->setting.flag -= main->setting.flag & firewall_main_flag_print_first_e;
}
else {
main->setting.flag |= firewall_main_flag_print_first_e;
}
- if (main->program.parameters.array[firewall_parameter_line_last_no_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
main->setting.flag -= main->setting.flag & firewall_main_flag_print_last_e;
}
else {
return;
}
- {
- f_number_unsigned_t choice = 0;
- f_uint16s_t choices = f_uint16s_t_initialize;
+ main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
- // Identify and prioritize "color context" parameters.
- {
- uint16_t choices_array[3] = { firewall_parameter_no_color_e, firewall_parameter_light_e, firewall_parameter_dark_e };
- choices.array = choices_array;
- choices.used = 3;
-
- static const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
-
- main->setting.state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
-
- if (F_status_is_error(main->setting.state.status)) {
- fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), "fll_program_parameter_process_context", 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);
- }
+ if (F_status_is_error(main->setting.state.status)) {
+ 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);
- return;
- }
+ if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ fll_print_dynamic_raw(f_string_eol_s, main->program.error);
}
- // Identify and prioritize "verbosity" parameters.
- {
- uint16_t choices_array[5] = { firewall_parameter_verbosity_quiet_e, firewall_parameter_verbosity_error_e, firewall_parameter_verbosity_verbose_e, firewall_parameter_verbosity_debug_e, firewall_parameter_verbosity_normal_e };
- choices.array = choices_array;
- choices.used = 5;
-
- static const uint8_t verbosity[5] = { f_console_verbosity_quiet_e, f_console_verbosity_error_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, f_console_verbosity_normal_e };
-
- main->setting.state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
+ return;
+ }
- if (F_status_is_error(main->setting.state.status)) {
- fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
+ main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
- if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.error);
- }
+ if (F_status_is_error(main->setting.state.status)) {
+ 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);
- return;
- }
+ if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ fll_print_dynamic_raw(f_string_eol_s, main->program.error);
}
+
+ return;
}
main->program.output.to.id = F_type_descriptor_output_d;
main->program.output.to.stream = F_type_output_d;
main->program.output.to.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d;
- if (main->program.parameters.array[firewall_parameter_help_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
main->setting.flag |= firewall_main_flag_help_e;
return;
}
- if (main->program.parameters.array[firewall_parameter_version_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
main->setting.flag |= firewall_main_flag_version_e;
return;
}; // enum
enum {
- firewall_parameter_help_e,
- firewall_parameter_light_e,
- firewall_parameter_dark_e,
- firewall_parameter_no_color_e,
- firewall_parameter_verbosity_quiet_e,
- firewall_parameter_verbosity_error_e,
- firewall_parameter_verbosity_normal_e,
- firewall_parameter_verbosity_verbose_e,
- firewall_parameter_verbosity_debug_e,
- firewall_parameter_version_e,
-
- firewall_parameter_command_start_e,
+ firewall_parameter_command_start_e = f_console_standard_parameter_last_e,
firewall_parameter_command_stop_e,
firewall_parameter_command_restart_e,
firewall_parameter_command_lock_e,
if (F_status_is_error(status)) return;
- {
- f_number_unsigned_t choice = 0;
- f_uint16s_t choices = f_uint16s_t_initialize;
+ status = fll_program_parameter_process_context_standard(F_true, &main->program);
- // Identify and prioritize "color context" parameters.
- {
- uint16_t choices_array[3] = { firewall_parameter_no_color_e, firewall_parameter_light_e, firewall_parameter_dark_e };
- choices.array = choices_array;
- choices.used = 3;
-
- static const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
-
- status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
-
- if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e);
+ if (F_status_is_error(status)) {
+ fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context_standard", fll_error_file_flag_fallback_e);
- if (main->error.verbosity > f_console_verbosity_quiet_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->error);
- }
-
- return;
- }
+ if (main->error.verbosity > f_console_verbosity_quiet_e) {
+ fll_print_dynamic_raw(f_string_eol_s, main->error);
}
- // Identify and prioritize "verbosity" parameters.
- {
- uint16_t choices_array[5] = { firewall_parameter_verbosity_quiet_e, firewall_parameter_verbosity_error_e, firewall_parameter_verbosity_verbose_e, firewall_parameter_verbosity_debug_e, firewall_parameter_verbosity_normal_e };
- choices.array = choices_array;
- choices.used = 5;
-
- const uint8_t verbosity[5] = { f_console_verbosity_quiet_e, f_console_verbosity_error_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, f_console_verbosity_normal_e };
-
- status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
+ return;
+ }
- if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
+ status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
- if (main->error.verbosity > f_console_verbosity_quiet_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->error);
- }
+ if (F_status_is_error(status)) {
+ fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity_standard", fll_error_file_flag_fallback_e);
- return;
- }
+ if (main->error.verbosity > f_console_verbosity_quiet_e) {
+ fll_print_dynamic_raw(f_string_eol_s, main->error);
}
+
+ return;
}
- if (main->parameters.array[firewall_parameter_help_e].result & f_console_result_found_e) {
+ if (main->parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
firewall_print_help(setting, main->message);
return F_none;
}
- if (main->parameters.array[firewall_parameter_version_e].result & f_console_result_found_e) {
+ if (main->parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
fll_program_print_version(&main->message, firewall_program_version_s);
return F_none;
}
- if (main->parameters.array[firewall_parameter_copyright_e].result & f_console_result_found_e) {
+ if (main->parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
fll_program_print_copyright(&main->message);
return F_none;
main->setting.state.step_small = fss_embedded_list_read_allocation_small_d;
// Identify and process first/last parameters.
- if (main->program.parameters.array[fss_embedded_list_read_parameter_line_first_no_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
main->setting.flag -= main->setting.flag & fss_embedded_list_read_main_flag_print_first_e;
}
else {
main->setting.flag |= fss_embedded_list_read_main_flag_print_first_e;
}
- if (main->program.parameters.array[fss_embedded_list_read_parameter_line_last_no_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
main->setting.flag -= main->setting.flag & fss_embedded_list_read_main_flag_print_last_e;
}
else {
return;
}
- {
- f_number_unsigned_t choice = 0;
- f_uint16s_t choices = f_uint16s_t_initialize;
+ main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
- // Identify and prioritize "color context" parameters.
- {
- uint16_t choices_array[3] = { fss_embedded_list_read_parameter_no_color_e, fss_embedded_list_read_parameter_light_e, fss_embedded_list_read_parameter_dark_e };
- choices.array = choices_array;
- choices.used = 3;
-
- static const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
-
- main->setting.state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
-
- if (F_status_is_error(main->setting.state.status)) {
- fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), "fll_program_parameter_process_context", 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);
- }
+ if (F_status_is_error(main->setting.state.status)) {
+ 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);
- return;
- }
+ if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ fll_print_dynamic_raw(f_string_eol_s, main->program.error);
}
- // Identify and prioritize "verbosity" parameters.
- {
- uint16_t choices_array[5] = { fss_embedded_list_read_parameter_verbosity_quiet_e, fss_embedded_list_read_parameter_verbosity_error_e, fss_embedded_list_read_parameter_verbosity_verbose_e, fss_embedded_list_read_parameter_verbosity_debug_e, fss_embedded_list_read_parameter_verbosity_normal_e };
- choices.array = choices_array;
- choices.used = 5;
-
- static const uint8_t verbosity[5] = { f_console_verbosity_quiet_e, f_console_verbosity_error_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, f_console_verbosity_normal_e };
-
- main->setting.state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
+ return;
+ }
- if (F_status_is_error(main->setting.state.status)) {
- fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
+ main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
- if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.error);
- }
+ if (F_status_is_error(main->setting.state.status)) {
+ 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);
- return;
- }
+ if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ fll_print_dynamic_raw(f_string_eol_s, main->program.error);
}
+
+ return;
}
main->program.output.to.id = F_type_descriptor_output_d;
main->program.output.to.stream = F_type_output_d;
main->program.output.to.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d;
- if (main->program.parameters.array[fss_embedded_list_read_parameter_help_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
main->setting.flag |= fss_embedded_list_read_main_flag_help_e;
return;
}
- if (main->program.parameters.array[fss_embedded_list_read_parameter_version_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
main->setting.flag |= fss_embedded_list_read_main_flag_version_e;
return;
}
- if (main->program.parameters.array[fss_embedded_list_read_parameter_copyright_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
main->setting.flag |= fss_embedded_list_read_main_flag_copyright_e;
return;
extern const f_string_static_t fss_embedded_list_read_long_trim_s;
enum {
- fss_embedded_list_read_parameter_help_e,
- fss_embedded_list_read_parameter_copyright_e,
- fss_embedded_list_read_parameter_light_e,
- fss_embedded_list_read_parameter_dark_e,
- fss_embedded_list_read_parameter_no_color_e,
- fss_embedded_list_read_parameter_verbosity_quiet_e,
- fss_embedded_list_read_parameter_verbosity_error_e,
- fss_embedded_list_read_parameter_verbosity_normal_e,
- fss_embedded_list_read_parameter_verbosity_verbose_e,
- fss_embedded_list_read_parameter_verbosity_debug_e,
- fss_embedded_list_read_parameter_version_e,
- fss_embedded_list_read_parameter_line_first_no_e,
- fss_embedded_list_read_parameter_line_last_no_e,
-
- fss_embedded_list_read_parameter_at_e,
+ fss_embedded_list_read_parameter_at_e = f_console_standard_parameter_last_e,
fss_embedded_list_read_parameter_content_e,
fss_embedded_list_read_parameter_columns_e,
fss_embedded_list_read_parameter_delimit_e,
if (F_status_is_error(status)) return;
- {
- f_number_unsigned_t choice = 0;
- f_uint16s_t choices = f_uint16s_t_initialize;
+ status = fll_program_parameter_process_context_standard(F_true, &main->program);
- // Identify and prioritize "color context" parameters.
- {
- uint16_t choices_array[3] = { fss_embedded_list_read_parameter_no_color_e, fss_embedded_list_read_parameter_light_e, fss_embedded_list_read_parameter_dark_e };
- choices.array = choices_array;
- choices.used = 3;
+ if (F_status_is_error(status)) {
+ fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context_standard", fll_error_file_flag_fallback_e);
- static const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
-
- status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
-
- if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e);
-
- if (main->error.verbosity > f_console_verbosity_quiet_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->error);
- }
-
- return;
- }
+ if (main->error.verbosity > f_console_verbosity_quiet_e) {
+ fll_print_dynamic_raw(f_string_eol_s, main->error);
}
- // Identify and prioritize "verbosity" parameters.
- {
- uint16_t choices_array[5] = { fss_embedded_list_read_parameter_verbosity_quiet_e, fss_embedded_list_read_parameter_verbosity_error_e, fss_embedded_list_read_parameter_verbosity_verbose_e, fss_embedded_list_read_parameter_verbosity_debug_e, fss_embedded_list_read_parameter_verbosity_normal_e };
- choices.array = choices_array;
- choices.used = 5;
-
- const uint8_t verbosity[5] = { f_console_verbosity_quiet_e, f_console_verbosity_error_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, f_console_verbosity_normal_e };
-
- status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
+ return;
+ }
- if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
+ status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
- if (main->error.verbosity > f_console_verbosity_quiet_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->error);
- }
+ if (F_status_is_error(status)) {
+ fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity_standard", fll_error_file_flag_fallback_e);
- return;
- }
+ if (main->error.verbosity > f_console_verbosity_quiet_e) {
+ fll_print_dynamic_raw(f_string_eol_s, main->error);
}
+
+ return;
}
- if (main->parameters.array[fss_embedded_list_read_parameter_help_e].result & f_console_result_found_e) {
+ if (main->parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
fss_embedded_list_read_print_help(setting, main->message);
return F_none;
}
- if (main->parameters.array[fss_embedded_list_read_parameter_version_e].result & f_console_result_found_e) {
+ if (main->parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
fll_program_print_version(main->message, fss_embedded_list_read_program_version_s);
return F_none;
}
- if (main->parameters.array[fss_embedded_list_read_parameter_copyright_e].result & f_console_result_found_e) {
+ if (main->parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
fll_program_print_copyright(main->message);
return F_none;
main->setting.state.step_small = fss_identify_allocation_small_d;
// Identify and process first/last parameters.
- if (main->program.parameters.array[fss_identify_parameter_line_first_no_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
main->setting.flag -= main->setting.flag & fss_identify_main_flag_print_first_e;
}
else {
main->setting.flag |= fss_identify_main_flag_print_first_e;
}
- if (main->program.parameters.array[fss_identify_parameter_line_last_no_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
main->setting.flag -= main->setting.flag & fss_identify_main_flag_print_last_e;
}
else {
return;
}
- {
- f_number_unsigned_t choice = 0;
- f_uint16s_t choices = f_uint16s_t_initialize;
+ main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
- // Identify and prioritize "color context" parameters.
- {
- uint16_t choices_array[3] = { fss_identify_parameter_no_color_e, fss_identify_parameter_light_e, fss_identify_parameter_dark_e };
- choices.array = choices_array;
- choices.used = 3;
-
- static const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
+ if (F_status_is_error(main->setting.state.status)) {
+ if ((main->setting.flag & fss_identify_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);
+ }
- main->setting.state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
+ fss_identify_print_error(&main->program.error, macro_fss_identify_f(fll_program_parameter_process_context_standard));
- if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_identify_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;
+ }
- fss_identify_print_error(&main->program.error, macro_fss_identify_f(fll_program_parameter_process_context));
+ main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
- return;
- }
+ if (F_status_is_error(main->setting.state.status)) {
+ if ((main->setting.flag & fss_identify_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);
}
+
+ fss_identify_print_error(&main->program.error, macro_fss_identify_f(fll_program_parameter_process_verbosity_standard));
+
+ return;
}
- if (main->program.parameters.array[fss_identify_parameter_help_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
main->setting.flag |= fss_identify_main_flag_help_e;
return;
}
- if (main->program.parameters.array[fss_identify_parameter_version_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
main->setting.flag |= fss_identify_main_flag_version_e;
return;
}
- if (main->program.parameters.array[fss_identify_parameter_copyright_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
main->setting.flag |= fss_identify_main_flag_copyright_e;
return;
*/
#ifndef _di_fss_identify_parameter_e_
enum {
- fss_identify_parameter_help_e,
- fss_identify_parameter_copyright_e,
- fss_identify_parameter_light_e,
- fss_identify_parameter_dark_e,
- fss_identify_parameter_no_color_e,
- fss_identify_parameter_verbosity_quiet_e,
- fss_identify_parameter_verbosity_error_e,
- fss_identify_parameter_verbosity_normal_e,
- fss_identify_parameter_verbosity_verbose_e,
- fss_identify_parameter_verbosity_debug_e,
- fss_identify_parameter_version_e,
- fss_identify_parameter_line_first_no_e,
- fss_identify_parameter_line_last_no_e,
-
- fss_identify_parameter_content_e,
+ fss_identify_parameter_content_e = f_console_standard_parameter_last_e,
fss_identify_parameter_line_e,
fss_identify_parameter_name_e,
fss_identify_parameter_object_e,
"f_thread_create",
"f_utf_is_word_dash",
"fll_fss_identify",
- "fll_program_parameter_process_context",
- "fll_program_parameter_process_verbosity",
+ "fll_program_parameter_process_context_standard",
+ "fll_program_parameter_process_verbosity_standard",
};
#endif // _di_fss_identify_f_a_
fss_identify_f_f_thread_create_e,
fss_identify_f_f_utf_is_word_dash_e,
fss_identify_f_fll_fss_identify_e,
- fss_identify_f_fll_program_parameter_process_context_e,
- fss_identify_f_fll_program_parameter_process_verbosity_e,
+ fss_identify_f_fll_program_parameter_process_context_standard_e,
+ fss_identify_f_fll_program_parameter_process_verbosity_standard_e,
}; // enum
#endif // _di_fss_identify_f_e_
main->setting.state.step_small = fss_read_allocation_small_d;
// Identify and process first/last parameters.
- if (parameters->array[fss_read_parameter_line_first_no_e].result & f_console_result_found_e) {
+ if (parameters->array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
main->setting.flag -= main->setting.flag & fss_read_main_flag_print_first_e;
}
else {
main->setting.flag |= fss_read_main_flag_print_first_e;
}
- if (parameters->array[fss_read_parameter_line_last_no_e].result & f_console_result_found_e) {
+ if (parameters->array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
main->setting.flag -= main->setting.flag & fss_read_main_flag_print_last_e;
}
else {
return;
}
- {
- f_uint16s_t choices = f_uint16s_t_initialize;
-
- // Identify and prioritize "color context" parameters.
- {
- uint16_t choices_array[3] = { fss_read_parameter_no_color_e, fss_read_parameter_light_e, fss_read_parameter_dark_e };
- choices.array = choices_array;
- choices.used = 3;
-
- static const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
-
- main->setting.state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
+ main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
- if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_read_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);
- }
-
- fss_read_print_error(&main->program.error, macro_fss_read_f(fll_program_parameter_process_context));
-
- return;
- }
+ if (F_status_is_error(main->setting.state.status)) {
+ if ((main->setting.flag & fss_read_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);
}
- // Identify and prioritize "verbosity" parameters.
- {
- uint16_t choices_array[5] = { fss_read_parameter_verbosity_quiet_e, fss_read_parameter_verbosity_error_e, fss_read_parameter_verbosity_verbose_e, fss_read_parameter_verbosity_debug_e, fss_read_parameter_verbosity_normal_e };
- choices.array = choices_array;
- choices.used = 5;
+ fss_read_print_error(&main->program.error, macro_fss_read_f(fll_program_parameter_process_context_standard));
- const uint8_t verbosity[5] = { f_console_verbosity_quiet_e, f_console_verbosity_error_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, f_console_verbosity_normal_e };
+ return;
+ }
- main->setting.state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
+ main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
- if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_read_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);
- }
+ if (F_status_is_error(main->setting.state.status)) {
+ if ((main->setting.flag & fss_read_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);
+ }
- fss_read_print_error(&main->program.error, macro_fss_read_f(fll_program_parameter_process_verbosity));
+ fss_read_print_error(&main->program.error, macro_fss_read_f(fll_program_parameter_process_verbosity_standard));
- return;
- }
- }
+ return;
}
main->program.output.to.id = F_type_descriptor_output_d;
main->program.output.to.stream = F_type_output_d;
main->program.output.to.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d;
- if (parameters->array[fss_read_parameter_help_e].result & f_console_result_found_e) {
+ if (parameters->array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
main->setting.flag |= fss_read_main_flag_help_e;
}
- if (parameters->array[fss_read_parameter_version_e].result & f_console_result_found_e) {
+ if (parameters->array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
main->setting.flag |= fss_read_main_flag_version_e;
}
- if (parameters->array[fss_read_parameter_copyright_e].result & f_console_result_found_e) {
+ if (parameters->array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
main->setting.flag |= fss_read_main_flag_copyright_e;
}
}
}
- if (parameters->array[fss_read_parameter_help_e].result & f_console_result_found_e) return;
- if (parameters->array[fss_read_parameter_version_e].result & f_console_result_found_e) return;
+ if (parameters->array[f_console_standard_parameter_help_e].result & f_console_result_found_e) return;
+ if (parameters->array[f_console_standard_parameter_version_e].result & f_console_result_found_e) return;
f_number_unsigned_t i = 0;
f_number_unsigned_t index = 0;
* Errors (with error bit) from: f_file_stream_open().
* Errors (with error bit) from: f_string_dynamics_resize().
* Errors (with error bit) from: fll_program_parameter_process_context().
- * Errors (with error bit) from: fll_program_parameter_process_verbosity().
+ * Errors (with error bit) from: fll_program_parameter_process_verbosity_standard().
*
* Errors (with error bit) from: fss_read_setting_load_depth().
* Errors (with error bit) from: fss_read_signal_check()
* @see f_file_stream_open()
* @see f_string_dynamics_resize()
* @see fll_program_parameter_process_context()
- * @see fll_program_parameter_process_verbosity()
+ * @see fll_program_parameter_process_verbosity_standard()
*
* @see fss_read_setting_load_depth()
* @see fss_read_signal_check()
*/
#ifndef _di_fss_read_parameter_e_
enum {
- fss_read_parameter_help_e,
- fss_read_parameter_copyright_e,
- fss_read_parameter_light_e,
- fss_read_parameter_dark_e,
- fss_read_parameter_no_color_e,
- fss_read_parameter_verbosity_quiet_e,
- fss_read_parameter_verbosity_error_e,
- fss_read_parameter_verbosity_normal_e,
- fss_read_parameter_verbosity_verbose_e,
- fss_read_parameter_verbosity_debug_e,
- fss_read_parameter_version_e,
- fss_read_parameter_line_first_no_e,
- fss_read_parameter_line_last_no_e,
-
- fss_read_parameter_as_e,
+ fss_read_parameter_as_e = f_console_standard_parameter_last_e,
fss_read_parameter_at_e,
fss_read_parameter_content_e,
fss_read_parameter_columns_e,
"fll_fss_extended_read",
"fll_fss_extended_list_read",
"fll_fss_payload_read",
- "fll_program_parameter_process_context",
- "fll_program_parameter_process_verbosity",
+ "fll_program_parameter_process_context_standard",
+ "fll_program_parameter_process_verbosity_standard",
"fss_read_depths_resize",
"fss_read_ensure_quotes_length",
"fss_read_files_resize",
fss_read_f_fll_fss_extended_read_e,
fss_read_f_fll_fss_extended_list_read_e,
fss_read_f_fll_fss_payload_read_e,
- fss_read_f_fll_program_parameter_process_context_e,
- fss_read_f_fll_program_parameter_process_verbosity_e,
+ fss_read_f_fll_program_parameter_process_context_standard_e,
+ fss_read_f_fll_program_parameter_process_verbosity_standard_e,
fss_read_f_fss_read_depths_resize_e,
fss_read_f_fss_read_ensure_quotes_length_e,
fss_read_f_fss_read_files_resize_e,
* Errors (with error bit) from: f_file_stream_open().
* Errors (with error bit) from: f_string_dynamics_resize().
* Errors (with error bit) from: fll_program_parameter_process_context().
- * Errors (with error bit) from: fll_program_parameter_process_verbosity().
+ * Errors (with error bit) from: fll_program_parameter_process_verbosity_standard().
*
* @see f_console_parameter_process()
* @see f_file_stream_open()
* @see f_string_dynamics_resize()
* @see fll_program_parameter_process_context()
- * @see fll_program_parameter_process_verbosity()
+ * @see fll_program_parameter_process_verbosity_standard()
*
* @see fss_read_setting_load()
*/
main->setting.state.step_small = fss_write_allocation_small_d;
// Identify and process first/last parameters.
- if (main->program.parameters.array[fss_write_parameter_line_first_no_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
main->setting.flag -= main->setting.flag & fss_write_main_flag_print_first_e;
}
else {
main->setting.flag |= fss_write_main_flag_print_first_e;
}
- if (main->program.parameters.array[fss_write_parameter_line_last_no_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
main->setting.flag -= main->setting.flag & fss_write_main_flag_print_last_e;
}
else {
return;
}
- {
- f_uint16s_t choices = f_uint16s_t_initialize;
-
- // Identify and prioritize "color context" parameters.
- {
- uint16_t choices_array[3] = { fss_write_parameter_no_color_e, fss_write_parameter_light_e, fss_write_parameter_dark_e };
- choices.array = choices_array;
- choices.used = 3;
-
- static const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
-
- main->setting.state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
+ main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
- if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_write_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);
- }
-
- fss_write_print_error(&main->program.error, macro_fss_write_f(fll_program_parameter_process_context));
-
- return;
- }
+ if (F_status_is_error(main->setting.state.status)) {
+ if ((main->setting.flag & fss_write_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);
}
- // Identify and prioritize "verbosity" parameters.
- {
- uint16_t choices_array[5] = { fss_write_parameter_verbosity_quiet_e, fss_write_parameter_verbosity_error_e, fss_write_parameter_verbosity_verbose_e, fss_write_parameter_verbosity_debug_e, fss_write_parameter_verbosity_normal_e };
- choices.array = choices_array;
- choices.used = 5;
+ fss_write_print_error(&main->program.error, macro_fss_write_f(fll_program_parameter_process_context_standard));
- static const uint8_t verbosity[5] = { f_console_verbosity_quiet_e, f_console_verbosity_error_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, f_console_verbosity_normal_e };
+ return;
+ }
- main->setting.state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
+ main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
- if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_write_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);
- }
+ if (F_status_is_error(main->setting.state.status)) {
+ if ((main->setting.flag & fss_write_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);
+ }
- fss_write_print_error(&main->program.error, macro_fss_write_f(fll_program_parameter_process_verbosity));
+ fss_write_print_error(&main->program.error, macro_fss_write_f(fll_program_parameter_process_verbosity_standard));
- return;
- }
- }
+ return;
}
main->program.output.to.id = F_type_descriptor_output_d;
main->program.output.to.stream = F_type_output_d;
main->program.output.to.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d;
- if (main->program.parameters.array[fss_write_parameter_help_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
main->setting.flag |= fss_write_main_flag_help_e;
}
- if (main->program.parameters.array[fss_write_parameter_version_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
main->setting.flag |= fss_write_main_flag_version_e;
}
- if (main->program.parameters.array[fss_write_parameter_copyright_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
main->setting.flag |= fss_write_main_flag_copyright_e;
}
}
}
- if (main->program.parameters.array[fss_write_parameter_help_e].result & f_console_result_found_e) return;
- if (main->program.parameters.array[fss_write_parameter_version_e].result & f_console_result_found_e) return;
+ if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) return;
+ if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) return;
if ((main->program.parameters.array[fss_write_parameter_file_e].result & f_console_result_value_e) && main->program.parameters.array[fss_write_parameter_file_e].values.used) {
if (main->program.parameters.array[fss_write_parameter_file_e].values.used > 1) {
* Errors (with error bit) from: f_file_stream_open().
* Errors (with error bit) from: f_string_dynamics_resize().
* Errors (with error bit) from: fll_program_parameter_process_context().
- * Errors (with error bit) from: fll_program_parameter_process_verbosity().
+ * Errors (with error bit) from: fll_program_parameter_process_verbosity_standard().
* @param callback
* (optional) Designate a function to call after performing the initial processing, but before printing help.
* If the function returns F_done, then this function immediately returns, resetting status to F_none.
* @see f_file_stream_open()
* @see f_string_dynamics_resize()
* @see fll_program_parameter_process_context()
- * @see fll_program_parameter_process_verbosity()
+ * @see fll_program_parameter_process_verbosity_standard()
*/
#ifndef _di_fss_write_setting_load_
extern void fss_write_setting_load(const f_console_arguments_t arguments, fss_write_main_t * const main, void (*callback)(const f_console_arguments_t arguments, fss_write_main_t * const main));
*/
#ifndef _di_fss_write_parameter_e_
enum {
- fss_write_parameter_help_e,
- fss_write_parameter_copyright_e,
- fss_write_parameter_light_e,
- fss_write_parameter_dark_e,
- fss_write_parameter_no_color_e,
- fss_write_parameter_verbosity_quiet_e,
- fss_write_parameter_verbosity_error_e,
- fss_write_parameter_verbosity_normal_e,
- fss_write_parameter_verbosity_verbose_e,
- fss_write_parameter_verbosity_debug_e,
- fss_write_parameter_version_e,
- fss_write_parameter_line_first_no_e,
- fss_write_parameter_line_last_no_e,
-
- fss_write_parameter_as_e,
+ fss_write_parameter_as_e = f_console_standard_parameter_last_e,
fss_write_parameter_backtick_e,
fss_write_parameter_content_e,
fss_write_parameter_content_end_e,
"fl_fss_extended_list_object_write",
"fl_fss_extended_object_write",
"fl_fss_payload_content_write",
- "fll_program_parameter_process_context",
- "fll_program_parameter_process_verbosity",
+ "fll_program_parameter_process_context_standard",
+ "fll_program_parameter_process_verbosity_standard",
"fll_fss_payload_write",
};
#endif // _di_fss_write_f_a_
fss_write_f_fl_fss_extended_list_object_write_e,
fss_write_f_fl_fss_extended_object_write_e,
fss_write_f_fl_fss_payload_content_write_e,
- fss_write_f_fll_program_parameter_process_context_e,
- fss_write_f_fll_program_parameter_process_verbosity_e,
+ fss_write_f_fll_program_parameter_process_context_standard_e,
+ fss_write_f_fll_program_parameter_process_verbosity_standard_e,
fss_write_f_fll_fss_payload_write_e,
}; // enum
#endif // _di_fss_write_f_e_
* Errors (with error bit) from: f_file_stream_open().
* Errors (with error bit) from: f_string_dynamics_resize().
* Errors (with error bit) from: fll_program_parameter_process_context().
- * Errors (with error bit) from: fll_program_parameter_process_verbosity().
+ * Errors (with error bit) from: fll_program_parameter_process_verbosity_standard().
*
* @see f_console_parameter_process()
* @see f_file_stream_open()
* @see f_string_dynamics_resize()
* @see fll_program_parameter_process_context()
- * @see fll_program_parameter_process_verbosity()
+ * @see fll_program_parameter_process_verbosity_standard()
*
* @see fss_write_setting_load()
*/
main->setting.state.step_small = iki_read_allocation_small_d;
// Identify and process first/last parameters.
- if (main->program.parameters.array[iki_read_parameter_line_first_no_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
main->setting.flag -= main->setting.flag & iki_read_main_flag_print_first_e;
}
else {
main->setting.flag |= iki_read_main_flag_print_first_e;
}
- if (main->program.parameters.array[iki_read_parameter_line_last_no_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
main->setting.flag -= main->setting.flag & iki_read_main_flag_print_last_e;
}
else {
return;
}
- {
- f_uint16s_t choices = f_uint16s_t_initialize;
+ main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
- // Identify and prioritize "color context" parameters.
- {
- uint16_t choices_array[3] = { iki_read_parameter_no_color_e, iki_read_parameter_light_e, iki_read_parameter_dark_e };
- choices.array = choices_array;
- choices.used = 3;
-
- static const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
-
- main->setting.state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
-
- if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & iki_read_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);
- }
-
- iki_read_print_error(&main->program.error, macro_iki_read_f(fll_program_parameter_process_context));
-
- return;
- }
+ if (F_status_is_error(main->setting.state.status)) {
+ if ((main->setting.flag & iki_read_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);
}
- // Identify and prioritize "verbosity" parameters.
- {
- uint16_t choices_array[5] = { iki_read_parameter_verbosity_quiet_e, iki_read_parameter_verbosity_error_e, iki_read_parameter_verbosity_verbose_e, iki_read_parameter_verbosity_debug_e, iki_read_parameter_verbosity_normal_e };
- choices.array = choices_array;
- choices.used = 5;
+ iki_read_print_error(&main->program.error, macro_iki_read_f(fll_program_parameter_process_context_standard));
- static const uint8_t verbosity[5] = { f_console_verbosity_quiet_e, f_console_verbosity_error_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, f_console_verbosity_normal_e };
+ return;
+ }
- main->setting.state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
+ main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
- if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & iki_read_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);
- }
+ if (F_status_is_error(main->setting.state.status)) {
+ if ((main->setting.flag & iki_read_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);
+ }
- iki_read_print_error(&main->program.error, macro_iki_read_f(fll_program_parameter_process_verbosity));
+ iki_read_print_error(&main->program.error, macro_iki_read_f(fll_program_parameter_process_verbosity_standard));
- return;
- }
- }
+ return;
+ }
- if (main->program.parameters.array[iki_read_parameter_help_e].result & f_console_result_found_e) {
- main->setting.flag |= iki_read_main_flag_help_e;
+ if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
+ main->setting.flag |= iki_read_main_flag_help_e;
- return;
- }
+ return;
+ }
- if (main->program.parameters.array[iki_read_parameter_version_e].result & f_console_result_found_e) {
- main->setting.flag |= iki_read_main_flag_version_e;
+ if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
+ main->setting.flag |= iki_read_main_flag_version_e;
- return;
- }
+ return;
+ }
- if (main->program.parameters.array[iki_read_parameter_copyright_e].result & f_console_result_found_e) {
- main->setting.flag |= iki_read_main_flag_copyright_e;
+ if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
+ main->setting.flag |= iki_read_main_flag_copyright_e;
- return;
- }
+ return;
}
if (!(main->program.parameters.remaining.used || (main->program.pipe & fll_program_data_pipe_input_e))) {
* Errors (with error bit) from: f_string_maps_resize().
* Errors (with error bit) from: f_string_triples_resize().
* Errors (with error bit) from: fll_program_parameter_process_context().
- * Errors (with error bit) from: fll_program_parameter_process_verbosity().
+ * Errors (with error bit) from: fll_program_parameter_process_verbosity_standard().
*
* @see f_console_parameter_process()
* @see f_file_exists()
* @see f_string_maps_resize()
* @see f_string_triples_resize()
* @see fll_program_parameter_process_context()
- * @see fll_program_parameter_process_verbosity()
+ * @see fll_program_parameter_process_verbosity_standard()
*/
#ifndef _di_iki_read_setting_load_
extern void iki_read_setting_load(const f_console_arguments_t arguments, iki_read_main_t * const main);
*/
#ifndef _di_iki_read_parameter_e_
enum {
- iki_read_parameter_help_e,
- iki_read_parameter_copyright_e,
- iki_read_parameter_light_e,
- iki_read_parameter_dark_e,
- iki_read_parameter_no_color_e,
- iki_read_parameter_verbosity_quiet_e,
- iki_read_parameter_verbosity_error_e,
- iki_read_parameter_verbosity_normal_e,
- iki_read_parameter_verbosity_verbose_e,
- iki_read_parameter_verbosity_debug_e,
- iki_read_parameter_version_e,
- iki_read_parameter_line_first_no_e,
- iki_read_parameter_line_last_no_e,
-
- iki_read_parameter_at_e,
+ iki_read_parameter_at_e = f_console_standard_parameter_last_e,
iki_read_parameter_content_e,
iki_read_parameter_line_e,
iki_read_parameter_literal_e,
"f_string_triples_increase_by",
"f_thread_create",
"fl_iki_read",
- "fll_program_parameter_process_context",
- "fll_program_parameter_process_verbosity",
+ "fll_program_parameter_process_context_standard",
+ "fll_program_parameter_process_verbosity_standard",
};
#endif // _di_iki_read_f_a_
iki_read_f_f_string_triples_increase_by_e,
iki_read_f_f_thread_create_e,
iki_read_f_fl_iki_read_e,
- iki_read_f_fll_program_parameter_process_context_e,
- iki_read_f_fll_program_parameter_process_verbosity_e,
+ iki_read_f_fll_program_parameter_process_context_standard_e,
+ iki_read_f_fll_program_parameter_process_verbosity_standard_e,
}; // enum
#endif // _di_iki_read_f_e_
main->setting.state.step_small = iki_write_allocation_small_d;
// Identify and process first/last parameters.
- if (main->program.parameters.array[iki_write_parameter_line_first_no_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
main->setting.flag -= main->setting.flag & iki_write_main_flag_print_first_e;
}
else {
main->setting.flag |= iki_write_main_flag_print_first_e;
}
- if (main->program.parameters.array[iki_write_parameter_line_last_no_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
main->setting.flag -= main->setting.flag & iki_write_main_flag_print_last_e;
}
else {
return;
}
- {
- f_uint16s_t choices = f_uint16s_t_initialize;
+ main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
- // Identify and prioritize "color context" parameters.
- {
- uint16_t choices_array[3] = { iki_write_parameter_no_color_e, iki_write_parameter_light_e, iki_write_parameter_dark_e };
- choices.array = choices_array;
- choices.used = 3;
-
- static const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
-
- main->setting.state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
-
- if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & iki_write_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);
- }
-
- iki_write_print_error(&main->program.error, macro_iki_write_f(fll_program_parameter_process_context));
-
- return;
- }
+ if (F_status_is_error(main->setting.state.status)) {
+ if ((main->setting.flag & iki_write_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);
}
- // Identify and prioritize "verbosity" parameters.
- {
- uint16_t choices_array[5] = { iki_write_parameter_verbosity_quiet_e, iki_write_parameter_verbosity_error_e, iki_write_parameter_verbosity_verbose_e, iki_write_parameter_verbosity_debug_e, iki_write_parameter_verbosity_normal_e };
- choices.array = choices_array;
- choices.used = 5;
+ iki_write_print_error(&main->program.error, macro_iki_write_f(fll_program_parameter_process_context_standard));
- static const uint8_t verbosity[5] = { f_console_verbosity_quiet_e, f_console_verbosity_error_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, f_console_verbosity_normal_e };
+ return;
+ }
- main->setting.state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
+ main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
- if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & iki_write_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);
- }
+ if (F_status_is_error(main->setting.state.status)) {
+ if ((main->setting.flag & iki_write_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);
+ }
- iki_write_print_error(&main->program.error, macro_iki_write_f(fll_program_parameter_process_verbosity));
+ iki_write_print_error(&main->program.error, macro_iki_write_f(fll_program_parameter_process_verbosity_standard));
- return;
- }
- }
+ return;
}
main->program.output.to.id = F_type_descriptor_output_d;
main->program.output.to.stream = F_type_output_d;
main->program.output.to.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d;
- if (main->program.parameters.array[iki_write_parameter_help_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
main->setting.flag |= iki_write_main_flag_help_e;
return;
}
- if (main->program.parameters.array[iki_write_parameter_version_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
main->setting.flag |= iki_write_main_flag_version_e;
return;
}
- if (main->program.parameters.array[iki_write_parameter_copyright_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
main->setting.flag |= iki_write_main_flag_copyright_e;
return;
* Errors (with error bit) from: f_file_stream_open().
* Errors (with error bit) from: f_string_dynamics_resize().
* Errors (with error bit) from: fll_program_parameter_process_context().
- * Errors (with error bit) from: fll_program_parameter_process_verbosity().
+ * Errors (with error bit) from: fll_program_parameter_process_verbosity_standard().
*
* @see f_console_parameter_process()
* @see f_file_stream_open()
* @see f_string_dynamics_resize()
* @see fll_program_parameter_process_context()
- * @see fll_program_parameter_process_verbosity()
+ * @see fll_program_parameter_process_verbosity_standard()
*/
#ifndef _di_iki_write_setting_load_
extern void iki_write_setting_load(const f_console_arguments_t arguments, iki_write_main_t * const main);
*/
#ifndef _di_iki_write_parameter_e_
enum {
- iki_write_parameter_help_e,
- iki_write_parameter_copyright_e,
- iki_write_parameter_light_e,
- iki_write_parameter_dark_e,
- iki_write_parameter_no_color_e,
- iki_write_parameter_verbosity_quiet_e,
- iki_write_parameter_verbosity_error_e,
- iki_write_parameter_verbosity_normal_e,
- iki_write_parameter_verbosity_verbose_e,
- iki_write_parameter_verbosity_debug_e,
- iki_write_parameter_version_e,
- iki_write_parameter_line_first_no_e,
- iki_write_parameter_line_last_no_e,
-
- iki_write_parameter_backtick_e,
+ iki_write_parameter_backtick_e = f_console_standard_parameter_last_e,
iki_write_parameter_content_e,
iki_write_parameter_double_e,
iki_write_parameter_file_e,
"f_string_dynamics_resize",
"f_thread_create",
"fll_iki_content_escape",
- "fll_program_parameter_process_context",
- "fll_program_parameter_process_verbosity",
+ "fll_program_parameter_process_context_standard",
+ "fll_program_parameter_process_verbosity_standard",
};
#endif // _di_iki_write_f_a_
iki_write_f_f_string_dynamics_resize_e,
iki_write_f_f_thread_create_e,
iki_write_f_fll_iki_content_escape_e,
- iki_write_f_fll_program_parameter_process_context_e,
- iki_write_f_fll_program_parameter_process_verbosity_e,
+ iki_write_f_fll_program_parameter_process_context_standard_e,
+ iki_write_f_fll_program_parameter_process_verbosity_standard_e,
}; // enum
#endif // _di_iki_write_f_e_
main->setting.state.step_small = status_code_allocation_small_d;
// Identify and process first/last parameters.
- if (main->program.parameters.array[status_code_parameter_line_first_no_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
main->setting.flag -= main->setting.flag & status_code_main_flag_print_first_e;
}
else {
main->setting.flag |= status_code_main_flag_print_first_e;
}
- if (main->program.parameters.array[status_code_parameter_line_last_no_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
main->setting.flag -= main->setting.flag & status_code_main_flag_print_last_e;
}
else {
return;
}
- {
- f_uint16s_t choices = f_uint16s_t_initialize;
+ main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
- // Identify and prioritize "color context" parameters.
- {
- uint16_t choices_array[3] = { status_code_parameter_no_color_e, status_code_parameter_light_e, status_code_parameter_dark_e };
- choices.array = choices_array;
- choices.used = 3;
-
- static const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
-
- main->setting.state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
-
- if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & status_code_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);
- }
-
- status_code_print_error(&main->program.error, macro_status_code_f(fll_program_parameter_process_context));
-
- return;
- }
+ if (F_status_is_error(main->setting.state.status)) {
+ if ((main->setting.flag & status_code_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);
}
- // Identify and prioritize "verbosity" parameters.
- {
- uint16_t choices_array[5] = { status_code_parameter_verbosity_quiet_e, status_code_parameter_verbosity_error_e, status_code_parameter_verbosity_verbose_e, status_code_parameter_verbosity_debug_e, status_code_parameter_verbosity_normal_e };
- choices.array = choices_array;
- choices.used = 5;
+ status_code_print_error(&main->program.error, macro_status_code_f(fll_program_parameter_process_context_standard));
- static const uint8_t verbosity[5] = { f_console_verbosity_quiet_e, f_console_verbosity_error_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, f_console_verbosity_normal_e };
+ return;
+ }
- main->setting.state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
+ main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
- if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & status_code_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);
- }
+ if (F_status_is_error(main->setting.state.status)) {
+ if ((main->setting.flag & status_code_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);
+ }
- status_code_print_error(&main->program.error, macro_status_code_f(fll_program_parameter_process_verbosity));
+ status_code_print_error(&main->program.error, macro_status_code_f(fll_program_parameter_process_verbosity_standard));
- return;
- }
- }
+ return;
+ }
- if (main->program.parameters.array[status_code_parameter_help_e].result & f_console_result_found_e) {
- main->setting.flag |= status_code_main_flag_help_e;
+ if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
+ main->setting.flag |= status_code_main_flag_help_e;
- return;
- }
+ return;
+ }
- if (main->program.parameters.array[status_code_parameter_version_e].result & f_console_result_found_e) {
- main->setting.flag |= status_code_main_flag_version_e;
+ if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
+ main->setting.flag |= status_code_main_flag_version_e;
- return;
- }
+ return;
+ }
- if (main->program.parameters.array[status_code_parameter_copyright_e].result & f_console_result_found_e) {
- main->setting.flag |= status_code_main_flag_copyright_e;
+ if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
+ main->setting.flag |= status_code_main_flag_copyright_e;
- return;
- }
+ return;
}
if (main->program.parameters.array[status_code_parameter_error_e].result & f_console_result_found_e) {
*/
#ifndef _di_status_code_parameter_e_
enum {
- status_code_parameter_help_e,
- status_code_parameter_copyright_e,
- status_code_parameter_light_e,
- status_code_parameter_dark_e,
- status_code_parameter_no_color_e,
- status_code_parameter_verbosity_quiet_e,
- status_code_parameter_verbosity_error_e,
- status_code_parameter_verbosity_normal_e,
- status_code_parameter_verbosity_verbose_e,
- status_code_parameter_verbosity_debug_e,
- status_code_parameter_version_e,
- status_code_parameter_line_first_no_e,
- status_code_parameter_line_last_no_e,
-
- status_code_parameter_fine_e,
+ status_code_parameter_fine_e = f_console_standard_parameter_last_e,
status_code_parameter_warning_e,
status_code_parameter_error_e,
status_code_parameter_number_e,
const f_string_t status_code_f_a[] = {
"f_console_parameter_process",
"f_thread_create",
- "fll_program_parameter_process_context",
- "fll_program_parameter_process_verbosity",
+ "fll_program_parameter_process_context_standard",
+ "fll_program_parameter_process_verbosity_standard",
"status_string_from",
"status_string_to",
};
enum {
status_code_f_f_console_parameter_process_e,
status_code_f_f_thread_create_e,
- status_code_f_fll_program_parameter_process_context_e,
- status_code_f_fll_program_parameter_process_verbosity_e,
+ status_code_f_fll_program_parameter_process_context_standard_e,
+ status_code_f_fll_program_parameter_process_verbosity_standard_e,
status_code_f_status_string_from_e,
status_code_f_status_string_to_e,
}; // enum
main->setting.state.step_small = utf8_allocation_small_d;
// Identify and process first/last parameters.
- if (main->program.parameters.array[utf8_parameter_line_first_no_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
main->setting.flag -= main->setting.flag & utf8_main_flag_print_first_e;
}
else {
main->setting.flag |= utf8_main_flag_print_first_e;
}
- if (main->program.parameters.array[utf8_parameter_line_last_no_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
main->setting.flag -= main->setting.flag & utf8_main_flag_print_last_e;
}
else {
return;
}
- {
- f_number_unsigned_t choice = 0;
- f_uint16s_t choices = f_uint16s_t_initialize;
-
- // Identify and prioritize "color context" parameters.
- {
- uint16_t choices_array[3] = { utf8_parameter_no_color_e, utf8_parameter_light_e, utf8_parameter_dark_e };
- choices.array = choices_array;
- choices.used = 3;
+ main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
- static const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
+ if (F_status_is_error(main->setting.state.status)) {
+ if ((main->setting.flag & utf8_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);
+ }
- main->setting.state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
+ utf8_print_error(&main->program.error, macro_utf8_f(fll_program_parameter_process_context_standard));
- if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & utf8_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;
+ }
- utf8_print_error(&main->program.error, macro_utf8_f(fll_program_parameter_process_context));
+ main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
- return;
- }
+ if (F_status_is_error(main->setting.state.status)) {
+ if ((main->setting.flag & utf8_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);
}
- // Identify and prioritize "verbosity" parameters.
- {
- uint16_t choices_array[5] = { utf8_parameter_verbosity_quiet_e, utf8_parameter_verbosity_error_e, utf8_parameter_verbosity_verbose_e, utf8_parameter_verbosity_debug_e, utf8_parameter_verbosity_normal_e };
- choices.array = choices_array;
- choices.used = 5;
-
- static const uint8_t verbosity[5] = { f_console_verbosity_quiet_e, f_console_verbosity_error_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, f_console_verbosity_normal_e };
+ utf8_print_error(&main->program.error, macro_utf8_f(fll_program_parameter_process_verbosity_standard));
- main->setting.state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
-
- if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & utf8_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);
- }
-
- utf8_print_error(&main->program.error, macro_utf8_f(fll_program_parameter_process_verbosity));
+ return;
+ }
- return;
- }
- }
+ {
+ f_number_unsigned_t choice = 0;
+ f_uint16s_t choices = f_uint16s_t_initialize;
// Identify and prioritize "from" mode parameters.
{
}
}
- if (main->program.parameters.array[utf8_parameter_help_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
main->setting.flag |= utf8_main_flag_help_e;
return;
}
- if (main->program.parameters.array[utf8_parameter_version_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
main->setting.flag |= utf8_main_flag_version_e;
return;
}
- if (main->program.parameters.array[utf8_parameter_copyright_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
main->setting.flag |= utf8_main_flag_copyright_e;
return;
*/
#ifndef _di_utf8_parameter_e_
enum {
- utf8_parameter_help_e,
- utf8_parameter_copyright_e,
- utf8_parameter_light_e,
- utf8_parameter_dark_e,
- utf8_parameter_no_color_e,
- utf8_parameter_verbosity_quiet_e,
- utf8_parameter_verbosity_error_e,
- utf8_parameter_verbosity_normal_e,
- utf8_parameter_verbosity_verbose_e,
- utf8_parameter_verbosity_debug_e,
- utf8_parameter_version_e,
- utf8_parameter_line_first_no_e,
- utf8_parameter_line_last_no_e,
-
- utf8_parameter_from_bytesequence_e,
+ utf8_parameter_from_bytesequence_e = f_console_standard_parameter_last_e,
utf8_parameter_from_codepoint_e,
utf8_parameter_from_file_e,
"f_string_dynamic_append_nulless",
"f_string_dynamics_increase_by",
"f_thread_create",
- "fll_program_parameter_process_context",
- "fll_program_parameter_process_verbosity",
+ "fll_program_parameter_process_context_standard",
+ "fll_program_parameter_process_verbosity_standard",
"utf8_detect_codepoint",
"utf8_process_file_bytesequence",
"utf8_process_file_codepoint",
utf8_f_f_string_dynamic_append_nulless_e,
utf8_f_f_string_dynamics_increase_by_e,
utf8_f_f_thread_create_e,
- utf8_f_fll_program_parameter_process_context_e,
- utf8_f_fll_program_parameter_process_verbosity_e,
+ utf8_f_fll_program_parameter_process_context_standard_e,
+ utf8_f_fll_program_parameter_process_verbosity_standard_e,
utf8_f_utf8_detect_codepoint_e,
utf8_f_utf8_process_file_bytesequence_e,
utf8_f_utf8_process_file_codepoint_e,