This functionality originated here, but there will still need to be changes in the follow up commit.
#define _di_f_string_format_Z_s_
#define _di_f_string_format_Z_single_s_
//#define _di_f_string_format_bracket_close_s_
-#define _di_f_string_format_bracket_open_s_
+//#define _di_f_string_format_bracket_open_s_
#define _di_f_string_format_c_s_
#define _di_f_string_format_d_double_s_
#define _di_f_string_format_d_s_
#define _di_f_string_format_s_double_s_
#define _di_f_string_format_s_s_
#define _di_f_string_format_s_single_s_
+#define _di_f_string_format_sentence_end_basic_s_
+#define _di_f_string_format_sentence_end_double_basic_s_
#define _di_f_string_format_sentence_end_double_quote_s_
+#define _di_f_string_format_sentence_end_double_quote_basic_s_
#define _di_f_string_format_sentence_end_double_s_
//#define _di_f_string_format_sentence_end_quote_s_
//#define _di_f_string_format_sentence_end_s_
+//#define _di_f_string_format_sentence_end_single_basic_s_
//#define _di_f_string_format_sentence_end_single_quote_s_
+#define _di_f_string_format_sentence_end_single_quote_basic_s_
//#define _di_f_string_format_sentence_end_single_s_
#define _di_f_string_format_ss_double_s_
#define _di_f_string_format_ss_single_s_
//#define _di_fll_error_file_type_socket_s_
#define _di_fll_error_parameter_integer_print_
//#define _di_fll_error_print_
+#define _di_fll_error_print_debug_
//#define _di_fll_error_s_a_
//#define _di_fll_error_s_e_
#define _di_fll_execute_arguments_add_
#endif // _di_controller_print_debug_perform_pid_file_control_socket_
#ifndef _di_controller_print_debug_perform_pid_file_create_problem_
- f_status_t controller_print_debug_perform_pid_file_create_problem(fl_print_t * const print, const f_status_t status, const f_string_t function, const uint8_t is_entry) {
+ f_status_t controller_print_debug_perform_pid_file_create_problem(fl_print_t * const print, const f_status_t status, const f_string_t debug, const uint8_t is_entry) {
if (!print || !print->custom) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_debug_e) return F_output_not;
fl_print_format("%[' could not be written because the destination is read only.%]%r", print->to, print->context, print->context, f_string_eol_s);
}
else {
- controller_print_error_file_status(print, function, main->process.path_pid, f_file_operation_create_s, fll_error_file_type_file_e, status);
+ controller_print_error_file_status(print, debug, main->process.path_pid, f_file_operation_create_s, fll_error_file_type_file_e, status);
}
f_file_stream_lock(print->to);
* @param status
* The status code to process.
* Make sure this has F_status_set_fine() called if the status code has any error or warning bits.
- * @param function
- * The name of the function associated with the error.
+ * @param debug
+ * (optional) The debug details, such as file, line number, and function.
+ *
+ * Set to NULL to disable.
* @param is_entry
* If TRUE, then this operates as an Entry.
* If FALSE, then this operates as an Exit.
#endif
#ifndef _di_controller_print_error_
- f_status_t controller_print_error(fl_print_t * const print, const f_string_t function) {
+ f_status_t controller_print_error(fl_print_t * const print, const f_string_t debug) {
if (!print || !print->custom) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
f_thread_mutex_lock(&main->thread.lock.print.mutex);
- fll_error_print(print, F_status_set_fine(main->setting.state.status), function, fll_error_file_flag_fallback_e);
+ fll_error_print(print, F_status_set_fine(main->setting.state.status), debug, fll_error_file_flag_fallback_e);
f_thread_mutex_unlock(&main->thread.lock.print.mutex);
#endif // _di_controller_print_error_failsafe_item_
#ifndef _di_controller_print_error_file_
- f_status_t controller_print_error_file(fl_print_t * const print, const f_string_t function, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) {
+ f_status_t controller_print_error_file(fl_print_t * const print, const f_string_t debug, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) {
if (!print || !print->custom) return F_status_set_error(F_output_not);
if (print->verbosity == f_console_verbosity_quiet_e) return F_output_not;
f_thread_mutex_lock(&main->thread.lock.print.mutex);
- fll_error_file_print(print, F_status_set_fine(main->setting.state.status), function, fll_error_file_flag_fallback_e, name, operation, type);
+ fll_error_file_print(print, F_status_set_fine(main->setting.state.status), debug, fll_error_file_flag_fallback_e, name, operation, type);
f_thread_mutex_unlock(&main->thread.lock.print.mutex);
#endif // _di_controller_print_error_file_
#ifndef _di_controller_print_error_file_status_
- f_status_t controller_print_error_file_status(fl_print_t * const print, const f_string_t function, const f_string_static_t name, const f_string_static_t operation, const uint8_t type, const f_status_t status) {
+ f_status_t controller_print_error_file_status(fl_print_t * const print, const f_string_t debug, const f_string_static_t name, const f_string_static_t operation, const uint8_t type, const f_status_t status) {
if (!print || !print->custom) return F_status_set_error(F_output_not);
if (print->verbosity == f_console_verbosity_quiet_e) return F_output_not;
f_thread_mutex_lock(&main->thread.lock.print.mutex);
- fll_error_file_print(print, status, function, fll_error_file_flag_fallback_e, name, operation, type);
+ fll_error_file_print(print, status, debug, fll_error_file_flag_fallback_e, name, operation, type);
f_thread_mutex_unlock(&main->thread.lock.print.mutex);
#endif // _di_controller_print_error_file_pid_exists_
#ifndef _di_controller_print_error_status_
- f_status_t controller_print_error_status(fl_print_t * const print, const f_string_t function, const f_status_t status) {
+ f_status_t controller_print_error_status(fl_print_t * const print, const f_string_t debug, const f_status_t status) {
if (!print || !print->custom) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
f_thread_mutex_lock(&main->thread.lock.print.mutex);
- fll_error_print(print, status, function, fll_error_file_flag_fallback_e);
+ fll_error_print(print, status, debug, fll_error_file_flag_fallback_e);
f_thread_mutex_unlock(&main->thread.lock.print.mutex);
* This does not alter print.custom.setting.state.status.
*
* Must not be NULL.
- * @param function
- * The name of the function associated with the error.
+ * @param debug
+ * (optional) The debug details, such as file, line number, and function.
+ *
+ * Set to NULL to disable.
*
* @return
* F_okay on success.
* F_output_not (with error bit) if setting is NULL.
*/
#ifndef _di_controller_print_error_
- extern f_status_t controller_print_error(fl_print_t * const print, const f_string_t function);
+ extern f_status_t controller_print_error(fl_print_t * const print, const f_string_t debug);
#endif // _di_controller_print_error_
/**
* This does not alter print.custom.setting.state.status.
*
* Must not be NULL.
- * @param function
- * The name of the function where the error happened.
- * Set to 0 to disable.
+ * @param debug
+ * (optional) The debug details, such as file, line number, and function.
+ *
+ * Set to NULL to disable.
* @param name
* The name of the file or directory.
* @param operation
* F_output_not (with error bit) if a parameter is NULL.
*/
#ifndef _di_controller_print_error_file_
- extern f_status_t controller_print_error_file(fl_print_t * const print, const f_string_t function, const f_string_static_t name, const f_string_static_t operation, const uint8_t type);
+ extern f_status_t controller_print_error_file(fl_print_t * const print, const f_string_t debug, const f_string_static_t name, const f_string_static_t operation, const uint8_t type);
#endif // _di_controller_print_error_file_
/**
* This does not alter print.custom.setting.state.status.
*
* Must not be NULL.
- * @param function
- * The name of the function where the error happened.
- * Set to 0 to disable.
+ * @param debug
+ * (optional) The debug details, such as file, line number, and function.
+ *
+ * Set to NULL to disable.
* @param name
* The name of the file or directory.
* @param operation
* F_output_not (with error bit) if a parameter is NULL.
*/
#ifndef _di_controller_print_error_file_status_
- extern f_status_t controller_print_error_file_status(fl_print_t * const print, const f_string_t function, const f_string_static_t name, const f_string_static_t operation, const uint8_t type, const f_status_t status);
+ extern f_status_t controller_print_error_file_status(fl_print_t * const print, const f_string_t debug, const f_string_static_t name, const f_string_static_t operation, const uint8_t type, const f_status_t status);
#endif // _di_controller_print_error_file_status_
/**
* This does not alter print.custom.setting.state.status.
*
* Must not be NULL.
- * @param function
- * The name of the function associated with the error.
+ * @param debug
+ * (optional) The debug details, such as file, line number, and function.
+ *
+ * Set to NULL to disable.
* @param status
* The status code to print an error message about.
*
* F_output_not (with error bit) if setting is NULL.
*/
#ifndef _di_controller_print_error_status_
- extern f_status_t controller_print_error_status(fl_print_t * const print, const f_string_t function, const f_status_t status);
+ extern f_status_t controller_print_error_status(fl_print_t * const print, const f_string_t debug, const f_status_t status);
#endif // _di_controller_print_error_status_
/**
#endif
#ifndef _di_controller_print_error_entry_
- f_status_t controller_print_error_entry(fl_print_t * const print, const uint8_t is_entry, const f_status_t status, const f_string_t function, const uint8_t fallback, const f_string_t line_file) {
+ f_status_t controller_print_error_entry(fl_print_t * const print, const uint8_t is_entry, const f_status_t status, const f_string_t debug, const uint8_t fallback, const f_string_t line_file) {
if (!print || !print->custom) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
f_thread_mutex_lock(&main->thread.lock.print.mutex);
- fll_error_print(print, status, function, fallback);
+ fll_error_print(print, status, debug, fallback);
f_file_stream_lock(print->to);
#endif // _di_controller_print_error_entry_cache_
#ifndef _di_controller_print_error_entry_file_
- f_status_t controller_print_error_entry_file(fl_print_t * const print, const uint8_t is_entry, const f_status_t status, const f_string_t function, const uint8_t fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type, const f_string_t line_file) {
+ f_status_t controller_print_error_entry_file(fl_print_t * const print, const uint8_t is_entry, const f_status_t status, const f_string_t debug, const uint8_t fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type, const f_string_t line_file) {
if (!print || !print->custom) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
// 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(&main->thread.lock.print.mutex);
- fll_error_file_print(print, status, function, fallback, name, operation, type);
+ fll_error_file_print(print, status, debug, fallback, name, operation, type);
f_file_stream_lock(print->to);
* @param status
* The status code to process.
* Make sure this has F_status_set_fine() called if the status code has any error or warning bits.
- * @param function
- * (optional) The name of the function where the error happened.
- * Set to 0 to disable.
+ * @param debug
+ * (optional) The debug details, such as file, line number, and function.
+ *
+ * Set to NULL to disable.
* @param fallback
* Set to F_true to print the fallback error message for unknown errors.
* @param thread
* F_output_not (with error bit) if setting is NULL.
*/
#ifndef _di_controller_print_error_entry_
- extern f_status_t controller_print_error_entry(fl_print_t * const print, const uint8_t is_entry, const f_status_t status, const f_string_t function, const uint8_t fallback, const f_string_t line_file);
+ extern f_status_t controller_print_error_entry(fl_print_t * const print, const uint8_t is_entry, const f_status_t status, const f_string_t debug, const uint8_t fallback, const f_string_t line_file);
#endif // _di_controller_print_error_entry_
/**
* @param status
* The status code to process.
* Make sure this has F_status_set_fine() called if the status code has any error or warning bits.
- * @param function
- * (optional) The name of the function where the error happened.
- * Set to 0 to disable.
+ * @param debug
+ * (optional) The debug details, such as file, line number, and function.
+ *
+ * Set to NULL to disable.
* @param fallback
* If TRUE, then print the fallback error message for unknown errors.
* If FALSE, then do not print the fallback error message.
* F_output_not (with error bit) if setting is NULL.
*/
#ifndef _di_controller_print_error_entry_file_
- extern f_status_t controller_print_error_entry_file(fl_print_t * const print, const uint8_t is_entry, const f_status_t status, const f_string_t function, const uint8_t fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type, const f_string_t line_file);
+ extern f_status_t controller_print_error_entry_file(fl_print_t * const print, const uint8_t is_entry, const f_status_t status, const f_string_t debug, const uint8_t fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type, const f_string_t line_file);
#endif // _di_controller_print_error_entry_file_
#ifdef __cplusplus
#endif
#ifndef _di_controller_print_error_perform_pid_file_create_
- f_status_t controller_print_error_perform_pid_file_create(fl_print_t * const print, const f_status_t status, const f_string_t function, const uint8_t is_entry, const f_string_t line_file) {
+ f_status_t controller_print_error_perform_pid_file_create(fl_print_t * const print, const f_status_t status, const f_string_t debug, const uint8_t is_entry, const f_string_t line_file) {
if (!print || !print->custom) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
controller_lock_print(print->to, &main->thread);
- controller_print_error_file_status(print, function, main->process.path_pid, f_file_operation_create_s, fll_error_file_type_file_e, status);
+ controller_print_error_file_status(print, debug, main->process.path_pid, f_file_operation_create_s, fll_error_file_type_file_e, status);
f_file_stream_lock(print->to);
* @param status
* The status code to process.
* Make sure this has F_status_set_fine() called if the status code has any error or warning bits.
- * @param function
- * The name of the function associated with the error.
+ * @param debug
+ * (optional) The debug details, such as file, line number, and function.
+ *
+ * Set to NULL to disable.
* @param is_entry
* If TRUE, then this operates as an Entry.
* If FALSE, then this operates as an Exit.
* F_output_not (with error bit) if setting is NULL.
*/
#ifndef _di_controller_print_error_perform_pid_file_create_
- extern f_status_t controller_print_error_perform_pid_file_create(fl_print_t * const print, const f_status_t status, const f_string_t function, const uint8_t is_entry, const f_string_t line_file);
+ extern f_status_t controller_print_error_perform_pid_file_create(fl_print_t * const print, const f_status_t status, const f_string_t debug, const uint8_t is_entry, const f_string_t line_file);
#endif // _di_controller_print_error_perform_pid_file_create_
#ifdef __cplusplus
#endif
#ifndef _di_controller_print_error_rule_
- f_status_t controller_print_error_rule(fl_print_t * const print, controller_cache_action_t * const action, const f_status_t status, const f_string_t function, const uint8_t fallback, const uint8_t item, const f_string_t line_file) {
+ f_status_t controller_print_error_rule(fl_print_t * const print, controller_cache_action_t * const action, const f_status_t status, const f_string_t debug, const uint8_t fallback, const uint8_t item, const f_string_t line_file) {
if (!print || !print->custom) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
f_thread_mutex_lock(&main->thread.lock.print.mutex);
- fll_error_print(print, status, function, fallback);
+ fll_error_print(print, status, debug, fallback);
f_file_stream_lock(print->to);
* @param status
* The status code to process.
* Make sure this has F_status_set_fine() called if the status code has any error or warning bits.
- * @param function
- * The name of the function where the error happened.
- * Set to 0 to disable.
+ * @param debug
+ * (optional) The debug details, such as file, line number, and function.
+ *
+ * Set to NULL to disable.
* @param fallback
* Set to F_true to print the fallback error message for unknown errors.
* @param item
* F_output_not (with error bit) if setting is NULL.
*/
#ifndef _di_controller_print_error_rule_
- extern f_status_t controller_print_error_rule(fl_print_t * const print, controller_cache_action_t * const action, const f_status_t status, const f_string_t function, const uint8_t fallback, const uint8_t item, const f_string_t line_file);
+ extern f_status_t controller_print_error_rule(fl_print_t * const print, controller_cache_action_t * const action, const f_status_t status, const f_string_t debug, const uint8_t fallback, const uint8_t item, const f_string_t line_file);
#endif // _di_controller_print_error_rule_
/**