From ae792f295da78d64fdb736b975268a8009a6646b Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Mon, 16 Jan 2023 22:26:24 -0600 Subject: [PATCH] Progress: Continue program related work. Focused on Featureless Make. Other changes made as convenient. --- level_3/byte_dump/c/common.h | 35 ++-- level_3/byte_dump/c/print.c | 24 +-- level_3/byte_dump/c/print.h | 2 +- level_3/control/c/common.h | 10 +- level_3/control/c/print.c | 24 +-- level_3/control/c/print.h | 2 +- level_3/controller/c/common.h | 22 +-- level_3/controller/c/print.c | 24 +-- level_3/controller/c/print.h | 2 +- level_3/fake/c/main/common-print.c | 26 +++ level_3/fake/c/main/common-print.h | 61 +++++++ level_3/fake/c/{ => main}/common.c | 6 +- level_3/fake/c/{ => main}/common.h | 44 ++--- level_3/fake/c/{ => main}/fake.c | 183 +++++++-------------- level_3/fake/c/{ => main}/fake.h | 26 +-- level_3/fake/c/{ => main}/main.c | 0 level_3/fake/c/{ => main}/main.h | 0 level_3/fake/c/{ => main}/print.c | 124 ++++++++++++-- level_3/fake/c/{ => main}/print.h | 106 +++++++++++- level_3/fake/c/{ => main}/private-build-library.c | 16 +- level_3/fake/c/{ => main}/private-build-library.h | 0 level_3/fake/c/{ => main}/private-build-load.c | 60 +++---- level_3/fake/c/{ => main}/private-build-load.h | 0 level_3/fake/c/{ => main}/private-build-object.c | 8 +- level_3/fake/c/{ => main}/private-build-object.h | 0 level_3/fake/c/{ => main}/private-build-objects.c | 14 +- level_3/fake/c/{ => main}/private-build-objects.h | 0 level_3/fake/c/{ => main}/private-build-program.c | 8 +- level_3/fake/c/{ => main}/private-build-program.h | 0 level_3/fake/c/{ => main}/private-build-skeleton.c | 6 +- level_3/fake/c/{ => main}/private-build-skeleton.h | 0 level_3/fake/c/{ => main}/private-build.c | 90 +++++----- level_3/fake/c/{ => main}/private-build.h | 0 level_3/fake/c/{ => main}/private-clean.c | 16 +- level_3/fake/c/{ => main}/private-clean.h | 0 level_3/fake/c/{ => main}/private-common.c | 0 level_3/fake/c/{ => main}/private-common.h | 22 ++- .../fake/c/{ => main}/private-fake-path_generate.c | 0 .../fake/c/{ => main}/private-fake-path_generate.h | 0 level_3/fake/c/{ => main}/private-fake.c | 70 ++++---- level_3/fake/c/{ => main}/private-fake.h | 0 .../fake/c/{ => main}/private-make-load_fakefile.c | 8 +- .../fake/c/{ => main}/private-make-load_fakefile.h | 0 .../c/{ => main}/private-make-load_parameters.c | 0 .../c/{ => main}/private-make-load_parameters.h | 0 level_3/fake/c/{ => main}/private-make-operate.c | 36 ++-- level_3/fake/c/{ => main}/private-make-operate.h | 0 .../fake/c/{ => main}/private-make-operate_block.c | 0 .../fake/c/{ => main}/private-make-operate_block.h | 0 .../c/{ => main}/private-make-operate_process.c | 18 +- .../c/{ => main}/private-make-operate_process.h | 0 .../{ => main}/private-make-operate_process_type.c | 90 +++++----- .../{ => main}/private-make-operate_process_type.h | 0 .../c/{ => main}/private-make-operate_validate.c | 0 .../c/{ => main}/private-make-operate_validate.h | 0 .../private-make-operate_validate_type.c | 0 .../private-make-operate_validate_type.h | 0 level_3/fake/c/{ => main}/private-make.c | 20 +-- level_3/fake/c/{ => main}/private-make.h | 0 level_3/fake/c/{ => main}/private-print.c | 116 ++++++------- level_3/fake/c/{ => main}/private-print.h | 3 +- level_3/fake/c/{ => main}/private-skeleton.c | 38 ++--- level_3/fake/c/{ => main}/private-skeleton.h | 0 level_3/fake/data/build/settings | 16 +- level_3/firewall/c/common.h | 12 +- level_3/firewall/c/print.c | 24 +-- level_3/firewall/c/print.h | 2 +- level_3/fss_basic_list_read/c/common.h | 30 ++-- level_3/fss_basic_list_read/c/print.c | 24 +-- level_3/fss_basic_list_read/c/print.h | 2 +- level_3/fss_basic_read/c/common.h | 30 ++-- level_3/fss_basic_read/c/print.c | 24 +-- level_3/fss_basic_read/c/print.h | 2 +- level_3/fss_embedded_list_read/c/common.h | 30 ++-- level_3/fss_embedded_list_read/c/print.c | 24 +-- level_3/fss_embedded_list_read/c/print.h | 2 +- level_3/fss_embedded_list_read/c/private-read.c | 8 +- level_3/fss_extended_list_read/c/common.h | 30 ++-- level_3/fss_extended_list_read/c/print.c | 16 +- level_3/fss_extended_list_read/c/print.h | 2 +- level_3/fss_extended_read/c/common.h | 28 ++-- level_3/fss_extended_read/c/print.c | 24 +-- level_3/fss_extended_read/c/print.h | 2 +- level_3/fss_identify/c/common.h | 12 +- level_3/fss_identify/c/print.c | 24 +-- level_3/fss_identify/c/print.h | 2 +- level_3/fss_payload_read/c/common.h | 30 ++-- level_3/fss_payload_read/c/print.c | 22 +-- level_3/fss_payload_read/c/print.h | 2 +- level_3/fss_write/c/main/common.h | 30 ++-- level_3/fss_write/c/main/print.c | 36 ++-- level_3/fss_write/c/payload/print.c | 2 +- level_3/iki_read/c/main/common.h | 26 +-- level_3/iki_read/c/main/print.c | 36 ++-- level_3/iki_read/c/main/print.h | 2 +- level_3/iki_write/c/main/common-print.h | 2 +- level_3/iki_write/c/main/common.h | 14 +- level_3/iki_write/c/main/print.c | 48 ++---- level_3/iki_write/c/main/print.h | 2 +- level_3/status_code/c/main/common-print.h | 2 +- level_3/status_code/c/main/common.h | 10 +- level_3/status_code/c/main/print.c | 48 ++---- level_3/utf8/c/main/common-print.h | 2 +- level_3/utf8/c/main/common.h | 4 +- level_3/utf8/c/main/main.h | 2 +- level_3/utf8/c/main/print.c | 72 +++----- level_3/utf8/c/main/print.h | 2 +- level_3/utf8/c/main/private-common.h | 2 +- level_3/utf8/c/main/private-utf8.h | 2 +- level_3/utf8/c/main/private-utf8_bytesequence.h | 2 +- level_3/utf8/c/main/private-utf8_codepoint.h | 2 +- level_3/utf8/c/main/utf8.h | 2 +- 112 files changed, 1146 insertions(+), 988 deletions(-) create mode 100644 level_3/fake/c/main/common-print.c create mode 100644 level_3/fake/c/main/common-print.h rename level_3/fake/c/{ => main}/common.c (98%) rename level_3/fake/c/{ => main}/common.h (90%) rename level_3/fake/c/{ => main}/fake.c (53%) rename level_3/fake/c/{ => main}/fake.h (84%) rename level_3/fake/c/{ => main}/main.c (100%) rename level_3/fake/c/{ => main}/main.h (100%) rename level_3/fake/c/{ => main}/print.c (64%) rename level_3/fake/c/{ => main}/print.h (50%) rename level_3/fake/c/{ => main}/private-build-library.c (97%) rename level_3/fake/c/{ => main}/private-build-library.h (100%) rename level_3/fake/c/{ => main}/private-build-load.c (97%) rename level_3/fake/c/{ => main}/private-build-load.h (100%) rename level_3/fake/c/{ => main}/private-build-object.c (93%) rename level_3/fake/c/{ => main}/private-build-object.h (100%) rename level_3/fake/c/{ => main}/private-build-objects.c (93%) rename level_3/fake/c/{ => main}/private-build-objects.h (100%) rename level_3/fake/c/{ => main}/private-build-program.c (95%) rename level_3/fake/c/{ => main}/private-build-program.h (100%) rename level_3/fake/c/{ => main}/private-build-skeleton.c (92%) rename level_3/fake/c/{ => main}/private-build-skeleton.h (100%) rename level_3/fake/c/{ => main}/private-build.c (90%) rename level_3/fake/c/{ => main}/private-build.h (100%) rename level_3/fake/c/{ => main}/private-clean.c (71%) rename level_3/fake/c/{ => main}/private-clean.h (100%) rename level_3/fake/c/{ => main}/private-common.c (100%) rename level_3/fake/c/{ => main}/private-common.h (99%) rename level_3/fake/c/{ => main}/private-fake-path_generate.c (100%) rename level_3/fake/c/{ => main}/private-fake-path_generate.h (100%) rename level_3/fake/c/{ => main}/private-fake.c (92%) rename level_3/fake/c/{ => main}/private-fake.h (100%) rename level_3/fake/c/{ => main}/private-make-load_fakefile.c (98%) rename level_3/fake/c/{ => main}/private-make-load_fakefile.h (100%) rename level_3/fake/c/{ => main}/private-make-load_parameters.c (100%) rename level_3/fake/c/{ => main}/private-make-load_parameters.h (100%) rename level_3/fake/c/{ => main}/private-make-operate.c (96%) rename level_3/fake/c/{ => main}/private-make-operate.h (100%) rename level_3/fake/c/{ => main}/private-make-operate_block.c (100%) rename level_3/fake/c/{ => main}/private-make-operate_block.h (100%) rename level_3/fake/c/{ => main}/private-make-operate_process.c (96%) rename level_3/fake/c/{ => main}/private-make-operate_process.h (100%) rename level_3/fake/c/{ => main}/private-make-operate_process_type.c (93%) rename level_3/fake/c/{ => main}/private-make-operate_process_type.h (100%) rename level_3/fake/c/{ => main}/private-make-operate_validate.c (100%) rename level_3/fake/c/{ => main}/private-make-operate_validate.h (100%) rename level_3/fake/c/{ => main}/private-make-operate_validate_type.c (100%) rename level_3/fake/c/{ => main}/private-make-operate_validate_type.h (100%) rename level_3/fake/c/{ => main}/private-make.c (93%) rename level_3/fake/c/{ => main}/private-make.h (100%) rename level_3/fake/c/{ => main}/private-print.c (90%) rename level_3/fake/c/{ => main}/private-print.h (99%) rename level_3/fake/c/{ => main}/private-skeleton.c (90%) rename level_3/fake/c/{ => main}/private-skeleton.h (100%) diff --git a/level_3/byte_dump/c/common.h b/level_3/byte_dump/c/common.h index b1b9be9..5d3a7a4 100644 --- a/level_3/byte_dump/c/common.h +++ b/level_3/byte_dump/c/common.h @@ -319,7 +319,7 @@ extern "C" { #define byte_dump_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e, 0), \ @@ -332,22 +332,23 @@ extern "C" { macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e, 0), \ \ - macro_f_console_parameter_t_initialize2(byte_dump_short_binary_s.string, byte_dump_long_binary_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(byte_dump_short_decimal_s.string, byte_dump_long_decimal_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(byte_dump_short_duodecimal_s.string, byte_dump_long_duodecimal_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(byte_dump_short_hexidecimal_s.string, byte_dump_long_hexidecimal_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(byte_dump_short_octal_s.string, byte_dump_long_octal_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(byte_dump_short_unicode_s.string, byte_dump_long_unicode_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(byte_dump_short_first_s.string, byte_dump_long_first_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(byte_dump_short_last_s.string, byte_dump_long_last_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(byte_dump_short_narrow_s.string, byte_dump_long_narrow_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(byte_dump_short_placeholder_s.string, byte_dump_long_placeholder_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(byte_dump_short_text_s.string, byte_dump_long_text_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(byte_dump_short_wide_s.string, byte_dump_long_wide_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(byte_dump_short_width_s.string, byte_dump_long_width_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(0, byte_dump_long_normal_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(0, byte_dump_long_simple_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(0, byte_dump_long_classic_s.string, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(byte_dump_short_binary_s, byte_dump_long_binary_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(byte_dump_short_decimal_s, byte_dump_long_decimal_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(byte_dump_short_duodecimal_s, byte_dump_long_duodecimal_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(byte_dump_short_hexidecimal_s, byte_dump_long_hexidecimal_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(byte_dump_short_octal_s, byte_dump_long_octal_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(byte_dump_short_unicode_s, byte_dump_long_unicode_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(byte_dump_short_first_s, byte_dump_long_first_s, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(byte_dump_short_last_s, byte_dump_long_last_s, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(byte_dump_short_narrow_s, byte_dump_long_narrow_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(byte_dump_short_placeholder_s, byte_dump_long_placeholder_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(byte_dump_short_text_s, byte_dump_long_text_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(byte_dump_short_wide_s, byte_dump_long_wide_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(byte_dump_short_width_s, byte_dump_long_width_s, 1, f_console_flag_normal_e, 0), \ + \ + macro_f_console_parameter_t_initialize6(byte_dump_long_normal_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize6(byte_dump_long_simple_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize6(byte_dump_long_classic_s, 0, f_console_flag_normal_e, 0), \ } #define byte_dump_total_parameters_d 28 diff --git a/level_3/byte_dump/c/print.c b/level_3/byte_dump/c/print.c index a3594d9..5fedf6e 100644 --- a/level_3/byte_dump/c/print.c +++ b/level_3/byte_dump/c/print.c @@ -78,11 +78,11 @@ extern "C" { #ifndef _di_byte_dump_print_line_first_locked_ f_status_t byte_dump_print_line_first_locked(byte_dump_setting_t * const setting, const fl_print_t print) { - if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; if (setting->flag & byte_dump_main_flag_verify_e) return; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; if (setting->flag & byte_dump_main_flag_file_to_e) return F_output_not; } @@ -95,11 +95,11 @@ extern "C" { #ifndef _di_byte_dump_print_line_first_unlocked_ f_status_t byte_dump_print_line_first_unlocked(byte_dump_setting_t * const setting, const fl_print_t print) { - if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; if (setting->flag & byte_dump_main_flag_verify_e) return; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; if (setting->flag & byte_dump_main_flag_file_to_e) return F_output_not; } @@ -112,11 +112,11 @@ extern "C" { #ifndef _di_byte_dump_print_line_last_locked_ f_status_t byte_dump_print_line_last_locked(byte_dump_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; if (setting->flag & byte_dump_main_flag_verify_e) return; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; if (setting->flag & byte_dump_main_flag_file_to_e) return F_output_not; } @@ -129,11 +129,11 @@ extern "C" { #ifndef _di_byte_dump_print_line_last_unlocked_ f_status_t byte_dump_print_line_last_unlocked(byte_dump_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; if (setting->flag & byte_dump_main_flag_verify_e) return; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; if (setting->flag & byte_dump_main_flag_file_to_e) return F_output_not; } diff --git a/level_3/byte_dump/c/print.h b/level_3/byte_dump/c/print.h index b675182..4445115 100644 --- a/level_3/byte_dump/c/print.h +++ b/level_3/byte_dump/c/print.h @@ -1,7 +1,7 @@ /** * FLL - Level 3 * - * Project: UTF-8 + * Project: UTF8 * API Version: 0.7 * Licenses: lgpl-2.1-or-later */ diff --git a/level_3/control/c/common.h b/level_3/control/c/common.h index 6e6c076..063f7c4 100644 --- a/level_3/control/c/common.h +++ b/level_3/control/c/common.h @@ -115,7 +115,7 @@ extern "C" { #define control_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e, 0), \ @@ -128,10 +128,10 @@ extern "C" { macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e, 0), \ \ - macro_f_console_parameter_t_initialize2(control_short_name_s.string, control_long_name_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(control_short_return_s.string, control_long_return_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(control_short_settings_s.string, control_long_settings_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(control_short_socket_s.string, control_long_socket_s.string, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(control_short_name_s, control_long_name_s, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(control_short_return_s, control_long_return_s, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(control_short_settings_s, control_long_settings_s, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(control_short_socket_s, control_long_socket_s, 1, f_console_flag_normal_e, 0), \ } #define control_total_parameters_d 16 diff --git a/level_3/control/c/print.c b/level_3/control/c/print.c index 174ed8d..a870f20 100644 --- a/level_3/control/c/print.c +++ b/level_3/control/c/print.c @@ -51,11 +51,11 @@ extern "C" { #ifndef _di_control_print_line_first_locked_ f_status_t control_print_line_first_locked(control_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; if (setting->flag & control_main_flag_verify_e) return; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; if (setting->flag & control_main_flag_file_to_e) return F_output_not; } @@ -68,11 +68,11 @@ extern "C" { #ifndef _di_control_print_line_first_unlocked_ f_status_t control_print_line_first_unlocked(control_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; if (setting->flag & control_main_flag_verify_e) return; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; if (setting->flag & control_main_flag_file_to_e) return F_output_not; } @@ -85,11 +85,11 @@ extern "C" { #ifndef _di_control_print_line_last_locked_ f_status_t control_print_line_last_locked(control_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; if (setting->flag & control_main_flag_verify_e) return; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; if (setting->flag & control_main_flag_file_to_e) return F_output_not; } @@ -102,11 +102,11 @@ extern "C" { #ifndef _di_control_print_line_last_unlocked_ f_status_t control_print_line_last_unlocked(control_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; if (setting->flag & control_main_flag_verify_e) return; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; if (setting->flag & control_main_flag_file_to_e) return F_output_not; } diff --git a/level_3/control/c/print.h b/level_3/control/c/print.h index e97d3f9..0eafb80 100644 --- a/level_3/control/c/print.h +++ b/level_3/control/c/print.h @@ -1,7 +1,7 @@ /** * FLL - Level 3 * - * Project: UTF-8 + * Project: UTF8 * API Version: 0.7 * Licenses: lgpl-2.1-or-later */ diff --git a/level_3/controller/c/common.h b/level_3/controller/c/common.h index b8f4ccf..b25ed15 100644 --- a/level_3/controller/c/common.h +++ b/level_3/controller/c/common.h @@ -143,7 +143,7 @@ extern "C" { #define controller_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e, 0), \ @@ -156,16 +156,16 @@ extern "C" { macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e, 0), \ \ - macro_f_console_parameter_t_initialize2(controller_short_cgroup_s.string, controller_long_cgroup_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(controller_short_daemon_s.string, controller_long_daemon_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(controller_short_init_s.string, controller_long_init_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(controller_short_interruptible_s.string, controller_long_interruptible_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(controller_short_pid_s.string, controller_long_pid_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(controller_short_settings_s.string, controller_long_settings_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(controller_short_simulate_s.string, controller_long_simulate_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(controller_short_socket_s.string, controller_long_socket_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(controller_short_uninterruptible_s.string, controller_long_uninterruptible_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(controller_short_validate_s.string, controller_long_validate_s.string, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(controller_short_cgroup_s, controller_long_cgroup_s, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(controller_short_daemon_s, controller_long_daemon_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(controller_short_init_s, controller_long_init_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(controller_short_interruptible_s, controller_long_interruptible_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(controller_short_pid_s, controller_long_pid_s, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(controller_short_settings_s, controller_long_settings_s, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(controller_short_simulate_s, controller_long_simulate_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(controller_short_socket_s, controller_long_socket_s, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(controller_short_uninterruptible_s, controller_long_uninterruptible_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(controller_short_validate_s, controller_long_validate_s, 0, f_console_flag_normal_e, 0), \ } #define controller_total_parameters_d 22 diff --git a/level_3/controller/c/print.c b/level_3/controller/c/print.c index 2598714..2c9f80a 100644 --- a/level_3/controller/c/print.c +++ b/level_3/controller/c/print.c @@ -54,11 +54,11 @@ extern "C" { #ifndef _di_controller_print_line_first_locked_ f_status_t controller_print_line_first_locked(controller_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; if (setting->flag & controller_main_flag_verify_e) return; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; if (setting->flag & controller_main_flag_file_to_e) return F_output_not; } @@ -71,11 +71,11 @@ extern "C" { #ifndef _di_controller_print_line_first_unlocked_ f_status_t controller_print_line_first_unlocked(controller_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; if (setting->flag & controller_main_flag_verify_e) return; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; if (setting->flag & controller_main_flag_file_to_e) return F_output_not; } @@ -88,11 +88,11 @@ extern "C" { #ifndef _di_controller_print_line_last_locked_ f_status_t controller_print_line_last_locked(controller_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; if (setting->flag & controller_main_flag_verify_e) return; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; if (setting->flag & controller_main_flag_file_to_e) return F_output_not; } @@ -105,11 +105,11 @@ extern "C" { #ifndef _di_controller_print_line_last_unlocked_ f_status_t controller_print_line_last_unlocked(controller_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; if (setting->flag & controller_main_flag_verify_e) return; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; if (setting->flag & controller_main_flag_file_to_e) return F_output_not; } diff --git a/level_3/controller/c/print.h b/level_3/controller/c/print.h index a1393fe..32a5be2 100644 --- a/level_3/controller/c/print.h +++ b/level_3/controller/c/print.h @@ -1,7 +1,7 @@ /** * FLL - Level 3 * - * Project: UTF-8 + * Project: UTF8 * API Version: 0.7 * Licenses: lgpl-2.1-or-later */ diff --git a/level_3/fake/c/main/common-print.c b/level_3/fake/c/main/common-print.c new file mode 100644 index 0000000..d189a9c --- /dev/null +++ b/level_3/fake/c/main/common-print.c @@ -0,0 +1,26 @@ +#include "fake.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_fake_f_a_ + const f_string_t fake_f_a[] = { + "f_console_parameter_prioritize_right", + "f_console_parameter_process", + "f_file_is", + "f_file_name_base", + "f_string_dynamic_append", + "f_string_dynamic_append_nulless", + "f_string_dynamic_mash", + "f_string_dynamic_resize", + "fl_directory_copy", + "fll_execute_arguments_add", + "fll_execute_arguments_add_parameter_set", + "fll_execute_program", + }; +#endif // _di_fake_f_a_ + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_3/fake/c/main/common-print.h b/level_3/fake/c/main/common-print.h new file mode 100644 index 0000000..a72d710 --- /dev/null +++ b/level_3/fake/c/main/common-print.h @@ -0,0 +1,61 @@ +/** + * FLL - Level 3 + * + * Project: Featureless Make + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * Provides the common data structures. + * + * This is auto-included and should not need to be explicitly included. + */ +#ifndef _fake_common_print_h +#define _fake_common_print_h + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * A special array of strings intended for representing funciton names. + * + * These are primarily used for printing errors with the function names. + * + * The macro macro_fake_f() is used to reference the array index by the enum name. + * + * macro_fake_f(): + * - name: The name of the function. + */ +#ifndef _di_fake_f_a_ + extern const f_string_t fake_f_a[]; + + #define macro_fake_f(name) fake_f_a[fake_f_##name##_e] +#endif // _di_fake_f_a_ + +/** + * An enum representing specific indexes within the above array. + * + * This is a convenience enum used to make code slightly more readable. + */ +#ifndef _di_fake_f_e_ + enum { + fake_f_f_console_parameter_prioritize_right_e, + fake_f_f_console_parameter_process_e, + fake_f_f_file_is_e, + fake_f_f_file_name_base_e, + fake_f_f_string_dynamic_append_e, + fake_f_f_string_dynamic_append_nulless_e, + fake_f_f_string_dynamic_mash_e, + fake_f_f_string_dynamic_resize_e, + fake_f_fl_directory_copy_e, + fake_f_fll_execute_arguments_add_e, + fake_f_fll_execute_arguments_add_parameter_set_e, + fake_f_fll_execute_program_e, + }; // enum +#endif // _di_fake_f_e_ + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _fake_common_print_h diff --git a/level_3/fake/c/common.c b/level_3/fake/c/main/common.c similarity index 98% rename from level_3/fake/c/common.c rename to level_3/fake/c/main/common.c index 77d7970..862e5ad 100644 --- a/level_3/fake/c/common.c +++ b/level_3/fake/c/main/common.c @@ -215,9 +215,9 @@ extern "C" { f_string_static_t * const args = main->parameters.arguments.array; - if (main->parameters.array[fake_parameter_strip_invalid_e].result & f_console_result_found_e) { - setting->flag |= fake_main_flag_strip_invalid_e; - } + //if (main->parameters.array[fake_parameter_strip_invalid_e].result & f_console_result_found_e) { + // setting->flag |= fake_main_flag_strip_invalid_e; + //} } #endif // _di_fake_setting_load_ diff --git a/level_3/fake/c/common.h b/level_3/fake/c/main/common.h similarity index 90% rename from level_3/fake/c/common.h rename to level_3/fake/c/main/common.h index ee3f221..cb3b429 100644 --- a/level_3/fake/c/common.h +++ b/level_3/fake/c/main/common.h @@ -468,7 +468,7 @@ extern "C" { #define fake_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e, 0), \ @@ -481,25 +481,27 @@ extern "C" { macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e, 0), \ \ - macro_f_console_parameter_t_initialize2(fake_short_define_s.string, fake_long_define_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fake_short_fakefile_s.string, fake_long_fakefile_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fake_short_mode_s.string, fake_long_mode_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fake_short_process_s.string, fake_long_process_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fake_short_settings_s.string, fake_long_settings_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fake_short_path_build_s.string, fake_long_path_build_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fake_short_path_data_s.string, fake_long_path_data_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fake_short_path_sources_s.string, fake_long_path_sources_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fake_short_path_work_s.string, fake_long_path_work_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(0, fake_long_documents_disabled_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(0, fake_long_documents_enabled_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(0, fake_long_shared_disabled_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(0, fake_long_shared_enabled_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(0, fake_long_static_disabled_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(0, fake_long_static_enabled_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(0, 0, fake_other_operation_build_s.string, 0, f_console_flag_simple_e), \ - macro_f_console_parameter_t_initialize2(0, 0, fake_other_operation_clean_s.string, 0, f_console_flag_simple_e), \ - macro_f_console_parameter_t_initialize2(0, 0, fake_other_operation_make_s.string, 0, f_console_flag_simple_e), \ - macro_f_console_parameter_t_initialize2(0, 0, fake_other_operation_skeleton_s.string, 0, f_console_flag_simple_e), \ + macro_f_console_parameter_t_initialize4(fake_short_define_s, fake_long_define_s, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fake_short_fakefile_s, fake_long_fakefile_s, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fake_short_mode_s, fake_long_mode_s, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fake_short_process_s, fake_long_process_s, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fake_short_settings_s, fake_long_settings_s, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fake_short_path_build_s, fake_long_path_build_s, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fake_short_path_data_s, fake_long_path_data_s, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fake_short_path_sources_s, fake_long_path_sources_s, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fake_short_path_work_s, fake_long_path_work_s, 1, f_console_flag_normal_e, 0), \ + \ + macro_f_console_parameter_t_initialize6(fake_long_documents_disabled_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize6(fake_long_documents_enabled_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize6(fake_long_shared_disabled_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize6(fake_long_shared_enabled_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize6(fake_long_static_disabled_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize6(fake_long_static_enabled_s, 0, f_console_flag_normal_e, 0), \ + \ + macro_f_console_parameter_t_initialize7(fake_other_operation_build_s.string, 0, f_console_flag_simple_e, 0), \ + macro_f_console_parameter_t_initialize7(fake_other_operation_clean_s.string, 0, f_console_flag_simple_e, 0), \ + macro_f_console_parameter_t_initialize7(fake_other_operation_make_s.string, 0, f_console_flag_simple_e, 0), \ + macro_f_console_parameter_t_initialize7(fake_other_operation_skeleton_s.string, 0, f_console_flag_simple_e, 0), \ } #define fake_total_parameters_d 31 @@ -512,8 +514,8 @@ extern "C" { * - none: No flags set. * - file_from: Using a specified source file. * - file_to: Using a specified destination file. - * - help: Print help. * - header: Enable printing of headers. + * - help: Print help. * - separate: Enable printing of separators. * - strip_invalid: Using strip invalid character mode. * - verify: Using verify mode. diff --git a/level_3/fake/c/fake.c b/level_3/fake/c/main/fake.c similarity index 53% rename from level_3/fake/c/fake.c rename to level_3/fake/c/main/fake.c index d62322d..eb23da7 100644 --- a/level_3/fake/c/fake.c +++ b/level_3/fake/c/main/fake.c @@ -14,75 +14,30 @@ extern "C" { #endif #ifndef _di_fake_main_ - f_status_t fake_main(fll_program_data_t * const main, fake_setting_t * const setting) { + void fake_main(fll_program_data_t * const main, fake_setting_t * const setting) { - f_status_t status = F_none; + if (!main || !setting || F_status_is_error(setting->status)) return; - // Load parameters. - status = f_console_parameter_process(arguments, &main->parameters); - if (F_status_is_error(status)) return; + setting->status = F_none; - { - f_array_length_t choice = 0; - f_uint16s_t choices = f_uint16s_t_initialize; - - // Identify and prioritize "color context" parameters. - { - uint16_t choices_array[3] = { fake_parameter_no_color_e, fake_parameter_light_e, fake_parameter_dark_e }; - choices.array = choices_array; - choices.used = 3; - - const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e }; - - status = fll_program_parameter_process_context(choices, modes, F_true, main); - - if (F_status_is_error(status)) { - fake_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", F_true); - fake_print_line_last_locked(setting, main->error); - - return; - } - } - - // Identify and prioritize "verbosity" parameters. - { - uint16_t choices_array[5] = { fake_parameter_verbosity_quiet_e, fake_parameter_verbosity_error_e, fake_parameter_verbosity_verbose_e, fake_parameter_verbosity_debug_e, fake_parameter_verbosity_normal_e }; - choices.array = choices_array; - choices.used = 5; - - const uint8_t verbosity[5] = { f_console_verbosity_quiet_e, f_console_verbosity_error_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, f_console_verbosity_normal_e }; - - status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main); - - if (F_status_is_error(status)) { - fake_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", F_true); - fake_print_line_last_locked(setting, main->error); - - return; - } - } - } - - if (main->parameters.array[fake_parameter_help_e].result & f_console_result_found_e) { + if (setting->flag & fake_main_flag_help_e) { fake_print_help(setting, main->message); - return F_none; + return; } - if (main->parameters.array[fake_parameter_version_e].result & f_console_result_found_e) { + if (setting->flag & fake_main_flag_version_e) { fll_program_print_version(main->message, fake_program_version_s); - return F_none; + return; } - status = F_none; - fake_data_t data = fake_data_t_initialize; data.main = main; + data.setting = setting; data.argv = main->parameters.arguments.array; + // @todo move operations processing into the common settings loader. f_array_length_t operations_length = main->parameters.array[fake_parameter_operation_build_e].locations.used; operations_length += main->parameters.array[fake_parameter_operation_clean_e].locations.used; @@ -91,7 +46,7 @@ extern "C" { // Ensure the default operation always exists. if (operations_length) { - data.flag |= fake_data_flag_has_operation_e; + data.flag |= fake_data_flag_operation_e; } else { operations_length = 1; @@ -100,7 +55,7 @@ extern "C" { uint8_t operations[operations_length]; f_string_static_t operations_name = f_string_static_t_initialize; - if (data.flag & fake_data_flag_has_operation_e) { + if (data.flag & fake_data_flag_operation_e) { f_array_length_t locations[operations_length]; f_array_length_t locations_length = 0; f_array_length_t i = 0; @@ -175,55 +130,44 @@ extern "C" { operations[0] = fake_operation_make_e; } - if (F_status_is_error_not(status)) { + if (F_status_is_error_not(setting->status)) { if (main->parameters.array[fake_parameter_operation_build_e].locations.used && main->parameters.array[fake_parameter_operation_make_e].locations.used) { - status = F_status_set_error(F_parameter); - - if (main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(main->error.to); + setting->status = F_status_set_error(F_parameter); - fl_print_format("%r%[%QThe operation '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%]", main->error.to, main->error.notable, fake_other_operation_build_s, main->error.notable); - fl_print_format("%[' cannot be specified with the operation '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%]", main->error.to, main->error.notable, fake_other_operation_make_s, main->error.notable); - fl_print_format("%['.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); - - f_file_stream_unlock(main->error.to); - } + fake_print_error_parameter_operation_not_with(setting, main->error, fake_other_operation_build_s, fake_other_operation_make_s); } } - if (F_status_is_error_not(status)) { + if (F_status_is_error_not(setting->status)) { bool validate_parameter_paths = F_true; - status = fake_process_console_parameters(&data); + setting->status = fake_process_console_parameters(&data); - if (F_status_is_error_not(status)) { - status = fake_path_generate(&data); + if (F_status_is_error_not(setting->status)) { + setting->status = fake_path_generate(&data); } - if (F_status_is_error(status)) { + if (F_status_is_error(setting->status)) { fake_data_delete(&data); - return F_status_set_error(status); + return; } { uint8_t i = 0; - if ((main->pipe & fll_program_data_pipe_input_e) && !(data.flag & fake_data_flag_has_operation_e)) { + if ((main->pipe & fll_program_data_pipe_input_e) && !(data.flag & fake_data_flag_operation_e)) { data.file_data_build_fakefile.used = 0; - status = f_string_dynamic_append(f_string_ascii_minus_s, &data.file_data_build_fakefile); - - if (F_status_is_error_not(status)) { - data.fakefile.used = 0; + setting->status = f_string_dynamic_append(f_string_ascii_minus_s, &data.file_data_build_fakefile); - status = f_string_dynamic_append(f_string_ascii_minus_s, &data.fakefile); + if (F_status_is_error(setting->status)) { + fake_print_error(setting, setting->status, main->error, macro_fake_f(f_string_dynamic_append)); } + else { + data.fakefile.used = 0; - if (F_status_is_error(status)) { - fll_error_print(data.main->error, F_status_set_fine(status), "f_string_dynamic_append", F_true); + setting->status = f_string_dynamic_append(f_string_ascii_minus_s, &data.fakefile); } } @@ -241,9 +185,9 @@ extern "C" { operations_name = fake_other_operation_clean_s; data.operation = operations[i]; - status = fake_validate_parameter_paths(&data); + setting->status = fake_validate_parameter_paths(&data); - if (F_status_is_error_not(status) && !(main->pipe & fll_program_data_pipe_input_e)) { + if (F_status_is_error_not(setting->status) && !(main->pipe & fll_program_data_pipe_input_e)) { f_string_static_t *path = 0; if (operations[i] == fake_operation_build_e) { @@ -253,14 +197,14 @@ extern "C" { path = &data.file_data_build_fakefile; } - status = f_file_is(*path, F_file_type_regular_d, F_false); + setting->status = f_file_is(*path, F_file_type_regular_d, F_false); - if (status == F_false) { - status = F_status_set_error(F_file_not); + if (setting->status == F_false) { + setting->status = F_status_set_error(F_file_not); } - if (F_status_is_error(status)) { - fll_error_file_print(data.main->error, F_status_set_fine(status), "f_file_is", F_true, *path, fake_common_file_path_access_s, fll_error_file_type_file_e); + if (F_status_is_error(setting->status)) { + fll_error_file_print(data.main->error, F_status_set_fine(setting->status), "f_file_is", F_true, *path, fake_common_file_path_access_s, fll_error_file_type_file_e); } } } @@ -270,7 +214,7 @@ extern "C" { } // for } - if (F_status_is_error_not(status)) { + if (F_status_is_error_not(setting->status)) { for (i = 0; i < operations_length; ++i) { data.operation = operations[i]; @@ -290,45 +234,45 @@ extern "C" { if (data.operation == fake_operation_build_e) { if (validate_parameter_paths) { - status = fake_validate_parameter_paths(&data); + setting->status = fake_validate_parameter_paths(&data); validate_parameter_paths = F_false; } - if (F_status_is_error_not(status)) { - status = fake_build_operate(&data, 0, main->pipe & fll_program_data_pipe_input_e); + if (F_status_is_error_not(setting->status)) { + setting->status = fake_build_operate(&data, 0, main->pipe & fll_program_data_pipe_input_e); } } else if (data.operation == fake_operation_clean_e) { - status = fake_clean_operate(&data); + setting->status = fake_clean_operate(&data); // Reset in case next operation needs files. validate_parameter_paths = F_true; } else if (data.operation == fake_operation_make_e) { if (validate_parameter_paths) { - status = fake_validate_parameter_paths(&data); + setting->status = fake_validate_parameter_paths(&data); validate_parameter_paths = F_false; } - if (F_status_is_error_not(status)) { - status = fake_make_operate(&data); - if (status == F_child) break; + if (F_status_is_error_not(setting->status)) { + setting->status = fake_make_operate(&data); + if (setting->status == F_child) break; } } else if (data.operation == fake_operation_skeleton_e) { - status = fake_skeleton_operate(&data); + setting->status = fake_skeleton_operate(&data); // Skeleton is supposed to guarantee these. validate_parameter_paths = F_false; } - if (status == F_child) break; + if (setting->status == F_child) break; - if (F_status_set_fine(status) == F_interrupt || !(i % fake_signal_check_short_d)) { + if (F_status_set_fine(setting->status) == F_interrupt || !(i % fake_signal_check_short_d)) { if (fll_program_standard_signal_received(main)) { fll_program_print_signal_received(main->warning, setting->line_first, main->signal_received); - status = F_status_set_error(F_interrupt); + setting->status = F_status_set_error(F_interrupt); break; } @@ -336,41 +280,30 @@ extern "C" { main->signal_check = 0; } - if (F_status_is_error(status)) break; + if (F_status_is_error(setting->status)) break; } // for } - if (F_status_is_error(status)) { - if (main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(main->error.to); - - fl_print_format("%r%[%QThe operation '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%]", main->error.to, main->error.notable, operations_name, main->error.notable); - fl_print_format("%[' failed.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); - - f_file_stream_unlock(main->error.to); - } + if (F_status_is_error(setting->status)) { + fake_print_error_failure_operation(setting, main->error, operations_name); } } - if (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, f_string_eol_s, f_string_eol_s, f_string_eol_s); - } + if (setting->status != F_child) { + fake_print_operation_all_complete(setting, main->message); } } - if (F_status_is_error(status) && main->error.verbosity > f_console_verbosity_quiet_e) { - if (F_status_set_fine(status) == F_interrupt) { - f_file_stream_flush(main->output.to); + if (setting->status != F_child) { + if (F_status_is_error(setting->status)) { + fake_print_line_last_locked(setting, main->error); + } + else if (setting->status != F_interrupt) { + fake_print_line_last_locked(setting, main->message); } - - fll_print_dynamic_raw(f_string_eol_s, main->output.to); } fake_data_delete(&data); - - return status; } #endif // _di_fake_main_ diff --git a/level_3/fake/c/fake.h b/level_3/fake/c/main/fake.h similarity index 84% rename from level_3/fake/c/fake.h rename to level_3/fake/c/main/fake.h index 9657aa1..ac107a8 100644 --- a/level_3/fake/c/fake.h +++ b/level_3/fake/c/main/fake.h @@ -90,8 +90,9 @@ #include // Featureless Make includes. -#include -#include +#include +#include +#include #ifdef __cplusplus extern "C" { @@ -110,19 +111,24 @@ extern "C" { * * @param main * The main program data. - * @param arguments - * The parameters passed to the process. + * @param setting + * The main program settings. + * Must be of type (fake_setting_t *). + * + * This is used by the main thread and should not be modified within individual threads. * - * @return - * F_none on success. - * F_child if this is a child process returning. + * This alters setting.status: + * F_none on success. + * F_child if this is a child process returning. * - * F_interrupt (with error bit) on receiving a terminate process signal, such as an interrupt signal. + * F_interrupt (with error bit) on receiving a terminate process signal, such as an interrupt signal. + * F_parameter (with error bit) if main is NULL or setting is NULL. * - * Status codes (with error bit) are returned on any problem. + * @param arguments + * The parameters passed to the process. */ #ifndef _di_fake_main_ - extern f_status_t fake_main(fll_program_data_t * const main, fake_setting_t * const setting); + extern void fake_main(fll_program_data_t * const main, fake_setting_t * const setting); #endif // _di_fake_main_ #ifdef __cplusplus diff --git a/level_3/fake/c/main.c b/level_3/fake/c/main/main.c similarity index 100% rename from level_3/fake/c/main.c rename to level_3/fake/c/main/main.c diff --git a/level_3/fake/c/main.h b/level_3/fake/c/main/main.h similarity index 100% rename from level_3/fake/c/main.h rename to level_3/fake/c/main/main.h diff --git a/level_3/fake/c/print.c b/level_3/fake/c/main/print.c similarity index 64% rename from level_3/fake/c/print.c rename to level_3/fake/c/main/print.c index f12521d..36a915f 100644 --- a/level_3/fake/c/print.c +++ b/level_3/fake/c/main/print.c @@ -5,9 +5,86 @@ extern "C" { #endif +#ifndef _di_fake_print_error_ + f_status_t fake_print_error(fake_setting_t * const setting, const f_status_t status, const fl_print_t print, const f_string_t function) { + + if (print.verbosity < f_console_verbosity_error_e) return F_output_not; + + fake_print_line_first_locked(setting, print); + fll_error_print(print, F_status_set_fine(status), function, F_true); + + return F_none; + } +#endif // _di_fake_print_error_ + +#ifndef _di_fake_print_error_failure_operation_ + f_status_t fake_print_error_failure_operation(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t operation) { + + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; + + f_file_stream_lock(print.to); + + fake_print_line_first_unlocked(setting, print); + + fl_print_format("%[%QThe operation '%]", print.to, print.context, print.prefix, print.context); + fl_print_format("%[%Q%]", print.to, print.notable, operation, print.notable); + fl_print_format("%[' failed.%]%r", print.to, print.context, print.context, f_string_eol_s); + + f_file_stream_unlock(print.to); + + return F_none; + } +#endif // _di_fake_print_error_failure_operation_ + +#ifndef _di_fake_print_error_failure_script_ + f_status_t fake_print_error_failure_script(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t script) { + + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; + + f_file_stream_lock(print.to); + + fake_print_line_first_unlocked(setting, print); + + fl_print_format("%[%QFailed to execute script '%]", print.to, print.context, print.prefix, print.context); + fl_print_format("%[%Q%]", print.to, print.notable, script, print.notable); + fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s); + + f_file_stream_unlock(print.to); + + return F_none; + } +#endif // _di_fake_print_error_failure_script_ + +#ifndef _di_fake_print_error_parameter_operation_not_with_ + f_status_t fake_print_error_parameter_operation_not_with(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t operation_1, const f_string_static_t operation_2) { + + if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + + if (!F_status_is_error(setting->status)) { + if (print.verbosity < f_console_verbosity_error_e) return F_output_not; + } + + f_file_stream_lock(print.to); + + fake_print_line_first_unlocked(setting, print); + + fl_print_format("%[%QThe operation '%]", print.to, print.context, print.prefix, print.context); + fl_print_format("%[%r%]", print.to, print.notable, operation_1, print.notable); + fl_print_format("%[' cannot be specified with the operation '%]", print.to, print.context, print.context); + fl_print_format("%[%r%]", print.to, print.notable, operation_2, print.notable); + fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s); + + f_file_stream_unlock(print.to); + + return F_none; + } +#endif // _di_fake_print_error_parameter_operation_not_with_ + #ifndef _di_fake_print_help_ f_status_t fake_print_help(fake_setting_t * const setting, const fl_print_t print) { + if (!setting) return F_output_not; + f_file_stream_lock(print.to); f_print_dynamic_raw(setting->line_first, print.to); @@ -70,11 +147,11 @@ extern "C" { fl_print_format(" When piping data to this program, the piped data is treated as if it were prepended to the %[%r%]", print.to, print.set->notable, fake_make_parameter_variable_fakefile_s, print.set->notable); fl_print_format(" or the %[%r%], depending on the operation.%r", print.to, print.set->notable, fake_make_parameter_variable_settings_s, print.set->notable, f_string_eol_s); - fl_print_format(" A section name from the fakefile that does not conflict with an operation name may be specified when performing the %[%r%] operation.%r%r", file.stream, context.set.notable, fake_other_operation_make_s, context.set.notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" A section name from the fakefile that does not conflict with an operation name may be specified when performing the %[%r%] operation.%r", print.to, print.set->notable, fake_other_operation_make_s, print.set->notable, f_string_eol_s); f_print_dynamic_raw(setting->line_last, print.to); - f_file_stream_flush(output); + f_file_stream_flush(print.to); f_file_stream_unlock(print.to); return F_none; @@ -84,10 +161,10 @@ extern "C" { #ifndef _di_fake_print_line_first_locked_ f_status_t fake_print_line_first_locked(fake_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } f_print_dynamic_raw(setting->line_first, print.to); @@ -99,10 +176,10 @@ extern "C" { #ifndef _di_fake_print_line_first_unlocked_ f_status_t fake_print_line_first_unlocked(fake_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } fll_print_dynamic_raw(setting->line_first, print.to); @@ -114,10 +191,10 @@ extern "C" { #ifndef _di_fake_print_line_last_locked_ f_status_t fake_print_line_last_locked(fake_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } fll_print_dynamic_raw(setting->line_last, print.to); @@ -129,10 +206,10 @@ extern "C" { #ifndef _di_fake_print_line_last_unlocked_ f_status_t fake_print_line_last_unlocked(fake_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } f_print_dynamic_raw(setting->line_last, print.to); @@ -141,6 +218,25 @@ extern "C" { } #endif // _di_fake_print_line_last_unlocked_ +#ifndef _di_fake_print_operation_all_complete_ + f_status_t fake_print_operation_all_complete(fake_setting_t * const setting, const fl_print_t print) { + + if (!setting || print.verbosity < f_console_verbosity_normal_e) return F_output_not; + if (F_status_is_error(setting->status)) return F_output_not; + + f_file_stream_lock(print.to); + + fake_print_line_first_unlocked(setting, print); + + fl_print_format("All operations complete.%r", print.to, f_string_eol_s, f_string_eol_s); + + f_file_stream_flush(print.to); + f_file_stream_unlock(print.to); + + return F_none; + } +#endif // _di_fake_print_operation_all_complete_ + #ifdef __cplusplus } // extern "C" #endif diff --git a/level_3/fake/c/print.h b/level_3/fake/c/main/print.h similarity index 50% rename from level_3/fake/c/print.h rename to level_3/fake/c/main/print.h index 3164606..dc1ddf9 100644 --- a/level_3/fake/c/print.h +++ b/level_3/fake/c/main/print.h @@ -1,7 +1,7 @@ /** * FLL - Level 3 * - * Project: UTF-8 + * Project: UTF8 * API Version: 0.7 * Licenses: lgpl-2.1-or-later */ @@ -13,6 +13,91 @@ extern "C" { #endif /** + * Print generic error message regarding a function failing in some way. + * + * @param setting + * The main program settings. + * + * This does not alter setting.status. + * @param status + * The status to use. + * This is provided, ignoring setting.status, for thread-safety reasons. + * @param print + * Designates the how and where to print. + * + * @return + * F_none on success. + * F_output_not on success, but no printing is performed. + * + * @see fll_error_print() + */ +#ifndef _di_fake_print_error_ + extern f_status_t fake_print_error(fake_setting_t * const setting, const f_status_t status, const fl_print_t print, const f_string_t function); +#endif // _di_fake_print_error_ + +/** + * Print error message for when an operation fails. + * + * @param setting + * The main program settings. + * + * This does not alter setting.status. + * @param print + * Designates the how and where to print. + * @param operation + * The name of the operation that failed. + * + * @return + * F_none on success. + * F_output_not on success, but no printing is performed. + */ +#ifndef _di_fake_print_error_failure_operation_ + extern f_status_t fake_print_error_failure_operation(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t operation); +#endif // _di_fake_print_error_failure_operation_ + +/** + * Print error message for when an operation fails. + * + * @param setting + * The main program settings. + * + * This does not alter setting.status. + * @param print + * Designates the how and where to print. + * @param script + * The name of the script that failed. + * + * @return + * F_none on success. + * F_output_not on success, but no printing is performed. + */ +#ifndef _di_fake_print_error_failure_script_ + extern f_status_t fake_print_error_failure_script(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t script); +#endif // _di_fake_print_error_failure_script_ + +/** + * Print error message for when two designated operations cannot be used together. + * + * @param setting + * The main program settings. + * + * This does not alter setting.status. + * @param print + * Designates the how and where to print. + * @param operation_1 + * The symbol for the operation that cannot be used. + * @param operation_2 + * The second operation that cannot be used. + * + * @return + * F_none on success. + * F_output_not on success, but no printing is performed. + */ +#ifndef _di_fake_print_error_parameter_operation_not_with_ + extern f_status_t fake_print_error_parameter_operation_not_with(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t operation_1, const f_string_static_t operation_2); +#endif // _di_fake_print_error_parameter_operation_not_with_ + +/** * Print help. * * @param setting @@ -24,6 +109,7 @@ extern "C" { * * @return * F_none on success. + * F_output_not on success, but no printing is performed. */ #ifndef _di_fake_print_help_ extern f_status_t fake_print_help(fake_setting_t * const setting, const fl_print_t print); @@ -117,6 +203,24 @@ extern "C" { extern f_status_t fake_print_line_last_unlocked(fake_setting_t * const setting, const fl_print_t print); #endif // _di_fake_print_line_last_unlocked_ +/** + * Print message for when all operates successfully complete. + * + * @param setting + * The main program settings. + * + * This does not alter setting.status. + * @param print + * Designates the how and where to print. + * + * @return + * F_none on success. + * F_output_not on success, but no printing is performed. + */ +#ifndef _di_fake_print_operation_all_complete_ + extern f_status_t fake_print_operation_all_complete(fake_setting_t * const setting, const fl_print_t print); +#endif // _di_fake_print_operation_all_complete_ + #ifdef __cplusplus } // extern "C" #endif diff --git a/level_3/fake/c/private-build-library.c b/level_3/fake/c/main/private-build-library.c similarity index 97% rename from level_3/fake/c/private-build-library.c rename to level_3/fake/c/main/private-build-library.c index bd267c5..e5ce107 100644 --- a/level_3/fake/c/private-build-library.c +++ b/level_3/fake/c/main/private-build-library.c @@ -24,8 +24,8 @@ 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 && data->main->output.verbosity != f_console_verbosity_error_e) { - fll_print_format("%r%[Compiling shared library.%]%r", data->main->output.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s); + if (data->main->message.verbosity != f_console_verbosity_quiet_e && data->main->message.verbosity != f_console_verbosity_error_e) { + fll_print_format("%r%[Compiling shared library.%]%r", data->main->message.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s); } f_string_dynamics_t arguments = f_string_dynamics_t_initialize; @@ -329,7 +329,7 @@ extern "C" { *status = f_file_link(parameter_file_name_major, parameter_file_path); if (F_status_is_error_not(*status) && data->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("Linked file '%Q' to '%Q'.%r", data->main->output.to, parameter_file_path, parameter_file_name_major, f_string_eol_s); + fll_print_format("Linked file '%Q' to '%Q'.%r", data->main->message.to, parameter_file_path, parameter_file_name_major, f_string_eol_s); } else if (F_status_is_error(*status)) { if (F_status_set_fine(*status) == F_file_found) { @@ -360,7 +360,7 @@ extern "C" { *status = f_file_link(parameter_file_name_minor, parameter_file_path); if (F_status_is_error_not(*status) && data->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("Linked file '%Q' to '%Q'.%r", data->main->output.to, parameter_file_path, parameter_file_name_minor, f_string_eol_s); + fll_print_format("Linked file '%Q' to '%Q'.%r", data->main->message.to, parameter_file_path, parameter_file_name_minor, f_string_eol_s); } else if (F_status_is_error(*status)) { if (F_status_set_fine(*status) == F_file_found) { @@ -389,7 +389,7 @@ extern "C" { *status = f_file_link(parameter_file_name_micro, parameter_file_path); if (F_status_is_error_not(*status) && data->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("Linked file '%Q' to '%Q'.%r", data->main->output.to, parameter_file_path, parameter_file_name_micro, f_string_eol_s); + fll_print_format("Linked file '%Q' to '%Q'.%r", data->main->message.to, parameter_file_path, parameter_file_name_micro, f_string_eol_s); } else if (F_status_is_error(*status)) { if (F_status_set_fine(*status) == F_file_found) { @@ -417,7 +417,7 @@ extern "C" { *status = f_file_link(parameter_file_name_nano, parameter_file_path); if (F_status_is_error_not(*status) && data->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("Linked file '%Q' to '%Q'.%r", data->main->output.to, parameter_file_path, parameter_file_name_nano, f_string_eol_s); + fll_print_format("Linked file '%Q' to '%Q'.%r", data->main->message.to, parameter_file_path, parameter_file_name_nano, f_string_eol_s); } else if (F_status_is_error(*status)) { if (F_status_set_fine(*status) == F_file_found) { @@ -446,8 +446,8 @@ 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 && data->main->output.verbosity != f_console_verbosity_error_e) { - fll_print_format("%r%[Compiling static library.%]%r", data->main->output.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s); + if (data->main->message.verbosity != f_console_verbosity_quiet_e && data->main->message.verbosity != f_console_verbosity_error_e) { + fll_print_format("%r%[Compiling static library.%]%r", data->main->message.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s); } f_string_dynamic_t file_name = f_string_dynamic_t_initialize; diff --git a/level_3/fake/c/private-build-library.h b/level_3/fake/c/main/private-build-library.h similarity index 100% rename from level_3/fake/c/private-build-library.h rename to level_3/fake/c/main/private-build-library.h diff --git a/level_3/fake/c/private-build-load.c b/level_3/fake/c/main/private-build-load.c similarity index 97% rename from level_3/fake/c/private-build-load.c rename to level_3/fake/c/main/private-build-load.c index 343b1c5..f5f41ba 100644 --- a/level_3/fake/c/private-build-load.c +++ b/level_3/fake/c/main/private-build-load.c @@ -44,7 +44,7 @@ extern "C" { if (environment->used + data_build->setting.environment.used > environment->size) { if (environment->used + data_build->setting.environment.used > f_environment_max_length_d) { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QThe values for the setting '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%r%]", data->main->error.to, data->main->error.notable, fake_build_setting_name_environment_s, data->main->error.notable); @@ -52,7 +52,7 @@ extern "C" { fl_print_format("%[%r%]", data->main->error.to, data->main->error.notable, fake_build_setting_name_environment_s, data->main->error.notable); fl_print_format("%[' is too large.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_lock(data->main->error); + f_file_stream_unlock(data->main->error.to); } *status = F_status_set_error(F_array_too_large); @@ -75,7 +75,7 @@ extern "C" { if (F_status_is_error(*status)) return; if (fll_program_standard_signal_received(data->main)) { - fll_program_print_signal_received(main->warning, setting->line_first, main->signal_received); + fll_program_print_signal_received(data->main->warning, data->setting->line_first, data->main->signal_received); *status = F_status_set_error(F_interrupt); @@ -99,7 +99,7 @@ extern "C" { if (build_arguments && build_arguments->used) { path_file.used = data->path_data_build.used + build_arguments->array[0].used; } - else if (!process_pipe || (data->flag & fake_data_flag_has_operation_e)) { + else if (!process_pipe || (data->flag & fake_data_flag_operation_e)) { path_file.used = data->file_data_build_settings.used; } else { @@ -114,7 +114,7 @@ extern "C" { memcpy(path_file_string, data->path_data_build.string, sizeof(f_char_t) * data->path_data_build.used); memcpy(path_file_string + data->path_data_build.used, build_arguments->array[0].string, sizeof(f_char_t) * build_arguments->array[0].used); } - else if (!process_pipe || (data->flag & fake_data_flag_has_operation_e)) { + else if (!process_pipe || (data->flag & fake_data_flag_operation_e)) { memcpy(path_file_string, data->file_data_build_settings.string, sizeof(f_char_t) * data->file_data_build_settings.used); } else { @@ -138,7 +138,7 @@ extern "C" { } if (F_status_is_error_not(*status)) { - if (build_arguments && build_arguments->used || !process_pipe || (data->flag & fake_data_flag_has_operation_e)) { + if (build_arguments && build_arguments->used || !process_pipe || (data->flag & fake_data_flag_operation_e)) { *status = fake_file_buffer(data, path_file, process_pipe ? F_false : F_true, &buffer); } } @@ -200,7 +200,7 @@ extern "C" { for (uint8_t i = 0; i < 1; ++i) { if (!settings[i]->used) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QThe setting '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, names[i], data->main->error.notable); @@ -208,7 +208,7 @@ extern "C" { fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, path_file, data->main->error.notable); fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); failed = F_true; } @@ -231,7 +231,7 @@ extern "C" { if (F_status_is_error(*status) && buffer.used) return; if (fll_program_standard_signal_received(data->main)) { - fll_program_print_signal_received(main->warning, setting->line_first, main->signal_received); + fll_program_print_signal_received(data->main->warning, data->setting->line_first, data->main->signal_received); *status = F_status_set_error(F_interrupt); @@ -596,7 +596,7 @@ extern "C" { if (found == F_false) { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QThe specified mode '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, modes->array[i], data->main->error.notable); @@ -604,7 +604,7 @@ extern "C" { fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, path_file, data->main->error.notable); fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } error_printed = F_true; @@ -690,13 +690,13 @@ extern "C" { if (F_status_is_error(*status)) { if (*status == F_status_set_error(F_string_too_large)) { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); fl_print_format("%r%[%QA setting in the file '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, path_file, data->main->error.notable); fl_print_format("%[' is too long.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } } else if (!error_printed) { @@ -1159,7 +1159,7 @@ extern "C" { *settings_single_bool[i] = F_true; if (data->main->warning.verbosity >= f_console_verbosity_verbose_e) { - f_file_stream_lock(data->main->warning); + f_file_stream_lock(data->main->warning.to); fl_print_format("%r%[%QThe setting '%]", data->main->warning.to, f_string_eol_s, data->main->warning.context, data->main->warning.prefix, data->main->warning.context); fl_print_format("%[%r%]", data->main->warning.to, data->main->warning.notable, settings_single_name[i], data->main->warning.notable); @@ -1173,7 +1173,7 @@ extern "C" { fl_print_format("%[%r%]", data->main->warning.to, data->main->warning.notable, fake_common_setting_bool_yes_s, data->main->warning.notable); fl_print_format("%['.%]%r", data->main->warning.to, data->main->warning.context, data->main->warning.context, f_string_eol_s); - f_file_stream_unlock(data->main->warning); + f_file_stream_unlock(data->main->warning.to); } } } @@ -1191,7 +1191,7 @@ extern "C" { *settings_single_language[i] = fake_build_language_type_c_e; if (data->main->warning.verbosity >= f_console_verbosity_verbose_e) { - f_file_stream_lock(data->main->warning); + f_file_stream_lock(data->main->warning.to); fl_print_format("%r%[%QThe setting '%]", data->main->warning.to, f_string_eol_s, data->main->warning.context, data->main->warning.prefix, data->main->warning.context); fl_print_format("%[%r%]", data->main->warning.to, data->main->warning.notable, settings_single_name[i], data->main->warning.notable); @@ -1207,7 +1207,7 @@ extern "C" { fl_print_format("%[%r%]", data->main->warning.to, data->main->warning.notable, fake_build_language_c_s, data->main->warning.notable); fl_print_format("%['.%]%r", data->main->warning.to, data->main->warning.context, data->main->warning.context, f_string_eol_s); - f_file_stream_unlock(data->main->warning); + f_file_stream_unlock(data->main->warning.to); } } } @@ -1228,7 +1228,7 @@ extern "C" { *settings_single_version[i] = settings_single_version_default[i]; if (data->main->warning.verbosity >= f_console_verbosity_verbose_e) { - f_file_stream_lock(data->main->warning); + f_file_stream_lock(data->main->warning.to); fl_print_format("%r%[%QThe setting '%]", data->main->warning.to, f_string_eol_s, data->main->warning.context, data->main->warning.prefix, data->main->warning.context); fl_print_format("%[%r%]", data->main->warning.to, data->main->warning.notable, settings_single_name[i], data->main->warning.notable); @@ -1246,7 +1246,7 @@ extern "C" { fl_print_format("%[%r%]", data->main->warning.to, data->main->warning.notable, settings_single_version_default_name[i], data->main->warning.notable); fl_print_format("%['.%]%r", data->main->warning.to, data->main->warning.context, data->main->warning.context, f_string_eol_s); - f_file_stream_unlock(data->main->warning); + f_file_stream_unlock(data->main->warning.to); } } } @@ -1289,7 +1289,7 @@ extern "C" { setting->version_file = fake_build_version_type_micro_e; if (data->main->warning.verbosity >= f_console_verbosity_verbose_e) { - f_file_stream_lock(data->main->warning); + f_file_stream_lock(data->main->warning.to); fl_print_format("%r%[%QThe setting '%]", data->main->warning.to, f_string_eol_s, data->main->warning.context, data->main->warning.prefix, data->main->warning.context); fl_print_format("%[%r%]", data->main->warning.to, data->main->warning.notable, fake_build_setting_name_version_file_s, data->main->warning.notable); @@ -1299,7 +1299,7 @@ extern "C" { fl_print_format("%[%r%]", data->main->warning.to, data->main->warning.notable, fake_build_version_micro_s, data->main->warning.notable); fl_print_format("%['.%]%r", data->main->warning.to, data->main->warning.context, data->main->warning.context, f_string_eol_s); - f_file_stream_unlock(data->main->warning); + f_file_stream_unlock(data->main->warning.to); } } @@ -1307,7 +1307,7 @@ extern "C" { setting->version_target = fake_build_version_type_major_e; if (data->main->warning.verbosity >= f_console_verbosity_verbose_e) { - f_file_stream_lock(data->main->warning); + f_file_stream_lock(data->main->warning.to); fl_print_format("%r%[%QThe setting '%]", data->main->warning.to, f_string_eol_s, data->main->warning.context, data->main->warning.prefix, data->main->warning.context); fl_print_format("%[%r%]", data->main->warning.to, data->main->warning.notable, fake_build_setting_name_version_target_s, data->main->warning.notable); @@ -1317,7 +1317,7 @@ extern "C" { fl_print_format("%[%r%]", data->main->warning.to, data->main->warning.notable, fake_build_version_major_s, data->main->warning.notable); fl_print_format("%['.%]%r", data->main->warning.to, data->main->warning.context, data->main->warning.context, f_string_eol_s); - f_file_stream_unlock(data->main->warning); + f_file_stream_unlock(data->main->warning.to); } } } @@ -1393,7 +1393,7 @@ extern "C" { } if (data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QThe parameters '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, fake_long_shared_disabled_s, data->main->error.notable); @@ -1403,7 +1403,7 @@ extern "C" { fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, setting->build_shared ? fake_long_shared_enabled_s : fake_long_shared_disabled_s, data->main->error.notable); fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } } else { @@ -1428,7 +1428,7 @@ extern "C" { } if (data->main->error.verbosity >= f_console_verbosity_verbose_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QThe parameters '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, fake_long_static_disabled_s, data->main->error.notable); @@ -1438,7 +1438,7 @@ extern "C" { fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, setting->build_static ? fake_long_static_enabled_s : fake_long_static_disabled_s, data->main->error.notable); fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } } else { @@ -1454,7 +1454,7 @@ extern "C" { if (setting->build_language == fake_build_language_type_c_e || setting->build_language == fake_build_language_type_cpp_e) { if (setting->build_shared == F_false && setting->build_static == F_false) { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QThe build settings '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%r%]", data->main->error.to, data->main->error.notable, fake_build_setting_name_build_shared_s, data->main->error.notable); @@ -1464,7 +1464,7 @@ extern "C" { fl_print_format("%[%r%]", data->main->error.to, data->main->error.notable, setting->build_language == fake_build_language_type_c_e ? fake_build_language_c_s : fake_build_language_cpp_s, data->main->error.notable); fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } *status = F_status_set_error(F_failure); @@ -1479,7 +1479,7 @@ extern "C" { if (F_status_is_error(*status)) return; if (fll_program_standard_signal_received(data->main)) { - fll_program_print_signal_received(main->warning, setting->line_first, main->signal_received); + fll_program_print_signal_received(data->main->warning, data->setting->line_first, data->main->signal_received); *status = F_status_set_error(F_interrupt); diff --git a/level_3/fake/c/private-build-load.h b/level_3/fake/c/main/private-build-load.h similarity index 100% rename from level_3/fake/c/private-build-load.h rename to level_3/fake/c/main/private-build-load.h diff --git a/level_3/fake/c/private-build-object.c b/level_3/fake/c/main/private-build-object.c similarity index 93% rename from level_3/fake/c/private-build-object.c rename to level_3/fake/c/main/private-build-object.c index 5a64dcf..346764c 100644 --- a/level_3/fake/c/private-build-object.c +++ b/level_3/fake/c/main/private-build-object.c @@ -25,8 +25,8 @@ 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 && data->main->output.verbosity != f_console_verbosity_error_e) { - fll_print_format("%r%[Compiling shared object.%]%r", data->main->output.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s); + if (data->main->message.verbosity != f_console_verbosity_quiet_e && data->main->message.verbosity != f_console_verbosity_error_e) { + fll_print_format("%r%[Compiling shared object.%]%r", data->main->message.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s); } f_string_dynamics_t arguments = f_string_dynamics_t_initialize; @@ -96,8 +96,8 @@ 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 && data->main->output.verbosity != f_console_verbosity_error_e) { - fll_print_format("%r%[Compiling static object.%]%r", data->main->output.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s); + if (data->main->message.verbosity != f_console_verbosity_quiet_e && data->main->message.verbosity != f_console_verbosity_error_e) { + fll_print_format("%r%[Compiling static object.%]%r", data->main->message.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s); } f_string_dynamics_t arguments = f_string_dynamics_t_initialize; diff --git a/level_3/fake/c/private-build-object.h b/level_3/fake/c/main/private-build-object.h similarity index 100% rename from level_3/fake/c/private-build-object.h rename to level_3/fake/c/main/private-build-object.h diff --git a/level_3/fake/c/private-build-objects.c b/level_3/fake/c/main/private-build-objects.c similarity index 93% rename from level_3/fake/c/private-build-objects.c rename to level_3/fake/c/main/private-build-objects.c index 94d3be3..928e0c2 100644 --- a/level_3/fake/c/private-build-objects.c +++ b/level_3/fake/c/main/private-build-objects.c @@ -14,8 +14,8 @@ 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 && data->main->output.verbosity != f_console_verbosity_error_e) { - fll_print_format("%r%[Compiling objects for static library.%]%r", data->main->output.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s); + if (data->main->message.verbosity != f_console_verbosity_quiet_e && data->main->message.verbosity != f_console_verbosity_error_e) { + fll_print_format("%r%[Compiling objects for static library.%]%r", data->main->message.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s); } f_string_dynamics_t arguments = f_string_dynamics_t_initialize; @@ -102,13 +102,13 @@ extern "C" { if (*status == F_false) { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QThe path '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, destination_path, data->main->error.notable); fl_print_format("%[' exists but is not a directory.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } *status = F_status_set_error(F_failure); @@ -121,13 +121,13 @@ extern "C" { if (F_status_is_error(*status)) { if (F_status_set_fine(*status) == F_file_found_not) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QThe path '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, destination_path, data->main->error.notable); fl_print_format("%[' could not be created, a parent directory does not exist.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } else { fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_directory_create", F_true, destination_path, f_file_operation_create_s, fll_error_file_type_directory_e); @@ -137,7 +137,7 @@ extern "C" { } if (data->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("Directory '%Q' created.%r", data->main->output.to, destination_path, f_string_eol_s); + fll_print_format("Directory '%Q' created.%r", data->main->message.to, destination_path, f_string_eol_s); } } diff --git a/level_3/fake/c/private-build-objects.h b/level_3/fake/c/main/private-build-objects.h similarity index 100% rename from level_3/fake/c/private-build-objects.h rename to level_3/fake/c/main/private-build-objects.h diff --git a/level_3/fake/c/private-build-program.c b/level_3/fake/c/main/private-build-program.c similarity index 95% rename from level_3/fake/c/private-build-program.c rename to level_3/fake/c/main/private-build-program.c index b5ee219..446ccc7 100644 --- a/level_3/fake/c/private-build-program.c +++ b/level_3/fake/c/main/private-build-program.c @@ -25,8 +25,8 @@ 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 && data->main->output.verbosity != f_console_verbosity_error_e) { - fll_print_format("%r%[Compiling shared program.%]%r", data->main->output.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s); + if (data->main->message.verbosity != f_console_verbosity_quiet_e && data->main->message.verbosity != f_console_verbosity_error_e) { + fll_print_format("%r%[Compiling shared program.%]%r", data->main->message.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s); } f_string_dynamics_t arguments = f_string_dynamics_t_initialize; @@ -119,8 +119,8 @@ 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 && data->main->output.verbosity != f_console_verbosity_error_e) { - fll_print_format("%r%[Compiling static program.%]%r", data->main->output.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s); + if (data->main->message.verbosity != f_console_verbosity_quiet_e && data->main->message.verbosity != f_console_verbosity_error_e) { + fll_print_format("%r%[Compiling static program.%]%r", data->main->message.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s); } f_string_dynamics_t arguments = f_string_dynamics_t_initialize; diff --git a/level_3/fake/c/private-build-program.h b/level_3/fake/c/main/private-build-program.h similarity index 100% rename from level_3/fake/c/private-build-program.h rename to level_3/fake/c/main/private-build-program.h diff --git a/level_3/fake/c/private-build-skeleton.c b/level_3/fake/c/main/private-build-skeleton.c similarity index 92% rename from level_3/fake/c/private-build-skeleton.c rename to level_3/fake/c/main/private-build-skeleton.c index cb77a67..29ac5c3 100644 --- a/level_3/fake/c/private-build-skeleton.c +++ b/level_3/fake/c/main/private-build-skeleton.c @@ -51,8 +51,8 @@ extern "C" { &path_headers, }; - 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, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s); + if (data->main->message.verbosity != f_console_verbosity_quiet_e && data->main->message.verbosity != f_console_verbosity_error_e) { + fll_print_format("%r%[Creating base build directories.%]%r", data->main->message.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s); } bool created = F_false; @@ -113,7 +113,7 @@ extern "C" { } if (created && data->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("Created directory '%Q'.%r", data->main->output.to, *directorys[i], f_string_eol_s); + fll_print_format("Created directory '%Q'.%r", data->main->message.to, *directorys[i], f_string_eol_s); } } // for diff --git a/level_3/fake/c/private-build-skeleton.h b/level_3/fake/c/main/private-build-skeleton.h similarity index 100% rename from level_3/fake/c/private-build-skeleton.h rename to level_3/fake/c/main/private-build-skeleton.h diff --git a/level_3/fake/c/private-build.c b/level_3/fake/c/main/private-build.c similarity index 90% rename from level_3/fake/c/private-build.c rename to level_3/fake/c/main/private-build.c index de21a02..738820b 100644 --- a/level_3/fake/c/private-build.c +++ b/level_3/fake/c/main/private-build.c @@ -349,7 +349,7 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static if (F_status_is_error(*status) || f_file_exists(file_stage, F_true) == F_true || *status == F_child) return; if (fll_program_standard_signal_received(data->main)) { - fll_program_print_signal_received(main->warning, setting->line_first, main->signal_received); + fll_program_print_signal_received(data->main->warning, data->setting->line_first, data->main->signal_received); *status = F_status_set_error(F_interrupt); @@ -357,19 +357,19 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static } f_directory_statuss_t failures = f_directory_statuss_t_initialize; - f_string_dynamic_t path_source = f_string_dynamic_t_initialize; + f_string_dynamic_t path_source = f_string_dynamic_t_initialize; // @todo move this to a shared buffer. f_string_dynamic_t destination_file = f_string_dynamic_t_initialize; 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 && data->main->output.verbosity != f_console_verbosity_error_e) { - fll_print_format("%r%[Copying %Q.%]%r", data->main->output.to, f_string_eol_s, data->main->context.set.important, label, data->main->context.set.important, f_string_eol_s); + if (data->main->message.verbosity != f_console_verbosity_quiet_e && data->main->message.verbosity != f_console_verbosity_error_e) { + fll_print_format("%r%[Copying %Q.%]%r", data->main->message.to, f_string_eol_s, data->main->context.set.important, label, data->main->context.set.important, f_string_eol_s); } *status = f_string_dynamic_resize(source.used, &path_source); if (F_status_is_error(*status)) { - fll_error_print(data->main->error, F_status_set_fine(*status), " f_string_dynamic_resize", F_true); + fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_string_dynamic_resize)); f_string_dynamic_resize(0, &path_source); @@ -381,11 +381,7 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static fl_directory_recurse_t recurse = fl_directory_recurse_t_initialize; if (data->main->error.verbosity >= f_console_verbosity_verbose_e) { - recurse.output.stream = data->main->output.to; - recurse.output.id = data->main->output.to.id; - recurse.output.flag = data->main->output.to.flag; - recurse.output.size_read = data->main->output.to.size_read; - recurse.output.size_write = data->main->output.to.size_write; + recurse.output = data->main->message.to; recurse.verbose = fake_verbose_print_copy; } @@ -395,7 +391,7 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static if (!(i % fake_signal_check_short_d)) { if (fll_program_standard_signal_received(data->main)) { - fll_program_print_signal_received(main->warning, setting->line_first, main->signal_received); + fll_program_print_signal_received(data->main->warning, data->setting->line_first, data->main->signal_received); *status = F_status_set_error(F_interrupt); @@ -412,7 +408,7 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static *status = f_string_dynamic_append_nulless(files.array[i], &path_source); if (F_status_is_error(*status)) { - fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true); + fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_string_dynamic_append_nulless)); break; } @@ -425,7 +421,7 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static *status = f_string_dynamic_append_nulless(destination, &destination_directory); if (F_status_is_error(*status)) { - fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true); + fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_string_dynamic_append_nulless)); break; } @@ -433,7 +429,7 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static *status = f_file_name_base(path_source, &destination_directory); if (F_status_is_error(*status)) { - fll_error_print(data->main->error, F_status_set_fine(*status), "f_file_name_base", F_true); + fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_file_name_base)); break; } @@ -443,11 +439,12 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static if (F_status_is_error(*status)) { if (data->main->error.verbosity >= f_console_verbosity_verbose_e) { for (f_array_length_t j = 0; j < failures.used; ++j) { - fake_print_error_build_operation_file(data, F_status_set_fine(*status), "fl_directory_copy", fake_common_file_directory_copy_s, f_file_operation_to_s, path_source, destination_directory, F_true); + fake_print_error_build_operation_file(data, F_status_set_fine(*status), macro_fake_f(fl_directory_copy), fake_common_file_directory_copy_s, f_file_operation_to_s, path_source, destination_directory, F_true); } // for if (F_status_set_fine(*status) != F_failure) { - fll_error_print(data->main->error, F_status_set_fine(*status), "fl_directory_copy", F_true); + fake_print_error(data->setting, *status, data->main->error, macro_fake_f(fl_directory_copy)); + fll_error_print(data->main->error, F_status_set_fine(*status), "", F_true); } break; @@ -466,6 +463,7 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static *status = f_string_dynamic_append_nulless(destination, &destination_file); if (F_status_is_error(*status)) { + fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_string_dynamic_resize)); fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true); break; @@ -475,6 +473,7 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static *status = f_string_dynamic_append_nulless(destination, &destination_directory); if (F_status_is_error(*status)) { + fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_string_dynamic_resize)); fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true); break; @@ -486,6 +485,7 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static *status = f_file_name_directory(buffer, &destination_directory); if (F_status_is_error(*status)) { + fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_string_dynamic_resize)); fll_error_print(data->main->error, F_status_set_fine(*status), "f_file_name_directory", F_true); break; @@ -502,6 +502,7 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static *status = f_string_append(path_source.string + perserve_offset, path_source.used - perserve_offset, &destination_file); if (F_status_is_error(*status)) { + fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_string_dynamic_resize)); fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_append", F_true); break; @@ -511,6 +512,7 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static *status = f_file_name_base(path_source, &destination_file); if (F_status_is_error(*status)) { + fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_string_dynamic_resize)); fll_error_print(data->main->error, F_status_set_fine(*status), "f_file_name_base", F_true); break; @@ -526,7 +528,7 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static } if (data->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("Copied file '%Q' to '%Q'.%r", data->main->output.to, path_source, destination_file, f_string_eol_s); + fll_print_format("Copied file '%Q' to '%Q'.%r", data->main->message.to, path_source, destination_file, f_string_eol_s); } } else if (F_status_is_error(*status)) { @@ -612,7 +614,7 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static } if (F_status_is_error(*status)) { - fll_error_print(data->main->error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true); + fake_print_error(data->setting, *status, data->main->error, macro_fake_f(fll_execute_arguments_add)); f_string_dynamics_resize(0, &arguments); @@ -630,7 +632,7 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static } // for if (F_status_is_error(*status)) { - fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_dynamic_mash", F_true); + fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_string_dynamic_mash)); f_string_dynamic_resize(0, &defines); f_string_dynamics_resize(0, &arguments); @@ -674,7 +676,7 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static f_string_dynamic_resize(0, &defines); if (F_status_is_error(*status)) { - fll_error_print(data->main->error, F_status_set_fine(*status), "fll_execute_arguments_add_parameter_set", F_true); + fake_print_error(data->setting, *status, data->main->error, macro_fake_f(fll_execute_arguments_add_parameter_set)); f_string_dynamics_resize(0, &arguments); @@ -693,7 +695,7 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static } if (F_status_is_error(*status)) { - fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true); + fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_string_dynamic_append_nulless)); f_string_dynamic_resize(0, &path); f_string_dynamics_resize(0, &arguments); @@ -715,25 +717,17 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static f_string_dynamics_resize(0, &arguments); if (fll_program_standard_signal_received(data->main)) { - fll_program_print_signal_received(main->warning, setting->line_first, main->signal_received); + fll_program_print_signal_received(data->main->warning, data->setting->line_first, data->main->signal_received); *status = F_status_set_error(F_interrupt); } else if (*status != F_child) { if (F_status_is_error(*status)) { if (F_status_set_fine(*status) == F_failure) { - if (data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); - - fl_print_format("%r%[%QFailed to execute script: '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); - fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, path, data->main->error.notable); - fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - - f_file_stream_unlock(data->main->error); - } + fake_print_error_failure_script(data->setting, data->main->error, path); } else { - fll_error_print(data->main->error, F_status_set_fine(*status), "fll_execute_program", F_true); + fake_print_error(data->setting, *status, data->main->error, macro_fake_f(fll_execute_program)); } } else { @@ -757,14 +751,12 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static f_status_t status = f_file_name_base(path, name); if (F_status_is_error(status)) { - fll_error_print(data->main->error, F_status_set_fine(status), "f_file_name_base", F_true); + fake_print_error(data->setting, status, data->main->error, macro_fake_f(f_file_name_base)); return status; } - f_array_length_t i = name->used; - - for (; i > 0; --i) { + for (f_array_length_t i = name->used; i > 0; --i) { if (name->string[i] == f_path_extension_separator_s.string[0]) { name->used = i; @@ -819,7 +811,7 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static f_status_t fake_build_operate(fake_data_t * const data, const f_string_statics_t * const build_arguments, const bool process_pipe) { if (fll_program_standard_signal_received(data->main)) { - fll_program_print_signal_received(main->warning, setting->line_first, main->signal_received); + fll_program_print_signal_received(data->main->warning, data->setting->line_first, data->main->signal_received); return F_status_set_error(F_interrupt); } @@ -835,15 +827,15 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static fake_build_load_setting(data, build_arguments, process_pipe, &data_build.setting, &status); if (F_status_is_fine(status)) { - if (data->main->output.verbosity != f_console_verbosity_quiet_e && data->main->output.verbosity != f_console_verbosity_error_e) { - f_file_stream_lock(data->main->output); + if (data->main->message.verbosity != f_console_verbosity_quiet_e && data->main->message.verbosity != f_console_verbosity_error_e) { + f_file_stream_lock(data->main->message.to); - fl_print_format("%r%[Building%] ", data->main->output.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important); - fl_print_format("%[%Q%]", data->main->output.to, data->main->context.set.notable, data_build.setting.build_name, data->main->context.set.notable); - fl_print_format("%[ using '%]", data->main->output.to, data->main->context.set.important, data->main->context.set.important); - fl_print_format("%[%Q%]", data->main->output.to, data->main->context.set.notable, data->settings, data->main->context.set.notable); + fl_print_format("%r%[Building%] ", data->main->message.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important); + fl_print_format("%[%Q%]", data->main->message.to, data->main->context.set.notable, data_build.setting.build_name, data->main->context.set.notable); + fl_print_format("%[ using '%]", data->main->message.to, data->main->context.set.important, data->main->context.set.important); + fl_print_format("%[%Q%]", data->main->message.to, data->main->context.set.notable, data->settings, data->main->context.set.notable); - fl_print_format("%[' with modes '%]", data->main->output.to, data->main->context.set.important, data->main->context.set.important); + fl_print_format("%[' with modes '%]", data->main->message.to, data->main->context.set.important, data->main->context.set.important); f_string_statics_t modes_custom = f_string_statics_t_initialize; modes_custom.used = build_arguments && build_arguments->used > 1 ? build_arguments->used - 1 : 0; @@ -865,16 +857,16 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static for (f_array_length_t i = 0; i < modes->used; ) { - fl_print_format("%[%Q%]", data->main->output.to, data->main->context.set.notable, modes->array[i], data->main->context.set.notable); + fl_print_format("%[%Q%]", data->main->message.to, data->main->context.set.notable, modes->array[i], data->main->context.set.notable); if (++i < modes->used) { - fl_print_format("%[', '%]", data->main->output.to, data->main->context.set.important, data->main->context.set.important); + fl_print_format("%[', '%]", data->main->message.to, data->main->context.set.important, data->main->context.set.important); } } // for - fl_print_format("%['.%]%r", data->main->output.to, data->main->context.set.important, data->main->context.set.important, f_string_eol_s); + fl_print_format("%['.%]%r", data->main->message.to, data->main->context.set.important, data->main->context.set.important, f_string_eol_s); - f_file_stream_unlock(data->main->output); + f_file_stream_unlock(data->main->message.to); } } @@ -1138,7 +1130,7 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static if (F_status_is_error(*status)) return; if (fll_program_standard_signal_received(data->main)) { - fll_program_print_signal_received(main->warning, setting->line_first, main->signal_received); + fll_program_print_signal_received(data->main->warning, data->setting->line_first, data->main->signal_received); *status = F_status_set_error(F_interrupt); diff --git a/level_3/fake/c/private-build.h b/level_3/fake/c/main/private-build.h similarity index 100% rename from level_3/fake/c/private-build.h rename to level_3/fake/c/main/private-build.h diff --git a/level_3/fake/c/private-clean.c b/level_3/fake/c/main/private-clean.c similarity index 71% rename from level_3/fake/c/private-clean.c rename to level_3/fake/c/main/private-clean.c index 7cff4ce..3ba3167 100644 --- a/level_3/fake/c/private-clean.c +++ b/level_3/fake/c/main/private-clean.c @@ -9,14 +9,14 @@ 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 && data->main->output.verbosity != f_console_verbosity_error_e) { - f_file_stream_lock(data->main->output); + if (data->main->message.verbosity != f_console_verbosity_quiet_e && data->main->message.verbosity != f_console_verbosity_error_e) { + f_file_stream_lock(data->main->message.to); - fl_print_format("%r%[Deleting all files within build directory '%]", data->main->output.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important); - fl_print_format("%[%Q%]", data->main->output.to, data->main->context.set.notable, data->path_build, data->main->context.set.notable); - fl_print_format("%['.%]%r", data->main->output.to, data->main->context.set.important, data->main->context.set.important, f_string_eol_s); + fl_print_format("%r%[Deleting all files within build directory '%]", data->main->message.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important); + fl_print_format("%[%Q%]", data->main->message.to, data->main->context.set.notable, data->path_build, data->main->context.set.notable); + fl_print_format("%['.%]%r", data->main->message.to, data->main->context.set.important, data->main->context.set.important, f_string_eol_s); - f_file_stream_unlock(data->main->output); + f_file_stream_unlock(data->main->message.to); } f_status_t status = F_none; @@ -55,8 +55,10 @@ extern "C" { if (!result) { + const f_file_t output = macro_f_file_t_initialize_stream(F_type_output_d); + // @todo in order to get this working, the recursive function that calls this needs to be rewritten with more flexibility or provide a higher-level equivalent function. - fll_print_format("Removed '%S'.%r", F_type_input_d, path, f_string_eol_s); + fll_print_format("Removed '%S'.%r", output, path, f_string_eol_s); } return result; diff --git a/level_3/fake/c/private-clean.h b/level_3/fake/c/main/private-clean.h similarity index 100% rename from level_3/fake/c/private-clean.h rename to level_3/fake/c/main/private-clean.h diff --git a/level_3/fake/c/private-common.c b/level_3/fake/c/main/private-common.c similarity index 100% rename from level_3/fake/c/private-common.c rename to level_3/fake/c/main/private-common.c diff --git a/level_3/fake/c/private-common.h b/level_3/fake/c/main/private-common.h similarity index 99% rename from level_3/fake/c/private-common.h rename to level_3/fake/c/main/private-common.h index aab5dff..09b7e22 100644 --- a/level_3/fake/c/private-common.h +++ b/level_3/fake/c/main/private-common.h @@ -13,13 +13,23 @@ extern "C" { #endif /** - * The program data. + * The program flags. * * fake_data_flag_*: * - has_operation: Designate that an operation is explicitly passed. + */ +#ifndef _di_fake_data_flag_e_ + enum { + fake_data_flag_operation_e = 0x1, + }; +#endif // _di_fake_data_flag_e_ + +/** + * The program data. * - * argv: The argument structure in the progam data parameters for simplifying syntax. - * at: The processed at parameter value. + * main: The main program data. + * setting: The settings data. + * argv: The argument structure in the progam data parameters for simplifying syntax. * * flag: A set of flags, such as designating that no operations are provided. * operation: A code representing the currrent operation. @@ -80,12 +90,9 @@ extern "C" { * mode: The mode data. */ #ifndef _di_fake_data_t_ - enum { - fake_data_flag_has_operation_e = 0x1, - }; - typedef struct { fll_program_data_t *main; + fake_setting_t *setting; f_string_static_t *argv; uint8_t flag; @@ -155,6 +162,7 @@ extern "C" { 0, \ 0, \ 0, \ + 0, \ f_string_dynamic_t_initialize, \ f_string_dynamic_t_initialize, \ f_string_dynamic_t_initialize, \ diff --git a/level_3/fake/c/private-fake-path_generate.c b/level_3/fake/c/main/private-fake-path_generate.c similarity index 100% rename from level_3/fake/c/private-fake-path_generate.c rename to level_3/fake/c/main/private-fake-path_generate.c diff --git a/level_3/fake/c/private-fake-path_generate.h b/level_3/fake/c/main/private-fake-path_generate.h similarity index 100% rename from level_3/fake/c/private-fake-path_generate.h rename to level_3/fake/c/main/private-fake-path_generate.h diff --git a/level_3/fake/c/private-fake.c b/level_3/fake/c/main/private-fake.c similarity index 92% rename from level_3/fake/c/private-fake.c rename to level_3/fake/c/main/private-fake.c index c02ed63..26ec25b 100644 --- a/level_3/fake/c/private-fake.c +++ b/level_3/fake/c/main/private-fake.c @@ -13,23 +13,21 @@ extern "C" { if (F_status_is_error(*status)) return 1; if (data->main->error.verbosity >= f_console_verbosity_verbose_e) { - f_file_stream_lock(data->main->output); + f_file_stream_lock(data->main->message.to); - f_print_dynamic(program, data->main->output.to); + f_print_dynamic(program, data->main->message.to); for (f_array_length_t i = 0; i < arguments.used; ++i) { if (!arguments.array[i].used) continue; - fl_print_format(" %Q", data->main->output.to, arguments.array[i]); + fl_print_format(" %Q", data->main->message.to, arguments.array[i]); } // for - f_print_dynamic_raw(f_string_eol_s, data->main->output.to); + f_print_dynamic_raw(f_string_eol_s, data->main->message.to); - f_file_stream_unlock(data->main->output); - - // Flush to stdout before executing command. - f_file_stream_flush(data->main->output.to); + f_file_stream_flush(data->main->message.to); + f_file_stream_unlock(data->main->message.to); } int return_code = 0; @@ -46,7 +44,7 @@ extern "C" { *status = fll_execute_program(program, arguments, ¶meter, 0, (void *) &return_code); if (fll_program_standard_signal_received(data->main)) { - fll_program_print_signal_received(main->warning, setting->line_first, main->signal_received); + fll_program_print_signal_received(data->main->warning, data->setting->line_first, data->main->signal_received); *status = F_status_set_error(F_interrupt); @@ -67,13 +65,13 @@ extern "C" { if (F_status_set_fine(*status) == F_file_found_not) { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QFailed to find program '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, program, data->main->error.notable); fl_print_format("%[' for executing.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } } else { @@ -89,7 +87,7 @@ extern "C" { f_status_t fake_file_buffer(fake_data_t * const data, const f_string_static_t path_file, const bool required, f_string_dynamic_t * const buffer) { if (fll_program_standard_signal_received(data->main)) { - fll_program_print_signal_received(main->warning, setting->line_first, main->signal_received); + fll_program_print_signal_received(data->main->warning, data->setting->line_first, data->main->signal_received); return F_status_set_error(F_interrupt); } @@ -173,7 +171,7 @@ extern "C" { do { if (fll_program_standard_signal_received(data->main)) { - fll_program_print_signal_received(main->warning, setting->line_first, main->signal_received); + fll_program_print_signal_received(data->main->warning, data->setting->line_first, data->main->signal_received); return F_status_set_error(F_interrupt); } @@ -256,13 +254,13 @@ extern "C" { if (F_status_is_error(status)) { if (fll_error_print(data->main->error, F_status_set_fine(status), "f_utf_is_word_dash_plus", F_false) == F_known_not && data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QFailed to process the parameter '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, fake_long_process_s, data->main->error.notable); fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } return status; @@ -270,7 +268,7 @@ extern "C" { if (status == F_false) { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QThe '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, fake_long_process_s, data->main->error.notable); @@ -278,7 +276,7 @@ extern "C" { fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, data->main->parameters.arguments.array[index], data->main->error.notable); fl_print_format("%[' contains non-word, non-dash, and non-plus characters.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } return F_status_set_error(F_parameter); @@ -299,13 +297,13 @@ extern "C" { if (F_status_is_error(status)) { if (status == F_status_set_error(F_string_too_large)) { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QThe parameter '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%r%Q%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, parameters_name[i], data->main->error.notable); fl_print_format("%[' is too long.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } } else { @@ -320,13 +318,13 @@ extern "C" { if (!data->main->parameters.arguments.array[index].used || status == F_data_not) { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QThe parameter '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, parameters_name[i], data->main->error.notable); fl_print_format("%[' must not be empty and must not contain only white space.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } } } @@ -414,13 +412,13 @@ extern "C" { if (F_status_is_error(status)) { if (fll_error_print(data->main->error, F_status_set_fine(status), "f_path_directory_cleanup", F_false) == F_known_not && data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QFailed to process parameter '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, parameters_name[i], data->main->error.notable); fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } return status; @@ -441,13 +439,13 @@ extern "C" { if (F_status_is_error(status)) { if (fll_error_print(data->main->error, F_status_set_fine(status), " f_string_dynamic_append", F_false) == F_known_not && data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QFailed to load default for the parameter '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, parameters_name[i], data->main->error.notable); fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } return status; @@ -461,13 +459,13 @@ extern "C" { if (F_status_is_error(status)) { if (fll_error_print(data->main->error, F_status_set_fine(status), "fll_program_parameter_additional_rip", F_false) == F_known_not && data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QFailed to process the parameter '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, fake_long_define_s, data->main->error.notable); fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } return status; @@ -485,13 +483,13 @@ extern "C" { if (F_status_is_error(status)) { if (fll_error_print(data->main->error, F_status_set_fine(status), "fll_program_parameter_additional_rip", F_false) == F_known_not && data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QFailed to process the parameter '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, fake_long_mode_s, data->main->error.notable); fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } return status; @@ -511,13 +509,13 @@ extern "C" { if (F_status_is_error(status)) { if (fll_error_print(data->main->error, F_status_set_fine(status), "f_utf_is_word_dash_plus", F_false) == F_known_not && data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QFailed to process the parameter '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, fake_long_mode_s, data->main->error.notable); fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } return status; @@ -525,7 +523,7 @@ extern "C" { if (status == F_false) { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QThe '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, fake_long_mode_s, data->main->error.notable); @@ -533,7 +531,7 @@ extern "C" { fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, data->mode.array[i], data->main->error.notable); fl_print_format("%[' contains non-word, non-dash, and non-plus characters.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } return F_status_set_error(F_parameter); @@ -550,7 +548,7 @@ extern "C" { f_status_t fake_validate_parameter_paths(fake_data_t * const data) { if (fll_program_standard_signal_received(data->main)) { - fll_program_print_signal_received(main->warning, setting->line_first, main->signal_received); + fll_program_print_signal_received(data->main->warning, data->setting->line_first, data->main->signal_received); return F_status_set_error(F_interrupt); } @@ -640,13 +638,13 @@ extern "C" { } } else if (parameters_required[i] == F_true) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QNo valid path for the (required) directory parameter '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, parameters_name[i], data->main->error.notable); fl_print_format("%[' was found.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); return F_status_set_error(F_directory_found_not); } diff --git a/level_3/fake/c/private-fake.h b/level_3/fake/c/main/private-fake.h similarity index 100% rename from level_3/fake/c/private-fake.h rename to level_3/fake/c/main/private-fake.h diff --git a/level_3/fake/c/private-make-load_fakefile.c b/level_3/fake/c/main/private-make-load_fakefile.c similarity index 98% rename from level_3/fake/c/private-make-load_fakefile.c rename to level_3/fake/c/main/private-make-load_fakefile.c index 5a63981..14c7992 100644 --- a/level_3/fake/c/private-make-load_fakefile.c +++ b/level_3/fake/c/main/private-make-load_fakefile.c @@ -16,7 +16,7 @@ extern "C" { if (F_status_is_error(*status)) return; if (fll_program_standard_signal_received(data_make->main)) { - fll_program_print_signal_received(main->warning, setting->line_first, main->signal_received); + fll_program_print_signal_received(data_make->main->warning, data_make->setting->line_first, data_make->main->signal_received); *status = F_status_set_error(F_interrupt); @@ -120,7 +120,7 @@ extern "C" { if (!(i % fake_signal_check_short_d)) { if (fll_program_standard_signal_received(data_make->main)) { - fll_program_print_signal_received(main->warning, setting->line_first, main->signal_received); + fll_program_print_signal_received(data_make->main->warning, data_make->setting->line_first, data_make->main->signal_received); *status = F_status_set_error(F_interrupt); @@ -450,13 +450,13 @@ extern "C" { } else { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QInvalid characters in the define setting name '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, define.array[i].name, data->main->error.notable); fl_print_format("%[', only alpha-numeric ASCII characters and underscore (without a leading digit) are allowed.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } status = F_status_set_error(F_failure); diff --git a/level_3/fake/c/private-make-load_fakefile.h b/level_3/fake/c/main/private-make-load_fakefile.h similarity index 100% rename from level_3/fake/c/private-make-load_fakefile.h rename to level_3/fake/c/main/private-make-load_fakefile.h diff --git a/level_3/fake/c/private-make-load_parameters.c b/level_3/fake/c/main/private-make-load_parameters.c similarity index 100% rename from level_3/fake/c/private-make-load_parameters.c rename to level_3/fake/c/main/private-make-load_parameters.c diff --git a/level_3/fake/c/private-make-load_parameters.h b/level_3/fake/c/main/private-make-load_parameters.h similarity index 100% rename from level_3/fake/c/private-make-load_parameters.h rename to level_3/fake/c/main/private-make-load_parameters.h diff --git a/level_3/fake/c/private-make-operate.c b/level_3/fake/c/main/private-make-operate.c similarity index 96% rename from level_3/fake/c/private-make-operate.c rename to level_3/fake/c/main/private-make-operate.c index 496cdce..5588975 100644 --- a/level_3/fake/c/private-make-operate.c +++ b/level_3/fake/c/main/private-make-operate.c @@ -17,33 +17,33 @@ extern "C" { f_status_t fake_make_operate(fake_data_t * const data) { if (fll_program_standard_signal_received(data->main)) { - fll_program_print_signal_received(main->warning, setting->line_first, main->signal_received); + fll_program_print_signal_received(data->main->warning, data->setting->line_first, data->main->signal_received); return F_status_set_error(F_interrupt); } - if (data->main->output.verbosity != f_console_verbosity_quiet_e && data->main->output.verbosity != f_console_verbosity_error_e) { - f_file_stream_lock(data->main->output); + if (data->main->message.verbosity != f_console_verbosity_quiet_e && data->main->message.verbosity != f_console_verbosity_error_e) { + f_file_stream_lock(data->main->message.to); - fl_print_format("%r%[Now making using '%]", data->main->output.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important); - fl_print_format("%[%Q%]", data->main->output.to, data->main->context.set.notable, data->fakefile, data->main->context.set.notable); + fl_print_format("%r%[Now making using '%]", data->main->message.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important); + fl_print_format("%[%Q%]", data->main->message.to, data->main->context.set.notable, data->fakefile, data->main->context.set.notable); if (data->mode.used) { - fl_print_format("%[' with modes '%]", data->main->output.to, data->main->context.set.important, data->main->context.set.important); + fl_print_format("%[' with modes '%]", data->main->message.to, data->main->context.set.important, data->main->context.set.important); for (f_array_length_t i = 0; i < data->mode.used; ) { - fl_print_format("%[%Q%]", data->main->output.to, data->main->context.set.notable, data->mode.array[i], data->main->context.set.notable); + fl_print_format("%[%Q%]", data->main->message.to, data->main->context.set.notable, data->mode.array[i], data->main->context.set.notable); if (++i < data->mode.used) { - fl_print_format("%[', '%]", data->main->output.to, data->main->context.set.important, data->main->context.set.important); + fl_print_format("%[', '%]", data->main->message.to, data->main->context.set.important, data->main->context.set.important); } } // for } - fl_print_format("%['.%]%r", data->main->output.to, data->main->context.set.important, data->main->context.set.important, f_string_eol_s); + fl_print_format("%['.%]%r", data->main->message.to, data->main->context.set.important, data->main->context.set.important, f_string_eol_s); - f_file_stream_unlock(data->main->output); + f_file_stream_unlock(data->main->message.to); } f_status_t status = F_none; @@ -126,7 +126,7 @@ extern "C" { data_make.error.set = &data->main->context.set; } - data_make.error.verbosity = data->main->output.verbosity; + data_make.error.verbosity = data->main->message.verbosity; if (data->main->parameters.remaining.used) { f_array_length_t i = 0; @@ -1250,14 +1250,14 @@ 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 && data_make->main->output.verbosity != f_console_verbosity_error_e) { - f_file_stream_lock(data_make->output.to); + if (data_make->main->message.verbosity != f_console_verbosity_quiet_e && data_make->main->message.verbosity != f_console_verbosity_error_e) { + f_file_stream_lock(data_make->message.to); - fl_print_format("%r%[Processing Section '%]", data_make->main->output.to, f_string_eol_s, data_make->main->context.set.important, data_make->main->context.set.important); - fl_print_format("%[%/Q%]", data_make->main->output.to, data_make->main->context.set.notable, data_make->buffer, section->name, data_make->main->context.set.notable); - fl_print_format("%['.%]%r", data_make->main->output.to, data_make->main->context.set.important, data_make->main->context.set.important, f_string_eol_s); + fl_print_format("%r%[Processing Section '%]", data_make->main->message.to, f_string_eol_s, data_make->main->context.set.important, data_make->main->context.set.important); + fl_print_format("%[%/Q%]", data_make->main->message.to, data_make->main->context.set.notable, data_make->buffer, section->name, data_make->main->context.set.notable); + fl_print_format("%['.%]%r", data_make->main->message.to, data_make->main->context.set.important, data_make->main->context.set.important, f_string_eol_s); - f_file_stream_unlock(data_make->output.to); + f_file_stream_unlock(data_make->message.to); } if (!section->objects.used) { @@ -1361,7 +1361,7 @@ extern "C" { if (!(i % fake_signal_check_short_d)) { if (fll_program_standard_signal_received(data_make->main)) { - fll_program_print_signal_received(main->warning, setting->line_first, main->signal_received); + fll_program_print_signal_received(data_make->main->warning, data_make->setting->line_first, data_make->main->signal_received); *status = F_status_set_error(F_interrupt); diff --git a/level_3/fake/c/private-make-operate.h b/level_3/fake/c/main/private-make-operate.h similarity index 100% rename from level_3/fake/c/private-make-operate.h rename to level_3/fake/c/main/private-make-operate.h diff --git a/level_3/fake/c/private-make-operate_block.c b/level_3/fake/c/main/private-make-operate_block.c similarity index 100% rename from level_3/fake/c/private-make-operate_block.c rename to level_3/fake/c/main/private-make-operate_block.c diff --git a/level_3/fake/c/private-make-operate_block.h b/level_3/fake/c/main/private-make-operate_block.h similarity index 100% rename from level_3/fake/c/private-make-operate_block.h rename to level_3/fake/c/main/private-make-operate_block.h diff --git a/level_3/fake/c/private-make-operate_process.c b/level_3/fake/c/main/private-make-operate_process.c similarity index 96% rename from level_3/fake/c/private-make-operate_process.c rename to level_3/fake/c/main/private-make-operate_process.c index 9434804..9f059f4 100644 --- a/level_3/fake/c/private-make-operate_process.c +++ b/level_3/fake/c/main/private-make-operate_process.c @@ -287,7 +287,7 @@ extern "C" { if (!program.used && !arguments.used) return F_data_not; if (fll_program_standard_signal_received(data_make->main)) { - fll_program_print_signal_received(main->warning, setting->line_first, main->signal_received); + fll_program_print_signal_received(data_make->main->warning, data_make->setting->line_first, data_make->main->signal_received); return F_status_set_error(F_interrupt); } @@ -323,32 +323,32 @@ extern "C" { } if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { - f_file_stream_lock(data_make->output.to); + f_file_stream_lock(data_make->message.to); f_array_length_t i = 0; if (program.used) { - f_print_dynamic_safely(program, data_make->main->output.to); + f_print_dynamic_safely(program, data_make->main->message.to); } else { i = 1; - f_print_dynamic_safely(arguments.array[0], data_make->main->output.to); + f_print_dynamic_safely(arguments.array[0], data_make->main->message.to); } for (; i < arguments.used; ++i) { if (arguments.array[i].used) { - fll_print_format(" %Q", data_make->main->output.to, arguments.array[i]); + fll_print_format(" %Q", data_make->main->message.to, arguments.array[i]); } } // for - f_print_dynamic_raw(f_string_eol_s, data_make->main->output.to); + f_print_dynamic_raw(f_string_eol_s, data_make->main->message.to); - f_file_stream_unlock(data_make->output.to); + f_file_stream_unlock(data_make->message.to); // Flush to stdout before executing command. - f_file_stream_flush(data_make->main->output.to); + f_file_stream_flush(data_make->main->message.to); } int return_code = 0; @@ -363,7 +363,7 @@ extern "C" { status = fll_execute_program(program, arguments, ¶meter, 0, (void *) &return_code); if (fll_program_standard_signal_received(data_make->main)) { - fll_program_print_signal_received(main->warning, setting->line_first, main->signal_received); + fll_program_print_signal_received(data_make->main->warning, data_make->setting->line_first, data_make->main->signal_received); return F_status_set_error(F_interrupt); } diff --git a/level_3/fake/c/private-make-operate_process.h b/level_3/fake/c/main/private-make-operate_process.h similarity index 100% rename from level_3/fake/c/private-make-operate_process.h rename to level_3/fake/c/main/private-make-operate_process.h diff --git a/level_3/fake/c/private-make-operate_process_type.c b/level_3/fake/c/main/private-make-operate_process_type.c similarity index 93% rename from level_3/fake/c/private-make-operate_process_type.c rename to level_3/fake/c/main/private-make-operate_process_type.c index 1c20f49..46c6a44 100644 --- a/level_3/fake/c/private-make-operate_process_type.c +++ b/level_3/fake/c/main/private-make-operate_process_type.c @@ -30,13 +30,13 @@ extern "C" { } if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { - f_file_stream_lock(data_make->output.to); + f_file_stream_lock(data_make->message.to); - fl_print_format("%rBreaking as '", data_make->main->output.to, f_string_eol_s); - fl_print_format("%[%Q%]", data_make->main->output.to, data_make->main->context.set.notable, data_make->cache_arguments.used ? data_make->cache_arguments.array[0] : fake_make_operation_argument_success_s, data_make->main->context.set.notable); - fl_print_format("'.%r", data_make->main->output.to, f_string_eol_s); + fl_print_format("%rBreaking as '", data_make->main->message.to, f_string_eol_s); + fl_print_format("%[%Q%]", data_make->main->message.to, data_make->main->context.set.notable, data_make->cache_arguments.used ? data_make->cache_arguments.array[0] : fake_make_operation_argument_success_s, data_make->main->context.set.notable); + fl_print_format("'.%r", data_make->main->message.to, f_string_eol_s); - f_file_stream_unlock(data_make->output.to); + f_file_stream_unlock(data_make->message.to); } return status; @@ -216,7 +216,7 @@ extern "C" { if (clone) { if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { - recurse.output = data_make->main->output.to; + recurse.output = data_make->main->message.to; recurse.verbose = fake_verbose_print_clone; } @@ -226,7 +226,7 @@ extern "C" { macro_f_mode_t_set_default_umask(mode, data_make->main->umask); if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { - recurse.output = data_make->main->output.to; + recurse.output = data_make->main->message.to; recurse.verbose = fake_verbose_print_copy; } } @@ -327,12 +327,12 @@ extern "C" { } if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { - f_file_stream_lock(data_make->output.to); + f_file_stream_lock(data_make->message.to); - fl_print_format("%r%s '%[%Q%]' to '", data_make->main->output.to, f_string_eol_s, clone ? "Cloned" : "Copied", data_make->main->context.set.notable, data_make->cache_arguments.array[i], data_make->main->context.set.notable); - fl_print_format("%[%Q%]'.%r", data_make->main->output.to, data_make->main->context.set.notable, destination, data_make->main->context.set.notable, f_string_eol_s); + fl_print_format("%r%s '%[%Q%]' to '", data_make->main->message.to, f_string_eol_s, clone ? "Cloned" : "Copied", data_make->main->context.set.notable, data_make->cache_arguments.array[i], data_make->main->context.set.notable); + fl_print_format("%[%Q%]'.%r", data_make->main->message.to, data_make->main->context.set.notable, destination, data_make->main->context.set.notable, f_string_eol_s); - f_file_stream_unlock(data_make->output.to); + f_file_stream_unlock(data_make->message.to); } } else if (F_status_is_error(status_file)) { @@ -362,7 +362,7 @@ extern "C" { fll_error_print(data_make->error, F_status_set_fine(status), "f_environment_set", F_true); } else if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("%rDefined environment variable '%[%Q%]'.%r", data_make->main->output.to, f_string_eol_s, data_make->main->context.set.notable, data_make->cache_arguments.array[0], data_make->main->context.set.notable, f_string_eol_s); + fll_print_format("%rDefined environment variable '%[%Q%]'.%r", data_make->main->message.to, f_string_eol_s, data_make->main->context.set.notable, data_make->cache_arguments.array[0], data_make->main->context.set.notable, f_string_eol_s); } return status; @@ -413,7 +413,7 @@ extern "C" { if (F_status_set_fine(status) == F_file_found_not) { if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("%rThe directory '%[%Q%]' does not exist.%r", data_make->main->output.to, f_string_eol_s, data_make->main->context.set.notable, data_make->cache_arguments.array[i], data_make->main->context.set.notable, f_string_eol_s); + fll_print_format("%rThe directory '%[%Q%]' does not exist.%r", data_make->main->message.to, f_string_eol_s, data_make->main->context.set.notable, data_make->cache_arguments.array[i], data_make->main->context.set.notable, f_string_eol_s); } status = F_none; @@ -426,7 +426,7 @@ extern "C" { } if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("%rRemoved '%[%Q%]'.%r", data_make->main->output.to, f_string_eol_s, data_make->main->context.set.notable, data_make->cache_arguments.array[i], data_make->main->context.set.notable, f_string_eol_s); + fll_print_format("%rRemoved '%[%Q%]'.%r", data_make->main->message.to, f_string_eol_s, data_make->main->context.set.notable, data_make->cache_arguments.array[i], data_make->main->context.set.notable, f_string_eol_s); } } else { @@ -434,7 +434,7 @@ extern "C" { if (F_status_set_fine(status) == F_file_found_not) { if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("%rThe file '%[%Q%]' does not exist.%r", data_make->main->output.to, f_string_eol_s, data_make->main->context.set.notable, data_make->cache_arguments.array[i], data_make->main->context.set.notable, f_string_eol_s); + fll_print_format("%rThe file '%[%Q%]' does not exist.%r", data_make->main->message.to, f_string_eol_s, data_make->main->context.set.notable, data_make->cache_arguments.array[i], data_make->main->context.set.notable, f_string_eol_s); } status = F_none; @@ -447,7 +447,7 @@ extern "C" { } if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("%rRemoved '%[%Q%]'.%r", data_make->main->output.to, f_string_eol_s, data_make->main->context.set.notable, data_make->cache_arguments.array[i], data_make->main->context.set.notable, f_string_eol_s); + fll_print_format("%rRemoved '%[%Q%]'.%r", data_make->main->message.to, f_string_eol_s, data_make->main->context.set.notable, data_make->cache_arguments.array[i], data_make->main->context.set.notable, f_string_eol_s); } } } // for @@ -482,7 +482,7 @@ extern "C" { } if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("%rExiting as '%[%Q%]'.%r", data_make->main->output.to, f_string_eol_s, data_make->main->context.set.notable, data_make->cache_arguments.used ? data_make->cache_arguments.array[0] : fake_make_operation_argument_success_s, data_make->main->context.set.notable, f_string_eol_s); + fll_print_format("%rExiting as '%[%Q%]'.%r", data_make->main->message.to, f_string_eol_s, data_make->main->context.set.notable, data_make->cache_arguments.used ? data_make->cache_arguments.array[0] : fake_make_operation_argument_success_s, data_make->main->context.set.notable, f_string_eol_s); } return status; @@ -519,23 +519,23 @@ extern "C" { } if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { - f_file_stream_lock(data_make->output.to); + f_file_stream_lock(data_make->message.to); - f_print_terminated("Set failure state to '", data_make->main->output.to); + f_print_terminated("Set failure state to '", data_make->main->message.to); if (data_make->setting_make.fail == fake_make_operation_fail_type_exit_e) { - fl_print_format("%[%r%]", data_make->main->output.to, data_make->main->context.set.notable, fake_make_operation_argument_exit_s, data_make->main->context.set.notable); + fl_print_format("%[%r%]", data_make->main->message.to, data_make->main->context.set.notable, fake_make_operation_argument_exit_s, data_make->main->context.set.notable); } else if (data_make->setting_make.fail == fake_make_operation_fail_type_warn_e) { - fl_print_format("%[%r%]", data_make->main->output.to, data_make->main->context.set.notable, fake_make_operation_argument_warn_s, data_make->main->context.set.notable); + fl_print_format("%[%r%]", data_make->main->message.to, data_make->main->context.set.notable, fake_make_operation_argument_warn_s, data_make->main->context.set.notable); } else { - fl_print_format("%[%r%]", data_make->main->output.to, data_make->main->context.set.notable, fake_make_operation_argument_ignore_s, data_make->main->context.set.notable); + fl_print_format("%[%r%]", data_make->main->message.to, data_make->main->context.set.notable, fake_make_operation_argument_ignore_s, data_make->main->context.set.notable); } - fl_print_format("'.%r", data_make->main->output.to, f_string_eol_s); + fl_print_format("'.%r", data_make->main->message.to, f_string_eol_s); - f_file_stream_unlock(data_make->output.to); + f_file_stream_unlock(data_make->message.to); } } #endif // _di_fake_make_operate_process_type_fail_ @@ -581,12 +581,12 @@ extern "C" { } if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { - f_file_stream_lock(data_make->output.to); + f_file_stream_lock(data_make->message.to); - fl_print_format("%r group of '%[%r%]", data_make->main->output.to, all ? "Recursively changed" : "Changed", data_make->main->context.set.notable, data_make->cache_arguments.array[i], data_make->main->context.set.notable); - fl_print_format("' to %[%ul%].%r", data_make->main->output.to, data_make->main->context.set.notable, id, data_make->main->context.set.notable, f_string_eol_s); + fl_print_format("%r group of '%[%r%]", data_make->main->message.to, all ? "Recursively changed" : "Changed", data_make->main->context.set.notable, data_make->cache_arguments.array[i], data_make->main->context.set.notable); + fl_print_format("' to %[%ul%].%r", data_make->main->message.to, data_make->main->context.set.notable, id, data_make->main->context.set.notable, f_string_eol_s); - f_file_stream_unlock(data_make->output.to); + f_file_stream_unlock(data_make->message.to); } } // for @@ -1363,12 +1363,12 @@ extern "C" { } if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { - f_file_stream_lock(data_make->output.to); + f_file_stream_lock(data_make->message.to); - fl_print_format("Created symbolic link from '%[%Q%]", data_make->main->output.to, data_make->main->context.set.notable, data_make->cache_arguments.array[data_make->cache_arguments.used - 1], data_make->main->context.set.notable); - fl_print_format("' to %[%Q%].%r", data_make->main->output.to, data_make->main->context.set.notable, data_make->cache_arguments.array[0], data_make->main->context.set.notable, f_string_eol_s); + fl_print_format("Created symbolic link from '%[%Q%]", data_make->main->message.to, data_make->main->context.set.notable, data_make->cache_arguments.array[data_make->cache_arguments.used - 1], data_make->main->context.set.notable); + fl_print_format("' to %[%Q%].%r", data_make->main->message.to, data_make->main->context.set.notable, data_make->cache_arguments.array[0], data_make->main->context.set.notable, f_string_eol_s); - f_file_stream_unlock(data_make->output.to); + f_file_stream_unlock(data_make->message.to); } return F_none; @@ -1426,7 +1426,7 @@ extern "C" { } if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("Changed mode of '%Q' to %#@u.%r", data_make->main->output.to, data_make->cache_arguments.array[i], mode, f_string_eol_s); + fll_print_format("Changed mode of '%Q' to %#@u.%r", data_make->main->message.to, data_make->cache_arguments.array[i], mode, f_string_eol_s); } } // for @@ -1446,7 +1446,7 @@ extern "C" { f_string_static_t destination = f_string_static_t_initialize; if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { - recurse.output = data_make->main->output.to; + recurse.output = data_make->main->message.to; recurse.verbose = fake_verbose_print_move; } @@ -1593,7 +1593,7 @@ extern "C" { } if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("%s owner of '%Q' to %u.%r", data_make->main->output.to, all ? "Recursively changed" : "Changed", data_make->cache_arguments.array[i], id, f_string_eol_s); + fll_print_format("%s owner of '%Q' to %u.%r", data_make->main->message.to, all ? "Recursively changed" : "Changed", data_make->cache_arguments.array[i], id, f_string_eol_s); } } // for @@ -1712,12 +1712,12 @@ extern "C" { // The created relative path is for verbosity purposes and as such its failure to be processed should not be treated as a failure of the function. if (F_status_is_error(status)) { fll_error_print(data_make->error, F_status_set_fine(status), "fake_make_path_relative", F_true); - fll_print_format("Changed to project path '%[%Q%]'.%r", data_make->main->output.to, data_make->main->context.set.notable, argument, data_make->main->context.set.notable, f_string_eol_s); + fll_print_format("Changed to project path '%[%Q%]'.%r", data_make->main->message.to, data_make->main->context.set.notable, argument, data_make->main->context.set.notable, f_string_eol_s); return F_status_set_error(F_failure); } - fll_print_format("Changed to project path '%[%Q%]'.%r", data_make->main->output.to, data_make->main->context.set.notable, data_make->cache_path, data_make->main->context.set.notable, f_string_eol_s); + fll_print_format("Changed to project path '%[%Q%]'.%r", data_make->main->message.to, data_make->main->context.set.notable, data_make->cache_path, data_make->main->context.set.notable, f_string_eol_s); } return F_none; @@ -1773,12 +1773,12 @@ extern "C" { } // for } - f_file_stream_lock(data_make->output.to); + f_file_stream_lock(data_make->message.to); - fll_print_dynamic_raw(data_make->cache_1, data_make->main->output.to); - fll_print_dynamic_raw(f_string_eol_s, data_make->main->output.to); + fll_print_dynamic_raw(data_make->cache_1, data_make->main->message.to); + fll_print_dynamic_raw(f_string_eol_s, data_make->main->message.to); - f_file_stream_unlock(data_make->output.to); + f_file_stream_unlock(data_make->message.to); return F_none; } @@ -1846,10 +1846,10 @@ extern "C" { // The created relative path is for verbosity purposes and as such its failure to be processed should not be treated as a failure of the function. if (F_status_is_error(status)) { fll_error_print(data_make->error, F_status_set_fine(status), "fake_make_path_relative", F_true); - fll_print_format("Changed to project path '%[%Q%]'.%r", data_make->main->output.to, data_make->main->context.set.notable, data_make->path.stack.array[data_make->path.stack.used], data_make->main->context.set.notable, f_string_eol_s); + fll_print_format("Changed to project path '%[%Q%]'.%r", data_make->main->message.to, data_make->main->context.set.notable, data_make->path.stack.array[data_make->path.stack.used], data_make->main->context.set.notable, f_string_eol_s); } else { - fll_print_format("Changed to project path '%[%Q%]'.%r", data_make->main->output.to, data_make->main->context.set.notable, data_make->cache_path, data_make->main->context.set.notable, f_string_eol_s); + fll_print_format("Changed to project path '%[%Q%]'.%r", data_make->main->message.to, data_make->main->context.set.notable, data_make->cache_path, data_make->main->context.set.notable, f_string_eol_s); } } @@ -1874,7 +1874,7 @@ extern "C" { } if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("Changed to project path ''.%r", data_make->main->output.to, f_string_eol_s); + fll_print_format("Changed to project path ''.%r", data_make->main->message.to, f_string_eol_s); } // Clear stack, except for the project root. @@ -1928,7 +1928,7 @@ extern "C" { } if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("Touched '%[%Q%]'.%r", data_make->main->output.to, data_make->main->context.set.notable, data_make->cache_arguments.array[i], data_make->main->context.set.notable, f_string_eol_s); + fll_print_format("Touched '%[%Q%]'.%r", data_make->main->message.to, data_make->main->context.set.notable, data_make->cache_arguments.array[i], data_make->main->context.set.notable, f_string_eol_s); } } // for diff --git a/level_3/fake/c/private-make-operate_process_type.h b/level_3/fake/c/main/private-make-operate_process_type.h similarity index 100% rename from level_3/fake/c/private-make-operate_process_type.h rename to level_3/fake/c/main/private-make-operate_process_type.h diff --git a/level_3/fake/c/private-make-operate_validate.c b/level_3/fake/c/main/private-make-operate_validate.c similarity index 100% rename from level_3/fake/c/private-make-operate_validate.c rename to level_3/fake/c/main/private-make-operate_validate.c diff --git a/level_3/fake/c/private-make-operate_validate.h b/level_3/fake/c/main/private-make-operate_validate.h similarity index 100% rename from level_3/fake/c/private-make-operate_validate.h rename to level_3/fake/c/main/private-make-operate_validate.h diff --git a/level_3/fake/c/private-make-operate_validate_type.c b/level_3/fake/c/main/private-make-operate_validate_type.c similarity index 100% rename from level_3/fake/c/private-make-operate_validate_type.c rename to level_3/fake/c/main/private-make-operate_validate_type.c diff --git a/level_3/fake/c/private-make-operate_validate_type.h b/level_3/fake/c/main/private-make-operate_validate_type.h similarity index 100% rename from level_3/fake/c/private-make-operate_validate_type.h rename to level_3/fake/c/main/private-make-operate_validate_type.h diff --git a/level_3/fake/c/private-make.c b/level_3/fake/c/main/private-make.c similarity index 93% rename from level_3/fake/c/private-make.c rename to level_3/fake/c/main/private-make.c index 846cdf2..b3ccfd3 100644 --- a/level_3/fake/c/private-make.c +++ b/level_3/fake/c/main/private-make.c @@ -60,13 +60,13 @@ extern "C" { if (status == F_exist_not) { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QThe group name '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, buffer, data->main->error.notable); fl_print_format("%[' is not found.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } return F_status_set_error(F_failure); @@ -82,13 +82,13 @@ extern "C" { if (number > F_type_size_32_unsigned_d) { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QThe number '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%un%]", data->main->error.to, data->main->error.notable, number, data->main->error.notable); fl_print_format("%[' is too large.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } } @@ -112,13 +112,13 @@ extern "C" { if (F_status_is_error(status)) { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { if (F_status_set_fine(status) == F_syntax) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QThe mode '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, buffer, data->main->error.notable); fl_print_format("%[' is invalid.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } else { fll_error_print(print, status, "f_file_mode_from_string", F_true); @@ -153,13 +153,13 @@ extern "C" { if (status == F_exist_not) { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QThe user '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, buffer, data->main->error.notable); fl_print_format("%[' is not found.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } return F_status_set_error(F_failure); @@ -175,13 +175,13 @@ extern "C" { if (number > F_type_size_32_unsigned_d) { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QThe number '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%un%]", data->main->error.to, data->main->error.notable, number, data->main->error.notable); fl_print_format("%[' is too large.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } } diff --git a/level_3/fake/c/private-make.h b/level_3/fake/c/main/private-make.h similarity index 100% rename from level_3/fake/c/private-make.h rename to level_3/fake/c/main/private-make.h diff --git a/level_3/fake/c/private-print.c b/level_3/fake/c/main/private-print.c similarity index 90% rename from level_3/fake/c/private-print.c rename to level_3/fake/c/main/private-print.c index 112f94e..f0448ac 100644 --- a/level_3/fake/c/private-print.c +++ b/level_3/fake/c/main/private-print.c @@ -7,11 +7,11 @@ extern "C" { #endif #ifndef _di_fake_print_error_build_operation_file_ - bool fake_print_error_build_operation_file(fake_data_t * const data, const f_status_t status, const char *function, const f_string_static_t operation, const f_string_static_t source, const f_string_static_t destination, const f_string_static_t how, const bool fallback) { + bool fake_print_error_build_operation_file(fake_data_t * const data, const f_status_t status, const f_string_static_t function, const f_string_static_t operation, const f_string_static_t source, const f_string_static_t destination, const f_string_static_t how, const bool fallback) { - if (status == F_file_found_not) { + if (f_status_set_fine(status) == F_file_found_not) { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QFailed to find '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); @@ -19,15 +19,15 @@ extern "C" { fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } return F_false; } - if (status == F_parameter) { + if (f_status_set_fine(status) == F_parameter) { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QInvalid parameter when calling '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%S%]", data->main->error.to, data->main->error.notable, function, data->main->error.notable); @@ -37,15 +37,15 @@ extern "C" { fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } return F_false; } - if (status == F_name) { + if (f_status_set_fine(status) == F_name) { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QInvalid name for '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); @@ -60,15 +60,15 @@ extern "C" { fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } return F_false; } - if (status == F_memory_not) { + if (f_status_set_fine(status) == F_memory_not) { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QUnable to allocate memory, while trying to %Q '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, operation, data->main->error.context); @@ -76,15 +76,15 @@ extern "C" { fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } return F_false; } - if (status == F_number_overflow) { + if (f_status_set_fine(status) == F_number_overflow) { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QOverflow while trying to %Q '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, operation, data->main->error.context); @@ -92,15 +92,15 @@ extern "C" { fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } return F_false; } - if (status == F_directory) { + if (f_status_set_fine(status) == F_directory) { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QInvalid directory while trying to %Q '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, operation, data->main->error.context); @@ -108,15 +108,15 @@ extern "C" { fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } return F_false; } - if (status == F_access_denied) { + if (f_status_set_fine(status) == F_access_denied) { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QAccess denied while trying to %Q '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, operation, data->main->error.context); @@ -124,15 +124,15 @@ extern "C" { fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } return F_false; } - if (status == F_loop) { + if (f_status_set_fine(status) == F_loop) { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QLoop while trying to %Q '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, operation, data->main->error.context); @@ -140,15 +140,15 @@ extern "C" { fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } return F_false; } - if (status == F_prohibited) { + if (f_status_set_fine(status) == F_prohibited) { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QProhibited by system while trying to %Q '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, operation, data->main->error.context); @@ -156,15 +156,15 @@ extern "C" { fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } return F_false; } - if (status == F_directory_found_not) { + if (f_status_set_fine(status) == F_directory_found_not) { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QFailed to %Q '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, operation, data->main->error.context); @@ -172,15 +172,15 @@ extern "C" { fl_print_format("%[' due to an invalid directory in the path.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } return F_false; } - if (status == F_failure) { + if (f_status_set_fine(status) == F_failure) { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QFailed to %Q '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, operation, data->main->error.context); @@ -188,24 +188,24 @@ extern "C" { fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } return F_false; } - if (fll_error_print(data->main->error, status, function, F_false) == F_known_not && fallback && data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + if (fll_error_print(data->main->error, f_status_set_fine(status), function, F_false) == F_known_not && fallback && data->main->error.verbosity > f_console_verbosity_quiet_e) { + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[UNKNOWN %Q(%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); - fl_print_format("%[%ui%]", data->main->error.to, data->main->error.notable, status, data->main->error.notable); + fl_print_format("%[%ui%]", data->main->error.to, data->main->error.notable, f_status_set_fine(status), data->main->error.notable); fl_print_format("%[) occurred while trying to %Q '%]", data->main->error.to, data->main->error.context, operation, data->main->error.context); fake_print_error_build_operation_file_message(data, operation, source, destination, how); fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } return F_true; @@ -236,7 +236,7 @@ extern "C" { if (status == F_file_found_not) { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QOccurred on invalid UTF-8 character at stop position (at '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%un%]", data->main->error.to, data->main->error.notable, range.start, data->main->error.notable); @@ -244,7 +244,7 @@ extern "C" { fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, path_file, data->main->error.notable); fl_print_format("%[').%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } return F_false; @@ -252,7 +252,7 @@ extern "C" { if (status == F_complete_not_utf || status == F_complete_not_utf_eos || status == F_complete_not_utf_stop) { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QOccurred on invalid UTF-8 character at %s (at '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, status == F_complete_not_utf_eos ? "end of string" : "stop point of string", data->main->error.context); fl_print_format("%[%un%]", data->main->error.to, data->main->error.notable, range.start, data->main->error.notable); @@ -260,7 +260,7 @@ extern "C" { fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, path_file, data->main->error.notable); fl_print_format("%[').%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } return F_false; @@ -268,7 +268,7 @@ extern "C" { if (status == F_complete_not_utf_stop) { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QOccurred on invalid UTF-8 character at stop point of string (at '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%un%]", data->main->error.to, data->main->error.notable, range.start, data->main->error.notable); @@ -276,14 +276,14 @@ extern "C" { fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, path_file, data->main->error.notable); fl_print_format("%[').%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } return F_false; } if (fll_error_print(data->main->error, status, function, F_false) == F_known_not && fallback && data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[UNKNOWN %Q(%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%ui%]", data->main->error.to, data->main->error.notable, status, data->main->error.notable); @@ -291,7 +291,7 @@ extern "C" { fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, function, data->main->error.notable); fl_print_format("%[().%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } return F_true; @@ -303,13 +303,13 @@ extern "C" { if (data->main->error.verbosity == f_console_verbosity_quiet_e) return; - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QThe parameter '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, parameter, data->main->error.notable); fl_print_format("%[' is specified, but no value is given.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } #endif // _di_fake_print_error_parameter_missing_value_ @@ -318,13 +318,13 @@ extern "C" { if (data->main->error.verbosity == f_console_verbosity_quiet_e) return; - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QThe parameter '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, parameter, data->main->error.notable); fl_print_format("%[' was specified too many times.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } #endif // _di_fake_print_error_parameter_too_many_ @@ -445,7 +445,7 @@ extern "C" { if (data->main->error.verbosity == f_console_verbosity_quiet_e || !print.to) return; - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); if (F_status_set_fine(status) == F_false) { fl_print_format("%r%[%QThe path '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); @@ -456,7 +456,7 @@ extern "C" { fll_error_file_print(data->main->error, F_status_set_fine(status), function, F_true, path, fake_common_file_path_determine_real_s, fll_error_file_type_file_e); } - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } #endif // _di_fake_print_message_section_operation_path_outside_ @@ -466,7 +466,7 @@ extern "C" { if (data->main->error.verbosity == f_console_verbosity_quiet_e || !print.to) return; if (status == F_array_too_large) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QMaximum stack size reached while processing path '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, path, data->main->error.notable); @@ -479,7 +479,7 @@ extern "C" { fl_print_format(".%]%r", data->main->error.to, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } else { fll_error_file_print(print, status, function, F_true, path, fake_common_file_path_change_to_s, fll_error_file_type_directory_e); @@ -497,7 +497,7 @@ extern "C" { f_fss_count_lines(state, buffer, operation_name.start, &line); - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QThe section operation '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%/Q%]", data->main->error.to, data->main->error.notable, buffer, operation_name, data->main->error.notable); @@ -509,7 +509,7 @@ extern "C" { fl_print_format("%[%ul%]", data->main->error.to, data->main->error.notable, stack_max, data->main->error.notable); fl_print_format(" %[has been reached.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } #endif // _di_fake_print_message_section_operation_stack_max_ @@ -523,7 +523,7 @@ extern "C" { f_fss_count_lines(state, buffer, operation_name.start, &line); - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QThe section operation '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%/Q%]", data->main->error.to, data->main->error.notable, buffer, operation_name, data->main->error.notable); @@ -533,7 +533,7 @@ extern "C" { fl_print_format("%[%ul%]", data->main->error.to, data->main->error.notable, line, data->main->error.notable); fl_print_format(" %[is not a known operation name.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } #endif // _di_fake_print_message_section_operation_unknown_ diff --git a/level_3/fake/c/private-print.h b/level_3/fake/c/main/private-print.h similarity index 99% rename from level_3/fake/c/private-print.h rename to level_3/fake/c/main/private-print.h index b72453d..c202588 100644 --- a/level_3/fake/c/private-print.h +++ b/level_3/fake/c/main/private-print.h @@ -18,7 +18,8 @@ extern "C" { * @param data * The program data. * @param status - * The error status code to report on. + * The status to use. + * This is provided, ignoring data.setting->status, for thread-safety reasons. * @param function * The name of the function where the error happened. * @param operation diff --git a/level_3/fake/c/private-skeleton.c b/level_3/fake/c/main/private-skeleton.c similarity index 90% rename from level_3/fake/c/private-skeleton.c rename to level_3/fake/c/main/private-skeleton.c index e6275de..df9a47e 100644 --- a/level_3/fake/c/private-skeleton.c +++ b/level_3/fake/c/main/private-skeleton.c @@ -11,11 +11,11 @@ extern "C" { f_status_t status = F_none; - 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, f_string_eol_s, f_string_eol_s); + if (data->main->message.verbosity != f_console_verbosity_quiet_e && data->main->message.verbosity != f_console_verbosity_error_e) { + fll_print_format("%rGenerating skeleton structure.%r", data->main->message.to, f_string_eol_s, f_string_eol_s); - if (data->main->output.verbosity >= f_console_verbosity_verbose_e) { - fll_print_dynamic(f_string_eol_s, data->main->output.to); + if (data->main->message.verbosity >= f_console_verbosity_verbose_e) { + fll_print_dynamic(f_string_eol_s, data->main->message.to); } } @@ -88,8 +88,8 @@ extern "C" { } } // for - if (data->main->output.verbosity >= f_console_verbosity_verbose_e) { - fll_print_dynamic(f_string_eol_s, data->main->output.to); + if (data->main->message.verbosity >= f_console_verbosity_verbose_e) { + fll_print_dynamic(f_string_eol_s, data->main->message.to); } } @@ -136,7 +136,7 @@ extern "C" { if (status == F_true) { if (data->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("Directory '%Q' already exists.%r", data->main->output.to, path, f_string_eol_s); + fll_print_format("Directory '%Q' already exists.%r", data->main->message.to, path, f_string_eol_s); } return F_none; @@ -144,13 +144,13 @@ extern "C" { if (status == F_false) { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QThe path '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, path, data->main->error.notable); fl_print_format("%[' exists but is not a directory.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } return F_status_set_warning(F_failure); @@ -160,13 +160,13 @@ extern "C" { if (F_status_is_error(status)) { if (F_status_set_fine(status) == F_file_found_not) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QThe path '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, path, data->main->error.notable); fl_print_format("%[' could not be created, a parent directory does not exist.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } else { fll_error_file_print(data->main->error, F_status_set_fine(status), "f_directory_create", F_true, path, f_file_operation_create_s, fll_error_file_type_directory_e); @@ -176,7 +176,7 @@ extern "C" { } if (data->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("Directory '%Q' created.%r", data->main->output.to, path, f_string_eol_s); + fll_print_format("Directory '%Q' created.%r", data->main->message.to, path, f_string_eol_s); } } else if (F_status_is_error(status)) { @@ -200,7 +200,7 @@ extern "C" { if (status == F_true) { if (data->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("File '%Q' already exists.%r", data->main->output.to, path, f_string_eol_s); + fll_print_format("File '%Q' already exists.%r", data->main->message.to, path, f_string_eol_s); } return F_none; @@ -212,7 +212,7 @@ extern "C" { if (status == F_true) { if (data->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("File '%Q' already exists (as a symbolic link).%r", data->main->output.to, path, f_string_eol_s); + fll_print_format("File '%Q' already exists (as a symbolic link).%r", data->main->message.to, path, f_string_eol_s); } return F_none; @@ -221,7 +221,7 @@ extern "C" { if (status == F_false) { if (data->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("File '%Q' already exists but is not a regular file (or symbolic link).%r", data->main->output.to, path, f_string_eol_s); + fll_print_format("File '%Q' already exists but is not a regular file (or symbolic link).%r", data->main->message.to, path, f_string_eol_s); } return F_status_set_warning(F_none); @@ -237,13 +237,13 @@ extern "C" { if (F_status_is_error(status)) { if (F_status_set_fine(status) == F_file_found_not) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QThe file '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, path, data->main->error.notable); fl_print_format("%[' could not be created, a parent directory does not exist.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); } else { fll_error_file_print(data->main->error, F_status_set_fine(status), "f_file_create", F_true, path, f_file_operation_create_s, fll_error_file_type_file_e); @@ -253,7 +253,7 @@ extern "C" { } if (data->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("File '%Q' created.%r", data->main->output.to, path, f_string_eol_s); + fll_print_format("File '%Q' created.%r", data->main->message.to, path, f_string_eol_s); } if (content.used) { @@ -282,7 +282,7 @@ extern "C" { } if (data->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("File '%Q' pre-populated.%r", data->main->output.to, path, f_string_eol_s); + fll_print_format("File '%Q' pre-populated.%r", data->main->message.to, path, f_string_eol_s); } f_file_stream_flush(file); diff --git a/level_3/fake/c/private-skeleton.h b/level_3/fake/c/main/private-skeleton.h similarity index 100% rename from level_3/fake/c/private-skeleton.h rename to level_3/fake/c/main/private-skeleton.h diff --git a/level_3/fake/data/build/settings b/level_3/fake/data/build/settings index 3e74a1d..8278641 100644 --- a/level_3/fake/data/build/settings +++ b/level_3/fake/data/build/settings @@ -27,16 +27,16 @@ build_libraries-individual -lf_account -lf_capability -lf_color -lf_console -lf_ build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll -build_sources_library fake.c common.c print.c -build_sources_library private-build.c private-build-library.c private-build-load.c private-build-object.c private-build-objects.c private-build-program.c private-build-skeleton.c -build_sources_library private-clean.c private-common.c private-make.c private-print.c private-skeleton.c -build_sources_library private-make-load_fakefile.c private-make-load_parameters.c -build_sources_library private-make-operate.c private-make-operate_block.c private-make-operate_process.c private-make-operate_process_type.c private-make-operate_validate.c private-make-operate_validate_type.c -build_sources_library private-fake.c private-fake-path_generate.c +build_sources_library main/fake.c main/common.c main/common-print.c main/print.c +build_sources_library main/private-build.c main/private-build-library.c main/private-build-load.c main/private-build-object.c main/private-build-objects.c main/private-build-program.c main/private-build-skeleton.c +build_sources_library main/private-clean.c main/private-common.c main/private-make.c main/private-print.c main/private-skeleton.c +build_sources_library main/private-make-load_fakefile.c main/private-make-load_parameters.c +build_sources_library main/private-make-operate.c main/private-make-operate_block.c main/private-make-operate_process.c main/private-make-operate_process_type.c main/private-make-operate_validate.c main/private-make-operate_validate_type.c +build_sources_library main/private-fake.c main/private-fake-path_generate.c -build_sources_program main.c +build_sources_program main/main.c -build_sources_headers fake.h common.h print.h +build_sources_headers main/fake.h main/common.h main/common-print.h main/print.h build_sources_documentation man diff --git a/level_3/firewall/c/common.h b/level_3/firewall/c/common.h index f12fc9c..3ad52ec 100644 --- a/level_3/firewall/c/common.h +++ b/level_3/firewall/c/common.h @@ -386,7 +386,7 @@ extern "C" { #define firewall_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e, 0), \ @@ -399,11 +399,11 @@ extern "C" { macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e, 0), \ \ - macro_f_console_parameter_t_initialize2(0, 0, firewall_command_start_s.string, F_false, f_console_flag_simple_e), \ - macro_f_console_parameter_t_initialize2(0, 0, firewall_command_stop_s.string, F_false, f_console_flag_simple_e), \ - macro_f_console_parameter_t_initialize2(0, 0, firewall_command_restart_s.string, F_false, f_console_flag_simple_e), \ - macro_f_console_parameter_t_initialize2(0, 0, firewall_command_lock_s.string, F_false, f_console_flag_simple_e), \ - macro_f_console_parameter_t_initialize2(0, 0, firewall_command_show_s.string, F_false, f_console_flag_simple_e), \ + macro_f_console_parameter_t_initialize7(firewall_command_start_s, 0, f_console_flag_simple_e), \ + macro_f_console_parameter_t_initialize7(firewall_command_stop_s, 0, f_console_flag_simple_e), \ + macro_f_console_parameter_t_initialize7(firewall_command_restart_s, 0, f_console_flag_simple_e), \ + macro_f_console_parameter_t_initialize7(firewall_command_lock_s, 0, f_console_flag_simple_e), \ + macro_f_console_parameter_t_initialize7(firewall_command_show_s, 0, f_console_flag_simple_e), \ } #define firewall_total_parameters_d 17 diff --git a/level_3/firewall/c/print.c b/level_3/firewall/c/print.c index aa7df5e..e8c6ac7 100644 --- a/level_3/firewall/c/print.c +++ b/level_3/firewall/c/print.c @@ -40,10 +40,10 @@ extern "C" { #ifndef _di_firewall_print_line_first_locked_ f_status_t firewall_print_line_first_locked(firewall_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } f_print_dynamic_raw(setting->line_first, print.to); @@ -55,10 +55,10 @@ extern "C" { #ifndef _di_firewall_print_line_first_unlocked_ f_status_t firewall_print_line_first_unlocked(firewall_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } fll_print_dynamic_raw(setting->line_first, print.to); @@ -70,10 +70,10 @@ extern "C" { #ifndef _di_firewall_print_line_last_locked_ f_status_t firewall_print_line_last_locked(firewall_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } fll_print_dynamic_raw(setting->line_last, print.to); @@ -85,10 +85,10 @@ extern "C" { #ifndef _di_firewall_print_line_last_unlocked_ f_status_t firewall_print_line_last_unlocked(firewall_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } f_print_dynamic_raw(setting->line_last, print.to); diff --git a/level_3/firewall/c/print.h b/level_3/firewall/c/print.h index fa27a89..042b5d2 100644 --- a/level_3/firewall/c/print.h +++ b/level_3/firewall/c/print.h @@ -1,7 +1,7 @@ /** * FLL - Level 3 * - * Project: UTF-8 + * Project: UTF8 * API Version: 0.7 * Licenses: lgpl-2.1-or-later */ diff --git a/level_3/fss_basic_list_read/c/common.h b/level_3/fss_basic_list_read/c/common.h index 265ebdf..85779a4 100644 --- a/level_3/fss_basic_list_read/c/common.h +++ b/level_3/fss_basic_list_read/c/common.h @@ -223,7 +223,7 @@ extern "C" { #define fss_basic_list_read_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e, 0), \ @@ -236,20 +236,20 @@ extern "C" { macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e, 0), \ \ - macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_at_s.string, fss_basic_list_read_long_at_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_content_s.string, fss_basic_list_read_long_content_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_columns_s.string, fss_basic_list_read_long_columns_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_delimit_s.string, fss_basic_list_read_long_delimit_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_depth_s.string, fss_basic_list_read_long_depth_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_empty_s.string, fss_basic_list_read_long_empty_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_line_s.string, fss_basic_list_read_long_line_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_name_s.string, fss_basic_list_read_long_name_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_object_s.string, fss_basic_list_read_long_object_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_pipe_s.string, fss_basic_list_read_long_pipe_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_original_s.string, fss_basic_list_read_long_original_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_select_s.string, fss_basic_list_read_long_select_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_total_s.string, fss_basic_list_read_long_total_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_trim_s.string, fss_basic_list_read_long_trim_s.string, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_basic_list_read_short_at_s, fss_basic_list_read_long_at_s, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_basic_list_read_short_content_s, fss_basic_list_read_long_content_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_basic_list_read_short_columns_s, fss_basic_list_read_long_columns_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_basic_list_read_short_delimit_s, fss_basic_list_read_long_delimit_s, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_basic_list_read_short_depth_s, fss_basic_list_read_long_depth_s, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_basic_list_read_short_empty_s, fss_basic_list_read_long_empty_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_basic_list_read_short_line_s, fss_basic_list_read_long_line_s, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_basic_list_read_short_name_s, fss_basic_list_read_long_name_s, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_basic_list_read_short_object_s, fss_basic_list_read_long_object_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_basic_list_read_short_pipe_s, fss_basic_list_read_long_pipe_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_basic_list_read_short_original_s, fss_basic_list_read_long_original_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_basic_list_read_short_select_s, fss_basic_list_read_long_select_s, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_basic_list_read_short_total_s, fss_basic_list_read_long_total_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_basic_list_read_short_trim_s, fss_basic_list_read_long_trim_s, 0, 0, f_console_flag_normal_e, 0), \ } #define fss_basic_list_read_total_parameters_d 26 diff --git a/level_3/fss_basic_list_read/c/print.c b/level_3/fss_basic_list_read/c/print.c index 46f8c8c..636c9d3 100644 --- a/level_3/fss_basic_list_read/c/print.c +++ b/level_3/fss_basic_list_read/c/print.c @@ -118,10 +118,10 @@ extern "C" { #ifndef _di_fss_basic_list_read_print_line_first_locked_ f_status_t fss_basic_list_read_print_line_first_locked(fss_basic_list_read_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } f_print_dynamic_raw(setting->line_first, print.to); @@ -133,10 +133,10 @@ extern "C" { #ifndef _di_fss_basic_list_read_print_line_first_unlocked_ f_status_t fss_basic_list_read_print_line_first_unlocked(fss_basic_list_read_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } fll_print_dynamic_raw(setting->line_first, print.to); @@ -148,10 +148,10 @@ extern "C" { #ifndef _di_fss_basic_list_read_print_line_last_locked_ f_status_t fss_basic_list_read_print_line_last_locked(fss_basic_list_read_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } fll_print_dynamic_raw(setting->line_last, print.to); @@ -163,10 +163,10 @@ extern "C" { #ifndef _di_fss_basic_list_read_print_line_last_unlocked_ f_status_t fss_basic_list_read_print_line_last_unlocked(fss_basic_list_read_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } f_print_dynamic_raw(setting->line_last, print.to); diff --git a/level_3/fss_basic_list_read/c/print.h b/level_3/fss_basic_list_read/c/print.h index 12c3cdd..f9c92fd 100644 --- a/level_3/fss_basic_list_read/c/print.h +++ b/level_3/fss_basic_list_read/c/print.h @@ -1,7 +1,7 @@ /** * FLL - Level 3 * - * Project: UTF-8 + * Project: UTF8 * API Version: 0.7 * Licenses: lgpl-2.1-or-later */ diff --git a/level_3/fss_basic_read/c/common.h b/level_3/fss_basic_read/c/common.h index 90de349..ad898ea 100644 --- a/level_3/fss_basic_read/c/common.h +++ b/level_3/fss_basic_read/c/common.h @@ -221,7 +221,7 @@ extern "C" { #define fss_basic_read_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e, 0), \ @@ -234,20 +234,20 @@ extern "C" { macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e, 0), \ \ - macro_f_console_parameter_t_initialize2(fss_basic_read_short_at_s.string, fss_basic_read_long_at_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_basic_read_short_content_s.string, fss_basic_read_long_content_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_basic_read_short_columns_s.string, fss_basic_read_long_columns_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_basic_read_short_delimit_s.string, fss_basic_read_long_delimit_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_basic_read_short_depth_s.string, fss_basic_read_long_depth_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_basic_read_short_empty_s.string, fss_basic_read_long_empty_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_basic_read_short_line_s.string, fss_basic_read_long_line_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_basic_read_short_name_s.string, fss_basic_read_long_name_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_basic_read_short_object_s.string, fss_basic_read_long_object_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_basic_read_short_pipe_s.string, fss_basic_read_long_pipe_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_basic_read_short_original_s.string, fss_basic_read_long_original_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_basic_read_short_select_s.string, fss_basic_read_long_select_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_basic_read_short_total_s.string, fss_basic_read_long_total_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_basic_read_short_trim_s.string, fss_basic_read_long_trim_s.string, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_basic_read_short_at_s, fss_basic_read_long_at_s, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_basic_read_short_content_s, fss_basic_read_long_content_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_basic_read_short_columns_s, fss_basic_read_long_columns_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_basic_read_short_delimit_s, fss_basic_read_long_delimit_s, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_basic_read_short_depth_s, fss_basic_read_long_depth_s, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_basic_read_short_empty_s, fss_basic_read_long_empty_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_basic_read_short_line_s, fss_basic_read_long_line_s, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_basic_read_short_name_s, fss_basic_read_long_name_s, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_basic_read_short_object_s, fss_basic_read_long_object_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_basic_read_short_pipe_s, fss_basic_read_long_pipe_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_basic_read_short_original_s, fss_basic_read_long_original_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_basic_read_short_select_s, fss_basic_read_long_select_s, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_basic_read_short_total_s, fss_basic_read_long_total_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_basic_read_short_trim_s, fss_basic_read_long_trim_s, 0, 0, f_console_flag_normal_e, 0), \ } #define fss_basic_read_total_parameters_d 26 diff --git a/level_3/fss_basic_read/c/print.c b/level_3/fss_basic_read/c/print.c index 8b98e22..08105c4 100644 --- a/level_3/fss_basic_read/c/print.c +++ b/level_3/fss_basic_read/c/print.c @@ -118,10 +118,10 @@ extern "C" { #ifndef _di_fss_basic_read_print_line_first_locked_ f_status_t fss_basic_read_print_line_first_locked(fss_basic_read_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } f_print_dynamic_raw(setting->line_first, print.to); @@ -133,10 +133,10 @@ extern "C" { #ifndef _di_fss_basic_read_print_line_first_unlocked_ f_status_t fss_basic_read_print_line_first_unlocked(fss_basic_read_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } fll_print_dynamic_raw(setting->line_first, print.to); @@ -148,10 +148,10 @@ extern "C" { #ifndef _di_fss_basic_read_print_line_last_locked_ f_status_t fss_basic_read_print_line_last_locked(fss_basic_read_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } fll_print_dynamic_raw(setting->line_last, print.to); @@ -163,10 +163,10 @@ extern "C" { #ifndef _di_fss_basic_read_print_line_last_unlocked_ f_status_t fss_basic_read_print_line_last_unlocked(fss_basic_read_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } f_print_dynamic_raw(setting->line_last, print.to); diff --git a/level_3/fss_basic_read/c/print.h b/level_3/fss_basic_read/c/print.h index 483eb4b..1001467 100644 --- a/level_3/fss_basic_read/c/print.h +++ b/level_3/fss_basic_read/c/print.h @@ -1,7 +1,7 @@ /** * FLL - Level 3 * - * Project: UTF-8 + * Project: UTF8 * API Version: 0.7 * Licenses: lgpl-2.1-or-later */ diff --git a/level_3/fss_embedded_list_read/c/common.h b/level_3/fss_embedded_list_read/c/common.h index 9cc1464..1fcde39 100644 --- a/level_3/fss_embedded_list_read/c/common.h +++ b/level_3/fss_embedded_list_read/c/common.h @@ -221,7 +221,7 @@ extern "C" { #define fss_embedded_list_read_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e, 0), \ @@ -234,20 +234,20 @@ extern "C" { macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e, 0), \ \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_at_s.string, fss_embedded_list_read_long_at_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_content_s.string, fss_embedded_list_read_long_content_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_columns_s.string, fss_embedded_list_read_long_columns_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_delimit_s.string, fss_embedded_list_read_long_delimit_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_depth_s.string, fss_embedded_list_read_long_depth_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_empty_s.string, fss_embedded_list_read_long_empty_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_line_s.string, fss_embedded_list_read_long_line_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_name_s.string, fss_embedded_list_read_long_name_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_object_s.string, fss_embedded_list_read_long_object_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_pipe_s.string, fss_embedded_list_read_long_pipe_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_original_s.string, fss_embedded_list_read_long_original_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_select_s.string, fss_embedded_list_read_long_select_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_total_s.string, fss_embedded_list_read_long_total_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_trim_s.string, fss_embedded_list_read_long_trim_s.string, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_embedded_list_read_short_at_s.string, fss_embedded_list_read_long_at_s.string, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_embedded_list_read_short_content_s.string, fss_embedded_list_read_long_content_s.string, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_embedded_list_read_short_columns_s.string, fss_embedded_list_read_long_columns_s.string, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_embedded_list_read_short_delimit_s.string, fss_embedded_list_read_long_delimit_s.string, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_embedded_list_read_short_depth_s.string, fss_embedded_list_read_long_depth_s.string, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_embedded_list_read_short_empty_s.string, fss_embedded_list_read_long_empty_s.string, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_embedded_list_read_short_line_s.string, fss_embedded_list_read_long_line_s.string, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_embedded_list_read_short_name_s.string, fss_embedded_list_read_long_name_s.string, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_embedded_list_read_short_object_s.string, fss_embedded_list_read_long_object_s.string, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_embedded_list_read_short_pipe_s.string, fss_embedded_list_read_long_pipe_s.string, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_embedded_list_read_short_original_s.string, fss_embedded_list_read_long_original_s.string, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_embedded_list_read_short_select_s.string, fss_embedded_list_read_long_select_s.string, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_embedded_list_read_short_total_s.string, fss_embedded_list_read_long_total_s.string, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_embedded_list_read_short_trim_s.string, fss_embedded_list_read_long_trim_s.string, 0, 0, f_console_flag_normal_e, 0), \ } #define fss_embedded_list_read_total_parameters_d 26 diff --git a/level_3/fss_embedded_list_read/c/print.c b/level_3/fss_embedded_list_read/c/print.c index fe9d4e6..4ecb7e3 100644 --- a/level_3/fss_embedded_list_read/c/print.c +++ b/level_3/fss_embedded_list_read/c/print.c @@ -117,10 +117,10 @@ extern "C" { #ifndef _di_fss_embedded_list_read_print_line_first_locked_ f_status_t fss_embedded_list_read_print_line_first_locked(fss_embedded_list_read_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } f_print_dynamic_raw(setting->line_first, print.to); @@ -132,10 +132,10 @@ extern "C" { #ifndef _di_fss_embedded_list_read_print_line_first_unlocked_ f_status_t fss_embedded_list_read_print_line_first_unlocked(fss_embedded_list_read_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } fll_print_dynamic_raw(setting->line_first, print.to); @@ -147,10 +147,10 @@ extern "C" { #ifndef _di_fss_embedded_list_read_print_line_last_locked_ f_status_t fss_embedded_list_read_print_line_last_locked(fss_embedded_list_read_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } fll_print_dynamic_raw(setting->line_last, print.to); @@ -162,10 +162,10 @@ extern "C" { #ifndef _di_fss_embedded_list_read_print_line_last_unlocked_ f_status_t fss_embedded_list_read_print_line_last_unlocked(fss_embedded_list_read_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } f_print_dynamic_raw(setting->line_last, print.to); diff --git a/level_3/fss_embedded_list_read/c/print.h b/level_3/fss_embedded_list_read/c/print.h index 537428d..cc6a0ad 100644 --- a/level_3/fss_embedded_list_read/c/print.h +++ b/level_3/fss_embedded_list_read/c/print.h @@ -1,7 +1,7 @@ /** * FLL - Level 3 * - * Project: UTF-8 + * Project: UTF8 * API Version: 0.7 * Licenses: lgpl-2.1-or-later */ diff --git a/level_3/fss_embedded_list_read/c/private-read.c b/level_3/fss_embedded_list_read/c/private-read.c index 61e86cb..1548dba 100644 --- a/level_3/fss_embedded_list_read/c/private-read.c +++ b/level_3/fss_embedded_list_read/c/private-read.c @@ -205,7 +205,7 @@ extern "C" { for (j = i + 1; j < depths->used; ++j) { if (depths->array[i].depth == depths->array[j].depth) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QThe value '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%ul%]", data->main->error.to, data->main->error.notable, depths->array[i].depth, data->main->error.notable); @@ -213,12 +213,12 @@ extern "C" { fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_depth_s, data->main->error.notable); fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); return F_status_set_error(F_parameter); } else if (depths->array[i].depth > depths->array[j].depth) { - f_file_stream_lock(data->main->error); + f_file_stream_lock(data->main->error.to); fl_print_format("%r%[%QThe parameter '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_depth_s, data->main->error.notable); @@ -228,7 +228,7 @@ extern "C" { fl_print_format("%[%ul%]", data->main->error.to, data->main->error.notable, depths->array[j].depth, data->main->error.notable); fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - f_file_stream_unlock(data->main->error); + f_file_stream_unlock(data->main->error.to); return F_status_set_error(F_parameter); } diff --git a/level_3/fss_extended_list_read/c/common.h b/level_3/fss_extended_list_read/c/common.h index 6125448..05d255c 100644 --- a/level_3/fss_extended_list_read/c/common.h +++ b/level_3/fss_extended_list_read/c/common.h @@ -221,7 +221,7 @@ extern "C" { #define fss_extended_list_read_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e, 0), \ @@ -234,20 +234,20 @@ extern "C" { macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e, 0), \ \ - macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_at_s.string, fss_extended_list_read_long_at_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_content_s.string, fss_extended_list_read_long_content_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_columns_s.string, fss_extended_list_read_long_columns_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_delimit_s.string, fss_extended_list_read_long_delimit_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_depth_s.string, fss_extended_list_read_long_depth_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_empty_s.string, fss_extended_list_read_long_empty_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_line_s.string, fss_extended_list_read_long_line_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_name_s.string, fss_extended_list_read_long_name_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_object_s.string, fss_extended_list_read_long_object_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_pipe_s.string, fss_extended_list_read_long_pipe_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_original_s.string, fss_extended_list_read_long_original_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_select_s.string, fss_extended_list_read_long_select_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_total_s.string, fss_extended_list_read_long_total_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_trim_s.string, fss_extended_list_read_long_trim_s.string, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_extended_list_read_short_at_s, fss_extended_list_read_long_at_s, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_extended_list_read_short_content_s, fss_extended_list_read_long_content_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_extended_list_read_short_columns_s, fss_extended_list_read_long_columns_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_extended_list_read_short_delimit_s, fss_extended_list_read_long_delimit_s, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_extended_list_read_short_depth_s, fss_extended_list_read_long_depth_s, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_extended_list_read_short_empty_s, fss_extended_list_read_long_empty_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_extended_list_read_short_line_s, fss_extended_list_read_long_line_s, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_extended_list_read_short_name_s, fss_extended_list_read_long_name_s, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_extended_list_read_short_object_s, fss_extended_list_read_long_object_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_extended_list_read_short_pipe_s, fss_extended_list_read_long_pipe_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_extended_list_read_short_original_s, fss_extended_list_read_long_original_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_extended_list_read_short_select_s, fss_extended_list_read_long_select_s, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_extended_list_read_short_total_s, fss_extended_list_read_long_total_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_extended_list_read_short_trim_s, fss_extended_list_read_long_trim_s, 0, 0, f_console_flag_normal_e, 0), \ } #define fss_extended_list_read_total_parameters_d 26 diff --git a/level_3/fss_extended_list_read/c/print.c b/level_3/fss_extended_list_read/c/print.c index a78dcbc..f50a50c 100644 --- a/level_3/fss_extended_list_read/c/print.c +++ b/level_3/fss_extended_list_read/c/print.c @@ -118,10 +118,10 @@ extern "C" { #ifndef _di_fss_extended_list_read_print_line_first_locked_ f_status_t fss_extended_list_read_print_line_first_locked(fss_extended_list_read_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } f_print_dynamic_raw(setting->line_first, print.to); @@ -133,10 +133,10 @@ extern "C" { #ifndef _di_fss_extended_list_read_print_line_first_unlocked_ f_status_t fss_extended_list_read_print_line_first_unlocked(fss_extended_list_read_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } fll_print_dynamic_raw(setting->line_first, print.to); @@ -151,7 +151,7 @@ extern "C" { if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (print.verbosity < f_console_verbosity_error_e) return F_output_not; if (setting->flag & (fss_extended_list_read_main_flag_verify_e | fss_extended_list_read_main_flag_file_to_e)) return F_output_not; } @@ -167,7 +167,7 @@ extern "C" { if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (print.verbosity < f_console_verbosity_error_e) return F_output_not; if (setting->flag & (fss_extended_list_read_main_flag_verify_e | fss_extended_list_read_main_flag_file_to_e)) return F_output_not; } diff --git a/level_3/fss_extended_list_read/c/print.h b/level_3/fss_extended_list_read/c/print.h index 005a085..8293e4b 100644 --- a/level_3/fss_extended_list_read/c/print.h +++ b/level_3/fss_extended_list_read/c/print.h @@ -1,7 +1,7 @@ /** * FLL - Level 3 * - * Project: UTF-8 + * Project: UTF8 * API Version: 0.7 * Licenses: lgpl-2.1-or-later */ diff --git a/level_3/fss_extended_read/c/common.h b/level_3/fss_extended_read/c/common.h index 870cb23..1ffdec2 100644 --- a/level_3/fss_extended_read/c/common.h +++ b/level_3/fss_extended_read/c/common.h @@ -221,7 +221,7 @@ extern "C" { #define fss_extended_read_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e, 0), \ @@ -234,19 +234,19 @@ extern "C" { macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e, 0), \ \ - macro_f_console_parameter_t_initialize2(fss_extended_read_short_content_s.string, fss_extended_read_long_content_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_extended_read_short_columns_s.string, fss_extended_read_long_columns_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_extended_read_short_delimit_s.string, fss_extended_read_long_delimit_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_extended_read_short_depth_s.string, fss_extended_read_long_depth_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_extended_read_short_empty_s.string, fss_extended_read_long_empty_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_extended_read_short_line_s.string, fss_extended_read_long_line_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_extended_read_short_name_s.string, fss_extended_read_long_name_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_extended_read_short_object_s.string, fss_extended_read_long_object_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_extended_read_short_pipe_s.string, fss_extended_read_long_pipe_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_extended_read_short_original_s.string, fss_extended_read_long_original_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_extended_read_short_select_s.string, fss_extended_read_long_select_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_extended_read_short_total_s.string, fss_extended_read_long_total_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_extended_read_short_trim_s.string, fss_extended_read_long_trim_s.string, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_extended_read_short_content_s, fss_extended_read_long_content_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_extended_read_short_columns_s, fss_extended_read_long_columns_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_extended_read_short_delimit_s, fss_extended_read_long_delimit_s, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_extended_read_short_depth_s, fss_extended_read_long_depth_s, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_extended_read_short_empty_s, fss_extended_read_long_empty_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_extended_read_short_line_s, fss_extended_read_long_line_s, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_extended_read_short_name_s, fss_extended_read_long_name_s, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_extended_read_short_object_s, fss_extended_read_long_object_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_extended_read_short_pipe_s, fss_extended_read_long_pipe_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_extended_read_short_original_s, fss_extended_read_long_original_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_extended_read_short_select_s, fss_extended_read_long_select_s, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_extended_read_short_total_s, fss_extended_read_long_total_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_extended_read_short_trim_s, fss_extended_read_long_trim_s, 0, 0, f_console_flag_normal_e, 0), \ } #define fss_extended_read_total_parameters_d 26 diff --git a/level_3/fss_extended_read/c/print.c b/level_3/fss_extended_read/c/print.c index 77117be..f998c49 100644 --- a/level_3/fss_extended_read/c/print.c +++ b/level_3/fss_extended_read/c/print.c @@ -118,10 +118,10 @@ extern "C" { #ifndef _di_fss_extended_read_print_line_first_locked_ f_status_t fss_extended_read_print_line_first_locked(fss_extended_read_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } f_print_dynamic_raw(setting->line_first, print.to); @@ -133,10 +133,10 @@ extern "C" { #ifndef _di_fss_extended_read_print_line_first_unlocked_ f_status_t fss_extended_read_print_line_first_unlocked(fss_extended_read_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } fll_print_dynamic_raw(setting->line_first, print.to); @@ -148,10 +148,10 @@ extern "C" { #ifndef _di_fss_extended_read_print_line_last_locked_ f_status_t fss_extended_read_print_line_last_locked(fss_extended_read_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; if (setting->flag & (fss_extended_read_main_flag_verify_e | fss_extended_read_main_flag_file_to_e)) return F_output_not; } @@ -164,10 +164,10 @@ extern "C" { #ifndef _di_fss_extended_read_print_line_last_unlocked_ f_status_t fss_extended_read_print_line_last_unlocked(fss_extended_read_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; if (setting->flag & (fss_extended_read_main_flag_verify_e | fss_extended_read_main_flag_file_to_e)) return F_output_not; } diff --git a/level_3/fss_extended_read/c/print.h b/level_3/fss_extended_read/c/print.h index b211b0f..e325aa3 100644 --- a/level_3/fss_extended_read/c/print.h +++ b/level_3/fss_extended_read/c/print.h @@ -1,7 +1,7 @@ /** * FLL - Level 3 * - * Project: UTF-8 + * Project: UTF8 * API Version: 0.7 * Licenses: lgpl-2.1-or-later */ diff --git a/level_3/fss_identify/c/common.h b/level_3/fss_identify/c/common.h index 5309a34..a2f8a88 100644 --- a/level_3/fss_identify/c/common.h +++ b/level_3/fss_identify/c/common.h @@ -129,7 +129,7 @@ extern "C" { #define fss_identify_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e, 0), \ @@ -142,11 +142,11 @@ extern "C" { macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e, 0), \ \ - macro_f_console_parameter_t_initialize2(fss_identify_short_content_s.string, fss_identify_long_content_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_identify_short_line_s.string, fss_identify_long_line_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_identify_short_name_s.string, fss_identify_long_name_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_identify_short_object_s.string, fss_identify_long_object_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_identify_short_total_s.string, fss_identify_long_total_s.string, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_identify_short_content_s, fss_identify_long_content_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_identify_short_line_s, fss_identify_long_line_s, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_identify_short_name_s, fss_identify_long_name_s, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_identify_short_object_s, fss_identify_long_object_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_identify_short_total_s, fss_identify_long_total_s, 0, 0, f_console_flag_normal_e, 0), \ } #define fss_identify_total_parameters_d 17 diff --git a/level_3/fss_identify/c/print.c b/level_3/fss_identify/c/print.c index e38c9d7..c3c062e 100644 --- a/level_3/fss_identify/c/print.c +++ b/level_3/fss_identify/c/print.c @@ -59,10 +59,10 @@ extern "C" { #ifndef _di_fss_identify_print_line_first_locked_ f_status_t fss_identify_print_line_first_locked(fss_identify_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } f_print_dynamic_raw(setting->line_first, print.to); @@ -74,10 +74,10 @@ extern "C" { #ifndef _di_fss_identify_print_line_first_unlocked_ f_status_t fss_identify_print_line_first_unlocked(fss_identify_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } fll_print_dynamic_raw(setting->line_first, print.to); @@ -89,10 +89,10 @@ extern "C" { #ifndef _di_fss_identify_print_line_last_locked_ f_status_t fss_identify_print_line_last_locked(fss_identify_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; if (setting->flag & (fss_identify_main_flag_verify_e | fss_identify_main_flag_file_to_e)) return F_output_not; } @@ -105,10 +105,10 @@ extern "C" { #ifndef _di_fss_identify_print_line_last_unlocked_ f_status_t fss_identify_print_line_last_unlocked(fss_identify_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; if (setting->flag & (fss_identify_main_flag_verify_e | fss_identify_main_flag_file_to_e)) return F_output_not; } diff --git a/level_3/fss_identify/c/print.h b/level_3/fss_identify/c/print.h index 93faff9..aa748e1 100644 --- a/level_3/fss_identify/c/print.h +++ b/level_3/fss_identify/c/print.h @@ -1,7 +1,7 @@ /** * FLL - Level 3 * - * Project: UTF-8 + * Project: UTF8 * API Version: 0.7 * Licenses: lgpl-2.1-or-later */ diff --git a/level_3/fss_payload_read/c/common.h b/level_3/fss_payload_read/c/common.h index c2473fd..df54e4c 100644 --- a/level_3/fss_payload_read/c/common.h +++ b/level_3/fss_payload_read/c/common.h @@ -215,7 +215,7 @@ extern "C" { #define fss_payload_read_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e, 0), \ @@ -228,20 +228,20 @@ extern "C" { macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e, 0), \ \ - macro_f_console_parameter_t_initialize2(fss_payload_read_short_at_s.string, fss_payload_read_long_at_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_payload_read_short_content_s.string, fss_payload_read_long_content_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_payload_read_short_columns_s.string, fss_payload_read_long_columns_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_payload_read_short_delimit_s.string, fss_payload_read_long_delimit_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_payload_read_short_depth_s.string, fss_payload_read_long_depth_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_payload_read_short_empty_s.string, fss_payload_read_long_empty_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_payload_read_short_line_s.string, fss_payload_read_long_line_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_payload_read_short_name_s.string, fss_payload_read_long_name_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_payload_read_short_object_s.string, fss_payload_read_long_object_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_payload_read_short_pipe_s.string, fss_payload_read_long_pipe_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_payload_read_short_original_s.string, fss_payload_read_long_original_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_payload_read_short_select_s.string, fss_payload_read_long_select_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_payload_read_short_total_s.string, fss_payload_read_long_total_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_payload_read_short_trim_s.string, fss_payload_read_long_trim_s.string, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_payload_read_short_at_s, fss_payload_read_long_at_s, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_payload_read_short_content_s, fss_payload_read_long_content_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_payload_read_short_columns_s, fss_payload_read_long_columns_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_payload_read_short_delimit_s, fss_payload_read_long_delimit_s, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_payload_read_short_depth_s, fss_payload_read_long_depth_s, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_payload_read_short_empty_s, fss_payload_read_long_empty_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_payload_read_short_line_s, fss_payload_read_long_line_s, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_payload_read_short_name_s, fss_payload_read_long_name_s, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_payload_read_short_object_s, fss_payload_read_long_object_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_payload_read_short_pipe_s, fss_payload_read_long_pipe_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_payload_read_short_original_s, fss_payload_read_long_original_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_payload_read_short_select_s, fss_payload_read_long_select_s, 0, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_payload_read_short_total_s, fss_payload_read_long_total_s, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_payload_read_short_trim_s, fss_payload_read_long_trim_s, 0, 0, f_console_flag_normal_e, 0), \ } #define fss_payload_read_total_parameters_d 26 diff --git a/level_3/fss_payload_read/c/print.c b/level_3/fss_payload_read/c/print.c index 274a623..c1b4828 100644 --- a/level_3/fss_payload_read/c/print.c +++ b/level_3/fss_payload_read/c/print.c @@ -128,10 +128,10 @@ extern "C" { #ifndef _di_fss_payload_read_print_line_first_locked_ f_status_t fss_payload_read_print_line_first_locked(fss_payload_read_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } f_print_dynamic_raw(setting->line_first, print.to); @@ -143,10 +143,10 @@ extern "C" { #ifndef _di_fss_payload_read_print_line_first_unlocked_ f_status_t fss_payload_read_print_line_first_unlocked(fss_payload_read_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } fll_print_dynamic_raw(setting->line_first, print.to); @@ -158,10 +158,10 @@ extern "C" { #ifndef _di_fss_payload_read_print_line_last_locked_ f_status_t fss_payload_read_print_line_last_locked(fss_payload_read_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; if (setting->flag & (fss_payload_read_main_flag_verify_e | fss_payload_read_main_flag_file_to_e)) return F_output_not; } @@ -176,8 +176,8 @@ extern "C" { if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; if (setting->flag & (fss_payload_read_main_flag_verify_e | fss_payload_read_main_flag_file_to_e)) return F_output_not; } diff --git a/level_3/fss_payload_read/c/print.h b/level_3/fss_payload_read/c/print.h index c429ba5..a0d8101 100644 --- a/level_3/fss_payload_read/c/print.h +++ b/level_3/fss_payload_read/c/print.h @@ -1,7 +1,7 @@ /** * FLL - Level 3 * - * Project: UTF-8 + * Project: UTF8 * API Version: 0.7 * Licenses: lgpl-2.1-or-later */ diff --git a/level_3/fss_write/c/main/common.h b/level_3/fss_write/c/main/common.h index 32fcc53..3d9b9e6 100644 --- a/level_3/fss_write/c/main/common.h +++ b/level_3/fss_write/c/main/common.h @@ -251,7 +251,7 @@ extern "C" { #define fss_write_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e, 0), \ @@ -264,20 +264,20 @@ extern "C" { macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e, 0), \ \ - macro_f_console_parameter_t_initialize2(fss_write_short_as_s.string, fss_write_long_as_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_write_short_backtick_s.string, fss_write_long_backtick_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_write_short_content_s.string, fss_write_long_content_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_write_short_content_end_s.string, fss_write_long_content_end_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_write_short_content_next_s.string, fss_write_long_content_next_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_write_short_double_s.string, fss_write_long_double_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_write_short_file_s.string, fss_write_long_file_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_write_short_ignore_s.string, fss_write_long_ignore_s.string, 0, 2, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_write_short_object_s.string, fss_write_long_object_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_write_short_object_open_s.string, fss_write_long_object_open_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_write_short_partial_s.string, fss_write_long_partial_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_write_short_prepend_s.string, fss_write_long_prepend_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_write_short_single_s.string, fss_write_long_single_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(fss_write_short_trim_s.string, fss_write_long_trim_s.string, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_write_short_as_s, fss_write_long_as_s, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_write_short_backtick_s, fss_write_long_backtick_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_write_short_content_s, fss_write_long_content_s, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_write_short_content_end_s, fss_write_long_content_end_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_write_short_content_next_s, fss_write_long_content_next_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_write_short_double_s, fss_write_long_double_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_write_short_file_s, fss_write_long_file_s, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_write_short_ignore_s, fss_write_long_ignore_s, 2, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_write_short_object_s, fss_write_long_object_s, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_write_short_object_open_s, fss_write_long_object_open_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_write_short_partial_s, fss_write_long_partial_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_write_short_prepend_s, fss_write_long_prepend_s, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_write_short_single_s, fss_write_long_single_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(fss_write_short_trim_s, fss_write_long_trim_s, 0, f_console_flag_normal_e, 0), \ } #define fss_write_total_parameters_d 26 diff --git a/level_3/fss_write/c/main/print.c b/level_3/fss_write/c/main/print.c index 9c6b29d..16ca824 100644 --- a/level_3/fss_write/c/main/print.c +++ b/level_3/fss_write/c/main/print.c @@ -7,7 +7,7 @@ extern "C" { #ifndef _di_fss_write_print_error_ f_status_t fss_write_print_error(fss_write_setting_t * const setting, const fl_print_t print, const f_string_t function) { - if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; fss_write_print_line_first_locked(setting, print); fll_error_print(print, F_status_set_fine(setting->status), function, F_true); @@ -20,7 +20,7 @@ extern "C" { #ifndef _di_fss_write_print_error_file_ f_status_t fss_write_print_error_file(fss_write_setting_t * const setting, const fl_print_t print, const f_string_t function, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) { - if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; fss_write_print_line_first_locked(setting, print); fll_error_file_print(print, F_status_set_fine(setting->status), function, F_true, name, operation, type); @@ -33,7 +33,7 @@ extern "C" { #ifndef _di_fss_write_print_error_parameter_same_times_at_least_ f_status_t fss_write_print_error_parameter_same_times_at_least(fss_write_setting_t * const setting, const fl_print_t print) { - if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; f_file_stream_lock(print.to); @@ -56,7 +56,7 @@ extern "C" { #ifndef _di_fss_write_print_error_one_content_only_ f_status_t fss_write_print_error_one_content_only(fss_write_setting_t * const setting, const fl_print_t print) { - if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; f_file_stream_lock(print.to); @@ -75,7 +75,7 @@ extern "C" { #ifndef _fss_write_print_error_prepend_only_whitespace_ f_status_t fss_write_print_error_prepend_only_whitespace(fss_write_setting_t * const setting, const fl_print_t print) { - if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; f_file_stream_lock(print.to); @@ -92,7 +92,7 @@ extern "C" { #ifndef _di_fss_write_print_error_unsupported_eol_ f_status_t fss_write_print_error_unsupported_eol(fss_write_setting_t * const setting, const fl_print_t print) { - if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; f_file_stream_lock(print.to); @@ -166,10 +166,10 @@ extern "C" { #ifndef _di_fss_write_print_line_first_locked_ f_status_t fss_write_print_line_first_locked(fss_write_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; if (setting->flag & fss_write_flag_file_to_e) return F_output_not; } @@ -182,10 +182,10 @@ extern "C" { #ifndef _di_fss_write_print_line_first_unlocked_ f_status_t fss_write_print_line_first_unlocked(fss_write_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; if (setting->flag & fss_write_flag_file_to_e) return F_output_not; } @@ -198,10 +198,10 @@ extern "C" { #ifndef _di_fss_write_print_line_last_locked_ f_status_t fss_write_print_line_last_locked(fss_write_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; if (setting->flag & fss_write_flag_file_to_e) return F_output_not; } @@ -214,10 +214,10 @@ extern "C" { #ifndef _di_fss_write_print_line_last_unlocked_ f_status_t fss_write_print_line_last_unlocked(fss_write_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; if (setting->flag & fss_write_flag_file_to_e) return F_output_not; } diff --git a/level_3/fss_write/c/payload/print.c b/level_3/fss_write/c/payload/print.c index b091049..f1c4e78 100644 --- a/level_3/fss_write/c/payload/print.c +++ b/level_3/fss_write/c/payload/print.c @@ -7,7 +7,7 @@ extern "C" { #ifndef _di_fss_write_payload_print_error_payload_not_last_ f_status_t fss_write_payload_print_error_payload_not_last(fss_write_setting_t * const setting, const fl_print_t print) { - if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; f_file_stream_lock(print.to); diff --git a/level_3/iki_read/c/main/common.h b/level_3/iki_read/c/main/common.h index c936690..39e4379 100644 --- a/level_3/iki_read/c/main/common.h +++ b/level_3/iki_read/c/main/common.h @@ -192,7 +192,7 @@ extern "C" { #define iki_read_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e, 0), \ @@ -205,18 +205,18 @@ extern "C" { macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e, 0), \ \ - macro_f_console_parameter_t_initialize2(iki_read_short_at_s.string, iki_read_long_at_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(iki_read_short_content_s.string, iki_read_long_content_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(iki_read_short_line_s.string, iki_read_long_line_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(iki_read_short_literal_s.string, iki_read_long_literal_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(iki_read_short_name_s.string, iki_read_long_name_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(iki_read_short_object_s.string, iki_read_long_object_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(iki_read_short_reassign_s.string, iki_read_long_reassign_s.string, 0, 3, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(iki_read_short_replace_s.string, iki_read_long_replace_s.string, 0, 2, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(iki_read_short_substitute_s.string, iki_read_long_substitute_s.string, 0, 3, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(iki_read_short_total_s.string, iki_read_long_total_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(iki_read_short_whole_s.string, iki_read_long_whole_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(iki_read_short_wrap_s.string, iki_read_long_wrap_s.string, 0, 3, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(iki_read_short_at_s, iki_read_long_at_s, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(iki_read_short_content_s, iki_read_long_content_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(iki_read_short_line_s, iki_read_long_line_s, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(iki_read_short_literal_s, iki_read_long_literal_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(iki_read_short_name_s, iki_read_long_name_s, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(iki_read_short_object_s, iki_read_long_object_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(iki_read_short_reassign_s, iki_read_long_reassign_s, 3, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(iki_read_short_replace_s, iki_read_long_replace_s, 2, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(iki_read_short_substitute_s, iki_read_long_substitute_s, 3, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(iki_read_short_total_s, iki_read_long_total_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(iki_read_short_whole_s, iki_read_long_whole_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(iki_read_short_wrap_s, iki_read_long_wrap_s, 3, f_console_flag_normal_e, 0), \ } #define iki_read_total_parameters_d 24 diff --git a/level_3/iki_read/c/main/print.c b/level_3/iki_read/c/main/print.c index 065e9b6..d93cfa6 100644 --- a/level_3/iki_read/c/main/print.c +++ b/level_3/iki_read/c/main/print.c @@ -8,11 +8,7 @@ extern "C" { #ifndef _di_iki_read_print_error_ f_status_t iki_read_print_error(iki_read_setting_t * const setting, const fl_print_t print, const f_string_t function) { - if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not; - - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; - } + if (print.verbosity < f_console_verbosity_error_e) return F_output_not; iki_read_print_line_first_locked(setting, print); fll_error_print(print, F_status_set_fine(setting->status), function, F_true); @@ -25,11 +21,7 @@ extern "C" { #ifndef _di_iki_read_print_error_file_ f_status_t iki_read_print_error_file(iki_read_setting_t * const setting, const fl_print_t print, const f_string_t function, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) { - if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not; - - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; - } + if (print.verbosity < f_console_verbosity_error_e) return F_output_not; iki_read_print_line_first_locked(setting, print); fll_error_file_print(print, F_status_set_fine(setting->status), function, F_true, name, operation, type); @@ -137,10 +129,10 @@ extern "C" { #ifndef _di_iki_read_print_line_first_locked_ f_status_t iki_read_print_line_first_locked(iki_read_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } f_print_dynamic_raw(setting->line_first, print.to); @@ -152,10 +144,10 @@ extern "C" { #ifndef _di_iki_read_print_line_first_unlocked_ f_status_t iki_read_print_line_first_unlocked(iki_read_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } fll_print_dynamic_raw(setting->line_first, print.to); @@ -167,10 +159,10 @@ extern "C" { #ifndef _di_iki_read_print_line_last_locked_ f_status_t iki_read_print_line_last_locked(iki_read_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } fll_print_dynamic_raw(setting->line_last, print.to); @@ -182,10 +174,10 @@ extern "C" { #ifndef _di_iki_read_print_line_last_unlocked_ f_status_t iki_read_print_line_last_unlocked(iki_read_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } f_print_dynamic_raw(setting->line_last, print.to); diff --git a/level_3/iki_read/c/main/print.h b/level_3/iki_read/c/main/print.h index 7d1dc4c..8883895 100644 --- a/level_3/iki_read/c/main/print.h +++ b/level_3/iki_read/c/main/print.h @@ -1,7 +1,7 @@ /** * FLL - Level 3 * - * Project: UTF-8 + * Project: UTF8 * API Version: 0.7 * Licenses: lgpl-2.1-or-later */ diff --git a/level_3/iki_write/c/main/common-print.h b/level_3/iki_write/c/main/common-print.h index f4b329c..f83388c 100644 --- a/level_3/iki_write/c/main/common-print.h +++ b/level_3/iki_write/c/main/common-print.h @@ -1,7 +1,7 @@ /** * FLL - Level 3 * - * Project: FSS Write + * Project: IKI Write * API Version: 0.7 * Licenses: lgpl-2.1-or-later * diff --git a/level_3/iki_write/c/main/common.h b/level_3/iki_write/c/main/common.h index ef2394c..5afa646 100644 --- a/level_3/iki_write/c/main/common.h +++ b/level_3/iki_write/c/main/common.h @@ -147,7 +147,7 @@ extern "C" { #define iki_write_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e, 0), \ @@ -160,12 +160,12 @@ extern "C" { macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e, 0), \ \ - macro_f_console_parameter_t_initialize2(iki_write_short_backtick_s.string, iki_write_long_backtick_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(iki_write_short_content_s.string, iki_write_long_content_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(iki_write_short_double_s.string, iki_write_long_double_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(iki_write_short_file_s.string, iki_write_long_file_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(iki_write_short_object_s.string, iki_write_long_object_s.string, 0, 1, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(iki_write_short_single_s.string, iki_write_long_single_s.string, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(iki_write_short_backtick_s, iki_write_long_backtick_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(iki_write_short_content_s, iki_write_long_content_s, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(iki_write_short_double_s, iki_write_long_double_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(iki_write_short_file_s, iki_write_long_file_s, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(iki_write_short_object_s, iki_write_long_object_s, 1, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(iki_write_short_single_s, iki_write_long_single_s, 0, f_console_flag_normal_e, 0), \ } #define iki_write_total_parameters_d 18 diff --git a/level_3/iki_write/c/main/print.c b/level_3/iki_write/c/main/print.c index e55e68e..4ed07f8 100644 --- a/level_3/iki_write/c/main/print.c +++ b/level_3/iki_write/c/main/print.c @@ -8,11 +8,7 @@ extern "C" { #ifndef _di_iki_write_print_error_ f_status_t iki_write_print_error(iki_write_setting_t * const setting, const fl_print_t print, const f_string_t function) { - if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not; - - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; - } + if (print.verbosity < f_console_verbosity_error_e) return F_output_not; iki_write_print_line_first_locked(setting, print); fll_error_print(print, F_status_set_fine(setting->status), function, F_true); @@ -25,11 +21,7 @@ extern "C" { #ifndef _di_iki_write_print_error_file_ f_status_t iki_write_print_error_file(iki_write_setting_t * const setting, const fl_print_t print, const f_string_t function, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) { - if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not; - - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; - } + if (print.verbosity < f_console_verbosity_error_e) return F_output_not; iki_write_print_line_first_locked(setting, print); fll_error_file_print(print, F_status_set_fine(setting->status), function, F_true, name, operation, type); @@ -42,11 +34,7 @@ extern "C" { #ifndef _di_iki_write_print_error_main_missing_ f_status_t iki_write_print_error_main_missing(iki_write_setting_t * const setting, const fl_print_t print) { - if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not; - - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; - } + if (print.verbosity < f_console_verbosity_error_e) return F_output_not; f_file_stream_lock(print.to); @@ -65,11 +53,7 @@ extern "C" { #ifndef _di_iki_write_print_error_object_not_valid_ f_status_t iki_write_print_error_object_not_valid(iki_write_setting_t * const setting, const fl_print_t print, const f_string_static_t object) { - if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not; - - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; - } + if (print.verbosity < f_console_verbosity_error_e) return F_output_not; f_file_stream_lock(print.to); @@ -143,10 +127,10 @@ extern "C" { #ifndef _di_iki_write_print_line_first_locked_ f_status_t iki_write_print_line_first_locked(iki_write_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } f_print_dynamic_raw(setting->line_first, print.to); @@ -158,10 +142,10 @@ extern "C" { #ifndef _di_iki_write_print_line_first_unlocked_ f_status_t iki_write_print_line_first_unlocked(iki_write_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } fll_print_dynamic_raw(setting->line_first, print.to); @@ -173,10 +157,10 @@ extern "C" { #ifndef _di_iki_write_print_line_last_locked_ f_status_t iki_write_print_line_last_locked(iki_write_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } fll_print_dynamic_raw(setting->line_last, print.to); @@ -188,10 +172,10 @@ extern "C" { #ifndef _di_iki_write_print_line_last_unlocked_ f_status_t iki_write_print_line_last_unlocked(iki_write_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } f_print_dynamic_raw(setting->line_last, print.to); diff --git a/level_3/iki_write/c/main/print.h b/level_3/iki_write/c/main/print.h index 6fa4a6d..88f9ff7 100644 --- a/level_3/iki_write/c/main/print.h +++ b/level_3/iki_write/c/main/print.h @@ -1,7 +1,7 @@ /** * FLL - Level 3 * - * Project: UTF-8 + * Project: UTF8 * API Version: 0.7 * Licenses: lgpl-2.1-or-later */ diff --git a/level_3/status_code/c/main/common-print.h b/level_3/status_code/c/main/common-print.h index f9f7c2f..9ef38c0 100644 --- a/level_3/status_code/c/main/common-print.h +++ b/level_3/status_code/c/main/common-print.h @@ -1,7 +1,7 @@ /** * FLL - Level 3 * - * Project: FSS Write + * Project: Status Code * API Version: 0.7 * Licenses: lgpl-2.1-or-later * diff --git a/level_3/status_code/c/main/common.h b/level_3/status_code/c/main/common.h index 94d0422..064e6b6 100644 --- a/level_3/status_code/c/main/common.h +++ b/level_3/status_code/c/main/common.h @@ -168,7 +168,7 @@ extern "C" { #define status_code_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e, 0), \ @@ -181,10 +181,10 @@ extern "C" { macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e, 0), \ \ - macro_f_console_parameter_t_initialize2(status_code_short_fine_s.string, status_code_long_fine_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(status_code_short_warning_s.string, status_code_long_warning_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(status_code_short_error_s.string, status_code_long_error_s.string, 0, 0, f_console_flag_normal_e, 0), \ - macro_f_console_parameter_t_initialize2(status_code_short_number_s.string, status_code_long_number_s.string, 0, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(status_code_short_fine_s, status_code_long_fine_s, 0, f_console_flag_normal_e, 0) \ + macro_f_console_parameter_t_initialize4(status_code_short_warning_s, status_code_long_warning_s, 0, f_console_flag_normal_e, 0) \ + macro_f_console_parameter_t_initialize4(status_code_short_error_s, status_code_long_error_s, 0, f_console_flag_normal_e, 0) \ + macro_f_console_parameter_t_initialize4(status_code_short_number_s, status_code_long_number_s, 0, f_console_flag_normal_e, 0) \ } #define status_code_total_parameters_d 16 diff --git a/level_3/status_code/c/main/print.c b/level_3/status_code/c/main/print.c index 7b7b807..e74871f 100644 --- a/level_3/status_code/c/main/print.c +++ b/level_3/status_code/c/main/print.c @@ -8,11 +8,7 @@ extern "C" { #ifndef _di_status_code_print_error_ f_status_t status_code_print_error(status_code_setting_t * const setting, const fl_print_t print, const f_string_t function) { - if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not; - - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; - } + if (print.verbosity < f_console_verbosity_error_e) return F_output_not; status_code_print_line_first_locked(setting, print); fll_error_print(print, F_status_set_fine(setting->status), function, F_true); @@ -25,11 +21,7 @@ extern "C" { #ifndef _di_status_code_print_error_cannot_error_warning_number_ f_status_t status_code_print_error_cannot_error_warning_number(status_code_setting_t * const setting, const fl_print_t print) { - if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not; - - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; - } + if (print.verbosity < f_console_verbosity_error_e) return F_output_not; f_file_stream_lock(print.to); @@ -50,11 +42,7 @@ extern "C" { #ifndef _di_status_code_print_error_no_status_codes_ f_status_t status_code_print_error_no_status_codes(status_code_setting_t * const setting, const fl_print_t print) { - if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not; - - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; - } + if (print.verbosity < f_console_verbosity_error_e) return F_output_not; fll_print_format("%[No status code is specified.%]%r", print.to, print.context, print.context, f_string_eol_s); @@ -65,11 +53,7 @@ extern "C" { #ifndef _di_status_code_print_error_invalid_callback_ f_status_t status_code_print_error_invalid_callback(status_code_setting_t * const setting, const fl_print_t print, const f_string_t name) { - if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not; - - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; - } + if (print.verbosity < f_console_verbosity_error_e) return F_output_not; f_file_stream_lock(print.to); @@ -153,10 +137,10 @@ extern "C" { #ifndef _di_status_code_print_line_first_locked_ f_status_t status_code_print_line_first_locked(status_code_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } f_print_dynamic_raw(setting->line_first, print.to); @@ -168,10 +152,10 @@ extern "C" { #ifndef _di_status_code_print_line_first_unlocked_ f_status_t status_code_print_line_first_unlocked(status_code_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } fll_print_dynamic_raw(setting->line_first, print.to); @@ -183,10 +167,10 @@ extern "C" { #ifndef _di_status_code_print_line_last_locked_ f_status_t status_code_print_line_last_locked(status_code_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } fll_print_dynamic_raw(setting->line_last, print.to); @@ -198,10 +182,10 @@ extern "C" { #ifndef _di_status_code_print_line_last_unlocked_ f_status_t status_code_print_line_last_unlocked(status_code_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } f_print_dynamic_raw(setting->line_last, print.to); diff --git a/level_3/utf8/c/main/common-print.h b/level_3/utf8/c/main/common-print.h index e8bfa4c..c74d180 100644 --- a/level_3/utf8/c/main/common-print.h +++ b/level_3/utf8/c/main/common-print.h @@ -1,7 +1,7 @@ /** * FLL - Level 3 * - * Project: FSS Write + * Project: UTF8 * API Version: 0.7 * Licenses: lgpl-2.1-or-later * diff --git a/level_3/utf8/c/main/common.h b/level_3/utf8/c/main/common.h index 6fb1c24..11e3163 100644 --- a/level_3/utf8/c/main/common.h +++ b/level_3/utf8/c/main/common.h @@ -1,7 +1,7 @@ /** * FLL - Level 3 * - * Project: UTF-8 + * Project: UTF8 * API Version: 0.7 * Licenses: lgpl-2.1-or-later * @@ -275,7 +275,7 @@ extern "C" { #define utf8_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e, 0), \ macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e, 0), \ diff --git a/level_3/utf8/c/main/main.h b/level_3/utf8/c/main/main.h index f6537e0..f6e3e81 100644 --- a/level_3/utf8/c/main/main.h +++ b/level_3/utf8/c/main/main.h @@ -1,7 +1,7 @@ /** * FLL - Level 3 * - * Project: UTF-8 + * Project: UTF8 * API Version: 0.7 * Licenses: lgpl-2.1-or-later * diff --git a/level_3/utf8/c/main/print.c b/level_3/utf8/c/main/print.c index dd90e9b..0c91151 100644 --- a/level_3/utf8/c/main/print.c +++ b/level_3/utf8/c/main/print.c @@ -8,11 +8,7 @@ extern "C" { #ifndef _di_utf8_print_error_ f_status_t utf8_print_error(utf8_setting_t * const setting, const fl_print_t print, const f_string_t function) { - if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not; - - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; - } + if (print.verbosity < f_console_verbosity_error_e) return F_output_not; utf8_print_line_first_locked(setting, print); fll_error_print(print, F_status_set_fine(setting->status), function, F_true); @@ -25,13 +21,9 @@ extern "C" { #ifndef _di_utf8_print_error_decode_ f_status_t utf8_print_error_decode(utf8_setting_t * const setting, const fl_print_t print, const f_status_t status, const f_string_static_t invalid) { - if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (print.verbosity < f_console_verbosity_error_e) return F_output_not; if (setting->flag & (utf8_main_flag_strip_invalid_e | utf8_main_flag_verify_e)) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; - } - utf8_print_line_first_unlocked(setting, print); fl_print_format("%[%QFailed to decode character code '%]", print.to, print.set->error, print.prefix, print.set->error); @@ -68,11 +60,7 @@ extern "C" { #ifndef _di_utf8_print_error_encode_ f_status_t utf8_print_error_encode(utf8_setting_t * const setting, const fl_print_t print, const f_status_t status, const uint32_t codepoint) { - if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not; - - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; - } + if (print.verbosity < f_console_verbosity_error_e) return F_output_not; utf8_print_line_first_unlocked(setting, print); @@ -95,11 +83,7 @@ extern "C" { #ifndef _di_utf8_print_error_file_ f_status_t utf8_print_error_file(utf8_setting_t * const setting, const fl_print_t print, const f_string_t function, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) { - if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not; - - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; - } + if (print.verbosity < f_console_verbosity_error_e) return F_output_not; utf8_print_line_first_locked(setting, print); fll_error_file_print(print, F_status_set_fine(setting->status), function, F_true, name, operation, type); @@ -112,11 +96,7 @@ extern "C" { #ifndef _di_utf8_print_error_no_from_ f_status_t utf8_print_error_no_from(utf8_setting_t * const setting, const fl_print_t print) { - if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not; - - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; - } + if (print.verbosity < f_console_verbosity_error_e) return F_output_not; fll_print_format("%[%QNo from sources are specified, please pipe data, designate a file, or add parameters.%]%r", print.to, print.set->error, print.prefix, print.set->error, f_string_eol_s); @@ -127,11 +107,7 @@ extern "C" { #ifndef _di_utf8_print_error_parameter_file_name_empty_ f_status_t utf8_print_error_parameter_file_name_empty(utf8_setting_t * const setting, const fl_print_t print, const f_array_length_t index) { - if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not; - - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; - } + if (print.verbosity < f_console_verbosity_error_e) return F_output_not; f_file_stream_lock(print.to); @@ -150,11 +126,7 @@ extern "C" { #ifndef _di_utf8_print_error_parameter_file_not_found_ f_status_t utf8_print_error_parameter_file_not_found(utf8_setting_t * const setting, const fl_print_t print, const bool from, const f_string_static_t name) { - if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not; - - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; - } + if (print.verbosity < f_console_verbosity_error_e) return F_output_not; f_file_stream_lock(print.to); @@ -173,11 +145,7 @@ extern "C" { #ifndef _di_utf8_print_error_parameter_file_to_too_many_ f_status_t utf8_print_error_parameter_file_to_too_many(utf8_setting_t * const setting, const fl_print_t print) { - if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not; - - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; - } + if (print.verbosity < f_console_verbosity_error_e) return F_output_not; utf8_print_line_first_locked(setting, print); @@ -347,10 +315,10 @@ extern "C" { #ifndef _di_utf8_print_line_first_locked_ f_status_t utf8_print_line_first_locked(utf8_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; if (setting->flag & (utf8_main_flag_verify_e | utf8_main_flag_file_to_e)) return F_output_not; } @@ -363,10 +331,10 @@ extern "C" { #ifndef _di_utf8_print_line_first_unlocked_ f_status_t utf8_print_line_first_unlocked(utf8_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; if (setting->flag & (utf8_main_flag_verify_e | utf8_main_flag_file_to_e)) return F_output_not; } @@ -379,10 +347,10 @@ extern "C" { #ifndef _di_utf8_print_line_last_locked_ f_status_t utf8_print_line_last_locked(utf8_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; if (setting->flag & (utf8_main_flag_verify_e | utf8_main_flag_file_to_e)) return F_output_not; } @@ -395,10 +363,10 @@ extern "C" { #ifndef _di_utf8_print_line_last_unlocked_ f_status_t utf8_print_line_last_unlocked(utf8_setting_t * const setting, const fl_print_t print) { - if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; + if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (!F_status_is_error(setting->status)) { - if (print.verbosity == f_console_verbosity_error_e) return F_output_not; + if (F_status_is_error_not(setting->status)) { + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; if (setting->flag & (utf8_main_flag_verify_e | utf8_main_flag_file_to_e)) return F_output_not; } diff --git a/level_3/utf8/c/main/print.h b/level_3/utf8/c/main/print.h index 08842f7..923f03d 100644 --- a/level_3/utf8/c/main/print.h +++ b/level_3/utf8/c/main/print.h @@ -1,7 +1,7 @@ /** * FLL - Level 3 * - * Project: UTF-8 + * Project: UTF8 * API Version: 0.7 * Licenses: lgpl-2.1-or-later */ diff --git a/level_3/utf8/c/main/private-common.h b/level_3/utf8/c/main/private-common.h index 4e587c0..48dad90 100644 --- a/level_3/utf8/c/main/private-common.h +++ b/level_3/utf8/c/main/private-common.h @@ -1,7 +1,7 @@ /** * FLL - Level 3 * - * Project: UTF-8 + * Project: UTF8 * API Version: 0.7 * Licenses: lgpl-2.1-or-later */ diff --git a/level_3/utf8/c/main/private-utf8.h b/level_3/utf8/c/main/private-utf8.h index 6c6aca5..6638f12 100644 --- a/level_3/utf8/c/main/private-utf8.h +++ b/level_3/utf8/c/main/private-utf8.h @@ -1,7 +1,7 @@ /** * FLL - Level 3 * - * Project: UTF-8 + * Project: UTF8 * API Version: 0.7 * Licenses: lgpl-2.1-or-later */ diff --git a/level_3/utf8/c/main/private-utf8_bytesequence.h b/level_3/utf8/c/main/private-utf8_bytesequence.h index c2c6625..cd2c075 100644 --- a/level_3/utf8/c/main/private-utf8_bytesequence.h +++ b/level_3/utf8/c/main/private-utf8_bytesequence.h @@ -1,7 +1,7 @@ /** * FLL - Level 3 * - * Project: UTF-8 + * Project: UTF8 * API Version: 0.7 * Licenses: lgpl-2.1-or-later */ diff --git a/level_3/utf8/c/main/private-utf8_codepoint.h b/level_3/utf8/c/main/private-utf8_codepoint.h index 360e75b..60b8ba8 100644 --- a/level_3/utf8/c/main/private-utf8_codepoint.h +++ b/level_3/utf8/c/main/private-utf8_codepoint.h @@ -1,7 +1,7 @@ /** * FLL - Level 3 * - * Project: UTF-8 + * Project: UTF8 * API Version: 0.7 * Licenses: lgpl-2.1-or-later */ diff --git a/level_3/utf8/c/main/utf8.h b/level_3/utf8/c/main/utf8.h index 4347b81..ecc37ff 100644 --- a/level_3/utf8/c/main/utf8.h +++ b/level_3/utf8/c/main/utf8.h @@ -1,7 +1,7 @@ /** * FLL - Level 3 * - * Project: UTF-8 + * Project: UTF8 * API Version: 0.7 * Licenses: lgpl-2.1-or-later * -- 1.8.3.1