From: Kevin Day Date: Mon, 20 Feb 2023 00:56:51 +0000 (-0600) Subject: Progress: Continue working on Featureless Make, focusing on printing. X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=73b8b282185b258ad3e2b31f29ac089fe1503a90;p=fll Progress: Continue working on Featureless Make, focusing on printing. The fll_error_print() and private_fll_error_print() functions now accepts a uint8_t flag instead of a boolean to designate options. The fallback is still supported. A new flag "simple" is provided to allow for printing a simpler message (helps avoid ridiculous messages like "Unable to find file, reason: file not found."). --- diff --git a/level_2/fll_error/c/error.c b/level_2/fll_error/c/error.c index f36151e..7c15fd4 100644 --- a/level_2/fll_error/c/error.c +++ b/level_2/fll_error/c/error.c @@ -6,14 +6,14 @@ extern "C" { #endif #ifndef _di_fll_error_print_ - f_status_t fll_error_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback) { + f_status_t fll_error_print(const fl_print_t print, const f_status_t status, const f_string_t function, const uint8_t flag) { - return private_fll_error_print(print, status, function, fallback); + return private_fll_error_print(print, status, function, flag); } #endif // _di_fll_error_print_ #ifndef _di_fll_error_file_print_ - f_status_t fll_error_file_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) { + f_status_t fll_error_file_print(const fl_print_t print, const f_status_t status, const f_string_t function, const uint8_t flag, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) { f_string_static_t type_name = fll_error_file_type_file_s; @@ -539,6 +539,8 @@ extern "C" { } if (status == F_write_only) { + private_fll_error_print_unable_to(print, operation, name, type_name, "is write only"); + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); @@ -627,12 +629,12 @@ extern "C" { } } - return private_fll_error_print(print, status, function, fallback); + return private_fll_error_print(print, status, function, flag); } #endif // _di_fll_error_file_print_ #ifndef _di_fll_error_parameter_integer_print_ - f_status_t fll_error_parameter_integer_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_static_t parameter, const f_string_static_t argument) { + f_status_t fll_error_parameter_integer_print(const fl_print_t print, const f_status_t status, const f_string_t function, const uint8_t flag, const f_string_static_t parameter, const f_string_static_t argument) { if (status == F_data_not) { if (print.verbosity != f_console_verbosity_quiet_e) { @@ -728,7 +730,7 @@ extern "C" { return F_false; } - return private_fll_error_print(print, status, function, fallback); + return private_fll_error_print(print, status, function, flag); } #endif // _di_fll_error_parameter_integer_print_ diff --git a/level_2/fll_error/c/error.h b/level_2/fll_error/c/error.h index 44ed8db..351be7c 100644 --- a/level_2/fll_error/c/error.h +++ b/level_2/fll_error/c/error.h @@ -45,15 +45,16 @@ extern "C" { * @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. + * @param flag + * One of the fll_error_file_flag_*_e flags. + * Consider passing fll_error_file_flag_simple_e, on errors like file not find while trying to find file. * * @return * F_false is returned on successful print of known errors. * F_true is returned if the status code is unknown. */ #ifndef _di_fll_error_print_ - extern f_status_t fll_error_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback); + extern f_status_t fll_error_print(const fl_print_t print, const f_status_t status, const f_string_t function, const uint8_t flag); #endif // _di_fll_error_print_ /** @@ -67,8 +68,9 @@ extern "C" { * @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. + * @param flag + * One of the fll_error_file_flag_*_e flags. + * Consider passing fll_error_file_flag_simple_e, on errors like file not find while trying to find file. * @param name * The name of the file or directory. * @param operation @@ -81,7 +83,7 @@ extern "C" { * F_false is returned on successful print of known errors. */ #ifndef _di_fll_error_file_print_ - extern f_status_t fll_error_file_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type); + extern f_status_t fll_error_file_print(const fl_print_t print, const f_status_t status, const f_string_t function, const uint8_t flag, const f_string_static_t name, const f_string_static_t operation, const uint8_t type); #endif // _di_fll_error_file_print_ /** @@ -95,8 +97,9 @@ extern "C" { * @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. + * @param flag + * One of the fll_error_file_flag_*_e flags. + * Consider passing fll_error_file_flag_simple_e, on errors like file not find while trying to find file. * @param parameter * The name of the parameter. * @param argument @@ -107,7 +110,7 @@ extern "C" { * F_false is returned on successful print of known errors. */ #ifndef _di_fll_error_parameter_integer_print_ - extern f_status_t fll_error_parameter_integer_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_static_t parameter, const f_string_static_t argument); + extern f_status_t fll_error_parameter_integer_print(const fl_print_t print, const f_status_t status, const f_string_t function, const uint8_t flag, const f_string_static_t parameter, const f_string_static_t argument); #endif // _di_fll_error_parameter_integer_print_ #ifdef __cplusplus diff --git a/level_2/fll_error/c/error/common.h b/level_2/fll_error/c/error/common.h index 3028dc2..015fd88 100644 --- a/level_2/fll_error/c/error/common.h +++ b/level_2/fll_error/c/error/common.h @@ -37,6 +37,22 @@ extern "C" { #endif // _di_fll_error_file_type_e_ /** + * File error printing flags. + * + * fll_error_file_flag_*: + * - none: No flag set. + * - fallback: Fallback error message for unknown errors. + * - simple: Do not print the extra message, if applicable. + */ +#ifndef _di_fll_error_file_flag_e_ + enum { + fll_error_file_flag_none_e = 0, + fll_error_file_flag_fallback_e = 0x1, + fll_error_file_flag_simple_e = 0x2, + }; // enum +#endif // _di_fll_error_file_flag_e_ + +/** * Error file types. * * fll_error_file_type_*: diff --git a/level_2/fll_error/c/private-error.c b/level_2/fll_error/c/private-error.c index 50ff24d..37196ad 100644 --- a/level_2/fll_error/c/private-error.c +++ b/level_2/fll_error/c/private-error.c @@ -6,7 +6,7 @@ extern "C" { #endif #if !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_) - f_status_t private_fll_error_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback) { + f_status_t private_fll_error_print(const fl_print_t print, const f_status_t status, const f_string_t function, const uint8_t flag) { if (status == F_access_denied) { if (print.verbosity != f_console_verbosity_quiet_e) { @@ -240,7 +240,7 @@ extern "C" { return F_false; } - if (fallback && print.verbosity != f_console_verbosity_quiet_e) { + if ((flag & fll_error_file_flag_fallback_e) && print.verbosity != f_console_verbosity_quiet_e) { if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); @@ -270,6 +270,21 @@ extern "C" { } #endif // !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_) +#if !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_) + void private_fll_error_print_unable_to(const fl_print_t print, const f_string_static_t operation, const f_string_static_t name, const f_string_static_t type, const f_string_t message) { + + if (print.verbosity < f_console_verbosity_error_e) return; + + flockfile(print.to.stream); + + fl_print_format("%[%QUnable to %Q %Q '%]", print.to, print.context, print.prefix, operation, type, print.context); + fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable); + fl_print_format("%['%S%S.%]%r", print.to, print.context, message ? ", " : "", message ? message : "", print.context, f_string_eol_s); + + funlockfile(print.to.stream); + } +#endif // !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_) + #ifdef __cplusplus } // extern "C" #endif diff --git a/level_2/fll_error/c/private-error.h b/level_2/fll_error/c/private-error.h index 509ef0a..834494f 100644 --- a/level_2/fll_error/c/private-error.h +++ b/level_2/fll_error/c/private-error.h @@ -28,8 +28,9 @@ extern "C" { * @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. + * @param flag + * One of the fll_error_file_flag_*_e flags. + * Consider passing fll_error_file_flag_simple_e, on errors like file not find while trying to find file. * * @return * F_false is returned on successful print of known errors. @@ -39,7 +40,7 @@ extern "C" { * @see fll_error_file_print() */ #if !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_) - extern f_status_t private_fll_error_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback) F_attribute_visibility_internal_d; + extern f_status_t private_fll_error_print(const fl_print_t print, const f_status_t status, const f_string_t function, const uint8_t flag) F_attribute_visibility_internal_d; #endif // !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_) /** @@ -64,6 +65,34 @@ extern "C" { extern void private_fll_error_print_function(const fl_print_t print, const f_string_t function) F_attribute_visibility_internal_d; #endif // !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_) +/** + * Special function for printing the "Unable to" message. + * + * Intended to be shared to each of the different implementation variations. + * + * @param print + * Designates how printing is to be performed. + * @param name + * The name of the file or directory. + * @param operation + * The operation that fails, such as 'create' or 'access'. + * @param type_name + * A string representing the type. + * @param message + * An additional message to add. + * Set to an 0 to not use. + * + * @return + * F_false is returned on successful print of known errors. + * F_true is returned if the status code is unknown. + * + * @see fll_error_print() + * @see fll_error_file_print() + */ +#if !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_) + extern void private_fll_error_print_unable_to(const fl_print_t print, const f_string_static_t operation, const f_string_static_t name, const f_string_static_t type_name, const f_string_t message) F_attribute_visibility_internal_d; +#endif // !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_) + #ifdef __cplusplus } // extern "C" #endif diff --git a/level_3/byte_dump/c/byte_dump.c b/level_3/byte_dump/c/byte_dump.c index 9ab996d..5470f4a 100644 --- a/level_3/byte_dump/c/byte_dump.c +++ b/level_3/byte_dump/c/byte_dump.c @@ -31,7 +31,7 @@ extern "C" { if (F_status_is_error(status)) { byte_dump_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", F_true); + fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e); byte_dump_print_line_last_locked(setting, main->error); return; @@ -50,7 +50,7 @@ extern "C" { if (F_status_is_error(status)) { byte_dump_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", F_true); + fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e); byte_dump_print_line_last_locked(setting, main->error); return; @@ -71,7 +71,7 @@ extern "C" { status = f_console_parameter_prioritize_right(main->parameters, choices, &choice); if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true); + fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", fll_error_file_flag_fallback_e); return F_status_set_error(status); } @@ -102,7 +102,7 @@ extern "C" { status = f_console_parameter_prioritize_right(main->parameters, choices, &choice); if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true); + fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", fll_error_file_flag_fallback_e); return F_status_set_error(status); } @@ -127,7 +127,7 @@ extern "C" { status = f_console_parameter_prioritize_right(main->parameters, choices, &choice); if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true); + fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", fll_error_file_flag_fallback_e); return F_status_set_error(status); } @@ -333,7 +333,7 @@ extern "C" { status = byte_dump_file(&data, f_string_empty_s, file); if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), "byte_dump_file", F_true); + fll_error_print(main->error, F_status_set_fine(status), "byte_dump_file", fll_error_file_flag_fallback_e); return status; } @@ -358,7 +358,7 @@ extern "C" { missing_files = status; } - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_exists", F_true, data.argv[main->parameters.remaining.array[counter]], f_file_operation_open_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_exists", fll_error_file_flag_fallback_e, data.argv[main->parameters.remaining.array[counter]], f_file_operation_open_s, fll_error_file_type_file_e); } } // for @@ -376,7 +376,7 @@ extern "C" { status = f_file_stream_open(data.argv[main->parameters.remaining.array[counter]], f_string_empty_s, &file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_open", F_true, data.argv[main->parameters.remaining.array[counter]], f_file_operation_open_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_open", fll_error_file_flag_fallback_e, data.argv[main->parameters.remaining.array[counter]], f_file_operation_open_s, fll_error_file_type_file_e); return status; } @@ -423,7 +423,7 @@ extern "C" { } else { if (main->error.verbosity > f_console_verbosity_quiet_e) { - fll_error_file_print(main->error, F_status_set_fine(status), "byte_dump_file", F_true, data.argv[main->parameters.remaining.array[counter]], f_file_operation_process_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "byte_dump_file", fll_error_file_flag_fallback_e, data.argv[main->parameters.remaining.array[counter]], f_file_operation_process_s, fll_error_file_type_file_e); } } diff --git a/level_3/byte_dump/c/common.c b/level_3/byte_dump/c/common.c index e99de32..3745e86 100644 --- a/level_3/byte_dump/c/common.c +++ b/level_3/byte_dump/c/common.c @@ -88,7 +88,7 @@ extern "C" { if (F_status_is_error(setting->status)) { byte_dump_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "f_console_parameter_process", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "f_console_parameter_process", fll_error_file_flag_fallback_e); byte_dump_print_line_last_locked(setting, main->error); return; @@ -110,7 +110,7 @@ extern "C" { if (F_status_is_error(setting->status)) { byte_dump_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_context", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e); byte_dump_print_line_last_locked(setting, main->error); return; @@ -143,7 +143,7 @@ extern "C" { if (F_status_is_error(setting->status)) { byte_dump_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_verbosity", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e); byte_dump_print_line_last_locked(setting, main->error); return; diff --git a/level_3/control/c/common.c b/level_3/control/c/common.c index 179804a..508174b 100644 --- a/level_3/control/c/common.c +++ b/level_3/control/c/common.c @@ -191,7 +191,7 @@ extern "C" { if (F_status_is_error(setting->status)) { control_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "f_console_parameter_process", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "f_console_parameter_process", fll_error_file_flag_fallback_e); control_print_line_last_locked(setting, main->error); return; @@ -213,7 +213,7 @@ extern "C" { if (F_status_is_error(setting->status)) { control_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_context", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e); control_print_line_last_locked(setting, main->error); return; @@ -246,7 +246,7 @@ extern "C" { if (F_status_is_error(setting->status)) { control_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_verbosity", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e); control_print_line_last_locked(setting, main->error); return; diff --git a/level_3/control/c/control.c b/level_3/control/c/control.c index f413bb4..dfd066e 100644 --- a/level_3/control/c/control.c +++ b/level_3/control/c/control.c @@ -32,7 +32,7 @@ extern "C" { if (F_status_is_error(status)) { control_print_line_first_locked(setting, main->error) - fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", F_true); + fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e); control_print_line_last_locked(setting, main->error); return; @@ -51,7 +51,7 @@ extern "C" { if (F_status_is_error(status)) { control_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", F_true); + fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e); control_print_line_last_locked(setting, main->error); return; @@ -154,7 +154,7 @@ extern "C" { control_print_error_request_packet_too_large(main); } else { - fll_error_print(main->error, F_status_set_fine(status), "control_packet_build", F_true); + fll_error_print(main->error, F_status_set_fine(status), "control_packet_build", fll_error_file_flag_fallback_e); } } } @@ -163,7 +163,7 @@ extern "C" { status = control_packet_send(main, &data); if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), "control_packet_send", F_true); + fll_error_print(main->error, F_status_set_fine(status), "control_packet_send", fll_error_file_flag_fallback_e); } } @@ -177,7 +177,7 @@ extern "C" { control_print_error_response_packet_valid_not(main); } else { - fll_error_print(main->error, F_status_set_fine(status), "control_packet_receive", F_true); + fll_error_print(main->error, F_status_set_fine(status), "control_packet_receive", fll_error_file_flag_fallback_e); } } else { @@ -186,7 +186,7 @@ extern "C" { // Print the error message only if the error message is not already printed. if (F_status_is_error(status)) { if (header.type != control_payload_type_error_e && (header.type != control_payload_type_controller_e || F_status_set_fine(status) != header.status || (header.status != F_failure && header.status != F_busy))) { - fll_error_print(main->error, F_status_set_fine(status), "control_packet_process", F_true); + fll_error_print(main->error, F_status_set_fine(status), "control_packet_process", fll_error_file_flag_fallback_e); } } } diff --git a/level_3/control/c/private-control.c b/level_3/control/c/private-control.c index fe4fb5d..89a83f1 100644 --- a/level_3/control/c/private-control.c +++ b/level_3/control/c/private-control.c @@ -624,7 +624,7 @@ extern "C" { } if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_append", F_true); + fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_append", fll_error_file_flag_fallback_e); return status; } @@ -635,7 +635,7 @@ extern "C" { status = f_file_stream_open(data->cache.small, f_file_open_mode_read_s, &file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, data->cache.small, f_file_operation_open_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", fll_error_file_flag_fallback_e, data->cache.small, f_file_operation_open_s, fll_error_file_type_file_e); return status; } @@ -646,7 +646,7 @@ extern "C" { f_file_stream_close(&file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, data->cache.small, f_file_operation_read_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", fll_error_file_flag_fallback_e, data->cache.small, f_file_operation_read_s, fll_error_file_type_file_e); return status; } @@ -661,13 +661,13 @@ extern "C" { status = fll_fss_extended_read(data->cache.large, state, &range, &objects, &contents, 0, 0, &delimits, 0); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_extended_read", F_true, data->cache.small, f_file_operation_process_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_extended_read", fll_error_file_flag_fallback_e, data->cache.small, f_file_operation_process_s, fll_error_file_type_file_e); } else { status = f_fss_apply_delimit(state, delimits, &data->cache.large); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_fss_apply_delimit", F_true, data->cache.small, f_file_operation_process_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_fss_apply_delimit", fll_error_file_flag_fallback_e, data->cache.small, f_file_operation_process_s, fll_error_file_type_file_e); } } @@ -720,10 +720,10 @@ extern "C" { if (F_status_is_error(status)) { if (main->parameters.array[control_parameter_socket_e].result & f_console_result_value_e || !parameter_hass[1]) { - fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_append", F_true); + fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_append", fll_error_file_flag_fallback_e); } else { - fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true); + fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", fll_error_file_flag_fallback_e); } } @@ -731,7 +731,7 @@ extern "C" { if (F_status_is_error(status) || status == F_false) { if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_exists", F_true, data->cache.small, f_file_operation_find_s, fll_error_file_type_directory_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_exists", fll_error_file_flag_fallback_e, data->cache.small, f_file_operation_find_s, fll_error_file_type_directory_e); if (main->error.verbosity > f_console_verbosity_quiet_e) { fll_print_dynamic_raw(f_string_eol_s, main->error.to); @@ -748,7 +748,7 @@ extern "C" { status = f_string_dynamic_append_assure(f_path_separator_s, &data->cache.small); if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_append_assure", F_true); + fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_append_assure", fll_error_file_flag_fallback_e); } else { uint8_t append_ids[] = { @@ -785,10 +785,10 @@ extern "C" { if (F_status_is_error(status)) { if ((append_ids[i] && main->parameters.array[append_ids[i]].result & f_console_result_value_e) || !append_hass[i]) { - fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_append", F_true); + fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_append", fll_error_file_flag_fallback_e); } else { - fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true); + fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", fll_error_file_flag_fallback_e); } break; @@ -800,7 +800,7 @@ extern "C" { if (F_status_is_error(status) || status == F_false) { if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_exists", F_true, data->cache.small, f_file_operation_find_s, fll_error_file_type_directory_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_exists", fll_error_file_flag_fallback_e, data->cache.small, f_file_operation_find_s, fll_error_file_type_directory_e); if (main->error.verbosity > f_console_verbosity_quiet_e) { fll_print_dynamic_raw(f_string_eol_s, main->error.to); @@ -827,7 +827,7 @@ extern "C" { status = f_socket_create(&data->socket); if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), "f_socket_create", F_true); + fll_error_print(main->error, F_status_set_fine(status), "f_socket_create", fll_error_file_flag_fallback_e); control_print_error_socket_file_failed(main, data->cache.small); } @@ -837,7 +837,7 @@ extern "C" { status = f_socket_connect(data->socket); if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), "f_socket_connect", F_true); + fll_error_print(main->error, F_status_set_fine(status), "f_socket_connect", fll_error_file_flag_fallback_e); control_print_error_socket_file_failed(main, data->cache.small); } diff --git a/level_3/controller/c/common.c b/level_3/controller/c/common.c index 007375a..b5f38c5 100644 --- a/level_3/controller/c/common.c +++ b/level_3/controller/c/common.c @@ -623,7 +623,7 @@ extern "C" { if (F_status_is_error(setting->status)) { controller_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "f_console_parameter_process", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "f_console_parameter_process", fll_error_file_flag_fallback_e); controller_print_line_last_locked(setting, main->error); return; @@ -645,7 +645,7 @@ extern "C" { if (F_status_is_error(setting->status)) { controller_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_context", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e); controller_print_line_last_locked(setting, main->error); return; @@ -678,7 +678,7 @@ extern "C" { if (F_status_is_error(setting->status)) { controller_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_verbosity", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e); controller_print_line_last_locked(setting, main->error); return; diff --git a/level_3/controller/c/controller.c b/level_3/controller/c/controller.c index c6b7a14..fe604eb 100644 --- a/level_3/controller/c/controller.c +++ b/level_3/controller/c/controller.c @@ -37,7 +37,7 @@ extern "C" { if (F_status_is_error(status)) { controller_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", F_true); + fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e); controller_print_line_last_locked(setting, main->error); return; @@ -56,7 +56,7 @@ extern "C" { if (F_status_is_error(status)) { controller_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", F_true); + fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e); controller_print_line_last_locked(setting, main->error); return; @@ -103,7 +103,7 @@ extern "C" { } if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_append", F_true); + fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_append", fll_error_file_flag_fallback_e); return status; } @@ -119,7 +119,7 @@ extern "C" { status = f_path_current(F_false, &setting.path_current); if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), "f_path_current", F_true); + fll_error_print(main->error, F_status_set_fine(status), "f_path_current", fll_error_file_flag_fallback_e); } else { if (main->parameters.array[controller_parameter_settings_e].result & f_console_result_found_e) { @@ -141,7 +141,7 @@ extern "C" { status = controller_path_canonical_relative(&setting, argv[index], &setting.path_setting); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "controller_path_canonical_relative", F_true, argv[index], f_file_operation_verify_s, fll_error_file_type_path_e); + fll_error_file_print(main->error, F_status_set_fine(status), "controller_path_canonical_relative", fll_error_file_flag_fallback_e, argv[index], f_file_operation_verify_s, fll_error_file_type_path_e); } } else { @@ -155,7 +155,7 @@ extern "C" { } if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_append", F_true); + fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_append", fll_error_file_flag_fallback_e); } } } @@ -183,7 +183,7 @@ extern "C" { status = controller_path_canonical_relative(&setting, argv[index], &setting.path_pid); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "controller_path_canonical_relative", F_true, argv[index], f_file_operation_verify_s, fll_error_file_type_path_e); + fll_error_file_print(main->error, F_status_set_fine(status), "controller_path_canonical_relative", fll_error_file_flag_fallback_e, argv[index], f_file_operation_verify_s, fll_error_file_type_path_e); } } } @@ -214,7 +214,7 @@ extern "C" { } if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_append", F_true); + fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_append", fll_error_file_flag_fallback_e); } } @@ -239,13 +239,13 @@ extern "C" { status = controller_path_canonical_relative(&setting, argv[index], &setting.path_cgroup); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "controller_path_canonical_relative", F_true, argv[index], f_file_operation_verify_s, fll_error_file_type_path_e); + fll_error_file_print(main->error, F_status_set_fine(status), "controller_path_canonical_relative", fll_error_file_flag_fallback_e, argv[index], f_file_operation_verify_s, fll_error_file_type_path_e); } else { status = f_string_append_assure(F_path_separator_s, 1, &setting.path_cgroup); if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), "f_string_append_assure", F_true); + fll_error_print(main->error, F_status_set_fine(status), "f_string_append_assure", fll_error_file_flag_fallback_e); } } } @@ -327,13 +327,13 @@ extern "C" { } if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), "f_string_append_nulless", F_true); + fll_error_print(main->error, F_status_set_fine(status), "f_string_append_nulless", fll_error_file_flag_fallback_e); } else { status = f_string_append_assure(F_path_separator_s, 1, &setting.path_cgroup); if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), "f_string_append_assure", F_true); + fll_error_print(main->error, F_status_set_fine(status), "f_string_append_assure", fll_error_file_flag_fallback_e); } } } @@ -368,7 +368,7 @@ extern "C" { controller_unlock_print_flush(main->warning.to, 0); } else if (F_status_set_fine(status_delete) != F_interrupt) { - fll_error_file_print(main->warning, F_status_set_fine(status_delete), "controller_file_pid_delete", F_true, setting.path_pid, f_file_operation_delete_s, fll_error_file_type_file_e); + fll_error_file_print(main->warning, F_status_set_fine(status_delete), "controller_file_pid_delete", fll_error_file_flag_fallback_e, setting.path_pid, f_file_operation_delete_s, fll_error_file_type_file_e); } } } diff --git a/level_3/controller/c/controller/private-controller_print.c b/level_3/controller/c/controller/private-controller_print.c index 3b62ae7..4d607ef 100644 --- a/level_3/controller/c/controller/private-controller_print.c +++ b/level_3/controller/c/controller/private-controller_print.c @@ -8,7 +8,7 @@ extern "C" { #endif #ifndef _di_controller_print_error_ - void controller_print_error(controller_thread_t * const thread, const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback) { + void controller_print_error(controller_thread_t * const thread, const fl_print_t print, const f_status_t status, const f_string_t function, const uint8_t flag) { if (print.verbosity == f_console_verbosity_quiet_e) return; if (status == F_interrupt) return; @@ -18,7 +18,7 @@ extern "C" { f_thread_mutex_lock(&thread->lock.print); } - fll_error_print(print, status, function, fallback); + fll_error_print(print, status, function, flag); if (thread) { f_thread_mutex_unlock(&thread->lock.print); @@ -27,7 +27,7 @@ extern "C" { #endif // _di_controller_print_error_ #ifndef _di_controller_print_error_file_ - void controller_print_error_file(controller_thread_t * const thread, const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) { + void controller_print_error_file(controller_thread_t * const thread, const fl_print_t print, const f_status_t status, const f_string_t function, const uint8_t flag, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) { if (print.verbosity == f_console_verbosity_quiet_e) return; if (status == F_interrupt) return; @@ -37,7 +37,7 @@ extern "C" { f_thread_mutex_lock(&thread->lock.print); } - fll_error_file_print(print, status, function, fallback, name, operation, type); + fll_error_file_print(print, status, function, flag, name, operation, type); if (thread) { f_thread_mutex_unlock(&thread->lock.print); diff --git a/level_3/controller/c/controller/private-controller_print.h b/level_3/controller/c/controller/private-controller_print.h index 94f8fd0..49f9256 100644 --- a/level_3/controller/c/controller/private-controller_print.h +++ b/level_3/controller/c/controller/private-controller_print.h @@ -26,13 +26,13 @@ extern "C" { * @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. + * @param flag + * One of the fll_error_file_flag_*_e flags. * * @see fll_error_print() */ #ifndef _di_controller_print_error_ - extern void controller_print_error(controller_thread_t * const thread, const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback) F_attribute_visibility_internal_d; + extern void controller_print_error(controller_thread_t * const thread, const fl_print_t print, const f_status_t status, const f_string_t function, const uint8_t flag) F_attribute_visibility_internal_d; #endif // _di_controller_print_error_ /** @@ -49,8 +49,8 @@ extern "C" { * @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. + * @param flag + * One of the fll_error_file_flag_*_e flags. * @param name * The name of the file or directory. * @param operation @@ -61,7 +61,7 @@ extern "C" { * @see fll_error_file_print() */ #ifndef _di_controller_print_error_file_ - extern void controller_print_error_file(controller_thread_t * const thread, const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) F_attribute_visibility_internal_d; + extern void controller_print_error_file(controller_thread_t * const thread, const fl_print_t print, const f_status_t status, const f_string_t function, const uint8_t flag, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) F_attribute_visibility_internal_d; #endif // _di_controller_print_error_file_ #ifdef __cplusplus diff --git a/level_3/controller/c/entry/private-entry_print.c b/level_3/controller/c/entry/private-entry_print.c index 28de507..9c96366 100644 --- a/level_3/controller/c/entry/private-entry_print.c +++ b/level_3/controller/c/entry/private-entry_print.c @@ -108,7 +108,7 @@ extern "C" { #endif // _di_controller_entry_print_error_cache_ #ifndef _di_controller_entry_print_error_file_ - void controller_entry_print_error_file(const bool is_entry, const fl_print_t print, const controller_cache_action_t cache, const f_status_t status, const f_string_t function, const bool fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type, controller_thread_t *thread) { + void controller_entry_print_error_file(const bool is_entry, const fl_print_t print, const controller_cache_action_t cache, const f_status_t status, const f_string_t function, const uint8_t flag, const f_string_static_t name, const f_string_static_t operation, const uint8_t type, controller_thread_t *thread) { if (print.verbosity == f_console_verbosity_quiet_e) return; if (status == F_interrupt) return; @@ -116,7 +116,7 @@ extern "C" { // fll_error_file_print() automatically locks, so manually handle only the mutex locking and flushing rather than calling controller_lock_print(). f_thread_mutex_lock(&thread->lock.print); - fll_error_file_print(print, status, function, fallback, name, operation, type); + fll_error_file_print(print, status, function, flag, name, operation, type); f_file_stream_lock(print.to); diff --git a/level_3/controller/c/entry/private-entry_print.h b/level_3/controller/c/entry/private-entry_print.h index 5da712e..30bbb27 100644 --- a/level_3/controller/c/entry/private-entry_print.h +++ b/level_3/controller/c/entry/private-entry_print.h @@ -132,8 +132,8 @@ extern "C" { * @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. + * @param flag + * One of the fll_error_file_flag_*_e flags. * @param name * The name of the file or directory. * @param operation @@ -147,7 +147,7 @@ extern "C" { * @see controller_entry_print_error_cache() */ #ifndef _di_controller_entry_print_error_file_ - extern void controller_entry_print_error_file(const bool is_entry, const fl_print_t print, const controller_cache_action_t cache, const f_status_t status, const f_string_t function, const bool fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type, controller_thread_t *thread) F_attribute_visibility_internal_d; + extern void controller_entry_print_error_file(const bool is_entry, const fl_print_t print, const controller_cache_action_t cache, const f_status_t status, const f_string_t function, const uint8_t flag, const f_string_static_t name, const f_string_static_t operation, const uint8_t type, controller_thread_t *thread) F_attribute_visibility_internal_d; #endif // _di_controller_entry_print_error_file_ /** diff --git a/level_3/controller/c/thread/private-thread.c b/level_3/controller/c/thread/private-thread.c index 27f3447..552718a 100644 --- a/level_3/controller/c/thread/private-thread.c +++ b/level_3/controller/c/thread/private-thread.c @@ -192,7 +192,7 @@ extern "C" { if (F_status_is_error(status)) { if (main->error.verbosity > f_console_verbosity_quiet_e) { - fll_error_print(main->error, status, "controller_lock_create", F_true); + fll_error_print(main->error, status, "controller_lock_create", fll_error_file_flag_fallback_e); } } else { diff --git a/level_3/fake/c/main/make/operate_validate_type.c b/level_3/fake/c/main/make/operate_validate_type.c index c5cbb8e..39802cd 100644 --- a/level_3/fake/c/main/make/operate_validate_type.c +++ b/level_3/fake/c/main/make/operate_validate_type.c @@ -3,6 +3,7 @@ #include "../make.h" #include "operate_validate.h" #include "operate_validate_type.h" +#include "print-error.h" #ifdef __cplusplus extern "C" { @@ -20,16 +21,7 @@ extern "C" { if (data_make->cache_arguments.used) { if (fl_string_dynamic_compare(fake_make_operation_argument_success_s, data_make->cache_arguments.array[0]) == F_equal_to_not) { if (fl_string_dynamic_compare(fake_make_operation_argument_failure_s, data_make->cache_arguments.array[0]) == F_equal_to_not) { - - if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { - f_file_stream_lock(data_make->main->error.to); - - fl_print_format("%r%[%QUnsupported break type '%]", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->main->error.to, data_make->error.notable, data_make->cache_arguments.array[0], data_make->error.notable); - fl_print_format("%['.%]%r", data_make->main->error.to, data_make->error.context, data_make->error.context, f_string_eol_s); - - f_file_stream_unlock(data_make->main->error.to); - } + fake_make_print_error_unsupported_type(data_make->setting, data_make->main->error, fake_make_operation_break_s, data_make->cache_arguments.array[0]); return F_status_set_error(F_failure); } @@ -57,44 +49,20 @@ extern "C" { const f_status_t status = f_file_is(path_file, F_file_type_regular_d, F_false); - if (status == F_file_found_not) { - if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { - f_file_stream_lock(data_make->main->error.to); - - fl_print_format("%r%[%QFailed to find file '%]", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->main->error.to, data_make->error.notable, path_file, data_make->error.notable); - fl_print_format("%['.%]%r", data_make->main->error.to, data_make->error.context, data_make->error.context, f_string_eol_s); - - f_file_stream_unlock(data_make->main->error.to); - } - - return F_status_set_error(F_failure); - } - - if (F_status_is_error(status)) { - fake_print_error_file(data_make->setting, data_make->main->error, status, macro_fake_f(f_file_is), path_file, f_file_operation_find_s, fll_error_file_type_file_e); + if (status == F_file_found_not || F_status_is_error(status)) { + fake_print_error_file_simple(data_make->setting, data_make->main->error, status, macro_fake_f(f_file_is), path_file, f_file_operation_find_s, fll_error_file_type_file_e); return F_status_set_error(F_failure); } if (!status) { - if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { - f_file_stream_lock(data_make->main->error.to); - - fl_print_format("%r%[%QThe file '%]", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->main->error.to, data_make->error.notable, path_file, data_make->error.notable); - fl_print_format("%[' must be a regular file.%]%r", data_make->main->error.to, data_make->error.context, data_make->error.context, f_string_eol_s); - - f_file_stream_unlock(data_make->main->error.to); - } + fake_make_print_error_file_type(data_make->setting, data_make->main->message, f_file_type_name_regular_s, path_file); return F_status_set_error(F_failure); } } else { - if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { - fll_print_format("%r%[QFilename argument must not be an empty string.%]%r", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context, f_string_eol_s); - } + fake_make_print_error_file_name_empty(data_make->setting, data_make->main->error); return F_status_set_error(F_failure); } @@ -138,15 +106,7 @@ extern "C" { for (f_array_length_t i = 0; i < data_make->cache_arguments.used - 1; ++i) { if (f_file_exists(data_make->cache_arguments.array[i], F_true) != F_true) { - if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { - f_file_stream_lock(data_make->main->error.to); - - fl_print_format("%r%[%QFailed to find file '%]", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->main->error.to, data_make->error.notable, data_make->cache_arguments.array[i], data_make->error.notable); - fl_print_format("%['.%]%r", data_make->main->error.to, data_make->error.context, data_make->error.context, f_string_eol_s); - - f_file_stream_unlock(data_make->main->error.to); - } + fake_print_error_file_simple(data_make->setting, data_make->main->error, status, macro_fake_f(f_file_is), data_make->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e); status = F_status_set_error(F_failure); } @@ -158,15 +118,7 @@ extern "C" { status_file = f_directory_is(data_make->cache_arguments.array[data_make->cache_arguments.used - 1]); if (status_file == F_false || status_file == F_file_found_not) { - if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { - f_file_stream_lock(data_make->main->error.to); - - fl_print_format("%r%[%QThe last file '%]", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->main->error.to, data_make->error.notable, data_make->cache_arguments.array[data_make->cache_arguments.used - 1], data_make->error.notable); - fl_print_format("%[' must be a valid directory.%]%r", data_make->main->error.to, data_make->error.context, data_make->error.context, f_string_eol_s); - - f_file_stream_unlock(data_make->main->error.to); - } + fake_make_print_error_content_not_directory(data_make->setting, data_make->main->error, "last", data_make->cache_arguments.array[data_make->cache_arguments.used - 1]); status = F_status_set_error(F_failure); } @@ -186,15 +138,7 @@ extern "C" { status_file = f_directory_is(data_make->cache_arguments.array[1]); if (status_file == F_false) { - if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { - f_file_stream_lock(data_make->main->error.to); - - fl_print_format("%r%[%QThe second file '%]", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->main->error.to, data_make->error.notable, data_make->cache_arguments.array[1], data_make->error.notable); - fl_print_format("%[' must be a valid directory.%]%r", data_make->main->error.to, data_make->error.context, data_make->error.context, f_string_eol_s); - - f_file_stream_unlock(data_make->main->error.to); - } + fake_make_print_error_content_not_directory(data_make->setting, data_make->main->error, "second", data_make->cache_arguments.array[1]); status = F_status_set_error(F_failure); } @@ -220,15 +164,7 @@ extern "C" { } if (data_make->setting_build.build_compiler.used) { - if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { - f_file_stream_lock(data_make->main->error.to); - - fl_print_format("%r%[%QNo compiler has been specified, cannot perform '%]", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%r%]", data_make->main->error.to, data_make->error.notable, fake_make_operation_compile_s, data_make->error.notable); - fl_print_format("%[' section operation.%]%r", data_make->main->error.to, data_make->error.context, data_make->error.context, f_string_eol_s); - - f_file_stream_unlock(data_make->main->error.to); - } + fake_make_print_error_compiler_not_specified(data_make->setting, data_make->main->error, fake_make_operation_compile_s); return F_status_set_error(F_failure); } @@ -242,38 +178,14 @@ extern "C" { if (state_process->operation == fake_make_operation_type_if_e) { if (state_process->operation_previous == fake_make_operation_type_if_e) { - if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { - f_file_stream_lock(data_make->main->error.to); - - fl_print_format("%r%[%QMust not be used immediately after another '%]", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%r%]", data_make->main->error.to, data_make->error.notable, fake_make_operation_if_s, data_make->error.notable); - fl_print_format("%[', '%]", data_make->main->error.to, data_make->error.context, data_make->error.context); - fl_print_format("%[%r%]", data_make->main->error.to, data_make->error.notable, fake_make_operation_and_s, data_make->error.notable); - fl_print_format("%[', or '%]", data_make->main->error.to, data_make->error.context, data_make->error.context); - fl_print_format("%[%r%]", data_make->main->error.to, data_make->error.notable, fake_make_operation_or_s, data_make->error.notable); - fl_print_format("%[' section operation.%]%r", data_make->main->error.to, data_make->error.context, data_make->error.context, f_string_eol_s); - - f_file_stream_unlock(data_make->main->error.to); - } + fake_make_print_error_not_after_condition(data_make->setting, data_make->main->error, "Must not be"); return F_status_set_error(F_failure); } } else { if (!(state_process->operation_previous == fake_make_operation_type_if_e || state_process->operation_previous == fake_make_operation_type_and_e || state_process->operation_previous == fake_make_operation_type_or_e)) { - if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { - f_file_stream_lock(data_make->main->error.to); - - fl_print_format("%r%[%QMay only be used immediately after another '%]", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%r%]", data_make->main->error.to, data_make->error.notable, fake_make_operation_if_s, data_make->error.notable); - fl_print_format("%[', '%]", data_make->main->error.to, data_make->error.context, data_make->error.context); - fl_print_format("%[%r%]", data_make->main->error.to, data_make->error.notable, fake_make_operation_and_s, data_make->error.notable); - fl_print_format("%[', or '%]", data_make->main->error.to, data_make->error.context, data_make->error.context); - fl_print_format("%[%r%]", data_make->main->error.to, data_make->error.notable, fake_make_operation_or_s, data_make->error.notable); - fl_print_format("%[' section operation.%]%r", data_make->main->error.to, data_make->error.context, data_make->error.context, f_string_eol_s); - - f_file_stream_unlock(data_make->main->error.to); - } + fake_make_print_error_not_after_condition(data_make->setting, data_make->main->error, "May only be"); return F_status_set_error(F_failure); } @@ -422,17 +334,7 @@ extern "C" { } // for if (i == 23) { - if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { - f_file_stream_lock(data_make->main->error.to); - - fl_print_format("%r%[%QUnsupported '%]", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%r%]", data_make->main->error.to, data_make->error.notable, if_and_or, data_make->error.notable); - fl_print_format("%[' type '%]", data_make->main->error.to, data_make->error.context, data_make->error.context); - fl_print_format("%[%Q%]", data_make->main->error.to, data_make->error.notable, data_make->cache_arguments.array[k], data_make->error.notable); - fl_print_format("%['.%]%r", data_make->main->error.to, data_make->error.context, data_make->error.context, f_string_eol_s); - - f_file_stream_unlock(data_make->main->error.to); - } + fake_make_print_error_unsupported_type(data_make->setting, data_make->main->error, if_and_or, data_make->cache_arguments.array[k]); return F_status_set_error(F_failure); } @@ -459,17 +361,7 @@ extern "C" { } // for if (j == 7) { - if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { - f_file_stream_lock(data_make->main->error.to); - - fl_print_format("%r%[%QUnsupported '%]", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%r%]", data_make->main->error.to, data_make->error.notable, if_and_or, data_make->error.notable); - fl_print_format("%[' not type '%]", data_make->main->error.to, data_make->error.context, data_make->error.context); - fl_print_format("%[%Q%]", data_make->main->error.to, data_make->error.notable, data_make->cache_arguments.array[k], data_make->error.notable); - fl_print_format("%['.%]%r", data_make->main->error.to, data_make->error.context, data_make->error.context, f_string_eol_s); - - f_file_stream_unlock(data_make->main->error.to); - } + fake_make_print_error_unsupported_type(data_make->setting, data_make->main->error, if_and_or, data_make->cache_arguments.array[k]); return F_status_set_error(F_failure); } @@ -510,14 +402,19 @@ extern "C" { if (state_process->condition == fake_make_operation_if_type_if_mode_e || state_process->condition == fake_make_operation_if_type_if_not_mode_e) { if (fl_string_dynamic_compare(fake_make_operation_argument_is_s, data_make->cache_arguments.array[k]) == F_equal_to_not) { if (fl_string_dynamic_compare(fake_make_operation_argument_has_s, data_make->cache_arguments.array[k]) == F_equal_to_not) { - if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { - f_file_stream_lock(data_make->main->error.to); - fl_print_format("%r%[%QUnsupported %smode type '%]", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, j == 6 ? "" : "not ", data_make->error.context); - fl_print_format("%[%Q%]", data_make->main->error.to, data_make->error.notable, data_make->cache_arguments.array[k], data_make->error.notable); - fl_print_format("%['.%]%r", data_make->main->error.to, data_make->error.context, data_make->error.context, f_string_eol_s); + if (j == 6) { + fake_make_print_error_unsupported_type(data_make->setting, data_make->main->error, fake_make_operation_mode_s, data_make->cache_arguments.array[k]); + } + else { + f_char_t message[4 + fake_make_operation_mode_s.used + 1]; + message[4 + fake_make_operation_mode_s.used] = 0; + memcpy(message, "not ", 4 * sizeof(f_char_t)); + memcpy(message + 4, fake_make_operation_mode_s.string, fake_make_operation_mode_s.used * sizeof(f_char_t)); + + f_string_static_t message_s = macro_f_string_static_t_initialize(message, 0, 4 + fake_make_operation_mode_s.used); - f_file_stream_unlock(data_make->main->error.to); + fake_make_print_error_unsupported_type(data_make->setting, data_make->main->error, message_s, data_make->cache_arguments.array[k]); } return F_status_set_error(F_failure); @@ -580,15 +477,7 @@ extern "C" { type_file |= 0x40; } else { - if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { - f_file_stream_lock(data_make->main->error.to); - - fl_print_format("%r%[%QUnsupported file type '%]", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->main->error.to, data_make->error.notable, data_make->cache_arguments.array[i], data_make->error.notable); - fl_print_format("%['.%]%r", data_make->main->error.to, data_make->error.context, data_make->error.context, f_string_eol_s); - - f_file_stream_unlock(data_make->main->error.to); - } + fake_make_print_error_unsupported_type(data_make->setting, data_make->main->error, f_file_type_name_file_s, data_make->cache_arguments.array[i]); type_file |= 0x80; } @@ -615,7 +504,7 @@ extern "C" { status_file = fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[i]); if (F_status_is_error(status_file)) { - fake_print_message_section_operation_path_outside(data_make->setting, data_make->error, F_status_set_fine(status_file), "fake_make_assure_inside_project", data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]); + fake_print_message_section_operation_path_outside(data_make->setting, data_make->error, F_status_set_fine(status_file), macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]); status = F_status_set_error(F_failure); } @@ -681,21 +570,11 @@ extern "C" { if (F_status_is_error(status_number)) { status = F_status_set_error(F_failure); - if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { - f_file_stream_lock(data_make->main->error.to); - - if (number > F_number_t_size_unsigned_d) { - fl_print_format("%r%[%QThe number '%]", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->main->error.to, data_make->error.notable, data_make->cache_arguments.array[i], data_make->error.notable); - fl_print_format("%[' may only be between the ranges -%un to %un.%]%r", data_make->main->error.to, data_make->error.context, F_number_t_size_unsigned_d, F_number_t_size_unsigned_d, data_make->error.context, f_string_eol_s); - } - else { - fl_print_format("%r%[%QInvalid or unsupported number provided '%]", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->main->error.to, data_make->error.notable, data_make->cache_arguments.array[i], data_make->error.notable); - fl_print_format("%['.%]%r", data_make->main->error.to, data_make->error.context, data_make->error.context, f_string_eol_s); - } - - f_file_stream_unlock(data_make->main->error.to); + if (number > F_number_t_size_unsigned_d) { + fake_make_print_error_out_of_range_number(data_make->setting, data_make->main->error, data_make->cache_arguments.array[i], F_number_t_size_unsigned_d, F_number_t_size_unsigned_d); + } + else { + fake_make_print_error_unsupported_number(data_make->setting, data_make->main->error, data_make->cache_arguments.array[i]); } } } // for @@ -734,15 +613,7 @@ extern "C" { for (f_array_length_t i = 0; i < data_make->cache_arguments.used - 1; ++i) { if (f_file_exists(data_make->cache_arguments.array[i], F_true) != F_true) { - if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { - f_file_stream_lock(data_make->main->error.to); - - fl_print_format("%r%[%QFailed to find file '%]", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->main->error.to, data_make->error.notable, data_make->cache_arguments.array[i], data_make->error.notable); - fl_print_format("%['.%]%r", data_make->main->error.to, data_make->error.context, data_make->error.context, f_string_eol_s); - - f_file_stream_unlock(data_make->main->error.to); - } + fake_print_error_file_simple(data_make->setting, data_make->main->error, status, macro_fake_f(f_file_is), data_make->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e); status = F_status_set_error(F_failure); } @@ -754,6 +625,8 @@ extern "C" { status_file = f_directory_is(data_make->cache_arguments.array[data_make->cache_arguments.used - 1]); if (status_file == F_false || status_file == F_file_found_not) { + //fake_make_print_operate_set_path_verbose(data_make->setting, data_make->main->error, f_string_empty_s); + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { f_file_stream_lock(data_make->main->error.to); @@ -782,6 +655,8 @@ extern "C" { status_file = f_directory_is(data_make->cache_arguments.array[1]); if (status_file == F_false) { + //fake_make_print_operate_set_path_verbose(data_make->setting, data_make->main->error, f_string_empty_s); + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { f_file_stream_lock(data_make->main->error.to); @@ -813,6 +688,8 @@ extern "C" { const f_status_t status = fake_make_operate_validate_define_name(data_make->cache_arguments.array[0]); if (status == F_none) { + //fake_make_print_operate_set_path_verbose(data_make->setting, data_make->main->error, f_string_empty_s); + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { fll_print_format("%r%[%QDefine name must not be an empty string.%]%r", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context, f_string_eol_s); } @@ -821,6 +698,8 @@ extern "C" { } if (status == F_false) { + //fake_make_print_operate_set_path_verbose(data_make->setting, data_make->main->error, f_string_empty_s); + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { f_file_stream_lock(data_make->main->error.to); @@ -874,6 +753,8 @@ extern "C" { f_status_t fake_make_operate_validate_type_else(fake_make_data_t * const data_make, fake_state_process_t * const state_process) { if (state_process->operation_previous == fake_make_operation_type_else_e) { + //fake_make_print_operate_set_path_verbose(data_make->setting, data_make->main->error, f_string_empty_s); + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { f_file_stream_lock(data_make->main->error.to); @@ -888,6 +769,8 @@ extern "C" { } if (state_process->operation_previous == fake_make_operation_type_if_e || state_process->operation_previous == fake_make_operation_type_and_e || state_process->operation_previous == fake_make_operation_type_or_e) { + //fake_make_print_operate_set_path_verbose(data_make->setting, data_make->main->error, f_string_empty_s); + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { f_file_stream_lock(data_make->main->error.to); @@ -906,6 +789,8 @@ extern "C" { } if (!state_process->block) { + //fake_make_print_operate_set_path_verbose(data_make->setting, data_make->main->error, f_string_empty_s); + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { fl_print_format("%r%[%QHas no preceding '%]", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); fl_print_format("%[%r%]", data_make->main->error.to, data_make->error.notable, fake_make_operation_if_s, data_make->error.notable); @@ -941,15 +826,7 @@ extern "C" { if (data_make->cache_arguments.used) { if (fl_string_dynamic_compare(fake_make_operation_argument_success_s, data_make->cache_arguments.array[0]) == F_equal_to_not) { if (fl_string_dynamic_compare(fake_make_operation_argument_failure_s, data_make->cache_arguments.array[0]) == F_equal_to_not) { - if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { - f_file_stream_lock(data_make->main->error.to); - - fl_print_format("%r%[%QUnsupported exit type '%]", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->main->error.to, data_make->error.notable, data_make->cache_arguments.array[0], data_make->error.notable); - fl_print_format("%['.%]%r", data_make->main->error.to, data_make->error.context, data_make->error.context, f_string_eol_s); - - f_file_stream_unlock(data_make->main->error.to); - } + fake_make_print_error_unsupported_type(data_make->setting, data_make->main->error, fake_make_operation_exit_s, data_make->cache_arguments.array[0]); return F_status_set_error(F_failure); } @@ -967,15 +844,7 @@ extern "C" { if (fl_string_dynamic_compare(fake_make_operation_argument_exit_s, data_make->cache_arguments.array[0]) == F_equal_to_not) { if (fl_string_dynamic_compare(fake_make_operation_argument_warn_s, data_make->cache_arguments.array[0]) == F_equal_to_not) { if (fl_string_dynamic_compare(fake_make_operation_argument_ignore_s, data_make->cache_arguments.array[0]) == F_equal_to_not) { - if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { - f_file_stream_lock(data_make->main->error.to); - - fl_print_format("%r%[%QUnsupported fail type '%]", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->main->error.to, data_make->error.notable, data_make->cache_arguments.array[0], data_make->error.notable); - fl_print_format("%['.%]%r", data_make->main->error.to, data_make->error.context, data_make->error.context, f_string_eol_s); - - f_file_stream_unlock(data_make->main->error.to); - } + fake_make_print_error_unsupported_type(data_make->setting, data_make->main->error, fake_make_operation_fail_s, data_make->cache_arguments.array[0]); return F_status_set_error(F_failure); } @@ -1001,6 +870,8 @@ extern "C" { } if (!data_make->setting_build.build_indexer.used) { + //fake_make_print_operate_set_path_verbose(data_make->setting, data_make->main->error, f_string_empty_s); + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { f_file_stream_lock(data_make->main->error.to); @@ -1162,6 +1033,8 @@ extern "C" { } } else { + //fake_make_print_operate_set_path_verbose(data_make->setting, data_make->main->error, f_string_empty_s); + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { fll_print_format("%r%[%QTarget filename argument must not be an empty string.%]%r", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context, f_string_eol_s); } @@ -1201,15 +1074,7 @@ extern "C" { for (f_array_length_t i = 0; i < data_make->cache_arguments.used - 1; ++i) { if (f_file_exists(data_make->cache_arguments.array[i], F_true) != F_true) { - if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { - f_file_stream_lock(data_make->main->error.to); - - fl_print_format("%r%[%QFailed to find file '%]", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->main->error.to, data_make->error.notable, data_make->cache_arguments.array[i], data_make->error.notable); - fl_print_format("%['.%]%r", data_make->main->error.to, data_make->error.context, data_make->error.context, f_string_eol_s); - - f_file_stream_unlock(data_make->main->error.to); - } + fake_print_error_file_simple(data_make->setting, data_make->main->error, status, macro_fake_f(f_file_is), data_make->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e); status = F_status_set_error(F_failure); } @@ -1225,15 +1090,7 @@ extern "C" { status = f_directory_is(data_make->cache_arguments.array[data_make->cache_arguments.used - 1]); if (status == F_false || status == F_file_found_not) { - if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { - f_file_stream_lock(data_make->main->error.to); - - fl_print_format("%r%[%QThe last file '%]", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->main->error.to, data_make->error.notable, data_make->cache_arguments.array[data_make->cache_arguments.used - 1], data_make->error.notable); - fl_print_format("%[' must be a valid directory.%]%r", data_make->main->error.to, data_make->error.context, data_make->error.context, f_string_eol_s); - - f_file_stream_unlock(data_make->main->error.to); - } + fake_make_print_error_content_not_directory(data_make->setting, data_make->main->error, "last", data_make->cache_arguments.array[data_make->cache_arguments.used - 1]); return F_status_set_error(F_failure); } @@ -1253,15 +1110,7 @@ extern "C" { status = f_directory_is(data_make->cache_arguments.array[1]); if (status == F_false) { - if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { - f_file_stream_lock(data_make->main->error.to); - - fl_print_format("%r%[%QThe second file '%]", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->main->error.to, data_make->error.notable, data_make->cache_arguments.array[1], data_make->error.notable); - fl_print_format("%[' must be a valid directory.%]%r", data_make->main->error.to, data_make->error.context, data_make->error.context, f_string_eol_s); - - f_file_stream_unlock(data_make->main->error.to); - } + fake_make_print_error_content_not_directory(data_make->setting, data_make->main->error, "second", data_make->cache_arguments.array[1]); return F_status_set_error(F_failure); } @@ -1297,6 +1146,8 @@ extern "C" { } // for if (id_section == data_make->fakefile.used) { + //fake_make_print_operate_set_path_verbose(data_make->setting, data_make->main->error, f_string_empty_s); + f_file_stream_lock(data_make->main->error.to); fl_print_format("%r%[%QNo operation section named '%]", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); @@ -1311,6 +1162,8 @@ extern "C" { for (f_array_length_t i = 0; i < section_stack->used; ++i) { if (section_stack->array[i] == id_section) { + //fake_make_print_operate_set_path_verbose(data_make->setting, data_make->main->error, f_string_empty_s); + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { f_file_stream_lock(data_make->main->error.to); @@ -1379,6 +1232,8 @@ extern "C" { for (f_array_length_t i = 0; i < 33; ++i) { if (fl_string_dynamic_compare(reserved_name[i], data_make->cache_arguments.array[0]) == F_equal_to) { + //fake_make_print_operate_set_path_verbose(data_make->setting, data_make->main->error, f_string_empty_s); + fll_print_format("%r%[%QCannot assign a value to the parameter name '%r' because it is a reserved parameter name.%]%r", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, reserved_name[i], data_make->error.context, f_string_eol_s); status = F_status_set_error(F_failure); @@ -1415,15 +1270,7 @@ extern "C" { status_file = f_file_is(data_make->cache_arguments.array[i], F_file_type_regular_d, F_false); if (status_file == F_file_found_not) { - if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { - f_file_stream_lock(data_make->main->error.to); - - fl_print_format("%r%[%QFailed to find file '%]", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->main->error.to, data_make->error.notable, data_make->cache_arguments.array[i], data_make->error.notable); - fl_print_format("%['.%]%r", data_make->main->error.to, data_make->error.context, data_make->error.context, f_string_eol_s); - - f_file_stream_unlock(data_make->main->error.to); - } + fake_print_error_file_simple(data_make->setting, data_make->main->error, status, macro_fake_f(f_file_is), data_make->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e); status = F_status_set_error(F_failure); } @@ -1457,6 +1304,8 @@ extern "C" { } if (data_make->path.stack.used == 1) { + //fake_make_print_operate_set_path_verbose(data_make->setting, data_make->main->error, f_string_empty_s); + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { fll_print_format("%r%[%QMust not attempt to pop project root off of path stack.%]%r", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context, f_string_eol_s); } @@ -1495,15 +1344,7 @@ extern "C" { const f_status_t status = f_file_is(data_make->cache_arguments.array[0], F_file_type_directory_d, F_false); if (status == F_file_found_not) { - if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { - f_file_stream_lock(data_make->main->error.to); - - fl_print_format("%r%[%QFailed to find file '%]", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->main->error.to, data_make->error.notable, data_make->cache_arguments.array[0], data_make->error.notable); - fl_print_format("%['.%]%r", data_make->main->error.to, data_make->error.context, data_make->error.context, f_string_eol_s); - - f_file_stream_unlock(data_make->main->error.to); - } + fake_print_error_file_simple(data_make->setting, data_make->main->error, status, macro_fake_f(f_file_is), data_make->cache_arguments.array[0], f_file_operation_find_s, fll_error_file_type_file_e); return F_status_set_error(F_failure); } @@ -1517,6 +1358,8 @@ extern "C" { } if (!status) { + //fake_make_print_operate_set_path_verbose(data_make->setting, data_make->main->error, f_string_empty_s); + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { f_file_stream_lock(data_make->main->error.to); @@ -1533,6 +1376,8 @@ extern "C" { return F_none; } + //fake_make_print_operate_set_path_verbose(data_make->setting, data_make->main->error, f_string_empty_s); + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { fll_print_format("%r%[%QFilename argument must not be an empty string.%]%r", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context, f_string_eol_s); } @@ -1552,16 +1397,7 @@ extern "C" { if (data_make->cache_arguments.used > 1) { if (fl_string_dynamic_compare(fake_make_operation_argument_file_s, data_make->cache_arguments.array[0]) == F_equal_to_not) { if (fl_string_dynamic_compare(fake_make_operation_argument_directory_s, data_make->cache_arguments.array[0]) == F_equal_to_not) { - - if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { - f_file_stream_lock(data_make->main->error.to); - - fl_print_format("%r%[%QUnsupported file type '%]", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->main->error.to, data_make->error.notable, data_make->cache_arguments.array[0], data_make->error.notable); - fl_print_format("%['.%]%r", data_make->main->error.to, data_make->error.context, data_make->error.context, f_string_eol_s); - - f_file_stream_unlock(data_make->main->error.to); - } + fake_make_print_error_unsupported_type(data_make->setting, data_make->main->error, f_file_type_name_file_s, data_make->cache_arguments.array[0]); return F_status_set_error(F_failure); } diff --git a/level_3/fake/c/main/make/print-error.c b/level_3/fake/c/main/make/print-error.c index 78d9238..a0380ab 100644 --- a/level_3/fake/c/main/make/print-error.c +++ b/level_3/fake/c/main/make/print-error.c @@ -24,6 +24,44 @@ extern "C" { } #endif // _di_fake_make_print_error_argument_invalid_section_ +#ifndef _di_fake_make_print_error_compiler_not_specified_ + f_status_t fake_make_print_error_compiler_not_specified(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t action) { + + if (print.verbosity < f_console_verbosity_error_e) return F_output_not; + + f_file_stream_lock(print.to); + + fake_print_line_first_unlocked(setting, print); + + fl_print_format("%[%QNo compiler has been specified, cannot perform '%]", print.to, print.context, print.prefix, print.context); + fl_print_format("%[%Q%]", print.to, print.notable, action, print.notable); + fl_print_format("%[' section operation.%]%r", print.to, print.context, print.context, f_string_eol_s); + + f_file_stream_unlock(print.to); + + return F_none; + } +#endif // _di_fake_make_print_error_compiler_not_specified_ + +#ifndef _di_fake_make_print_error_content_not_directory_ + f_status_t fake_make_print_error_content_not_directory(fake_setting_t * const setting, const fl_print_t print, const f_string_t content, const f_string_static_t file) { + + if (print.verbosity < f_console_verbosity_error_e) return F_output_not; + + f_file_stream_lock(print.to); + + fake_print_line_first_unlocked(setting, print); + + fl_print_format("%[%QThe %S content '%]", print.to, print.context, print.prefix, content, print.context); + fl_print_format("%[%Q%]", print.to, print.notable, file, print.notable); + fl_print_format("%[' must be a valid directory.%]%r", print.to, print.context, print.context, f_string_eol_s); + + f_file_stream_unlock(print.to); + + return F_none; + } +#endif // _di_fake_make_print_error_content_not_directory_ + #ifndef _di_fake_make_print_error_define_invalid_character_ f_status_t fake_make_print_error_define_invalid_character(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t name) { @@ -64,6 +102,65 @@ extern "C" { } #endif // _di_fake_make_print_error_fakefile_section_missing_ +#ifndef _di_fake_make_print_error_file_name_empty_ + f_status_t fake_make_print_error_file_name_empty(fake_setting_t * const setting, const fl_print_t print) { + + if (print.verbosity < f_console_verbosity_error_e) return F_output_not; + + f_file_stream_lock(print.to); + + fake_print_line_first_unlocked(setting, print); + + fll_print_format("%[%QFilename argument must not be an empty string.%]%r", print.to, print.context, print.prefix, print.context, f_string_eol_s); + + f_file_stream_unlock(print.to); + + return F_none; + } +#endif // _di_fake_make_print_error_file_name_empty_ + +#ifndef _di_fake_make_print_error_file_type_ + f_status_t fake_make_print_error_file_type(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t type, const f_string_static_t file) { + + if (print.verbosity < f_console_verbosity_error_e) return F_output_not; + + f_file_stream_lock(print.to); + + fake_print_line_first_unlocked(setting, print); + + fl_print_format("%[%QThe file '%]", print.to, print.context, print.prefix, print.context); + fl_print_format("%[%Q%]", print.to, print.notable, file, print.notable); + fl_print_format("%[' must be a %Q file.%]%r", print.to, print.context, print.context, type, f_string_eol_s); + + f_file_stream_unlock(print.to); + + return F_none; + } +#endif // _di_fake_make_print_error_file_type_ + +#ifndef _di_fake_make_print_error_not_after_condition_ + f_status_t fake_make_print_error_not_after_condition(fake_setting_t * const setting, const fl_print_t print, const f_string_t message) { + + if (print.verbosity < f_console_verbosity_error_e) return F_output_not; + + f_file_stream_lock(print.to); + + fake_print_line_first_unlocked(setting, print); + + fl_print_format("%[%Q%S used immediately after another '%]", print.to, print.context, print.prefix, message, print.context); + fl_print_format("%[%r%]", print.to, print.notable, fake_make_operation_if_s, print.notable); + fl_print_format("%[', '%]", print.to, print.context, print.context); + fl_print_format("%[%r%]", print.to, print.notable, fake_make_operation_and_s, print.notable); + fl_print_format("%[', or '%]", print.to, print.context, print.context); + fl_print_format("%[%r%]", print.to, print.notable, fake_make_operation_or_s, print.notable); + fl_print_format("%[' section operation.%]%r", print.to, print.context, print.context, f_string_eol_s); + + f_file_stream_unlock(print.to); + + return F_none; + } +#endif // _di_fake_make_print_error_not_after_condition_ + #ifndef _di_fake_make_print_error_operation_incomplete_ f_status_t fake_make_print_error_operation_incomplete(fake_setting_t * const setting, const fl_print_t print, const uint8_t operation) { @@ -96,6 +193,25 @@ extern "C" { } #endif // _di_fake_make_print_error_operation_incomplete_ +#ifndef _di_fake_make_print_error_out_of_range_number_ + f_status_t fake_make_print_error_out_of_range_number(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t number, const f_number_unsigned_t minimum, const f_number_unsigned_t maximum) { + + if (print.verbosity < f_console_verbosity_error_e) return F_output_not; + + f_file_stream_lock(print.to); + + fake_print_line_first_unlocked(setting, print); + + fl_print_format("%[%QThe number '%]", print.to, print.context, print.prefix, print.context); + fl_print_format("%[%Q%]", print.to, print.notable, number, print.notable); + fl_print_format("%[' may only be between the ranges -%un to %un.%]%r", print.to, print.context, minimum, maximum, print.context, f_string_eol_s); + + f_file_stream_unlock(print.to); + + return F_none; + } +#endif // _di_fake_make_print_error_out_of_range_number_ + #ifndef _di_fake_make_print_error_program_failed_ f_status_t fake_make_print_error_program_failed(fake_setting_t * const setting, const fl_print_t print, const int return_code) { @@ -103,6 +219,8 @@ extern "C" { f_file_stream_lock(print.to); + fake_print_line_first_unlocked(setting, print); + fl_print_format("%[%QFailed with return code %]", print.to, print.context, print.prefix, print.context); fl_print_format("%[%i%]", print.to, print.notable, return_code, print.notable); fl_print_format("%[.%]%r", print.to, print.context, print.context, f_string_eol_s); @@ -120,6 +238,8 @@ extern "C" { f_file_stream_lock(print.to); + fake_print_line_first_unlocked(setting, print); + fl_print_format("%[%QFailed to find program '%]", print.to, print.context, print.prefix, print.context); fl_print_format("%[%Q%]", print.to, print.notable, program, print.notable); fl_print_format("%[' for executing.%]%r", print.to, print.context, print.context, f_string_eol_s); @@ -130,6 +250,44 @@ extern "C" { } #endif // _di_fake_make_print_error_program_not_found_ +#ifndef _di_fake_make_print_error_unsupported_number_ + f_status_t fake_make_print_error_unsupported_number(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t number) { + + if (print.verbosity < f_console_verbosity_error_e) return F_output_not; + + f_file_stream_lock(print.to); + + fake_print_line_first_unlocked(setting, print); + + fl_print_format("%[%QInvalid or unsupported number provided '%]", print.to, print.context, print.prefix, print.context); + fl_print_format("%[%Q%]", print.to, print.notable, number, print.notable); + fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s); + + f_file_stream_unlock(print.to); + + return F_none; + } +#endif // _di_fake_make_print_error_unsupported_number_ + +#ifndef _di_fake_make_print_error_unsupported_type_ + f_status_t fake_make_print_error_unsupported_type(fake_setting_t * const setting, const fl_print_t print, f_string_static_t type, const f_string_static_t value) { + + if (print.verbosity < f_console_verbosity_error_e) return F_output_not; + + f_file_stream_lock(print.to); + + fake_print_line_first_unlocked(setting, print); + + fl_print_format("%[%QUnsupported %Q type '%]", print.to, print.context, print.prefix, type, print.context); + fl_print_format("%[%Q%]", print.to, print.notable, value, print.notable); + fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s); + + f_file_stream_unlock(print.to); + + return F_none; + } +#endif // _di_fake_make_print_error_unsupported_type_ + #ifdef __cplusplus } // extern "C" #endif diff --git a/level_3/fake/c/main/make/print-error.h b/level_3/fake/c/main/make/print-error.h index c3ba456..cfd386c 100644 --- a/level_3/fake/c/main/make/print-error.h +++ b/level_3/fake/c/main/make/print-error.h @@ -38,6 +38,27 @@ extern "C" { #endif // _di_fake_make_print_error_argument_invalid_section_ /** + * Print error about a compiler not being specified. + * + * @param setting + * The main program settings. + * (Must be of type fake_setting_t.) + * + * This does not alter setting.status. + * @param print + * The output structure to print to. + * @param action + * The action that cannot be performed due to a lack of a compiler. + * + * @return + * F_none on success. + * F_output_not on success, but no printing is performed. + */ +#ifndef _di_fake_make_print_error_compiler_not_specified_ + extern f_status_t fake_make_print_error_compiler_not_specified(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t action); +#endif // _di_fake_make_print_error_compiler_not_specified_ + +/** * Print error about a define setting containing an invalid character. * * These only allow valid characters in an environment variable name. @@ -84,6 +105,96 @@ extern "C" { #endif // _di_fake_make_print_error_fakefile_section_missing_ /** + * Print error about a file name being an empty string. + * + * @param setting + * The main program settings. + * (Must be of type fake_setting_t.) + * + * This does not alter setting.status. + * @param print + * The output structure to print to. + * @param fakefile + * The name or path of the file that is empty. + * @param section + * The name of the missing section. + * + * @return + * F_none on success. + * F_output_not on success, but no printing is performed. + */ +#ifndef _di_fake_make_print_error_file_name_empty_ + extern f_status_t fake_make_print_error_file_name_empty(fake_setting_t * const setting, const fl_print_t print); +#endif // _di_fake_make_print_error_file_name_empty_ + +/** + * Print error about the second file not being of a directory. + * + * @param setting + * The main program settings. + * (Must be of type fake_setting_t.) + * + * This does not alter setting.status. + * @param print + * The output structure to print to. + * @param content + * A string representing which content. + * @param file + * The second content that should be a directory. + * + * @return + * F_none on success. + * F_output_not on success, but no printing is performed. + */ +#ifndef _di_fake_make_print_error_content_not_directory_ + extern f_status_t fake_make_print_error_content_not_directory(fake_setting_t * const setting, const fl_print_t print, const f_string_t content, const f_string_static_t file); +#endif // _di_fake_make_print_error_content_not_directory_ + +/** + * Print error about a file not being of a specific type. + * + * @param setting + * The main program settings. + * (Must be of type fake_setting_t.) + * + * This does not alter setting.status. + * @param print + * The output structure to print to. + * @param type + * The expected type of the file. + * @param file + * The file path or name. + * + * @return + * F_none on success. + * F_output_not on success, but no printing is performed. + */ +#ifndef _di_fake_make_print_error_file_type_ + extern f_status_t fake_make_print_error_file_type(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t type, const f_string_static_t file); +#endif // _di_fake_make_print_error_file_type_ + +/** + * Print error about how using something immediately after a condition statement. + * + * @param setting + * The main program settings. + * (Must be of type fake_setting_t.) + * + * This does not alter setting.status. + * @param print + * The output structure to print to. + * @param message + * The message describing how in relation to the after condition. + * + * @return + * F_none on success. + * F_output_not on success, but no printing is performed. + */ +#ifndef _di_fake_make_print_error_not_after_condition_ + extern f_status_t fake_make_print_error_not_after_condition(fake_setting_t * const setting, const fl_print_t print, const f_string_t message); +#endif // _di_fake_make_print_error_not_after_condition_ + +/** * Print error about an incomplete operation at the end of a section. * * @param setting @@ -105,6 +216,31 @@ extern "C" { #endif // _di_fake_make_print_error_operation_incomplete_ /** + * Print error about number being out of range. + * + * @param setting + * The main program settings. + * (Must be of type fake_setting_t.) + * + * This does not alter setting.status. + * @param print + * The output structure to print to. + * @param number + * The string representing the number. + * @param minimum + * The minimum number allowed, represented as a negative. + * @param maximum + * The number allowed, represented as a positive. + * + * @return + * F_none on success. + * F_output_not on success, but no printing is performed. + */ +#ifndef _di_fake_make_print_error_out_of_range_number_ + extern f_status_t fake_make_print_error_out_of_range_number(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t number, const f_number_unsigned_t minimum, const f_number_unsigned_t maximum); +#endif // _di_fake_make_print_error_out_of_range_number_ + +/** * Print error about program failed. * * @param setting @@ -146,6 +282,50 @@ extern "C" { extern f_status_t fake_make_print_error_program_not_found(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t program); #endif // _di_fake_make_print_error_program_not_found_ +/** + * Print error about number not being supported. + * + * @param setting + * The main program settings. + * (Must be of type fake_setting_t.) + * + * This does not alter setting.status. + * @param print + * The output structure to print to. + * @param number + * The string representing the number. + * + * @return + * F_none on success. + * F_output_not on success, but no printing is performed. + */ +#ifndef _di_fake_make_print_error_unsupported_number_ + extern f_status_t fake_make_print_error_unsupported_number(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t number); +#endif // _di_fake_make_print_error_unsupported_number_ + +/** + * Print error about type not being supported. + * + * @param setting + * The main program settings. + * (Must be of type fake_setting_t.) + * + * This does not alter setting.status. + * @param print + * The output structure to print to. + * @param type + * The string representing the type. + * @param value + * The value that is unsupported for the type. + * + * @return + * F_none on success. + * F_output_not on success, but no printing is performed. + */ +#ifndef _di_fake_make_print_error_unsupported_type_ + extern f_status_t fake_make_print_error_unsupported_type(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t type, const f_string_static_t value); +#endif // _di_fake_make_print_error_unsupported_type_ + #ifdef __cplusplus } // extern "C" #endif diff --git a/level_3/fake/c/main/print.c b/level_3/fake/c/main/print.c index 2dd31ca..69be1e6 100644 --- a/level_3/fake/c/main/print.c +++ b/level_3/fake/c/main/print.c @@ -11,7 +11,7 @@ extern "C" { fake_print_line_first_locked(setting, print); - fll_error_print(print, F_status_set_fine(status), function, F_true); + fll_error_print(print, F_status_set_fine(status), function, fll_error_file_flag_fallback_e); return F_none; } @@ -24,7 +24,7 @@ extern "C" { fake_print_line_first_locked(setting, print); - if (fll_error_print(print, F_status_set_fine(status), function, F_false) == F_known_not) return F_false; + if (fll_error_print(print, F_status_set_fine(status), function, fll_error_file_flag_none_e) == F_known_not) return F_false; return F_true; } @@ -37,12 +37,25 @@ extern "C" { fake_print_line_first_locked(setting, print); - fll_error_file_print(print, F_status_set_fine(status), function, F_true, name, operation, type); + fll_error_file_print(print, F_status_set_fine(status), function, fll_error_file_flag_fallback_e, name, operation, type); return F_none; } #endif // _di_fake_print_error_file_ +#ifndef _di_fake_print_error_file_simple_ + f_status_t fake_print_error_file_simple(fake_setting_t * const setting, const fl_print_t print, const f_status_t status, const f_string_t function, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) { + + if (print.verbosity < f_console_verbosity_error_e) return F_output_not; + + fake_print_line_first_locked(setting, print); + + fll_error_file_print(print, F_status_set_fine(status), function, fll_error_file_flag_simple_e, name, operation, type); + + return F_none; + } +#endif // _di_fake_print_error_file_simple_ + #ifndef _di_fake_print_error_file_fallback_ f_status_t fake_print_error_file_fallback(fake_setting_t * const setting, const fl_print_t print, const f_status_t status, const f_string_t function, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) { @@ -50,7 +63,7 @@ extern "C" { fake_print_line_first_locked(setting, print); - if (fll_error_file_print(print, F_status_set_fine(status), function, F_false, name, operation, type) == F_known_not) return F_false; + if (fll_error_file_print(print, F_status_set_fine(status), function, fll_error_file_flag_none_e, name, operation, type) == F_known_not) return F_false; return F_true; } @@ -596,7 +609,7 @@ extern "C" { return F_false; } - if (fll_error_print(print, F_status_set_fine(status), function, F_false) == F_known_not && fallback && print.verbosity > f_console_verbosity_quiet_e) { + if (fll_error_print(print, F_status_set_fine(status), function, fll_error_file_flag_none_e) == F_known_not && fallback && print.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(print.to); fake_print_line_first_unlocked(setting, print); @@ -692,7 +705,7 @@ extern "C" { return F_false; } - if (fll_error_print(print, status, function, F_false) == F_known_not && fallback && print.verbosity > f_console_verbosity_quiet_e) { + if (fll_error_print(print, status, function, fll_error_file_flag_none_e) == F_known_not && fallback && print.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(print.to); fake_print_line_first_unlocked(setting, print); diff --git a/level_3/fake/c/main/print.h b/level_3/fake/c/main/print.h index bb943b0..d49c795 100644 --- a/level_3/fake/c/main/print.h +++ b/level_3/fake/c/main/print.h @@ -93,6 +93,37 @@ extern "C" { #endif // _di_fake_print_error_file_ /** + * Print file related error message regarding a function failing in some way. + * + * This prints a simple message to avoid "Unable to find file..., because file cannot be found." type of messages. + * + * @param setting + * The main program settings. + * + * This does not alter setting.status. + * @param status + * The status to use. + * This is provided, ignoring setting.status, for thread-safety reasons. + * @param print + * Designates the how and where to print. + * @param name + * The name of the file or directory. + * @param operation + * The operation that fails, such as 'create' or 'access'. + * @param type + * A valid file type code from the fll_error_file_type enum. + * + * @return + * F_none on success. + * F_output_not on success, but no printing is performed. + * + * @see fll_error_file_print() + */ +#ifndef _di_fake_print_error_file_simple_ + extern f_status_t fake_print_error_file_simple(fake_setting_t * const setting, const fl_print_t print, const f_status_t status, const f_string_t function, const f_string_static_t name, const f_string_static_t operation, const uint8_t type); +#endif // _di_fake_print_error_file_simple_ + +/** * Print file related error message regarding a function failing in some way, setting fallback to F_false and returning result.. * * @param setting diff --git a/level_3/firewall/c/common.c b/level_3/firewall/c/common.c index b371cdc..424c025 100644 --- a/level_3/firewall/c/common.c +++ b/level_3/firewall/c/common.c @@ -124,7 +124,7 @@ extern "C" { if (F_status_is_error(setting->status)) { firewall_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "f_console_parameter_process", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "f_console_parameter_process", fll_error_file_flag_fallback_e); firewall_print_line_last_locked(setting, main->error); return; @@ -146,7 +146,7 @@ extern "C" { if (F_status_is_error(setting->status)) { firewall_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_context", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e); firewall_print_line_last_locked(setting, main->error); return; @@ -179,7 +179,7 @@ extern "C" { if (F_status_is_error(setting->status)) { firewall_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_verbosity", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e); firewall_print_line_last_locked(setting, main->error); return; diff --git a/level_3/firewall/c/firewall.c b/level_3/firewall/c/firewall.c index a48c5a7..a7e9c44 100644 --- a/level_3/firewall/c/firewall.c +++ b/level_3/firewall/c/firewall.c @@ -39,7 +39,7 @@ extern "C" { if (F_status_is_error(status)) { firewall_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", F_true); + fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e); firewall_print_line_last_locked(setting, main->error); return; @@ -58,7 +58,7 @@ extern "C" { if (F_status_is_error(status)) { firewall_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", F_true); + fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e); firewall_print_line_last_locked(setting, main->error); return; diff --git a/level_3/firewall/c/private-firewall.c b/level_3/firewall/c/private-firewall.c index b644ea6..8bc53df 100644 --- a/level_3/firewall/c/private-firewall.c +++ b/level_3/firewall/c/private-firewall.c @@ -643,7 +643,7 @@ f_status_t firewall_perform_commands(firewall_data_t * const data, firewall_loca status = f_fss_apply_delimit(state, delimits, &local_buffer); if (F_status_is_error(status)) { - fll_error_print(data->main->error, F_status_set_fine(status), "f_fss_apply_delimit", F_true); + fll_error_print(data->main->error, F_status_set_fine(status), "f_fss_apply_delimit", fll_error_file_flag_fallback_e); } } @@ -1233,7 +1233,7 @@ f_status_t firewall_buffer_rules(firewall_data_t * const data, const f_string_st status = f_fss_apply_delimit(state, delimits, &local->buffer); if (F_status_is_error(status)) { - fll_error_print(data->main->error, F_status_set_fine(status), "f_fss_apply_delimit", F_true); + fll_error_print(data->main->error, F_status_set_fine(status), "f_fss_apply_delimit", fll_error_file_flag_fallback_e); } } @@ -1257,7 +1257,7 @@ f_status_t firewall_process_rules(firewall_data_t * const data, f_string_range_t status = f_fss_apply_delimit(state, delimits, &local->buffer); if (F_status_is_error(status)) { - fll_error_print(data->main->error, F_status_set_fine(status), "f_fss_apply_delimit", F_true); + fll_error_print(data->main->error, F_status_set_fine(status), "f_fss_apply_delimit", fll_error_file_flag_fallback_e); } } diff --git a/level_3/fss_basic_list_read/c/common.c b/level_3/fss_basic_list_read/c/common.c index 375798f..a21f5c3 100644 --- a/level_3/fss_basic_list_read/c/common.c +++ b/level_3/fss_basic_list_read/c/common.c @@ -82,7 +82,7 @@ extern "C" { if (F_status_is_error(setting->status)) { fss_basic_list_read_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "f_console_parameter_process", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "f_console_parameter_process", fll_error_file_flag_fallback_e); fss_basic_list_read_print_line_last_locked(setting, main->error); return; @@ -104,7 +104,7 @@ extern "C" { if (F_status_is_error(setting->status)) { fss_basic_list_read_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_context", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e); fss_basic_list_read_print_line_last_locked(setting, main->error); return; @@ -137,7 +137,7 @@ extern "C" { if (F_status_is_error(setting->status)) { fss_basic_list_read_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_verbosity", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e); fss_basic_list_read_print_line_last_locked(setting, main->error); return; 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 d93a73c..6e59419 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 @@ -32,7 +32,7 @@ extern "C" { if (F_status_is_error(status)) { fss_basic_list_read_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", F_true); + fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e); fss_basic_list_read_print_line_last_locked(setting, main->error); return; @@ -51,7 +51,7 @@ extern "C" { if (F_status_is_error(status)) { fss_basic_list_read_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", F_true); + fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e); fss_basic_list_read_print_line_last_locked(setting, main->error); return; @@ -378,7 +378,7 @@ extern "C" { status = f_file_stream_read(file, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", fll_error_file_flag_fallback_e, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); } else if (data.buffer.used) { data.files.array[0].range.stop = data.buffer.used - 1; @@ -388,7 +388,7 @@ extern "C" { status = f_string_dynamic_append_assure(f_string_eol_s, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_append_assure", F_true, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_append_assure", fll_error_file_flag_fallback_e, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); } } else { @@ -424,7 +424,7 @@ extern "C" { status = f_file_stream_open(data.files.array[data.files.used].name, f_string_empty_s, &file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", fll_error_file_flag_fallback_e, data.argv[main->parameters.remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e); break; } @@ -434,7 +434,7 @@ extern "C" { status = f_file_size_by_id(file.id, &size_file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", fll_error_file_flag_fallback_e, data.argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e); f_file_stream_flush(file); f_file_stream_close(&file); @@ -461,7 +461,7 @@ extern "C" { } if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_increase_by", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_increase_by", fll_error_file_flag_fallback_e, data.argv[main->parameters.remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e); f_file_stream_flush(file); f_file_stream_close(&file); @@ -489,7 +489,7 @@ extern "C" { if (F_status_is_error(status)) { if (F_status_set_fine(status) != F_interrupt) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read_until", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read_until", fll_error_file_flag_fallback_e, data.argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e); } break; @@ -503,7 +503,7 @@ extern "C" { status = f_string_dynamic_append_assure(f_string_eol_s, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_append_assure", F_true, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_append_assure", fll_error_file_flag_fallback_e, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); } } } diff --git a/level_3/fss_basic_list_read/c/private-read.c b/level_3/fss_basic_list_read/c/private-read.c index 6dc39e3..2a0cd42 100644 --- a/level_3/fss_basic_list_read/c/private-read.c +++ b/level_3/fss_basic_list_read/c/private-read.c @@ -71,7 +71,7 @@ extern "C" { status = fss_basic_list_read_depths_resize(depth_size, &data->depths); if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), "fss_basic_list_read_depths_resize", F_true); + fll_error_print(main->error, F_status_set_fine(status), "fss_basic_list_read_depths_resize", fll_error_file_flag_fallback_e); return status; } @@ -162,7 +162,7 @@ extern "C" { } if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), (main->parameters.array[fss_basic_list_read_parameter_trim_e].result & f_console_result_found_e) ? "fl_string_dynamic_rip" : "f_string_dynamic_append", F_true); + fll_error_print(main->error, F_status_set_fine(status), (main->parameters.array[fss_basic_list_read_parameter_trim_e].result & f_console_result_found_e) ? "fl_string_dynamic_rip" : "f_string_dynamic_append", fll_error_file_flag_fallback_e); return status; } @@ -255,7 +255,7 @@ extern "C" { const f_status_t status = fll_fss_basic_list_read(data->buffer, state, &input, &data->objects, &data->contents, &data->delimits_object, &data->delimits_content, &data->comments); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_basic_list_read", F_true, fss_basic_list_read_file_identify(input.start, data->files), f_file_operation_process_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_basic_list_read", fll_error_file_flag_fallback_e, fss_basic_list_read_file_identify(input.start, data->files), f_file_operation_process_s, fll_error_file_type_file_e); return status; } diff --git a/level_3/fss_basic_read/c/common.c b/level_3/fss_basic_read/c/common.c index 2411e51..15a6ec0 100644 --- a/level_3/fss_basic_read/c/common.c +++ b/level_3/fss_basic_read/c/common.c @@ -81,7 +81,7 @@ extern "C" { if (F_status_is_error(setting->status)) { fss_basic_read_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "f_console_parameter_process", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "f_console_parameter_process", fll_error_file_flag_fallback_e); fss_basic_read_print_line_last_locked(setting, main->error); return; @@ -103,7 +103,7 @@ extern "C" { if (F_status_is_error(setting->status)) { fss_basic_read_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_context", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e); fss_basic_read_print_line_last_locked(setting, main->error); return; @@ -136,7 +136,7 @@ extern "C" { if (F_status_is_error(setting->status)) { fss_basic_read_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_verbosity", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e); fss_basic_read_print_line_last_locked(setting, main->error); return; 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 1fb9145..648b439 100644 --- a/level_3/fss_basic_read/c/fss_basic_read.c +++ b/level_3/fss_basic_read/c/fss_basic_read.c @@ -32,7 +32,7 @@ extern "C" { if (F_status_is_error(status)) { fss_basic_read_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", F_true); + fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e); fss_basic_read_print_line_last_locked(setting, main->error); return; @@ -51,7 +51,7 @@ extern "C" { if (F_status_is_error(status)) { fss_basic_read_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", F_true); + fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e); fss_basic_read_print_line_last_locked(setting, main->error); return; @@ -386,7 +386,7 @@ extern "C" { status = f_file_stream_read(file, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", fll_error_file_flag_fallback_e, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); } else if (data.buffer.used) { data.files.array[0].range.stop = data.buffer.used - 1; @@ -396,7 +396,7 @@ extern "C" { status = f_string_dynamic_append_assure(f_string_eol_s, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_string_append_assure", F_true, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_string_append_assure", fll_error_file_flag_fallback_e, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); } } else { @@ -431,7 +431,7 @@ extern "C" { status = f_file_stream_open(data.argv[main->parameters.remaining.array[i]], f_string_empty_s, &file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", fll_error_file_flag_fallback_e, data.argv[main->parameters.remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e); break; } @@ -441,7 +441,7 @@ extern "C" { status = f_file_size_by_id(file.id, &size_file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", fll_error_file_flag_fallback_e, data.argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e); f_file_stream_flush(file); f_file_stream_close(&file); @@ -468,7 +468,7 @@ extern "C" { } if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", fll_error_file_flag_fallback_e, data.argv[main->parameters.remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e); f_file_stream_flush(file); f_file_stream_close(&file); @@ -496,7 +496,7 @@ extern "C" { if (F_status_is_error(status)) { if (F_status_set_fine(status) != F_interrupt) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read_until", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read_until", fll_error_file_flag_fallback_e, data.argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e); } break; @@ -511,7 +511,7 @@ extern "C" { status = f_string_dynamic_append_assure(f_string_eol_s, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_string_append_assure", F_true, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_string_append_assure", fll_error_file_flag_fallback_e, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); } } } diff --git a/level_3/fss_basic_read/c/private-read.c b/level_3/fss_basic_read/c/private-read.c index 17ec22b..7768c96 100644 --- a/level_3/fss_basic_read/c/private-read.c +++ b/level_3/fss_basic_read/c/private-read.c @@ -48,7 +48,7 @@ extern "C" { status = fss_basic_read_depths_resize(depth_size, &data->depths); if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), "fss_basic_read_depths_resize", F_true); + fll_error_print(main->error, F_status_set_fine(status), "fss_basic_read_depths_resize", fll_error_file_flag_fallback_e); return status; } @@ -139,7 +139,7 @@ extern "C" { } if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), (main->parameters.array[fss_basic_read_parameter_trim_e].result & f_console_result_found_e) ? "fl_string_dynamic_rip" : "f_string_dynamic_append", F_true); + fll_error_print(main->error, F_status_set_fine(status), (main->parameters.array[fss_basic_read_parameter_trim_e].result & f_console_result_found_e) ? "fl_string_dynamic_rip" : "f_string_dynamic_append", fll_error_file_flag_fallback_e); return status; } @@ -240,7 +240,7 @@ extern "C" { const f_string_static_t file_name = fss_basic_read_file_identify(input.start, data->files); - fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_basic_read", F_true, file_name, f_file_operation_process_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_basic_read", fll_error_file_flag_fallback_e, file_name, f_file_operation_process_s, fll_error_file_type_file_e); return status; } diff --git a/level_3/fss_embedded_list_read/c/common.c b/level_3/fss_embedded_list_read/c/common.c index b246207..a0355f0 100644 --- a/level_3/fss_embedded_list_read/c/common.c +++ b/level_3/fss_embedded_list_read/c/common.c @@ -80,7 +80,7 @@ extern "C" { if (F_status_is_error(setting->status)) { fss_embedded_list_read_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "f_console_parameter_process", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "f_console_parameter_process", fll_error_file_flag_fallback_e); fss_embedded_list_read_print_line_last_locked(setting, main->error); return; @@ -102,7 +102,7 @@ extern "C" { if (F_status_is_error(setting->status)) { fss_embedded_list_read_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_context", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e); fss_embedded_list_read_print_line_last_locked(setting, main->error); return; @@ -135,7 +135,7 @@ extern "C" { if (F_status_is_error(setting->status)) { fss_embedded_list_read_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_verbosity", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e); fss_embedded_list_read_print_line_last_locked(setting, main->error); return; diff --git a/level_3/fss_embedded_list_read/c/fss_embedded_list_read.c b/level_3/fss_embedded_list_read/c/fss_embedded_list_read.c index cc4486e..7823559 100644 --- a/level_3/fss_embedded_list_read/c/fss_embedded_list_read.c +++ b/level_3/fss_embedded_list_read/c/fss_embedded_list_read.c @@ -32,7 +32,7 @@ extern "C" { if (F_status_is_error(status)) { fss_embedded_list_read_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", F_true); + fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e); fss_embedded_list_read_print_line_last_locked(setting, main->error); return; @@ -51,7 +51,7 @@ extern "C" { if (F_status_is_error(status)) { fss_embedded_list_read_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", F_true); + fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e); fss_embedded_list_read_print_line_last_locked(setting, main->error); return; @@ -249,7 +249,7 @@ extern "C" { status = fss_embedded_list_read_main_preprocess_depth(&data, &depths); if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), "fss_embedded_list_read_main_preprocess_depth", F_true); + fll_error_print(main->error, F_status_set_fine(status), "fss_embedded_list_read_main_preprocess_depth", fll_error_file_flag_fallback_e); } } @@ -273,13 +273,13 @@ extern "C" { status = f_file_read(file, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_read", F_true, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_read", fll_error_file_flag_fallback_e, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); } else { status = fss_embedded_list_read_main_process_file(&data, f_string_ascii_minus_s, depths, &objects_delimits, &contents_delimits, &comments); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "fss_embedded_list_read_main_process_file", F_true, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); + fll_error_file_print(main->error, F_status_set_fine(status), "fss_embedded_list_read_main_process_file", fll_error_file_flag_fallback_e, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); } } @@ -314,7 +314,7 @@ extern "C" { status = f_file_stream_open(data.argv[main->parameters.remaining.array[i]], f_string_empty_s, &file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", fll_error_file_flag_fallback_e, data.argv[main->parameters.remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e); break; } @@ -324,7 +324,7 @@ extern "C" { status = f_file_size_by_id(file.id, &size_file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", fll_error_file_flag_fallback_e, data.argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e); f_file_stream_flush(file); f_file_stream_close(&file); @@ -361,7 +361,7 @@ extern "C" { } if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", fll_error_file_flag_fallback_e, data.argv[main->parameters.remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e); f_file_stream_flush(file); f_file_stream_close(&file); @@ -389,7 +389,7 @@ extern "C" { if (F_status_is_error(status)) { if (F_status_set_fine(status) != F_interrupt) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read_until", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read_until", fll_error_file_flag_fallback_e, data.argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e); } break; @@ -398,7 +398,7 @@ extern "C" { status = fss_embedded_list_read_main_process_file(&data, data.argv[main->parameters.remaining.array[i]], depths, &objects_delimits, &contents_delimits, &comments); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "fss_embedded_list_read_main_process_file", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "fss_embedded_list_read_main_process_file", fll_error_file_flag_fallback_e, data.argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e); break; } diff --git a/level_3/fss_embedded_list_read/c/private-read.c b/level_3/fss_embedded_list_read/c/private-read.c index 1548dba..17b95a1 100644 --- a/level_3/fss_embedded_list_read/c/private-read.c +++ b/level_3/fss_embedded_list_read/c/private-read.c @@ -110,7 +110,7 @@ extern "C" { status = fss_embedded_list_read_depths_resize(i, depths); if (F_status_is_error(status)) { - fll_error_print(data->main->error, F_status_set_fine(status), "fss_embedded_list_read_main_preprocess_depth", F_true); + fll_error_print(data->main->error, F_status_set_fine(status), "fss_embedded_list_read_main_preprocess_depth", fll_error_file_flag_fallback_e); return status; } @@ -180,7 +180,7 @@ extern "C" { status = fl_string_dynamic_rip(argv[values_order[i]], &depths->array[depths->used].value_name); if (F_status_is_error(status)) { - fll_error_print(data->main->error, F_status_set_fine(status), "fl_string_dynamic_rip", F_true); + fll_error_print(data->main->error, F_status_set_fine(status), "fl_string_dynamic_rip", fll_error_file_flag_fallback_e); return status; } @@ -189,7 +189,7 @@ extern "C" { status = f_string_dynamic_append(argv[values_order[i]], &depths->array[depths->used].value_name); if (F_status_is_error(status)) { - fll_error_print(data->main->error, F_status_set_fine(status), "f_string_dynamic_append", F_true); + fll_error_print(data->main->error, F_status_set_fine(status), "f_string_dynamic_append", fll_error_file_flag_fallback_e); return status; } diff --git a/level_3/fss_extended_list_read/c/common.c b/level_3/fss_extended_list_read/c/common.c index d2efda0..71c9811 100644 --- a/level_3/fss_extended_list_read/c/common.c +++ b/level_3/fss_extended_list_read/c/common.c @@ -88,7 +88,7 @@ extern "C" { if (F_status_is_error(setting->status)) { fss_extended_list_read_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "f_console_parameter_process", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "f_console_parameter_process", fll_error_file_flag_fallback_e); fss_extended_list_read_print_line_last_locked(setting, main->error); return; @@ -110,7 +110,7 @@ extern "C" { if (F_status_is_error(setting->status)) { fss_extended_list_read_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_context", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e); fss_extended_list_read_print_line_last_locked(setting, main->error); return; @@ -143,7 +143,7 @@ extern "C" { if (F_status_is_error(setting->status)) { fss_extended_list_read_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_verbosity", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e); fss_extended_list_read_print_line_last_locked(setting, main->error); return; 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 294dd56..e570dd7 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 @@ -32,7 +32,7 @@ extern "C" { if (F_status_is_error(status)) { fss_extended_list_read_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", F_true); + fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e); fss_extended_list_read_print_line_last_locked(setting, main->error); return; @@ -51,7 +51,7 @@ extern "C" { if (F_status_is_error(status)) { fss_extended_list_read_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", F_true); + fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e); fss_extended_list_read_print_line_last_locked(setting, main->error); return; @@ -386,7 +386,7 @@ extern "C" { status = f_file_stream_read(file, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", fll_error_file_flag_fallback_e, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); } else if (data.buffer.used) { data.files.array[0].range.stop = data.buffer.used - 1; @@ -396,7 +396,7 @@ extern "C" { status = f_string_dynamic_append_assure(f_string_eol_s, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_string_append_assure", F_true, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_string_append_assure", fll_error_file_flag_fallback_e, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); } } else { @@ -431,7 +431,7 @@ extern "C" { status = f_file_stream_open(data.argv[main->parameters.remaining.array[i]], f_string_empty_s, &file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", fll_error_file_flag_fallback_e, data.argv[main->parameters.remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e); break; } @@ -441,7 +441,7 @@ extern "C" { status = f_file_size_by_id(file.id, &size_file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", fll_error_file_flag_fallback_e, data.argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e); f_file_stream_flush(file); f_file_stream_close(&file); @@ -468,7 +468,7 @@ extern "C" { } if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", fll_error_file_flag_fallback_e, data.argv[main->parameters.remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e); f_file_stream_flush(file); f_file_stream_close(&file); @@ -496,7 +496,7 @@ extern "C" { if (F_status_is_error(status)) { if (F_status_set_fine(status) != F_interrupt) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read_until", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read_until", fll_error_file_flag_fallback_e, data.argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e); } break; @@ -511,7 +511,7 @@ extern "C" { status = f_string_dynamic_append_assure(f_string_eol_s, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_string_append_assure", F_true, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_string_append_assure", fll_error_file_flag_fallback_e, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); } } } diff --git a/level_3/fss_extended_list_read/c/private-read.c b/level_3/fss_extended_list_read/c/private-read.c index d5a6b2e..8b89c9a 100644 --- a/level_3/fss_extended_list_read/c/private-read.c +++ b/level_3/fss_extended_list_read/c/private-read.c @@ -71,7 +71,7 @@ extern "C" { status = fss_extended_list_read_depths_resize(depth_size, &data->depths); if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), "fss_extended_list_read_depths_resize", F_true); + fll_error_print(main->error, F_status_set_fine(status), "fss_extended_list_read_depths_resize", fll_error_file_flag_fallback_e); return status; } @@ -162,7 +162,7 @@ extern "C" { } if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), (main->parameters.array[fss_extended_list_read_parameter_trim_e].result & f_console_result_found_e) ? "fl_string_dynamic_rip" : "f_string_dynamic_append", F_true); + fll_error_print(main->error, F_status_set_fine(status), (main->parameters.array[fss_extended_list_read_parameter_trim_e].result & f_console_result_found_e) ? "fl_string_dynamic_rip" : "f_string_dynamic_append", fll_error_file_flag_fallback_e); return status; } @@ -256,7 +256,7 @@ extern "C" { if (F_status_is_error(status)) { const f_string_static_t file_name = fss_extended_list_read_file_identify(input.start, data->files); - fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_extended_list_read", F_true, file_name, f_file_operation_process_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_extended_list_read", fll_error_file_flag_fallback_e, file_name, f_file_operation_process_s, fll_error_file_type_file_e); return status; } diff --git a/level_3/fss_extended_read/c/common.c b/level_3/fss_extended_read/c/common.c index 3fa4e22..fc1cd30 100644 --- a/level_3/fss_extended_read/c/common.c +++ b/level_3/fss_extended_read/c/common.c @@ -81,7 +81,7 @@ extern "C" { if (F_status_is_error(setting->status)) { fss_extended_read_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "f_console_parameter_process", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "f_console_parameter_process", fll_error_file_flag_fallback_e); fss_extended_read_print_line_last_locked(setting, main->error); return; @@ -103,7 +103,7 @@ extern "C" { if (F_status_is_error(setting->status)) { fss_extended_read_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_context", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e); fss_extended_read_print_line_last_locked(setting, main->error); return; @@ -136,7 +136,7 @@ extern "C" { if (F_status_is_error(setting->status)) { fss_extended_read_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_verbosity", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e); fss_extended_read_print_line_last_locked(setting, main->error); return; 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 36fbda7..c670eb0 100644 --- a/level_3/fss_extended_read/c/fss_extended_read.c +++ b/level_3/fss_extended_read/c/fss_extended_read.c @@ -32,7 +32,7 @@ extern "C" { if (F_status_is_error(status)) { fss_extended_read_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", F_true); + fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e); fss_extended_read_print_line_last_locked(setting, main->error); return; @@ -51,7 +51,7 @@ extern "C" { if (F_status_is_error(status)) { fss_extended_read_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", F_true); + fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e); fss_extended_read_print_line_last_locked(setting, main->error); return; @@ -385,7 +385,7 @@ extern "C" { status = f_file_stream_read(file, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", fll_error_file_flag_fallback_e, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); } else if (data.buffer.used) { data.files.array[0].range.stop = data.buffer.used - 1; @@ -395,7 +395,7 @@ extern "C" { status = f_string_dynamic_append_assure(f_string_eol_s, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_string_append_assure", F_true, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_string_append_assure", fll_error_file_flag_fallback_e, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); } } else { @@ -430,7 +430,7 @@ extern "C" { status = f_file_stream_open(data.argv[main->parameters.remaining.array[i]], f_string_empty_s, &file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", fll_error_file_flag_fallback_e, data.argv[main->parameters.remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e); break; } @@ -440,7 +440,7 @@ extern "C" { status = f_file_size_by_id(file.id, &size_file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", fll_error_file_flag_fallback_e, data.argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e); f_file_stream_flush(file); f_file_stream_close(&file); @@ -467,7 +467,7 @@ extern "C" { } if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", fll_error_file_flag_fallback_e, data.argv[main->parameters.remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e); f_file_stream_flush(file); f_file_stream_close(&file); @@ -495,7 +495,7 @@ extern "C" { if (F_status_is_error(status)) { if (F_status_set_fine(status) != F_interrupt) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read_until", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read_until", fll_error_file_flag_fallback_e, data.argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e); } break; @@ -510,7 +510,7 @@ extern "C" { status = f_string_dynamic_append_assure(f_string_eol_s, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_string_append_assure", F_true, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_string_append_assure", fll_error_file_flag_fallback_e, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); } } } diff --git a/level_3/fss_extended_read/c/private-read.c b/level_3/fss_extended_read/c/private-read.c index 79865e7..0575072 100644 --- a/level_3/fss_extended_read/c/private-read.c +++ b/level_3/fss_extended_read/c/private-read.c @@ -75,7 +75,7 @@ extern "C" { status = fss_extended_read_depths_resize(depth_size, &data->depths); if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), "fss_extended_read_depths_resize", F_true); + fll_error_print(main->error, F_status_set_fine(status), "fss_extended_read_depths_resize", fll_error_file_flag_fallback_e); return status; } @@ -166,7 +166,7 @@ extern "C" { } if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), (main->parameters.array[fss_extended_read_parameter_trim_e].result & f_console_result_found_e) ? "fl_string_dynamic_rip" : "f_string_dynamic_append", F_true); + fll_error_print(main->error, F_status_set_fine(status), (main->parameters.array[fss_extended_read_parameter_trim_e].result & f_console_result_found_e) ? "fl_string_dynamic_rip" : "f_string_dynamic_append", fll_error_file_flag_fallback_e); return status; } @@ -262,7 +262,7 @@ extern "C" { if (F_status_is_error(status)) { const f_string_static_t file_name = fss_extended_read_file_identify(input.start, data->files); - fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_extended_read", F_true, file_name, f_file_operation_process_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_extended_read", fll_error_file_flag_fallback_e, file_name, f_file_operation_process_s, fll_error_file_type_file_e); return status; } diff --git a/level_3/fss_identify/c/common.c b/level_3/fss_identify/c/common.c index fb37b77..cc4866a 100644 --- a/level_3/fss_identify/c/common.c +++ b/level_3/fss_identify/c/common.c @@ -48,7 +48,7 @@ extern "C" { if (F_status_is_error(setting->status)) { fss_identify_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "f_console_parameter_process", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "f_console_parameter_process", fll_error_file_flag_fallback_e); fss_identify_print_line_last_locked(setting, main->error); return; @@ -70,7 +70,7 @@ extern "C" { if (F_status_is_error(setting->status)) { fss_identify_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_context", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e); fss_identify_print_line_last_locked(setting, main->error); return; @@ -103,7 +103,7 @@ extern "C" { if (F_status_is_error(setting->status)) { fss_identify_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_verbosity", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e); fss_identify_print_line_last_locked(setting, main->error); return; diff --git a/level_3/fss_identify/c/fss_identify.c b/level_3/fss_identify/c/fss_identify.c index 4436d39..868aaf9 100644 --- a/level_3/fss_identify/c/fss_identify.c +++ b/level_3/fss_identify/c/fss_identify.c @@ -31,7 +31,7 @@ extern "C" { if (F_status_is_error(status)) { fss_identify_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", F_true); + fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e); fss_identify_print_line_last_locked(setting, main->error); return; @@ -50,7 +50,7 @@ extern "C" { if (F_status_is_error(status)) { fss_identify_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", F_true); + fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e); fss_identify_print_line_last_locked(setting, main->error); return; @@ -154,7 +154,7 @@ extern "C" { status = f_string_dynamic_resize(length, &data.name); if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), "f_utf_is_word", F_true); + fll_error_print(main->error, F_status_set_fine(status), "f_utf_is_word", fll_error_file_flag_fallback_e); } } @@ -165,7 +165,7 @@ extern "C" { status = f_utf_is_word_dash(data.argv[index].string + i, length, F_true); if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), "f_utf_is_word_dash", F_true); + fll_error_print(main->error, F_status_set_fine(status), "f_utf_is_word_dash", fll_error_file_flag_fallback_e); break; } @@ -233,7 +233,7 @@ extern "C" { status = f_file_stream_open(data.argv[main->parameters.remaining.array[i]], f_string_empty_s, &file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", fll_error_file_flag_fallback_e, data.argv[main->parameters.remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e); } else { status = fss_identify_load_line(main, file, data.argv[main->parameters.remaining.array[i]], &buffer, &range); diff --git a/level_3/fss_identify/c/private-identify.c b/level_3/fss_identify/c/private-identify.c index 30f9a76..fd13f35 100644 --- a/level_3/fss_identify/c/private-identify.c +++ b/level_3/fss_identify/c/private-identify.c @@ -34,7 +34,7 @@ extern "C" { status = f_string_dynamic_resize(buffer->size + file.size_read, buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, file_name.used ? file_name : f_string_ascii_minus_s, f_file_operation_read_s, file_name.used ? fll_error_file_type_file_e : fll_error_file_type_pipe_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", fll_error_file_flag_fallback_e, file_name.used ? file_name : f_string_ascii_minus_s, f_file_operation_read_s, file_name.used ? fll_error_file_type_file_e : fll_error_file_type_pipe_e); return status; } @@ -43,7 +43,7 @@ extern "C" { status = f_file_stream_read_block(file, buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read_block", F_true, file_name.used ? file_name : f_string_ascii_minus_s, f_file_operation_read_s, file_name.used ? fll_error_file_type_file_e : fll_error_file_type_pipe_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read_block", fll_error_file_flag_fallback_e, file_name.used ? file_name : f_string_ascii_minus_s, f_file_operation_read_s, file_name.used ? fll_error_file_type_file_e : fll_error_file_type_pipe_e); return status; } @@ -74,7 +74,7 @@ extern "C" { status = fll_fss_identify(buffer, range, &ids); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_identify", F_true, file_name.used ? file_name : f_string_ascii_pipe_s, f_file_operation_read_s, file_name.used ? fll_error_file_type_file_e : fll_error_file_type_pipe_e); + fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_identify", fll_error_file_flag_fallback_e, file_name.used ? file_name : f_string_ascii_pipe_s, f_file_operation_read_s, file_name.used ? fll_error_file_type_file_e : fll_error_file_type_pipe_e); f_fll_ids_resize(0, &ids); diff --git a/level_3/fss_payload_read/c/common.c b/level_3/fss_payload_read/c/common.c index 6544fb4..c9b75ab 100644 --- a/level_3/fss_payload_read/c/common.c +++ b/level_3/fss_payload_read/c/common.c @@ -82,7 +82,7 @@ extern "C" { if (F_status_is_error(setting->status)) { fss_payload_read_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "f_console_parameter_process", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "f_console_parameter_process", fll_error_file_flag_fallback_e); fss_payload_read_print_line_last_locked(setting, main->error); return; @@ -104,7 +104,7 @@ extern "C" { if (F_status_is_error(setting->status)) { fss_payload_read_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_context", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e); fss_payload_read_print_line_last_locked(setting, main->error); return; @@ -137,7 +137,7 @@ extern "C" { if (F_status_is_error(setting->status)) { fss_payload_read_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_verbosity", F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e); fss_payload_read_print_line_last_locked(setting, main->error); return; diff --git a/level_3/fss_payload_read/c/fss_payload_read.c b/level_3/fss_payload_read/c/fss_payload_read.c index d178e99..2bd62d1 100644 --- a/level_3/fss_payload_read/c/fss_payload_read.c +++ b/level_3/fss_payload_read/c/fss_payload_read.c @@ -32,7 +32,7 @@ extern "C" { if (F_status_is_error(status)) { fss_payload_read_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", F_true); + fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e); fss_payload_read_print_line_last_locked(setting, main->error); return; @@ -51,7 +51,7 @@ extern "C" { if (F_status_is_error(status)) { fss_payload_read_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", F_true); + fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e); fss_payload_read_print_line_last_locked(setting, main->error); return; @@ -399,7 +399,7 @@ extern "C" { status = f_file_stream_read(file, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", fll_error_file_flag_fallback_e, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); } else if (data.buffer.used) { data.files.array[0].range.stop = data.buffer.used - 1; @@ -409,7 +409,7 @@ extern "C" { status = f_string_dynamic_append_assure(f_string_eol_s, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_append_assure", F_true, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_append_assure", fll_error_file_flag_fallback_e, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); } } else { @@ -444,7 +444,7 @@ extern "C" { status = f_file_stream_open(data.argv[main->parameters.remaining.array[i]], f_string_empty_s, &file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", fll_error_file_flag_fallback_e, data.argv[main->parameters.remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e); break; } @@ -454,7 +454,7 @@ extern "C" { status = f_file_size_by_id(file.id, &size_file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", fll_error_file_flag_fallback_e, data.argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e); f_file_stream_flush(file); f_file_stream_close(&file); @@ -481,7 +481,7 @@ extern "C" { } if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", fll_error_file_flag_fallback_e, data.argv[main->parameters.remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e); f_file_stream_flush(file); f_file_stream_close(&file); @@ -509,7 +509,7 @@ extern "C" { if (F_status_is_error(status)) { if (F_status_set_fine(status) != F_interrupt) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read_until", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read_until", fll_error_file_flag_fallback_e, data.argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e); } break; diff --git a/level_3/fss_payload_read/c/private-read.c b/level_3/fss_payload_read/c/private-read.c index 4923ed9..401289b 100644 --- a/level_3/fss_payload_read/c/private-read.c +++ b/level_3/fss_payload_read/c/private-read.c @@ -71,7 +71,7 @@ extern "C" { status = fss_payload_read_depths_resize(depth_size, &data->depths); if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), "fss_payload_read_depths_resize", F_true); + fll_error_print(main->error, F_status_set_fine(status), "fss_payload_read_depths_resize", fll_error_file_flag_fallback_e); return status; } @@ -162,7 +162,7 @@ extern "C" { } if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), (main->parameters.array[fss_payload_read_parameter_trim_e].result & f_console_result_found_e) ? "fl_string_dynamic_rip" : "f_string_dynamic_append", F_true); + fll_error_print(main->error, F_status_set_fine(status), (main->parameters.array[fss_payload_read_parameter_trim_e].result & f_console_result_found_e) ? "fl_string_dynamic_rip" : "f_string_dynamic_append", fll_error_file_flag_fallback_e); return status; } @@ -264,7 +264,7 @@ extern "C" { } } else { - fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_payload_read", F_true, file_name, f_file_operation_process_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_payload_read", fll_error_file_flag_fallback_e, file_name, f_file_operation_process_s, fll_error_file_type_file_e); } return status; @@ -287,7 +287,7 @@ extern "C" { if (F_status_is_error(status)) { const f_string_static_t file_name = fss_payload_read_file_identify(input.start, data->files); - fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_extended_read", F_true, file_name, f_file_operation_process_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_extended_read", fll_error_file_flag_fallback_e, file_name, f_file_operation_process_s, fll_error_file_type_file_e); return status; } diff --git a/level_3/fss_write/c/main/print.c b/level_3/fss_write/c/main/print.c index 28d0623..e31b9d5 100644 --- a/level_3/fss_write/c/main/print.c +++ b/level_3/fss_write/c/main/print.c @@ -10,7 +10,7 @@ extern "C" { if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; fss_write_print_line_first_locked(setting, print); - fll_error_print(print, F_status_set_fine(setting->status), function, F_true); + fll_error_print(print, F_status_set_fine(setting->status), function, fll_error_file_flag_fallback_e); return F_none; } @@ -22,7 +22,7 @@ extern "C" { if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not; fss_write_print_line_first_locked(setting, print); - fll_error_file_print(print, F_status_set_fine(setting->status), function, F_true, name, operation, type); + fll_error_file_print(print, F_status_set_fine(setting->status), function, fll_error_file_flag_fallback_e, name, operation, type); return F_none; } diff --git a/level_3/iki_read/c/main/common.c b/level_3/iki_read/c/main/common.c index baff8b2..e41f8a3 100644 --- a/level_3/iki_read/c/main/common.c +++ b/level_3/iki_read/c/main/common.c @@ -523,7 +523,7 @@ extern "C" { if (F_status_is_error(setting->status)) { iki_read_print_line_first_locked(setting, main->error); - fll_error_file_print(main->error, F_status_set_fine(setting->status), "f_file_exists", F_true, setting->files.array[setting->files.used], f_file_operation_verify_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(setting->status), "f_file_exists", fll_error_file_flag_fallback_e, setting->files.array[setting->files.used], f_file_operation_verify_s, fll_error_file_type_file_e); return; } diff --git a/level_3/iki_read/c/main/print.c b/level_3/iki_read/c/main/print.c index b076e58..e667b4f 100644 --- a/level_3/iki_read/c/main/print.c +++ b/level_3/iki_read/c/main/print.c @@ -11,7 +11,7 @@ extern "C" { if (print.verbosity < f_console_verbosity_error_e) return F_output_not; iki_read_print_line_first_locked(setting, print); - fll_error_print(print, F_status_set_fine(setting->status), function, F_true); + fll_error_print(print, F_status_set_fine(setting->status), function, fll_error_file_flag_fallback_e); return F_none; } @@ -23,7 +23,7 @@ extern "C" { if (print.verbosity < f_console_verbosity_error_e) return F_output_not; iki_read_print_line_first_locked(setting, print); - fll_error_file_print(print, F_status_set_fine(setting->status), function, F_true, name, operation, type); + fll_error_file_print(print, F_status_set_fine(setting->status), function, fll_error_file_flag_fallback_e, name, operation, type); return F_none; } diff --git a/level_3/iki_write/c/main/common.c b/level_3/iki_write/c/main/common.c index defc124..a49b70c 100644 --- a/level_3/iki_write/c/main/common.c +++ b/level_3/iki_write/c/main/common.c @@ -130,7 +130,7 @@ extern "C" { if (F_status_is_error(setting->status)) { iki_write_print_line_first_locked(setting, main->error); - fll_error_file_print(main->error, F_status_set_fine(setting->status), "f_file_stream_open", F_true, main->parameters.arguments.array[index], f_file_operation_open_s, fll_error_file_type_file_e); + fll_error_file_print(main->error, F_status_set_fine(setting->status), "f_file_stream_open", fll_error_file_flag_fallback_e, main->parameters.arguments.array[index], f_file_operation_open_s, fll_error_file_type_file_e); return; } diff --git a/level_3/iki_write/c/main/print.c b/level_3/iki_write/c/main/print.c index 660a619..2e16d32 100644 --- a/level_3/iki_write/c/main/print.c +++ b/level_3/iki_write/c/main/print.c @@ -11,7 +11,7 @@ extern "C" { if (print.verbosity < f_console_verbosity_error_e) return F_output_not; iki_write_print_line_first_locked(setting, print); - fll_error_print(print, F_status_set_fine(setting->status), function, F_true); + fll_error_print(print, F_status_set_fine(setting->status), function, fll_error_file_flag_fallback_e); return F_none; } @@ -23,7 +23,7 @@ extern "C" { if (print.verbosity < f_console_verbosity_error_e) return F_output_not; iki_write_print_line_first_locked(setting, print); - fll_error_file_print(print, F_status_set_fine(setting->status), function, F_true, name, operation, type); + fll_error_file_print(print, F_status_set_fine(setting->status), function, fll_error_file_flag_fallback_e, name, operation, type); return F_none; } diff --git a/level_3/status_code/c/main/print.c b/level_3/status_code/c/main/print.c index d785812..5e83027 100644 --- a/level_3/status_code/c/main/print.c +++ b/level_3/status_code/c/main/print.c @@ -11,7 +11,7 @@ extern "C" { if (print.verbosity < f_console_verbosity_error_e) return F_output_not; status_code_print_line_first_locked(setting, print); - fll_error_print(print, F_status_set_fine(setting->status), function, F_true); + fll_error_print(print, F_status_set_fine(setting->status), function, fll_error_file_flag_fallback_e); return F_none; } diff --git a/level_3/utf8/c/main/common.c b/level_3/utf8/c/main/common.c index bfd73a7..d93a009 100644 --- a/level_3/utf8/c/main/common.c +++ b/level_3/utf8/c/main/common.c @@ -273,7 +273,7 @@ extern "C" { if (F_status_is_error(setting->status)) { utf8_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(setting->status), macro_utf8_f(f_string_dynamic_append_nulless), F_true); + fll_error_print(main->error, F_status_set_fine(setting->status), macro_utf8_f(f_string_dynamic_append_nulless), fll_error_file_flag_fallback_e); break; } diff --git a/level_3/utf8/c/main/print.c b/level_3/utf8/c/main/print.c index 1a052dd..afc7098 100644 --- a/level_3/utf8/c/main/print.c +++ b/level_3/utf8/c/main/print.c @@ -11,7 +11,7 @@ extern "C" { if (print.verbosity < f_console_verbosity_error_e) return F_output_not; utf8_print_line_first_locked(setting, print); - fll_error_print(print, F_status_set_fine(setting->status), function, F_true); + fll_error_print(print, F_status_set_fine(setting->status), function, fll_error_file_flag_fallback_e); return F_none; } @@ -85,7 +85,7 @@ extern "C" { if (print.verbosity < f_console_verbosity_error_e) return F_output_not; utf8_print_line_first_locked(setting, print); - fll_error_file_print(print, F_status_set_fine(setting->status), function, F_true, name, operation, type); + fll_error_file_print(print, F_status_set_fine(setting->status), function, fll_error_file_flag_fallback_e, name, operation, type); return F_none; } diff --git a/level_3/utf8/c/main/private-utf8.c b/level_3/utf8/c/main/private-utf8.c index fa24f2c..69d7ef6 100644 --- a/level_3/utf8/c/main/private-utf8.c +++ b/level_3/utf8/c/main/private-utf8.c @@ -45,7 +45,7 @@ extern "C" { if (F_status_is_error(status)) { utf8_print_line_first_locked(setting, main->error); - fll_error_print(main->error, F_status_set_fine(status), macro_utf8_f(utf8_detect_codepoint), F_true); + fll_error_print(main->error, F_status_set_fine(status), macro_utf8_f(utf8_detect_codepoint), fll_error_file_flag_fallback_e); break; }