Add more common program print functions.
The parameter missing function is ironically missing the print messages.
I've decided to accept the loss of binary size for improved runtime efficiency (both of which are likely slight losses and improvements).
There are now "unlocked" and "locked" print line first and print line last functions for each program.
The boolean for designating lock is removed.
These functions are mostly wrappers and so the cost in size to be hopefully negligible.
I imagine time will tell whether this is an overall good or a bad decision.
Start working on iki_read.
extern "C" {
#endif
+#ifndef _di_fll_program_print_error_missing_file_
+ f_status_t fll_program_print_error_missing_file(const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ f_file_stream_lock(print.to);
+
+ fl_print_format("%[%QNo files are specified.%]%r", print.to.stream, print.set->error, print.prefix, print.set->error, f_string_eol_s);
+
+ f_file_stream_unlock(print.to);
+
+ return F_none;
+ }
+#endif // _di_fll_program_print_error_missing_file_
+
#ifndef _di_fll_program_print_error_missing_variable_not_zero_
f_status_t fll_program_print_error_missing_variable_not_zero(const fl_print_t print, const f_string_static_t variable) {
f_file_stream_lock(print.to);
+ fl_print_format("%[%QThe parameter %]", print.to.stream, print.set->error, print.prefix, print.set->error);
+ fl_print_format("%[%Q%Q%]", print.to.stream, print.set->notable, symbol, parameter, print.set->notable);
+ fl_print_format("%[ is specified, but no value is given.%]%r", print.to.stream, print.set->error, print.set->error, f_string_eol_s);
+
f_file_stream_unlock(print.to);
return F_none;
#endif
/**
+ * Print an error message when a file is not provided.
+ *
+ * This is only printed when verbosity is not set to quiet.
+ *
+ * This uses the following:
+ * - print.set->error: For the error context.
+ * - print.set->strong: For the highlighting context
+ * - print.prefix: For the prefixing a string to the message (such as "ERROR:").
+ *
+ * @param print
+ * The output structure.
+ * This locks, uses, and unlocks the file stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fll_program_print_error_missing_file_
+ extern f_status_t fll_program_print_error_missing_file(const fl_print_t print);
+#endif // _di_fll_program_print_error_missing_file_
+
+/**
* Print an error message a variable not being defined or the variable has a length is 0.
*
* This is only printed when verbosity is not set to quiet.
}
#endif // _di_byte_dump_print_help_
-#ifndef _di_byte_dump_print_line_first_
- void byte_dump_print_line_first(byte_dump_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_byte_dump_print_line_first_locked_
+ f_status_t byte_dump_print_line_first_locked(byte_dump_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+ if (setting->flag & byte_dump_main_flag_verify_e) return;
- if (lock) {
- fll_print_dynamic_raw(setting->line_first, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
+ if (setting->flag & byte_dump_main_flag_file_to_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_byte_dump_print_line_first_locked_
+
+#ifndef _di_byte_dump_print_line_first_unlocked_
+ f_status_t byte_dump_print_line_first_unlocked(byte_dump_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+ if (setting->flag & byte_dump_main_flag_verify_e) return;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
+ if (setting->flag & byte_dump_main_flag_file_to_e) return F_output_not;
}
+
+ fll_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
}
-#endif // _di_byte_dump_print_line_first_
+#endif // _di_byte_dump_print_line_first_unlocked_
-#ifndef _di_byte_dump_print_line_last_
- void byte_dump_print_line_last(byte_dump_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_byte_dump_print_line_last_locked_
+ f_status_t byte_dump_print_line_last_locked(byte_dump_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
- if (print.verbosity == f_console_verbosity_error_e && !F_status_is_error(setting->status)) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
if (setting->flag & byte_dump_main_flag_verify_e) return;
- if ((setting->flag & byte_dump_main_flag_file_to_e) && !F_status_is_error(setting->status)) return;
- if (lock) {
- fll_print_dynamic_raw(setting->line_last, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
+ if (setting->flag & byte_dump_main_flag_file_to_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ fll_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_byte_dump_print_line_last_locked_
+
+#ifndef _di_byte_dump_print_line_last_unlocked_
+ f_status_t byte_dump_print_line_last_unlocked(byte_dump_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+ if (setting->flag & byte_dump_main_flag_verify_e) return;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
+ if (setting->flag & byte_dump_main_flag_file_to_e) return F_output_not;
}
+
+ f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
}
-#endif // _di_byte_dump_print_line_last_
+#endif // _di_byte_dump_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
*
* This is generally either the first line in the program or the first line printed before an error message.
*
+ * This function locks and then unlocks the input stream when printing.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_byte_dump_print_line_first_locked_
+ extern f_status_t byte_dump_print_line_first_locked(byte_dump_setting_t * const setting, const fl_print_t print);
+#endif // _di_byte_dump_print_line_first_locked_
+
+/**
+ * Print first new line, unless verbosity says otherwise.
+ *
+ * This is generally either the first line in the program or the first line printed before an error message.
+ *
+ * This function neither locks nor unlocks the input stream.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_byte_dump_print_line_first_unlocked_
+ extern f_status_t byte_dump_print_line_first_unlocked(byte_dump_setting_t * const setting, const fl_print_t print);
+#endif // _di_byte_dump_print_line_first_unlocked_
+
+/**
+ * Print last new line when the main is complete, unless verbosity says otherwise.
+ *
+ * This is generally the very last line printed in the program.
+ *
+ * This function locks and then unlocks the input stream when printing.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_byte_dump_print_line_first_
- extern void byte_dump_print_line_first(byte_dump_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_byte_dump_print_line_first_
+#ifndef _di_byte_dump_print_line_last_locked_
+ extern f_status_t byte_dump_print_line_last_locked(byte_dump_setting_t * const setting, const fl_print_t print);
+#endif // _di_byte_dump_print_line_last_locked_
/**
* Print last new line when the main is complete, unless verbosity says otherwise.
*
* This is generally the very last line printed in the program.
*
+ * This function neither locks nor unlocks the input stream.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_byte_dump_print_line_last_
- extern void byte_dump_print_line_last(byte_dump_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_byte_dump_print_line_last_
+#ifndef _di_byte_dump_print_line_last_unlocked_
+ extern f_status_t byte_dump_print_line_last_unlocked(byte_dump_setting_t * const setting, const fl_print_t print);
+#endif // _di_byte_dump_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
}
#endif // _di_control_print_help_
-#ifndef _di_control_print_line_first_
- void control_print_line_first(control_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_control_print_line_first_locked_
+ f_status_t control_print_line_first_locked(control_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+ if (setting->flag & control_main_flag_verify_e) return;
- if (lock) {
- fll_print_dynamic_raw(setting->line_first, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
+ if (setting->flag & control_main_flag_file_to_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_control_print_line_first_locked_
+
+#ifndef _di_control_print_line_first_unlocked_
+ f_status_t control_print_line_first_unlocked(control_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+ if (setting->flag & control_main_flag_verify_e) return;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
+ if (setting->flag & control_main_flag_file_to_e) return F_output_not;
}
+
+ fll_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
}
-#endif // _di_control_print_line_first_
+#endif // _di_control_print_line_first_unlocked_
-#ifndef _di_control_print_line_last_
- void control_print_line_last(control_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_control_print_line_last_locked_
+ f_status_t control_print_line_last_locked(control_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
- if (print.verbosity == f_console_verbosity_error_e && !F_status_is_error(setting->status)) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
if (setting->flag & control_main_flag_verify_e) return;
- if ((setting->flag & control_main_flag_file_to_e) && !F_status_is_error(setting->status)) return;
- if (lock) {
- fll_print_dynamic_raw(setting->line_last, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
+ if (setting->flag & control_main_flag_file_to_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ fll_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_control_print_line_last_locked_
+
+#ifndef _di_control_print_line_last_unlocked_
+ f_status_t control_print_line_last_unlocked(control_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+ if (setting->flag & control_main_flag_verify_e) return;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
+ if (setting->flag & control_main_flag_file_to_e) return F_output_not;
}
+
+ f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
}
-#endif // _di_control_print_line_last_
+#endif // _di_control_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
/**
* Print help.
*
- * @param main
- * The main program data.
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * The output structure to print to.
*
* @return
* F_none on success.
- *
- * @see control_main()
+ * F_output_not on success, but no printing is performed.
*/
#ifndef _di_control_print_help_
- extern f_status_t control_print_help(const fll_program_data_t * const main);
-#endif // _di_control_print_help_
+ extern f_status_t control_print_help(control_setting_t * const setting, const fl_print_t print);
+#endif // _di_control_print_help_control
/**
* Print first new line, unless verbosity says otherwise.
*
* This is generally either the first line in the program or the first line printed before an error message.
*
+ * This function locks and then unlocks the input stream when printing.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_control_print_line_first_
- extern void control_print_line_first(control_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_control_print_line_first_
+#ifndef _di_control_print_line_first_locked_
+ extern f_status_t control_print_line_first_locked(control_setting_t * const setting, const fl_print_t print);
+#endif // _di_control_print_line_first_locked_
+
+/**
+ * Print first new line, unless verbosity says otherwise.
+ *
+ * This is generally either the first line in the program or the first line printed before an error message.
+ *
+ * This function neither locks nor unlocks the input stream.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_control_print_line_first_unlocked_
+ extern f_status_t control_print_line_first_unlocked(control_setting_t * const setting, const fl_print_t print);
+#endif // _di_control_print_line_first_unlocked_
+
+/**
+ * Print last new line when the main is complete, unless verbosity says otherwise.
+ *
+ * This is generally the very last line printed in the program.
+ *
+ * This function locks and then unlocks the input stream when printing.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_control_print_line_last_locked_
+ extern f_status_t control_print_line_last_locked(control_setting_t * const setting, const fl_print_t print);
+#endif // _di_control_print_line_last_locked_
/**
* Print last new line when the main is complete, unless verbosity says otherwise.
*
* This is generally the very last line printed in the program.
*
+ * This function neither locks nor unlocks the input stream.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_control_print_line_last_
- extern void control_print_line_last(control_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_control_print_line_last_
+#ifndef _di_control_print_line_last_unlocked_
+ extern f_status_t control_print_line_last_unlocked(control_setting_t * const setting, const fl_print_t print);
+#endif // _di_control_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
}
#endif // _di_controller_print_help_
-#ifndef _di_controller_print_line_first_
- void controller_print_line_first(controller_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_controller_print_line_first_locked_
+ f_status_t controller_print_line_first_locked(controller_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+ if (setting->flag & controller_main_flag_verify_e) return;
- if (lock) {
- fll_print_dynamic_raw(setting->line_first, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
+ if (setting->flag & controller_main_flag_file_to_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_controller_print_line_first_locked_
+
+#ifndef _di_controller_print_line_first_unlocked_
+ f_status_t controller_print_line_first_unlocked(controller_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+ if (setting->flag & controller_main_flag_verify_e) return;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
+ if (setting->flag & controller_main_flag_file_to_e) return F_output_not;
}
+
+ fll_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
}
-#endif // _di_controller_print_line_first_
+#endif // _di_controller_print_line_first_unlocked_
-#ifndef _di_controller_print_line_last_
- void controller_print_line_last(controller_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_controller_print_line_last_locked_
+ f_status_t controller_print_line_last_locked(controller_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
- if (print.verbosity == f_console_verbosity_error_e && !F_status_is_error(setting->status)) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
if (setting->flag & controller_main_flag_verify_e) return;
- if ((setting->flag & controller_main_flag_file_to_e) && !F_status_is_error(setting->status)) return;
- if (lock) {
- fll_print_dynamic_raw(setting->line_last, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
+ if (setting->flag & controller_main_flag_file_to_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ fll_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_controller_print_line_last_locked_
+
+#ifndef _di_controller_print_line_last_unlocked_
+ f_status_t controller_print_line_last_unlocked(controller_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+ if (setting->flag & controller_main_flag_verify_e) return;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
+ if (setting->flag & controller_main_flag_file_to_e) return F_output_not;
}
+
+ f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
}
-#endif // _di_controller_print_line_last_
+#endif // _di_controller_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
/**
* Print help.
*
- * @param main
- * The main program data.
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * The output structure to print to.
*
* @return
* F_none on success.
- *
- * @see controller_main()
+ * F_output_not on success, but no printing is performed.
*/
#ifndef _di_controller_print_help_
- extern f_status_t controller_print_help(controller_main_t * const main);
+ extern f_status_t controller_print_help(controller_setting_t * const setting, const fl_print_t print);
#endif // _di_controller_print_help_
/**
*
* This is generally either the first line in the program or the first line printed before an error message.
*
+ * This function locks and then unlocks the input stream when printing.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_controller_print_line_first_locked_
+ extern f_status_t controller_print_line_first_locked(controller_setting_t * const setting, const fl_print_t print);
+#endif // _di_controller_print_line_first_locked_
+
+/**
+ * Print first new line, unless verbosity says otherwise.
+ *
+ * This is generally either the first line in the program or the first line printed before an error message.
+ *
+ * This function neither locks nor unlocks the input stream.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_controller_print_line_first_
- extern void controller_print_line_first(controller_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_controller_print_line_first_
+#ifndef _di_controller_print_line_first_unlocked_
+ extern f_status_t controller_print_line_first_unlocked(controller_setting_t * const setting, const fl_print_t print);
+#endif // _di_controller_print_line_first_unlocked_
/**
* Print last new line when the main is complete, unless verbosity says otherwise.
*
* This is generally the very last line printed in the program.
*
+ * This function locks and then unlocks the input stream when printing.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_controller_print_line_last_
- extern void controller_print_line_last(controller_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_controller_print_line_last_
+#ifndef _di_controller_print_line_last_locked_
+ extern f_status_t controller_print_line_last_locked(controller_setting_t * const setting, const fl_print_t print);
+#endif // _di_controller_print_line_last_locked_
+/**
+ * Print last new line when the main is complete, unless verbosity says otherwise.
+ *
+ * This is generally the very last line printed in the program.
+ *
+ * This function neither locks nor unlocks the input stream.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_controller_print_line_last_unlocked_
+ extern f_status_t controller_print_line_last_unlocked(controller_setting_t * const setting, const fl_print_t print);
+#endif // _di_controller_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
#endif
}
#endif // _di_fake_print_help_
-#ifndef _di_fake_print_line_first_
- void fake_print_line_first(fake_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_fake_print_line_first_locked_
+ f_status_t fake_print_line_first_locked(fake_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_first, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_fake_print_line_first_locked_
+
+#ifndef _di_fake_print_line_first_unlocked_
+ f_status_t fake_print_line_first_unlocked(fake_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
+
+ fll_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
}
-#endif // _di_fake_print_line_first_
+#endif // _di_fake_print_line_first_unlocked_
-#ifndef _di_fake_print_line_last_
- void fake_print_line_last(fake_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_fake_print_line_last_locked_
+ f_status_t fake_print_line_last_locked(fake_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
- if (print.verbosity == f_console_verbosity_error_e && !F_status_is_error(setting->status)) return;
- if (setting->flag & fake_main_flag_verify_e) return;
- if ((setting->flag & fake_main_flag_file_to_e) && !F_status_is_error(setting->status)) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_last, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ fll_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_fake_print_line_last_locked_
+
+#ifndef _di_fake_print_line_last_unlocked_
+ f_status_t fake_print_line_last_unlocked(fake_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
+
+ f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
}
-#endif // _di_fake_print_line_last_
+#endif // _di_fake_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
*
* This is generally either the first line in the program or the first line printed before an error message.
*
+ * This function locks and then unlocks the input stream when printing.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fake_print_line_first_locked_
+ extern f_status_t fake_print_line_first_locked(fake_setting_t * const setting, const fl_print_t print);
+#endif // _di_fake_print_line_first_locked_
+
+/**
+ * Print first new line, unless verbosity says otherwise.
+ *
+ * This is generally either the first line in the program or the first line printed before an error message.
+ *
+ * This function neither locks nor unlocks the input stream.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fake_print_line_first_unlocked_
+ extern f_status_t fake_print_line_first_unlocked(fake_setting_t * const setting, const fl_print_t print);
+#endif // _di_fake_print_line_first_unlocked_
+
+/**
+ * Print last new line when the main is complete, unless verbosity says otherwise.
+ *
+ * This is generally the very last line printed in the program.
+ *
+ * This function locks and then unlocks the input stream when printing.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_fake_print_line_first_
- extern void fake_print_line_first(fake_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_fake_print_line_first_
+#ifndef _di_fake_print_line_last_locked_
+ extern f_status_t fake_print_line_last_locked(fake_setting_t * const setting, const fl_print_t print);
+#endif // _di_fake_print_line_last_locked_
/**
* Print last new line when the main is complete, unless verbosity says otherwise.
*
* This is generally the very last line printed in the program.
*
+ * This function neither locks nor unlocks the input stream.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_fake_print_line_last_
- extern void fake_print_line_last(fake_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_fake_print_line_last_
+#ifndef _di_fake_print_line_last_unlocked_
+ extern f_status_t fake_print_line_last_unlocked(fake_setting_t * const setting, const fl_print_t print);
+#endif // _di_fake_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
#endif
#ifndef _di_firewall_print_help_
- f_status_t firewall_print_help(utf8_setting_t * const setting, const fl_print_t print) {
+ f_status_t firewall_print_help(firewall_setting_t * const setting, const fl_print_t print) {
f_file_stream_lock(print.to);
}
#endif // _di_firewall_print_help_
-#ifndef _di_firewall_print_line_first_
- void firewall_print_line_first(firewall_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_firewall_print_line_first_locked_
+ f_status_t firewall_print_line_first_locked(firewall_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_first, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_firewall_print_line_first_locked_
+
+#ifndef _di_firewall_print_line_first_unlocked_
+ f_status_t firewall_print_line_first_unlocked(firewall_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
+
+ fll_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
}
-#endif // _di_firewall_print_line_first_
+#endif // _di_firewall_print_line_first_unlocked_
-#ifndef _di_firewall_print_line_last_
- void firewall_print_line_last(firewall_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_firewall_print_line_last_locked_
+ f_status_t firewall_print_line_last_locked(firewall_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
- if (print.verbosity == f_console_verbosity_error_e && !F_status_is_error(setting->status)) return;
- if (setting->flag & firewall_main_flag_verify_e) return;
- if ((setting->flag & firewall_main_flag_file_to_e) && !F_status_is_error(setting->status)) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_last, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ fll_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_firewall_print_line_last_locked_
+
+#ifndef _di_firewall_print_line_last_unlocked_
+ f_status_t firewall_print_line_last_unlocked(firewall_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
+
+ f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
}
-#endif // _di_firewall_print_line_last_
+#endif // _di_firewall_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
*
* This is generally either the first line in the program or the first line printed before an error message.
*
+ * This function locks and then unlocks the input stream when printing.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_firewall_print_line_first_locked_
+ extern f_status_t firewall_print_line_first_locked(firewall_setting_t * const setting, const fl_print_t print);
+#endif // _di_firewall_print_line_first_locked_
+
+/**
+ * Print first new line, unless verbosity says otherwise.
+ *
+ * This is generally either the first line in the program or the first line printed before an error message.
+ *
+ * This function neither locks nor unlocks the input stream.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_firewall_print_line_first_unlocked_
+ extern f_status_t firewall_print_line_first_unlocked(firewall_setting_t * const setting, const fl_print_t print);
+#endif // _di_firewall_print_line_first_unlocked_
+
+/**
+ * Print last new line when the main is complete, unless verbosity says otherwise.
+ *
+ * This is generally the very last line printed in the program.
+ *
+ * This function locks and then unlocks the input stream when printing.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_firewall_print_line_first_
- extern void firewall_print_line_first(firewall_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_firewall_print_line_first_
+#ifndef _di_firewall_print_line_last_locked_
+ extern f_status_t firewall_print_line_last_locked(firewall_setting_t * const setting, const fl_print_t print);
+#endif // _di_firewall_print_line_last_locked_
/**
* Print last new line when the main is complete, unless verbosity says otherwise.
*
* This is generally the very last line printed in the program.
*
+ * This function neither locks nor unlocks the input stream.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_firewall_print_line_last_
- extern void firewall_print_line_last(firewall_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_firewall_print_line_last_
+#ifndef _di_firewall_print_line_last_unlocked_
+ extern f_status_t firewall_print_line_last_unlocked(firewall_setting_t * const setting, const fl_print_t print);
+#endif // _di_firewall_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
#endif
#ifndef _di_fss_basic_list_read_print_help_
- f_status_t fss_basic_list_read_print_help(utf8_setting_t * const setting, const fl_print_t print) {
+ f_status_t fss_basic_list_read_print_help(fss_basic_list_read_setting_t * const setting, const fl_print_t print) {
f_file_stream_lock(print.to);
}
#endif // _di_fss_basic_list_read_print_help_
-#ifndef _di_fss_basic_list_read_print_line_first_
- void fss_basic_list_read_print_line_first(fss_basic_list_read_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_fss_basic_list_read_print_line_first_locked_
+ f_status_t fss_basic_list_read_print_line_first_locked(fss_basic_list_read_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_first, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_fss_basic_list_read_print_line_first_locked_
+
+#ifndef _di_fss_basic_list_read_print_line_first_unlocked_
+ f_status_t fss_basic_list_read_print_line_first_unlocked(fss_basic_list_read_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
+
+ fll_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
}
-#endif // _di_fss_basic_list_read_print_line_first_
+#endif // _di_fss_basic_list_read_print_line_first_unlocked_
-#ifndef _di_fss_basic_list_read_print_line_last_
- void fss_basic_list_read_print_line_last(fss_basic_list_read_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_fss_basic_list_read_print_line_last_locked_
+ f_status_t fss_basic_list_read_print_line_last_locked(fss_basic_list_read_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
- if (print.verbosity == f_console_verbosity_error_e && !F_status_is_error(setting->status)) return;
- if (setting->flag & fss_basic_list_read_main_flag_verify_e) return;
- if ((setting->flag & fss_basic_list_read_main_flag_file_to_e) && !F_status_is_error(setting->status)) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_last, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ fll_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_fss_basic_list_read_print_line_last_locked_
+
+#ifndef _di_fss_basic_list_read_print_line_last_unlocked_
+ f_status_t fss_basic_list_read_print_line_last_unlocked(fss_basic_list_read_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
+
+ f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
}
-#endif // _di_fss_basic_list_read_print_line_last_
+#endif // _di_fss_basic_list_read_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
*
* This is generally either the first line in the program or the first line printed before an error message.
*
+ * This function locks and then unlocks the input stream when printing.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_basic_list_read_print_line_first_locked_
+ extern f_status_t fss_basic_list_read_print_line_first_locked(fss_basic_list_read_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_basic_list_read_print_line_first_locked_
+
+/**
+ * Print first new line, unless verbosity says otherwise.
+ *
+ * This is generally either the first line in the program or the first line printed before an error message.
+ *
+ * This function neither locks nor unlocks the input stream.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_basic_list_read_print_line_first_unlocked_
+ extern f_status_t fss_basic_list_read_print_line_first_unlocked(fss_basic_list_read_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_basic_list_read_print_line_first_unlocked_
+
+/**
+ * Print last new line when the main is complete, unless verbosity says otherwise.
+ *
+ * This is generally the very last line printed in the program.
+ *
+ * This function locks and then unlocks the input stream when printing.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_fss_basic_list_read_print_line_first_
- extern void fss_basic_list_read_print_line_first(fss_basic_list_read_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_fss_basic_list_read_print_line_first_
+#ifndef _di_fss_basic_list_read_print_line_last_locked_
+ extern f_status_t fss_basic_list_read_print_line_last_locked(fss_basic_list_read_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_basic_list_read_print_line_last_locked_
/**
* Print last new line when the main is complete, unless verbosity says otherwise.
*
* This is generally the very last line printed in the program.
*
+ * This function neither locks nor unlocks the input stream.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_fss_basic_list_read_print_line_last_
- extern void fss_basic_list_read_print_line_last(fss_basic_list_read_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_fss_basic_list_read_print_line_last_
+#ifndef _di_fss_basic_list_read_print_line_last_unlocked_
+ extern f_status_t fss_basic_list_read_print_line_last_unlocked(fss_basic_list_read_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_basic_list_read_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
#endif
#ifndef _di_fss_basic_list_write_print_help_
- f_status_t fss_basic_list_write_print_help(utf8_setting_t * const setting, const fl_print_t print) {
+ f_status_t fss_basic_list_write_print_help(fss_basic_list_write_setting_t * const setting, const fl_print_t print) {
f_file_stream_lock(print.to);
}
#endif // _di_fss_basic_list_write_print_help_
-#ifndef _di_fss_basic_list_write_print_line_first_
- void fss_basic_list_write_print_line_first(fss_basic_list_write_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_fss_basic_list_write_print_line_first_locked_
+ f_status_t fss_basic_list_write_print_line_first_locked(fss_basic_list_write_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_first, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_fss_basic_list_write_print_line_first_locked_
+
+#ifndef _di_fss_basic_list_write_print_line_first_unlocked_
+ f_status_t fss_basic_list_write_print_line_first_unlocked(fss_basic_list_write_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
+
+ fll_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
}
-#endif // _di_fss_basic_list_write_print_line_first_
+#endif // _di_fss_basic_list_write_print_line_first_unlocked_
-#ifndef _di_fss_basic_list_write_print_line_last_
- void fss_basic_list_write_print_line_last(fss_basic_list_write_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_fss_basic_list_write_print_line_last_locked_
+ f_status_t fss_basic_list_write_print_line_last_locked(fss_basic_list_write_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
- if (print.verbosity == f_console_verbosity_error_e && !F_status_is_error(setting->status)) return;
- if (setting->flag & fss_basic_list_write_main_flag_verify_e) return;
- if ((setting->flag & fss_basic_list_write_main_flag_file_to_e) && !F_status_is_error(setting->status)) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_last, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ fll_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_fss_basic_list_write_print_line_last_locked_
+
+#ifndef _di_fss_basic_list_write_print_line_last_unlocked_
+ f_status_t fss_basic_list_write_print_line_last_unlocked(fss_basic_list_write_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
+
+ f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
}
-#endif // _di_fss_basic_list_write_print_line_last_
+#endif // _di_fss_basic_list_write_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
*
* This is generally either the first line in the program or the first line printed before an error message.
*
+ * This function locks and then unlocks the input stream when printing.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_basic_list_write_print_line_first_locked_
+ extern f_status_t fss_basic_list_write_print_line_first_locked(fss_basic_list_write_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_basic_list_write_print_line_first_locked_
+
+/**
+ * Print first new line, unless verbosity says otherwise.
+ *
+ * This is generally either the first line in the program or the first line printed before an error message.
+ *
+ * This function neither locks nor unlocks the input stream.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_basic_list_write_print_line_first_unlocked_
+ extern f_status_t fss_basic_list_write_print_line_first_unlocked(fss_basic_list_write_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_basic_list_write_print_line_first_unlocked_
+
+/**
+ * Print last new line when the main is complete, unless verbosity says otherwise.
+ *
+ * This is generally the very last line printed in the program.
+ *
+ * This function locks and then unlocks the input stream when printing.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_fss_basic_list_write_print_line_first_
- extern void fss_basic_list_write_print_line_first(fss_basic_list_write_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_fss_basic_list_write_print_line_first_
+#ifndef _di_fss_basic_list_write_print_line_last_locked_
+ extern f_status_t fss_basic_list_write_print_line_last_locked(fss_basic_list_write_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_basic_list_write_print_line_last_locked_
/**
* Print last new line when the main is complete, unless verbosity says otherwise.
*
* This is generally the very last line printed in the program.
*
+ * This function neither locks nor unlocks the input stream.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_fss_basic_list_write_print_line_last_
- extern void fss_basic_list_write_print_line_last(fss_basic_list_write_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_fss_basic_list_write_print_line_last_
+#ifndef _di_fss_basic_list_write_print_line_last_unlocked_
+ extern f_status_t fss_basic_list_write_print_line_last_unlocked(fss_basic_list_write_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_basic_list_write_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
}
#endif // _di_fss_basic_read_print_help_
-#ifndef _di_fss_basic_read_print_line_first_
- void fss_basic_read_print_line_first(fss_basic_read_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_fss_basic_read_print_line_first_locked_
+ f_status_t fss_basic_read_print_line_first_locked(fss_basic_read_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_first, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_fss_basic_read_print_line_first_locked_
+
+#ifndef _di_fss_basic_read_print_line_first_unlocked_
+ f_status_t fss_basic_read_print_line_first_unlocked(fss_basic_read_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
+
+ fll_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
}
-#endif // _di_fss_basic_read_print_line_first_
+#endif // _di_fss_basic_read_print_line_first_unlocked_
-#ifndef _di_fss_basic_read_print_line_last_
- void fss_basic_read_print_line_last(fss_basic_read_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_fss_basic_read_print_line_last_locked_
+ f_status_t fss_basic_read_print_line_last_locked(fss_basic_read_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
- if (print.verbosity == f_console_verbosity_error_e && !F_status_is_error(setting->status)) return;
- if (setting->flag & fss_basic_read_main_flag_verify_e) return;
- if ((setting->flag & fss_basic_read_main_flag_file_to_e) && !F_status_is_error(setting->status)) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_last, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ fll_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_fss_basic_read_print_line_last_locked_
+
+#ifndef _di_fss_basic_read_print_line_last_unlocked_
+ f_status_t fss_basic_read_print_line_last_unlocked(fss_basic_read_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
+
+ f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
}
-#endif // _di_fss_basic_read_print_line_last_
+#endif // _di_fss_basic_read_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
*
* This is generally either the first line in the program or the first line printed before an error message.
*
+ * This function locks and then unlocks the input stream when printing.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_basic_read_print_line_first_locked_
+ extern f_status_t fss_basic_read_print_line_first_locked(fss_basic_read_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_basic_read_print_line_first_locked_
+
+/**
+ * Print first new line, unless verbosity says otherwise.
+ *
+ * This is generally either the first line in the program or the first line printed before an error message.
+ *
+ * This function neither locks nor unlocks the input stream.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_basic_read_print_line_first_unlocked_
+ extern f_status_t fss_basic_read_print_line_first_unlocked(fss_basic_read_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_basic_read_print_line_first_unlocked_
+
+/**
+ * Print last new line when the main is complete, unless verbosity says otherwise.
+ *
+ * This is generally the very last line printed in the program.
+ *
+ * This function locks and then unlocks the input stream when printing.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_fss_basic_read_print_line_first_
- extern void fss_basic_read_print_line_first(fss_basic_read_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_fss_basic_read_print_line_first_
+#ifndef _di_fss_basic_read_print_line_last_locked_
+ extern f_status_t fss_basic_read_print_line_last_locked(fss_basic_read_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_basic_read_print_line_last_locked_
/**
* Print last new line when the main is complete, unless verbosity says otherwise.
*
* This is generally the very last line printed in the program.
*
+ * This function neither locks nor unlocks the input stream.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_fss_basic_read_print_line_last_
- extern void fss_basic_read_print_line_last(fss_basic_read_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_fss_basic_read_print_line_last_
+#ifndef _di_fss_basic_read_print_line_last_unlocked_
+ extern f_status_t fss_basic_read_print_line_last_unlocked(fss_basic_read_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_basic_read_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
}
#endif // _di_fss_basic_write_print_help_
-#ifndef _di_fss_basic_write_print_line_first_
- void fss_basic_write_print_line_first(fss_basic_write_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_fss_basic_write_print_line_first_locked_
+ f_status_t fss_basic_write_print_line_first_locked(fss_basic_write_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_first, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_fss_basic_write_print_line_first_locked_
+
+#ifndef _di_fss_basic_write_print_line_first_unlocked_
+ f_status_t fss_basic_write_print_line_first_unlocked(fss_basic_write_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
+
+ fll_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
}
-#endif // _di_fss_basic_write_print_line_first_
+#endif // _di_fss_basic_write_print_line_first_unlocked_
-#ifndef _di_fss_basic_write_print_line_last_
- void fss_basic_write_print_line_last(fss_basic_write_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_fss_basic_write_print_line_last_locked_
+ f_status_t fss_basic_write_print_line_last_locked(fss_basic_write_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
- if (print.verbosity == f_console_verbosity_error_e && !F_status_is_error(setting->status)) return;
- if (setting->flag & fss_basic_write_main_flag_verify_e) return;
- if ((setting->flag & fss_basic_write_main_flag_file_to_e) && !F_status_is_error(setting->status)) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_last, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ fll_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_fss_basic_write_print_line_last_locked_
+
+#ifndef _di_fss_basic_write_print_line_last_unlocked_
+ f_status_t fss_basic_write_print_line_last_unlocked(fss_basic_write_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
+
+ f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
}
-#endif // _di_fss_basic_write_print_line_last_
+#endif // _di_fss_basic_write_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
*
* This is generally either the first line in the program or the first line printed before an error message.
*
+ * This function locks and then unlocks the input stream when printing.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_basic_write_print_line_first_locked_
+ extern f_status_t fss_basic_write_print_line_first_locked(fss_basic_write_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_basic_write_print_line_first_locked_
+
+/**
+ * Print first new line, unless verbosity says otherwise.
+ *
+ * This is generally either the first line in the program or the first line printed before an error message.
+ *
+ * This function neither locks nor unlocks the input stream.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_basic_write_print_line_first_unlocked_
+ extern f_status_t fss_basic_write_print_line_first_unlocked(fss_basic_write_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_basic_write_print_line_first_unlocked_
+
+/**
+ * Print last new line when the main is complete, unless verbosity says otherwise.
+ *
+ * This is generally the very last line printed in the program.
+ *
+ * This function locks and then unlocks the input stream when printing.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_fss_basic_write_print_line_first_
- extern void fss_basic_write_print_line_first(fss_basic_write_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_fss_basic_write_print_line_first_
+#ifndef _di_fss_basic_write_print_line_last_locked_
+ extern f_status_t fss_basic_write_print_line_last_locked(fss_basic_write_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_basic_write_print_line_last_locked_
/**
* Print last new line when the main is complete, unless verbosity says otherwise.
*
* This is generally the very last line printed in the program.
*
+ * This function neither locks nor unlocks the input stream.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_fss_basic_write_print_line_last_
- extern void fss_basic_write_print_line_last(fss_basic_write_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_fss_basic_write_print_line_last_
+#ifndef _di_fss_basic_write_print_line_last_unlocked_
+ extern f_status_t fss_basic_write_print_line_last_unlocked(fss_basic_write_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_basic_write_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
}
#endif // _di_fss_embedded_list_read_print_help_
-#ifndef _di_fss_embedded_list_read_print_line_first_
- void fss_embedded_list_read_print_line_first(fss_embedded_list_read_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_fss_embedded_list_read_print_line_first_locked_
+ f_status_t fss_embedded_list_read_print_line_first_locked(fss_embedded_list_read_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_first, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_fss_embedded_list_read_print_line_first_locked_
+
+#ifndef _di_fss_embedded_list_read_print_line_first_unlocked_
+ f_status_t fss_embedded_list_read_print_line_first_unlocked(fss_embedded_list_read_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
+
+ fll_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
}
-#endif // _di_fss_embedded_list_read_print_line_first_
+#endif // _di_fss_embedded_list_read_print_line_first_unlocked_
-#ifndef _di_fss_embedded_list_read_print_line_last_
- void fss_embedded_list_read_print_line_last(fss_embedded_list_read_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_fss_embedded_list_read_print_line_last_locked_
+ f_status_t fss_embedded_list_read_print_line_last_locked(fss_embedded_list_read_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
- if (print.verbosity == f_console_verbosity_error_e && !F_status_is_error(setting->status)) return;
- if (setting->flag & fss_embedded_list_read_main_flag_verify_e) return;
- if ((setting->flag & fss_embedded_list_read_main_flag_file_to_e) && !F_status_is_error(setting->status)) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_last, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ fll_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_fss_embedded_list_read_print_line_last_locked_
+
+#ifndef _di_fss_embedded_list_read_print_line_last_unlocked_
+ f_status_t fss_embedded_list_read_print_line_last_unlocked(fss_embedded_list_read_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
+
+ f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
}
-#endif // _di_fss_embedded_list_read_print_line_last_
+#endif // _di_fss_embedded_list_read_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
*
* This is generally either the first line in the program or the first line printed before an error message.
*
+ * This function locks and then unlocks the input stream when printing.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_embedded_list_read_print_line_first_locked_
+ extern f_status_t fss_embedded_list_read_print_line_first_locked(fss_embedded_list_read_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_embedded_list_read_print_line_first_locked_
+
+/**
+ * Print first new line, unless verbosity says otherwise.
+ *
+ * This is generally either the first line in the program or the first line printed before an error message.
+ *
+ * This function neither locks nor unlocks the input stream.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_embedded_list_read_print_line_first_unlocked_
+ extern f_status_t fss_embedded_list_read_print_line_first_unlocked(fss_embedded_list_read_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_embedded_list_read_print_line_first_unlocked_
+
+/**
+ * Print last new line when the main is complete, unless verbosity says otherwise.
+ *
+ * This is generally the very last line printed in the program.
+ *
+ * This function locks and then unlocks the input stream when printing.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_fss_embedded_list_read_print_line_first_
- extern void fss_embedded_list_read_print_line_first(fss_embedded_list_read_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_fss_embedded_list_read_print_line_first_
+#ifndef _di_fss_embedded_list_read_print_line_last_locked_
+ extern f_status_t fss_embedded_list_read_print_line_last_locked(fss_embedded_list_read_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_embedded_list_read_print_line_last_locked_
/**
* Print last new line when the main is complete, unless verbosity says otherwise.
*
* This is generally the very last line printed in the program.
*
+ * This function neither locks nor unlocks the input stream.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_fss_embedded_list_read_print_line_last_
- extern void fss_embedded_list_read_print_line_last(fss_embedded_list_read_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_fss_embedded_list_read_print_line_last_
+#ifndef _di_fss_embedded_list_read_print_line_last_unlocked_
+ extern f_status_t fss_embedded_list_read_print_line_last_unlocked(fss_embedded_list_read_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_embedded_list_read_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
}
#endif // _di_fss_embedded_list_write_print_help_
-#ifndef _di_fss_embedded_list_write_print_line_first_
- void fss_embedded_list_write_print_line_first(fss_embedded_list_write_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_fss_embedded_list_write_print_line_first_locked_
+ f_status_t fss_embedded_list_write_print_line_first_locked(fss_embedded_list_write_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_first, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_fss_embedded_list_write_print_line_first_locked_
+
+#ifndef _di_fss_embedded_list_write_print_line_first_unlocked_
+ f_status_t fss_embedded_list_write_print_line_first_unlocked(fss_embedded_list_write_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
+
+ fll_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
}
-#endif // _di_fss_embedded_list_write_print_line_first_
+#endif // _di_fss_embedded_list_write_print_line_first_unlocked_
-#ifndef _di_fss_embedded_list_write_print_line_last_
- void fss_embedded_list_write_print_line_last(fss_embedded_list_write_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_fss_embedded_list_write_print_line_last_locked_
+ f_status_t fss_embedded_list_write_print_line_last_locked(fss_embedded_list_write_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
- if (print.verbosity == f_console_verbosity_error_e && !F_status_is_error(setting->status)) return;
- if (setting->flag & fss_embedded_list_write_main_flag_verify_e) return;
- if ((setting->flag & fss_embedded_list_write_main_flag_file_to_e) && !F_status_is_error(setting->status)) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_last, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
+ if (setting->flag & (fss_embedded_list_write_main_flag_verify_e | fss_embedded_list_write_main_flag_file_to_e)) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ fll_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_fss_embedded_list_write_print_line_last_locked_
+
+#ifndef _di_fss_embedded_list_write_print_line_last_unlocked_
+ f_status_t fss_embedded_list_write_print_line_last_unlocked(fss_embedded_list_write_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
+ if (setting->flag & (fss_embedded_list_write_main_flag_verify_e | fss_embedded_list_write_main_flag_file_to_e)) return F_output_not;
}
+
+ f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
}
-#endif // _di_fss_embedded_list_write_print_line_last_
+#endif // _di_fss_embedded_list_write_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
*
* This is generally either the first line in the program or the first line printed before an error message.
*
+ * This function locks and then unlocks the input stream when printing.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_embedded_list_write_print_line_first_locked_
+ extern f_status_t fss_embedded_list_write_print_line_first_locked(fss_embedded_list_write_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_embedded_list_write_print_line_first_locked_
+
+/**
+ * Print first new line, unless verbosity says otherwise.
+ *
+ * This is generally either the first line in the program or the first line printed before an error message.
+ *
+ * This function neither locks nor unlocks the input stream.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_embedded_list_write_print_line_first_unlocked_
+ extern f_status_t fss_embedded_list_write_print_line_first_unlocked(fss_embedded_list_write_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_embedded_list_write_print_line_first_unlocked_
+
+/**
+ * Print last new line when the main is complete, unless verbosity says otherwise.
+ *
+ * This is generally the very last line printed in the program.
+ *
+ * This function locks and then unlocks the input stream when printing.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_fss_embedded_list_write_print_line_first_
- extern void fss_embedded_list_write_print_line_first(fss_embedded_list_write_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_fss_embedded_list_write_print_line_first_
+#ifndef _di_fss_embedded_list_write_print_line_last_locked_
+ extern f_status_t fss_embedded_list_write_print_line_last_locked(fss_embedded_list_write_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_embedded_list_write_print_line_last_locked_
/**
* Print last new line when the main is complete, unless verbosity says otherwise.
*
* This is generally the very last line printed in the program.
*
+ * This function neither locks nor unlocks the input stream.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_fss_embedded_list_write_print_line_last_
- extern void fss_embedded_list_write_print_line_last(fss_embedded_list_write_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_fss_embedded_list_write_print_line_last_
+#ifndef _di_fss_embedded_list_write_print_line_last_unlocked_
+ extern f_status_t fss_embedded_list_write_print_line_last_unlocked(fss_embedded_list_write_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_embedded_list_write_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
}
#endif // _di_fss_extended_list_read_print_help_
-#ifndef _di_fss_embedded_list_read_print_line_first_
- void fss_embedded_list_read_print_line_first(fss_embedded_list_read_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_fss_extended_list_read_print_line_first_locked_
+ f_status_t fss_extended_list_read_print_line_first_locked(fss_extended_list_read_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_first, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_fss_extended_list_read_print_line_first_locked_
+
+#ifndef _di_fss_extended_list_read_print_line_first_unlocked_
+ f_status_t fss_extended_list_read_print_line_first_unlocked(fss_extended_list_read_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
+
+ fll_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
}
-#endif // _di_fss_embedded_list_read_print_line_first_
+#endif // _di_fss_extended_list_read_print_line_first_unlocked_
-#ifndef _di_fss_embedded_list_read_print_line_last_
- void fss_embedded_list_read_print_line_last(fss_embedded_list_read_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_fss_extended_list_read_print_line_last_locked_
+ f_status_t fss_extended_list_read_print_line_last_locked(fss_extended_list_read_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
- if (print.verbosity == f_console_verbosity_error_e && !F_status_is_error(setting->status)) return;
- if (setting->flag & fss_embedded_list_read_main_flag_verify_e) return;
- if ((setting->flag & fss_embedded_list_read_main_flag_file_to_e) && !F_status_is_error(setting->status)) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_last, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
+ if (setting->flag & (fss_extended_list_read_main_flag_verify_e | fss_extended_list_read_main_flag_file_to_e)) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ fll_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_fss_extended_list_read_print_line_last_locked_
+
+#ifndef _di_fss_extended_list_read_print_line_last_unlocked_
+ f_status_t fss_extended_list_read_print_line_last_unlocked(fss_extended_list_read_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
+ if (setting->flag & (fss_extended_list_read_main_flag_verify_e | fss_extended_list_read_main_flag_file_to_e)) return F_output_not;
}
+
+ f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
}
-#endif // _di_fss_embedded_list_read_print_line_last_
+#endif // _di_fss_extended_list_read_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
*
* This is generally either the first line in the program or the first line printed before an error message.
*
+ * This function locks and then unlocks the input stream when printing.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_extended_list_read_print_line_first_locked_
+ extern f_status_t fss_extended_list_read_print_line_first_locked(fss_extended_list_read_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_extended_list_read_print_line_first_locked_
+
+/**
+ * Print first new line, unless verbosity says otherwise.
+ *
+ * This is generally either the first line in the program or the first line printed before an error message.
+ *
+ * This function neither locks nor unlocks the input stream.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_extended_list_read_print_line_first_unlocked_
+ extern f_status_t fss_extended_list_read_print_line_first_unlocked(fss_extended_list_read_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_extended_list_read_print_line_first_unlocked_
+
+/**
+ * Print last new line when the main is complete, unless verbosity says otherwise.
+ *
+ * This is generally the very last line printed in the program.
+ *
+ * This function locks and then unlocks the input stream when printing.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_fss_embedded_list_read_print_line_first_
- extern void fss_embedded_list_read_print_line_first(fss_embedded_list_read_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_fss_embedded_list_read_print_line_first_
+#ifndef _di_fss_extended_list_read_print_line_last_locked_
+ extern f_status_t fss_extended_list_read_print_line_last_locked(fss_extended_list_read_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_extended_list_read_print_line_last_locked_
/**
* Print last new line when the main is complete, unless verbosity says otherwise.
*
* This is generally the very last line printed in the program.
*
+ * This function neither locks nor unlocks the input stream.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_fss_embedded_list_read_print_line_last_
- extern void fss_embedded_list_read_print_line_last(fss_embedded_list_read_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_fss_embedded_list_read_print_line_last_
+#ifndef _di_fss_extended_list_read_print_line_last_unlocked_
+ extern f_status_t fss_extended_list_read_print_line_last_unlocked(fss_extended_list_read_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_extended_list_read_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
}
#endif // _di_fss_extended_list_write_print_help_
-#ifndef _di_fss_embedded_list_write_print_line_first_
- void fss_embedded_list_write_print_line_first(fss_embedded_list_write_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_fss_extended_list_write_print_line_first_locked_
+ f_status_t fss_extended_list_write_print_line_first_locked(fss_extended_list_write_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_first, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_fss_extended_list_write_print_line_first_locked_
+
+#ifndef _di_fss_extended_list_write_print_line_first_unlocked_
+ f_status_t fss_extended_list_write_print_line_first_unlocked(fss_extended_list_write_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
+
+ fll_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
}
-#endif // _di_fss_embedded_list_write_print_line_first_
+#endif // _di_fss_extended_list_write_print_line_first_unlocked_
-#ifndef _di_fss_embedded_list_write_print_line_last_
- void fss_embedded_list_write_print_line_last(fss_embedded_list_write_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_fss_extended_list_write_print_line_last_locked_
+ f_status_t fss_extended_list_write_print_line_last_locked(fss_extended_list_write_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
- if (print.verbosity == f_console_verbosity_error_e && !F_status_is_error(setting->status)) return;
- if (setting->flag & fss_embedded_list_write_main_flag_verify_e) return;
- if ((setting->flag & fss_embedded_list_write_main_flag_file_to_e) && !F_status_is_error(setting->status)) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_last, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
+ if (setting->flag & (fss_extended_list_write_main_flag_verify_e | fss_extended_list_write_main_flag_file_to_e)) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ fll_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_fss_extended_list_write_print_line_last_locked_
+
+#ifndef _di_fss_extended_list_write_print_line_last_unlocked_
+ f_status_t fss_extended_list_write_print_line_last_unlocked(fss_extended_list_write_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
+ if (setting->flag & (fss_extended_list_write_main_flag_verify_e | fss_extended_list_write_main_flag_file_to_e)) return F_output_not;
}
+
+ f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
}
-#endif // _di_fss_embedded_list_write_print_line_last_
+#endif // _di_fss_extended_list_write_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
*
* This is generally either the first line in the program or the first line printed before an error message.
*
+ * This function locks and then unlocks the input stream when printing.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_extended_list_write_print_line_first_locked_
+ extern f_status_t fss_extended_list_write_print_line_first_locked(fss_extended_list_write_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_extended_list_write_print_line_first_locked_
+
+/**
+ * Print first new line, unless verbosity says otherwise.
+ *
+ * This is generally either the first line in the program or the first line printed before an error message.
+ *
+ * This function neither locks nor unlocks the input stream.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_extended_list_write_print_line_first_unlocked_
+ extern f_status_t fss_extended_list_write_print_line_first_unlocked(fss_extended_list_write_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_extended_list_write_print_line_first_unlocked_
+
+/**
+ * Print last new line when the main is complete, unless verbosity says otherwise.
+ *
+ * This is generally the very last line printed in the program.
+ *
+ * This function locks and then unlocks the input stream when printing.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_fss_embedded_list_write_print_line_first_
- extern void fss_embedded_list_write_print_line_first(fss_embedded_list_write_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_fss_embedded_list_write_print_line_first_
+#ifndef _di_fss_extended_list_write_print_line_last_locked_
+ extern f_status_t fss_extended_list_write_print_line_last_locked(fss_extended_list_write_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_extended_list_write_print_line_last_locked_
/**
* Print last new line when the main is complete, unless verbosity says otherwise.
*
* This is generally the very last line printed in the program.
*
+ * This function neither locks nor unlocks the input stream.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_fss_embedded_list_write_print_line_last_
- extern void fss_embedded_list_write_print_line_last(fss_embedded_list_write_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_fss_embedded_list_write_print_line_last_
+#ifndef _di_fss_extended_list_write_print_line_last_unlocked_
+ extern f_status_t fss_extended_list_write_print_line_last_unlocked(fss_extended_list_write_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_extended_list_write_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
}
#endif // _di_fss_extended_read_print_help_
-#ifndef _di_fss_extended_read_print_line_first_
- void fss_extended_read_print_line_first(fss_extended_read_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_fss_extended_read_print_line_first_locked_
+ f_status_t fss_extended_read_print_line_first_locked(fss_extended_read_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_first, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_fss_extended_read_print_line_first_locked_
+
+#ifndef _di_fss_extended_read_print_line_first_unlocked_
+ f_status_t fss_extended_read_print_line_first_unlocked(fss_extended_read_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
+
+ fll_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
}
-#endif // _di_fss_extended_read_print_line_first_
+#endif // _di_fss_extended_read_print_line_first_unlocked_
-#ifndef _di_fss_extended_read_print_line_last_
- void fss_extended_read_print_line_last(fss_extended_read_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_fss_extended_read_print_line_last_locked_
+ f_status_t fss_extended_read_print_line_last_locked(fss_extended_read_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
- if (print.verbosity == f_console_verbosity_error_e && !F_status_is_error(setting->status)) return;
- if (setting->flag & fss_extended_read_main_flag_verify_e) return;
- if ((setting->flag & fss_extended_read_main_flag_file_to_e) && !F_status_is_error(setting->status)) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_last, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
+ if (setting->flag & (fss_extended_read_main_flag_verify_e | fss_extended_read_main_flag_file_to_e)) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ fll_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_fss_extended_read_print_line_last_locked_
+
+#ifndef _di_fss_extended_read_print_line_last_unlocked_
+ f_status_t fss_extended_read_print_line_last_unlocked(fss_extended_read_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
+ if (setting->flag & (fss_extended_read_main_flag_verify_e | fss_extended_read_main_flag_file_to_e)) return F_output_not;
}
+
+ f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
}
-#endif // _di_fss_extended_read_print_line_last_
+#endif // _di_fss_extended_read_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
*
* This is generally either the first line in the program or the first line printed before an error message.
*
+ * This function locks and then unlocks the input stream when printing.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_extended_read_print_line_first_locked_
+ extern f_status_t fss_extended_read_print_line_first_locked(fss_extended_read_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_extended_read_print_line_first_locked_
+
+/**
+ * Print first new line, unless verbosity says otherwise.
+ *
+ * This is generally either the first line in the program or the first line printed before an error message.
+ *
+ * This function neither locks nor unlocks the input stream.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_extended_read_print_line_first_unlocked_
+ extern f_status_t fss_extended_read_print_line_first_unlocked(fss_extended_read_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_extended_read_print_line_first_unlocked_
+
+/**
+ * Print last new line when the main is complete, unless verbosity says otherwise.
+ *
+ * This is generally the very last line printed in the program.
+ *
+ * This function locks and then unlocks the input stream when printing.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_fss_extended_read_print_line_first_
- extern void fss_extended_read_print_line_first(fss_extended_read_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_fss_extended_read_print_line_first_
+#ifndef _di_fss_extended_read_print_line_last_locked_
+ extern f_status_t fss_extended_read_print_line_last_locked(fss_extended_read_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_extended_read_print_line_last_locked_
/**
* Print last new line when the main is complete, unless verbosity says otherwise.
*
* This is generally the very last line printed in the program.
*
+ * This function neither locks nor unlocks the input stream.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_fss_extended_read_print_line_last_
- extern void fss_extended_read_print_line_last(fss_extended_read_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_fss_extended_read_print_line_last_
+#ifndef _di_fss_extended_read_print_line_last_unlocked_
+ extern f_status_t fss_extended_read_print_line_last_unlocked(fss_extended_read_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_extended_read_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
}
#endif // _di_fss_extended_write_print_help_
-#ifndef _di_fss_extended_write_print_line_first_
- void fss_extended_write_print_line_first(fss_extended_write_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_fss_extended_write_print_line_first_locked_
+ f_status_t fss_extended_write_print_line_first_locked(fss_extended_write_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_first, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_fss_extended_write_print_line_first_locked_
+
+#ifndef _di_fss_extended_write_print_line_first_unlocked_
+ f_status_t fss_extended_write_print_line_first_unlocked(fss_extended_write_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
+
+ fll_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
}
-#endif // _di_fss_extended_write_print_line_first_
+#endif // _di_fss_extended_write_print_line_first_unlocked_
-#ifndef _di_fss_extended_write_print_line_last_
- void fss_extended_write_print_line_last(fss_extended_write_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_fss_extended_write_print_line_last_locked_
+ f_status_t fss_extended_write_print_line_last_locked(fss_extended_write_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
- if (print.verbosity == f_console_verbosity_error_e && !F_status_is_error(setting->status)) return;
- if (setting->flag & fss_extended_write_main_flag_verify_e) return;
- if ((setting->flag & fss_extended_write_main_flag_file_to_e) && !F_status_is_error(setting->status)) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_last, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
+ if (setting->flag & (fss_extended_write_main_flag_verify_e | fss_extended_write_main_flag_file_to_e)) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ fll_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_fss_extended_write_print_line_last_locked_
+
+#ifndef _di_fss_extended_write_print_line_last_unlocked_
+ f_status_t fss_extended_write_print_line_last_unlocked(fss_extended_write_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
+ if (setting->flag & (fss_extended_write_main_flag_verify_e | fss_extended_write_main_flag_file_to_e)) return F_output_not;
}
+
+ f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
}
-#endif // _di_fss_extended_write_print_line_last_
+#endif // _di_fss_extended_write_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
*
* This is generally either the first line in the program or the first line printed before an error message.
*
+ * This function locks and then unlocks the input stream when printing.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_extended_write_print_line_first_locked_
+ extern f_status_t fss_extended_write_print_line_first_locked(fss_extended_write_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_extended_write_print_line_first_locked_
+
+/**
+ * Print first new line, unless verbosity says otherwise.
+ *
+ * This is generally either the first line in the program or the first line printed before an error message.
+ *
+ * This function neither locks nor unlocks the input stream.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_extended_write_print_line_first_unlocked_
+ extern f_status_t fss_extended_write_print_line_first_unlocked(fss_extended_write_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_extended_write_print_line_first_unlocked_
+
+/**
+ * Print last new line when the main is complete, unless verbosity says otherwise.
+ *
+ * This is generally the very last line printed in the program.
+ *
+ * This function locks and then unlocks the input stream when printing.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_fss_extended_write_print_line_first_
- extern void fss_extended_write_print_line_first(fss_extended_write_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_fss_extended_write_print_line_first_
+#ifndef _di_fss_extended_write_print_line_last_locked_
+ extern f_status_t fss_extended_write_print_line_last_locked(fss_extended_write_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_extended_write_print_line_last_locked_
/**
* Print last new line when the main is complete, unless verbosity says otherwise.
*
* This is generally the very last line printed in the program.
*
+ * This function neither locks nor unlocks the input stream.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_fss_extended_write_print_line_last_
- extern void fss_extended_write_print_line_last(fss_extended_write_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_fss_extended_write_print_line_last_
+#ifndef _di_fss_extended_write_print_line_last_unlocked_
+ extern f_status_t fss_extended_write_print_line_last_unlocked(fss_extended_write_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_extended_write_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
}
#endif // _di_fss_identify_print_help_
-#ifndef _di_fss_identify_print_line_first_
- void fss_identify_print_line_first(fss_identify_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_fss_identify_print_line_first_locked_
+ f_status_t fss_identify_print_line_first_locked(fss_identify_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_first, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_fss_identify_print_line_first_locked_
+
+#ifndef _di_fss_identify_print_line_first_unlocked_
+ f_status_t fss_identify_print_line_first_unlocked(fss_identify_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
+
+ fll_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
}
-#endif // _di_fss_identify_print_line_first_
+#endif // _di_fss_identify_print_line_first_unlocked_
-#ifndef _di_fss_identify_print_line_last_
- void fss_identify_print_line_last(fss_identify_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_fss_identify_print_line_last_locked_
+ f_status_t fss_identify_print_line_last_locked(fss_identify_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
- if (print.verbosity == f_console_verbosity_error_e && !F_status_is_error(setting->status)) return;
- if (setting->flag & fss_identify_main_flag_verify_e) return;
- if ((setting->flag & fss_identify_main_flag_file_to_e) && !F_status_is_error(setting->status)) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_last, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
+ if (setting->flag & (fss_identify_main_flag_verify_e | fss_identify_main_flag_file_to_e)) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ fll_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_fss_identify_print_line_last_locked_
+
+#ifndef _di_fss_identify_print_line_last_unlocked_
+ f_status_t fss_identify_print_line_last_unlocked(fss_identify_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
+ if (setting->flag & (fss_identify_main_flag_verify_e | fss_identify_main_flag_file_to_e)) return F_output_not;
}
+
+ f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
}
-#endif // _di_fss_identify_print_line_last_
+#endif // _di_fss_identify_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
*
* This is generally either the first line in the program or the first line printed before an error message.
*
+ * This function locks and then unlocks the input stream when printing.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_identify_print_line_first_locked_
+ extern f_status_t fss_identify_print_line_first_locked(fss_identify_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_identify_print_line_first_locked_
+
+/**
+ * Print first new line, unless verbosity says otherwise.
+ *
+ * This is generally either the first line in the program or the first line printed before an error message.
+ *
+ * This function neither locks nor unlocks the input stream.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_identify_print_line_first_unlocked_
+ extern f_status_t fss_identify_print_line_first_unlocked(fss_identify_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_identify_print_line_first_unlocked_
+
+/**
+ * Print last new line when the main is complete, unless verbosity says otherwise.
+ *
+ * This is generally the very last line printed in the program.
+ *
+ * This function locks and then unlocks the input stream when printing.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_fss_identify_print_line_first_
- extern void fss_identify_print_line_first(fss_identify_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_fss_identify_print_line_first_
+#ifndef _di_fss_identify_print_line_last_locked_
+ extern f_status_t fss_identify_print_line_last_locked(fss_identify_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_identify_print_line_last_locked_
/**
* Print last new line when the main is complete, unless verbosity says otherwise.
*
* This is generally the very last line printed in the program.
*
+ * This function neither locks nor unlocks the input stream.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_fss_identify_print_line_last_
- extern void fss_identify_print_line_last(fss_identify_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_fss_identify_print_line_last_
+#ifndef _di_fss_identify_print_line_last_unlocked_
+ extern f_status_t fss_identify_print_line_last_unlocked(fss_identify_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_identify_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
}
#endif // _di_fss_payload_read_print_help_
-#ifndef _di_fss_payload_read_print_line_first_
- void fss_payload_read_print_line_first(fss_payload_read_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_fss_payload_read_print_line_first_locked_
+ f_status_t fss_payload_read_print_line_first_locked(fss_payload_read_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_first, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_fss_payload_read_print_line_first_locked_
+
+#ifndef _di_fss_payload_read_print_line_first_unlocked_
+ f_status_t fss_payload_read_print_line_first_unlocked(fss_payload_read_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
+
+ fll_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
}
-#endif // _di_fss_payload_read_print_line_first_
+#endif // _di_fss_payload_read_print_line_first_unlocked_
-#ifndef _di_fss_payload_read_print_line_last_
- void fss_payload_read_print_line_last(fss_payload_read_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_fss_payload_read_print_line_last_locked_
+ f_status_t fss_payload_read_print_line_last_locked(fss_payload_read_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
- if (print.verbosity == f_console_verbosity_error_e && !F_status_is_error(setting->status)) return;
- if (setting->flag & fss_payload_read_main_flag_verify_e) return;
- if ((setting->flag & fss_payload_read_main_flag_file_to_e) && !F_status_is_error(setting->status)) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_last, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
+ if (setting->flag & (fss_payload_read_main_flag_verify_e | fss_payload_read_main_flag_file_to_e)) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ fll_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_fss_payload_read_print_line_last_locked_
+
+#ifndef _di_fss_payload_read_print_line_last_unlocked_
+ f_status_t fss_payload_read_print_line_last_unlocked(fss_payload_read_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
+ if (setting->flag & (fss_payload_read_main_flag_verify_e | fss_payload_read_main_flag_file_to_e)) return F_output_not;
}
+
+ f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
}
-#endif // _di_fss_payload_read_print_line_last_
+#endif // _di_fss_payload_read_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
*
* This is generally either the first line in the program or the first line printed before an error message.
*
+ * This function locks and then unlocks the input stream when printing.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_payload_read_print_line_first_locked_
+ extern f_status_t fss_payload_read_print_line_first_locked(fss_payload_read_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_payload_read_print_line_first_locked_
+
+/**
+ * Print first new line, unless verbosity says otherwise.
+ *
+ * This is generally either the first line in the program or the first line printed before an error message.
+ *
+ * This function neither locks nor unlocks the input stream.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_payload_read_print_line_first_unlocked_
+ extern f_status_t fss_payload_read_print_line_first_unlocked(fss_payload_read_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_payload_read_print_line_first_unlocked_
+
+/**
+ * Print last new line when the main is complete, unless verbosity says otherwise.
+ *
+ * This is generally the very last line printed in the program.
+ *
+ * This function locks and then unlocks the input stream when printing.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_fss_payload_read_print_line_first_
- extern void fss_payload_read_print_line_first(fss_payload_read_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_fss_payload_read_print_line_first_
+#ifndef _di_fss_payload_read_print_line_last_locked_
+ extern f_status_t fss_payload_read_print_line_last_locked(fss_payload_read_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_payload_read_print_line_last_locked_
/**
* Print last new line when the main is complete, unless verbosity says otherwise.
*
* This is generally the very last line printed in the program.
*
+ * This function neither locks nor unlocks the input stream.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_fss_payload_read_print_line_last_
- extern void fss_payload_read_print_line_last(fss_payload_read_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_fss_payload_read_print_line_last_
+#ifndef _di_fss_payload_read_print_line_last_unlocked_
+ extern f_status_t fss_payload_read_print_line_last_unlocked(fss_payload_read_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_payload_read_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
}
#endif // _di_fss_payload_write_print_help_
-#ifndef _di_fss_payload_write_print_line_first_
- void fss_payload_write_print_line_first(fss_payload_write_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_fss_payload_write_print_line_first_locked_
+ f_status_t fss_payload_write_print_line_first_locked(fss_payload_write_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_first, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_fss_payload_write_print_line_first_locked_
+
+#ifndef _di_fss_payload_write_print_line_first_unlocked_
+ f_status_t fss_payload_write_print_line_first_unlocked(fss_payload_write_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
+
+ fll_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
}
-#endif // _di_fss_payload_write_print_line_first_
+#endif // _di_fss_payload_write_print_line_first_unlocked_
-#ifndef _di_fss_payload_write_print_line_last_
- void fss_payload_write_print_line_last(fss_payload_write_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_fss_payload_write_print_line_last_locked_
+ f_status_t fss_payload_write_print_line_last_locked(fss_payload_write_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
- if (print.verbosity == f_console_verbosity_error_e && !F_status_is_error(setting->status)) return;
- if (setting->flag & fss_payload_write_main_flag_verify_e) return;
- if ((setting->flag & fss_payload_write_main_flag_file_to_e) && !F_status_is_error(setting->status)) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_last, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
+ if (setting->flag & (fss_payload_write_main_flag_verify_e | fss_payload_write_main_flag_file_to_e)) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ fll_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_fss_payload_write_print_line_last_locked_
+
+#ifndef _di_fss_payload_write_print_line_last_unlocked_
+ f_status_t fss_payload_write_print_line_last_unlocked(fss_payload_write_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
+ if (setting->flag & (fss_payload_write_main_flag_verify_e | fss_payload_write_main_flag_file_to_e)) return F_output_not;
}
+
+ f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
}
-#endif // _di_fss_payload_write_print_line_last_
+#endif // _di_fss_payload_write_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
*
* This is generally either the first line in the program or the first line printed before an error message.
*
+ * This function locks and then unlocks the input stream when printing.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_payload_write_print_line_first_locked_
+ extern f_status_t fss_payload_write_print_line_first_locked(fss_payload_write_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_payload_write_print_line_first_locked_
+
+/**
+ * Print first new line, unless verbosity says otherwise.
+ *
+ * This is generally either the first line in the program or the first line printed before an error message.
+ *
+ * This function neither locks nor unlocks the input stream.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_payload_write_print_line_first_unlocked_
+ extern f_status_t fss_payload_write_print_line_first_unlocked(fss_payload_write_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_payload_write_print_line_first_unlocked_
+
+/**
+ * Print last new line when the main is complete, unless verbosity says otherwise.
+ *
+ * This is generally the very last line printed in the program.
+ *
+ * This function locks and then unlocks the input stream when printing.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_fss_payload_write_print_line_first_
- extern void fss_payload_write_print_line_first(fss_payload_write_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_fss_payload_write_print_line_first_
+#ifndef _di_fss_payload_write_print_line_last_locked_
+ extern f_status_t fss_payload_write_print_line_last_locked(fss_payload_write_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_payload_write_print_line_last_locked_
/**
* Print last new line when the main is complete, unless verbosity says otherwise.
*
* This is generally the very last line printed in the program.
*
+ * This function neither locks nor unlocks the input stream.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_fss_payload_write_print_line_last_
- extern void fss_payload_write_print_line_last(fss_payload_write_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_fss_payload_write_print_line_last_
+#ifndef _di_fss_payload_write_print_line_last_unlocked_
+ extern f_status_t fss_payload_write_print_line_last_unlocked(fss_payload_write_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_payload_write_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
setting->status = f_console_parameter_process(arguments, &main->parameters);
if (F_status_is_error(setting->status)) {
- fss_status_code_print_line_first(setting, main->error, F_true);
+ fss_status_code_print_line_first_locked(setting, main->error);
fll_error_print(main->error, F_status_set_fine(setting->status), "f_console_parameter_process", F_true);
- fss_status_code_print_line_last(setting, main->error, F_true);
+ fss_status_code_print_line_last_locked(setting, main->error);
return;
}
setting->status = fll_program_parameter_process_context(choices, modes, F_true, main);
if (F_status_is_error(setting->status)) {
- fss_status_code_print_line_first(setting, main->error, F_true);
+ fss_status_code_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);
- fss_status_code_print_line_last(setting, main->error, F_true);
+ fss_status_code_print_line_last_locked(setting, main->error);
return;
}
setting->status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
if (F_status_is_error(setting->status)) {
- fss_status_code_print_line_first(setting, main->error, F_true);
+ fss_status_code_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);
- fss_status_code_print_line_last(setting, main->error, F_true);
+ fss_status_code_print_line_last_locked(setting, main->error);
return;
}
if (!(setting->flag & fss_status_code_main_flag_number_e)) {
setting->status = F_status_set_error(F_parameter);
- fss_status_code_print_line_first(setting, main->error, F_true);
+ fss_status_code_print_line_first_locked(setting, main->error);
fss_status_code_print_error_cannot_error_warning_number(setting, main->error);
- fss_status_code_print_line_last(setting, main->error, F_true);
+ fss_status_code_print_line_last_locked(setting, main->error);
return;
}
if (setting->flag & fss_status_code_main_flag_fine_e) {
setting->status = F_status_set_error(F_parameter);
- fss_status_code_print_line_first(setting, main->error, F_true);
+ fss_status_code_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_enable_s, fss_status_code_long_error_s, fss_status_code_long_fine_s);
- fss_status_code_print_line_last(setting, main->error, F_true);
+ fss_status_code_print_line_last_locked(setting, main->error);
return;
}
else if (setting->flag & fss_status_code_main_flag_warning_e && setting->flag & fss_status_code_main_flag_fine_e) {
setting->status = F_status_set_error(F_parameter);
- fss_status_code_print_line_first(setting, main->error, F_true);
+ fss_status_code_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_enable_s, fss_status_code_long_warning_s, fss_status_code_long_fine_s);
- fss_status_code_print_line_last(setting, main->error, F_true);
+ fss_status_code_print_line_last_locked(setting, main->error);
return;
}
if (main->parameters.remaining.used == 0 && !(main->pipe & fll_program_data_pipe_input_e)) {
setting->status = F_status_set_error(F_parameter);
- fss_status_code_print_line_first(setting, main->error, F_true);
+ fss_status_code_print_line_first_locked(setting, main->error);
fss_status_code_print_error_no_fss_status_codes(setting, main->error);
- fss_status_code_print_line_last(setting, main->error, F_true);
+ fss_status_code_print_line_last_locked(setting, main->error);
return;
}
}
if (F_status_is_error(setting->status)) {
- fss_status_code_print_line_last(setting, main->error, F_true);
+ fss_status_code_print_line_last_locked(setting, main->error);
}
else if (setting->status != F_interrupt) {
- fss_status_code_print_line_last(setting, main->message, F_true);
+ fss_status_code_print_line_last_locked(setting, main->message);
}
}
#endif // _di_fss_status_code_main_
}
#endif // _di_fss_status_code_print_help_
-#ifndef _di_fss_status_code_print_line_first_
- f_status_t fss_status_code_print_line_first(fss_status_code_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_fss_status_code_print_line_first_locked_
+ f_status_t fss_status_code_print_line_first_locked(fss_status_code_setting_t * const setting, const fl_print_t print) {
if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_first, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_fss_status_code_print_line_first_locked_
+
+#ifndef _di_fss_status_code_print_line_first_unlocked_
+ f_status_t fss_status_code_print_line_first_unlocked(fss_status_code_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
+ fll_print_dynamic_raw(setting->line_first, print.to.stream);
+
return F_none;
}
-#endif // _di_fss_status_code_print_line_first_
+#endif // _di_fss_status_code_print_line_first_unlocked_
-#ifndef _di_fss_status_code_print_line_last_
- f_status_t fss_status_code_print_line_last(fss_status_code_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_fss_status_code_print_line_last_locked_
+ f_status_t fss_status_code_print_line_last_locked(fss_status_code_setting_t * const setting, const fl_print_t print) {
if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (print.verbosity == f_console_verbosity_error_e && !F_status_is_error(setting->status)) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_last, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ fll_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_fss_status_code_print_line_last_locked_
+
+#ifndef _di_fss_status_code_print_line_last_unlocked_
+ f_status_t fss_status_code_print_line_last_unlocked(fss_status_code_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
+ f_print_dynamic_raw(setting->line_last, print.to.stream);
+
return F_none;
}
-#endif // _di_fss_status_code_print_line_last_
+#endif // _di_fss_status_code_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
*
* This is generally either the first line in the program or the first line printed before an error message.
*
+ * This function locks and then unlocks the input stream when printing.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_status_code_print_line_first_locked_
+ extern f_status_t fss_status_code_print_line_first_locked(fss_status_code_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_status_code_print_line_first_locked_
+
+/**
+ * Print first new line, unless verbosity says otherwise.
+ *
+ * This is generally either the first line in the program or the first line printed before an error message.
+ *
+ * This function neither locks nor unlocks the input stream.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
*
* @return
* F_none on success.
* F_output_not on success, but no printing is performed.
*/
-#ifndef _di_fss_status_code_print_line_first_
- extern f_status_t fss_status_code_print_line_first(fss_status_code_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_fss_status_code_print_line_first_
+#ifndef _di_fss_status_code_print_line_first_unlocked_
+ extern f_status_t fss_status_code_print_line_first_unlocked(fss_status_code_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_status_code_print_line_first_unlocked_
/**
* Print last new line when the main is complete, unless verbosity says otherwise.
*
* This is generally the very last line printed in the program.
*
+ * This function locks and then unlocks the input stream when printing.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_status_code_print_line_last_locked_
+ extern f_status_t fss_status_code_print_line_last_locked(fss_status_code_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_status_code_print_line_last_locked_
+
+/**
+ * Print last new line when the main is complete, unless verbosity says otherwise.
+ *
+ * This is generally the very last line printed in the program.
+ *
+ * This function neither locks nor unlocks the input stream.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
*
* @return
* F_none on success.
* F_output_not on success, but no printing is performed.
*/
-#ifndef _di_fss_status_code_print_line_last_
- extern f_status_t fss_status_code_print_line_last(fss_status_code_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_fss_status_code_print_line_last_
+#ifndef _di_fss_status_code_print_line_last_unlocked_
+ extern f_status_t fss_status_code_print_line_last_unlocked(fss_status_code_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_status_code_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
setting->status = fll_program_parameter_process_context(choices, modes, F_true, main);
if (F_status_is_error(setting->status)) {
- iki_read_print_line_first(setting, main->error, F_true);
+ iki_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);
+ iki_read_print_line_last_locked(setting, main->error);
return;
}
setting->status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
if (F_status_is_error(setting->status)) {
- iki_read_print_line_first(setting, main->error, F_true);
+ iki_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);
+ iki_read_print_line_last_locked(setting, main->error);
return;
}
f_string_static_t * const args = main->parameters.arguments.array;
- if (main->parameters.array[iki_read_parameter_strip_invalid_e].result == f_console_result_found_e) {
- setting->flag |= iki_read_main_flag_strip_invalid_e;
+ if (!(main->parameters.remaining.used || (main->pipe & fll_program_data_pipe_input_e)) {
+ setting->status = F_status_set_error(F_parameter);
+
+ iki_read_print_line_first_locked(setting, main->error);
+ fll_program_print_error_missing_file(main->error);
+ iki_read_print_line_last_locked(setting, main->error);
+
+ return;
}
+
+ //if (main->parameters.array[iki_read_parameter_strip_invalid_e].result == f_console_result_found_e) {
+ // setting->flag |= iki_read_main_flag_strip_invalid_e;
+ //}
}
#endif // _di_iki_read_setting_load_
#ifndef _di_iki_read_main_
f_status_t iki_read_main(fll_program_data_t * const main, iki_read_setting_t * const setting) {
- f_status_t status = F_none;
+ if (!main || !setting || F_status_is_error(setting->status)) return;
- // Load parameters.
- status = f_console_parameter_process(arguments, &main->parameters);
- if (F_status_is_error(status)) return;
+ setting->status = F_none;
- {
- f_array_length_t choice = 0;
- f_uint16s_t choices = f_uint16s_t_initialize;
-
- // Identify and prioritize "color context" parameters.
- {
- uint16_t choices_array[3] = { iki_read_parameter_no_color_e, iki_read_parameter_light_e, iki_read_parameter_dark_e };
- choices.array = choices_array;
- choices.used = 3;
-
- const uint8_t modes[3] = { f_color_mode_color_not_e, f_color_mode_light_e, f_color_mode_dark_e };
-
- status = fll_program_parameter_process_context(choices, modes, F_true, main);
-
- if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", F_true);
-
- return;
- }
- }
+ if (setting->flag & iki_read_main_flag_help_e) {
+ iki_read_print_help(setting, main->message);
- // Identify and prioritize "verbosity" parameters.
- {
- uint16_t choices_array[5] = { iki_read_parameter_verbosity_quiet_e, iki_read_parameter_verbosity_error_e, iki_read_parameter_verbosity_verbose_e, iki_read_parameter_verbosity_debug_e, iki_read_parameter_verbosity_normal_e };
- choices.array = choices_array;
- choices.used = 5;
+ return;
+ }
- const uint8_t verbosity[5] = { f_console_verbosity_quiet_e, f_console_verbosity_error_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, f_console_verbosity_normal_e };
+ if (setting->flag & iki_read_main_flag_version_e) {
+ fll_program_print_version(main->message, iki_read_program_version_s);
- status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
+ return;
+ }
- if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", F_true);
+ // ...
+ //if (main->pipe & fll_program_data_pipe_input_e) {
- return;
- }
- }
- }
+ // XXXXXXXXXXXXXXXXXXXX
iki_read_data_t data = iki_read_data_t_initialize;
data.main = main;
status = F_none;
- if (main->parameters.array[iki_read_parameter_help_e].result == f_console_result_found_e) {
- iki_read_print_help(setting, main->message);
-
- iki_read_data_delete(&data);
-
- return F_none;
- }
-
- if (main->parameters.array[iki_read_parameter_version_e].result == f_console_result_found_e) {
- fll_program_print_version(main->message, iki_read_program_version_s);
-
- iki_read_data_delete(&data);
-
- return F_none;
- }
-
if (main->parameters.remaining.used > 0 || (main->pipe & fll_program_data_pipe_input_e)) {
if (main->parameters.array[iki_read_parameter_at_e].result == f_console_result_found_e) {
if (main->error.verbosity > f_console_verbosity_quiet_e) {
}
#endif // _di_iki_read_print_help_
-#ifndef _di_iki_read_print_line_first_
- void iki_read_print_line_first(iki_read_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_iki_read_print_line_first_locked_
+ f_status_t iki_read_print_line_first_locked(iki_read_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_first, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_iki_read_print_line_first_locked_
+
+#ifndef _di_iki_read_print_line_first_unlocked_
+ f_status_t iki_read_print_line_first_unlocked(iki_read_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
+
+ fll_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
}
-#endif // _di_iki_read_print_line_first_
+#endif // _di_iki_read_print_line_first_unlocked_
-#ifndef _di_iki_read_print_line_last_
- void iki_read_print_line_last(iki_read_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_iki_read_print_line_last_locked_
+ f_status_t iki_read_print_line_last_locked(iki_read_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity == f_console_verbosity_quiet_e) return;
- if (print.verbosity == f_console_verbosity_error_e && !F_status_is_error(setting->status)) return;
- if (setting->flag & iki_read_main_flag_verify_e) return;
- if ((setting->flag & iki_read_main_flag_file_to_e) && !F_status_is_error(setting->status)) return;
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_last, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ fll_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_iki_read_print_line_last_locked_
+
+#ifndef _di_iki_read_print_line_last_unlocked_
+ f_status_t iki_read_print_line_last_unlocked(iki_read_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
+
+ f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
}
-#endif // _di_iki_read_print_line_last_
+#endif // _di_iki_read_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
*
* This is generally either the first line in the program or the first line printed before an error message.
*
+ * This function locks and then unlocks the input stream when printing.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_iki_read_print_line_first_locked_
+ extern f_status_t iki_read_print_line_first_locked(iki_read_setting_t * const setting, const fl_print_t print);
+#endif // _di_iki_read_print_line_first_locked_
+
+/**
+ * Print first new line, unless verbosity says otherwise.
+ *
+ * This is generally either the first line in the program or the first line printed before an error message.
+ *
+ * This function neither locks nor unlocks the input stream.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_iki_read_print_line_first_unlocked_
+ extern f_status_t iki_read_print_line_first_unlocked(iki_read_setting_t * const setting, const fl_print_t print);
+#endif // _di_iki_read_print_line_first_unlocked_
+
+/**
+ * Print last new line when the main is complete, unless verbosity says otherwise.
+ *
+ * This is generally the very last line printed in the program.
+ *
+ * This function locks and then unlocks the input stream when printing.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_iki_read_print_line_first_
- extern void iki_read_print_line_first(iki_read_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_iki_read_print_line_first_
+#ifndef _di_iki_read_print_line_last_locked_
+ extern f_status_t iki_read_print_line_last_locked(iki_read_setting_t * const setting, const fl_print_t print);
+#endif // _di_iki_read_print_line_last_locked_
/**
* Print last new line when the main is complete, unless verbosity says otherwise.
*
* This is generally the very last line printed in the program.
*
+ * This function neither locks nor unlocks the input stream.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
*/
-#ifndef _di_iki_read_print_line_last_
- extern void iki_read_print_line_last(iki_read_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_iki_read_print_line_last_
+#ifndef _di_iki_read_print_line_last_unlocked_
+ extern f_status_t iki_read_print_line_last_unlocked(iki_read_setting_t * const setting, const fl_print_t print);
+#endif // _di_iki_read_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
#endif
#ifndef _di_iki_read_data_delete_
- f_status_t iki_read_data_delete(fll_program_data_t * const main, status_code_setting_t * const setting, iki_read_data_t * const data) {
+ f_status_t iki_read_data_delete(fll_program_data_t * const main, iki_read_setting_t * const setting, iki_read_data_t * const data) {
f_string_dynamic_resize(0, &data->buffer);
* F_none on success.
*/
#ifndef _di_iki_read_data_delete_
- extern f_status_t iki_read_data_delete(fll_program_data_t * const main, status_code_setting_t * const setting, iki_read_data_t * const data) F_attribute_visibility_internal_d;
+ extern f_status_t iki_read_data_delete(fll_program_data_t * const main, iki_read_setting_t * const setting, iki_read_data_t * const data) F_attribute_visibility_internal_d;
#endif // _di_iki_read_data_delete_
#ifdef __cplusplus
#endif
#ifndef _di_iki_read_substitutions_print_
- void iki_read_substitutions_print(fll_program_data_t * const main, status_code_setting_t * const setting, iki_read_data_t * const data, const f_iki_data_t iki_data, const f_string_ranges_t ranges, const iki_read_substitution_t replacement, const iki_read_substitution_t wraps, const iki_read_substitutions_t substitutions, const f_array_length_t index, const bool content_only) {
+ void iki_read_substitutions_print(fll_program_data_t * const main, iki_read_setting_t * const setting, iki_read_data_t * const data, const f_iki_data_t iki_data, const f_string_ranges_t ranges, const iki_read_substitution_t replacement, const iki_read_substitution_t wraps, const iki_read_substitutions_t substitutions, const f_array_length_t index, const bool content_only) {
uint8_t matched = F_false;
f_array_length_t at = 0;
* Set to FALSE to print the entire variable when printing substituted text.
*/
#ifndef _di_iki_read_substitutions_print_
- extern void iki_read_substitutions_print(fll_program_data_t * const main, status_code_setting_t * const setting, iki_read_data_t * const data, const f_iki_data_t iki_data, const f_string_ranges_t ranges, const iki_read_substitution_t replacement, const iki_read_substitution_t wraps, const iki_read_substitutions_t substitutions, const f_array_length_t index, const bool content_only) F_attribute_visibility_internal_d;
+ extern void iki_read_substitutions_print(fll_program_data_t * const main, iki_read_setting_t * const setting, iki_read_data_t * const data, const f_iki_data_t iki_data, const f_string_ranges_t ranges, const iki_read_substitution_t replacement, const iki_read_substitution_t wraps, const iki_read_substitutions_t substitutions, const f_array_length_t index, const bool content_only) F_attribute_visibility_internal_d;
#endif // _di_iki_read_substitutions_print_
#ifdef __cplusplus
#endif
#ifndef _di_iki_read_process_at_
- f_status_t iki_read_process_at(fll_program_data_t * const main, status_code_setting_t * const setting, iki_read_data_t * const data, f_string_range_t *range) {
+ f_status_t iki_read_process_at(fll_program_data_t * const main, iki_read_setting_t * const setting, iki_read_data_t * const data, f_string_range_t *range) {
if (data->main->parameters.array[iki_read_parameter_line_e].result != f_console_result_additional_e) {
return F_false;
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_iki_read_process_at_
- extern f_status_t iki_read_process_at(fll_program_data_t * const main, status_code_setting_t * const setting, iki_read_data_t * const data, f_string_range_t *range) F_attribute_visibility_internal_d;
+ extern f_status_t iki_read_process_at(fll_program_data_t * const main, iki_read_setting_t * const setting, iki_read_data_t * const data, f_string_range_t *range) F_attribute_visibility_internal_d;
#endif // _di_iki_read_process_at_
/**
setting->status = f_console_parameter_process(arguments, &main->parameters);
if (F_status_is_error(setting->status)) {
- iki_write_print_line_first(setting, main->error, F_true);
+ iki_write_print_line_first_locked(setting, main->error);
fll_error_print(main->error, F_status_set_fine(setting->status), "f_console_parameter_process", F_true);
- iki_write_print_line_last(setting, main->error, F_true);
+ iki_write_print_line_last_locked(setting, main->error);
return;
}
setting->status = fll_program_parameter_process_context(choices, modes, F_true, main);
if (F_status_is_error(setting->status)) {
- iki_write_print_line_first(setting, main->error, F_true);
+ iki_write_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);
- iki_write_print_line_last(setting, main->error, F_true);
+ iki_write_print_line_last_locked(setting, main->error);
return;
}
setting->status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
if (F_status_is_error(setting->status)) {
- iki_write_print_line_first(setting, main->error, F_true);
+ iki_write_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);
- iki_write_print_line_last(setting, main->error, F_true);
+ iki_write_print_line_last_locked(setting, main->error);
return;
}
if (main->parameters.array[iki_write_parameter_file_e].values.used > 1) {
setting->status = F_status_set_error(F_parameter);
- iki_write_print_line_first(setting, main->error, F_true);
+ iki_write_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_must_specify_once(main->error, f_console_symbol_long_enable_s, iki_write_long_file_s);
- iki_write_print_line_last(setting, main->error, F_true);
+ iki_write_print_line_last_locked(setting, main->error);
return;
}
setting->status = f_file_stream_open(args[index], f_string_empty_s, &main->output.to);
if (F_status_is_error(setting->status)) {
- iki_write_print_line_first(setting, main->error, F_true);
+ 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, args[index], f_file_operation_open_s, fll_error_file_type_file_e);
- iki_write_print_line_last(setting, main->error, F_true);
+ iki_write_print_line_last_locked(setting, main->error);
return;
}
else if (main->parameters.array[iki_write_parameter_file_e].result == f_console_result_found_e) {
setting->status = F_status_set_error(F_parameter);
- iki_write_print_line_first(setting, main->error, F_true);
+ iki_write_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_enable_s, iki_write_long_file_s);
- iki_write_print_line_last(setting, main->error, F_true);
+ iki_write_print_line_last_locked(setting, main->error);
return;
}
setting->status = f_string_dynamics_resize(values->used, &setting->objects);
if (F_status_is_error(setting->status)) {
- iki_write_print_line_first(setting, main->error, F_true);
+ iki_write_print_line_first_locked(setting, main->error);
fll_error_print(main->error, F_status_set_fine(setting->status), "f_string_dynamics_resize", F_true);
- iki_write_print_line_last(setting, main->error, F_true);
+ iki_write_print_line_last_locked(setting, main->error);
return;
}
else if (main->parameters.array[iki_write_parameter_object_e].result == f_console_result_found_e) {
setting->status = F_status_set_error(F_parameter);
- iki_write_print_line_first(setting, main->error, F_true);
+ iki_write_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_enable_s, iki_write_long_object_s);
- iki_write_print_line_last(setting, main->error, F_true);
+ iki_write_print_line_last_locked(setting, main->error);
return;
}
setting->status = f_string_dynamics_resize(values->used, &setting->contents);
if (F_status_is_error(setting->status)) {
- iki_write_print_line_first(setting, main->error, F_true);
+ iki_write_print_line_first_locked(setting, main->error);
fll_error_print(main->error, F_status_set_fine(setting->status), "f_string_dynamics_resize", F_true);
- iki_write_print_line_last(setting, main->error, F_true);
+ iki_write_print_line_last_locked(setting, main->error);
return;
}
else if (main->parameters.array[iki_write_parameter_content_e].result == f_console_result_found_e) {
setting->status = F_status_set_error(F_parameter);
- iki_write_print_line_first(setting, main->error, F_true);
+ iki_write_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_enable_s, iki_write_long_content_s);
- iki_write_print_line_last(setting, main->error, F_true);
+ iki_write_print_line_last_locked(setting, main->error);
return;
}
if (!(main->pipe & fll_program_data_pipe_input_e) && !(setting->flag & (iki_write_main_flag_content_e | iki_write_parameter_object_e))) {
setting->status = F_status_set_error(F_parameter);
- iki_write_print_line_first(setting, main->error, F_true);
+ iki_write_print_line_first_locked(setting, main->error);
iki_write_print_error_main_missing(setting, main->error);
- iki_write_print_line_last(setting, main->error, F_true);
+ iki_write_print_line_last_locked(setting, main->error);
return;
}
if (F_status_is_error(status)) {
setting->status = F_status_set_error(F_pipe);
- iki_write_print_line_first(setting, main->error, F_true);
+ iki_write_print_line_first_locked(setting, main->error);
fll_error_file_print(main->error, F_status_set_fine(setting->status), "f_file_read", F_true, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e);
- iki_write_print_line_last(setting, main->error, F_true);
+ iki_write_print_line_last_locked(setting, main->error);
return;
}
if (!setting->buffer.used) {
setting->status = F_status_set_error(F_parameter);
- iki_write_print_line_first(setting, main->error, F_true);
+ iki_write_print_line_first_locked(setting, main->error);
fll_program_print_error_pipe_missing_content(main->error);
- iki_write_print_line_last(setting, main->error, F_true);
+ iki_write_print_line_last_locked(setting, main->error);
return;
}
}
if (F_status_is_error(setting->status)) {
- iki_write_print_line_first(setting, main->error, F_true);
+ iki_write_print_line_first_locked(setting, main->error);
fll_error_print(main->error, F_status_set_fine(setting->status), "f_string_dynamic_seek_to", F_true);
- iki_write_print_line_last(setting, main->error, F_true);
+ iki_write_print_line_last_locked(setting, main->error);
return;
}
if (object_ended && previous == range.start) {
setting->status = F_status_set_error(F_parameter);
- iki_write_print_line_first(setting, main->error, F_true);
+ iki_write_print_line_first_locked(setting, main->error);
fll_program_print_error_pipe_invalid_form_feed(main->error);
- iki_write_print_line_last(setting, main->error, F_true);
+ iki_write_print_line_last_locked(setting, main->error);
return;
}
setting->status = f_string_dynamic_partial_append_nulless(setting->buffer, range, &setting->content);
if (F_status_is_error(setting->status)) {
- iki_write_print_line_first(setting, main->error, F_true);
+ iki_write_print_line_first_locked(setting, main->error);
fll_error_print(main->error, F_status_set_fine(setting->status), "f_string_dynamic_partial_append_nulless", F_true);
- iki_write_print_line_last(setting, main->error, F_true);
+ iki_write_print_line_last_locked(setting, main->error);
return;
}
setting->status = f_string_dynamic_partial_append_nulless(setting->buffer, range, &setting->object);
if (F_status_is_error(setting->status)) {
- iki_write_print_line_first(setting, main->error, F_true);
+ iki_write_print_line_first_locked(setting, main->error);
fll_error_print(main->error, F_status_set_fine(setting->status), "f_string_dynamic_partial_append_nulless", F_true);
- iki_write_print_line_last(setting, main->error, F_true);
+ iki_write_print_line_last_locked(setting, main->error);
return;
}
if (object_ended) {
setting->status = F_status_set_error(F_parameter);
- iki_write_print_line_first(setting, main->error, F_true);
+ iki_write_print_line_first_locked(setting, main->error);
fll_program_print_error_pipe_object_without_content(main->error);
- iki_write_print_line_last(setting, main->error, F_true);
+ iki_write_print_line_last_locked(setting, main->error);
return;
}
} // for
// Ensure a new line is always put at the end of the program execution, unless in quiet mode.
- iki_write_print_line_last(setting, main->message, F_true);
+ iki_write_print_line_last_locked(setting, main->message);
}
#endif // _di_iki_write_main_
}
#endif // _di_iki_write_print_help_
-#ifndef _di_iki_write_print_line_first_
- f_status_t iki_write_print_line_first(iki_write_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_iki_write_print_line_first_locked_
+ f_status_t iki_write_print_line_first_locked(iki_write_setting_t * const setting, const fl_print_t print) {
if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_first, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_iki_write_print_line_first_locked_
+
+#ifndef _di_iki_write_print_line_first_unlocked_
+ f_status_t iki_write_print_line_first_unlocked(iki_write_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
+ fll_print_dynamic_raw(setting->line_first, print.to.stream);
+
return F_none;
}
-#endif // _di_iki_write_print_line_first_
+#endif // _di_iki_write_print_line_first_unlocked_
-#ifndef _di_iki_write_print_line_last_
- f_status_t iki_write_print_line_last(iki_write_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_iki_write_print_line_last_locked_
+ f_status_t iki_write_print_line_last_locked(iki_write_setting_t * const setting, const fl_print_t print) {
if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (print.verbosity == f_console_verbosity_error_e && !F_status_is_error(setting->status)) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_last, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ fll_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_iki_write_print_line_last_locked_
+
+#ifndef _di_iki_write_print_line_last_unlocked_
+ f_status_t iki_write_print_line_last_unlocked(iki_write_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
+ f_print_dynamic_raw(setting->line_last, print.to.stream);
+
return F_none;
}
-#endif // _di_iki_write_print_line_last_
+#endif // _di_iki_write_print_line_last_unlocked_
#ifndef _di_iki_write_print_error_main_missing_
f_status_t iki_write_print_error_main_missing(iki_write_setting_t * const setting, const fl_print_t print) {
*
* This is generally either the first line in the program or the first line printed before an error message.
*
+ * This function locks and then unlocks the input stream when printing.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_iki_write_print_line_first_locked_
+ extern f_status_t iki_write_print_line_first_locked(iki_write_setting_t * const setting, const fl_print_t print);
+#endif // _di_iki_write_print_line_first_locked_
+
+/**
+ * Print first new line, unless verbosity says otherwise.
+ *
+ * This is generally either the first line in the program or the first line printed before an error message.
+ *
+ * This function neither locks nor unlocks the input stream.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
*
* @return
* F_none on success.
* F_output_not on success, but no printing is performed.
*/
-#ifndef _di_iki_write_print_line_first_
- extern f_status_t iki_write_print_line_first(iki_write_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_iki_write_print_line_first_
+#ifndef _di_iki_write_print_line_first_unlocked_
+ extern f_status_t iki_write_print_line_first_unlocked(iki_write_setting_t * const setting, const fl_print_t print);
+#endif // _di_iki_write_print_line_first_unlocked_
/**
* Print last new line when the main is complete, unless verbosity says otherwise.
*
* This is generally the very last line printed in the program.
*
+ * This function locks and then unlocks the input stream when printing.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_iki_write_print_line_last_locked_
+ extern f_status_t iki_write_print_line_last_locked(iki_write_setting_t * const setting, const fl_print_t print);
+#endif // _di_iki_write_print_line_last_locked_
+
+/**
+ * Print last new line when the main is complete, unless verbosity says otherwise.
+ *
+ * This is generally the very last line printed in the program.
+ *
+ * This function neither locks nor unlocks the input stream.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
*
* @return
* F_none on success.
* F_output_not on success, but no printing is performed.
*/
-#ifndef _di_iki_write_print_line_last_
- extern f_status_t iki_write_print_line_last(iki_write_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_iki_write_print_line_last_
+#ifndef _di_iki_write_print_line_last_unlocked_
+ extern f_status_t iki_write_print_line_last_unlocked(iki_write_setting_t * const setting, const fl_print_t print);
+#endif // _di_iki_write_print_line_last_unlocked_
/**
* Print error message about "main" Object being missing.
setting->status = f_console_parameter_process(arguments, &main->parameters);
if (F_status_is_error(setting->status)) {
- status_code_print_line_first(setting, main->error, F_true);
+ status_code_print_line_first_locked(setting, main->error);
fll_error_print(main->error, F_status_set_fine(setting->status), "f_console_parameter_process", F_true);
- status_code_print_line_last(setting, main->error, F_true);
+ status_code_print_line_last_locked(setting, main->error);
return;
}
setting->status = fll_program_parameter_process_context(choices, modes, F_true, main);
if (F_status_is_error(setting->status)) {
- status_code_print_line_first(setting, main->error, F_true);
+ status_code_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);
- status_code_print_line_last(setting, main->error, F_true);
+ status_code_print_line_last_locked(setting, main->error);
return;
}
setting->status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
if (F_status_is_error(setting->status)) {
- status_code_print_line_first(setting, main->error, F_true);
+ status_code_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);
- status_code_print_line_last(setting, main->error, F_true);
+ status_code_print_line_last_locked(setting, main->error);
return;
}
if (!(setting->flag & status_code_main_flag_number_e)) {
setting->status = F_status_set_error(F_parameter);
- status_code_print_line_first(setting, main->error, F_true);
+ status_code_print_line_first_locked(setting, main->error);
status_code_print_error_cannot_error_warning_number(setting, main->error);
- status_code_print_line_last(setting, main->error, F_true);
+ status_code_print_line_last_locked(setting, main->error);
return;
}
if (setting->flag & status_code_main_flag_fine_e) {
setting->status = F_status_set_error(F_parameter);
- status_code_print_line_first(setting, main->error, F_true);
+ status_code_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_enable_s, status_code_long_error_s, status_code_long_fine_s);
- status_code_print_line_last(setting, main->error, F_true);
+ status_code_print_line_last_locked(setting, main->error);
return;
}
else if (setting->flag & status_code_main_flag_warning_e && setting->flag & status_code_main_flag_fine_e) {
setting->status = F_status_set_error(F_parameter);
- status_code_print_line_first(setting, main->error, F_true);
+ status_code_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_enable_s, status_code_long_warning_s, status_code_long_fine_s);
- status_code_print_line_last(setting, main->error, F_true);
+ status_code_print_line_last_locked(setting, main->error);
return;
}
if (main->parameters.remaining.used == 0 && !(main->pipe & fll_program_data_pipe_input_e)) {
setting->status = F_status_set_error(F_parameter);
- status_code_print_line_first(setting, main->error, F_true);
+ status_code_print_line_first_locked(setting, main->error);
status_code_print_error_no_status_codes(setting, main->error);
- status_code_print_line_last(setting, main->error, F_true);
+ status_code_print_line_last_locked(setting, main->error);
return;
}
}
#endif // _di_status_code_print_help_
-#ifndef _di_status_code_print_line_first_
- f_status_t status_code_print_line_first(status_code_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_status_code_print_line_first_locked_
+ f_status_t status_code_print_line_first_locked(status_code_setting_t * const setting, const fl_print_t print) {
if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_first, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ f_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_status_code_print_line_first_locked_
+
+#ifndef _di_status_code_print_line_first_unlocked_
+ f_status_t status_code_print_line_first_unlocked(status_code_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
+ fll_print_dynamic_raw(setting->line_first, print.to.stream);
+
return F_none;
}
-#endif // _di_status_code_print_line_first_
+#endif // _di_status_code_print_line_first_unlocked_
-#ifndef _di_status_code_print_line_last_
- f_status_t status_code_print_line_last(status_code_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_status_code_print_line_last_locked_
+ f_status_t status_code_print_line_last_locked(status_code_setting_t * const setting, const fl_print_t print) {
if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (print.verbosity == f_console_verbosity_error_e && !F_status_is_error(setting->status)) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_last, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ fll_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_status_code_print_line_last_locked_
+
+#ifndef _di_status_code_print_line_last_unlocked_
+ f_status_t status_code_print_line_last_unlocked(status_code_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
}
+ f_print_dynamic_raw(setting->line_last, print.to.stream);
+
return F_none;
}
-#endif // _di_status_code_print_line_last_
+#endif // _di_status_code_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
*
* This is generally either the first line in the program or the first line printed before an error message.
*
+ * This function locks and then unlocks the input stream when printing.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_status_code_print_line_first_locked_
+ extern f_status_t status_code_print_line_first_locked(status_code_setting_t * const setting, const fl_print_t print);
+#endif // _di_status_code_print_line_first_locked_
+
+/**
+ * Print first new line, unless verbosity says otherwise.
+ *
+ * This is generally either the first line in the program or the first line printed before an error message.
+ *
+ * This function neither locks nor unlocks the input stream.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
*
* @return
* F_none on success.
* F_output_not on success, but no printing is performed.
*/
-#ifndef _di_status_code_print_line_first_
- extern f_status_t status_code_print_line_first(status_code_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_status_code_print_line_first_
+#ifndef _di_status_code_print_line_first_unlocked_
+ extern f_status_t status_code_print_line_first_unlocked(status_code_setting_t * const setting, const fl_print_t print);
+#endif // _di_status_code_print_line_first_unlocked_
/**
* Print last new line when the main is complete, unless verbosity says otherwise.
*
* This is generally the very last line printed in the program.
*
+ * This function locks and then unlocks the input stream when printing.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_status_code_print_line_last_locked_
+ extern f_status_t status_code_print_line_last_locked(status_code_setting_t * const setting, const fl_print_t print);
+#endif // _di_status_code_print_line_last_locked_
+
+/**
+ * Print last new line when the main is complete, unless verbosity says otherwise.
+ *
+ * This is generally the very last line printed in the program.
+ *
+ * This function neither locks nor unlocks the input stream.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
*
* @return
* F_none on success.
* F_output_not on success, but no printing is performed.
*/
-#ifndef _di_status_code_print_line_last_
- extern f_status_t status_code_print_line_last(status_code_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_status_code_print_line_last_
+#ifndef _di_status_code_print_line_last_unlocked_
+ extern f_status_t status_code_print_line_last_unlocked(status_code_setting_t * const setting, const fl_print_t print);
+#endif // _di_status_code_print_line_last_unlocked_
#ifdef __cplusplus
} // extern "C"
}
if (F_status_is_error(setting->status)) {
- status_code_print_line_last(setting, main->error, F_true);
+ status_code_print_line_last_locked(setting, main->error);
}
else if (setting->status != F_interrupt) {
- status_code_print_line_last(setting, main->message, F_true);
+ status_code_print_line_last_locked(setting, main->message);
}
}
#endif // _di_status_code_main_
setting->status = f_console_parameter_process(arguments, &main->parameters);
if (F_status_is_error(setting->status)) {
- utf8_print_line_first(setting, main->error, F_true);
+ utf8_print_line_first_locked(setting, main->error);
fll_error_print(main->error, F_status_set_fine(setting->status), "f_console_parameter_process", F_true);
- utf8_print_line_last(setting, main->error, F_true);
+ utf8_print_line_last_locked(setting, main->error);
return;
}
setting->status = fll_program_parameter_process_context(choices, modes, F_true, main);
if (F_status_is_error(setting->status)) {
- utf8_print_line_first(setting, main->error, F_true);
+ utf8_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);
- utf8_print_line_last(setting, main->error, F_true);
+ utf8_print_line_last_locked(setting, main->error);
return;
}
setting->status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
if (F_status_is_error(setting->status)) {
- utf8_print_line_first(setting, main->error, F_true);
+ utf8_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);
- utf8_print_line_last(setting, main->error, F_true);
+ utf8_print_line_last_locked(setting, main->error);
return;
}
setting->status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
if (F_status_is_error(setting->status)) {
- utf8_print_line_first(setting, main->error, F_true);
+ utf8_print_line_first_locked(setting, main->error);
fll_error_print(main->error, F_status_set_fine(setting->status), "f_console_parameter_prioritize_right", F_true);
- utf8_print_line_last(setting, main->error, F_true);
+ utf8_print_line_last_locked(setting, main->error);
return;
}
setting->status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
if (F_status_is_error(setting->status)) {
- utf8_print_line_first(setting, main->error, F_true);
+ utf8_print_line_first_locked(setting, main->error);
fll_error_print(main->error, F_status_set_fine(setting->status), "f_console_parameter_prioritize_right", F_true);
- utf8_print_line_last(setting, main->error, F_true);
+ utf8_print_line_last_locked(setting, main->error);
return;
}
setting->status = F_status_set_error(F_parameter);
utf8_print_error_parameter_file_to_too_many(main, setting);
- utf8_print_line_last(setting, main->error, F_true);
+ utf8_print_line_last_locked(setting, main->error);
return;
}
setting->status = f_string_dynamics_increase_by(1, &setting->path_files_to);
if (F_status_is_error(setting->status)) {
- utf8_print_line_first(setting, main->error, F_true);
+ utf8_print_line_first_locked(setting, main->error);
fll_error_print(main->error, F_status_set_fine(setting->status), "f_string_dynamics_increase_by", F_true);
- utf8_print_line_last(setting, main->error, F_true);
+ utf8_print_line_last_locked(setting, main->error);
return;
}
setting->status = f_string_dynamic_append_nulless(main->parameters.arguments.array[main->parameters.array[utf8_parameter_to_file_e].values.array[0]], &setting->path_files_to.array[0]);
if (F_status_is_error(setting->status)) {
- utf8_print_line_first(setting, main->error, F_true);
+ utf8_print_line_first_locked(setting, main->error);
fll_error_print(main->error, F_status_set_fine(setting->status), "f_string_dynamic_append_nulless", F_true);
- utf8_print_line_last(setting, main->error, F_true);
+ utf8_print_line_last_locked(setting, main->error);
return;
}
setting->status = f_file_stream_open(args[main->parameters.array[utf8_parameter_to_file_e].values.array[0]], f_file_open_mode_append_s, &main->output.to);
if (F_status_is_error(setting->status)) {
- utf8_print_line_first(setting, main->error, F_true);
+ utf8_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, args[main->parameters.array[utf8_parameter_to_file_e].values.array[0]], f_file_operation_open_s, fll_error_file_type_file_e);
- utf8_print_line_last(setting, main->error, F_true);
+ utf8_print_line_last_locked(setting, main->error);
return;
}
setting->flag |= utf8_main_flag_file_to_e;
}
else {
- utf8_print_line_first(setting, main->error, F_true);
+ utf8_print_line_first_locked(setting, main->error);
utf8_print_error_parameter_file_name_empty(main, setting, main->parameters.array[utf8_parameter_to_file_e].values.array[0]);
- utf8_print_line_last(setting, main->error, F_true);
+ utf8_print_line_last_locked(setting, main->error);
setting->status = F_status_set_error(F_parameter);
else if (main->parameters.array[utf8_parameter_to_file_e].result == f_console_result_found_e) {
setting->status = F_status_set_error(F_parameter);
- utf8_print_line_first(setting, main->error, F_true);
+ utf8_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_enable_s, utf8_long_to_file_s);
- utf8_print_line_last(setting, main->error, F_true);
+ utf8_print_line_last_locked(setting, main->error);
return;
}
setting->status = f_string_dynamics_increase_by(main->parameters.array[utf8_parameter_from_file_e].values.used, &setting->path_files_from);
if (F_status_is_error(setting->status)) {
- utf8_print_line_first(setting, main->error, F_true);
+ utf8_print_line_first_locked(setting, main->error);
fll_error_print(main->error, F_status_set_fine(setting->status), "f_string_dynamics_increase_by", F_true);
- utf8_print_line_last(setting, main->error, F_true);
+ utf8_print_line_last_locked(setting, main->error);
return;
}
setting->status = f_string_dynamic_append_nulless(main->parameters.arguments.array[index], &setting->path_files_from.array[i]);
if (F_status_is_error(setting->status)) {
- utf8_print_line_first(setting, main->error, F_true);
+ utf8_print_line_first_locked(setting, main->error);
fll_error_print(main->error, F_status_set_fine(setting->status), "f_string_dynamic_append_nulless", F_true);
break;
} // for
if (F_status_is_error(setting->status)) {
- utf8_print_line_last(setting, main->error, F_true);
+ utf8_print_line_last_locked(setting, main->error);
return;
}
else if (main->parameters.array[utf8_parameter_from_file_e].result == f_console_result_found_e) {
setting->status = F_status_set_error(F_parameter);
- utf8_print_line_first(setting, main->error, F_true);
+ utf8_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_enable_s, utf8_long_from_file_s);
- utf8_print_line_last(setting, main->error, F_true);
+ utf8_print_line_last_locked(setting, main->error);
return;
}
setting->status = f_string_dynamics_resize(main->parameters.remaining.used, &setting->remaining);
if (F_status_is_error(setting->status)) {
- utf8_print_line_first(setting, main->error, F_true);
+ utf8_print_line_first_locked(setting, main->error);
fll_error_print(main->error, F_status_set_fine(setting->status), "f_string_dynamic_append_nulless", F_true);
- utf8_print_line_last(setting, main->error, F_true);
+ utf8_print_line_last_locked(setting, main->error);
return;
}
setting->status = F_status_set_error(F_parameter);
utf8_print_error_no_from(main, setting);
- utf8_print_line_last(setting, main->error, F_true);
+ utf8_print_line_last_locked(setting, main->error);
return;
}
if (main->error.verbosity == f_console_verbosity_quiet_e) return F_output_not;
if (setting->flag & (utf8_main_flag_strip_invalid_e | utf8_main_flag_verify_e)) return F_output_not;
- utf8_print_line_first(setting, main->error, F_false);
+ utf8_print_line_first_unlocked(setting, main->error);
fl_print_format("%[%QFailed to decode character code '%]", main->error.to.stream, main->context.set.error, main->error.prefix, main->context.set.error);
if (main->error.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- utf8_print_line_first(setting, main->error, F_false);
+ utf8_print_line_first_unlocked(setting, main->error);
fl_print_format("%[%QFailed to encode Unicode codepoint '%]", main->error.to.stream, main->context.set.error, main->error.prefix, main->context.set.error);
fl_print_format("%[U+%_U%]", main->error.to.stream, main->context.set.notable, codepoint, main->context.set.notable);
if (main->error.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- utf8_print_line_first(setting, main->error, F_true);
+ utf8_print_line_first_locked(setting, main->error);
fll_print_format("%[%QNo from sources are specified, please pipe data, designate a file, or add parameters.%]%r", main->error.to.stream, main->error.context, main->error.prefix, main->error.context, f_string_eol_s);
f_file_stream_lock(main->error.to);
- utf8_print_line_first(setting, main->error, F_false);
+ utf8_print_line_first_unlocked(setting, main->error);
fl_print_format("%[%QNo file specified at parameter index %]", main->error.to.stream, main->context.set.error, main->error.prefix, main->context.set.error);
fl_print_format("%[%ul%]", main->error.to.stream, main->context.set.notable, index, main->context.set.notable);
f_file_stream_lock(main->error.to);
- utf8_print_line_first(setting, main->error, F_false);
+ utf8_print_line_first_unlocked(setting, main->error);
fl_print_format("%[%QFailed to find the %r file '%]", main->error.to.stream, main->context.set.error, main->error.prefix, from ? utf8_string_from_s : utf8_string_to_s, main->context.set.error);
fl_print_format("%[%Q%]", main->error.to.stream, main->context.set.notable, name, main->context.set.notable);
if (main->error.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- utf8_print_line_first(setting, main->error, F_true);
+ utf8_print_line_first_locked(setting, main->error);
fll_print_format("%[%QToo many '%r' files specified, there may only be one '%r' file.%]%r", main->error.to.stream, main->context.set.error, main->error.prefix, utf8_string_to_s, utf8_string_to_s, main->context.set.error, f_string_eol_s);
}
#endif // _di_utf8_print_help_
-#ifndef _di_utf8_print_line_first_
- f_status_t utf8_print_line_first(utf8_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_utf8_print_line_first_locked_
+ f_status_t utf8_print_line_first_locked(utf8_setting_t * const setting, const fl_print_t print) {
if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
- if (lock) {
- fll_print_dynamic_raw(setting->line_first, print.to.stream);
- }
- else {
- f_print_dynamic_raw(setting->line_first, print.to.stream);
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
+ if (setting->flag & (utf8_main_flag_verify_e | utf8_main_flag_file_to_e)) return F_output_not;
}
+ f_print_dynamic_raw(setting->line_first, print.to.stream);
+
return F_none;
}
-#endif // _di_utf8_print_line_first_
+#endif // _di_utf8_print_line_first_locked_
-#ifndef _di_utf8_print_line_last_
- f_status_t utf8_print_line_last(utf8_setting_t * const setting, const fl_print_t print, const bool lock) {
+#ifndef _di_utf8_print_line_first_unlocked_
+ f_status_t utf8_print_line_first_unlocked(utf8_setting_t * const setting, const fl_print_t print) {
if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
if (setting->flag & (utf8_main_flag_verify_e | utf8_main_flag_file_to_e)) return F_output_not;
}
- if (lock) {
- fll_print_dynamic_raw(setting->line_last, print.to.stream);
+ fll_print_dynamic_raw(setting->line_first, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_utf8_print_line_first_unlocked_
+
+#ifndef _di_utf8_print_line_last_locked_
+ f_status_t utf8_print_line_last_locked(utf8_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
+ if (setting->flag & (utf8_main_flag_verify_e | utf8_main_flag_file_to_e)) return F_output_not;
}
- else {
- f_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ fll_print_dynamic_raw(setting->line_last, print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_utf8_print_line_last_locked_
+
+#ifndef _di_utf8_print_line_last_unlocked_
+ f_status_t utf8_print_line_last_unlocked(utf8_setting_t * const setting, const fl_print_t print) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity == f_console_verbosity_error_e) return F_output_not;
+ if (setting->flag & (utf8_main_flag_verify_e | utf8_main_flag_file_to_e)) return F_output_not;
}
+ f_print_dynamic_raw(setting->line_last, print.to.stream);
+
return F_none;
}
-#endif // _di_utf8_print_line_last_
+#endif // _di_utf8_print_line_last_unlocked_
#ifndef _di_utf8_print_raw_bytesequence_
f_status_t utf8_print_raw_bytesequence(fll_program_data_t * const main, utf8_setting_t * const setting, const f_utf_char_t raw, const uint8_t width) {
*
* This is generally either the first line in the program or the first line printed before an error message.
*
+ * This function locks and then unlocks the input stream when printing.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_utf8_print_line_first_locked_
+ extern f_status_t utf8_print_line_first_locked(utf8_setting_t * const setting, const fl_print_t print);
+#endif // _di_utf8_print_line_first_locked_
+
+/**
+ * Print first new line, unless verbosity says otherwise.
+ *
+ * This is generally either the first line in the program or the first line printed before an error message.
+ *
+ * This function neither locks nor unlocks the input stream.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
*
* @return
* F_none on success.
* F_output_not on success, but no printing is performed.
*/
-#ifndef _di_utf8_print_line_first_
- extern f_status_t utf8_print_line_first(utf8_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_utf8_print_line_first_
+#ifndef _di_utf8_print_line_first_unlocked_
+ extern f_status_t utf8_print_line_first_unlocked(utf8_setting_t * const setting, const fl_print_t print);
+#endif // _di_utf8_print_line_first_unlocked_
/**
* Print last new line when the main is complete, unless verbosity says otherwise.
*
* This is generally the very last line printed in the program.
*
+ * This function locks and then unlocks the input stream when printing.
+ *
+ * @param setting
+ * The main program settings.
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_utf8_print_line_last_locked_
+ extern f_status_t utf8_print_line_last_locked(utf8_setting_t * const setting, const fl_print_t print);
+#endif // _di_utf8_print_line_last_locked_
+
+/**
+ * Print last new line when the main is complete, unless verbosity says otherwise.
+ *
+ * This is generally the very last line printed in the program.
+ *
+ * This function neither locks nor unlocks the input stream.
+ *
* @param setting
* The main program settings.
* This does not alter setting.status.
* @param print
* Designates the how and where to print.
- * @param lock
- * If TRUE, then lock the stream.
- * If FALSE, then do not lock or unlock the stream.
*
* @return
* F_none on success.
* F_output_not on success, but no printing is performed.
*/
-#ifndef _di_utf8_print_line_last_
- extern f_status_t utf8_print_line_last(utf8_setting_t * const setting, const fl_print_t print, const bool lock);
-#endif // _di_utf8_print_line_last_
+#ifndef _di_utf8_print_line_last_unlocked_
+ extern f_status_t utf8_print_line_last_unlocked(utf8_setting_t * const setting, const fl_print_t print);
+#endif // _di_utf8_print_line_last_unlocked_
/**
* Print the raw character data (binary / byte sequence).
status = utf8_detect_codepoint(main, setting, text, &mode_codepoint);
if (F_status_is_error(status)) {
- utf8_print_line_first(setting, main->error, F_true);
+ utf8_print_line_first_locked(setting, main->error);
fll_error_print(main->error, F_status_set_fine(status), "utf8_detect_codepoint", F_true);
break;
}
if (F_status_is_error(setting->status)) {
- utf8_print_line_last(setting, main->error, F_true);
+ utf8_print_line_last_locked(setting, main->error);
}
else if (setting->status != F_interrupt) {
- utf8_print_line_last(setting, main->message, F_true);
+ utf8_print_line_last_locked(setting, main->message);
}
if (F_status_is_error(setting->status) || setting->status == F_interrupt) return;