From 852f792fa8fd85f6abca93f5528f47bda068aec9 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sun, 20 Sep 2020 21:45:32 -0500 Subject: [PATCH] Update: move the, now standard, verbosity modes into the f_console project. The f_console project already provides the parameters matching these modes. This makes me think that this is the best place to relocate the verbosity modes. --- level_0/f_console/c/console-common.h | 14 +++ level_3/fake/c/fake.c | 12 +- level_3/fake/c/fake.h | 9 +- level_3/fake/c/private-build.c | 64 +++++----- level_3/fake/c/private-clean.c | 6 +- level_3/fake/c/private-fake.c | 30 ++--- level_3/fake/c/private-make.c | 216 ++++++++++++++++---------------- level_3/fake/c/private-print.c | 92 +++++++------- level_3/fake/c/private-skeleton.c | 18 +-- level_3/iki_read/c/iki_read.c | 38 +++--- level_3/iki_read/c/iki_read.h | 7 -- level_3/iki_read/c/private-iki_read.c | 40 +++--- level_3/iki_write/c/iki_write.c | 34 ++--- level_3/iki_write/c/iki_write.h | 7 -- level_3/iki_write/c/private-iki_write.c | 48 +++---- 15 files changed, 314 insertions(+), 321 deletions(-) diff --git a/level_0/f_console/c/console-common.h b/level_0/f_console/c/console-common.h index 8cb5315..a5dc61b 100644 --- a/level_0/f_console/c/console-common.h +++ b/level_0/f_console/c/console-common.h @@ -171,6 +171,20 @@ extern "C" { #endif // _di_f_console_types_t_ /** + * Provide the standard verbosity codes. + * + * Intended to be used for the basic/standard verbosity modes for all programs following this practice. + */ +#ifndef _di_f_console_verbosity_ + enum { + f_console_verbosity_quiet = 1, + f_console_verbosity_normal, + f_console_verbosity_verbose, + f_console_verbosity_debug, + }; +#endif // _di_f_console_verbosity_ + +/** * Provide a structure for describing console parameters for the console processing functions to use. * * The short parameters are will be prepended with either '-' or '+'. diff --git a/level_3/fake/c/fake.c b/level_3/fake/c/fake.c index 7e2d60f..2cfba46 100644 --- a/level_3/fake/c/fake.c +++ b/level_3/fake/c/fake.c @@ -138,13 +138,13 @@ extern "C" { } if (choice == fake_parameter_quiet) { - data->verbosity = fake_verbosity_quiet; + data->verbosity = f_console_verbosity_quiet; } else if (choice == fake_parameter_verbose) { - data->verbosity = fake_verbosity_verbose; + data->verbosity = f_console_verbosity_verbose; } else if (choice == fake_parameter_debug) { - data->verbosity = fake_verbosity_debug; + data->verbosity = f_console_verbosity_debug; } } @@ -309,7 +309,7 @@ extern "C" { break; } else if (F_status_is_error(status)) { - if (data->verbosity != fake_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data->context.set.error, "ERROR: The operation '"); fl_color_print(f_type_error, data->context.set.notable, "%s", operations_name); @@ -321,7 +321,7 @@ extern "C" { } // for // ensure a newline is always put at the end of the program execution, unless in quiet mode. - if (data->verbosity != fake_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { if (F_status_is_error(status) || status == F_signal) { fprintf(f_type_error, "%c", f_string_eol[0]); } @@ -331,7 +331,7 @@ extern "C" { } } else { - if (data->verbosity != fake_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print_line(f_type_error, data->context.set.error, "ERROR: You failed to specify an operation."); fprintf(f_type_error, "%c", f_string_eol[0]); diff --git a/level_3/fake/c/fake.h b/level_3/fake/c/fake.h index 14d8454..d57ba1c 100644 --- a/level_3/fake/c/fake.h +++ b/level_3/fake/c/fake.h @@ -225,13 +225,6 @@ extern "C" { #define fake_operations_total 4 #define fake_operations_initialize { 0, 0, 0, 0 } - enum { - fake_verbosity_quiet = 1, - fake_verbosity_normal, - fake_verbosity_verbose, - fake_verbosity_debug, - }; - #define fake_short_define "d" #define fake_short_fakefile "f" #define fake_short_mode "m" @@ -445,7 +438,7 @@ extern "C" { 0, \ f_signal_t_initialize, \ 0, \ - fake_verbosity_normal, \ + f_console_verbosity_normal, \ f_string_dynamics_t_initialize, \ f_string_dynamic_t_initialize, \ f_string_dynamics_t_initialize, \ diff --git a/level_3/fake/c/private-build.c b/level_3/fake/c/private-build.c index 332a303..4ec5453 100644 --- a/level_3/fake/c/private-build.c +++ b/level_3/fake/c/private-build.c @@ -167,7 +167,7 @@ extern "C" { f_string_dynamic_t path_source = f_string_dynamic_t_initialize; f_string_dynamic_t destination_file = f_string_dynamic_t_initialize; - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { printf("%c", f_string_eol[0]); fl_color_print_line(f_type_output, data.context.set.important, "Copying %s.", label); } @@ -185,7 +185,7 @@ extern "C" { fl_directory_recurse_t recurse = fl_directory_recurse_t_initialize; - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { recurse.output = f_type_output; recurse.verbose = fake_verbose_print_copy; } @@ -226,7 +226,7 @@ extern "C" { *status = fl_directory_copy_content(path_source.string, destination.string, path_source.used, destination.used, mode, recurse); if (F_status_is_error(*status)) { - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { for (f_string_length_t j = 0; j < failures.used; j++) { fake_print_error_build_operation_file(data, F_status_set_fine(*status), "fl_directory_copy_content", "copy contents of", "to", path_source.string, destination.string, F_true); } // for @@ -237,7 +237,7 @@ extern "C" { break; } - else if (data.verbosity != fake_verbosity_quiet) { + else if (data.verbosity != f_console_verbosity_quiet) { fake_print_error_build_operation_file(data, F_status_set_fine(*status), "fl_directory_copy_content", "copy contents of", "to", path_source.string, destination.string, F_true); } @@ -273,7 +273,7 @@ extern "C" { break; } - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { printf("Copied file '%s' to '%s'.%c", path_source.string, destination_file.string, f_string_eol[0]); } } @@ -345,7 +345,7 @@ extern "C" { &path_headers, }; - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { printf("%c", f_string_eol[0]); fl_color_print_line(f_type_output, data.context.set.important, "Creating base build directories."); } @@ -371,7 +371,7 @@ extern "C" { return; } - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { printf("Created directory '%s'.%c", directorys[i]->string, f_string_eol[0]); } } // for @@ -412,16 +412,16 @@ extern "C" { } // ensure verbosity level is passed to the scripts so that they can also react to requested verbosity. - if (F_status_is_error_not(*status) && data.verbosity != fake_verbosity_normal) { + if (F_status_is_error_not(*status) && data.verbosity != f_console_verbosity_normal) { char argument[3] = { f_console_symbol_disable, 0, 0 }; - if (data.verbosity == fake_verbosity_quiet) { + if (data.verbosity == f_console_verbosity_quiet) { argument[1] = f_console_standard_short_quiet[0]; } - else if (data.verbosity == fake_verbosity_verbose) { + else if (data.verbosity == f_console_verbosity_verbose) { argument[1] = f_console_standard_short_verbose[0]; } - else if (data.verbosity == fake_verbosity_debug) { + else if (data.verbosity == f_console_verbosity_debug) { argument[1] = f_console_standard_short_debug[0]; } @@ -591,7 +591,7 @@ extern "C" { else { if (F_status_is_error(*status)) { if (F_status_set_fine(*status) == F_failure) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data.context.set.error, "ERROR: Failed to execute script: "); fl_color_print(f_type_error, data.context.set.notable, "%s", path.string); @@ -660,7 +660,7 @@ extern "C" { if (F_status_is_error(*status) || f_file_exists(file_stage.string) == F_true) return; if (!data_build.setting.build_sources_library.used) return; - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { printf("%c", f_string_eol[0]); fl_color_print_line(f_type_output, data.context.set.important, "Compiling shared library."); } @@ -883,7 +883,7 @@ extern "C" { *status = f_file_link(parameter_file_name_micro, parameter_file_path); - if (F_status_is_error_not(*status) && data.verbosity == fake_verbosity_verbose) { + if (F_status_is_error_not(*status) && data.verbosity == f_console_verbosity_verbose) { printf("Linked file '%s' to '%s'.%c", parameter_file_path, parameter_file_name_micro, f_string_eol[0]); } else if (F_status_is_error(*status)) { @@ -923,7 +923,7 @@ extern "C" { *status = f_file_link(parameter_file_name_micro, parameter_file_path); } - if (F_status_is_error_not(*status) && data.verbosity == fake_verbosity_verbose) { + if (F_status_is_error_not(*status) && data.verbosity == f_console_verbosity_verbose) { printf("Linked file '%s' to '", parameter_file_path); if (data_build.setting.version_target == fake_build_version_type_major) { @@ -968,7 +968,7 @@ extern "C" { if (F_status_is_error(*status) || f_file_exists(file_stage.string) == F_true) return; if (!data_build.setting.build_sources_library.used) return; - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { printf("%c", f_string_eol[0]); fl_color_print_line(f_type_output, data.context.set.important, "Compiling static library."); } @@ -1140,7 +1140,7 @@ extern "C" { if (F_status_is_error_not(*status)) { if (names.used + data_build.setting.environment.used > names.size) { if (names.used + data_build.setting.environment.used > f_array_length_t_size) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data.context.set.error, "ERROR: The values for the setting '"); fl_color_print(f_type_error, data.context.set.notable, "%s", fake_build_setting_name_environment); @@ -1560,7 +1560,7 @@ extern "C" { } // for if (found == F_false) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data.context.set.error, "ERROR: The specified mode '"); fl_color_print(f_type_error, data.context.set.notable, "%s", modes->array[i].string); @@ -1614,7 +1614,7 @@ extern "C" { if (F_status_is_error(*status)) { if (*status == F_status_set_error(F_string_too_large)) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { // @todo update FSS functions to return which setting index the problem happened on. fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data.context.set.error, "ERROR: A setting in the build setting file '"); @@ -1807,7 +1807,7 @@ extern "C" { if (!settings_single_source[i]->used) continue; if (settings_single_source[i]->used > 1) { - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { fprintf(f_type_warning, "%c", f_string_eol[0]); fl_color_print(f_type_warning, data.context.set.warning, "WARNING: the setting '"); fl_color_print(f_type_warning, data.context.set.notable, "%s", settings_single_name[i]); @@ -1829,7 +1829,7 @@ extern "C" { else { *settings_single_bool[i] = F_true; - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { fprintf(f_type_warning, "%c", f_string_eol[0]); fl_color_print(f_type_warning, data.context.set.warning, "WARNING: the setting '"); fl_color_print(f_type_warning, data.context.set.notable, "%s", settings_single_name[i]); @@ -1858,7 +1858,7 @@ extern "C" { else { *settings_single_language[i] = fake_build_language_type_c; - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { fprintf(f_type_warning, "%c", f_string_eol[0]); fl_color_print(f_type_warning, data.context.set.warning, "WARNING: the setting '"); fl_color_print(f_type_warning, data.context.set.notable, "%s", settings_single_name[i]); @@ -1889,7 +1889,7 @@ extern "C" { else { *settings_single_version[i] = fake_build_version_type_major; - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { fprintf(f_type_warning, "%c", f_string_eol[0]); fl_color_print(f_type_warning, data.context.set.warning, "WARNING: the setting '"); fl_color_print(f_type_warning, data.context.set.notable, "%s", settings_single_name[i]); @@ -2022,7 +2022,7 @@ extern "C" { setting->search_shared = F_false; } - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { fprintf(f_type_warning, "%c", f_string_eol[0]); fl_color_print(f_type_warning, data.context.set.error, "WARNING: the parameters '"); fl_color_print(f_type_warning, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_shared_disabled); @@ -2061,7 +2061,7 @@ extern "C" { setting->search_static = F_false; } - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { fprintf(f_type_warning, "%c", f_string_eol[0]); fl_color_print(f_type_warning, data.context.set.error, "WARNING: the parameters '"); fl_color_print(f_type_warning, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_static_disabled); @@ -2091,7 +2091,7 @@ extern "C" { if (setting->build_language == fake_build_language_type_c || setting->build_language == fake_build_language_type_cpp) { if (setting->build_shared == F_false && setting->build_static == F_false) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data.context.set.error, "ERROR: The build settings '"); fl_color_print(f_type_error, data.context.set.notable, "%s", fake_build_setting_name_build_shared); @@ -2261,7 +2261,7 @@ extern "C" { if (F_status_is_error(*status) || f_file_exists(file_stage.string) == F_true) return; if (!data_build.setting.build_sources_library.used) return; - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { printf("%c", f_string_eol[0]); fl_color_print_line(f_type_output, data.context.set.important, "Compiling static objects."); } @@ -2346,7 +2346,7 @@ extern "C" { *status = f_directory_exists(destination_path.string); if (*status == F_false) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data.context.set.error, "ERROR: The path '"); fl_color_print(f_type_error, data.context.set.notable, "%s", destination_path.string); @@ -2373,7 +2373,7 @@ extern "C" { break; } - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { printf("Directory '%s' created.%c", destination_path.string, f_string_eol[0]); } } @@ -2467,7 +2467,7 @@ extern "C" { fake_build_load_setting(data, setting_file, &data_build.setting, &status); if (F_status_is_fine(status)) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { printf("%c", f_string_eol[0]); fl_color_print(f_type_output, data.context.set.important, "Building project%c", data_build.setting.project_name.used ? ' ' : 0); @@ -2591,7 +2591,7 @@ extern "C" { if (F_status_is_error(*status) || f_file_exists(file_stage.string) == F_true) return; if (!data_build.setting.build_sources_program.used) return; - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { printf("%c", f_string_eol[0]); fl_color_print_line(f_type_output, data.context.set.important, "Compiling shared program."); } @@ -2690,7 +2690,7 @@ extern "C" { if (F_status_is_error(*status) || f_file_exists(file_stage.string) == F_true) return; if (!data_build.setting.build_sources_program.used) return; - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { printf("%c", f_string_eol[0]); fl_color_print_line(f_type_output, data.context.set.important, "Compiling static program."); } diff --git a/level_3/fake/c/private-clean.c b/level_3/fake/c/private-clean.c index 844bd27..2766421 100644 --- a/level_3/fake/c/private-clean.c +++ b/level_3/fake/c/private-clean.c @@ -13,7 +13,7 @@ extern "C" { f_return_status fake_clean_operate(const fake_data_t data) { f_status_t status = F_none; - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { printf("%c", f_string_eol[0]); fl_color_print(f_type_output, data.context.set.important, "Deleting all files within build directory '"); fl_color_print(f_type_output, data.context.set.notable, "%s", data.path_build.string); @@ -24,7 +24,7 @@ extern "C" { return F_signal; } - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { status = f_directory_remove_custom(data.path_build.string, f_directory_descriptors_max, F_true, fake_clean_remove_recursively_verbosely); } else { @@ -32,7 +32,7 @@ extern "C" { } if (F_status_set_fine(status) == F_file_found_not) { - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { printf("The build directory '%s' does not exist.%c", data.path_build.string, f_string_eol[0]); } diff --git a/level_3/fake/c/private-fake.c b/level_3/fake/c/private-fake.c index 6f3fb45..25845d8 100644 --- a/level_3/fake/c/private-fake.c +++ b/level_3/fake/c/private-fake.c @@ -12,7 +12,7 @@ extern "C" { int fake_execute(const fake_data_t data, const fake_environment_t environment, const f_string_static_t program, const f_string_statics_t arguments, f_status_t *status) { if (F_status_is_error(*status)) return 1; - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { printf("%s", program.string); for (f_array_length_t i = 0; i < arguments.used; i++) { @@ -59,7 +59,7 @@ extern "C" { return_code = 1; if (F_status_set_fine(*status) == F_file_found_not) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data.context.set.error, "ERROR: Failed to find program '"); fl_color_print(f_type_error, data.context.set.notable, "%s", program.used ? program.string : ""); @@ -642,7 +642,7 @@ extern "C" { status = f_utf_is_word_dash_plus(arguments.argv[location] + j, width_max, F_false); if (F_status_is_error(status)) { - if (fake_print_error(*data, F_status_set_fine(status), "f_utf_is_word_dash_plus", F_false) == F_unknown && data->verbosity != fake_verbosity_quiet) { + if (fake_print_error(*data, F_status_set_fine(status), "f_utf_is_word_dash_plus", F_false) == F_unknown && data->verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data->context.set.error, "ERROR: Failed to process the parameter '"); fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_process); @@ -653,7 +653,7 @@ extern "C" { } if (status == F_false) { - if (data->verbosity != fake_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data->context.set.error, "ERROR: The '"); fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_process); @@ -671,7 +671,7 @@ extern "C" { if (F_status_is_error(status)) { if (status == F_status_set_error(F_string_too_large)) { - if (data->verbosity != fake_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '"); fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, parameters_name[i]); @@ -690,7 +690,7 @@ extern "C" { } if (length == 0 || status == F_data_not) { - if (data->verbosity != fake_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '"); fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, parameters_name[i]); @@ -768,7 +768,7 @@ extern "C" { status = fl_console_parameter_to_string_dynamic_directory(arguments.argv[data->parameters[parameters_id[i]].additional.array[0]], parameters_value[i]); if (F_status_is_error(status)) { - if (fake_print_error(*data, F_status_set_fine(status), "fl_console_parameter_to_string_dynamic_directory", F_false) == F_unknown && data->verbosity != fake_verbosity_quiet) { + if (fake_print_error(*data, F_status_set_fine(status), "fl_console_parameter_to_string_dynamic_directory", F_false) == F_unknown && data->verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data->context.set.error, "ERROR: Failed to process parameter '"); fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, parameters_name[i]); @@ -782,7 +782,7 @@ extern "C" { f_macro_string_dynamic_t_new(status, (*parameters_value[i]), parameter_default_lengths[i]); if (F_status_is_error(status)) { - if (fake_print_error(*data, F_status_set_fine(status), "f_macro_string_dynamic_t_new", F_false) == F_unknown && data->verbosity != fake_verbosity_quiet) { + if (fake_print_error(*data, F_status_set_fine(status), "f_macro_string_dynamic_t_new", F_false) == F_unknown && data->verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data->context.set.error, "ERROR: Failed to load default for the parameter '"); fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, parameters_name[i]); @@ -802,7 +802,7 @@ extern "C" { status = fll_program_parameter_additional_rip(arguments.argv, data->parameters[fake_parameter_define].additional, &data->define); if (F_status_is_error(status)) { - if (fake_print_error(*data, F_status_set_fine(status), "fll_program_parameter_additional_rip", F_false) == F_unknown && data->verbosity != fake_verbosity_quiet) { + if (fake_print_error(*data, F_status_set_fine(status), "fll_program_parameter_additional_rip", F_false) == F_unknown && data->verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data->context.set.error, "ERROR: Failed to process the parameter '"); fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_define); @@ -825,7 +825,7 @@ extern "C" { status = f_utf_is_word(data->define.array[i].string + j, width_max, F_false); if (F_status_is_error(status)) { - if (fake_print_error(*data, F_status_set_fine(status), "f_utf_is_word", F_false) == F_unknown && data->verbosity != fake_verbosity_quiet) { + if (fake_print_error(*data, F_status_set_fine(status), "f_utf_is_word", F_false) == F_unknown && data->verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data->context.set.error, "ERROR: Failed to process the parameter '"); fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_define); @@ -836,7 +836,7 @@ extern "C" { } if (status == F_false) { - if (data->verbosity != fake_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data->context.set.error, "ERROR: The '"); fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_define); @@ -859,7 +859,7 @@ extern "C" { status = fll_program_parameter_additional_rip(arguments.argv, data->parameters[fake_parameter_mode].additional, &data->mode); if (F_status_is_error(status)) { - if (fake_print_error(*data, F_status_set_fine(status), "fll_program_parameter_additional_rip", F_false) == F_unknown && data->verbosity != fake_verbosity_quiet) { + if (fake_print_error(*data, F_status_set_fine(status), "fll_program_parameter_additional_rip", F_false) == F_unknown && data->verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data->context.set.error, "ERROR: Failed to process the parameter '"); fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_mode); @@ -882,7 +882,7 @@ extern "C" { status = f_utf_is_word_dash_plus(data->mode.array[i].string + j, width_max, F_false); if (F_status_is_error(status)) { - if (fake_print_error(*data, F_status_set_fine(status), "f_utf_is_word_dash_plus", F_false) == F_unknown && data->verbosity != fake_verbosity_quiet) { + if (fake_print_error(*data, F_status_set_fine(status), "f_utf_is_word_dash_plus", F_false) == F_unknown && data->verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data->context.set.error, "ERROR: Failed to process the parameter '"); fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_mode); @@ -893,7 +893,7 @@ extern "C" { } if (status == F_false) { - if (data->verbosity != fake_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data->context.set.error, "ERROR: The '"); fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_mode); @@ -935,7 +935,7 @@ extern "C" { case F_signal_quit: case F_signal_termination: - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print_line(f_type_error, data.context.set.error, "ALERT: An appropriate exit signal has been received, now aborting."); } diff --git a/level_3/fake/c/private-make.c b/level_3/fake/c/private-make.c index 285c1b0..ebaa548 100644 --- a/level_3/fake/c/private-make.c +++ b/level_3/fake/c/private-make.c @@ -62,7 +62,7 @@ extern "C" { return F_status_set_error(status); } else if (status == F_exist_not) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(print.to, "%c", f_string_eol[0]); fl_color_print(print.to, print.context, "%s: The group name '", print.prefix); fl_color_print(print.to, data.context.set.notable, "%s", buffer.string); @@ -79,7 +79,7 @@ extern "C" { return F_status_set_error(status); } else if (number > f_type_size_32_unsigned) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(print.to, "%c", f_string_eol[0]); fl_color_print(print.to, print.context, "%s: The number '", print.prefix); fl_color_print(print.to, data.context.set.notable, "%llu", number); @@ -102,7 +102,7 @@ extern "C" { f_status_t status = f_file_mode_from_string(buffer.string, data.umask, mode, replace); if (F_status_is_error(status)) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { if (F_status_set_fine(status) == F_syntax) { fprintf(print.to, "%c", f_string_eol[0]); fl_color_print(print.to, print.context, "%s: The mode '", print.prefix); @@ -140,7 +140,7 @@ extern "C" { return F_status_set_error(status); } else if (status == F_exist_not) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(print.to, "%c", f_string_eol[0]); fl_color_print(print.to, print.context, "%s: The user name '", print.prefix); fl_color_print(print.to, data.context.set.notable, "%s", buffer.string); @@ -157,7 +157,7 @@ extern "C" { return F_status_set_error(status); } else if (number > f_type_size_32_unsigned) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(print.to, "%c", f_string_eol[0]); fl_color_print(print.to, print.context, "%s: The number '", print.prefix); fl_color_print(print.to, data.context.set.notable, "%llu", number); @@ -188,7 +188,7 @@ extern "C" { } if (!data_make->buffer.used) { - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_warning, data.context.set.warning, "WARNING: the fakefile '"); fl_color_print(f_type_warning, data.context.set.notable, "%s", data.file_data_build_fakefile.string); @@ -303,7 +303,7 @@ extern "C" { } if (missing_main) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data.context.set.error, "ERROR: The fakefile '"); fl_color_print(f_type_error, data.context.set.notable, "%s", data.file_data_build_fakefile.string); @@ -434,14 +434,14 @@ extern "C" { data_make->setting_build.environment.array[data_make->setting_build.environment.used].used--; data_make->setting_build.environment.used++; } - else if (data.verbosity == fake_verbosity_verbose) { + else if (data.verbosity == f_console_verbosity_verbose) { fprintf(f_type_warning, "%c", f_string_eol[0]); fl_color_print(f_type_warning, data.context.set.warning, "WARNING: The environment name '"); fl_color_print(f_type_warning, data.context.set.notable, "%s", name_define.string); fl_color_print_line(f_type_warning, data.context.set.warning, "' is already added."); } } - else if (data.verbosity == fake_verbosity_verbose) { + else if (data.verbosity == f_console_verbosity_verbose) { fprintf(f_type_warning, "%c", f_string_eol[0]); fl_color_print(f_type_warning, data.context.set.warning, "WARNING: The environment name '"); fl_color_print(f_type_warning, data.context.set.notable, "%s", name_define.string); @@ -695,7 +695,7 @@ extern "C" { } } else { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data.context.set.error, "ERROR: Invalid characters in the define setting name '"); @@ -784,7 +784,7 @@ extern "C" { } } - if (data.verbosity != fake_verbosity_normal) { + if (data.verbosity != f_console_verbosity_normal) { if (data_make->parameter.verbosity.used >= data_make->parameter.verbosity.size) { *status = fl_string_dynamics_size_increase(f_memory_default_allocation_step, &data_make->parameter.verbosity); @@ -794,7 +794,7 @@ extern "C" { } } - if (data.verbosity == fake_verbosity_quiet) { + if (data.verbosity == f_console_verbosity_quiet) { if (data.parameters[fake_parameter_quiet].type == f_console_type_normal) { *status = fl_string_append(f_console_symbol_short_enable, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); } @@ -806,7 +806,7 @@ extern "C" { *status = fl_string_append(f_console_standard_short_quiet, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); } } - else if (data.verbosity == fake_verbosity_verbose) { + else if (data.verbosity == f_console_verbosity_verbose) { if (data.parameters[fake_parameter_verbose].type == f_console_type_normal) { *status = fl_string_append(f_console_symbol_short_enable, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); } @@ -818,7 +818,7 @@ extern "C" { *status = fl_string_append(f_console_standard_short_verbose, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); } } - else if (data.verbosity == fake_verbosity_debug) { + else if (data.verbosity == f_console_verbosity_debug) { if (data.parameters[fake_parameter_debug].type == f_console_type_normal) { *status = fl_string_append(f_console_symbol_short_enable, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); } @@ -1019,7 +1019,7 @@ extern "C" { return F_signal; } - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { printf("%c", f_string_eol[0]); fl_color_print_line(f_type_output, data.context.set.important, "Making project."); } @@ -1102,7 +1102,7 @@ extern "C" { { f_status_t status_path = f_path_change_at(data_make.path.top); - if (F_status_is_error(status_path) && data.verbosity == fake_verbosity_verbose) { + if (F_status_is_error(status_path) && data.verbosity == f_console_verbosity_verbose) { fprintf(f_type_warning, "%c", f_string_eol[0]); fl_color_print(f_type_warning, data.context.set.warning, "WARNING: Failed change back to orignal path '"); fl_color_print(f_type_warning, data.context.set.notable, "%s", data_make.path.stack.array[0].string); @@ -1867,7 +1867,7 @@ extern "C" { const f_fss_named_t *section = &data_make->fakefile.array[id_section]; - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { printf("%c", f_string_eol[0]); fl_color_print(f_type_output, data.context.set.important, "Processing Section '"); @@ -2182,7 +2182,7 @@ extern "C" { if (i == section->objects.used && (operation_if == fake_make_operation_if_type_true_next || operation_if == fake_make_operation_if_type_false_next || operation_if == fake_make_operation_if_type_else_true || operation_if == fake_make_operation_if_type_else_false)) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { const char *type_name = 0; if (operation_if == fake_make_operation_if_type_true_next || operation_if == fake_make_operation_if_type_false_next) { @@ -2243,7 +2243,7 @@ extern "C" { return; } - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { printf("Breaking as '%s'.", arguments.used ? arguments.array[0].string : fake_make_operation_argument_success); } @@ -2296,7 +2296,7 @@ extern "C" { f_string_length_t destination_length = 0; - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { recurse.output = f_type_output; recurse.verbose = fake_verbose_print_clone; } @@ -2353,7 +2353,7 @@ extern "C" { fake_print_message_file(data, F_status_set_fine(status_file), "f_file_clone", arguments.array[i].string, "clone", F_false, F_true, data_make->print); *status = F_status_set_error(F_failure); } - else if (data.verbosity == fake_verbosity_verbose) { + else if (data.verbosity == f_console_verbosity_verbose) { printf("Cloned '%s' to '%s'.%c", arguments.array[i].string, destination, f_string_eol[0]); } } @@ -2391,7 +2391,7 @@ extern "C" { f_macro_mode_t_set_default_umask(mode, data.umask); - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { recurse.output = f_type_output; recurse.verbose = fake_verbose_print_copy; } @@ -2448,7 +2448,7 @@ extern "C" { fake_print_message_file(data, F_status_set_fine(status_file), "f_file_copy", arguments.array[i].string, "copy", F_false, F_true, data_make->print); *status = F_status_set_error(F_failure); } - else if (data.verbosity == fake_verbosity_verbose) { + else if (data.verbosity == f_console_verbosity_verbose) { printf("Copied '%s' to '%s'.%c", arguments.array[i].string, destination, f_string_eol[0]); } } @@ -2474,7 +2474,7 @@ extern "C" { if (F_status_is_error(*status)) { fake_print_message(data, F_status_set_fine(*status), "f_environment_set", F_true, data_make->print); } - else if (data.verbosity == fake_verbosity_verbose) { + else if (data.verbosity == f_console_verbosity_verbose) { printf("Defined environment variable '%s'.%c", arguments.array[0].string, f_string_eol[0]); } @@ -2492,7 +2492,7 @@ extern "C" { if (F_status_is_error(*status)) { if (F_status_set_fine(*status) == F_file_found_not) { - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { fprintf(f_type_warning, "%c", f_string_eol[0]); fl_color_print(f_type_warning, data.context.set.warning, "WARNING: the file '"); fl_color_print(f_type_warning, data.context.set.notable, "%s", arguments.array[i].string); @@ -2507,7 +2507,7 @@ extern "C" { } } else if (f_macro_file_type_is_directory(file_stat.st_mode)) { - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { *status = f_directory_remove_custom(arguments.array[i].string, recursion_max, F_false, fake_clean_remove_recursively_verbosely); } else { @@ -2515,7 +2515,7 @@ extern "C" { } if (F_status_set_fine(*status) == F_file_found_not) { - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { printf("The directory '%s' does not exist.%c", arguments.array[i].string, f_string_eol[0]); } @@ -2526,7 +2526,7 @@ extern "C" { fake_print_message_file(data, F_status_set_fine(*status), "f_directory_remove", arguments.array[i].string, "delete", F_false, F_true, data_make->print); return; } - else if (data.verbosity == fake_verbosity_verbose) { + else if (data.verbosity == f_console_verbosity_verbose) { printf("Removed '%s'.%c", arguments.array[i].string, f_string_eol[0]); } } @@ -2537,7 +2537,7 @@ extern "C" { fake_print_message_file(data, F_status_set_fine(*status), "f_file_remove", arguments.array[i].string, "delete", F_true, F_true, data_make->print); return; } - else if (data.verbosity == fake_verbosity_verbose) { + else if (data.verbosity == f_console_verbosity_verbose) { printf("Removed '%s'.%c", arguments.array[i].string, f_string_eol[0]); } } @@ -2576,7 +2576,7 @@ extern "C" { return; } - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { printf("Exiting as '%s'.", arguments.used ? arguments.array[0].string : fake_make_operation_argument_success); } @@ -2602,7 +2602,7 @@ extern "C" { data_make->print.to = 0; } - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { printf("Set failure state to '"); if (data_make->setting_make.fail == fake_make_operation_fail_type_exit) { @@ -2647,7 +2647,7 @@ extern "C" { fake_print_message_file(data, *status, "f_file_role_change", arguments.array[i].string, "change group of", F_true, F_true, data_make->print); } - else if (data.verbosity == fake_verbosity_verbose) { + else if (data.verbosity == f_console_verbosity_verbose) { printf("Changed group of '%s' to %llu.%c", arguments.array[i].string, id, f_string_eol[0]); } } // for @@ -2682,7 +2682,7 @@ extern "C" { fake_print_message_file(data, F_status_set_fine(*status), "fll_file_role_change_all", arguments.array[i].string, "change group of", F_true, F_true, data_make->print); } - else if (data.verbosity == fake_verbosity_verbose) { + else if (data.verbosity == f_console_verbosity_verbose) { printf("Changed group of '%s' to %llu.%c", arguments.array[i].string, id, f_string_eol[0]); } } // for @@ -3143,7 +3143,7 @@ extern "C" { *status = F_status_set_error(F_failure); *operation_if = fake_make_operation_if_type_false_always_next; - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); if ((i == 1 && number_left > f_number_t_size_unsigned) || (i > 1 && number_right > f_number_t_size_unsigned)) { @@ -3171,7 +3171,7 @@ extern "C" { if (F_status_is_error(*status)) { fake_print_message_file(data, *status, "f_file_link", arguments.array[1].string, "create link", F_true, F_true, data_make->print); } - else if (data.verbosity == fake_verbosity_verbose) { + else if (data.verbosity == f_console_verbosity_verbose) { printf("Created symbolic link from '%s' to '%s'.%c", arguments.array[1].string, arguments.array[0].string, f_string_eol[0]); } @@ -3212,7 +3212,7 @@ extern "C" { break; } - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { printf("Changed mode of '%s' to %#o.%c", arguments.array[i].string, mode, f_string_eol[0]); } } // for @@ -3254,7 +3254,7 @@ extern "C" { break; } - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { printf("Changed mode of '%s' to %#o.%c", arguments.array[i].string, mode, f_string_eol[0]); } } // for @@ -3270,7 +3270,7 @@ extern "C" { f_string_length_t destination_length = 0; - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { recurse.output = f_type_output; recurse.verbose = fake_verbose_print_move; } @@ -3375,7 +3375,7 @@ extern "C" { fake_print_message_file(data, F_status_set_fine(*status), "f_file_role_change", arguments.array[i].string, "change owner of", F_true, F_true, data_make->print); break; } - else if (data.verbosity == fake_verbosity_verbose) { + else if (data.verbosity == f_console_verbosity_verbose) { printf("Changed owner of '%s' to %d.%c", arguments.array[i].string, id, f_string_eol[0]); } } // for @@ -3410,7 +3410,7 @@ extern "C" { fake_print_message_file(data, F_status_set_fine(*status), "fll_file_role_change_all", arguments.array[i].string, "change owner of", F_true, F_true, data_make->print); } - else if (data.verbosity == fake_verbosity_verbose) { + else if (data.verbosity == f_console_verbosity_verbose) { printf("Changed owner of '%s' to %o.%c", arguments.array[i].string, id, f_string_eol[0]); } } // for @@ -3430,7 +3430,7 @@ extern "C" { return; } - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { *status = fake_make_path_relative(data, data_make->path.stack.array[data_make->path.stack.used - 1], data_make); if (F_status_is_error(*status)) { fake_print_message(data, F_status_set_fine(*status), "fake_make_path_relative", F_true, data_make->print); @@ -3529,7 +3529,7 @@ extern "C" { return; } - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { *status = fake_make_path_relative(data, data_make->path.stack.array[data_make->path.stack.used], data_make); if (F_status_is_error(*status)) { @@ -3557,7 +3557,7 @@ extern "C" { return; } - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { printf("Changed to project path ''.%c", f_string_eol[0]); } @@ -3606,7 +3606,7 @@ extern "C" { } } - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { printf("Touched %s '", arguments.array[0].string); f_print_dynamic(f_type_output, arguments.array[i]); printf("'.%c", f_string_eol[0]); @@ -3674,7 +3674,7 @@ extern "C" { data_make->environment.values.used++; } // for - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { printf("%s", program.string); for (f_array_length_t i = 0; i < arguments.used; i++) { @@ -3709,7 +3709,7 @@ extern "C" { if (F_status_is_error(status)) { if (F_status_set_fine(status) == F_file_found_not) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { fprintf(data_make->print.to, "%c", f_string_eol[0]); fl_color_print(data_make->print.to, data_make->print.context, "%s: Failed to find program '", data_make->print.prefix); fl_color_print(data_make->print.to, data.context.set.notable, "%s", program.string); @@ -3783,7 +3783,7 @@ extern "C" { return; } - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { fprintf(data_make->print.to, "%c", f_string_eol[0]); fl_color_print(data_make->print.to, data_make->print.context, "%s: Failed with return code '", data_make->print.prefix); fl_color_print(data_make->print.to, data.context.set.notable, "%s", data_make->setting_make.parameter.array[0].value.array[0].string); @@ -3851,7 +3851,7 @@ extern "C" { if (operation == fake_make_operation_type_index || operation == fake_make_operation_type_run || operation == fake_make_operation_type_shell) { if (!arguments.used) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix); } @@ -3861,7 +3861,7 @@ extern "C" { else if (operation == fake_make_operation_type_index) { if (!data_make->setting_build.build_indexer.used) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { fprintf(data_make->print.to, "%c", f_string_eol[0]); fl_color_print(data_make->print.to, data_make->print.context, "%s: No indexer has been specified, cannot perform '", data_make->print.prefix); fl_color_print(data_make->print.to, data.context.set.notable, fake_make_operation_index); @@ -3877,7 +3877,7 @@ extern "C" { if (operation == fake_make_operation_type_break) { if (arguments.used > 1) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Has too many arguments.", data_make->print.prefix); } @@ -3888,7 +3888,7 @@ extern "C" { if (fl_string_dynamic_compare_string(fake_make_operation_argument_success, arguments.array[0], fake_make_operation_argument_success_length) == F_equal_to_not) { if (fl_string_dynamic_compare_string(fake_make_operation_argument_failure, arguments.array[0], fake_make_operation_argument_failure_length) == F_equal_to_not) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print(data_make->print.to, data_make->print.context, "%s: Unsupported break type '", data_make->print.prefix); fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[0].string); @@ -3905,7 +3905,7 @@ extern "C" { if (operation == fake_make_operation_type_build) { if (arguments.used > 1) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Has too many arguments.", data_make->print.prefix); } @@ -3924,7 +3924,7 @@ extern "C" { f_status_t status_file = f_file_is(path_file, f_file_type_regular, F_false); if (status_file == F_file_found_not) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print(data_make->print.to, data_make->print.context, "%s: Failed to find file '", data_make->print.prefix); fl_color_print(data_make->print.to, data.context.set.notable, "%s", path_file); @@ -3938,7 +3938,7 @@ extern "C" { *status = status_file; } else if (!status_file) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print(data_make->print.to, data_make->print.context, "%s: The file '", data_make->print.prefix); fl_color_print(data_make->print.to, data.context.set.notable, "%s", path_file); @@ -3949,7 +3949,7 @@ extern "C" { } } else { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Filename argument must not be an empty string.", data_make->print.prefix); } @@ -3963,7 +3963,7 @@ extern "C" { if (operation == fake_make_operation_type_clean || operation == fake_make_operation_type_pop || operation == fake_make_operation_type_top || operation == fake_make_operation_type_skeleton) { if (arguments.used) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Has too many arguments.", data_make->print.prefix); } @@ -3973,7 +3973,7 @@ extern "C" { else if (operation == fake_make_operation_type_pop) { if (data_make->path.stack.used == 1) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Must not attempt to pop project root off of path stack.", data_make->print.prefix); } @@ -4003,7 +4003,7 @@ extern "C" { for (f_array_length_t i = 0; i < arguments.used - 1; i++) { if (f_file_exists(arguments.array[i].string) != F_true) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print(data_make->print.to, data_make->print.context, "%s: Failed to find file '", data_make->print.prefix); fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[i].string); @@ -4019,7 +4019,7 @@ extern "C" { f_status_t status_file = f_directory_is(arguments.array[arguments.used - 1].string); if (status_file == F_false || status_file == F_file_found_not) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print(data_make->print.to, data_make->print.context, "%s: The last file '", data_make->print.prefix); fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[arguments.used - 1].string); @@ -4041,7 +4041,7 @@ extern "C" { status_file = f_directory_is(arguments.array[1].string); if (status_file == F_false) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print(data_make->print.to, data_make->print.context, "%s: The last file '", data_make->print.prefix); fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[arguments.used - 1].string); @@ -4054,7 +4054,7 @@ extern "C" { } } else { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix); } @@ -4067,7 +4067,7 @@ extern "C" { if (operation == fake_make_operation_type_compile) { if (!arguments.used) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix); } @@ -4075,7 +4075,7 @@ extern "C" { *status = F_status_set_error(F_failure); } else if (data_make->setting_build.build_compiler.used) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { fprintf(data_make->print.to, "%c", f_string_eol[0]); fl_color_print(data_make->print.to, data_make->print.context, "%s: No compiler has been specified, cannot perform '", data_make->print.prefix); fl_color_print(data_make->print.to, data.context.set.notable, fake_make_operation_compile); @@ -4106,7 +4106,7 @@ extern "C" { for (f_array_length_t i = 0; i < arguments.used - 1; i++) { if (f_file_exists(arguments.array[i].string) != F_true) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print(data_make->print.to, data_make->print.context, "%s: Failed to find file '", data_make->print.prefix); fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[i].string); @@ -4122,7 +4122,7 @@ extern "C" { f_status_t status_file = f_directory_is(arguments.array[arguments.used - 1].string); if (status_file == F_false || status_file == F_file_found_not) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print(data_make->print.to, data_make->print.context, "%s: The last file '", data_make->print.prefix); fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[arguments.used - 1].string); @@ -4144,7 +4144,7 @@ extern "C" { status_file = f_directory_is(arguments.array[1].string); if (status_file == F_false) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print(data_make->print.to, data_make->print.context, "%s: The last file '", data_make->print.prefix); fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[arguments.used - 1].string); @@ -4157,7 +4157,7 @@ extern "C" { } } else { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix); } @@ -4184,7 +4184,7 @@ extern "C" { } // for } else { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix); } @@ -4200,7 +4200,7 @@ extern "C" { *status = fake_make_operate_validate_define_name(arguments.array[0]); if (*status == F_none) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Define name must not be an empty string.", data_make->print.prefix); } @@ -4208,7 +4208,7 @@ extern "C" { *status = F_status_set_error(F_failure); } else if (*status == F_false) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { fprintf(data_make->print.to, "%c", f_string_eol[0]); fl_color_print(data_make->print.to, data_make->print.context, "%s: Invalid characters in the define setting name '", data_make->print.prefix); @@ -4223,7 +4223,7 @@ extern "C" { } } else { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix); } @@ -4236,7 +4236,7 @@ extern "C" { if (operation == fake_make_operation_type_else) { if (*operation_if == fake_make_operation_if_type_else_true || *operation_if == fake_make_operation_if_type_else_false) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print(data_make->print.to, data_make->print.context, "%s: Must not be used after another '", data_make->print.prefix); fl_color_print(data_make->print.to, data.context.set.notable, "else"); @@ -4250,7 +4250,7 @@ extern "C" { } if (*operation_if == fake_make_operation_if_type_true || *operation_if == fake_make_operation_if_type_false || *operation_if == fake_make_operation_if_type_false_always) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print(data_make->print.to, data_make->print.context, "%s: Must not be used inside an ", data_make->print.prefix); fl_color_print(data_make->print.to, data.context.set.notable, "if"); @@ -4264,7 +4264,7 @@ extern "C" { } if (*operation_if != fake_make_operation_if_type_else_true_next && *operation_if != fake_make_operation_if_type_else_false_next && *operation_if != fake_make_operation_if_type_else_false_next_always) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Has no preceding if condition.", data_make->print.prefix); } @@ -4276,7 +4276,7 @@ extern "C" { } if (arguments.used) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Has too many arguments.", data_make->print.prefix); } @@ -4290,7 +4290,7 @@ extern "C" { if (operation == fake_make_operation_type_exit) { if (arguments.used > 1) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Has too many arguments.", data_make->print.prefix); } @@ -4301,7 +4301,7 @@ extern "C" { if (fl_string_dynamic_compare_string(fake_make_operation_argument_success, arguments.array[0], fake_make_operation_argument_success_length) == F_equal_to_not) { if (fl_string_dynamic_compare_string(fake_make_operation_argument_failure, arguments.array[0], fake_make_operation_argument_failure_length) == F_equal_to_not) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print(data_make->print.to, data_make->print.context, "%s: Unsupported exit type '", data_make->print.prefix); fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[0].string); @@ -4322,7 +4322,7 @@ extern "C" { if (fl_string_dynamic_compare_string(fake_make_operation_argument_warn, arguments.array[0], fake_make_operation_argument_warn_length) == F_equal_to_not) { if (fl_string_dynamic_compare_string(fake_make_operation_argument_ignore, arguments.array[0], fake_make_operation_argument_ignore_length) == F_equal_to_not) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print(data_make->print.to, data_make->print.context, "%s: Unsupported fail type '", data_make->print.prefix); fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[0].string); @@ -4335,7 +4335,7 @@ extern "C" { } } else { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix); } @@ -4354,7 +4354,7 @@ extern "C" { status_file = f_file_is(arguments.array[i].string, f_file_type_regular, F_false); if (status_file == F_file_found_not) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print(data_make->print.to, data_make->print.context, "%s: Failed to find file '", data_make->print.prefix); fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[i].string); @@ -4364,7 +4364,7 @@ extern "C" { *status = F_status_set_error(status_file); } else if (F_status_is_error(status_file)) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { fake_print_message_file(data, *status, "f_file_is", arguments.array[i].string, "find", F_true, F_true, data_make->print); } @@ -4375,7 +4375,7 @@ extern "C" { return; } - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix); } @@ -4387,7 +4387,7 @@ extern "C" { if (operation == fake_make_operation_type_if) { if (*operation_if == fake_make_operation_if_type_true || *operation_if == fake_make_operation_if_type_false || *operation_if == fake_make_operation_if_type_false_always) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print(data_make->print.to, data_make->print.context, "%s: Must not be used after another '", data_make->print.prefix); fl_color_print(data_make->print.to, data.context.set.notable, "if"); @@ -4480,7 +4480,7 @@ extern "C" { } // for if (i == 14) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print(data_make->print.to, data_make->print.context, "%s: Unsupported if type '", data_make->print.prefix); fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[0].string); @@ -4496,7 +4496,7 @@ extern "C" { if (arguments.used >= if_type_minimum[i]) { if (*operation_if == fake_make_operation_if_type_if_success || *operation_if == fake_make_operation_if_type_if_failure) { if (arguments.used > if_type_minimum[i]) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Has too many arguments.", data_make->print.prefix); } @@ -4513,7 +4513,7 @@ extern "C" { if (*operation_if == fake_make_operation_if_type_if_mode) { if (fl_string_dynamic_compare_string(fake_make_operation_argument_is, arguments.array[1], fake_make_operation_argument_is_length) == F_equal_to_not) { if (fl_string_dynamic_compare_string(fake_make_operation_argument_has, arguments.array[1], fake_make_operation_argument_has_length) == F_equal_to_not) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print(data_make->print.to, data_make->print.context, "%s: Unsupported mode type '", data_make->print.prefix); fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[1].string); @@ -4588,7 +4588,7 @@ extern "C" { type_file |= 0x40; } else { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print(data_make->print.to, data_make->print.context, "%s: Unsupported file type '", data_make->print.prefix); fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[i].string); @@ -4659,7 +4659,7 @@ extern "C" { if (fl_string_dynamic_compare_string(fake_make_operation_argument_environment, arguments.array[1], fake_make_operation_argument_environment_length) == F_equal_to_not) { if (fl_string_dynamic_compare_string(fake_make_operation_argument_parameter, arguments.array[1], fake_make_operation_argument_parameter_length) == F_equal_to_not) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print(data_make->print.to, data_make->print.context, "%s: Unsupported define type '", data_make->print.prefix); fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[1].string); @@ -4675,7 +4675,7 @@ extern "C" { if (*operation_if == fake_make_operation_if_type_if_equal || *operation_if == fake_make_operation_if_type_if_equal_not) { if (arguments.used < 3) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix); } @@ -4688,7 +4688,7 @@ extern "C" { if (*operation_if == fake_make_operation_if_type_if_greater || *operation_if == fake_make_operation_if_type_if_greater_equal || *operation_if == fake_make_operation_if_type_if_less || *operation_if == fake_make_operation_if_type_if_less_equal) { if (arguments.used < 3) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix); } @@ -4731,7 +4731,7 @@ extern "C" { if (F_status_is_error(status_number)) { *status = F_status_set_error(F_failure); - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); if (number > f_number_t_size_unsigned) { @@ -4753,7 +4753,7 @@ extern "C" { } } - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix); } @@ -4766,7 +4766,7 @@ extern "C" { if (operation == fake_make_operation_type_link) { if (arguments.used > 2) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Has too many arguments.", data_make->print.prefix); } @@ -4795,7 +4795,7 @@ extern "C" { } } else { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix); } @@ -4824,7 +4824,7 @@ extern "C" { for (f_array_length_t i = 0; i < arguments.used - 1; i++) { if (f_file_exists(arguments.array[i].string) != F_true) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print(data_make->print.to, data_make->print.context, "%s: Failed to find file '", data_make->print.prefix); fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[i].string); @@ -4840,7 +4840,7 @@ extern "C" { f_status_t status_file = f_directory_is(arguments.array[arguments.used - 1].string); if (status_file == F_false || status_file == F_file_found_not) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print(data_make->print.to, data_make->print.context, "%s: The last file '", data_make->print.prefix); fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[arguments.used - 1].string); @@ -4862,7 +4862,7 @@ extern "C" { status_file = f_directory_is(arguments.array[1].string); if (status_file == F_false) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print(data_make->print.to, data_make->print.context, "%s: The last file '", data_make->print.prefix); fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[arguments.used - 1].string); @@ -4875,7 +4875,7 @@ extern "C" { } } else { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix); } @@ -4888,7 +4888,7 @@ extern "C" { if (operation == fake_make_operation_type_operate) { if (arguments.used > 1) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Has too many arguments.", data_make->print.prefix); } @@ -4931,7 +4931,7 @@ extern "C" { } } else { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix); } @@ -4943,7 +4943,7 @@ extern "C" { if (operation == fake_make_operation_type_to) { if (arguments.used > 1) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Has too many arguments.", data_make->print.prefix); } @@ -4955,7 +4955,7 @@ extern "C" { f_status_t status_file = f_file_is(arguments.array[0].string, f_file_type_directory, F_false); if (status_file == F_file_found_not) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print(data_make->print.to, data_make->print.context, "%s: Failed to find file '", data_make->print.prefix); fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[0].string); @@ -4965,14 +4965,14 @@ extern "C" { *status = F_status_set_error(status_file); } else if (F_status_is_error(status_file)) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { fake_print_message_file(data, *status, "f_file_is", data.file_data_build_fakefile.string, "find", F_true, F_true, data_make->print); } *status = status_file; } else if (!status_file) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print(data_make->print.to, data_make->print.context, "%s: The file '", data_make->print.prefix); fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[0].string); @@ -4983,14 +4983,14 @@ extern "C" { } } else { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Filename argument must not be an empty string.", data_make->print.prefix); } } } else { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix); } @@ -5006,7 +5006,7 @@ extern "C" { if (fl_string_dynamic_compare_string(fake_make_operation_argument_file, arguments.array[0], fake_make_operation_argument_file_length) == F_equal_to_not) { if (fl_string_dynamic_compare_string(fake_make_operation_argument_directory, arguments.array[0], fake_make_operation_argument_directory_length) == F_equal_to_not) { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print(data_make->print.to, data_make->print.context, "%s: Unsupported file type '", data_make->print.prefix); fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[0].string); @@ -5031,7 +5031,7 @@ extern "C" { } // for } else { - if (data.verbosity != fake_verbosity_quiet && data_make->print.to) { + if (data.verbosity != f_console_verbosity_quiet && data_make->print.to) { printf("%c", f_string_eol[0]); fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix); } diff --git a/level_3/fake/c/private-print.c b/level_3/fake/c/private-print.c index e578863..1ddea84 100644 --- a/level_3/fake/c/private-print.c +++ b/level_3/fake/c/private-print.c @@ -21,7 +21,7 @@ extern "C" { bool fake_print_error_build_operation_file(const fake_data_t data, const f_status_t status, const f_string_t function, const f_string_t operation, const f_string_t how, const f_string_t source, const f_string_t destination, const bool fallback) { if (status == F_file_found_not) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data.context.set.error, "ERROR: Failed to find '"); @@ -47,7 +47,7 @@ extern "C" { } if (status == F_parameter) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data.context.set.error, "INTERNAL ERROR: Invalid parameter when calling "); fl_color_print(f_type_error, data.context.set.notable, "%s", function); @@ -66,7 +66,7 @@ extern "C" { } if (status == F_name) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data.context.set.error, "ERROR: Invalid name for '"); fl_color_print(f_type_error, data.context.set.notable, "%s", source); @@ -83,7 +83,7 @@ extern "C" { } if (status == F_memory_out) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data.context.set.error, "CRITICAL ERROR: Unable to allocate memory, while trying to %s '", operation); fl_color_print(f_type_error, data.context.set.notable, "%s", source); @@ -100,7 +100,7 @@ extern "C" { } if (status == F_number_overflow) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data.context.set.error, "ERROR: Overflow while trying to %s '", operation); @@ -118,7 +118,7 @@ extern "C" { } if (status == F_directory) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data.context.set.error, "ERROR: Invalid directory while trying to %s '", operation); fl_color_print(f_type_error, data.context.set.notable, "%s", source); @@ -135,7 +135,7 @@ extern "C" { } if (status == F_access_denied) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data.context.set.error, "ERROR: Access denied while trying to %s '", operation); fl_color_print(f_type_error, data.context.set.notable, "%s", source); @@ -152,7 +152,7 @@ extern "C" { } if (status == F_loop) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data.context.set.error, "ERROR: Loop while trying to %s '", operation); fl_color_print(f_type_error, data.context.set.notable, "%s", source); @@ -169,7 +169,7 @@ extern "C" { } if (status == F_prohibited) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data.context.set.error, "ERROR: Prohibited by system while trying to %s '", operation); fl_color_print(f_type_error, data.context.set.notable, "%s", source); @@ -186,7 +186,7 @@ extern "C" { } if (status == F_directory_found_not) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data.context.set.error, "ERROR: Failed to %s '", operation); fl_color_print(f_type_error, data.context.set.notable, "%s", source); @@ -203,7 +203,7 @@ extern "C" { } if (status == F_failure) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data.context.set.error, "ERROR: Failed to %s '", operation); fl_color_print(f_type_error, data.context.set.notable, "%s", source); @@ -219,7 +219,7 @@ extern "C" { return F_false; } - if (fake_print_error(data, status, function, F_false) == F_unknown && fallback && data.verbosity != fake_verbosity_quiet) { + if (fake_print_error(data, status, function, F_false) == F_unknown && fallback && data.verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data.context.set.error, "UNKNOWN ERROR: ("); fl_color_print(f_type_error, data.context.set.notable, "%llu", status); @@ -250,7 +250,7 @@ extern "C" { bool fake_print_error_fss(const fake_data_t data, const f_status_t status, const f_string_t function, const f_string_t path_file, const f_string_range_t range, const bool fallback) { if (status == F_file_found_not) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data.context.set.error, "ENCODING ERROR: error occurred on invalid UTF-8 character at stop position (at "); fl_color_print(f_type_error, data.context.set.notable, "%d", range.start); @@ -263,7 +263,7 @@ extern "C" { } if (status == F_status_set_error(F_incomplete_utf_stop)) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data.context.set.error, "ENCODING ERROR: error occurred on invalid UTF-8 character at end of string (at "); fl_color_print(f_type_error, data.context.set.notable, "%d", range.start); @@ -275,7 +275,7 @@ extern "C" { return F_false; } - if (fake_print_error(data, status, function, F_false) == F_unknown && fallback && data.verbosity != fake_verbosity_quiet) { + if (fake_print_error(data, status, function, F_false) == F_unknown && fallback && data.verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data.context.set.error, "UNKNOWN ERROR: ("); fl_color_print(f_type_error, data.context.set.notable, "%llu", status); @@ -290,7 +290,7 @@ extern "C" { #ifndef _di_fake_print_error_parameter_missing_value_ void fake_print_error_parameter_missing_value(const fake_data_t data, const f_string_t parameter) { - if (data.verbosity == fake_verbosity_quiet) return; + if (data.verbosity == f_console_verbosity_quiet) return; fprintf(f_type_error, "%c", f_string_eol[0]); @@ -303,7 +303,7 @@ extern "C" { #ifndef _di_fake_print_error_parameter_too_many_ void fake_print_error_parameter_too_many(const fake_data_t data, const f_string_t parameter) { - if (data.verbosity == fake_verbosity_quiet) return; + if (data.verbosity == f_console_verbosity_quiet) return; fprintf(f_type_error, "%c", f_string_eol[0]); @@ -318,7 +318,7 @@ extern "C" { f_return_status fake_print_message(const fake_data_t data, const f_status_t status, const f_string_t function, const bool fallback, const fake_make_print_t print) { if (status == F_parameter) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(print.to, "%c", f_string_eol[0]); fl_color_print(print.to, print.context, "%s: Invalid parameter", print.prefix); @@ -336,7 +336,7 @@ extern "C" { } if (status == F_memory_allocation || status == F_memory_reallocation) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(print.to, "%c", f_string_eol[0]); fl_color_print(print.to, print.context, "%s: Unable to allocate memory", print.prefix); @@ -353,7 +353,7 @@ extern "C" { return F_none; } - if (fallback && data.verbosity != fake_verbosity_quiet) { + if (fallback && data.verbosity != f_console_verbosity_quiet) { fprintf(print.to, "%c", f_string_eol[0]); fl_color_print(print.to, print.context, "UNKNOWN %s: (", print.prefix); fl_color_print(print.to, data.context.set.notable, "%llu", status); @@ -378,7 +378,7 @@ extern "C" { const f_string_t file_or_directory = is_file ? "file" : "directory"; if (status == F_file_found_not) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(print.to, "%c", f_string_eol[0]); fl_color_print(print.to, print.context, "%s: Failed to find %s '", print.prefix, file_or_directory); fl_color_print(print.to, data.context.set.notable, "%s", name); @@ -389,7 +389,7 @@ extern "C" { } if (status == F_file_found) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(print.to, "%c", f_string_eol[0]); fl_color_print(print.to, print.context, "%s: The %s '", print.prefix, file_or_directory); fl_color_print(print.to, data.context.set.notable, "%s", name); @@ -400,7 +400,7 @@ extern "C" { } if (status == F_directory_empty_not) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(print.to, "%c", f_string_eol[0]); fl_color_print(print.to, print.context, "%s: The %s '", print.prefix, file_or_directory); fl_color_print(print.to, data.context.set.notable, "%s", name); @@ -411,7 +411,7 @@ extern "C" { } if (status == F_parameter) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(print.to, "%c", f_string_eol[0]); fl_color_print(print.to, print.context, "INTERNAL %s: Invalid parameter when calling ", print.prefix); fl_color_print(print.to, data.context.set.notable, "%s", function); @@ -424,7 +424,7 @@ extern "C" { } if (status == F_name) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(print.to, "%c", f_string_eol[0]); fl_color_print(print.to, print.context, "%s: Invalid %s name '", print.prefix, file_or_directory); fl_color_print(print.to, data.context.set.notable, "%s", name); @@ -435,7 +435,7 @@ extern "C" { } if (status == F_memory_out) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(print.to, "%c", f_string_eol[0]); fl_color_print(print.to, print.context, "CRITICAL %s: Unable to allocate memory, while trying to %s %s '", print.prefix, operation, file_or_directory); fl_color_print(print.to, data.context.set.notable, "%s", name); @@ -446,7 +446,7 @@ extern "C" { } if (status == F_number_overflow) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(print.to, "%c", f_string_eol[0]); fl_color_print(print.to, print.context, "%s: Overflow while trying to %s %s '", print.prefix, operation, file_or_directory); fl_color_print(print.to, data.context.set.notable, "%s", name); @@ -457,7 +457,7 @@ extern "C" { } if (status == F_directory) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(print.to, "%c", f_string_eol[0]); fl_color_print(print.to, print.context, "%s: Invalid directory while trying to %s %s '", print.prefix, operation, file_or_directory); fl_color_print(print.to, data.context.set.notable, "%s", name); @@ -468,7 +468,7 @@ extern "C" { } if (status == F_access_denied) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(print.to, "%c", f_string_eol[0]); fl_color_print(print.to, print.context, "%s: Access denied while trying to %s %s '", print.prefix, operation, file_or_directory); fl_color_print(print.to, data.context.set.notable, "%s", name); @@ -479,7 +479,7 @@ extern "C" { } if (status == F_loop) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(print.to, "%c", f_string_eol[0]); fl_color_print(print.to, print.context, "%s: Loop while trying to %s %s '", print.prefix, operation, file_or_directory); fl_color_print(print.to, data.context.set.notable, "%s", name); @@ -490,7 +490,7 @@ extern "C" { } if (status == F_prohibited) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(print.to, "%c", f_string_eol[0]); fl_color_print(print.to, print.context, "%s: Prohibited by system while trying to %s %s '", print.prefix, operation, file_or_directory); fl_color_print(print.to, data.context.set.notable, "%s", name); @@ -501,7 +501,7 @@ extern "C" { } if (status == F_access_owner) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(print.to, "%c", f_string_eol[0]); fl_color_print(print.to, print.context, "%s: Currrent user is not allowed to use the given owner while trying to %s %s '", print.prefix, operation, file_or_directory); fl_color_print(print.to, data.context.set.notable, "%s", name); @@ -512,7 +512,7 @@ extern "C" { } if (status == F_access_group) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(print.to, "%c", f_string_eol[0]); fl_color_print(print.to, print.context, "%s: Currrent user is not allowed to use the given group while trying to %s %s '", print.prefix, operation, file_or_directory); fl_color_print(print.to, data.context.set.notable, "%s", name); @@ -524,7 +524,7 @@ extern "C" { if (is_file) { if (status == F_directory_found_not) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(print.to, "%c", f_string_eol[0]); fl_color_print(print.to, print.context, "%s: Failed to %s %s '", print.prefix, operation, file_or_directory); fl_color_print(print.to, data.context.set.notable, "%s", name); @@ -536,7 +536,7 @@ extern "C" { } else { if (status == F_directory_found_not) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(print.to, "%c", f_string_eol[0]); fl_color_print(print.to, print.context, "%s: Failed to %s %s '", print.prefix, operation, file_or_directory); fl_color_print(print.to, data.context.set.notable, "%s", name); @@ -547,7 +547,7 @@ extern "C" { } if (status == F_failure) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(print.to, "%c", f_string_eol[0]); fl_color_print(print.to, print.context, "%s: Failed to %s %s '", print.prefix, operation, file_or_directory); fl_color_print(print.to, data.context.set.notable, "%s", name); @@ -558,7 +558,7 @@ extern "C" { } } - if (fake_print_error(data, status, function, F_false) == F_unknown && fallback && data.verbosity != fake_verbosity_quiet) { + if (fake_print_error(data, status, function, F_false) == F_unknown && fallback && data.verbosity != f_console_verbosity_quiet) { fprintf(print.to, "%c", f_string_eol[0]); fl_color_print(print.to, print.context, "UNKNOWN %s: (", print.prefix); fl_color_print(print.to, data.context.set.notable, "%llu", status); @@ -573,7 +573,7 @@ extern "C" { #ifndef _di_fake_print_message_section_operation_failed_ void fake_print_message_section_operation_failed(const fake_data_t data, const f_string_static_t buffer, const f_string_range_t section_name, const f_string_range_t operation_name, const fake_make_print_t print) { - if (data.verbosity == fake_verbosity_quiet || !print.to) return; + if (data.verbosity == f_console_verbosity_quiet || !print.to) return; f_string_length_t line = 1; @@ -600,7 +600,7 @@ extern "C" { #ifndef _di_fake_print_message_section_operation_path_outside_ void fake_print_message_section_operation_path_outside(const fake_data_t data, const f_status_t status, const f_string_t function, const f_string_t path, const fake_make_print_t print) { - if (data.verbosity == fake_verbosity_quiet || !print.to) return; + if (data.verbosity == f_console_verbosity_quiet || !print.to) return; if (F_status_set_fine(status) == F_false) { fprintf(print.to, "%c", f_string_eol[0]); @@ -616,7 +616,7 @@ extern "C" { #ifndef _di_fake_print_message_section_operation_path_stack_max_ void fake_print_message_section_operation_path_stack_max(const fake_data_t data, const f_status_t status, const f_string_t function, const f_string_t path, const fake_make_print_t print) { - if (data.verbosity == fake_verbosity_quiet || !print.to) return; + if (data.verbosity == f_console_verbosity_quiet || !print.to) return; if (status == F_buffer_too_large) { fprintf(print.to, "%c", f_string_eol[0]); @@ -640,7 +640,7 @@ extern "C" { #ifndef _di_fake_print_message_section_operation_stack_max_ void fake_print_message_section_operation_stack_max(const fake_data_t data, const f_string_static_t buffer, const f_string_range_t section_name, const f_string_range_t operation_name, const f_array_length_t stack_max, const fake_make_print_t print) { - if (data.verbosity == fake_verbosity_quiet || !print.to) return; + if (data.verbosity == f_console_verbosity_quiet || !print.to) return; f_string_length_t line = 1; @@ -669,7 +669,7 @@ extern "C" { #ifndef _di_fake_print_message_section_operation_unknown_ void fake_print_message_section_operation_unknown(const fake_data_t data, const f_string_static_t buffer, const f_string_range_t section_name, const f_string_range_t operation_name, const fake_make_print_t print) { - if (data.verbosity == fake_verbosity_quiet || !print.to) return; + if (data.verbosity == f_console_verbosity_quiet || !print.to) return; f_string_length_t line = 1; @@ -696,7 +696,7 @@ extern "C" { #ifndef _di_fake_print_warning_settings_content_empty_ void fake_print_warning_settings_content_empty(const fake_data_t data, const f_string_t path_file, const f_string_dynamic_t buffer, const f_string_range_t range_object, const f_string_t settings_name) { - if (data.verbosity == fake_verbosity_quiet) return; + if (data.verbosity == f_console_verbosity_quiet) return; fprintf(f_type_error, "%c", f_string_eol[0]); @@ -716,7 +716,7 @@ extern "C" { #ifndef _di_fake_print_warning_settings_content_invalid_ void fake_print_warning_settings_content_invalid(const fake_data_t data, const f_string_t path_file, const f_string_dynamic_t buffer, const f_string_range_t range_object, const f_string_range_t range_content, const f_string_t settings_name) { - if (data.verbosity == fake_verbosity_quiet) return; + if (data.verbosity == f_console_verbosity_quiet) return; fprintf(f_type_error, "%c", f_string_eol[0]); @@ -742,7 +742,7 @@ extern "C" { #ifndef _di_fake_print_warning_settings_content_multiple_ void fake_print_warning_settings_content_multiple(const fake_data_t data, const f_string_t path_file, const f_string_t name_object) { - if (data.verbosity != fake_verbosity_verbose) return; + if (data.verbosity != f_console_verbosity_verbose) return; fprintf(f_type_error, "%c", f_string_eol[0]); @@ -757,7 +757,7 @@ extern "C" { #ifndef _di_fake_print_warning_settings_object_multiple_ void fake_print_warning_settings_object_multiple(const fake_data_t data, const f_string_t path_file, const f_string_t label, const f_string_t name_object) { - if (data.verbosity != fake_verbosity_verbose) return; + if (data.verbosity != f_console_verbosity_verbose) return; fprintf(f_type_error, "%c", f_string_eol[0]); diff --git a/level_3/fake/c/private-skeleton.c b/level_3/fake/c/private-skeleton.c index a0ba533..d837e4b 100644 --- a/level_3/fake/c/private-skeleton.c +++ b/level_3/fake/c/private-skeleton.c @@ -18,7 +18,7 @@ extern "C" { f_status_t status = F_none; - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { printf("%c", f_string_eol[0]); fl_color_print_line(f_type_output, data.context.set.important, "Generating skeleton structure."); } @@ -165,7 +165,7 @@ extern "C" { status = f_directory_exists(path.string); if (status == F_true) { - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { printf("Directory '%s' already exists.%c", path.string, f_string_eol[0]); } @@ -173,7 +173,7 @@ extern "C" { } if (status == F_false) { - if (data.verbosity != fake_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data.context.set.error, "ERROR: The path '"); fl_color_print(f_type_error, data.context.set.notable, "%s", path.string); @@ -199,7 +199,7 @@ extern "C" { return status; } - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { printf("Directory '%s' created.%c", path.string, f_string_eol[0]); } } @@ -221,7 +221,7 @@ extern "C" { status = f_file_is(path.string, f_file_type_regular, F_false); if (status == F_true) { - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { printf("File '%s' already exists.%c", path.string, f_string_eol[0]); } @@ -233,7 +233,7 @@ extern "C" { status = f_file_is(path.string, f_file_type_link, F_false); if (status == F_true) { - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { printf("File '%s' already exists (as a symbolic link).%c", path.string, f_string_eol[0]); } @@ -242,7 +242,7 @@ extern "C" { } if (status == F_false) { - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { printf("File '%s' already exists but is not a regular file (or symbolic link).%c", path.string, f_string_eol[0]); } @@ -271,7 +271,7 @@ extern "C" { return status; } - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { printf("File '%s' created.%c", path.string, f_string_eol[0]); } @@ -298,7 +298,7 @@ extern "C" { return status; } - if (data.verbosity == fake_verbosity_verbose) { + if (data.verbosity == f_console_verbosity_verbose) { printf("File '%s' pre-populated.%c", path.string, f_string_eol[0]); } diff --git a/level_3/iki_read/c/iki_read.c b/level_3/iki_read/c/iki_read.c index b98b2b5..fa5bda2 100644 --- a/level_3/iki_read/c/iki_read.c +++ b/level_3/iki_read/c/iki_read.c @@ -100,7 +100,7 @@ extern "C" { if (F_status_is_error(status)) { iki_read_print_error(data->context, data->verbosity, F_status_set_fine(status), "fll_program_parameter_process", F_true); - if (data->verbosity == iki_read_verbosity_verbose) { + if (data->verbosity == f_console_verbosity_verbose) { fprintf(f_type_error, "%c", f_string_eol[0]); } @@ -136,19 +136,19 @@ extern "C" { status = F_status_set_error(F_parameter); } - data->verbosity = iki_read_verbosity_verbose; + data->verbosity = f_console_verbosity_verbose; } else if (data->parameters[iki_read_parameter_quiet].result == f_console_result_found) { - data->verbosity = iki_read_verbosity_quiet; + data->verbosity = f_console_verbosity_quiet; } else { - data->verbosity = iki_read_verbosity_normal; + data->verbosity = f_console_verbosity_normal; } if (F_status_is_fine(status)) { if (data->remaining.used > 0 || data->process_pipe) { if (data->parameters[iki_read_parameter_at].result == f_console_result_found) { - if (data->verbosity != iki_read_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '"); fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_at); @@ -174,7 +174,7 @@ extern "C" { data->at = number; if (data->parameters[iki_read_parameter_total].result == f_console_result_found) { - if (data->verbosity != iki_read_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data->context.set.error, "ERROR: Cannot specify the '"); fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_at); @@ -188,7 +188,7 @@ extern "C" { } if (data->parameters[iki_read_parameter_line].result == f_console_result_found) { - if (data->verbosity != iki_read_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '"); fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_line); @@ -215,7 +215,7 @@ extern "C" { } if (data->parameters[iki_read_parameter_name].result == f_console_result_found) { - if (data->verbosity != iki_read_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '"); fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_name); @@ -227,7 +227,7 @@ extern "C" { if (data->parameters[iki_read_parameter_substitute].result != f_console_result_none) { if (data->parameters[iki_read_parameter_substitute].result == f_console_result_found || data->parameters[iki_read_parameter_substitute].additional.used % 3 != 0) { - if (data->verbosity != iki_read_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '"); fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_substitute); @@ -238,7 +238,7 @@ extern "C" { } if (data->parameters[iki_read_parameter_total].result == f_console_result_found) { - if (data->verbosity != iki_read_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data->context.set.error, "ERROR: Cannot specify the '"); fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_substitute); @@ -253,7 +253,7 @@ extern "C" { if (data->parameters[iki_read_parameter_literal].result == f_console_result_found) { if (data->parameters[iki_read_parameter_object].result == f_console_result_found) { - if (data->verbosity != iki_read_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data->context.set.error, "ERROR: Cannot specify the '"); fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_literal); @@ -266,7 +266,7 @@ extern "C" { } if (data->parameters[iki_read_parameter_content].result == f_console_result_found) { - if (data->verbosity != iki_read_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data->context.set.error, "ERROR: Cannot specify the '"); fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_literal); @@ -279,7 +279,7 @@ extern "C" { } if (data->parameters[iki_read_parameter_total].result == f_console_result_found) { - if (data->verbosity != iki_read_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data->context.set.error, "ERROR: Cannot specify the '"); fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_literal); @@ -295,7 +295,7 @@ extern "C" { } else if (data->parameters[iki_read_parameter_object].result == f_console_result_found) { if (data->parameters[iki_read_parameter_content].result == f_console_result_found) { - if (data->verbosity != iki_read_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data->context.set.error, "ERROR: Cannot specify the '"); fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_object); @@ -308,7 +308,7 @@ extern "C" { } if (data->parameters[iki_read_parameter_total].result == f_console_result_found) { - if (data->verbosity != iki_read_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data->context.set.error, "ERROR: Cannot specify the '"); fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_object); @@ -332,7 +332,7 @@ extern "C" { if (data->parameters[iki_read_parameter_whole].result == f_console_result_found) { if (data->parameters[iki_read_parameter_total].result == f_console_result_found) { - if (data->verbosity != iki_read_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data->context.set.error, "ERROR: Cannot specify the '"); fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_whole); @@ -346,7 +346,7 @@ extern "C" { } if (F_status_is_error(status)) { - if (data->verbosity != iki_read_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); } @@ -421,7 +421,7 @@ extern "C" { } } else { - if (data->verbosity != iki_read_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print_line(f_type_error, data->context.set.error, "ERROR: you failed to specify one or more files."); } @@ -431,7 +431,7 @@ extern "C" { } // ensure a newline is always put at the end of the program execution, unless in quiet mode. - if (data->verbosity != iki_read_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { if (F_status_is_error(status) || !data->mode) { fprintf(f_type_error, "%c", f_string_eol[0]); } diff --git a/level_3/iki_read/c/iki_read.h b/level_3/iki_read/c/iki_read.h index fa8e43f..ec5ca07 100644 --- a/level_3/iki_read/c/iki_read.h +++ b/level_3/iki_read/c/iki_read.h @@ -69,13 +69,6 @@ extern "C" { iki_read_mode_total, }; - enum { - iki_read_verbosity_quiet = 1, - iki_read_verbosity_normal, - iki_read_verbosity_verbose, - iki_read_verbosity_debug, - }; - #define iki_read_short_at "a" #define iki_read_short_content "c" #define iki_read_short_line "l" diff --git a/level_3/iki_read/c/private-iki_read.c b/level_3/iki_read/c/private-iki_read.c index bb43403..e72eef7 100644 --- a/level_3/iki_read/c/private-iki_read.c +++ b/level_3/iki_read/c/private-iki_read.c @@ -9,7 +9,7 @@ extern "C" { f_return_status iki_read_print_error(const f_color_context_t context, const uint8_t verbosity, const f_status_t status, const f_string_t function, const bool fallback) { if (status == F_parameter) { - if (verbosity != iki_read_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "ERROR: Invalid parameter when calling function "); fl_color_print(f_type_error, context.set.notable, "%s", function); @@ -20,7 +20,7 @@ extern "C" { } if (status == F_memory_allocation || status == F_memory_reallocation) { - if (verbosity != iki_read_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "ERROR: Unable to allocate memory in function "); fl_color_print(f_type_error, context.set.notable, "%s", function); @@ -31,7 +31,7 @@ extern "C" { } if (status == F_buffer_too_large) { - if (verbosity != iki_read_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "ERROR: Maximum buffer limit reached while processing "); fl_color_print(f_type_error, context.set.notable, "%s", function); @@ -42,7 +42,7 @@ extern "C" { } if (status == F_string_too_large) { - if (verbosity != iki_read_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "ERROR: Maximum string limit reached while processing "); fl_color_print(f_type_error, context.set.notable, "%s", function); @@ -52,7 +52,7 @@ extern "C" { return F_none; } - if (fallback && verbosity != iki_read_verbosity_quiet) { + if (fallback && verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "UNKNOWN ERROR: ("); fl_color_print(f_type_error, context.set.notable, "%llu", status); @@ -70,7 +70,7 @@ extern "C" { const f_string_t file_or_directory = is_file ? "file" : "directory"; if (status == F_file_found_not) { - if (verbosity != iki_read_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "ERROR: Failed to find %s '", file_or_directory); fl_color_print(f_type_error, context.set.notable, "%s", name); @@ -81,7 +81,7 @@ extern "C" { } if (status == F_file_found) { - if (verbosity != iki_read_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "ERROR: The %s '", file_or_directory); fl_color_print(f_type_error, context.set.notable, "%s", name); @@ -92,7 +92,7 @@ extern "C" { } if (status == F_parameter) { - if (verbosity != iki_read_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "INTERNAL ERROR: Invalid parameter when calling "); fl_color_print(f_type_error, context.set.notable, "%s", function); @@ -105,7 +105,7 @@ extern "C" { } if (status == F_name) { - if (verbosity != iki_read_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "ERROR: Invalid %s name '", file_or_directory); fl_color_print(f_type_error, context.set.notable, "%s", name); @@ -116,7 +116,7 @@ extern "C" { } if (status == F_memory_out) { - if (verbosity != iki_read_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "CRITICAL ERROR: Unable to allocate memory, while trying to %s %s '", operation, file_or_directory); fl_color_print(f_type_error, context.set.notable, "%s", name); @@ -127,7 +127,7 @@ extern "C" { } if (status == F_number_overflow) { - if (verbosity != iki_read_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "ERROR: Overflow while trying to %s %s '", operation, file_or_directory); fl_color_print(f_type_error, context.set.notable, "%s", name); @@ -138,7 +138,7 @@ extern "C" { } if (status == F_directory) { - if (verbosity != iki_read_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "ERROR: Invalid directory while trying to %s %s '", operation, file_or_directory); fl_color_print(f_type_error, context.set.notable, "%s", name); @@ -149,7 +149,7 @@ extern "C" { } if (status == F_access_denied) { - if (verbosity != iki_read_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "ERROR: Access denied while trying to %s %s '", operation, file_or_directory); fl_color_print(f_type_error, context.set.notable, "%s", name); @@ -160,7 +160,7 @@ extern "C" { } if (status == F_loop) { - if (verbosity != iki_read_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "ERROR: Loop while trying to %s %s '", operation, file_or_directory); fl_color_print(f_type_error, context.set.notable, "%s", name); @@ -171,7 +171,7 @@ extern "C" { } if (status == F_prohibited) { - if (verbosity != iki_read_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "ERROR: Prohibited by system while trying to %s %s '", operation, file_or_directory); fl_color_print(f_type_error, context.set.notable, "%s", name); @@ -183,7 +183,7 @@ extern "C" { if (is_file) { if (status == F_directory_found_not) { - if (verbosity != iki_read_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "ERROR: Failed to %s %s '", operation, file_or_directory); fl_color_print(f_type_error, context.set.notable, "%s", name); @@ -195,7 +195,7 @@ extern "C" { } else { if (status == F_directory_found_not) { - if (verbosity != iki_read_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "ERROR: Failed to %s %s '", operation, file_or_directory); fl_color_print(f_type_error, context.set.notable, "%s", name); @@ -206,7 +206,7 @@ extern "C" { } if (status == F_failure) { - if (verbosity != iki_read_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "ERROR: Failed to %s %s '", operation, file_or_directory); fl_color_print(f_type_error, context.set.notable, "%s", name); @@ -217,7 +217,7 @@ extern "C" { } } - if (iki_read_print_error(context, verbosity, status, function, F_false) == F_unknown && fallback && verbosity != iki_read_verbosity_quiet) { + if (iki_read_print_error(context, verbosity, status, function, F_false) == F_unknown && fallback && verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "UNKNOWN ERROR: ("); fl_color_print(f_type_error, context.set.notable, "%llu", status); @@ -232,7 +232,7 @@ extern "C" { #ifndef _di_iki_read_print_error_number_argument_ void iki_read_print_error_number_argument(const f_color_context_t context, const uint8_t verbosity, const f_status_t status, const f_string_t function, const f_string_t parameter, const f_string_t argument) { - if (verbosity == iki_read_verbosity_quiet) return; + if (verbosity == f_console_verbosity_quiet) return; fprintf(f_type_error, "%c", f_string_eol[0]); diff --git a/level_3/iki_write/c/iki_write.c b/level_3/iki_write/c/iki_write.c index 0a7813e..9bdc4cb 100644 --- a/level_3/iki_write/c/iki_write.c +++ b/level_3/iki_write/c/iki_write.c @@ -21,9 +21,9 @@ extern "C" { printf("%c", f_string_eol[0]); fll_program_print_help_option(context, iki_write_short_file, iki_write_long_file, f_console_symbol_short_enable, f_console_symbol_long_enable, " Specify a file to send output to."); - fll_program_print_help_option(context, iki_write_short_content, iki_write_long_content, f_console_symbol_short_enable, f_console_symbol_long_enable, "The content to write."); + fll_program_print_help_option(context, iki_write_short_content, iki_write_long_content, f_console_symbol_short_enable, f_console_symbol_long_enable, "The content to output."); fll_program_print_help_option(context, iki_write_short_double, iki_write_long_double, f_console_symbol_short_enable, f_console_symbol_long_enable, " Use double quotes (default)."); - fll_program_print_help_option(context, iki_write_short_object, iki_write_long_object, f_console_symbol_short_enable, f_console_symbol_long_enable, " The object to write."); + fll_program_print_help_option(context, iki_write_short_object, iki_write_long_object, f_console_symbol_short_enable, f_console_symbol_long_enable, " The object to output."); fll_program_print_help_option(context, iki_write_short_single, iki_write_long_single, f_console_symbol_short_enable, f_console_symbol_long_enable, " Use single quotes."); fll_program_print_help_usage(context, iki_write_name, "filename(s)"); @@ -63,7 +63,7 @@ extern "C" { if (F_status_is_error(status)) { iki_write_print_error(data->context, data->verbosity, F_status_set_fine(status), "fll_program_parameter_process", F_true); - if (data->verbosity == iki_write_verbosity_verbose) { + if (data->verbosity == f_console_verbosity_verbose) { fprintf(f_type_error, "%c", f_string_eol[0]); } @@ -99,13 +99,13 @@ extern "C" { status = F_status_set_error(F_parameter); } - data->verbosity = iki_write_verbosity_verbose; + data->verbosity = f_console_verbosity_verbose; } else if (data->parameters[iki_write_parameter_quiet].result == f_console_result_found) { - data->verbosity = iki_write_verbosity_quiet; + data->verbosity = f_console_verbosity_quiet; } else { - data->verbosity = iki_write_verbosity_normal; + data->verbosity = f_console_verbosity_normal; } f_file_t output = f_file_t_initialize; @@ -116,7 +116,7 @@ extern "C" { if (F_status_is_fine(status)) { if (data->parameters[iki_write_parameter_file].result == f_console_result_additional) { if (data->parameters[iki_write_parameter_file].additional.used > 1) { - if (data->verbosity != iki_write_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '"); fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_write_long_file); fl_color_print_line(f_type_error, data->context.set.error, "' may only be specified once."); @@ -136,7 +136,7 @@ extern "C" { } } else if (data->parameters[iki_write_parameter_file].result == f_console_result_found) { - if (data->verbosity != iki_write_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '"); fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_write_long_file); fl_color_print_line(f_type_error, data->context.set.error, "' was specified, but no value was given."); @@ -147,7 +147,7 @@ extern "C" { } if (F_status_is_fine(status) && data->parameters[iki_write_parameter_object].result == f_console_result_found) { - if (data->verbosity != iki_write_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '"); fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_write_long_object); fl_color_print_line(f_type_error, data->context.set.error, "' was specified, but no value was given."); @@ -157,7 +157,7 @@ extern "C" { } if (F_status_is_fine(status) && data->parameters[iki_write_parameter_content].result == f_console_result_found) { - if (data->verbosity != iki_write_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '"); fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_write_long_content); fl_color_print_line(f_type_error, data->context.set.error, "' was specified, but no value was given."); @@ -168,7 +168,7 @@ extern "C" { if (F_status_is_fine(status) && !data->process_pipe) { if (data->parameters[iki_write_parameter_object].result != f_console_result_additional && data->parameters[iki_write_parameter_content].result != f_console_result_additional) { - if (data->verbosity != iki_write_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data->context.set.error, "ERROR: No data provided, either pipe the data or use the '"); fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_write_long_object); @@ -183,7 +183,7 @@ extern "C" { if (F_status_is_fine(status)) { if (data->parameters[iki_write_parameter_object].additional.used != data->parameters[iki_write_parameter_content].additional.used) { - if (data->verbosity != iki_write_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameters '"); fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_write_long_content); fl_color_print(f_type_error, data->context.set.error, "' and '"); @@ -243,7 +243,7 @@ extern "C" { } if (!buffer.used) { - if (data->verbosity != iki_write_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { fl_color_print_line(f_type_error, data->context.set.error, "ERROR: The pipe has no content."); } @@ -269,7 +269,7 @@ extern "C" { } if (object_ended && previous == range.start) { - if (data->verbosity != iki_write_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { fl_color_print_line(f_type_error, data->context.set.error, "ERROR: The pipe has incorrectly placed newlines."); } @@ -326,7 +326,7 @@ extern "C" { } // for if (F_status_is_fine(status) && object_ended) { - if (data->verbosity != iki_write_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { fl_color_print_line(f_type_error, data->context.set.error, "ERROR: The pipe has an object without content."); } @@ -359,7 +359,7 @@ extern "C" { } // for // ensure there is always a newline at the end, unless in quiet mode. - if (F_status_is_fine(status) && data->verbosity != iki_write_verbosity_quiet && data->parameters[iki_write_parameter_file].result == f_console_result_none) { + if (F_status_is_fine(status) && data->verbosity != f_console_verbosity_quiet && data->parameters[iki_write_parameter_file].result == f_console_result_none) { fprintf(f_type_output, "%c", f_string_eol[0]); } } @@ -374,7 +374,7 @@ extern "C" { } // ensure a newline is always put at the end of the program execution, unless in quiet mode. - if (data->verbosity != iki_write_verbosity_quiet) { + if (data->verbosity != f_console_verbosity_quiet) { if (F_status_is_error(status)) { fprintf(f_type_error, "%c", f_string_eol[0]); } diff --git a/level_3/iki_write/c/iki_write.h b/level_3/iki_write/c/iki_write.h index d6ddf00..479bda0 100644 --- a/level_3/iki_write/c/iki_write.h +++ b/level_3/iki_write/c/iki_write.h @@ -63,13 +63,6 @@ extern "C" { #endif // _di_iki_write_name_ #ifndef _di_iki_write_defines_ - enum { - iki_write_verbosity_quiet = 1, - iki_write_verbosity_normal, - iki_write_verbosity_verbose, - iki_write_verbosity_debug, - }; - #define iki_write_short_file "f" #define iki_write_short_content "c" #define iki_write_short_double "d" diff --git a/level_3/iki_write/c/private-iki_write.c b/level_3/iki_write/c/private-iki_write.c index 49f4ac8..ec61929 100644 --- a/level_3/iki_write/c/private-iki_write.c +++ b/level_3/iki_write/c/private-iki_write.c @@ -9,7 +9,7 @@ extern "C" { f_return_status iki_write_print_error(const f_color_context_t context, const uint8_t verbosity, const f_status_t status, const f_string_t function, const bool fallback) { if (status == F_parameter) { - if (verbosity != iki_write_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "ERROR: Invalid parameter when calling function "); fl_color_print(f_type_error, context.set.notable, "%s", function); @@ -20,7 +20,7 @@ extern "C" { } if (status == F_memory_allocation || status == F_memory_reallocation) { - if (verbosity != iki_write_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "ERROR: Unable to allocate memory in function "); fl_color_print(f_type_error, context.set.notable, "%s", function); @@ -31,7 +31,7 @@ extern "C" { } if (status == F_buffer_too_large) { - if (verbosity != iki_write_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "ERROR: Maximum buffer limit reached while processing "); fl_color_print(f_type_error, context.set.notable, "%s", function); @@ -42,7 +42,7 @@ extern "C" { } if (status == F_string_too_large) { - if (verbosity != iki_write_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "ERROR: Maximum string limit reached while processing "); fl_color_print(f_type_error, context.set.notable, "%s", function); @@ -52,7 +52,7 @@ extern "C" { return F_none; } - if (fallback && verbosity != iki_write_verbosity_quiet) { + if (fallback && verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "UNKNOWN ERROR: ("); fl_color_print(f_type_error, context.set.notable, "%llu", status); @@ -77,7 +77,7 @@ extern "C" { } if (status == F_file_found_not) { - if (verbosity != iki_write_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "ERROR: Failed to find %s '", type_name); fl_color_print(f_type_error, context.set.notable, "%s", name); @@ -88,7 +88,7 @@ extern "C" { } if (status == F_file_closed) { - if (verbosity != iki_write_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fl_color_print(f_type_error, context.set.error, "INTERNAL ERROR: The %s '", type_name); fl_color_print(f_type_error, context.set.notable, "%s", name); fl_color_print_line(f_type_error, context.set.error, "' is no longer open."); @@ -98,7 +98,7 @@ extern "C" { } if (status == F_file_seek) { - if (verbosity != iki_write_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fl_color_print(f_type_error, context.set.error, "ERROR: A seek error occurred while accessing the file '"); fl_color_print(f_type_error, context.set.notable, "%s", name); fl_color_print_line(f_type_error, context.set.error, "'."); @@ -108,7 +108,7 @@ extern "C" { } if (status == F_file_read) { - if (verbosity != iki_write_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fl_color_print(f_type_error, context.set.error, "ERROR: A read error occurred while accessing the file '"); fl_color_print(f_type_error, context.set.notable, "%s", name); fl_color_print_line(f_type_error, context.set.error, "'."); @@ -118,7 +118,7 @@ extern "C" { } if (status == F_file_found) { - if (verbosity != iki_write_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "ERROR: The %s '", type_name); fl_color_print(f_type_error, context.set.notable, "%s", name); @@ -129,7 +129,7 @@ extern "C" { } if (status == F_parameter) { - if (verbosity != iki_write_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "INTERNAL ERROR: Invalid parameter when calling "); fl_color_print(f_type_error, context.set.notable, "%s", function); @@ -142,7 +142,7 @@ extern "C" { } if (status == F_name) { - if (verbosity != iki_write_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "ERROR: Invalid %s name '", type_name); fl_color_print(f_type_error, context.set.notable, "%s", name); @@ -153,7 +153,7 @@ extern "C" { } if (status == F_memory_out) { - if (verbosity != iki_write_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "CRITICAL ERROR: Unable to allocate memory, while trying to %s %s '", operation, type_name); fl_color_print(f_type_error, context.set.notable, "%s", name); @@ -164,7 +164,7 @@ extern "C" { } if (status == F_number_overflow) { - if (verbosity != iki_write_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "ERROR: Overflow while trying to %s %s '", operation, type_name); fl_color_print(f_type_error, context.set.notable, "%s", name); @@ -175,7 +175,7 @@ extern "C" { } if (status == F_directory) { - if (verbosity != iki_write_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "ERROR: Invalid directory while trying to %s %s '", operation, type_name); fl_color_print(f_type_error, context.set.notable, "%s", name); @@ -186,7 +186,7 @@ extern "C" { } if (status == F_access_denied) { - if (verbosity != iki_write_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "ERROR: Access denied while trying to %s %s '", operation, type_name); fl_color_print(f_type_error, context.set.notable, "%s", name); @@ -197,7 +197,7 @@ extern "C" { } if (status == F_loop) { - if (verbosity != iki_write_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "ERROR: Loop while trying to %s %s '", operation, type_name); fl_color_print(f_type_error, context.set.notable, "%s", name); @@ -208,7 +208,7 @@ extern "C" { } if (status == F_prohibited) { - if (verbosity != iki_write_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "ERROR: Prohibited by system while trying to %s %s '", operation, type_name); fl_color_print(f_type_error, context.set.notable, "%s", name); @@ -220,7 +220,7 @@ extern "C" { if (!type) { if (status == F_directory_found_not) { - if (verbosity != iki_write_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "ERROR: Failed to %s %s '", operation, type_name); fl_color_print(f_type_error, context.set.notable, "%s", name); @@ -232,7 +232,7 @@ extern "C" { } else if (type == 1) { if (status == F_directory_found_not) { - if (verbosity != iki_write_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "ERROR: Failed to %s %s '", operation, type_name); fl_color_print(f_type_error, context.set.notable, "%s", name); @@ -243,7 +243,7 @@ extern "C" { } if (status == F_failure) { - if (verbosity != iki_write_verbosity_quiet) { + if (verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "ERROR: Failed to %s %s '", operation, type_name); fl_color_print(f_type_error, context.set.notable, "%s", name); @@ -254,7 +254,7 @@ extern "C" { } } - if (iki_write_print_error(context, verbosity, status, function, F_false) == F_unknown && fallback && verbosity != iki_write_verbosity_quiet) { + if (iki_write_print_error(context, verbosity, status, function, F_false) == F_unknown && fallback && verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, context.set.error, "UNKNOWN ERROR: ("); fl_color_print(f_type_error, context.set.notable, "%llu", status); @@ -271,7 +271,7 @@ extern "C" { f_return_status iki_write_process(const iki_write_data_t data, const f_string_static_t object, const f_string_static_t content, const uint8_t quote, const int output, f_string_dynamic_t *escaped) { if (!object.used) { - if (data.verbosity != iki_write_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data.context.set.error, "ERROR: The object is missing, it must not have a length of "); fl_color_print(f_type_error, data.context.set.notable, "0"); @@ -284,7 +284,7 @@ extern "C" { f_status_t status = f_iki_object_is(object); if (status == F_false) { - if (data.verbosity != iki_write_verbosity_quiet) { + if (data.verbosity != f_console_verbosity_quiet) { fprintf(f_type_error, "%c", f_string_eol[0]); fl_color_print(f_type_error, data.context.set.error, "ERROR: The object '"); -- 1.8.3.1