From: Kevin Day Date: Fri, 25 Sep 2020 04:29:33 +0000 (-0500) Subject: Progress: continue work on updating print code changes as well as synchronizing level 3. X-Git-Tag: 0.5.1~63 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=8d128ea97de23cd9489a726ad69016fbd58dd28e;p=fll Progress: continue work on updating print code changes as well as synchronizing level 3. --- diff --git a/level_3/byte_dump/c/byte_dump.c b/level_3/byte_dump/c/byte_dump.c index da36080..c0bc1c2 100644 --- a/level_3/byte_dump/c/byte_dump.c +++ b/level_3/byte_dump/c/byte_dump.c @@ -89,6 +89,9 @@ extern "C" { status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context); + data->error.context = data->context.set.error; + data->error.notable = data->context.set.notable; + if (F_status_is_error(status)) { fll_error_print(data->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true); diff --git a/level_3/fake/c/fake.c b/level_3/fake/c/fake.c index c03bf2c..ce71494 100644 --- a/level_3/fake/c/fake.c +++ b/level_3/fake/c/fake.c @@ -112,6 +112,9 @@ extern "C" { status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context); + data->error.context = data->context.set.error; + data->error.notable = data->context.set.notable; + if (F_status_is_error(status)) { fll_error_print(data->error, F_status_set_fine(status), "fll_program_parameter_process", F_true); @@ -320,9 +323,9 @@ extern "C" { else if (F_status_is_error(status)) { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol[0]); - fl_color_print(data->error.to.stream, data->context.set.error, "ERROR: The operation '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s", operations_name); - fl_color_print(data->error.to.stream, data->context.set.error, "' failed.%c", f_string_eol[0]); + fl_color_print(data->error.to.stream, data->error.context, "ERROR: The operation '"); + fl_color_print(data->error.to.stream, data->error.notable, "%s", operations_name); + fl_color_print(data->error.to.stream, data->error.context, "' failed.%c", f_string_eol[0]); } break; @@ -342,7 +345,7 @@ extern "C" { else { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol[0]); - fl_color_print(data->error.to.stream, data->context.set.error, "ERROR: You failed to specify an operation.%c", f_string_eol[0]); + fl_color_print(data->error.to.stream, data->error.context, "ERROR: You failed to specify an operation.%c", f_string_eol[0]); fprintf(data->error.to.stream, "%c", f_string_eol[0]); } diff --git a/level_3/fake/c/private-build.c b/level_3/fake/c/private-build.c index 6304e0c..8f9fdbf 100644 --- a/level_3/fake/c/private-build.c +++ b/level_3/fake/c/private-build.c @@ -92,29 +92,34 @@ extern "C" { if (F_status_is_error_not(*status)) { for (f_array_length_t i = 0; i < data_build.setting.build_libraries.used; i++) { + *status = fll_execute_arguments_add(data_build.setting.build_libraries.array[i].string, data_build.setting.build_libraries.array[i].used, arguments); if (F_status_is_error(*status)) break; } // for } for (f_array_length_t i = 0; i < data_build.setting.flags_all.used && F_status_is_error_not(*status); i++) { + *status = fll_execute_arguments_add(data_build.setting.flags_all.array[i].string, data_build.setting.flags_all.array[i].used, arguments); if (F_status_is_error(*status)) break; } // for for (f_array_length_t i = 0; i < data_build.setting.flags_shared.used && F_status_is_error_not(*status); i++) { + *status = fll_execute_arguments_add(data_build.setting.flags_shared.array[i].string, data_build.setting.flags_shared.array[i].used, arguments); if (F_status_is_error(*status)) break; } // for if (is_library) { for (f_array_length_t j = 0; j < data_build.setting.flags_library.used && F_status_is_error_not(*status); j++) { + *status = fll_execute_arguments_add(data_build.setting.flags_library.array[j].string, data_build.setting.flags_library.array[j].used, arguments); if (F_status_is_error(*status)) break; } // for } else { for (f_array_length_t i = 0; i < data_build.setting.flags_program.used && F_status_is_error_not(*status); i++) { + *status = fll_execute_arguments_add(data_build.setting.flags_program.array[i].string, data_build.setting.flags_program.array[i].used, arguments); if (F_status_is_error(*status)) break; } // for @@ -125,6 +130,7 @@ extern "C" { f_array_length_t i = 0; for (; i < data.define.used && F_status_is_error_not(*status); i++) { + *status = fll_execute_arguments_add(data.define.array[i].string, data.define.array[i].used, arguments); if (F_status_is_error(*status)) break; } // for @@ -134,18 +140,21 @@ extern "C" { f_array_length_t i = 0; for (; i < data_build.setting.defines_all.used && F_status_is_error_not(*status); i++) { + *status = fll_execute_arguments_add(data_build.setting.defines_all.array[i].string, data_build.setting.defines_all.array[i].used, arguments); if (F_status_is_error(*status)) break; } // for if (is_shared) { for (i = 0; i < data_build.setting.defines_shared.used && F_status_is_error_not(*status); i++) { + *status = fll_execute_arguments_add(data_build.setting.defines_shared.array[i].string, data_build.setting.defines_shared.array[i].used, arguments); if (F_status_is_error(*status)) break; } // for } else { for (i = 0; i < data_build.setting.defines_static.used && F_status_is_error_not(*status); i++) { + *status = fll_execute_arguments_add(data_build.setting.defines_static.array[i].string, data_build.setting.defines_static.array[i].used, arguments); if (F_status_is_error(*status)) break; } // for @@ -175,7 +184,7 @@ extern "C" { f_macro_string_dynamic_t_new(*status, path_source, source.used); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "f_macro_string_dynamic_t_new", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "f_macro_string_dynamic_t_new", F_true); f_macro_string_dynamic_t_delete_simple(path_source); return; @@ -186,7 +195,7 @@ extern "C" { fl_directory_recurse_t recurse = fl_directory_recurse_t_initialize; if (data.error.verbosity == f_console_verbosity_verbose) { - recurse.output = f_type_descriptor_output; + recurse.output = data.output; recurse.verbose = fake_verbose_print_copy; } @@ -200,14 +209,14 @@ extern "C" { *status = fl_string_dynamic_append_nulless(files.array[i], &path_source); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fl_string_dynamic_append_nulless", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fl_string_dynamic_append_nulless", F_true); break; } *status = fl_string_dynamic_terminate_after(&path_source); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fl_string_dynamic_terminate_after", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fl_string_dynamic_terminate_after", F_true); break; } @@ -232,7 +241,7 @@ extern "C" { } // for if (F_status_set_fine(*status) != F_failure) { - fll_error_print(data->error, F_status_set_fine(*status), "fl_directory_copy_content", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fl_directory_copy_content", F_true); } break; @@ -250,14 +259,14 @@ extern "C" { *status = fl_string_dynamic_append_nulless(destination, &destination_file); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fl_string_dynamic_append_nulless", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fl_string_dynamic_append_nulless", F_true); break; } *status = f_file_name_base(path_source.string, path_source.used, &destination_file); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "f_file_name_base", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "f_file_name_base", F_true); break; } @@ -429,7 +438,7 @@ extern "C" { } if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true); f_macro_string_dynamics_t_delete_simple(arguments); return; @@ -449,7 +458,7 @@ extern "C" { } // for if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fl_string_dynamic_mash", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fl_string_dynamic_mash", F_true); f_macro_string_dynamic_t_delete_simple(defines); f_macro_string_dynamics_t_delete_simple(arguments); @@ -459,7 +468,7 @@ extern "C" { *status = fl_string_dynamic_terminate_after(&defines); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fl_string_dynamic_terminate_after", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fl_string_dynamic_terminate_after", F_true); f_macro_string_dynamic_t_delete_simple(defines); f_macro_string_dynamics_t_delete_simple(arguments); @@ -532,7 +541,7 @@ extern "C" { f_macro_string_dynamic_t_delete_simple(defines); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fll_execute_arguments_add_parameter_set", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fll_execute_arguments_add_parameter_set", F_true); f_macro_string_dynamics_t_delete_simple(arguments); return; @@ -559,7 +568,7 @@ extern "C" { } if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), function, F_true); + fll_error_print(data.error, F_status_set_fine(*status), function, F_true); f_macro_string_dynamic_t_delete_simple(path); f_macro_string_dynamics_t_delete_simple(arguments); @@ -592,14 +601,14 @@ extern "C" { if (F_status_is_error(*status)) { if (F_status_set_fine(*status) == F_failure) { if (data.error.verbosity != f_console_verbosity_quiet) { - fprintf(data.error.stream, "%c", f_string_eol[0]); - fl_color_print(data.error, data.context.set.error, "ERROR: Failed to execute script: "); - fl_color_print(data.error, data.context.set.notable, "%s", path.string); - fl_color_print(data.error, data.context.set.error, ".%c", f_string_eol[0]); + fprintf(data.error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data.error.to.stream, data.error.context, "%sFailed to execute script: ", data.error.prefix); + fl_color_print(data.error.to.stream, data.error.notable, "%s", path.string); + fl_color_print(data.error.to.stream, data.error.context, ".%c", f_string_eol[0]); } } else { - fll_error_print(data->error, F_status_set_fine(*status), "fll_execute_path_environment", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fll_execute_path_environment", F_true); } } else { @@ -621,7 +630,7 @@ extern "C" { f_status_t status = f_file_name_base(path.string, path.used, name); if (F_status_is_error(status)) { - fll_error_print(data->error, F_status_set_fine(status), "f_file_name_base", F_true); + fll_error_print(data.error, F_status_set_fine(status), "f_file_name_base", F_true); return status; } @@ -637,7 +646,7 @@ extern "C" { status = fl_string_dynamic_terminate_after(name); if (F_status_is_error(status)) { - fll_error_print(data->error, F_status_set_fine(status), "fl_string_dynamic_terminate_after", F_true); + fll_error_print(data.error, F_status_set_fine(status), "fl_string_dynamic_terminate_after", F_true); return status; } @@ -698,7 +707,7 @@ extern "C" { } // for if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true); f_macro_string_dynamics_t_delete_simple(arguments); return; @@ -837,7 +846,7 @@ extern "C" { fake_build_arguments_standard_add(data, data_build, F_true, F_true, &arguments, status); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true); f_macro_string_dynamics_t_delete_simple(arguments); return; @@ -1013,7 +1022,7 @@ extern "C" { *status = fake_build_get_file_name_without_extension(data, data_build.setting.build_sources_library.array[i], &file_name); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fake_build_get_file_name_without_extension", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fake_build_get_file_name_without_extension", F_true); break; } @@ -1025,7 +1034,7 @@ extern "C" { *status = f_file_name_directory(data_build.setting.build_sources_library.array[i].string, data_build.setting.build_sources_library.array[i].used, &source_path); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "f_file_name_directory", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "f_file_name_directory", F_true); break; } @@ -1033,21 +1042,21 @@ extern "C" { *status = fl_string_dynamic_prepend(data.path_build_objects, &source_path); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fl_string_dynamic_prepend", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fl_string_dynamic_prepend", F_true); break; } *status = fl_string_append_assure(f_path_separator, f_path_separator_length, &source_path); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fl_string_append_assure", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fl_string_append_assure", F_true); break; } *status = fl_string_dynamic_terminate_after(&source_path); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fl_string_dynamic_terminate_after", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fl_string_dynamic_terminate_after", F_true); break; } @@ -1075,7 +1084,7 @@ extern "C" { *status = fll_execute_arguments_add(source, source_length, &arguments); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true); break; } } // for @@ -1116,7 +1125,7 @@ extern "C" { f_macro_string_dynamics_new(*status, names, 2); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "f_macro_string_dynamics_new", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "f_macro_string_dynamics_new", F_true); f_macro_string_dynamics_t_delete_simple(names); return; @@ -1141,12 +1150,12 @@ extern "C" { 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.error.verbosity != f_console_verbosity_quiet) { - fprintf(data.error.stream, "%c", f_string_eol[0]); - fl_color_print(data.error, data.context.set.error, "ERROR: The values for the setting '"); - fl_color_print(data.error, data.context.set.notable, "%s", fake_build_setting_name_environment); - fl_color_print(data.error, data.context.set.error, "' of setting file '"); - fl_color_print(data.error, data.context.set.notable, "%s", data.file_data_build_settings.string); - fl_color_print(data.error, data.context.set.error, "' is too large.%c", f_string_eol[0]); + fprintf(data.error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data.error.to.stream, data.context.set.error, "ERROR: The values for the setting '"); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s", fake_build_setting_name_environment); + fl_color_print(data.error.to.stream, data.context.set.error, "' of setting file '"); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s", data.file_data_build_settings.string); + fl_color_print(data.error.to.stream, data.context.set.error, "' is too large.%c", f_string_eol[0]); } f_macro_string_dynamic_t_delete_simple(part); @@ -1158,7 +1167,7 @@ extern "C" { f_macro_string_dynamics_resize(*status, names, names.used + data_build.setting.environment.used); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "f_macro_string_dynamics_resize", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "f_macro_string_dynamics_resize", F_true); f_macro_string_dynamic_t_delete_simple(part); f_macro_string_dynamics_t_delete_simple(names); @@ -1183,7 +1192,7 @@ extern "C" { f_macro_string_dynamic_t_delete_simple(part); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fl_string_append", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fl_string_append", F_true); f_macro_string_dynamics_t_delete_simple(names); return; @@ -1261,7 +1270,7 @@ extern "C" { f_macro_string_dynamic_t_delete_simple(variable_value); if (F_status_is_error(*status) && F_status_set_fine(*status) != F_signal) { - fll_error_print(data->error, *status, function, F_true); + fll_error_print(data.error, *status, function, F_true); } } #endif // _di_fake_build_load_environment_ @@ -1331,12 +1340,12 @@ extern "C" { for (uint8_t i = 0; i < 1; i++) { if (!settings[i]->used) { - fprintf(data.error.stream, "%c", f_string_eol[0]); - fl_color_print(data.error, data.context.set.error, "ERROR: The setting '"); - fl_color_print(data.error, data.context.set.notable, "%s", names[i]); - fl_color_print(data.error, data.context.set.error, "' is required but is not specified in the settings file '"); - fl_color_print(data.error, data.context.set.notable, "%s", setting_file.used ? path_file : data.file_data_build_settings.string); - fl_color_print(data.error, data.context.set.error, "'.%c", f_string_eol[0]); + fprintf(data.error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data.error.to.stream, data.context.set.error, "ERROR: The setting '"); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s", names[i]); + fl_color_print(data.error.to.stream, data.context.set.error, "' is required but is not specified in the settings file '"); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s", setting_file.used ? path_file : data.file_data_build_settings.string); + fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol[0]); failed = F_true; } @@ -1561,12 +1570,12 @@ extern "C" { if (found == F_false) { if (data.error.verbosity != f_console_verbosity_quiet) { - fprintf(data.error.stream, "%c", f_string_eol[0]); - fl_color_print(data.error, data.context.set.error, "ERROR: The specified mode '"); - fl_color_print(data.error, data.context.set.notable, "%s", modes->array[i].string); - fl_color_print(data.error, data.context.set.error, "' is not a valid mode, according to '"); - fl_color_print(data.error, data.context.set.notable, "%s", path_file); - fl_color_print(data.error, data.context.set.error, "'.%c", f_string_eol[0]); + fprintf(data.error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data.error.to.stream, data.context.set.error, "ERROR: The specified mode '"); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s", modes->array[i].string); + fl_color_print(data.error.to.stream, data.context.set.error, "' is not a valid mode, according to '"); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s", path_file); + fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol[0]); } error_printed = F_true; @@ -1616,14 +1625,14 @@ extern "C" { if (*status == F_status_set_error(F_string_too_large)) { if (data.error.verbosity != f_console_verbosity_quiet) { // @todo update FSS functions to return which setting index the problem happened on. - fprintf(data.error.stream, "%c", f_string_eol[0]); - fl_color_print(data.error, data.context.set.error, "ERROR: A setting in the build setting file '"); - fl_color_print(data.error, data.context.set.notable, "%s", path_file); - fl_color_print(data.error, data.context.set.error, "' is too long.%c", f_string_eol[0]); + fprintf(data.error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data.error.to.stream, data.context.set.error, "ERROR: A setting in the build setting file '"); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s", path_file); + fl_color_print(data.error.to.stream, data.context.set.error, "' is too long.%c", f_string_eol[0]); } } else if (!error_printed) { - fll_error_print(data->error, F_status_set_fine(*status), function, F_true); + fll_error_print(data.error, F_status_set_fine(*status), function, F_true); } } else if (!fake_signal_received(data)) { @@ -1913,21 +1922,21 @@ extern "C" { *status = fl_string_dynamic_append_nulless(settings_single_source[i]->array[0], settings_single_destination[i]); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fl_string_dynamic_append_nulless", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fl_string_dynamic_append_nulless", F_true); break; } if (settings_single_type[i] == 2) { *status = fl_string_append_assure(f_path_separator, f_path_separator_length, settings_single_destination[i]); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fl_string_append_assure", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fl_string_append_assure", F_true); break; } } *status = fl_string_dynamic_terminate_after(settings_single_destination[i]); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fl_string_dynamic_terminate_after", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fl_string_dynamic_terminate_after", F_true); break; } } @@ -1995,14 +2004,16 @@ extern "C" { if (destinations[i]->used > 0) continue; *status = fl_string_append_assure(sources[i], lengths[i], destinations[i]); + if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fl_string_append_assure", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fl_string_append_assure", F_true); break; } *status = fl_string_dynamic_terminate_after(destinations[i]); + if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fl_string_dynamic_terminate_after", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fl_string_dynamic_terminate_after", F_true); break; } } // for @@ -2023,12 +2034,12 @@ extern "C" { } if (data.error.verbosity == f_console_verbosity_verbose) { - Dprintf(data.output, "%c", f_string_eol[0]); - fl_color_print_TO(data.output, data.context.set.error, "WARNING: the parameters '"); - fl_color_print_TO(data.output, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_shared_disabled); - fl_color_print_TO(data.output, data.context.set.error, "' and '"); - fl_color_print_TO(data.output, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_shared_enabled); - fl_color_print_TO(data.output, data.context.set.error, "' contradict, defaulting to '"); + fprintf(data.output.stream, "%c", f_string_eol[0]); + fl_color_print(data.output.stream, data.context.set.error, "WARNING: the parameters '"); + fl_color_print(data.output.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_shared_disabled); + fl_color_print(data.output.stream, data.context.set.error, "' and '"); + fl_color_print(data.output.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_shared_enabled); + fl_color_print(data.output.stream, data.context.set.error, "' contradict, defaulting to '"); if (setting->build_shared) { fl_color_print(data.output.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_shared_enabled); @@ -2092,21 +2103,21 @@ 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.error.verbosity != f_console_verbosity_quiet) { - fprintf(data.error.stream, "%c", f_string_eol[0]); - fl_color_print(data.error, data.context.set.error, "ERROR: The build settings '"); - fl_color_print(data.error, data.context.set.notable, "%s", fake_build_setting_name_build_shared); - fl_color_print(data.error, data.context.set.error, "' and '"); - fl_color_print(data.error, data.context.set.notable, "%s", fake_build_setting_name_build_static); - fl_color_print(data.error, data.context.set.error, "' cannot both be false when using the language '"); + fprintf(data.error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data.error.to.stream, data.context.set.error, "ERROR: The build settings '"); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s", fake_build_setting_name_build_shared); + fl_color_print(data.error.to.stream, data.context.set.error, "' and '"); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s", fake_build_setting_name_build_static); + fl_color_print(data.error.to.stream, data.context.set.error, "' cannot both be false when using the language '"); if (setting->build_language == fake_build_language_type_c) { - fl_color_print(data.error, data.context.set.notable, "%s", fake_build_language_c); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s", fake_build_language_c); } else { - fl_color_print(data.error, data.context.set.notable, "%s", fake_build_language_cpp); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s", fake_build_language_cpp); } - fl_color_print(data.error, data.context.set.error, "'.%c", f_string_eol[0]); + fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -2187,7 +2198,7 @@ extern "C" { } if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "f_file_name_base", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "f_file_name_base", F_true); return; } @@ -2196,7 +2207,7 @@ extern "C" { *status = fl_string_dynamic_append_nulless(data.path_build_stage, values[i]); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fl_string_dynamic_append_nulless", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fl_string_dynamic_append_nulless", F_true); break; } @@ -2204,14 +2215,14 @@ extern "C" { *status = fl_string_append(data.process.string, data.process.used, values[i]); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fl_string_append", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fl_string_append", F_true); break; } *status = fl_string_append(fake_build_stage_separate, fake_build_stage_separate_length, values[i]); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fl_string_append", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fl_string_append", F_true); break; } } @@ -2219,35 +2230,35 @@ extern "C" { *status = fl_string_append_nulless(names[i], lengths[i], values[i]); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fl_string_dynamic_append_nulless", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fl_string_dynamic_append_nulless", F_true); break; } *status = fl_string_append(fake_build_stage_separate, fake_build_stage_separate_length, values[i]); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fl_string_append", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fl_string_append", F_true); break; } *status = fl_string_dynamic_append(settings_file_base, values[i]); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fl_string_dynamic_append", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fl_string_dynamic_append", F_true); break; } *status = fl_string_append(fake_build_stage_built, fake_build_stage_built_length, values[i]); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fl_string_append", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fl_string_append", F_true); break; } *status = fl_string_dynamic_terminate_after(values[i]); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fl_string_dynamic_terminate_after", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fl_string_dynamic_terminate_after", F_true); break; } } // for @@ -2300,7 +2311,7 @@ extern "C" { *status = fake_build_get_file_name_without_extension(data, data_build.setting.build_sources_library.array[i], &file_name); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fake_build_get_file_name_without_extension", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fake_build_get_file_name_without_extension", F_true); break; } @@ -2312,7 +2323,7 @@ extern "C" { *status = f_file_name_directory(data_build.setting.build_sources_library.array[i].string, data_build.setting.build_sources_library.array[i].used, &destination_path); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "f_file_name_directory", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "f_file_name_directory", F_true); break; } @@ -2320,21 +2331,21 @@ extern "C" { *status = fl_string_dynamic_prepend(data.path_build_objects, &destination_path); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fl_string_dynamic_prepend", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fl_string_dynamic_prepend", F_true); break; } *status = fl_string_append_assure(f_path_separator, f_path_separator_length, &destination_path); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fl_string_append_assure", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fl_string_append_assure", F_true); break; } *status = fl_string_dynamic_terminate_after(&destination_path); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fl_string_dynamic_terminate_after", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fl_string_dynamic_terminate_after", F_true); break; } @@ -2347,10 +2358,10 @@ extern "C" { if (*status == F_false) { if (data.error.verbosity != f_console_verbosity_quiet) { - fprintf(data.error.stream, "%c", f_string_eol[0]); - fl_color_print(data.error, data.context.set.error, "ERROR: The path '"); - fl_color_print(data.error, data.context.set.notable, "%s", destination_path.string); - fl_color_print(data.error, data.context.set.error, "' exists but is not a directory.%c", f_string_eol[0]); + fprintf(data.error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data.error.to.stream, data.context.set.error, "ERROR: The path '"); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s", destination_path.string); + fl_color_print(data.error.to.stream, data.context.set.error, "' exists but is not a directory.%c", f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -2361,10 +2372,10 @@ extern "C" { if (F_status_is_error(*status)) { if (F_status_set_fine(*status) == F_file_found_not) { - fprintf(data.error.stream, "%c", f_string_eol[0]); - fl_color_print(data.error, data.context.set.error, "ERROR: The path '"); - fl_color_print(data.error, data.context.set.notable, "%s", destination_path.string); - fl_color_print(data.error, data.context.set.error, "' could not be created, a parent directory does not exist.%c", f_string_eol[0]); + fprintf(data.error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data.error.to.stream, data.context.set.error, "ERROR: The path '"); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s", destination_path.string); + fl_color_print(data.error.to.stream, data.context.set.error, "' could not be created, a parent directory does not exist.%c", f_string_eol[0]); } else { fll_error_file_print(data.error, F_status_set_fine(*status), "f_directory_create", F_true, destination_path.string, "create", fll_error_file_type_directory); @@ -2428,7 +2439,7 @@ extern "C" { fake_build_arguments_standard_add(data, data_build, F_false, F_true, &arguments, status); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true); break; } @@ -2669,7 +2680,7 @@ extern "C" { fake_build_arguments_standard_add(data, data_build, F_true, F_false, &arguments, status); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true); f_macro_string_dynamics_t_delete_simple(arguments); return; @@ -2784,7 +2795,7 @@ extern "C" { fake_build_arguments_standard_add(data, data_build, F_false, F_false, &arguments, status); if (F_status_is_error(*status)) { - fll_error_print(data->error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true); + fll_error_print(data.error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true); f_macro_string_dynamics_t_delete_simple(arguments); return; diff --git a/level_3/fake/c/private-fake.c b/level_3/fake/c/private-fake.c index 5b68139..24e5a3d 100644 --- a/level_3/fake/c/private-fake.c +++ b/level_3/fake/c/private-fake.c @@ -194,7 +194,7 @@ extern "C" { status = fake_path_generate_string_dynamic(data, *parameters_source[i], parameters_value[i], parameters_length[i]); if (F_status_is_error(status)) { - fake_print_error(*data, F_status_set_fine(status), "fake_path_generate_string_dynamic", F_true); + fll_error_print(data->error, F_status_set_fine(status), "fake_path_generate_string_dynamic", F_true); return status; } } // for @@ -259,7 +259,7 @@ extern "C" { status = fl_string_append_nulless(parameters_source[i], parameters_length[i], parameters_value[i]); if (F_status_is_error(status)) { - fake_print_error(*data, F_status_set_fine(status), "fl_string_append_nulless", F_true); + fll_error_print(data->error, F_status_set_fine(status), "fl_string_append_nulless", F_true); return status; } } // for @@ -314,7 +314,7 @@ extern "C" { status = fake_path_generate_string_dynamic(data, *parameters_source[i], parameters_value[i], parameters_length[i]); if (F_status_is_error(status)) { - fake_print_error(*data, F_status_set_fine(status), "fake_path_generate_string_dynamic", F_true); + fll_error_print(data->error, F_status_set_fine(status), "fake_path_generate_string_dynamic", F_true); return status; } } // for @@ -376,7 +376,7 @@ extern "C" { status = fl_string_append_nulless(parameters_source[i], parameters_length[i], parameters_value[i]); if (F_status_is_error(status)) { - fake_print_error(*data, F_status_set_fine(status), "fl_string_append_nulless", F_true); + fll_error_print(data->error, F_status_set_fine(status), "fl_string_append_nulless", F_true); return status; } } // for @@ -394,7 +394,7 @@ extern "C" { status = fl_string_dynamic_append_nulless(data->path_work, parameters_value[i]); if (F_status_is_error(status)) { - fake_print_error(*data, F_status_set_fine(status), "fl_string_dynamic_append_nulless", F_true); + fll_error_print(data->error, F_status_set_fine(status), "fl_string_dynamic_append_nulless", F_true); return status; } } // for @@ -423,7 +423,7 @@ extern "C" { status = fl_string_append_nulless(parameters_source[i], parameters_length[i], parameters_value[i]); if (F_status_is_error(status)) { - fake_print_error(*data, F_status_set_fine(status), "fl_string_append_nulless", F_true); + fll_error_print(data->error, F_status_set_fine(status), "fl_string_append_nulless", F_true); return status; } } // for @@ -461,7 +461,7 @@ extern "C" { status = fake_path_generate_string_dynamic(data, *parameters_source[i], parameters_value[i], parameters_length[i]); if (F_status_is_error(status)) { - fake_print_error(*data, F_status_set_fine(status), "fake_path_generate_string_dynamic", F_true); + fll_error_print(data->error, F_status_set_fine(status), "fake_path_generate_string_dynamic", F_true); return status; } } // for @@ -499,7 +499,7 @@ extern "C" { status = fl_string_append_nulless(parameters_source[i], parameters_length[i], parameters_value[i]); if (F_status_is_error(status)) { - fake_print_error(*data, F_status_set_fine(status), "fl_string_append_nulless", F_true); + fll_error_print(data->error, F_status_set_fine(status), "fl_string_append_nulless", F_true); return status; } } // for @@ -550,7 +550,7 @@ extern "C" { status = fl_string_dynamic_terminate_after(parameters_value[i]); if (F_status_is_error(status)) { - fake_print_error(*data, F_status_set_fine(status), "fl_string_dynamic_terminate_after", F_true); + fll_error_print(data->error, F_status_set_fine(status), "fl_string_dynamic_terminate_after", F_true); return status; } } // for @@ -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->error.verbosity != f_console_verbosity_quiet) { + if (fll_error_print(data->error, F_status_set_fine(status), "f_utf_is_word_dash_plus", F_false) == F_unknown && data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol[0]); fl_color_print(data->error.to.stream, data->context.set.error, "ERROR: Failed to process the parameter '"); fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_process); @@ -679,7 +679,7 @@ extern "C" { } } else { - fake_print_error(*data, F_status_set_fine(status), "fl_string_append", F_true); + fll_error_print(data->error, F_status_set_fine(status), "fl_string_append", F_true); } return status; @@ -702,7 +702,7 @@ extern "C" { f_macro_string_dynamic_t_resize(status, (*parameters_value[i]), parameter_default_lengths[i]); if (F_status_is_error(status)) { - fake_print_error(*data, F_status_set_fine(status), "f_macro_string_dynamic_t_resize", F_true); + fll_error_print(data->error, F_status_set_fine(status), "f_macro_string_dynamic_t_resize", F_true); return status; } @@ -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->error.verbosity != f_console_verbosity_quiet) { + if (fll_error_print(data->error, F_status_set_fine(status), "fl_console_parameter_to_string_dynamic_directory", F_false) == F_unknown && data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol[0]); fl_color_print(data->error.to.stream, data->context.set.error, "ERROR: Failed to process parameter '"); fl_color_print(data->error.to.stream, 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->error.verbosity != f_console_verbosity_quiet) { + if (fll_error_print(data->error, F_status_set_fine(status), "f_macro_string_dynamic_t_new", F_false) == F_unknown && data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol[0]); fl_color_print(data->error.to.stream, data->context.set.error, "ERROR: Failed to load default for the parameter '"); fl_color_print(data->error.to.stream, 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->error.verbosity != f_console_verbosity_quiet) { + if (fll_error_print(data->error, F_status_set_fine(status), "fll_program_parameter_additional_rip", F_false) == F_unknown && data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol[0]); fl_color_print(data->error.to.stream, data->context.set.error, "ERROR: Failed to process the parameter '"); fl_color_print(data->error.to.stream, 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->error.verbosity != f_console_verbosity_quiet) { + if (fll_error_print(data->error, F_status_set_fine(status), "f_utf_is_word", F_false) == F_unknown && data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol[0]); fl_color_print(data->error.to.stream, data->context.set.error, "ERROR: Failed to process the parameter '"); fl_color_print(data->error.to.stream, 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->error.verbosity != f_console_verbosity_quiet) { + if (fll_error_print(data->error, F_status_set_fine(status), "fll_program_parameter_additional_rip", F_false) == F_unknown && data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol[0]); fl_color_print(data->error.to.stream, data->context.set.error, "ERROR: Failed to process the parameter '"); fl_color_print(data->error.to.stream, 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->error.verbosity != f_console_verbosity_quiet) { + if (fll_error_print(data->error, F_status_set_fine(status), "f_utf_is_word_dash_plus", F_false) == F_unknown && data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol[0]); fl_color_print(data->error.to.stream, data->context.set.error, "ERROR: Failed to process the parameter '"); fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_mode); diff --git a/level_3/fake/c/private-make.c b/level_3/fake/c/private-make.c index 365062a..ef21f0c 100644 --- a/level_3/fake/c/private-make.c +++ b/level_3/fake/c/private-make.c @@ -58,15 +58,15 @@ extern "C" { status = f_account_id_group_by_name(buffer.string, id); if (F_status_is_error(status)) { - fake_print_message(data, status, "f_account_id_group_by_name", F_true); + fll_error_print(error, F_status_set_fine(status), "f_account_id_group_by_name", F_true); return F_status_set_error(status); } else if (status == F_exist_not) { if (data.error.verbosity != f_console_verbosity_quiet) { fprintf(error.to.stream, "%c", f_string_eol[0]); - fl_color_print(error.to.stream, print.context, "%s: The group name '", data.error.prefix); - fl_color_print(error.to.stream, data.context.set.notable, "%s", buffer.string); - fl_color_print(error.to.stream, print.context, "' was not found.%c", f_string_eol[0]); + fl_color_print(error.to.stream, error.context, "%sThe group name '", error.prefix); + fl_color_print(error.to.stream, error.notable, "%s", buffer.string); + fl_color_print(error.to.stream, error.context, "' was not found.%c", f_string_eol[0]); } return F_status_set_error(F_failure); @@ -75,15 +75,15 @@ extern "C" { return F_none; } - fake_print_message(data, status, "fl_conversion_string_to_number_unsigned", F_true); + fll_error_print(error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true); return F_status_set_error(status); } else if (number > f_type_size_32_unsigned) { if (data.error.verbosity != f_console_verbosity_quiet) { fprintf(error.to.stream, "%c", f_string_eol[0]); - fl_color_print(error.to.stream, print.context, "%s: The number '", data.error.prefix); - fl_color_print(error.to.stream, data.context.set.notable, "%llu", number); - fl_color_print(error.to.stream, print.context, "' is too large.%c", f_string_eol[0]); + fl_color_print(error.to.stream, error.context, "%sThe number '", error.prefix); + fl_color_print(error.to.stream, error.notable, "%llu", number); + fl_color_print(error.to.stream, error.context, "' is too large.%c", f_string_eol[0]); } } @@ -95,7 +95,7 @@ extern "C" { #ifndef _di_fake_make_get_id_mode_ f_return_status fake_make_get_id_mode(const fake_data_t data, const fll_error_print_t error, const f_string_static_t buffer, f_file_mode_t *mode, uint8_t *replace) { if (!buffer.used) { - fake_print_message(data, F_parameter, "fake_make_get_id_mode", F_true); + fll_error_print(error, F_parameter, "fake_make_get_id_mode", F_true); return F_status_set_error(F_parameter); } @@ -105,12 +105,12 @@ extern "C" { if (data.error.verbosity != f_console_verbosity_quiet) { if (F_status_set_fine(status) == F_syntax) { fprintf(error.to.stream, "%c", f_string_eol[0]); - fl_color_print(error.to.stream, print.context, "%s: The mode '", data.error.prefix); - fl_color_print(error.to.stream, data.context.set.notable, "%s", buffer.string); - fl_color_print(error.to.stream, print.context, "' is invalid.%c", f_string_eol[0]); + fl_color_print(error.to.stream, error.context, "%sThe mode '", error.prefix); + fl_color_print(error.to.stream, error.notable, "%s", buffer.string); + fl_color_print(error.to.stream, error.context, "' is invalid.%c", f_string_eol[0]); } else { - fake_print_message(data, status, "f_file_mode_from_string", F_true); + fll_error_print(error, status, "f_file_mode_from_string", F_true); } } @@ -122,7 +122,7 @@ extern "C" { #endif // _di_fake_make_get_id_mode_ #ifndef _di_fake_make_get_id_owner_ - f_return_status fake_make_get_id_owner(const fake_data_t data, const f_string_static_t buffer, uid_t *id) { + f_return_status fake_make_get_id_owner(const fake_data_t data, const fll_error_print_t error, const f_string_static_t buffer, uid_t *id) { const f_string_range_t range = f_macro_string_range_t_initialize(buffer.used); f_number_unsigned_t number = 0; @@ -136,15 +136,15 @@ extern "C" { status = f_account_id_user_by_name(buffer.string, id); if (F_status_is_error(status)) { - fake_print_message(data, status, "f_account_id_user_by_name", F_true); + fll_error_print(error, status, "f_account_id_user_by_name", F_true); return F_status_set_error(status); } else if (status == F_exist_not) { if (data.error.verbosity != f_console_verbosity_quiet) { fprintf(error.to.stream, "%c", f_string_eol[0]); - fl_color_print(error.to.stream, print.context, "%s: The user name '", data.error.prefix); - fl_color_print(error.to.stream, data.context.set.notable, "%s", buffer.string); - fl_color_print(error.to.stream, print.context, "' was not found.%c", f_string_eol[0]); + fl_color_print(error.to.stream, error.context, "%sThe user '", error.prefix); + fl_color_print(error.to.stream, error.notable, "%s", buffer.string); + fl_color_print(error.to.stream, error.context, "' was not found.%c", f_string_eol[0]); } return F_status_set_error(F_failure); @@ -153,15 +153,15 @@ extern "C" { return F_none; } - fake_print_message(data, status, "fl_conversion_string_to_number_unsigned", F_true); + fll_error_print(error, status, "fl_conversion_string_to_number_unsigned", F_true); return F_status_set_error(status); } else if (number > f_type_size_32_unsigned) { if (data.error.verbosity != f_console_verbosity_quiet) { fprintf(error.to.stream, "%c", f_string_eol[0]); - fl_color_print(error.to.stream, print.context, "%s: The number '", data.error.prefix); - fl_color_print(error.to.stream, data.context.set.notable, "%llu", number); - fl_color_print(error.to.stream, print.context, "' is too large.%c", f_string_eol[0]); + fl_color_print(error.to.stream, error.context, "%sThe number '", error.prefix); + fl_color_print(error.to.stream, error.notable, "%llu", number); + fl_color_print(error.to.stream, error.context, "' is too large.%c", f_string_eol[0]); } } @@ -259,7 +259,7 @@ extern "C" { *status = fll_fss_extended_read(&data_make->buffer, &content_range, &settings.objects, &settings.contents, 0, 0); if (F_status_is_error(*status)) { - fake_print_error_fss(data, *status, "fll_fss_extended_read", data.file_data_build_fakefile.string, content_range, F_true); + fake_print_error_fss(data, F_status_set_fine(*status), "fll_fss_extended_read", data.file_data_build_fakefile.string, content_range, F_true); break; } @@ -284,7 +284,7 @@ extern "C" { *status = fll_fss_extended_read(&data_make->buffer, &content_range, &data_make->fakefile.array[data_make->fakefile.used].objects, &data_make->fakefile.array[data_make->fakefile.used].contents, 0, &data_make->fakefile.array[data_make->fakefile.used].quotedss); if (F_status_is_error(*status)) { - fake_print_error_fss(data, *status, "fll_fss_extended_read", data.file_data_build_fakefile.string, content_range, F_true); + fake_print_error_fss(data, F_status_set_fine(*status), "fll_fss_extended_read", data.file_data_build_fakefile.string, content_range, F_true); break; } @@ -305,11 +305,11 @@ extern "C" { if (missing_main) { if (data.error.verbosity != f_console_verbosity_quiet) { fprintf(data.error.to.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data.context.set.error, "ERROR: The fakefile '"); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", data.file_data_build_fakefile.string); - fl_color_print(data.error.to.stream, data.context.set.error, "' is missing the required '"); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", fake_make_section_main); - fl_color_print(data.error.to.stream, data.context.set.error, "' object.%c", f_string_eol[0]); + fl_color_print(data.error.to.stream, data.error.context, "%sThe fakefile '", data.error.prefix); + fl_color_print(data.error.to.stream, data.error.notable, "%s", data.file_data_build_fakefile.string); + fl_color_print(data.error.to.stream, data.error.context, "' is missing the required '"); + fl_color_print(data.error.to.stream, data.error.notable, "%s", fake_make_section_main); + fl_color_print(data.error.to.stream, data.error.context, "' object.%c", f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -393,12 +393,14 @@ extern "C" { for (; j < settings.contents.array[i].used; j++) { *status = fl_string_dynamic_partial_append_nulless(data_make->buffer, settings.contents.array[i].array[j], &name_define); + if (F_status_is_error(*status)) { fll_error_print(data.error, F_status_set_fine(*status), "fl_string_dynamic_partial_append_nulless", F_true); break; } *status = fl_string_dynamic_terminate_after(&name_define); + if (F_status_is_error(*status)) { fll_error_print(data.error, F_status_set_fine(*status), "fl_string_dynamic_terminate_after", F_true); break; @@ -425,6 +427,7 @@ extern "C" { name_define.used++; *status = fl_string_dynamic_append(name_define, &data_make->setting_build.environment.array[data_make->setting_build.environment.used]); + if (F_status_is_error(*status)) { fll_error_print(data.error, F_status_set_fine(*status), "fl_string_dynamic_append", F_true); break; @@ -543,6 +546,7 @@ extern "C" { data_make->setting_make.parameter.array[0].value.array[0].used = 0; for (f_array_length_t j = 1; j < settings.contents.array[i].used; j++) { + function_name = "fl_string_dynamic_partial_append_nulless"; *status = fl_string_dynamic_partial_append_nulless(data_make->buffer, settings.contents.array[i].array[j], &data_make->setting_make.parameter.array[0].value.array[0]); @@ -699,9 +703,9 @@ extern "C" { fprintf(data.error.to.stream, "%c", f_string_eol[0]); fl_color_print(data.error.to.stream, data.context.set.error, "ERROR: Invalid characters in the define setting name '"); - fl_color_print_code(data.error.to.stream, data.context.notable); + fl_color_print_code(data.error.to.stream, *data.error.notable.before); f_print_dynamic(data.error.to.stream, define.array[i].name); - fl_color_print_code(data.error.to.stream, data.context.reset); + fl_color_print_code(data.error.to.stream, *data.error.notable.after); fl_color_print(data.error.to.stream, data.context.set.error, "', only alpha-numeric ASCII characters and underscore (without a leading digit) is %c", f_string_eol[0]); } @@ -1015,13 +1019,13 @@ extern "C" { #ifndef _di_fake_make_operate_ f_return_status fake_make_operate(const fake_data_t data) { - if (fake_signal_received(*data)) { + if (fake_signal_received(data)) { return F_signal; } - if (data->error.verbosity != f_console_verbosity_quiet) { - fprintf(data->output.stream, "%c", f_string_eol[0]); - fl_color_print(data->output.stream, data->context.set.important, "Making project.%c", f_string_eol[0]); + if (data.error.verbosity != f_console_verbosity_quiet) { + fprintf(data.output.stream, "%c", f_string_eol[0]); + fl_color_print(data.output.stream, data.context.set.important, "Making project.%c", f_string_eol[0]); } f_status_t status = F_none; @@ -1033,11 +1037,11 @@ extern "C" { f_macro_string_dynamics_new(status, data_make.path.stack, f_memory_default_allocation_step); if (F_status_is_error(status)) { - fll_error_print(data->error, F_status_set_fine(status), "f_macro_string_dynamics_new", F_true); + fll_error_print(data.error, F_status_set_fine(status), "f_macro_string_dynamics_new", F_true); return status; } - if (fake_signal_received(*data)) { + if (fake_signal_received(data)) { fake_macro_make_data_t_delete_simple(data_make); return F_signal; } @@ -1045,7 +1049,7 @@ extern "C" { status = f_path_current(F_true, &data_make.path.stack.array[0]); if (F_status_is_error(status)) { - fll_error_print(data->error, F_status_set_fine(status), "f_path_current", F_true); + fll_error_print(data.error, F_status_set_fine(status), "f_path_current", F_true); fake_macro_make_data_t_delete_simple(data_make); return status; @@ -1054,7 +1058,7 @@ extern "C" { status = f_directory_open(data_make.path.stack.array[0].string, F_false, &data_make.path.top); if (F_status_is_error(status)) { - fll_error_print(data->error, F_status_set_fine(status), "f_directory_open", F_true); + fll_error_print(data.error, F_status_set_fine(status), "f_directory_open", F_true); fake_macro_make_data_t_delete_simple(data_make); return status; @@ -1062,11 +1066,11 @@ extern "C" { data_make.path.stack.used = 1; - f_macro_mode_t_set_default_umask(mode, data->umask); + f_macro_mode_t_set_default_umask(mode, data.umask); - fake_make_load_parameters(*data, &data_make, &status); + fake_make_load_parameters(data, &data_make, &status); - fake_make_load_fakefile(*data, &data_make, &status); + fake_make_load_fakefile(data, &data_make, &status); if (F_status_is_error(status)) { fake_macro_make_data_t_delete_simple(data_make); @@ -1080,14 +1084,16 @@ extern "C" { } if (data_make.setting_make.fail == fake_make_operation_fail_type_exit) { - data_make.error.prefix = fake_make_print_error; - data_make.error.context = data_make.context.set.error; + data_make.error.prefix = fll_error_print_error; + data_make.error.context = data.context.set.error; + data_make.error.notable = data.context.set.notable; data_make.error.to.stream = f_type_error; data_make.error.to.id = f_type_descriptor_error; } else if (data_make.setting_make.fail == fake_make_operation_fail_type_warn) { - data_make.error.prefix = fake_make_print_warning; - data_make.error.context = data_make.context.set.warning; + data_make.error.prefix = fll_error_print_warning; + data_make.error.context = data.context.set.warning; + data_make.error.notable = data.context.set.notable; data_make.error.to.stream = f_type_warning; data_make.error.to.id = f_type_descriptor_warning; } @@ -1096,7 +1102,7 @@ extern "C" { data_make.error.to.id = -1; } - fake_make_operate_section(*data, data_make.main, &data_make, §ion_stack, &status); + fake_make_operate_section(data, data_make.main, &data_make, §ion_stack, &status); if (data_make.path.current > 0) { f_file_close(&data_make.path.current); @@ -1105,13 +1111,13 @@ extern "C" { { f_status_t status_path = f_path_change_at(data_make.path.top); - if (F_status_is_error(status_path) && data->error.verbosity == f_console_verbosity_verbose) { - fprintf(data->output.stream, "%c", f_string_eol[0]); - fl_color_print(data->output.stream, data->context.set.warning, "WARNING: Failed change back to orignal path '"); - fl_color_print(data->output.stream, data->context.set.notable, "%s", data_make.path.stack.array[0].string); - fl_color_print(data->output.stream, data->context.set.warning, "', status code = "); - fl_color_print(data->output.stream, data->context.set.notable, "%llu", F_status_set_fine(status_path)); - fl_color_print(data->output.stream, data->context.set.warning, ".%c", f_string_eol[0]); + if (F_status_is_error(status_path) && data.error.verbosity == f_console_verbosity_verbose) { + fprintf(data.output.stream, "%c", f_string_eol[0]); + fl_color_print(data.output.stream, data.context.set.warning, "WARNING: Failed change back to orignal path '"); + fl_color_print(data.output.stream, data.context.set.notable, "%s", data_make.path.stack.array[0].string); + fl_color_print(data.output.stream, data.context.set.warning, "', status code = "); + fl_color_print(data.output.stream, data.context.set.notable, "%llu", F_status_set_fine(status_path)); + fl_color_print(data.output.stream, data.context.set.warning, ".%c", f_string_eol[0]); } } @@ -1139,7 +1145,7 @@ extern "C" { *status = fl_string_dynamics_size_increase(content.used, arguments); if (F_status_is_error(*status) || *status == F_string_too_large) { - fake_print_message(data, F_status_set_fine(*status), "fl_string_dynamics_size_increase", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_dynamics_size_increase", F_true); return; } } @@ -1225,7 +1231,7 @@ extern "C" { *status = fl_iki_read(&data_make->buffer, &range, &iki_variable, &iki_vocabulary, &iki_content); if (F_status_is_error(*status)) { - fake_print_message(data, F_status_set_fine(*status), "fl_iki_read", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "fl_iki_read", F_true); break; } @@ -1233,7 +1239,7 @@ extern "C" { *status = fl_string_dynamics_size_increase(f_memory_default_allocation_step, arguments); if (F_status_is_error(*status)) { - fake_print_message(data, F_status_set_fine(*status), "fl_string_lengths_size_increase", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_lengths_size_increase", F_true); return; } } @@ -1246,7 +1252,7 @@ extern "C" { *status = fl_string_dynamic_partial_append_nulless(data_make->buffer, range, &arguments->array[arguments->used]); if (F_status_is_error(*status)) { - fake_print_message(data, F_status_set_fine(*status), "fl_string_dynamic_partial_append_nulless", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_dynamic_partial_append_nulless", F_true); break; } } @@ -1262,7 +1268,7 @@ extern "C" { *status = fl_string_dynamic_partial_append_nulless(data_make->buffer, range, &arguments->array[arguments->used]); if (F_status_is_error(*status)) { - fake_print_message(data, F_status_set_fine(*status), "fl_string_dynamic_partial_append_nulless", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_dynamic_partial_append_nulless", F_true); break; } } @@ -1281,7 +1287,7 @@ extern "C" { } if (F_status_is_error(*status)) { - fake_print_message(data, F_status_set_fine(*status), "fl_string_dynamic_partial_compare", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_dynamic_partial_compare", F_true); break; } @@ -1295,7 +1301,7 @@ extern "C" { *status = fl_string_dynamic_append(data_make->setting_make.parameter.array[0].value.array[0], &arguments->array[arguments->used]); if (F_status_is_error(*status)) { - fake_print_message(data, F_status_set_fine(*status), "fl_string_dynamic_append", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_dynamic_append", F_true); break; } } @@ -1303,7 +1309,7 @@ extern "C" { *status = fl_string_append("0", 1, &arguments->array[arguments->used]); if (F_status_is_error(*status)) { - fake_print_message(data, F_status_set_fine(*status), "fl_string_append", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_append", F_true); break; } } @@ -1319,7 +1325,7 @@ extern "C" { *status = fl_string_dynamics_size_increase(f_memory_default_allocation_step, arguments); if (F_status_is_error(*status)) { - fake_print_message(data, F_status_set_fine(*status), "fl_string_dynamics_size_increase", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_dynamics_size_increase", F_true); return; } } @@ -1330,7 +1336,7 @@ extern "C" { *status = fl_string_append(" ", 1, &arguments->array[arguments->used]); if (F_status_is_error(*status)) { - fake_print_message(data, F_status_set_fine(*status), "fl_string_append", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_append", F_true); break; } } @@ -1338,7 +1344,7 @@ extern "C" { *status = fl_string_dynamic_append(reserved_value[k]->array[l], &arguments->array[arguments->used]); if (F_status_is_error(*status)) { - fake_print_message(data, F_status_set_fine(*status), "fl_string_dynamic_append", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_dynamic_append", F_true); break; } } // for @@ -1371,7 +1377,7 @@ extern "C" { *status = fl_string_append(" ", 1, &arguments->array[arguments->used]); if (F_status_is_error(*status)) { - fake_print_message(data, F_status_set_fine(*status), "fl_string_append", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_append", F_true); break; } } @@ -1379,7 +1385,7 @@ extern "C" { *status = fl_string_dynamic_append_nulless(parameter->array[k].value.array[l], &arguments->array[arguments->used]); if (F_status_is_error(*status)) { - fake_print_message(data, F_status_set_fine(*status), "fl_string_dynamic_append_nulless", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_dynamic_append_nulless", F_true); break; } } // for @@ -1389,7 +1395,7 @@ extern "C" { *status = fl_string_dynamics_size_increase(f_memory_default_allocation_step, arguments); if (F_status_is_error(*status)) { - fake_print_message(data, F_status_set_fine(*status), "fl_string_dynamics_size_increase", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_dynamics_size_increase", F_true); break; } } @@ -1399,14 +1405,14 @@ extern "C" { *status = fl_string_dynamic_append_nulless(parameter->array[k].value.array[l], &arguments->array[arguments->used]); if (F_status_is_error(*status)) { - fake_print_message(data, F_status_set_fine(*status), "fl_string_dynamic_append_nulless", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_dynamic_append_nulless", F_true); break; } *status = fl_string_dynamic_terminate_after(&arguments->array[arguments->used]); if (F_status_is_error(*status)) { - fake_print_message(data, F_status_set_fine(*status), "fl_string_terminate_after", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_terminate_after", F_true); break; } @@ -1418,7 +1424,7 @@ extern "C" { break; } else if (F_status_is_error(*status)) { - fake_print_message(data, F_status_set_fine(*status), "fl_string_dynamic_compare", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_dynamic_compare", F_true); break; } } // for @@ -1430,7 +1436,7 @@ extern "C" { *status = fake_make_operate_expand_build(data, quoteds.array[i], iki_content.array[j], data_make, arguments); if (F_status_is_error(*status)) { - fake_print_message(data, F_status_set_fine(*status), "fake_make_operate_expand_build", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "fake_make_operate_expand_build", F_true); break; } } @@ -1439,7 +1445,7 @@ extern "C" { *status = fake_make_operate_expand_environment(data, quoteds.array[i], iki_content.array[j], data_make, arguments); if (F_status_is_error(*status)) { - fake_print_message(data, F_status_set_fine(*status), "fake_make_operate_expand_environment", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "fake_make_operate_expand_environment", F_true); break; } } @@ -1462,15 +1468,16 @@ extern "C" { if (F_status_is_error_not(*status)) { *status = fl_string_dynamic_terminate_after(&arguments->array[arguments->used - 1]); + if (F_status_is_error(*status)) { - fake_print_message(data, F_status_set_fine(*status), "fl_string_terminate_after", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_terminate_after", F_true); break; } } } if (F_status_is_error(*status)) { - fake_print_message(data, F_status_set_fine(*status), "fl_string_dynamic_partial_append_nulless", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_dynamic_partial_append_nulless", F_true); break; } } @@ -1479,7 +1486,7 @@ extern "C" { *status = fl_string_dynamic_partial_append_nulless(data_make->buffer, content.array[i], &arguments->array[arguments->used]); if (F_status_is_error(*status)) { - fake_print_message(data, F_status_set_fine(*status), "fl_string_append_nulless", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_append_nulless", F_true); break; } } @@ -1489,7 +1496,7 @@ extern "C" { *status = fl_string_dynamic_terminate_after(&arguments->array[arguments->used]); if (F_status_is_error(*status)) { - fake_print_message(data, F_status_set_fine(*status), "fl_string_terminate_after", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_terminate_after", F_true); break; } @@ -1531,6 +1538,7 @@ extern "C" { }; for (uint8_t i = 0; i < 2; i++) { + status = fl_string_dynamic_partial_compare_string(uint8_name[i], data_make->buffer, uint8_length[i], range_name); if (status == F_equal_to) { @@ -1574,6 +1582,7 @@ extern "C" { }; for (uint8_t i = 0; i < 7; i++) { + status = fl_string_dynamic_partial_compare_string(bool_name[i], data_make->buffer, bool_length[i], range_name); if (status == F_equal_to) { @@ -1653,6 +1662,7 @@ extern "C" { }; for (uint8_t i = 0; i < 17; i++) { + status = fl_string_dynamic_partial_compare_string(dynamic_name[i], data_make->buffer, dynamic_length[i], range_name); if (status == F_equal_to) { @@ -1726,13 +1736,16 @@ extern "C" { }; for (uint8_t i = 0; i < 17; i++) { + status = fl_string_dynamic_partial_compare_string(dynamics_name[i], data_make->buffer, dynamics_length[i], range_name); if (status == F_equal_to) { unmatched = F_false; for (f_array_length_t j = 0; j < dynamics_value[i].used; j++) { + status = fl_string_dynamic_mash(" ", 1, dynamics_value[i].array[j], &value); + if (F_status_is_error(status)) { break; } @@ -1850,7 +1863,7 @@ extern "C" { if (id_section > data_make->fakefile.used) { *status = F_status_set_error(F_parameter); - fake_print_message(data, F_parameter, "fake_make_operate_section", F_true, data_make->error); + fll_error_print(data_make->error, F_parameter, "fake_make_operate_section", F_true); return; } @@ -1859,7 +1872,7 @@ extern "C" { *status = fl_string_lengths_size_increase(f_memory_default_allocation_step, section_stack); if (F_status_is_error(*status)) { - fake_print_message(data, F_status_set_fine(*status), "fl_string_lengths_size_increase", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_lengths_size_increase", F_true); return; } } @@ -1875,9 +1888,9 @@ extern "C" { fl_color_print(data.output.stream, data.context.set.important, "Processing Section '"); - fl_color_print_code(f_type_output, data.context.notable); - f_print_dynamic_partial(f_type_output, data_make->buffer, section->name); - fl_color_print_code(f_type_output, data.context.reset); + fl_color_print_code(data.output.stream, *data.context.set.notable.before); + f_print_dynamic_partial(data.output.stream, data_make->buffer, section->name); + fl_color_print_code(data.output.stream, *data.context.set.notable.after); fl_color_print(data.output.stream, data.context.set.important, "'.%c", f_string_eol[0]); } @@ -2024,13 +2037,13 @@ extern "C" { } // for if (!operation) { - fake_print_message_section_operation_unknown(data, data_make->buffer, section->name, section->objects.array[i], data_make->error); + fake_print_message_section_operation_unknown(data, data_make->error, data_make->buffer, section->name, section->objects.array[i]); *status = F_status_set_error(F_invalid); } else if (operation == fake_make_operation_type_operate) { if (section_stack->used == fake_make_section_stack_max) { - fake_print_message_section_operation_stack_max(data, data_make->buffer, section->name, section->objects.array[i], fake_make_section_stack_max, data_make->error); + fake_print_message_section_operation_stack_max(data, data_make->error, data_make->buffer, section->name, section->objects.array[i], fake_make_section_stack_max); *status = F_status_set_error(F_recurse); } @@ -2128,12 +2141,14 @@ extern "C" { // break acts identical to fail when at the top of the stack. if (F_status_set_fine(*status) == F_signal_abort && !section_stack->used) { data_make->setting_make.fail = fake_make_operation_fail_type_exit; - data_make->error.prefix = fake_make_print_error; + data_make->error.prefix = fll_error_print_error; data_make->error.context = data.context.set.error; - data_make->error.to = f_type_error; + data_make->error.notable = data.context.set.notable; + data_make->error.to.stream = f_type_error; + data_make->error.to.id = f_type_descriptor_error; } - fake_print_message_section_operation_failed(data, data_make->buffer, section->name, section->objects.array[i], data_make->error); + fake_print_message_section_operation_failed(data, data_make->error, data_make->buffer, section->name, section->objects.array[i]); // F_signal_abort is used by the break section operation. if (F_status_set_fine(*status) == F_signal_abort) { @@ -2195,13 +2210,13 @@ extern "C" { type_name = fake_make_operation_else; } - fprintf(data.error.to.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Incomplete '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", type_name); - fl_color_print(data.error.to.stream, data_make->error.context, "' at end of section.%c", f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sIncomplete '", data_make->error.prefix); + fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", type_name); + fl_color_print(data_make->error.to.stream, data_make->error.context, "' at end of section.%c", f_string_eol[0]); } - fake_print_message_section_operation_failed(data, data_make->buffer, section->name, section->objects.array[section->objects.used - 1], data_make->error); + fake_print_message_section_operation_failed(data, data_make->error, data_make->buffer, section->name, section->objects.array[section->objects.used - 1]); *status = F_status_set_error(F_failure); } @@ -2226,7 +2241,7 @@ extern "C" { int return_code = fake_execute(data, data_make->environment, data_make->setting_build.build_indexer, arguments, status); if (F_status_is_error(*status)) { - fake_print_message(data, F_status_set_fine(*status), "fake_execute", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "fake_execute", F_true); } fake_make_operate_process_return(data, return_code, data_make, status); @@ -2247,7 +2262,9 @@ extern "C" { } if (data.error.verbosity == f_console_verbosity_verbose) { - fprintf(data.output.stream, "Breaking as '%s'.", arguments.used ? arguments.array[0].string : fake_make_operation_argument_success); + fprintf(data.output.stream, "Breaking as '"); + fl_color_print(data.output.stream, data.context.set.notable, "%s", arguments.used ? arguments.array[0].string : fake_make_operation_argument_success); + fprintf(data.output.stream, "'.%c", f_string_eol[0]); } return; @@ -2300,7 +2317,7 @@ extern "C" { f_string_length_t destination_length = 0; if (data.error.verbosity == f_console_verbosity_verbose) { - recurse.output = f_type_descriptor_output; + recurse.output = data.output; recurse.verbose = fake_verbose_print_clone; } @@ -2311,7 +2328,7 @@ extern "C" { status_file = f_directory_is(arguments.array[total].string); if (F_status_is_error(status_file)) { - fake_print_message_file(data, F_status_set_fine(status_file), "f_directory_is", arguments.array[1].string, "identify", F_false, F_true, data_make->error); + fake_print_message_file(data, data_make->error, F_status_set_fine(status_file), "f_directory_is", arguments.array[1].string, "identify", F_false, F_true); *status = F_status_set_error(F_failure); return; } @@ -2345,7 +2362,7 @@ extern "C" { status_file = fl_directory_clone(arguments.array[i].string, destination, arguments.array[i].used, destination_length, F_true, recurse); if (F_status_is_error(status_file)) { - fake_print_message_file(data, F_status_set_fine(status_file), "fl_directory_clone", arguments.array[i].string, "clone", F_false, F_true, data_make->error); + fake_print_message_file(data, data_make->error, F_status_set_fine(status_file), "fl_directory_clone", arguments.array[i].string, "clone", F_false, F_true); *status = F_status_set_error(F_failure); } } @@ -2353,15 +2370,19 @@ extern "C" { status_file = f_file_clone(arguments.array[i].string, destination, F_true, recurse.size_block, recurse.exclusive); if (F_status_is_error(status_file)) { - 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->error); + fake_print_message_file(data, data_make->error, F_status_set_fine(status_file), "f_file_clone", arguments.array[i].string, "clone", F_false, F_true); *status = F_status_set_error(F_failure); } else if (data.error.verbosity == f_console_verbosity_verbose) { - fprintf(data.output.stream, "Cloned '%s' to '%s'.%c", arguments.array[i].string, destination, f_string_eol[0]); + fprintf(data.output.stream, "Cloned '"); + fl_color_print(data.output.stream, data.context.set.notable, "%s", arguments.array[i].string); + fprintf(data.output.stream, "' to '"); + fl_color_print(data.output.stream, data.context.set.notable, "%s", destination); + fprintf(data.output.stream, "'.%c", f_string_eol[0]); } } else if (F_status_is_error(status_file)) { - fake_print_message_file(data, F_status_set_fine(status_file), "f_directory_is", arguments.array[i].string, "identify", F_false, F_true, data_make->error); + fake_print_message_file(data, data_make->error, F_status_set_fine(status_file), "f_directory_is", arguments.array[i].string, "identify", F_false, F_true); *status = F_status_set_error(F_failure); break; } @@ -2374,7 +2395,7 @@ extern "C" { int return_code = fake_execute(data, data_make->environment, data_make->setting_build.build_compiler, arguments, status); if (F_status_is_error(*status)) { - fake_print_message(data, F_status_set_fine(*status), "fake_execute", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "fake_execute", F_true); } fake_make_operate_process_return(data, return_code, data_make, status); @@ -2395,7 +2416,7 @@ extern "C" { f_macro_mode_t_set_default_umask(mode, data.umask); if (data.error.verbosity == f_console_verbosity_verbose) { - recurse.output = f_type_descriptor_output; + recurse.output = data.output; recurse.verbose = fake_verbose_print_copy; } @@ -2406,7 +2427,7 @@ extern "C" { status_file = f_directory_is(arguments.array[total].string); if (F_status_is_error(status_file)) { - fake_print_message_file(data, F_status_set_fine(status_file), "f_directory_is", arguments.array[1].string, "identify", F_false, F_true, data_make->error); + fake_print_message_file(data, data_make->error, F_status_set_fine(status_file), "f_directory_is", arguments.array[1].string, "identify", F_false, F_true); *status = F_status_set_error(F_failure); return; } @@ -2440,7 +2461,7 @@ extern "C" { status_file = fl_directory_copy(arguments.array[i].string, destination, arguments.array[i].used, destination_length, mode, recurse); if (F_status_is_error(status_file)) { - fake_print_message_file(data, F_status_set_fine(status_file), "fl_directory_copy", arguments.array[i].string, "copy", F_false, F_true, data_make->error); + fake_print_message_file(data, data_make->error, F_status_set_fine(status_file), "fl_directory_copy", arguments.array[i].string, "copy", F_false, F_true); *status = F_status_set_error(F_failure); } } @@ -2448,15 +2469,19 @@ extern "C" { status_file = f_file_copy(arguments.array[i].string, destination, mode, recurse.size_block, recurse.exclusive); if (F_status_is_error(status_file)) { - 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->error); + fake_print_message_file(data, data_make->error, F_status_set_fine(status_file), "f_file_copy", arguments.array[i].string, "copy", F_false, F_true); *status = F_status_set_error(F_failure); } else if (data.error.verbosity == f_console_verbosity_verbose) { - fprintf(data.output.stream, "Copied '%s' to '%s'.%c", arguments.array[i].string, destination, f_string_eol[0]); + fprintf(data.output.stream, "Copied '"); + fl_color_print(data.output.stream, data.context.set.notable, "%s", arguments.array[i].string); + fprintf(data.output.stream, "' to '"); + fl_color_print(data.output.stream, data.context.set.notable, "%s", destination); + fprintf(data.output.stream, "'.%c", f_string_eol[0]); } } else if (F_status_is_error(status_file)) { - fake_print_message_file(data, F_status_set_fine(status_file), "f_directory_is", arguments.array[i].string, "identify", F_false, F_true, data_make->error); + fake_print_message_file(data, data_make->error, F_status_set_fine(status_file), "f_directory_is", arguments.array[i].string, "identify", F_false, F_true); *status = F_status_set_error(F_failure); break; } @@ -2475,10 +2500,12 @@ extern "C" { } if (F_status_is_error(*status)) { - fake_print_message(data, F_status_set_fine(*status), "f_environment_set", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "f_environment_set", F_true); } else if (data.error.verbosity == f_console_verbosity_verbose) { - fprintf(data.output.stream, "Defined environment variable '%s'.%c", arguments.array[0].string, f_string_eol[0]); + fprintf(data.output.stream, "Defined environment variable '"); + fl_color_print(data.output.stream, data.context.set.notable, "%s", arguments.array[0].string); + fprintf(data.output.stream, "'.%c", f_string_eol[0]); } return; @@ -2505,7 +2532,7 @@ extern "C" { *status = F_none; } else { - fake_print_message_file(data, F_status_set_fine(*status), "f_file_stat", arguments.array[i].string, "delete", F_true, F_true, data_make->error); + fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_stat", F_true, arguments.array[i].string, "delete", fll_error_file_type_file); return; } } @@ -2519,29 +2546,45 @@ extern "C" { if (F_status_set_fine(*status) == F_file_found_not) { if (data.error.verbosity == f_console_verbosity_verbose) { - fprintf(data.output.stream, "The directory '%s' does not exist.%c", arguments.array[i].string, f_string_eol[0]); + fprintf(data.output.stream, "The directory '"); + fl_color_print(data.output.stream, data.context.set.notable, "%s", arguments.array[i].string); + fprintf(data.output.stream, "' does not exist.%c", f_string_eol[0]); } *status = F_none; } if (F_status_is_error(*status)) { - fake_print_message_file(data, F_status_set_fine(*status), "f_directory_remove", arguments.array[i].string, "delete", F_false, F_true, data_make->error); + fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_directory_remove", F_true, arguments.array[i].string, "delete", fll_error_file_type_directory); return; } else if (data.error.verbosity == f_console_verbosity_verbose) { - fprintf(data.output.stream, "Removed '%s'.%c", arguments.array[i].string, f_string_eol[0]); + fprintf(data.output.stream, "Removed '"); + fl_color_print(data.output.stream, data.context.set.notable, "%s", arguments.array[i].string); + fprintf(data.output.stream, "'.%c", f_string_eol[0]); } } else { *status = f_file_remove(arguments.array[i].string); + if (F_status_set_fine(*status) == F_file_found_not) { + if (data.error.verbosity == f_console_verbosity_verbose) { + fprintf(data.output.stream, "The file '"); + fl_color_print(data.output.stream, data.context.set.notable, "%s", arguments.array[i].string); + fprintf(data.output.stream, "' does not exist.%c", f_string_eol[0]); + } + + *status = F_none; + } + if (F_status_is_error(*status)) { - fake_print_message_file(data, F_status_set_fine(*status), "f_file_remove", arguments.array[i].string, "delete", F_true, F_true, data_make->error); + fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_remove", F_true, arguments.array[i].string, "delete", fll_error_file_type_file); return; } else if (data.error.verbosity == f_console_verbosity_verbose) { - fprintf(data.output.stream, "Removed '%s'.%c", arguments.array[i].string, f_string_eol[0]); + fprintf(data.output.stream, "Removed '"); + fl_color_print(data.output.stream, data.context.set.notable, "%s", arguments.array[i].string); + fprintf(data.output.stream, "'.%c", f_string_eol[0]); } } } // for @@ -2571,16 +2614,20 @@ extern "C" { // forcing exit forces fail mode. data_make->setting_make.fail = fake_make_operation_fail_type_exit; - data_make->error.prefix = fake_make_print_error; + data_make->error.prefix = fll_error_print_error; data_make->error.context = data.context.set.error; - data_make->error.to = f_type_error; + data_make->error.notable = data.context.set.notable; + data_make->error.to.stream = f_type_error; + data_make->error.to.id = f_type_descriptor_error; } else { return; } if (data.error.verbosity == f_console_verbosity_verbose) { - fprintf(data.output.stream, "Exiting as '%s'.", arguments.used ? arguments.array[0].string : fake_make_operation_argument_success); + fprintf(data.output.stream, "Exiting as '"); + fl_color_print(data.output.stream, data.context.set.notable, "%s", arguments.used ? arguments.array[0].string : fake_make_operation_argument_success); + fprintf(data.output.stream, "'.%c", f_string_eol[0]); } return; @@ -2590,32 +2637,37 @@ extern "C" { if (fl_string_dynamic_compare_string(fake_make_operation_argument_exit, arguments.array[0], fake_make_operation_argument_exit_length) == F_equal_to) { data_make->setting_make.fail = fake_make_operation_fail_type_exit; - data_make->error.prefix = fake_make_print_error; + data_make->error.prefix = fll_error_print_error; data_make->error.context = data.context.set.error; - data_make->error.to = f_type_error; + data_make->error.notable = data.context.set.notable; + data_make->error.to.stream = f_type_error; + data_make->error.to.id = f_type_descriptor_error; } else if (fl_string_dynamic_compare_string(fake_make_operation_argument_warn, arguments.array[0], fake_make_operation_argument_warn_length) == F_equal_to) { data_make->setting_make.fail = fake_make_operation_fail_type_warn; - data_make->error.prefix = fake_make_print_warning; + data_make->error.prefix = fll_error_print_warning; data_make->error.context = data.context.set.warning; - data_make->error.to = f_type_warning; + data_make->error.notable = data.context.set.notable; + data_make->error.to.stream = f_type_warning; + data_make->error.to.id = f_type_descriptor_warning; } else if (fl_string_dynamic_compare_string(fake_make_operation_argument_ignore, arguments.array[0], fake_make_operation_argument_ignore_length) == F_equal_to) { data_make->setting_make.fail = fake_make_operation_fail_type_ignore; - data_make->error.to = 0; + data_make->error.to.stream = 0; + data_make->error.to.id = -1; } if (data.error.verbosity == f_console_verbosity_verbose) { fprintf(data.output.stream, "Set failure state to '"); if (data_make->setting_make.fail == fake_make_operation_fail_type_exit) { - printf(fake_make_operation_argument_exit); + fl_color_print(data.output.stream, data.context.set.notable, "%s", fake_make_operation_argument_exit); } else if (data_make->setting_make.fail == fake_make_operation_fail_type_warn) { - printf(fake_make_operation_argument_warn); + fl_color_print(data.output.stream, data.context.set.notable, "%s", fake_make_operation_argument_warn); } else if (data_make->setting_make.fail == fake_make_operation_fail_type_ignore) { - printf(fake_make_operation_argument_ignore); + fl_color_print(data.output.stream, data.context.set.notable, "%s", fake_make_operation_argument_ignore); } fprintf(data.output.stream, "'.%c", f_string_eol[0]); @@ -2633,12 +2685,13 @@ extern "C" { f_status_t status_file = F_none; for (f_array_length_t i = 1; i < arguments.used; i++) { + status_file = fake_make_assure_inside_project(data, arguments.array[i], data_make); if (F_status_is_error(status_file)) { *status = status_file; - fake_print_message_section_operation_path_outside(data, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string, data_make->error); + fake_print_message_section_operation_path_outside(data, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string); continue; } @@ -2648,10 +2701,14 @@ extern "C" { if (F_status_is_error(status_file)) { *status = status_file; - fake_print_message_file(data, *status, "f_file_role_change", arguments.array[i].string, "change group of", F_true, F_true, data_make->error); + fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_role_change", F_true, arguments.array[i].string, "change group of", fll_error_file_type_file); } else if (data.error.verbosity == f_console_verbosity_verbose) { - fprintf(data.output.stream, "Changed group of '%s' to %llu.%c", arguments.array[i].string, id, f_string_eol[0]); + fprintf(data.output.stream, "Changed group of '"); + fl_color_print(data.output.stream, data.context.set.notable, "%s", arguments.array[i].string); + fprintf(data.output.stream, "' to "); + fl_color_print(data.output.stream, data.context.set.notable, "%llu", id); + fprintf(data.output.stream, ".%c", f_string_eol[0]); } } // for @@ -2673,7 +2730,7 @@ extern "C" { if (F_status_is_error(status_file)) { *status = status_file; - fake_print_message_section_operation_path_outside(data, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string, data_make->error); + fake_print_message_section_operation_path_outside(data, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string); continue; } @@ -2683,10 +2740,14 @@ extern "C" { if (F_status_is_error(status_file)) { *status = status_file; - 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->error); + fll_error_file_print(data_make->error, F_status_set_fine(*status), "fll_file_role_change_all", F_true, arguments.array[i].string, "change group of", fll_error_file_type_file); } else if (data.error.verbosity == f_console_verbosity_verbose) { - fprintf(data.output.stream, "Changed group of '%s' to %llu.%c", arguments.array[i].string, id, f_string_eol[0]); + fprintf(data.output.stream, "Changed group of '"); + fl_color_print(data.output.stream, data.context.set.notable, "%s", arguments.array[i].string); + fprintf(data.output.stream, "' to "); + fl_color_print(data.output.stream, data.context.set.notable, "%llu", id); + fprintf(data.output.stream, ".%c", f_string_eol[0]); } } // for @@ -2732,7 +2793,7 @@ extern "C" { *status = f_file_group_read(arguments.array[i].string, &id_file); if (F_status_is_error(*status)) { *operation_if = fake_make_operation_if_type_false_always_next; - fake_print_message_file(data, F_status_set_fine(*status), "f_file_group_read", arguments.array[i].string, "get group of", F_true, F_true, data_make->error); + fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_group_read", F_true, arguments.array[i].string, "get group of", fll_error_file_type_file); break; } @@ -2769,7 +2830,7 @@ extern "C" { if (F_status_is_error(*status)) { *operation_if = fake_make_operation_if_type_false_always_next; - fake_print_message(data, F_status_set_fine(*status), "f_file_mode_to_mode", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "f_file_mode_to_mode", F_true); return; } } @@ -2784,7 +2845,7 @@ extern "C" { if (F_status_is_error(*status)) { *operation_if = fake_make_operation_if_type_false_always_next; - fake_print_message_file(data, F_status_set_fine(*status), "f_file_mode_read", arguments.array[i].string, "get mode of", F_true, F_true, data_make->error); + fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_mode_read", F_true, arguments.array[i].string, "get mode of", fll_error_file_type_file); break; } @@ -2818,9 +2879,10 @@ extern "C" { for (f_array_length_t i = 2; i < arguments.used; i++, id_file = 0) { *status = f_file_owner_read(arguments.array[i].string, &id_file); + if (F_status_is_error(*status)) { *operation_if = fake_make_operation_if_type_false_always_next; - fake_print_message_file(data, F_status_set_fine(*status), "f_file_owner_read", arguments.array[i].string, "get owner of", F_true, F_true, data_make->error); + fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_owner_read", F_true, arguments.array[i].string, "get owner of", fll_error_file_type_file); break; } @@ -2881,9 +2943,10 @@ extern "C" { for (; i < arguments.used; i++, mode_file = 0) { *status = f_file_mode_read(arguments.array[i].string, &mode_file); + if (F_status_is_error(*status)) { *operation_if = fake_make_operation_if_type_false_always_next; - fake_print_message_file(data, F_status_set_fine(*status), "f_file_mode_read", arguments.array[i].string, "get mode of", F_true, F_true, data_make->error); + fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_mode_read", F_true, arguments.array[i].string, "get mode of", fll_error_file_type_file); break; } @@ -2924,9 +2987,10 @@ extern "C" { for (f_array_length_t i = 1; i < arguments.used; i++) { *status = f_file_exists(arguments.array[i].string); + if (F_status_is_error(*status)) { *operation_if = fake_make_operation_if_type_false_always_next; - fake_print_message_file(data, F_status_set_fine(*status), "f_file_exists", arguments.array[i].string, "find", F_true, F_true, data_make->error); + fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_exists", F_true, arguments.array[i].string, "find", fll_error_file_type_file); break; } @@ -3150,13 +3214,13 @@ extern "C" { fprintf(data.output.stream, "%c", f_string_eol[0]); if ((i == 1 && number_left > f_number_t_size_unsigned) || (i > 1 && number_right > f_number_t_size_unsigned)) { - fl_color_print(data.error.to.stream, data_make->error.context, "%s: The number '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%c%s", arguments.array[i].string); + fl_color_print(data.error.to.stream, data_make->error.context, "%sThe number '", data_make->error.prefix); + fl_color_print(data.error.to.stream, data_make->error.notable, "%c%s", arguments.array[i].string); fl_color_print(data.error.to.stream, data_make->error.context, "' may only be between the ranges -%llu to %llu.%c", f_number_t_size_unsigned, f_number_t_size_unsigned, f_string_eol[0]); } else { - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Invalid or unsupported number provided '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", arguments.array[i].string); + fl_color_print(data.error.to.stream, data_make->error.context, "%sInvalid or unsupported number provided '", data_make->error.prefix); + fl_color_print(data.error.to.stream, data_make->error.notable, "%s", arguments.array[i].string); fl_color_print(data.error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]); } } @@ -3172,10 +3236,14 @@ extern "C" { *status = f_file_link(arguments.array[0].string, arguments.array[1].string); 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->error); + fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_link", F_true, arguments.array[1].string, "create link", fll_error_file_type_file); } else if (data.error.verbosity == f_console_verbosity_verbose) { - fprintf(data.output.stream, "Created symbolic link from '%s' to '%s'.%c", arguments.array[1].string, arguments.array[0].string, f_string_eol[0]); + fprintf(data.output.stream, "Created symbolic link from '"); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s", arguments.array[1].string); + fprintf(data.output.stream, "' to '"); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s", arguments.array[0].string); + fprintf(data.output.stream, "'.%c", f_string_eol[0]); } return; @@ -3197,26 +3265,30 @@ extern "C" { *status = f_file_mode_read(arguments.array[i].string, &mode_file); if (F_status_is_error(*status)) { - fake_print_message_file(data, F_status_set_fine(*status), "f_file_mode_read", arguments.array[i].string, "change mode of", F_true, F_true, data_make->error); + fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_mode_read", F_true, arguments.array[i].string, "change mode of", fll_error_file_type_file); break; } *status = f_file_mode_determine(mode_file, mode_rule, replace, f_macro_file_type_is_directory(mode_file), &mode); if (F_status_is_error(*status)) { - fake_print_message_file(data, F_status_set_fine(*status), "f_file_mode_determine", arguments.array[i].string, "change mode of", F_true, F_true, data_make->error); + fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_mode_determine", F_true, arguments.array[i].string, "change mode of", fll_error_file_type_file); break; } *status = f_file_mode_set(arguments.array[i].string, mode); if (F_status_is_error(*status)) { - fake_print_message_file(data, F_status_set_fine(*status), "f_file_mode_set", arguments.array[i].string, "change mode of", F_true, F_true, data_make->error); + fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_mode_set", F_true, arguments.array[i].string, "change mode of", fll_error_file_type_file); break; } if (data.error.verbosity == f_console_verbosity_verbose) { - fprintf(data.output.stream, "Changed mode of '%s' to %#o.%c", arguments.array[i].string, mode, f_string_eol[0]); + fprintf(data.output.stream, "Changed mode of '"); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s", arguments.array[i].string); + fprintf(data.output.stream, "' to "); + fl_color_print(data.error.to.stream, data.context.set.notable, "%#o", mode); + fprintf(data.output.stream, ".%c", f_string_eol[0]); } } // for @@ -3239,26 +3311,30 @@ extern "C" { *status = f_file_mode_read(arguments.array[i].string, &mode_file); if (F_status_is_error(*status)) { - fake_print_message_file(data, F_status_set_fine(*status), "f_file_mode_read", arguments.array[i].string, "change mode of", F_true, F_true, data_make->error); + fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_mode_read", F_true, arguments.array[i].string, "change mode of", fll_error_file_type_file); break; } *status = f_file_mode_determine(mode_file, mode_rule, replace, f_macro_file_type_is_directory(mode_file), &mode); if (F_status_is_error(*status)) { - fake_print_message_file(data, F_status_set_fine(*status), "f_file_mode_determine", arguments.array[i].string, "change mode of", F_true, F_true, data_make->error); + fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_mode_determine", F_true, arguments.array[i].string, "change mode of", fll_error_file_type_file); break; } *status = fll_file_mode_set_all(arguments.array[i].string, mode, fake_make_operation_recursion_depth_max); if (F_status_is_error(*status)) { - fake_print_message_file(data, F_status_set_fine(*status), "fll_file_mode_set_all", arguments.array[i].string, "change mode of", F_true, F_true, data_make->error); + fll_error_file_print(data_make->error, F_status_set_fine(*status), "fll_file_mode_set_all", F_true, arguments.array[i].string, "change mode of", fll_error_file_type_file); break; } if (data.error.verbosity == f_console_verbosity_verbose) { - fprintf(data.output.stream, "Changed mode of '%s' to %#o.%c", arguments.array[i].string, mode, f_string_eol[0]); + fprintf(data.output.stream, "Changed mode of '"); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s", arguments.array[i].string); + fprintf(data.output.stream, "' to "); + fl_color_print(data.error.to.stream, data.context.set.notable, "%#o", mode); + fprintf(data.output.stream, ".%c", f_string_eol[0]); } } // for @@ -3274,7 +3350,7 @@ extern "C" { f_string_length_t destination_length = 0; if (data.error.verbosity == f_console_verbosity_verbose) { - recurse.output = f_type_descriptor_output; + recurse.output = data.output; recurse.verbose = fake_verbose_print_move; } @@ -3285,7 +3361,8 @@ extern "C" { status_file = f_directory_is(arguments.array[total].string); if (F_status_is_error(status_file)) { - fake_print_message_file(data, F_status_set_fine(status_file), "f_directory_is", arguments.array[1].string, "identify", F_false, F_true, data_make->error); + fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_directory_is", F_true, arguments.array[1].string, "identify", fll_error_file_type_directory); + *status = F_status_set_error(F_failure); return; } @@ -3316,7 +3393,7 @@ extern "C" { status_file = fll_file_move(arguments.array[i].string, destination, arguments.array[i].used, destination_length, recurse); if (F_status_is_error(status_file)) { - fake_print_message_file(data, F_status_set_fine(status_file), "fll_file_move", arguments.array[i].string, "move", F_false, F_true, data_make->error); + fll_error_file_print(data_make->error, F_status_set_fine(*status), "fll_file_move", F_true, arguments.array[i].string, "move", fll_error_file_type_directory); *status = F_status_set_error(F_failure); } } // for @@ -3328,6 +3405,7 @@ extern "C" { f_array_length_t id_section = 0; for (; id_section < data_make->fakefile.used; id_section++) { + if (fl_string_dynamic_partial_compare_string(arguments.array[0].string, data_make->buffer, arguments.array[0].used, data_make->fakefile.array[id_section].name) == F_equal_to) { break; } @@ -3365,7 +3443,7 @@ extern "C" { if (F_status_is_error(status_file)) { *status = status_file; - fake_print_message_section_operation_path_outside(data, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string, data_make->error); + fake_print_message_section_operation_path_outside(data, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string); continue; } @@ -3375,11 +3453,15 @@ extern "C" { if (F_status_is_error(status_file)) { *status = status_file; - 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->error); + fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_role_change", F_true, arguments.array[i].string, "change owner of", fll_error_file_type_file); break; } else if (data.error.verbosity == f_console_verbosity_verbose) { - fprintf(data.output.stream, "Changed owner of '%s' to %d.%c", arguments.array[i].string, id, f_string_eol[0]); + fprintf(data.output.stream, "Changed owner of '"); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s", arguments.array[i].string); + fprintf(data.output.stream, "' to "); + fl_color_print(data.error.to.stream, data.context.set.notable, "%d", id); + fprintf(data.output.stream, ".%c", f_string_eol[0]); } } // for @@ -3401,7 +3483,7 @@ extern "C" { if (F_status_is_error(status_file)) { *status = status_file; - fake_print_message_section_operation_path_outside(data, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string, data_make->error); + fake_print_message_section_operation_path_outside(data, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string); continue; } @@ -3411,10 +3493,14 @@ extern "C" { if (F_status_is_error(status_file)) { *status = status_file; - 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->error); + fll_error_file_print(data_make->error, F_status_set_fine(*status), "fll_file_role_change_all", F_true, arguments.array[i].string, "change owner of", fll_error_file_type_file); } else if (data.error.verbosity == f_console_verbosity_verbose) { - fprintf(data.output.stream, "Changed owner of '%s' to %o.%c", arguments.array[i].string, id, f_string_eol[0]); + fprintf(data.output.stream, "Changed owner of '"); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s", arguments.array[i].string); + fprintf(data.output.stream, "' to "); + fl_color_print(data.error.to.stream, data.context.set.notable, "%d", id); + fprintf(data.output.stream, ".%c", f_string_eol[0]); } } // for @@ -3429,19 +3515,22 @@ extern "C" { *status = f_path_change(data_make->path.stack.array[data_make->path.stack.used - 1].string); if (F_status_is_error(*status)) { - fake_print_message_section_operation_path_stack_max(data, F_status_set_fine(*status), "f_path_change", data_make->path.stack.array[data_make->path.stack.used - 1].string, data_make->error); + fake_print_message_section_operation_path_stack_max(data, data_make->error, F_status_set_fine(*status), "f_path_change", data_make->path.stack.array[data_make->path.stack.used - 1].string); return; } if (data.error.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->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "fake_make_path_relative", F_true); return; } fprintf(data.output.stream, "Changed to project path '"); - f_print_dynamic(f_type_output, data_make->path_cache); + fl_color_print_code(data.output.stream, *data.context.set.notable.before); + f_print_dynamic(data.output.stream, data_make->path_cache); + fl_color_print_code(data.output.stream, *data.context.set.notable.after); fprintf(data.output.stream, "'.%c", f_string_eol[0]); } @@ -3490,11 +3579,10 @@ extern "C" { } if (operation == fake_make_operation_type_to) { - *status = fake_make_assure_inside_project(data, arguments.array[0], data_make); if (F_status_is_error(*status)) { - fake_print_message_section_operation_path_outside(data, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[0].string, data_make->error); + fake_print_message_section_operation_path_outside(data, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[0].string); if (F_status_set_fine(*status) == F_false) { *status = F_status_set_error(F_failure); @@ -3506,18 +3594,18 @@ extern "C" { *status = f_path_change(arguments.array[0].string); if (F_status_is_error(*status)) { - fake_print_message_section_operation_path_stack_max(data, F_status_set_fine(*status), "f_path_change", arguments.array[0].string, data_make->error); + fake_print_message_section_operation_path_stack_max(data, data_make->error, F_status_set_fine(*status), "f_path_change", arguments.array[0].string); } else { if (data_make->path.stack.used == data_make->path.stack.size) { *status = fl_string_dynamics_size_increase(f_memory_default_allocation_step, &data_make->path.stack); if (F_status_set_fine(*status) == F_buffer_too_large) { - fake_print_message_section_operation_path_stack_max(data, F_buffer_too_large, "fl_string_lengths_size_increase", "path stack", data_make->error); + fake_print_message_section_operation_path_stack_max(data, data_make->error, F_buffer_too_large, "fl_string_lengths_size_increase", "path stack"); return; } else if (F_status_is_error(*status)) { - fake_print_message(data, F_status_set_fine(*status), "f_macro_string_dynamics_resize", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "f_macro_string_dynamics_resize", F_true); return; } } @@ -3528,7 +3616,7 @@ extern "C" { fl_string_dynamic_append(data_make->path_cache, &data_make->path.stack.array[data_make->path.stack.used]); if (F_status_is_error(*status)) { - fake_print_message(data, F_status_set_fine(*status), "fl_string_dynamic_append_nulless", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_dynamic_append_nulless", F_true); return; } @@ -3536,12 +3624,14 @@ extern "C" { *status = fake_make_path_relative(data, data_make->path.stack.array[data_make->path.stack.used], 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->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "fake_make_path_relative", F_true); return; } fprintf(data.output.stream, "Changed to project path '"); - f_print_dynamic(f_type_output, data_make->path_cache); + fl_color_print_code(data.output.stream, *data.context.set.notable.before); + f_print_dynamic(data.output.stream, data_make->path_cache); + fl_color_print_code(data.output.stream, *data.context.set.notable.after); fprintf(data.output.stream, "'.%c", f_string_eol[0]); } @@ -3556,7 +3646,7 @@ extern "C" { *status = f_path_change_at(data_make->path.top); if (F_status_is_error(*status)) { - fake_print_message_section_operation_path_stack_max(data, F_status_set_fine(*status), "f_path_change", arguments.array[0].string, data_make->error); + fake_print_message_section_operation_path_stack_max(data, data_make->error, F_status_set_fine(*status), "f_path_change", arguments.array[0].string); return; } @@ -3585,10 +3675,10 @@ extern "C" { if (F_status_is_error(*status)) { if (F_status_is_error_not(fll_path_canonical(arguments.array[i].string, &data_make->path_cache))) { - fake_print_message_file(data, F_status_set_fine(*status), "f_file_touch", data_make->path_cache.string, "touch", F_true, F_true, data_make->error); + fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_touch", F_true, data_make->path_cache.string, "touch", fll_error_file_type_file); } else { - fake_print_message_file(data, F_status_set_fine(*status), "f_file_touch", arguments.array[i].string, "touch", F_true, F_true, data_make->error); + fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_touch", F_true, arguments.array[i].string, "touch", fll_error_file_type_file); } break; @@ -3599,10 +3689,10 @@ extern "C" { if (F_status_is_error(*status)) { if (F_status_is_error_not(fll_path_canonical(arguments.array[i].string, &data_make->path_cache))) { - fake_print_message_file(data, F_status_set_fine(*status), "f_directory_touch", data_make->path_cache.string, "touch", F_false, F_true, data_make->error); + fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_directory_touch", F_true, data_make->path_cache.string, "touch", fll_error_file_type_directory); } else { - fake_print_message_file(data, F_status_set_fine(*status), "f_directory_touch", arguments.array[i].string, "touch", F_false, F_true, data_make->error); + fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_directory_touch", F_true, arguments.array[i].string, "touch", fll_error_file_type_directory); } break; @@ -3611,7 +3701,9 @@ extern "C" { if (data.error.verbosity == f_console_verbosity_verbose) { fprintf(data.output.stream, "Touched %s '", arguments.array[0].string); - f_print_dynamic(f_type_output, arguments.array[i]); + fl_color_print_code(data.output.stream, *data.context.set.notable.before); + f_print_dynamic(data.output.stream, arguments.array[i]); + fl_color_print_code(data.output.stream, *data.context.set.notable.after); fprintf(data.output.stream, "'.%c", f_string_eol[0]); } @@ -3652,7 +3744,7 @@ extern "C" { } if (F_status_is_error(status)) { - fake_print_message(data, F_status_set_fine(status), "f_macro_string_dynamics_resize", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(status), "f_macro_string_dynamics_resize", F_true); return status; } } @@ -3660,7 +3752,7 @@ extern "C" { status = f_environment_get(data_make->setting_build.environment.array[i].string, &data_make->environment.values.array[data_make->environment.values.used]); if (F_status_is_error(status)) { - fake_print_message(data, F_status_set_fine(status), "f_environment_get", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(status), "f_environment_get", F_true); return status; } @@ -3669,7 +3761,7 @@ extern "C" { fl_string_dynamic_append(data_make->setting_build.environment.array[i], &data_make->environment.names.array[data_make->environment.names.used]); if (F_status_is_error(status)) { - fake_print_message(data, F_status_set_fine(status), "f_environment_get", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(status), "f_environment_get", F_true); return status; } @@ -3714,13 +3806,13 @@ extern "C" { if (F_status_set_fine(status) == F_file_found_not) { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { fprintf(data.error.to.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Failed to find program '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", program.string); + fl_color_print(data.error.to.stream, data_make->error.context, "%sFailed to find program '", data_make->error.prefix); + fl_color_print(data.error.to.stream, data_make->error.notable, "%s", program.string); fl_color_print(data.error.to.stream, data_make->error.context, "' for executing.%c", f_string_eol[0]); } } else if (F_status_set_fine(status) != F_failure) { - fake_print_message(data, F_status_set_fine(status), "fll_execute_program_environment", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(status), "fll_execute_program_environment", F_true); } } @@ -3755,7 +3847,7 @@ extern "C" { if (F_status_is_error(status2)) { *status = status2; - fake_print_message(data, F_status_set_fine(*status), "f_conversion_number_signed_to_string", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "f_conversion_number_signed_to_string", F_true); f_macro_string_dynamic_t_delete_simple(number); return; @@ -3773,7 +3865,7 @@ extern "C" { if (F_status_is_error(status2)) { *status = status2; - fake_print_message(data, F_status_set_fine(*status), "fl_string_append", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_append", F_true); return; } @@ -3782,14 +3874,14 @@ extern "C" { if (F_status_is_error(status2)) { *status = status2; - fake_print_message(data, F_status_set_fine(*status), "fl_string_dynamic_terminate_after", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_dynamic_terminate_after", F_true); return; } if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { fprintf(data.error.to.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Failed with return code '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", data_make->setting_make.parameter.array[0].value.array[0].string); + fl_color_print(data.error.to.stream, data_make->error.context, "%sFailed with return code '", data_make->error.prefix); + fl_color_print(data.error.to.stream, data_make->error.notable, "%s", data_make->setting_make.parameter.array[0].value.array[0].string); fl_color_print(data.error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]); } @@ -3813,7 +3905,7 @@ extern "C" { f_macro_string_dynamics_new(status, args, arguments.used - 1); if (F_status_is_error(status)) { - fake_print_message(data, F_status_set_fine(status), "f_macro_string_dynamics_new", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(status), "f_macro_string_dynamics_new", F_true); return status; } @@ -3822,7 +3914,7 @@ extern "C" { status = fl_string_dynamic_append(arguments.array[i + 1], &args.array[i]); if (F_status_is_error(status)) { - fake_print_message(data, F_status_set_fine(status), "fl_string_dynamic_append", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(status), "fl_string_dynamic_append", F_true); f_macro_string_dynamics_t_delete_simple(args); return status; @@ -3831,7 +3923,7 @@ extern "C" { status = fl_string_dynamic_terminate(&args.array[i]); if (F_status_is_error(status)) { - fake_print_message(data, F_status_set_fine(status), "fl_string_dynamic_terminate", F_true, data_make->error); + fll_error_print(data_make->error, F_status_set_fine(status), "fl_string_dynamic_terminate", F_true); f_macro_string_dynamics_t_delete_simple(args); return status; @@ -3855,8 +3947,8 @@ 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.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Requires more arguments.%c", data_make->error.prefix, f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -3865,10 +3957,10 @@ extern "C" { if (!data_make->setting_build.build_indexer.used) { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.error.to.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: No indexer has been specified, cannot perform '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, fake_make_operation_index); - fl_color_print(data.error.to.stream, data_make->error.context, "' section operation.%c", f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sNo indexer has been specified, cannot perform '", data_make->error.prefix); + fl_color_print(data_make->error.to.stream, data_make->error.notable, fake_make_operation_index); + fl_color_print(data_make->error.to.stream, data_make->error.context, "' section operation.%c", f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -3881,8 +3973,8 @@ extern "C" { if (operation == fake_make_operation_type_break) { if (arguments.used > 1) { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Has too many arguments.%c", data_make->error.prefix, f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sHas too many arguments.%c", data_make->error.prefix, f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -3892,10 +3984,10 @@ extern "C" { 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.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Unsupported break type '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", arguments.array[0].string); - fl_color_print(data.error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sUnsupported break type '", data_make->error.prefix); + fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[0].string); + fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -3909,8 +4001,8 @@ extern "C" { if (operation == fake_make_operation_type_build) { if (arguments.used > 1) { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Has too many arguments.%c", data_make->error.prefix, f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sHas too many arguments.%c", data_make->error.prefix, f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -3928,24 +4020,24 @@ extern "C" { if (status_file == F_file_found_not) { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Failed to find file '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", path_file); - fl_color_print(data.error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sFailed to find file '", data_make->error.prefix); + fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", path_file); + fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]); } *status = F_status_set_error(status_file); } else if (F_status_is_error(status_file)) { - fake_print_message_file(data, *status, "f_file_is", path_file, "find", F_true, F_true, data_make->error); + fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_file_is", F_true, path_file, "find", fll_error_file_type_file); *status = status_file; } else if (!status_file) { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: The file '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", path_file); - fl_color_print(data.error.to.stream, data_make->error.context, "' must be a regular file.%c", f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sThe file '", data_make->error.prefix); + fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", path_file); + fl_color_print(data_make->error.to.stream, data_make->error.context, "' must be a regular file.%c", f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -3953,8 +4045,8 @@ extern "C" { } else { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Filename argument must not be an empty string.%c", data_make->error.prefix, f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sFilename argument must not be an empty string.%c", data_make->error.prefix, f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -3967,8 +4059,8 @@ 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.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Has too many arguments.%c", data_make->error.prefix, f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sHas too many arguments.%c", data_make->error.prefix, f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -3977,8 +4069,8 @@ extern "C" { if (data_make->path.stack.used == 1) { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Must not attempt to pop project root off of path stack.%c", data_make->error.prefix, f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sMust not attempt to pop project root off of path stack.%c", data_make->error.prefix, f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -3995,7 +4087,7 @@ extern "C" { *status = fake_make_assure_inside_project(data, arguments.array[i], data_make); if (F_status_is_error(*status)) { - fake_print_message_section_operation_path_outside(data, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string, data_make->error); + fake_print_message_section_operation_path_outside(data, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string); if (F_status_set_fine(*status) == F_false) { *status = F_status_set_error(F_failure); @@ -4007,10 +4099,10 @@ extern "C" { if (f_file_exists(arguments.array[i].string) != F_true) { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Failed to find file '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", arguments.array[i].string); - fl_color_print(data.error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sFailed to find file '", data_make->error.prefix); + fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[i].string); + fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4023,16 +4115,16 @@ extern "C" { if (status_file == F_false || status_file == F_file_found_not) { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: The last file '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", arguments.array[arguments.used - 1].string); - fl_color_print(data.error.to.stream, data_make->error.context, "' must be a valid directory.%c", f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sThe last file '", data_make->error.prefix); + fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[arguments.used - 1].string); + fl_color_print(data_make->error.to.stream, data_make->error.context, "' must be a valid directory.%c", f_string_eol[0]); } *status = F_status_set_error(F_failure); } else if (F_status_is_error(status_file)) { - fake_print_message_file(data, F_status_set_fine(status_file), "f_directory_is", arguments.array[arguments.used - 1].string, "find", F_false, F_true, data_make->error); + fake_print_message_file(data, data_make->error, F_status_set_fine(status_file), "f_directory_is", arguments.array[arguments.used - 1].string, "find", F_false, F_true); *status = F_status_set_error(F_failure); } } @@ -4045,10 +4137,10 @@ extern "C" { if (status_file == F_false) { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: The last file '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", arguments.array[arguments.used - 1].string); - fl_color_print(data.error.to.stream, data_make->error.context, "' must be a valid directory.%c", f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sThe last file '", data_make->error.prefix); + fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[arguments.used - 1].string); + fl_color_print(data_make->error.to.stream, data_make->error.context, "' must be a valid directory.%c", f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4058,8 +4150,8 @@ extern "C" { } else { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Requires more arguments.%c", data_make->error.prefix, f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4071,18 +4163,18 @@ extern "C" { if (operation == fake_make_operation_type_compile) { if (!arguments.used) { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Requires more arguments.%c", data_make->error.prefix, f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol[0]); } *status = F_status_set_error(F_failure); } else if (data_make->setting_build.build_compiler.used) { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.error.to.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: No compiler has been specified, cannot perform '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, fake_make_operation_compile); - fl_color_print(data.error.to.stream, data_make->error.context, "' section operation.%c", f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sNo compiler has been specified, cannot perform '", data_make->error.prefix); + fl_color_print(data_make->error.to.stream, data_make->error.notable, fake_make_operation_compile); + fl_color_print(data_make->error.to.stream, data_make->error.context, "' section operation.%c", f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4098,7 +4190,7 @@ extern "C" { *status = fake_make_assure_inside_project(data, arguments.array[i], data_make); if (F_status_is_error(*status)) { - fake_print_message_section_operation_path_outside(data, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string, data_make->error); + fake_print_message_section_operation_path_outside(data, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string); if (F_status_set_fine(*status) == F_false) { *status = F_status_set_error(F_failure); @@ -4110,10 +4202,10 @@ extern "C" { if (f_file_exists(arguments.array[i].string) != F_true) { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Failed to find file '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", arguments.array[i].string); - fl_color_print(data.error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sFailed to find file '", data_make->error.prefix); + fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[i].string); + fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4126,16 +4218,16 @@ extern "C" { if (status_file == F_false || status_file == F_file_found_not) { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: The last file '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", arguments.array[arguments.used - 1].string); - fl_color_print(data.error.to.stream, data_make->error.context, "' must be a valid directory.%c", f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sThe last file '", data_make->error.prefix); + fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[arguments.used - 1].string); + fl_color_print(data_make->error.to.stream, data_make->error.context, "' must be a valid directory.%c", f_string_eol[0]); } *status = F_status_set_error(F_failure); } else if (F_status_is_error(status_file)) { - fake_print_message_file(data, F_status_set_fine(status_file), "f_directory_is", arguments.array[arguments.used - 1].string, "find", F_false, F_true, data_make->error); + fake_print_message_file(data, data_make->error, F_status_set_fine(status_file), "f_directory_is", arguments.array[arguments.used - 1].string, "find", F_false, F_true); *status = F_status_set_error(F_failure); } } @@ -4148,10 +4240,10 @@ extern "C" { if (status_file == F_false) { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: The last file '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", arguments.array[arguments.used - 1].string); - fl_color_print(data.error.to.stream, data_make->error.context, "' must be a valid directory.%c", f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sThe last file '", data_make->error.prefix); + fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[arguments.used - 1].string); + fl_color_print(data_make->error.to.stream, data_make->error.context, "' must be a valid directory.%c", f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4161,8 +4253,8 @@ extern "C" { } else { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Requires more arguments.%c", data_make->error.prefix, f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4178,7 +4270,7 @@ extern "C" { *status = fake_make_assure_inside_project(data, arguments.array[i], data_make); if (F_status_is_error(*status)) { - fake_print_message_section_operation_path_outside(data, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string, data_make->error); + fake_print_message_section_operation_path_outside(data, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string); if (F_status_set_fine(*status) == F_false) { *status = F_status_set_error(F_failure); @@ -4188,8 +4280,8 @@ extern "C" { } else { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Requires more arguments.%c", data_make->error.prefix, f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4204,22 +4296,22 @@ extern "C" { if (*status == F_none) { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Define name must not be an empty string.%c", data_make->error.prefix, f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sDefine name must not be an empty string.%c", data_make->error.prefix, f_string_eol[0]); } *status = F_status_set_error(F_failure); } else if (*status == F_false) { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.error.to.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Invalid characters in the define setting name '", data_make->error.prefix); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sInvalid characters in the define setting name '", data_make->error.prefix); - fl_color_print_code(data.error.to.stream, data.context.notable); - f_print_dynamic(data.error.to.stream, arguments.array[0]); - fl_color_print_code(data.error.to.stream, data.context.reset); + fl_color_print_code(data_make->error.to.stream, *data_make->error.notable.before); + f_print_dynamic(data_make->error.to.stream, arguments.array[0]); + fl_color_print_code(data_make->error.to.stream, *data_make->error.notable.after); - fl_color_print(data.error.to.stream, data_make->error.context, "', only alpha-numeric ASCII characters and underscore (without a leading digit) is allowed.%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "', only alpha-numeric ASCII characters and underscore (without a leading digit) is allowed.%c", f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4227,8 +4319,8 @@ extern "C" { } else { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Requires more arguments.%c", data_make->error.prefix, f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4240,10 +4332,10 @@ 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.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Must not be used after another '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "else"); - fl_color_print(data.error.to.stream, data_make->error.context, "' section operation.%c", f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sMust not be used after another '", data_make->error.prefix); + fl_color_print(data_make->error.to.stream, data_make->error.notable, "else"); + fl_color_print(data_make->error.to.stream, data_make->error.context, "' section operation.%c", f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4254,10 +4346,10 @@ 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.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Must not be used inside an ", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "if"); - fl_color_print(data.error.to.stream, data_make->error.context, "' section operation.%c", f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sMust not be used inside an ", data_make->error.prefix); + fl_color_print(data_make->error.to.stream, data_make->error.notable, "if"); + fl_color_print(data_make->error.to.stream, data_make->error.context, "' section operation.%c", f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4268,8 +4360,8 @@ 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.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Has no preceding if condition.%c", data_make->error.prefix, f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sHas no preceding if condition.%c", data_make->error.prefix, f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4280,8 +4372,8 @@ extern "C" { if (arguments.used) { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Has too many arguments.%c", data_make->error.prefix, f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sHas too many arguments.%c", data_make->error.prefix, f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4294,8 +4386,8 @@ extern "C" { if (operation == fake_make_operation_type_exit) { if (arguments.used > 1) { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Has too many arguments.%c", data_make->error.prefix, f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sHas too many arguments.%c", data_make->error.prefix, f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4305,10 +4397,10 @@ extern "C" { 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.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Unsupported exit type '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", arguments.array[0].string); - fl_color_print(data.error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sUnsupported exit type '", data_make->error.prefix); + fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[0].string); + fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4326,10 +4418,10 @@ extern "C" { 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.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Unsupported fail type '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", arguments.array[0].string); - fl_color_print(data.error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sUnsupported fail type '", data_make->error.prefix); + fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[0].string); + fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4339,8 +4431,8 @@ extern "C" { } else { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Requires more arguments.%c", data_make->error.prefix, f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4358,17 +4450,17 @@ extern "C" { if (status_file == F_file_found_not) { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Failed to find file '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", arguments.array[i].string); - fl_color_print(data.error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sFailed to find file '", data_make->error.prefix); + fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[i].string); + fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]); } *status = F_status_set_error(status_file); } else if (F_status_is_error(status_file)) { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fake_print_message_file(data, *status, "f_file_is", arguments.array[i].string, "find", F_true, F_true, data_make->error); + fake_print_message_file(data, data_make->error, *status, "f_file_is", arguments.array[i].string, "find", F_true, F_true); } *status = status_file; @@ -4379,8 +4471,8 @@ extern "C" { } if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Requires more arguments.%c", data_make->error.prefix, f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4391,10 +4483,10 @@ 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.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Must not be used after another '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "if"); - fl_color_print(data.error.to.stream, data_make->error.context, "' section operation.%c", f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sMust not be used after another '", data_make->error.prefix); + fl_color_print(data_make->error.to.stream, data_make->error.notable, "if"); + fl_color_print(data_make->error.to.stream, data_make->error.context, "' section operation.%c", f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4484,10 +4576,10 @@ extern "C" { if (i == 14) { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Unsupported if type '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", arguments.array[0].string); - fl_color_print(data.error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sUnsupported if type '", data_make->error.prefix); + fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[0].string); + fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4500,8 +4592,8 @@ extern "C" { 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.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Has too many arguments.%c", data_make->error.prefix, f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sHas too many arguments.%c", data_make->error.prefix, f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4517,10 +4609,10 @@ extern "C" { 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.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Unsupported mode type '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", arguments.array[1].string); - fl_color_print(data.error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sUnsupported mode type '", data_make->error.prefix); + fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[1].string); + fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4592,10 +4684,10 @@ extern "C" { } else { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Unsupported file type '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", arguments.array[i].string); - fl_color_print(data.error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sUnsupported file type '", data_make->error.prefix); + fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[i].string); + fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]); } type_file |= 0x80; @@ -4620,7 +4712,7 @@ extern "C" { status_file = fake_make_assure_inside_project(data, arguments.array[i], data_make); if (F_status_is_error(status_file)) { - fake_print_message_section_operation_path_outside(data, F_status_set_fine(status_file), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string, data_make->error); + fake_print_message_section_operation_path_outside(data, data_make->error, F_status_set_fine(status_file), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string); *operation_if = fake_make_operation_if_type_false_always_next; @@ -4643,7 +4735,7 @@ extern "C" { } if (F_status_is_error(status_file)) { - fake_print_message_file(data, F_status_set_fine(status_file), "f_file_exists", arguments.array[i].string, "find", F_true, F_true, data_make->error); + fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_file_exists", F_true, arguments.array[i].string, "find", fll_error_file_type_file); *operation_if = fake_make_operation_if_type_false_always_next; @@ -4663,10 +4755,10 @@ 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.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Unsupported define type '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", arguments.array[1].string); - fl_color_print(data.error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sUnsupported define type '", data_make->error.prefix); + fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[1].string); + fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4679,8 +4771,8 @@ 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.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Requires more arguments.%c", data_make->error.prefix, f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4692,8 +4784,8 @@ 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.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Requires more arguments.%c", data_make->error.prefix, f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4735,17 +4827,17 @@ extern "C" { *status = F_status_set_error(F_failure); if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); if (number > f_number_t_size_unsigned) { - fl_color_print(data.error.to.stream, data_make->error.context, "%s: The number '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%c%s", arguments.array[i].string); - fl_color_print(data.error.to.stream, data_make->error.context, "' may only be between the ranges -%llu to %llu.%c", f_number_t_size_unsigned, f_number_t_size_unsigned, f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sThe number '", data_make->error.prefix); + fl_color_print(data_make->error.to.stream, data_make->error.notable, "%c%s", arguments.array[i].string); + fl_color_print(data_make->error.to.stream, data_make->error.context, "' may only be between the ranges -%llu to %llu.%c", f_number_t_size_unsigned, f_number_t_size_unsigned, f_string_eol[0]); } else { - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Invalid or unsupported number provided '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", arguments.array[i].string); - fl_color_print(data.error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sInvalid or unsupported number provided '", data_make->error.prefix); + fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[i].string); + fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]); } } } @@ -4757,8 +4849,8 @@ extern "C" { } if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Requires more arguments.%c", data_make->error.prefix, f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4770,8 +4862,8 @@ extern "C" { if (operation == fake_make_operation_type_link) { if (arguments.used > 2) { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Has too many arguments.%c", data_make->error.prefix, f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sHas too many arguments.%c", data_make->error.prefix, f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4780,7 +4872,7 @@ extern "C" { *status = fake_make_assure_inside_project(data, arguments.array[0], data_make); if (F_status_is_error(*status)) { - fake_print_message_section_operation_path_outside(data, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[0].string, data_make->error); + fake_print_message_section_operation_path_outside(data, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[0].string); if (F_status_set_fine(*status) == F_false) { *status = F_status_set_error(F_failure); @@ -4790,7 +4882,7 @@ extern "C" { *status = fake_make_assure_inside_project(data, arguments.array[1], data_make); if (F_status_is_error(*status)) { - fake_print_message_section_operation_path_outside(data, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[1].string, data_make->error); + fake_print_message_section_operation_path_outside(data, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[1].string); if (F_status_set_fine(*status) == F_false) { *status = F_status_set_error(F_failure); @@ -4799,8 +4891,8 @@ extern "C" { } else { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Requires more arguments.%c", data_make->error.prefix, f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4816,7 +4908,7 @@ extern "C" { *status = fake_make_assure_inside_project(data, arguments.array[i], data_make); if (F_status_is_error(*status)) { - fake_print_message_section_operation_path_outside(data, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string, data_make->error); + fake_print_message_section_operation_path_outside(data, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string); if (F_status_set_fine(*status) == F_false) { *status = F_status_set_error(F_failure); @@ -4828,10 +4920,10 @@ extern "C" { if (f_file_exists(arguments.array[i].string) != F_true) { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Failed to find file '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", arguments.array[i].string); - fl_color_print(data.error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sFailed to find file '", data_make->error.prefix); + fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[i].string); + fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4844,16 +4936,16 @@ extern "C" { if (status_file == F_false || status_file == F_file_found_not) { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: The last file '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", arguments.array[arguments.used - 1].string); - fl_color_print(data.error.to.stream, data_make->error.context, "' must be a valid directory.%c", f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sThe last file '", data_make->error.prefix); + fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[arguments.used - 1].string); + fl_color_print(data_make->error.to.stream, data_make->error.context, "' must be a valid directory.%c", f_string_eol[0]); } *status = F_status_set_error(F_failure); } else if (F_status_is_error(status_file)) { - fake_print_message_file(data, F_status_set_fine(status_file), "f_directory_is", arguments.array[arguments.used - 1].string, "find", F_false, F_true, data_make->error); + fake_print_message_file(data, data_make->error, F_status_set_fine(status_file), "f_directory_is", arguments.array[arguments.used - 1].string, "find", F_false, F_true); *status = F_status_set_error(F_failure); } } @@ -4866,10 +4958,10 @@ extern "C" { if (status_file == F_false) { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: The last file '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", arguments.array[arguments.used - 1].string); - fl_color_print(data.error.to.stream, data_make->error.context, "' must be a valid directory.%c", f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sThe last file '", data_make->error.prefix); + fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[arguments.used - 1].string); + fl_color_print(data_make->error.to.stream, data_make->error.context, "' must be a valid directory.%c", f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4879,8 +4971,8 @@ extern "C" { } else { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Requires more arguments.%c", data_make->error.prefix, f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4892,8 +4984,8 @@ extern "C" { if (operation == fake_make_operation_type_operate) { if (arguments.used > 1) { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Has too many arguments.%c", data_make->error.prefix, f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sHas too many arguments.%c", data_make->error.prefix, f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4909,23 +5001,23 @@ extern "C" { } // for if (id_section == data_make->fakefile.used) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: No operation section named '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", arguments.array[0].string); - fl_color_print(data.error.to.stream, data_make->error.context, "' was found.%c", f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sNo operation section named '", data_make->error.prefix); + fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[0].string); + fl_color_print(data_make->error.to.stream, data_make->error.context, "' was found.%c", f_string_eol[0]); } else { for (f_array_length_t i = 0; i < section_stack->used; i++) { if (section_stack->array[i] == id_section) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: The section operation '", data_make->error.prefix); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sThe section operation '", data_make->error.prefix); - fl_color_print_code(data.error.to.stream, data.context.notable); - f_print_dynamic_partial(data.error.to.stream, data_make->buffer, data_make->fakefile.array[id_section].name); - fl_color_print_code(data.error.to.stream, data.context.reset); + fl_color_print_code(data_make->error.to.stream, *data_make->error.notable.before); + f_print_dynamic_partial(data_make->error.to.stream, data_make->buffer, data_make->fakefile.array[id_section].name); + fl_color_print_code(data_make->error.to.stream, *data_make->error.notable.after); - fl_color_print(data.error.to.stream, data_make->error.context, "' is already in the operation stack, recursion is not allowed.%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "' is already in the operation stack, recursion is not allowed.%c", f_string_eol[0]); *status = F_status_set_error(F_failure); break; @@ -4935,8 +5027,8 @@ extern "C" { } else { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Requires more arguments.%c", data_make->error.prefix, f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4947,8 +5039,8 @@ extern "C" { if (operation == fake_make_operation_type_to) { if (arguments.used > 1) { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Has too many arguments.%c", data_make->error.prefix, f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sHas too many arguments.%c", data_make->error.prefix, f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4959,27 +5051,27 @@ extern "C" { if (status_file == F_file_found_not) { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Failed to find file '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", arguments.array[0].string); - fl_color_print(data.error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sFailed to find file '", data_make->error.prefix); + fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[0].string); + fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]); } *status = F_status_set_error(status_file); } else if (F_status_is_error(status_file)) { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fake_print_message_file(data, *status, "f_file_is", data.file_data_build_fakefile.string, "find", F_true, F_true, data_make->error); + fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_is", F_true, data.file_data_build_fakefile.string, "find", fll_error_file_type_file); } *status = status_file; } else if (!status_file) { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: The file '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", arguments.array[0].string); - fl_color_print(data.error.to.stream, data_make->error.context, "' must be a directory file.%c", f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sThe file '", data_make->error.prefix); + fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[0].string); + fl_color_print(data_make->error.to.stream, data_make->error.context, "' must be a directory file.%c", f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -4987,15 +5079,15 @@ extern "C" { } else { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Filename argument must not be an empty string.%c", data_make->error.prefix, f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sFilename argument must not be an empty string.%c", data_make->error.prefix, f_string_eol[0]); } } } else { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Requires more arguments.%c", data_make->error.prefix, f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -5010,10 +5102,10 @@ extern "C" { 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.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.error.to.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Unsupported file type '", data_make->error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", arguments.array[0].string); - fl_color_print(data.error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sUnsupported file type '", data_make->error.prefix); + fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[0].string); + fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]); } *status = F_status_set_error(F_failure); @@ -5025,7 +5117,7 @@ extern "C" { *status = fake_make_assure_inside_project(data, arguments.array[i], data_make); if (F_status_is_error(*status)) { - fake_print_message_section_operation_path_outside(data, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string, data_make->error); + fake_print_message_section_operation_path_outside(data, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string); if (F_status_set_fine(*status) == F_false) { *status = F_status_set_error(F_failure); @@ -5035,8 +5127,8 @@ extern "C" { } else { if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fprintf(data.output.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data_make->error.context, "%s: Requires more arguments.%c", data_make->error.prefix, f_string_eol[0]); + fprintf(data_make->error.to.stream, "%c", f_string_eol[0]); + fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol[0]); } *status = F_status_set_error(F_failure); diff --git a/level_3/fake/c/private-make.h b/level_3/fake/c/private-make.h index 2c0ad40..b1ad2a2 100644 --- a/level_3/fake/c/private-make.h +++ b/level_3/fake/c/private-make.h @@ -466,6 +466,8 @@ extern "C" { * * @param data * The program data. + * @param error + * The error/warning print data. * @param buffer * The string containing the name or number. * @param id @@ -478,7 +480,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_get_id_owner_ - f_return_status fake_make_get_id_owner(const fake_data_t data, const f_string_static_t buffer, uid_t *id) f_gcc_attribute_visibility_internal; + f_return_status fake_make_get_id_owner(const fake_data_t data, const fll_error_print_t error, const f_string_static_t buffer, uid_t *id) f_gcc_attribute_visibility_internal; #endif // _di_fake_make_get_id_owner_ /** @@ -542,6 +544,8 @@ extern "C" { /** * For a given make section operation, expand the content into an arguments array for that operation. * + * This prints errors via data_make.error. + * * @param data * The program data. * @param section_name diff --git a/level_3/fake/c/private-print.c b/level_3/fake/c/private-print.c index 2e1300a..0d52bc1 100644 --- a/level_3/fake/c/private-print.c +++ b/level_3/fake/c/private-print.c @@ -298,75 +298,16 @@ extern "C" { } #endif // _di_fake_print_error_parameter_too_many_ -#ifndef _di_fake_print_message_ - f_return_status fake_print_message(const fake_data_t data, const f_status_t status, const f_string_t function, const bool fallback) { - - if (status == F_parameter) { - if (data.error.verbosity != f_console_verbosity_quiet) { - fprintf(data.error.to.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data.error.context, "%s: Invalid parameter", data.error.prefix); - - if (function) { - fl_color_print(data.error.to.stream, data.error.context, " when calling function "); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", function); - fl_color_print(data.error.to.stream, data.error.context, "().%c", f_string_eol[0]); - } - else { - fl_color_print(data.error.to.stream, data.error.context, ".%c", f_string_eol[0]); - } - } - - return F_none; - } - - if (status == F_memory_allocation || status == F_memory_reallocation) { - if (data.error.verbosity != f_console_verbosity_quiet) { - fprintf(data.error.to.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data.error.context, "%s: Unable to allocate memory", data.error.prefix); - - if (function) { - fl_color_print(data.error.to.stream, data.error.context, " in function "); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", function); - fl_color_print(data.error.to.stream, data.error.context, "().%c", f_string_eol[0]); - } - else { - fl_color_print(data.error.to.stream, data.error.context, ".%c", f_string_eol[0]); - } - } - - return F_none; - } - - if (fallback && data.error.verbosity != f_console_verbosity_quiet) { - fprintf(data.error.to.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data.error.context, "UNKNOWN %s: (", data.error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%llu", status); - fl_color_print(data.error.to.stream, data.error.context, ")"); - - if (function) { - fl_color_print(data.error.to.stream, data.error.context, " in function "); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", function); - fl_color_print(data.error.to.stream, data.error.context, "().%c", f_string_eol[0]); - } - else { - fl_color_print(data.error.to.stream, data.error.context, ".%c", f_string_eol[0]); - } - } - - return F_unknown; - } -#endif // _di_fake_print_message_ - #ifndef _di_fake_print_message_file_ - bool fake_print_message_file(const fake_data_t data, const f_status_t status, const f_string_t function, const f_string_t name, const f_string_t operation, const bool is_file, const bool fallback) { + bool fake_print_message_file(const fake_data_t data, const fll_error_print_t error, const f_status_t status, const f_string_t function, const f_string_t name, const f_string_t operation, const bool is_file, const bool fallback) { const f_string_t file_or_directory = is_file ? "file" : "directory"; if (status == F_file_found_not) { if (data.error.verbosity != f_console_verbosity_quiet) { - fprintf(data.error.to.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data.error.context, "%s: Failed to find %s '", data.error.prefix, file_or_directory); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", name); - fl_color_print(data.error.to.stream, data.error.context, "'.%c", f_string_eol[0]); + fprintf(error.to.stream, "%c", f_string_eol[0]); + fl_color_print(error.to.stream, data.error.context, "%s: Failed to find %s '", data.error.prefix, file_or_directory); + fl_color_print(error.to.stream, data.context.set.notable, "%s", name); + fl_color_print(error.to.stream, data.error.context, "'.%c", f_string_eol[0]); } return F_false; @@ -374,10 +315,10 @@ extern "C" { if (status == F_file_found) { if (data.error.verbosity != f_console_verbosity_quiet) { - fprintf(data.error.to.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data.error.context, "%s: The %s '", data.error.prefix, file_or_directory); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", name); - fl_color_print(data.error.to.stream, data.error.context, "' already exists.%c", f_string_eol[0]); + fprintf(error.to.stream, "%c", f_string_eol[0]); + fl_color_print(error.to.stream, data.error.context, "%s: The %s '", data.error.prefix, file_or_directory); + fl_color_print(error.to.stream, data.context.set.notable, "%s", name); + fl_color_print(error.to.stream, data.error.context, "' already exists.%c", f_string_eol[0]); } return F_false; @@ -385,10 +326,10 @@ extern "C" { if (status == F_directory_empty_not) { if (data.error.verbosity != f_console_verbosity_quiet) { - fprintf(data.error.to.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data.error.context, "%s: The %s '", data.error.prefix, file_or_directory); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", name); - fl_color_print(data.error.to.stream, data.error.context, "' is not empty.%c", f_string_eol[0]); + fprintf(error.to.stream, "%c", f_string_eol[0]); + fl_color_print(error.to.stream, data.error.context, "%s: The %s '", data.error.prefix, file_or_directory); + fl_color_print(error.to.stream, data.context.set.notable, "%s", name); + fl_color_print(error.to.stream, data.error.context, "' is not empty.%c", f_string_eol[0]); } return F_false; @@ -396,12 +337,12 @@ extern "C" { if (status == F_parameter) { if (data.error.verbosity != f_console_verbosity_quiet) { - fprintf(data.error.to.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data.error.context, "INTERNAL %s: Invalid parameter when calling ", data.error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", function); - fl_color_print(data.error.to.stream, data.error.context, "() for the %s '", file_or_directory); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", name); - fl_color_print(data.error.to.stream, data.error.context, "'.%c", f_string_eol[0]); + fprintf(error.to.stream, "%c", f_string_eol[0]); + fl_color_print(error.to.stream, data.error.context, "INTERNAL %s: Invalid parameter when calling ", data.error.prefix); + fl_color_print(error.to.stream, data.context.set.notable, "%s", function); + fl_color_print(error.to.stream, data.error.context, "() for the %s '", file_or_directory); + fl_color_print(error.to.stream, data.context.set.notable, "%s", name); + fl_color_print(error.to.stream, data.error.context, "'.%c", f_string_eol[0]); } return F_false; @@ -409,10 +350,10 @@ extern "C" { if (status == F_name) { if (data.error.verbosity != f_console_verbosity_quiet) { - fprintf(data.error.to.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data.error.context, "%s: Invalid %s name '", data.error.prefix, file_or_directory); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", name); - fl_color_print(data.error.to.stream, data.error.context, "'.%c", f_string_eol[0]); + fprintf(error.to.stream, "%c", f_string_eol[0]); + fl_color_print(error.to.stream, data.error.context, "%s: Invalid %s name '", data.error.prefix, file_or_directory); + fl_color_print(error.to.stream, data.context.set.notable, "%s", name); + fl_color_print(error.to.stream, data.error.context, "'.%c", f_string_eol[0]); } return F_false; @@ -420,10 +361,10 @@ extern "C" { if (status == F_memory_out) { if (data.error.verbosity != f_console_verbosity_quiet) { - fprintf(data.error.to.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data.error.context, "CRITICAL %s: Unable to allocate memory, while trying to %s %s '", data.error.prefix, operation, file_or_directory); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", name); - fl_color_print(data.error.to.stream, data.error.context, "'.%c", f_string_eol[0]); + fprintf(error.to.stream, "%c", f_string_eol[0]); + fl_color_print(error.to.stream, data.error.context, "CRITICAL %s: Unable to allocate memory, while trying to %s %s '", data.error.prefix, operation, file_or_directory); + fl_color_print(error.to.stream, data.context.set.notable, "%s", name); + fl_color_print(error.to.stream, data.error.context, "'.%c", f_string_eol[0]); } return F_false; @@ -431,10 +372,10 @@ extern "C" { if (status == F_number_overflow) { if (data.error.verbosity != f_console_verbosity_quiet) { - fprintf(data.error.to.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data.error.context, "%s: Overflow while trying to %s %s '", data.error.prefix, operation, file_or_directory); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", name); - fl_color_print(data.error.to.stream, data.error.context, "'.%c", f_string_eol[0]); + fprintf(error.to.stream, "%c", f_string_eol[0]); + fl_color_print(error.to.stream, data.error.context, "%s: Overflow while trying to %s %s '", data.error.prefix, operation, file_or_directory); + fl_color_print(error.to.stream, data.context.set.notable, "%s", name); + fl_color_print(error.to.stream, data.error.context, "'.%c", f_string_eol[0]); } return F_false; @@ -442,10 +383,10 @@ extern "C" { if (status == F_directory) { if (data.error.verbosity != f_console_verbosity_quiet) { - fprintf(data.error.to.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data.error.context, "%s: Invalid directory while trying to %s %s '", data.error.prefix, operation, file_or_directory); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", name); - fl_color_print(data.error.to.stream, data.error.context, "'.%c", f_string_eol[0]); + fprintf(error.to.stream, "%c", f_string_eol[0]); + fl_color_print(error.to.stream, data.error.context, "%s: Invalid directory while trying to %s %s '", data.error.prefix, operation, file_or_directory); + fl_color_print(error.to.stream, data.context.set.notable, "%s", name); + fl_color_print(error.to.stream, data.error.context, "'.%c", f_string_eol[0]); } return F_false; @@ -453,10 +394,10 @@ extern "C" { if (status == F_access_denied) { if (data.error.verbosity != f_console_verbosity_quiet) { - fprintf(data.error.to.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data.error.context, "%s: Access denied while trying to %s %s '", data.error.prefix, operation, file_or_directory); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", name); - fl_color_print(data.error.to.stream, data.error.context, "'.%c", f_string_eol[0]); + fprintf(error.to.stream, "%c", f_string_eol[0]); + fl_color_print(error.to.stream, data.error.context, "%s: Access denied while trying to %s %s '", data.error.prefix, operation, file_or_directory); + fl_color_print(error.to.stream, data.context.set.notable, "%s", name); + fl_color_print(error.to.stream, data.error.context, "'.%c", f_string_eol[0]); } return F_false; @@ -464,10 +405,10 @@ extern "C" { if (status == F_loop) { if (data.error.verbosity != f_console_verbosity_quiet) { - fprintf(data.error.to.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data.error.context, "%s: Loop while trying to %s %s '", data.error.prefix, operation, file_or_directory); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", name); - fl_color_print(data.error.to.stream, data.error.context, "'.%c", f_string_eol[0]); + fprintf(error.to.stream, "%c", f_string_eol[0]); + fl_color_print(error.to.stream, data.error.context, "%s: Loop while trying to %s %s '", data.error.prefix, operation, file_or_directory); + fl_color_print(error.to.stream, data.context.set.notable, "%s", name); + fl_color_print(error.to.stream, data.error.context, "'.%c", f_string_eol[0]); } return F_false; @@ -475,10 +416,10 @@ extern "C" { if (status == F_prohibited) { if (data.error.verbosity != f_console_verbosity_quiet) { - fprintf(data.error.to.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data.error.context, "%s: Prohibited by system while trying to %s %s '", data.error.prefix, operation, file_or_directory); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", name); - fl_color_print(data.error.to.stream, data.error.context, "'.%c", f_string_eol[0]); + fprintf(error.to.stream, "%c", f_string_eol[0]); + fl_color_print(error.to.stream, data.error.context, "%s: Prohibited by system while trying to %s %s '", data.error.prefix, operation, file_or_directory); + fl_color_print(error.to.stream, data.context.set.notable, "%s", name); + fl_color_print(error.to.stream, data.error.context, "'.%c", f_string_eol[0]); } return F_false; @@ -486,10 +427,10 @@ extern "C" { if (status == F_access_owner) { if (data.error.verbosity != f_console_verbosity_quiet) { - fprintf(data.error.to.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data.error.context, "%s: Currrent user is not allowed to use the given owner while trying to %s %s '", data.error.prefix, operation, file_or_directory); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", name); - fl_color_print(data.error.to.stream, data.error.context, "'.%c", f_string_eol[0]); + fprintf(error.to.stream, "%c", f_string_eol[0]); + fl_color_print(error.to.stream, data.error.context, "%s: Currrent user is not allowed to use the given owner while trying to %s %s '", data.error.prefix, operation, file_or_directory); + fl_color_print(error.to.stream, data.context.set.notable, "%s", name); + fl_color_print(error.to.stream, data.error.context, "'.%c", f_string_eol[0]); } return F_false; @@ -497,10 +438,10 @@ extern "C" { if (status == F_access_group) { if (data.error.verbosity != f_console_verbosity_quiet) { - fprintf(data.error.to.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data.error.context, "%s: Currrent user is not allowed to use the given group while trying to %s %s '", data.error.prefix, operation, file_or_directory); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", name); - fl_color_print(data.error.to.stream, data.error.context, "'.%c", f_string_eol[0]); + fprintf(error.to.stream, "%c", f_string_eol[0]); + fl_color_print(error.to.stream, data.error.context, "%s: Currrent user is not allowed to use the given group while trying to %s %s '", data.error.prefix, operation, file_or_directory); + fl_color_print(error.to.stream, data.context.set.notable, "%s", name); + fl_color_print(error.to.stream, data.error.context, "'.%c", f_string_eol[0]); } return F_false; @@ -509,10 +450,10 @@ extern "C" { if (is_file) { if (status == F_directory_found_not) { if (data.error.verbosity != f_console_verbosity_quiet) { - fprintf(data.error.to.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data.error.context, "%s: Failed to %s %s '", data.error.prefix, operation, file_or_directory); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", name); - fl_color_print(data.error.to.stream, data.error.context, "' due to an invalid directory in the path.%c", f_string_eol[0]); + fprintf(error.to.stream, "%c", f_string_eol[0]); + fl_color_print(error.to.stream, data.error.context, "%s: Failed to %s %s '", data.error.prefix, operation, file_or_directory); + fl_color_print(error.to.stream, data.context.set.notable, "%s", name); + fl_color_print(error.to.stream, data.error.context, "' due to an invalid directory in the path.%c", f_string_eol[0]); } return F_false; @@ -521,10 +462,10 @@ extern "C" { else { if (status == F_directory_found_not) { if (data.error.verbosity != f_console_verbosity_quiet) { - fprintf(data.error.to.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data.error.context, "%s: Failed to %s %s '", data.error.prefix, operation, file_or_directory); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", name); - fl_color_print(data.error.to.stream, data.error.context, "' due to an invalid directory in the path.%c", f_string_eol[0]); + fprintf(error.to.stream, "%c", f_string_eol[0]); + fl_color_print(error.to.stream, data.error.context, "%s: Failed to %s %s '", data.error.prefix, operation, file_or_directory); + fl_color_print(error.to.stream, data.context.set.notable, "%s", name); + fl_color_print(error.to.stream, data.error.context, "' due to an invalid directory in the path.%c", f_string_eol[0]); } return F_false; @@ -532,10 +473,10 @@ extern "C" { if (status == F_failure) { if (data.error.verbosity != f_console_verbosity_quiet) { - fprintf(data.error.to.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data.error.context, "%s: Failed to %s %s '", data.error.prefix, operation, file_or_directory); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", name); - fl_color_print(data.error.to.stream, data.error.context, "'.%c", f_string_eol[0]); + fprintf(error.to.stream, "%c", f_string_eol[0]); + fl_color_print(error.to.stream, data.error.context, "%s: Failed to %s %s '", data.error.prefix, operation, file_or_directory); + fl_color_print(error.to.stream, data.context.set.notable, "%s", name); + fl_color_print(error.to.stream, data.error.context, "'.%c", f_string_eol[0]); } return F_false; @@ -543,12 +484,12 @@ extern "C" { } if (fll_error_print(data.error, status, function, F_false) == F_unknown && fallback && data.error.verbosity != f_console_verbosity_quiet) { - fprintf(data.error.to.stream, "%c", f_string_eol[0]); - fl_color_print(data.error.to.stream, data.error.context, "UNKNOWN %s: (", data.error.prefix); - fl_color_print(data.error.to.stream, data.context.set.notable, "%llu", status); - fl_color_print(data.error.to.stream, data.error.context, ") occurred while trying to %s %s '", operation, file_or_directory); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s", name); - fl_color_print(data.error.to.stream, data.error.context, "'.%c", f_string_eol[0]); + fprintf(error.to.stream, "%c", f_string_eol[0]); + fl_color_print(error.to.stream, data.error.context, "UNKNOWN %s: (", data.error.prefix); + fl_color_print(error.to.stream, data.context.set.notable, "%llu", status); + fl_color_print(error.to.stream, data.error.context, ") occurred while trying to %s %s '", operation, file_or_directory); + fl_color_print(error.to.stream, data.context.set.notable, "%s", name); + fl_color_print(error.to.stream, data.error.context, "'.%c", f_string_eol[0]); } return F_true; @@ -556,7 +497,7 @@ extern "C" { #endif // _di_fake_print_message_file_ #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, fll_error_print_t error) { + void fake_print_message_section_operation_failed(const fake_data_t data, const fll_error_print_t error, const f_string_static_t buffer, const f_string_range_t section_name, const f_string_range_t operation_name) { if (data.error.verbosity == f_console_verbosity_quiet || !error.to.stream) return; f_string_length_t line = 1; @@ -583,7 +524,7 @@ extern "C" { #endif // _di_fake_print_message_section_operation_failed_ #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, fll_error_print_t error) { + void fake_print_message_section_operation_path_outside(const fake_data_t data, const fll_error_print_t error, const f_status_t status, const f_string_t function, const f_string_t path) { if (data.error.verbosity == f_console_verbosity_quiet || !error.to.stream) return; if (F_status_set_fine(status) == F_false) { @@ -599,7 +540,7 @@ extern "C" { #endif // _di_fake_print_message_section_operation_path_outside_ #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, fll_error_print_t error) { + void fake_print_message_section_operation_path_stack_max(const fake_data_t data, fll_error_print_t error, const f_status_t status, const f_string_t function, const f_string_t path) { if (data.error.verbosity == f_console_verbosity_quiet || !error.to.stream) return; if (status == F_buffer_too_large) { @@ -623,7 +564,7 @@ extern "C" { #endif // _di_fake_print_message_section_operation_path_stack_max_ #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, fll_error_print_t error) { + void fake_print_message_section_operation_stack_max(const fake_data_t data, fll_error_print_t error, 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) { if (data.error.verbosity == f_console_verbosity_quiet || !error.to.stream) return; f_string_length_t line = 1; @@ -652,7 +593,7 @@ extern "C" { #endif // _di_fake_print_message_section_operation_stack_max_ #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, fll_error_print_t error) { + void fake_print_message_section_operation_unknown(const fake_data_t data, const fll_error_print_t error, const f_string_static_t buffer, const f_string_range_t section_name, const f_string_range_t operation_name) { if (data.error.verbosity == f_console_verbosity_quiet || !error.to.stream) return; f_string_length_t line = 1; diff --git a/level_3/fake/c/private-print.h b/level_3/fake/c/private-print.h index 0c172a7..b8aef1e 100644 --- a/level_3/fake/c/private-print.h +++ b/level_3/fake/c/private-print.h @@ -93,33 +93,14 @@ extern "C" { #endif // _di_fake_print_error_parameter_too_many_ /** - * Print generic error/warning messages. - * - * @param data - * The program data. - * @param status - * The status code representing an error. - * @param function - * The name of the function where the error happened. - * Set to 0 to disable. - * @param fallback - * Set to F_true to print the fallback error message for unknown errors. - * - * @return - * F_none is returned on successful print of known errors. - * F_unknown is returned if the status code has no print message. - */ -#ifndef _di_fake_print_message_ - extern f_return_status fake_print_message(const fake_data_t data, const f_status_t status, const f_string_t function, const bool fallback) f_gcc_attribute_visibility_internal; -#endif // _di_fake_print_message_ - -/** * Print file/directory error/warning messages. * * @todo the fll_file_error_print() needs to be reviewed and possibly changed. * * @param data * The program data. + * @param error + * Designates how the section error/warning should be printed. * @param status * The error status code to report on. * @param function @@ -138,7 +119,7 @@ extern "C" { * F_false is returned on successful print of known errors. */ #ifndef _di_fake_print_message_file_ - extern bool fake_print_message_file(const fake_data_t data, const f_status_t status, const f_string_t function, const f_string_t name, const f_string_t operation, const bool is_file, const bool fallback) f_gcc_attribute_visibility_internal; + extern bool fake_print_message_file(const fake_data_t data, const fll_error_print_t error, const f_status_t status, const f_string_t function, const f_string_t name, const f_string_t operation, const bool is_file, const bool fallback) f_gcc_attribute_visibility_internal; #endif // _di_fake_print_message_file_ /** @@ -146,17 +127,17 @@ extern "C" { * * @param data * The program data. + * @param error + * Designates how the section error/warning should be printed. * @param buffer * The buffer containing the fakefile data. * @param section_name * The range within the buffer representing the section name. * @param operation_name * The range within the buffer representing the operation name within the section. - * @param error - * Designates how the section error/warning should be printed. */ #ifndef _di_fake_print_message_section_operation_failed_ - extern 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, fll_error_print_t error) f_gcc_attribute_visibility_internal; + extern void fake_print_message_section_operation_failed(const fake_data_t data, const fll_error_print_t error, const f_string_static_t buffer, const f_string_range_t section_name, const f_string_range_t operation_name) f_gcc_attribute_visibility_internal; #endif // _di_fake_print_message_section_operation_failed_ /** @@ -164,17 +145,17 @@ extern "C" { * * @param data * The program data. + * @param error + * Designates how the section error/warning should be printed. * @param status * The status code representing an error. * @param function * The name of the function where the error happened. * @param path * The path that is outside of the project path. - * @param error - * Designates how the section error/warning should be printed. */ #ifndef _di_fake_print_message_section_operation_path_outside_ - extern 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, fll_error_print_t error) f_gcc_attribute_visibility_internal; + extern void fake_print_message_section_operation_path_outside(const fake_data_t data, const fll_error_print_t error, const f_status_t status, const f_string_t function, const f_string_t path) f_gcc_attribute_visibility_internal; #endif // _fake_print_message_section_operation_path_outside_ /** @@ -182,6 +163,8 @@ extern "C" { * * @param data * The program data. + * @param error + * Designates how the section error/warning should be printed. * @param status * The status code representing an error. * @param function @@ -189,11 +172,9 @@ extern "C" { * Set to 0 to disable. * @param path * The path to the directory. - * @param error - * Designates how the section error/warning should be printed. */ #ifndef _di_fake_print_message_section_operation_path_stack_max_ - extern 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, fll_error_print_t error) f_gcc_attribute_visibility_internal; + extern void fake_print_message_section_operation_path_stack_max(const fake_data_t data, fll_error_print_t error, const f_status_t status, const f_string_t function, const f_string_t path) f_gcc_attribute_visibility_internal; #endif // _di_fake_print_message_section_operation_path_stack_max_ /** @@ -201,6 +182,8 @@ extern "C" { * * @param data * The program data. + * @param error + * Designates how the section error/warning should be printed. * @param buffer * The buffer containing the fakefile data. * @param section_name @@ -209,11 +192,9 @@ extern "C" { * The range within the buffer representing the operation name within the section. * @param stack_max * The max stack depth. - * @param error - * Designates how the section error/warning should be printed. */ #ifndef _di_fake_print_message_section_operation_stack_max_ - extern 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, fll_error_print_t error) f_gcc_attribute_visibility_internal; + extern void fake_print_message_section_operation_stack_max(const fake_data_t data, const fll_error_print_t error, 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) f_gcc_attribute_visibility_internal; #endif // _di_fake_print_message_section_operation_stack_max_ /** @@ -221,17 +202,17 @@ extern "C" { * * @param data * The program data. + * @param error + * Designates how the section error/warning should be printed. * @param buffer * The buffer containing the fakefile data. * @param section_name * The range within the buffer representing the section name. * @param operation_name * The range within the buffer representing the operation name within the section. - * @param error - * Designates how the section error/warning should be printed. */ #ifndef _di_fake_print_message_section_operation_unknown_ - extern 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, fll_error_print_t error) f_gcc_attribute_visibility_internal; + extern void fake_print_message_section_operation_unknown(const fake_data_t data, const fll_error_print_t error, const f_string_static_t buffer, const f_string_range_t section_name, const f_string_range_t operation_name) f_gcc_attribute_visibility_internal; #endif // _di_fake_print_message_section_operation_unknown_ /** diff --git a/level_3/firewall/c/firewall.c b/level_3/firewall/c/firewall.c index ef18996..4ce792c 100644 --- a/level_3/firewall/c/firewall.c +++ b/level_3/firewall/c/firewall.c @@ -77,6 +77,9 @@ extern "C" { status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context); + data->error.context = data->context.set.error; + data->error.notable = data->context.set.notable; + if (F_status_is_error(status)) { firewall_delete_data(data); return F_status_set_error(status); diff --git a/level_3/fss_basic_list_read/c/fss_basic_list_read.c b/level_3/fss_basic_list_read/c/fss_basic_list_read.c index e0c83a3..2a5ea43 100644 --- a/level_3/fss_basic_list_read/c/fss_basic_list_read.c +++ b/level_3/fss_basic_list_read/c/fss_basic_list_read.c @@ -139,6 +139,9 @@ extern "C" { status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context); + data->error.context = data->context.set.error; + data->error.notable = data->context.set.notable; + if (F_status_is_error(status)) { fss_basic_list_read_delete_data(data); return F_status_set_error(status); diff --git a/level_3/fss_basic_list_write/c/fss_basic_list_write.c b/level_3/fss_basic_list_write/c/fss_basic_list_write.c index f3bcc6d..de2213d 100644 --- a/level_3/fss_basic_list_write/c/fss_basic_list_write.c +++ b/level_3/fss_basic_list_write/c/fss_basic_list_write.c @@ -47,6 +47,9 @@ extern "C" { status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context); + data->error.context = data->context.set.error; + data->error.notable = data->context.set.notable; + if (F_status_is_error(status)) { fss_basic_list_write_delete_data(data); return F_status_set_error(status); diff --git a/level_3/fss_basic_read/c/fss_basic_read.c b/level_3/fss_basic_read/c/fss_basic_read.c index 106d93e..327379d 100644 --- a/level_3/fss_basic_read/c/fss_basic_read.c +++ b/level_3/fss_basic_read/c/fss_basic_read.c @@ -139,6 +139,9 @@ extern "C" { status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context); + data->error.context = data->context.set.error; + data->error.notable = data->context.set.notable; + if (F_status_is_error(status)) { fss_basic_read_delete_data(data); return F_status_set_error(status); diff --git a/level_3/fss_basic_write/c/fss_basic_write.c b/level_3/fss_basic_write/c/fss_basic_write.c index 21f9e63..f8190a3 100644 --- a/level_3/fss_basic_write/c/fss_basic_write.c +++ b/level_3/fss_basic_write/c/fss_basic_write.c @@ -47,6 +47,9 @@ extern "C" { status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context); + data->error.context = data->context.set.error; + data->error.notable = data->context.set.notable; + if (F_status_is_error(status)) { fss_basic_write_delete_data(data); return status; diff --git a/level_3/fss_extended_list_read/c/fss_extended_list_read.c b/level_3/fss_extended_list_read/c/fss_extended_list_read.c index 83398a1..5acad1b 100644 --- a/level_3/fss_extended_list_read/c/fss_extended_list_read.c +++ b/level_3/fss_extended_list_read/c/fss_extended_list_read.c @@ -139,6 +139,9 @@ extern "C" { status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context); + data->error.context = data->context.set.error; + data->error.notable = data->context.set.notable; + if (F_status_is_error(status)) { fss_extended_list_read_delete_data(data); return F_status_set_error(status); diff --git a/level_3/fss_extended_read/c/fss_extended_read.c b/level_3/fss_extended_read/c/fss_extended_read.c index a9aa912..53f1e50 100644 --- a/level_3/fss_extended_read/c/fss_extended_read.c +++ b/level_3/fss_extended_read/c/fss_extended_read.c @@ -139,6 +139,9 @@ extern "C" { status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context); + data->error.context = data->context.set.error; + data->error.notable = data->context.set.notable; + if (F_status_is_error(status)) { fss_extended_read_delete_data(data); return F_status_set_error(status); diff --git a/level_3/fss_extended_write/c/fss_extended_write.c b/level_3/fss_extended_write/c/fss_extended_write.c index 804e1c6..3766f86 100644 --- a/level_3/fss_extended_write/c/fss_extended_write.c +++ b/level_3/fss_extended_write/c/fss_extended_write.c @@ -47,6 +47,9 @@ extern "C" { status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context); + data->error.context = data->context.set.error; + data->error.notable = data->context.set.notable; + if (F_status_is_error(status)) { fss_extended_write_delete_data(data); return status; diff --git a/level_3/fss_status_code/c/fss_status_code.c b/level_3/fss_status_code/c/fss_status_code.c index feb1f35..d781c2e 100644 --- a/level_3/fss_status_code/c/fss_status_code.c +++ b/level_3/fss_status_code/c/fss_status_code.c @@ -46,6 +46,9 @@ extern "C" { status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context); + data->error.context = data->context.set.error; + data->error.notable = data->context.set.notable; + if (F_status_is_error(status)) { fss_status_code_delete_data(data); return F_status_set_error(status); diff --git a/level_3/iki_read/c/iki_read.c b/level_3/iki_read/c/iki_read.c index ae1c857..21c3d75 100644 --- a/level_3/iki_read/c/iki_read.c +++ b/level_3/iki_read/c/iki_read.c @@ -101,6 +101,9 @@ extern "C" { status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context); + data->error.context = data->context.set.error; + data->error.notable = data->context.set.notable; + if (F_status_is_error(status)) { iki_read_print_error(data->context, data->error.verbosity, F_status_set_fine(status), "fll_program_parameter_process", F_true); diff --git a/level_3/iki_write/c/iki_write.c b/level_3/iki_write/c/iki_write.c index c2193ed..985153d 100644 --- a/level_3/iki_write/c/iki_write.c +++ b/level_3/iki_write/c/iki_write.c @@ -64,6 +64,9 @@ extern "C" { status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context); + data->error.context = data->context.set.error; + data->error.notable = data->context.set.notable; + if (F_status_is_error(status)) { iki_write_print_error(data->context, data->error.verbosity, F_status_set_fine(status), "fll_program_parameter_process", F_true); diff --git a/level_3/init/c/init.c b/level_3/init/c/init.c index 3a6d52b..9d5b074 100644 --- a/level_3/init/c/init.c +++ b/level_3/init/c/init.c @@ -68,6 +68,9 @@ extern "C" { status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context); + data->error.context = data->context.set.error; + data->error.notable = data->context.set.notable; + if (F_status_is_error(status)) { // @todo: init_delete_data(data); return F_status_set_error(status); diff --git a/level_3/status_code/c/status_code.c b/level_3/status_code/c/status_code.c index 559d8dc..4e7a2fa 100644 --- a/level_3/status_code/c/status_code.c +++ b/level_3/status_code/c/status_code.c @@ -45,6 +45,9 @@ extern "C" { status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context); + data->error.context = data->context.set.error; + data->error.notable = data->context.set.notable; + if (F_status_is_error(status)) { status_code_delete_data(data); return F_status_set_error(status);