]> Kevux Git Server - fll/commitdiff
Progress: Continue program related work.
authorKevin Day <thekevinday@gmail.com>
Tue, 13 Sep 2022 01:00:11 +0000 (20:00 -0500)
committerKevin Day <thekevinday@gmail.com>
Tue, 13 Sep 2022 01:00:11 +0000 (20:00 -0500)
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.

65 files changed:
level_2/fll_program/c/program/print.c
level_2/fll_program/c/program/print.h
level_3/byte_dump/c/print.c
level_3/byte_dump/c/print.h
level_3/control/c/print.c
level_3/control/c/print.h
level_3/controller/c/print.c
level_3/controller/c/print.h
level_3/fake/c/print.c
level_3/fake/c/print.h
level_3/firewall/c/print.c
level_3/firewall/c/print.h
level_3/fss_basic_list_read/c/print.c
level_3/fss_basic_list_read/c/print.h
level_3/fss_basic_list_write/c/print.c
level_3/fss_basic_list_write/c/print.h
level_3/fss_basic_read/c/print.c
level_3/fss_basic_read/c/print.h
level_3/fss_basic_write/c/print.c
level_3/fss_basic_write/c/print.h
level_3/fss_embedded_list_read/c/print.c
level_3/fss_embedded_list_read/c/print.h
level_3/fss_embedded_list_write/c/print.c
level_3/fss_embedded_list_write/c/print.h
level_3/fss_extended_list_read/c/print.c
level_3/fss_extended_list_read/c/print.h
level_3/fss_extended_list_write/c/print.c
level_3/fss_extended_list_write/c/print.h
level_3/fss_extended_read/c/print.c
level_3/fss_extended_read/c/print.h
level_3/fss_extended_write/c/print.c
level_3/fss_extended_write/c/print.h
level_3/fss_identify/c/print.c
level_3/fss_identify/c/print.h
level_3/fss_payload_read/c/print.c
level_3/fss_payload_read/c/print.h
level_3/fss_payload_write/c/print.c
level_3/fss_payload_write/c/print.h
level_3/fss_status_code/c/common.c
level_3/fss_status_code/c/fss_status_code.c
level_3/fss_status_code/c/print.c
level_3/fss_status_code/c/print.h
level_3/iki_read/c/common.c
level_3/iki_read/c/iki_read.c
level_3/iki_read/c/print.c
level_3/iki_read/c/print.h
level_3/iki_read/c/private-common.c
level_3/iki_read/c/private-common.h
level_3/iki_read/c/private-print.c
level_3/iki_read/c/private-print.h
level_3/iki_read/c/private-read.c
level_3/iki_read/c/private-read.h
level_3/iki_write/c/common.c
level_3/iki_write/c/iki_write.c
level_3/iki_write/c/print.c
level_3/iki_write/c/print.h
level_3/status_code/c/common.c
level_3/status_code/c/print.c
level_3/status_code/c/print.h
level_3/status_code/c/status_code.c
level_3/utf8/c/common.c
level_3/utf8/c/print.c
level_3/utf8/c/print.h
level_3/utf8/c/private-utf8.c
level_3/utf8/c/utf8.c

index 5dfee1a88d985cd9e8fcd73123a2c4ffbadf4c78..b3d0a3d2c356d3529f45bc674823b7b5ce5133fa 100644 (file)
@@ -5,6 +5,21 @@
 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) {
 
@@ -69,6 +84,10 @@ extern "C" {
 
     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;
index 4030de75850df3c2b37501a4fda3014ffdd2e8b9..b70b7a325fd99cce7593feb2d3ae3cdf4cc81d33 100644 (file)
@@ -17,6 +17,28 @@ extern "C" {
 #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.
index da007dae30ef50ed696a2282c8b45b1429542031..281298acbb4f0b204416b582d9bd3c2ed2581a24 100644 (file)
@@ -72,36 +72,73 @@ extern "C" {
   }
 #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"
index 311a6a3ac7a9a1111ad06780f0b49bc9ec33df62..4035b9d7f2e2f3c83bed1147d481af96293b659b 100644 (file)
@@ -37,36 +37,84 @@ 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"
index 66872e572e35c96d8ffba0f1e535df3c3a5492b4..cd1afc7ea985601dfd06d43ee992cfa943181c78 100644 (file)
@@ -45,36 +45,73 @@ 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"
index d0fbdea9c2afcca6404d7fbdbb353bc8c17bbdb1..70dd24c68f3198e2f5834f341c30ae982cf1cf4a 100644 (file)
@@ -15,53 +15,103 @@ 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"
index 4e41cd3d33d570efa60eef18d25a71ad83c93670..333c85ff5f0074eb5083dffaa8f3e7c999c52fde 100644 (file)
@@ -48,36 +48,73 @@ 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"
index c791d966d478bd825f74c1b33db61cb10eb33c5c..5638bd75ce8c0d2fdb2a1416cb0fb7f55acac997 100644 (file)
@@ -15,16 +15,18 @@ 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_
 
 /**
@@ -32,37 +34,84 @@ 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_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
index ab6653055bbe1dda707e8d0796b520f95a8601bf..60d435b9bc0f1d2996fe7b96d698e010d7efe1b9 100644 (file)
@@ -76,36 +76,65 @@ extern "C" {
   }
 #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"
index 4f10ebda52ace60871fa5d881dc85a520976f7f1..14624851d41fd5e42f8a4f261aa46c51124a39f9 100644 (file)
@@ -33,36 +33,84 @@ 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"
index 7c2eaea93dff6b5d8c0f6a6973fe0525992d4a42..b11d269c14344e1f32c376fa776ba84278434163 100644 (file)
@@ -6,7 +6,7 @@ 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);
 
@@ -34,36 +34,65 @@ extern "C" {
   }
 #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"
index f7ff2c4b1370f851843b41d692af514024f6441e..cbcae87e187fb72c077378a7fbc8d6143335378c 100644 (file)
@@ -33,36 +33,84 @@ 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"
index c74adf8c2fe2df63d5b75e41434820f3d439c0f0..a00e97091183b34b1756d37ab1b4b906761673d6 100644 (file)
@@ -6,7 +6,7 @@ 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);
 
@@ -112,36 +112,65 @@ extern "C" {
   }
 #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"
index d75c2f30f3d66c049d088f6e48db6ed816111fdd..c43ccc1dc36a138a469ad3573392e99467f37114 100644 (file)
@@ -33,36 +33,84 @@ 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"
index 10b365922be3fe3f9cdb4200919c8e2abfeb788b..9b5458396f40bbcc075896cdaad0a4ea2c8e0665 100644 (file)
@@ -6,7 +6,7 @@ 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);
 
@@ -52,36 +52,65 @@ extern "C" {
   }
 #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"
index 12ddbc0b778b59de268fc11ea140b2bcc1e3301e..a0202f430c9c31d23fd868cff1edd1c1ed884ce4 100644 (file)
@@ -33,36 +33,84 @@ 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"
index 13fd2b320fdf7546cf94ffcfdb431e991edf5a24..60f52257f8d158de9f6812a787a606351c779087 100644 (file)
@@ -112,36 +112,65 @@ 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"
index ae20be3e2110b6f52776621fb572a67392b1d5e6..8afec0ddcbc68bbeba3b748aafbc89f5a0545972 100644 (file)
@@ -33,36 +33,84 @@ 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"
index 9cd5a00886b1d5d6ba8585048f0bca59b966b76c..325e4c83aeef634b9537de75158f7f46b8124ff1 100644 (file)
@@ -52,36 +52,65 @@ 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"
index 99ef64993e1096f61a31cd3df77c5bc6f4813850..8dac33973ed42217c4675ffeafeb4ea1214d91a3 100644 (file)
@@ -33,36 +33,84 @@ 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"
index 131192460008b7eb05621faa2ccdffa1c2f7fce2..55dd33298150d516b2f2faa9358e9ec1290d1514 100644 (file)
@@ -111,36 +111,65 @@ 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"
index 478754118e53192c409dcb5ee66b8ddf631afe9c..b36f79132da03eebd5f0af7c6c87fa58b623885f 100644 (file)
@@ -33,36 +33,84 @@ 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"
index bddc7b73fae95c7a10b49712054af9d260c07879..a19dad11f58cd99e8d696dcc3db1d8aefce51e7a 100644 (file)
@@ -55,36 +55,67 @@ 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"
index 562dfed38dd09e4081d8434d11e26b87b0659bfc..db58cdfe233ecc57a0384606924291ffe987343f 100644 (file)
@@ -33,36 +33,84 @@ 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"
index 893c762c083a74f46ae8f004882aab8263d60307..43f5dae4c382eb464613e454efd47df8f589e3df 100644 (file)
@@ -112,36 +112,67 @@ 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"
index 73015d030853654d0e8998e367e4e86cc82a98a6..7a60447671d6f800051c89ec6c6dda7be31afc74 100644 (file)
@@ -33,36 +33,84 @@ 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"
index 0b44a87b3a53dc31936f551ce72b4f5c65b5e97d..1666b72167c53e0146691a04386e968429e14c66 100644 (file)
@@ -55,36 +55,67 @@ 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"
index 9da45b4ce0ede6b5ad5b001f5407204aa7f80061..e8b3b33bc18f0ac04685511dbe21459d78d592e4 100644 (file)
@@ -33,36 +33,84 @@ 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"
index c9f770a343a265e3a3ae31081f0db6254beb9c69..05ec3b0a10beb19cf4f8dc1e83748a532ee45e57 100644 (file)
@@ -112,36 +112,67 @@ 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"
index 7d543dc1807d3930ce3e5a726f10a9f735920a52..ec4522c6be86b174f7dc9be32d991388df8d3855 100644 (file)
@@ -33,36 +33,84 @@ 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"
index 9e5e72f359f8ba061afc48d4af421f5130030fe2..062933c0c4f3fb6f41c0d3bbbdfdf89163c571f5 100644 (file)
@@ -52,36 +52,67 @@ 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"
index 79dffc537d40f9939fb7e1a5e8de945a4b2f775f..fbe347ee8104b6f33fa6fc99ceb85d2290ef6779 100644 (file)
@@ -33,36 +33,84 @@ 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"
index 36e102b519994edc9f92a8ca7afda07328cfb370..d2462654fece09fd99b1f580e408a9e4d1f9dede 100644 (file)
@@ -53,36 +53,67 @@ 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"
index 437e9825af1eaf86f24ea95c76d976802a6b49e3..ee0dcf19750cd6b8cb1dc4637b77b2786ec1b26f 100644 (file)
@@ -33,36 +33,84 @@ 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"
index 5bb4951781cf1bf5a3c1f51eb82d37d4f8199a1e..81733d7f64d015b79a74fc7ab4b3369cd2cae710 100644 (file)
@@ -122,36 +122,67 @@ 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"
index 5b441162a690d3b94266b4b219b6b59bdc9dfd4f..d7b9c5909d93de443039d0b6b6a9f0df6f3b8284 100644 (file)
@@ -33,36 +33,84 @@ 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"
index 91f5ca5c4ccb71e57c11d2f35346f7034e6c5504..82e3d7b1c82d67083bb7244ebe0cca07bc1ba667 100644 (file)
@@ -52,36 +52,67 @@ 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"
index b2fb19a36b27f1a7e4d766e6c51bf70f5ebd6bb1..c88f1739f20177da795cdd5563b08b5f279355e5 100644 (file)
@@ -33,36 +33,84 @@ 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"
index 4bd0140a24e2f726973bf4ffe3ce95617914927e..c1f3a8cf11f25201eff987c336c0e219fee3ac1f 100644 (file)
@@ -57,9 +57,9 @@ 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;
     }
@@ -79,9 +79,9 @@ extern "C" {
         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;
         }
@@ -112,9 +112,9 @@ extern "C" {
         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;
         }
@@ -154,9 +154,9 @@ extern "C" {
         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;
         }
@@ -165,9 +165,9 @@ extern "C" {
       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;
       }
@@ -175,9 +175,9 @@ extern "C" {
     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;
     }
@@ -185,9 +185,9 @@ extern "C" {
     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;
     }
index 8e48fb0d7f15d4e20e44642d7be9e2a54b89dc57..97d27fadd477ac519615e6da26e3b81e64f9fd94 100644 (file)
@@ -125,10 +125,10 @@ extern "C" {
     }
 
     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_
index 377018b183db40745bf17ff4be0524fa2ec8b5d3..27314baaa0410ae2828473b14337e6ea3522188d 100644 (file)
@@ -67,38 +67,65 @@ extern "C" {
   }
 #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"
index aa007215b1d9a042ae8de24ef49d4a6dd1a79a3e..d1d6b73910303525b065fee049a150a9505f4cf2 100644 (file)
@@ -68,44 +68,84 @@ 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"
index 932b8db70154e90968461dbe6e57495f08d44744..2cd7547ce1fdfa81c97a458ff8652b6d82500e39 100644 (file)
@@ -80,8 +80,9 @@ 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;
         }
@@ -112,8 +113,9 @@ extern "C" {
         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;
         }
@@ -134,9 +136,19 @@ extern "C" {
 
     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_
 
index 4628854123a9ad1cd5c6e662574fe93ed0d38a16..f0fcee9cc501b7aeb02fd38ebe7dfb4d1d0308cd 100644 (file)
@@ -9,50 +9,26 @@ extern "C" {
 #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;
@@ -60,22 +36,6 @@ extern "C" {
 
     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) {
index e901ed1358fc26fa103cbb57d221927615436c9e..4f28cdbd44d656bc15c7115c23485a942215a6b3 100644 (file)
@@ -94,36 +94,65 @@ extern "C" {
   }
 #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"
index 9afe978553e097e975e7e21942dd6bd287822dc5..9b4c4ed62f88383a3ba4a16fec0b4ebec1b66445 100644 (file)
@@ -33,36 +33,84 @@ 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"
index 6d208abcf016c0bf72c4f268a15812630a988b48..b94710482126e310d8d4070c065edc38e55dace0 100644 (file)
@@ -6,7 +6,7 @@ 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);
 
index 3039b9a4e60d5093bf58e29bbd1f1b81c7263c32..cf7c7070d631519c62c878db9c52147177d096ab 100644 (file)
@@ -77,7 +77,7 @@ extern "C" {
  *   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
index c4f81a26ee9eb2a220432b9b8edb7e0f7732bd71..e9c1186a0ef87071b6c69ed83b8d4744eecf77da 100644 (file)
@@ -7,7 +7,7 @@ extern "C" {
 #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;
index 99332ffd7dd69dd20a57577823635dcb917bff7a..8630d52676ff39ab00db70eed7db1f30a1e5cf5e 100644 (file)
@@ -35,7 +35,7 @@ extern "C" {
  *   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
index 3f91b7f00dc59ef7ff4746ceb2acdc01816d5dd1..04307bdccd3628d685a9af4d074fedf5bf7f9b68 100644 (file)
@@ -8,7 +8,7 @@ extern "C" {
 #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;
index f41b1df5c468e86ceb071960bc456985c9b17a25..c6faed463d09838e1e424c156c60ddf9d2a4999b 100644 (file)
@@ -31,7 +31,7 @@ extern "C" {
  *   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_
 
 /**
index 6164233ed10f993c56d9b30bb8dc455fc697379c..cccfa4ed2f1d9e98cfad51c42ce1060486c50ccc 100644 (file)
@@ -57,9 +57,9 @@ extern "C" {
     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;
     }
@@ -79,9 +79,9 @@ extern "C" {
         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;
         }
@@ -112,9 +112,9 @@ extern "C" {
         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;
         }
@@ -141,9 +141,9 @@ extern "C" {
       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;
       }
@@ -158,9 +158,9 @@ extern "C" {
       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;
       }
@@ -170,9 +170,9 @@ extern "C" {
     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;
     }
@@ -185,9 +185,9 @@ extern "C" {
       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;
       }
@@ -207,9 +207,9 @@ extern "C" {
     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;
     }
@@ -222,9 +222,9 @@ extern "C" {
       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;
       }
@@ -244,9 +244,9 @@ extern "C" {
     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;
     }
@@ -254,9 +254,9 @@ extern "C" {
     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;
     }
index 0c778605bf19fb0ac904a45748b4f7101d35f636..b5d792adc608310f93f51493195498f6184a0ae2 100644 (file)
@@ -61,9 +61,9 @@ extern "C" {
           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;
           }
@@ -71,9 +71,9 @@ extern "C" {
           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;
           }
@@ -89,9 +89,9 @@ extern "C" {
         }
 
         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;
         }
@@ -99,9 +99,9 @@ extern "C" {
         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;
         }
@@ -116,9 +116,9 @@ extern "C" {
             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;
             }
@@ -137,9 +137,9 @@ extern "C" {
           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;
           }
@@ -162,9 +162,9 @@ extern "C" {
       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;
       }
@@ -189,7 +189,7 @@ extern "C" {
     } // 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_
 
index 9c0ac56a4b1819a4621a2b9abdfa41b8a3c983c2..c4fe82c31223b14c6812803d2d1c9dfd62a948e8 100644 (file)
@@ -55,38 +55,65 @@ extern "C" {
   }
 #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) {
index fd0801329e88afa00e6e1d58b58e900c18bc92f2..34f86c0f465bac59fa261a7a1a49fe0dacd58900 100644 (file)
@@ -34,44 +34,84 @@ 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_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.
index d4506876cb595465eaf4422e182d64a6f727ff00..a392e1b98ddf7ddbfa2e1ea60a40d001bc279845 100644 (file)
@@ -57,9 +57,9 @@ extern "C" {
     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;
     }
@@ -79,9 +79,9 @@ extern "C" {
         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;
         }
@@ -112,9 +112,9 @@ extern "C" {
         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;
         }
@@ -154,9 +154,9 @@ extern "C" {
         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;
         }
@@ -165,9 +165,9 @@ extern "C" {
       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;
       }
@@ -175,9 +175,9 @@ extern "C" {
     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;
     }
@@ -185,9 +185,9 @@ extern "C" {
     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;
     }
index 29c5537a0cccb02dffa63d7834f362f2f35f56fa..d40035a1a8a206f3cbcba1b8b1188ed3525bbf2a 100644 (file)
@@ -70,38 +70,65 @@ extern "C" {
   }
 #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"
index 99513e930da0a0d0cd5c7e23ce1bf489e00dcbd3..57e548b74f24875ed04f84db7fca982593e7b6f4 100644 (file)
@@ -68,44 +68,84 @@ 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"
index 8e3a00db0f4685b9c06958abf406a81d83cf4c58..e88093f9c3e2412ab43154754f26ed5b158f0357 100644 (file)
@@ -125,10 +125,10 @@ 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_
index 0ae9def7939100c8af4e40f4fa1b6868af8ba130..80672ef13a2b81a280a0900388d8705b1b14310d 100644 (file)
@@ -96,9 +96,9 @@ extern "C" {
     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;
     }
@@ -118,9 +118,9 @@ extern "C" {
         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;
         }
@@ -151,9 +151,9 @@ extern "C" {
         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;
         }
@@ -180,9 +180,9 @@ extern "C" {
         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;
         }
@@ -213,9 +213,9 @@ extern "C" {
         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;
         }
@@ -292,7 +292,7 @@ extern "C" {
         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;
       }
@@ -303,9 +303,9 @@ extern "C" {
         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;
         }
@@ -315,9 +315,9 @@ extern "C" {
         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;
         }
@@ -327,9 +327,9 @@ extern "C" {
         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;
         }
@@ -337,9 +337,9 @@ extern "C" {
         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);
 
@@ -349,9 +349,9 @@ extern "C" {
     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;
     }
@@ -369,9 +369,9 @@ extern "C" {
       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;
       }
@@ -389,7 +389,7 @@ extern "C" {
         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;
@@ -414,7 +414,7 @@ extern "C" {
       } // 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;
       }
@@ -424,9 +424,9 @@ extern "C" {
     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;
     }
@@ -442,9 +442,9 @@ extern "C" {
       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;
       }
@@ -464,7 +464,7 @@ extern "C" {
       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;
     }
index b1f85fa43a623f62e190ad28faa6d41fd02d9471..f29d01e3d149d71eea3422346a6cb3d10e3ad02d 100644 (file)
@@ -111,7 +111,7 @@ extern "C" {
     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);
 
@@ -149,7 +149,7 @@ extern "C" {
 
     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);
@@ -172,7 +172,7 @@ extern "C" {
 
     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);
 
@@ -187,7 +187,7 @@ extern "C" {
 
     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);
@@ -206,7 +206,7 @@ extern "C" {
 
     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);
@@ -223,7 +223,7 @@ extern "C" {
 
     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);
 
@@ -309,24 +309,24 @@ extern "C" {
   }
 #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;
 
@@ -335,16 +335,43 @@ extern "C" {
       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) {
index 785e0a32e832678a3c0a7e3286f6520d385c738d..92f56cb584b212fb11a1b41673a0a2482be6c6c0 100644 (file)
@@ -277,44 +277,84 @@ 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_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).
index f62a891eb0bd3d6c1b26486e77e028d6b0f90a37..39bdfab16f0135d9aad1cfe589c7ae3e0f25dd05 100644 (file)
@@ -44,7 +44,7 @@ extern "C" {
         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;
index 2d278a58b64f03d7bd9c5853907fe5dede01feed..7a873b516ed83c7f5fc1510d735c10d94ff1e080 100644 (file)
@@ -168,10 +168,10 @@ extern "C" {
     }
 
     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;