From: Kevin Day Date: Sun, 17 Jul 2022 03:09:09 +0000 (-0500) Subject: Update: Add support for +E/++error, change '+q' to '+Q', and fix some past tense... X-Git-Tag: 0.6.0~51 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=b0fbaa9ea1034f2ef0291f07291690b8dc3a1ced;p=fll Update: Add support for +E/++error, change '+q' to '+Q', and fix some past tense words. Selecting a quiet mode that still prints errors is very helpful in embedded fakefiles inside of controller rules. I noticed that almost all of the verbosity related parameters are upper case except for the "quiet" parameter. Change the "quiet" parameter from "+q" to "+Q". I noticed some words in the past tense. The goal is to use present tense. Using past tense a habit I hope to get out of when programming. --- diff --git a/level_0/f_console/c/console/common.c b/level_0/f_console/c/console/common.c index 91fda25..ea6a9e1 100644 --- a/level_0/f_console/c/console/common.c +++ b/level_0/f_console/c/console/common.c @@ -5,29 +5,31 @@ extern "C" { #endif #ifndef _di_f_console_standard_s_ - const f_string_static_t f_console_standard_short_dark_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_short_dark_s, 0, F_console_standard_short_dark_s_length); - const f_string_static_t f_console_standard_short_debug_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_short_debug_s, 0, F_console_standard_short_debug_s_length); - const f_string_static_t f_console_standard_short_help_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_short_help_s, 0, F_console_standard_short_help_s_length); - const f_string_static_t f_console_standard_short_light_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_short_light_s, 0, F_console_standard_short_light_s_length); - const f_string_static_t f_console_standard_short_no_color_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_short_no_color_s, 0, F_console_standard_short_no_color_s_length); - const f_string_static_t f_console_standard_short_normal_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_short_normal_s, 0, F_console_standard_short_normal_s_length); - const f_string_static_t f_console_standard_short_quiet_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_short_quiet_s, 0, F_console_standard_short_quiet_s_length); - const f_string_static_t f_console_standard_short_status_in_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_short_status_in_s, 0, F_console_standard_short_status_in_s_length); - const f_string_static_t f_console_standard_short_status_out_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_short_status_out_s, 0, F_console_standard_short_status_out_s_length); - const f_string_static_t f_console_standard_short_verbose_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_short_verbose_s, 0, F_console_standard_short_verbose_s_length); - const f_string_static_t f_console_standard_short_version_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_short_version_s, 0, F_console_standard_short_version_s_length); - - const f_string_static_t f_console_standard_long_dark_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_long_dark_s, 0, F_console_standard_long_dark_s_length); - const f_string_static_t f_console_standard_long_debug_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_long_debug_s, 0, F_console_standard_long_debug_s_length); - const f_string_static_t f_console_standard_long_help_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_long_help_s, 0, F_console_standard_long_help_s_length); - const f_string_static_t f_console_standard_long_light_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_long_light_s, 0, F_console_standard_long_light_s_length); - const f_string_static_t f_console_standard_long_no_color_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_long_no_color_s, 0, F_console_standard_long_no_color_s_length); - const f_string_static_t f_console_standard_long_normal_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_long_normal_s, 0, F_console_standard_long_normal_s_length); - const f_string_static_t f_console_standard_long_quiet_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_long_quiet_s, 0, F_console_standard_long_quiet_s_length); - const f_string_static_t f_console_standard_long_status_in_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_long_status_in_s, 0, F_console_standard_long_status_in_s_length); - const f_string_static_t f_console_standard_long_status_out_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_long_status_out_s, 0, F_console_standard_long_status_out_s_length); - const f_string_static_t f_console_standard_long_verbose_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_long_verbose_s, 0, F_console_standard_long_verbose_s_length); - const f_string_static_t f_console_standard_long_version_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_long_version_s, 0, F_console_standard_long_version_s_length); + const f_string_static_t f_console_standard_short_dark_s = macro_f_string_static_t_initialize((f_string_t) F_console_standard_short_dark_s, 0, F_console_standard_short_dark_s_length); + const f_string_static_t f_console_standard_short_debug_s = macro_f_string_static_t_initialize((f_string_t) F_console_standard_short_debug_s, 0, F_console_standard_short_debug_s_length); + const f_string_static_t f_console_standard_short_error_s = macro_f_string_static_t_initialize((f_string_t) F_console_standard_short_error_s, 0, F_console_standard_short_error_s_length); + const f_string_static_t f_console_standard_short_help_s = macro_f_string_static_t_initialize((f_string_t) F_console_standard_short_help_s, 0, F_console_standard_short_help_s_length); + const f_string_static_t f_console_standard_short_light_s = macro_f_string_static_t_initialize((f_string_t) F_console_standard_short_light_s, 0, F_console_standard_short_light_s_length); + const f_string_static_t f_console_standard_short_no_color_s = macro_f_string_static_t_initialize((f_string_t) F_console_standard_short_no_color_s, 0, F_console_standard_short_no_color_s_length); + const f_string_static_t f_console_standard_short_normal_s = macro_f_string_static_t_initialize((f_string_t) F_console_standard_short_normal_s, 0, F_console_standard_short_normal_s_length); + const f_string_static_t f_console_standard_short_quiet_s = macro_f_string_static_t_initialize((f_string_t) F_console_standard_short_quiet_s, 0, F_console_standard_short_quiet_s_length); + const f_string_static_t f_console_standard_short_status_in_s = macro_f_string_static_t_initialize((f_string_t) F_console_standard_short_status_in_s, 0, F_console_standard_short_status_in_s_length); + const f_string_static_t f_console_standard_short_status_out_s = macro_f_string_static_t_initialize((f_string_t) F_console_standard_short_status_out_s, 0, F_console_standard_short_status_out_s_length); + const f_string_static_t f_console_standard_short_verbose_s = macro_f_string_static_t_initialize((f_string_t) F_console_standard_short_verbose_s, 0, F_console_standard_short_verbose_s_length); + const f_string_static_t f_console_standard_short_version_s = macro_f_string_static_t_initialize((f_string_t) F_console_standard_short_version_s, 0, F_console_standard_short_version_s_length); + + const f_string_static_t f_console_standard_long_dark_s = macro_f_string_static_t_initialize((f_string_t) F_console_standard_long_dark_s, 0, F_console_standard_long_dark_s_length); + const f_string_static_t f_console_standard_long_debug_s = macro_f_string_static_t_initialize((f_string_t) F_console_standard_long_debug_s, 0, F_console_standard_long_debug_s_length); + const f_string_static_t f_console_standard_long_error_s = macro_f_string_static_t_initialize((f_string_t) F_console_standard_long_error_s, 0, F_console_standard_long_error_s_length); + const f_string_static_t f_console_standard_long_help_s = macro_f_string_static_t_initialize((f_string_t) F_console_standard_long_help_s, 0, F_console_standard_long_help_s_length); + const f_string_static_t f_console_standard_long_light_s = macro_f_string_static_t_initialize((f_string_t) F_console_standard_long_light_s, 0, F_console_standard_long_light_s_length); + const f_string_static_t f_console_standard_long_no_color_s = macro_f_string_static_t_initialize((f_string_t) F_console_standard_long_no_color_s, 0, F_console_standard_long_no_color_s_length); + const f_string_static_t f_console_standard_long_normal_s = macro_f_string_static_t_initialize((f_string_t) F_console_standard_long_normal_s, 0, F_console_standard_long_normal_s_length); + const f_string_static_t f_console_standard_long_quiet_s = macro_f_string_static_t_initialize((f_string_t) F_console_standard_long_quiet_s, 0, F_console_standard_long_quiet_s_length); + const f_string_static_t f_console_standard_long_status_in_s = macro_f_string_static_t_initialize((f_string_t) F_console_standard_long_status_in_s, 0, F_console_standard_long_status_in_s_length); + const f_string_static_t f_console_standard_long_status_out_s = macro_f_string_static_t_initialize((f_string_t) F_console_standard_long_status_out_s, 0, F_console_standard_long_status_out_s_length); + const f_string_static_t f_console_standard_long_verbose_s = macro_f_string_static_t_initialize((f_string_t) F_console_standard_long_verbose_s, 0, F_console_standard_long_verbose_s_length); + const f_string_static_t f_console_standard_long_version_s = macro_f_string_static_t_initialize((f_string_t) F_console_standard_long_version_s, 0, F_console_standard_long_version_s_length); #endif // _di_f_console_standard_s_ #ifndef _di_f_console_symbol_s_ diff --git a/level_0/f_console/c/console/common.h b/level_0/f_console/c/console/common.h index 83c9955..c7100d8 100644 --- a/level_0/f_console/c/console/common.h +++ b/level_0/f_console/c/console/common.h @@ -86,6 +86,7 @@ extern "C" { * * The following options are subjective in interpretation of the verbosity but are expected to be follow the general interpretation: * - debug: Enable debugging, which will likely increase output verbosity. + * - error: Similar to quiet, except that error messages are printed (this is less verbose than "normal"). * - normal: Use normal printing (don't use debug/quiet/verbose). * - quiet: Decrease verbosity, print less, in some use cases this could mean printing nothing. * - verbose: Increase verbosity, print more, in some use cases this could mean printing just about everything. @@ -109,11 +110,12 @@ extern "C" { #ifndef _di_f_console_standard_s_ #define F_console_standard_short_dark_s "d" #define F_console_standard_short_debug_s "D" + #define F_console_standard_short_error_s "E" #define F_console_standard_short_help_s "h" #define F_console_standard_short_light_s "l" #define F_console_standard_short_no_color_s "n" #define F_console_standard_short_normal_s "N" - #define F_console_standard_short_quiet_s "q" + #define F_console_standard_short_quiet_s "Q" #define F_console_standard_short_status_in_s "s" #define F_console_standard_short_status_out_s "S" #define F_console_standard_short_verbose_s "V" @@ -121,6 +123,7 @@ extern "C" { #define F_console_standard_short_dark_s_length 1 #define F_console_standard_short_debug_s_length 1 + #define F_console_standard_short_error_s_length 1 #define F_console_standard_short_help_s_length 1 #define F_console_standard_short_light_s_length 1 #define F_console_standard_short_no_color_s_length 1 @@ -133,6 +136,7 @@ extern "C" { #define F_console_standard_long_dark_s "dark" #define F_console_standard_long_debug_s "debug" + #define F_console_standard_long_error_s "error" #define F_console_standard_long_help_s "help" #define F_console_standard_long_light_s "light" #define F_console_standard_long_no_color_s "no_color" @@ -145,6 +149,7 @@ extern "C" { #define F_console_standard_long_dark_s_length 4 #define F_console_standard_long_debug_s_length 5 + #define F_console_standard_long_error_s_length 5 #define F_console_standard_long_help_s_length 4 #define F_console_standard_long_light_s_length 5 #define F_console_standard_long_no_color_s_length 8 @@ -157,6 +162,7 @@ extern "C" { extern const f_string_static_t f_console_standard_short_dark_s; extern const f_string_static_t f_console_standard_short_debug_s; + extern const f_string_static_t f_console_standard_short_error_s; extern const f_string_static_t f_console_standard_short_help_s; extern const f_string_static_t f_console_standard_short_light_s; extern const f_string_static_t f_console_standard_short_no_color_s; @@ -169,6 +175,7 @@ extern "C" { extern const f_string_static_t f_console_standard_long_dark_s; extern const f_string_static_t f_console_standard_long_debug_s; + extern const f_string_static_t f_console_standard_long_error_s; extern const f_string_static_t f_console_standard_long_help_s; extern const f_string_static_t f_console_standard_long_light_s; extern const f_string_static_t f_console_standard_long_no_color_s; @@ -228,6 +235,7 @@ extern "C" { * * f_console_verbosity_*: * - quiet: Verbosity is set to quiet. + * - error: Verbosity is set to error. * - normal: Verbosity is set to normal. * - verbose: Verbosity is set to verbose. * - debug: Verbosity is set to debug. @@ -235,6 +243,7 @@ extern "C" { #ifndef _di_f_console_verbosity_ enum { f_console_verbosity_quiet_e = 1, + f_console_verbosity_error_e, f_console_verbosity_normal_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, diff --git a/level_3/byte_dump/c/byte_dump.c b/level_3/byte_dump/c/byte_dump.c index d7f9257..d67a8d5 100644 --- a/level_3/byte_dump/c/byte_dump.c +++ b/level_3/byte_dump/c/byte_dump.c @@ -18,6 +18,7 @@ extern "C" { fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not print using color."); fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, silencing most output."); + fll_program_print_help_option(file, context, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, using only error output."); fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal."); fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, significantly increasing verbosity beyond normal output."); @@ -114,9 +115,9 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { byte_dump_parameter_verbosity_quiet_e, byte_dump_parameter_verbosity_normal_e, byte_dump_parameter_verbosity_verbose_e, byte_dump_parameter_verbosity_debug_e }; + f_console_parameter_id_t ids[5] = { 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 }; f_console_parameter_id_t choice = 0; - const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); + const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 5); status = f_console_parameter_prioritize_right(main->parameters, choices, &choice); @@ -131,6 +132,11 @@ extern "C" { main->error.verbosity = f_console_verbosity_quiet_e; main->warning.verbosity = f_console_verbosity_quiet_e; } + else if (choice == byte_dump_parameter_verbosity_error_e) { + main->output.verbosity = f_console_verbosity_error_e; + main->error.verbosity = f_console_verbosity_error_e; + main->warning.verbosity = f_console_verbosity_error_e; + } else if (choice == byte_dump_parameter_verbosity_normal_e) { main->output.verbosity = f_console_verbosity_normal_e; main->error.verbosity = f_console_verbosity_normal_e; diff --git a/level_3/byte_dump/c/common.h b/level_3/byte_dump/c/common.h index cb323f9..f3125d3 100644 --- a/level_3/byte_dump/c/common.h +++ b/level_3/byte_dump/c/common.h @@ -278,6 +278,7 @@ extern "C" { 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, @@ -311,6 +312,7 @@ extern "C" { macro_f_console_parameter_t_initialize(f_console_standard_short_dark_s.string, f_console_standard_long_dark_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_no_color_s.string, f_console_standard_long_no_color_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_quiet_s.string, f_console_standard_long_quiet_s.string, 0, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize(f_console_standard_short_error_s.string, f_console_standard_long_error_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_normal_s.string, f_console_standard_long_normal_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \ @@ -333,7 +335,7 @@ extern "C" { macro_f_console_parameter_t_initialize(0, byte_dump_long_classic_s.string, 0, 0, f_console_type_normal_e), \ } - #define byte_dump_total_parameters_d 25 + #define byte_dump_total_parameters_d 26 #endif // _di_byte_dump_parameters_ #ifdef __cplusplus diff --git a/level_3/control/c/common.h b/level_3/control/c/common.h index fb12d5b..f50c8dd 100644 --- a/level_3/control/c/common.h +++ b/level_3/control/c/common.h @@ -99,6 +99,7 @@ extern "C" { control_parameter_dark_e, control_parameter_no_color_e, control_parameter_verbosity_quiet_e, + control_parameter_verbosity_error_e, control_parameter_verbosity_normal_e, control_parameter_verbosity_verbose_e, control_parameter_verbosity_debug_e, @@ -117,6 +118,7 @@ extern "C" { macro_f_console_parameter_t_initialize(f_console_standard_short_dark_s.string, f_console_standard_long_dark_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_no_color_s.string, f_console_standard_long_no_color_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_quiet_s.string, f_console_standard_long_quiet_s.string, 0, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize(f_console_standard_short_error_s.string, f_console_standard_long_error_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_normal_s.string, f_console_standard_long_normal_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \ @@ -127,7 +129,7 @@ extern "C" { macro_f_console_parameter_t_initialize(control_short_socket_s.string, control_long_socket_s.string, 0, 1, f_console_type_normal_e), \ } - #define control_total_parameters_d 13 + #define control_total_parameters_d 14 #endif // _di_control_parameters_ /** diff --git a/level_3/control/c/control.c b/level_3/control/c/control.c index 330b2b6..4958d1c 100644 --- a/level_3/control/c/control.c +++ b/level_3/control/c/control.c @@ -94,18 +94,28 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { control_parameter_verbosity_quiet_e, control_parameter_verbosity_normal_e, control_parameter_verbosity_verbose_e, control_parameter_verbosity_debug_e }; + f_console_parameter_id_t ids[5] = { control_parameter_verbosity_quiet_e, control_parameter_verbosity_error_e, control_parameter_verbosity_normal_e, control_parameter_verbosity_verbose_e, control_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; - const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); + const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 5); status = f_console_parameter_prioritize_right(main->parameters, choices, &choice); - if (F_status_is_error(status)) return status; + + if (F_status_is_error(status)) { + fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true); + + return status; + } if (choice == control_parameter_verbosity_quiet_e) { main->output.verbosity = f_console_verbosity_quiet_e; main->error.verbosity = f_console_verbosity_quiet_e; main->warning.verbosity = f_console_verbosity_quiet_e; } + else if (choice == control_parameter_verbosity_error_e) { + main->output.verbosity = f_console_verbosity_error_e; + main->error.verbosity = f_console_verbosity_error_e; + main->warning.verbosity = f_console_verbosity_error_e; + } else if (choice == control_parameter_verbosity_normal_e) { main->output.verbosity = f_console_verbosity_normal_e; main->error.verbosity = f_console_verbosity_normal_e; diff --git a/level_3/controller/c/common.h b/level_3/controller/c/common.h index f436b54..2ea2b85 100644 --- a/level_3/controller/c/common.h +++ b/level_3/controller/c/common.h @@ -121,6 +121,7 @@ extern "C" { 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, @@ -145,6 +146,7 @@ extern "C" { macro_f_console_parameter_t_initialize(f_console_standard_short_dark_s.string, f_console_standard_long_dark_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_no_color_s.string, f_console_standard_long_no_color_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_quiet_s.string, f_console_standard_long_quiet_s.string, 0, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize(f_console_standard_short_error_s.string, f_console_standard_long_error_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_normal_s.string, f_console_standard_long_normal_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \ @@ -161,7 +163,7 @@ extern "C" { macro_f_console_parameter_t_initialize(controller_short_validate_s.string, controller_long_validate_s.string, 0, 0, f_console_type_normal_e), \ } - #define controller_total_parameters_d 19 + #define controller_total_parameters_d 20 #endif // _di_controller_parameters_ /** diff --git a/level_3/controller/c/controller.c b/level_3/controller/c/controller.c index bb422a4..7d63ac7 100644 --- a/level_3/controller/c/controller.c +++ b/level_3/controller/c/controller.c @@ -122,18 +122,28 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { controller_parameter_verbosity_quiet_e, controller_parameter_verbosity_normal_e, controller_parameter_verbosity_verbose_e, controller_parameter_verbosity_debug_e }; + f_console_parameter_id_t ids[5] = { 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 }; f_console_parameter_id_t choice = 0; - const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); + const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 5); status = f_console_parameter_prioritize_right(main->parameters, choices, &choice); - if (F_status_is_error(status)) return status; + + if (F_status_is_error(status)) { + fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true); + + return status; + } if (choice == controller_parameter_verbosity_quiet_e) { main->output.verbosity = f_console_verbosity_quiet_e; main->error.verbosity = f_console_verbosity_quiet_e; main->warning.verbosity = f_console_verbosity_quiet_e; } + else if (choice == controller_parameter_verbosity_error_e) { + main->output.verbosity = f_console_verbosity_error_e; + main->error.verbosity = f_console_verbosity_error_e; + main->warning.verbosity = f_console_verbosity_error_e; + } else if (choice == controller_parameter_verbosity_normal_e) { main->output.verbosity = f_console_verbosity_normal_e; main->error.verbosity = f_console_verbosity_normal_e; diff --git a/level_3/controller/c/entry/private-entry.c b/level_3/controller/c/entry/private-entry.c index a440cc9..65a6342 100644 --- a/level_3/controller/c/entry/private-entry.c +++ b/level_3/controller/c/entry/private-entry.c @@ -879,7 +879,7 @@ extern "C" { } if (global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e || global->main->error.verbosity == f_console_verbosity_verbose_e || global->main->error.verbosity == f_console_verbosity_debug_e) { - if (global->main->error.verbosity != f_console_verbosity_quiet_e) { + if (global->main->error.verbosity != f_console_verbosity_quiet_e && global->main->error.verbosity != f_console_verbosity_error_e) { controller_lock_print(global->main->output.to, global->thread); fl_print_format("%rProcessing %r%r item '", global->main->output.to.stream, f_string_eol_s, failsafe ? controller_entry_print_failsafe_s : f_string_empty_s, is_entry ? controller_entry_s : controller_exit_s); @@ -944,43 +944,45 @@ extern "C" { if (entry_action->code & controller_entry_rule_code_require_d) { output = &global->main->error; } - else { + else if (global->main->error.verbosity != f_console_verbosity_error_e) { output = &global->main->warning; } - controller_lock_print(output->to, global->thread); + if (output) { + controller_lock_print(output->to, global->thread); - fl_print_format("%r%[%QThe %r item action '%]", output->to.stream, f_string_eol_s, output->context, output->prefix, is_entry ? controller_entry_s : controller_exit_s, output->context); - fl_print_format("%[%Q%]", output->to.stream, output->notable, cache->action.name_action, output->notable); + fl_print_format("%r%[%QThe %r item action '%]", output->to.stream, f_string_eol_s, output->context, output->prefix, is_entry ? controller_entry_s : controller_exit_s, output->context); + fl_print_format("%[%Q%]", output->to.stream, output->notable, cache->action.name_action, output->notable); - if (entry_action->parameters.used) { - fl_print_format(" %[", output->to.stream, global->main->context.set.notable); + if (entry_action->parameters.used) { + fl_print_format(" %[", output->to.stream, global->main->context.set.notable); - controller_entry_action_parameters_print(output->to.stream, *entry_action); + controller_entry_action_parameters_print(output->to.stream, *entry_action); - fl_print_format("%]", output->to.stream, global->main->context.set.notable); - } + fl_print_format("%]", output->to.stream, global->main->context.set.notable); + } - if (entry_action->code & controller_entry_rule_code_require_d) { - fl_print_format("%[' is%] %[required%]", output->to.stream, output->context, output->context, output->notable, output->notable); - } - else { - fl_print_format("%[' is%] %[optional%]", output->to.stream, output->context, output->context, output->notable, output->notable); - } + if (entry_action->code & controller_entry_rule_code_require_d) { + fl_print_format("%[' is%] %[required%]", output->to.stream, output->context, output->context, output->notable, output->notable); + } + else { + fl_print_format("%[' is%] %[optional%]", output->to.stream, output->context, output->context, output->notable, output->notable); + } - fl_print_format(" %[and is in a%] %[failed%]", output->to.stream, output->context, output->context, output->notable, output->notable); + fl_print_format(" %[and is in a%] %[failed%]", output->to.stream, output->context, output->context, output->notable, output->notable); - if (entry_action->code & controller_entry_rule_code_require_d) { - fl_print_format(" %[state, aborting.%]%r", output->to.stream, output->context, output->context, f_string_eol_s); - } - else { - fl_print_format(" %[state, skipping.%]%r", output->to.stream, output->context, output->context, f_string_eol_s); - } + if (entry_action->code & controller_entry_rule_code_require_d) { + fl_print_format(" %[state, aborting.%]%r", output->to.stream, output->context, output->context, f_string_eol_s); + } + else { + fl_print_format(" %[state, skipping.%]%r", output->to.stream, output->context, output->context, f_string_eol_s); + } - controller_entry_print_error_cache(is_entry, *output, cache->action); + controller_entry_print_error_cache(is_entry, *output, cache->action); - controller_unlock_print_flush(output->to, global->thread); + controller_unlock_print_flush(output->to, global->thread); + } } if (controller_entry_action_type_is_rule(entry_action->type) && entry_action->code & controller_entry_rule_code_require_d) { @@ -994,7 +996,7 @@ extern "C" { if (entry_action->type == controller_entry_action_type_ready_e) { if ((entry_action->code & controller_entry_rule_code_wait_d) || global->setting->ready == controller_setting_ready_wait_e) { if (global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e || global->main->error.verbosity == f_console_verbosity_verbose_e || global->main->error.verbosity == f_console_verbosity_debug_e || entry->show == controller_entry_show_init_e) { - if (global->main->output.verbosity != f_console_verbosity_quiet_e) { + if (global->main->output.verbosity != f_console_verbosity_quiet_e && global->main->error.verbosity != f_console_verbosity_error_e) { controller_lock_print(global->main->output.to, global->thread); fl_print_format("%rWaiting before processing %r item action '", global->main->output.to.stream, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s); @@ -1013,7 +1015,7 @@ extern "C" { if (global->setting->ready == controller_setting_ready_yes_e) { if (global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e || global->main->error.verbosity == f_console_verbosity_verbose_e || global->main->error.verbosity == f_console_verbosity_debug_e) { - if (global->main->output.verbosity != f_console_verbosity_quiet_e) { + if (global->main->output.verbosity != f_console_verbosity_quiet_e && global->main->error.verbosity != f_console_verbosity_error_e) { controller_lock_print(global->main->output.to, global->thread); fl_print_format("%rIgnoring %r item action '", global->main->output.to.stream, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s); @@ -1026,7 +1028,7 @@ extern "C" { } else { if (!failsafe && (global->main->error.verbosity == f_console_verbosity_verbose_e || entry->show == controller_entry_show_init_e) && global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_none_e) { - if (global->main->error.verbosity != f_console_verbosity_quiet_e) { + if (global->main->error.verbosity != f_console_verbosity_quiet_e && global->main->error.verbosity != f_console_verbosity_error_e) { fl_print_format("%rState is now '%[%r%]'.%r", global->main->output.to.stream, f_string_eol_s, global->main->context.set.notable, controller_ready_s, global->main->context.set.notable, f_string_eol_s); } } @@ -1086,7 +1088,7 @@ extern "C" { } if (global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e || global->main->error.verbosity == f_console_verbosity_verbose_e || global->main->error.verbosity == f_console_verbosity_debug_e) { - if (global->main->output.verbosity != f_console_verbosity_quiet_e) { + if (global->main->output.verbosity != f_console_verbosity_quiet_e && global->main->error.verbosity != f_console_verbosity_error_e) { controller_lock_print(global->main->output.to, global->thread); fl_print_format("%rProcessing %r item '", global->main->output.to.stream, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s); @@ -1142,7 +1144,7 @@ extern "C" { f_thread_unlock(&global->thread->lock.rule); if (global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e || global->main->error.verbosity == f_console_verbosity_verbose_e || global->main->error.verbosity == f_console_verbosity_debug_e || (entry->show == controller_entry_show_init_e && entry_action->type != controller_entry_action_type_consider_e)) { - if (global->main->output.verbosity != f_console_verbosity_quiet_e) { + if (global->main->output.verbosity != f_console_verbosity_quiet_e && global->main->error.verbosity != f_console_verbosity_error_e) { controller_lock_print(global->main->output.to, global->thread); fl_print_format("%r%r %r item rule ", global->main->output.to.stream, f_string_eol_s, entry_action->type == controller_entry_action_type_consider_e ? controller_entry_print_considering_s : controller_entry_print_processing_s, is_entry ? controller_entry_s : controller_exit_s); @@ -1292,7 +1294,7 @@ extern "C" { } else if (entry_action->type == controller_entry_action_type_execute_e) { if (global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e || global->main->error.verbosity == f_console_verbosity_verbose_e || global->main->error.verbosity == f_console_verbosity_debug_e || entry->show == controller_entry_show_init_e) { - if (global->main->output.verbosity != f_console_verbosity_quiet_e) { + if (global->main->output.verbosity != f_console_verbosity_quiet_e && global->main->error.verbosity != f_console_verbosity_error_e) { controller_lock_print(global->main->output.to, global->thread); fl_print_format("%r%Q is executing '", global->main->output.to.stream, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s); @@ -1484,7 +1486,7 @@ extern "C" { } } - if ((global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e && global->main->error.verbosity != f_console_verbosity_quiet_e) || global->main->error.verbosity == f_console_verbosity_verbose_e) { + if ((global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e && global->main->error.verbosity != f_console_verbosity_quiet_e) && global->main->error.verbosity != f_console_verbosity_error_e || global->main->error.verbosity == f_console_verbosity_verbose_e) { controller_lock_print(global->main->output.to, global->thread); fl_print_format("%rDone processing %r item '", global->main->output.to.stream, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s); @@ -1760,7 +1762,7 @@ extern "C" { fl_print_format("%r%[%QThe required %r item '%]", global.main->error.to.stream, f_string_eol_s, global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context); fl_print_format("%[%r%]", global.main->error.to.stream, global.main->error.notable, controller_main_s, global.main->error.notable); - fl_print_format("%[' was not found.%]%r", global.main->error.to.stream, global.main->error.context, global.main->error.context, f_string_eol_s); + fl_print_format("%[' is not found.%]%r", global.main->error.to.stream, global.main->error.context, global.main->error.context, f_string_eol_s); controller_unlock_print_flush(global.main->error.to, global.thread); } diff --git a/level_3/controller/c/rule/private-rule.c b/level_3/controller/c/rule/private-rule.c index 001668f..82e6041 100644 --- a/level_3/controller/c/rule/private-rule.c +++ b/level_3/controller/c/rule/private-rule.c @@ -1746,7 +1746,7 @@ extern "C" { } if (options & controller_process_option_simulate_d) { - if (main->error.verbosity != f_console_verbosity_quiet_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e && main->error.verbosity != f_console_verbosity_error_e) { controller_lock_print(main->error.to, thread); fl_print_format("%rSimulating execution of '%[", main->error.to.stream, f_string_eol_s, main->context.set.title); @@ -2799,7 +2799,7 @@ extern "C" { if (i == 0) { controller_lock_print(global.main->error.to, global.thread); - controller_rule_item_print_error_need_want_wish(global.main->error, strings[i], dynamics[i]->array[j], "was not found"); + controller_rule_item_print_error_need_want_wish(global.main->error, strings[i], dynamics[i]->array[j], "is not found"); controller_rule_print_error_cache(global.main->error, process->cache.action, F_true); controller_unlock_print_flush(global.main->error.to, global.thread); @@ -2818,7 +2818,7 @@ extern "C" { if (global.main->warning.verbosity == f_console_verbosity_debug_e) { controller_lock_print(global.main->warning.to, global.thread); - controller_rule_item_print_error_need_want_wish(global.main->warning, strings[i], dynamics[i]->array[j], "was not found"); + controller_rule_item_print_error_need_want_wish(global.main->warning, strings[i], dynamics[i]->array[j], "is not found"); controller_rule_print_error_cache(global.main->warning, process->cache.action, F_true); @@ -4502,7 +4502,7 @@ extern "C" { if (type == rule->limits.array[j].type) { if (global.main->error.verbosity != f_console_verbosity_quiet_e) { - // get the current line number within the settings item. + // Get the current line number within the settings item. cache->action.line_item = line_item; f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item); diff --git a/level_3/fake/c/common.h b/level_3/fake/c/common.h index dffac95..9d5c971 100644 --- a/level_3/fake/c/common.h +++ b/level_3/fake/c/common.h @@ -386,6 +386,7 @@ extern "C" { 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, @@ -422,6 +423,7 @@ extern "C" { macro_f_console_parameter_t_initialize(f_console_standard_short_dark_s.string, f_console_standard_long_dark_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_no_color_s.string, f_console_standard_long_no_color_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_quiet_s.string, f_console_standard_long_quiet_s.string, 0, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize(f_console_standard_short_error_s.string, f_console_standard_long_error_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_normal_s.string, f_console_standard_long_normal_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \ @@ -447,7 +449,7 @@ extern "C" { macro_f_console_parameter_t_initialize(0, 0, fake_other_operation_skeleton_s.string, 0, f_console_type_other_e), \ } - #define fake_total_parameters_d 28 + #define fake_total_parameters_d 29 #endif // _di_fake_parameters_ #ifdef __cplusplus diff --git a/level_3/fake/c/fake.c b/level_3/fake/c/fake.c index 9734e83..a1223c9 100644 --- a/level_3/fake/c/fake.c +++ b/level_3/fake/c/fake.c @@ -25,6 +25,7 @@ extern "C" { fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not print using color."); fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, silencing most output."); + fll_program_print_help_option(file, context, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, using only error output."); fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal."); fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, significantly increasing verbosity beyond normal output."); @@ -127,9 +128,9 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { fake_parameter_verbosity_quiet_e, fake_parameter_verbosity_normal_e, fake_parameter_verbosity_verbose_e, fake_parameter_verbosity_debug_e }; + f_console_parameter_id_t ids[5] = { 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 }; f_console_parameter_id_t choice = 0; - const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); + const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 5); status = f_console_parameter_prioritize_right(main->parameters, choices, &choice); @@ -144,6 +145,11 @@ extern "C" { main->error.verbosity = f_console_verbosity_quiet_e; main->warning.verbosity = f_console_verbosity_quiet_e; } + else if (choice == fake_parameter_verbosity_error_e) { + main->output.verbosity = f_console_verbosity_error_e; + main->error.verbosity = f_console_verbosity_error_e; + main->warning.verbosity = f_console_verbosity_error_e; + } else if (choice == fake_parameter_verbosity_normal_e) { main->output.verbosity = f_console_verbosity_normal_e; main->error.verbosity = f_console_verbosity_normal_e; @@ -451,7 +457,7 @@ extern "C" { } } - if (main->error.verbosity != f_console_verbosity_quiet_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e && main->error.verbosity != f_console_verbosity_error_e) { if (F_status_is_error_not(status) && status != F_child) { fll_print_format("%rAll operations complete.%r%r", main->output.to.stream, f_string_eol_s, f_string_eol_s, f_string_eol_s); } diff --git a/level_3/fake/c/private-build-library.c b/level_3/fake/c/private-build-library.c index 2561874..7b0a7a6 100644 --- a/level_3/fake/c/private-build-library.c +++ b/level_3/fake/c/private-build-library.c @@ -24,7 +24,7 @@ extern "C" { if (F_status_is_error(*status) || f_file_exists(file_stage, F_true) == F_true || *status == F_child) return data->main->child; if (!data_build->setting.build_sources_library.used && !data_build->setting.build_sources_library_shared.used) return 0; - if (data->main->output.verbosity != f_console_verbosity_quiet_e) { + if (data->main->output.verbosity != f_console_verbosity_quiet_e && data->main->output.verbosity != f_console_verbosity_error_e) { fll_print_format("%r%[Compiling shared library.%]%r", data->main->output.to.stream, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s); } @@ -446,7 +446,7 @@ extern "C" { if (F_status_is_error(*status) || f_file_exists(file_stage, F_true) == F_true || *status == F_child) return data->main->child; if (!data_build->setting.build_sources_library.used && !data_build->setting.build_sources_library_static.used) return 0; - if (data->main->output.verbosity != f_console_verbosity_quiet_e) { + if (data->main->output.verbosity != f_console_verbosity_quiet_e && data->main->output.verbosity != f_console_verbosity_error_e) { fll_print_format("%r%[Compiling static library.%]%r", data->main->output.to.stream, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s); } diff --git a/level_3/fake/c/private-build-object.c b/level_3/fake/c/private-build-object.c index b3e75da..465f1ee 100644 --- a/level_3/fake/c/private-build-object.c +++ b/level_3/fake/c/private-build-object.c @@ -25,7 +25,7 @@ extern "C" { if (F_status_is_error(*status) || f_file_exists(file_stage, F_true) == F_true || *status == F_child) return data->main->child; if (!data_build->setting.build_sources_object.used && !data_build->setting.build_sources_object_shared.used) return 0; - if (data->main->output.verbosity != f_console_verbosity_quiet_e) { + if (data->main->output.verbosity != f_console_verbosity_quiet_e && data->main->output.verbosity != f_console_verbosity_error_e) { fll_print_format("%r%[Compiling shared object.%]%r", data->main->output.to.stream, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s); } @@ -96,7 +96,7 @@ extern "C" { if (F_status_is_error(*status) || f_file_exists(file_stage, F_true) == F_true || *status == F_child) return data->main->child; if (!data_build->setting.build_sources_object.used && !data_build->setting.build_sources_object_static.used) return 0; - if (data->main->output.verbosity != f_console_verbosity_quiet_e) { + if (data->main->output.verbosity != f_console_verbosity_quiet_e && data->main->output.verbosity != f_console_verbosity_error_e) { fll_print_format("%r%[Compiling static object.%]%r", data->main->output.to.stream, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s); } diff --git a/level_3/fake/c/private-build-objects.c b/level_3/fake/c/private-build-objects.c index 283751a..29e50c1 100644 --- a/level_3/fake/c/private-build-objects.c +++ b/level_3/fake/c/private-build-objects.c @@ -14,7 +14,7 @@ extern "C" { if (F_status_is_error(*status) || f_file_exists(file_stage, F_true) == F_true || *status == F_child) return data->main->child; if (!data_build->setting.build_sources_library.used) return 0; - if (data->main->output.verbosity != f_console_verbosity_quiet_e) { + if (data->main->output.verbosity != f_console_verbosity_quiet_e && data->main->output.verbosity != f_console_verbosity_error_e) { fll_print_format("%r%[Compiling objects for static library.%]%r", data->main->output.to.stream, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s); } diff --git a/level_3/fake/c/private-build-program.c b/level_3/fake/c/private-build-program.c index 60e2168..4f81738 100644 --- a/level_3/fake/c/private-build-program.c +++ b/level_3/fake/c/private-build-program.c @@ -25,7 +25,7 @@ extern "C" { if (F_status_is_error(*status) || f_file_exists(file_stage, F_true) == F_true || *status == F_child) return data->main->child; if (!data_build->setting.build_sources_program.used && !data_build->setting.build_sources_program_shared.used) return 0; - if (data->main->output.verbosity != f_console_verbosity_quiet_e) { + if (data->main->output.verbosity != f_console_verbosity_quiet_e && data->main->output.verbosity != f_console_verbosity_error_e) { fll_print_format("%r%[Compiling shared program.%]%r", data->main->output.to.stream, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s); } @@ -119,7 +119,7 @@ extern "C" { if (F_status_is_error(*status) || f_file_exists(file_stage, F_true) == F_true || *status == F_child) return data->main->child; if (!data_build->setting.build_sources_program.used && !data_build->setting.build_sources_program_static.used) return 0; - if (data->main->output.verbosity != f_console_verbosity_quiet_e) { + if (data->main->output.verbosity != f_console_verbosity_quiet_e && data->main->output.verbosity != f_console_verbosity_error_e) { fll_print_format("%r%[Compiling static program.%]%r", data->main->output.to.stream, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s); } diff --git a/level_3/fake/c/private-build-skeleton.c b/level_3/fake/c/private-build-skeleton.c index 40d09d2..bb2f62e 100644 --- a/level_3/fake/c/private-build-skeleton.c +++ b/level_3/fake/c/private-build-skeleton.c @@ -50,7 +50,7 @@ extern "C" { &path_headers, }; - if (data->main->output.verbosity != f_console_verbosity_quiet_e) { + if (data->main->output.verbosity != f_console_verbosity_quiet_e && data->main->output.verbosity != f_console_verbosity_error_e) { fll_print_format("%r%[Creating base build directories.%]%r", data->main->output.to.stream, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s); } diff --git a/level_3/fake/c/private-build.c b/level_3/fake/c/private-build.c index 4ec07e7..6b02a86 100644 --- a/level_3/fake/c/private-build.c +++ b/level_3/fake/c/private-build.c @@ -361,7 +361,7 @@ extern "C" { f_string_dynamic_t destination_directory = f_string_dynamic_t_initialize; f_string_static_t buffer = f_string_static_t_initialize; - if (data->main->output.verbosity != f_console_verbosity_quiet_e) { + if (data->main->output.verbosity != f_console_verbosity_quiet_e && data->main->output.verbosity != f_console_verbosity_error_e) { fll_print_format("%r%[Copying %Q.%]%r", data->main->output.to.stream, f_string_eol_s, data->main->context.set.important, label, data->main->context.set.important, f_string_eol_s); } @@ -597,6 +597,9 @@ extern "C" { if (data->main->context.mode == f_console_verbosity_quiet_e) { memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_quiet_s.string, sizeof(f_char_t) * f_console_standard_short_quiet_s.used); } + else if (data->main->context.mode == f_console_verbosity_error_e) { + memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_error_s.string, sizeof(f_char_t) * f_console_standard_short_error_s.used); + } else if (data->main->context.mode == f_console_verbosity_verbose_e) { memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_verbose_s.string, sizeof(f_char_t) * f_console_standard_short_verbose_s.used); } @@ -831,7 +834,7 @@ extern "C" { fake_build_load_setting(data, build_arguments, &data_build.setting, &status); if (F_status_is_fine(status)) { - if (data->main->output.verbosity != f_console_verbosity_quiet_e) { + if (data->main->output.verbosity != f_console_verbosity_quiet_e && data->main->output.verbosity != f_console_verbosity_error_e) { flockfile(data->main->output.to.stream); fl_print_format("%r%[Building%] ", data->main->output.to.stream, f_string_eol_s, data->main->context.set.important, data->main->context.set.important); diff --git a/level_3/fake/c/private-clean.c b/level_3/fake/c/private-clean.c index af70c72..dad819b 100644 --- a/level_3/fake/c/private-clean.c +++ b/level_3/fake/c/private-clean.c @@ -9,7 +9,7 @@ extern "C" { #ifndef _di_fake_clean_operate_ f_status_t fake_clean_operate(fake_data_t * const data) { - if (data->main->output.verbosity != f_console_verbosity_quiet_e) { + if (data->main->output.verbosity != f_console_verbosity_quiet_e && data->main->output.verbosity != f_console_verbosity_error_e) { flockfile(data->main->output.to.stream); fl_print_format("%r%[Deleting all files within build directory '%]", data->main->output.to.stream, f_string_eol_s, data->main->context.set.important, data->main->context.set.important); diff --git a/level_3/fake/c/private-make-load_parameters.c b/level_3/fake/c/private-make-load_parameters.c index 3b62910..16d3e8d 100644 --- a/level_3/fake/c/private-make-load_parameters.c +++ b/level_3/fake/c/private-make-load_parameters.c @@ -100,6 +100,18 @@ extern "C" { *status = f_string_dynamic_append(f_console_standard_short_quiet_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); } } + else if (data_make->main->error.verbosity == f_console_verbosity_error_e) { + if (data_make->main->parameters.array[fake_parameter_verbosity_error_e].type == f_console_type_normal_e) { + *status = f_string_dynamic_append(f_console_symbol_short_enable_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); + } + else if (data_make->main->parameters.array[fake_parameter_verbosity_error_e].type == f_console_type_inverse_e) { + *status = f_string_dynamic_append(f_console_symbol_short_disable_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); + } + + if (F_status_is_error_not(*status)) { + *status = f_string_dynamic_append(f_console_standard_short_error_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); + } + } else if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { if (data_make->main->parameters.array[fake_parameter_verbosity_verbose_e].type == f_console_type_normal_e) { *status = f_string_dynamic_append(f_console_symbol_short_enable_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); diff --git a/level_3/fake/c/private-make-operate.c b/level_3/fake/c/private-make-operate.c index 4abf2ef..c74a02e 100644 --- a/level_3/fake/c/private-make-operate.c +++ b/level_3/fake/c/private-make-operate.c @@ -22,7 +22,7 @@ extern "C" { return F_status_set_error(F_interrupt); } - if (data->main->output.verbosity != f_console_verbosity_quiet_e) { + if (data->main->output.verbosity != f_console_verbosity_quiet_e && data->main->output.verbosity != f_console_verbosity_error_e) { flockfile(data->main->output.to.stream); fl_print_format("%r%[Now making using '%]", data->main->output.to.stream, f_string_eol_s, data->main->context.set.important, data->main->context.set.important); @@ -1040,7 +1040,7 @@ extern "C" { const f_fss_named_t *section = &data_make->fakefile.array[id_section]; - if (data_make->main->output.verbosity != f_console_verbosity_quiet_e) { + if (data_make->main->output.verbosity != f_console_verbosity_quiet_e && data_make->main->output.verbosity != f_console_verbosity_error_e) { flockfile(data_make->main->output.to.stream); fl_print_format("%r%[Processing Section '%]", data_make->main->output.to.stream, f_string_eol_s, data_make->main->context.set.important, data_make->main->context.set.important); diff --git a/level_3/fake/c/private-make.c b/level_3/fake/c/private-make.c index 8532f3b..081d209 100644 --- a/level_3/fake/c/private-make.c +++ b/level_3/fake/c/private-make.c @@ -64,7 +64,7 @@ extern "C" { fl_print_format("%r%[%QThe group name '%]", data->main->error.to.stream, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%Q%]", data->main->error.to.stream, data->main->error.notable, buffer, data->main->error.notable); - fl_print_format("%[' was not found.%]%r", data->main->error.to.stream, data->main->error.context, data->main->error.context, f_string_eol_s); + fl_print_format("%[' is not found.%]%r", data->main->error.to.stream, data->main->error.context, data->main->error.context, f_string_eol_s); funlockfile(data->main->error.to.stream); } @@ -157,7 +157,7 @@ extern "C" { fl_print_format("%r%[%QThe user '%]", data->main->error.to.stream, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%Q%]", data->main->error.to.stream, data->main->error.notable, buffer, data->main->error.notable); - fl_print_format("%[' was not found.%]%r", data->main->error.to.stream, data->main->error.context, data->main->error.context, f_string_eol_s); + fl_print_format("%[' is not found.%]%r", data->main->error.to.stream, data->main->error.context, data->main->error.context, f_string_eol_s); funlockfile(data->main->error.to.stream); } diff --git a/level_3/fake/c/private-skeleton.c b/level_3/fake/c/private-skeleton.c index 800fdf9..9b2844a 100644 --- a/level_3/fake/c/private-skeleton.c +++ b/level_3/fake/c/private-skeleton.c @@ -11,7 +11,7 @@ extern "C" { f_status_t status = F_none; - if (data->main->output.verbosity != f_console_verbosity_quiet_e) { + if (data->main->output.verbosity != f_console_verbosity_quiet_e && data->main->output.verbosity != f_console_verbosity_error_e) { fll_print_format("%rGenerating skeleton structure.%r", data->main->output.to.stream, f_string_eol_s, f_string_eol_s); if (data->main->output.verbosity >= f_console_verbosity_verbose_e) { diff --git a/level_3/firewall/c/common.h b/level_3/firewall/c/common.h index 9bdbc2e..92b1ded 100644 --- a/level_3/firewall/c/common.h +++ b/level_3/firewall/c/common.h @@ -352,6 +352,7 @@ extern "C" { 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, @@ -399,7 +400,7 @@ extern "C" { macro_f_console_parameter_t_initialize(0, 0, firewall_command_show_s.string, F_false, f_console_type_other_e), \ } - #define firewall_total_parameters_d 14 + #define firewall_total_parameters_d 15 #endif // _di_firewall_defines_ #ifdef __cplusplus diff --git a/level_3/firewall/c/firewall.c b/level_3/firewall/c/firewall.c index da62595..49fa48c 100644 --- a/level_3/firewall/c/firewall.c +++ b/level_3/firewall/c/firewall.c @@ -24,6 +24,7 @@ extern "C" { fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not print using color."); fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, silencing most output."); + fll_program_print_help_option(file, context, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, using only error output."); fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal."); fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, significantly increasing verbosity beyond normal output."); @@ -82,7 +83,7 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { firewall_parameter_verbosity_quiet_e, firewall_parameter_verbosity_normal_e, firewall_parameter_verbosity_verbose_e, firewall_parameter_verbosity_debug_e }; + f_console_parameter_id_t ids[5] = { 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 }; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); f_console_parameter_id_t choice = 0; @@ -94,6 +95,11 @@ extern "C" { main->error.verbosity = f_console_verbosity_quiet_e; main->warning.verbosity = f_console_verbosity_quiet_e; } + else if (choice == firewall_parameter_verbosity_error_e) { + main->output.verbosity = f_console_verbosity_error_e; + main->error.verbosity = f_console_verbosity_error_e; + main->warning.verbosity = f_console_verbosity_error_e; + } else if (choice == firewall_parameter_verbosity_normal_e) { main->output.verbosity = f_console_verbosity_normal_e; main->error.verbosity = f_console_verbosity_normal_e; diff --git a/level_3/fss_basic_list_read/c/common.h b/level_3/fss_basic_list_read/c/common.h index 76144ef..316be01 100644 --- a/level_3/fss_basic_list_read/c/common.h +++ b/level_3/fss_basic_list_read/c/common.h @@ -190,6 +190,7 @@ extern "C" { fss_basic_list_read_parameter_dark_e, fss_basic_list_read_parameter_no_color_e, fss_basic_list_read_parameter_verbosity_quiet_e, + fss_basic_list_read_parameter_verbosity_error_e, fss_basic_list_read_parameter_verbosity_normal_e, fss_basic_list_read_parameter_verbosity_verbose_e, fss_basic_list_read_parameter_verbosity_debug_e, @@ -218,6 +219,7 @@ extern "C" { macro_f_console_parameter_t_initialize(f_console_standard_short_dark_s.string, f_console_standard_long_dark_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_no_color_s.string, f_console_standard_long_no_color_s.string, 0, F_false, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_quiet_s.string, f_console_standard_long_quiet_s.string, 0, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize(f_console_standard_short_error_s.string, f_console_standard_long_error_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_normal_s.string, f_console_standard_long_normal_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \ @@ -238,7 +240,7 @@ extern "C" { macro_f_console_parameter_t_initialize(fss_basic_list_read_short_trim_s.string, fss_basic_list_read_long_trim_s.string, 0, 0, f_console_type_normal_e), \ } - #define fss_basic_list_read_total_parameters_d 23 + #define fss_basic_list_read_total_parameters_d 24 #endif // _di_fss_basic_list_read_parameters_ /** diff --git a/level_3/fss_basic_list_read/c/fss_basic_list_read.c b/level_3/fss_basic_list_read/c/fss_basic_list_read.c index 81fbb09..cb11510 100644 --- a/level_3/fss_basic_list_read/c/fss_basic_list_read.c +++ b/level_3/fss_basic_list_read/c/fss_basic_list_read.c @@ -19,6 +19,7 @@ extern "C" { fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not print using color."); fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, silencing most output."); + fll_program_print_help_option(file, context, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, using only error output."); fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal."); fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, significantly increasing verbosity beyond normal output."); @@ -153,19 +154,28 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { fss_basic_list_read_parameter_verbosity_quiet_e, fss_basic_list_read_parameter_verbosity_normal_e, fss_basic_list_read_parameter_verbosity_verbose_e, fss_basic_list_read_parameter_verbosity_debug_e }; + f_console_parameter_id_t ids[5] = { fss_basic_list_read_parameter_verbosity_quiet_e, fss_basic_list_read_parameter_verbosity_error_e, fss_basic_list_read_parameter_verbosity_normal_e, fss_basic_list_read_parameter_verbosity_verbose_e, fss_basic_list_read_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; - const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); + const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 5); status = f_console_parameter_prioritize_right(main->parameters, choices, &choice); - if (F_status_is_error(status)) return status; + if (F_status_is_error(status)) { + fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true); + + return status; + } if (choice == fss_basic_list_read_parameter_verbosity_quiet_e) { main->output.verbosity = f_console_verbosity_quiet_e; main->error.verbosity = f_console_verbosity_quiet_e; main->warning.verbosity = f_console_verbosity_quiet_e; } + else if (choice == fss_basic_list_read_parameter_verbosity_error_e) { + main->output.verbosity = f_console_verbosity_error_e; + main->error.verbosity = f_console_verbosity_error_e; + main->warning.verbosity = f_console_verbosity_error_e; + } else if (choice == fss_basic_list_read_parameter_verbosity_normal_e) { main->output.verbosity = f_console_verbosity_normal_e; main->error.verbosity = f_console_verbosity_normal_e; diff --git a/level_3/fss_basic_list_write/c/common.h b/level_3/fss_basic_list_write/c/common.h index 337afa7..3c7cd06 100644 --- a/level_3/fss_basic_list_write/c/common.h +++ b/level_3/fss_basic_list_write/c/common.h @@ -160,6 +160,7 @@ extern "C" { fss_basic_list_write_parameter_dark_e, fss_basic_list_write_parameter_no_color_e, fss_basic_list_write_parameter_verbosity_quiet_e, + fss_basic_list_write_parameter_verbosity_error_e, fss_basic_list_write_parameter_verbosity_normal_e, fss_basic_list_write_parameter_verbosity_verbose_e, fss_basic_list_write_parameter_verbosity_debug_e, @@ -183,6 +184,7 @@ extern "C" { macro_f_console_parameter_t_initialize(f_console_standard_short_dark_s.string, f_console_standard_long_dark_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_no_color_s.string, f_console_standard_long_no_color_s.string, 0, F_false, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_quiet_s.string, f_console_standard_long_quiet_s.string, 0, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize(f_console_standard_short_error_s.string, f_console_standard_long_error_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_normal_s.string, f_console_standard_long_normal_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \ @@ -198,7 +200,7 @@ extern "C" { macro_f_console_parameter_t_initialize(fss_basic_list_write_short_trim_s.string, fss_basic_list_write_long_trim_s.string, 0, 0, f_console_type_normal_e), \ } - #define fss_basic_list_write_total_parameters_d 18 + #define fss_basic_list_write_total_parameters_d 19 #endif // _di_fss_basic_list_write_parameters_ #ifdef __cplusplus diff --git a/level_3/fss_basic_list_write/c/fss_basic_list_write.c b/level_3/fss_basic_list_write/c/fss_basic_list_write.c index 07b8fb2..71b29bb 100644 --- a/level_3/fss_basic_list_write/c/fss_basic_list_write.c +++ b/level_3/fss_basic_list_write/c/fss_basic_list_write.c @@ -18,6 +18,7 @@ extern "C" { fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not print using color."); fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, silencing most output."); + fll_program_print_help_option(file, context, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, using only error output."); fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal."); fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, significantly increasing verbosity beyond normal output."); @@ -92,18 +93,28 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { fss_basic_list_write_parameter_verbosity_quiet_e, fss_basic_list_write_parameter_verbosity_normal_e, fss_basic_list_write_parameter_verbosity_verbose_e, fss_basic_list_write_parameter_verbosity_debug_e }; + f_console_parameter_id_t ids[5] = { fss_basic_list_write_parameter_verbosity_quiet_e, fss_basic_list_write_parameter_verbosity_error_e, fss_basic_list_write_parameter_verbosity_normal_e, fss_basic_list_write_parameter_verbosity_verbose_e, fss_basic_list_write_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; - const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); + const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 5); status = f_console_parameter_prioritize_right(main->parameters, choices, &choice); - if (F_status_is_error(status)) return status; + + if (F_status_is_error(status)) { + fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true); + + return status; + } if (choice == fss_basic_list_write_parameter_verbosity_quiet_e) { main->output.verbosity = f_console_verbosity_quiet_e; main->error.verbosity = f_console_verbosity_quiet_e; main->warning.verbosity = f_console_verbosity_quiet_e; } + else if (choice == fss_basic_list_write_parameter_verbosity_error_e) { + main->output.verbosity = f_console_verbosity_error_e; + main->error.verbosity = f_console_verbosity_error_e; + main->warning.verbosity = f_console_verbosity_error_e; + } else if (choice == fss_basic_list_write_parameter_verbosity_normal_e) { main->output.verbosity = f_console_verbosity_normal_e; main->error.verbosity = f_console_verbosity_normal_e; diff --git a/level_3/fss_basic_list_write/c/private-write.c b/level_3/fss_basic_list_write/c/private-write.c index 5f3537c..62ee9dd 100644 --- a/level_3/fss_basic_list_write/c/private-write.c +++ b/level_3/fss_basic_list_write/c/private-write.c @@ -9,9 +9,7 @@ extern "C" { #ifndef _di_fss_basic_list_write_error_parameter_same_times_print_ void fss_basic_list_write_error_parameter_same_times_print(fll_program_data_t * const main) { - if (main->error.verbosity == f_console_verbosity_quiet_e) { - return; - } + if (main->error.verbosity == f_console_verbosity_quiet_e) return; flockfile(main->error.to.stream); @@ -30,9 +28,7 @@ extern "C" { #ifndef _di_fss_basic_list_write_error_parameter_unsupported_eol_print_ void fss_basic_list_write_error_parameter_unsupported_eol_print(fll_program_data_t * const main) { - if (main->error.verbosity == f_console_verbosity_quiet_e) { - return; - } + if (main->error.verbosity == f_console_verbosity_quiet_e) return; flockfile(main->error.to.stream); @@ -49,9 +45,7 @@ extern "C" { #ifndef _di_fss_basic_list_write_error_parameter_value_missing_print_ void fss_basic_list_write_error_parameter_value_missing_print(fll_program_data_t * const main, const f_string_static_t symbol, const f_string_static_t parameter) { - if (main->error.verbosity == f_console_verbosity_quiet_e) { - return; - } + if (main->error.verbosity == f_console_verbosity_quiet_e) return; flockfile(main->error.to.stream); diff --git a/level_3/fss_basic_read/c/common.h b/level_3/fss_basic_read/c/common.h index 76da468..330559e 100644 --- a/level_3/fss_basic_read/c/common.h +++ b/level_3/fss_basic_read/c/common.h @@ -190,6 +190,7 @@ extern "C" { fss_basic_read_parameter_dark_e, fss_basic_read_parameter_no_color_e, fss_basic_read_parameter_verbosity_quiet_e, + fss_basic_read_parameter_verbosity_error_e, fss_basic_read_parameter_verbosity_normal_e, fss_basic_read_parameter_verbosity_verbose_e, fss_basic_read_parameter_verbosity_debug_e, @@ -218,6 +219,7 @@ extern "C" { macro_f_console_parameter_t_initialize(f_console_standard_short_dark_s.string, f_console_standard_long_dark_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_no_color_s.string, f_console_standard_long_no_color_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_quiet_s.string, f_console_standard_long_quiet_s.string, 0, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize(f_console_standard_short_error_s.string, f_console_standard_long_error_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_normal_s.string, f_console_standard_long_normal_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \ @@ -238,7 +240,7 @@ extern "C" { macro_f_console_parameter_t_initialize(fss_basic_read_short_trim_s.string, fss_basic_read_long_trim_s.string, 0, 0, f_console_type_normal_e), \ } - #define fss_basic_read_total_parameters_d 23 + #define fss_basic_read_total_parameters_d 24 #endif // _di_fss_basic_read_parameters_ /** diff --git a/level_3/fss_basic_read/c/fss_basic_read.c b/level_3/fss_basic_read/c/fss_basic_read.c index 1fdf288..23cbb19 100644 --- a/level_3/fss_basic_read/c/fss_basic_read.c +++ b/level_3/fss_basic_read/c/fss_basic_read.c @@ -19,6 +19,7 @@ extern "C" { fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not print using color."); fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, silencing most output."); + fll_program_print_help_option(file, context, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, using only error output."); fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal."); fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, significantly increasing verbosity beyond normal output."); @@ -153,18 +154,28 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { fss_basic_read_parameter_verbosity_quiet_e, fss_basic_read_parameter_verbosity_normal_e, fss_basic_read_parameter_verbosity_verbose_e, fss_basic_read_parameter_verbosity_debug_e }; + f_console_parameter_id_t ids[5] = { fss_basic_read_parameter_verbosity_quiet_e, fss_basic_read_parameter_verbosity_error_e, fss_basic_read_parameter_verbosity_normal_e, fss_basic_read_parameter_verbosity_verbose_e, fss_basic_read_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; - const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); + const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 5); status = f_console_parameter_prioritize_right(main->parameters, choices, &choice); - if (F_status_is_error(status)) return status; + + if (F_status_is_error(status)) { + fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true); + + return status; + } if (choice == fss_basic_read_parameter_verbosity_quiet_e) { main->output.verbosity = f_console_verbosity_quiet_e; main->error.verbosity = f_console_verbosity_quiet_e; main->warning.verbosity = f_console_verbosity_quiet_e; } + else if (choice == fss_basic_read_parameter_verbosity_error_e) { + main->output.verbosity = f_console_verbosity_error_e; + main->error.verbosity = f_console_verbosity_error_e; + main->warning.verbosity = f_console_verbosity_error_e; + } else if (choice == fss_basic_read_parameter_verbosity_normal_e) { main->output.verbosity = f_console_verbosity_normal_e; main->error.verbosity = f_console_verbosity_normal_e; diff --git a/level_3/fss_basic_write/c/common.h b/level_3/fss_basic_write/c/common.h index 69b4e7e..09280e9 100644 --- a/level_3/fss_basic_write/c/common.h +++ b/level_3/fss_basic_write/c/common.h @@ -160,6 +160,7 @@ extern "C" { fss_basic_write_parameter_dark_e, fss_basic_write_parameter_no_color_e, fss_basic_write_parameter_verbosity_quiet_e, + fss_basic_write_parameter_verbosity_error_e, fss_basic_write_parameter_verbosity_normal_e, fss_basic_write_parameter_verbosity_verbose_e, fss_basic_write_parameter_verbosity_debug_e, @@ -183,6 +184,7 @@ extern "C" { macro_f_console_parameter_t_initialize(f_console_standard_short_dark_s.string, f_console_standard_long_dark_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_no_color_s.string, f_console_standard_long_no_color_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_quiet_s.string, f_console_standard_long_quiet_s.string, 0, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize(f_console_standard_short_error_s.string, f_console_standard_long_error_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_normal_s.string, f_console_standard_long_normal_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \ diff --git a/level_3/fss_basic_write/c/fss_basic_write.c b/level_3/fss_basic_write/c/fss_basic_write.c index 8bd0dcb..b1d95be 100644 --- a/level_3/fss_basic_write/c/fss_basic_write.c +++ b/level_3/fss_basic_write/c/fss_basic_write.c @@ -18,6 +18,7 @@ extern "C" { fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not print using color."); fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, silencing most output."); + fll_program_print_help_option(file, context, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, using only error output."); fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal."); fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, significantly increasing verbosity beyond normal output."); @@ -92,18 +93,28 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { fss_basic_write_parameter_verbosity_quiet_e, fss_basic_write_parameter_verbosity_normal_e, fss_basic_write_parameter_verbosity_verbose_e, fss_basic_write_parameter_verbosity_debug_e }; + f_console_parameter_id_t ids[5] = { fss_basic_write_parameter_verbosity_quiet_e, fss_basic_write_parameter_verbosity_error_e, fss_basic_write_parameter_verbosity_normal_e, fss_basic_write_parameter_verbosity_verbose_e, fss_basic_write_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; - const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); + const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 5); status = f_console_parameter_prioritize_right(main->parameters, choices, &choice); - if (F_status_is_error(status)) return status; + + if (F_status_is_error(status)) { + fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true); + + return status; + } if (choice == fss_basic_write_parameter_verbosity_quiet_e) { main->output.verbosity = f_console_verbosity_quiet_e; main->error.verbosity = f_console_verbosity_quiet_e; main->warning.verbosity = f_console_verbosity_quiet_e; } + else if (choice == fss_basic_write_parameter_verbosity_error_e) { + main->output.verbosity = f_console_verbosity_error_e; + main->error.verbosity = f_console_verbosity_error_e; + main->warning.verbosity = f_console_verbosity_error_e; + } else if (choice == fss_basic_write_parameter_verbosity_normal_e) { main->output.verbosity = f_console_verbosity_normal_e; main->error.verbosity = f_console_verbosity_normal_e; @@ -485,7 +496,7 @@ extern "C" { funlockfile(main->error.to.stream); } } - else if (main->error.verbosity != f_console_verbosity_quiet_e && main->parameters.array[fss_basic_write_parameter_file_e].result == f_console_result_none_e) { + else if (main->error.verbosity != f_console_verbosity_quiet_e && main->error.verbosity != f_console_verbosity_error_e && main->parameters.array[fss_basic_write_parameter_file_e].result == f_console_result_none_e) { // Ensure there is always a newline at the end, unless in quiet mode. fll_print_dynamic_raw(f_string_eol_s, main->output.to.stream); diff --git a/level_3/fss_basic_write/c/private-write.c b/level_3/fss_basic_write/c/private-write.c index 5ef573d..9c5c7f3 100644 --- a/level_3/fss_basic_write/c/private-write.c +++ b/level_3/fss_basic_write/c/private-write.c @@ -9,9 +9,7 @@ extern "C" { #ifndef _di_fss_basic_write_error_parameter_same_times_print_ void fss_basic_write_error_parameter_same_times_print(fll_program_data_t * const main) { - if (main->error.verbosity == f_console_verbosity_quiet_e) { - return; - } + if (main->error.verbosity == f_console_verbosity_quiet_e) return; flockfile(main->error.to.stream); @@ -30,9 +28,7 @@ extern "C" { #ifndef _di_fss_basic_write_error_parameter_value_missing_print_ void fss_basic_write_error_parameter_value_missing_print(fll_program_data_t * const main, const f_string_static_t symbol, const f_string_static_t parameter) { - if (main->error.verbosity == f_console_verbosity_quiet_e) { - return; - } + if (main->error.verbosity == f_console_verbosity_quiet_e) return; flockfile(main->error.to.stream); @@ -47,9 +43,7 @@ extern "C" { #ifndef _di_fss_basic_write_error_parameter_unsupported_eol_print_ void fss_basic_write_error_parameter_unsupported_eol_print(fll_program_data_t * const main) { - if (main->error.verbosity == f_console_verbosity_quiet_e) { - return; - } + if (main->error.verbosity == f_console_verbosity_quiet_e) return; flockfile(main->error.to.stream); diff --git a/level_3/fss_embedded_list_read/c/common.h b/level_3/fss_embedded_list_read/c/common.h index 4257fbc..a6ce821 100644 --- a/level_3/fss_embedded_list_read/c/common.h +++ b/level_3/fss_embedded_list_read/c/common.h @@ -190,6 +190,7 @@ extern "C" { 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, @@ -218,6 +219,7 @@ extern "C" { macro_f_console_parameter_t_initialize(f_console_standard_short_dark_s.string, f_console_standard_long_dark_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_no_color_s.string, f_console_standard_long_no_color_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_quiet_s.string, f_console_standard_long_quiet_s.string, 0, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize(f_console_standard_short_error_s.string, f_console_standard_long_error_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_normal_s.string, f_console_standard_long_normal_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \ @@ -238,7 +240,7 @@ extern "C" { macro_f_console_parameter_t_initialize(fss_embedded_list_read_short_trim_s.string, fss_embedded_list_read_long_trim_s.string, 0, 0, f_console_type_normal_e), \ } - #define fss_embedded_list_read_total_parameters_d 23 + #define fss_embedded_list_read_total_parameters_d 24 #endif // _di_fss_embedded_list_read_parameters_ /** diff --git a/level_3/fss_embedded_list_read/c/fss_embedded_list_read.c b/level_3/fss_embedded_list_read/c/fss_embedded_list_read.c index f8abddd..a416fce 100644 --- a/level_3/fss_embedded_list_read/c/fss_embedded_list_read.c +++ b/level_3/fss_embedded_list_read/c/fss_embedded_list_read.c @@ -19,6 +19,7 @@ extern "C" { fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not print using color."); fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, silencing most output."); + fll_program_print_help_option(file, context, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, using only error output."); fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal."); fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, significantly increasing verbosity beyond normal output."); @@ -152,19 +153,28 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { fss_embedded_list_read_parameter_verbosity_quiet_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 }; + f_console_parameter_id_t ids[5] = { 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 }; f_console_parameter_id_t choice = 0; - const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); + const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 5); status = f_console_parameter_prioritize_right(main->parameters, choices, &choice); - if (F_status_is_error(status)) return status; + if (F_status_is_error(status)) { + fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true); + + return status; + } if (choice == fss_embedded_list_read_parameter_verbosity_quiet_e) { main->output.verbosity = f_console_verbosity_quiet_e; main->error.verbosity = f_console_verbosity_quiet_e; main->warning.verbosity = f_console_verbosity_quiet_e; } + else if (choice == fss_embedded_list_read_parameter_verbosity_error_e) { + main->output.verbosity = f_console_verbosity_error_e; + main->error.verbosity = f_console_verbosity_error_e; + main->warning.verbosity = f_console_verbosity_error_e; + } else if (choice == fss_embedded_list_read_parameter_verbosity_normal_e) { main->output.verbosity = f_console_verbosity_normal_e; main->error.verbosity = f_console_verbosity_normal_e; diff --git a/level_3/fss_embedded_list_write/c/common.h b/level_3/fss_embedded_list_write/c/common.h index 23e30d7..d7442c6 100644 --- a/level_3/fss_embedded_list_write/c/common.h +++ b/level_3/fss_embedded_list_write/c/common.h @@ -160,6 +160,7 @@ extern "C" { fss_embedded_list_write_parameter_dark_e, fss_embedded_list_write_parameter_no_color_e, fss_embedded_list_write_parameter_verbosity_quiet_e, + fss_embedded_list_write_parameter_verbosity_error_e, fss_embedded_list_write_parameter_verbosity_normal_e, fss_embedded_list_write_parameter_verbosity_verbose_e, fss_embedded_list_write_parameter_verbosity_debug_e, @@ -183,6 +184,7 @@ extern "C" { macro_f_console_parameter_t_initialize(f_console_standard_short_dark_s.string, f_console_standard_long_dark_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_no_color_s.string, f_console_standard_long_no_color_s.string, 0, F_false, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_quiet_s.string, f_console_standard_long_quiet_s.string, 0, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize(f_console_standard_short_error_s.string, f_console_standard_long_error_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_normal_s.string, f_console_standard_long_normal_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \ @@ -198,7 +200,7 @@ extern "C" { macro_f_console_parameter_t_initialize(fss_embedded_list_write_short_trim_s.string, fss_embedded_list_write_long_trim_s.string, 0, 0, f_console_type_normal_e), \ } - #define fss_embedded_list_write_total_parameters_d 18 + #define fss_embedded_list_write_total_parameters_d 19 #endif // _di_fss_embedded_list_write_parameters_ #ifdef __cplusplus diff --git a/level_3/fss_embedded_list_write/c/fss_embedded_list_write.c b/level_3/fss_embedded_list_write/c/fss_embedded_list_write.c index b810a18..0ecb591 100644 --- a/level_3/fss_embedded_list_write/c/fss_embedded_list_write.c +++ b/level_3/fss_embedded_list_write/c/fss_embedded_list_write.c @@ -18,6 +18,7 @@ extern "C" { fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not print using color."); fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, silencing most output."); + fll_program_print_help_option(file, context, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, using only error output."); fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal."); fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, significantly increasing verbosity beyond normal output."); @@ -95,18 +96,28 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { fss_embedded_list_write_parameter_verbosity_quiet_e, fss_embedded_list_write_parameter_verbosity_normal_e, fss_embedded_list_write_parameter_verbosity_verbose_e, fss_embedded_list_write_parameter_verbosity_debug_e }; + f_console_parameter_id_t ids[5] = { fss_embedded_list_write_parameter_verbosity_quiet_e, fss_embedded_list_write_parameter_verbosity_error_e, fss_embedded_list_write_parameter_verbosity_normal_e, fss_embedded_list_write_parameter_verbosity_verbose_e, fss_embedded_list_write_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; - const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); + const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 5); status = f_console_parameter_prioritize_right(main->parameters, choices, &choice); - if (F_status_is_error(status)) return status; + + if (F_status_is_error(status)) { + fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true); + + return status; + } if (choice == fss_embedded_list_write_parameter_verbosity_quiet_e) { main->output.verbosity = f_console_verbosity_quiet_e; main->error.verbosity = f_console_verbosity_quiet_e; main->warning.verbosity = f_console_verbosity_quiet_e; } + else if (choice == fss_embedded_list_write_parameter_verbosity_error_e) { + main->output.verbosity = f_console_verbosity_error_e; + main->error.verbosity = f_console_verbosity_error_e; + main->warning.verbosity = f_console_verbosity_error_e; + } else if (choice == fss_embedded_list_write_parameter_verbosity_normal_e) { main->output.verbosity = f_console_verbosity_normal_e; main->error.verbosity = f_console_verbosity_normal_e; @@ -498,7 +509,7 @@ extern "C" { funlockfile(main->error.to.stream); } } - else if (main->error.verbosity != f_console_verbosity_quiet_e && main->parameters.array[fss_embedded_list_write_parameter_file_e].result == f_console_result_none_e) { + else if (main->error.verbosity != f_console_verbosity_quiet_e && main->error.verbosity != f_console_verbosity_error_e && main->parameters.array[fss_embedded_list_write_parameter_file_e].result == f_console_result_none_e) { // Ensure there is always a newline at the end, unless in quiet mode. fll_print_dynamic_raw(f_string_eol_s, main->output.to.stream); diff --git a/level_3/fss_extended_list_read/c/common.h b/level_3/fss_extended_list_read/c/common.h index 8c5fddd..a38497f 100644 --- a/level_3/fss_extended_list_read/c/common.h +++ b/level_3/fss_extended_list_read/c/common.h @@ -190,6 +190,7 @@ extern "C" { fss_extended_list_read_parameter_dark_e, fss_extended_list_read_parameter_no_color_e, fss_extended_list_read_parameter_verbosity_quiet_e, + fss_extended_list_read_parameter_verbosity_error_e, fss_extended_list_read_parameter_verbosity_normal_e, fss_extended_list_read_parameter_verbosity_verbose_e, fss_extended_list_read_parameter_verbosity_debug_e, @@ -218,6 +219,7 @@ extern "C" { macro_f_console_parameter_t_initialize(f_console_standard_short_dark_s.string, f_console_standard_long_dark_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_no_color_s.string, f_console_standard_long_no_color_s.string, 0, F_false, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_quiet_s.string, f_console_standard_long_quiet_s.string, 0, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize(f_console_standard_short_error_s.string, f_console_standard_long_error_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_normal_s.string, f_console_standard_long_normal_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \ @@ -238,7 +240,7 @@ extern "C" { macro_f_console_parameter_t_initialize(fss_extended_list_read_short_trim_s.string, fss_extended_list_read_long_trim_s.string, 0, 0, f_console_type_normal_e), \ } - #define fss_extended_list_read_total_parameters_d 23 + #define fss_extended_list_read_total_parameters_d 24 #endif // _di_fss_extended_list_read_parameters_ /** diff --git a/level_3/fss_extended_list_read/c/fss_extended_list_read.c b/level_3/fss_extended_list_read/c/fss_extended_list_read.c index e813f42..2247565 100644 --- a/level_3/fss_extended_list_read/c/fss_extended_list_read.c +++ b/level_3/fss_extended_list_read/c/fss_extended_list_read.c @@ -19,6 +19,7 @@ extern "C" { fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not print using color."); fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, silencing most output."); + fll_program_print_help_option(file, context, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, using only error output."); fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal."); fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, significantly increasing verbosity beyond normal output."); @@ -153,18 +154,28 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { fss_extended_list_read_parameter_verbosity_quiet_e, fss_extended_list_read_parameter_verbosity_normal_e, fss_extended_list_read_parameter_verbosity_verbose_e, fss_extended_list_read_parameter_verbosity_debug_e }; + f_console_parameter_id_t ids[5] = { fss_extended_list_read_parameter_verbosity_quiet_e, fss_extended_list_read_parameter_verbosity_error_e, fss_extended_list_read_parameter_verbosity_normal_e, fss_extended_list_read_parameter_verbosity_verbose_e, fss_extended_list_read_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; - const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); + const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 5); status = f_console_parameter_prioritize_right(main->parameters, choices, &choice); - if (F_status_is_error(status)) return status; + + if (F_status_is_error(status)) { + fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true); + + return status; + } if (choice == fss_extended_list_read_parameter_verbosity_quiet_e) { main->output.verbosity = f_console_verbosity_quiet_e; main->error.verbosity = f_console_verbosity_quiet_e; main->warning.verbosity = f_console_verbosity_quiet_e; } + else if (choice == fss_extended_list_read_parameter_verbosity_error_e) { + main->output.verbosity = f_console_verbosity_error_e; + main->error.verbosity = f_console_verbosity_error_e; + main->warning.verbosity = f_console_verbosity_error_e; + } else if (choice == fss_extended_list_read_parameter_verbosity_normal_e) { main->output.verbosity = f_console_verbosity_normal_e; main->error.verbosity = f_console_verbosity_normal_e; diff --git a/level_3/fss_extended_list_write/c/common.h b/level_3/fss_extended_list_write/c/common.h index 5426bed..52a3dc8 100644 --- a/level_3/fss_extended_list_write/c/common.h +++ b/level_3/fss_extended_list_write/c/common.h @@ -160,6 +160,7 @@ extern "C" { fss_extended_list_write_parameter_dark_e, fss_extended_list_write_parameter_no_color_e, fss_extended_list_write_parameter_verbosity_quiet_e, + fss_extended_list_write_parameter_verbosity_error_e, fss_extended_list_write_parameter_verbosity_normal_e, fss_extended_list_write_parameter_verbosity_verbose_e, fss_extended_list_write_parameter_verbosity_debug_e, @@ -183,6 +184,7 @@ extern "C" { macro_f_console_parameter_t_initialize(f_console_standard_short_dark_s.string, f_console_standard_long_dark_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_no_color_s.string, f_console_standard_long_no_color_s.string, 0, F_false, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_quiet_s.string, f_console_standard_long_quiet_s.string, 0, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize(f_console_standard_short_error_s.string, f_console_standard_long_error_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_normal_s.string, f_console_standard_long_normal_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \ @@ -198,7 +200,7 @@ extern "C" { macro_f_console_parameter_t_initialize(fss_extended_list_write_short_trim_s.string, fss_extended_list_write_long_trim_s.string, 0, 0, f_console_type_normal_e), \ } - #define fss_extended_list_write_total_parameters_d 18 + #define fss_extended_list_write_total_parameters_d 19 #endif // _di_fss_extended_list_write_parameters_ /** diff --git a/level_3/fss_extended_list_write/c/fss_extended_list_write.c b/level_3/fss_extended_list_write/c/fss_extended_list_write.c index 46a90dd..fd90cdf 100644 --- a/level_3/fss_extended_list_write/c/fss_extended_list_write.c +++ b/level_3/fss_extended_list_write/c/fss_extended_list_write.c @@ -18,6 +18,7 @@ extern "C" { fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not print using color."); fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, silencing most output."); + fll_program_print_help_option(file, context, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, using only error output."); fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal."); fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, significantly increasing verbosity beyond normal output."); @@ -95,18 +96,28 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { fss_extended_list_write_parameter_verbosity_quiet_e, fss_extended_list_write_parameter_verbosity_normal_e, fss_extended_list_write_parameter_verbosity_verbose_e, fss_extended_list_write_parameter_verbosity_debug_e }; + f_console_parameter_id_t ids[5] = { fss_extended_list_write_parameter_verbosity_quiet_e, fss_extended_list_write_parameter_verbosity_error_e, fss_extended_list_write_parameter_verbosity_normal_e, fss_extended_list_write_parameter_verbosity_verbose_e, fss_extended_list_write_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; - const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); + const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 5); status = f_console_parameter_prioritize_right(main->parameters, choices, &choice); - if (F_status_is_error(status)) return status; + + if (F_status_is_error(status)) { + fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true); + + return status; + } if (choice == fss_extended_list_write_parameter_verbosity_quiet_e) { main->output.verbosity = f_console_verbosity_quiet_e; main->error.verbosity = f_console_verbosity_quiet_e; main->warning.verbosity = f_console_verbosity_quiet_e; } + else if (choice == fss_extended_list_write_parameter_verbosity_error_e) { + main->output.verbosity = f_console_verbosity_error_e; + main->error.verbosity = f_console_verbosity_error_e; + main->warning.verbosity = f_console_verbosity_error_e; + } else if (choice == fss_extended_list_write_parameter_verbosity_normal_e) { main->output.verbosity = f_console_verbosity_normal_e; main->error.verbosity = f_console_verbosity_normal_e; @@ -497,7 +508,7 @@ extern "C" { funlockfile(main->error.to.stream); } } - else if (main->error.verbosity != f_console_verbosity_quiet_e && main->parameters.array[fss_extended_list_write_parameter_file_e].result == f_console_result_none_e) { + else if (main->error.verbosity != f_console_verbosity_quiet_e && main->error.verbosity != f_console_verbosity_error_e && main->parameters.array[fss_extended_list_write_parameter_file_e].result == f_console_result_none_e) { // Ensure there is always a newline at the end, unless in quiet mode. fll_print_dynamic_raw(f_string_eol_s, main->output.to.stream); diff --git a/level_3/fss_extended_list_write/c/private-write.c b/level_3/fss_extended_list_write/c/private-write.c index 97b6bbe..47e754f 100644 --- a/level_3/fss_extended_list_write/c/private-write.c +++ b/level_3/fss_extended_list_write/c/private-write.c @@ -9,9 +9,7 @@ extern "C" { #ifndef _di_fss_extended_list_write_error_parameter_same_times_print_ void fss_extended_list_write_error_parameter_same_times_print(fll_program_data_t * const main) { - if (main->error.verbosity == f_console_verbosity_quiet_e) { - return; - } + if (main->error.verbosity == f_console_verbosity_quiet_e) return; flockfile(main->error.to.stream); @@ -30,9 +28,7 @@ extern "C" { #ifndef _di_fss_extended_list_write_error_parameter_unsupported_eol_print_ void fss_extended_list_write_error_parameter_unsupported_eol_print(fll_program_data_t * const main) { - if (main->error.verbosity == f_console_verbosity_quiet_e) { - return; - } + if (main->error.verbosity == f_console_verbosity_quiet_e) return; flockfile(main->error.to.stream); @@ -49,9 +45,7 @@ extern "C" { #ifndef _di_fss_extended_list_write_error_parameter_value_missing_print_ void fss_extended_list_write_error_parameter_value_missing_print(fll_program_data_t * const main, const f_string_static_t symbol, const f_string_static_t parameter) { - if (main->error.verbosity == f_console_verbosity_quiet_e) { - return; - } + if (main->error.verbosity == f_console_verbosity_quiet_e) return; flockfile(main->error.to.stream); diff --git a/level_3/fss_extended_read/c/common.h b/level_3/fss_extended_read/c/common.h index 913a39a..c5d2263 100644 --- a/level_3/fss_extended_read/c/common.h +++ b/level_3/fss_extended_read/c/common.h @@ -190,6 +190,7 @@ extern "C" { fss_extended_read_parameter_dark_e, fss_extended_read_parameter_no_color_e, fss_extended_read_parameter_verbosity_quiet_e, + fss_extended_read_parameter_verbosity_error_e, fss_extended_read_parameter_verbosity_normal_e, fss_extended_read_parameter_verbosity_verbose_e, fss_extended_read_parameter_verbosity_debug_e, @@ -218,6 +219,7 @@ extern "C" { macro_f_console_parameter_t_initialize(f_console_standard_short_dark_s.string, f_console_standard_long_dark_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_no_color_s.string, f_console_standard_long_no_color_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_quiet_s.string, f_console_standard_long_quiet_s.string, 0, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize(f_console_standard_short_error_s.string, f_console_standard_long_error_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_normal_s.string, f_console_standard_long_normal_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \ @@ -238,7 +240,7 @@ extern "C" { macro_f_console_parameter_t_initialize(fss_extended_read_short_trim_s.string, fss_extended_read_long_trim_s.string, 0, 0, f_console_type_normal_e), \ } - #define fss_extended_read_total_parameters_d 23 + #define fss_extended_read_total_parameters_d 24 #endif // _di_fss_extended_read_parameters_ /** diff --git a/level_3/fss_extended_read/c/fss_extended_read.c b/level_3/fss_extended_read/c/fss_extended_read.c index ba30941..a6773c9 100644 --- a/level_3/fss_extended_read/c/fss_extended_read.c +++ b/level_3/fss_extended_read/c/fss_extended_read.c @@ -19,6 +19,7 @@ extern "C" { fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not print using color."); fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, silencing most output."); + fll_program_print_help_option(file, context, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, using only error output."); fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal."); fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, significantly increasing verbosity beyond normal output."); @@ -153,18 +154,28 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { fss_extended_read_parameter_verbosity_quiet_e, fss_extended_read_parameter_verbosity_normal_e, fss_extended_read_parameter_verbosity_verbose_e, fss_extended_read_parameter_verbosity_debug_e }; + f_console_parameter_id_t ids[5] = { fss_extended_read_parameter_verbosity_quiet_e, fss_extended_read_parameter_verbosity_error_e, fss_extended_read_parameter_verbosity_normal_e, fss_extended_read_parameter_verbosity_verbose_e, fss_extended_read_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; - const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); + const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 5); status = f_console_parameter_prioritize_right(main->parameters, choices, &choice); - if (F_status_is_error(status)) return status; + + if (F_status_is_error(status)) { + fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true); + + return status; + } if (choice == fss_extended_read_parameter_verbosity_quiet_e) { main->output.verbosity = f_console_verbosity_quiet_e; main->error.verbosity = f_console_verbosity_quiet_e; main->warning.verbosity = f_console_verbosity_quiet_e; } + else if (choice == fss_extended_read_parameter_verbosity_error_e) { + main->output.verbosity = f_console_verbosity_error_e; + main->error.verbosity = f_console_verbosity_error_e; + main->warning.verbosity = f_console_verbosity_error_e; + } else if (choice == fss_extended_read_parameter_verbosity_normal_e) { main->output.verbosity = f_console_verbosity_normal_e; main->error.verbosity = f_console_verbosity_normal_e; diff --git a/level_3/fss_extended_write/c/common.h b/level_3/fss_extended_write/c/common.h index 269a09d..a6286f7 100644 --- a/level_3/fss_extended_write/c/common.h +++ b/level_3/fss_extended_write/c/common.h @@ -160,6 +160,7 @@ extern "C" { fss_extended_write_parameter_dark_e, fss_extended_write_parameter_no_color_e, fss_extended_write_parameter_verbosity_quiet_e, + fss_extended_write_parameter_verbosity_error_e, fss_extended_write_parameter_verbosity_normal_e, fss_extended_write_parameter_verbosity_verbose_e, fss_extended_write_parameter_verbosity_debug_e, @@ -183,6 +184,7 @@ extern "C" { macro_f_console_parameter_t_initialize(f_console_standard_short_dark_s.string, f_console_standard_long_dark_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_no_color_s.string, f_console_standard_long_no_color_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_quiet_s.string, f_console_standard_long_quiet_s.string, 0, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize(f_console_standard_short_error_s.string, f_console_standard_long_error_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_normal_s.string, f_console_standard_long_normal_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \ diff --git a/level_3/fss_extended_write/c/fss_extended_write.c b/level_3/fss_extended_write/c/fss_extended_write.c index c71bea2..f999582 100644 --- a/level_3/fss_extended_write/c/fss_extended_write.c +++ b/level_3/fss_extended_write/c/fss_extended_write.c @@ -18,6 +18,7 @@ extern "C" { fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not print using color."); fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, silencing most output."); + fll_program_print_help_option(file, context, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, using only error output."); fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal."); fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, significantly increasing verbosity beyond normal output."); @@ -92,18 +93,28 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { fss_extended_write_parameter_verbosity_quiet_e, fss_extended_write_parameter_verbosity_normal_e, fss_extended_write_parameter_verbosity_verbose_e, fss_extended_write_parameter_verbosity_debug_e }; + f_console_parameter_id_t ids[5] = { fss_extended_write_parameter_verbosity_quiet_e, fss_extended_write_parameter_verbosity_error_e, fss_extended_write_parameter_verbosity_normal_e, fss_extended_write_parameter_verbosity_verbose_e, fss_extended_write_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; - const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); + const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 5); status = f_console_parameter_prioritize_right(main->parameters, choices, &choice); - if (F_status_is_error(status)) return status; + + if (F_status_is_error(status)) { + fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true); + + return status; + } if (choice == fss_extended_write_parameter_verbosity_quiet_e) { main->output.verbosity = f_console_verbosity_quiet_e; main->error.verbosity = f_console_verbosity_quiet_e; main->warning.verbosity = f_console_verbosity_quiet_e; } + else if (choice == fss_extended_write_parameter_verbosity_error_e) { + main->output.verbosity = f_console_verbosity_error_e; + main->error.verbosity = f_console_verbosity_error_e; + main->warning.verbosity = f_console_verbosity_error_e; + } else if (choice == fss_extended_write_parameter_verbosity_normal_e) { main->output.verbosity = f_console_verbosity_normal_e; main->error.verbosity = f_console_verbosity_normal_e; @@ -552,7 +563,7 @@ extern "C" { funlockfile(main->error.to.stream); } } - else if (main->error.verbosity != f_console_verbosity_quiet_e && main->parameters.array[fss_extended_write_parameter_file_e].result == f_console_result_none_e) { + else if (main->error.verbosity != f_console_verbosity_quiet_e && main->error.verbosity != f_console_verbosity_error_e && main->parameters.array[fss_extended_write_parameter_file_e].result == f_console_result_none_e) { // Ensure there is always a newline at the end, unless in quiet mode. fll_print_dynamic_raw(f_string_eol_s, main->output.to.stream); diff --git a/level_3/fss_identify/c/common.h b/level_3/fss_identify/c/common.h index 9b30046..eb737f7 100644 --- a/level_3/fss_identify/c/common.h +++ b/level_3/fss_identify/c/common.h @@ -112,6 +112,7 @@ extern "C" { 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, @@ -131,6 +132,7 @@ extern "C" { macro_f_console_parameter_t_initialize(f_console_standard_short_dark_s.string, f_console_standard_long_dark_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_no_color_s.string, f_console_standard_long_no_color_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_quiet_s.string, f_console_standard_long_quiet_s.string, 0, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize(f_console_standard_short_error_s.string, f_console_standard_long_error_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_normal_s.string, f_console_standard_long_normal_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \ @@ -142,7 +144,7 @@ extern "C" { macro_f_console_parameter_t_initialize(fss_identify_short_total_s.string, fss_identify_long_total_s.string, 0, 0, f_console_type_normal_e), \ } - #define fss_identify_total_parameters_d 14 + #define fss_identify_total_parameters_d 15 #endif // _di_fss_identify_parameters_ #ifdef __cplusplus diff --git a/level_3/fss_identify/c/fss_identify.c b/level_3/fss_identify/c/fss_identify.c index 155954c..162c02a 100644 --- a/level_3/fss_identify/c/fss_identify.c +++ b/level_3/fss_identify/c/fss_identify.c @@ -18,6 +18,7 @@ extern "C" { fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not print using color."); fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, silencing most output."); + fll_program_print_help_option(file, context, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, using only error output."); fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal."); fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, significantly increasing verbosity beyond normal output."); @@ -100,18 +101,28 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { fss_identify_parameter_verbosity_quiet_e, fss_identify_parameter_verbosity_normal_e, fss_identify_parameter_verbosity_verbose_e, fss_identify_parameter_verbosity_debug_e }; + f_console_parameter_id_t ids[5] = { 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 }; f_console_parameter_id_t choice = 0; - const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); + const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 5); status = f_console_parameter_prioritize_right(main->parameters, choices, &choice); - if (F_status_is_error(status)) return status; + + if (F_status_is_error(status)) { + fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true); + + return status; + } if (choice == fss_identify_parameter_verbosity_quiet_e) { main->output.verbosity = f_console_verbosity_quiet_e; main->error.verbosity = f_console_verbosity_quiet_e; main->warning.verbosity = f_console_verbosity_quiet_e; } + else if (choice == fss_identify_parameter_verbosity_error_e) { + main->output.verbosity = f_console_verbosity_error_e; + main->error.verbosity = f_console_verbosity_error_e; + main->warning.verbosity = f_console_verbosity_error_e; + } else if (choice == fss_identify_parameter_verbosity_normal_e) { main->output.verbosity = f_console_verbosity_normal_e; main->error.verbosity = f_console_verbosity_normal_e; diff --git a/level_3/fss_payload_read/c/common.h b/level_3/fss_payload_read/c/common.h index bb7fcb5..4fd2811 100644 --- a/level_3/fss_payload_read/c/common.h +++ b/level_3/fss_payload_read/c/common.h @@ -184,6 +184,7 @@ extern "C" { fss_payload_read_parameter_dark_e, fss_payload_read_parameter_no_color_e, fss_payload_read_parameter_verbosity_quiet_e, + fss_payload_read_parameter_verbosity_error_e, fss_payload_read_parameter_verbosity_normal_e, fss_payload_read_parameter_verbosity_verbose_e, fss_payload_read_parameter_verbosity_debug_e, @@ -212,6 +213,7 @@ extern "C" { macro_f_console_parameter_t_initialize(f_console_standard_short_dark_s.string, f_console_standard_long_dark_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_no_color_s.string, f_console_standard_long_no_color_s.string, 0, F_false, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_quiet_s.string, f_console_standard_long_quiet_s.string, 0, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize(f_console_standard_short_error_s.string, f_console_standard_long_error_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_normal_s.string, f_console_standard_long_normal_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \ @@ -232,7 +234,7 @@ extern "C" { macro_f_console_parameter_t_initialize(fss_payload_read_short_trim_s.string, fss_payload_read_long_trim_s.string, 0, 0, f_console_type_normal_e), \ } - #define fss_payload_read_total_parameters_d 23 + #define fss_payload_read_total_parameters_d 24 #endif // _di_fss_payload_read_parameters_ /** diff --git a/level_3/fss_payload_read/c/fss_payload_read.c b/level_3/fss_payload_read/c/fss_payload_read.c index 6caf3a6..c0ffa4d 100644 --- a/level_3/fss_payload_read/c/fss_payload_read.c +++ b/level_3/fss_payload_read/c/fss_payload_read.c @@ -28,6 +28,7 @@ extern "C" { fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not print using color."); fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, silencing most output."); + fll_program_print_help_option(file, context, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, using only error output."); fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal."); fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, significantly increasing verbosity beyond normal output."); @@ -172,18 +173,28 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { fss_payload_read_parameter_verbosity_quiet_e, fss_payload_read_parameter_verbosity_normal_e, fss_payload_read_parameter_verbosity_verbose_e, fss_payload_read_parameter_verbosity_debug_e }; + f_console_parameter_id_t ids[5] = { fss_payload_read_parameter_verbosity_quiet_e, fss_payload_read_parameter_verbosity_error_e, fss_payload_read_parameter_verbosity_normal_e, fss_payload_read_parameter_verbosity_verbose_e, fss_payload_read_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; - const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); + const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 5); status = f_console_parameter_prioritize_right(main->parameters, choices, &choice); - if (F_status_is_error(status)) return status; + + if (F_status_is_error(status)) { + fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true); + + return status; + } if (choice == fss_payload_read_parameter_verbosity_quiet_e) { main->output.verbosity = f_console_verbosity_quiet_e; main->error.verbosity = f_console_verbosity_quiet_e; main->warning.verbosity = f_console_verbosity_quiet_e; } + else if (choice == fss_payload_read_parameter_verbosity_error_e) { + main->output.verbosity = f_console_verbosity_error_e; + main->error.verbosity = f_console_verbosity_error_e; + main->warning.verbosity = f_console_verbosity_error_e; + } else if (choice == fss_payload_read_parameter_verbosity_normal_e) { main->output.verbosity = f_console_verbosity_normal_e; main->error.verbosity = f_console_verbosity_normal_e; diff --git a/level_3/fss_payload_write/c/common.h b/level_3/fss_payload_write/c/common.h index 2f2c396..63cced5 100644 --- a/level_3/fss_payload_write/c/common.h +++ b/level_3/fss_payload_write/c/common.h @@ -148,6 +148,7 @@ extern "C" { fss_payload_write_parameter_dark_e, fss_payload_write_parameter_no_color_e, fss_payload_write_parameter_verbosity_quiet_e, + fss_payload_write_parameter_verbosity_error_e, fss_payload_write_parameter_verbosity_normal_e, fss_payload_write_parameter_verbosity_verbose_e, fss_payload_write_parameter_verbosity_debug_e, @@ -171,6 +172,7 @@ extern "C" { macro_f_console_parameter_t_initialize(f_console_standard_short_dark_s.string, f_console_standard_long_dark_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_no_color_s.string, f_console_standard_long_no_color_s.string, 0, F_false, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_quiet_s.string, f_console_standard_long_quiet_s.string, 0, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize(f_console_standard_short_error_s.string, f_console_standard_long_error_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_normal_s.string, f_console_standard_long_normal_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \ @@ -186,7 +188,7 @@ extern "C" { macro_f_console_parameter_t_initialize(fss_payload_write_short_trim_s.string, fss_payload_write_long_trim_s.string, 0, 0, f_console_type_normal_e), \ } - #define fss_payload_write_total_parameters_d 18 + #define fss_payload_write_total_parameters_d 19 #endif // _di_fss_payload_write_parameters_ #ifdef __cplusplus diff --git a/level_3/fss_payload_write/c/fss_payload_write.c b/level_3/fss_payload_write/c/fss_payload_write.c index 53a7bab..04701d9 100644 --- a/level_3/fss_payload_write/c/fss_payload_write.c +++ b/level_3/fss_payload_write/c/fss_payload_write.c @@ -27,6 +27,7 @@ extern "C" { fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not print using color."); fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, silencing most output."); + fll_program_print_help_option(file, context, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, using only error output."); fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal."); fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, significantly increasing verbosity beyond normal output."); @@ -101,18 +102,28 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { fss_payload_write_parameter_verbosity_quiet_e, fss_payload_write_parameter_verbosity_normal_e, fss_payload_write_parameter_verbosity_verbose_e, fss_payload_write_parameter_verbosity_debug_e }; + f_console_parameter_id_t ids[5] = { fss_payload_write_parameter_verbosity_quiet_e, fss_payload_write_parameter_verbosity_error_e, fss_payload_write_parameter_verbosity_normal_e, fss_payload_write_parameter_verbosity_verbose_e, fss_payload_write_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; - const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); + const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 5); status = f_console_parameter_prioritize_right(main->parameters, choices, &choice); - if (F_status_is_error(status)) return status; + + if (F_status_is_error(status)) { + fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true); + + return status; + } if (choice == fss_payload_write_parameter_verbosity_quiet_e) { main->output.verbosity = f_console_verbosity_quiet_e; main->error.verbosity = f_console_verbosity_quiet_e; main->warning.verbosity = f_console_verbosity_quiet_e; } + else if (choice == fss_payload_write_parameter_verbosity_error_e) { + main->output.verbosity = f_console_verbosity_error_e; + main->error.verbosity = f_console_verbosity_error_e; + main->warning.verbosity = f_console_verbosity_error_e; + } else if (choice == fss_payload_write_parameter_verbosity_normal_e) { main->output.verbosity = f_console_verbosity_normal_e; main->error.verbosity = f_console_verbosity_normal_e; @@ -496,7 +507,7 @@ extern "C" { funlockfile(main->error.to.stream); } } - else if (main->error.verbosity != f_console_verbosity_quiet_e && main->parameters.array[fss_payload_write_parameter_file_e].result == f_console_result_none_e) { + else if (main->error.verbosity != f_console_verbosity_quiet_e && main->error.verbosity != f_console_verbosity_error_e && main->parameters.array[fss_payload_write_parameter_file_e].result == f_console_result_none_e) { // Ensure there is always a newline at the end, unless in quiet mode. fll_print_dynamic_raw(f_string_eol_s, main->output.to.stream); diff --git a/level_3/fss_status_code/c/common.h b/level_3/fss_status_code/c/common.h index d44bf6f..871cb97 100644 --- a/level_3/fss_status_code/c/common.h +++ b/level_3/fss_status_code/c/common.h @@ -116,6 +116,7 @@ extern "C" { fss_status_code_parameter_dark_e, fss_status_code_parameter_no_color_e, fss_status_code_parameter_verbosity_quiet_e, + fss_status_code_parameter_verbosity_error_e, fss_status_code_parameter_verbosity_normal_e, fss_status_code_parameter_verbosity_verbose_e, fss_status_code_parameter_verbosity_debug_e, @@ -134,6 +135,7 @@ extern "C" { macro_f_console_parameter_t_initialize(f_console_standard_short_dark_s.string, f_console_standard_long_dark_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_no_color_s.string, f_console_standard_long_no_color_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_quiet_s.string, f_console_standard_long_quiet_s.string, 0, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize(f_console_standard_short_error_s.string, f_console_standard_long_error_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_normal_s.string, f_console_standard_long_normal_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \ @@ -144,7 +146,7 @@ extern "C" { macro_f_console_parameter_t_initialize(fss_status_code_short_number_s.string, fss_status_code_long_number_s.string, 0, 0, f_console_type_normal_e), \ } - #define fss_status_code_total_parameters_d 13 + #define fss_status_code_total_parameters_d 14 #endif // _di_fss_status_code_defines_ #ifdef __cplusplus diff --git a/level_3/fss_status_code/c/fss_status_code.c b/level_3/fss_status_code/c/fss_status_code.c index b980d07..a880d7a 100644 --- a/level_3/fss_status_code/c/fss_status_code.c +++ b/level_3/fss_status_code/c/fss_status_code.c @@ -18,6 +18,7 @@ extern "C" { fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not print using color."); fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, silencing most output."); + fll_program_print_help_option(file, context, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, using only error output."); fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal."); fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, significantly increasing verbosity beyond normal output."); @@ -74,18 +75,28 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { fss_status_code_parameter_verbosity_quiet_e, fss_status_code_parameter_verbosity_normal_e, fss_status_code_parameter_verbosity_verbose_e, fss_status_code_parameter_verbosity_debug_e }; + f_console_parameter_id_t ids[5] = { fss_status_code_parameter_verbosity_quiet_e, fss_status_code_parameter_verbosity_error_e, fss_status_code_parameter_verbosity_normal_e, fss_status_code_parameter_verbosity_verbose_e, fss_status_code_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; - const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); + const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 5); status = f_console_parameter_prioritize_right(main->parameters, choices, &choice); - if (F_status_is_error(status)) return status; + + if (F_status_is_error(status)) { + fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true); + + return status; + } if (choice == fss_status_code_parameter_verbosity_quiet_e) { main->output.verbosity = f_console_verbosity_quiet_e; main->error.verbosity = f_console_verbosity_quiet_e; main->warning.verbosity = f_console_verbosity_quiet_e; } + else if (choice == fss_status_code_parameter_verbosity_error_e) { + main->output.verbosity = f_console_verbosity_error_e; + main->error.verbosity = f_console_verbosity_error_e; + main->warning.verbosity = f_console_verbosity_error_e; + } else if (choice == fss_status_code_parameter_verbosity_normal_e) { main->output.verbosity = f_console_verbosity_normal_e; main->error.verbosity = f_console_verbosity_normal_e; diff --git a/level_3/iki_read/c/common.h b/level_3/iki_read/c/common.h index 686e734..5d3526c 100644 --- a/level_3/iki_read/c/common.h +++ b/level_3/iki_read/c/common.h @@ -155,6 +155,7 @@ extern "C" { 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, @@ -180,6 +181,7 @@ extern "C" { macro_f_console_parameter_t_initialize(f_console_standard_short_dark_s.string, f_console_standard_long_dark_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_no_color_s.string, f_console_standard_long_no_color_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_quiet_s.string, f_console_standard_long_quiet_s.string, 0, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize(f_console_standard_short_error_s.string, f_console_standard_long_error_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_normal_s.string, f_console_standard_long_normal_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \ @@ -197,7 +199,7 @@ extern "C" { macro_f_console_parameter_t_initialize(iki_read_short_wrap_s.string, iki_read_long_wrap_s.string, 0, 3, f_console_type_normal_e), \ } - #define iki_read_total_parameters_d 20 + #define iki_read_total_parameters_d 21 #endif // _di_iki_read_parameters_ #ifndef _di_iki_read_substitution_t_ diff --git a/level_3/iki_read/c/iki_read.c b/level_3/iki_read/c/iki_read.c index b3c7b11..3da7f43 100644 --- a/level_3/iki_read/c/iki_read.c +++ b/level_3/iki_read/c/iki_read.c @@ -18,6 +18,7 @@ extern "C" { fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not print using color."); fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, silencing most output."); + fll_program_print_help_option(file, context, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, using only error output."); fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal."); fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, significantly increasing verbosity beyond normal output."); @@ -142,9 +143,9 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { iki_read_parameter_verbosity_quiet_e, iki_read_parameter_verbosity_normal_e, iki_read_parameter_verbosity_verbose_e, iki_read_parameter_verbosity_debug_e }; + f_console_parameter_id_t ids[5] = { 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 }; f_console_parameter_id_t choice = 0; - const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); + const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 5); status = f_console_parameter_prioritize_right(main->parameters, choices, &choice); @@ -159,6 +160,11 @@ extern "C" { main->error.verbosity = f_console_verbosity_quiet_e; main->warning.verbosity = f_console_verbosity_quiet_e; } + else if (choice == iki_read_parameter_verbosity_error_e) { + main->output.verbosity = f_console_verbosity_error_e; + main->error.verbosity = f_console_verbosity_error_e; + main->warning.verbosity = f_console_verbosity_error_e; + } else if (choice == iki_read_parameter_verbosity_normal_e) { main->output.verbosity = f_console_verbosity_normal_e; main->error.verbosity = f_console_verbosity_normal_e; diff --git a/level_3/iki_write/c/common.h b/level_3/iki_write/c/common.h index f3cbccc..a8af9c5 100644 --- a/level_3/iki_write/c/common.h +++ b/level_3/iki_write/c/common.h @@ -112,6 +112,7 @@ extern "C" { 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, @@ -131,6 +132,7 @@ extern "C" { macro_f_console_parameter_t_initialize(f_console_standard_short_dark_s.string, f_console_standard_long_dark_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_no_color_s.string, f_console_standard_long_no_color_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_quiet_s.string, f_console_standard_long_quiet_s.string, 0, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize(f_console_standard_short_error_s.string, f_console_standard_long_error_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_normal_s.string, f_console_standard_long_normal_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \ @@ -142,7 +144,7 @@ extern "C" { macro_f_console_parameter_t_initialize(iki_write_short_single_s.string, iki_write_long_single_s.string, 0, 0, f_console_type_normal_e), \ } - #define iki_write_total_parameters_d 14 + #define iki_write_total_parameters_d 15 #endif // _di_iki_write_parameters_ #ifdef __cplusplus diff --git a/level_3/iki_write/c/iki_write.c b/level_3/iki_write/c/iki_write.c index 0e5ce83..24de7bf 100644 --- a/level_3/iki_write/c/iki_write.c +++ b/level_3/iki_write/c/iki_write.c @@ -18,6 +18,7 @@ extern "C" { fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not print using color."); fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, silencing most output."); + fll_program_print_help_option(file, context, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, using only error output."); fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal."); fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, significantly increasing verbosity beyond normal output."); @@ -90,19 +91,28 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { iki_write_parameter_verbosity_quiet_e, iki_write_parameter_verbosity_normal_e, iki_write_parameter_verbosity_verbose_e, iki_write_parameter_verbosity_debug_e }; + f_console_parameter_id_t ids[5] = { 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 }; f_console_parameter_id_t choice = 0; - const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); + const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 5); status = f_console_parameter_prioritize_right(main->parameters, choices, &choice); - if (F_status_is_error(status)) return status; + if (F_status_is_error(status)) { + fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true); + + return status; + } if (choice == iki_write_parameter_verbosity_quiet_e) { main->output.verbosity = f_console_verbosity_quiet_e; main->error.verbosity = f_console_verbosity_quiet_e; main->warning.verbosity = f_console_verbosity_quiet_e; } + else if (choice == iki_write_parameter_verbosity_error_e) { + main->output.verbosity = f_console_verbosity_error_e; + main->error.verbosity = f_console_verbosity_error_e; + main->warning.verbosity = f_console_verbosity_error_e; + } else if (choice == iki_write_parameter_verbosity_normal_e) { main->output.verbosity = f_console_verbosity_normal_e; main->error.verbosity = f_console_verbosity_normal_e; @@ -436,7 +446,7 @@ extern "C" { } // for // Ensure there is always a new line at the end, unless in quiet mode. - if (F_status_is_error_not(status) && main->error.verbosity != f_console_verbosity_quiet_e && main->parameters.array[iki_write_parameter_file_e].result == f_console_result_none_e) { + if (F_status_is_error_not(status) && main->error.verbosity != f_console_verbosity_quiet_e && main->error.verbosity != f_console_verbosity_error_e && main->parameters.array[iki_write_parameter_file_e].result == f_console_result_none_e) { fll_print_dynamic_raw(f_string_eol_s, file.stream); } } diff --git a/level_3/status_code/c/common.h b/level_3/status_code/c/common.h index 801c88a..5d1970e 100644 --- a/level_3/status_code/c/common.h +++ b/level_3/status_code/c/common.h @@ -116,6 +116,7 @@ extern "C" { 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, @@ -134,6 +135,7 @@ extern "C" { macro_f_console_parameter_t_initialize(f_console_standard_short_dark_s.string, f_console_standard_long_dark_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_no_color_s.string, f_console_standard_long_no_color_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_quiet_s.string, f_console_standard_long_quiet_s.string, 0, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize(f_console_standard_short_error_s.string, f_console_standard_long_error_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_normal_s.string, f_console_standard_long_normal_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \ @@ -144,7 +146,7 @@ extern "C" { macro_f_console_parameter_t_initialize(status_code_short_number_s.string, status_code_long_number_s.string, 0, 0, f_console_type_normal_e), \ } - #define status_code_total_parameters_d 13 + #define status_code_total_parameters_d 14 #endif // _di_status_code_parameters_ #ifdef __cplusplus diff --git a/level_3/status_code/c/status_code.c b/level_3/status_code/c/status_code.c index ac1ad8e..8c5ee20 100644 --- a/level_3/status_code/c/status_code.c +++ b/level_3/status_code/c/status_code.c @@ -18,6 +18,7 @@ extern "C" { fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not print using color."); fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, silencing most output."); + fll_program_print_help_option(file, context, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, using only error output."); fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal."); fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, significantly increasing verbosity beyond normal output."); @@ -74,18 +75,28 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { status_code_parameter_verbosity_quiet_e, status_code_parameter_verbosity_normal_e, status_code_parameter_verbosity_verbose_e, status_code_parameter_verbosity_debug_e }; + f_console_parameter_id_t ids[5] = { 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 }; f_console_parameter_id_t choice = 0; - const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); + const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 5); status = f_console_parameter_prioritize_right(main->parameters, choices, &choice); - if (F_status_is_error(status)) return status; + + if (F_status_is_error(status)) { + fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true); + + return status; + } if (choice == status_code_parameter_verbosity_quiet_e) { main->output.verbosity = f_console_verbosity_quiet_e; main->error.verbosity = f_console_verbosity_quiet_e; main->warning.verbosity = f_console_verbosity_quiet_e; } + else if (choice == status_code_parameter_verbosity_error_e) { + main->output.verbosity = f_console_verbosity_error_e; + main->error.verbosity = f_console_verbosity_error_e; + main->warning.verbosity = f_console_verbosity_error_e; + } else if (choice == status_code_parameter_verbosity_normal_e) { main->output.verbosity = f_console_verbosity_normal_e; main->error.verbosity = f_console_verbosity_normal_e; diff --git a/level_3/utf8/c/common.h b/level_3/utf8/c/common.h index ffe4a8c..224c4ca 100644 --- a/level_3/utf8/c/common.h +++ b/level_3/utf8/c/common.h @@ -243,6 +243,7 @@ extern "C" { 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, @@ -272,6 +273,7 @@ extern "C" { macro_f_console_parameter_t_initialize(f_console_standard_short_dark_s.string, f_console_standard_long_dark_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_no_color_s.string, f_console_standard_long_no_color_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_quiet_s.string, f_console_standard_long_quiet_s.string, 0, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize(f_console_standard_short_error_s.string, f_console_standard_long_error_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_normal_s.string, f_console_standard_long_normal_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \ macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \ @@ -290,7 +292,7 @@ extern "C" { macro_f_console_parameter_t_initialize(utf8_short_verify_s.string, utf8_long_verify_s.string, 0, 0, f_console_type_normal_e), \ } - #define utf8_total_parameters_d 21 + #define utf8_total_parameters_d 22 #endif // _di_utf8_parameters_ /** diff --git a/level_3/utf8/c/utf8.c b/level_3/utf8/c/utf8.c index 0855b57..7606f1e 100644 --- a/level_3/utf8/c/utf8.c +++ b/level_3/utf8/c/utf8.c @@ -21,6 +21,7 @@ extern "C" { fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not print using color."); fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, silencing most output."); + fll_program_print_help_option(file, context, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, using only error output."); fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal."); fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, significantly increasing verbosity beyond normal output."); @@ -112,9 +113,9 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { utf8_parameter_verbosity_quiet_e, utf8_parameter_verbosity_normal_e, utf8_parameter_verbosity_verbose_e, utf8_parameter_verbosity_debug_e }; + f_console_parameter_id_t ids[5] = { 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 }; f_console_parameter_id_t choice = 0; - const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); + const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 5); status = f_console_parameter_prioritize_right(main->parameters, choices, &choice); @@ -131,6 +132,11 @@ extern "C" { main->error.verbosity = f_console_verbosity_quiet_e; main->warning.verbosity = f_console_verbosity_quiet_e; } + else if (choice == utf8_parameter_verbosity_error_e) { + main->output.verbosity = f_console_verbosity_error_e; + main->error.verbosity = f_console_verbosity_error_e; + main->warning.verbosity = f_console_verbosity_error_e; + } else if (choice == utf8_parameter_verbosity_normal_e) { main->output.verbosity = f_console_verbosity_normal_e; main->error.verbosity = f_console_verbosity_normal_e; @@ -182,9 +188,9 @@ extern "C" { // Identify and prioritize to mode parameters. { - f_console_parameter_id_t ids[4] = { utf8_parameter_to_bytesequence_e, utf8_parameter_to_codepoint_e, utf8_parameter_to_combining_e, utf8_parameter_to_width_e }; + f_console_parameter_id_t ids[5] = { utf8_parameter_to_bytesequence_e, utf8_parameter_to_codepoint_e, utf8_parameter_to_combining_e, utf8_parameter_to_width_e }; f_console_parameter_id_t choice = 0; - const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); + const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 5); status = f_console_parameter_prioritize_right(main->parameters, choices, &choice); @@ -196,6 +202,32 @@ extern "C" { return status; } + if (choice == utf8_parameter_verbosity_quiet_e) { + main->output.verbosity = f_console_verbosity_quiet_e; + main->error.verbosity = f_console_verbosity_quiet_e; + main->warning.verbosity = f_console_verbosity_quiet_e; + } + else if (choice == utf8_parameter_verbosity_error_e) { + main->output.verbosity = f_console_verbosity_error_e; + main->error.verbosity = f_console_verbosity_error_e; + main->warning.verbosity = f_console_verbosity_error_e; + } + else if (choice == utf8_parameter_verbosity_normal_e) { + main->output.verbosity = f_console_verbosity_normal_e; + main->error.verbosity = f_console_verbosity_normal_e; + main->warning.verbosity = f_console_verbosity_normal_e; + } + else if (choice == utf8_parameter_verbosity_verbose_e) { + main->output.verbosity = f_console_verbosity_verbose_e; + main->error.verbosity = f_console_verbosity_verbose_e; + main->warning.verbosity = f_console_verbosity_verbose_e; + } + else if (choice == utf8_parameter_verbosity_debug_e) { + main->output.verbosity = f_console_verbosity_debug_e; + main->error.verbosity = f_console_verbosity_debug_e; + main->warning.verbosity = f_console_verbosity_debug_e; + } + if (choice == utf8_parameter_to_bytesequence_e) { if (data.mode & utf8_mode_to_codepoint_d) { data.mode -= utf8_mode_to_codepoint_d;