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.").
#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;
}
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);
}
}
- 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) {
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_
* @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_
/**
* @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
* 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_
/**
* @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
* 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
#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_*:
#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) {
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);
}
#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
* @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.
* @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_)
/**
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
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;
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;
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);
}
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);
}
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);
}
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;
}
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
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;
}
}
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);
}
}
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;
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;
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;
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;
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;
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;
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;
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;
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);
}
}
}
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);
}
}
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 {
// 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);
}
}
}
}
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;
}
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;
}
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;
}
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);
}
}
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);
}
}
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);
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[] = {
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;
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);
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);
}
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);
}
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;
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;
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;
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;
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;
}
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;
}
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) {
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 {
}
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);
}
}
}
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);
}
}
}
}
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);
}
}
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);
}
}
}
}
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);
}
}
}
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);
}
}
}
#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;
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);
#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;
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);
* @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_
/**
* @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
* @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
#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;
// 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);
* @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
* @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_
/**
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 {
#include "../make.h"
#include "operate_validate.h"
#include "operate_validate_type.h"
+#include "print-error.h"
#ifdef __cplusplus
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);
}
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);
}
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);
}
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);
}
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);
}
}
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);
}
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);
}
} // 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);
}
} // 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);
}
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);
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;
}
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);
}
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
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);
}
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);
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);
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);
}
}
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);
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);
}
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);
}
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);
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);
}
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);
}
}
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);
}
}
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);
}
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);
}
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);
}
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);
}
} // 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);
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);
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);
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);
}
}
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);
}
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);
}
}
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);
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);
}
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);
}
}
#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) {
}
#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) {
}
#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) {
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);
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);
}
#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
#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.
#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
#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
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
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;
}
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;
}
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) {
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;
}
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);
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);
#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
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;
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;
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;
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;
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;
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);
}
}
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);
}
}
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);
}
}
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;
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;
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;
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;
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;
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;
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 {
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;
}
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);
}
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);
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;
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);
}
}
}
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;
}
}
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;
}
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;
}
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;
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;
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;
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;
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;
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;
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 {
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;
}
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);
}
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);
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;
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);
}
}
}
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;
}
}
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;
}
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;
}
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;
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;
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;
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;
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;
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);
}
}
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);
}
}
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;
}
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);
}
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);
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;
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;
}
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;
}
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;
}
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;
}
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;
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;
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;
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;
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;
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;
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 {
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;
}
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);
}
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);
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;
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);
}
}
}
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;
}
}
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;
}
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;
}
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;
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;
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;
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;
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;
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;
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 {
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;
}
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);
}
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);
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;
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);
}
}
}
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;
}
}
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;
}
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;
}
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;
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;
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;
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;
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;
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);
}
}
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;
}
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);
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;
}
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;
}
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);
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;
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;
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;
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;
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;
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;
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 {
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;
}
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);
}
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);
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;
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;
}
}
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;
}
}
}
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;
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}