]> Kevux Git Server - fll/commitdiff
Progress: Continue program related work, focusing on printing.
authorKevin Day <kevin@kevux.org>
Wed, 22 Mar 2023 05:15:41 +0000 (00:15 -0500)
committerKevin Day <kevin@kevux.org>
Wed, 22 Mar 2023 05:15:41 +0000 (00:15 -0500)
Lots of printing related changes and clean ups.
Begin preparing things for switching to the *_main_t structures.
The fake, status_code, and utf8 projects are already converted to this.

There is a lot of stubbing in this commit.
I am probably going to just start a clean slate when building fss_read.
The fss_read will be based off of fss_write's design.
For this reason, I am being lax and negligent on the fss_*_read projects as they are going to get replaced and merged into fss_read.

165 files changed:
level_2/fll_error/c/error.c
level_2/fll_error/c/error.h
level_2/fll_error/c/private-error.c
level_2/fll_error/c/private-error.h
level_2/fll_program/c/private-program.c
level_2/fll_program/c/private-program.h
level_2/fll_program/c/program.c
level_2/fll_program/c/program.h
level_2/fll_program/c/program/print.c
level_2/fll_program/c/program/print.h
level_3/byte_dump/c/byte_dump.c
level_3/byte_dump/c/common.c
level_3/byte_dump/c/main.c
level_3/control/c/common.c
level_3/control/c/control.c
level_3/control/c/main.c
level_3/controller/c/common.c
level_3/controller/c/controller.c
level_3/controller/c/controller/private-controller_print.c
level_3/controller/c/main.c
level_3/fake/c/main/build.c
level_3/fake/c/main/build/load.c
level_3/fake/c/main/build/skeleton.c
level_3/fake/c/main/common.c
level_3/fake/c/main/common/define.h
level_3/fake/c/main/common/enumeration.h
level_3/fake/c/main/common/type.h
level_3/fake/c/main/fake.c
level_3/fake/c/main/make/load_fakefile.c
level_3/fake/c/main/make/operate.c
level_3/fake/c/main/make/operate_process.c
level_3/fake/c/main/print/error.c
level_3/fake/c/main/print/message.c
level_3/firewall/c/common.c
level_3/firewall/c/firewall.c
level_3/firewall/c/main.c
level_3/fss_basic_list_read/c/common.c
level_3/fss_basic_list_read/c/fss_basic_list_read.c
level_3/fss_basic_list_read/c/main.c
level_3/fss_basic_list_read/c/private-read.c
level_3/fss_basic_read/c/common.c
level_3/fss_basic_read/c/fss_basic_read.c
level_3/fss_basic_read/c/main.c
level_3/fss_basic_read/c/private-read.c
level_3/fss_embedded_list_read/c/common.c
level_3/fss_embedded_list_read/c/fss_embedded_list_read.c
level_3/fss_embedded_list_read/c/main.c
level_3/fss_extended_list_read/c/common.c
level_3/fss_extended_list_read/c/fss_extended_list_read.c
level_3/fss_extended_list_read/c/main.c
level_3/fss_extended_list_read/c/private-read.c
level_3/fss_extended_read/c/common.c
level_3/fss_extended_read/c/fss_extended_read.c
level_3/fss_extended_read/c/main.c
level_3/fss_extended_read/c/private-read.c
level_3/fss_identify/c/common.c
level_3/fss_identify/c/fss_identify.c
level_3/fss_identify/c/main.c
level_3/fss_identify/c/private-identify.c
level_3/fss_payload_read/c/common.c
level_3/fss_payload_read/c/fss_payload_read.c
level_3/fss_payload_read/c/main.c
level_3/fss_payload_read/c/private-read.c
level_3/fss_write/c/basic/fss_write.h
level_3/fss_write/c/basic/main.c
level_3/fss_write/c/basic_list/fss_write.h
level_3/fss_write/c/basic_list/main.c
level_3/fss_write/c/embedded_list/fss_write.h
level_3/fss_write/c/embedded_list/main.c
level_3/fss_write/c/extended/fss_write.h
level_3/fss_write/c/extended/main.c
level_3/fss_write/c/extended_list/fss_write.h
level_3/fss_write/c/extended_list/main.c
level_3/fss_write/c/main/common.c
level_3/fss_write/c/main/common/define.c [new file with mode: 0644]
level_3/fss_write/c/main/common/define.h [new file with mode: 0644]
level_3/fss_write/c/main/common/enumeration.c [new file with mode: 0644]
level_3/fss_write/c/main/common/enumeration.h [new file with mode: 0644]
level_3/fss_write/c/main/fss_write.c
level_3/fss_write/c/main/fss_write.h
level_3/fss_write/c/main/main.c
level_3/fss_write/c/main/print.c
level_3/fss_write/c/main/print/data.c [new file with mode: 0644]
level_3/fss_write/c/main/print/data.h [new file with mode: 0644]
level_3/fss_write/c/main/print/error.c [new file with mode: 0644]
level_3/fss_write/c/main/print/error.h [new file with mode: 0644]
level_3/fss_write/c/main/print/message.c [new file with mode: 0644]
level_3/fss_write/c/main/print/message.h [new file with mode: 0644]
level_3/fss_write/c/payload/fss_write.c
level_3/fss_write/c/payload/main.c
level_3/iki_read/c/main/common.c
level_3/iki_read/c/main/common/define.c [new file with mode: 0644]
level_3/iki_read/c/main/common/define.h [new file with mode: 0644]
level_3/iki_read/c/main/common/enumeration.c [new file with mode: 0644]
level_3/iki_read/c/main/common/enumeration.h [new file with mode: 0644]
level_3/iki_read/c/main/common/type.h
level_3/iki_read/c/main/iki_read.c
level_3/iki_read/c/main/iki_read.h
level_3/iki_read/c/main/main.c
level_3/iki_read/c/main/print.c
level_3/iki_read/c/main/print.h
level_3/iki_read/c/main/print/data.c
level_3/iki_read/c/main/print/data.h
level_3/iki_read/c/main/print/error.c
level_3/iki_read/c/main/print/error.h
level_3/iki_read/c/main/print/message.c [new file with mode: 0644]
level_3/iki_read/c/main/print/message.h [new file with mode: 0644]
level_3/iki_read/c/main/process.c
level_3/iki_read/data/build/settings
level_3/iki_write/c/main/common.c
level_3/iki_write/c/main/common/define.c [new file with mode: 0644]
level_3/iki_write/c/main/common/define.h [new file with mode: 0644]
level_3/iki_write/c/main/common/enumeration.c [new file with mode: 0644]
level_3/iki_write/c/main/common/enumeration.h [new file with mode: 0644]
level_3/iki_write/c/main/common/type.h
level_3/iki_write/c/main/iki_write.c
level_3/iki_write/c/main/iki_write.h
level_3/iki_write/c/main/main.c
level_3/iki_write/c/main/print.c
level_3/iki_write/c/main/print.h
level_3/iki_write/c/main/print/data.c [new file with mode: 0644]
level_3/iki_write/c/main/print/data.h [new file with mode: 0644]
level_3/iki_write/c/main/print/error.c
level_3/iki_write/c/main/print/error.h
level_3/iki_write/c/main/print/message.c [new file with mode: 0644]
level_3/iki_write/c/main/print/message.h [new file with mode: 0644]
level_3/iki_write/c/main/process.c
level_3/iki_write/data/build/settings
level_3/status_code/c/fss/main.c
level_3/status_code/c/fss/print.c
level_3/status_code/c/fss/print.h
level_3/status_code/c/fss/status_code.h
level_3/status_code/c/main/common.c
level_3/status_code/c/main/common.h
level_3/status_code/c/main/common/define.c [new file with mode: 0644]
level_3/status_code/c/main/common/define.h [new file with mode: 0644]
level_3/status_code/c/main/common/enumeration.c [new file with mode: 0644]
level_3/status_code/c/main/common/enumeration.h [new file with mode: 0644]
level_3/status_code/c/main/common/type.h
level_3/status_code/c/main/convert.c
level_3/status_code/c/main/convert.h
level_3/status_code/c/main/main.c
level_3/status_code/c/main/print/data.c
level_3/status_code/c/main/print/data.h
level_3/status_code/c/main/print/error.c
level_3/status_code/c/main/print/error.h
level_3/status_code/c/main/print/message.c [moved from level_3/status_code/c/main/print.c with 54% similarity]
level_3/status_code/c/main/print/message.h [moved from level_3/status_code/c/main/print.h with 59% similarity]
level_3/status_code/c/main/process.c
level_3/status_code/c/main/process.h
level_3/status_code/c/main/status_code.c
level_3/status_code/c/main/status_code.h
level_3/status_code/data/build/settings
level_3/utf8/c/main/bytesequence.c
level_3/utf8/c/main/codepoint.c
level_3/utf8/c/main/common.c
level_3/utf8/c/main/common/define.h
level_3/utf8/c/main/common/enumeration.h
level_3/utf8/c/main/main.c
level_3/utf8/c/main/print/data.h
level_3/utf8/c/main/print/error.c
level_3/utf8/c/main/print/error.h
level_3/utf8/c/main/print/message.c
level_3/utf8/c/main/process.c
level_3/utf8/c/main/utf8.c

index 4e06e902c5a6592b4f2f6dbfd159bac5bfa2a12d..6b4f77503f36f0b0830ee295a80d4bd0c5c0ca3e 100644 (file)
@@ -6,14 +6,20 @@ extern "C" {
 #endif
 
 #ifndef _di_fll_error_print_
-  f_status_t fll_error_print(const fl_print_t print, const f_status_t status, const f_string_t function, const uint8_t flag) {
+  f_status_t fll_error_print(fl_print_t * const print, const f_status_t status, const f_string_t function, const uint8_t flag) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
     return private_fll_error_print(print, status, function, flag);
   }
 #endif // _di_fll_error_print_
 
 #ifndef _di_fll_error_file_print_
-  f_status_t fll_error_file_print(const fl_print_t print, const f_status_t status, const f_string_t function, const uint8_t flag, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) {
+  f_status_t fll_error_file_print(fl_print_t * const print, const f_status_t status, const f_string_t function, const uint8_t flag, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
     f_string_static_t type_name = fll_error_file_type_file_s;
 
@@ -31,508 +37,508 @@ extern "C" {
     }
 
     if (status == F_access_denied) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QAccess denied while trying to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QAccess denied while trying to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%['.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_access_group) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QCurrent user is not allowed to use the given group while trying to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QCurrent user is not allowed to use the given group while trying to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%['.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_access_owner) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QCurrent user is not allowed to use the given owner while trying to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QCurrent user is not allowed to use the given owner while trying to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%['.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_directory) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QInvalid directory while trying to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QInvalid directory while trying to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%['.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_directory_empty_not) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QUnable to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%[', not empty.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QUnable to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%[', not empty.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_error) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QFailed to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%[', already in an error state->%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QFailed to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%[', already in an error state->%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_failure) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QFailed to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QFailed to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%['.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_file_close) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QUnable to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%[', failed to close.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QUnable to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%[', failed to close.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_file_closed) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QUnable to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%[', is closed.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QUnable to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%[', is closed.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_file_descriptor) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QFile descriptor error while trying to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QFile descriptor error while trying to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%['.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_file_descriptor_max) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QMax file descriptors reached while trying to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QMax file descriptors reached while trying to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%['.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_file_descriptor_not) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QInvalid file descriptor while trying to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QInvalid file descriptor while trying to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%['.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_file_empty) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QUnable to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%[', %Q is empty.%]%r", print.to, print.context, type_name, print.context, f_string_eol_s);
+        fl_print_format("%[%QUnable to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%[', %Q is empty.%]%r", print->to, print->context, type_name, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_file_flush) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QUnable to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%[', flush failed.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QUnable to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%[', flush failed.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_file_found) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QUnable to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%[', found.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QUnable to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%[', found.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_file_found_not) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QUnable to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%[', could not find.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QUnable to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%[', could not find.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_file_open) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QUnable to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%[', already open.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QUnable to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%[', already open.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_file_open_max) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QMax open files reached while trying to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QMax open files reached while trying to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%['.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_file_overflow) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QOverflow while trying to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QOverflow while trying to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%['.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_file_purge) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QUnable to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%[', purge failed.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QUnable to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%[', purge failed.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_file_read) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QRead failed while trying to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QRead failed while trying to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%['.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_file_seek) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QSeek failed while trying to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QSeek failed while trying to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%['.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_file_stat) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QStat failed while trying to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QStat failed while trying to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%['.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_file_synchronize) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QSynchronize failed while trying to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QSynchronize failed while trying to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%['.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_file_type_unknown) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QFailed to %Q %Q, the path '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%[' is an unknown file type.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QFailed to %Q %Q, the path '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%[' is an unknown file type.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_file_utf) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QUTF failure while trying to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QUTF failure while trying to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%['.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_file_utf_not) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QInvalid UTF while trying to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QInvalid UTF while trying to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%['.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_file_underflow) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QUnderflow while trying to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QUnderflow while trying to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%['.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_file_write) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QFailed to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%[', write failure.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QFailed to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%[', write failure.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_loop) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QLoop while trying to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QLoop while trying to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%['.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_name) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QInvalid %Q name '%]", print.to, print.context, print.prefix, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QInvalid %Q name '%]", print->to, print->context, print->prefix, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%['.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_number_overflow) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QNumber overflow while trying to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QNumber overflow while trying to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%['.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_number_underflow) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QNumber underflow while trying to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QNumber underflow while trying to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%['.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_parameter) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QInvalid parameter", print.to, print.context, print.prefix);
+        fl_print_format("%[%QInvalid parameter", print->to, print->context, print->prefix);
 
         private_fll_error_print_function(print, function);
 
-        fl_print_format(" for the %Q '%]", print.to, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format(" for the %Q '%]", print->to, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%['.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_prohibited) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QProhibited by system while trying to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QProhibited by system while trying to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%['.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_read_only) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QUnable to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%[', %Q is read only.%]%r", print.to, print.context, type_name, print.context, f_string_eol_s);
+        fl_print_format("%[%QUnable to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%[', %Q is read only.%]%r", print->to, print->context, type_name, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
@@ -541,14 +547,14 @@ extern "C" {
     if (status == F_write_only) {
       private_fll_error_print_unable_to(print, operation, name, type_name, "is write only");
 
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QUnable to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-        fl_print_format("%[', %Q is write only.%]%r", print.to, print.context, type_name, print.context, f_string_eol_s);
+        fl_print_format("%[%QUnable to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+        fl_print_format("%[', %Q is write only.%]%r", print->to, print->context, type_name, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
@@ -556,28 +562,28 @@ extern "C" {
 
     if (type == fll_error_file_type_file_e) {
       if (status == F_file_type_not_directory) {
-        if (print.verbosity != f_console_verbosity_quiet_e) {
-          flockfile(print.to.stream);
+        if (print->verbosity != f_console_verbosity_quiet_e) {
+          flockfile(print->to.stream);
 
-          fl_print_format("%[%QInvalid or missing directory in path while trying to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-          fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-          fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s);
+          fl_print_format("%[%QInvalid or missing directory in path while trying to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+          fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+          fl_print_format("%['.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-          funlockfile(print.to.stream);
+          funlockfile(print->to.stream);
         }
 
         return F_false;
       }
 
       if (status == F_file_type_directory) {
-        if (print.verbosity != f_console_verbosity_quiet_e) {
-          flockfile(print.to.stream);
+        if (print->verbosity != f_console_verbosity_quiet_e) {
+          flockfile(print->to.stream);
 
-          fl_print_format("%[%QFailed to %Q %Q, the path '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-          fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-          fl_print_format("%[' is a directory.%]%r", print.to, print.context, print.context, f_string_eol_s);
+          fl_print_format("%[%QFailed to %Q %Q, the path '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+          fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+          fl_print_format("%[' is a directory.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-          funlockfile(print.to.stream);
+          funlockfile(print->to.stream);
         }
 
         return F_false;
@@ -585,14 +591,14 @@ extern "C" {
     }
     else if (type == fll_error_file_type_directory_e) {
       if (status == F_file_type_regular) {
-        if (print.verbosity != f_console_verbosity_quiet_e) {
-          flockfile(print.to.stream);
+        if (print->verbosity != f_console_verbosity_quiet_e) {
+          flockfile(print->to.stream);
 
-          fl_print_format("%[%QFailed to %Q %Q, the path '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-          fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-          fl_print_format("%[' is a file.%]%r", print.to, print.context, print.context, f_string_eol_s);
+          fl_print_format("%[%QFailed to %Q %Q, the path '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+          fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+          fl_print_format("%[' is a file.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-          funlockfile(print.to.stream);
+          funlockfile(print->to.stream);
         }
 
         return F_false;
@@ -601,28 +607,28 @@ extern "C" {
 
     if (type == fll_error_file_type_file_e || type == fll_error_file_type_directory_e || type == fll_error_file_type_path_e) {
       if (status == F_directory_found_not) {
-        if (print.verbosity != f_console_verbosity_quiet_e) {
-          flockfile(print.to.stream);
+        if (print->verbosity != f_console_verbosity_quiet_e) {
+          flockfile(print->to.stream);
 
-          fl_print_format("%[%QFailed to %Q %Q '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-          fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-          fl_print_format("%[' due to an invalid directory in the path.%]%r", print.to, print.context, print.context, f_string_eol_s);
+          fl_print_format("%[%QFailed to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+          fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+          fl_print_format("%[' due to an invalid directory in the path.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-          funlockfile(print.to.stream);
+          funlockfile(print->to.stream);
         }
 
         return F_false;
       }
 
       if (status == F_file_type_pipe || status == F_file_type_socket) {
-        if (print.verbosity != f_console_verbosity_quiet_e) {
-          flockfile(print.to.stream);
+        if (print->verbosity != f_console_verbosity_quiet_e) {
+          flockfile(print->to.stream);
 
-          fl_print_format("%[%QFailed to %Q %Q, the path '%]", print.to, print.context, print.prefix, operation, type_name, print.context);
-          fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-          fl_print_format("%[' is a %Q.%]%r", print.to, print.context, status == F_file_type_pipe ? fll_error_file_type_pipe_s : fll_error_file_type_socket_s, print.context, f_string_eol_s);
+          fl_print_format("%[%QFailed to %Q %Q, the path '%]", print->to, print->context, print->prefix, operation, type_name, print->context);
+          fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+          fl_print_format("%[' is a %Q.%]%r", print->to, print->context, status == F_file_type_pipe ? fll_error_file_type_pipe_s : fll_error_file_type_socket_s, print->context, f_string_eol_s);
 
-          funlockfile(print.to.stream);
+          funlockfile(print->to.stream);
         }
 
         return F_false;
@@ -634,97 +640,100 @@ extern "C" {
 #endif // _di_fll_error_file_print_
 
 #ifndef _di_fll_error_parameter_integer_print_
-  f_status_t fll_error_parameter_integer_print(const fl_print_t print, const f_status_t status, const f_string_t function, const uint8_t flag, const f_string_static_t parameter, const f_string_static_t argument) {
+  f_status_t fll_error_parameter_integer_print(fl_print_t * const print, const f_status_t status, const f_string_t function, const uint8_t flag, const f_string_static_t parameter, const f_string_static_t argument) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
     if (status == F_data_not) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QThe argument for the parameter '%]", print.to, print.context, print.prefix, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, parameter, print.notable);
-        fl_print_format("%[' must not be an empty string.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QThe argument for the parameter '%]", print->to, print->context, print->prefix, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, parameter, print->notable);
+        fl_print_format("%[' must not be an empty string.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_number) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QThe argument '%]", print.to, print.context, print.prefix, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, argument, print.notable);
-        fl_print_format("%[' is not a valid number for the parameter '%]", print.to, print.context, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, parameter, print.notable);
-        fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QThe argument '%]", print->to, print->context, print->prefix, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, argument, print->notable);
+        fl_print_format("%[' is not a valid number for the parameter '%]", print->to, print->context, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, parameter, print->notable);
+        fl_print_format("%['.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_number_negative) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QThe argument '%]", print.to, print.context, print.prefix, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, argument, print.notable);
-        fl_print_format("%[' is negative, which is not allowed for the parameter '%]", print.to, print.context, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, parameter, print.notable);
-        fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QThe argument '%]", print->to, print->context, print->prefix, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, argument, print->notable);
+        fl_print_format("%[' is negative, which is not allowed for the parameter '%]", print->to, print->context, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, parameter, print->notable);
+        fl_print_format("%['.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_number_overflow) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QThe argument '%]", print.to, print.context, print.prefix, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, argument, print.notable);
-        fl_print_format("%[' is too large for the parameter '%]", print.to, print.context, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, parameter, print.notable);
-        fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QThe argument '%]", print->to, print->context, print->prefix, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, argument, print->notable);
+        fl_print_format("%[' is too large for the parameter '%]", print->to, print->context, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, parameter, print->notable);
+        fl_print_format("%['.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_number_positive) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QThe argument '%]", print.to, print.context, print.prefix, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, argument, print.notable);
-        fl_print_format("%[' is positive, which is not allowed for the parameter '%]", print.to, print.context, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, parameter, print.notable);
-        fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QThe argument '%]", print->to, print->context, print->prefix, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, argument, print->notable);
+        fl_print_format("%[' is positive, which is not allowed for the parameter '%]", print->to, print->context, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, parameter, print->notable);
+        fl_print_format("%['.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_number_underflow) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QThe argument '%]", print.to, print.context, print.prefix, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, argument, print.notable);
-        fl_print_format("%[' is too small for the parameter '%]", print.to, print.context, print.context);
-        fl_print_format("%[%Q%]", print.to, print.notable, parameter, print.notable);
-        fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[%QThe argument '%]", print->to, print->context, print->prefix, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, argument, print->notable);
+        fl_print_format("%[' is too small for the parameter '%]", print->to, print->context, print->context);
+        fl_print_format("%[%Q%]", print->to, print->notable, parameter, print->notable);
+        fl_print_format("%['.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
index 351be7c118d45303d94b562c69ee82f4bdac45f5..08c91946e84c02916cd28df1318a06277b95d674 100644 (file)
@@ -54,7 +54,7 @@ extern "C" {
  *   F_true is returned if the status code is unknown.
  */
 #ifndef _di_fll_error_print_
-  extern f_status_t fll_error_print(const fl_print_t print, const f_status_t status, const f_string_t function, const uint8_t flag);
+  extern f_status_t fll_error_print(fl_print_t * const print, const f_status_t status, const f_string_t function, const uint8_t flag);
 #endif // _di_fll_error_print_
 
 /**
@@ -83,7 +83,7 @@ extern "C" {
  *   F_false is returned on successful print of known errors.
  */
 #ifndef _di_fll_error_file_print_
-  extern f_status_t fll_error_file_print(const fl_print_t print, const f_status_t status, const f_string_t function, const uint8_t flag, const f_string_static_t name, const f_string_static_t operation, const uint8_t type);
+  extern f_status_t fll_error_file_print(fl_print_t * const print, const f_status_t status, const f_string_t function, const uint8_t flag, const f_string_static_t name, const f_string_static_t operation, const uint8_t type);
 #endif // _di_fll_error_file_print_
 
 /**
@@ -110,7 +110,7 @@ extern "C" {
  *   F_false is returned on successful print of known errors.
  */
 #ifndef _di_fll_error_parameter_integer_print_
-  extern f_status_t fll_error_parameter_integer_print(const fl_print_t print, const f_status_t status, const f_string_t function, const uint8_t flag, const f_string_static_t parameter, const f_string_static_t argument);
+  extern f_status_t fll_error_parameter_integer_print(fl_print_t * const print, const f_status_t status, const f_string_t function, const uint8_t flag, const f_string_static_t parameter, const f_string_static_t argument);
 #endif // _di_fll_error_parameter_integer_print_
 
 #ifdef __cplusplus
index 37196ad62316b7b4574659c635ff7576b73c311a..ed3adf606eea38c031387c13aa3e65f8c8a7cfce 100644 (file)
@@ -6,252 +6,252 @@ extern "C" {
 #endif
 
 #if !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_)
-  f_status_t private_fll_error_print(const fl_print_t print, const f_status_t status, const f_string_t function, const uint8_t flag) {
+  f_status_t private_fll_error_print(fl_print_t * const print, const f_status_t status, const f_string_t function, const uint8_t flag) {
 
     if (status == F_access_denied) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QAccess denied", print.to, print.context, print.prefix);
+        fl_print_format("%[%QAccess denied", print->to, print->context, print->prefix);
 
         private_fll_error_print_function(print, function);
 
-        fl_print_format(".%]%r", print.to, print.context, f_string_eol_s);
+        fl_print_format(".%]%r", print->to, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_array_too_large) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QMaximum array length reached", print.to, print.context, print.prefix);
+        fl_print_format("%[%QMaximum array length reached", print->to, print->context, print->prefix);
 
         private_fll_error_print_function(print, function);
 
-        fl_print_format(".%]%r", print.to, print.context, f_string_eol_s);
+        fl_print_format(".%]%r", print->to, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_buffer_too_large) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QMaximum buffer length reached", print.to, print.context, print.prefix);
+        fl_print_format("%[%QMaximum buffer length reached", print->to, print->context, print->prefix);
 
         private_fll_error_print_function(print, function);
 
-        fl_print_format(".%]%r", print.to, print.context, f_string_eol_s);
+        fl_print_format(".%]%r", print->to, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_error) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QAn error has occurred", print.to, print.context, print.prefix);
+        fl_print_format("%[%QAn error has occurred", print->to, print->context, print->prefix);
 
         private_fll_error_print_function(print, function);
 
-        fl_print_format(".%]%r", print.to, print.context, f_string_eol_s);
+        fl_print_format(".%]%r", print->to, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_file_found_not) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QFile not found", print.to, print.context, print.prefix);
+        fl_print_format("%[%QFile not found", print->to, print->context, print->prefix);
 
         private_fll_error_print_function(print, function);
 
-        fl_print_format(".%]%r", print.to, print.context, f_string_eol_s);
+        fl_print_format(".%]%r", print->to, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_memory_not) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QUnable to allocate memory", print.to, print.context, print.prefix);
+        fl_print_format("%[%QUnable to allocate memory", print->to, print->context, print->prefix);
 
         private_fll_error_print_function(print, function);
 
-        fl_print_format(".%]%r", print.to, print.context, f_string_eol_s);
+        fl_print_format(".%]%r", print->to, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_parameter) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QInvalid parameter", print.to, print.context, print.prefix);
+        fl_print_format("%[%QInvalid parameter", print->to, print->context, print->prefix);
 
         private_fll_error_print_function(print, function);
 
-        fl_print_format(".%]%r", print.to, print.context, f_string_eol_s);
+        fl_print_format(".%]%r", print->to, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_string_too_large) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QMaximum string length reached", print.to, print.context, print.prefix);
+        fl_print_format("%[%QMaximum string length reached", print->to, print->context, print->prefix);
 
         private_fll_error_print_function(print, function);
 
-        fl_print_format(".%]%r", print.to, print.context, f_string_eol_s);
+        fl_print_format(".%]%r", print->to, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_utf_not) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QInvalid UTF-8 character found", print.to, print.context, print.prefix);
+        fl_print_format("%[%QInvalid UTF-8 character found", print->to, print->context, print->prefix);
 
         private_fll_error_print_function(print, function);
 
-        fl_print_format(".%]%r", print.to, print.context, f_string_eol_s);
+        fl_print_format(".%]%r", print->to, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_utf_fragment) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QUTF-8 character (fragment) found", print.to, print.context, print.prefix);
+        fl_print_format("%[%QUTF-8 character (fragment) found", print->to, print->context, print->prefix);
 
         private_fll_error_print_function(print, function);
 
-        fl_print_format(".%]%r", print.to, print.context, f_string_eol_s);
+        fl_print_format(".%]%r", print->to, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_complete_not_utf || status == F_complete_not_utf_eos || status == F_complete_not_utf_stop) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QInvalid (incomplete) UTF-8 character found", print.to, print.context, print.prefix);
+        fl_print_format("%[%QInvalid (incomplete) UTF-8 character found", print->to, print->context, print->prefix);
 
         private_fll_error_print_function(print, function);
 
         if (status == F_complete_not_utf_eos) {
-          fl_print_format(" at the end of string.%]%r", print.to, print.context, f_string_eol_s);
+          fl_print_format(" at the end of string.%]%r", print->to, print->context, f_string_eol_s);
         }
         else if (status == F_complete_not_utf_stop) {
-          fl_print_format(" at the stop point of string.%]%r", print.to, print.context, f_string_eol_s);
+          fl_print_format(" at the stop point of string.%]%r", print->to, print->context, f_string_eol_s);
         }
         else {
-          fl_print_format(".%]%r", print.to, print.context, f_string_eol_s);
+          fl_print_format(".%]%r", print->to, print->context, f_string_eol_s);
         }
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_failure) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QFailure", print.to, print.context, print.prefix);
+        fl_print_format("%[%QFailure", print->to, print->context, print->prefix);
 
         private_fll_error_print_function(print, function);
 
-        fl_print_format(".%]%r", print.to, print.context, f_string_eol_s);
+        fl_print_format(".%]%r", print->to, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_signal) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QSignal received", print.to, print.context, print.prefix);
+        fl_print_format("%[%QSignal received", print->to, print->context, print->prefix);
 
         private_fll_error_print_function(print, function);
 
-        fl_print_format(".%]%r", print.to, print.context, f_string_eol_s);
+        fl_print_format(".%]%r", print->to, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
     if (status == F_interrupt) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%QInterrupt signal received", print.to, print.context, print.prefix);
+        fl_print_format("%[%QInterrupt signal received", print->to, print->context, print->prefix);
 
         private_fll_error_print_function(print, function);
 
-        fl_print_format(".%]%r", print.to, print.context, f_string_eol_s);
+        fl_print_format(".%]%r", print->to, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
 
       return F_false;
     }
 
-    if ((flag & fll_error_file_flag_fallback_e) && print.verbosity != f_console_verbosity_quiet_e) {
-      if (print.verbosity != f_console_verbosity_quiet_e) {
-        flockfile(print.to.stream);
+    if ((flag & fll_error_file_flag_fallback_e) && print->verbosity != f_console_verbosity_quiet_e) {
+      if (print->verbosity != f_console_verbosity_quiet_e) {
+        flockfile(print->to.stream);
 
-        fl_print_format("%[%Q(%]", print.to, print.context, print.prefix, print.context);
-        fl_print_format("%[%ui%]%[)", print.to, print.notable, status, print.notable, print.context);
+        fl_print_format("%[%Q(%]", print->to, print->context, print->prefix, print->context);
+        fl_print_format("%[%ui%]%[)", print->to, print->notable, status, print->notable, print->context);
 
         private_fll_error_print_function(print, function);
 
-        fl_print_format(".%]%r", print.to, print.context, f_string_eol_s);
+        fl_print_format(".%]%r", print->to, print->context, f_string_eol_s);
 
-        funlockfile(print.to.stream);
+        funlockfile(print->to.stream);
       }
     }
 
@@ -260,28 +260,28 @@ extern "C" {
 #endif // !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_)
 
 #if !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_)
-  void private_fll_error_print_function(const fl_print_t print, const f_string_t function) {
+  void private_fll_error_print_function(fl_print_t * const print, const f_string_t function) {
 
     if (function) {
-      fl_print_format(" when calling function%] ", print.to, print.context);
-      fl_print_format("%[%S%]", print.to, print.notable, function, print.notable);
-      fl_print_format("%[()", print.to, print.context);
+      fl_print_format(" when calling function%] ", print->to, print->context);
+      fl_print_format("%[%S%]", print->to, print->notable, function, print->notable);
+      fl_print_format("%[()", print->to, print->context);
     }
   }
 #endif // !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_)
 
 #if !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_)
-  void private_fll_error_print_unable_to(const fl_print_t print, const f_string_static_t operation, const f_string_static_t name, const f_string_static_t type, const f_string_t message) {
+  void private_fll_error_print_unable_to(fl_print_t * const print, const f_string_static_t operation, const f_string_static_t name, const f_string_static_t type, const f_string_t message) {
 
-    if (print.verbosity < f_console_verbosity_error_e) return;
+    if (print->verbosity < f_console_verbosity_error_e) return;
 
-    flockfile(print.to.stream);
+    flockfile(print->to.stream);
 
-    fl_print_format("%[%QUnable to %Q %Q '%]", print.to, print.context, print.prefix, operation, type, print.context);
-    fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
-    fl_print_format("%['%S%S.%]%r", print.to, print.context, message ? ", " : "", message ? message : "", print.context, f_string_eol_s);
+    fl_print_format("%[%QUnable to %Q %Q '%]", print->to, print->context, print->prefix, operation, type, print->context);
+    fl_print_format("%[%Q%]", print->to, print->notable, name, print->notable);
+    fl_print_format("%['%S%S.%]%r", print->to, print->context, message ? ", " : "", message ? message : "", print->context, f_string_eol_s);
 
-    funlockfile(print.to.stream);
+    funlockfile(print->to.stream);
   }
 #endif // !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_)
 
index 834494f4c38f5e9342408499b9c6926591efebb3..62bf56dcb69662488971182d9d7c7e28ae8c30f6 100644 (file)
@@ -40,7 +40,7 @@ extern "C" {
  * @see fll_error_file_print()
  */
 #if !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_)
-  extern f_status_t private_fll_error_print(const fl_print_t print, const f_status_t status, const f_string_t function, const uint8_t flag) F_attribute_visibility_internal_d;
+  extern f_status_t private_fll_error_print(fl_print_t * const print, const f_status_t status, const f_string_t function, const uint8_t flag) F_attribute_visibility_internal_d;
 #endif // !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_)
 
 /**
@@ -62,7 +62,7 @@ extern "C" {
  * @see fll_error_file_print()
  */
 #if !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_)
-  extern void private_fll_error_print_function(const fl_print_t print, const f_string_t function) F_attribute_visibility_internal_d;
+  extern void private_fll_error_print_function(fl_print_t * const print, const f_string_t function) F_attribute_visibility_internal_d;
 #endif // !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_)
 
 /**
@@ -90,7 +90,7 @@ extern "C" {
  * @see fll_error_file_print()
  */
 #if !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_)
-  extern void private_fll_error_print_unable_to(const fl_print_t print, const f_string_static_t operation, const f_string_static_t name, const f_string_static_t type_name, const f_string_t message) F_attribute_visibility_internal_d;
+  extern void private_fll_error_print_unable_to(fl_print_t * const print, const f_string_static_t operation, const f_string_static_t name, const f_string_static_t type_name, const f_string_t message) F_attribute_visibility_internal_d;
 #endif // !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_)
 
 #ifdef __cplusplus
index df4e53b428f67cd5e1a90b74d182a4fbf938a3bb..ad9507ff3c7165ba1df6d65cbd0640fff2186340 100644 (file)
@@ -6,25 +6,25 @@ extern "C" {
 #endif
 
 #if !defined(_di_fll_program_print_help_option_) || !defined(_di_fll_program_print_help_option_standard_)
-  f_status_t private_fll_program_print_help_option(const fl_print_t print, const f_string_static_t option_short, const f_string_static_t option_long, const f_string_static_t symbol_short, const f_string_static_t symbol_long, const char *description) {
+  f_status_t private_fll_program_print_help_option(fl_print_t * const print, const f_string_static_t option_short, const f_string_static_t option_long, const f_string_static_t symbol_short, const f_string_static_t symbol_long, const char *description) {
 
-    fl_print_format("%r  %Q%[%Q%]", print.to, f_string_eol_s, symbol_short, print.set->standout, option_short, print.set->standout);
-    fl_print_format(", %Q%[%Q%]  %S", print.to, symbol_long, print.set->standout, option_long, print.set->standout, description);
+    fl_print_format("  %Q%[%Q%]", print->to, symbol_short, print->set->standout, option_short, print->set->standout);
+    fl_print_format(", %Q%[%Q%]  %S%r", print->to, symbol_long, print->set->standout, option_long, print->set->standout, description, f_string_eol_s);
 
     return F_none;
   }
 #endif // !defined(_di_fll_program_print_help_option_) || !defined(_di_fll_program_print_help_option_standard_)
 
 #if !defined(_di_fll_program_standard_signal_received_) || !defined(_di_fll_program_standard_signal_handle_)
-  uint32_t private_fll_program_standard_signal_received(fll_program_data_t * const main) {
+  uint32_t private_fll_program_standard_signal_received(fll_program_data_t * const program) {
 
-    if (!main || main->signal.id == -1) return 0;
+    if (!program || program->signal.id == -1) return 0;
 
     struct signalfd_siginfo information;
 
     memset(&information, 0, sizeof(struct signalfd_siginfo));
 
-    if (f_signal_read(main->signal, 0, &information) == F_signal) {
+    if (f_signal_read(program->signal, 0, &information) == F_signal) {
       switch (information.ssi_signo) {
         case F_signal_abort:
         case F_signal_broken_pipe:
@@ -32,7 +32,7 @@ extern "C" {
         case F_signal_interrupt:
         case F_signal_quit:
         case F_signal_termination:
-          main->signal_received = information.ssi_signo;
+          program->signal_received = information.ssi_signo;
 
           return information.ssi_signo;
       }
index 30269849c874a44946a845df643fe7c1ec26e7ed..0619c3caae6da514b83797ce3b97a61bae478ced 100644 (file)
@@ -43,7 +43,7 @@ extern "C" {
  * @see fll_program_print_help_option_standard()
  */
 #if !defined(_di_fll_program_print_help_option_) || !defined(_di_fll_program_print_help_option_standard_)
-  extern f_status_t private_fll_program_print_help_option(const fl_print_t print, const f_string_static_t option_short, const f_string_static_t option_long, const f_string_static_t symbol_short, const f_string_static_t symbol_long, const char *description) F_attribute_visibility_internal_d;
+  extern f_status_t private_fll_program_print_help_option(fl_print_t * const print, const f_string_static_t option_short, const f_string_static_t option_long, const f_string_static_t symbol_short, const f_string_static_t symbol_long, const char *description) F_attribute_visibility_internal_d;
 #endif // !defined(_di_fll_program_print_help_option_) || !defined(_di_fll_program_print_help_option_standard_)
 
 /**
@@ -51,8 +51,8 @@ extern "C" {
  *
  * Intended to be shared to each of the different implementation variations.
  *
- * @param main
- *   The main program data.
+ * @param program
+ *   The program data.
  *
  * @return
  *   A positive number representing a valid signal on signal received.
@@ -64,7 +64,7 @@ extern "C" {
  * @see fll_program_standard_signal_handle()
  */
 #if !defined(_di_fll_program_standard_signal_received_) || !defined(_di_fll_program_standard_signal_handle_)
-  uint32_t private_fll_program_standard_signal_received(fll_program_data_t * const main) F_attribute_visibility_internal_d;
+  uint32_t private_fll_program_standard_signal_received(fll_program_data_t * const program) F_attribute_visibility_internal_d;
 #endif // !defined(_di_fll_program_standard_signal_received_) || !defined(_di_fll_program_standard_signal_handle_)
 
 /**
index 5ef718ba1626830295e77063887c750f5cac2889..21b522016bc87896402a6c732c3dfdd2482017c7 100644 (file)
@@ -244,9 +244,9 @@ extern "C" {
 #endif // _di_fll_program_parameter_additional_rip_mash_
 
 #ifndef _di_fll_program_standard_set_down_
-  f_status_t fll_program_standard_set_down(fll_program_data_t * const main) {
+  f_status_t fll_program_standard_set_down(fll_program_data_t * const program) {
     #ifndef _di_level_2_parameter_checking_
-      if (!main) return F_status_set_error(F_parameter);
+      if (!program) return F_status_set_error(F_parameter);
     #endif // _di_level_2_parameter_checking_
 
     // The fclose() calls have undefined behavior when closing an already closed file.
@@ -255,76 +255,76 @@ extern "C" {
     // 0x20 = message descriptor, 0x40 = output descriptor, 0x80 = error descriptor, 0x100 = warning descriptor, 0x200 = debug descriptor.
     uint16_t flag = 0;
 
-    if (main->message.to.stream) {
-      if (main->message.to.stream != F_type_error_d && main->message.to.stream != F_type_input_d && main->message.to.stream != F_type_output_d) {
-        f_file_stream_flush(main->message.to);
+    if (program->message.to.stream) {
+      if (program->message.to.stream != F_type_error_d && program->message.to.stream != F_type_input_d && program->message.to.stream != F_type_output_d) {
+        f_file_stream_flush(program->message.to);
 
         flag |= 0x1;
       }
     }
 
-    if (main->message.to.id == -1) {
-      if (main->message.to.id != F_type_descriptor_error_d && main->message.to.id != F_type_descriptor_input_d && main->message.to.id != F_type_descriptor_output_d) {
-        f_file_flush(main->message.to);
+    if (program->message.to.id == -1) {
+      if (program->message.to.id != F_type_descriptor_error_d && program->message.to.id != F_type_descriptor_input_d && program->message.to.id != F_type_descriptor_output_d) {
+        f_file_flush(program->message.to);
 
         flag |= 0x20;
       }
     }
 
-    if (main->output.to.stream) {
-      if (main->output.to.stream != main->message.to.stream) {
-        if (main->output.to.stream != F_type_error_d && main->output.to.stream != F_type_input_d && main->output.to.stream != F_type_output_d) {
-          f_file_stream_flush(main->output.to);
+    if (program->output.to.stream) {
+      if (program->output.to.stream != program->message.to.stream) {
+        if (program->output.to.stream != F_type_error_d && program->output.to.stream != F_type_input_d && program->output.to.stream != F_type_output_d) {
+          f_file_stream_flush(program->output.to);
 
           flag |= 0x2;
         }
       }
     }
 
-    if (main->error.to.id != -1) {
-      if (main->output.to.id != main->message.to.id) {
-        if (main->output.to.id != F_type_descriptor_error_d && main->output.to.id != F_type_descriptor_input_d && main->output.to.id != F_type_descriptor_output_d) {
-          f_file_flush(main->output.to);
+    if (program->error.to.id != -1) {
+      if (program->output.to.id != program->message.to.id) {
+        if (program->output.to.id != F_type_descriptor_error_d && program->output.to.id != F_type_descriptor_input_d && program->output.to.id != F_type_descriptor_output_d) {
+          f_file_flush(program->output.to);
 
           flag |= 0x40;
         }
       }
     }
 
-    if (main->error.to.stream) {
-      if (main->error.to.stream != main->message.to.stream && main->error.to.stream != main->output.to.stream) {
-        if (main->error.to.stream != F_type_error_d && main->error.to.stream != F_type_input_d && main->error.to.stream != F_type_output_d) {
-          f_file_stream_flush(main->error.to);
+    if (program->error.to.stream) {
+      if (program->error.to.stream != program->message.to.stream && program->error.to.stream != program->output.to.stream) {
+        if (program->error.to.stream != F_type_error_d && program->error.to.stream != F_type_input_d && program->error.to.stream != F_type_output_d) {
+          f_file_stream_flush(program->error.to);
 
           flag |= 0x4;
         }
       }
     }
 
-    if (main->error.to.id != -1) {
-      if (main->error.to.id != main->message.to.id && main->error.to.id != main->output.to.id) {
-        if (main->error.to.id != F_type_descriptor_error_d && main->error.to.id != F_type_descriptor_input_d && main->error.to.id != F_type_descriptor_output_d) {
-          f_file_flush(main->error.to);
+    if (program->error.to.id != -1) {
+      if (program->error.to.id != program->message.to.id && program->error.to.id != program->output.to.id) {
+        if (program->error.to.id != F_type_descriptor_error_d && program->error.to.id != F_type_descriptor_input_d && program->error.to.id != F_type_descriptor_output_d) {
+          f_file_flush(program->error.to);
 
           flag |= 0x80;
         }
       }
     }
 
-    if (main->warning.to.stream) {
-      if (main->warning.to.stream != main->message.to.stream && main->warning.to.stream != main->output.to.stream && main->warning.to.stream != main->error.to.stream) {
-        if (main->warning.to.stream != F_type_error_d && main->warning.to.stream != F_type_input_d && main->warning.to.stream != F_type_output_d) {
-          f_file_stream_flush(main->warning.to);
+    if (program->warning.to.stream) {
+      if (program->warning.to.stream != program->message.to.stream && program->warning.to.stream != program->output.to.stream && program->warning.to.stream != program->error.to.stream) {
+        if (program->warning.to.stream != F_type_error_d && program->warning.to.stream != F_type_input_d && program->warning.to.stream != F_type_output_d) {
+          f_file_stream_flush(program->warning.to);
 
           flag |= 0x8;
         }
       }
     }
 
-    if (main->warning.to.id != -1) {
-      if (main->warning.to.id != main->message.to.id && main->warning.to.id != main->output.to.id && main->warning.to.id != main->error.to.id) {
-        if (main->warning.to.id != F_type_descriptor_error_d && main->warning.to.id != F_type_descriptor_input_d && main->warning.to.id != F_type_descriptor_output_d) {
-          f_file_flush(main->warning.to);
+    if (program->warning.to.id != -1) {
+      if (program->warning.to.id != program->message.to.id && program->warning.to.id != program->output.to.id && program->warning.to.id != program->error.to.id) {
+        if (program->warning.to.id != F_type_descriptor_error_d && program->warning.to.id != F_type_descriptor_input_d && program->warning.to.id != F_type_descriptor_output_d) {
+          f_file_flush(program->warning.to);
 
           flag |= 0x100;
         }
@@ -332,20 +332,20 @@ extern "C" {
     }
 
 
-    if (main->debug.to.stream) {
-      if (main->debug.to.stream != main->message.to.stream && main->debug.to.stream != main->output.to.stream && main->debug.to.stream != main->error.to.stream && main->debug.to.stream != main->warning.to.stream) {
-        if (main->debug.to.stream != F_type_error_d && main->debug.to.stream != F_type_input_d && main->debug.to.stream != F_type_output_d) {
-          f_file_stream_flush(main->debug.to);
+    if (program->debug.to.stream) {
+      if (program->debug.to.stream != program->message.to.stream && program->debug.to.stream != program->output.to.stream && program->debug.to.stream != program->error.to.stream && program->debug.to.stream != program->warning.to.stream) {
+        if (program->debug.to.stream != F_type_error_d && program->debug.to.stream != F_type_input_d && program->debug.to.stream != F_type_output_d) {
+          f_file_stream_flush(program->debug.to);
 
           flag |= 0x10;
         }
       }
     }
 
-    if (main->debug.to.id != -1) {
-      if (main->debug.to.id != main->message.to.id && main->debug.to.id != main->output.to.id && main->debug.to.id != main->error.to.id && main->debug.to.id != main->warning.to.id) {
-        if (main->debug.to.id != F_type_descriptor_error_d && main->debug.to.id != F_type_descriptor_input_d && main->debug.to.id != F_type_descriptor_output_d) {
-          f_file_flush(main->debug.to);
+    if (program->debug.to.id != -1) {
+      if (program->debug.to.id != program->message.to.id && program->debug.to.id != program->output.to.id && program->debug.to.id != program->error.to.id && program->debug.to.id != program->warning.to.id) {
+        if (program->debug.to.id != F_type_descriptor_error_d && program->debug.to.id != F_type_descriptor_input_d && program->debug.to.id != F_type_descriptor_output_d) {
+          f_file_flush(program->debug.to);
 
           flag |= 0x200;
         }
@@ -353,43 +353,43 @@ extern "C" {
     }
 
     if (flag & 0x1) {
-      f_file_stream_close(&main->message.to);
+      f_file_stream_close(&program->message.to);
     }
 
     if (flag & 0x2) {
-      f_file_stream_close(&main->output.to);
+      f_file_stream_close(&program->output.to);
     }
 
     if (flag & 0x4) {
-      f_file_stream_close(&main->error.to);
+      f_file_stream_close(&program->error.to);
     }
 
     if (flag & 0x8) {
-      f_file_stream_close(&main->warning.to);
+      f_file_stream_close(&program->warning.to);
     }
 
     if (flag & 0x10) {
-      f_file_stream_close(&main->debug.to);
+      f_file_stream_close(&program->debug.to);
     }
 
     if (flag & 0x20) {
-      f_file_close(&main->message.to);
+      f_file_close(&program->message.to);
     }
 
     if (flag & 0x40) {
-      f_file_close(&main->output.to);
+      f_file_close(&program->output.to);
     }
 
     if (flag & 0x80) {
-      f_file_close(&main->error.to);
+      f_file_close(&program->error.to);
     }
 
     if (flag & 0x100) {
-      f_file_close(&main->warning.to);
+      f_file_close(&program->warning.to);
     }
 
     if (flag & 0x200) {
-      f_file_close(&main->debug.to);
+      f_file_close(&program->debug.to);
     }
 
     // 0x1 = output stream, 0x2 = error stream, 0x4 = input stream.
@@ -479,7 +479,7 @@ extern "C" {
       f_file_close(&file);
     }
 
-    const f_status_t status = f_signal_close(&main->signal);
+    const f_status_t status = f_signal_close(&program->signal);
     if (F_status_is_error(status)) return status;
 
     return F_none;
@@ -487,44 +487,44 @@ extern "C" {
 #endif // _di_fll_program_standard_set_down_
 
 #ifndef _di_fll_program_standard_set_up_
-  f_status_t fll_program_standard_set_up(fll_program_data_t * const main) {
+  f_status_t fll_program_standard_set_up(fll_program_data_t * const program) {
     #ifndef _di_level_2_parameter_checking_
-      if (!main) return F_status_set_error(F_parameter);
+      if (!program) return F_status_set_error(F_parameter);
     #endif // _di_level_2_parameter_checking_
 
-    f_signal_set_empty(&main->signal.set);
-    f_signal_set_add(F_signal_abort, &main->signal.set);
-    f_signal_set_add(F_signal_broken_pipe, &main->signal.set);
-    f_signal_set_add(F_signal_hangup, &main->signal.set);
-    f_signal_set_add(F_signal_interrupt, &main->signal.set);
-    f_signal_set_add(F_signal_quit, &main->signal.set);
-    f_signal_set_add(F_signal_termination, &main->signal.set);
+    f_signal_set_empty(&program->signal.set);
+    f_signal_set_add(F_signal_abort, &program->signal.set);
+    f_signal_set_add(F_signal_broken_pipe, &program->signal.set);
+    f_signal_set_add(F_signal_hangup, &program->signal.set);
+    f_signal_set_add(F_signal_interrupt, &program->signal.set);
+    f_signal_set_add(F_signal_quit, &program->signal.set);
+    f_signal_set_add(F_signal_termination, &program->signal.set);
 
-    f_status_t status = f_signal_mask(SIG_BLOCK, &main->signal.set, 0);
+    f_status_t status = f_signal_mask(SIG_BLOCK, &program->signal.set, 0);
     if (F_status_is_error(status)) return status;
 
-    status = f_signal_open(&main->signal);
+    status = f_signal_open(&program->signal);
 
     // If there is an error opening a signal descriptor, then do not handle signals.
     if (F_status_is_error(status)) {
-      f_signal_mask(SIG_UNBLOCK, &main->signal.set, 0);
-      f_signal_close(&main->signal);
+      f_signal_mask(SIG_UNBLOCK, &program->signal.set, 0);
+      f_signal_close(&program->signal);
 
       return status;
     }
 
     // Unblock all other signals.
-    memset(&main->signal.set, 0, sizeof(sigset_t));
+    memset(&program->signal.set, 0, sizeof(sigset_t));
 
-    f_signal_set_fill(&main->signal.set);
-    f_signal_set_delete(F_signal_abort, &main->signal.set);
-    f_signal_set_delete(F_signal_broken_pipe, &main->signal.set);
-    f_signal_set_delete(F_signal_hangup, &main->signal.set);
-    f_signal_set_delete(F_signal_interrupt, &main->signal.set);
-    f_signal_set_delete(F_signal_quit, &main->signal.set);
-    f_signal_set_delete(F_signal_termination, &main->signal.set);
+    f_signal_set_fill(&program->signal.set);
+    f_signal_set_delete(F_signal_abort, &program->signal.set);
+    f_signal_set_delete(F_signal_broken_pipe, &program->signal.set);
+    f_signal_set_delete(F_signal_hangup, &program->signal.set);
+    f_signal_set_delete(F_signal_interrupt, &program->signal.set);
+    f_signal_set_delete(F_signal_quit, &program->signal.set);
+    f_signal_set_delete(F_signal_termination, &program->signal.set);
 
-    status = f_signal_mask(SIG_UNBLOCK, &main->signal.set, 0);
+    status = f_signal_mask(SIG_UNBLOCK, &program->signal.set, 0);
     if (F_status_is_error(status)) return status;
 
     return F_none;
@@ -532,12 +532,12 @@ extern "C" {
 #endif // _di_fll_program_standard_set_up_
 
 #ifndef _di_fll_program_standard_signal_received_
-  uint32_t fll_program_standard_signal_received(fll_program_data_t * const main) {
+  uint32_t fll_program_standard_signal_received(fll_program_data_t * const program) {
     #ifndef _di_level_2_parameter_checking_
-      if (!main) return 0;
+      if (!program) return 0;
     #endif // _di_level_2_parameter_checking_
 
-    return private_fll_program_standard_signal_received(main);
+    return private_fll_program_standard_signal_received(program);
   }
 #endif // _di_fll_program_standard_signal_received_
 
@@ -555,11 +555,11 @@ extern "C" {
       return;
     }
 
-    fll_program_data_t * const data = (fll_program_data_t *) state->custom;
+    fll_program_data_t * const program = (fll_program_data_t *) state->custom;
 
-    data->signal_received = private_fll_program_standard_signal_received(data);
+    program->signal_received = private_fll_program_standard_signal_received(program);
 
-    if (data->signal_received == F_signal_abort || data->signal_received == F_signal_broken_pipe || data->signal_received == F_signal_hangup || data->signal_received == F_signal_interrupt || data->signal_received == F_signal_quit || data->signal_received == F_signal_termination) {
+    if (program->signal_received == F_signal_abort || program->signal_received == F_signal_broken_pipe || program->signal_received == F_signal_hangup || program->signal_received == F_signal_interrupt || program->signal_received == F_signal_quit || program->signal_received == F_signal_termination) {
       state->status = F_status_set_error(F_interrupt);
     }
     else {
index 38f6f9bdf84a0f999252183a18043596cae7eb59..34973dcc1ecb2fd05808e0365c973e25ecbd1de3 100644 (file)
@@ -257,8 +257,8 @@ extern "C" {
  *   - Closes standard inputs and outputs.
  *   - Closes the signal handler.
  *
- * @param main
- *   The main program data.
+ * @param program
+ *   The program data.
  *
  * @return
  *   F_none on success.
@@ -274,7 +274,7 @@ extern "C" {
  * @see f_signal_close()
  */
 #ifndef _di_fll_program_standard_set_down_
-  extern f_status_t fll_program_standard_set_down(fll_program_data_t * const main);
+  extern f_status_t fll_program_standard_set_down(fll_program_data_t * const program);
 #endif // _di_fll_program_standard_set_down_
 
 /**
@@ -283,8 +283,8 @@ extern "C" {
  * This does the following:
  *   - Handle signals so that program can cleanly exit, de-allocating as appropriate.
  *
- * @param main
- *   The main program data.
+ * @param program
+ *   The program data.
  *
  * @return
  *   F_none on success.
@@ -302,7 +302,7 @@ extern "C" {
  * @see f_signal_set_fill()
  */
 #ifndef _di_fll_program_standard_set_up_
-  extern f_status_t fll_program_standard_set_up(fll_program_data_t * const main);
+  extern f_status_t fll_program_standard_set_up(fll_program_data_t * const program);
 #endif // _di_fll_program_standard_set_up_
 
 /**
@@ -312,9 +312,9 @@ extern "C" {
  *
  * If no signals are blocked, then this always returns F_false.
  *
- * @param main
- *   The main program data.
- *   The main->signal must be used to designate blocked signals.
+ * @param program
+ *   The program data.
+ *   The program.signal must be used to designate blocked signals.
  *
  * @return
  *   A positive number representing a valid signal on signal received.
@@ -323,7 +323,7 @@ extern "C" {
  * @see f_signal_read()
  */
 #ifndef _di_fll_program_standard_signal_received_
-  extern uint32_t fll_program_standard_signal_received(fll_program_data_t * const main);
+  extern uint32_t fll_program_standard_signal_received(fll_program_data_t * const program);
 #endif // _di_fll_program_standard_signal_received_
 
 /**
index 53e3cb7dbfacbbe901cec1eb709bfc1eb41f1d8a..6cbfa5812bcf47a6a4bbc0dcaaf1e280eaf2b5c8 100644 (file)
@@ -6,446 +6,519 @@ extern "C" {
 #endif
 
 #ifndef _di_fll_program_print_copyright_
-  f_status_t fll_program_print_copyright(const fl_print_t print) {
+  f_status_t fll_program_print_copyright(fl_print_t * const print) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
-    f_file_stream_lock(print.to);
+    f_file_stream_lock(print->to);
 
-    fl_print_format("%rCopyright © 2007-2023 Kevin Day.%r", print.to, f_string_eol_s, f_string_eol_s);
+    fl_print_format("Copyright © 2007-2023 Kevin Day.%r", print->to, f_string_eol_s);
 
     #ifndef _di_detailed_copyright_
-      if (print.verbosity > f_console_verbosity_quiet_e) {
-        if (print.verbosity > f_console_verbosity_normal_e) {
-          fl_print_format("%rThis program comes with ABSOLUTELY NO WARRANTY.%r", print.to, f_string_eol_s, f_string_eol_s);
-          fl_print_format("This is free software, and you are welcome to modify or redistribute in accordance to the license.%r", print.to, f_string_eol_s);
+      if (print->verbosity > f_console_verbosity_quiet_e) {
+        if (print->verbosity > f_console_verbosity_normal_e) {
+          fl_print_format("%rThis program comes with ABSOLUTELY NO WARRANTY.%r", print->to, f_string_eol_s, f_string_eol_s);
+          fl_print_format("This is free software, and you are welcome to modify or redistribute in accordance to the license.%r", print->to, f_string_eol_s);
         }
 
-        fl_print_format("%rSource code license lgpl-2.1-or-later.%r", print.to, f_string_eol_s, f_string_eol_s);
-        fl_print_format("Standard and specification license open-standard-license-1.0.%r", print.to, f_string_eol_s);
-        fl_print_format("Documentation license cc-by-sa-4.0.%r", print.to, f_string_eol_s);
+        fl_print_format("%rSource code license lgpl-2.1-or-later.%r", print->to, f_string_eol_s, f_string_eol_s);
+        fl_print_format("Standard and specification license open-standard-license-1.0.%r", print->to, f_string_eol_s);
+        fl_print_format("Documentation license cc-by-sa-4.0.%r", print->to, f_string_eol_s);
       }
     #endif // _di_detailed_copyright_
 
-    fl_print_format("%r", print.to, f_string_eol_s);
-
-    f_file_stream_unlock(print.to);
+    f_file_stream_unlock(print->to);
 
     return F_none;
   }
 #endif // _di_fll_program_print_copyright_
 
 #ifndef _di_fll_program_print_error_missing_file_
-  f_status_t fll_program_print_error_missing_file(const fl_print_t print) {
+  f_status_t fll_program_print_error_missing_file(fl_print_t * const print) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
-    if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+    if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
 
-    f_file_stream_lock(print.to);
+    f_file_stream_lock(print->to);
 
-    fl_print_format("%r%[%QNo files are specified.%]%r", print.to, f_string_eol_s, print.set->error, print.prefix, print.set->error, f_string_eol_s);
+    fl_print_format("%[%QNo files are specified.%]%r", print->to, print->set->error, print->prefix, print->set->error, f_string_eol_s);
 
-    f_file_stream_unlock(print.to);
+    f_file_stream_unlock(print->to);
 
     return F_none;
   }
 #endif // _di_fll_program_print_error_missing_file_
 
 #ifndef _di_fll_program_print_error_missing_variable_not_zero_
-  f_status_t fll_program_print_error_missing_variable_not_zero(const fl_print_t print, const f_string_static_t variable) {
+  f_status_t fll_program_print_error_missing_variable_not_zero(fl_print_t * const print, const f_string_static_t variable) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
-    if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+    if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
 
-    f_file_stream_lock(print.to);
+    f_file_stream_lock(print->to);
 
-    fl_print_format("%r%[%QThe%] ", print.to, f_string_eol_s, print.set->error, print.prefix, print.set->error);
-    fl_print_format("%[%Q%]", print.to, print.set->notable, variable, print.set->notable);
-    fl_print_format("%[ is missing or has a length of%] ", print.to, print.set->error, print.set->error);
-    fl_print_format("%[0%]", print.to, print.set->notable, print.set->notable);
-    fl_print_format("%[.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
+    fl_print_format("%[%QThe%] ", print->to, print->set->error, print->prefix, print->set->error);
+    fl_print_format("%[%Q%]", print->to, print->set->notable, variable, print->set->notable);
+    fl_print_format("%[ is missing or has a length of%] ", print->to, print->set->error, print->set->error);
+    fl_print_format("%[0%]", print->to, print->set->notable, print->set->notable);
+    fl_print_format("%[.%]%r", print->to, print->set->error, print->set->error, f_string_eol_s);
 
-    f_file_stream_unlock(print.to);
+    f_file_stream_unlock(print->to);
 
     return F_none;
   }
 #endif // _di_fll_program_print_error_missing_variable_not_zero_
 
 #ifndef _di_fll_program_print_error_parameter_both_specified_same_amount_
-  f_status_t fll_program_print_error_parameter_both_specified_same_amount(const fl_print_t print, const f_string_static_t symbol_1, const f_string_static_t symbol_2, const f_string_static_t name_1, const f_string_static_t name_2) {
+  f_status_t fll_program_print_error_parameter_both_specified_same_amount(fl_print_t * const print, const f_string_static_t symbol_1, const f_string_static_t symbol_2, const f_string_static_t name_1, const f_string_static_t name_2) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
-    if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+    if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
 
-    f_file_stream_lock(print.to);
+    f_file_stream_lock(print->to);
 
-    fl_print_format("%r%[%QThe '%]", print.to, f_string_eol_s, print.set->error, print.prefix, print.set->error);
-    fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_1, name_1, print.set->notable);
-    fl_print_format("%[' parameter and the '%]", print.to, print.set->error, print.set->error);
-    fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_2, name_2, print.set->notable);
-    fl_print_format("%[' parameter must be specified the same number of times.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
+    fl_print_format("%[%QThe '%]", print->to, print->set->error, print->prefix, print->set->error);
+    fl_print_format("%[%Q%Q%]", print->to, print->set->notable, symbol_1, name_1, print->set->notable);
+    fl_print_format("%[' parameter and the '%]", print->to, print->set->error, print->set->error);
+    fl_print_format("%[%Q%Q%]", print->to, print->set->notable, symbol_2, name_2, print->set->notable);
+    fl_print_format("%[' parameter must be specified the same number of times.%]%r", print->to, print->set->error, print->set->error, f_string_eol_s);
 
-    f_file_stream_unlock(print.to);
+    f_file_stream_unlock(print->to);
 
     return F_none;
   }
 #endif // _di_fll_program_print_error_parameter_both_specified_same_amount_
 
 #ifndef _di_fll_program_print_error_parameter_both_specified_same_amount_without_
-  f_status_t fll_program_print_error_parameter_both_specified_same_amount_without(const fl_print_t print, const f_string_static_t symbol_1, const f_string_static_t symbol_2, const f_string_static_t symbol_3, const f_string_static_t name_1, const f_string_static_t name_2, const f_string_static_t name_3) {
+  f_status_t fll_program_print_error_parameter_both_specified_same_amount_without(fl_print_t * const print, const f_string_static_t symbol_1, const f_string_static_t symbol_2, const f_string_static_t symbol_3, const f_string_static_t name_1, const f_string_static_t name_2, const f_string_static_t name_3) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
-    if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+    if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
 
-    f_file_stream_lock(print.to);
+    f_file_stream_lock(print->to);
 
-    fl_print_format("%r%[%QThe '%]", print.to, f_string_eol_s, print.set->error, print.prefix, print.set->error);
-    fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_1, name_1, print.set->notable);
-    fl_print_format("%[' parameter and the '%]", print.to, print.set->error, print.set->error);
-    fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_2, name_2, print.set->notable);
-    fl_print_format("%[' parameter must be specified the same number of times when not specifying the '%]", print.to, print.set->error, print.set->error);
-    fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_3, name_3, print.set->notable);
-    fl_print_format("%[' parameter.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
+    fl_print_format("%[%QThe '%]", print->to, print->set->error, print->prefix, print->set->error);
+    fl_print_format("%[%Q%Q%]", print->to, print->set->notable, symbol_1, name_1, print->set->notable);
+    fl_print_format("%[' parameter and the '%]", print->to, print->set->error, print->set->error);
+    fl_print_format("%[%Q%Q%]", print->to, print->set->notable, symbol_2, name_2, print->set->notable);
+    fl_print_format("%[' parameter must be specified the same number of times when not specifying the '%]", print->to, print->set->error, print->set->error);
+    fl_print_format("%[%Q%Q%]", print->to, print->set->notable, symbol_3, name_3, print->set->notable);
+    fl_print_format("%[' parameter.%]%r", print->to, print->set->error, print->set->error, f_string_eol_s);
 
-    f_file_stream_unlock(print.to);
+    f_file_stream_unlock(print->to);
 
     return F_none;
   }
 #endif // _di_fll_program_print_error_parameter_both_specified_same_amount_without_
 
 #ifndef _di_fll_program_print_error_parameter_cannot_use_with_
-  f_status_t fll_program_print_error_parameter_cannot_use_with(const fl_print_t print, const f_string_static_t symbol_1, const f_string_static_t symbol_2, const f_string_static_t name_1, const f_string_static_t name_2) {
+  f_status_t fll_program_print_error_parameter_cannot_use_with(fl_print_t * const print, const f_string_static_t symbol_1, const f_string_static_t symbol_2, const f_string_static_t name_1, const f_string_static_t name_2) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
-    if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+    if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
 
-    f_file_stream_lock(print.to);
+    f_file_stream_lock(print->to);
 
-    fl_print_format("%r%[%QCannot specify the '%]", print.to, f_string_eol_s, print.set->error, print.prefix, print.set->error);
-    fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_1, name_1, print.set->notable);
-    fl_print_format("%[' parameter with the '%]", print.to, print.set->error, print.set->error);
-    fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_2, name_2, print.set->notable);
-    fl_print_format("%[' parameter.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
+    fl_print_format("%[%QCannot specify the '%]", print->to, print->set->error, print->prefix, print->set->error);
+    fl_print_format("%[%Q%Q%]", print->to, print->set->notable, symbol_1, name_1, print->set->notable);
+    fl_print_format("%[' parameter with the '%]", print->to, print->set->error, print->set->error);
+    fl_print_format("%[%Q%Q%]", print->to, print->set->notable, symbol_2, name_2, print->set->notable);
+    fl_print_format("%[' parameter.%]%r", print->to, print->set->error, print->set->error, f_string_eol_s);
 
-    f_file_stream_unlock(print.to);
+    f_file_stream_unlock(print->to);
 
     return F_none;
   }
 #endif // _di_fll_program_print_error_parameter_cannot_use_with_
 
 #ifndef _di_fll_program_print_error_parameter_cannot_use_with_without_
-  f_status_t fll_program_print_error_parameter_cannot_use_with_without(const fl_print_t print, const f_string_static_t symbol_1, const f_string_static_t symbol_2, const f_string_static_t symbol_3, const f_string_static_t name_1, const f_string_static_t name_2, const f_string_static_t name_3) {
+  f_status_t fll_program_print_error_parameter_cannot_use_with_without(fl_print_t * const print, const f_string_static_t symbol_1, const f_string_static_t symbol_2, const f_string_static_t symbol_3, const f_string_static_t name_1, const f_string_static_t name_2, const f_string_static_t name_3) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
-    if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+    if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
 
-    f_file_stream_lock(print.to);
+    f_file_stream_lock(print->to);
 
-    fl_print_format("%r%[%QCannot specify the '%]", print.to, f_string_eol_s, print.set->error, print.prefix, print.set->error);
-    fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_1, name_1, print.set->notable);
-    fl_print_format("%[' parameter with the '%]", print.to, print.set->error, print.set->error);
-    fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_2, name_2, print.set->notable);
-    fl_print_format("%[' parameter without the '%]", print.to, print.set->error, print.set->error);
-    fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_3, name_3, print.set->notable);
-    fl_print_format("%[' parameter.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
+    fl_print_format("%[%QCannot specify the '%]", print->to, print->set->error, print->prefix, print->set->error);
+    fl_print_format("%[%Q%Q%]", print->to, print->set->notable, symbol_1, name_1, print->set->notable);
+    fl_print_format("%[' parameter with the '%]", print->to, print->set->error, print->set->error);
+    fl_print_format("%[%Q%Q%]", print->to, print->set->notable, symbol_2, name_2, print->set->notable);
+    fl_print_format("%[' parameter without the '%]", print->to, print->set->error, print->set->error);
+    fl_print_format("%[%Q%Q%]", print->to, print->set->notable, symbol_3, name_3, print->set->notable);
+    fl_print_format("%[' parameter.%]%r", print->to, print->set->error, print->set->error, f_string_eol_s);
 
-    f_file_stream_unlock(print.to);
+    f_file_stream_unlock(print->to);
 
     return F_none;
   }
 #endif // _di_fll_program_print_error_parameter_cannot_use_with_without_
 
 #ifndef _di_fll_program_print_error_parameter_cannot_use_with_pipe_
-  f_status_t fll_program_print_error_parameter_cannot_use_with_pipe(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t parameter) {
+  f_status_t fll_program_print_error_parameter_cannot_use_with_pipe(fl_print_t * const print, const f_string_static_t symbol, const f_string_static_t parameter) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
-    if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+    if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
 
-    f_file_stream_lock(print.to);
+    f_file_stream_lock(print->to);
 
-    fl_print_format("%r%[%QCannot specify the '%]", print.to, f_string_eol_s, print.set->error, print.prefix, print.set->error);
-    fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol, parameter, print.set->notable);
-    fl_print_format("%[' when processing a pipe.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
+    fl_print_format("%[%QCannot specify the '%]", print->to, print->set->error, print->prefix, print->set->error);
+    fl_print_format("%[%Q%Q%]", print->to, print->set->notable, symbol, parameter, print->set->notable);
+    fl_print_format("%[' when processing a pipe.%]%r", print->to, print->set->error, print->set->error, f_string_eol_s);
 
-    f_file_stream_unlock(print.to);
+    f_file_stream_unlock(print->to);
 
     return F_none;
   }
 #endif // _di_fll_program_print_error_parameter_cannot_use_with_pipe_
 
 #ifndef _di_fll_program_print_error_parameter_cannot_use_with_xor_
-  f_status_t fll_program_print_error_parameter_cannot_use_with_xor(const fl_print_t print, const f_string_static_t symbol_1, const f_string_static_t symbol_2, const f_string_static_t symbol_3, const f_string_static_t name_1, const f_string_static_t name_2, const f_string_static_t name_3) {
+  f_status_t fll_program_print_error_parameter_cannot_use_with_xor(fl_print_t * const print, const f_string_static_t symbol_1, const f_string_static_t symbol_2, const f_string_static_t symbol_3, const f_string_static_t name_1, const f_string_static_t name_2, const f_string_static_t name_3) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
-    if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+    if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
 
-    f_file_stream_lock(print.to);
+    f_file_stream_lock(print->to);
 
-    fl_print_format("%r%[%QThe '%]", print.to, f_string_eol_s, print.set->error, print.prefix, print.set->error);
-    fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_1, name_1, print.set->notable);
-    fl_print_format("%[' parameter only allows either the '%]", print.to, print.set->error, print.set->error);
-    fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_2, name_2, print.set->notable);
-    fl_print_format("%[' parameter or the '%]", print.to, print.set->error, print.set->error);
-    fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_3, name_3, print.set->notable);
-    fl_print_format("%[' parameter, but not both.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
+    fl_print_format("%[%QThe '%]", print->to, print->set->error, print->prefix, print->set->error);
+    fl_print_format("%[%Q%Q%]", print->to, print->set->notable, symbol_1, name_1, print->set->notable);
+    fl_print_format("%[' parameter only allows either the '%]", print->to, print->set->error, print->set->error);
+    fl_print_format("%[%Q%Q%]", print->to, print->set->notable, symbol_2, name_2, print->set->notable);
+    fl_print_format("%[' parameter or the '%]", print->to, print->set->error, print->set->error);
+    fl_print_format("%[%Q%Q%]", print->to, print->set->notable, symbol_3, name_3, print->set->notable);
+    fl_print_format("%[' parameter, but not both.%]%r", print->to, print->set->error, print->set->error, f_string_eol_s);
 
-    f_file_stream_unlock(print.to);
+    f_file_stream_unlock(print->to);
 
     return F_none;
   }
 #endif // _di_fll_program_print_error_parameter_cannot_use_with_xor_
 
 #ifndef _di_fll_program_print_error_parameter_integer_not_
-  f_status_t fll_program_print_error_parameter_integer_not(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t value) {
+  f_status_t fll_program_print_error_parameter_integer_not(fl_print_t * const print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t value) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
-    if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+    if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
 
-    f_file_stream_lock(print.to);
+    f_file_stream_lock(print->to);
 
-    fl_print_format("%r%[%QThe value '%]", print.to, f_string_eol_s, print.set->error, print.prefix, print.set->error);
-    fl_print_format("%[%Q%]", print.to, print.set->notable, value, print.set->notable);
-    fl_print_format("%[' for the parameter '%]", print.to, print.set->error, print.set->error);
-    fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol, name, print.set->notable);
-    fl_print_format("%[' is not a valid integer.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
+    fl_print_format("%[%QThe value '%]", print->to, print->set->error, print->prefix, print->set->error);
+    fl_print_format("%[%Q%]", print->to, print->set->notable, value, print->set->notable);
+    fl_print_format("%[' for the parameter '%]", print->to, print->set->error, print->set->error);
+    fl_print_format("%[%Q%Q%]", print->to, print->set->notable, symbol, name, print->set->notable);
+    fl_print_format("%[' is not a valid integer.%]%r", print->to, print->set->error, print->set->error, f_string_eol_s);
 
-    f_file_stream_unlock(print.to);
+    f_file_stream_unlock(print->to);
 
     return F_none;
   }
 #endif // _di_fll_program_print_error_parameter_integer_not_
 
 #ifndef _di_fll_program_print_error_parameter_integer_not_negative_
-  f_status_t fll_program_print_error_parameter_integer_not_negative(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t value) {
+  f_status_t fll_program_print_error_parameter_integer_not_negative(fl_print_t * const print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t value) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
-    if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+    if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
 
-    f_file_stream_lock(print.to);
+    f_file_stream_lock(print->to);
 
-    fl_print_format("%r%[%QThe value '%]", print.to, f_string_eol_s, print.set->error, print.prefix, print.set->error);
-    fl_print_format("%[%Q%]", print.to, print.set->notable, value, print.set->notable);
-    fl_print_format("%[' for the parameter '%]", print.to, print.set->error, print.set->error);
-    fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol, name, print.set->notable);
-    fl_print_format("%[' is not a valid negative integer.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
+    fl_print_format("%[%QThe value '%]", print->to, print->set->error, print->prefix, print->set->error);
+    fl_print_format("%[%Q%]", print->to, print->set->notable, value, print->set->notable);
+    fl_print_format("%[' for the parameter '%]", print->to, print->set->error, print->set->error);
+    fl_print_format("%[%Q%Q%]", print->to, print->set->notable, symbol, name, print->set->notable);
+    fl_print_format("%[' is not a valid negative integer.%]%r", print->to, print->set->error, print->set->error, f_string_eol_s);
 
-    f_file_stream_unlock(print.to);
+    f_file_stream_unlock(print->to);
 
     return F_none;
   }
 #endif // _di_fll_program_print_error_parameter_integer_not_negative_
 
 #ifndef _di_fll_program_print_error_parameter_integer_not_positive_
-  f_status_t fll_program_print_error_parameter_integer_not_positive(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t value) {
+  f_status_t fll_program_print_error_parameter_integer_not_positive(fl_print_t * const print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t value) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
-    if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+    if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
 
-    f_file_stream_lock(print.to);
+    f_file_stream_lock(print->to);
 
-    fl_print_format("%r%[%QThe value '%]", print.to, f_string_eol_s, print.set->error, print.prefix, print.set->error);
-    fl_print_format("%[%Q%]", print.to, print.set->notable, value, print.set->notable);
-    fl_print_format("%[' for the parameter '%]", print.to, print.set->error, print.set->error);
-    fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol, name, print.set->notable);
-    fl_print_format("%[' is not a valid positive integer.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
+    fl_print_format("%[%QThe value '%]", print->to, print->set->error, print->prefix, print->set->error);
+    fl_print_format("%[%Q%]", print->to, print->set->notable, value, print->set->notable);
+    fl_print_format("%[' for the parameter '%]", print->to, print->set->error, print->set->error);
+    fl_print_format("%[%Q%Q%]", print->to, print->set->notable, symbol, name, print->set->notable);
+    fl_print_format("%[' is not a valid positive integer.%]%r", print->to, print->set->error, print->set->error, f_string_eol_s);
 
-    f_file_stream_unlock(print.to);
+    f_file_stream_unlock(print->to);
 
     return F_none;
   }
 #endif // _di_fll_program_print_error_parameter_integer_not_positive_
 
 #ifndef _di_fll_program_print_error_parameter_missing_value_
-  f_status_t fll_program_print_error_parameter_missing_value(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name) {
+  f_status_t fll_program_print_error_parameter_missing_value(fl_print_t * const print, const f_string_static_t symbol, const f_string_static_t name) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
-    if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+    if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
 
-    f_file_stream_lock(print.to);
+    f_file_stream_lock(print->to);
 
-    fl_print_format("%r%[%QThe parameter%] ", print.to, f_string_eol_s, print.set->error, print.prefix, print.set->error);
-    fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol, name, print.set->notable);
-    fl_print_format(" %[is specified, but no value is given.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
+    fl_print_format("%[%QThe parameter%] ", print->to, print->set->error, print->prefix, print->set->error);
+    fl_print_format("%[%Q%Q%]", print->to, print->set->notable, symbol, name, print->set->notable);
+    fl_print_format(" %[is specified, but no value is given.%]%r", print->to, print->set->error, print->set->error, f_string_eol_s);
 
-    f_file_stream_unlock(print.to);
+    f_file_stream_unlock(print->to);
 
     return F_none;
   }
 #endif // _di_fll_program_print_error_parameter_missing_value_
 
 #ifndef _di_fll_program_print_error_parameter_missing_value_requires_amount_
-  f_status_t fll_program_print_error_parameter_missing_value_requires_amount(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t amount) {
+  f_status_t fll_program_print_error_parameter_missing_value_requires_amount(fl_print_t * const print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t amount) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
-    if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+    if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
 
-    f_file_stream_lock(print.to);
+    f_file_stream_lock(print->to);
 
-    fl_print_format("%r%[%QThe parameter%] ", print.to, f_string_eol_s, print.set->error, print.prefix, print.set->error);
-    fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol, name, print.set->notable);
-    fl_print_format("%[ is specified, but%] ", print.to, print.set->error, print.set->error);
-    fl_print_format("%[%Q%]", print.to, print.set->notable, amount, print.set->notable);
-    fl_print_format(" %[values are not given.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
+    fl_print_format("%[%QThe parameter%] ", print->to, print->set->error, print->prefix, print->set->error);
+    fl_print_format("%[%Q%Q%]", print->to, print->set->notable, symbol, name, print->set->notable);
+    fl_print_format("%[ is specified, but%] ", print->to, print->set->error, print->set->error);
+    fl_print_format("%[%Q%]", print->to, print->set->notable, amount, print->set->notable);
+    fl_print_format(" %[values are not given.%]%r", print->to, print->set->error, print->set->error, f_string_eol_s);
 
-    f_file_stream_unlock(print.to);
+    f_file_stream_unlock(print->to);
 
     return F_none;
   }
 #endif // _di_fll_program_print_error_parameter_missing_value_requires_amount_
 
 #ifndef _di_fll_program_print_error_parameter_must_specify_once_
-  f_status_t fll_program_print_error_parameter_must_specify_once(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name) {
+  f_status_t fll_program_print_error_parameter_must_specify_once(fl_print_t * const print, const f_string_static_t symbol, const f_string_static_t name) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
-    if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+    if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
 
-    f_file_stream_lock(print.to);
+    f_file_stream_lock(print->to);
 
-    fl_print_format("%r%[%QThe parameter '%]", print.to, f_string_eol_s, print.set->error, print.prefix, print.set->error);
-    fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol, name, print.set->notable);
-    fl_print_format("%[' may only be specified once.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
+    fl_print_format("%[%QThe parameter '%]", print->to, print->set->error, print->prefix, print->set->error);
+    fl_print_format("%[%Q%Q%]", print->to, print->set->notable, symbol, name, print->set->notable);
+    fl_print_format("%[' may only be specified once.%]%r", print->to, print->set->error, print->set->error, f_string_eol_s);
 
-    f_file_stream_unlock(print.to);
+    f_file_stream_unlock(print->to);
 
     return F_none;
   }
 #endif // _di_fll_program_print_error_parameter_must_specify_once_
 
 #ifndef _di_fll_program_print_error_parameter_must_specify_once_value_
-  f_status_t fll_program_print_error_parameter_must_specify_once_value(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t value) {
+  f_status_t fll_program_print_error_parameter_must_specify_once_value(fl_print_t * const print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t value) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
-    if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+    if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
 
-    f_file_stream_lock(print.to);
+    f_file_stream_lock(print->to);
 
-    fl_print_format("%r%[%QThe value '%]", print.to, f_string_eol_s, print.set->error, print.prefix, print.set->error);
-    fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol, value, print.set->notable);
-    fl_print_format("%[' may only be specified once for the parameter '%]", print.to, print.set->error, print.set->error);
-    fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol, name, print.set->notable);
-    fl_print_format("%['.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
+    fl_print_format("%%[%QThe value '%]", print->to, print->set->error, print->prefix, print->set->error);
+    fl_print_format("%[%Q%Q%]", print->to, print->set->notable, symbol, value, print->set->notable);
+    fl_print_format("%[' may only be specified once for the parameter '%]", print->to, print->set->error, print->set->error);
+    fl_print_format("%[%Q%Q%]", print->to, print->set->notable, symbol, name, print->set->notable);
+    fl_print_format("%['.%]%r", print->to, print->set->error, print->set->error, f_string_eol_s);
 
-    f_file_stream_unlock(print.to);
+    f_file_stream_unlock(print->to);
 
     return F_none;
   }
 #endif // _di_fll_program_print_error_parameter_must_specify_once_value_
 
 #ifndef _di_fll_program_print_error_parameter_process_
-  f_status_t fll_program_print_error_parameter_process(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name) {
+  f_status_t fll_program_print_error_parameter_process(fl_print_t * const print, const f_string_static_t symbol, const f_string_static_t name) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
-    if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+    if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
 
-    f_file_stream_lock(print.to);
+    f_file_stream_lock(print->to);
 
-    fl_print_format("%r%[%QFailure while processing the parameter '%]", print.to, f_string_eol_s, print.set->error, print.prefix, print.set->error);
-    fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol, name, print.set->notable);
-    fl_print_format("%['.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
+    fl_print_format("%[%QFailure while processing the parameter '%]", print->to, print->set->error, print->prefix, print->set->error);
+    fl_print_format("%[%Q%Q%]", print->to, print->set->notable, symbol, name, print->set->notable);
+    fl_print_format("%['.%]%r", print->to, print->set->error, print->set->error, f_string_eol_s);
 
-    f_file_stream_unlock(print.to);
+    f_file_stream_unlock(print->to);
 
     return F_none;
   }
 #endif // _di_fll_program_print_error_parameter_process_
 
 #ifndef _di_fll_program_print_error_parameter_range_start_before_stop_
-  f_status_t fll_program_print_error_parameter_range_start_before_stop(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t value_start, const f_string_static_t value_stop) {
+  f_status_t fll_program_print_error_parameter_range_start_before_stop(fl_print_t * const print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t value_start, const f_string_static_t value_stop) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
-    if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+    if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
 
-    f_file_stream_lock(print.to);
+    f_file_stream_lock(print->to);
 
-    fl_print_format("%r%[%QThe start range value '%]", print.to, f_string_eol_s, print.set->error, print.prefix, print.set->error);
-    fl_print_format("%[%Q%]", print.to, print.set->notable, value_start, print.set->notable);
-    fl_print_format("%[' may not be greater than the stop value '%]", print.to, print.set->error, print.set->error);
-    fl_print_format("%[%Q%]", print.to, print.set->notable, value_stop, print.set->notable);
-    fl_print_format("%[' for the parameter '%]", print.to, print.set->error, print.set->error);
-    fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol, name, print.set->notable);
-    fl_print_format("%['.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
+    fl_print_format("%[%QThe start range value '%]", print->to, print->set->error, print->prefix, print->set->error);
+    fl_print_format("%[%Q%]", print->to, print->set->notable, value_start, print->set->notable);
+    fl_print_format("%[' may not be greater than the stop value '%]", print->to, print->set->error, print->set->error);
+    fl_print_format("%[%Q%]", print->to, print->set->notable, value_stop, print->set->notable);
+    fl_print_format("%[' for the parameter '%]", print->to, print->set->error, print->set->error);
+    fl_print_format("%[%Q%Q%]", print->to, print->set->notable, symbol, name, print->set->notable);
+    fl_print_format("%['.%]%r", print->to, print->set->error, print->set->error, f_string_eol_s);
 
-    f_file_stream_unlock(print.to);
+    f_file_stream_unlock(print->to);
 
     return F_none;
   }
 #endif // _di_fll_program_print_error_parameter_range_start_before_stop_
 
 #ifndef _di_fll_program_print_error_parameter_value_too_long_
-  f_status_t fll_program_print_error_parameter_value_too_long(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name) {
+  f_status_t fll_program_print_error_parameter_value_too_long(fl_print_t * const print, const f_string_static_t symbol, const f_string_static_t name) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
-    if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+    if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
 
-    f_file_stream_lock(print.to);
+    f_file_stream_lock(print->to);
 
-    fl_print_format("%r%[%QThe value for the parameter '%]", print.to, f_string_eol_s, print.set->error, print.prefix, print.set->error);
-    fl_print_format("%[%Q%Q%]", print.to, print.notable, symbol, name, print.notable);
-    fl_print_format("%[' is too long.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
+    fl_print_format("%[%QThe value for the parameter '%]", print->to, print->set->error, print->prefix, print->set->error);
+    fl_print_format("%[%Q%Q%]", print->to, print->notable, symbol, name, print->notable);
+    fl_print_format("%[' is too long.%]%r", print->to, print->set->error, print->set->error, f_string_eol_s);
 
-    f_file_stream_unlock(print.to);
+    f_file_stream_unlock(print->to);
 
     return F_none;
   }
 #endif // _di_fll_program_print_error_parameter_value_too_long_
 
 #ifndef _di_fll_program_print_error_pipe_invalid_form_feed_
-  f_status_t fll_program_print_error_pipe_invalid_form_feed(const fl_print_t print) {
+  f_status_t fll_program_print_error_pipe_invalid_form_feed(fl_print_t * const print) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
-    if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+    if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
 
-    f_file_stream_lock(print.to);
+    f_file_stream_lock(print->to);
 
-    fl_print_format("%r%[%QThe pipe has incorrectly placed form-feed characters (\\f).%]%r", print.to, f_string_eol_s, print.set->error, print.prefix, print.set->error, f_string_eol_s);
+    fl_print_format("%[%QThe pipe has incorrectly placed form-feed characters (\\f).%]%r", print->to, print->set->error, print->prefix, print->set->error, f_string_eol_s);
 
-    f_file_stream_unlock(print.to);
+    f_file_stream_unlock(print->to);
 
     return F_none;
   }
 #endif // _di_fll_program_print_error_pipe_invalid_form_feed_
 
 #ifndef _di_fll_program_print_error_pipe_missing_content_
-  f_status_t fll_program_print_error_pipe_missing_content(const fl_print_t print) {
+  f_status_t fll_program_print_error_pipe_missing_content(fl_print_t * const print) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
-    if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+    if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
 
-    f_file_stream_lock(print.to);
+    f_file_stream_lock(print->to);
 
-    fl_print_format("%r%[%QThe pipe has no content.%]%r", print.to, f_string_eol_s, print.set->error, print.prefix, print.set->error, f_string_eol_s);
+    fl_print_format("%[%QThe pipe has no content.%]%r", print->to, print->set->error, print->prefix, print->set->error, f_string_eol_s);
 
-    f_file_stream_unlock(print.to);
+    f_file_stream_unlock(print->to);
 
     return F_none;
   }
 #endif // _di_fll_program_print_error_pipe_missing_content_
 
 #ifndef _di_fll_program_print_error_pipe_object_without_content_
-  f_status_t fll_program_print_error_pipe_object_without_content(const fl_print_t print) {
+  f_status_t fll_program_print_error_pipe_object_without_content(fl_print_t * const print) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
-    if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+    if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
 
-    f_file_stream_lock(print.to);
+    f_file_stream_lock(print->to);
 
-    fl_print_format("%r%[%QThe pipe has an Object without Content.%]%r", print.to, f_string_eol_s, print.set->error, print.prefix, print.set->error, f_string_eol_s);
+    fl_print_format("%[%QThe pipe has an Object without Content.%]%r", print->to, print->set->error, print->prefix, print->set->error, f_string_eol_s);
 
-    f_file_stream_unlock(print.to);
+    f_file_stream_unlock(print->to);
 
     return F_none;
   }
 #endif // _di_fll_program_print_error_pipe_object_without_content_
 
 #ifndef _di_fll_program_print_help_header_
-  f_status_t fll_program_print_help_header(const fl_print_t print, const f_string_static_t name, const f_string_static_t version) {
+  f_status_t fll_program_print_help_header(fl_print_t * const print, const f_string_static_t name, const f_string_static_t version) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
-    fl_print_format(" %[%Q%]%r", print.to, print.set->title, name, print.set->title, f_string_eol_s);
-    fl_print_format("  %[Version %Q%]%r", print.to, print.set->notable, version, print.set->notable, f_string_eol_s);
+    fl_print_format(" %[%Q%]%r", print->to, print->set->title, name, print->set->title, f_string_eol_s);
+    fl_print_format("  %[Version %Q%]%r%r", print->to, print->set->notable, version, print->set->notable, f_string_eol_s, f_string_eol_s);
 
-    fl_print_format("%r %[Available Options:%] ", print.to, f_string_eol_s, print.set->important, print.set->important);
+    fl_print_format(" %[Available Options:%] %r", print->to, print->set->important, print->set->important, f_string_eol_s);
 
     return F_none;
   }
 #endif // _di_fll_program_print_help_header_
 
 #ifndef _di_fll_program_print_help_option_
-  f_status_t fll_program_print_help_option(const fl_print_t print, const f_string_static_t option_short, const f_string_static_t option_long, const f_string_static_t symbol_short, const f_string_static_t symbol_long, const char *description) {
+  f_status_t fll_program_print_help_option(fl_print_t * const print, const f_string_static_t option_short, const f_string_static_t option_long, const f_string_static_t symbol_short, const f_string_static_t symbol_long, const char *description) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
     return private_fll_program_print_help_option(print, option_short, option_long, symbol_short, symbol_long, description);
   }
 #endif // _di_fll_program_print_help_option_
 
 #ifndef _di_fll_program_print_help_option_standard_
-  f_status_t fll_program_print_help_option_standard(const fl_print_t print) {
+  f_status_t fll_program_print_help_option_standard(fl_print_t * const print) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
     private_fll_program_print_help_option(print, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "         Print this help message.");
     private_fll_program_print_help_option(print, f_console_standard_short_copyright_s, f_console_standard_long_copyright_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, "    Print the copyright.");
     private_fll_program_print_help_option(print, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, "         Output using colors that show up better on dark backgrounds.");
     private_fll_program_print_help_option(print, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, "        Output using colors that show up better on light backgrounds.");
     private_fll_program_print_help_option(print, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, "     Do not print using color.");
-    private_fll_program_print_help_option(print, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, "        Decrease verbosity, silencing most print.to.");
-    private_fll_program_print_help_option(print, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, "        Decrease verbosity, using only error print.to.");
+    private_fll_program_print_help_option(print, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, "        Decrease verbosity, silencing most print->to.");
+    private_fll_program_print_help_option(print, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, "        Decrease verbosity, using only error print->to.");
     private_fll_program_print_help_option(print, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, "       Set verbosity to normal.");
-    private_fll_program_print_help_option(print, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, "      Increase verbosity beyond normal print.to.");
-    private_fll_program_print_help_option(print, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, "        Enable debugging, significantly increasing verbosity beyond normal print.to.");
+    private_fll_program_print_help_option(print, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, "      Increase verbosity beyond normal print->to.");
+    private_fll_program_print_help_option(print, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, "        Enable debugging, significantly increasing verbosity beyond normal print->to.");
     private_fll_program_print_help_option(print, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, "      Print only the version number.");
     private_fll_program_print_help_option(print, f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, "Disable printing of first line.");
     private_fll_program_print_help_option(print, f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Disable printing of last line.");
@@ -455,74 +528,87 @@ extern "C" {
 #endif // _di_fll_program_print_help_option_standard_
 
 #ifndef _di_fll_program_print_help_option_long_
-  f_status_t fll_program_print_help_option_long(const fl_print_t print, const f_string_static_t option_long, const f_string_static_t symbol_long, const char *description) {
+  f_status_t fll_program_print_help_option_long(fl_print_t * const print, const f_string_static_t option_long, const f_string_static_t symbol_long, const char *description) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
-    fl_print_format("%r      %Q%[%Q%]  %S", print.to, f_string_eol_s, symbol_long, print.set->standout, option_long, print.set->standout, description);
+    fl_print_format("      %Q%[%Q%]  %S%r", print->to, symbol_long, print->set->standout, option_long, print->set->standout, description, f_string_eol_s);
 
     return F_none;
   }
 #endif // _di_fll_program_print_help_option_long_
 
 #ifndef _di_fll_program_print_help_option_other_
-  f_status_t fll_program_print_help_option_other(const fl_print_t print, const f_string_static_t option_other, const char *description) {
+  f_status_t fll_program_print_help_option_other(fl_print_t * const print, const f_string_static_t option_other, const char *description) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
-    fl_print_format("%r  %[%Q%]  %S", print.to, f_string_eol_s, print.set->standout, option_other, print.set->standout, description);
+    fl_print_format("  %[%Q%]  %S%r", print->to, print->set->standout, option_other, print->set->standout, description, f_string_eol_s);
 
     return F_none;
   }
 #endif // _di_fll_program_print_help_option_other_
 
 #ifndef _di_fll_program_print_help_usage_
-  f_status_t fll_program_print_help_usage(const fl_print_t print, const f_string_static_t name, const f_string_static_t parameters) {
+  f_status_t fll_program_print_help_usage(fl_print_t * const print, const f_string_static_t name, const f_string_static_t parameters) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
-    fl_print_format(" %[Usage:%]%r", print.to, print.set->important, print.set->important, f_string_eol_s);
+    fl_print_format(" %[Usage:%]%r", print->to, print->set->important, print->set->important, f_string_eol_s);
 
-    fl_print_format("  %[%Q%]", print.to, print.set->standout, name, print.set->standout);
-    fl_print_format(" %[[%] options %[]%]", print.to, print.set->notable, print.set->notable, print.set->notable, print.set->notable);
+    fl_print_format("  %[%Q%]", print->to, print->set->standout, name, print->set->standout);
+    fl_print_format(" %[[%] options %[]%]", print->to, print->set->notable, print->set->notable, print->set->notable, print->set->notable);
 
     if (parameters.used) {
-      fl_print_format(" %[[%] %Q %[]%]", print.to, print.set->notable, print.set->notable, parameters, print.set->notable, print.set->notable);
+      fl_print_format(" %[[%] %Q %[]%]", print->to, print->set->notable, print->set->notable, parameters, print->set->notable, print->set->notable);
     }
 
-    f_print_dynamic_raw(f_string_eol_s, print.to);
+    f_print_dynamic_raw(f_string_eol_s, print->to);
 
     return F_none;
   }
 #endif // _di_fll_program_print_help_usage_
 
 #ifndef _di_fll_program_print_signal_received_
-  f_status_t fll_program_print_signal_received(const fl_print_t print, const uint32_t signal) {
+  f_status_t fll_program_print_signal_received(fl_print_t * const print, const uint32_t signal) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
-    if (print.verbosity != f_console_verbosity_verbose_e && print.verbosity != f_console_verbosity_debug_e) {
+    if (print->verbosity != f_console_verbosity_verbose_e && print->verbosity != f_console_verbosity_debug_e) {
       return F_output_not;
     }
 
-    f_file_stream_lock(print.to);
+    f_file_stream_lock(print->to);
 
     // Must flush and reset color because the interrupt may have interrupted the middle of a print function.
-    f_file_stream_flush(print.to);
+    f_file_stream_flush(print->to);
 
-    fl_print_format("%]%r%[Received signal code %]", print.to, print.set->reset, f_string_eol_s, print.set->warning, print.set->warning);
-    fl_print_format("%[%u%]", print.to, print.set->notable, signal, print.set->notable);
-    fl_print_format("%[.%]%r", print.to, print.set->warning, print.set->warning, f_string_eol_s);
+    fl_print_format("%]%[Received signal code %]", print->to, print->set->reset, print->set->warning, print->set->warning);
+    fl_print_format("%[%u%]", print->to, print->set->notable, signal, print->set->notable);
+    fl_print_format("%[.%]%r", print->to, print->set->warning, print->set->warning, f_string_eol_s);
 
-    f_file_stream_unlock(print.to);
+    f_file_stream_unlock(print->to);
 
     return F_none;
   }
 #endif // _di_fll_program_print_signal_received_
 
 #ifndef _di_fll_program_print_version_
-  f_status_t fll_program_print_version(const fl_print_t print, const f_string_static_t version) {
+  f_status_t fll_program_print_version(fl_print_t * const print, const f_string_static_t version) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!print) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
-    f_file_stream_lock(print.to);
+    f_file_stream_lock(print->to);
 
-    f_print_dynamic_raw(f_string_eol_s, print.to);
-    f_print_dynamic(version, print.to);
-    f_print_dynamic_raw(f_string_eol_s, print.to);
-    f_print_dynamic_raw(f_string_eol_s, print.to);
+    f_print_dynamic(version, print->to);
+    f_print_dynamic_raw(f_string_eol_s, print->to);
 
-    f_file_stream_unlock(print.to);
+    f_file_stream_unlock(print->to);
 
     return F_none;
   }
index 323b0bc55d476bace0473713d2eb4998be199b93..47a61358f6e2b8eb052c28f686a876eb423fa607 100644 (file)
@@ -26,9 +26,11 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
  */
 #ifndef _di_fll_program_print_copyright_
-  extern f_status_t fll_program_print_copyright(const fl_print_t print);
+  extern f_status_t fll_program_print_copyright(fl_print_t * const print);
 #endif // _di_fll_program_print_copyright_
 
 /**
@@ -48,9 +50,11 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
  */
 #ifndef _di_fll_program_print_error_missing_file_
-  extern f_status_t fll_program_print_error_missing_file(const fl_print_t print);
+  extern f_status_t fll_program_print_error_missing_file(fl_print_t * const print);
 #endif // _di_fll_program_print_error_missing_file_
 
 /**
@@ -72,9 +76,11 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
  */
 #ifndef _di_fll_program_print_error_missing_variable_not_zero_
-  extern f_status_t fll_program_print_error_missing_variable_not_zero(const fl_print_t print, const f_string_static_t variable);
+  extern f_status_t fll_program_print_error_missing_variable_not_zero(fl_print_t * const print, const f_string_static_t variable);
 #endif // _di_fll_program_print_error_missing_variable_not_zero_
 
 /**
@@ -104,9 +110,11 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
  */
 #ifndef _di_fll_program_print_error_parameter_both_specified_same_amount_
-  extern f_status_t fll_program_print_error_parameter_both_specified_same_amount(const fl_print_t print, const f_string_static_t symbol_1, const f_string_static_t symbol_2, const f_string_static_t name_1, const f_string_static_t name_2);
+  extern f_status_t fll_program_print_error_parameter_both_specified_same_amount(fl_print_t * const print, const f_string_static_t symbol_1, const f_string_static_t symbol_2, const f_string_static_t name_1, const f_string_static_t name_2);
 #endif // _di_fll_program_print_error_parameter_both_specified_same_amount_
 
 /**
@@ -142,9 +150,11 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
  */
 #ifndef _di_fll_program_print_error_parameter_both_specified_same_amount_without_
-  extern f_status_t fll_program_print_error_parameter_both_specified_same_amount_without(const fl_print_t print, const f_string_static_t symbol_1, const f_string_static_t symbol_2, const f_string_static_t symbol_3, const f_string_static_t name_1, const f_string_static_t name_2, const f_string_static_t name_3);
+  extern f_status_t fll_program_print_error_parameter_both_specified_same_amount_without(fl_print_t * const print, const f_string_static_t symbol_1, const f_string_static_t symbol_2, const f_string_static_t symbol_3, const f_string_static_t name_1, const f_string_static_t name_2, const f_string_static_t name_3);
 #endif // _di_fll_program_print_error_parameter_both_specified_same_amount_without_
 
 /**
@@ -174,9 +184,11 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
  */
 #ifndef _di_fll_program_print_error_parameter_cannot_use_with_
-  extern f_status_t fll_program_print_error_parameter_cannot_use_with(const fl_print_t print, const f_string_static_t symbol_1, const f_string_static_t symbol_2, const f_string_static_t name_1, const f_string_static_t name_2);
+  extern f_status_t fll_program_print_error_parameter_cannot_use_with(fl_print_t * const print, const f_string_static_t symbol_1, const f_string_static_t symbol_2, const f_string_static_t name_1, const f_string_static_t name_2);
 #endif // _di_fll_program_print_error_parameter_cannot_use_with_
 
 /**
@@ -211,9 +223,11 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
  */
 #ifndef _di_fll_program_print_error_parameter_cannot_use_with_without_
-  extern f_status_t fll_program_print_error_parameter_cannot_use_with_without(const fl_print_t print, const f_string_static_t symbol_1, const f_string_static_t symbol_2, const f_string_static_t symbol_3, const f_string_static_t name_1, const f_string_static_t name_2, const f_string_static_t name_3);
+  extern f_status_t fll_program_print_error_parameter_cannot_use_with_without(fl_print_t * const print, const f_string_static_t symbol_1, const f_string_static_t symbol_2, const f_string_static_t symbol_3, const f_string_static_t name_1, const f_string_static_t name_2, const f_string_static_t name_3);
 #endif // _di_fll_program_print_error_parameter_cannot_use_with_without_
 
 /**
@@ -238,9 +252,11 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
  */
 #ifndef _di_fll_program_print_error_parameter_cannot_use_with_pipe_
-  extern f_status_t fll_program_print_error_parameter_cannot_use_with_pipe(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name);
+  extern f_status_t fll_program_print_error_parameter_cannot_use_with_pipe(fl_print_t * const print, const f_string_static_t symbol, const f_string_static_t name);
 #endif // _di_fll_program_print_error_parameter_cannot_use_with_pipe_
 
 /**
@@ -281,9 +297,11 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
  */
 #ifndef _di_fll_program_print_error_parameter_allows_either_xor_
-  extern f_status_t fll_program_print_error_parameter_cannot_use_with_xor(const fl_print_t print, const f_string_static_t symbol_1, const f_string_static_t symbol_2, const f_string_static_t symbol_3, const f_string_static_t name_1, const f_string_static_t name_2, const f_string_static_t name_3);
+  extern f_status_t fll_program_print_error_parameter_cannot_use_with_xor(fl_print_t * const print, const f_string_static_t symbol_1, const f_string_static_t symbol_2, const f_string_static_t symbol_3, const f_string_static_t name_1, const f_string_static_t name_2, const f_string_static_t name_3);
 #endif // _di_fll_program_print_error_parameter_allows_either_xor_
 
 /**
@@ -311,9 +329,11 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
  */
 #ifndef _di_fll_program_print_error_parameter_integer_not_
-  extern f_status_t fll_program_print_error_parameter_integer_not(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t value);
+  extern f_status_t fll_program_print_error_parameter_integer_not(fl_print_t * const print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t value);
 #endif // _di_fll_program_print_error_parameter_integer_not_
 
 /**
@@ -341,9 +361,11 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
  */
 #ifndef _di_fll_program_print_error_parameter_integer_not_negative_
-  extern f_status_t fll_program_print_error_parameter_integer_not_negative(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t value);
+  extern f_status_t fll_program_print_error_parameter_integer_not_negative(fl_print_t * const print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t value);
 #endif // _di_fll_program_print_error_parameter_integer_not_negative_
 
 /**
@@ -371,9 +393,11 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
  */
 #ifndef _di_fll_program_print_error_parameter_integer_not_positive_
-  extern f_status_t fll_program_print_error_parameter_integer_not_positive(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t value);
+  extern f_status_t fll_program_print_error_parameter_integer_not_positive(fl_print_t * const print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t value);
 #endif // _di_fll_program_print_error_parameter_integer_not_positive_
 
 /**
@@ -399,9 +423,11 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
  */
 #ifndef _di_fll_program_print_error_parameter_missing_value_
-  extern f_status_t fll_program_print_error_parameter_missing_value(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name);
+  extern f_status_t fll_program_print_error_parameter_missing_value(fl_print_t * const print, const f_string_static_t symbol, const f_string_static_t name);
 #endif // _di_fll_program_print_error_parameter_missing_value_
 
 /**
@@ -429,9 +455,11 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
  */
 #ifndef _di_fll_program_print_error_parameter_missing_value_requires_amount_
-  extern f_status_t fll_program_print_error_parameter_missing_value_requires_amount(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t amount);
+  extern f_status_t fll_program_print_error_parameter_missing_value_requires_amount(fl_print_t * const print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t amount);
 #endif // _di_fll_program_print_error_parameter_missing_value_requires_amount_
 
 /**
@@ -457,9 +485,11 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
  */
 #ifndef _di_fll_program_print_error_parameter_must_specify_once_
-  extern f_status_t fll_program_print_error_parameter_must_specify_once(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name);
+  extern f_status_t fll_program_print_error_parameter_must_specify_once(fl_print_t * const print, const f_string_static_t symbol, const f_string_static_t name);
 #endif // _di_fll_program_print_error_parameter_must_specify_once_
 
 /**
@@ -487,9 +517,11 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
  */
 #ifndef _di_fll_program_print_error_parameter_must_specify_once_value_
-  extern f_status_t fll_program_print_error_parameter_must_specify_once_value(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t value);
+  extern f_status_t fll_program_print_error_parameter_must_specify_once_value(fl_print_t * const print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t value);
 #endif // _di_fll_program_print_error_parameter_must_specify_once_value_
 
 /**
@@ -515,9 +547,11 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
  */
 #ifndef _di_fll_program_print_error_parameter_process_
-  extern f_status_t fll_program_print_error_parameter_process(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name);
+  extern f_status_t fll_program_print_error_parameter_process(fl_print_t * const print, const f_string_static_t symbol, const f_string_static_t name);
 #endif // _di_fll_program_print_error_parameter_process_
 
 /**
@@ -547,9 +581,11 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
  */
 #ifndef _di_fll_program_print_error_parameter_range_start_before_stop_
-  extern f_status_t fll_program_print_error_parameter_range_start_before_stop(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t value_start, const f_string_static_t value_stop);
+  extern f_status_t fll_program_print_error_parameter_range_start_before_stop(fl_print_t * const print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t value_start, const f_string_static_t value_stop);
 #endif // _di_fll_program_print_error_parameter_range_start_before_stop_
 
 /**
@@ -568,9 +604,11 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
  */
 #ifndef _di_fll_program_print_error_parameter_value_too_long_
-  extern f_status_t fll_program_print_error_parameter_value_too_long(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name);
+  extern f_status_t fll_program_print_error_parameter_value_too_long(fl_print_t * const print, const f_string_static_t symbol, const f_string_static_t name);
 #endif // _di_fll_program_print_error_parameter_value_too_long_
 
 /**
@@ -590,9 +628,11 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
  */
 #ifndef _di_fll_program_print_error_pipe_invalid_form_feed_
-  extern f_status_t fll_program_print_error_pipe_invalid_form_feed(const fl_print_t print);
+  extern f_status_t fll_program_print_error_pipe_invalid_form_feed(fl_print_t * const print);
 #endif // _di_fll_program_print_error_pipe_invalid_form_feed_
 
 /**
@@ -612,9 +652,11 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
  */
 #ifndef _di_fll_program_print_error_pipe_missing_content_
-  extern f_status_t fll_program_print_error_pipe_missing_content(const fl_print_t print);
+  extern f_status_t fll_program_print_error_pipe_missing_content(fl_print_t * const print);
 #endif // _di_fll_program_print_error_pipe_missing_content_
 
 /**
@@ -636,9 +678,15 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ * @see f_file_stream_lock()
+ * @see f_file_stream_unlock()
+ * @see fl_print_format()
  */
 #ifndef _di_fll_program_print_error_pipe_object_without_content_
-  extern f_status_t fll_program_print_error_pipe_object_without_content(const fl_print_t print);
+  extern f_status_t fll_program_print_error_pipe_object_without_content(fl_print_t * const print);
 #endif // _di_fll_program_print_error_pipe_object_without_content_
 
 /**
@@ -659,11 +707,12 @@ extern "C" {
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
  *
- * @see f_print_terminated()
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
  * @see fl_print_format()
  */
 #ifndef _di_fll_program_print_help_header_
-  extern f_status_t fll_program_print_help_header(const fl_print_t print, const f_string_static_t name, const f_string_static_t version);
+  extern f_status_t fll_program_print_help_header(fl_print_t * const print, const f_string_static_t name, const f_string_static_t version);
 #endif // _di_fll_program_print_help_header_
 
 /**
@@ -690,11 +739,12 @@ extern "C" {
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
  *
- * @see f_print_terminated()
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
  * @see fl_print_format()
  */
 #ifndef _di_fll_program_print_help_option_
-  extern f_status_t fll_program_print_help_option(const fl_print_t print, const f_string_static_t option_short, const f_string_static_t option_long, const f_string_static_t symbol_short, const f_string_static_t symbol_long, const char *description);
+  extern f_status_t fll_program_print_help_option(fl_print_t * const print, const f_string_static_t option_short, const f_string_static_t option_long, const f_string_static_t symbol_short, const f_string_static_t symbol_long, const char *description);
 #endif // _di_fll_program_print_help_option_
 
 /**
@@ -717,11 +767,12 @@ extern "C" {
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
  *
- * @see f_print_terminated()
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
  * @see fl_print_format()
  */
 #ifndef _di_fll_program_print_help_option_long_
-  extern f_status_t fll_program_print_help_option_long(const fl_print_t print, const f_string_static_t option_long, const f_string_static_t symbol_long, const char *description);
+  extern f_status_t fll_program_print_help_option_long(fl_print_t * const print, const f_string_static_t option_long, const f_string_static_t symbol_long, const char *description);
 #endif // _di_fll_program_print_help_option_long_
 
 /**
@@ -742,11 +793,12 @@ extern "C" {
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
  *
- * @see f_print_terminated()
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
  * @see fl_print_format()
  */
 #ifndef _di_fll_program_print_help_option_other_
-  extern f_status_t fll_program_print_help_option_other(const fl_print_t print, const f_string_static_t option_other, const char *description);
+  extern f_status_t fll_program_print_help_option_other(fl_print_t * const print, const f_string_static_t option_other, const char *description);
 #endif // _di_fll_program_print_help_option_other_
 
 /**
@@ -765,11 +817,12 @@ extern "C" {
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
  *
- * @see f_print_terminated()
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
  * @see fl_print_format()
  */
 #ifndef _di_fll_program_print_help_option_standard_
-  extern f_status_t fll_program_print_help_option_standard(const fl_print_t print);
+  extern f_status_t fll_program_print_help_option_standard(fl_print_t * const print);
 #endif // _di_fll_program_print_help_option_standard_
 
 /**
@@ -792,11 +845,13 @@ extern "C" {
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
  *
- * @see f_print_terminated()
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ * @see f_print_dynamic_raw()
  * @see fl_print_format()
  */
 #ifndef _di_fll_program_print_help_usage_
-  extern f_status_t fll_program_print_help_usage(const fl_print_t print, const f_string_static_t name, const f_string_static_t parameters);
+  extern f_status_t fll_program_print_help_usage(fl_print_t * const print, const f_string_static_t name, const f_string_static_t parameters);
 #endif // _di_fll_program_print_help_usage_
 
 /**
@@ -814,9 +869,15 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ * @see f_file_stream_lock()
+ * @see f_file_stream_unlock()
+ * @see fl_print_format()
  */
 #ifndef _di_fll_program_print_signal_received_
-  extern f_status_t fll_program_print_signal_received(const fl_print_t print, const uint32_t signal);
+  extern f_status_t fll_program_print_signal_received(fl_print_t * const print, const uint32_t signal);
 #endif // _di_fll_program_print_signal_received_
 
 /**
@@ -833,10 +894,15 @@ extern "C" {
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
  *
- * @see fl_print_format()
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ * @see f_file_stream_lock()
+ * @see f_file_stream_unlock()
+ * @see f_print_dynamic()
+ * @see f_print_dynamic_raw()
  */
 #ifndef _di_fll_program_print_version_
-  extern f_status_t fll_program_print_version(const fl_print_t print, const f_string_static_t version);
+  extern f_status_t fll_program_print_version(fl_print_t * const print, const f_string_static_t version);
 #endif // _di_fll_program_print_version_
 
 #ifdef __cplusplus
index 192bd1704bdc7fcecf9e05f0714b692404d71309..7597a2839caa1db5a2c0c0ddb87d49cbcc4d9c02 100644 (file)
@@ -31,7 +31,7 @@ extern "C" {
 
         const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
 
-        status = fll_program_parameter_process_context(choices, modes, F_true, main);
+        status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
 
         if (F_status_is_error(status)) {
           fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e);
@@ -52,7 +52,7 @@ extern "C" {
 
         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 };
 
-        status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
+        status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
 
         if (F_status_is_error(status)) {
           fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
@@ -157,13 +157,13 @@ extern "C" {
     }
 
     if (main->parameters.array[byte_dump_parameter_version_e].result & f_console_result_found_e) {
-      fll_program_print_version(main->message, byte_dump_program_version_s);
+      fll_program_print_version(&main->message, byte_dump_program_version_s);
 
       return F_none;
     }
 
     if (main->parameters.array[byte_dump_parameter_copyright_e].result & f_console_result_found_e) {
-      fll_program_print_copyright(main->message);
+      fll_program_print_copyright(&main->message);
 
       return F_none;
     }
index e99fff7e95f9aa657f09c9fd9481666398422e46..196467a55ffacd9332452f54fbbcf2e89593308a 100644 (file)
@@ -124,7 +124,7 @@ extern "C" {
 
         const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
 
-        setting->state.status = fll_program_parameter_process_context(choices, modes, F_true, main);
+        setting->state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
 
         if (F_status_is_error(setting->state.status)) {
           fll_error_print(main->error, F_status_set_fine(setting->state.status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e);
@@ -145,7 +145,7 @@ extern "C" {
 
         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 };
 
-        setting->state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
+        setting->state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
 
         if (F_status_is_error(setting->state.status)) {
           fll_error_print(main->error, F_status_set_fine(setting->state.status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
index d32ca7f7f9787eb14c47dba4500c586c330a79d9..07f5c7024fdc0c5ec0e7e69398a446302eaa52af 100644 (file)
@@ -2,8 +2,17 @@
 
 int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
-  fll_program_data_t data = fll_program_data_t_initialize;
-  byte_dump_setting_t setting = byte_dump_setting_t_initialize;
+  byte_dump_main_t data = byte_dump_main_t_initialize;
+
+  data.program.debug.flag |= byte_dump_print_flag_debug_e;
+  data.program.error.flag |= byte_dump_print_flag_error_e;
+  data.program.message.flag |= byte_dump_print_flag_message_e;
+  data.program.warning.flag |= byte_dump_print_flag_warning_e;
+  data.program.message.custom = (void *) &data;
+  data.program.output.custom = (void *) &data;
+  data.program.error.custom = (void *) &data;
+  data.program.warning.custom = (void *) &data;
+  data.program.debug.custom = (void *) &data;
 
   f_console_parameter_t parameters[] = byte_dump_console_parameter_t_initialize;
   data.parameters.array = parameters;
index 6307cc241aceb606c7b8e5e7174800edb32c018a..75c690ca98e1ce8d1c9ad924991594e94be8b2ac 100644 (file)
@@ -227,7 +227,7 @@ extern "C" {
 
         const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
 
-        setting->state.status = fll_program_parameter_process_context(choices, modes, F_true, main);
+        setting->state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
 
         if (F_status_is_error(setting->state.status)) {
           fll_error_print(main->error, F_status_set_fine(setting->state.status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e);
@@ -248,7 +248,7 @@ extern "C" {
 
         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 };
 
-        setting->state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
+        setting->state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
 
         if (F_status_is_error(setting->state.status)) {
           fll_error_print(main->error, F_status_set_fine(setting->state.status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
index ea2ad2717d0eab3d6ef60c8e59a01358ef6839c3..b8d8e4d0b558ab407a8999724cb187d3255fa296 100644 (file)
@@ -32,7 +32,7 @@ extern "C" {
 
         const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
 
-        status = fll_program_parameter_process_context(choices, modes, F_true, main);
+        status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
 
         if (F_status_is_error(status)) {
           fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e);
@@ -53,7 +53,7 @@ extern "C" {
 
         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 };
 
-        status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
+        status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
 
         if (F_status_is_error(status)) {
           fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
@@ -74,13 +74,13 @@ extern "C" {
     }
 
     if (main->parameters.array[control_parameter_version_e].result & f_console_result_found_e) {
-      fll_program_print_version(main->message, control_program_version_s);
+      fll_program_print_version(&main->message, control_program_version_s);
 
       return F_none;
     }
 
     if (main->parameters.array[control_parameter_copyright_e].result & f_console_result_found_e) {
-      fll_program_print_copyright(main->message);
+      fll_program_print_copyright(&main->message);
 
       return F_none;
     }
index 910a490b61b86143638acab8c571bc2f30a4a654..b02424e274090e206f286d5eecd3eb46c4e660a8 100644 (file)
@@ -2,8 +2,17 @@
 
 int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
-  fll_program_data_t data = fll_program_data_t_initialize;
-  control_setting_t setting = control_setting_t_initialize;
+  control_main_t data = control_main_t_initialize;
+
+  data.program.debug.flag |= control_print_flag_debug_e;
+  data.program.error.flag |= control_print_flag_error_e;
+  data.program.message.flag |= control_print_flag_message_e;
+  data.program.warning.flag |= control_print_flag_warning_e;
+  data.program.message.custom = (void *) &data;
+  data.program.output.custom = (void *) &data;
+  data.program.error.custom = (void *) &data;
+  data.program.warning.custom = (void *) &data;
+  data.program.debug.custom = (void *) &data;
 
   f_console_parameter_t parameters[] = control_console_parameter_t_initialize;
   data.parameters.array = parameters;
index 68d98f1864c1b796b64f83460dab4d60b64df5c4..3fc06c35e5a2be27f8571235483416404da0d33b 100644 (file)
@@ -659,7 +659,7 @@ extern "C" {
 
         const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
 
-        setting->state.status = fll_program_parameter_process_context(choices, modes, F_true, main);
+        setting->state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
 
         if (F_status_is_error(setting->state.status)) {
           fll_error_print(main->error, F_status_set_fine(setting->state.status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e);
@@ -680,7 +680,7 @@ extern "C" {
 
         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 };
 
-        setting->state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
+        setting->state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
 
         if (F_status_is_error(setting->state.status)) {
           fll_error_print(main->error, F_status_set_fine(setting->state.status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
index 6e78908d017288a9a03858c7745caa38de74a279..85f2fd3900104dc0ea9aa2286dcb642c3cb87b1c 100644 (file)
@@ -37,7 +37,7 @@ extern "C" {
 
         const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
 
-        status = fll_program_parameter_process_context(choices, modes, F_true, main);
+        status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
 
         if (F_status_is_error(status)) {
           fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e);
@@ -58,7 +58,7 @@ extern "C" {
 
         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 };
 
-        status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
+        status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
 
         if (F_status_is_error(status)) {
           fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
index 910266d222e047fdd8a38fc503fca9ecbda3fca7..4d607efc6826833ebf65f04f27033c2e2bc5cce0 100644 (file)
@@ -18,7 +18,7 @@ extern "C" {
       f_thread_mutex_lock(&thread->lock.print);
     }
 
-    fll_error_print(*print, status, function, flag);
+    fll_error_print(print, status, function, flag);
 
     if (thread) {
       f_thread_mutex_unlock(&thread->lock.print);
index 9a81235143bbd8383aecd5b5f4ed0daa8a95d1f5..73c0ec7f28f5ed168aba813f459fedd1eae29a21 100644 (file)
@@ -3,8 +3,17 @@
 
 int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
-  fll_program_data_t data = fll_program_data_t_initialize;
-  controller_setting_t setting = controller_setting_t_initialize;
+  controller_main_t data = controller_main_t_initialize;
+
+  data.program.debug.flag |= controller_print_flag_debug_e;
+  data.program.error.flag |= controller_print_flag_error_e;
+  data.program.message.flag |= controller_print_flag_message_e;
+  data.program.warning.flag |= controller_print_flag_warning_e;
+  data.program.message.custom = (void *) &data;
+  data.program.output.custom = (void *) &data;
+  data.program.error.custom = (void *) &data;
+  data.program.warning.custom = (void *) &data;
+  data.program.debug.custom = (void *) &data;
 
   f_console_parameter_t parameters[] = controller_console_parameter_t_initialize;
   data.parameters.array = parameters;
index 41ac76d2e2276cec2bc42a2ae6fe855e4a335ca5..3a912e8c33226341705d51c7708d2425de6befd5 100644 (file)
@@ -164,7 +164,7 @@ extern "C" {
 
     if (!((++data->main->program.signal_check) % fake_signal_check_d)) {
       if (fll_program_standard_signal_received(&data->main->program)) {
-        fll_program_print_signal_received(data->main->program.warning, data->main->program.signal_received);
+        fll_program_print_signal_received(&data->main->program.warning, data->main->program.signal_received);
 
         data->main->setting.state.status = F_status_set_error(F_interrupt);
 
@@ -203,7 +203,7 @@ extern "C" {
 
       if (!((++data->main->program.signal_check) % fake_signal_check_short_d)) {
         if (fll_program_standard_signal_received(&data->main->program)) {
-          fll_program_print_signal_received(data->main->program.warning, data->main->program.signal_received);
+          fll_program_print_signal_received(&data->main->program.warning, data->main->program.signal_received);
 
           data->main->setting.state.status = F_status_set_error(F_interrupt);
 
@@ -528,7 +528,7 @@ extern "C" {
     f_string_dynamics_resize(0, &arguments);
 
     if (!((++data->main->program.signal_check) % fake_signal_check_d) && fll_program_standard_signal_received(&data->main->program)) {
-      fll_program_print_signal_received(data->main->program.warning, data->main->program.signal_received);
+      fll_program_print_signal_received(&data->main->program.warning, data->main->program.signal_received);
 
       data->main->setting.state.status = F_status_set_error(F_interrupt);
     }
@@ -629,7 +629,7 @@ extern "C" {
 
     if (!((++data->main->program.signal_check) % fake_signal_check_d)) {
       if (fll_program_standard_signal_received(&data->main->program)) {
-        fll_program_print_signal_received(data->main->program.warning, data->main->program.signal_received);
+        fll_program_print_signal_received(&data->main->program.warning, data->main->program.signal_received);
 
         data->main->setting.state.status = F_status_set_error(F_interrupt);
 
@@ -920,7 +920,7 @@ extern "C" {
 
     if (!((++data->main->program.signal_check) % fake_signal_check_d)) {
       if (fll_program_standard_signal_received(&data->main->program)) {
-        fll_program_print_signal_received(data->main->program.warning, data->main->program.signal_received);
+        fll_program_print_signal_received(&data->main->program.warning, data->main->program.signal_received);
 
         data->main->setting.state.status = F_status_set_error(F_interrupt);
 
index 809c218c30b716f3c84fc734be2872a0ccb83cb3..e4b9f02ad3694c0ad1d9243273c5fd67e511fc8f 100644 (file)
@@ -67,7 +67,7 @@ extern "C" {
 
     if (!((++data->main->program.signal_check) % fake_signal_check_d)) {
       if (fll_program_standard_signal_received(&data->main->program)) {
-        fll_program_print_signal_received(data->main->program.warning, data->main->program.signal_received);
+        fll_program_print_signal_received(&data->main->program.warning, data->main->program.signal_received);
 
         data->main->setting.state.status = F_status_set_error(F_interrupt);
 
@@ -210,7 +210,7 @@ extern "C" {
 
     if (!((++data->main->program.signal_check) % fake_signal_check_d)) {
       if (fll_program_standard_signal_received(&data->main->program)) {
-        fll_program_print_signal_received(data->main->program.warning, data->main->program.signal_received);
+        fll_program_print_signal_received(&data->main->program.warning, data->main->program.signal_received);
 
         data->main->setting.state.status = F_status_set_error(F_interrupt);
 
@@ -1330,7 +1330,7 @@ extern "C" {
 
     if (!((++data->main->program.signal_check) % fake_signal_check_d)) {
       if (fll_program_standard_signal_received(&data->main->program)) {
-        fll_program_print_signal_received(data->main->program.warning, data->main->program.signal_received);
+        fll_program_print_signal_received(&data->main->program.warning, data->main->program.signal_received);
 
         data->main->setting.state.status = F_status_set_error(F_interrupt);
 
index 2cf47c5252692ef6c649817863f7bcee58e7b85d..8844d42ab4e70332d46706e78a17df261e3a6c52 100644 (file)
@@ -66,7 +66,7 @@ extern "C" {
 
         if (!((++data->main->program.signal_check) % fake_signal_check_d)) {
           if (fll_program_standard_signal_received(&data->main->program)) {
-            fll_program_print_signal_received(data->main->program.warning, data->main->program.signal_received);
+            fll_program_print_signal_received(&data->main->program.warning, data->main->program.signal_received);
 
             data->main->setting.state.status = F_status_set_error(F_interrupt);
 
index a2bdff11109d4bd73554c0dab3b033794328240d..dbb3de7470e2db9995eeff8e3b138bb9923f0d5b 100644 (file)
@@ -242,7 +242,7 @@ extern "C" {
             }
 
             if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
-              fll_program_print_error_parameter_missing_value(main->program.error, f_console_symbol_long_normal_s, names[i]);
+              fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, names[i]);
             }
 
             return;
@@ -265,7 +265,7 @@ extern "C" {
                     }
 
                     if (fake_print_error_fallback(&main->program.error, macro_fake_f(f_utf_is_word_dash_plus)) == F_false) {
-                      fll_program_print_error_parameter_process(main->program.error, f_console_symbol_long_normal_s, names[i]);
+                      fll_program_print_error_parameter_process(&main->program.error, f_console_symbol_long_normal_s, names[i]);
                     }
 
                     return;
@@ -295,7 +295,7 @@ extern "C" {
 
                   if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
                     if (fake_print_error_fallback(&main->program.error, macro_fake_f(f_path_directory_cleanup)) == F_false) {
-                      fll_program_print_error_parameter_process(main->program.error, f_console_symbol_long_normal_s, names[i]);
+                      fll_program_print_error_parameter_process(&main->program.error, f_console_symbol_long_normal_s, names[i]);
                     }
                   }
 
@@ -391,7 +391,7 @@ extern "C" {
                 fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
               }
 
-              fll_program_print_error_parameter_missing_value(main->program.error, f_console_symbol_long_normal_s, names[i]);
+              fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, names[i]);
             }
 
             return;
@@ -407,7 +407,7 @@ extern "C" {
 
               if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
                 if (fake_print_error_fallback(&main->program.error, macro_fake_f(fll_program_parameter_additional_rip)) == F_false) {
-                  fll_program_print_error_parameter_process(main->program.error, f_console_symbol_long_normal_s, names[i]);
+                  fll_program_print_error_parameter_process(&main->program.error, f_console_symbol_long_normal_s, names[i]);
                 }
               }
 
@@ -428,7 +428,7 @@ extern "C" {
 
                   // @todo fix this to print an error about the actual invalid character so that it can be investigated.
                   if (fake_print_error_fallback(&main->program.error, macro_fake_f(f_utf_is_word_dash_plus)) == F_false) {
-                    fll_program_print_error_parameter_process(main->program.error, f_console_symbol_long_normal_s, names[i]);
+                    fll_program_print_error_parameter_process(&main->program.error, f_console_symbol_long_normal_s, names[i]);
                   }
 
                   return;
index b08594e668444c8b4180a1f28b56697fde96e9ed..28d1100171af718e979ee5a79872e30e9acddba4 100644 (file)
@@ -5,7 +5,7 @@
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
- * Provides common define functionality.
+ * Provides common define types.
  *
  * This is auto-included and should not need to be explicitly included.
  */
index 7ff6c99b05695975f2054e13211ae136472a8e32..a4e690fc9f6d8e9d9cf07ec6aec6c251cbe0b3d8 100644 (file)
@@ -5,7 +5,7 @@
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
- * Provides common enumeration functionality.
+ * Provides common enumeration types.
  *
  * This is auto-included and should not need to be explicitly included.
  */
index b2a503ed41e75451adb375c82c3a32caa396be72..30e8e2677f5952e760b4c975cb1b155ebe996879 100644 (file)
@@ -5,7 +5,7 @@
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
- * Provides common type functionality.
+ * Provides common type structures.
  *
  * This is auto-included and should not need to be explicitly included.
  */
index c0503d3133ee56b817b76b06efcfa8187731ec8a..574905355456042e3a7c498aa407e165d16875e8 100644 (file)
@@ -23,28 +23,17 @@ extern "C" {
 
     main->setting.state.status = F_none;
 
-    if (main->setting.flag & fake_main_flag_help_e) {
-      fake_print_message_help(&main->program.message);
+    if (main->setting.flag & (fake_main_flag_help_e | fake_main_flag_version_e | fake_main_flag_copyright_e)) {
 
-      if ((main->setting.flag & fake_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
-        fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
+      if (main->setting.flag & fake_main_flag_help_e) {
+        fake_print_message_help(&main->program.message);
       }
-
-      return;
-    }
-
-    if (main->setting.flag & fake_main_flag_version_e) {
-      fll_program_print_version(main->program.message, fake_program_version_s);
-
-      if ((main->setting.flag & fake_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
-        fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
+      else if (main->setting.flag & fake_main_flag_version_e) {
+        fll_program_print_version(&main->program.message, fake_program_version_s);
+      }
+      else if (main->setting.flag & fake_main_flag_copyright_e) {
+        fll_program_print_copyright(&main->program.message);
       }
-
-      return;
-    }
-
-    if (main->setting.flag & fake_main_flag_copyright_e) {
-      fll_program_print_copyright(main->program.message);
 
       if ((main->setting.flag & fake_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
         fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
@@ -147,7 +136,7 @@ extern "C" {
 
           if (!((++main->program.signal_check) % fake_signal_check_short_d)) {
             if (fll_program_standard_signal_received(&main->program)) {
-              fll_program_print_signal_received(main->program.warning, main->program.signal_received);
+              fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
 
               main->setting.state.status = F_status_set_error(F_interrupt);
 
@@ -220,7 +209,7 @@ extern "C" {
 
           if (!((++main->program.signal_check) % fake_signal_check_short_d)) {
             if (fll_program_standard_signal_received(&main->program)) {
-              fll_program_print_signal_received(main->program.warning, main->program.signal_received);
+              fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
 
               main->setting.state.status = F_status_set_error(F_interrupt);
 
@@ -298,7 +287,7 @@ extern "C" {
 
       if (!((++data->main->program.signal_check) % fake_signal_check_d)) {
         if (fll_program_standard_signal_received(&data->main->program)) {
-          fll_program_print_signal_received(data->main->program.warning, data->main->program.signal_received);
+          fll_program_print_signal_received(&data->main->program.warning, data->main->program.signal_received);
 
           data->main->setting.state.status = F_status_set_error(F_interrupt);
 
@@ -335,7 +324,7 @@ extern "C" {
 
     if (!((++data->main->program.signal_check) % fake_signal_check_d)) {
       if (fll_program_standard_signal_received(&data->main->program)) {
-        fll_program_print_signal_received(data->main->program.warning, data->main->program.signal_received);
+        fll_program_print_signal_received(&data->main->program.warning, data->main->program.signal_received);
 
         data->main->setting.state.status = F_status_set_error(F_interrupt);
 
@@ -438,7 +427,7 @@ extern "C" {
     do {
       if (!((++data->main->program.signal_check) % fake_signal_check_d)) {
         if (fll_program_standard_signal_received(&data->main->program)) {
-          fll_program_print_signal_received(data->main->program.warning, data->main->program.signal_received);
+          fll_program_print_signal_received(&data->main->program.warning, data->main->program.signal_received);
 
           data->main->setting.state.status = F_status_set_error(F_interrupt);
 
@@ -466,7 +455,7 @@ extern "C" {
 
     if (!((++data->main->program.signal_check) % fake_signal_check_d)) {
       if (fll_program_standard_signal_received(&data->main->program)) {
-        fll_program_print_signal_received(data->main->program.warning, data->main->program.signal_received);
+        fll_program_print_signal_received(&data->main->program.warning, data->main->program.signal_received);
 
         data->main->setting.state.status = F_status_set_error(F_interrupt);
 
index 1f0f1bd6b5aa65f2cb04a0dd503c9a9ba0304210..0738dd5ceaa0710011d2cc69f73d1d843597ad1b 100644 (file)
@@ -11,7 +11,7 @@ extern "C" {
     if (F_status_is_error(data_make->main->setting.state.status)) return;
 
     if (fll_program_standard_signal_received(&data_make->main->program)) {
-      fll_program_print_signal_received(data_make->main->program.warning, data_make->main->program.signal_received);
+      fll_program_print_signal_received(&data_make->main->program.warning, data_make->main->program.signal_received);
 
       data_make->main->setting.state.status = F_status_set_error(F_interrupt);
 
@@ -105,7 +105,7 @@ extern "C" {
 
           if (!(i % fake_signal_check_short_d)) {
             if (fll_program_standard_signal_received(&data_make->main->program)) {
-              fll_program_print_signal_received(data_make->main->program.warning, data_make->main->program.signal_received);
+              fll_program_print_signal_received(&data_make->main->program.warning, data_make->main->program.signal_received);
 
               data_make->main->setting.state.status = F_status_set_error(F_interrupt);
 
index a3f9fa15ff609a37868ef34b80f780638123d9cb..b68446caa62802233d261a71d222c9878e3eda29 100644 (file)
@@ -11,7 +11,7 @@ extern "C" {
 
     if (!((++data->main->program.signal_check) % fake_signal_check_d)) {
       if (fll_program_standard_signal_received(&data->main->program)) {
-        fll_program_print_signal_received(data->main->program.warning, data->main->program.signal_received);
+        fll_program_print_signal_received(&data->main->program.warning, data->main->program.signal_received);
 
         data->main->setting.state.status = F_status_set_error(F_interrupt);
 
@@ -1360,7 +1360,7 @@ extern "C" {
 
       if (!((++data_make->main->program.signal_check) % fake_signal_check_short_d)) {
         if (fll_program_standard_signal_received(&data_make->main->program)) {
-          fll_program_print_signal_received(data_make->main->program.warning, data_make->main->program.signal_received);
+          fll_program_print_signal_received(&data_make->main->program.warning, data_make->main->program.signal_received);
 
           data_make->main->setting.state.status = F_status_set_error(F_interrupt);
 
index 5afc87bd30fa2ca71b3b312df0996f19ddd510cb..1cd8f8f65ed142aea63ad7415c91328c505b79c7 100644 (file)
@@ -287,7 +287,7 @@ extern "C" {
     }
 
     if (fll_program_standard_signal_received(&data_make->main->program)) {
-      fll_program_print_signal_received(data_make->main->program.warning, data_make->main->program.signal_received);
+      fll_program_print_signal_received(&data_make->main->program.warning, data_make->main->program.signal_received);
 
       data_make->main->setting.state.status = F_status_set_error(F_interrupt);
 
@@ -336,7 +336,7 @@ extern "C" {
     data_make->main->setting.state.status = fll_execute_program(program, arguments, &parameter, 0, (void *) &return_code);
 
     if (fll_program_standard_signal_received(&data_make->main->program)) {
-      fll_program_print_signal_received(data_make->main->program.warning, data_make->main->program.signal_received);
+      fll_program_print_signal_received(&data_make->main->program.warning, data_make->main->program.signal_received);
 
       data_make->main->setting.state.status = F_status_set_error(F_interrupt);
 
@@ -407,7 +407,7 @@ extern "C" {
     }
 
     if (F_status_is_error(data_make->main->setting.state.status)) {
-      fll_error_print(data_make->error, F_status_set_fine(data_make->main->setting.state.status), macro_fake_f(f_string_dynamic_append), F_true);
+      fll_error_print(&data_make->error, F_status_set_fine(data_make->main->setting.state.status), macro_fake_f(f_string_dynamic_append), F_true);
     }
     else {
       data_make->main->setting.state.status = F_none;
index a3d232d58460baa0b25c660152d6076747229e38..8f4363a9190947161e00887e8bb04ed28cc56200 100644 (file)
@@ -12,7 +12,7 @@ extern "C" {
 
     fake_main_t * const main = (fake_main_t *) print->custom;
 
-    fll_error_print(*print, F_status_set_fine(main->setting.state.status), function, fll_error_file_flag_fallback_e);
+    fll_error_print(print, F_status_set_fine(main->setting.state.status), function, fll_error_file_flag_fallback_e);
 
     return F_none;
   }
@@ -159,7 +159,7 @@ extern "C" {
       return F_false;
     }
 
-    if (fll_error_print(*print, F_status_set_fine(main->setting.state.status), function, fll_error_file_flag_none_e) == F_known_not && fallback && print->verbosity > f_console_verbosity_quiet_e) {
+    if (fll_error_print(print, F_status_set_fine(main->setting.state.status), function, fll_error_file_flag_none_e) == F_known_not && fallback && print->verbosity > f_console_verbosity_quiet_e) {
       f_file_stream_lock(print->to);
 
       fl_print_format("%[UNKNOWN %Q(%]", print->to, print->context, print->prefix, print->context);
@@ -294,7 +294,7 @@ extern "C" {
 
     fake_main_t * const main = (fake_main_t *) print->custom;
 
-    if (fll_error_print(*print, F_status_set_fine(main->setting.state.status), function, fll_error_file_flag_none_e) == F_known_not) return F_false;
+    if (fll_error_print(print, F_status_set_fine(main->setting.state.status), function, fll_error_file_flag_none_e) == F_known_not) return F_false;
 
     return F_true;
   }
@@ -308,7 +308,7 @@ extern "C" {
 
     fake_main_t * const main = (fake_main_t *) print->custom;
 
-    fll_error_file_print(*print, F_status_set_fine(main->setting.state.status), function, fll_error_file_flag_fallback_e, name, operation, type);
+    fll_error_file_print(print, F_status_set_fine(main->setting.state.status), function, fll_error_file_flag_fallback_e, name, operation, type);
 
     return F_none;
   }
@@ -334,7 +334,7 @@ extern "C" {
 
     fake_main_t * const main = (fake_main_t *) print->custom;
 
-    fll_error_file_print(*print, F_status_set_fine(main->setting.state.status), function, fll_error_file_flag_simple_e, name, operation, type);
+    fll_error_file_print(print, F_status_set_fine(main->setting.state.status), function, fll_error_file_flag_simple_e, name, operation, type);
 
     return F_none;
   }
@@ -380,7 +380,7 @@ extern "C" {
       return F_false;
     }
 
-    if (fll_error_print(*print, main->setting.state.status, function, fll_error_file_flag_none_e) == F_known_not && fallback) {
+    if (fll_error_print(print, main->setting.state.status, function, fll_error_file_flag_none_e) == F_known_not && fallback) {
       if (print->verbosity > f_console_verbosity_quiet_e) {
         f_string_static_t function_s = f_string_static_t_initialize;
         function_s.string = function;
index 272a87e74f1d68737a3d2af9b6334ab687319155..19b3e6736539ec43fd50eef52e3ff02a6500abb4 100644 (file)
@@ -89,47 +89,46 @@ extern "C" {
 
     f_file_stream_lock(print->to);
 
-    fll_program_print_help_header(*print, fake_program_name_long_s, fake_program_version_s);
+    fll_program_print_help_header(print, fake_program_name_long_s, fake_program_version_s);
 
-    fll_program_print_help_option_standard(*print);
+    fll_program_print_help_option_standard(print);
 
     f_print_dynamic_raw(f_string_eol_s, print->to);
 
-    fll_program_print_help_option(*print, fake_short_define_s, fake_long_define_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "  Append an additional define after defines from settings file.");
-    fll_program_print_help_option(*print, fake_short_fakefile_s, fake_long_fakefile_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Use this fakefile.");
-    fll_program_print_help_option(*print, fake_short_mode_s, fake_long_mode_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "    Use this mode when processing the build settings.");
-    fll_program_print_help_option(*print, fake_short_process_s, fake_long_process_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Process name for storing build states.");
-    fll_program_print_help_option(*print, fake_short_settings_s, fake_long_settings_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Use this settings file.");
+    fll_program_print_help_option(print, fake_short_define_s, fake_long_define_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "  Append an additional define after defines from settings file.");
+    fll_program_print_help_option(print, fake_short_fakefile_s, fake_long_fakefile_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Use this fakefile.");
+    fll_program_print_help_option(print, fake_short_mode_s, fake_long_mode_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "    Use this mode when processing the build settings.");
+    fll_program_print_help_option(print, fake_short_process_s, fake_long_process_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Process name for storing build states.");
+    fll_program_print_help_option(print, fake_short_settings_s, fake_long_settings_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Use this settings file.");
 
     f_print_dynamic_raw(f_string_eol_s, print->to);
 
-    fll_program_print_help_option(*print, fake_short_build_s, fake_long_build_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "    Specify a custom build directory.");
-    fll_program_print_help_option(*print, fake_short_data_s, fake_long_data_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "     Specify a custom path to the data files.");
-    fll_program_print_help_option(*print, fake_short_documents_s, fake_long_documents_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Specify a custom path to the documents files.");
-    fll_program_print_help_option(*print, fake_short_licenses_s, fake_long_licenses_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Specify a custom path to the licenses files.");
-    fll_program_print_help_option(*print, fake_short_sources_s, fake_long_sources_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "  Specify a custom path to the source files.");
-    fll_program_print_help_option(*print, fake_short_work_s, fake_long_work_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "     Use includes/libraries/programs from this directory instead of system.");
+    fll_program_print_help_option(print, fake_short_build_s, fake_long_build_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "    Specify a custom build directory.");
+    fll_program_print_help_option(print, fake_short_data_s, fake_long_data_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "     Specify a custom path to the data files.");
+    fll_program_print_help_option(print, fake_short_documents_s, fake_long_documents_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Specify a custom path to the documents files.");
+    fll_program_print_help_option(print, fake_short_licenses_s, fake_long_licenses_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Specify a custom path to the licenses files.");
+    fll_program_print_help_option(print, fake_short_sources_s, fake_long_sources_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "  Specify a custom path to the source files.");
+    fll_program_print_help_option(print, fake_short_work_s, fake_long_work_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "     Use includes/libraries/programs from this directory instead of system.");
 
     fl_print_format("%r%r %[Special Options:%] ", print->to, f_string_eol_s, f_string_eol_s, print->set->important, print->set->important);
 
-    fll_program_print_help_option_long(*print, fake_long_documents_disabled_s, f_console_symbol_long_normal_s, "   Forcibly do not build documents files.");
-    fll_program_print_help_option_long(*print, fake_long_documents_enabled_s, f_console_symbol_long_normal_s, "    Forcibly do build documents files.");
-    fll_program_print_help_option_long(*print, fake_long_shared_disabled_s, f_console_symbol_long_normal_s, "Forcibly do not build shared files.");
-    fll_program_print_help_option_long(*print, fake_long_shared_enabled_s, f_console_symbol_long_normal_s, " Forcibly do build shared files.");
-    fll_program_print_help_option_long(*print, fake_long_static_disabled_s, f_console_symbol_long_normal_s, "Forcibly do not build static files.");
-    fll_program_print_help_option_long(*print, fake_long_static_enabled_s, f_console_symbol_long_normal_s, " Forcibly do build static files.");
+    fll_program_print_help_option_long(print, fake_long_documents_disabled_s, f_console_symbol_long_normal_s, "   Forcibly do not build documents files.");
+    fll_program_print_help_option_long(print, fake_long_documents_enabled_s, f_console_symbol_long_normal_s, "    Forcibly do build documents files.");
+    fll_program_print_help_option_long(print, fake_long_shared_disabled_s, f_console_symbol_long_normal_s, "Forcibly do not build shared files.");
+    fll_program_print_help_option_long(print, fake_long_shared_enabled_s, f_console_symbol_long_normal_s, " Forcibly do build shared files.");
+    fll_program_print_help_option_long(print, fake_long_static_disabled_s, f_console_symbol_long_normal_s, "Forcibly do not build static files.");
+    fll_program_print_help_option_long(print, fake_long_static_enabled_s, f_console_symbol_long_normal_s, " Forcibly do build static files.");
 
-    fl_print_format("%r%r %[Operations:%] ", print->to, f_string_eol_s, f_string_eol_s, print->set->important, print->set->important);
+    fl_print_format("%r %[Operations:%] ", print->to, f_string_eol_s, print->set->important, print->set->important);
 
-    fll_program_print_help_option_other(*print, fake_other_operation_build_s, "   Build or compile the code based on build settings file.");
-    fll_program_print_help_option_other(*print, fake_other_operation_clean_s, "   Delete all build files.");
-    fll_program_print_help_option_other(*print, fake_other_operation_make_s, "    Build or compile the code based on fakefile (default).");
-    fll_program_print_help_option_other(*print, fake_other_operation_skeleton_s, "Build a skeleton directory structure.");
+    fll_program_print_help_option_other(print, fake_other_operation_build_s, "   Build or compile the code based on build settings file.");
+    fll_program_print_help_option_other(print, fake_other_operation_clean_s, "   Delete all build files.");
+    fll_program_print_help_option_other(print, fake_other_operation_make_s, "    Build or compile the code based on fakefile (default).");
+    fll_program_print_help_option_other(print, fake_other_operation_skeleton_s, "Build a skeleton directory structure.");
 
     f_print_dynamic_raw(f_string_eol_s, print->to);
-    f_print_dynamic_raw(f_string_eol_s, print->to);
 
-    fll_program_print_help_usage(*print, fake_program_name_s, fake_program_help_parameters_s);
+    fll_program_print_help_usage(print, fake_program_name_s, fake_program_help_parameters_s);
 
     fl_print_format("%r  When performing the %[%r%] operation, the", print->to, f_string_eol_s, print->set->notable, fake_other_operation_build_s, print->set->notable);
     fl_print_format(" %[%r%r%] parameter specifies a name (limited to alpha-numeric, underscore, and dash) to be used in addition to the global.%r", print->to, print->set->notable, f_console_symbol_long_normal_s, fake_long_mode_s, print->set->notable, f_string_eol_s);
index 0fa26ddaa6b9dfe7645480ec64d1839279efe1a8..ddbab0ded21fd8baf7473e85807f0bcda06f4b7c 100644 (file)
@@ -158,7 +158,7 @@ extern "C" {
 
         const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
 
-        setting->state.status = fll_program_parameter_process_context(choices, modes, F_true, main);
+        setting->state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
 
         if (F_status_is_error(setting->state.status)) {
           fll_error_print(main->error, F_status_set_fine(setting->state.status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e);
@@ -179,7 +179,7 @@ extern "C" {
 
         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 };
 
-        setting->state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
+        setting->state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
 
         if (F_status_is_error(setting->state.status)) {
           fll_error_print(main->error, F_status_set_fine(setting->state.status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
index 3e27513ab81b10ecd2dd9238363ec056d3603cd0..a3d6be43ff44d89d6721d75c72a1a62c0b8968f6 100644 (file)
@@ -37,7 +37,7 @@ extern "C" {
 
         const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
 
-        status = fll_program_parameter_process_context(choices, modes, F_true, main);
+        status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
 
         if (F_status_is_error(status)) {
           fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e);
@@ -58,7 +58,7 @@ extern "C" {
 
         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 };
 
-        status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
+        status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
 
         if (F_status_is_error(status)) {
           fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
@@ -79,13 +79,13 @@ extern "C" {
     }
 
     if (main->parameters.array[firewall_parameter_version_e].result & f_console_result_found_e) {
-      fll_program_print_version(main->message, firewall_program_version_s);
+      fll_program_print_version(&main->message, firewall_program_version_s);
 
       return F_none;
     }
 
     if (main->parameters.array[firewall_parameter_copyright_e].result & f_console_result_found_e) {
-      fll_program_print_copyright(main->message);
+      fll_program_print_copyright(&main->message);
 
       return F_none;
     }
index 09a0c725bfe0472bdc86c2e246c429f13bc33625..03333d08c85fa11c587b869fd4b7daa8a3b06de1 100644 (file)
@@ -2,8 +2,17 @@
 
 int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
-  fll_program_data_t data = fll_program_data_t_initialize;
-  firewall_setting_t setting = firewall_setting_t_initialize;
+  firewall_main_t data = firewall_main_t_initialize;
+
+  data.program.debug.flag |= firewall_read_print_flag_debug_e;
+  data.program.error.flag |= firewall_read_print_flag_error_e;
+  data.program.message.flag |= firewall_read_print_flag_message_e;
+  data.program.warning.flag |= firewall_read_print_flag_warning_e;
+  data.program.message.custom = (void *) &data;
+  data.program.output.custom = (void *) &data;
+  data.program.error.custom = (void *) &data;
+  data.program.warning.custom = (void *) &data;
+  data.program.debug.custom = (void *) &data;
 
   f_console_parameter_t parameters[] = firewall_console_parameter_t_initialize;
   data.parameters.array = parameters;
index 497a527a48ef28cc8b3605dd712e91e36c2e5419..83de53b16f71b34136d70dbffade00688573ac26 100644 (file)
@@ -118,7 +118,7 @@ extern "C" {
 
         const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
 
-        setting->state.status = fll_program_parameter_process_context(choices, modes, F_true, main);
+        setting->state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
 
         if (F_status_is_error(setting->state.status)) {
           fll_error_print(main->error, F_status_set_fine(setting->state.status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e);
@@ -139,7 +139,7 @@ extern "C" {
 
         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 };
 
-        setting->state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
+        setting->state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
 
         if (F_status_is_error(setting->state.status)) {
           fll_error_print(main->error, F_status_set_fine(setting->state.status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
index 1dee002956e55a809e9568723fc655149d543a70..6eb506ecfac57b42014a10f0e57af5b1fc1e4d10 100644 (file)
@@ -32,7 +32,7 @@ extern "C" {
 
         const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
 
-        status = fll_program_parameter_process_context(choices, modes, F_true, main);
+        status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
 
         if (F_status_is_error(status)) {
           fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e);
@@ -53,7 +53,7 @@ extern "C" {
 
         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 };
 
-        status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
+        status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
 
         if (F_status_is_error(status)) {
           fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
@@ -74,13 +74,13 @@ extern "C" {
     }
 
     if (main->parameters.array[fss_basic_list_read_parameter_version_e].result & f_console_result_found_e) {
-      fll_program_print_version(main->message, fss_basic_list_read_program_version_s);
+      fll_program_print_version(&main->message, fss_basic_list_read_program_version_s);
 
       return F_none;
     }
 
     if (main->parameters.array[fss_basic_list_read_parameter_copyright_e].result & f_console_result_found_e) {
-      fll_program_print_copyright(main->message);
+      fll_program_print_copyright(&main->message);
 
       return F_none;
     }
@@ -216,7 +216,7 @@ extern "C" {
         for (f_array_length_t i = 0; i < main->parameters.array[fss_basic_list_read_parameter_delimit_e].values.used; ++i) {
 
           if (!((++main->signal_check) % fss_basic_list_read_signal_check_d)) {
-            if (fll_program_standard_signal_received(main)) {
+            if (fll_program_standard_signal_received(&main->program)) {
               fll_program_print_signal_received(main->warning, main->signal_received);
 
               status = F_status_set_error(F_interrupt);
@@ -413,7 +413,7 @@ extern "C" {
         for (f_array_length_t i = 0; i < main->parameters.remaining.used; ++i) {
 
           if (!((++main->signal_check) % fss_basic_list_read_signal_check_d)) {
-            if (fll_program_standard_signal_received(main)) {
+            if (fll_program_standard_signal_received(&main->program)) {
               fll_program_print_signal_received(main->warning, main->signal_received);
 
               status = F_status_set_error(F_interrupt);
@@ -480,7 +480,7 @@ extern "C" {
             for (size_read = 0; size_read < size_file; size_read += size_block) {
 
               // The signal check is always performed on each pass.
-              if (size_file > fss_basic_list_read_block_max && fll_program_standard_signal_received(main)) {
+              if (size_file > fss_basic_list_read_block_max && fll_program_standard_signal_received(&main->program)) {
                 fll_program_print_signal_received(main->warning, main->signal_received);
 
                 status = F_status_set_error(F_interrupt);
index f4f6dbcf582af6570efda7904d4f073b55fbb41d..dbb3c360cd4419aa4f911cce9a9772b6014f440c 100644 (file)
@@ -2,8 +2,17 @@
 
 int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
-  fll_program_data_t data = fll_program_data_t_initialize;
-  fss_basic_list_read_setting_t setting = fss_basic_list_read_setting_t_initialize;
+  fss_basic_list_read_main_t data = fss_basic_list_read_main_t_initialize;
+
+  data.program.debug.flag |= fss_basic_list_read_print_flag_debug_e;
+  data.program.error.flag |= fss_basic_list_read_print_flag_error_e;
+  data.program.message.flag |= fss_basic_list_read_print_flag_message_e;
+  data.program.warning.flag |= fss_basic_list_read_print_flag_warning_e;
+  data.program.message.custom = (void *) &data;
+  data.program.output.custom = (void *) &data;
+  data.program.error.custom = (void *) &data;
+  data.program.warning.custom = (void *) &data;
+  data.program.debug.custom = (void *) &data;
 
   f_console_parameter_t parameters[] = fss_basic_list_read_console_parameter_t_initialize;
   data.parameters.array = parameters;
index 1c8ef6a9df7e89b9089b69f7905f48492ce560fe..094503593a0c0c5d59c182d413aa86244dfef46d 100644 (file)
@@ -87,7 +87,7 @@ extern "C" {
     for (f_array_length_t i = 0; i < data->depths.used; ++i) {
 
       if (!((++main->signal_check) % fss_basic_list_read_signal_check_d)) {
-        if (fll_program_standard_signal_received(main)) {
+        if (fll_program_standard_signal_received(&main->program)) {
           fll_program_print_signal_received(main->warning, main->signal_received);
 
           return F_status_set_error(F_interrupt);
@@ -175,7 +175,7 @@ extern "C" {
       for (f_array_length_t j = i + 1; j < data->depths.used; ++j) {
 
         if (!((++main->signal_check) % fss_basic_list_read_signal_check_d)) {
-          if (fll_program_standard_signal_received(main)) {
+          if (fll_program_standard_signal_received(&main->program)) {
             fll_program_print_signal_received(main->warning, main->signal_received);
 
             return F_status_set_error(F_interrupt);
@@ -348,7 +348,7 @@ extern "C" {
       if (!names[i]) continue;
 
       if (!((++main->signal_check) % fss_basic_list_read_signal_check_d)) {
-        if (fll_program_standard_signal_received(main)) {
+        if (fll_program_standard_signal_received(&main->program)) {
           fll_program_print_signal_received(main->warning, main->signal_received);
 
           return F_status_set_error(F_interrupt);
@@ -396,7 +396,7 @@ extern "C" {
       if (!names[i]) continue;
 
       if (!((++main->signal_check) % fss_basic_list_read_signal_check_d)) {
-        if (fll_program_standard_signal_received(main)) {
+        if (fll_program_standard_signal_received(&main->program)) {
           fll_program_print_signal_received(main->warning, main->signal_received);
 
           return F_status_set_error(F_interrupt);
@@ -499,7 +499,7 @@ extern "C" {
       for (i = range.start; i <= range.stop; ++i) {
 
         if (!((++main->signal_check) % fss_basic_list_read_signal_check_d)) {
-          if (fll_program_standard_signal_received(main)) {
+          if (fll_program_standard_signal_received(&main->program)) {
             fll_program_print_signal_received(main->warning, main->signal_received);
 
             return F_status_set_error(F_interrupt);
@@ -582,7 +582,7 @@ extern "C" {
       if (!names[i]) continue;
 
       if (!((++main->signal_check) % fss_basic_list_read_signal_check_d)) {
-        if (fll_program_standard_signal_received(main)) {
+        if (fll_program_standard_signal_received(&main->program)) {
           fll_program_print_signal_received(main->warning, main->signal_received);
 
           return F_status_set_error(F_interrupt);
@@ -622,7 +622,7 @@ extern "C" {
       if (!names[i]) continue;
 
       if (!((++main->signal_check) % fss_basic_list_read_signal_check_d)) {
-        if (fll_program_standard_signal_received(main)) {
+        if (fll_program_standard_signal_received(&main->program)) {
           fll_program_print_signal_received(main->warning, main->signal_received);
 
           return F_status_set_error(F_interrupt);
@@ -739,7 +739,7 @@ extern "C" {
       if (!names[at]) continue;
 
       if (!((++main->signal_check) % fss_basic_list_read_signal_check_d)) {
-        if (fll_program_standard_signal_received(main)) {
+        if (fll_program_standard_signal_received(&main->program)) {
           fll_program_print_signal_received(main->warning, main->signal_received);
 
           return F_status_set_error(F_interrupt);
index 6cf2de53b28624e33b1eaab035778e13873478f6..d7c1845c4559d35259706b7e4ee35f68127c9c66 100644 (file)
@@ -117,7 +117,7 @@ extern "C" {
 
         const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
 
-        setting->state.status = fll_program_parameter_process_context(choices, modes, F_true, main);
+        setting->state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
 
         if (F_status_is_error(setting->state.status)) {
           fll_error_print(main->error, F_status_set_fine(setting->state.status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e);
@@ -138,7 +138,7 @@ extern "C" {
 
         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 };
 
-        setting->state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
+        setting->state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
 
         if (F_status_is_error(setting->state.status)) {
           fll_error_print(main->error, F_status_set_fine(setting->state.status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
index d4c7dbe27a7c4a7520f1300602c1339e71394567..afc1f4791325f84ada1e9ccb0d65ce617174dac5 100644 (file)
@@ -32,7 +32,7 @@ extern "C" {
 
         const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
 
-        status = fll_program_parameter_process_context(choices, modes, F_true, main);
+        status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
 
         if (F_status_is_error(status)) {
           fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e);
@@ -53,7 +53,7 @@ extern "C" {
 
         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 };
 
-        status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
+        status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
 
         if (F_status_is_error(status)) {
           fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
@@ -216,7 +216,7 @@ extern "C" {
         for (f_array_length_t i = 0; i < main->parameters.array[fss_basic_read_parameter_delimit_e].values.used; ++i) {
 
           if (!((++main->signal_check) % fss_basic_read_signal_check_d)) {
-            if (fll_program_standard_signal_received(main)) {
+            if (fll_program_standard_signal_received(&main->program)) {
               fll_program_print_signal_received(main->warning, main->signal_received);
 
               status = F_status_set_error(F_interrupt);
@@ -421,7 +421,7 @@ extern "C" {
         for (f_array_length_t i = 0; i < main->parameters.remaining.used; ++i) {
 
           if (!((++main->signal_check) % fss_basic_read_signal_check_d)) {
-            if (fll_program_standard_signal_received(main)) {
+            if (fll_program_standard_signal_received(&main->program)) {
               fll_program_print_signal_received(main->warning, main->signal_received);
 
               status = F_status_set_error(F_signal);
@@ -487,7 +487,7 @@ extern "C" {
             for (size_read = 0; size_read < size_file; size_read += size_block) {
 
               // The signal check is always performed on each pass.
-              if (size_file > fss_basic_read_block_max && fll_program_standard_signal_received(main)) {
+              if (size_file > fss_basic_read_block_max && fll_program_standard_signal_received(&main->program)) {
                 fll_program_print_signal_received(main->warning, main->signal_received);
 
                 status = F_status_set_error(F_interrupt);
index 33b3e5880efa98791ffd17d5423fc9b4b50366e9..b7102534887c13ab21a4787819f0027d2772e4e2 100644 (file)
@@ -2,8 +2,17 @@
 
 int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
-  fll_program_data_t data = fll_program_data_t_initialize;
-  fss_basic_read_setting_t setting = fss_basic_read_setting_t_initialize;
+  fss_basic_read_main_t data = fss_basic_read_main_t_initialize;
+
+  data.program.debug.flag |= fss_basic_read_print_flag_debug_e;
+  data.program.error.flag |= fss_basic_read_print_flag_error_e;
+  data.program.message.flag |= fss_basic_read_print_flag_message_e;
+  data.program.warning.flag |= fss_basic_read_print_flag_warning_e;
+  data.program.message.custom = (void *) &data;
+  data.program.output.custom = (void *) &data;
+  data.program.error.custom = (void *) &data;
+  data.program.warning.custom = (void *) &data;
+  data.program.debug.custom = (void *) &data;
 
   f_console_parameter_t parameters[] = fss_basic_read_console_parameter_t_initialize;
   data.parameters.array = parameters;
index 226e44d26f85711ad5b80e4c677b5c67c1b6f860..f53644e54098ce0ad3cf9201e25185848c9ec46f 100644 (file)
@@ -64,7 +64,7 @@ extern "C" {
     for (f_array_length_t i = 0; i < data->depths.used; ++i) {
 
       if (!((++main->signal_check) % fss_basic_read_signal_check_d)) {
-        if (fll_program_standard_signal_received(main)) {
+        if (fll_program_standard_signal_received(&main->program)) {
           fll_program_print_signal_received(main->warning, main->signal_received);
 
           return F_status_set_error(F_interrupt);
@@ -152,7 +152,7 @@ extern "C" {
       for (f_array_length_t j = i + 1; j < data->depths.used; ++j) {
 
         if (!((++main->signal_check) % fss_basic_read_signal_check_d)) {
-          if (fll_program_standard_signal_received(main)) {
+          if (fll_program_standard_signal_received(&main->program)) {
             fll_program_print_signal_received(main->warning, main->signal_received);
 
             return F_status_set_error(F_interrupt);
@@ -373,7 +373,7 @@ extern "C" {
       if (!names[i]) continue;
 
       if (!((++main->signal_check) % fss_basic_read_signal_check_d)) {
-        if (fll_program_standard_signal_received(main)) {
+        if (fll_program_standard_signal_received(&main->program)) {
           fll_program_print_signal_received(main->warning, main->signal_received);
 
           return F_status_set_error(F_interrupt);
@@ -456,7 +456,7 @@ extern "C" {
       if (!names[at]) continue;
 
       if (!((++main->signal_check) % fss_basic_read_signal_check_d)) {
-        if (fll_program_standard_signal_received(main)) {
+        if (fll_program_standard_signal_received(&main->program)) {
           fll_program_print_signal_received(main->warning, main->signal_received);
 
           return F_status_set_error(F_interrupt);
@@ -489,7 +489,7 @@ extern "C" {
       if (!names[i]) continue;
 
       if (!((++main->signal_check) % fss_basic_read_signal_check_d)) {
-        if (fll_program_standard_signal_received(main)) {
+        if (fll_program_standard_signal_received(&main->program)) {
           fll_program_print_signal_received(main->warning, main->signal_received);
 
           return F_status_set_error(F_interrupt);
@@ -640,7 +640,7 @@ extern "C" {
       if (!names[i]) continue;
 
       if (!((++main->signal_check) % fss_basic_read_signal_check_d)) {
-        if (fll_program_standard_signal_received(main)) {
+        if (fll_program_standard_signal_received(&main->program)) {
           fll_program_print_signal_received(main->warning, main->signal_received);
 
           return F_status_set_error(F_interrupt);
index 011adc695bdcca65f2d8f73ec45915ebb8def305..96c64c722299abf7fc7c699755ef490a8bb6e27b 100644 (file)
@@ -116,7 +116,7 @@ extern "C" {
 
         const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
 
-        setting->state.status = fll_program_parameter_process_context(choices, modes, F_true, main);
+        setting->state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
 
         if (F_status_is_error(setting->state.status)) {
           fll_error_print(main->error, F_status_set_fine(setting->state.status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e);
@@ -137,7 +137,7 @@ extern "C" {
 
         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 };
 
-        setting->state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
+        setting->state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
 
         if (F_status_is_error(setting->state.status)) {
           fll_error_print(main->error, F_status_set_fine(setting->state.status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
index 4859cf635e74fb5fdf7205e6d7501616c0d929d8..8451edf6352b3bfa7ee24573ec74ee9ec81f40e7 100644 (file)
@@ -32,7 +32,7 @@ extern "C" {
 
         const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
 
-        status = fll_program_parameter_process_context(choices, modes, F_true, main);
+        status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
 
         if (F_status_is_error(status)) {
           fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e);
@@ -53,7 +53,7 @@ extern "C" {
 
         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 };
 
-        status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
+        status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
 
         if (F_status_is_error(status)) {
           fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
@@ -305,7 +305,7 @@ extern "C" {
         for (f_array_length_t i = 0; i < main->parameters.remaining.used; ++i) {
 
           if (!((++main->signal_check) % fss_embedded_list_read_signal_check_d)) {
-            if (fll_program_standard_signal_received(main)) {
+            if (fll_program_standard_signal_received(&main->program)) {
               fll_program_print_signal_received(main->warning, main->signal_received);
 
               status = F_status_set_error(F_interrupt);
@@ -380,7 +380,7 @@ extern "C" {
           for (size_read = 0; size_read < size_file; size_read += size_block) {
 
             // The signal check is always performed on each pass.
-            if (size_file > fss_embedded_list_read_block_max && fll_program_standard_signal_received(main)) {
+            if (size_file > fss_embedded_list_read_block_max && fll_program_standard_signal_received(&main->program)) {
               fll_program_print_signal_received(main->warning, main->signal_received);
 
               status = F_status_set_error(F_interrupt);
index db1288bc6c72a006de3ad58aaafa2ef6934962d5..9ea6188e60a224a66409011da9b7ffdd1613cc69 100644 (file)
@@ -2,8 +2,17 @@
 
 int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
-  fll_program_data_t data = fll_program_data_t_initialize;
-  fss_extended_list_read_setting_t setting = fss_extended_list_read_setting_t_initialize;
+  fss_embedded_list_read_main_t data = fss_embedded_list_read_main_t_initialize;
+
+  data.program.debug.flag |= fss_embedded_list_read_print_flag_debug_e;
+  data.program.error.flag |= fss_embedded_list_read_print_flag_error_e;
+  data.program.message.flag |= fss_embedded_list_read_print_flag_message_e;
+  data.program.warning.flag |= fss_embedded_list_read_print_flag_warning_e;
+  data.program.message.custom = (void *) &data;
+  data.program.output.custom = (void *) &data;
+  data.program.error.custom = (void *) &data;
+  data.program.warning.custom = (void *) &data;
+  data.program.debug.custom = (void *) &data;
 
   f_console_parameter_t parameters[] = fss_embedded_list_read_console_parameter_t_initialize;
   data.parameters.array = parameters;
index 8bdb89549608ed22f3baac68fedb06ee0853c6c5..fcec750308067c7799dc553caba5e415ce1b5951 100644 (file)
@@ -124,7 +124,7 @@ extern "C" {
 
         const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
 
-        setting->state.status = fll_program_parameter_process_context(choices, modes, F_true, main);
+        setting->state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
 
         if (F_status_is_error(setting->state.status)) {
           fll_error_print(main->error, F_status_set_fine(setting->state.status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e);
@@ -145,7 +145,7 @@ extern "C" {
 
         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 };
 
-        setting->state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
+        setting->state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
 
         if (F_status_is_error(setting->state.status)) {
           fll_error_print(main->error, F_status_set_fine(setting->state.status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
index 17cd6f7e8326dde669a43e68f05caf043fb2dec5..b03c7c7fd90d1fc5421eed4b4c7af3931549dfc7 100644 (file)
@@ -32,7 +32,7 @@ extern "C" {
 
         const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
 
-        status = fll_program_parameter_process_context(choices, modes, F_true, main);
+        status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
 
         if (F_status_is_error(status)) {
           fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e);
@@ -53,7 +53,7 @@ extern "C" {
 
         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 };
 
-        status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
+        status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
 
         if (F_status_is_error(status)) {
           fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
@@ -216,7 +216,7 @@ extern "C" {
         for (f_array_length_t i = 0; i < main->parameters.array[fss_extended_list_read_parameter_delimit_e].values.used; ++i) {
 
           if (!((++main->signal_check) % fss_extended_list_read_signal_check_d)) {
-            if (fll_program_standard_signal_received(main)) {
+            if (fll_program_standard_signal_received(&main->program)) {
               fll_program_print_signal_received(main->warning, main->signal_received);
 
               status = F_status_set_error(F_interrupt);
@@ -421,7 +421,7 @@ extern "C" {
         for (f_array_length_t i = 0; i < main->parameters.remaining.used; ++i) {
 
           if (!((++main->signal_check) % fss_extended_list_read_signal_check_d)) {
-            if (fll_program_standard_signal_received(main)) {
+            if (fll_program_standard_signal_received(&main->program)) {
               fll_program_print_signal_received(main->warning, main->signal_received);
 
               status = F_status_set_error(F_interrupt);
@@ -487,7 +487,7 @@ extern "C" {
             for (size_read = 0; size_read < size_file; size_read += size_block) {
 
               // The signal check is always performed on each pass.
-              if (size_file > fss_extended_list_read_block_max && fll_program_standard_signal_received(main)) {
+              if (size_file > fss_extended_list_read_block_max && fll_program_standard_signal_received(&main->program)) {
                 fll_program_print_signal_received(main->warning, main->signal_received);
 
                 status = F_status_set_error(F_interrupt);
index aff8ca90eabba275e3f91963768e55b5b95dd727..2772e1193087c0641f386d40a5fcebdfb40c5462 100644 (file)
@@ -2,8 +2,17 @@
 
 int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
-  fll_program_data_t data = fll_program_data_t_initialize;
-  fss_extended_list_read_setting_t setting = fss_extended_list_read_setting_t_initialize;
+  fss_extended_list_read_main_t data = fss_extended_list_read_main_t_initialize;
+
+  data.program.debug.flag |= fss_extended_list_read_print_flag_debug_e;
+  data.program.error.flag |= fss_extended_list_read_print_flag_error_e;
+  data.program.message.flag |= fss_extended_list_read_print_flag_message_e;
+  data.program.warning.flag |= fss_extended_list_read_print_flag_warning_e;
+  data.program.message.custom = (void *) &data;
+  data.program.output.custom = (void *) &data;
+  data.program.error.custom = (void *) &data;
+  data.program.warning.custom = (void *) &data;
+  data.program.debug.custom = (void *) &data;
 
   f_console_parameter_t parameters[] = fss_extended_list_read_console_parameter_t_initialize;
   data.parameters.array = parameters;
index c724fec94b78aae6523af6e5f1540fb417ec1d09..f7b1d3446ff88173c1e08d5d70d05f8b56a375c0 100644 (file)
@@ -87,7 +87,7 @@ extern "C" {
     for (f_array_length_t i = 0; i < data->depths.used; ++i) {
 
       if (!((++main->signal_check) % fss_extended_list_read_signal_check_d)) {
-        if (fll_program_standard_signal_received(main)) {
+        if (fll_program_standard_signal_received(&main->program)) {
           fll_program_print_signal_received(main->warning, main->signal_received);
 
           return F_status_set_error(F_interrupt);
@@ -175,7 +175,7 @@ extern "C" {
       for (f_array_length_t j = i + 1; j < data->depths.used; ++j) {
 
         if (!((++main->signal_check) % fss_extended_list_read_signal_check_d)) {
-          if (fll_program_standard_signal_received(main)) {
+          if (fll_program_standard_signal_received(&main->program)) {
             fll_program_print_signal_received(main->warning, main->signal_received);
 
             return F_status_set_error(F_interrupt);
index 3b82d3cb61f91a0b14def7736c735893514c6c96..844e7ec0db44a192d80d78d38b2500e6cd3dada3 100644 (file)
@@ -117,7 +117,7 @@ extern "C" {
 
         const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
 
-        setting->state.status = fll_program_parameter_process_context(choices, modes, F_true, main);
+        setting->state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
 
         if (F_status_is_error(setting->state.status)) {
           fll_error_print(main->error, F_status_set_fine(setting->state.status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e);
@@ -138,7 +138,7 @@ extern "C" {
 
         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 };
 
-        setting->state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
+        setting->state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
 
         if (F_status_is_error(setting->state.status)) {
           fll_error_print(main->error, F_status_set_fine(setting->state.status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
index 6980f66720e7f2fd6352dbca2491c0081b7e75b1..ab7645119fc2846338e86e89bd1b20ec683f2253 100644 (file)
@@ -32,7 +32,7 @@ extern "C" {
 
         const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
 
-        status = fll_program_parameter_process_context(choices, modes, F_true, main);
+        status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
 
         if (F_status_is_error(status)) {
           fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e);
@@ -53,7 +53,7 @@ extern "C" {
 
         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 };
 
-        status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
+        status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
 
         if (F_status_is_error(status)) {
           fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
@@ -215,7 +215,7 @@ extern "C" {
         for (f_array_length_t i = 0; i < main->parameters.array[fss_extended_read_parameter_delimit_e].values.used; ++i) {
 
           if (!((++main->signal_check) % fss_extended_read_signal_check_d)) {
-            if (fll_program_standard_signal_received(main)) {
+            if (fll_program_standard_signal_received(&main->program)) {
               fll_program_print_signal_received(main->warning, main->signal_received);
 
               status = F_status_set_error(F_signal);
@@ -420,7 +420,7 @@ extern "C" {
         for (f_array_length_t i = 0; i < main->parameters.remaining.used; ++i) {
 
           if (!((++main->signal_check) % fss_extended_read_signal_check_d)) {
-            if (fll_program_standard_signal_received(main)) {
+            if (fll_program_standard_signal_received(&main->program)) {
               fll_program_print_signal_received(main->warning, main->signal_received);
 
               status = F_status_set_error(F_signal);
@@ -486,7 +486,7 @@ extern "C" {
             for (size_read = 0; size_read < size_file; size_read += size_block) {
 
               // The signal check is always performed on each pass.
-              if (size_file > fss_extended_read_block_max && fll_program_standard_signal_received(main)) {
+              if (size_file > fss_extended_read_block_max && fll_program_standard_signal_received(&main->program)) {
                 fll_program_print_signal_received(main->warning, main->signal_received);
 
                 status = F_status_set_error(F_interrupt);
index 5998ee6159a304f8cdb61297632ea1268a656083..64b0324d7e89a5f0dab99cdef16b2808c6d1f52a 100644 (file)
@@ -2,8 +2,17 @@
 
 int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
-  fll_program_data_t data = fll_program_data_t_initialize;
-  fss_extended_read_setting_t setting = fss_extended_read_setting_t_initialize;
+  fss_extended_read_main_t data = fss_extended_read_main_t_initialize;
+
+  data.program.debug.flag |= fss_extended_read_print_flag_debug_e;
+  data.program.error.flag |= fss_extended_read_print_flag_error_e;
+  data.program.message.flag |= fss_extended_read_print_flag_message_e;
+  data.program.warning.flag |= fss_extended_read_print_flag_warning_e;
+  data.program.message.custom = (void *) &data;
+  data.program.output.custom = (void *) &data;
+  data.program.error.custom = (void *) &data;
+  data.program.warning.custom = (void *) &data;
+  data.program.debug.custom = (void *) &data;
 
   f_console_parameter_t parameters[] = fss_extended_read_console_parameter_t_initialize;
   data.parameters.array = parameters;
index f1e2ed8b30de7c82d6a2fd7768899c4139f80317..84d2c9cab1d538722c8d9f44710b662d78c2ff12 100644 (file)
@@ -91,7 +91,7 @@ extern "C" {
     for (f_array_length_t i = 0; i < data->depths.used; ++i) {
 
       if (!((++main->signal_check) % fss_extended_read_signal_check_d)) {
-        if (fll_program_standard_signal_received(main)) {
+        if (fll_program_standard_signal_received(&main->program)) {
           fll_program_print_signal_received(main->warning, main->signal_received);
 
           return F_status_set_error(F_interrupt);
@@ -179,7 +179,7 @@ extern "C" {
       for (f_array_length_t j = i + 1; j < data->depths.used; ++j) {
 
         if (!((++main->signal_check) % fss_extended_read_signal_check_d)) {
-          if (fll_program_standard_signal_received(main)) {
+          if (fll_program_standard_signal_received(&main->program)) {
             fll_program_print_signal_received(main->warning, main->signal_received);
 
             return F_status_set_error(F_interrupt);
index de0f0f57a5a32eccce5e5cc6a43e8abb5138b509..271f9dbde8122ad3511c345cdc36fc2e38b51410 100644 (file)
@@ -84,7 +84,7 @@ extern "C" {
 
         const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
 
-        setting->state.status = fll_program_parameter_process_context(choices, modes, F_true, main);
+        setting->state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
 
         if (F_status_is_error(setting->state.status)) {
           fll_error_print(main->error, F_status_set_fine(setting->state.status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e);
@@ -105,7 +105,7 @@ extern "C" {
 
         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 };
 
-        setting->state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
+        setting->state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
 
         if (F_status_is_error(setting->state.status)) {
           fll_error_print(main->error, F_status_set_fine(setting->state.status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
index 3e834d8ae2a9ba2b4494bfc34fb61d7016b6f21a..68026591eb6922097b0e0dcb3c6d6a911f51d43d 100644 (file)
@@ -31,7 +31,7 @@ extern "C" {
 
         const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
 
-        status = fll_program_parameter_process_context(choices, modes, F_true, main);
+        status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
 
         if (F_status_is_error(status)) {
           fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e);
@@ -52,7 +52,7 @@ extern "C" {
 
         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 };
 
-        status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
+        status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
 
         if (F_status_is_error(status)) {
           fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
@@ -73,13 +73,13 @@ extern "C" {
     }
 
     if (main->parameters.array[fss_identify_parameter_version_e].result & f_console_result_found_e) {
-      fll_program_print_version(main->message, fss_identify_program_version_s);
+      fll_program_print_version(&main->message, fss_identify_program_version_s);
 
       return F_none;
     }
 
     if (main->parameters.array[fss_identify_parameter_copyright_e].result & f_console_result_found_e) {
-      fll_program_print_copyright(main->message);
+      fll_program_print_copyright(&main->message);
 
       return F_none;
     }
@@ -116,14 +116,14 @@ extern "C" {
     if (F_status_is_error_not(status) && (main->parameters.array[fss_identify_parameter_total_e].result & f_console_result_found_e)) {
       if (main->parameters.array[fss_identify_parameter_object_e].result & f_console_result_found_e) {
         if (main->error.verbosity > f_console_verbosity_quiet_e) {
-          fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_identify_long_object_s, fss_identify_long_total_s);
+          fll_program_print_error_parameter_cannot_use_with(&main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_identify_long_object_s, fss_identify_long_total_s);
         }
 
         status = F_status_set_error(F_parameter);
       }
       else if (main->parameters.array[fss_identify_parameter_content_e].result & f_console_result_found_e) {
         if (main->error.verbosity > f_console_verbosity_quiet_e) {
-          fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_identify_long_content_s, fss_identify_long_total_s);
+          fll_program_print_error_parameter_cannot_use_with(&main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_identify_long_content_s, fss_identify_long_total_s);
         }
 
         status = F_status_set_error(F_parameter);
@@ -219,8 +219,8 @@ extern "C" {
       for (f_array_length_t i = 0; i < main->parameters.remaining.used; ++i) {
 
         if (!((++main->signal_check) % fss_identify_signal_check_d)) {
-          if (fll_program_standard_signal_received(main)) {
-            fll_program_print_signal_received(main->warning, main->signal_received);
+          if (fll_program_standard_signal_received(&main->program)) {
+            fll_program_print_signal_received(&main->warning, main->signal_received);
 
             status = F_status_set_error(F_interrupt);
 
index 5ef29a147a6da842ee4adc02355a4cfdcf986b4a..4aba2100e0711ac9782d6c1c9f24da34af3f7d6c 100644 (file)
@@ -2,8 +2,17 @@
 
 int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
-  fll_program_data_t data = fll_program_data_t_initialize;
-  fss_identify_setting_t setting = fss_identify_setting_t_initialize;
+  fss_identify_main_t data = fss_identify_main_t_initialize;
+
+  data.program.debug.flag |= fss_identify_print_flag_debug_e;
+  data.program.error.flag |= fss_identify_print_flag_error_e;
+  data.program.message.flag |= fss_identify_print_flag_message_e;
+  data.program.warning.flag |= fss_identify_print_flag_warning_e;
+  data.program.message.custom = (void *) &data;
+  data.program.output.custom = (void *) &data;
+  data.program.error.custom = (void *) &data;
+  data.program.warning.custom = (void *) &data;
+  data.program.debug.custom = (void *) &data;
 
   f_console_parameter_t parameters[] = fss_identify_console_parameter_t_initialize;
   data.parameters.array = parameters;
index d8003182073a953192f183bfab5a34e5926a5223..6c23d6860e4fe06a7fb9bef8efd839681a7282ad 100644 (file)
@@ -19,7 +19,7 @@ extern "C" {
 
     do {
       if (!((++main->signal_check) % fss_identify_signal_check_d)) {
-        if (fll_program_standard_signal_received(main)) {
+        if (fll_program_standard_signal_received(&main->program)) {
           fll_program_print_signal_received(main->warning, main->signal_received);
 
           status = F_status_set_error(F_interrupt);
index 830ae6d0e8d7429ac6948f5c3c03682a5d793a39..15b4d22c452a6b9fd831d7e67b1c5bdb30719f3a 100644 (file)
@@ -118,7 +118,7 @@ extern "C" {
 
         const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
 
-        setting->state.status = fll_program_parameter_process_context(choices, modes, F_true, main);
+        setting->state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
 
         if (F_status_is_error(setting->state.status)) {
           fll_error_print(main->error, F_status_set_fine(setting->state.status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e);
@@ -139,7 +139,7 @@ extern "C" {
 
         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 };
 
-        setting->state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
+        setting->state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
 
         if (F_status_is_error(setting->state.status)) {
           fll_error_print(main->error, F_status_set_fine(setting->state.status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
index 6c49ad1aefbfe5593f80356fcac805ea7cff79e2..4073620e8cf13262de855e2c23d8d59d622accd4 100644 (file)
@@ -32,7 +32,7 @@ extern "C" {
 
         const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
 
-        status = fll_program_parameter_process_context(choices, modes, F_true, main);
+        status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
 
         if (F_status_is_error(status)) {
           fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e);
@@ -68,7 +68,7 @@ extern "C" {
 
         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 };
 
-        status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
+        status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
 
         if (F_status_is_error(status)) {
           fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
@@ -231,7 +231,7 @@ extern "C" {
         for (f_array_length_t i = 0; i < main->parameters.array[fss_payload_read_parameter_delimit_e].values.used; ++i) {
 
           if (!((++main->signal_check) % fss_payload_read_signal_check_d)) {
-            if (fll_program_standard_signal_received(main)) {
+            if (fll_program_standard_signal_received(&main->program)) {
               fll_program_print_signal_received(main->warning, main->signal_received);
 
               status = F_status_set_error(F_interrupt);
@@ -449,7 +449,7 @@ extern "C" {
         for (f_array_length_t i = 0; i < main->parameters.remaining.used; ++i) {
 
           if (!((++main->signal_check) % fss_payload_read_signal_check_d)) {
-            if (fll_program_standard_signal_received(main)) {
+            if (fll_program_standard_signal_received(&main->program)) {
               fll_program_print_signal_received(main->warning, main->signal_received);
 
               status = F_status_set_error(F_interrupt);
@@ -515,7 +515,7 @@ extern "C" {
             for (size_read = 0; size_read < size_file; size_read += size_block) {
 
               // The signal check is always performed on each pass.
-              if (size_file > fss_payload_read_block_max && fll_program_standard_signal_received(main)) {
+              if (size_file > fss_payload_read_block_max && fll_program_standard_signal_received(&main->program)) {
                 fll_program_print_signal_received(main->warning, main->signal_received);
 
                 status = F_status_set_error(F_interrupt);
index 1fa6db4cd899c20704e45bc64c25782b48989863..3fd77e7991f4bcfba94f0abc10e5c20e3d983869 100644 (file)
@@ -2,8 +2,17 @@
 
 int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
-  fll_program_data_t data = fll_program_data_t_initialize;
-  fss_payload_read_setting_t setting = fss_payload_read_setting_t_initialize;
+  fss_payload_read_main_t data = fss_payload_read_main_t_initialize;
+
+  data.program.debug.flag |= fss_payload_read_print_flag_debug_e;
+  data.program.error.flag |= fss_payload_read_print_flag_error_e;
+  data.program.message.flag |= fss_payload_read_print_flag_message_e;
+  data.program.warning.flag |= fss_payload_read_print_flag_warning_e;
+  data.program.message.custom = (void *) &data;
+  data.program.output.custom = (void *) &data;
+  data.program.error.custom = (void *) &data;
+  data.program.warning.custom = (void *) &data;
+  data.program.debug.custom = (void *) &data;
 
   f_console_parameter_t parameters[] = fss_payload_read_console_parameter_t_initialize;
   data.parameters.array = parameters;
index 4a27c9e5d6c0fd7142623d4e6ccc162400091fbd..d7d81c6132e0beb78d7d168a4def92c9f240a7ab 100644 (file)
@@ -87,7 +87,7 @@ extern "C" {
     for (f_array_length_t i = 0; i < data->depths.used; ++i) {
 
       if (!((++main->signal_check) % fss_payload_read_signal_check_d)) {
-        if (fll_program_standard_signal_received(main)) {
+        if (fll_program_standard_signal_received(&main->program)) {
           fll_program_print_signal_received(main->warning, main->signal_received);
 
           return F_status_set_error(F_interrupt);
@@ -175,7 +175,7 @@ extern "C" {
       for (f_array_length_t j = i + 1; j < data->depths.used; ++j) {
 
         if (!((++main->signal_check) % fss_payload_read_signal_check_d)) {
-          if (fll_program_standard_signal_received(main)) {
+          if (fll_program_standard_signal_received(&main->program)) {
             fll_program_print_signal_received(main->warning, main->signal_received);
 
             return F_status_set_error(F_interrupt);
@@ -437,7 +437,7 @@ extern "C" {
       if (!names[i]) continue;
 
       if (!((++main->signal_check) % fss_payload_read_signal_check_d)) {
-        if (fll_program_standard_signal_received(main)) {
+        if (fll_program_standard_signal_received(&main->program)) {
           fll_program_print_signal_received(main->warning, main->signal_received);
 
           return F_status_set_error(F_interrupt);
@@ -488,7 +488,7 @@ extern "C" {
       if (!names[i]) continue;
 
       if (!((++main->signal_check) % fss_payload_read_signal_check_d)) {
-        if (fll_program_standard_signal_received(main)) {
+        if (fll_program_standard_signal_received(&main->program)) {
           fll_program_print_signal_received(main->warning, main->signal_received);
 
           return F_status_set_error(F_interrupt);
@@ -719,7 +719,7 @@ extern "C" {
       for (i = range.start; i <= range.stop; ++i) {
 
         if (!((++main->signal_check) % fss_payload_read_signal_check_d)) {
-          if (fll_program_standard_signal_received(main)) {
+          if (fll_program_standard_signal_received(&main->program)) {
             fll_program_print_signal_received(main->warning, main->signal_received);
 
             return F_status_set_error(F_interrupt);
@@ -802,7 +802,7 @@ extern "C" {
       if (!names[at]) continue;
 
       if (!((++main->signal_check) % fss_payload_read_signal_check_d)) {
-        if (fll_program_standard_signal_received(main)) {
+        if (fll_program_standard_signal_received(&main->program)) {
           fll_program_print_signal_received(main->warning, main->signal_received);
 
           return F_status_set_error(F_interrupt);
@@ -872,7 +872,7 @@ extern "C" {
       if (!names[i]) continue;
 
       if (!((++main->signal_check) % fss_payload_read_signal_check_d)) {
-        if (fll_program_standard_signal_received(main)) {
+        if (fll_program_standard_signal_received(&main->program)) {
           fll_program_print_signal_received(main->warning, main->signal_received);
 
           return F_status_set_error(F_interrupt);
@@ -1077,7 +1077,7 @@ extern "C" {
       if (!names[at]) continue;
 
       if (!((++main->signal_check) % fss_payload_read_signal_check_d)) {
-        if (fll_program_standard_signal_received(main)) {
+        if (fll_program_standard_signal_received(&main->program)) {
           fll_program_print_signal_received(main->warning, main->signal_received);
 
           return F_status_set_error(F_interrupt);
index baa2cdc83f6c6802321dd30ee2883d20ec5f514f..a69eaae83cfe712fc31a8711122dbba34284f120 100644 (file)
@@ -43,6 +43,8 @@
 #include <fll/level_2/program.h>
 
 // FSS Write includes.
+#include <program/fss_write/main/common/define.h>
+#include <program/fss_write/main/common/enumeration.h>
 #include <program/fss_write/main/common-print.h>
 #include <program/fss_write/main/common-string.h>
 #include <program/fss_write/main/common-type.h>
index 1dbaaac7c9bb84a3326f2b4555f6fc60d2f752ed..fe2d361407df4d70f4da547dc814cd15a4e48f25 100644 (file)
@@ -3,8 +3,18 @@
 
 int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
-  fll_program_data_t data = fll_program_data_t_initialize;
-  fss_write_setting_t setting = fss_write_setting_t_initialize;
+  fss_write_main_t data = fss_write_main_t_initialize;
+
+  data.program.debug.flag |= fss_write_print_flag_debug_e;
+  data.program.error.flag |= fss_write_print_flag_error_e;
+  data.program.message.flag |= fss_write_print_flag_message_e;
+  data.program.warning.flag |= fss_write_print_flag_warning_e;
+  data.program.message.custom = (void *) &data;
+  data.program.output.custom = (void *) &data;
+  data.program.error.custom = (void *) &data;
+  data.program.warning.custom = (void *) &data;
+  data.program.debug.custom = (void *) &data;
+
   setting.state.custom = (void *) &data;
   setting.standard = fss_write_basic_standard_s;
   setting.process_content = &fss_write_basic_process_content;
index 0776a1bec424a1cc471318377a2112d88353e02f..9058c448592bb72f78898486a9f03320f352160f 100644 (file)
@@ -44,6 +44,8 @@
 #include <fll/level_2/program.h>
 
 // FSS Write includes.
+#include <program/fss_write/main/common/define.h>
+#include <program/fss_write/main/common/enumeration.h>
 #include <program/fss_write/main/common-print.h>
 #include <program/fss_write/main/common-string.h>
 #include <program/fss_write/main/common-type.h>
index dea594ba0a5cd3b788aacecef992d8d42b88b8bf..256d41557b88610d6f75769e631f286c60714368 100644 (file)
@@ -3,8 +3,18 @@
 
 int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
-  fll_program_data_t data = fll_program_data_t_initialize;
-  fss_write_setting_t setting = fss_write_setting_t_initialize;
+  fss_write_main_t data = fss_write_main_t_initialize;
+
+  data.program.debug.flag |= fss_write_print_flag_debug_e;
+  data.program.error.flag |= fss_write_print_flag_error_e;
+  data.program.message.flag |= fss_write_print_flag_message_e;
+  data.program.warning.flag |= fss_write_print_flag_warning_e;
+  data.program.message.custom = (void *) &data;
+  data.program.output.custom = (void *) &data;
+  data.program.error.custom = (void *) &data;
+  data.program.warning.custom = (void *) &data;
+  data.program.debug.custom = (void *) &data;
+
   setting.state.custom = (void *) &data;
   setting.standard = fss_write_basic_list_standard_s;
   setting.process_content = &fss_write_basic_list_process_content;
index aa08fe9d8465d8f251799281a7966b10ca6b8dad..f8ca58cf809f0097ab087c6b77fe39bf34174271 100644 (file)
@@ -43,6 +43,8 @@
 #include <fll/level_2/program.h>
 
 // FSS Write includes.
+#include <program/fss_write/main/common/define.h>
+#include <program/fss_write/main/common/enumeration.h>
 #include <program/fss_write/main/common-print.h>
 #include <program/fss_write/main/common-string.h>
 #include <program/fss_write/main/common-type.h>
index 04181a674cd429f11b89d0ecb0fd1acdb87ea9b8..067ac118cb645a1f0721fa712597f110ef58349b 100644 (file)
@@ -3,8 +3,18 @@
 
 int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
-  fll_program_data_t data = fll_program_data_t_initialize;
-  fss_write_setting_t setting = fss_write_setting_t_initialize;
+  fss_write_main_t data = fss_write_main_t_initialize;
+
+  data.program.debug.flag |= fss_write_print_flag_debug_e;
+  data.program.error.flag |= fss_write_print_flag_error_e;
+  data.program.message.flag |= fss_write_print_flag_message_e;
+  data.program.warning.flag |= fss_write_print_flag_warning_e;
+  data.program.message.custom = (void *) &data;
+  data.program.output.custom = (void *) &data;
+  data.program.error.custom = (void *) &data;
+  data.program.warning.custom = (void *) &data;
+  data.program.debug.custom = (void *) &data;
+
   setting.state.custom = (void *) &data;
   setting.standard = fss_write_embedded_list_standard_s;
   setting.process_content = &fss_write_embedded_list_process_content;
index a30b6e599ab1895d17ccf1db103d056ec2ad67c7..81089ce4ed7c944a1fa74d3a37b6c3098e5f6cb6 100644 (file)
@@ -43,6 +43,8 @@
 #include <fll/level_2/program.h>
 
 // FSS Write includes.
+#include <program/fss_write/main/common/define.h>
+#include <program/fss_write/main/common/enumeration.h>
 #include <program/fss_write/main/common-print.h>
 #include <program/fss_write/main/common-string.h>
 #include <program/fss_write/main/common-type.h>
index 22080f3f79876547d4765c9fdb64c889caa40405..9255969c421aa28451eab69049dd6473575a9b2a 100644 (file)
@@ -3,8 +3,18 @@
 
 int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
-  fll_program_data_t data = fll_program_data_t_initialize;
-  fss_write_setting_t setting = fss_write_setting_t_initialize;
+  fss_write_main_t data = fss_write_main_t_initialize;
+
+  data.program.debug.flag |= fss_write_print_flag_debug_e;
+  data.program.error.flag |= fss_write_print_flag_error_e;
+  data.program.message.flag |= fss_write_print_flag_message_e;
+  data.program.warning.flag |= fss_write_print_flag_warning_e;
+  data.program.message.custom = (void *) &data;
+  data.program.output.custom = (void *) &data;
+  data.program.error.custom = (void *) &data;
+  data.program.warning.custom = (void *) &data;
+  data.program.debug.custom = (void *) &data;
+
   setting.state.custom = (void *) &data;
   setting.standard = fss_write_extended_standard_s;
   setting.process_content = &fss_write_extended_process_content;
index 9974e2ee6716fab16fcc1186935d779202ded9fa..9dab7c7f6b0c71aa6e341b6e304565353cae954c 100644 (file)
@@ -43,6 +43,8 @@
 #include <fll/level_2/program.h>
 
 // FSS Write includes.
+#include <program/fss_write/main/common/define.h>
+#include <program/fss_write/main/common/enumeration.h>
 #include <program/fss_write/main/common-print.h>
 #include <program/fss_write/main/common-string.h>
 #include <program/fss_write/main/common-type.h>
index a268d123e0f72291fa9bb1a106ddc72a461d38eb..620ad72c790dcb05b8a91d0a9ee5fd60078f8711 100644 (file)
@@ -3,8 +3,18 @@
 
 int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
-  fll_program_data_t data = fll_program_data_t_initialize;
-  fss_write_setting_t setting = fss_write_setting_t_initialize;
+  fss_write_main_t data = fss_write_main_t_initialize;
+
+  data.program.debug.flag |= fss_write_print_flag_debug_e;
+  data.program.error.flag |= fss_write_print_flag_error_e;
+  data.program.message.flag |= fss_write_print_flag_message_e;
+  data.program.warning.flag |= fss_write_print_flag_warning_e;
+  data.program.message.custom = (void *) &data;
+  data.program.output.custom = (void *) &data;
+  data.program.error.custom = (void *) &data;
+  data.program.warning.custom = (void *) &data;
+  data.program.debug.custom = (void *) &data;
+
   setting.state.custom = (void *) &data;
   setting.standard = fss_write_extended_list_standard_s;
   setting.process_content = &fss_write_extended_list_process_content;
index 9366332ffe4ddc86f8888c4cd7449e29dbbc8911..2f5268892c00b26dd64927d6eba88978d84530af 100644 (file)
@@ -69,7 +69,7 @@ extern "C" {
 
         const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
 
-        setting->state.status = fll_program_parameter_process_context(choices, modes, F_true, main);
+        setting->state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
 
         if (F_status_is_error(setting->state.status)) {
           if ((setting->flag & fss_write_main_flag_print_first_e) && main->message.verbosity > f_console_verbosity_error_e) {
@@ -90,7 +90,7 @@ extern "C" {
 
         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 };
 
-        setting->state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
+        setting->state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
 
         if (F_status_is_error(setting->state.status)) {
           if ((setting->flag & fss_write_main_flag_print_first_e) && main->message.verbosity > f_console_verbosity_error_e) {
@@ -142,7 +142,7 @@ extern "C" {
           fll_print_dynamic_raw(f_string_eol_s, main->message.to);
         }
 
-        fll_program_print_error_parameter_must_specify_once(main->error, f_console_symbol_long_normal_s, fss_write_long_file_s);
+        fll_program_print_error_parameter_must_specify_once(&main->error, f_console_symbol_long_normal_s, fss_write_long_file_s);
 
         return;
       }
@@ -173,7 +173,7 @@ extern "C" {
         fll_print_dynamic_raw(f_string_eol_s, main->message.to);
       }
 
-      fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, fss_write_long_file_s);
+      fll_program_print_error_parameter_missing_value(&main->error, f_console_symbol_long_normal_s, fss_write_long_file_s);
 
       return;
     }
@@ -214,7 +214,7 @@ extern "C" {
         fll_print_dynamic_raw(f_string_eol_s, main->message.to);
       }
 
-      fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, fss_write_long_object_s);
+      fll_program_print_error_parameter_missing_value(&main->error, f_console_symbol_long_normal_s, fss_write_long_object_s);
 
       return;
     }
@@ -317,7 +317,7 @@ extern "C" {
         fll_print_dynamic_raw(f_string_eol_s, main->message.to);
       }
 
-      fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, fss_write_long_content_s);
+      fll_program_print_error_parameter_missing_value(&main->error, f_console_symbol_long_normal_s, fss_write_long_content_s);
 
       return;
     }
@@ -372,7 +372,7 @@ extern "C" {
         fll_print_dynamic_raw(f_string_eol_s, main->message.to);
       }
 
-      fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, fss_write_long_prepend_s);
+      fll_program_print_error_parameter_missing_value(&main->error, f_console_symbol_long_normal_s, fss_write_long_prepend_s);
 
       return;
     }
@@ -385,7 +385,7 @@ extern "C" {
           fll_print_dynamic_raw(f_string_eol_s, main->message.to);
         }
 
-        fll_program_print_error_parameter_missing_value_requires_amount(main->error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, fss_write_string_two_s);
+        fll_program_print_error_parameter_missing_value_requires_amount(&main->error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, fss_write_string_two_s);
 
         return;
       }
@@ -461,7 +461,7 @@ extern "C" {
                 fll_print_dynamic_raw(f_string_eol_s, main->message.to);
               }
 
-              fll_program_print_error_parameter_integer_not(main->error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, main->parameters.arguments.array[index]);
+              fll_program_print_error_parameter_integer_not(&main->error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, main->parameters.arguments.array[index]);
 
               return;
             }
@@ -475,7 +475,7 @@ extern "C" {
                 fll_print_dynamic_raw(f_string_eol_s, main->message.to);
               }
 
-              fll_program_print_error_parameter_integer_not(main->error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, main->parameters.arguments.array[index]);
+              fll_program_print_error_parameter_integer_not(&main->error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, main->parameters.arguments.array[index]);
 
               return;
             }
@@ -524,7 +524,7 @@ extern "C" {
               fll_print_dynamic_raw(f_string_eol_s, main->message.to);
             }
 
-            fll_program_print_error_parameter_integer_not(main->error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, main->parameters.arguments.array[index]);
+            fll_program_print_error_parameter_integer_not(&main->error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, main->parameters.arguments.array[index]);
 
             return;
           }
@@ -538,7 +538,7 @@ extern "C" {
               fll_print_dynamic_raw(f_string_eol_s, main->message.to);
             }
 
-            fll_program_print_error_parameter_integer_not(main->error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, main->parameters.arguments.array[index]);
+            fll_program_print_error_parameter_integer_not(&main->error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, main->parameters.arguments.array[index]);
 
             return;
           }
@@ -570,7 +570,7 @@ extern "C" {
         fll_print_dynamic_raw(f_string_eol_s, main->message.to);
       }
 
-      fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, fss_write_long_ignore_s);
+      fll_program_print_error_parameter_missing_value(&main->error, f_console_symbol_long_normal_s, fss_write_long_ignore_s);
 
       return;
     }
@@ -651,7 +651,7 @@ extern "C" {
               fll_print_dynamic_raw(f_string_eol_s, main->message.to);
             }
 
-            fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, has_string[i], has_cannots_string[i][0]);
+            fll_program_print_error_parameter_cannot_use_with(&main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, has_string[i], has_cannots_string[i][0]);
 
             return;
           }
@@ -663,7 +663,7 @@ extern "C" {
               fll_print_dynamic_raw(f_string_eol_s, main->message.to);
             }
 
-            fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, has_string[i], has_cannots_string[i][1]);
+            fll_program_print_error_parameter_cannot_use_with(&main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, has_string[i], has_cannots_string[i][1]);
 
             return;
           }
@@ -697,7 +697,7 @@ extern "C" {
               fll_print_dynamic_raw(f_string_eol_s, main->message.to);
             }
 
-            fll_program_print_error_parameter_cannot_use_with_xor(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_write_long_partial_s, fss_write_long_object_s, fss_write_long_content_s);
+            fll_program_print_error_parameter_cannot_use_with_xor(&main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_write_long_partial_s, fss_write_long_object_s, fss_write_long_content_s);
 
             return;
           }
diff --git a/level_3/fss_write/c/main/common/define.c b/level_3/fss_write/c/main/common/define.c
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/level_3/fss_write/c/main/common/define.h b/level_3/fss_write/c/main/common/define.h
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/level_3/fss_write/c/main/common/enumeration.c b/level_3/fss_write/c/main/common/enumeration.c
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/level_3/fss_write/c/main/common/enumeration.h b/level_3/fss_write/c/main/common/enumeration.h
new file mode 100644 (file)
index 0000000..e69de29
index 46342a7878f0e3b2541c453f631ae8d2903ebde6..14d2fc8e561be96fbdc96d8cdff003140f6444d8 100644 (file)
@@ -23,33 +23,20 @@ extern "C" {
 
     setting->state.status = F_none;
 
-    if (setting->flag & fss_write_main_flag_help_e) {
-      if (setting->process_help) {
-        setting->process_help(main, (void *) setting);
-      }
+    if (main->setting.flag & (fss_write_main_flag_help_e | fss_write_main_flag_version_e | fss_write_main_flag_copyright_e)) {
 
-      if ((setting->flag & fss_write_main_flag_print_last_e) && main->message.verbosity > f_console_verbosity_error_e) {
-        fll_print_dynamic_raw(f_string_eol_s, main->message.to);
+      if (main->setting.flag & fss_write_main_flag_help_e) {
+        fss_write_print_message_help(&main->program.message);
       }
-
-      return;
-    }
-
-    if (setting->flag & fss_write_main_flag_version_e) {
-      fll_program_print_version(main->message, fss_write_program_version_s);
-
-      if ((setting->flag & fss_write_main_flag_print_last_e) && main->message.verbosity > f_console_verbosity_error_e) {
-        fll_print_dynamic_raw(f_string_eol_s, main->message.to);
+      else if (main->setting.flag & fss_write_main_flag_version_e) {
+        fll_program_print_version(&main->program.message, fss_write_program_version_s);
+      }
+      else if (main->setting.flag & fss_write_main_flag_copyright_e) {
+        fll_program_print_copyright(&main->program.message);
       }
 
-      return;
-    }
-
-    if (setting->flag & fss_write_main_flag_copyright_e) {
-      fll_program_print_copyright(main->message);
-
-      if ((setting->flag & fss_write_main_flag_print_last_e) && main->message.verbosity > f_console_verbosity_error_e) {
-        fll_print_dynamic_raw(f_string_eol_s, main->message.to);
+      if ((main->setting.flag & fss_write_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
       }
 
       return;
@@ -107,7 +94,7 @@ extern "C" {
 
         // @todo replace all signal checks with forked main process that independently checks and assigns main->signal_received.
         if (!((++main->signal_check) % fss_write_signal_check_d)) {
-          if (fll_program_standard_signal_received(main)) {
+          if (fll_program_standard_signal_received(&main->program)) {
             setting->state.status = F_status_set_error(F_interrupt);
 
             return;
@@ -224,8 +211,8 @@ extern "C" {
     for (;;) {
 
       if (!((++main->signal_check) % fss_write_signal_check_d)) {
-        if (fll_program_standard_signal_received(main)) {
-          fll_program_print_signal_received(main->warning, main->signal_received);
+        if (fll_program_standard_signal_received(&main->program)) {
+          fll_program_print_signal_received(&main->warning, main->signal_received);
 
           setting->state.status = F_status_set_error(F_interrupt);
 
index 604f60cfafa580ca96ae1ae08bb55d26baf4a194..4641f8d3696c510efeaa28f36fe96c83f78a372c 100644 (file)
@@ -42,6 +42,8 @@
 #include <fll/level_2/program.h>
 
 // FSS Write includes.
+#include <program/fss_write/main/common/define.h>
+#include <program/fss_write/main/common/enumeration.h>
 #include <program/fss_write/main/common-print.h>
 #include <program/fss_write/main/common-string.h>
 #include <program/fss_write/main/common-type.h>
index ac9c6425218ed0059e012bbb933ee58739fe53ca..d1c99c608a493e1e7d81227a7dac74d599194b39 100644 (file)
 
 int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
-  fll_program_data_t data = fll_program_data_t_initialize;
-  fss_write_setting_t setting = fss_write_setting_t_initialize;
+  fss_write_main_t data = fss_write_main_t_initialize;
+
   setting.state.custom = (void *) &data;
 
+  data.program.debug.flag |= fss_write_print_flag_debug_e;
+  data.program.error.flag |= fss_write_print_flag_error_e;
+  data.program.message.flag |= fss_write_print_flag_message_e;
+  data.program.warning.flag |= fss_write_print_flag_warning_e;
+  data.program.message.custom = (void *) &data;
+  data.program.output.custom = (void *) &data;
+  data.program.error.custom = (void *) &data;
+  data.program.warning.custom = (void *) &data;
+  data.program.debug.custom = (void *) &data;
+
   f_console_parameter_t parameters[] = fss_write_console_parameter_t_initialize;
   data.parameters.array = parameters;
   data.parameters.used = fss_write_total_parameters_d;
index 7ecd90ca501d029628f612e96082e9cc579f7558..fc0ed10d368d46d0815887caa64e7bbf77f18343 100644 (file)
@@ -10,7 +10,7 @@ extern "C" {
     if (!setting) return F_status_set_error(F_output_not);
     if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
 
-    fll_error_print(*print, F_status_set_fine(setting->state.status), function, fll_error_file_flag_fallback_e);
+    fll_error_print(print, F_status_set_fine(setting->state.status), function, fll_error_file_flag_fallback_e);
 
     return F_none;
   }
@@ -22,7 +22,7 @@ extern "C" {
     if (!setting) return F_status_set_error(F_output_not);
     if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
 
-    fll_error_file_print(*print, F_status_set_fine(setting->state.status), function, fll_error_file_flag_fallback_e, name, operation, type);
+    fll_error_file_print(print, F_status_set_fine(setting->state.status), function, fll_error_file_flag_fallback_e, name, operation, type);
 
     return F_none;
   }
diff --git a/level_3/fss_write/c/main/print/data.c b/level_3/fss_write/c/main/print/data.c
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/level_3/fss_write/c/main/print/data.h b/level_3/fss_write/c/main/print/data.h
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/level_3/fss_write/c/main/print/error.c b/level_3/fss_write/c/main/print/error.c
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/level_3/fss_write/c/main/print/error.h b/level_3/fss_write/c/main/print/error.h
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/level_3/fss_write/c/main/print/message.c b/level_3/fss_write/c/main/print/message.c
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/level_3/fss_write/c/main/print/message.h b/level_3/fss_write/c/main/print/message.h
new file mode 100644 (file)
index 0000000..e69de29
index 17ccb8edccc02b42e81607dd5aa23d1c6c099e26..ee03aa64cfcda17d01e37e4e299edd74f0b76cdc 100644 (file)
@@ -87,7 +87,7 @@ extern "C" {
     for (;;) {
 
       if (!((++main->signal_check) % fss_write_signal_check_d)) {
-        if (fll_program_standard_signal_received(main)) {
+        if (fll_program_standard_signal_received(&main->program)) {
           fll_program_print_signal_received(main->warning, main->signal_received);
 
           setting->state.status = F_status_set_error(F_interrupt);
index 2ce46c591023600578e242dc75c32ab58b5a26cf..0adfd64685eaf5a6f7ee2233be074dc3712699ee 100644 (file)
@@ -3,8 +3,18 @@
 
 int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
-  fll_program_data_t data = fll_program_data_t_initialize;
-  fss_write_setting_t setting = fss_write_setting_t_initialize;
+  fss_write_main_t data = fss_write_main_t_initialize;
+
+  data.program.debug.flag |= fss_write_print_flag_debug_e;
+  data.program.error.flag |= fss_write_print_flag_error_e;
+  data.program.message.flag |= fss_write_print_flag_message_e;
+  data.program.warning.flag |= fss_write_print_flag_warning_e;
+  data.program.message.custom = (void *) &data;
+  data.program.output.custom = (void *) &data;
+  data.program.error.custom = (void *) &data;
+  data.program.warning.custom = (void *) &data;
+  data.program.debug.custom = (void *) &data;
+
   setting.state.custom = (void *) &data;
   setting.standard = fss_write_payload_standard_s;
   setting.process_content = 0; // Not used by payload.
index 4e4e793ef7a7b7aa256cfef2d58277c3a3357abf..89a02450a5e6890c7f9fec1ac36557f2fe074cd0 100644 (file)
@@ -71,7 +71,7 @@ extern "C" {
 
         const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
 
-        setting->state.status = fll_program_parameter_process_context(choices, modes, F_true, main);
+        setting->state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
 
         if (F_status_is_error(setting->state.status)) {
           if ((setting->flag & iki_read_main_flag_print_first_e) && main->message.verbosity > f_console_verbosity_error_e) {
@@ -92,7 +92,7 @@ extern "C" {
 
         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 };
 
-        setting->state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
+        setting->state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
 
         if (F_status_is_error(setting->state.status)) {
           if ((setting->flag & iki_read_main_flag_print_first_e) && main->message.verbosity > f_console_verbosity_error_e) {
@@ -131,7 +131,7 @@ extern "C" {
         fll_print_dynamic_raw(f_string_eol_s, main->message.to);
       }
 
-      fll_program_print_error_missing_file(main->error);
+      fll_program_print_error_missing_file(&main->error);
 
       return;
     }
@@ -144,7 +144,7 @@ extern "C" {
           fll_print_dynamic_raw(f_string_eol_s, main->message.to);
         }
 
-        fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, iki_read_long_at_s, iki_read_long_whole_s);
+        fll_program_print_error_parameter_cannot_use_with(&main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, iki_read_long_at_s, iki_read_long_whole_s);
 
         return;
       }
@@ -162,7 +162,7 @@ extern "C" {
           fll_print_dynamic_raw(f_string_eol_s, main->message.to);
         }
 
-        fll_program_print_error_parameter_integer_not(main->error, f_console_symbol_long_normal_s, iki_read_long_at_s, main->parameters.arguments.array[index]);
+        fll_program_print_error_parameter_integer_not(&main->error, f_console_symbol_long_normal_s, iki_read_long_at_s, main->parameters.arguments.array[index]);
 
         return;
       }
@@ -176,7 +176,7 @@ extern "C" {
         fll_print_dynamic_raw(f_string_eol_s, main->message.to);
       }
 
-      fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, iki_read_long_at_s);
+      fll_program_print_error_parameter_missing_value(&main->error, f_console_symbol_long_normal_s, iki_read_long_at_s);
 
       return;
     }
@@ -195,7 +195,7 @@ extern "C" {
           fll_print_dynamic_raw(f_string_eol_s, main->message.to);
         }
 
-        fll_program_print_error_parameter_integer_not(main->error, f_console_symbol_long_normal_s, iki_read_long_line_s, main->parameters.arguments.array[index]);
+        fll_program_print_error_parameter_integer_not(&main->error, f_console_symbol_long_normal_s, iki_read_long_line_s, main->parameters.arguments.array[index]);
 
         return;
       }
@@ -209,7 +209,7 @@ extern "C" {
         fll_print_dynamic_raw(f_string_eol_s, main->message.to);
       }
 
-      fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, iki_read_long_line_s);
+      fll_program_print_error_parameter_missing_value(&main->error, f_console_symbol_long_normal_s, iki_read_long_line_s);
 
       return;
     }
@@ -273,7 +273,7 @@ extern "C" {
         fll_print_dynamic_raw(f_string_eol_s, main->message.to);
       }
 
-      fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, iki_read_long_name_s);
+      fll_program_print_error_parameter_missing_value(&main->error, f_console_symbol_long_normal_s, iki_read_long_name_s);
 
       return;
     }
@@ -286,7 +286,7 @@ extern "C" {
           fll_print_dynamic_raw(f_string_eol_s, main->message.to);
         }
 
-        fll_program_print_error_parameter_missing_value_requires_amount(main->error, f_console_symbol_long_normal_s, iki_read_long_replace_s, iki_read_string_two_s);
+        fll_program_print_error_parameter_missing_value_requires_amount(&main->error, f_console_symbol_long_normal_s, iki_read_long_replace_s, iki_read_string_two_s);
 
         return;
       }
@@ -381,7 +381,7 @@ extern "C" {
           fll_print_dynamic_raw(f_string_eol_s, main->message.to);
         }
 
-        fll_program_print_error_parameter_missing_value_requires_amount(main->error, f_console_symbol_long_normal_s, iki_read_long_wrap_s, iki_read_string_three_s);
+        fll_program_print_error_parameter_missing_value_requires_amount(&main->error, f_console_symbol_long_normal_s, iki_read_long_wrap_s, iki_read_string_three_s);
 
         return;
       }
@@ -488,7 +488,7 @@ extern "C" {
             fll_print_dynamic_raw(f_string_eol_s, main->message.to);
           }
 
-          fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, iki_read_long_literal_s, names[i]);
+          fll_program_print_error_parameter_cannot_use_with(&main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, iki_read_long_literal_s, names[i]);
 
           return;
         }
@@ -516,7 +516,7 @@ extern "C" {
             fll_print_dynamic_raw(f_string_eol_s, main->message.to);
           }
 
-          fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, iki_read_long_object_s, names[i]);
+          fll_program_print_error_parameter_cannot_use_with(&main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, iki_read_long_object_s, names[i]);
 
           return;
         }
@@ -532,7 +532,7 @@ extern "C" {
           fll_print_dynamic_raw(f_string_eol_s, main->message.to);
         }
 
-        fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, iki_read_long_content_s, iki_read_long_total_s);
+        fll_program_print_error_parameter_cannot_use_with(&main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, iki_read_long_content_s, iki_read_long_total_s);
 
         return;
       }
@@ -547,7 +547,7 @@ extern "C" {
           fll_print_dynamic_raw(f_string_eol_s, main->message.to);
         }
 
-        fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, iki_read_long_total_s, iki_read_long_wrap_s);
+        fll_program_print_error_parameter_cannot_use_with(&main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, iki_read_long_total_s, iki_read_long_wrap_s);
 
         return;
       }
@@ -632,7 +632,7 @@ extern "C" {
         fll_print_dynamic_raw(f_string_eol_s, main->message.to);
       }
 
-      fll_program_print_error_parameter_missing_value_requires_amount(main->error, f_console_symbol_long_normal_s, name, iki_read_string_three_s);
+      fll_program_print_error_parameter_missing_value_requires_amount(&main->error, f_console_symbol_long_normal_s, name, iki_read_string_three_s);
 
       return F_false;
     }
diff --git a/level_3/iki_read/c/main/common/define.c b/level_3/iki_read/c/main/common/define.c
new file mode 100644 (file)
index 0000000..de0e2a3
--- /dev/null
@@ -0,0 +1,9 @@
+#include "../iki_read.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/iki_read/c/main/common/define.h b/level_3/iki_read/c/main/common/define.h
new file mode 100644 (file)
index 0000000..a7c14eb
--- /dev/null
@@ -0,0 +1,24 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: IKI Read
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides the common define types.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _iki_read_common_define_h
+#define _iki_read_common_define_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _iki_read_common_define_h
diff --git a/level_3/iki_read/c/main/common/enumeration.c b/level_3/iki_read/c/main/common/enumeration.c
new file mode 100644 (file)
index 0000000..de0e2a3
--- /dev/null
@@ -0,0 +1,9 @@
+#include "../iki_read.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/iki_read/c/main/common/enumeration.h b/level_3/iki_read/c/main/common/enumeration.h
new file mode 100644 (file)
index 0000000..4e2d0e4
--- /dev/null
@@ -0,0 +1,47 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: IKI Read
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides the common enumeration types.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _iki_read_common_enumeration_h
+#define _iki_read_common_enumeration_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Flags for fine-tuned print control.
+ *
+ * iki_read_print_flag_*_e:
+ *   - none:      No flags set.
+ *   - debug:     Stream is for debug printing.
+ *   - error:     Stream is for error printing.
+ *   - message:   Stream is for message printing.
+ *   - warning:   Stream is for warning printing.
+ *   - file_to:   Stream is a destination file.
+ *   - file_from: Stream is a source file.
+ */
+#ifndef _di_iki_read_print_flag_e_
+  enum {
+    iki_read_print_flag_none_e      = 0x0,
+    iki_read_print_flag_debug_e     = 0x1,
+    iki_read_print_flag_error_e     = 0x2,
+    iki_read_print_flag_message_e   = 0x4,
+    iki_read_print_flag_warning_e   = 0x8,
+    iki_read_print_flag_file_to_e   = 0x10,
+    iki_read_print_flag_file_from_e = 0x20,
+  }; // enum
+#endif // _di_iki_read_print_flag_e_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _iki_read_common_enumeration_h
index e24182b7cabc987f8b8c28d46d9d9e3e4659ebd8..7e439c450f742684792afb1f73d0324fbfc64a92 100644 (file)
@@ -220,6 +220,25 @@ extern "C" {
     }
 #endif // _di_iki_read_setting_t_
 
+/**
+ * The main program data as a single structure.
+ *
+ * program: The main program data.
+ * setting: The settings data.
+ */
+#ifndef _di_iki_read_main_t_
+  typedef struct {
+    fll_program_data_t program;
+    iki_read_setting_t setting;
+  } iki_read_main_t;
+
+  #define iki_read_main_t_initialize \
+    { \
+      fll_program_data_t_initialize, \
+      iki_read_setting_t_initialize, \
+    }
+#endif // _di_iki_read_main_t_
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 8defe74a355371ffab596c25551c09e8a801e08d..3502ad0a199204f4129941da08d76a6ae0ebe4fe 100644 (file)
@@ -23,31 +23,20 @@ extern "C" {
 
     setting->state.status = F_none;
 
-    if (setting->flag & iki_read_main_flag_help_e) {
-      iki_read_print_help(setting, main->message);
+    if (main->setting.flag & (iki_read_main_flag_help_e | iki_read_main_flag_version_e | iki_read_main_flag_copyright_e)) {
 
-      if ((setting->flag & iki_read_main_flag_print_last_e) && main->message.verbosity > f_console_verbosity_error_e) {
-        fll_print_dynamic_raw(f_string_eol_s, main->message.to);
+      if (main->setting.flag & iki_read_main_flag_help_e) {
+        iki_read_print_message_help(&main->program.message);
       }
-
-      return;
-    }
-
-    if (setting->flag & iki_read_main_flag_version_e) {
-      fll_program_print_version(main->message, iki_read_program_version_s);
-
-      if ((setting->flag & iki_read_main_flag_print_last_e) && main->message.verbosity > f_console_verbosity_error_e) {
-        fll_print_dynamic_raw(f_string_eol_s, main->message.to);
+      else if (main->setting.flag & iki_read_main_flag_version_e) {
+        fll_program_print_version(&main->program.message, iki_read_program_version_s);
+      }
+      else if (main->setting.flag & iki_read_main_flag_copyright_e) {
+        fll_program_print_copyright(&main->program.message);
       }
 
-      return;
-    }
-
-    if (setting->flag & iki_read_main_flag_copyright_e) {
-      fll_program_print_copyright(main->message);
-
-      if ((setting->flag & iki_read_main_flag_print_last_e) && main->message.verbosity > f_console_verbosity_error_e) {
-        fll_print_dynamic_raw(f_string_eol_s, main->message.to);
+      if ((main->setting.flag & iki_read_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
       }
 
       return;
@@ -79,8 +68,8 @@ extern "C" {
       for (f_array_length_t i = 0; i < setting->files.used; ++i) {
 
         if (!((++main->signal_check) % iki_read_signal_check_d)) {
-          if (fll_program_standard_signal_received(main)) {
-            fll_program_print_signal_received(main->warning, main->signal_received);
+          if (fll_program_standard_signal_received(&main->program)) {
+            fll_program_print_signal_received(&main->warning, main->signal_received);
 
             setting->state.status = F_status_set_error(F_interrupt);
 
@@ -149,8 +138,8 @@ extern "C" {
         for (size_read = 0; size_read < size_file; size_read += size_block) {
 
           // The signal check is always performed on each pass.
-          if (size_file > iki_read_block_max && fll_program_standard_signal_received(main)) {
-            fll_program_print_signal_received(main->warning, main->signal_received);
+          if (size_file > iki_read_block_max && fll_program_standard_signal_received(&main->program)) {
+            fll_program_print_signal_received(&main->warning, main->signal_received);
 
             setting->state.status = F_status_set_error(F_interrupt);
 
index 79c760137e287a2002ccd64908df23cb74da7eba..7585c31c9b5cef03e6e8addc7ac5befb91664fff 100644 (file)
 #include <fll/level_2/program.h>
 
 // IKI Read includes.
+#include <program/iki_read/main/common/define.h>
+#include <program/iki_read/main/common/enumeration.h>
 #include <program/iki_read/main/common/print.h>
 #include <program/iki_read/main/common/string.h>
 #include <program/iki_read/main/common/type.h>
 #include <program/iki_read/main/common.h>
 #include <program/iki_read/main/identify.h>
-#include <program/iki_read/main/print.h>
 #include <program/iki_read/main/print/data.h>
 #include <program/iki_read/main/print/error.h>
+#include <program/iki_read/main/print/message.h>
 #include <program/iki_read/main/process.h>
 
 #ifdef __cplusplus
index 43452200a0783ee0b215681a4636a906a1a644f6..4426b3427ef958a1e622d13ecedb92a0518f11b6 100644 (file)
@@ -2,11 +2,21 @@
 
 int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
-  fll_program_data_t data = fll_program_data_t_initialize;
-  iki_read_setting_t setting = iki_read_setting_t_initialize;
+  iki_read_main_t data = iki_read_main_t_initialize;
+
   setting.state.custom = (void *) &data;
   setting.state.handle = &fll_program_standard_signal_handle;
 
+  data.program.debug.flag |= iki_read_print_flag_debug_e;
+  data.program.error.flag |= iki_read_print_flag_error_e;
+  data.program.message.flag |= iki_read_print_flag_message_e;
+  data.program.warning.flag |= iki_read_print_flag_warning_e;
+  data.program.message.custom = (void *) &data;
+  data.program.output.custom = (void *) &data;
+  data.program.error.custom = (void *) &data;
+  data.program.warning.custom = (void *) &data;
+  data.program.debug.custom = (void *) &data;
+
   f_console_parameter_t parameters[] = iki_read_console_parameter_t_initialize;
   data.parameters.array = parameters;
   data.parameters.used = iki_read_total_parameters_d;
index 1da304e68176531eefc330b1b2f7d013a5861bfe..2fe4139fb54ec65acb6a0fb33a655cda6500598e 100644 (file)
@@ -5,93 +5,92 @@ extern "C" {
 #endif
 
 #ifndef _di_iki_read_print_help_
-  f_status_t iki_read_print_help(iki_read_setting_t * const setting, const fl_print_t print) {
+  f_status_t iki_read_print_help(fl_print_t * const print) {
 
     if (!setting) return F_status_set_error(F_output_not);
 
-    f_file_stream_lock(print.to);
+    f_file_stream_lock(print->to);
 
     fll_program_print_help_header(print, iki_read_program_name_long_s, iki_read_program_version_s);
 
     fll_program_print_help_option_standard(print);
 
-    f_print_dynamic_raw(f_string_eol_s, print.to);
+    f_print_dynamic_raw(f_string_eol_s, print->to);
 
     fll_program_print_help_option(print, iki_read_short_at_s, iki_read_long_at_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "   Select Variable at this numeric index.");
     fll_program_print_help_option(print, iki_read_short_line_s, iki_read_long_line_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print only the Variables at the given line within the file.");
     fll_program_print_help_option(print, iki_read_short_name_s, iki_read_long_name_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Select Variables with this name.");
     fll_program_print_help_option(print, iki_read_short_whole_s, iki_read_long_whole_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Print all of the data instead of just the IKI Variable data.");
 
-    f_print_dynamic_raw(f_string_eol_s, print.to);
+    f_print_dynamic_raw(f_string_eol_s, print->to);
 
     fll_program_print_help_option(print, iki_read_short_content_s, iki_read_long_content_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Print the Variable value (aka: Content) (default)");
     fll_program_print_help_option(print, iki_read_short_literal_s, iki_read_long_literal_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Print the entire Variable (aka: Object, Content, and syntax).");
     fll_program_print_help_option(print, iki_read_short_object_s, iki_read_long_object_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print the Variable name (aka: Vocabulary) (aka: Object).");
     fll_program_print_help_option(print, iki_read_short_total_s, iki_read_long_total_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "  Print the total number of Variables.");
 
-    f_print_dynamic_raw(f_string_eol_s, print.to);
+    f_print_dynamic_raw(f_string_eol_s, print->to);
 
     fll_program_print_help_option(print, iki_read_short_reassign_s, iki_read_long_reassign_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "  Re-assign the Variable for the given name and matching Content value with the given string.");
     fll_program_print_help_option(print, iki_read_short_replace_s, iki_read_long_replace_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "   Simple substitution, replacing the Variable for the given name with the given string.");
     fll_program_print_help_option(print, iki_read_short_substitute_s, iki_read_long_substitute_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Substitute the Variable for the given name and matching Content value with the given string.");
     fll_program_print_help_option(print, iki_read_short_wrap_s, iki_read_long_wrap_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "      Prepend and append strings for the given name.");
 
-    f_print_dynamic_raw(f_string_eol_s, print.to);
-    f_print_dynamic_raw(f_string_eol_s, print.to);
+    f_print_dynamic_raw(f_string_eol_s, print->to);
 
     fll_program_print_help_usage(print, iki_read_program_name_s, fll_program_parameter_filenames_s);
 
-    fl_print_format("%r %[Notes:%]%r", print.to, f_string_eol_s, print.set->important, print.set->important, f_string_eol_s);
-    fl_print_format("  This program will find and print Variables, Vocabularies, or Content following the IKI standard, without focusing on any particular Vocabulary specification.%r%r", print.to, f_string_eol_s, f_string_eol_s);
+    fl_print_format("%r %[Notes:%]%r", print->to, f_string_eol_s, print->set->important, print->set->important, f_string_eol_s);
+    fl_print_format("  This program will find and print Variables, Vocabularies, or Content following the IKI standard, without focusing on any particular Vocabulary specification.%r%r", print->to, f_string_eol_s, f_string_eol_s);
 
-    fl_print_format("  The %[%r%r%] option requires 2 additional parameters:", print.to, print.set->notable, f_console_symbol_long_normal_s, iki_read_long_replace_s, print.set->notable);
-    fl_print_format(" %[<%]%r%[>%]", print.to, print.set->notable, print.set->notable, iki_read_substitution_vocabulary_s, print.set->notable, print.set->notable);
-    fl_print_format(" %[<%]%r%[>%].%r", print.to, print.set->notable, print.set->notable, iki_read_substitution_with_s, print.set->notable, print.set->notable, f_string_eol_s);
+    fl_print_format("  The %[%r%r%] option requires 2 additional parameters:", print->to, print->set->notable, f_console_symbol_long_normal_s, iki_read_long_replace_s, print->set->notable);
+    fl_print_format(" %[<%]%r%[>%]", print->to, print->set->notable, print->set->notable, iki_read_substitution_vocabulary_s, print->set->notable, print->set->notable);
+    fl_print_format(" %[<%]%r%[>%].%r", print->to, print->set->notable, print->set->notable, iki_read_substitution_with_s, print->set->notable, print->set->notable, f_string_eol_s);
 
-    fl_print_format("    %[%r%]: The name of the Vocabulary whose content is to be substituted.%r", print.to, print.set->notable, iki_read_substitution_vocabulary_s, print.set->notable, f_string_eol_s);
-    fl_print_format("    %[%r%]: The new string to use as the substitute.%r%r", print.to, print.set->notable, iki_read_substitution_with_s, print.set->notable, f_string_eol_s, f_string_eol_s);
+    fl_print_format("    %[%r%]: The name of the Vocabulary whose content is to be substituted.%r", print->to, print->set->notable, iki_read_substitution_vocabulary_s, print->set->notable, f_string_eol_s);
+    fl_print_format("    %[%r%]: The new string to use as the substitute.%r%r", print->to, print->set->notable, iki_read_substitution_with_s, print->set->notable, f_string_eol_s, f_string_eol_s);
 
-    fl_print_format("  The Vocabulary is case-sensitive and must exactly match.%r%r", print.to, f_string_eol_s, f_string_eol_s);
+    fl_print_format("  The Vocabulary is case-sensitive and must exactly match.%r%r", print->to, f_string_eol_s, f_string_eol_s);
 
-    fl_print_format("  The %[%r%r%] and the", print.to, print.set->notable, f_console_symbol_long_normal_s, iki_read_long_reassign_s, print.set->notable);
-    fl_print_format(" %[%r%r%] options require 3 additional parameters:", print.to, print.set->notable, f_console_symbol_long_normal_s, iki_read_long_substitute_s, print.set->notable);
-    fl_print_format(" %[<%]%r%[>%]", print.to, print.set->notable, print.set->notable, iki_read_substitution_vocabulary_s, print.set->notable, print.set->notable);
-    fl_print_format(" %[<%]%r%[>%]", print.to, print.set->notable, print.set->notable, iki_read_substitution_replace_s, print.set->notable, print.set->notable);
-    fl_print_format(" %[<%]%r%[>%].%r", print.to, print.set->notable, print.set->notable, iki_read_substitution_with_s, print.set->notable, print.set->notable, f_string_eol_s);
+    fl_print_format("  The %[%r%r%] and the", print->to, print->set->notable, f_console_symbol_long_normal_s, iki_read_long_reassign_s, print->set->notable);
+    fl_print_format(" %[%r%r%] options require 3 additional parameters:", print->to, print->set->notable, f_console_symbol_long_normal_s, iki_read_long_substitute_s, print->set->notable);
+    fl_print_format(" %[<%]%r%[>%]", print->to, print->set->notable, print->set->notable, iki_read_substitution_vocabulary_s, print->set->notable, print->set->notable);
+    fl_print_format(" %[<%]%r%[>%]", print->to, print->set->notable, print->set->notable, iki_read_substitution_replace_s, print->set->notable, print->set->notable);
+    fl_print_format(" %[<%]%r%[>%].%r", print->to, print->set->notable, print->set->notable, iki_read_substitution_with_s, print->set->notable, print->set->notable, f_string_eol_s);
 
-    fl_print_format("    %[%r%]: The name of the Vocabulary whose content is to be substituted or re-assigned.%r", print.to, print.set->notable, iki_read_substitution_vocabulary_s, print.set->notable, f_string_eol_s);
-    fl_print_format("    %[%r%]: The Content matching this exact string will be substituted or re-assigned.%r", print.to, print.set->notable, iki_read_substitution_replace_s, print.set->notable, f_string_eol_s);
-    fl_print_format("    %[%r%]: The new string to use as the substitute or re-assignment.%r%r", print.to, print.set->notable, iki_read_substitution_with_s, print.set->notable, f_string_eol_s, f_string_eol_s);
+    fl_print_format("    %[%r%]: The name of the Vocabulary whose content is to be substituted or re-assigned.%r", print->to, print->set->notable, iki_read_substitution_vocabulary_s, print->set->notable, f_string_eol_s);
+    fl_print_format("    %[%r%]: The Content matching this exact string will be substituted or re-assigned.%r", print->to, print->set->notable, iki_read_substitution_replace_s, print->set->notable, f_string_eol_s);
+    fl_print_format("    %[%r%]: The new string to use as the substitute or re-assignment.%r%r", print->to, print->set->notable, iki_read_substitution_with_s, print->set->notable, f_string_eol_s, f_string_eol_s);
 
-    fl_print_format("  The Vocabulary and replacement are case-sensitive and must exactly match.%r%r", print.to, f_string_eol_s, f_string_eol_s);
+    fl_print_format("  The Vocabulary and replacement are case-sensitive and must exactly match.%r%r", print->to, f_string_eol_s, f_string_eol_s);
 
-    fl_print_format("  The %[%r%r%] option requires 3 additional parameters:", print.to, print.set->notable, f_console_symbol_long_normal_s, iki_read_long_wrap_s, print.set->notable);
-    fl_print_format(" %[<%]%r%[>%]", print.to, print.set->notable, print.set->notable, iki_read_substitution_vocabulary_s, print.set->notable, print.set->notable);
-    fl_print_format(" %[<%]%r%[>%]", print.to, print.set->notable, print.set->notable, iki_read_substitution_before_s, print.set->notable, print.set->notable);
-    fl_print_format(" %[<%]%r%[>%].%r", print.to, print.set->notable, print.set->notable, iki_read_substitution_after_s, print.set->notable, print.set->notable, f_string_eol_s);
+    fl_print_format("  The %[%r%r%] option requires 3 additional parameters:", print->to, print->set->notable, f_console_symbol_long_normal_s, iki_read_long_wrap_s, print->set->notable);
+    fl_print_format(" %[<%]%r%[>%]", print->to, print->set->notable, print->set->notable, iki_read_substitution_vocabulary_s, print->set->notable, print->set->notable);
+    fl_print_format(" %[<%]%r%[>%]", print->to, print->set->notable, print->set->notable, iki_read_substitution_before_s, print->set->notable, print->set->notable);
+    fl_print_format(" %[<%]%r%[>%].%r", print->to, print->set->notable, print->set->notable, iki_read_substitution_after_s, print->set->notable, print->set->notable, f_string_eol_s);
 
-    fl_print_format("    %[%r%]: The name of the Vocabulary whose content is to be wrapped.%r", print.to, print.set->notable, iki_read_substitution_vocabulary_s, print.set->notable, f_string_eol_s);
-    fl_print_format("    %[%r%]: The string to prepend.%r", print.to, print.set->notable, iki_read_substitution_before_s, print.set->notable, f_string_eol_s);
-    fl_print_format("    %[%r%]: The string to append.%r%r", print.to, print.set->notable, iki_read_substitution_after_s, print.set->notable, f_string_eol_s, f_string_eol_s);
+    fl_print_format("    %[%r%]: The name of the Vocabulary whose content is to be wrapped.%r", print->to, print->set->notable, iki_read_substitution_vocabulary_s, print->set->notable, f_string_eol_s);
+    fl_print_format("    %[%r%]: The string to prepend.%r", print->to, print->set->notable, iki_read_substitution_before_s, print->set->notable, f_string_eol_s);
+    fl_print_format("    %[%r%]: The string to append.%r%r", print->to, print->set->notable, iki_read_substitution_after_s, print->set->notable, f_string_eol_s, f_string_eol_s);
 
-    fl_print_format("  The Vocabulary is case-sensitive and must exactly match.%r%r", print.to, f_string_eol_s, f_string_eol_s);
+    fl_print_format("  The Vocabulary is case-sensitive and must exactly match.%r%r", print->to, f_string_eol_s, f_string_eol_s);
 
-    fl_print_format("  The difference between %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, iki_read_long_replace_s, print.set->notable);
-    fl_print_format(" and %[%r%r%] is that the", print.to, print.set->notable, f_console_symbol_long_normal_s, iki_read_long_substitute_s, print.set->notable);
-    fl_print_format(" %[%r%r%] option substitutes all matching Vocabulary names and the", print.to, print.set->notable, f_console_symbol_long_normal_s, iki_read_long_replace_s, print.set->notable);
-    fl_print_format(" %[%r%r%] option substitutes all matching Vocabulary names that must also have the given matching Content.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, iki_read_long_substitute_s, print.set->notable, f_string_eol_s, f_string_eol_s);
+    fl_print_format("  The difference between %[%r%r%]", print->to, print->set->notable, f_console_symbol_long_normal_s, iki_read_long_replace_s, print->set->notable);
+    fl_print_format(" and %[%r%r%] is that the", print->to, print->set->notable, f_console_symbol_long_normal_s, iki_read_long_substitute_s, print->set->notable);
+    fl_print_format(" %[%r%r%] option substitutes all matching Vocabulary names and the", print->to, print->set->notable, f_console_symbol_long_normal_s, iki_read_long_replace_s, print->set->notable);
+    fl_print_format(" %[%r%r%] option substitutes all matching Vocabulary names that must also have the given matching Content.%r%r", print->to, print->set->notable, f_console_symbol_long_normal_s, iki_read_long_substitute_s, print->set->notable, f_string_eol_s, f_string_eol_s);
 
-    fl_print_format("  The %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, iki_read_long_reassign_s, print.set->notable);
-    fl_print_format(" option is identical to the %[%r%r%] option", print.to, print.set->notable, f_console_symbol_long_normal_s, iki_read_long_substitute_s, print.set->notable);
-    fl_print_format(" except that the %[%r%r%] option is ignored (not applied).%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, iki_read_long_wrap_s, print.set->notable, f_string_eol_s, f_string_eol_s);
+    fl_print_format("  The %[%r%r%]", print->to, print->set->notable, f_console_symbol_long_normal_s, iki_read_long_reassign_s, print->set->notable);
+    fl_print_format(" option is identical to the %[%r%r%] option", print->to, print->set->notable, f_console_symbol_long_normal_s, iki_read_long_substitute_s, print->set->notable);
+    fl_print_format(" except that the %[%r%r%] option is ignored (not applied).%r%r", print->to, print->set->notable, f_console_symbol_long_normal_s, iki_read_long_wrap_s, print->set->notable, f_string_eol_s, f_string_eol_s);
 
-    fl_print_format("  The %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, iki_read_long_substitute_s, print.set->notable);
-    fl_print_format(" option takes priority over the %[%r%r%] option when matching the same Variable.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, iki_read_long_replace_s, print.set->notable, f_string_eol_s, f_string_eol_s);
+    fl_print_format("  The %[%r%r%]", print->to, print->set->notable, f_console_symbol_long_normal_s, iki_read_long_substitute_s, print->set->notable);
+    fl_print_format(" option takes priority over the %[%r%r%] option when matching the same Variable.%r%r", print->to, print->set->notable, f_console_symbol_long_normal_s, iki_read_long_replace_s, print->set->notable, f_string_eol_s, f_string_eol_s);
 
-    fl_print_format("  The default behavior is to only display Content portion of the IKI Variable.%r", print.to, f_string_eol_s);
+    fl_print_format("  The default behavior is to only display Content portion of the IKI Variable.%r", print->to, f_string_eol_s);
 
-    f_file_stream_flush(print.to);
-    f_file_stream_unlock(print.to);
+    f_file_stream_flush(print->to);
+    f_file_stream_unlock(print->to);
 
     return F_none;
   }
index 29910aecf177bfae1ada9ec12554d5e22942fd87..1318850c3911627c52852fba43cba5dec4f0f88b 100644 (file)
@@ -19,13 +19,11 @@ extern "C" {
 /**
  * Print help.
  *
- * @param setting
- *   The main program settings.
- *
- *   This does not alter setting.state.status.
  * @param print
  *   The output structure to print to.
  *
+ *   This does not alter print.custom.setting.state.status.
+ *
  * @return
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
@@ -33,7 +31,7 @@ extern "C" {
  *   F_output_not (with error bit) if setting is NULL.
  */
 #ifndef _di_iki_read_print_help_
-  extern f_status_t iki_read_print_help(iki_read_setting_t * const setting, const fl_print_t print);
+  extern f_status_t iki_read_print_help(fl_print_t * const print);
 #endif // _di_iki_read_print_help_
 
 #ifdef __cplusplus
index 106f3a5cc5e9071ad0b1815796e61de3d7b2fe7a..14135096baa151164a6619f6add2a0222cd46f64 100644 (file)
@@ -5,7 +5,7 @@ extern "C" {
 #endif
 
 #ifndef _di_iki_read_print_data_
-  void iki_read_print_data(fll_program_data_t * const main, iki_read_setting_t * const setting, const f_array_length_t index) {
+  void iki_read_print_data(fl_print_t * const print, const f_array_length_t index) {
 
     if (!setting) return;
 
@@ -128,7 +128,7 @@ extern "C" {
 #endif // _di_iki_read_print_data_
 
 #ifndef _di_iki_read_print_data_wrap_append_
-  void iki_read_print_data_wrap_append(fll_program_data_t * const main, iki_read_setting_t * const setting, const f_array_length_t index) {
+  void iki_read_print_data_wrap_append(fl_print_t * const print, const f_array_length_t index) {
 
     if (!setting) return;
 
@@ -148,7 +148,7 @@ extern "C" {
 #endif // _di_iki_read_print_data_wrap_append_
 
 #ifndef _di_iki_read_print_data_wrap_prepend_
-  void iki_read_print_data_wrap_prepend(fll_program_data_t * const main, iki_read_setting_t * const setting, const f_array_length_t index) {
+  void iki_read_print_data_wrap_prepend(fl_print_t * const print, const f_array_length_t index) {
 
     if (!setting) return;
 
index 1e17ed424bf4be4350a0f7f354a63c67d5add4d2..6a8d95a84f4316729540ac86853ab13508ab8ab9 100644 (file)
@@ -24,15 +24,13 @@ extern "C" {
  * This detects and prints any applicable substitution matching the vocabulary at the given index.
  * If there is no substitution, then this prints the given range at the given index.
  *
- * @param main
- *   The main program data.
- * @param setting
- *   The main program settings.
+ * @param print
+ *   The output structure to print to.
  *
  *   The setting.map_wraps is expected to be defined as a valid pointer to an array.
  *   The setting.map_replaces is expected to be defined as a valid pointer to an array.
  *
- *   This does not alter setting.state.status.
+ *   This does not alter print.custom.setting.state.status.
  * @param index
  *   The index used to identify the desired range in variable, content, and ranges.
  *
@@ -44,7 +42,7 @@ extern "C" {
  * @see iki_read_print_data_wrap_append()
  */
 #ifndef _di_iki_read_print_data_
-  extern void iki_read_print_data(fll_program_data_t * const main, iki_read_setting_t * const setting, const f_array_length_t index) F_attribute_visibility_internal_d;
+  extern void iki_read_print_data(fl_print_t * const print, const f_array_length_t index) F_attribute_visibility_internal_d;
 #endif // _di_iki_read_print_data_
 
 /**
@@ -52,19 +50,17 @@ extern "C" {
  *
  * This expects the caller to have the output locked appropriately.
  *
- * @param main
- *   The main program data.
- * @param setting
- *   The main program settings.
+ * @param print
+ *   The output structure to print to.
  *
- *   This does not alter setting.state.status.
+ *   This does not alter print.custom.setting.state.status.
  * @param index
  *   The index within the setting->map_wraps array to print.
  *
  * @see f_print_dynamic()
  */
 #ifndef _di_iki_read_print_data_wrap_append_
-  extern void iki_read_print_data_wrap_append(fll_program_data_t * const main, iki_read_setting_t * const setting, const f_array_length_t index) F_attribute_visibility_internal_d;
+  extern void iki_read_print_data_wrap_append(fl_print_t * const print, const f_array_length_t index) F_attribute_visibility_internal_d;
 #endif // _di_iki_read_print_data_wrap_append_
 
 /**
@@ -72,19 +68,17 @@ extern "C" {
  *
  * This expects the caller to have the output locked appropriately.
  *
- * @param main
- *   The main program data.
- * @param setting
- *   The main program settings.
+ * @param print
+ *   The output structure to print to.
  *
- *   This does not alter setting.state.status.
+ *   This does not alter print.custom.setting.state.status.
  * @param index
  *   The index within the setting->map_wraps array to print.
  *
  * @see f_print_dynamic()
  */
 #ifndef _di_iki_read_print_data_wrap_prepend_
-  extern void iki_read_print_data_wrap_prepend(fll_program_data_t * const main, iki_read_setting_t * const setting, const f_array_length_t index) F_attribute_visibility_internal_d;
+  extern void iki_read_print_data_wrap_prepend(fl_print_t * const print, const f_array_length_t index) F_attribute_visibility_internal_d;
 #endif // _di_iki_read_print_data_wrap_prepend_
 
 #ifdef __cplusplus
index c4bdb86b8286ceda9b4a3fbcfc5bad4c6a0ad03b..ca565920f0f8a1bd1d8c9bcba8ddd5ea38a6f6b1 100644 (file)
@@ -5,18 +5,18 @@ extern "C" {
 #endif
 
 #ifndef _di_iki_read_print_error_
-  f_status_t iki_read_print_error(iki_read_setting_t * const setting, const fl_print_t print, const f_string_t function) {
+  f_status_t iki_read_print_error(fl_print_t * const print, const f_string_t function) {
 
     if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
 
-    fll_error_print(*print, F_status_set_fine(setting->state.status), function, fll_error_file_flag_fallback_e);
+    fll_error_print(print, F_status_set_fine(setting->state.status), function, fll_error_file_flag_fallback_e);
 
     return F_none;
   }
 #endif // _di_iki_read_print_error_
 
 #ifndef _di_iki_read_print_error_file_
-  f_status_t iki_read_print_error_file(iki_read_setting_t * const setting, const fl_print_t print, const f_string_t function, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) {
+  f_status_t iki_read_print_error_file(fl_print_t * const print, const f_string_t function, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) {
 
     if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
 
index f825f58fcba2c7b07d46f9858f8e22d916b4ddf0..fb7df27754640a47b95b85c0ae389e1e85914442 100644 (file)
@@ -19,12 +19,10 @@ extern "C" {
 /**
  * Print generic error message regarding a function failing in some way.
  *
- * @param setting
- *   The main program settings.
- *
- *   This does not alter setting.state.status.
  * @param print
- *   Designates the how and where to print.
+ *   The output structure to print to.
+ *
+ *   This does not alter print.custom.setting.state.status.
  *
  * @return
  *   F_none on success.
@@ -35,18 +33,16 @@ extern "C" {
  * @see fll_error_print()
  */
 #ifndef _di_iki_read_print_error_
-  extern f_status_t iki_read_print_error(iki_read_setting_t * const setting, const fl_print_t print, const f_string_t function);
+  extern f_status_t iki_read_print_error(fl_print_t * const print, const f_string_t function);
 #endif // _di_iki_read_print_error_
 
 /**
  * Print file related error or warning messages.
  *
- * @param setting
- *   The main program settings.
- *
- *   This does not alter setting.state.status.
  * @param print
- *   Designates how printing is to be performed.
+ *   The output structure to print to.
+ *
+ *   This does not alter print.custom.setting.state.status.
  * @param function
  *   The name of the function where the error happened.
  *   Set to 0 to disable.
@@ -66,7 +62,7 @@ extern "C" {
  * @see fll_error_file_print()
  */
 #ifndef _di_iki_read_print_error_file_
-  extern f_status_t iki_read_print_error_file(iki_read_setting_t * const setting, const fl_print_t print, const f_string_t function, const f_string_static_t name, const f_string_static_t operation, const uint8_t type);
+  extern f_status_t iki_read_print_error_file(fl_print_t * const print, const f_string_t function, const f_string_static_t name, const f_string_static_t operation, const uint8_t type);
 #endif // _di_iki_read_print_error_file_
 
 #ifdef __cplusplus
diff --git a/level_3/iki_read/c/main/print/message.c b/level_3/iki_read/c/main/print/message.c
new file mode 100644 (file)
index 0000000..de0e2a3
--- /dev/null
@@ -0,0 +1,9 @@
+#include "../iki_read.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/iki_read/c/main/print/message.h b/level_3/iki_read/c/main/print/message.h
new file mode 100644 (file)
index 0000000..41ef415
--- /dev/null
@@ -0,0 +1,23 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: IKI Read
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides the print error functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _iki_read_print_message_h
+#define _iki_read_print_message_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _iki_read_print_message_h
index 38a9a84d1d364ea8593f11d77568f8e819b36e9e..bafa47a51adbc51637601bbc32a5c759981d986b 100644 (file)
@@ -328,8 +328,8 @@ extern "C" {
       for (i = 0; i < main->parameters.array[iki_read_parameter_name_e].values.used; ++i) {
 
         if (!((++main->signal_check) % iki_read_signal_check_d)) {
-          if (fll_program_standard_signal_received(main)) {
-            fll_program_print_signal_received(main->warning, main->signal_received);
+          if (fll_program_standard_signal_received(&main->program)) {
+            fll_program_print_signal_received(&main->warning, main->signal_received);
 
             f_string_dynamic_resize(0, &name);
 
index 44ed04d1ecbdcc89929158641ba8fd138291676c..1de300fb5f9f6b3d3c6166cecb404bb200849a5e 100644 (file)
@@ -22,11 +22,11 @@ build_libraries-individual -lfll_error -lfll_print -lfll_program -lfl_conversion
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
-build_sources_library main/iki_read.c main/common.c main/identify.c main/common/print.c main/common/string.c main/common/type.c main/print.c main/print/data.c main/print/error.c main/process.c
+build_sources_library main/iki_read.c main/common.c main/identify.c main/common/define.c main/common/enumeration.c main/common/print.c main/common/string.c main/common/type.c main/print/data.c main/print/error.c main/print/message.c main/process.c
 
 build_sources_program main/main.c
 
-build_sources_headers main/iki_read.h main/common.h main/identify.h main/common/print.h main/common/string.h main/common/type.h main/print.h main/print/data.h main/print/error.h main/process.h
+build_sources_headers main/iki_read.h main/common.h main/identify.h main/common/define.h main/common/enumeration.h main/common/print.h main/common/string.h main/common/type.h main/print/data.h main/print/error.h main/print/message.h main/process.h
 
 build_sources_documentation man
 
index 2dccb1a0639e0aeff57bbbfff0b3ffffc05400ed..b5646f689dad0d9b73d633dfb27fae15cb87db3e 100644 (file)
@@ -68,7 +68,7 @@ extern "C" {
 
         const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
 
-        setting->state.status = fll_program_parameter_process_context(choices, modes, F_true, main);
+        setting->state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
 
         if (F_status_is_error(setting->state.status)) {
           if ((setting->flag & iki_write_main_flag_print_first_e) && main->message.verbosity > f_console_verbosity_error_e) {
@@ -89,7 +89,7 @@ extern "C" {
 
         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 };
 
-        setting->state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
+        setting->state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
 
         if (F_status_is_error(setting->state.status)) {
           if ((setting->flag & iki_write_main_flag_print_first_e) && main->message.verbosity > f_console_verbosity_error_e) {
@@ -133,7 +133,7 @@ extern "C" {
           fll_print_dynamic_raw(f_string_eol_s, main->message.to);
         }
 
-        fll_program_print_error_parameter_must_specify_once(main->error, f_console_symbol_long_normal_s, iki_write_long_file_s);
+        fll_program_print_error_parameter_must_specify_once(&main->error, f_console_symbol_long_normal_s, iki_write_long_file_s);
 
         return;
       }
@@ -164,7 +164,7 @@ extern "C" {
         fll_print_dynamic_raw(f_string_eol_s, main->message.to);
       }
 
-      fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, iki_write_long_file_s);
+      fll_program_print_error_parameter_missing_value(&main->error, f_console_symbol_long_normal_s, iki_write_long_file_s);
 
       return;
     }
@@ -205,7 +205,7 @@ extern "C" {
         fll_print_dynamic_raw(f_string_eol_s, main->message.to);
       }
 
-      fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, iki_write_long_object_s);
+      fll_program_print_error_parameter_missing_value(&main->error, f_console_symbol_long_normal_s, iki_write_long_object_s);
 
       return;
     }
@@ -246,7 +246,7 @@ extern "C" {
         fll_print_dynamic_raw(f_string_eol_s, main->message.to);
       }
 
-      fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, iki_write_long_content_s);
+      fll_program_print_error_parameter_missing_value(&main->error, f_console_symbol_long_normal_s, iki_write_long_content_s);
 
       return;
     }
diff --git a/level_3/iki_write/c/main/common/define.c b/level_3/iki_write/c/main/common/define.c
new file mode 100644 (file)
index 0000000..192b528
--- /dev/null
@@ -0,0 +1,9 @@
+#include "../iki_write.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/iki_write/c/main/common/define.h b/level_3/iki_write/c/main/common/define.h
new file mode 100644 (file)
index 0000000..d155120
--- /dev/null
@@ -0,0 +1,24 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: IKI Write
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides the common define types.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _iki_write_common_define_h
+#define _iki_write_common_define_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _iki_write_common_define_h
diff --git a/level_3/iki_write/c/main/common/enumeration.c b/level_3/iki_write/c/main/common/enumeration.c
new file mode 100644 (file)
index 0000000..192b528
--- /dev/null
@@ -0,0 +1,9 @@
+#include "../iki_write.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/iki_write/c/main/common/enumeration.h b/level_3/iki_write/c/main/common/enumeration.h
new file mode 100644 (file)
index 0000000..e2d80de
--- /dev/null
@@ -0,0 +1,47 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: IKI Write
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides the common enumeration types.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _iki_write_common_enumeration_h
+#define _iki_write_common_enumeration_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Flags for fine-tuned print control.
+ *
+ * iki_write_print_flag_*_e:
+ *   - none:      No flags set.
+ *   - debug:     Stream is for debug printing.
+ *   - error:     Stream is for error printing.
+ *   - message:   Stream is for message printing.
+ *   - warning:   Stream is for warning printing.
+ *   - file_to:   Stream is a destination file.
+ *   - file_from: Stream is a source file.
+ */
+#ifndef _di_iki_write_print_flag_e_
+  enum {
+    iki_write_print_flag_none_e      = 0x0,
+    iki_write_print_flag_debug_e     = 0x1,
+    iki_write_print_flag_error_e     = 0x2,
+    iki_write_print_flag_message_e   = 0x4,
+    iki_write_print_flag_warning_e   = 0x8,
+    iki_write_print_flag_file_to_e   = 0x10,
+    iki_write_print_flag_file_from_e = 0x20,
+  }; // enum
+#endif // _di_iki_write_print_flag_e_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _iki_write_common_enumeration_h
index 1b33e1c2f03ec9c4b74e9ff0fc3b1e20edead430..489bd793fe197e7531330ca3f5fe6514a5d64d7f 100644 (file)
@@ -169,6 +169,25 @@ extern "C" {
     }
 #endif // _di_iki_write_setting_t_
 
+/**
+ * The main program data as a single structure.
+ *
+ * program: The main program data.
+ * setting: The settings data.
+ */
+#ifndef _di_iki_write_main_t_
+  typedef struct {
+    fll_program_data_t program;
+    iki_write_setting_t setting;
+  } iki_write_main_t;
+
+  #define iki_write_main_t_initialize \
+    { \
+      fll_program_data_t_initialize, \
+      iki_write_setting_t_initialize, \
+    }
+#endif // _di_iki_write_main_t_
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 7484a14b7693507bf829b6d3a500e887a15a3b52..43eb845a670b6980f8a4e599b5beceac8f066b49 100644 (file)
@@ -23,31 +23,20 @@ extern "C" {
 
     setting->state.status = F_none;
 
-    if (setting->flag & iki_write_main_flag_help_e) {
-      iki_write_print_help(setting, main->message);
+    if (main->setting.flag & (iki_write_main_flag_help_e | iki_write_main_flag_version_e | iki_write_main_flag_copyright_e)) {
 
-      if ((setting->flag & iki_write_main_flag_print_last_e) && main->message.verbosity > f_console_verbosity_error_e) {
-        fll_print_dynamic_raw(f_string_eol_s, main->message.to);
+      if (main->setting.flag & iki_write_main_flag_help_e) {
+        iki_write_print_message_help(&main->program.message);
       }
-
-      return;
-    }
-
-    if (setting->flag & iki_write_main_flag_version_e) {
-      fll_program_print_version(main->message, iki_write_program_version_s);
-
-      if ((setting->flag & iki_write_main_flag_print_last_e) && main->message.verbosity > f_console_verbosity_error_e) {
-        fll_print_dynamic_raw(f_string_eol_s, main->message.to);
+      else if (main->setting.flag & iki_write_main_flag_version_e) {
+        fll_program_print_version(&main->program.message, iki_write_program_version_s);
+      }
+      else if (main->setting.flag & iki_write_main_flag_copyright_e) {
+        fll_program_print_copyright(&main->program.message);
       }
 
-      return;
-    }
-
-    if (setting->flag & iki_write_main_flag_copyright_e) {
-      fll_program_print_copyright(main->message);
-
-      if ((setting->flag & iki_write_main_flag_print_last_e) && main->message.verbosity > f_console_verbosity_error_e) {
-        fll_print_dynamic_raw(f_string_eol_s, main->message.to);
+      if ((main->setting.flag & iki_write_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
       }
 
       return;
@@ -74,7 +63,7 @@ extern "C" {
 
       do {
         if (!((++main->signal_check) % iki_write_signal_check_d)) {
-          if (fll_program_standard_signal_received(main)) {
+          if (fll_program_standard_signal_received(&main->program)) {
             setting->state.status = F_status_set_error(F_interrupt);
 
             object_ended = F_false;
@@ -101,7 +90,7 @@ extern "C" {
           if (!setting->buffer.used) {
             setting->state.status = F_status_set_error(F_parameter);
 
-            fll_program_print_error_pipe_missing_content(main->error);
+            fll_program_print_error_pipe_missing_content(&main->error);
 
             object_ended = F_false;
 
@@ -129,7 +118,7 @@ extern "C" {
         if (object_ended && previous == range.start) {
           setting->state.status = F_status_set_error(F_parameter);
 
-          fll_program_print_error_pipe_invalid_form_feed(main->error);
+          fll_program_print_error_pipe_invalid_form_feed(&main->error);
 
           object_ended = F_false;
 
@@ -197,7 +186,7 @@ extern "C" {
       if (object_ended) {
         setting->state.status = F_status_set_error(F_parameter);
 
-        fll_program_print_error_pipe_object_without_content(main->error);
+        fll_program_print_error_pipe_object_without_content(&main->error);
       }
     }
 
@@ -205,7 +194,7 @@ extern "C" {
       for (f_array_length_t i = 0; i < setting->objects.used; ++i) {
 
         if (!((++main->signal_check) % iki_write_signal_check_d)) {
-          if (fll_program_standard_signal_received(main)) {
+          if (fll_program_standard_signal_received(&main->program)) {
             setting->state.status = F_status_set_error(F_interrupt);
 
             break;
index c5007302f5dd111aa79d08fce12fc33a93371c86..64aa8ce084d58daefad800ad87aed5d8c0daca1e 100644 (file)
 #include <fll/level_2/program.h>
 
 // IKI Write includes.
+#include <program/iki_write/main/common/define.h>
+#include <program/iki_write/main/common/enumeration.h>
 #include <program/iki_write/main/common/print.h>
 #include <program/iki_write/main/common/string.h>
 #include <program/iki_write/main/common/type.h>
 #include <program/iki_write/main/common.h>
-#include <program/iki_write/main/print.h>
 #include <program/iki_write/main/print/error.h>
+#include <program/iki_write/main/print/message.h>
 #include <program/iki_write/main/process.h>
 
 #ifdef __cplusplus
index bb004577048d757a033eee373664390e9836e282..f79a08de859d2a48868f3e174cec994dd6f9fdbe 100644 (file)
@@ -2,8 +2,17 @@
 
 int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
-  fll_program_data_t data = fll_program_data_t_initialize;
-  iki_write_setting_t setting = iki_write_setting_t_initialize;
+  iki_write_main_t data = iki_write_main_t_initialize;
+
+  data.program.debug.flag |= iki_write_print_flag_debug_e;
+  data.program.error.flag |= iki_write_print_flag_error_e;
+  data.program.message.flag |= iki_write_print_flag_message_e;
+  data.program.warning.flag |= iki_write_print_flag_warning_e;
+  data.program.message.custom = (void *) &data;
+  data.program.output.custom = (void *) &data;
+  data.program.error.custom = (void *) &data;
+  data.program.warning.custom = (void *) &data;
+  data.program.debug.custom = (void *) &data;
 
   f_console_parameter_t parameters[] = iki_write_console_parameter_t_initialize;
   data.parameters.array = parameters;
index aab492d68779b21f2316a5cd4a3db05cc883b11c..4f5b6fc503245d0bdcccf3ae01c4378db2fc4787 100644 (file)
@@ -5,11 +5,11 @@ extern "C" {
 #endif
 
 #ifndef _di_iki_write_print_help_
-  f_status_t iki_write_print_help(iki_write_setting_t * const setting, const fl_print_t print) {
+  f_status_t iki_write_print_help(fl_print_t * const print) {
 
     if (!setting) return F_status_set_error(F_output_not);
 
-    f_file_stream_lock(print.to);
+    f_file_stream_lock(print->to);
 
     fll_program_print_help_header(print, iki_write_program_name_long_s, iki_write_program_version_s);
 
@@ -24,7 +24,7 @@ extern "C" {
     fll_program_print_help_option(print, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, "   Enable debugging, significantly increasing verbosity beyond normal output.");
     fll_program_print_help_option(print, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Print only the version number.");
 
-    f_print_dynamic_raw(f_string_eol_s, print.to);
+    f_print_dynamic_raw(f_string_eol_s, print->to);
 
     fll_program_print_help_option(print, iki_write_short_backtick_s, iki_write_long_backtick_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Use backtick for quotes.");
     fll_program_print_help_option(print, iki_write_short_content_s, iki_write_long_content_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " The Content to write.");
@@ -34,23 +34,22 @@ extern "C" {
     fll_program_print_help_option(print, iki_write_short_single_s, iki_write_long_single_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "  Use single quotes.");
     fll_program_print_help_option(print, iki_write_short_wrap_s, iki_write_long_wrap_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "    Wrap the vocabulary name.");
 
-    f_print_dynamic_raw(f_string_eol_s, print.to);
-    f_print_dynamic_raw(f_string_eol_s, print.to);
+    f_print_dynamic_raw(f_string_eol_s, print->to);
 
     fll_program_print_help_usage(print, iki_write_program_name_s, f_string_empty_s);
 
-    fl_print_format("%r %[Notes:%]%r", print.to, f_string_eol_s, print.set->important, print.set->important, f_string_eol_s);
-    fl_print_format("  This program will accept Object and Content strings to generate an IKI string, such as %[object:\"content\"%].%r", print.to, print.set->notable, print.set->notable, f_string_eol_s);
-    fl_print_format("  Each Object must have a Content (and each Content must have an Object).%r%r", print.to, f_string_eol_s, f_string_eol_s);
+    fl_print_format("%r %[Notes:%]%r", print->to, f_string_eol_s, print->set->important, print->set->important, f_string_eol_s);
+    fl_print_format("  This program will accept Object and Content strings to generate an IKI string, such as %[object:\"content\"%].%r", print->to, print->set->notable, print->set->notable, f_string_eol_s);
+    fl_print_format("  Each Object must have a Content (and each Content must have an Object).%r%r", print->to, f_string_eol_s, f_string_eol_s);
 
-    fl_print_format("  The Object is also called the Vocabulary.%r", print.to, f_string_eol_s);
-    fl_print_format("  A complete Object and Content set is also called a Variable.%r%r", print.to, f_string_eol_s, f_string_eol_s);
+    fl_print_format("  The Object is also called the Vocabulary.%r", print->to, f_string_eol_s);
+    fl_print_format("  A complete Object and Content set is also called a Variable.%r%r", print->to, f_string_eol_s, f_string_eol_s);
 
-    fl_print_format("  When piping main to this program, a single form-feed character (\\f) (U+000C) must be used to separate each Object from each Content.%r", print.to, f_string_eol_s);
-    fl_print_format("  Furthermore, each Object must be followed by a Content.%r", print.to, f_string_eol_s);
+    fl_print_format("  When piping main to this program, a single form-feed character (\\f) (U+000C) must be used to separate each Object from each Content.%r", print->to, f_string_eol_s);
+    fl_print_format("  Furthermore, each Object must be followed by a Content.%r", print->to, f_string_eol_s);
 
-    f_file_stream_flush(print.to);
-    f_file_stream_unlock(print.to);
+    f_file_stream_flush(print->to);
+    f_file_stream_unlock(print->to);
 
     return F_none;
   }
index b6ae2fe0cafff5b043c851b6abddc82e8a432afd..608c5dbc7dd8a3b1354518e9db323c37b0dd90ee 100644 (file)
@@ -33,7 +33,7 @@ extern "C" {
  *   F_output_not (with error bit) if setting is NULL.
  */
 #ifndef _di_iki_write_print_help_
-  extern f_status_t iki_write_print_help(iki_write_setting_t * const setting, const fl_print_t print);
+  extern f_status_t iki_write_print_help(fl_print_t * const print);
 #endif // _di_iki_write_print_help_
 
 #ifdef __cplusplus
diff --git a/level_3/iki_write/c/main/print/data.c b/level_3/iki_write/c/main/print/data.c
new file mode 100644 (file)
index 0000000..192b528
--- /dev/null
@@ -0,0 +1,9 @@
+#include "../iki_write.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/iki_write/c/main/print/data.h b/level_3/iki_write/c/main/print/data.h
new file mode 100644 (file)
index 0000000..80df6dd
--- /dev/null
@@ -0,0 +1,23 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: IKI Write
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides the print error functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _iki_write_print_data_h
+#define _iki_write_print_data_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _iki_write_print_data_h
index 299637a64a989d92f39bd3d41a0d97caefd85d9f..32daaad6745604db6822fea4191130da3b71f856 100644 (file)
@@ -5,62 +5,62 @@ extern "C" {
 #endif
 
 #ifndef _di_iki_write_print_error_
-  f_status_t iki_write_print_error(iki_write_setting_t * const setting, const fl_print_t print, const f_string_t function) {
+  f_status_t iki_write_print_error(fl_print_t * const print, const f_string_t function) {
 
-    if (!setting) return F_status_set_error(F_output_not);
-    if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+    if (!print) return F_status_set_error(F_output_not);
+    if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
 
-    fll_error_print(*print, F_status_set_fine(setting->state.status), function, fll_error_file_flag_fallback_e);
+    fll_error_print(print, F_status_set_fine(setting->state.status), function, fll_error_file_flag_fallback_e);
 
     return F_none;
   }
 #endif // _di_iki_write_print_error_
 
 #ifndef _di_iki_write_print_error_file_
-  f_status_t iki_write_print_error_file(iki_write_setting_t * const setting, const fl_print_t print, const f_string_t function, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) {
+  f_status_t iki_write_print_error_file(fl_print_t * const print, const f_string_t function, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) {
 
-    if (!setting) return F_status_set_error(F_output_not);
-    if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+    if (!print) return F_status_set_error(F_output_not);
+    if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
 
-    fll_error_file_print(*print, F_status_set_fine(setting->state.status), function, fll_error_file_flag_fallback_e, name, operation, type);
+    fll_error_file_print(print, F_status_set_fine(setting->state.status), function, fll_error_file_flag_fallback_e, name, operation, type);
 
     return F_none;
   }
 #endif // _di_iki_write_print_error_file_
 
 #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) {
+  f_status_t iki_write_print_error_main_missing(fl_print_t * const print) {
 
-    if (!setting) return F_status_set_error(F_output_not);
-    if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+    if (!print) return F_status_set_error(F_output_not);
+    if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
 
-    f_file_stream_lock(print.to);
+    f_file_stream_lock(print->to);
 
-    fl_print_format("%[%QNo main provided, either pipe the main data or use the '%]", print.to, print.set->error, print.prefix, print.set->error);
-    fl_print_format("%[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, iki_write_long_object_s, print.set->notable);
-    fl_print_format("%[' and the '%]", print.to, print.set->error, print.set->error);
-    fl_print_format("%[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, iki_write_long_content_s, print.set->notable);
-    fl_print_format("%[' parameters.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
+    fl_print_format("%[%QNo main provided, either pipe the main data or use the '%]", print->to, print->set->error, print->prefix, print->set->error);
+    fl_print_format("%[%r%r%]", print->to, print->set->notable, f_console_symbol_long_normal_s, iki_write_long_object_s, print->set->notable);
+    fl_print_format("%[' and the '%]", print->to, print->set->error, print->set->error);
+    fl_print_format("%[%r%r%]", print->to, print->set->notable, f_console_symbol_long_normal_s, iki_write_long_content_s, print->set->notable);
+    fl_print_format("%[' parameters.%]%r", print->to, print->set->error, print->set->error, f_string_eol_s);
 
-    f_file_stream_unlock(print.to);
+    f_file_stream_unlock(print->to);
 
     return F_none;
   }
 #endif // _di_iki_write_print_error_main_missing_
 
 #ifndef _di_iki_write_print_error_object_not_valid_
-  f_status_t iki_write_print_error_object_not_valid(iki_write_setting_t * const setting, const fl_print_t print, const f_string_static_t object) {
+  f_status_t iki_write_print_error_object_not_valid(fl_print_t * const print, const f_string_static_t object) {
 
-    if (!setting) return F_status_set_error(F_output_not);
-    if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+    if (!print) return F_status_set_error(F_output_not);
+    if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
 
-    f_file_stream_lock(print.to);
+    f_file_stream_lock(print->to);
 
-    fl_print_format("%[%QThe object '%]", print.to, print.set->error, print.prefix, print.set->error);
-    fl_print_format("%[%Q%]", print.to, print.set->notable, object, print.set->notable);
-    fl_print_format("%[' is not a valid IKI Object.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
+    fl_print_format("%[%QThe object '%]", print->to, print->set->error, print->prefix, print->set->error);
+    fl_print_format("%[%Q%]", print->to, print->set->notable, object, print->set->notable);
+    fl_print_format("%[' is not a valid IKI Object.%]%r", print->to, print->set->error, print->set->error, f_string_eol_s);
 
-    f_file_stream_unlock(print.to);
+    f_file_stream_unlock(print->to);
 
     return F_none;
   }
index 1cf70b11eaa271c9b03bbfc0f99a94120f357e66..62f76d226d862d875c9e2c19d239375a29e7d050 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 3
  *
- * Project: UTF8
+ * Project: IKI Write
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
@@ -19,12 +19,10 @@ extern "C" {
 /**
  * Print generic error message regarding a function failing in some way.
  *
- * @param setting
- *   The main program settings.
- *
- *   This does not alter setting.state.status.
  * @param print
- *   Designates the how and where to print.
+ *   The output structure to print to.
+ *
+ *   This does not alter print.custom.setting.state.status.
  *
  * @return
  *   F_none on success.
@@ -35,18 +33,16 @@ extern "C" {
  * @see fll_error_print()
  */
 #ifndef _di_iki_write_print_error_
-  extern f_status_t iki_write_print_error(iki_write_setting_t * const setting, const fl_print_t print, const f_string_t function);
+  extern f_status_t iki_write_print_error(fl_print_t * const print, const f_string_t function);
 #endif // _di_iki_write_print_error_
 
 /**
  * Print file related error or warning messages.
  *
- * @param setting
- *   The main program settings.
- *
- *   This does not alter setting.state.status.
  * @param print
- *   Designates how printing is to be performed.
+ *   The output structure to print to.
+ *
+ *   This does not alter print.custom.setting.state.status.
  * @param function
  *   The name of the function where the error happened.
  *   Set to 0 to disable.
@@ -66,18 +62,16 @@ extern "C" {
  * @see fll_error_file_print()
  */
 #ifndef _di_iki_write_print_error_file_
-  extern f_status_t iki_write_print_error_file(iki_write_setting_t * const setting, const fl_print_t print, const f_string_t function, const f_string_static_t name, const f_string_static_t operation, const uint8_t type);
+  extern f_status_t iki_write_print_error_file(fl_print_t * const print, const f_string_t function, const f_string_static_t name, const f_string_static_t operation, const uint8_t type);
 #endif // _di_iki_write_print_error_file_
 
 /**
  * Print error message about "main" Object being missing.
  *
- * @param setting
- *   The main program settings.
- *
- *   This does not alter setting.state.status.
  * @param print
- *   Designates the how and where to print.
+ *   The output structure to print to.
+ *
+ *   This does not alter print.custom.setting.state.status.
  *
  * @return
  *   F_none on success.
@@ -86,18 +80,16 @@ extern "C" {
  *   F_output_not (with error bit) if setting is NULL.
  */
 #ifndef _di_iki_write_print_error_main_missing_
-  extern f_status_t iki_write_print_error_main_missing(iki_write_setting_t * const setting, const fl_print_t print);
+  extern f_status_t iki_write_print_error_main_missing(fl_print_t * const print);
 #endif // _di_iki_write_print_error_main_missing_
 
 /**
  * Print error message about an Object not being valid.
  *
- * @param setting
- *   The main program settings.
- *
- *   This does not alter setting.state.status.
  * @param print
- *   Designates the how and where to print.
+ *   The output structure to print to.
+ *
+ *   This does not alter print.custom.setting.state.status.
  * @param object
  *   The a string representing the object that is missing.
  *
@@ -108,7 +100,7 @@ extern "C" {
  *   F_output_not (with error bit) if setting is NULL.
  */
 #ifndef _di_iki_write_print_error_object_not_valid_
-  extern f_status_t iki_write_print_error_object_not_valid(iki_write_setting_t * const setting, const fl_print_t print, const f_string_static_t object);
+  extern f_status_t iki_write_print_error_object_not_valid(fl_print_t * const print, const f_string_static_t object);
 #endif // _di_iki_write_print_error_object_not_valid_
 
 #ifdef __cplusplus
diff --git a/level_3/iki_write/c/main/print/message.c b/level_3/iki_write/c/main/print/message.c
new file mode 100644 (file)
index 0000000..192b528
--- /dev/null
@@ -0,0 +1,9 @@
+#include "../iki_write.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/iki_write/c/main/print/message.h b/level_3/iki_write/c/main/print/message.h
new file mode 100644 (file)
index 0000000..1782622
--- /dev/null
@@ -0,0 +1,23 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: IKI Write
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides the print error functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _iki_write_print_message_h
+#define _iki_write_print_message_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _iki_write_print_message_h
index 86d7e865c1a8d35a02b9d4169e395c8e30a4a9df..04911da57000656fc49a9efe642ffca66ec490ba 100644 (file)
@@ -10,7 +10,7 @@ extern "C" {
     if (!object.used) {
       setting->state.status = F_status_set_error(F_failure);
 
-      fll_program_print_error_missing_variable_not_zero(main->error, iki_write_object_s);
+      fll_program_print_error_missing_variable_not_zero(&main->error, iki_write_object_s);
 
       return;
     }
index da00094bff568bda2f436470ce4c7c21485cc559..6647d94ce94f4ab71b700b13b7e5eb198edcf07f 100644 (file)
@@ -21,11 +21,11 @@ build_libraries-individual -lfll_error -lfll_iki -lfll_print -lfll_program -lfl_
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
-build_sources_library main/iki_write.c main/common.c main/common/print.c main/common/string.c main/common/type.c main/print.c main/print/error.c main/process.c
+build_sources_library main/iki_write.c main/common.c main/common/define.c main/common/enumeration.c main/common/print.c main/common/string.c main/common/type.c main/print/error.c main/print/message.c main/process.c
 
 build_sources_program main/main.c
 
-build_sources_headers main/iki_write.h main/common.h main/common/print.h main/common/string.h main/common/type.h main/print.h main/print/error.h main/process.h
+build_sources_headers main/iki_write.h main/common.h main/common/define.h main/common/enumeration.h main/common/print.h main/common/string.h main/common/type.h main/print/error.h main/print/message.h main/process.h
 
 build_sources_documentation man
 
index 59737c3f8c32a1aecbcc487f7dc58405a543af1e..f1768e2be64a977b6007e6de52884d6f5f772cba 100644 (file)
@@ -4,38 +4,49 @@
 
 int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
-  fll_program_data_t data = fll_program_data_t_initialize;
-  status_code_setting_t setting = status_code_setting_t_initialize;
-  setting.program_name = &status_code_fss_program_name_s;
-  setting.program_name_long = &status_code_fss_program_name_long_s;
-  setting.status_string_from = &fll_fss_status_string_from;
-  setting.status_string_to = &fll_fss_status_string_to;
-  setting.status_string_help_detail = &status_code_fss_print_help_detail;
+  status_code_main_t data = status_code_main_t_initialize;
+
+  data.program.debug.flag |= status_code_print_flag_debug_e;
+  data.program.error.flag |= status_code_print_flag_error_e;
+  data.program.message.flag |= status_code_print_flag_message_e;
+  data.program.warning.flag |= status_code_print_flag_warning_e;
+  data.program.message.custom = (void *) &data;
+  data.program.output.custom = (void *) &data;
+  data.program.error.custom = (void *) &data;
+  data.program.warning.custom = (void *) &data;
+  data.program.debug.custom = (void *) &data;
+
+  data.setting.program_name = &status_code_fss_program_name_s;
+  data.setting.program_name_long = &status_code_fss_program_name_long_s;
+  data.setting.status_string_from = &fll_fss_status_string_from;
+  data.setting.status_string_to = &fll_fss_status_string_to;
+  data.setting.status_string_help_detail = &status_code_fss_print_help_detail;
 
   f_console_parameter_t parameters[] = status_code_console_parameter_t_initialize;
-  data.parameters.array = parameters;
-  data.parameters.used = status_code_total_parameters_d;
-  data.environment = envp;
+
+  data.program.parameters.array = parameters;
+  data.program.parameters.used = status_code_total_parameters_d;
+  data.program.environment = envp;
 
   if (f_pipe_input_exists()) {
-    data.pipe = fll_program_data_pipe_input_e;
+    data.program.pipe = fll_program_data_pipe_input_e;
   }
 
-  fll_program_standard_set_up(&data);
+  fll_program_standard_set_up(&data.program);
 
   {
     const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
 
-    status_code_setting_load(arguments, &data, &setting);
+    status_code_setting_load(arguments, &data);
   }
 
-  status_code_main(&data, &setting);
+  status_code_main(&data);
 
-  status_code_setting_unload(&data, &setting);
+  status_code_setting_unload(&data);
 
-  fll_program_data_delete(&data);
+  fll_program_data_delete(&data.program);
 
-  fll_program_standard_set_down(&data);
+  fll_program_standard_set_down(&data.program);
 
-  return (F_status_is_error(setting.state.status) || setting.state.status == F_false) ? 1 : 0;
+  return (F_status_is_error(data.setting.state.status) || data.setting.state.status == F_false) ? 1 : 0;
 }
index 82af1fea61ef0ceccf9e76ab6b3c73a291284d53..de75d8be9bed8f7331d1264a7486486c6352b350 100644 (file)
@@ -7,25 +7,25 @@ extern "C" {
 #endif
 
 #ifndef _di_status_code_fss_print_help_detail_
-  f_status_t status_code_fss_print_help_detail(void * const setting, const fl_print_t print) {
+  f_status_t status_code_fss_print_help_detail(fl_print_t * const print) {
 
-    if (!setting) return F_status_set_error(F_output_not);
+    if (!print) return F_status_set_error(F_output_not);
 
-    fl_print_format("  The FLL programs use a %[16-bit unsigned integer%] to represent the return status of programs and functions.%r%r", print.to, print.set->notable, print.set->notable, f_string_eol_s, f_string_eol_s);
+    fl_print_format("  The FLL programs use a %[16-bit unsigned integer%] to represent the return status of programs and functions.%r%r", print->to, print->set->notable, print->set->notable, f_string_eol_s, f_string_eol_s);
 
-    fl_print_format("  Programs may print a generic error with one of these codes.%r", print.to, f_string_eol_s);
-    fl_print_format("  This is a tool for converting to or converting from these codes.%r%r", print.to, f_string_eol_s, f_string_eol_s);
+    fl_print_format("  Programs may print a generic error with one of these codes.%r", print->to, f_string_eol_s);
+    fl_print_format("  This is a tool for converting to or converting from these codes.%r%r", print->to, f_string_eol_s, f_string_eol_s);
 
-    fl_print_format("  The %[16-bit unsigned integer%] also has the first two high-order bits used to represent flags.%r", print.to, print.set->notable, print.set->notable, f_string_eol_s);
-    fl_print_format("  These flags are the %[error%] bit and the %[warning%] bit.%r", print.to, print.set->notable, print.set->notable, print.set->notable, print.set->notable, f_string_eol_s);
-    fl_print_format("  When neither of these flags are set, then the status is considered %[fine%].%r%r", print.to, print.set->notable, print.set->notable, f_string_eol_s, f_string_eol_s);
+    fl_print_format("  The %[16-bit unsigned integer%] also has the first two high-order bits used to represent flags.%r", print->to, print->set->notable, print->set->notable, f_string_eol_s);
+    fl_print_format("  These flags are the %[error%] bit and the %[warning%] bit.%r", print->to, print->set->notable, print->set->notable, print->set->notable, print->set->notable, f_string_eol_s);
+    fl_print_format("  When neither of these flags are set, then the status is considered %[fine%].%r%r", print->to, print->set->notable, print->set->notable, f_string_eol_s, f_string_eol_s);
 
-    fl_print_format("  This operates identical to the %[status_codes%] program except that this program handles additional codes regarding FSS.%r", print.to, print.set->notable, print.set->notable, f_string_eol_s);
-    fl_print_format("  These special codes numericaly appear after the %[F_status_code_last%] code.%r", print.to, print.set->notable, print.set->notable, f_string_eol_s);
-    fl_print_format("  These codes stop at the %[F_fss_status_code_last%] code.%r%r", print.to, print.set->notable, print.set->notable, f_string_eol_s, f_string_eol_s);
+    fl_print_format("  This operates identical to the %[status_codes%] program except that this program handles additional codes regarding FSS.%r", print->to, print->set->notable, print->set->notable, f_string_eol_s);
+    fl_print_format("  These special codes numericaly appear after the %[F_status_code_last%] code.%r", print->to, print->set->notable, print->set->notable, f_string_eol_s);
+    fl_print_format("  These codes stop at the %[F_fss_status_code_last%] code.%r%r", print->to, print->set->notable, print->set->notable, f_string_eol_s, f_string_eol_s);
 
-    fl_print_format("  Each code will be printed on its own line.%r", print.to, f_string_eol_s);
-    fl_print_format("  Errors regarding each code may be printed on its own line.%r", print.to, f_string_eol_s);
+    fl_print_format("  Each code will be printed on its own line.%r", print->to, f_string_eol_s);
+    fl_print_format("  Errors regarding each code may be printed on its own line.%r", print->to, f_string_eol_s);
 
     return F_none;
   }
index 8f525500c50542fdc98cc56bfcafacef499a0cd9..515391d59a0e6ce59c404d4fc9d8a45e7f153322 100644 (file)
@@ -19,17 +19,14 @@ extern "C" {
 /**
  * Print help detailed part of the help for fss_status_code.
  *
- * This is designed to be called from within status_code_print_help().
+ * This is designed to be called from within status_code_print_message_help().
  * This neither locks nor unlocks the stream and expects the stream to be unlocked.
  *
- * @param setting
- *   The main program settings.
- *   (Must be of type status_code_setting_t.)
- *
- *   This does not alter setting.state.status.
  * @param print
  *   The output structure to print to.
  *
+ *   This does not alter print.custom.setting.state.status.
+ *
  * @return
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
@@ -38,10 +35,10 @@ extern "C" {
  *
  * @see fl_print_format()
  *
- * @see status_code_print_help()
+ * @see status_code_print_message_help()
  */
 #ifndef _di_status_code_fss_print_help_detail_
-  extern f_status_t status_code_fss_print_help_detail(void * const setting, const fl_print_t print);
+  extern f_status_t status_code_fss_print_help_detail(fl_print_t * const print);
 #endif // _di_status_code_fss_print_help_detail_
 
 #ifdef __cplusplus
index ff6ff2902137736cfacc8066627dc5d76938ac15..8282eea00276a69889cdf329712049ae9e23f1ad 100644 (file)
 #include <fll/level_2/program.h>
 
 // Status Code includes.
+#include <program/status_code/main/common/define.h>
+#include <program/status_code/main/common/enumeration.h>
 #include <program/status_code/main/common/print.h>
 #include <program/status_code/main/common/string.h>
 #include <program/status_code/main/common/type.h>
 #include <program/status_code/main/common.h>
 #include <program/status_code/fss/common.h>
 #include <program/status_code/main/convert.h>
-#include <program/status_code/main/print.h>
 #include <program/status_code/main/print/data.h>
 #include <program/status_code/main/print/error.h>
+#include <program/status_code/main/print/message.h>
 #include <program/status_code/main/process.h>
 
 #ifdef __cplusplus
index 03fbf122e165e36259f81e85d310b7c14f53bbfb..93385bf5fc4c1416f46cb55af37e73dbd6e5460d 100644 (file)
@@ -14,37 +14,37 @@ extern "C" {
 #endif // _di_status_code_setting_delete_
 
 #ifndef _di_status_code_setting_load_
-  void status_code_setting_load(const f_console_arguments_t arguments, fll_program_data_t * const main, status_code_setting_t * const setting) {
+  void status_code_setting_load(const f_console_arguments_t arguments, status_code_main_t * const main) {
 
-    if (!main || !setting) return;
+    if (!main) return;
 
-    setting->state.step_small = status_code_allocation_console_d;
+    main->setting.state.step_small = status_code_allocation_console_d;
 
-    f_console_parameter_process(arguments, &main->parameters, &setting->state, 0);
+    f_console_parameter_process(arguments, &main->program.parameters, &main->setting.state, 0);
 
-    setting->state.step_small = status_code_allocation_small_d;
+    main->setting.state.step_small = status_code_allocation_small_d;
 
     // Identify and pocess first/last parameters.
-    if (main->parameters.array[status_code_parameter_line_first_no_e].result & f_console_result_found_e) {
-      setting->flag -= setting->flag & status_code_main_flag_print_first_e;
+    if (main->program.parameters.array[status_code_parameter_line_first_no_e].result & f_console_result_found_e) {
+      main->setting.flag -= main->setting.flag & status_code_main_flag_print_first_e;
     }
     else {
-      setting->flag |= status_code_main_flag_print_first_e;
+      main->setting.flag |= status_code_main_flag_print_first_e;
     }
 
-    if (main->parameters.array[status_code_parameter_line_last_no_e].result & f_console_result_found_e) {
-      setting->flag -= setting->flag & status_code_main_flag_print_last_e;
+    if (main->program.parameters.array[status_code_parameter_line_last_no_e].result & f_console_result_found_e) {
+      main->setting.flag -= main->setting.flag & status_code_main_flag_print_last_e;
     }
     else {
-      setting->flag |= status_code_main_flag_print_last_e;
+      main->setting.flag |= status_code_main_flag_print_last_e;
     }
 
-    if (F_status_is_error(setting->state.status)) {
-      if ((setting->flag & status_code_main_flag_print_first_e) && main->message.verbosity > f_console_verbosity_error_e) {
-        fll_print_dynamic_raw(f_string_eol_s, main->message.to);
+    if (F_status_is_error(main->setting.state.status)) {
+      if ((main->setting.flag & status_code_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
       }
 
-      status_code_print_error(setting, main->error, macro_status_code_f(f_console_parameter_process));
+      status_code_print_error(&main->program.error, macro_status_code_f(f_console_parameter_process));
 
       return;
     }
@@ -60,14 +60,14 @@ extern "C" {
 
         const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
 
-        setting->state.status = fll_program_parameter_process_context(choices, modes, F_true, main);
+        main->setting.state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
 
-        if (F_status_is_error(setting->state.status)) {
-          if ((setting->flag & status_code_main_flag_print_first_e) && main->message.verbosity > f_console_verbosity_error_e) {
-            fll_print_dynamic_raw(f_string_eol_s, main->message.to);
+        if (F_status_is_error(main->setting.state.status)) {
+          if ((main->setting.flag & status_code_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+            fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
           }
 
-          status_code_print_error(setting, main->error, macro_status_code_f(fll_program_parameter_process_context));
+          status_code_print_error(&main->program.error, macro_status_code_f(fll_program_parameter_process_context));
 
           return;
         }
@@ -81,101 +81,101 @@ extern "C" {
 
         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 };
 
-        setting->state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
+        main->setting.state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
 
-        if (F_status_is_error(setting->state.status)) {
-          if ((setting->flag & status_code_main_flag_print_first_e) && main->message.verbosity > f_console_verbosity_error_e) {
-            fll_print_dynamic_raw(f_string_eol_s, main->message.to);
+        if (F_status_is_error(main->setting.state.status)) {
+          if ((main->setting.flag & status_code_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+            fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
           }
 
-          status_code_print_error(setting, main->error, macro_status_code_f(fll_program_parameter_process_verbosity));
+          status_code_print_error(&main->program.error, macro_status_code_f(fll_program_parameter_process_verbosity));
 
           return;
         }
       }
 
-      if (main->parameters.array[status_code_parameter_help_e].result & f_console_result_found_e) {
-        setting->flag |= status_code_main_flag_help_e;
+      if (main->program.parameters.array[status_code_parameter_help_e].result & f_console_result_found_e) {
+        main->setting.flag |= status_code_main_flag_help_e;
 
         return;
       }
 
-      if (main->parameters.array[status_code_parameter_version_e].result & f_console_result_found_e) {
-        setting->flag |= status_code_main_flag_version_e;
+      if (main->program.parameters.array[status_code_parameter_version_e].result & f_console_result_found_e) {
+        main->setting.flag |= status_code_main_flag_version_e;
 
         return;
       }
 
-      if (main->parameters.array[status_code_parameter_copyright_e].result & f_console_result_found_e) {
-        setting->flag |= status_code_main_flag_copyright_e;
+      if (main->program.parameters.array[status_code_parameter_copyright_e].result & f_console_result_found_e) {
+        main->setting.flag |= status_code_main_flag_copyright_e;
 
         return;
       }
     }
 
-    if (main->parameters.array[status_code_parameter_error_e].result & f_console_result_found_e) {
-      setting->flag |= status_code_main_flag_error_e;
+    if (main->program.parameters.array[status_code_parameter_error_e].result & f_console_result_found_e) {
+      main->setting.flag |= status_code_main_flag_error_e;
     }
 
-    if (main->parameters.array[status_code_parameter_fine_e].result & f_console_result_found_e) {
-      setting->flag |= status_code_main_flag_fine_e;
+    if (main->program.parameters.array[status_code_parameter_fine_e].result & f_console_result_found_e) {
+      main->setting.flag |= status_code_main_flag_fine_e;
     }
 
-    if (main->parameters.array[status_code_parameter_warning_e].result & f_console_result_found_e) {
-      setting->flag |= status_code_main_flag_warning_e;
+    if (main->program.parameters.array[status_code_parameter_warning_e].result & f_console_result_found_e) {
+      main->setting.flag |= status_code_main_flag_warning_e;
     }
 
-    if (main->parameters.array[status_code_parameter_number_e].result & f_console_result_found_e) {
-      setting->flag |= status_code_main_flag_number_e;
+    if (main->program.parameters.array[status_code_parameter_number_e].result & f_console_result_found_e) {
+      main->setting.flag |= status_code_main_flag_number_e;
     }
 
-    if (setting->flag & status_code_main_flag_error_e) {
-      if (setting->flag & status_code_main_flag_warning_e) {
-        if (!(setting->flag & status_code_main_flag_number_e)) {
-          setting->state.status = F_status_set_error(F_parameter);
+    if (main->setting.flag & status_code_main_flag_error_e) {
+      if (main->setting.flag & status_code_main_flag_warning_e) {
+        if (!(main->setting.flag & status_code_main_flag_number_e)) {
+          main->setting.state.status = F_status_set_error(F_parameter);
 
-          if ((setting->flag & status_code_main_flag_print_first_e) && main->message.verbosity > f_console_verbosity_error_e) {
-            fll_print_dynamic_raw(f_string_eol_s, main->message.to);
+          if ((main->setting.flag & status_code_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+            fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
           }
 
-          status_code_print_error_cannot_error_warning_number(setting, main->error);
+          status_code_print_error_cannot_error_warning_number(&main->program.error);
 
           return;
         }
       }
 
-      if (setting->flag & status_code_main_flag_fine_e) {
-        setting->state.status = F_status_set_error(F_parameter);
+      if (main->setting.flag & status_code_main_flag_fine_e) {
+        main->setting.state.status = F_status_set_error(F_parameter);
 
-        if ((setting->flag & status_code_main_flag_print_first_e) && main->message.verbosity > f_console_verbosity_error_e) {
-          fll_print_dynamic_raw(f_string_eol_s, main->message.to);
+        if ((main->setting.flag & status_code_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+          fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
         }
 
-        fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, status_code_long_error_s, status_code_long_fine_s);
+        fll_program_print_error_parameter_cannot_use_with(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, status_code_long_error_s, status_code_long_fine_s);
 
         return;
       }
     }
-    else if (setting->flag & status_code_main_flag_warning_e && setting->flag & status_code_main_flag_fine_e) {
-      setting->state.status = F_status_set_error(F_parameter);
+    else if (main->setting.flag & status_code_main_flag_warning_e && main->setting.flag & status_code_main_flag_fine_e) {
+      main->setting.state.status = F_status_set_error(F_parameter);
 
-      if ((setting->flag & status_code_main_flag_print_first_e) && main->message.verbosity > f_console_verbosity_error_e) {
-        fll_print_dynamic_raw(f_string_eol_s, main->message.to);
+      if ((main->setting.flag & status_code_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
       }
 
-      fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, status_code_long_warning_s, status_code_long_fine_s);
+      fll_program_print_error_parameter_cannot_use_with(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, status_code_long_warning_s, status_code_long_fine_s);
 
       return;
     }
 
-    if (main->parameters.remaining.used == 0 && !(main->pipe & fll_program_data_pipe_input_e)) {
-      setting->state.status = F_status_set_error(F_parameter);
+    if (main->program.parameters.remaining.used == 0 && !(main->program.pipe & fll_program_data_pipe_input_e)) {
+      main->setting.state.status = F_status_set_error(F_parameter);
 
-      if ((setting->flag & status_code_main_flag_print_first_e) && main->message.verbosity > f_console_verbosity_error_e) {
-        fll_print_dynamic_raw(f_string_eol_s, main->message.to);
+      if ((main->setting.flag & status_code_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
       }
 
-      status_code_print_error_no_status_codes(setting, main->error);
+      status_code_print_error_no_status_codes(&main->program.error);
 
       return;
     }
index 04eba7c33225da2a32cad5c594ad6fe67abbad6f..d0143417d88f544ec50df4a9023b26feff4ecb43 100644 (file)
@@ -43,9 +43,7 @@ extern "C" {
  * @param arguments
  *   The parameters passed to the process (often referred to as command line arguments).
  * @param main
- *   The main program data.
- * @param setting
- *   The main program settings.
+ *   The main program and settings data.
  *
  *   This alters setting.state.status:
  *     F_none on success.
@@ -57,7 +55,7 @@ extern "C" {
  * @see fll_program_parameter_process_context()
  */
 #ifndef _di_status_code_setting_load_
-  extern void status_code_setting_load(const f_console_arguments_t arguments, fll_program_data_t * const main, status_code_setting_t * const setting);
+  extern void status_code_setting_load(const f_console_arguments_t arguments, status_code_main_t * const main);
 #endif // _di_status_code_setting_load_
 
 /**
diff --git a/level_3/status_code/c/main/common/define.c b/level_3/status_code/c/main/common/define.c
new file mode 100644 (file)
index 0000000..4c41666
--- /dev/null
@@ -0,0 +1,9 @@
+#include "../status_code.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/status_code/c/main/common/define.h b/level_3/status_code/c/main/common/define.h
new file mode 100644 (file)
index 0000000..573bb10
--- /dev/null
@@ -0,0 +1,39 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: Status Code
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides the common define types.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _status_code_common_define_h
+#define _status_code_common_define_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * The program defines.
+ *
+ * status_code_*:
+ *   - allocation_console: An allocation step used for small buffers specifically for console parameter.
+ *   - allocation_large:   An allocation step used for buffers that are anticipated to have large buffers.
+ *   - allocation_small:   An allocation step used for buffers that are anticipated to have small buffers.
+ *   - signal_check:       Number of iterations before performing signal check in non-threaded signal handling.
+ */
+#ifndef _di_status_code_d_
+  #define status_code_allocation_console_d 4
+  #define status_code_allocation_large_d   256
+  #define status_code_allocation_small_d   16
+  #define status_code_signal_check_d       20000
+#endif // _di_status_code_d_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _status_code_common_define_h
diff --git a/level_3/status_code/c/main/common/enumeration.c b/level_3/status_code/c/main/common/enumeration.c
new file mode 100644 (file)
index 0000000..4c41666
--- /dev/null
@@ -0,0 +1,9 @@
+#include "../status_code.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/status_code/c/main/common/enumeration.h b/level_3/status_code/c/main/common/enumeration.h
new file mode 100644 (file)
index 0000000..ecba561
--- /dev/null
@@ -0,0 +1,129 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: Status Code
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides the common enumeration types.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _status_code_common_enumeration_h
+#define _status_code_common_enumeration_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Flags passed to the main function or program.
+ *
+ * When number mode is not specified, then mode is "string" mode (there is no flag for "string" mode).
+ *
+ * status_code_main_flag_*_e:
+ *   - none:        No flags set.
+ *   - copyright:   Print copyright.
+ *   - error:       Check if status is "error".
+ *   - fine:        Check if status is "fine".
+ *   - help:        Print help.
+ *   - number:      Operate in number mode.
+ *   - print_first: When set, print new line to message output on program begin after loading settings.
+ *   - print_last:  When set, print new line to message output on program end.
+ *   - version:     Print version.
+ *   - warning:     Check if status is "warning".
+ */
+#ifndef _di_status_code_main_flag_e_
+  enum {
+    status_code_main_flag_none_e        = 0x0,
+    status_code_main_flag_copyright_e   = 0x1,
+    status_code_main_flag_error_e       = 0x2,
+    status_code_main_flag_fine_e        = 0x4,
+    status_code_main_flag_help_e        = 0x8,
+    status_code_main_flag_number_e      = 0x10,
+    status_code_main_flag_print_first_e = 0x20,
+    status_code_main_flag_print_last_e  = 0x40,
+    status_code_main_flag_version_e     = 0x80,
+    status_code_main_flag_warning_e     = 0x100,
+  }; // enum
+#endif // _di_status_code_main_flag_e_
+
+/**
+ * The main program parameters.
+ */
+#ifndef _di_status_code_parameter_e_
+  enum {
+    status_code_parameter_help_e,
+    status_code_parameter_copyright_e,
+    status_code_parameter_light_e,
+    status_code_parameter_dark_e,
+    status_code_parameter_no_color_e,
+    status_code_parameter_verbosity_quiet_e,
+    status_code_parameter_verbosity_error_e,
+    status_code_parameter_verbosity_normal_e,
+    status_code_parameter_verbosity_verbose_e,
+    status_code_parameter_verbosity_debug_e,
+    status_code_parameter_version_e,
+    status_code_parameter_line_first_no_e,
+    status_code_parameter_line_last_no_e,
+
+    status_code_parameter_fine_e,
+    status_code_parameter_warning_e,
+    status_code_parameter_error_e,
+    status_code_parameter_number_e,
+  }; // enum
+
+  #define status_code_console_parameter_t_initialize \
+    { \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s,          f_console_standard_long_help_s,          0, f_console_flag_normal_e), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s,     f_console_standard_long_copyright_s,     0, f_console_flag_inverse_e), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s,         f_console_standard_long_light_s,         0, f_console_flag_inverse_e), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s,          f_console_standard_long_dark_s,          0, f_console_flag_inverse_e), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s,      f_console_standard_long_no_color_s,      0, f_console_flag_inverse_e), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_quiet_s,         f_console_standard_long_quiet_s,         0, f_console_flag_inverse_e), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_error_s,         f_console_standard_long_error_s,         0, f_console_flag_inverse_e), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_normal_s,        f_console_standard_long_normal_s,        0, f_console_flag_inverse_e), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_verbose_s,       f_console_standard_long_verbose_s,       0, f_console_flag_inverse_e), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_debug_s,         f_console_standard_long_debug_s,         0, f_console_flag_inverse_e), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_version_s,       f_console_standard_long_version_s,       0, f_console_flag_inverse_e), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_line_last_no_s,  f_console_standard_long_line_last_no_s,  0, f_console_flag_inverse_e), \
+      \
+      macro_f_console_parameter_t_initialize_3(status_code_short_fine_s,    status_code_long_fine_s,    0, f_console_flag_normal_e), \
+      macro_f_console_parameter_t_initialize_3(status_code_short_warning_s, status_code_long_warning_s, 0, f_console_flag_normal_e), \
+      macro_f_console_parameter_t_initialize_3(status_code_short_error_s,   status_code_long_error_s,   0, f_console_flag_normal_e), \
+      macro_f_console_parameter_t_initialize_3(status_code_short_number_s,  status_code_long_number_s,  0, f_console_flag_normal_e), \
+    }
+
+  #define status_code_total_parameters_d 17
+#endif // _di_status_code_parameter_e_
+
+/**
+ * Flags for fine-tuned print control.
+ *
+ * status_code_print_flag_*_e:
+ *   - none:      No flags set.
+ *   - debug:     Stream is for debug printing.
+ *   - error:     Stream is for error printing.
+ *   - message:   Stream is for message printing.
+ *   - warning:   Stream is for warning printing.
+ *   - file_to:   Stream is a destination file.
+ *   - file_from: Stream is a source file.
+ */
+#ifndef _di_status_code_print_flag_e_
+  enum {
+    status_code_print_flag_none_e      = 0x0,
+    status_code_print_flag_debug_e     = 0x1,
+    status_code_print_flag_error_e     = 0x2,
+    status_code_print_flag_message_e   = 0x4,
+    status_code_print_flag_warning_e   = 0x8,
+    status_code_print_flag_file_to_e   = 0x10,
+    status_code_print_flag_file_from_e = 0x20,
+  }; // enum
+#endif // _di_status_code_print_flag_e_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _status_code_common_enumeration_h
index 264e60c62f084a430a27c240405dbf326f45ea2b..ee2bbfff00085e495639c3ebf89dc5a882f80771 100644 (file)
@@ -17,111 +17,6 @@ extern "C" {
 #endif
 
 /**
- * The program defines.
- *
- * status_code_*:
- *   - allocation_console: An allocation step used for small buffers specifically for console parameter.
- *   - allocation_large:   An allocation step used for buffers that are anticipated to have large buffers.
- *   - allocation_small:   An allocation step used for buffers that are anticipated to have small buffers.
- *   - signal_check:       Number of iterations before performing signal check in non-threaded signal handling.
- *
- * macro_status_code_setting:
- *   - Used to represent a cast to ((status_code_setting_t *) setting).
- *   - Simplifies the number of parenthesis used to make code slightly cleaner.
- *   - Is wrapped in a parenthesis and not a block.
- */
-#ifndef _di_status_code_d_
-  #define status_code_allocation_console_d 4
-  #define status_code_allocation_large_d   256
-  #define status_code_allocation_small_d   16
-  #define status_code_signal_check_d       20000
-
-  #define macro_status_code_setting(setting) ((status_code_setting_t *) setting)
-#endif // _di_status_code_d_
-
-/**
- * Flags passed to the main function or program.
- *
- * When number mode is not specified, then mode is "string" mode (there is no flag for "string" mode).
- *
- * status_code_main_flag_*_e:
- *   - none:        No flags set.
- *   - copyright:   Print copyright.
- *   - error:       Check if status is "error".
- *   - fine:        Check if status is "fine".
- *   - help:        Print help.
- *   - number:      Operate in number mode.
- *   - print_first: When set, print new line to message output on program begin after loading settings.
- *   - print_last:  When set, print new line to message output on program end.
- *   - version:     Print version.
- *   - warning:     Check if status is "warning".
- */
-#ifndef _di_status_code_main_flag_e_
-  enum {
-    status_code_main_flag_none_e        = 0x0,
-    status_code_main_flag_copyright_e   = 0x1,
-    status_code_main_flag_error_e       = 0x2,
-    status_code_main_flag_fine_e        = 0x4,
-    status_code_main_flag_help_e        = 0x8,
-    status_code_main_flag_number_e      = 0x10,
-    status_code_main_flag_print_first_e = 0x20,
-    status_code_main_flag_print_last_e  = 0x40,
-    status_code_main_flag_version_e     = 0x80,
-    status_code_main_flag_warning_e     = 0x100,
-  }; // enum
-#endif // _di_status_code_main_flag_e_
-
-/**
- * The main program parameters.
- */
-#ifndef _di_status_code_parameter_e_
-  enum {
-    status_code_parameter_help_e,
-    status_code_parameter_copyright_e,
-    status_code_parameter_light_e,
-    status_code_parameter_dark_e,
-    status_code_parameter_no_color_e,
-    status_code_parameter_verbosity_quiet_e,
-    status_code_parameter_verbosity_error_e,
-    status_code_parameter_verbosity_normal_e,
-    status_code_parameter_verbosity_verbose_e,
-    status_code_parameter_verbosity_debug_e,
-    status_code_parameter_version_e,
-    status_code_parameter_line_first_no_e,
-    status_code_parameter_line_last_no_e,
-
-    status_code_parameter_fine_e,
-    status_code_parameter_warning_e,
-    status_code_parameter_error_e,
-    status_code_parameter_number_e,
-  }; // enum
-
-  #define status_code_console_parameter_t_initialize \
-    { \
-      macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s,          f_console_standard_long_help_s,          0, f_console_flag_normal_e), \
-      macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s,     f_console_standard_long_copyright_s,     0, f_console_flag_inverse_e), \
-      macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s,         f_console_standard_long_light_s,         0, f_console_flag_inverse_e), \
-      macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s,          f_console_standard_long_dark_s,          0, f_console_flag_inverse_e), \
-      macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s,      f_console_standard_long_no_color_s,      0, f_console_flag_inverse_e), \
-      macro_f_console_parameter_t_initialize_3(f_console_standard_short_quiet_s,         f_console_standard_long_quiet_s,         0, f_console_flag_inverse_e), \
-      macro_f_console_parameter_t_initialize_3(f_console_standard_short_error_s,         f_console_standard_long_error_s,         0, f_console_flag_inverse_e), \
-      macro_f_console_parameter_t_initialize_3(f_console_standard_short_normal_s,        f_console_standard_long_normal_s,        0, f_console_flag_inverse_e), \
-      macro_f_console_parameter_t_initialize_3(f_console_standard_short_verbose_s,       f_console_standard_long_verbose_s,       0, f_console_flag_inverse_e), \
-      macro_f_console_parameter_t_initialize_3(f_console_standard_short_debug_s,         f_console_standard_long_debug_s,         0, f_console_flag_inverse_e), \
-      macro_f_console_parameter_t_initialize_3(f_console_standard_short_version_s,       f_console_standard_long_version_s,       0, f_console_flag_inverse_e), \
-      macro_f_console_parameter_t_initialize_3(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \
-      macro_f_console_parameter_t_initialize_3(f_console_standard_short_line_last_no_s,  f_console_standard_long_line_last_no_s,  0, f_console_flag_inverse_e), \
-      \
-      macro_f_console_parameter_t_initialize_3(status_code_short_fine_s,    status_code_long_fine_s,    0, f_console_flag_normal_e), \
-      macro_f_console_parameter_t_initialize_3(status_code_short_warning_s, status_code_long_warning_s, 0, f_console_flag_normal_e), \
-      macro_f_console_parameter_t_initialize_3(status_code_short_error_s,   status_code_long_error_s,   0, f_console_flag_normal_e), \
-      macro_f_console_parameter_t_initialize_3(status_code_short_number_s,  status_code_long_number_s,  0, f_console_flag_normal_e), \
-    }
-
-  #define status_code_total_parameters_d 17
-#endif // _di_status_code_parameter_e_
-
-/**
  * The status code main program settings.
  *
  * This is passed to the program-specific main entry point to designate program settings.
@@ -133,7 +28,7 @@ extern "C" {
  *
  * status_string_from:        A pointer to the status string function (usually either fll_status_string_from() or fll_fss_status_string_from()).
  * status_string_to:          A pointer to the status string function (usually either f_status_string_to() or fll_fss_status_string_to()).
- * status_string_help_detail: Print additional, more detailed help, in the help page (The setting paramete must be of type status_code_setting_t).
+ * status_string_help_detail: Print additional, more detailed help, in the help page.
  */
 #ifndef _di_status_code_setting_t_
   typedef struct {
@@ -146,7 +41,7 @@ extern "C" {
 
     f_status_t (*status_string_from)(const f_string_static_t name, f_status_t * const code);
     f_status_t (*status_string_to)(const f_status_t code, f_string_static_t * const name);
-    f_status_t (*status_string_help_detail)(void * const setting, const fl_print_t print);
+    f_status_t (*status_string_help_detail)(fl_print_t * const print);
   } status_code_setting_t;
 
   #define status_code_setting_t_initialize \
@@ -161,6 +56,25 @@ extern "C" {
     }
 #endif // _di_status_code_setting_t_
 
+/**
+ * The main program data as a single structure.
+ *
+ * program: The main program data.
+ * setting: The settings data.
+ */
+#ifndef _di_status_code_main_t_
+  typedef struct {
+    fll_program_data_t program;
+    status_code_setting_t setting;
+  } status_code_main_t;
+
+  #define status_code_main_t_initialize \
+    { \
+      fll_program_data_t_initialize, \
+      status_code_setting_t_initialize, \
+    }
+#endif // _di_status_code_main_t_
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 2a45068f94f8262ec7a1961e45228c139b2275fd..671cda3cd3e0902a5016e524f86cba4eade9ba7b 100644 (file)
@@ -5,30 +5,30 @@ extern "C" {
 #endif
 
 #ifndef _di_status_code_convert_number_
-  void status_code_convert_number(fll_program_data_t * const main, status_code_setting_t * const setting, const f_string_static_t value, f_number_unsigned_t *number) {
+  void status_code_convert_number(status_code_main_t * const main, const f_string_static_t value, f_number_unsigned_t *number) {
 
-    if (!main || !setting) return;
+    if (!main) return;
 
-    setting->state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, value, number);
+    main->setting.state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, value, number);
 
     if (*number > F_status_size_max_with_bits_d) {
-      status_code_print_data_context_value(setting, main->output, main->context.set.error, status_code_out_of_range_s);
+      status_code_print_data_context_value(&main->program.output, main->program.context.set.error, status_code_out_of_range_s);
 
-      setting->state.status = F_status_set_error(F_number_overflow);
+      main->setting.state.status = F_status_set_error(F_number_overflow);
 
       return;
     }
 
-    if (F_status_is_error(setting->state.status)) {
-      if (F_status_set_fine(setting->state.status) == F_number_negative) {
-        status_code_print_data_context_value(setting, main->output, main->context.set.error, status_code_out_of_range_s);
+    if (F_status_is_error(main->setting.state.status)) {
+      if (F_status_set_fine(main->setting.state.status) == F_number_negative) {
+        status_code_print_data_context_value(&main->program.output, main->program.context.set.error, status_code_out_of_range_s);
       }
       else {
-        status_code_print_data_context_value(setting, main->output, main->context.set.error, status_code_invalid_number_s);
+        status_code_print_data_context_value(&main->program.output, main->program.context.set.error, status_code_invalid_number_s);
       }
     }
     else {
-      setting->state.status = F_none;
+      main->setting.state.status = F_none;
     }
   }
 #endif // _di_status_code_convert_number_
index f4bfc091a6e8c28869f8e0968eb796a198c3504f..5467626dcf1e37b35c8feb179b69cb21821c77a1 100644 (file)
@@ -41,7 +41,7 @@ extern "C" {
  * @see fl_console_parameter_to_number_unsigned()
  */
 #ifndef _di_status_code_convert_number_
-  extern void status_code_convert_number(fll_program_data_t * const main, status_code_setting_t * const setting, const f_string_static_t value, f_number_unsigned_t *number);
+  extern void status_code_convert_number(status_code_main_t * const main, const f_string_static_t value, f_number_unsigned_t *number);
 #endif // _di_status_code_convert_number_
 
 #ifdef __cplusplus
index 185ea771fe982b639ccfdd4824f7784353ffa142..fcd6b5df206308a43a2fc4a762d8b538294da685 100644 (file)
@@ -2,38 +2,49 @@
 
 int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
-  fll_program_data_t data = fll_program_data_t_initialize;
-  status_code_setting_t setting = status_code_setting_t_initialize;
-  setting.program_name = &status_code_program_name_s;
-  setting.program_name_long = &status_code_program_name_long_s;
-  setting.status_string_from = &fll_status_string_from;
-  setting.status_string_to = &f_status_string_to;
-  setting.status_string_help_detail = &status_code_print_help_detail;
+  status_code_main_t data = status_code_main_t_initialize;
+
+  data.program.debug.flag |= status_code_print_flag_debug_e;
+  data.program.error.flag |= status_code_print_flag_error_e;
+  data.program.message.flag |= status_code_print_flag_message_e;
+  data.program.warning.flag |= status_code_print_flag_warning_e;
+  data.program.message.custom = (void *) &data;
+  data.program.output.custom = (void *) &data;
+  data.program.error.custom = (void *) &data;
+  data.program.warning.custom = (void *) &data;
+  data.program.debug.custom = (void *) &data;
+
+  data.setting.program_name = &status_code_program_name_s;
+  data.setting.program_name_long = &status_code_program_name_long_s;
+  data.setting.status_string_from = &fll_status_string_from;
+  data.setting.status_string_to = &f_status_string_to;
+  data.setting.status_string_help_detail = &status_code_print_message_help_detail;
 
   f_console_parameter_t parameters[] = status_code_console_parameter_t_initialize;
-  data.parameters.array = parameters;
-  data.parameters.used = status_code_total_parameters_d;
-  data.environment = envp;
+
+  data.program.parameters.array = parameters;
+  data.program.parameters.used = status_code_total_parameters_d;
+  data.program.environment = envp;
 
   if (f_pipe_input_exists()) {
-    data.pipe = fll_program_data_pipe_input_e;
+    data.program.pipe = fll_program_data_pipe_input_e;
   }
 
-  fll_program_standard_set_up(&data);
+  fll_program_standard_set_up(&data.program);
 
   {
     const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
 
-    status_code_setting_load(arguments, &data, &setting);
+    status_code_setting_load(arguments, &data);
   }
 
-  status_code_main(&data, &setting);
+  status_code_main(&data);
 
-  status_code_setting_unload(&data, &setting);
+  status_code_setting_unload(&data);
 
-  fll_program_data_delete(&data);
+  fll_program_data_delete(&data.program);
 
-  fll_program_standard_set_down(&data);
+  fll_program_standard_set_down(&data.program);
 
-  return (F_status_is_error(setting.state.status) || setting.state.status == F_false) ? 1 : 0;
+  return (F_status_is_error(data.setting.state.status) || data.setting.state.status == F_false) ? 1 : 0;
 }
index b2e33197a7f5e759f30d08ccc50b29ee35f945d9..a89da434e4a72f0fc85f05bab874ce6dc45abd72 100644 (file)
@@ -5,24 +5,24 @@ extern "C" {
 #endif
 
 #ifndef _di_status_code_print_data_code_
-  f_status_t status_code_print_data_code(status_code_setting_t * const setting, const fl_print_t print, const uint16_t code) {
+  f_status_t status_code_print_data_code(fl_print_t * const print, const uint16_t code) {
 
-    if (!setting) return F_status_set_error(F_output_not);
-    if (print.verbosity < f_console_verbosity_normal_e) return F_output_not;
+    if (!print) return F_status_set_error(F_output_not);
+    if (print->verbosity < f_console_verbosity_normal_e) return F_output_not;
 
-    fll_print_format("%ui%r", print.to, code, f_string_eol_s);
+    fll_print_format("%ui%r", print->to, code, f_string_eol_s);
 
     return F_none;
   }
 #endif // _di_status_code_print_data_code_
 
 #ifndef _di_status_code_print_data_context_value_
-  f_status_t status_code_print_data_context_value(status_code_setting_t * const setting, const fl_print_t print, const f_color_set_t context, const f_string_static_t value) {
+  f_status_t status_code_print_data_context_value(fl_print_t * const print, const f_color_set_t context, const f_string_static_t value) {
 
-    if (!setting) return F_status_set_error(F_output_not);
-    if (print.verbosity < f_console_verbosity_normal_e) return F_output_not;
+    if (!print) return F_status_set_error(F_output_not);
+    if (print->verbosity < f_console_verbosity_normal_e) return F_output_not;
 
-    fll_print_format("%[%Q%]%r", print.to, context, value, context, f_string_eol_s);
+    fll_print_format("%[%Q%]%r", print->to, context, value, context, f_string_eol_s);
 
     return F_none;
   }
index 4f3cae31f94e796ae9f4d04a356048cf400e531c..aabd9a9ff5c6d6efea117d6dc89c1ab315e4572c 100644 (file)
@@ -19,12 +19,10 @@ extern "C" {
 /**
  * Print generic code.
  *
- * @param setting
- *   The main program settings.
- *
- *   This does not alter setting.state.status.
  * @param print
- *   Designates the how and where to print.
+ *   The output structure to print to.
+ *
+ *   This does not alter print.custom.setting.state.status.
  * @param code
  *   The code to print.
  *
@@ -37,18 +35,16 @@ extern "C" {
  * @see fll_print_format()
  */
 #ifndef _di_status_code_print_data_code_
-  extern f_status_t status_code_print_data_code(status_code_setting_t * const setting, const fl_print_t print, const uint16_t code);
+  extern f_status_t status_code_print_data_code(fl_print_t * const print, const uint16_t code);
 #endif // _di_status_code_print_data_code_
 
 /**
  * Print generic context wrapped value.
  *
- * @param setting
- *   The main program settings.
- *
- *   This does not alter setting.state.status.
  * @param print
- *   Designates the how and where to print.
+ *   The output structure to print to.
+ *
+ *   This does not alter print.custom.setting.state.status.
  * @param context
  *   The context string to wrap the variable with.
  * @param value
@@ -63,7 +59,7 @@ extern "C" {
  * @see fll_print_format()
  */
 #ifndef _di_status_code_print_data_context_value_
-  extern f_status_t status_code_print_data_context_value(status_code_setting_t * const setting, const fl_print_t print, const f_color_set_t context, const f_string_static_t value);
+  extern f_status_t status_code_print_data_context_value(fl_print_t * const print, const f_color_set_t context, const f_string_static_t value);
 #endif // _di_status_code_print_data_context_value_
 
 #ifdef __cplusplus
index 1f0e3e6e74e7d176f1d9d54997e43cb232f56c0a..aaa50d4bb0b3bc5b5235877a0790c5bd366a7bdb 100644 (file)
@@ -5,64 +5,66 @@ extern "C" {
 #endif
 
 #ifndef _di_status_code_print_error_
-  f_status_t status_code_print_error(status_code_setting_t * const setting, const fl_print_t print, const f_string_t function) {
+  f_status_t status_code_print_error(fl_print_t * const print, const f_string_t function) {
 
-    if (!setting) return F_status_set_error(F_output_not);
-    if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+    if (!print || !print->custom) return F_status_set_error(F_output_not);
+    if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
 
-    fll_error_print(*print, F_status_set_fine(setting->state.status), function, fll_error_file_flag_fallback_e);
+    status_code_main_t * const main = (status_code_main_t *) print->custom;
+
+    fll_error_print(print, F_status_set_fine(main->setting.state.status), function, fll_error_file_flag_fallback_e);
 
     return F_none;
   }
 #endif // _di_status_code_print_error_
 
 #ifndef _di_status_code_print_error_cannot_error_warning_number_
-  f_status_t status_code_print_error_cannot_error_warning_number(status_code_setting_t * const setting, const fl_print_t print) {
+  f_status_t status_code_print_error_cannot_error_warning_number(fl_print_t * const print) {
 
-    if (!setting) return F_status_set_error(F_output_not);
-    if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+    if (!print) return F_status_set_error(F_output_not);
+    if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
 
-    f_file_stream_lock(print.to);
+    f_file_stream_lock(print->to);
 
-    fl_print_format("%[%QCannot specify the '%]", print.to, print.context, print.prefix, print.context);
-    fl_print_format("%[%r%r%]", print.to, print.notable, f_console_symbol_long_normal_s, status_code_long_error_s, print.notable);
-    fl_print_format("%[' parameter with the '%]", print.to, print.context, print.context);
-    fl_print_format("%[%r%r%]", print.to, print.notable, f_console_symbol_long_normal_s, status_code_long_warning_s, print.notable);
-    fl_print_format("%[' parameter when not also specifying the '%]", print.to, print.context, print.context);
-    fl_print_format("%[%r%r%]", print.to, print.notable, f_console_symbol_long_normal_s, status_code_long_number_s, print.notable);
-    fl_print_format("%[' parameter.%]%r", print.to, print.context, print.context, f_string_eol_s);
+    fl_print_format("%[%QCannot specify the '%]", print->to, print->context, print->prefix, print->context);
+    fl_print_format("%[%r%r%]", print->to, print->notable, f_console_symbol_long_normal_s, status_code_long_error_s, print->notable);
+    fl_print_format("%[' parameter with the '%]", print->to, print->context, print->context);
+    fl_print_format("%[%r%r%]", print->to, print->notable, f_console_symbol_long_normal_s, status_code_long_warning_s, print->notable);
+    fl_print_format("%[' parameter when not also specifying the '%]", print->to, print->context, print->context);
+    fl_print_format("%[%r%r%]", print->to, print->notable, f_console_symbol_long_normal_s, status_code_long_number_s, print->notable);
+    fl_print_format("%[' parameter.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-    f_file_stream_unlock(print.to);
+    f_file_stream_unlock(print->to);
 
     return F_none;
   }
 #endif // _di_status_code_print_error_cannot_error_warning_number_
 
 #ifndef _di_status_code_print_error_no_status_codes_
-  f_status_t status_code_print_error_no_status_codes(status_code_setting_t * const setting, const fl_print_t print) {
+  f_status_t status_code_print_error_no_status_codes(fl_print_t * const print) {
 
-    if (!setting) return F_status_set_error(F_output_not);
-    if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+    if (!print) return F_status_set_error(F_output_not);
+    if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
 
-    fll_print_format("%[No status code is specified.%]%r", print.to, print.context, print.context, f_string_eol_s);
+    fll_print_format("%[No status code is specified.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
     return F_none;
   }
 #endif // _di_status_code_print_error_no_status_codes_
 
 #ifndef _di_status_code_print_error_invalid_callback_
-  f_status_t status_code_print_error_invalid_callback(status_code_setting_t * const setting, const fl_print_t print, const f_string_t name) {
+  f_status_t status_code_print_error_invalid_callback(fl_print_t * const print, const f_string_t name) {
 
-    if (!setting) return F_status_set_error(F_output_not);
-    if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+    if (!print) return F_status_set_error(F_output_not);
+    if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
 
-    f_file_stream_lock(print.to);
+    f_file_stream_lock(print->to);
 
-    fl_print_format("%[%QInvalid callback specified for '%]", print.to, print.context, print.prefix, print.context);
-    fl_print_format("%[%s%]", print.to, print.notable, name, print.notable);
-    fl_print_format("%[' internal setting.%]%r", print.to, print.context, print.context, f_string_eol_s);
+    fl_print_format("%[%QInvalid callback specified for '%]", print->to, print->context, print->prefix, print->context);
+    fl_print_format("%[%s%]", print->to, print->notable, name, print->notable);
+    fl_print_format("%[' internal setting.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
-    f_file_stream_unlock(print.to);
+    f_file_stream_unlock(print->to);
 
     return F_none;
   }
index 184701c689f10177285fe04919b4e96203248dab..c94298b05a487f3466955b4a46a669c5e13f3240 100644 (file)
@@ -19,12 +19,10 @@ extern "C" {
 /**
  * Print generic error message regarding a function failing in some way.
  *
- * @param setting
- *   The main program settings.
- *
- *   This does not alter setting.state.status.
  * @param print
- *   Designates the how and where to print.
+ *   The output structure to print to.
+ *
+ *   This does not alter print.custom.setting.state.status.
  *
  * @return
  *   F_none on success.
@@ -35,18 +33,16 @@ extern "C" {
  * @see fll_error_print()
  */
 #ifndef _di_status_code_print_error_
-  extern f_status_t status_code_print_error(status_code_setting_t * const setting, const fl_print_t print, const f_string_t function);
+  extern f_status_t status_code_print_error(fl_print_t * const print, const f_string_t function);
 #endif // _di_status_code_print_error_
 
 /**
  * Print an error message when error parameter and warning parameter are specified without number parameter.
  *
- * @param setting
- *   The main program settings.
- *
- *   This does not alter setting.state.status.
  * @param print
- *   Designates the how and where to print.
+ *   The output structure to print to.
+ *
+ *   This does not alter print.custom.setting.state.status.
  *
  * @return
  *   F_none on success.
@@ -59,18 +55,16 @@ extern "C" {
  * @see fl_print_format()
  */
 #ifndef _di_status_code_print_error_cannot_error_warning_number_
-  extern f_status_t status_code_print_error_cannot_error_warning_number(status_code_setting_t * const setting, const fl_print_t print);
+  extern f_status_t status_code_print_error_cannot_error_warning_number(fl_print_t * const print);
 #endif // _di_status_code_print_error_cannot_error_warning_number_
 
 /**
  * Print an error message when no status codes are provided.
  *
- * @param setting
- *   The main program settings.
- *
- *   This does not alter setting.state.status.
  * @param print
- *   Designates the how and where to print.
+ *   The output structure to print to.
+ *
+ *   This does not alter print.custom.setting.state.status.
  *
  * @return
  *   F_none on success.
@@ -81,18 +75,16 @@ extern "C" {
  * @see fll_print_format()
  */
 #ifndef _di_status_code_print_error_no_status_codes_
-  extern f_status_t status_code_print_error_no_status_codes(status_code_setting_t * const setting, const fl_print_t print);
+  extern f_status_t status_code_print_error_no_status_codes(fl_print_t * const print);
 #endif // _di_status_code_print_error_no_status_codes_
 
 /**
  * Print an error message when a callback from status_code_setting_t is invalid.
  *
- * @param setting
- *   The main program settings.
- *
- *   This does not alter setting.state.status.
  * @param print
- *   Designates the how and where to print.
+ *   The output structure to print to.
+ *
+ *   This does not alter print.custom.setting.state.status.
  * @param name
  *   The name of the callback setting that is invalid.
  *   This should either be 'status_string_from' or 'status_string_to'.
@@ -108,7 +100,7 @@ extern "C" {
  * @see fl_print_format()
  */
 #ifndef _di_status_code_print_error_invalid_callback_
-  extern f_status_t status_code_print_error_invalid_callback(status_code_setting_t * const setting, const fl_print_t print, const f_string_t name);
+  extern f_status_t status_code_print_error_invalid_callback(fl_print_t * const print, const f_string_t name);
 #endif // _di_status_code_print_error_invalid_callback_
 
 #ifdef __cplusplus
similarity index 54%
rename from level_3/status_code/c/main/print.c
rename to level_3/status_code/c/main/print/message.c
index a319c379323b000290b36af762a5b59e29fb2d70..34412a4fbcf64be28223414a9a82a8a89eada523 100644 (file)
@@ -1,77 +1,78 @@
-#include "status_code.h"
+#include "../status_code.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#ifndef _di_status_code_print_help_
-  f_status_t status_code_print_help(status_code_setting_t * const setting, const fl_print_t print) {
+#ifndef _di_status_code_print_message_help_
+  f_status_t status_code_print_message_help(fl_print_t * const print) {
 
-    if (!setting) return F_status_set_error(F_output_not);
+    if (!print || !print->custom) return F_status_set_error(F_output_not);
 
-    f_file_stream_lock(print.to);
+    status_code_main_t * const main = (status_code_main_t *) print->custom;
+
+    f_file_stream_lock(print->to);
 
     fll_program_print_help_header(
       print,
-      setting->program_name_long
-        ? *setting->program_name_long
+      main->setting.program_name_long
+        ? *main->setting.program_name_long
         : status_code_program_name_long_s,
       status_code_program_version_s
     );
 
     fll_program_print_help_option_standard(print);
 
-    f_print_dynamic_raw(f_string_eol_s, print.to);
+    f_print_dynamic_raw(f_string_eol_s, print->to);
 
     fll_program_print_help_option(print, status_code_short_fine_s, status_code_long_fine_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "   Print F_true or F_false if status code is neither an error nor a warning or print number with neither the error code nor the warning code bits set.");
     fll_program_print_help_option(print, status_code_short_warning_s, status_code_long_warning_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Print F_true or F_false if status code is a warning or print number with warning code bit set.");
     fll_program_print_help_option(print, status_code_short_error_s, status_code_long_error_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "  Print F_true or F_false if status code is an error or print number with error code bit set.");
     fll_program_print_help_option(print, status_code_short_number_s, status_code_long_number_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Convert status code name to number.");
 
-    f_print_dynamic_raw(f_string_eol_s, print.to);
-    f_print_dynamic_raw(f_string_eol_s, print.to);
+    f_print_dynamic_raw(f_string_eol_s, print->to);
 
     fll_program_print_help_usage(
       print,
-      setting->program_name
-        ? *setting->program_name
+      main->setting.program_name
+        ? *main->setting.program_name
         : status_code_program_name_s,
       status_code_program_help_parameters_s
     );
 
-    if (setting->status_string_help_detail) {
-      setting->status_string_help_detail(setting, print);
+    if (main->setting.status_string_help_detail) {
+      main->setting.status_string_help_detail(print);
     }
 
-    f_file_stream_flush(print.to);
-    f_file_stream_unlock(print.to);
+    f_file_stream_flush(print->to);
+    f_file_stream_unlock(print->to);
 
     return F_none;
   }
-#endif // _di_status_code_print_help_
+#endif // _di_status_code_print_message_help_
 
-#ifndef _di_status_code_print_help_detail_
-  f_status_t status_code_print_help_detail(void * const void_setting, const fl_print_t print) {
+#ifndef _di_status_code_print_message_help_detail_
+  f_status_t status_code_print_message_help_detail(fl_print_t * const print) {
 
-    if (!void_setting) return F_status_set_error(F_output_not);
+    if (!print) return F_status_set_error(F_output_not);
 
-    fl_print_format("  The FLL programs use a %[16-bit unsigned integer%] to represent the return status of programs and functions.%r%r", print.to, print.set->notable, print.set->notable, f_string_eol_s, f_string_eol_s);
+    fl_print_format("  The FLL programs use a %[16-bit unsigned integer%] to represent the return status of programs and functions.%r%r", print->to, print->set->notable, print->set->notable, f_string_eol_s, f_string_eol_s);
 
-    fl_print_format("  Programs may print a generic error with one of these codes.%r", print.to, f_string_eol_s);
-    fl_print_format("  This is a tool for converting to or converting from these codes.%r%r", print.to, f_string_eol_s, f_string_eol_s);
+    fl_print_format("  Programs may print a generic error with one of these codes.%r", print->to, f_string_eol_s);
+    fl_print_format("  This is a tool for converting to or converting from these codes.%r%r", print->to, f_string_eol_s, f_string_eol_s);
 
-    fl_print_format("  The %[16-bit unsigned integer%] also has the first two high-order bits used to represent flags.%r", print.to, print.set->notable, print.set->notable, f_string_eol_s);
-    fl_print_format("  These flags are the %[error%] bit and the %[warning%] bit.%r", print.to, print.set->notable, print.set->notable, print.set->notable, print.set->notable, f_string_eol_s);
-    fl_print_format("  When neither of these flags are set, then the status is considered %[fine%].%r%r", print.to, print.set->notable, print.set->notable, f_string_eol_s, f_string_eol_s);
+    fl_print_format("  The %[16-bit unsigned integer%] also has the first two high-order bits used to represent flags.%r", print->to, print->set->notable, print->set->notable, f_string_eol_s);
+    fl_print_format("  These flags are the %[error%] bit and the %[warning%] bit.%r", print->to, print->set->notable, print->set->notable, print->set->notable, print->set->notable, f_string_eol_s);
+    fl_print_format("  When neither of these flags are set, then the status is considered %[fine%].%r%r", print->to, print->set->notable, print->set->notable, f_string_eol_s, f_string_eol_s);
 
-    fl_print_format("  These codes stop at the %[F_status_code_last%] code.%r%r", print.to, print.set->notable, print.set->notable, f_string_eol_s, f_string_eol_s);
+    fl_print_format("  These codes stop at the %[F_status_code_last%] code.%r%r", print->to, print->set->notable, print->set->notable, f_string_eol_s, f_string_eol_s);
 
-    fl_print_format("  Each code will be printed on its own line.%r", print.to, print.set->notable, print.set->notable, f_string_eol_s);
-    fl_print_format("  Errors regarding each code may be printed on its own line.%r", print.to, f_string_eol_s);
+    fl_print_format("  Each code will be printed on its own line.%r", print->to, print->set->notable, print->set->notable, f_string_eol_s);
+    fl_print_format("  Errors regarding each code may be printed on its own line.%r", print->to, f_string_eol_s);
 
     return F_none;
   }
-#endif // _di_status_code_print_help_detail_
+#endif // _di_status_code_print_message_help_detail_
 
 #ifdef __cplusplus
 } // extern "C"
similarity index 59%
rename from level_3/status_code/c/main/print.h
rename to level_3/status_code/c/main/print/message.h
index 06802cbf7f278e9467457cae8c60b2013971d0d3..100e3b7360e8f6faeb656e8605757f1ee43269b4 100644 (file)
@@ -5,12 +5,12 @@
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
- * Provides the print functionality.
+ * Provides the print data functionality.
  *
  * This is auto-included and should not need to be explicitly included.
  */
-#ifndef _status_code_print_h
-#define _status_code_print_h
+#ifndef _status_code_print_message_h
+#define _status_code_print_message_h
 
 #ifdef __cplusplus
 extern "C" {
@@ -19,13 +19,11 @@ extern "C" {
 /**
  * Print help.
  *
- * @param setting
- *   The main program settings.
- *
- *   This does not alter setting.state.status.
  * @param print
  *   The output structure to print to.
  *
+ *   This does not alter print.custom.setting.state.status.
+ *
  * @return
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
@@ -43,24 +41,21 @@ extern "C" {
  * @see fll_program_print_help_option_standard()
  * @see fll_program_print_help_usage()
  */
-#ifndef _di_status_code_print_help_
-  extern f_status_t status_code_print_help(status_code_setting_t * const setting, const fl_print_t print);
-#endif // _di_status_code_print_help_
+#ifndef _di_status_code_print_message_help_
+  extern f_status_t status_code_print_message_help(fl_print_t * const print);
+#endif // _di_status_code_print_message_help_
 
 /**
  * Print help detailed part of the help.
  *
- * This is designed to be called from within status_code_print_help().
+ * This is designed to be called from within status_code_print_message_help().
  * This neither locks nor unlocks the stream and expects the stream to be unlocked.
  *
- * @param setting
- *   The main program settings.
- *   (Must be of type status_code_setting_t.)
- *
- *   This does not alter setting.state.status.
  * @param print
  *   The output structure to print to.
  *
+ *   This does not alter print.custom.setting.state.status.
+ *
  * @return
  *   F_none on success.
  *   F_output_not on success, but no printing is performed.
@@ -69,14 +64,14 @@ extern "C" {
  *
  * @see fl_print_format()
  *
- * @see status_code_print_help()
+ * @see status_code_print_message_help()
  */
-#ifndef _di_status_code_print_help_detail_
-  extern f_status_t status_code_print_help_detail(void * const setting, const fl_print_t print);
-#endif // _di_status_code_print_help_detail_
+#ifndef _di_status_code_print_message_help_detail_
+  extern f_status_t status_code_print_message_help_detail(fl_print_t * const print);
+#endif // _di_status_code_print_message_help_detail_
 
 #ifdef __cplusplus
 } // extern "C"
 #endif
 
-#endif // _status_code_print_h
+#endif // _status_code_print_message_h
index 9ec32694adfe53f1ffc6b49daccbdde56a648226..6fdc2682cf4bdd0979558e2ec232826901463b2e 100644 (file)
@@ -5,54 +5,54 @@ extern "C" {
 #endif
 
 #ifndef _di_status_code_process_check_
-  void status_code_process_check(fll_program_data_t * const main, status_code_setting_t * const setting, const f_string_static_t value) {
+  void status_code_process_check(status_code_main_t * const main, const f_string_static_t value) {
 
-    if (!main || !setting) return;
+    if (!main) return;
 
     f_number_unsigned_t number = 0;
 
     {
-      status_code_convert_number(main, setting, value, &number);
-      if (F_status_is_error(setting->state.status)) return;
+      status_code_convert_number(main, value, &number);
+      if (F_status_is_error(main->setting.state.status)) return;
     }
 
-    f_file_stream_lock(main->output.to);
+    f_file_stream_lock(main->program.output.to);
 
-    if ((setting->flag & status_code_main_flag_error_e) && F_status_is_error(number) || (setting->flag & status_code_main_flag_warning_e) && F_status_is_warning(number) || (setting->flag & status_code_main_flag_fine_e) && F_status_is_fine(number)) {
-      f_print_dynamic_raw(f_status_true_s, main->output.to);
+    if ((main->setting.flag & status_code_main_flag_error_e) && F_status_is_error(number) || (main->setting.flag & status_code_main_flag_warning_e) && F_status_is_warning(number) || (main->setting.flag & status_code_main_flag_fine_e) && F_status_is_fine(number)) {
+      f_print_dynamic_raw(f_status_true_s, main->program.output.to);
     }
     else {
-      f_print_dynamic_raw(f_status_false_s, main->output.to);
+      f_print_dynamic_raw(f_status_false_s, main->program.output.to);
     }
 
-    f_print_dynamic_raw(f_string_eol_s, main->output.to);
+    f_print_dynamic_raw(f_string_eol_s, main->program.output.to);
 
-    f_file_stream_unlock(main->output.to);
+    f_file_stream_unlock(main->program.output.to);
 
-    setting->state.status = F_none;
+    main->setting.state.status = F_none;
   }
 #endif // _di_status_code_process_check_
 
 #ifndef _di_status_code_process_number_
-  void status_code_process_number(fll_program_data_t * const main, status_code_setting_t * const setting, const f_string_static_t value) {
+  void status_code_process_number(status_code_main_t * const main, const f_string_static_t value) {
 
-    if (!main || !setting) return;
+    if (!main) return;
 
     {
       f_number_unsigned_t number = 0;
 
-      setting->state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, value, &number);
+      main->setting.state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, value, &number);
 
-      if (setting->state.status == F_none) {
-        status_code_print_data_context_value(setting, main->output, main->context.set.error, status_code_invalid_name_s);
+      if (main->setting.state.status == F_none) {
+        status_code_print_data_context_value(&main->program.output, main->program.context.set.error, status_code_invalid_name_s);
 
-        setting->state.status = F_status_set_error(F_parameter);
+        main->setting.state.status = F_status_set_error(F_parameter);
 
         return;
       }
 
-      if (setting->state.status == F_data_not || F_status_set_fine(setting->state.status) == F_parameter) {
-        status_code_print_data_context_value(setting, main->output, main->context.set.error, status_code_invalid_main_s);
+      if (main->setting.state.status == F_data_not || F_status_set_fine(main->setting.state.status) == F_parameter) {
+        status_code_print_data_context_value(&main->program.output, main->program.context.set.error, status_code_invalid_main_s);
 
         return;
       }
@@ -60,71 +60,71 @@ extern "C" {
 
     f_status_t code = F_none;
 
-    setting->state.status = setting->status_string_from(value, &code);
+    main->setting.state.status = main->setting.status_string_from(value, &code);
 
-    if (F_status_is_error(setting->state.status)) {
-      if (F_status_set_fine(setting->state.status) == F_data) {
-        status_code_print_data_context_value(setting, main->output, main->context.set.error, status_code_unknown_name_s);
+    if (F_status_is_error(main->setting.state.status)) {
+      if (F_status_set_fine(main->setting.state.status) == F_data) {
+        status_code_print_data_context_value(&main->program.output, main->program.context.set.error, status_code_unknown_name_s);
       }
       else {
-        status_code_print_data_context_value(setting, main->output, main->context.set.error, status_code_failed_to_convert_s);
+        status_code_print_data_context_value(&main->program.output, main->program.context.set.error, status_code_failed_to_convert_s);
       }
 
       return;
     }
 
-    if (setting->state.status == F_data) {
-      status_code_print_data_context_value(setting, main->output, main->context.set.error, status_code_unknown_code_s);
+    if (main->setting.state.status == F_data) {
+      status_code_print_data_context_value(&main->program.output, main->program.context.set.error, status_code_unknown_code_s);
 
-      setting->state.status = F_none;
+      main->setting.state.status = F_none;
 
       return;
     }
 
-    if (setting->flag & status_code_main_flag_error_e) {
+    if (main->setting.flag & status_code_main_flag_error_e) {
       code = F_status_set_error(code);
     }
 
-    if (setting->flag & status_code_main_flag_warning_e) {
+    if (main->setting.flag & status_code_main_flag_warning_e) {
       code = F_status_set_warning(code);
     }
 
-    status_code_print_data_code(setting, main->output, code);
+    status_code_print_data_code(&main->program.output, code);
 
-    setting->state.status = F_none;
+    main->setting.state.status = F_none;
   }
 #endif // _di_status_code_process_number_
 
 #ifndef _di_status_code_process_normal_
-  void status_code_process_normal(fll_program_data_t * const main, status_code_setting_t * const setting, const f_string_static_t value) {
+  void status_code_process_normal(status_code_main_t * const main, const f_string_static_t value) {
 
-    if (!main || !setting) return;
+    if (!main) return;
 
     f_string_static_t name = f_string_static_t_initialize;
 
     {
       f_number_unsigned_t number = 0;
 
-      status_code_convert_number(main, setting, value, &number);
-      if (F_status_is_error(setting->state.status)) return;
+      status_code_convert_number(main, value, &number);
+      if (F_status_is_error(main->setting.state.status)) return;
 
-      setting->state.status = setting->status_string_to((f_status_t) number, &name);
+      main->setting.state.status = main->setting.status_string_to((f_status_t) number, &name);
     }
 
-    if (F_status_is_error(setting->state.status)) {
-      if (F_status_set_fine(setting->state.status) == F_data) {
-        status_code_print_data_context_value(setting, main->output, main->context.set.error, status_code_unknown_code_s);
+    if (F_status_is_error(main->setting.state.status)) {
+      if (F_status_set_fine(main->setting.state.status) == F_data) {
+        status_code_print_data_context_value(&main->program.output, main->program.context.set.error, status_code_unknown_code_s);
       }
       else {
-        status_code_print_data_context_value(setting, main->output, main->context.set.error, status_code_failed_to_convert_s);
+        status_code_print_data_context_value(&main->program.output, main->program.context.set.error, status_code_failed_to_convert_s);
       }
 
       return;
     }
 
-    status_code_print_data_context_value(setting, main->output, f_color_set_empty_s, name);
+    status_code_print_data_context_value(&main->program.output, f_color_set_empty_s, name);
 
-    setting->state.status = F_none;
+    main->setting.state.status = F_none;
   }
 #endif // _di_status_code_process_normal_
 
index 719302602e159c8f77310dbc539e3805126456d1..de1a0003be7f407b7816ba6085e6e0a177195766 100644 (file)
@@ -38,7 +38,7 @@ extern "C" {
  * @see fss_status_code_convert_number()
  */
 #ifndef _di_status_code_process_check_
-  extern void status_code_process_check(fll_program_data_t * const main, status_code_setting_t * const setting, const f_string_static_t value);
+  extern void status_code_process_check(status_code_main_t * const main, const f_string_static_t value);
 #endif // _di_status_code_process_check_
 
 /**
@@ -62,7 +62,7 @@ extern "C" {
  * @see fll_status_string_from()
  */
 #ifndef _di_status_code_process_number_
-  extern void status_code_process_number(fll_program_data_t * const main, status_code_setting_t * const setting, const f_string_static_t value);
+  extern void status_code_process_number(status_code_main_t * const main, const f_string_static_t value);
 #endif // _di_status_code_process_number_
 
 /**
@@ -91,7 +91,7 @@ extern "C" {
  * @see fss_status_code_convert_number()
  */
 #ifndef _di_status_code_process_normal_
-  extern void status_code_process_normal(fll_program_data_t * const main, status_code_setting_t * const setting, const f_string_static_t value);
+  extern void status_code_process_normal(status_code_main_t * const main, const f_string_static_t value);
 #endif // _di_status_code_process_normal_
 
 #ifdef __cplusplus
index 66ff9594639b0283ad5c5c8b851d480e4d2f0142..e8a45182ccbd6143406e208d717879e3d7c1e1f8 100644 (file)
@@ -5,67 +5,56 @@ extern "C" {
 #endif
 
 #ifndef _di_status_code_main_
-  void status_code_main(fll_program_data_t * const main, status_code_setting_t * const setting) {
+  void status_code_main(status_code_main_t * const main) {
 
-    if (!main || !setting) return;
+    if (!main) return;
 
-    if (F_status_is_error(setting->state.status)) {
-      if ((setting->flag & status_code_main_flag_print_last_e) && main->message.verbosity > f_console_verbosity_error_e) {
-        fll_print_dynamic_raw(f_string_eol_s, main->message.to);
+    if (F_status_is_error(main->setting.state.status)) {
+      if ((main->setting.flag & status_code_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
       }
 
       return;
     }
 
-    if ((setting->flag & status_code_main_flag_print_first_e) && main->message.verbosity > f_console_verbosity_error_e) {
-      fll_print_dynamic_raw(f_string_eol_s, main->message.to);
+    if ((main->setting.flag & status_code_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+      fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
     }
 
-    if (!setting->status_string_from || !setting->status_string_to) {
-      if (!setting->status_string_from) {
-        status_code_print_error_invalid_callback(setting, main->error, macro_status_code_f(status_string_from));
+    if (!main->setting.status_string_from || !main->setting.status_string_to) {
+      if (!main->setting.status_string_from) {
+        status_code_print_error_invalid_callback(&main->program.error, macro_status_code_f(status_string_from));
       }
 
-      if (!setting->status_string_to) {
-        status_code_print_error_invalid_callback(setting, main->error, macro_status_code_f(status_string_to));
+      if (!main->setting.status_string_to) {
+        status_code_print_error_invalid_callback(&main->program.error, macro_status_code_f(status_string_to));
       }
 
-      if ((setting->flag & status_code_main_flag_print_last_e) && main->message.verbosity > f_console_verbosity_error_e) {
-        fll_print_dynamic_raw(f_string_eol_s, main->message.to);
+      if ((main->setting.flag & status_code_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
       }
 
-      setting->state.status = F_status_set_error(F_parameter);
+      main->setting.state.status = F_status_set_error(F_parameter);
 
       return;
     }
 
-    setting->state.status = F_none;
+    main->setting.state.status = F_none;
 
-    if (setting->flag & status_code_main_flag_help_e) {
-      status_code_print_help(setting, main->message);
+    if (main->setting.flag & (status_code_main_flag_help_e | status_code_main_flag_version_e | status_code_main_flag_copyright_e)) {
 
-      if ((setting->flag & status_code_main_flag_print_last_e) && main->message.verbosity > f_console_verbosity_error_e) {
-        fll_print_dynamic_raw(f_string_eol_s, main->message.to);
+      if (main->setting.flag & status_code_main_flag_help_e) {
+        status_code_print_message_help(&main->program.message);
       }
-
-      return;
-    }
-
-    if (setting->flag & status_code_main_flag_version_e) {
-      fll_program_print_version(main->message, status_code_program_version_s);
-
-      if ((setting->flag & status_code_main_flag_print_last_e) && main->message.verbosity > f_console_verbosity_error_e) {
-        fll_print_dynamic_raw(f_string_eol_s, main->message.to);
+      else if (main->setting.flag & status_code_main_flag_version_e) {
+        fll_program_print_version(&main->program.message, status_code_program_version_s);
+      }
+      else if (main->setting.flag & status_code_main_flag_copyright_e) {
+        fll_program_print_copyright(&main->program.message);
       }
 
-      return;
-    }
-
-    if (setting->flag & status_code_main_flag_copyright_e) {
-      fll_program_print_copyright(main->message);
-
-      if ((setting->flag & status_code_main_flag_print_last_e) && main->message.verbosity > f_console_verbosity_error_e) {
-        fll_print_dynamic_raw(f_string_eol_s, main->message.to);
+      if ((main->setting.flag & status_code_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
       }
 
       return;
@@ -73,109 +62,109 @@ extern "C" {
 
     f_status_t status = F_none;
 
-    if (setting->flag & status_code_main_flag_number_e) {
-      if (main->pipe & fll_program_data_pipe_input_e) {
+    if (main->setting.flag & status_code_main_flag_number_e) {
+      if (main->program.pipe & fll_program_data_pipe_input_e) {
         // @todo call status_code_process_number() here for all main from pipe that are space separated.
       }
 
-      if (main->parameters.remaining.used) {
-        f_file_stream_lock(main->output.to);
+      if (main->program.parameters.remaining.used) {
+        f_file_stream_lock(main->program.output.to);
 
-        for (f_array_length_t i = 0; i < main->parameters.remaining.used; ++i) {
+        for (f_array_length_t i = 0; i < main->program.parameters.remaining.used; ++i) {
 
-          if (!((++main->signal_check) % status_code_signal_check_d)) {
-            if (fll_program_standard_signal_received(main)) {
-              setting->state.status = F_status_set_error(F_interrupt);
+          if (!((++main->program.signal_check) % status_code_signal_check_d)) {
+            if (fll_program_standard_signal_received(&main->program)) {
+              main->setting.state.status = F_status_set_error(F_interrupt);
 
               break;
             }
 
-            main->signal_check = 0;
+            main->program.signal_check = 0;
           }
 
-          status = setting->state.status;
+          status = main->setting.state.status;
 
-          status_code_process_number(main, setting, main->parameters.arguments.array[main->parameters.remaining.array[i]]);
+          status_code_process_number(main, main->program.parameters.arguments.array[main->program.parameters.remaining.array[i]]);
 
-          if (F_status_is_error_not(setting->state.status)) {
-            setting->state.status = status;
+          if (F_status_is_error_not(main->setting.state.status)) {
+            main->setting.state.status = status;
           }
         } // for
 
-        f_file_stream_unlock(main->output.to);
+        f_file_stream_unlock(main->program.output.to);
       }
     }
-    else if ((setting->flag & status_code_main_flag_error_e) || (setting->flag & status_code_main_flag_warning_e) || (setting->flag & status_code_main_flag_fine_e)) {
-      if (main->pipe & fll_program_data_pipe_input_e) {
+    else if ((main->setting.flag & status_code_main_flag_error_e) || (main->setting.flag & status_code_main_flag_warning_e) || (main->setting.flag & status_code_main_flag_fine_e)) {
+      if (main->program.pipe & fll_program_data_pipe_input_e) {
         // @todo call status_code_process_check() here for all main from pipe that is space separated.
       }
 
-      if (main->parameters.remaining.used) {
-        f_file_stream_lock(main->output.to);
+      if (main->program.parameters.remaining.used) {
+        f_file_stream_lock(main->program.output.to);
 
-        for (f_array_length_t i = 0; i < main->parameters.remaining.used; ++i) {
+        for (f_array_length_t i = 0; i < main->program.parameters.remaining.used; ++i) {
 
-          if (!((++main->signal_check) % status_code_signal_check_d)) {
-            if (fll_program_standard_signal_received(main)) {
-              setting->state.status = F_status_set_error(F_interrupt);
+          if (!((++main->program.signal_check) % status_code_signal_check_d)) {
+            if (fll_program_standard_signal_received(&main->program)) {
+              main->setting.state.status = F_status_set_error(F_interrupt);
 
               break;
             }
 
-            main->signal_check = 0;
+            main->program.signal_check = 0;
           }
 
-          status = setting->state.status;
+          status = main->setting.state.status;
 
-          status_code_process_check(main, setting, main->parameters.arguments.array[main->parameters.remaining.array[i]]);
+          status_code_process_check(main, main->program.parameters.arguments.array[main->program.parameters.remaining.array[i]]);
 
-          if (F_status_is_error_not(setting->state.status)) {
-            setting->state.status = status;
+          if (F_status_is_error_not(main->setting.state.status)) {
+            main->setting.state.status = status;
           }
         } // for
 
-        f_file_stream_unlock(main->output.to);
+        f_file_stream_unlock(main->program.output.to);
       }
     }
     else {
-      if (main->pipe & fll_program_data_pipe_input_e) {
+      if (main->program.pipe & fll_program_data_pipe_input_e) {
         // @todo call status_code_process_normal() here for all main from pipe that is space separated.
       }
 
-      if (main->parameters.remaining.used) {
-        f_file_stream_lock(main->output.to);
+      if (main->program.parameters.remaining.used) {
+        f_file_stream_lock(main->program.output.to);
 
-        for (f_array_length_t i = 0; i < main->parameters.remaining.used; ++i) {
+        for (f_array_length_t i = 0; i < main->program.parameters.remaining.used; ++i) {
 
-          if (!((++main->signal_check) % status_code_signal_check_d)) {
-            if (fll_program_standard_signal_received(main)) {
-              setting->state.status = F_status_set_error(F_interrupt);
+          if (!((++main->program.signal_check) % status_code_signal_check_d)) {
+            if (fll_program_standard_signal_received(&main->program)) {
+              main->setting.state.status = F_status_set_error(F_interrupt);
 
               break;
             }
 
-            main->signal_check = 0;
+            main->program.signal_check = 0;
           }
 
-          status = setting->state.status;
+          status = main->setting.state.status;
 
-          status_code_process_normal(main, setting, main->parameters.arguments.array[main->parameters.remaining.array[i]]);
+          status_code_process_normal(main, main->program.parameters.arguments.array[main->program.parameters.remaining.array[i]]);
 
-          if (F_status_is_error_not(setting->state.status)) {
-            setting->state.status = status;
+          if (F_status_is_error_not(main->setting.state.status)) {
+            main->setting.state.status = status;
           }
         } // for
 
-        f_file_stream_unlock(main->output.to);
+        f_file_stream_unlock(main->program.output.to);
       }
     }
 
-    if (setting->state.status == F_status_set_error(F_interrupt)) {
-      fll_program_print_signal_received(main->warning, main->signal_received);
+    if (main->setting.state.status == F_status_set_error(F_interrupt)) {
+      fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
     }
 
-    if ((setting->flag & status_code_main_flag_print_last_e) && main->message.verbosity > f_console_verbosity_error_e) {
-      fll_print_dynamic_raw(f_string_eol_s, main->message.to);
+    if ((main->setting.flag & status_code_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+      fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
     }
   }
 #endif // _di_status_code_main_
index e263d11bdd50c36e0b14ed60b353886fa891cabd..aa6846f4efd65ea81832af41baa5319e21774bfa 100644 (file)
 #include <fll/level_2/status_string.h>
 
 // Status Code includes.
+#include <program/status_code/main/common/define.h>
+#include <program/status_code/main/common/enumeration.h>
 #include <program/status_code/main/common/print.h>
 #include <program/status_code/main/common/string.h>
 #include <program/status_code/main/common/type.h>
 #include <program/status_code/main/common.h>
 #include <program/status_code/main/convert.h>
-#include <program/status_code/main/print.h>
 #include <program/status_code/main/print/data.h>
 #include <program/status_code/main/print/error.h>
+#include <program/status_code/main/print/message.h>
 #include <program/status_code/main/process.h>
 
 #ifdef __cplusplus
@@ -81,7 +83,7 @@ extern "C" {
  *     F_parameter (with error bit) if main is NULL or setting is NULL.
  */
 #ifndef _di_status_code_main_
-  extern void status_code_main(fll_program_data_t * const main, status_code_setting_t * const setting);
+  extern void status_code_main(status_code_main_t * const main);
 #endif // _di_status_code_main_
 
 #ifdef __cplusplus
index fe005361dfcbf9f01edbf1de863a132735297ba2..c092268e522df6e5b63410fe496fe000404b7187 100644 (file)
@@ -25,10 +25,10 @@ build_libraries-individual -lfll_error -lfll_print -lfll_program -lfll_status_st
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
-build_sources_library main/status_code.c main/common.c main/common/print.c main/common/string.c main/common/type.c main/convert.c main/print.c main/print/data.c main/print/error.c main/process.c
+build_sources_library main/status_code.c main/common.c main/common/define.c main/common/enumeration.c main/common/print.c main/common/string.c main/common/type.c main/convert.c main/print/data.c main/print/error.c main/print/message.c main/process.c
 build_sources_library fss/status_code.c fss/common.c
 
-build_sources_headers main/status_code.h main/common.h main/common/print.h main/common/string.h main/common/type.h main/convert.h main/print.h main/print/data.h main/print/error.h main/process.h
+build_sources_headers main/status_code.h main/common.h main/common/define.h main/common/enumeration.h main/common/print.h main/common/string.h main/common/type.h main/convert.h main/print/data.h main/print/error.h main/print/message.h main/process.h
 build_sources_headers fss/status_code.h fss/common.h
 
 build_sources_documentation man
index 44be80b11e1b6799f839265ced38c22b581aa3ef..a9383dd6da875affc31680d5ea22d542349f8eb4 100644 (file)
@@ -81,7 +81,7 @@ extern "C" {
 
         if (!((++main->program.signal_check) % utf8_signal_check_d)) {
           if (fll_program_standard_signal_received(&main->program)) {
-            fll_program_print_signal_received(main->program.warning, main->program.signal_received);
+            fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
 
             main->setting.state.status = F_interrupt;
 
index 682a7d8b39f973a14c6e6f5cc1ae00dfc7827ccd..c6e4ccdef6e168d264c7dc5077f9167fe5a62c4c 100644 (file)
@@ -351,7 +351,7 @@ extern "C" {
 
         if (!((++main->program.signal_check) % utf8_signal_check_d)) {
           if (fll_program_standard_signal_received(&main->program)) {
-            fll_program_print_signal_received(main->program.warning, main->program.signal_received);
+            fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
 
             main->setting.state.status = F_status_set_error(F_interrupt);
 
index 46b02cc28ca8d24c2ad5771a046bd975141cb7a9..78d64a82400272ff5c1ccad652f3a7ca612087eb 100644 (file)
@@ -283,7 +283,7 @@ extern "C" {
           fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
         }
 
-      fll_program_print_error_parameter_missing_value(main->program.error, f_console_symbol_long_normal_s, utf8_long_to_file_s);
+      fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, utf8_long_to_file_s);
 
       return;
     }
@@ -324,7 +324,7 @@ extern "C" {
             fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
           }
 
-          fll_error_print(main->program.error, F_status_set_fine(main->setting.state.status), macro_utf8_f(f_string_dynamic_append_nulless), fll_error_file_flag_fallback_e);
+          fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), macro_utf8_f(f_string_dynamic_append_nulless), fll_error_file_flag_fallback_e);
 
           break;
         }
@@ -364,7 +364,7 @@ extern "C" {
         fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
       }
 
-      fll_program_print_error_parameter_missing_value(main->program.error, f_console_symbol_long_normal_s, utf8_long_from_file_s);
+      fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, utf8_long_from_file_s);
 
       return;
     }
index 24857f3fd106f6f5081b083178acae2649acc1bd..b3a0cdd917cc182b50f5f86433c1d3252c18ba4c 100644 (file)
@@ -5,7 +5,7 @@
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
- * Provides the common type structures.
+ * Provides the common define types.
  *
  * This is auto-included and should not need to be explicitly included.
  */
index fe6d576975a6c11628fabdcb1cdaca9b285a9b59..44a912379625a28154a2e6b7961e2f79988ddfeb 100644 (file)
@@ -5,7 +5,7 @@
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
- * Provides the common type structures.
+ * Provides the common enumeration types.
  *
  * This is auto-included and should not need to be explicitly included.
  */
index f299da210c74dea89b2d7399bf30282264f05cb1..16bf333639a023ef4df8b6126dc4032926866e0a 100644 (file)
@@ -15,6 +15,7 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
   data.program.debug.custom = (void *) &data;
 
   f_console_parameter_t parameters[] = utf8_console_parameter_t_initialize;
+
   data.program.parameters.array = parameters;
   data.program.parameters.used = utf8_total_parameters_d;
   data.program.environment = envp;
index 2af078bac56831b76d761976d66b50b5339d7c3c..27e4f8f285b5c49e4fc07ea88a31f5964018a0c9 100644 (file)
@@ -19,12 +19,10 @@ extern "C" {
 /**
  * Print the byte sequence character (such as '豸').
  *
- * @param setting
- *   The main program settings.
- *
- *   This does not alter setting.state.status.
  * @param print
- *   Designates how printing is to be performed.
+ *   The output structure to print to.
+ *
+ *   This does not alter print.custom.setting.state.status.
  * @param sequence
  *   A byte sequences representing a single character to print.
  *
@@ -43,12 +41,10 @@ extern "C" {
  *
  * This handles whether or not the invalid character should be printed or not based on program parameters.
  *
- * @param setting
- *   The main program settings.
- *
- *   This does not alter setting.state.status.
  * @param print
- *   Designates how printing is to be performed.
+ *   The output structure to print to.
+ *
+ *   This does not alter print.custom.setting.state.status.
  * @param invalid
  *   The byte sequence string or unicode codepoint string representing a single character to print.
  *
@@ -67,12 +63,10 @@ extern "C" {
 /**
  * Print the codepoint number as a codepoint string (such as U+8C78).
  *
- * @param setting
- *   The main program settings.
- *
- *   This does not alter setting.state.status.
  * @param print
- *   Designates how printing is to be performed.
+ *   The output structure to print to.
+ *
+ *   This does not alter print.custom.setting.state.status.
  * @param codepoint
  *   The codepoint to print.
  *   This is the code that represents a single character.
@@ -90,12 +84,10 @@ extern "C" {
 /**
  * Print the width or combining state of the given character.
  *
- * @param setting
- *   The main program settings.
- *
- *   This does not alter setting.state.status.
  * @param print
- *   Designates how printing is to be performed.
+ *   The output structure to print to.
+ *
+ *   This does not alter print.custom.setting.state.status.
  * @param sequence
  *   A byte sequences representing a single character to print.
  *
@@ -114,12 +106,10 @@ extern "C" {
 /**
  * Print an error regarding the width or combining state of a some character.
  *
- * @param setting
- *   The main program settings.
- *
- *   This does not alter setting.state.status.
  * @param print
- *   Designates how printing is to be performed.
+ *   The output structure to print to.
+ *
+ *   This does not alter print.custom.setting.state.status.
  *
  * @return
  *   F_none on success.
@@ -134,12 +124,10 @@ extern "C" {
 /**
  * Print the raw character data (binary / byte sequence).
  *
- * @param setting
- *   The main program settings.
- *
- *   This does not alter setting.state.status.
  * @param print
- *   Designates the how and where to print.
+ *   The output structure to print to.
+ *
+ *   This does not alter print.custom.setting.state.status.
  * @param raw
  *   The raw string in integer format.
  * @param width
@@ -158,12 +146,10 @@ extern "C" {
 /**
  * Print the raw character data (codepoint).
  *
- * @param setting
- *   The main program settings.
- *
- *   This does not alter setting.state.status.
  * @param print
- *   Designates the how and where to print.
+ *   The output structure to print to.
+ *
+ *   This does not alter print.custom.setting.state.status.
  * @param raw
  *   The raw string already in codepoint format.
  *
@@ -180,12 +166,10 @@ extern "C" {
 /**
  * Print the width or combining state of the for a raw character.
  *
- * @param setting
- *   The main program settings.
- *
- *   This does not alter setting.state.status.
  * @param print
- *   Designates the how and where to print.
+ *   The output structure to print to.
+ *
+ *   This does not alter print.custom.setting.state.status.
  * @param width
  *   The pre-calculated width.
  *
@@ -204,12 +188,10 @@ extern "C" {
 /**
  * Print the input file section header.
  *
- * @param setting
- *   The main program settings.
- *
- *   This does not alter setting.state.status.
  * @param print
- *   Designates the how and where to print.
+ *   The output structure to print to.
+ *
+ *   This does not alter print.custom.setting.state.status.
  * @param name
  *   The name of the file.
  * @param index
@@ -228,12 +210,10 @@ extern "C" {
 /**
  * Print the input parameter section header.
  *
- * @param setting
- *   The main program settings.
- *
- *   This does not alter setting.state.status.
  * @param print
- *   Designates the how and where to print.
+ *   The output structure to print to.
+ *
+ *   This does not alter print.custom.setting.state.status.
  * @param index
  *   The index position of the parameter.
  *
index 42d5721b3a208b220d581aca0cfc74a233a72670..eeb3952213993f31408097e22d754927166a633b 100644 (file)
@@ -12,7 +12,7 @@ extern "C" {
 
     utf8_main_t * const main = (utf8_main_t *) print->custom;
 
-    fll_error_print(*print, F_status_set_fine(main->setting.state.status), function, fll_error_file_flag_fallback_e);
+    fll_error_print(print, F_status_set_fine(main->setting.state.status), function, fll_error_file_flag_fallback_e);
 
     return F_none;
   }
@@ -28,7 +28,7 @@ extern "C" {
 
     if (main->setting.flag & (utf8_main_flag_strip_invalid_e | utf8_main_flag_verify_e)) return F_output_not;
 
-    fl_print_format("%r%[%QFailed to decode character code '%]", print->to, f_string_eol_s, print->set->error, print->prefix, print->set->error);
+    fl_print_format("%[%QFailed to decode character code '%]", print->to, print->set->error, print->prefix, print->set->error);
 
     if (invalid.used) {
       fl_print_format("%[0x", print->to, print->set->notable);
@@ -69,7 +69,7 @@ extern "C" {
 
     if (main->setting.flag & (utf8_main_flag_strip_invalid_e | utf8_main_flag_verify_e)) return F_output_not;
 
-    fl_print_format("%r%[%QFailed to encode Unicode codepoint '%]", print->to, f_string_eol_s, print->set->error, print->prefix, print->set->error);
+    fl_print_format("%[%QFailed to encode Unicode codepoint '%]", print->to, print->set->error, print->prefix, print->set->error);
     fl_print_format("%[U+%_U%]", print->to, print->set->notable, codepoint, print->set->notable);
 
     if (F_status_set_fine(main->setting.state.status) == F_utf_not) {
@@ -93,7 +93,7 @@ extern "C" {
 
     utf8_main_t * const main = (utf8_main_t *) print->custom;
 
-    fll_error_file_print(*print, F_status_set_fine(main->setting.state.status), function, fll_error_file_flag_fallback_e, name, operation, type);
+    fll_error_file_print(print, F_status_set_fine(main->setting.state.status), function, fll_error_file_flag_fallback_e, name, operation, type);
 
     return F_none;
   }
@@ -104,7 +104,7 @@ extern "C" {
 
     if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
 
-    fll_print_format("%r%[%QNo from sources are specified, please pipe data, designate a file, or add parameters.%]%r", print->to, f_string_eol_s, print->set->error, print->prefix, print->set->error, f_string_eol_s);
+    fll_print_format("%[%QNo from sources are specified, please pipe data, designate a file, or add parameters.%]%r", print->to, print->set->error, print->prefix, print->set->error, f_string_eol_s);
 
     return F_none;
   }
index a88670b7e0d01f31f7e939b633f694f1590ced35..ab70b299cd4853eaecdc7b29922546077b73ab4a 100644 (file)
@@ -19,12 +19,8 @@ extern "C" {
 /**
  * Print generic error message regarding a function failing in some way.
  *
- * @param setting
- *   The main program settings.
- *
- *   This does not alter setting.state.status.
  * @param print
- *   Designates the how and where to print.
+ *   The output structure to print to.
  *
  *   This does not alter print.custom.setting.state.status.
  *
@@ -43,12 +39,10 @@ extern "C" {
 /**
  * Print error message when attempt to decode the character failed.
  *
- * @param main
- *   The main program data.
- * @param setting
- *   The main program settings.
+ * @param print
+ *   The output structure to print to.
  *
- *   This does not alter setting.state.status.
+ *   This does not alter print.custom.setting.state.status.
  * @param invalid
  *   The byte sequence string or unicode codepoint string representing a single character to print.
  *
@@ -67,12 +61,8 @@ extern "C" {
 /**
  * Print error message when attempt to encode the character failed.
  *
- * @param setting
- *   The main program settings.
- *
- *   This does not alter setting.state.status.
  * @param print
- *   Designates the how and where to print.
+ *   The output structure to print to.
  *
  *   This does not alter print.custom.setting.state.status.
  * @param codepoint
@@ -93,12 +83,8 @@ extern "C" {
 /**
  * Print file related error or warning messages.
  *
- * @param setting
- *   The main program settings.
- *
- *   This does not alter setting.state.status.
  * @param print
- *   Designates how printing is to be performed.
+ *   The output structure to print to.
  *
  *   This does not alter print.custom.setting.state.status.
  * @param function
@@ -126,12 +112,8 @@ extern "C" {
 /**
  * Print error message for when no sources are provided.
  *
- * @param setting
- *   The main program settings.
- *
- *   This does not alter setting.state.status.
  * @param print
- *   Designates how printing is to be performed.
+ *   The output structure to print to.
  *
  *   This does not alter print.custom.setting.state.status.
  *
@@ -150,12 +132,8 @@ extern "C" {
 /**
  * Print error message for when the file parameter is an empty string.
  *
- * @param setting
- *   The main program settings.
- *
- *   This does not alter setting.state.status.
  * @param print
- *   Designates how printing is to be performed.
+ *   The output structure to print to.
  *
  *   This does not alter print.custom.setting.state.status.
  * @param index
@@ -178,12 +156,8 @@ extern "C" {
 /**
  * Print error message for when no sources are provided in the main program parameters.
  *
- * @param setting
- *   The main program settings.
- *
- *   This does not alter setting.state.status.
  * @param print
- *   Designates how printing is to be performed.
+ *   The output structure to print to.
  *
  *   This does not alter print.custom.setting.state.status.
  * @param from
@@ -209,12 +183,8 @@ extern "C" {
 /**
  * Print error message for when too many 'to' destinations are specified.
  *
- * @param setting
- *   The main program settings.
- *
- *   This does not alter setting.state.status.
  * @param print
- *   Designates how printing is to be performed.
+ *   The output structure to print to.
  *
  *   This does not alter print.custom.setting.state.status.
  *
index b4cb05fab44450e4630ffcd3022a7aab0ba4a182..e3d95fe54f4d25ca010cf6d880d0ac4c29134548 100644 (file)
@@ -7,37 +7,40 @@ extern "C" {
 #ifndef _di_utf8_print_message_help_
   f_status_t utf8_print_message_help(fl_print_t * const print) {
 
+    if (!print || !print->custom) return F_status_set_error(F_output_not);
+
+    utf8_main_t * const main = (utf8_main_t *) print->custom;
+
     f_file_stream_lock(print->to);
 
-    fll_program_print_help_header(*print, utf8_program_name_long_s, utf8_program_version_s);
+    fll_program_print_help_header(print, utf8_program_name_long_s, utf8_program_version_s);
 
-    fll_program_print_help_option_standard(*print);
+    fll_program_print_help_option_standard(print);
 
     f_print_dynamic_raw(f_string_eol_s, print->to);
 
-    fll_program_print_help_option(*print, utf8_short_from_bytesequence_s, utf8_long_from_bytesequence_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "The expected input format is byte sequence (character data).");
-    fll_program_print_help_option(*print, utf8_short_from_codepoint_s, utf8_long_from_codepoint_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "   The expected input format is codepoint (such as U+0000).");
-    fll_program_print_help_option(*print, utf8_short_from_file_s, utf8_long_from_file_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "        Use the given output as the input source.");
+    fll_program_print_help_option(print, utf8_short_from_bytesequence_s, utf8_long_from_bytesequence_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "The expected input format is byte sequence (character data).");
+    fll_program_print_help_option(print, utf8_short_from_codepoint_s, utf8_long_from_codepoint_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "   The expected input format is codepoint (such as U+0000).");
+    fll_program_print_help_option(print, utf8_short_from_file_s, utf8_long_from_file_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "        Use the given output as the input source.");
 
     f_print_dynamic_raw(f_string_eol_s, print->to);
 
-    fll_program_print_help_option(*print, utf8_short_to_bytesequence_s, utf8_long_to_bytesequence_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "The output format is byte sequence (character data).");
-    fll_program_print_help_option(*print, utf8_short_to_codepoint_s, utf8_long_to_codepoint_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "   The output format is codepoint (such as U+0000).");
-    fll_program_print_help_option(*print, utf8_short_to_combining_s, utf8_long_to_combining_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "   The output format is to print whether or not character is combining or not.");
-    fll_program_print_help_option(*print, utf8_short_to_file_s, utf8_long_to_file_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "        Use the given file as the output destination.");
-    fll_program_print_help_option(*print, utf8_short_to_width_s, utf8_long_to_width_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "       The output format is to print the width of a character (either 0, 1, or 2).");
+    fll_program_print_help_option(print, utf8_short_to_bytesequence_s, utf8_long_to_bytesequence_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "The output format is byte sequence (character data).");
+    fll_program_print_help_option(print, utf8_short_to_codepoint_s, utf8_long_to_codepoint_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "   The output format is codepoint (such as U+0000).");
+    fll_program_print_help_option(print, utf8_short_to_combining_s, utf8_long_to_combining_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "   The output format is to print whether or not character is combining or not.");
+    fll_program_print_help_option(print, utf8_short_to_file_s, utf8_long_to_file_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "        Use the given file as the output destination.");
+    fll_program_print_help_option(print, utf8_short_to_width_s, utf8_long_to_width_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "       The output format is to print the width of a character (either 0, 1, or 2).");
 
     f_print_dynamic_raw(f_string_eol_s, print->to);
 
-    fll_program_print_help_option(*print, utf8_short_headers_s, utf8_long_headers_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "      Print headers for each section (pipe, file, or parameter).");
-    fll_program_print_help_option(*print, utf8_short_separate_s, utf8_long_separate_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "     Separate characters by newlines (implied when printing headers).");
-    fll_program_print_help_option(*print, utf8_short_strip_invalid_s, utf8_long_strip_invalid_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Strip invalid Unicode characters (do not print invalid sequences).");
-    fll_program_print_help_option(*print, utf8_short_verify_s, utf8_long_verify_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "       Only perform verification of valid sequences.");
+    fll_program_print_help_option(print, utf8_short_headers_s, utf8_long_headers_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "      Print headers for each section (pipe, file, or parameter).");
+    fll_program_print_help_option(print, utf8_short_separate_s, utf8_long_separate_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "     Separate characters by newlines (implied when printing headers).");
+    fll_program_print_help_option(print, utf8_short_strip_invalid_s, utf8_long_strip_invalid_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Strip invalid Unicode characters (do not print invalid sequences).");
+    fll_program_print_help_option(print, utf8_short_verify_s, utf8_long_verify_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "       Only perform verification of valid sequences.");
 
     f_print_dynamic_raw(f_string_eol_s, print->to);
-    f_print_dynamic_raw(f_string_eol_s, print->to);
 
-    fll_program_print_help_usage(*print, utf8_program_name_s, utf8_program_help_parameters_s);
+    fll_program_print_help_usage(print, utf8_program_name_s, utf8_program_help_parameters_s);
 
     fl_print_format("%r  The default behavior is to assume the expected input is byte sequences from the command line to be output to the screen as codepoints.%r%r", print->to, f_string_eol_s, f_string_eol_s, f_string_eol_s);
 
index 08c47888bd29257413db550646032179da3cc799..78ec0695e51657db4681cd34983c58f45a0d541b 100644 (file)
@@ -28,7 +28,7 @@ extern "C" {
 
       if (!((++main->program.signal_check) % utf8_signal_check_d)) {
         if (fll_program_standard_signal_received(&main->program)) {
-          fll_program_print_signal_received(main->program.warning, main->program.signal_received);
+          fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
 
           main->setting.state.status = F_status_set_error(F_interrupt);
 
@@ -47,7 +47,7 @@ extern "C" {
         utf8_detect_codepoint(main, text, &mode_codepoint);
 
         if (F_status_is_error(main->setting.state.status)) {
-          fll_error_print(main->program.error, F_status_set_fine(main->setting.state.status), macro_utf8_f(utf8_detect_codepoint), fll_error_file_flag_fallback_e);
+          fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), macro_utf8_f(utf8_detect_codepoint), fll_error_file_flag_fallback_e);
 
           break;
         }
index bc89cf5101f8e29c1555e02b8169b47baa23e013..6986a70611fff99d3638b8b2e62fe2f31a70944e 100644 (file)
@@ -23,24 +23,17 @@ extern "C" {
 
     main->setting.state.status = F_none;
 
-    if (main->setting.flag & utf8_main_flag_help_e) {
-      utf8_print_message_help(&main->program.message);
+    if (main->setting.flag & (utf8_main_flag_help_e | utf8_main_flag_version_e | utf8_main_flag_copyright_e)) {
 
-      return;
-    }
-
-    if (main->setting.flag & utf8_main_flag_version_e) {
-      fll_program_print_version(main->program.message, utf8_program_version_s);
-
-      if ((main->setting.flag & utf8_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
-        fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
+      if (main->setting.flag & utf8_main_flag_help_e) {
+        utf8_print_message_help(&main->program.message);
+      }
+      else if (main->setting.flag & utf8_main_flag_version_e) {
+        fll_program_print_version(&main->program.message, utf8_program_version_s);
+      }
+      else if (main->setting.flag & utf8_main_flag_copyright_e) {
+        fll_program_print_copyright(&main->program.message);
       }
-
-      return;
-    }
-
-    if (main->setting.flag & utf8_main_flag_copyright_e) {
-      fll_program_print_copyright(main->program.message);
 
       if ((main->setting.flag & utf8_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
         fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);