]> Kevux Git Server - fll/commitdiff
Progress: Continue mass converting to f_string_static_t.
authorKevin Day <thekevinday@gmail.com>
Sun, 6 Feb 2022 00:57:37 +0000 (18:57 -0600)
committerKevin Day <thekevinday@gmail.com>
Sun, 6 Feb 2022 00:58:12 +0000 (18:58 -0600)
Of particular note are:
- Implementation of fll_program_data_t to provide a standard structure for basic use.
- f_color deallocation function with appropriate unit tests.

202 files changed:
build/level_2/settings
build/monolithic/settings
level_0/f_color/c/color-common.c
level_0/f_color/c/color-common.h
level_0/f_color/c/color.c
level_0/f_color/data/build/settings-tests
level_0/f_color/tests/c/test-color-context_delete.c [new file with mode: 0644]
level_0/f_color/tests/c/test-color-context_delete.h [new file with mode: 0644]
level_0/f_color/tests/c/test-color-context_destroy.c [new file with mode: 0644]
level_0/f_color/tests/c/test-color-context_destroy.h [new file with mode: 0644]
level_0/f_color/tests/c/test-color.c
level_0/f_color/tests/c/test-color.h
level_0/f_console/c/console-common.c
level_0/f_console/c/console-common.h
level_0/f_console/c/console.c
level_0/f_console/c/console.h
level_0/f_console/tests/c/test-console-parameter_process.c
level_2/fll_program/c/program-common.c [new file with mode: 0644]
level_2/fll_program/c/program-common.h [new file with mode: 0644]
level_2/fll_program/c/program.c
level_2/fll_program/c/program.h
level_2/fll_program/data/build/settings
level_3/byte_dump/c/byte_dump.c
level_3/byte_dump/c/common.c
level_3/byte_dump/c/common.h
level_3/control/c/common.c
level_3/control/c/common.h
level_3/control/c/control.c
level_3/control/c/control.h
level_3/control/c/main.c
level_3/control/c/private-common.c
level_3/control/c/private-common.h
level_3/control/c/private-control.c
level_3/control/c/private-control.h
level_3/control/c/private-print.c
level_3/control/c/private-print.h
level_3/controller/c/common.c
level_3/controller/c/common.h
level_3/controller/c/controller.c
level_3/fake/c/common.c
level_3/fake/c/common.h
level_3/fake/c/fake.c
level_3/firewall/c/common.c
level_3/firewall/c/common.h
level_3/firewall/c/firewall.c
level_3/fss_basic_list_read/c/common.c
level_3/fss_basic_list_read/c/common.h
level_3/fss_basic_list_read/c/fss_basic_list_read.c
level_3/fss_basic_list_read/c/fss_basic_list_read.h
level_3/fss_basic_list_read/c/main.c
level_3/fss_basic_list_read/c/private-common.c
level_3/fss_basic_list_read/c/private-common.h
level_3/fss_basic_list_read/c/private-print.c
level_3/fss_basic_list_read/c/private-print.h
level_3/fss_basic_list_read/c/private-read.c
level_3/fss_basic_list_read/c/private-read.h
level_3/fss_basic_list_write/c/common.c
level_3/fss_basic_list_write/c/common.h
level_3/fss_basic_list_write/c/fss_basic_list_write.c
level_3/fss_basic_list_write/c/fss_basic_list_write.h
level_3/fss_basic_list_write/c/main.c
level_3/fss_basic_list_write/c/private-common.c
level_3/fss_basic_list_write/c/private-common.h
level_3/fss_basic_list_write/c/private-write.c
level_3/fss_basic_list_write/c/private-write.h
level_3/fss_basic_read/c/common.c
level_3/fss_basic_read/c/common.h
level_3/fss_basic_read/c/fss_basic_read.c
level_3/fss_basic_read/c/fss_basic_read.h
level_3/fss_basic_read/c/main.c
level_3/fss_basic_read/c/private-common.c
level_3/fss_basic_read/c/private-common.h
level_3/fss_basic_read/c/private-print.c
level_3/fss_basic_read/c/private-print.h
level_3/fss_basic_read/c/private-read.c
level_3/fss_basic_read/c/private-read.h
level_3/fss_basic_write/c/common.c
level_3/fss_basic_write/c/common.h
level_3/fss_basic_write/c/fss_basic_write.c
level_3/fss_basic_write/c/fss_basic_write.h
level_3/fss_basic_write/c/main.c
level_3/fss_basic_write/c/private-common.c
level_3/fss_basic_write/c/private-common.h
level_3/fss_basic_write/c/private-write.c
level_3/fss_basic_write/c/private-write.h
level_3/fss_embedded_list_read/c/common.c
level_3/fss_embedded_list_read/c/common.h
level_3/fss_embedded_list_read/c/fss_embedded_list_read.c
level_3/fss_embedded_list_write/c/common.c
level_3/fss_embedded_list_write/c/common.h
level_3/fss_embedded_list_write/c/fss_embedded_list_write.c
level_3/fss_embedded_list_write/c/fss_embedded_list_write.h
level_3/fss_embedded_list_write/c/main.c
level_3/fss_embedded_list_write/c/private-common.c
level_3/fss_embedded_list_write/c/private-common.h
level_3/fss_embedded_list_write/c/private-write.c
level_3/fss_embedded_list_write/c/private-write.h
level_3/fss_extended_list_read/c/common.c
level_3/fss_extended_list_read/c/common.h
level_3/fss_extended_list_read/c/fss_extended_list_read.c
level_3/fss_extended_list_read/c/fss_extended_list_read.h
level_3/fss_extended_list_read/c/main.c
level_3/fss_extended_list_read/c/private-common.c
level_3/fss_extended_list_read/c/private-common.h
level_3/fss_extended_list_read/c/private-print.c
level_3/fss_extended_list_read/c/private-print.h
level_3/fss_extended_list_read/c/private-read.c
level_3/fss_extended_list_read/c/private-read.h
level_3/fss_extended_list_write/c/common.c
level_3/fss_extended_list_write/c/common.h
level_3/fss_extended_list_write/c/fss_extended_list_write.c
level_3/fss_extended_list_write/c/fss_extended_list_write.h
level_3/fss_extended_list_write/c/main.c
level_3/fss_extended_list_write/c/private-common.c
level_3/fss_extended_list_write/c/private-common.h
level_3/fss_extended_list_write/c/private-write.c
level_3/fss_extended_list_write/c/private-write.h
level_3/fss_extended_read/c/common.c
level_3/fss_extended_read/c/common.h
level_3/fss_extended_read/c/fss_extended_read.c
level_3/fss_extended_read/c/fss_extended_read.h
level_3/fss_extended_read/c/main.c
level_3/fss_extended_read/c/private-common.c
level_3/fss_extended_read/c/private-common.h
level_3/fss_extended_read/c/private-print.c
level_3/fss_extended_read/c/private-print.h
level_3/fss_extended_read/c/private-read.c
level_3/fss_extended_read/c/private-read.h
level_3/fss_extended_write/c/common.c
level_3/fss_extended_write/c/common.h
level_3/fss_extended_write/c/fss_extended_write.c
level_3/fss_extended_write/c/fss_extended_write.h
level_3/fss_extended_write/c/main.c
level_3/fss_extended_write/c/private-common.c
level_3/fss_extended_write/c/private-common.h
level_3/fss_extended_write/c/private-write.c
level_3/fss_extended_write/c/private-write.h
level_3/fss_identify/c/common.c
level_3/fss_identify/c/common.h
level_3/fss_identify/c/fss_identify.c
level_3/fss_identify/c/fss_identify.h
level_3/fss_identify/c/main.c
level_3/fss_identify/c/private-common.c
level_3/fss_identify/c/private-common.h
level_3/fss_identify/c/private-identify.c
level_3/fss_identify/c/private-identify.h
level_3/fss_identify/c/private-print.c
level_3/fss_identify/c/private-print.h
level_3/fss_payload_read/c/common.c
level_3/fss_payload_read/c/common.h
level_3/fss_payload_read/c/fss_payload_read.c
level_3/fss_payload_read/c/fss_payload_read.h
level_3/fss_payload_read/c/main.c
level_3/fss_payload_read/c/private-common.c
level_3/fss_payload_read/c/private-common.h
level_3/fss_payload_read/c/private-print.c
level_3/fss_payload_read/c/private-print.h
level_3/fss_payload_read/c/private-read.c
level_3/fss_payload_read/c/private-read.h
level_3/fss_payload_write/c/common.c
level_3/fss_payload_write/c/common.h
level_3/fss_payload_write/c/fss_payload_write.c
level_3/fss_payload_write/c/fss_payload_write.h
level_3/fss_payload_write/c/main.c
level_3/fss_payload_write/c/private-common.c
level_3/fss_payload_write/c/private-common.h
level_3/fss_payload_write/c/private-write.c
level_3/fss_payload_write/c/private-write.h
level_3/fss_status_code/c/common.c
level_3/fss_status_code/c/common.h
level_3/fss_status_code/c/fss_status_code.c
level_3/fss_status_code/c/fss_status_code.h
level_3/fss_status_code/c/main.c
level_3/fss_status_code/c/private-common.c
level_3/fss_status_code/c/private-common.h
level_3/fss_status_code/c/private-fss_status_code.c
level_3/fss_status_code/c/private-fss_status_code.h
level_3/iki_read/c/common.c
level_3/iki_read/c/common.h
level_3/iki_read/c/iki_read.c
level_3/iki_write/c/common.c
level_3/iki_write/c/common.h
level_3/iki_write/c/iki_write.c
level_3/status_code/c/common.c
level_3/status_code/c/common.h
level_3/status_code/c/main.c
level_3/status_code/c/private-common.c
level_3/status_code/c/private-common.h
level_3/status_code/c/private-status_code.c
level_3/status_code/c/private-status_code.h
level_3/status_code/c/status_code.c
level_3/status_code/c/status_code.h
level_3/utf8/c/common.c
level_3/utf8/c/common.h
level_3/utf8/c/main.c
level_3/utf8/c/private-common.h
level_3/utf8/c/private-print.c
level_3/utf8/c/private-print.h
level_3/utf8/c/private-utf8.c
level_3/utf8/c/private-utf8.h
level_3/utf8/c/utf8.c
level_3/utf8/c/utf8.h

index ddff97c4121f8d9c7a454e1f14e6a0055fa844d1..049f06eb5360d1e3728ead57ce60523d5684f392 100644 (file)
@@ -25,14 +25,14 @@ build_libraries-level -lfll_1 -lfll_0
 build_libraries-level_threadless -lfll_1 -lfll_0
 build_libraries_shared
 build_libraries_static
-build_sources_library control_group.c error.c error-common.c private-error.c execute.c private-execute.c file.c private-file.c fss.c private-fss.c fss_basic.c fss_basic_list.c fss_embedded_list.c fss_extended.c fss_extended_list.c fss_payload.c fss_status_string.c iki.c private-iki.c path.c print.c program.c status_string.c
+build_sources_library control_group.c error.c error-common.c private-error.c execute.c private-execute.c file.c private-file.c fss.c private-fss.c fss_basic.c fss_basic_list.c fss_embedded_list.c fss_extended.c fss_extended_list.c fss_payload.c fss_status_string.c iki.c private-iki.c path.c print.c program.c program-common.c status_string.c
 build_sources_library-level
 build_sources_library_shared
 build_sources_library_static
 build_sources_program
 build_sources_program_shared
 build_sources_program_static
-build_sources_headers control_group.h error.h error-common.h execute.h file.h fss.h fss_basic.h fss_basic_list.h fss_embedded_list.h fss_extended.h fss_extended_list.h fss_payload.h fss_status_string.h iki.h path.h print.h program.h status_string.h
+build_sources_headers control_group.h error.h error-common.h execute.h file.h fss.h fss_basic.h fss_basic_list.h fss_embedded_list.h fss_extended.h fss_extended_list.h fss_payload.h fss_status_string.h iki.h path.h print.h program.h program-common.h status_string.h
 build_sources_headers-level
 build_sources_headers_shared
 build_sources_headers_static
index 8e2e758ccf76f3f2f0ef66687fa24fc060f1de19..8ff08998a6783aad29c666f0800c777681feb841 100644 (file)
@@ -25,14 +25,14 @@ build_libraries-monolithic
 build_libraries-monolithic_threadless
 build_libraries_shared
 build_libraries_static
-build_sources_library level_0/account.c level_0/private-account.c level_0/capability.c level_0/color.c level_0/color-common.c level_0/console.c level_0/console-common.c level_0/control_group.c level_0/control_group-common.c level_0/conversion.c level_0/conversion-common.c level_0/private-conversion.c level_0/directory.c level_0/private-directory.c level_0/environment.c level_0/private-environment.c level_0/execute.c level_0/file.c level_0/file-common.c level_0/private-file.c level_0/fss.c level_0/private-fss.c level_0/fss-common.c level_0/fss_named.c level_0/fss_nest.c level_0/fss_set.c level_0/iki.c level_0/iki-common.c level_0/private-iki.c level_0/limit.c level_0/memory.c level_0/memory_structure.c level_0/private-memory.c level_0/path.c level_0/path-common.c level_0/private-path.c level_0/pipe.c level_0/print.c level_0/print_to.c level_0/print-common.c level_0/private-print.c level_0/private-print_to.c level_0/serialize.c level_0/serialize-common.c level_0/private-serialize.c level_0/signal.c level_0/socket.c level_0/status_string.c level_0/string.c level_0/string-common.c level_0/private-string.c level_0/string_dynamic.c level_0/string_map.c level_0/string_quantity.c level_0/string_range.c level_0/string_triple.c level_0/type_array.c level_0/private-type_array.c level_0/utf.c level_0/utf-common.c level_0/utf_dynamic.c level_0/utf_map.c level_0/utf_string.c level_0/utf_triple.c level_0/private-utf.c level_0/private-utf-is_unassigned.c level_0/private-utf_string.c level_1/console.c level_1/control_group.c level_1/conversion.c level_1/private-conversion.c level_1/directory.c level_1/directory-common.c level_1/private-directory.c level_1/environment.c level_1/private-fss.c level_1/fss_basic.c level_1/fss_basic_list.c level_1/fss_embedded_list.c level_1/fss_extended.c level_1/fss_extended_list.c level_1/iki.c level_1/print.c level_1/print-common.c level_1/private-print.c level_1/signal.c level_1/string.c level_1/private-string.c level_1/utf.c level_1/private-utf.c level_1/utf_file.c level_1/private-utf_file.c level_2/control_group.c level_2/error.c level_2/error-common.c level_2/private-error.c level_2/execute.c level_2/private-execute.c level_2/file.c level_2/private-file.c level_2/fss.c level_2/private-fss.c level_2/fss_basic.c level_2/fss_basic_list.c level_2/fss_embedded_list.c level_2/fss_extended.c level_2/fss_extended_list.c level_2/fss_payload.c level_2/fss_status_string.c level_2/iki.c level_2/private-iki.c level_2/path.c level_2/print.c level_2/program.c level_2/status_string.c
+build_sources_library level_0/account.c level_0/private-account.c level_0/capability.c level_0/color.c level_0/color-common.c level_0/console.c level_0/console-common.c level_0/control_group.c level_0/control_group-common.c level_0/conversion.c level_0/conversion-common.c level_0/private-conversion.c level_0/directory.c level_0/private-directory.c level_0/environment.c level_0/private-environment.c level_0/execute.c level_0/file.c level_0/file-common.c level_0/private-file.c level_0/fss.c level_0/private-fss.c level_0/fss-common.c level_0/fss_named.c level_0/fss_nest.c level_0/fss_set.c level_0/iki.c level_0/iki-common.c level_0/private-iki.c level_0/limit.c level_0/memory.c level_0/memory_structure.c level_0/private-memory.c level_0/path.c level_0/path-common.c level_0/private-path.c level_0/pipe.c level_0/print.c level_0/print_to.c level_0/print-common.c level_0/private-print.c level_0/private-print_to.c level_0/serialize.c level_0/serialize-common.c level_0/private-serialize.c level_0/signal.c level_0/socket.c level_0/status_string.c level_0/string.c level_0/string-common.c level_0/private-string.c level_0/string_dynamic.c level_0/string_map.c level_0/string_quantity.c level_0/string_range.c level_0/string_triple.c level_0/type_array.c level_0/private-type_array.c level_0/utf.c level_0/utf-common.c level_0/utf_dynamic.c level_0/utf_map.c level_0/utf_string.c level_0/utf_triple.c level_0/private-utf.c level_0/private-utf-is_unassigned.c level_0/private-utf_string.c level_1/console.c level_1/control_group.c level_1/conversion.c level_1/private-conversion.c level_1/directory.c level_1/directory-common.c level_1/private-directory.c level_1/environment.c level_1/private-fss.c level_1/fss_basic.c level_1/fss_basic_list.c level_1/fss_embedded_list.c level_1/fss_extended.c level_1/fss_extended_list.c level_1/iki.c level_1/print.c level_1/print-common.c level_1/private-print.c level_1/signal.c level_1/string.c level_1/private-string.c level_1/utf.c level_1/private-utf.c level_1/utf_file.c level_1/private-utf_file.c level_2/control_group.c level_2/error.c level_2/error-common.c level_2/private-error.c level_2/execute.c level_2/private-execute.c level_2/file.c level_2/private-file.c level_2/fss.c level_2/private-fss.c level_2/fss_basic.c level_2/fss_basic_list.c level_2/fss_embedded_list.c level_2/fss_extended.c level_2/fss_extended_list.c level_2/fss_payload.c level_2/fss_status_string.c level_2/iki.c level_2/private-iki.c level_2/path.c level_2/print.c level_2/program.c level_2/program-common.c level_2/status_string.c
 build_sources_library-monolithic level_0/thread.c level_0/private-thread.c
 build_sources_library_shared
 build_sources_library_static
 build_sources_program
 build_sources_program_shared
 build_sources_program_static
-build_sources_headers level_0/account.h level_0/account-common.h level_0/capability.h level_0/capability-common.h level_0/color.h level_0/color-common.h level_0/console.h level_0/console-common.h level_0/control_group.h level_0/control_group-common.h level_0/conversion.h level_0/conversion-common.h level_0/directory.h level_0/directory_type.h level_0/directory-common.h level_0/environment.h level_0/environment-common.h level_0/execute.h level_0/execute-common.h level_0/file.h level_0/file-common.h level_0/fss.h level_0/fss-common.h level_0/fss_comment.h level_0/fss_delimit.h level_0/fss_named.h level_0/fss_nest.h level_0/fss_quote.h level_0/fss_set.h level_0/iki.h level_0/iki-common.h level_0/limit.h level_0/limit-common.h level_0/memory.h level_0/memory_structure.h level_0/memory-common.h level_0/path.h level_0/path-common.h level_0/pipe.h level_0/print.h level_0/print_to.h level_0/print-common.h level_0/serialize.h level_0/serialize-common.h level_0/signal.h level_0/signal-common.h level_0/socket.h level_0/socket-common.h level_0/status.h level_0/status_string.h level_0/string.h level_0/string-common.h level_0/string_dynamic.h level_0/string_map.h level_0/string_quantity.h level_0/string_range.h level_0/string_triple.h level_0/type.h level_0/type_array.h level_0/type_array-common.h level_0/utf.h level_0/utf-common.h level_0/utf_dynamic.h level_0/utf_map.h level_0/utf_string.h level_0/utf_triple.h level_1/console.h level_1/control_group.h level_1/conversion.h level_1/directory.h level_1/directory-common.h level_1/environment.h level_1/execute.h level_1/execute-common.h level_1/fss.h level_1/fss_basic.h level_1/fss_basic_list.h level_1/fss_embedded_list.h level_1/fss_extended.h level_1/fss_extended_list.h level_1/iki.h level_1/print.h level_1/print-common.h level_1/signal.h level_1/signal-common.h level_1/string.h level_1/utf.h level_1/utf_file.h level_2/control_group.h level_2/error.h level_2/error-common.h level_2/execute.h level_2/file.h level_2/fss.h level_2/fss_basic.h level_2/fss_basic_list.h level_2/fss_embedded_list.h level_2/fss_extended.h level_2/fss_extended_list.h level_2/fss_payload.h level_2/fss_status_string.h level_2/iki.h level_2/path.h level_2/print.h level_2/program.h level_2/status_string.h
+build_sources_headers level_0/account.h level_0/account-common.h level_0/capability.h level_0/capability-common.h level_0/color.h level_0/color-common.h level_0/console.h level_0/console-common.h level_0/control_group.h level_0/control_group-common.h level_0/conversion.h level_0/conversion-common.h level_0/directory.h level_0/directory_type.h level_0/directory-common.h level_0/environment.h level_0/environment-common.h level_0/execute.h level_0/execute-common.h level_0/file.h level_0/file-common.h level_0/fss.h level_0/fss-common.h level_0/fss_comment.h level_0/fss_delimit.h level_0/fss_named.h level_0/fss_nest.h level_0/fss_quote.h level_0/fss_set.h level_0/iki.h level_0/iki-common.h level_0/limit.h level_0/limit-common.h level_0/memory.h level_0/memory_structure.h level_0/memory-common.h level_0/path.h level_0/path-common.h level_0/pipe.h level_0/print.h level_0/print_to.h level_0/print-common.h level_0/serialize.h level_0/serialize-common.h level_0/signal.h level_0/signal-common.h level_0/socket.h level_0/socket-common.h level_0/status.h level_0/status_string.h level_0/string.h level_0/string-common.h level_0/string_dynamic.h level_0/string_map.h level_0/string_quantity.h level_0/string_range.h level_0/string_triple.h level_0/type.h level_0/type_array.h level_0/type_array-common.h level_0/utf.h level_0/utf-common.h level_0/utf_dynamic.h level_0/utf_map.h level_0/utf_string.h level_0/utf_triple.h level_1/console.h level_1/control_group.h level_1/conversion.h level_1/directory.h level_1/directory-common.h level_1/environment.h level_1/execute.h level_1/execute-common.h level_1/fss.h level_1/fss_basic.h level_1/fss_basic_list.h level_1/fss_embedded_list.h level_1/fss_extended.h level_1/fss_extended_list.h level_1/iki.h level_1/print.h level_1/print-common.h level_1/signal.h level_1/signal-common.h level_1/string.h level_1/utf.h level_1/utf_file.h level_2/control_group.h level_2/error.h level_2/error-common.h level_2/execute.h level_2/file.h level_2/fss.h level_2/fss_basic.h level_2/fss_basic_list.h level_2/fss_embedded_list.h level_2/fss_extended.h level_2/fss_extended_list.h level_2/fss_payload.h level_2/fss_status_string.h level_2/iki.h level_2/path.h level_2/print.h level_2/program.h level_2/program-common.h level_2/status_string.h
 build_sources_headers-monolithic level_0/thread.h level_0/thread-common.h
 build_sources_headers_shared
 build_sources_headers_static
index 010b667b890b4d514b1ad329ef2c58d4e83473db..93a98bccec687a3bcbcb334409b0f5c2d70ab88c 100644 (file)
@@ -53,6 +53,114 @@ extern "C" {
   const f_color_set_t f_color_set_empty_s = macro_f_color_set_t_initialize(&f_string_empty_s, &f_string_empty_s);
 #endif // _di_f_color_set_string_empty_s_
 
+#ifndef _di_f_color_context_delete_
+  f_status_t f_color_context_delete(f_color_context_t * const context) {
+    #ifndef _di_level_0_parameters_checking_
+      if (!context) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameters_checking_
+
+    f_status_t status = F_none;
+
+    status = f_string_dynamic_resize(0, &context->reset);
+
+    if (F_status_is_error_not(status)) {
+      status = f_string_dynamic_resize(0, &context->warning);
+    }
+
+    if (F_status_is_error_not(status)) {
+      status = f_string_dynamic_resize(0, &context->error);
+    }
+
+    if (F_status_is_error_not(status)) {
+      status = f_string_dynamic_resize(0, &context->title);
+    }
+
+    if (F_status_is_error_not(status)) {
+      status = f_string_dynamic_resize(0, &context->notable);
+    }
+
+    if (F_status_is_error_not(status)) {
+      status = f_string_dynamic_resize(0, &context->important);
+    }
+
+    if (F_status_is_error_not(status)) {
+      status = f_string_dynamic_resize(0, &context->standout);
+    }
+
+    if (F_status_is_error_not(status)) {
+      status = f_string_dynamic_resize(0, &context->success);
+    }
+
+    if (F_status_is_error_not(status)) {
+      status = f_string_dynamic_resize(0, &context->normal);
+    }
+
+    if (F_status_is_error_not(status)) {
+      status = f_string_dynamic_resize(0, &context->normal_reset);
+    }
+
+    if (F_status_is_error(status)) return status;
+
+    macro_f_color_context_t_clear((*context))
+
+    return F_none;
+  }
+#endif // _di_f_color_context_delete_
+
+#ifndef _di_f_color_context_destroy_
+  f_status_t f_color_context_destroy(f_color_context_t * const context) {
+    #ifndef _di_level_0_parameters_checking_
+      if (!context) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameters_checking_
+
+    f_status_t status = F_none;
+
+    status = f_string_dynamic_adjust(0, &context->reset);
+
+    if (F_status_is_error_not(status)) {
+      status = f_string_dynamic_adjust(0, &context->warning);
+    }
+
+    if (F_status_is_error_not(status)) {
+      status = f_string_dynamic_adjust(0, &context->error);
+    }
+
+    if (F_status_is_error_not(status)) {
+      status = f_string_dynamic_adjust(0, &context->title);
+    }
+
+    if (F_status_is_error_not(status)) {
+      status = f_string_dynamic_adjust(0, &context->notable);
+    }
+
+    if (F_status_is_error_not(status)) {
+      status = f_string_dynamic_adjust(0, &context->important);
+    }
+
+    if (F_status_is_error_not(status)) {
+      status = f_string_dynamic_adjust(0, &context->standout);
+    }
+
+    if (F_status_is_error_not(status)) {
+      status = f_string_dynamic_adjust(0, &context->success);
+    }
+
+    if (F_status_is_error_not(status)) {
+      status = f_string_dynamic_adjust(0, &context->normal);
+    }
+
+    if (F_status_is_error_not(status)) {
+      status = f_string_dynamic_adjust(0, &context->normal_reset);
+    }
+
+    if (F_status_is_error(status)) return status;
+
+    macro_f_color_context_t_clear((*context))
+
+    return F_none;
+  }
+#endif // _di_f_color_context_destroy_
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 6b71d87041b15091795006fb865f8f5e453ab6c4..bd56468657ea83e6d394b850e5161af911ff1ed9 100644 (file)
@@ -826,6 +826,44 @@ extern "C" {
     macro_f_color_context_t_clear(context)
 #endif // _di_f_color__context_t_
 
+/**
+ * Delete any dynamic allocated data on the color context object.
+ *
+ * @param context
+ *   The context object.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_string_dynamic_resize().
+ *
+ * @see f_string_dynamic_resize()
+ */
+#ifndef _di_f_color_context_delete_
+  extern f_status_t f_color_context_delete(f_color_context_t * const context);
+#endif // _di_f_color_context_delete_
+
+/**
+ * Destroy any dynamic allocated data on the color context object.
+ *
+ * @param context
+ *   The context object.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_string_dynamic_adjust().
+ *
+ * @see f_string_dynamic_adjust()
+ */
+#ifndef _di_f_color_context_destroy_
+  extern f_status_t f_color_context_destroy(f_color_context_t * const context);
+#endif // _di_f_color_context_destroy_
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 8ddc43c4955f61ee105c410cff8eb02b959a6d56..34eea152c9d447f683b441c7f58bd568cc1d2624 100644 (file)
@@ -12,7 +12,7 @@ extern "C" {
 
     // Switch to the appropriate terminal color mode.
     {
-      char *environment = getenv("TERM");
+      char *environment = getenv("TERM"); // @todo make these strings static!
 
       if (!environment || strncmp(environment, "linux", 6) == 0) {
         macro_f_color_t_set_linux(context->list);
index e5c1f0362dcfb5dfa46ba6355d726d424dd13c93..b012d569c8f8ab73da4d04d6a46d2fafc7b37fa7 100644 (file)
@@ -19,7 +19,7 @@ build_libraries -lc -lcmocka
 build_libraries-individual -lf_memory -lf_string -lf_color
 build_libraries-level -lfll_0
 build_libraries-monolithic -lfll
-build_sources_program test-color-load_context.c test-color-save_1.c test-color-save_2.c test-color-save_3.c test-color-save_4.c test-color-save_5.c test-color.c
+build_sources_program test-color-context_delete.c test-color-context_destroy.c test-color-load_context.c test-color-save_1.c test-color-save_2.c test-color-save_3.c test-color-save_4.c test-color-save_5.c test-color.c
 build_script no
 build_shared yes
 build_static no
diff --git a/level_0/f_color/tests/c/test-color-context_delete.c b/level_0/f_color/tests/c/test-color-context_delete.c
new file mode 100644 (file)
index 0000000..e9ef3bb
--- /dev/null
@@ -0,0 +1,124 @@
+#include "test-color.h"
+#include "test-color-context_delete.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_color_context_delete__frees_memory(void **state) {
+
+  const f_array_length_t size = 3;
+
+  f_color_context_t context = f_color_context_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamic_resize(size, &context.reset);
+
+    assert_int_equal(status, F_none);
+    assert_int_not_equal(context.reset.size, 0);
+    assert_non_null(context.reset.string);
+  }
+
+  {
+    const f_status_t status = f_string_dynamic_resize(size, &context.warning);
+
+    assert_int_equal(status, F_none);
+    assert_int_not_equal(context.warning.size, 0);
+    assert_non_null(context.warning.string);
+  }
+
+  {
+    const f_status_t status = f_string_dynamic_resize(size, &context.error);
+
+    assert_int_equal(status, F_none);
+    assert_int_not_equal(context.error.size, 0);
+    assert_non_null(context.error.string);
+  }
+
+  {
+    const f_status_t status = f_string_dynamic_resize(size, &context.title);
+
+    assert_int_equal(status, F_none);
+    assert_int_not_equal(context.title.size, 0);
+    assert_non_null(context.title.string);
+  }
+
+  {
+    const f_status_t status = f_string_dynamic_resize(size, &context.notable);
+
+    assert_int_equal(status, F_none);
+    assert_int_not_equal(context.notable.size, 0);
+    assert_non_null(context.notable.string);
+  }
+
+  {
+    const f_status_t status = f_string_dynamic_resize(size, &context.important);
+
+    assert_int_equal(status, F_none);
+    assert_int_not_equal(context.important.size, 0);
+    assert_non_null(context.important.string);
+  }
+
+  {
+    const f_status_t status = f_string_dynamic_resize(size, &context.standout);
+
+    assert_int_equal(status, F_none);
+    assert_int_not_equal(context.standout.size, 0);
+    assert_non_null(context.standout.string);
+  }
+
+  {
+    const f_status_t status = f_string_dynamic_resize(size, &context.success);
+
+    assert_int_equal(status, F_none);
+    assert_int_not_equal(context.success.size, 0);
+    assert_non_null(context.success.string);
+  }
+
+  {
+    const f_status_t status = f_string_dynamic_resize(size, &context.normal);
+
+    assert_int_equal(status, F_none);
+    assert_int_not_equal(context.normal.size, 0);
+    assert_non_null(context.normal.string);
+  }
+
+  {
+    const f_status_t status = f_string_dynamic_resize(size, &context.normal_reset);
+
+    assert_int_equal(status, F_none);
+    assert_int_not_equal(context.normal_reset.size, 0);
+    assert_non_null(context.normal_reset.string);
+  }
+
+  {
+    const f_status_t status = f_color_context_delete(&context);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(context.reset.size, 0);
+    assert_int_equal(context.warning.size, 0);
+    assert_int_equal(context.error.size, 0);
+    assert_int_equal(context.title.size, 0);
+    assert_int_equal(context.notable.size, 0);
+    assert_int_equal(context.important.size, 0);
+    assert_int_equal(context.standout.size, 0);
+    assert_int_equal(context.success.size, 0);
+    assert_int_equal(context.normal.size, 0);
+    assert_int_equal(context.normal_reset.size, 0);
+  }
+}
+
+#ifndef _di_level_0_parameter_checking_
+  void test__f_color_context_delete__parameter_checking(void **state) {
+
+    {
+      const f_status_t status = f_color_context_delete(0);
+
+      assert_int_equal(F_status_set_fine(status), F_parameter);
+    }
+  }
+#endif // _di_level_0_parameter_checking_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_color/tests/c/test-color-context_delete.h b/level_0/f_color/tests/c/test-color-context_delete.h
new file mode 100644 (file)
index 0000000..4355f72
--- /dev/null
@@ -0,0 +1,29 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Color
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the color project.
+ */
+#ifndef _TEST__F_color__delete
+#define _TEST__F_color__delete
+
+/**
+ * Test that deallocation works.
+ *
+ * @see f_color_context_delete()
+ */
+extern void test__f_color_context_delete__frees_memory(void **state);
+
+/**
+ * Test that parameter checking works as expected.
+ *
+ * @see f_color_context_delete()
+ */
+#ifndef _di_level_0_parameter_checking_
+  extern void test__f_color_context_delete__parameter_checking(void **state);
+#endif // _di_level_0_parameter_checking_
+
+#endif // _TEST__F_color__delete
diff --git a/level_0/f_color/tests/c/test-color-context_destroy.c b/level_0/f_color/tests/c/test-color-context_destroy.c
new file mode 100644 (file)
index 0000000..ab0572d
--- /dev/null
@@ -0,0 +1,124 @@
+#include "test-color.h"
+#include "test-color-context_destroy.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_color_context_destroy__frees_memory(void **state) {
+
+  const f_array_length_t size = 3;
+
+  f_color_context_t context = f_color_context_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamic_resize(size, &context.reset);
+
+    assert_int_equal(status, F_none);
+    assert_int_not_equal(context.reset.size, 0);
+    assert_non_null(context.reset.string);
+  }
+
+  {
+    const f_status_t status = f_string_dynamic_resize(size, &context.warning);
+
+    assert_int_equal(status, F_none);
+    assert_int_not_equal(context.warning.size, 0);
+    assert_non_null(context.warning.string);
+  }
+
+  {
+    const f_status_t status = f_string_dynamic_resize(size, &context.error);
+
+    assert_int_equal(status, F_none);
+    assert_int_not_equal(context.error.size, 0);
+    assert_non_null(context.error.string);
+  }
+
+  {
+    const f_status_t status = f_string_dynamic_resize(size, &context.title);
+
+    assert_int_equal(status, F_none);
+    assert_int_not_equal(context.title.size, 0);
+    assert_non_null(context.title.string);
+  }
+
+  {
+    const f_status_t status = f_string_dynamic_resize(size, &context.notable);
+
+    assert_int_equal(status, F_none);
+    assert_int_not_equal(context.notable.size, 0);
+    assert_non_null(context.notable.string);
+  }
+
+  {
+    const f_status_t status = f_string_dynamic_resize(size, &context.important);
+
+    assert_int_equal(status, F_none);
+    assert_int_not_equal(context.important.size, 0);
+    assert_non_null(context.important.string);
+  }
+
+  {
+    const f_status_t status = f_string_dynamic_resize(size, &context.standout);
+
+    assert_int_equal(status, F_none);
+    assert_int_not_equal(context.standout.size, 0);
+    assert_non_null(context.standout.string);
+  }
+
+  {
+    const f_status_t status = f_string_dynamic_resize(size, &context.success);
+
+    assert_int_equal(status, F_none);
+    assert_int_not_equal(context.success.size, 0);
+    assert_non_null(context.success.string);
+  }
+
+  {
+    const f_status_t status = f_string_dynamic_resize(size, &context.normal);
+
+    assert_int_equal(status, F_none);
+    assert_int_not_equal(context.normal.size, 0);
+    assert_non_null(context.normal.string);
+  }
+
+  {
+    const f_status_t status = f_string_dynamic_resize(size, &context.normal_reset);
+
+    assert_int_equal(status, F_none);
+    assert_int_not_equal(context.normal_reset.size, 0);
+    assert_non_null(context.normal_reset.string);
+  }
+
+  {
+    const f_status_t status = f_color_context_destroy(&context);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(context.reset.size, 0);
+    assert_int_equal(context.warning.size, 0);
+    assert_int_equal(context.error.size, 0);
+    assert_int_equal(context.title.size, 0);
+    assert_int_equal(context.notable.size, 0);
+    assert_int_equal(context.important.size, 0);
+    assert_int_equal(context.standout.size, 0);
+    assert_int_equal(context.success.size, 0);
+    assert_int_equal(context.normal.size, 0);
+    assert_int_equal(context.normal_reset.size, 0);
+  }
+}
+
+#ifndef _di_level_0_parameter_checking_
+  void test__f_color_context_destroy__parameter_checking(void **state) {
+
+    {
+      const f_status_t status = f_color_context_destroy(0);
+
+      assert_int_equal(F_status_set_fine(status), F_parameter);
+    }
+  }
+#endif // _di_level_0_parameter_checking_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_color/tests/c/test-color-context_destroy.h b/level_0/f_color/tests/c/test-color-context_destroy.h
new file mode 100644 (file)
index 0000000..a5cabbf
--- /dev/null
@@ -0,0 +1,29 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Color
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the color project.
+ */
+#ifndef _TEST__F_color__destroy
+#define _TEST__F_color__destroy
+
+/**
+ * Test that deallocation works.
+ *
+ * @see f_color_context_destroy()
+ */
+extern void test__f_color_context_destroy__frees_memory(void **state);
+
+/**
+ * Test that parameter checking works as expected.
+ *
+ * @see f_color_context_destroy()
+ */
+#ifndef _di_level_0_parameter_checking_
+  extern void test__f_color_context_destroy__parameter_checking(void **state);
+#endif // _di_level_0_parameter_checking_
+
+#endif // _TEST__F_color__destroy
index 3eb6d5dc5bc8235bfb746ce04b2271e6c697b4ab..b3c70b3f4fb8e27607993043794726bb57e6cf4e 100644 (file)
@@ -38,6 +38,10 @@ int main(void) {
     // f_color_save_5() only returns failures by other functions that have their own tests.
     cmocka_unit_test(test__f_color_save_5_works),
 
+    cmocka_unit_test(test__f_color_context_delete__frees_memory),
+
+    cmocka_unit_test(test__f_color_context_destroy__frees_memory),
+
     #ifndef _di_level_0_parameter_checking_
       cmocka_unit_test(test__f_color_load_context__parameter_checking),
       cmocka_unit_test(test__f_color_save_1_parameter_checking),
@@ -45,6 +49,8 @@ int main(void) {
       cmocka_unit_test(test__f_color_save_3_parameter_checking),
       cmocka_unit_test(test__f_color_save_4_parameter_checking),
       cmocka_unit_test(test__f_color_save_5_parameter_checking),
+      cmocka_unit_test(test__f_color_context_delete__parameter_checking),
+      cmocka_unit_test(test__f_color_context_destroy__parameter_checking),
     #endif // _di_level_0_parameter_checking_
   };
 
index 9d4e312b87aec5407332faffa07e925980d6fceb..865daa52e50ec0dc1bb74e62ac1c5a0bfc8cb898 100644 (file)
@@ -32,6 +32,8 @@
 #include "test-color-save_3.h"
 #include "test-color-save_4.h"
 #include "test-color-save_5.h"
+#include "test-color-context_delete.h"
+#include "test-color-context_destroy.h"
 
 #ifdef __cplusplus
 extern "C" {
index 2cc49476eb856c864ca9fced78c6866d0e6f22f5..f53d98acef7703e9762d648f3715d8a92f94bced 100644 (file)
@@ -58,7 +58,13 @@ extern "C" {
       if (F_status_is_error(status)) return status;
     } // for
 
-    return f_string_dynamics_resize(0, &parameters->arguments);
+    status = f_string_dynamics_resize(0, &parameters->arguments);
+    if (F_status_is_error(status)) return status;
+
+    status = f_type_array_lengths_resize(0, &parameters->remaining);
+    if (F_status_is_error(status)) return status;
+
+    return F_none;
   }
 #endif // _di_f_console_parameters_delete_
 
@@ -82,7 +88,13 @@ extern "C" {
       if (F_status_is_error(status)) return status;
     } // for
 
-    return f_string_dynamics_adjust(0, &parameters->arguments);
+    status = f_string_dynamics_adjust(0, &parameters->arguments);
+    if (F_status_is_error(status)) return status;
+
+    status = f_type_array_lengths_adjust(0, &parameters->remaining);
+    if (F_status_is_error(status)) return status;
+
+    return F_none;
   }
 #endif // _di_f_console_parameters_destroy_
 
index 5a1f8bdc474e603543bde12542edc37cec5c94f2..29fc25a0e38d12178f2d8e3309030f977a5cc858 100644 (file)
@@ -330,6 +330,7 @@ extern "C" {
  *
  * array:     Intended to be populated with an array of f_console_parameter_t whose size is defined by the "used" property.
  * arguments: An array of arguments pointing to the argv[] strings with the string lengths already calculated (This is a dynamic array of f_string_static_t).
+ * remaining: An array of indexes within the arguments representing unmatched parameters.
  * length:    The total number of parameters in the parameters array.
  */
 #ifndef _di_f_console_parameters_t_
@@ -337,13 +338,14 @@ extern "C" {
     f_console_parameter_t *array;
 
     f_string_dynamics_t arguments;
+    f_array_lengths_t remaining;
 
     f_array_length_t used;
   } f_console_parameters_t;
 
-  #define f_console_parameters_t_initialize {0, f_string_dynamics_t_initialize, 0 }
+  #define f_console_parameters_t_initialize {0, f_string_dynamics_t_initialize, f_array_lengths_t_initialize, 0 }
 
-  #define macro_f_console_parameters_t_initialize(parameter, used) { parameter, f_string_dynamics_t_initialize, used }
+  #define macro_f_console_parameters_t_initialize(parameter, used) { parameter, f_string_dynamics_t_initialize, f_array_lengths_t_initialize, used }
 #endif // _di_f_console_parameters_t_
 
 /**
index 84915bcd0fd97f92abb7b5845bd097f2b572ea01..1393ea4cad90e1bcfd9aad696ef7577f587ef902 100644 (file)
@@ -153,9 +153,9 @@ extern "C" {
 #endif // _di_f_console_parameter_prioritize_right_
 
 #ifndef _di_f_console_parameter_process_
-  f_status_t f_console_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t * const parameters, f_array_lengths_t *remaining) {
+  f_status_t f_console_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t * const parameters) {
     #ifndef _di_level_0_parameter_checking_
-      if (!remaining) return F_status_set_error(F_parameter);
+      if (!parameters) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
     f_status_t status = F_none;
@@ -388,12 +388,10 @@ extern "C" {
       if (!found) {
 
         // Populate list of remaining parameters->array that are not associated with anything.
-        if (remaining->used == remaining->size) {
-          status = f_type_array_lengths_increase(F_memory_default_allocation_small_d, remaining);
-          if (F_status_is_error(status)) break;
-        }
+        status = f_type_array_lengths_increase(F_memory_default_allocation_small_d, &parameters->remaining);
+        if (F_status_is_error(status)) break;
 
-        remaining->array[remaining->used++] = location;
+        parameters->remaining.array[parameters->remaining.used++] = location;
       }
 
       ++location;
index 9bb6b9ef84562f7b8811c829230e569e8181739d..f8e0dc02193b34fec0d4a010e39be097d1fd0e7d 100644 (file)
@@ -6,9 +6,6 @@
  * Licenses: lgpl-2.1-or-later
  *
  * Some console input/output commands.
- *
- * @todo It may be a good idea to provide a standard parameter process process disable sequence.
- *       This does not yet exist, so "--help" would always be a parameter, but would if there was something like "-/ --help" where this help does not designate the help option?
  */
 #ifndef _F_console_h
 #define _F_console_h
@@ -136,8 +133,6 @@ extern "C" {
  *   The parameters passed to the process.
  * @param parameters
  *   The console parameters to look for.
- * @param remaining
- *   A list of remaining parameters not associated with anything.
  *
  * @return
  *   F_none on success.
@@ -153,7 +148,7 @@ extern "C" {
  * @see f_string_dynamics_increase_by()
  */
 #ifndef _di_f_console_parameter_process_
-  extern f_status_t f_console_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t * const parameters, f_array_lengths_t *remaining);
+  extern f_status_t f_console_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t * const parameters);
 #endif // _di_f_console_parameter_process_
 
 #ifdef __cplusplus
index 200c3177c619a856e8b178db58ba40073b8d8cbb..08c706e40f9cbb78f645847bafde2c42cdce8315 100644 (file)
@@ -27,10 +27,9 @@ void test__f_console_parameter_process__no_arguments(void **state) {
   };
 
   f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(parameter, 9);
-  f_array_lengths_t remaining = f_array_lengths_t_initialize;
 
   {
-    const f_status_t status = f_console_parameter_process(arguments, &parameters, &remaining);
+    const f_status_t status = f_console_parameter_process(arguments, &parameters);
 
     assert_int_equal(status, F_none);
 
@@ -88,10 +87,10 @@ void test__f_console_parameter_process__no_arguments(void **state) {
     assert_int_equal(parameter[8].location, 0);
     assert_int_equal(parameter[8].location_sub, 0);
 
-    assert_int_equal(remaining.used, 0);
+    assert_int_equal(parameters.remaining.used, 0);
   }
 
-  f_type_array_lengths_resize(0, &remaining);
+  f_console_parameters_delete(&parameters);
 }
 
 void test__f_console_parameter_process__only_remaining(void **state) {
@@ -122,10 +121,9 @@ void test__f_console_parameter_process__only_remaining(void **state) {
   };
 
   f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(parameter, 9);
-  f_array_lengths_t remaining = f_array_lengths_t_initialize;
 
   {
-    const f_status_t status = f_console_parameter_process(arguments, &parameters, &remaining);
+    const f_status_t status = f_console_parameter_process(arguments, &parameters);
 
     assert_int_equal(status, F_none);
 
@@ -183,20 +181,19 @@ void test__f_console_parameter_process__only_remaining(void **state) {
     assert_int_equal(parameter[8].location, 0);
     assert_int_equal(parameter[8].location_sub, 0);
 
-    assert_int_equal(remaining.used, 6);
+    assert_int_equal(parameters.remaining.used, 6);
   }
 
-  f_type_array_lengths_resize(0, &remaining);
+  f_console_parameters_delete(&parameters);
 }
 
 #ifndef _di_level_0_parameter_checking_
   void test__f_console_parameter_process__parameter_checking(void **state) {
 
     const f_console_arguments_t arguments = f_console_arguments_t_initialize;
-    f_console_parameters_t parameters = f_console_parameters_t_initialize;
 
     {
-      const f_status_t status = f_console_parameter_process(arguments, &parameters, 0);
+      const f_status_t status = f_console_parameter_process(arguments, 0);
 
       assert_int_equal(F_status_set_fine(status), F_parameter);
     }
@@ -242,10 +239,9 @@ void test__f_console_parameter_process__works(void **state) {
   };
 
   f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(parameter, 9);
-  f_array_lengths_t remaining = f_array_lengths_t_initialize;
 
   {
-    const f_status_t status = f_console_parameter_process(arguments, &parameters, &remaining);
+    const f_status_t status = f_console_parameter_process(arguments, &parameters);
 
     assert_int_equal(status, F_none);
 
@@ -319,12 +315,12 @@ void test__f_console_parameter_process__works(void **state) {
     assert_int_equal(parameter[8].locations.array[0], 6);
     assert_int_equal(parameter[8].locations.array[1], 15);
 
-    assert_int_equal(remaining.used, 2);
-    assert_string_equal(argv[remaining.array[0]], "free");
-    assert_string_equal(argv[remaining.array[1]], "-4");
+    assert_int_equal(parameters.remaining.used, 2);
+    assert_string_equal(argv[parameters.remaining.array[0]], "free");
+    assert_string_equal(argv[parameters.remaining.array[1]], "-4");
   }
 
-  f_type_array_lengths_resize(0, &remaining);
+  f_console_parameters_delete(&parameters);
 }
 
 #ifdef __cplusplus
diff --git a/level_2/fll_program/c/program-common.c b/level_2/fll_program/c/program-common.c
new file mode 100644 (file)
index 0000000..c67b6db
--- /dev/null
@@ -0,0 +1,50 @@
+#include "program.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_fll_program_parameters_
+  const f_string_static_t fll_program_parameter_filename_s = macro_f_string_static_t_initialize(FLL_program_parameter_filename_s, 0, FLL_program_parameter_filename_s_length);
+  const f_string_static_t fll_program_parameter_filenames_s = macro_f_string_static_t_initialize(FLL_program_parameter_filenames_s, 0, FLL_program_parameter_filenames_s_length);
+#endif // _di_fll_program_parameters_
+
+#ifndef _di_fll_program_data_delete_
+  f_status_t fll_program_data_delete(fll_program_data_t * const data) {
+    #ifndef _di_level_2_parameters_checking_
+      if (!data) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameters_checking_
+
+    f_status_t status = F_none;
+
+    status = f_console_parameters_delete(&data->parameters);
+    if (F_status_is_error(status)) return status;
+
+    status = f_color_context_delete(&data->context);
+    if (F_status_is_error(status)) return status;
+
+    return F_none;
+  }
+#endif // _di_fll_program_data_delete_
+
+#ifndef _di_fll_program_data_destroy_
+  f_status_t fll_program_data_destroy(fll_program_data_t * const data) {
+    #ifndef _di_level_2_parameters_checking_
+      if (!data) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameters_checking_
+
+    f_status_t status = F_none;
+
+    status = f_console_parameters_destroy(&data->parameters);
+    if (F_status_is_error(status)) return status;
+
+    status = f_color_context_destroy(&data->context);
+    if (F_status_is_error(status)) return status;
+
+    return F_none;
+  }
+#endif // _di_fll_program_data_destroy_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_2/fll_program/c/program-common.h b/level_2/fll_program/c/program-common.h
new file mode 100644 (file)
index 0000000..2856780
--- /dev/null
@@ -0,0 +1,115 @@
+/**
+ * FLL - Level 2
+ *
+ * Project: Program
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Defines common data to be used for/by project program.
+ *
+ * This is auto-included by program.h and should not need to be explicitly included.
+ */
+#ifndef _FLL_program_common_h
+#define _FLL_program_common_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_fll_program_parameters_
+  #define FLL_program_parameter_filename_s  "filename"
+  #define FLL_program_parameter_filenames_s "filename(s)"
+
+  #define FLL_program_parameter_filename_s_length  8
+  #define FLL_program_parameter_filenames_s_length 11
+
+  extern const f_string_static_t fll_program_parameter_filename_s;
+  extern const f_string_static_t fll_program_parameter_filenames_s;
+#endif // _di_fll_program_parameters_
+
+/**
+ * A common program structure to be used by simple programs needing no special structure.
+ *
+ * Complex programs or programs that need more data passed via the main should implement their own version of this.
+ *
+ * parameters:   The state of pre-defined parameters passed to the program.
+ * process_pipe: Designate whether or not to process the input pipe.
+ * output:       The output file for general printing.
+ * error:        The output file for error printing.
+ * warning:      The output file for warning printing.
+ * signal:       The process signal management structure.
+ * signal_check: A counter used to map to for reducing the amount of actual signal check calls.
+ * context:      The color context.
+ */
+#ifndef _di_fll_program_data_t_
+  typedef struct {
+    f_console_parameters_t parameters;
+
+    uint16_t signal_check;
+    bool process_pipe;
+
+    fl_print_t output;
+    fl_print_t error;
+    fl_print_t warning;
+
+    f_signal_t signal;
+
+    f_color_context_t context;
+  } fll_program_data_t;
+
+  #define fll_program_data_t_initialize \
+    { \
+      f_console_parameters_t_initialize, \
+      0, \
+      F_false, \
+      fl_print_t_initialize, \
+      macro_fl_print_t_initialize_error(), \
+      macro_fl_print_t_initialize_warning(), \
+      f_signal_t_initialize, \
+      f_color_context_t_initialize, \
+    }
+#endif // _di_fll_program_data_t_
+
+/**
+ * Delete any dynamic allocated data on the program data object.
+ *
+ * @param data
+ *   The program data object.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_console_parameters_delete().
+ *
+ * @see f_console_parameters_delete()
+ */
+#ifndef _di_fll_program_data_delete_
+  extern f_status_t fll_program_data_delete(fll_program_data_t * const data);
+#endif // _di_fll_program_data_delete_
+
+/**
+ * Destroy any dynamic allocated data on the program data object.
+ *
+ * @param data
+ *   The program data object.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_console_parameters_destroy().
+ *
+ * @see f_console_parameters_destroy()
+ */
+#ifndef _di_fll_program_data_destroy_
+  extern f_status_t fll_program_data_destroy(fll_program_data_t * const data);
+#endif // _di_fll_program_data_destroy_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _FLL_program_common_h
index 82d72b24fb48255ae2a42f5852bf8a9995e0ec15..bd5fc680a2550717c496392463ce4db005e802a3 100644 (file)
@@ -69,11 +69,11 @@ extern "C" {
 #endif // _di_fll_program_print_version_
 
 #ifndef _di_fll_program_parameter_process_
-  f_status_t fll_program_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t * const parameters, const f_console_parameter_ids_t choices, const bool right, f_array_lengths_t *remaining, f_color_context_t *context) {
+  f_status_t fll_program_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t * const parameters, const f_console_parameter_ids_t choices, const bool right, f_color_context_t *context) {
 
     f_status_t status = F_none;
 
-    status = f_console_parameter_process(arguments, parameters, remaining);
+    status = f_console_parameter_process(arguments, parameters);
     if (F_status_is_error(status)) return status;
 
     f_console_parameter_id_t decision = choices.id[2];
index cda3f19de71ee333edb9f6f664de342e80fac679..d2cd5751405b73d694a48145a994a6e5812bdcbd 100644 (file)
@@ -29,6 +29,9 @@
 #include <fll/level_1/string.h>
 #include <fll/level_1/print.h>
 
+// fll-2 program includes
+#include <fll/level_2/program-common.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -193,8 +196,6 @@ extern "C" {
  *   This must have its used size set to 3 and the ids are expected to be in this order: no_color, light, and dark.
  * @param right
  *   Set to TRUE for right priortization and FALSE for left prioritization.
- * @param remaining
- *   A list of remaining parameters not associated with anything.
  * @param context
  *   The color context.
  *
@@ -216,7 +217,7 @@ extern "C" {
  * @see f_color_load_context()
  */
 #ifndef _di_fll_program_parameter_process_
-  extern f_status_t fll_program_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t * const parameters, const f_console_parameter_ids_t choices, const bool right, f_array_lengths_t *remaining, f_color_context_t *context);
+  extern f_status_t fll_program_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t * const parameters, const f_console_parameter_ids_t choices, const bool right, f_color_context_t *context);
 #endif // _di_fll_program_parameter_process_
 
 /**
index 4af4155022bdd45d989830465545bf53b668b768..b005f0312eb1fb8947cd541e5519d578ecf89c12 100644 (file)
@@ -24,13 +24,13 @@ build_libraries -lc
 build_libraries-individual -lfl_print -lfl_string -lf_color -lf_console -lf_conversion -lf_file -lf_memory -lf_print -lf_signal -lf_string -lf_type_array -lf_utf
 build_libraries_shared
 build_libraries_static
-build_sources_library program.c
+build_sources_library program.c program-common.c
 build_sources_library_shared
 build_sources_library_static
 build_sources_program
 build_sources_program_shared
 build_sources_program_static
-build_sources_headers program.h
+build_sources_headers program.h program-common.h
 build_sources_headers_shared
 build_sources_headers_static
 build_sources_script
index c116b5c5b128a1babb91660ca1ec19d0665d29ef..e0aae3e9479dd7605e7b4f40cb4e6df272ef995d 100644 (file)
@@ -54,7 +54,7 @@ extern "C" {
     fll_program_print_help_option_long(file, context, byte_dump_long_simple_s, f_console_symbol_long_enable_s, " Display spaces for ASCII control codes.");
     fll_program_print_help_option_long(file, context, byte_dump_long_classic_s, f_console_symbol_long_enable_s, "Display periods for ASCII control codes.");
 
-    fll_program_print_help_usage(file, context, byte_dump_program_name_s, byte_dump_program_help_parameters_s);
+    fll_program_print_help_usage(file, context, byte_dump_program_name_s, fll_program_parameter_filenames_s);
 
     fl_print_format("  When using the %[%r%r%] option, some UTF-8 characters may be replaced by your instance and cause display alignment issues.%r%r", file.stream, context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_text_s, context.set.notable, f_string_eol_s, f_string_eol_s);
 
@@ -87,7 +87,7 @@ extern "C" {
       f_console_parameter_id_t ids[3] = { byte_dump_parameter_no_color_e, byte_dump_parameter_light_e, byte_dump_parameter_dark_e };
       const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
 
-      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
+      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->context);
 
       main->output.set = &main->context.set;
       main->error.set = &main->context.set;
@@ -262,7 +262,7 @@ extern "C" {
       return F_none;
     }
 
-    if (main->remaining.used || main->process_pipe) {
+    if (main->parameters.remaining.used || main->process_pipe) {
       if (main->parameters.array[byte_dump_parameter_width_e].result == f_console_result_found_e) {
         flockfile(main->error.to.stream);
 
@@ -461,15 +461,15 @@ extern "C" {
         }
       }
 
-      if (main->remaining.used > 0) {
+      if (main->parameters.remaining.used > 0) {
 
         // Pre-process remaining arguments to ensure that they all files exist before processing.
         {
           f_status_t missing_files = F_none;
 
-          for (f_array_length_t counter = 0; counter < main->remaining.used; ++counter) {
+          for (f_array_length_t counter = 0; counter < main->parameters.remaining.used; ++counter) {
 
-            status = f_file_exists(argv[main->remaining.array[counter]]);
+            status = f_file_exists(argv[main->parameters.remaining.array[counter]]);
 
             if (status == F_false) {
               status = F_status_set_error(F_file_found_not);
@@ -480,7 +480,7 @@ extern "C" {
                 missing_files = status;
               }
 
-              fll_error_file_print(main->error, F_status_set_fine(status), "f_file_exists", F_true, argv[main->remaining.array[counter]], f_file_operation_open_s, fll_error_file_type_file_e);
+              fll_error_file_print(main->error, F_status_set_fine(status), "f_file_exists", F_true, argv[main->parameters.remaining.array[counter]], f_file_operation_open_s, fll_error_file_type_file_e);
             }
           } // for
 
@@ -495,12 +495,12 @@ extern "C" {
 
         f_file_t file = f_file_t_initialize;
 
-        for (f_array_length_t counter = 0; counter < main->remaining.used; ++counter) {
+        for (f_array_length_t counter = 0; counter < main->parameters.remaining.used; ++counter) {
 
-          status = f_file_stream_open(argv[main->remaining.array[counter]], f_string_empty_s, &file);
+          status = f_file_stream_open(argv[main->parameters.remaining.array[counter]], f_string_empty_s, &file);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_open", F_true, argv[main->remaining.array[counter]], f_file_operation_open_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_open", F_true, argv[main->parameters.remaining.array[counter]], f_file_operation_open_s, fll_error_file_type_file_e);
 
             byte_dump_main_delete(main);
 
@@ -510,7 +510,7 @@ extern "C" {
           flockfile(main->output.to.stream);
 
           fl_print_format("%r%[Byte Dump of: %]%[", main->output.to.stream, f_string_eol_s, main->context.set.title, main->context.set.title, main->context.set.notable);
-          fl_print_format("%Q%] %[(in ", main->output.to.stream, argv[main->remaining.array[counter]], main->context.set.notable, main->context.set.title);
+          fl_print_format("%Q%] %[(in ", main->output.to.stream, argv[main->parameters.remaining.array[counter]], main->context.set.notable, main->context.set.title);
 
           if (main->mode == byte_dump_mode_hexidecimal_e) {
             f_print_dynamic_raw(byte_dump_print_strings_hexidecimal_s, main->output.to.stream);
@@ -532,7 +532,7 @@ extern "C" {
 
           funlockfile(main->output.to.stream);
 
-          status = byte_dump_file(main, argv[main->remaining.array[counter]], file);
+          status = byte_dump_file(main, argv[main->parameters.remaining.array[counter]], file);
 
           f_file_stream_close(F_true, &file);
 
@@ -548,7 +548,7 @@ extern "C" {
             }
             else {
               if (main->error.verbosity != f_console_verbosity_quiet_e) {
-                fll_error_file_print(main->error, F_status_set_fine(status), "byte_dump_file", F_true, argv[main->remaining.array[counter]], f_file_operation_process_s, fll_error_file_type_file_e);
+                fll_error_file_print(main->error, F_status_set_fine(status), "byte_dump_file", F_true, argv[main->parameters.remaining.array[counter]], f_file_operation_process_s, fll_error_file_type_file_e);
               }
             }
 
index 98661a926999ffdcdc02cf17618a2e18e1816860..ce344ba59633bb29d106987e2a675a86a6d3d71b 100644 (file)
@@ -14,10 +14,6 @@ extern "C" {
   const f_string_static_t byte_dump_program_name_long_s = macro_f_string_static_t_initialize(BYTE_DUMP_program_name_long_s, 0, BYTE_DUMP_program_name_long_s_length);
 #endif // _di_byte_dump_program_name_
 
-#ifndef _di_byte_dump_program_help_parameters_
-  const f_string_static_t byte_dump_program_help_parameters_s = macro_f_string_static_t_initialize(BYTE_DUMP_program_help_parameters_s, 0, BYTE_DUMP_program_help_parameters_s_length);
-#endif // _di_byte_dump_program_help_parameters_
-
 #ifndef _di_byte_dump_print_strings_
   const f_string_static_t byte_dump_print_strings_hexidecimal_s = macro_f_string_static_t_initialize(BYTE_DUMP_print_strings_hexidecimal_s, 0, BYTE_DUMP_print_strings_hexidecimal_s_length);
   const f_string_static_t byte_dump_print_strings_duodecimal_s = macro_f_string_static_t_initialize(BYTE_DUMP_print_strings_duodecimal_s, 0, BYTE_DUMP_print_strings_duodecimal_s_length);
@@ -31,7 +27,9 @@ extern "C" {
   const f_string_static_t byte_dump_character_placeholder_s = macro_f_string_static_t_initialize(BYTE_DUMP_character_placeholder_s, 0, BYTE_DUMP_character_placeholder_s_length);
   const f_string_static_t byte_dump_character_incomplete_s = macro_f_string_static_t_initialize(BYTE_DUMP_character_incomplete_s, 0, BYTE_DUMP_character_incomplete_s_length);
   const f_string_static_t byte_dump_character_unused_s = macro_f_string_static_t_initialize(BYTE_DUMP_character_unused_s, 0, BYTE_DUMP_character_unused_s_length);
+#endif // _di_byte_dump_defines_
 
+#ifndef _di_byte_dump_parameters_
   const f_string_static_t byte_dump_short_binary_s = macro_f_string_static_t_initialize(BYTE_DUMP_short_binary_s, 0, BYTE_DUMP_short_binary_s_length);
   const f_string_static_t byte_dump_short_decimal_s = macro_f_string_static_t_initialize(BYTE_DUMP_short_decimal_s, 0, BYTE_DUMP_short_decimal_s_length);
   const f_string_static_t byte_dump_short_duodecimal_s = macro_f_string_static_t_initialize(BYTE_DUMP_short_duodecimal_s, 0, BYTE_DUMP_short_duodecimal_s_length);
@@ -67,15 +65,13 @@ extern "C" {
   const f_string_static_t byte_dump_long_normal_s = macro_f_string_static_t_initialize(BYTE_DUMP_long_normal_s, 0, BYTE_DUMP_long_normal_s_length);
   const f_string_static_t byte_dump_long_simple_s = macro_f_string_static_t_initialize(BYTE_DUMP_long_simple_s, 0, BYTE_DUMP_long_simple_s_length);
   const f_string_static_t byte_dump_long_classic_s = macro_f_string_static_t_initialize(BYTE_DUMP_long_classic_s, 0, BYTE_DUMP_long_classic_s_length);
-#endif // _di_byte_dump_defines_
+#endif // _di_byte_dump_parameters_
 
 #ifndef _di_byte_dump_main_delete_
   f_status_t byte_dump_main_delete(byte_dump_main_t * const main) {
 
     f_console_parameters_delete(&main->parameters);
 
-    f_type_array_lengths_resize(0, &main->remaining);
-
     macro_f_color_context_t_delete_simple(main->context);
     macro_f_color_context_t_clear(main->context)
 
index 522f7253ce4790e3ce8302323f6a6806eb4fdc84..0edce155c9e117eea97587e6c5428967a13807b1 100644 (file)
@@ -16,6 +16,9 @@
 extern "C" {
 #endif
 
+/**
+ * The program version.
+ */
 #ifndef _di_byte_dump_program_version_
   #define BYTE_DUMP_program_version_major_s F_string_ascii_0_s
   #define BYTE_DUMP_program_version_minor_s F_string_ascii_5_s
@@ -42,6 +45,9 @@ extern "C" {
   extern const f_string_static_t byte_dump_program_version_s;
 #endif // _di_byte_dump_program_version_
 
+/**
+ * The program name.
+ */
 #ifndef _di_byte_dump_program_name_
   #define BYTE_DUMP_program_name_s      "byte_dump"
   #define BYTE_DUMP_program_name_long_s "Byte Dump"
@@ -53,13 +59,9 @@ extern "C" {
   extern const f_string_static_t byte_dump_program_name_long_s;
 #endif // _di_byte_dump_program_name_
 
-#ifndef _di_byte_dump_program_help_parameters_
-  #define BYTE_DUMP_program_help_parameters_s "filename(s)"
-  #define BYTE_DUMP_program_help_parameters_s_length 11
-
-  extern const f_string_static_t byte_dump_program_help_parameters_s;
-#endif // _di_byte_dump_program_help_parameters_
-
+/**
+ * The program strings for printing.
+ */
 #ifndef _di_byte_dump_print_strings_
   #define BYTE_DUMP_print_strings_hexidecimal_s "Hexidecimal"
   #define BYTE_DUMP_print_strings_duodecimal_s  "Duodecimal"
@@ -88,7 +90,7 @@ extern "C" {
 #endif // _di_byte_dump_default_allocation_step_
 
 /**
- * Byte Dump defines.
+ * The program defines.
  *
  * byte_dump_mode_*:
  *   - hexidecimal: Display using hexidecimal notation (base 16).
@@ -126,6 +128,42 @@ extern "C" {
   #define BYTE_DUMP_character_incomplete_s  "�"
   #define BYTE_DUMP_character_unused_s      "�"
 
+  #define BYTE_DUMP_character_wall_s_length        1
+  #define BYTE_DUMP_character_placeholder_s_length 3
+  #define BYTE_DUMP_character_incomplete_s_length  3
+  #define BYTE_DUMP_character_unused_s_length      3
+
+  extern const f_string_static_t byte_dump_character_wall_s;
+  extern const f_string_static_t byte_dump_character_placeholder_s;
+  extern const f_string_static_t byte_dump_character_incomplete_s;
+  extern const f_string_static_t byte_dump_character_unused_s;
+#endif // _di_byte_dump_defines_
+
+/**
+ * The program parameters.
+ *
+ * byte_dump_long_*:
+ *   - first: First offset byte size.
+ *   - last:  Last offset byte size.
+ *
+ *   - narrow:      Each character in the displyed text will take at least 1 columns.
+ *   - placeholder: Display (colored) placeholders to signify codes that are UTF-8 fragments.
+ *   - text:        Display text
+ *   - wide:        Each character in the displyed text will take at least 2 columns.
+ *   - width:       Number of characters to display per row.
+ *
+ *   - binary:      Display using binary format.
+ *   - decimal:     Display using decimal format.
+ *   - duodecimal:  Display using duodecimal format.
+ *   - hexidecimal: Display using hexidecimal format.
+ *   - octal:       Display using octal format.
+ *   - unicode:     Display using Unicode format.
+ *
+ *   - normal:  Use normal presentation, displaying UTF-8 sequence codes for ASCII special codes.
+ *   - simple:  Use simple presentation, displaying spaces for ASCII special codes instead of UTF-8 sequence codes.
+ *   - classic: Use classic presentation, displaying periods for ASCII special codes instead of UTF-8 sequence codes.
+ */
+#ifndef _di_byte_dump_parameters_
   #define BYTE_DUMP_short_binary_s      "b"
   #define BYTE_DUMP_short_decimal_s     "d"
   #define BYTE_DUMP_short_duodecimal_s  "D"
@@ -149,23 +187,18 @@ extern "C" {
   #define BYTE_DUMP_long_octal_s       "octal"
   #define BYTE_DUMP_long_unicode_s     "unicode"
 
-  #define BYTE_DUMP_long_first_s "first" // First offset byte size.
-  #define BYTE_DUMP_long_last_s  "last"  // Last offset byte size.
+  #define BYTE_DUMP_long_first_s "first"
+  #define BYTE_DUMP_long_last_s  "last"
 
-  #define BYTE_DUMP_long_narrow_s      "narrow"      // Each character in the displyed text will take at least 1 columns.
-  #define BYTE_DUMP_long_placeholder_s "placeholder" // Display (colored) placeholders to signify codes that are UTF-8 fragments.
-  #define BYTE_DUMP_long_text_s        "text"        // Display text
-  #define BYTE_DUMP_long_wide_s        "wide"        // Each character in the displyed text will take at least 2 columns.
-  #define BYTE_DUMP_long_width_s       "width"       // Number of characters to display per row.
+  #define BYTE_DUMP_long_narrow_s      "narrow"
+  #define BYTE_DUMP_long_placeholder_s "placeholder"
+  #define BYTE_DUMP_long_text_s        "text"
+  #define BYTE_DUMP_long_wide_s        "wide"
+  #define BYTE_DUMP_long_width_s       "width"
 
-  #define BYTE_DUMP_long_normal_s  "normal"  // Use normal presentation, displaying UTF-8 sequence codes for ASCII special codes.
-  #define BYTE_DUMP_long_simple_s  "simple"  // Use simple presentation, displaying spaces for ASCII special codes instead of UTF-8 sequence codes.
-  #define BYTE_DUMP_long_classic_s "classic" // Use classic presentation, displaying periods for ASCII special codes instead of UTF-8 sequence codes.
-
-  #define BYTE_DUMP_character_wall_s_length        1
-  #define BYTE_DUMP_character_placeholder_s_length 3
-  #define BYTE_DUMP_character_incomplete_s_length  3
-  #define BYTE_DUMP_character_unused_s_length      3
+  #define BYTE_DUMP_long_normal_s  "normal"
+  #define BYTE_DUMP_long_simple_s  "simple"
+  #define BYTE_DUMP_long_classic_s "classic"
 
   #define BYTE_DUMP_short_binary_s_length      1
   #define BYTE_DUMP_short_decimal_s_length     1
@@ -203,11 +236,6 @@ extern "C" {
   #define BYTE_DUMP_long_simple_s_length  6
   #define BYTE_DUMP_long_classic_s_length 7
 
-  extern const f_string_static_t byte_dump_character_wall_s;
-  extern const f_string_static_t byte_dump_character_placeholder_s;
-  extern const f_string_static_t byte_dump_character_incomplete_s;
-  extern const f_string_static_t byte_dump_character_unused_s;
-
   extern const f_string_static_t byte_dump_short_binary_s;
   extern const f_string_static_t byte_dump_short_decimal_s;
   extern const f_string_static_t byte_dump_short_duodecimal_s;
@@ -306,13 +334,25 @@ extern "C" {
     }
 
   #define byte_dump_total_parameters_d 25
-#endif // _di_byte_dump_defines_
+#endif // _di_byte_dump_parameters_
 
+/**
+ * The main program data.
+ *
+ * parameters:   The state of pre-defined parameters passed to the program.
+ * process_pipe: Designate whether or not to process the input pipe.
+ * output:       The output file for general printing.
+ * error:        The output file for error printing.
+ * warning:      The output file for warning printing.
+ * signal:       The process signal management structure.
+ * context:      The color context.
+ *
+ * @todo
+ */
 #ifndef _di_byte_dump_main_t_
   typedef struct {
     f_console_parameters_t parameters;
 
-    f_array_lengths_t remaining;
     bool process_pipe;
 
     fl_print_t output;
@@ -334,7 +374,6 @@ extern "C" {
   #define byte_dump_main_t_initialize \
     { \
       f_console_parameters_t_initialize, \
-      f_array_lengths_t_initialize, \
       F_false, \
       fl_print_t_initialize, \
       macro_fl_print_t_initialize_error(), \
index f2b5269141e7c0fb8cc6e1d0e305632c842c2296..4109b4743e622b03dd0791fbadcc1b73ab32fdaa 100644 (file)
@@ -13,7 +13,7 @@ extern "C" {
   const f_string_static_t control_program_name_long_s = macro_f_string_static_t_initialize(CONTROL_program_name_long_s, 0, CONTROL_program_name_long_s_length);
 #endif // _di_control_program_name_
 
-#ifndef _di_control_defines_
+#ifndef _di_control_parameters_
   const f_string_static_t control_short_name_s = macro_f_string_static_t_initialize(CONTROL_short_name_s, 0, CONTROL_short_name_s_length);
   const f_string_static_t control_short_settings_s = macro_f_string_static_t_initialize(CONTROL_short_settings_s, 0, CONTROL_short_settings_s_length);
   const f_string_static_t control_short_socket_s = macro_f_string_static_t_initialize(CONTROL_short_socket_s, 0, CONTROL_short_socket_s_length);
@@ -21,18 +21,12 @@ extern "C" {
   const f_string_static_t control_long_name_s = macro_f_string_static_t_initialize(CONTROL_long_name_s, 0, CONTROL_long_name_s_length);
   const f_string_static_t control_long_settings_s = macro_f_string_static_t_initialize(CONTROL_long_settings_s, 0, CONTROL_long_settings_s_length);
   const f_string_static_t control_long_socket_s = macro_f_string_static_t_initialize(CONTROL_long_socket_s, 0, CONTROL_long_socket_s_length);
-#endif // _di_control_defines_
+#endif // _di_control_parameters_
 
 #ifndef _di_control_main_delete_
-  f_status_t control_main_delete(control_main_t * const main) {
+  f_status_t control_main_delete(fll_program_data_t * const main) {
 
-    f_console_parameters_delete(&main->parameters);
-
-    f_type_array_lengths_resize(0, &main->remaining);
-
-    macro_f_color_context_t_delete_simple(main->context);
-
-    return F_none;
+    return fll_program_data_delete(main);
   }
 #endif // _di_control_main_delete_
 
index 5bef2053f75d580e5787ff4f6d8460912381a58f..a951fc83d79d7dab19917e0ac9839a0b80211467 100644 (file)
@@ -16,6 +16,9 @@
 extern "C" {
 #endif
 
+/**
+ * The program version.
+ */
 #ifndef _di_control_program_version_
   #define CONTROL_program_version_major_s F_string_ascii_0_s
   #define CONTROL_program_version_minor_s F_string_ascii_5_s
@@ -42,6 +45,9 @@ extern "C" {
   extern const f_string_static_t control_program_version_s;
 #endif // _di_control_program_version_
 
+/**
+ * The program name.
+ */
 #ifndef _di_control_program_name_
   #define CONTROL_program_name_s      "control"
   #define CONTROL_program_name_long_s "Control Program"
@@ -53,7 +59,10 @@ extern "C" {
   extern const f_string_static_t control_program_name_long_s;
 #endif // _di_control_program_name_
 
-#ifndef _di_control_defines_
+/**
+ * The main program parameters.
+ */
+#ifndef _di_control_parameters_
   #define CONTROL_short_name_s     "n"
   #define CONTROL_short_settings_s "s"
   #define CONTROL_short_socket_s   "k"
@@ -111,39 +120,7 @@ extern "C" {
     }
 
   #define control_total_parameters_d 12
-#endif // _di_control_defines_
-
-#ifndef _di_control_main_t_
-  typedef struct {
-    f_console_parameters_t parameters;
-
-    uint16_t signal_check;
-
-    f_array_lengths_t remaining;
-    bool process_pipe;
-
-    fl_print_t output;
-    fl_print_t error;
-    fl_print_t warning;
-
-    f_signal_t signal;
-
-    f_color_context_t context;
-  } control_main_t;
-
-  #define control_main_initialize \
-    { \
-      f_console_parameters_t_initialize, \
-      0, \
-      f_array_lengths_t_initialize, \
-      F_false, \
-      fl_print_t_initialize, \
-      macro_fl_print_t_initialize_error(), \
-      macro_fl_print_t_initialize_warning(), \
-      f_signal_t_initialize, \
-      f_color_context_t_initialize, \
-    }
-#endif // _di_control_main_t_
+#endif // _di_control_parameters_
 
 /**
  * Deallocate main.
@@ -161,7 +138,7 @@ extern "C" {
  * @see control_main()
  */
 #ifndef _di_control_main_delete_
-  extern f_status_t control_main_delete(control_main_t * const main);
+  extern f_status_t control_main_delete(fll_program_data_t * const main);
 #endif // _di_control_main_delete_
 
 #ifdef __cplusplus
index ce3bd6e3f10688bf76378a0aaae5c9891d8caa19..7e6c8dacc4cbf9968ad5e362cd7836d95f830d52 100644 (file)
@@ -8,7 +8,7 @@ extern "C" {
 #endif
 
 #ifndef _di_control_print_help_
-  f_status_t control_print_help(control_main_t * const main) {
+  f_status_t control_print_help(fll_program_data_t * const main) {
 
     flockfile(main->output.to.stream);
 
@@ -47,7 +47,7 @@ extern "C" {
 #endif // _di_control_print_help_
 
 #ifndef _di_control_main_
-  f_status_t control_main(control_main_t * const main, const f_console_arguments_t *arguments) {
+  f_status_t control_main(fll_program_data_t * const main, const f_console_arguments_t *arguments) {
 
     f_status_t status = F_none;
 
@@ -59,7 +59,7 @@ extern "C" {
       f_console_parameter_id_t ids[3] = { control_parameter_no_color_e, control_parameter_light_e, control_parameter_dark_e };
       const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
 
-      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
+      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->context);
 
       main->output.set = &main->context.set;
       main->error.set = &main->context.set;
@@ -187,16 +187,16 @@ extern "C" {
 
         status = F_status_set_error(F_supported_not);
       }
-      else if (main->remaining.used) {
+      else if (main->parameters.remaining.used) {
         control_data_t data = control_data_t_initialize;
         data.argv = main->parameters.arguments.array;
 
         // Verify commands before attempting to connect to the socket.
-        if (control_command_identify(main, &data, data.argv[main->remaining.array[0]]) == F_found) {
+        if (control_command_identify(main, &data, data.argv[main->parameters.remaining.array[0]]) == F_found) {
           status = control_command_verify(main, &data);
         }
         else {
-          control_print_error_parameter_command_not(main, data.argv[main->remaining.array[0]]);
+          control_print_error_parameter_command_not(main, data.argv[main->parameters.remaining.array[0]]);
 
           status = F_status_set_error(F_parameter);
         }
index 7818e63c2cd7a49b0ca9baec6dc6c61e396d57ad..281594a7ea9a7852c07190a8b18c1ef99e381243 100644 (file)
@@ -63,7 +63,7 @@ extern "C" {
  * @see control_main()
  */
 #ifndef _di_control_print_help_
-  extern f_status_t control_print_help(control_main_t * const main);
+  extern f_status_t control_print_help(fll_program_data_t * const main);
 #endif // _di_control_print_help_
 
 /**
@@ -94,7 +94,7 @@ extern "C" {
  * @see control_main_delete()
  */
 #ifndef _di_control_main_
-  extern f_status_t control_main(control_main_t * const main, const f_console_arguments_t *arguments);
+  extern f_status_t control_main(fll_program_data_t * const main, const f_console_arguments_t *arguments);
 #endif // _di_control_main_
 
 #ifdef __cplusplus
index 1375ecc2180d9ddaf266d2e2676e4a8f5762458c..a439f5f311c9f846a2c1159537960a122c9596c0 100644 (file)
@@ -3,7 +3,7 @@
 int main(const int argc, const f_string_t *argv) {
 
   const f_console_arguments_t arguments = { argc, argv };
-  control_main_t data = control_main_initialize;
+  fll_program_data_t data = fll_program_data_t_initialize;
 
   if (f_pipe_input_exists()) {
     data.process_pipe = F_true;
index 46e6f8a8b2ac11d7d7dc4506634a25bfba292b94..295bedffcfc8b7af859d7451a53a8be7cc234a6f 100644 (file)
@@ -47,7 +47,7 @@ extern "C" {
 #endif // _di_control_data_delete_
 
 #ifndef _di_control_signal_received_
-  f_status_t control_signal_received(control_main_t * const main) {
+  f_status_t control_signal_received(fll_program_data_t * const main) {
 
     if (main->signal.id == -1) {
       return F_false;
@@ -88,7 +88,7 @@ extern "C" {
       return F_interrupt_not;
     }
 
-    control_main_t * const main = (control_main_t *) state_ptr->custom;
+    fll_program_data_t * const main = (fll_program_data_t *) state_ptr->custom;
 
     if (!((++main->signal_check) % control_signal_check_d)) {
       if (control_signal_received(main)) {
index f03e6245f668671673c633b094983d31b11747dd..dcfea3aeb05567be46f0f2a98b427a82db9f4262 100644 (file)
@@ -239,7 +239,7 @@ extern "C" {
  * command: The command type code.
  * cache:   A cache.
  * socket:  A socket used to connect to the controller.
- * argv:    The argument structure in control_main_t.parameters for simplifying syntax.
+ * argv:    The argument structure in fll_program_data_t.parameters for simplifying syntax.
  */
 #ifndef _di_control_data_t_
   typedef struct {
@@ -286,7 +286,7 @@ extern "C" {
  * @see f_signal_read()
  */
 #ifndef _di_control_signal_received_
-  extern f_status_t control_signal_received(control_main_t * const main) F_attribute_visibility_internal_d;
+  extern f_status_t control_signal_received(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_control_signal_received_
 
 /**
index 5d2846a3699a4654b21a2980f7854366470a2f8d..eaa6e04170de49ef652ab0ef1e3c8ee62c72cdfb 100644 (file)
@@ -8,7 +8,7 @@ extern "C" {
 #endif
 
 #ifndef _di_control_command_identify_
-  f_status_t control_command_identify(control_main_t * const main, control_data_t * const data, const f_string_static_t command) {
+  f_status_t control_command_identify(fll_program_data_t * const main, control_data_t * const data, const f_string_static_t command) {
 
     if (fl_string_dynamic_compare(command, control_freeze_s) == F_equal_to) {
       data->command = control_command_type_freeze_e;
@@ -87,7 +87,7 @@ extern "C" {
 #endif // _di_control_command_identify_
 
 #ifndef _di_control_command_verify_
-  f_status_t control_command_verify(control_main_t * const main, control_data_t * const data) {
+  f_status_t control_command_verify(fll_program_data_t * const main, control_data_t * const data) {
 
     switch (data->command) {
       case control_command_type_freeze_e:
@@ -100,31 +100,31 @@ extern "C" {
       case control_command_type_start_e:
       case control_command_type_stop_e:
       case control_command_type_thaw_e:
-        if (main->remaining.used < 2) {
-          control_print_error_parameter_command_rule_not(main, data->argv[main->remaining.array[0]]);
+        if (main->parameters.remaining.used < 2) {
+          control_print_error_parameter_command_rule_not(main, data->argv[main->parameters.remaining.array[0]]);
 
           return F_status_set_error(F_parameter);
         }
-        else if (main->remaining.used > 3) {
-          control_print_error_parameter_command_rule_too_many(main, data->argv[main->remaining.array[0]]);
+        else if (main->parameters.remaining.used > 3) {
+          control_print_error_parameter_command_rule_too_many(main, data->argv[main->parameters.remaining.array[0]]);
 
           return F_status_set_error(F_parameter);
         }
 
-        if (!data->argv[main->remaining.array[1]].used) {
-          if (main->remaining.used == 2) {
-            control_print_error_parameter_command_rule_empty(main, data->argv[main->remaining.array[0]]);
+        if (!data->argv[main->parameters.remaining.array[1]].used) {
+          if (main->parameters.remaining.used == 2) {
+            control_print_error_parameter_command_rule_empty(main, data->argv[main->parameters.remaining.array[0]]);
           }
           else {
-            control_print_error_parameter_command_rule_directory_empty(main, data->argv[main->remaining.array[0]]);
+            control_print_error_parameter_command_rule_directory_empty(main, data->argv[main->parameters.remaining.array[0]]);
           }
 
           return F_status_set_error(F_parameter);
         }
 
-        if (main->remaining.used == 3) {
-          if (!data->argv[main->remaining.array[2]].used) {
-            control_print_error_parameter_command_rule_basename_empty(main, data->argv[main->remaining.array[0]]);
+        if (main->parameters.remaining.used == 3) {
+          if (!data->argv[main->parameters.remaining.array[2]].used) {
+            control_print_error_parameter_command_rule_basename_empty(main, data->argv[main->parameters.remaining.array[0]]);
 
             return F_status_set_error(F_parameter);
           }
@@ -146,7 +146,7 @@ extern "C" {
 #endif // _di_control_command_verify_
 
 #ifndef _di_control_settings_load_
-  f_status_t control_settings_load(control_main_t * const main, control_data_t * const data) {
+  f_status_t control_settings_load(fll_program_data_t * const main, control_data_t * const data) {
 
     f_status_t status = F_none;
 
index 3481458d3ceca368d919a9a15eb093c23fff558f..ef1cc9767325cf4029c23b40a4491f48d0350634 100644 (file)
@@ -28,7 +28,7 @@ extern "C" {
  *   F_found_not if name is unknown.
  */
 #ifndef _di_control_command_identify_
-  extern f_status_t control_command_identify(control_main_t * const main, control_data_t * const data, const f_string_static_t command) F_attribute_visibility_internal_d;
+  extern f_status_t control_command_identify(fll_program_data_t * const main, control_data_t * const data, const f_string_static_t command) F_attribute_visibility_internal_d;
 #endif // _di_control_command_identify_
 
 /**
@@ -40,7 +40,7 @@ extern "C" {
  *   The control data.
  */
 #ifndef _di_control_command_verify_
-  extern f_status_t control_command_verify(control_main_t * const main, control_data_t * const data) F_attribute_visibility_internal_d;
+  extern f_status_t control_command_verify(fll_program_data_t * const main, control_data_t * const data) F_attribute_visibility_internal_d;
 #endif // _di_control_command_verify_
 /**
  * Load and process the control settings file.
@@ -87,7 +87,7 @@ extern "C" {
  * @see fll_fss_extended_read()
  */
 #ifndef _di_control_settings_load_
-  extern f_status_t control_settings_load(control_main_t * const main, control_data_t * const data) F_attribute_visibility_internal_d;
+  extern f_status_t control_settings_load(fll_program_data_t * const main, control_data_t * const data) F_attribute_visibility_internal_d;
 #endif // _di_control_settings_load_
 
 #ifdef __cplusplus
index 69b7a9d9cc1bd5127ea93275883a15dd829befcf..8288b99eb97f7ea98d9ab71c9b2f9a2159dc00bf 100644 (file)
@@ -7,7 +7,7 @@ extern "C" {
 #endif
 
 #ifndef _di_control_print_error_parameter_command_not_
-  void control_print_error_parameter_command_not(control_main_t * const main, const f_string_static_t command) {
+  void control_print_error_parameter_command_not(fll_program_data_t * const main, const f_string_static_t command) {
 
     if (main->error.verbosity == f_console_verbosity_quiet_e) return;
 
@@ -22,7 +22,7 @@ extern "C" {
 #endif // _di_control_print_error_parameter_command_not_
 
 #ifndef _di_control_print_error_parameter_command_rule_basename_empty_
-  void control_print_error_parameter_command_rule_basename_empty(control_main_t * const main, const f_string_static_t command) {
+  void control_print_error_parameter_command_rule_basename_empty(fll_program_data_t * const main, const f_string_static_t command) {
 
     if (main->error.verbosity == f_console_verbosity_quiet_e) return;
 
@@ -37,7 +37,7 @@ extern "C" {
 #endif // _di_control_print_error_parameter_command_rule_basename_empty_
 
 #ifndef _di_control_print_error_parameter_command_rule_directory_empty_
-  void control_print_error_parameter_command_rule_directory_empty(control_main_t * const main, const f_string_static_t command) {
+  void control_print_error_parameter_command_rule_directory_empty(fll_program_data_t * const main, const f_string_static_t command) {
 
     if (main->error.verbosity == f_console_verbosity_quiet_e) return;
 
@@ -52,7 +52,7 @@ extern "C" {
 #endif // _di_control_print_error_parameter_command_rule_directory_empty_
 
 #ifndef _di_control_print_error_parameter_command_rule_empty_
-  void control_print_error_parameter_command_rule_empty(control_main_t * const main, const f_string_static_t command) {
+  void control_print_error_parameter_command_rule_empty(fll_program_data_t * const main, const f_string_static_t command) {
 
     if (main->error.verbosity == f_console_verbosity_quiet_e) return;
 
@@ -67,7 +67,7 @@ extern "C" {
 #endif // _di_control_print_error_parameter_command_rule_empty_
 
 #ifndef _di_control_print_error_parameter_command_rule_not_
-  void control_print_error_parameter_command_rule_not(control_main_t * const main, const f_string_static_t command) {
+  void control_print_error_parameter_command_rule_not(fll_program_data_t * const main, const f_string_static_t command) {
 
     if (main->error.verbosity == f_console_verbosity_quiet_e) return;
 
@@ -82,7 +82,7 @@ extern "C" {
 #endif // _di_control_print_error_parameter_command_rule_not_
 
 #ifndef _di_control_print_error_parameter_command_rule_too_many_
-  void control_print_error_parameter_command_rule_too_many(control_main_t * const main, const f_string_static_t command) {
+  void control_print_error_parameter_command_rule_too_many(fll_program_data_t * const main, const f_string_static_t command) {
 
     if (main->error.verbosity == f_console_verbosity_quiet_e) return;
 
@@ -97,7 +97,7 @@ extern "C" {
 #endif // _di_control_print_error_parameter_command_rule_too_many_
 
 #ifndef _di_control_print_error_commands_none_
-  void control_print_error_commands_none(control_main_t * const main) {
+  void control_print_error_commands_none(fll_program_data_t * const main) {
 
     if (main->error.verbosity == f_console_verbosity_quiet_e) return;
 
@@ -106,7 +106,7 @@ extern "C" {
 #endif // _di_control_print_error_commands_none_
 
 #ifndef _di_control_print_error_parameter_value_empty_
-  void control_print_error_parameter_value_empty(control_main_t * const main, const f_string_static_t parameter) {
+  void control_print_error_parameter_value_empty(fll_program_data_t * const main, const f_string_static_t parameter) {
 
     if (main->error.verbosity == f_console_verbosity_quiet_e) return;
 
@@ -121,7 +121,7 @@ extern "C" {
 #endif // _di_control_print_error_parameter_value_empty_
 
 #ifndef _di_control_print_error_parameter_value_not_
-  void control_print_error_parameter_value_not(control_main_t * const main, const f_string_static_t parameter) {
+  void control_print_error_parameter_value_not(fll_program_data_t * const main, const f_string_static_t parameter) {
 
     if (main->error.verbosity == f_console_verbosity_quiet_e) return;
 
@@ -136,7 +136,7 @@ extern "C" {
 #endif // _di_control_print_error_parameter_value_not_
 
 #ifndef _di_control_print_error_pipe_supported_not_
-  void control_print_error_pipe_supported_not(control_main_t * const main) {
+  void control_print_error_pipe_supported_not(fll_program_data_t * const main) {
 
     if (main->error.verbosity == f_console_verbosity_quiet_e) return;
 
@@ -145,7 +145,7 @@ extern "C" {
 #endif // _di_control_print_error_pipe_supported_not_
 
 #ifndef _di_control_print_error_socket_file_failed_
-  void control_print_error_socket_file_failed(control_main_t * const main, const f_string_static_t path_socket) {
+  void control_print_error_socket_file_failed(fll_program_data_t * const main, const f_string_static_t path_socket) {
 
     if (main->error.verbosity == f_console_verbosity_quiet_e) return;
 
@@ -160,7 +160,7 @@ extern "C" {
 #endif // _di_control_print_error_socket_file_failed_
 
 #ifndef _di_control_print_error_socket_file_missing_
-  void control_print_error_socket_file_missing(control_main_t * const main, const f_string_static_t path_socket) {
+  void control_print_error_socket_file_missing(fll_program_data_t * const main, const f_string_static_t path_socket) {
 
     if (main->error.verbosity == f_console_verbosity_quiet_e) return;
 
@@ -175,7 +175,7 @@ extern "C" {
 #endif // _di_control_print_error_socket_file_missing_
 
 #ifndef _di_control_print_error_socket_file_not_
-  void control_print_error_socket_file_not(control_main_t * const main, const f_string_static_t path_socket) {
+  void control_print_error_socket_file_not(fll_program_data_t * const main, const f_string_static_t path_socket) {
 
     if (main->error.verbosity == f_console_verbosity_quiet_e) return;
 
@@ -190,7 +190,7 @@ extern "C" {
 #endif // _di_control_print_error_socket_file_not_
 
 #ifndef _di_control_print_signal_received_
-  void control_print_signal_received(control_main_t * const main, const f_status_t signal) {
+  void control_print_signal_received(fll_program_data_t * const main, const f_status_t signal) {
 
     if (main->warning.verbosity != f_console_verbosity_verbose_e) return;
 
index 24f435ac943dd2fe37ef50c3440288ca93f4f5e4..ddba1f4c8d5e698ae8ecd8f42755500a8f0a0e4f 100644 (file)
@@ -21,7 +21,7 @@ extern "C" {
  *   The parameter representing a command.
  */
 #ifndef _di_control_print_error_parameter_command_not_
-  extern void control_print_error_parameter_command_not(control_main_t * const main, const f_string_static_t command) F_attribute_visibility_internal_d;
+  extern void control_print_error_parameter_command_not(fll_program_data_t * const main, const f_string_static_t command) F_attribute_visibility_internal_d;
 #endif // _di_control_print_error_parameter_command_not_
 
 /**
@@ -33,7 +33,7 @@ extern "C" {
  *   The parameter representing a command.
  */
 #ifndef _di_control_print_error_parameter_command_rule_basename_empty_
-  extern void control_print_error_parameter_command_rule_basename_empty(control_main_t * const main, const f_string_static_t command) F_attribute_visibility_internal_d;
+  extern void control_print_error_parameter_command_rule_basename_empty(fll_program_data_t * const main, const f_string_static_t command) F_attribute_visibility_internal_d;
 #endif // _di_control_print_error_parameter_command_rule_basename_empty_
 
 /**
@@ -45,7 +45,7 @@ extern "C" {
  *   The parameter representing a command.
  */
 #ifndef _di_control_print_error_parameter_command_rule_directory_empty_
-  extern void control_print_error_parameter_command_rule_directory_empty(control_main_t * const main, const f_string_static_t command) F_attribute_visibility_internal_d;
+  extern void control_print_error_parameter_command_rule_directory_empty(fll_program_data_t * const main, const f_string_static_t command) F_attribute_visibility_internal_d;
 #endif // _di_control_print_error_parameter_command_rule_directory_empty_
 
 /**
@@ -57,7 +57,7 @@ extern "C" {
  *   The parameter representing a command.
  */
 #ifndef _di_control_print_error_parameter_command_rule_empty_
-  extern void control_print_error_parameter_command_rule_empty(control_main_t * const main, const f_string_static_t command) F_attribute_visibility_internal_d;
+  extern void control_print_error_parameter_command_rule_empty(fll_program_data_t * const main, const f_string_static_t command) F_attribute_visibility_internal_d;
 #endif // _di_control_print_error_parameter_command_rule_empty_
 
 /**
@@ -69,7 +69,7 @@ extern "C" {
  *   The parameter representing a command.
  */
 #ifndef _di_control_print_error_parameter_command_rule_not_
-  extern void control_print_error_parameter_command_rule_not(control_main_t * const main, const f_string_static_t command) F_attribute_visibility_internal_d;
+  extern void control_print_error_parameter_command_rule_not(fll_program_data_t * const main, const f_string_static_t command) F_attribute_visibility_internal_d;
 #endif // _di_control_print_error_parameter_command_rule_not_
 
 /**
@@ -81,7 +81,7 @@ extern "C" {
  *   The parameter representing a command.
  */
 #ifndef _di_control_print_error_parameter_command_rule_too_many_
-  extern void control_print_error_parameter_command_rule_too_many(control_main_t * const main, const f_string_static_t command) F_attribute_visibility_internal_d;
+  extern void control_print_error_parameter_command_rule_too_many(fll_program_data_t * const main, const f_string_static_t command) F_attribute_visibility_internal_d;
 #endif // _di_control_print_error_parameter_command_rule_too_many_
 
 /**
@@ -91,7 +91,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_control_print_error_commands_none_
-  extern void control_print_error_commands_none(control_main_t * const main) F_attribute_visibility_internal_d;
+  extern void control_print_error_commands_none(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_control_print_error_commands_none_
 
 /**
@@ -103,7 +103,7 @@ extern "C" {
  *   The parameter name.
  */
 #ifndef _di_control_print_error_parameter_value_empty_
-  extern void control_print_error_parameter_value_empty(control_main_t * const main, const f_string_static_t parameter) F_attribute_visibility_internal_d;
+  extern void control_print_error_parameter_value_empty(fll_program_data_t * const main, const f_string_static_t parameter) F_attribute_visibility_internal_d;
 #endif // _di_control_print_error_parameter_value_empty_
 
 /**
@@ -115,7 +115,7 @@ extern "C" {
  *   The parameter name.
  */
 #ifndef _di_control_print_error_parameter_value_not_
-  extern void control_print_error_parameter_value_not(control_main_t * const main, const f_string_static_t parameter) F_attribute_visibility_internal_d;
+  extern void control_print_error_parameter_value_not(fll_program_data_t * const main, const f_string_static_t parameter) F_attribute_visibility_internal_d;
 #endif // _di_control_print_error_parameter_value_not_
 
 /**
@@ -125,7 +125,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_control_print_error_pipe_supported_not_
-  extern void control_print_error_pipe_supported_not(control_main_t * const main) F_attribute_visibility_internal_d;
+  extern void control_print_error_pipe_supported_not(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_control_print_error_pipe_supported_not_
 
 /**
@@ -137,7 +137,7 @@ extern "C" {
  *   The socket file path.
  */
 #ifndef _di_control_print_error_socket_file_failed_
-  extern void control_print_error_socket_file_failed(control_main_t * const main, const f_string_static_t path_socket) F_attribute_visibility_internal_d;
+  extern void control_print_error_socket_file_failed(fll_program_data_t * const main, const f_string_static_t path_socket) F_attribute_visibility_internal_d;
 #endif // _di_control_print_error_socket_file_failed_
 
 /**
@@ -149,7 +149,7 @@ extern "C" {
  *   The socket file path.
  */
 #ifndef _di_control_print_error_socket_file_missing_
-  extern void control_print_error_socket_file_missing(control_main_t * const main, const f_string_static_t path_socket) F_attribute_visibility_internal_d;
+  extern void control_print_error_socket_file_missing(fll_program_data_t * const main, const f_string_static_t path_socket) F_attribute_visibility_internal_d;
 #endif // _di_control_print_error_socket_file_missing_
 
 /**
@@ -161,7 +161,7 @@ extern "C" {
  *   The socket file path.
  */
 #ifndef _di_control_print_error_socket_file_not_
-  extern void control_print_error_socket_file_not(control_main_t * const main, const f_string_static_t path_socket) F_attribute_visibility_internal_d;
+  extern void control_print_error_socket_file_not(fll_program_data_t * const main, const f_string_static_t path_socket) F_attribute_visibility_internal_d;
 #endif // _di_control_print_error_socket_file_not_
 
 /**
@@ -173,7 +173,7 @@ extern "C" {
  *   The signal received.
  */
 #ifndef _di_control_print_signal_received_
-  extern void control_print_signal_received(control_main_t * const main, const f_status_t signal) F_attribute_visibility_internal_d;
+  extern void control_print_signal_received(fll_program_data_t * const main, const f_status_t signal) F_attribute_visibility_internal_d;
 #endif // _di_control_print_signal_received_
 
 #ifdef __cplusplus
index 2d35cedee597fc21eeb774e68f2809a9fb410a7e..aed3165a8abe535b4000e4fab557b50f0dd3b21a 100644 (file)
@@ -28,7 +28,9 @@ extern "C" {
   const f_string_static_t controller_path_socket_init_s = macro_f_string_static_t_initialize(CONTROLLER_path_socket_init_s, 0, CONTROLLER_path_socket_s_length);
   const f_string_static_t controller_path_socket_prefix_s = macro_f_string_static_t_initialize(CONTROLLER_path_socket_prefix_s, 0, CONTROLLER_path_socket_prefix_s_length);
   const f_string_static_t controller_path_socket_suffix_s = macro_f_string_static_t_initialize(CONTROLLER_path_socket_suffix_s, 0, CONTROLLER_path_socket_suffix_s_length);
+#endif // _di_controller_defines_
 
+#ifndef _di_controller_parameters_
   const f_string_static_t controller_short_cgroup_s = macro_f_string_static_t_initialize(CONTROLLER_short_cgroup_s, 0, CONTROLLER_short_cgroup_s_length);
   const f_string_static_t controller_short_daemon_s = macro_f_string_static_t_initialize(CONTROLLER_short_daemon_s, 0, CONTROLLER_short_daemon_s_length);
   const f_string_static_t controller_short_init_s = macro_f_string_static_t_initialize(CONTROLLER_short_init_s, 0, CONTROLLER_short_init_s_length);
@@ -50,14 +52,13 @@ extern "C" {
   const f_string_static_t controller_long_socket_s = macro_f_string_static_t_initialize(CONTROLLER_long_socket_s, 0, CONTROLLER_long_socket_s_length);
   const f_string_static_t controller_long_uninterruptible_s = macro_f_string_static_t_initialize(CONTROLLER_long_uninterruptible_s, 0, CONTROLLER_long_uninterruptible_s_length);
   const f_string_static_t controller_long_validate_s = macro_f_string_static_t_initialize(CONTROLLER_long_validate_s, 0, CONTROLLER_long_validate_s_length);
-#endif // _di_controller_defines_
+#endif // _di_controller_parameters_
 
 #ifndef _di_controller_main_delete_
   f_status_t controller_main_delete(controller_main_t * const main) {
 
     f_console_parameters_delete(&main->parameters);
 
-    f_type_array_lengths_resize(0, &main->remaining);
     macro_f_color_context_t_delete_simple(main->context);
 
     return F_none;
index fdb48217e2ff28eb047c303b526b035be75a5439..20bc76f5bba50607bb57de4f6e818219860c04a2 100644 (file)
@@ -16,6 +16,9 @@
 extern "C" {
 #endif
 
+/**
+ * The program version.
+ */
 #ifndef _di_controller_program_version_
   #define CONTROLLER_program_version_major_s F_string_ascii_0_s
   #define CONTROLLER_program_version_minor_s F_string_ascii_5_s
@@ -42,6 +45,9 @@ extern "C" {
   extern const f_string_static_t controller_program_version_s;
 #endif // _di_controller_program_version_
 
+/**
+ * The program name.
+ */
 #ifndef _di_controller_program_name_
   #define CONTROLLER_program_name_s      "controller"
   #define CONTROLLER_program_name_long_s "Controller Program"
@@ -62,6 +68,9 @@ extern "C" {
   extern const f_string_static_t controller_program_name_init_long_s;
 #endif // _di_controller_program_name_
 
+/**
+ * The program defines.
+ */
 #ifndef _di_controller_defines_
 
   // The pid path is a system-specific path and needs to be more easily contolled at compile time.
@@ -191,7 +200,12 @@ extern "C" {
   extern const f_string_static_t controller_path_socket_init_s;
   extern const f_string_static_t controller_path_socket_prefix_s;
   extern const f_string_static_t controller_path_socket_suffix_s;
+#endif // _di_controller_defines_
 
+/**
+ * The main program parameters.
+ */
+#ifndef _di_controller_parameters_
   #define CONTROLLER_short_cgroup_s          "c"
   #define CONTROLLER_short_daemon_s          "d"
   #define CONTROLLER_short_init_s            "I"
@@ -305,13 +319,26 @@ extern "C" {
     }
 
   #define controller_total_parameters_d 19
-#endif // _di_controller_defines_
+#endif // _di_controller_parameters_
 
+/**
+ * The main program data.
+ *
+ * parameters:   The state of pre-defined parameters passed to the program.
+ * remaining:    The remaining, non-pre-defined parameters, passed to the program.
+ * process_pipe: Designate whether or not to process the input pipe.
+ * output:       The output file for general printing.
+ * error:        The output file for error printing.
+ * warning:      The output file for warning printing.
+ * signal:       The process signal management structure.
+ * context:      The color context.
+ *
+ * @todo
+ */
 #ifndef _di_controller_main_t_
   typedef struct {
     f_console_parameters_t parameters;
 
-    f_array_lengths_t remaining;
     bool process_pipe;
     bool as_init;
 
@@ -337,7 +364,6 @@ extern "C" {
   #define controller_main_t_initialize \
     { \
       f_console_parameters_t_initialize, \
-      f_array_lengths_t_initialize, \
       F_false, \
       F_false, \
       fl_print_t_initialize, \
index 78b0b4684ac8efe9ff6d88e00e29e5b5a7a18009..3cba463b9a121b988a3914d0665fdd289f76dd88 100644 (file)
@@ -76,7 +76,7 @@ extern "C" {
       f_console_parameter_id_t ids[3] = { controller_parameter_no_color_e, controller_parameter_light_e, controller_parameter_dark_e };
       const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
 
-      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
+      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->context);
 
       main->output.set = &main->context.set;
       main->error.set = &main->context.set;
@@ -180,8 +180,8 @@ extern "C" {
 
     memset(&address, 0, setting.control_socket.length);
 
-    if (main->remaining.used) {
-      status = f_string_dynamic_append(argv[main->remaining.array[0]], &setting.name_entry);
+    if (main->parameters.remaining.used) {
+      status = f_string_dynamic_append(argv[main->parameters.remaining.array[0]], &setting.name_entry);
     }
     else {
       status = f_string_dynamic_append(controller_default_s, &setting.name_entry);
index 433fd8ddc5c887a5f7acecc4d21f394bb90f694e..d681c1363ccf14398c628b4640c3bf99c73fd300 100644 (file)
@@ -78,7 +78,7 @@ extern "C" {
   const f_string_static_t fake_build_version_nano_s = macro_f_string_static_t_initialize(FAKE_build_version_nano_s, 0, FAKE_build_version_nano_s_length);
 #endif // _di_fake_build_version_
 
-#ifndef _di_fake_defines_
+#ifndef _di_fake_parameters_
   const f_string_static_t fake_short_define_s = macro_f_string_static_t_initialize(FAKE_short_define_s, 0, FAKE_short_define_s_length);
   const f_string_static_t fake_short_fakefile_s = macro_f_string_static_t_initialize(FAKE_short_fakefile_s, 0, FAKE_short_fakefile_s_length);
   const f_string_static_t fake_short_mode_s = macro_f_string_static_t_initialize(FAKE_short_mode_s, 0, FAKE_short_mode_s_length);
@@ -112,15 +112,13 @@ extern "C" {
   const f_string_static_t fake_other_operation_clean_s = macro_f_string_static_t_initialize(FAKE_other_operation_clean_s, 0, FAKE_other_operation_clean_s_length);
   const f_string_static_t fake_other_operation_make_s = macro_f_string_static_t_initialize(FAKE_other_operation_make_s, 0, FAKE_other_operation_make_s_length);
   const f_string_static_t fake_other_operation_skeleton_s = macro_f_string_static_t_initialize(FAKE_other_operation_skeleton_s, 0, FAKE_other_operation_skeleton_s_length);
-#endif // _di_fake_defines_
+#endif // _di_fake_parameters_
 
 #ifndef _di_fake_main_delete_
   f_status_t fake_main_delete(fake_main_t * const main) {
 
     f_console_parameters_delete(&main->parameters);
 
-    f_type_array_lengths_resize(0, &main->remaining);
-
     f_string_dynamics_resize(0, &main->define);
     f_string_dynamic_resize(0, &main->fakefile);
     f_string_dynamics_resize(0, &main->mode);
index 5c1e06d963c9636c32225edfca95c456644ad8ea..2c9b072d018e89bbc728bf8ecd0d8ccdd670878e 100644 (file)
@@ -16,6 +16,9 @@
 extern "C" {
 #endif
 
+/**
+ * The program version.
+ */
 #ifndef _di_fake_program_version_
   #define FAKE_program_version_major_s F_string_ascii_0_s
   #define FAKE_program_version_minor_s F_string_ascii_5_s
@@ -42,6 +45,9 @@ extern "C" {
   extern const f_string_static_t fake_program_version_s;
 #endif // _di_fake_program_version_
 
+/**
+ * The program name.
+ */
 #ifndef _di_fake_program_name_
   #define FAKE_program_name_s      "fake"
   #define FAKE_program_name_long_s "Featureless Make"
@@ -53,6 +59,9 @@ extern "C" {
   extern const f_string_static_t fake_program_name_long_s;
 #endif // _di_fake_program_name_
 
+/**
+ * The program help related data.
+ */
 #ifndef _di_fake_program_help_parameters_
   #define FAKE_program_help_parameters_s "operation"
   #define FAKE_program_help_parameters_s_length 9
@@ -130,6 +139,9 @@ extern "C" {
   extern const f_string_static_t fake_path_part_static_s;
 #endif // _di_fake_path_
 
+/**
+ * The file settings.
+ */
 #ifndef _di_fake_file_
   #define FAKE_file_defines_s      "defines"
   #define FAKE_file_dependencies_s "dependencies"
@@ -188,6 +200,9 @@ extern "C" {
   extern const f_string_static_t fake_default_settings_s;
 #endif // _di_fake_defaults_
 
+/**
+ * The build languages.
+ */
 #ifndef _di_fake_build_language_
   enum {
     fake_build_language_type_bash_e = 1,
@@ -208,6 +223,9 @@ extern "C" {
   extern const f_string_static_t fake_build_language_cpp_s;
 #endif // _di_fake_build_language_
 
+/**
+ * The program version.
+ */
 #ifndef _di_fake_build_version_
   enum {
     fake_build_version_type_major_e = 1,
@@ -232,6 +250,9 @@ extern "C" {
   extern const f_string_static_t fake_build_version_nano_s;
 #endif // _di_fake_build_version_
 
+/**
+ * The program defines.
+ */
 #ifndef _di_fake_defines_
   enum {
     fake_operation_build_e = 1,
@@ -246,7 +267,12 @@ extern "C" {
 
   #define fake_operations_total_d    4
   #define fake_operations_initialize { 0, 0, 0, 0 }
+#endif // _di_fake_defines_
 
+/**
+ * The main program parameters.
+ */
+#ifndef _di_fake_parameters_
   #define FAKE_short_define_s   "d"
   #define FAKE_short_fakefile_s "f"
   #define FAKE_short_mode_s     "m"
@@ -418,13 +444,24 @@ extern "C" {
     }
 
   #define fake_total_parameters_d 28
-#endif // _di_fake_defines_
-
+#endif // _di_fake_parameters_
+/**
+ * The main program data.
+ *
+ * parameters:   The state of pre-defined parameters passed to the program.
+ * process_pipe: Designate whether or not to process the input pipe.
+ * output:       The output file for general printing.
+ * error:        The output file for error printing.
+ * warning:      The output file for warning printing.
+ * signal:       The process signal management structure.
+ * context:      The color context.
+ *
+ * @todo
+ */
 #ifndef _di_fake_main_t_
   typedef struct {
     f_console_parameters_t parameters;
 
-    f_array_lengths_t remaining;
     bool process_pipe;
 
     fl_print_t output;
@@ -500,7 +537,6 @@ extern "C" {
   #define fake_main_t_initialize \
     { \
       f_console_parameters_t_initialize, \
-      f_array_lengths_t_initialize, \
       F_false, \
       fl_print_t_initialize, \
       macro_fl_print_t_initialize_error(), \
index 57064a21e8f99332d4e54dd83861e6c8e4fab108..7d5bc49d85bd676734237efc4b546140a678cd37 100644 (file)
@@ -97,7 +97,7 @@ extern "C" {
       f_console_parameter_id_t ids[3] = { fake_parameter_no_color_e, fake_parameter_light_e, fake_parameter_dark_e };
       const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
 
-      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
+      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->context);
 
       main->output.set = &main->context.set;
       main->error.set = &main->context.set;
index 75c128bf31571d495254c0b4e8f1b54a4e13c69e..11a0112868b43abf0688876659609627c9af2254 100644 (file)
@@ -109,7 +109,6 @@ extern "C" {
     f_console_parameters_delete(&main->parameters);
 
     f_string_dynamics_resize(0, &main->chains);
-    f_type_array_lengths_resize(0, &main->remaining);
     f_string_dynamics_resize(0, &main->devices);
 
     macro_f_color_context_t_delete_simple(main->context);
index 2e3cf5d67c6f93014ca6640acca14ef0d57d2ca1..b111829b506d74aaa844f32d2b7823417e9645b8 100644 (file)
@@ -16,6 +16,9 @@
 extern "C" {
 #endif
 
+/**
+ * The program version.
+ */
 #ifndef _di_firewall_program_version_
   #define FIREWALL_program_version_major_s F_string_ascii_0_s
   #define FIREWALL_program_version_minor_s F_string_ascii_5_s
@@ -42,6 +45,9 @@ extern "C" {
   extern const f_string_static_t firewall_program_version_s;
 #endif // _di_firewall_program_version_
 
+/**
+ * The program name.
+ */
 #ifndef _di_firewall_program_name_
   #define FIREWALL_program_name_s      "firewall"
   #define FIREWALL_program_name_long_s "Kevux Firewall Manager"
@@ -53,6 +59,9 @@ extern "C" {
   extern const f_string_static_t firewall_program_name_long_s;
 #endif // _di_firewall_program_name_
 
+/**
+ * The program help related data.
+ */
 #ifndef _di_firewall_program_help_parameters_
   #define FIREWALL_program_help_parameters_s "command"
   #define FIREWALL_program_help_parameters_s_length 7
@@ -60,6 +69,9 @@ extern "C" {
   extern const f_string_static_t firewall_program_help_parameters_s;
 #endif // _di_firewall_program_help_parameters_
 
+/**
+ * The program paths.
+ */
 #ifndef _di_firewall_paths_
   #define FIREWALL_file_first_s  "firewall-first"
   #define FIREWALL_file_last_s   "firewall-last"
@@ -86,13 +98,24 @@ extern "C" {
   extern const f_string_static_t firewall_network_devices_s;
 #endif // _di_firewall_paths_
 
+/**
+ * Default allocations.
+ */
 #ifndef _di_firewall_default_allocation_step_
   #define firewall_default_allocation_step_d F_memory_default_allocation_small_d
 #endif // _di_firewall_default_allocation_step_
 
+/**
+ * The program defines.
+ */
 #ifndef _di_firewall_defines_
   #define firewall_signal_check_d 10000
+#endif // _di_firewall_defines_
 
+/**
+ * The main program parameters.
+ */
+#ifndef _di_firewall_parameters_
   #define FIREWALL_action_s        "action"
   #define FIREWALL_action_append_s "append"
   #define FIREWALL_action_insert_s "insert"
@@ -379,11 +402,23 @@ extern "C" {
   #define firewall_total_parameters_d 14
 #endif // _di_firewall_defines_
 
+/**
+ * The main program data.
+ *
+ * parameters:   The state of pre-defined parameters passed to the program.
+ * process_pipe: Designate whether or not to process the input pipe.
+ * output:       The output file for general printing.
+ * error:        The output file for error printing.
+ * warning:      The output file for warning printing.
+ * signal:       The process signal management structure.
+ * context:      The color context.
+ *
+ * @todo
+ */
 #ifndef _di_firewall_main_t_
   typedef struct {
     f_console_parameters_t parameters;
 
-    f_array_lengths_t remaining;
     bool process_pipe;
     int child;
 
@@ -402,7 +437,6 @@ extern "C" {
   #define firewall_main_t_initialize \
     { \
       f_console_parameters_t_initialize, \
-      f_array_lengths_t_initialize, \
       F_false, \
       0, \
       fl_print_t_initialize, \
index 6c724ff4db8807a958a95a54053cb133b1138221..9a11a9b5f834d7d53e2318444713338091bcbd1b 100644 (file)
@@ -59,7 +59,7 @@ extern "C" {
       f_console_parameter_id_t ids[3] = { firewall_parameter_no_color_e, firewall_parameter_light_e, firewall_parameter_dark_e };
       const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
 
-      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
+      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->context);
 
       main->output.set = &main->context.set;
       main->error.set = &main->context.set;
@@ -215,16 +215,16 @@ extern "C" {
 
         int return_code = 0;
 
-        if (main->remaining.used > 0) {
+        if (main->parameters.remaining.used > 0) {
           show_nat = F_false;
           show_mangle = F_false;
           show_ports = F_false;
 
           f_array_length_t index = 0;
 
-          for (f_array_length_t i = 0; i < main->remaining.used; ++i) {
+          for (f_array_length_t i = 0; i < main->parameters.remaining.used; ++i) {
 
-            index = main->remaining.array[i];
+            index = main->parameters.remaining.array[i];
 
             if (fl_string_dynamic_compare(firewall_show_nat_s, argv[index]) == F_equal_to) {
               show_nat = F_true;
index 886acda784becfed46eacf74ae93c151a55d2840..bceee123ebe11beb6f2d2f10aae27a33a7965a3d 100644 (file)
@@ -13,15 +13,48 @@ extern "C" {
   const f_string_static_t fss_basic_list_read_program_name_long_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_READ_program_name_long_s, 0, FSS_BASIC_LIST_READ_program_name_long_s_length);
 #endif // _di_fss_basic_list_read_program_name_
 
-#ifndef _di_fss_basic_list_read_main_delete_
-  f_status_t fss_basic_list_read_main_delete(fss_basic_list_read_main_t * const main) {
-
-    f_console_parameters_delete(&main->parameters);
+#ifndef _di_fss_basic_list_read_defines_
+  const f_string_static_t fss_basic_list_read_pipe_content_end_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_READ_pipe_content_end_s, 0, FSS_BASIC_LIST_READ_pipe_content_end_s_length);
+  const f_string_static_t fss_basic_list_read_pipe_content_ignore_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_READ_pipe_content_ignore_s, 0, FSS_BASIC_LIST_READ_pipe_content_ignore_s_length);
+  const f_string_static_t fss_basic_list_read_pipe_content_start_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_READ_pipe_content_start_s, 0, FSS_BASIC_LIST_READ_pipe_content_start_s_length);
+#endif // _di_fss_basic_list_read_defines_
+
+#ifndef _di_fss_basic_list_read_parameters_
+  const f_string_static_t fss_basic_list_read_short_at_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_READ_short_at_s, 0, FSS_BASIC_LIST_READ_short_at_s_length);
+  const f_string_static_t fss_basic_list_read_short_content_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_READ_short_content_s, 0, FSS_BASIC_LIST_READ_short_content_s_length);
+  const f_string_static_t fss_basic_list_read_short_columns_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_READ_short_columns_s, 0, FSS_BASIC_LIST_READ_short_columns_s_length);
+  const f_string_static_t fss_basic_list_read_short_delimit_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_READ_short_delimit_s, 0, FSS_BASIC_LIST_READ_short_delimit_s_length);
+  const f_string_static_t fss_basic_list_read_short_depth_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_READ_short_depth_s, 0, FSS_BASIC_LIST_READ_short_depth_s_length);
+  const f_string_static_t fss_basic_list_read_short_empty_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_READ_short_empty_s, 0, FSS_BASIC_LIST_READ_short_empty_s_length);
+  const f_string_static_t fss_basic_list_read_short_line_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_READ_short_line_s, 0, FSS_BASIC_LIST_READ_short_line_s_length);
+  const f_string_static_t fss_basic_list_read_short_name_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_READ_short_name_s, 0, FSS_BASIC_LIST_READ_short_name_s_length);
+  const f_string_static_t fss_basic_list_read_short_object_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_READ_short_object_s, 0, FSS_BASIC_LIST_READ_short_object_s_length);
+  const f_string_static_t fss_basic_list_read_short_pipe_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_READ_short_pipe_s, 0, FSS_BASIC_LIST_READ_short_pipe_s_length);
+  const f_string_static_t fss_basic_list_read_short_raw_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_READ_short_raw_s, 0, FSS_BASIC_LIST_READ_short_raw_s_length);
+  const f_string_static_t fss_basic_list_read_short_select_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_READ_short_select_s, 0, FSS_BASIC_LIST_READ_short_select_s_length);
+  const f_string_static_t fss_basic_list_read_short_total_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_READ_short_total_s, 0, FSS_BASIC_LIST_READ_short_total_s_length);
+  const f_string_static_t fss_basic_list_read_short_trim_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_READ_short_trim_s, 0, FSS_BASIC_LIST_READ_short_trim_s_length);
+
+  const f_string_static_t fss_basic_list_read_long_at_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_READ_long_at_s, 0, FSS_BASIC_LIST_READ_long_at_s_length);
+  const f_string_static_t fss_basic_list_read_long_content_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_READ_long_content_s, 0, FSS_BASIC_LIST_READ_long_content_s_length);
+  const f_string_static_t fss_basic_list_read_long_columns_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_READ_long_columns_s, 0, FSS_BASIC_LIST_READ_long_columns_s_length);
+  const f_string_static_t fss_basic_list_read_long_delimit_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_READ_long_delimit_s, 0, FSS_BASIC_LIST_READ_long_delimit_s_length);
+  const f_string_static_t fss_basic_list_read_long_depth_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_READ_long_depth_s, 0, FSS_BASIC_LIST_READ_long_depth_s_length);
+  const f_string_static_t fss_basic_list_read_long_empty_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_READ_long_empty_s, 0, FSS_BASIC_LIST_READ_long_empty_s_length);
+  const f_string_static_t fss_basic_list_read_long_line_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_READ_long_line_s, 0, FSS_BASIC_LIST_READ_long_line_s_length);
+  const f_string_static_t fss_basic_list_read_long_name_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_READ_long_name_s, 0, FSS_BASIC_LIST_READ_long_name_s_length);
+  const f_string_static_t fss_basic_list_read_long_object_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_READ_long_object_s, 0, FSS_BASIC_LIST_READ_long_object_s_length);
+  const f_string_static_t fss_basic_list_read_long_pipe_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_READ_long_pipe_s, 0, FSS_BASIC_LIST_READ_long_pipe_s_length);
+  const f_string_static_t fss_basic_list_read_long_raw_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_READ_long_raw_s, 0, FSS_BASIC_LIST_READ_long_raw_s_length);
+  const f_string_static_t fss_basic_list_read_long_select_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_READ_long_select_s, 0, FSS_BASIC_LIST_READ_long_select_s_length);
+  const f_string_static_t fss_basic_list_read_long_total_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_READ_long_total_s, 0, FSS_BASIC_LIST_READ_long_total_s_length);
+  const f_string_static_t fss_basic_list_read_long_trim_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_READ_long_trim_s, 0, FSS_BASIC_LIST_READ_long_trim_s_length);
+#endif // _di_fss_basic_list_read_parameters_
 
-    f_type_array_lengths_resize(0, &main->remaining);
-    macro_f_color_context_t_delete_simple(main->context);
+#ifndef _di_fss_basic_list_read_main_delete_
+  f_status_t fss_basic_list_read_main_delete(fll_program_data_t * const main) {
 
-    return F_none;
+    return fll_program_data_delete(main);
   }
 #endif // _di_fss_basic_list_read_main_delete_
 
index 8aa5e49b7197017acb68ae026ebc2fd9549dd236..38284050c4706fa1341f42bbfe8b4af196b9a030 100644 (file)
@@ -16,6 +16,9 @@
 extern "C" {
 #endif
 
+/**
+ * The program version.
+ */
 #ifndef _di_fss_basic_list_read_program_version_
   #define FSS_BASIC_LIST_READ_program_version_major_s F_string_ascii_0_s
   #define FSS_BASIC_LIST_READ_program_version_minor_s F_string_ascii_5_s
@@ -42,6 +45,9 @@ extern "C" {
   extern const f_string_static_t fss_basic_list_program_version_s;
 #endif // _di_fss_basic_list_read_program_version_
 
+/**
+ * The program name.
+ */
 #ifndef _di_fss_basic_list_read_program_name_
   #define FSS_BASIC_LIST_READ_program_name_s      "fss_basic_list_read"
   #define FSS_BASIC_LIST_READ_program_name_long_s "FSS Basic List Read"
@@ -53,42 +59,118 @@ extern "C" {
   extern const f_string_static_t fss_basic_list_program_name_long_s;
 #endif // _di_fss_basic_list_read_program_name_
 
+/**
+ * The program defines.
+ */
 #ifndef _di_fss_basic_list_read_defines_
   #define fss_basic_list_read_signal_check_d 10000
 
-  #define fss_basic_list_read_pipe_content_end_s    '\f'
-  #define fss_basic_list_read_pipe_content_ignore_s '\v'
-  #define fss_basic_list_read_pipe_content_start_s  '\b'
-
-  #define fss_basic_list_read_short_at_s      "a"
-  #define fss_basic_list_read_short_content_s "c"
-  #define fss_basic_list_read_short_columns_s "C"
-  #define fss_basic_list_read_short_delimit_s "D"
-  #define fss_basic_list_read_short_depth_s   "d"
-  #define fss_basic_list_read_short_empty_s   "e"
-  #define fss_basic_list_read_short_line_s    "l"
-  #define fss_basic_list_read_short_name_s    "n"
-  #define fss_basic_list_read_short_object_s  "o"
-  #define fss_basic_list_read_short_pipe_s    "p"
-  #define fss_basic_list_read_short_raw_s     "R"
-  #define fss_basic_list_read_short_select_s  "s"
-  #define fss_basic_list_read_short_total_s   "t"
-  #define fss_basic_list_read_short_trim_s    "T"
-
-  #define fss_basic_list_read_long_at_s      "at"
-  #define fss_basic_list_read_long_content_s "content"
-  #define fss_basic_list_read_long_columns_s "columns"
-  #define fss_basic_list_read_long_delimit_s "delimit"
-  #define fss_basic_list_read_long_depth_s   "depth"
-  #define fss_basic_list_read_long_empty_s   "empty"
-  #define fss_basic_list_read_long_line_s    "line"
-  #define fss_basic_list_read_long_name_s    "name"
-  #define fss_basic_list_read_long_object_s  "object"
-  #define fss_basic_list_read_long_pipe_s    "pipe"
-  #define fss_basic_list_read_long_raw_s     "raw"
-  #define fss_basic_list_read_long_select_s  "select"
-  #define fss_basic_list_read_long_total_s   "total"
-  #define fss_basic_list_read_long_trim_s    "trim"
+  #define FSS_BASIC_LIST_READ_pipe_content_end_s    "\f"
+  #define FSS_BASIC_LIST_READ_pipe_content_ignore_s "\v"
+  #define FSS_BASIC_LIST_READ_pipe_content_start_s  "\b"
+
+  #define FSS_BASIC_LIST_READ_pipe_content_end_s_length    1
+  #define FSS_BASIC_LIST_READ_pipe_content_ignore_s_length 1
+  #define FSS_BASIC_LIST_READ_pipe_content_start_s_length  1
+
+  extern const f_string_static_t fss_basic_list_read_pipe_content_end_s;
+  extern const f_string_static_t fss_basic_list_read_pipe_content_ignore_s;
+  extern const f_string_static_t fss_basic_list_read_pipe_content_start_s;
+#endif // _di_fss_basic_list_read_defines_
+
+/**
+ * The main program parameters.
+ */
+#ifndef _di_fss_basic_list_read_parameters_
+  #define FSS_BASIC_LIST_READ_short_at_s      "a"
+  #define FSS_BASIC_LIST_READ_short_content_s "c"
+  #define FSS_BASIC_LIST_READ_short_columns_s "C"
+  #define FSS_BASIC_LIST_READ_short_delimit_s "D"
+  #define FSS_BASIC_LIST_READ_short_depth_s   "d"
+  #define FSS_BASIC_LIST_READ_short_empty_s   "e"
+  #define FSS_BASIC_LIST_READ_short_line_s    "l"
+  #define FSS_BASIC_LIST_READ_short_name_s    "n"
+  #define FSS_BASIC_LIST_READ_short_object_s  "o"
+  #define FSS_BASIC_LIST_READ_short_pipe_s    "p"
+  #define FSS_BASIC_LIST_READ_short_raw_s     "R"
+  #define FSS_BASIC_LIST_READ_short_select_s  "s"
+  #define FSS_BASIC_LIST_READ_short_total_s   "t"
+  #define FSS_BASIC_LIST_READ_short_trim_s    "T"
+
+  #define FSS_BASIC_LIST_READ_long_at_s      "at"
+  #define FSS_BASIC_LIST_READ_long_content_s "content"
+  #define FSS_BASIC_LIST_READ_long_columns_s "columns"
+  #define FSS_BASIC_LIST_READ_long_delimit_s "delimit"
+  #define FSS_BASIC_LIST_READ_long_depth_s   "depth"
+  #define FSS_BASIC_LIST_READ_long_empty_s   "empty"
+  #define FSS_BASIC_LIST_READ_long_line_s    "line"
+  #define FSS_BASIC_LIST_READ_long_name_s    "name"
+  #define FSS_BASIC_LIST_READ_long_object_s  "object"
+  #define FSS_BASIC_LIST_READ_long_pipe_s    "pipe"
+  #define FSS_BASIC_LIST_READ_long_raw_s     "raw"
+  #define FSS_BASIC_LIST_READ_long_select_s  "select"
+  #define FSS_BASIC_LIST_READ_long_total_s   "total"
+  #define FSS_BASIC_LIST_READ_long_trim_s    "trim"
+
+  #define FSS_BASIC_LIST_READ_short_at_s_length      1
+  #define FSS_BASIC_LIST_READ_short_content_s_length 1
+  #define FSS_BASIC_LIST_READ_short_columns_s_length 1
+  #define FSS_BASIC_LIST_READ_short_delimit_s_length 1
+  #define FSS_BASIC_LIST_READ_short_depth_s_length   1
+  #define FSS_BASIC_LIST_READ_short_empty_s_length   1
+  #define FSS_BASIC_LIST_READ_short_line_s_length    1
+  #define FSS_BASIC_LIST_READ_short_name_s_length    1
+  #define FSS_BASIC_LIST_READ_short_object_s_length  1
+  #define FSS_BASIC_LIST_READ_short_pipe_s_length    1
+  #define FSS_BASIC_LIST_READ_short_raw_s_length     1
+  #define FSS_BASIC_LIST_READ_short_select_s_length  1
+  #define FSS_BASIC_LIST_READ_short_total_s_length   1
+  #define FSS_BASIC_LIST_READ_short_trim_s_length    1
+
+  #define FSS_BASIC_LIST_READ_long_at_s_length      2
+  #define FSS_BASIC_LIST_READ_long_content_s_length 7
+  #define FSS_BASIC_LIST_READ_long_columns_s_length 8
+  #define FSS_BASIC_LIST_READ_long_delimit_s_length 7
+  #define FSS_BASIC_LIST_READ_long_depth_s_length   5
+  #define FSS_BASIC_LIST_READ_long_empty_s_length   5
+  #define FSS_BASIC_LIST_READ_long_line_s_length    4
+  #define FSS_BASIC_LIST_READ_long_name_s_length    4
+  #define FSS_BASIC_LIST_READ_long_object_s_length  6
+  #define FSS_BASIC_LIST_READ_long_pipe_s_length    4
+  #define FSS_BASIC_LIST_READ_long_raw_s_length     3
+  #define FSS_BASIC_LIST_READ_long_select_s_length  6
+  #define FSS_BASIC_LIST_READ_long_total_s_length   5
+  #define FSS_BASIC_LIST_READ_long_trim_s_length    4
+
+  extern const f_string_static_t fss_basic_list_read_short_at_s;
+  extern const f_string_static_t fss_basic_list_read_short_content_s;
+  extern const f_string_static_t fss_basic_list_read_short_columns_s;
+  extern const f_string_static_t fss_basic_list_read_short_delimit_s;
+  extern const f_string_static_t fss_basic_list_read_short_depth_s;
+  extern const f_string_static_t fss_basic_list_read_short_empty_s;
+  extern const f_string_static_t fss_basic_list_read_short_line_s;
+  extern const f_string_static_t fss_basic_list_read_short_name_s;
+  extern const f_string_static_t fss_basic_list_read_short_object_s;
+  extern const f_string_static_t fss_basic_list_read_short_pipe_s;
+  extern const f_string_static_t fss_basic_list_read_short_raw_s;
+  extern const f_string_static_t fss_basic_list_read_short_select_s;
+  extern const f_string_static_t fss_basic_list_read_short_total_s;
+  extern const f_string_static_t fss_basic_list_read_short_trim_s;
+
+  extern const f_string_static_t fss_basic_list_read_long_at_s;
+  extern const f_string_static_t fss_basic_list_read_long_content_s;
+  extern const f_string_static_t fss_basic_list_read_long_columns_s;
+  extern const f_string_static_t fss_basic_list_read_long_delimit_s;
+  extern const f_string_static_t fss_basic_list_read_long_depth_s;
+  extern const f_string_static_t fss_basic_list_read_long_empty_s;
+  extern const f_string_static_t fss_basic_list_read_long_line_s;
+  extern const f_string_static_t fss_basic_list_read_long_name_s;
+  extern const f_string_static_t fss_basic_list_read_long_object_s;
+  extern const f_string_static_t fss_basic_list_read_long_pipe_s;
+  extern const f_string_static_t fss_basic_list_read_long_raw_s;
+  extern const f_string_static_t fss_basic_list_read_long_select_s;
+  extern const f_string_static_t fss_basic_list_read_long_total_s;
+  extern const f_string_static_t fss_basic_list_read_long_trim_s;
 
   enum {
     fss_basic_list_read_parameter_help_e,
@@ -128,24 +210,24 @@ extern "C" {
       macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_version_s.string, f_console_standard_long_version_s.string, 0, 0, f_console_type_inverse_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_list_read_short_at_s, fss_basic_list_read_long_at_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_list_read_short_content_s, fss_basic_list_read_long_content_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_list_read_short_columns_s, fss_basic_list_read_long_columns_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_list_read_short_delimit_s, fss_basic_list_read_long_delimit_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_list_read_short_depth_s, fss_basic_list_read_long_depth_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_list_read_short_empty_s, fss_basic_list_read_long_empty_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_list_read_short_line_s, fss_basic_list_read_long_line_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_list_read_short_name_s, fss_basic_list_read_long_name_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_list_read_short_object_s, fss_basic_list_read_long_object_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_list_read_short_pipe_s, fss_basic_list_read_long_pipe_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_list_read_short_raw_s, fss_basic_list_read_long_raw_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_list_read_short_select_s, fss_basic_list_read_long_select_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_list_read_short_total_s, fss_basic_list_read_long_total_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_list_read_short_trim_s, fss_basic_list_read_long_trim_s, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_list_read_short_at_s.string, fss_basic_list_read_long_at_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_list_read_short_content_s.string, fss_basic_list_read_long_content_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_list_read_short_columns_s.string, fss_basic_list_read_long_columns_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_list_read_short_delimit_s.string, fss_basic_list_read_long_delimit_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_list_read_short_depth_s.string, fss_basic_list_read_long_depth_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_list_read_short_empty_s.string, fss_basic_list_read_long_empty_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_list_read_short_line_s.string, fss_basic_list_read_long_line_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_list_read_short_name_s.string, fss_basic_list_read_long_name_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_list_read_short_object_s.string, fss_basic_list_read_long_object_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_list_read_short_pipe_s.string, fss_basic_list_read_long_pipe_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_list_read_short_raw_s.string, fss_basic_list_read_long_raw_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_list_read_short_select_s.string, fss_basic_list_read_long_select_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_list_read_short_total_s.string, fss_basic_list_read_long_total_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_list_read_short_trim_s.string, fss_basic_list_read_long_trim_s.string, 0, 0, f_console_type_normal_e), \
     }
 
   #define fss_basic_list_total_parameters_d 23
-#endif // _di_fss_basic_list_read_defines_
+#endif // _di_fss_basic_list_read_parameters_
 
 /**
  * FSS Delimit Parameter data.
@@ -186,35 +268,6 @@ extern "C" {
   };
 #endif // _di_fss_basic_list_read_delimit_modes_
 
-#ifndef _di_fss_basic_list_read_main_t_
-  typedef struct {
-    f_console_parameters_t parameters;
-
-    f_array_lengths_t remaining;
-    bool process_pipe;
-
-    fl_print_t output;
-    fl_print_t error;
-    fl_print_t warning;
-
-    f_signal_t signal;
-
-    f_color_context_t context;
-  } fss_basic_list_read_main_t;
-
-  #define fss_basic_list_read_main_t_initialize \
-    { \
-      f_console_parameters_t_initialize, \
-      f_array_lengths_t_initialize, \
-      F_false, \
-      fl_print_t_initialize, \
-      macro_fl_print_t_initialize_error(), \
-      macro_fl_print_t_initialize_warning(), \
-      f_signal_t_initialize, \
-      f_color_context_t_initialize, \
-    }
-#endif // _di_fss_basic_list_read_main_t_
-
 /**
  * Deallocate main.
  *
@@ -231,7 +284,7 @@ extern "C" {
  * @see fss_basic_list_read_main()
  */
 #ifndef _di_fss_basic_list_read_main_delete_
-  extern f_status_t fss_basic_list_read_main_delete(fss_basic_list_read_main_t * const main);
+  extern f_status_t fss_basic_list_read_main_delete(fll_program_data_t * const main);
 #endif // _di_fss_basic_list_read_main_delete_
 
 #ifdef __cplusplus
index 2e013c0cafe52b452c8701e572f89f8a39372225..e86418c0e815d825b29b000b9b7d876cb8121ae2 100644 (file)
@@ -7,15 +7,6 @@
 extern "C" {
 #endif
 
-#ifndef _di_fss_basic_list_program_version_
-  const f_string_static_t fss_basic_list_program_version_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_program_version_s, 0, FSS_BASIC_LIST_program_version_s_length);
-#endif // _di_fss_basic_list_program_version_
-
-#ifndef _di_fss_basic_list_program_name_
-  const f_string_static_t fss_basic_list_program_name_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_program_name_s, 0, FSS_BASIC_LIST_program_name_s_length);
-  const f_string_static_t fss_basic_list_program_name_long_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_program_name_long_s, 0, FSS_BASIC_LIST_program_name_long_s_length);
-#endif // _di_fss_basic_list_program_name_
-
 #ifndef _di_fss_basic_list_read_print_help_
   f_status_t fss_basic_list_read_print_help(const f_file_t file, const f_color_context_t context) {
 
@@ -50,7 +41,7 @@ extern "C" {
     fll_program_print_help_option(file, context, fss_basic_list_read_short_total_s, fss_basic_list_read_long_total_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "   Print the total number of lines.");
     fll_program_print_help_option(file, context, fss_basic_list_read_short_trim_s, fss_basic_list_read_long_trim_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "    Trim Object names on select or print.");
 
-    fll_program_print_help_usage(file, context, fss_basic_list_program_name_s, "filename(s)");
+    fll_program_print_help_usage(file, context, fss_basic_list_program_name_s, fll_program_parameter_filenames_s);
 
     fl_print_format(" %[Notes:%]%r", file.stream, context.set.important, context.set.important, f_string_eol_s);
 
@@ -127,7 +118,7 @@ extern "C" {
 #endif // _di_fss_basic_list_read_print_help_
 
 #ifndef _di_fss_basic_list_read_main_
-  f_status_t fss_basic_list_read_main(fss_basic_list_read_main_t * const main, const f_console_arguments_t *arguments) {
+  f_status_t fss_basic_list_read_main(fll_program_data_t * const main, const f_console_arguments_t *arguments) {
 
     f_status_t status = F_none;
 
@@ -139,7 +130,7 @@ extern "C" {
       f_console_parameter_id_t ids[3] = { fss_basic_list_read_parameter_no_color_e, fss_basic_list_read_parameter_light_e, fss_basic_list_read_parameter_dark_e };
       const f_console_parameter_ids_t choices = { ids, 3 };
 
-      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
+      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->context);
 
       main->output.set = &main->context.set;
       main->error.set = &main->context.set;
@@ -225,17 +216,17 @@ extern "C" {
     }
 
     // Provide a range designating where within the buffer a particular file exists, using a statically allocated array.
-    fss_basic_list_read_file_t files_array[main->remaining.used + 1];
+    fss_basic_list_read_file_t files_array[main->parameters.remaining.used + 1];
     fss_basic_list_read_data_t data = fss_basic_list_read_data_t_initialize;
 
     data.files.array = files_array;
     data.files.used = 1;
-    data.files.size = main->remaining.used + 1;
+    data.files.size = main->parameters.remaining.used + 1;
     data.files.array[0].name = "(pipe)";
     data.files.array[0].range.start = 1;
     data.files.array[0].range.stop = 0;
 
-    if (main->remaining.used || main->process_pipe) {
+    if (main->parameters.remaining.used || main->process_pipe) {
       {
         const f_array_length_t parameter_code[] = {
           fss_basic_list_read_parameter_at_e,
@@ -566,12 +557,12 @@ extern "C" {
         }
       }
 
-      if (F_status_is_error_not(status) && main->remaining.used > 0) {
+      if (F_status_is_error_not(status) && main->parameters.remaining.used > 0) {
         f_file_t file = f_file_t_initialize;
         f_array_length_t size_file = 0;
         uint16_t signal_check = 0;
 
-        for (f_array_length_t i = 0; i < main->remaining.used; ++i) {
+        for (f_array_length_t i = 0; i < main->parameters.remaining.used; ++i) {
 
           if (!((++signal_check) % fss_basic_list_read_signal_check_d)) {
             if (fss_basic_list_read_signal_received(main)) {
@@ -587,10 +578,10 @@ extern "C" {
           file.stream = 0;
           file.id = -1;
 
-          status = f_file_stream_open(arguments->argv[main->remaining.array[i]], 0, &file);
+          status = f_file_stream_open(arguments->argv[main->parameters.remaining.array[i]], 0, &file);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e);
 
             break;
           }
@@ -599,7 +590,7 @@ extern "C" {
           status = f_file_size_by_id(file.id, &size_file);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
             break;
           }
@@ -608,7 +599,7 @@ extern "C" {
             status = f_string_dynamic_resize(data.buffer.size + size_file, &data.buffer);
 
             if (F_status_is_error(status)) {
-              fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+              fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
               break;
             }
@@ -616,12 +607,12 @@ extern "C" {
             status = f_file_stream_read(file, &data.buffer);
 
             if (F_status_is_error(status)) {
-              fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+              fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
               break;
             }
             else if (data.buffer.used > data.files.array[data.files.used].range.start) {
-              data.files.array[data.files.used].name = arguments->argv[main->remaining.array[i]];
+              data.files.array[data.files.used].name = arguments->argv[main->parameters.remaining.array[i]];
               data.files.array[data.files.used++].range.stop = data.buffer.used - 1;
 
               // This standard is newline sensitive, when appending files to the buffer if the file lacks a final newline then this could break the format for files appended thereafter.
index cc3b30e7ecb151b67a49b454c88bbf9761a90100..62bbf1a8000ad384bc6b4f2a689169d67cda66da 100644 (file)
@@ -7,7 +7,7 @@
  *
  * This is the FSS Basic List Read program
  * This program utilizes the Featureless Linux Library.
- * This program processes files or other input in fss format and stores the results in the fss_basic_list_read_main_t.
+ * This program processes files or other input in fss format and stores the results in the fll_program_data_t.
  *
  * This processes in accordance to the FSS-0002 Basic List specification.
  */
@@ -96,7 +96,7 @@ extern "C" {
  * @see fss_basic_list_read_main_delete()
  */
 #ifndef _di_fss_basic_list_read_main_
-  extern f_status_t fss_basic_list_read_main(fss_basic_list_read_main_t * const main, const f_console_arguments_t *arguments);
+  extern f_status_t fss_basic_list_read_main(fll_program_data_t * const main, const f_console_arguments_t *arguments);
 #endif // _di_fss_basic_list_read_main_
 
 #ifdef __cplusplus
index a09d464e91ae6b08fad5e1a7ba87045c6fb8cd8b..c758ed4ba9cf6aebfa179f90149327adaae77d73 100644 (file)
@@ -3,7 +3,7 @@
 int main(const int argc, const f_string_t *argv) {
 
   f_console_arguments_t arguments = { argc, argv };
-  fss_basic_list_read_main_t data = fss_basic_list_read_main_t_initialize;
+  fll_program_data_t data = fss_basic_list_read_main_t_initialize;
 
   if (f_pipe_input_exists()) {
     data.process_pipe = F_true;
index 2d3ffd2dfeb530572dcf799f063049e3dc1eeefb..0a3a246464190417c8de6fc5a06b58edca6e7f78 100644 (file)
@@ -58,7 +58,7 @@ extern "C" {
 #endif // _di_fss_basic_list_read_depths_resize_
 
 #ifndef _di_fss_basic_list_read_print_signal_received_
-  void fss_basic_list_read_print_signal_received(fss_basic_list_read_main_t * const main, const f_status_t signal) {
+  void fss_basic_list_read_print_signal_received(fll_program_data_t * const main, const f_status_t signal) {
 
     if (main->warning.verbosity != f_console_verbosity_verbose_e) return;
 
@@ -76,7 +76,7 @@ extern "C" {
 #endif // _di_fss_basic_list_read_print_signal_received_
 
 #ifndef _di_fss_basic_list_read_signal_received_
-  f_status_t fss_basic_list_read_signal_received(fss_basic_list_read_main_t * const main) {
+  f_status_t fss_basic_list_read_signal_received(fll_program_data_t * const main) {
 
     if (main->signal.id == -1) {
       return F_false;
index 6513007ce8fdd2a576fc4b314cb6e41d8ddcbadf..be183e595a02f3b2dfa1d68f1c84e28fdf76709d 100644 (file)
@@ -257,7 +257,7 @@ extern "C" {
  *   The signal received.
  */
 #ifndef _di_fss_basic_list_read_print_signal_received_
-  extern void fss_basic_list_read_print_signal_received(fss_basic_list_read_main_t * const main, const f_status_t signal) F_attribute_visibility_internal_d;
+  extern void fss_basic_list_read_print_signal_received(fll_program_data_t * const main, const f_status_t signal) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_list_read_print_signal_received_
 
 /**
@@ -275,7 +275,7 @@ extern "C" {
  * @see f_signal_read()
  */
 #ifndef _di_fss_basic_list_read_signal_received_
-  extern f_status_t fss_basic_list_read_signal_received(fss_basic_list_read_main_t * const main) F_attribute_visibility_internal_d;
+  extern f_status_t fss_basic_list_read_signal_received(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_list_read_signal_received_
 
 #ifdef __cplusplus
index ca8c9185032000320d6aab639ea4243e5b3b674b..67a7339fa6c5caf40e30d13204bf6e6dd2b02a0f 100644 (file)
@@ -7,7 +7,7 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_basic_list_read_print_at_
-  void fss_basic_list_read_print_at(fss_basic_list_read_main_t * const main, const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_basic_list_read_data_t * const data) {
+  void fss_basic_list_read_print_at(fll_program_data_t * const main, const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_basic_list_read_data_t * const data) {
 
     if (at >= data->contents.used) {
       return;
@@ -45,7 +45,7 @@ extern "C" {
 #endif // _di_fss_basic_list_read_print_at_
 
 #ifndef _di_fss_basic_list_read_print_at_object_
-  void fss_basic_list_read_print_at_object(fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t * const data, const f_array_length_t at, const f_fss_delimits_t delimits_object) {
+  void fss_basic_list_read_print_at_object(fll_program_data_t * const main, fss_basic_list_read_data_t * const data, const f_array_length_t at, const f_fss_delimits_t delimits_object) {
 
     if (at >= data->objects.used) {
       return;
@@ -63,7 +63,7 @@ extern "C" {
 #endif // _di_fss_basic_list_read_print_at_object_
 
 #ifndef _di_fss_basic_list_read_print_content_ignore_
-  void fss_basic_list_read_print_content_ignore(fss_basic_list_read_main_t * const main) {
+  void fss_basic_list_read_print_content_ignore(fll_program_data_t * const main) {
 
     if (main->parameters.array[fss_basic_list_read_parameter_pipe_e].result == f_console_result_found_e) {
       f_print_character(fss_basic_list_read_pipe_content_ignore_s, main->output.to.stream);
@@ -72,7 +72,7 @@ extern "C" {
 #endif // _di_fss_basic_list_read_print_content_ignore_
 
 #ifndef _di_fss_basic_list_read_print_object_end_
-  void fss_basic_list_read_print_object_end(fss_basic_list_read_main_t * const main) {
+  void fss_basic_list_read_print_object_end(fll_program_data_t * const main) {
 
     if (main->parameters.array[fss_basic_list_read_parameter_pipe_e].result == f_console_result_found_e) {
       f_print_character(fss_basic_list_read_pipe_content_start_s, main->output.to.stream);
@@ -90,7 +90,7 @@ extern "C" {
 #endif // _di_fss_basic_list_read_print_object_end_
 
 #ifndef _di_fss_basic_list_read_print_set_end_
-  void fss_basic_list_read_print_set_end(fss_basic_list_read_main_t * const main) {
+  void fss_basic_list_read_print_set_end(fll_program_data_t * const main) {
 
     if (main->parameters.array[fss_basic_list_read_parameter_pipe_e].result == f_console_result_found_e) {
       f_print_character(fss_basic_list_read_pipe_content_end_s, main->output.to.stream);
@@ -99,7 +99,7 @@ extern "C" {
 #endif // _di_fss_basic_list_read_print_set_end_
 
 #ifndef _di_fss_basic_list_read_print_one_
-  void fss_basic_list_read_print_one(fss_basic_list_read_main_t * const main) {
+  void fss_basic_list_read_print_one(fll_program_data_t * const main) {
 
     f_print_character(f_string_ascii_1_s.string[0], main->output.to.stream);
     f_print_dynamic_raw(f_string_eol_s, main->output.to.stream);
@@ -107,7 +107,7 @@ extern "C" {
 #endif // _di_fss_basic_list_read_print_one_
 
 #ifndef _di_fss_basic_list_read_print_zero_
-  void fss_basic_list_read_print_zero(fss_basic_list_read_main_t * const main) {
+  void fss_basic_list_read_print_zero(fll_program_data_t * const main) {
 
     f_print_character(f_string_ascii_0_s.string[0], main->output.to.stream);
     f_print_dynamic_raw(f_string_eol_s, main->output.to.stream);
index 7d988acda95959d1b2b9da0d1ba08375ed97ed7f..7ce6a3c9550882cafebe870bbec39cd61a773827 100644 (file)
@@ -29,7 +29,7 @@ extern "C" {
  *   The program data.
  */
 #ifndef _di_fss_basic_list_read_print_at_
-  extern void fss_basic_list_read_print_at(fss_basic_list_read_main_t * const main, const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_basic_list_read_data_t * const data) F_attribute_visibility_internal_d;
+  extern void fss_basic_list_read_print_at(fll_program_data_t * const main, const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_basic_list_read_data_t * const data) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_list_read_print_at_
 
 /**
@@ -45,7 +45,7 @@ extern "C" {
  *   The delimits to be applied to an Object.
  */
 #ifndef _di_fss_basic_list_read_print_at_object_
-  extern void fss_basic_list_read_print_at_object(fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t * const data, const f_array_length_t at, const f_fss_delimits_t delimits_object) F_attribute_visibility_internal_d;
+  extern void fss_basic_list_read_print_at_object(fll_program_data_t * const main, fss_basic_list_read_data_t * const data, const f_array_length_t at, const f_fss_delimits_t delimits_object) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_list_read_print_at_object_
 
 /**
@@ -57,7 +57,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_basic_list_read_print_content_ignore_
-  extern void fss_basic_list_read_print_content_ignore(fss_basic_list_read_main_t * const main) F_attribute_visibility_internal_d;
+  extern void fss_basic_list_read_print_content_ignore(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_list_read_print_content_ignore_
 
 /**
@@ -67,7 +67,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_basic_list_read_print_object_end_
-  extern void fss_basic_list_read_print_object_end(fss_basic_list_read_main_t * const main) F_attribute_visibility_internal_d;
+  extern void fss_basic_list_read_print_object_end(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_list_read_print_object_end_
 
 /**
@@ -77,7 +77,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_basic_list_read_print_one_
-  extern void fss_basic_list_read_print_one(fss_basic_list_read_main_t * const main) F_attribute_visibility_internal_d;
+  extern void fss_basic_list_read_print_one(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_list_read_print_one_
 
 /**
@@ -87,7 +87,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_basic_list_read_print_set_end_
-  extern void fss_basic_list_read_print_set_end(fss_basic_list_read_main_t * const main) F_attribute_visibility_internal_d;
+  extern void fss_basic_list_read_print_set_end(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_list_read_print_set_end_
 
 /**
@@ -97,7 +97,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_basic_list_read_print_zero_
-  extern void fss_basic_list_read_print_zero(fss_basic_list_read_main_t * const main) F_attribute_visibility_internal_d;
+  extern void fss_basic_list_read_print_zero(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_list_read_print_zero_
 
 #ifdef __cplusplus
index eb4b3fef1c41edb2fa249ba90e3d23ac0281e827..928ea681e96434c7a9898d68b72494041af46a88 100644 (file)
@@ -56,7 +56,7 @@ extern "C" {
 #endif // _di_fss_basic_list_read_delimit_object_is_
 
 #ifndef _di_fss_basic_list_read_depth_process_
-  f_status_t fss_basic_list_read_depth_process(fss_basic_list_read_main_t * const main, const f_console_arguments_t *arguments, fss_basic_list_read_data_t *data) {
+  f_status_t fss_basic_list_read_depth_process(fll_program_data_t * const main, const f_console_arguments_t *arguments, fss_basic_list_read_data_t *data) {
 
     f_status_t status = F_none;
 
@@ -244,7 +244,7 @@ extern "C" {
 #endif // _di_fss_basic_list_read_file_identify_
 
 #ifndef _di_fss_basic_list_read_load_
-  f_status_t fss_basic_list_read_load(fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data) {
+  f_status_t fss_basic_list_read_load(fll_program_data_t * const main, fss_basic_list_read_data_t *data) {
 
     f_state_t state = macro_f_state_t_initialize(fss_basic_list_common_allocation_large_d, fss_basic_list_read_common_allocation_small_d, 0, 0, 0, 0, 0);
     f_string_range_t input = macro_f_string_range_t_initialize(data->buffer.used);
@@ -281,7 +281,7 @@ extern "C" {
 #endif // _di_fss_basic_list_read_load_
 
 #ifndef _di_fss_basic_list_read_load_number_
-  f_status_t fss_basic_list_read_load_number(fss_basic_list_read_main_t * const main, const f_array_length_t parameter, const f_string_t name, const f_console_arguments_t *arguments, f_number_unsigned_t *number) {
+  f_status_t fss_basic_list_read_load_number(fll_program_data_t * const main, const f_array_length_t parameter, const f_string_t name, const f_console_arguments_t *arguments, f_number_unsigned_t *number) {
 
     if (main->parameters.array[parameter].result == f_console_result_additional_e) {
       const f_array_length_t index = main->parameters.array[parameter].values.array[main->parameters.array[parameter].values.used - 1];
@@ -303,7 +303,7 @@ extern "C" {
 #endif // _di_fss_basic_list_read_load_number_
 
 #ifndef _di_fss_basic_list_read_process_
-  f_status_t fss_basic_list_read_process(fss_basic_list_read_main_t * const main, const f_console_arguments_t *arguments, fss_basic_list_read_data_t *data) {
+  f_status_t fss_basic_list_read_process(fll_program_data_t * const main, const f_console_arguments_t *arguments, fss_basic_list_read_data_t *data) {
 
     f_status_t status = fss_basic_list_read_process_option(main, arguments, data);
     if (F_status_is_error(status)) return status;
@@ -375,7 +375,7 @@ extern "C" {
 #endif // _di_fss_basic_list_read_process_
 
 #ifndef _di_fss_basic_list_read_process_at_
-  f_status_t fss_basic_list_read_process_at(fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data, bool names[]) {
+  f_status_t fss_basic_list_read_process_at(fll_program_data_t * const main, fss_basic_list_read_data_t *data, bool names[]) {
 
     if (data->depths.array[0].value_at >= data->objects.used) {
       if (data->option & (fss_basic_list_read_data_option_columns_d | fss_basic_list_read_data_option_total_d)) {
@@ -459,7 +459,7 @@ extern "C" {
 #endif // _di_fss_basic_list_read_process_at_
 
 #ifndef _di_fss_basic_list_read_process_at_line_
-  f_status_t fss_basic_list_read_process_at_line(fss_basic_list_read_main_t * const main, const f_array_length_t at, const f_array_lengths_t delimits_object, const f_array_lengths_t delimits_content, fss_basic_list_read_data_t *data, f_array_length_t *line) {
+  f_status_t fss_basic_list_read_process_at_line(fll_program_data_t * const main, const f_array_length_t at, const f_array_lengths_t delimits_object, const f_array_lengths_t delimits_content, fss_basic_list_read_data_t *data, f_array_length_t *line) {
 
     if (data->option & fss_basic_list_read_data_option_object_d) {
       if (*line == data->line) {
@@ -563,7 +563,7 @@ extern "C" {
 #endif // _di_fss_basic_list_read_process_at_line_
 
 #ifndef _di_fss_basic_list_read_process_columns_
-  f_status_t fss_basic_list_read_process_columns(fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data, bool names[]) {
+  f_status_t fss_basic_list_read_process_columns(fll_program_data_t * const main, fss_basic_list_read_data_t *data, bool names[]) {
 
     if (!(data->option & fss_basic_list_read_data_option_content_d)) {
       flockfile(main->output.to.stream);
@@ -602,7 +602,7 @@ extern "C" {
 #endif // _di_fss_basic_list_read_process_columns_
 
 #ifndef _di_fss_basic_list_read_process_line_
-  f_status_t fss_basic_list_read_process_line(fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data, bool names[]) {
+  f_status_t fss_basic_list_read_process_line(fll_program_data_t * const main, fss_basic_list_read_data_t *data, bool names[]) {
 
     f_array_lengths_t except_none = f_array_lengths_t_initialize;
     f_array_lengths_t *delimits_object = fss_basic_list_read_delimit_object_is(0, data) ? &data->delimits_object : &except_none;
@@ -664,7 +664,7 @@ extern "C" {
 #endif // _di_fss_basic_list_read_process_name_
 
 #ifndef _di_fss_basic_list_read_process_option_
-  f_status_t fss_basic_list_read_process_option(fss_basic_list_read_main_t * const main, const f_console_arguments_t *arguments, fss_basic_list_read_data_t *data) {
+  f_status_t fss_basic_list_read_process_option(fll_program_data_t * const main, const f_console_arguments_t *arguments, fss_basic_list_read_data_t *data) {
 
     f_status_t status = F_none;
 
@@ -728,7 +728,7 @@ extern "C" {
 #endif // _di_fss_basic_list_read_process_option_
 
 #ifndef _di_fss_basic_list_read_process_total_
-  f_status_t fss_basic_list_read_process_total(fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data, bool names[]) {
+  f_status_t fss_basic_list_read_process_total(fll_program_data_t * const main, fss_basic_list_read_data_t *data, bool names[]) {
 
     f_array_length_t total = 0;
     f_string_range_t range = f_string_range_t_initialize;
index 8361f501c86f451ff7c83f0ef246afebf8532e90..5711d753454fed40d1b7d7ed39a1fc21034e30a4 100644 (file)
@@ -74,7 +74,7 @@ extern "C" {
  * @see fss_basic_list_read_depths_resize()
  */
 #ifndef _di_fss_basic_list_read_depth_process_
-  extern f_status_t fss_basic_list_read_depth_process(fss_basic_list_read_main_t * const main, const f_console_arguments_t *arguments, fss_basic_list_read_data_t *data) F_attribute_visibility_internal_d;
+  extern f_status_t fss_basic_list_read_depth_process(fll_program_data_t * const main, const f_console_arguments_t *arguments, fss_basic_list_read_data_t *data) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_list_read_depth_process_
 
 /**
@@ -118,7 +118,7 @@ extern "C" {
  * @see fss_basic_list_read_process_option()
  */
 #ifndef _di_fss_basic_list_read_load_
-  extern f_status_t fss_basic_list_read_load(fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data) F_attribute_visibility_internal_d;
+  extern f_status_t fss_basic_list_read_load(fll_program_data_t * const main, fss_basic_list_read_data_t *data) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_list_read_load_
 
 /**
@@ -148,7 +148,7 @@ extern "C" {
  * @see fss_basic_list_read_depths_resize()
  */
 #ifndef _di_fss_basic_list_read_load_number_
-  extern f_status_t fss_basic_list_read_load_number(fss_basic_list_read_main_t * const main, const f_array_length_t parameter, const f_string_t name, const f_console_arguments_t *arguments, f_number_unsigned_t *number) F_attribute_visibility_internal_d;
+  extern f_status_t fss_basic_list_read_load_number(fll_program_data_t * const main, const f_array_length_t parameter, const f_string_t name, const f_console_arguments_t *arguments, f_number_unsigned_t *number) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_list_read_load_number_
 
 /**
@@ -173,7 +173,7 @@ extern "C" {
  * @see fss_basic_list_read_process_option()
  */
 #ifndef _di_fss_basic_list_read_process_
-  extern f_status_t fss_basic_list_read_process(fss_basic_list_read_main_t * const main, const f_console_arguments_t *arguments, fss_basic_list_read_data_t *data) F_attribute_visibility_internal_d;
+  extern f_status_t fss_basic_list_read_process(fll_program_data_t * const main, const f_console_arguments_t *arguments, fss_basic_list_read_data_t *data) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_list_read_process_
 
 /**
@@ -193,7 +193,7 @@ extern "C" {
  * @see fss_basic_list_read_process_at_line()
  */
 #ifndef _di_fss_basic_list_read_process_at_
-  extern f_status_t fss_basic_list_read_process_at(fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
+  extern f_status_t fss_basic_list_read_process_at(fll_program_data_t * const main, fss_basic_list_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_list_read_process_at_
 
 /**
@@ -216,7 +216,7 @@ extern "C" {
  *   F_success on success and the line was matched (and possibly printed).
  */
 #ifndef _di_fss_basic_list_read_process_at_line_
-  extern f_status_t fss_basic_list_read_process_at_line(fss_basic_list_read_main_t * const main, const f_array_length_t at, const f_array_lengths_t delimits_object, const f_array_lengths_t delimits_content, fss_basic_list_read_data_t *data, f_array_length_t *line) F_attribute_visibility_internal_d;
+  extern f_status_t fss_basic_list_read_process_at_line(fll_program_data_t * const main, const f_array_length_t at, const f_array_lengths_t delimits_object, const f_array_lengths_t delimits_content, fss_basic_list_read_data_t *data, f_array_length_t *line) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_list_read_process_at_line_
 
 /**
@@ -234,7 +234,7 @@ extern "C" {
  *   F_none on success.
  */
 #ifndef _di_fss_basic_list_read_process_columns_
-  extern f_status_t fss_basic_list_read_process_columns(fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
+  extern f_status_t fss_basic_list_read_process_columns(fll_program_data_t * const main, fss_basic_list_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_list_read_process_columns_
 
 /**
@@ -252,7 +252,7 @@ extern "C" {
  *   F_none on success.
  */
 #ifndef _di_fss_basic_list_read_process_line_
-  extern f_status_t fss_basic_list_read_process_line(fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
+  extern f_status_t fss_basic_list_read_process_line(fll_program_data_t * const main, fss_basic_list_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_list_read_process_line_
 
 /**
@@ -293,7 +293,7 @@ extern "C" {
  * @see fss_basic_list_read_load_setting()
  */
 #ifndef _di_fss_basic_list_read_process_option_
-  extern f_status_t fss_basic_list_read_process_option(fss_basic_list_read_main_t * const main, const f_console_arguments_t *arguments, fss_basic_list_read_data_t *data) F_attribute_visibility_internal_d;
+  extern f_status_t fss_basic_list_read_process_option(fll_program_data_t * const main, const f_console_arguments_t *arguments, fss_basic_list_read_data_t *data) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_list_read_process_option_
 
 /**
@@ -311,7 +311,7 @@ extern "C" {
  *   F_none on success.
  */
 #ifndef _di_fss_basic_list_read_process_total_
-  extern f_status_t fss_basic_list_read_process_total(fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
+  extern f_status_t fss_basic_list_read_process_total(fll_program_data_t * const main, fss_basic_list_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_list_read_process_total_
 
 #ifdef __cplusplus
index 42e45087e176d63de063ef765cb170f5f7d35aa4..2cdfa3e50b0284ae835d68a755068d5360de75d1 100644 (file)
@@ -13,16 +13,38 @@ extern "C" {
   const f_string_static_t fss_basic_list_write_program_name_long_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_WRITE_program_name_long_s, 0, FSS_BASIC_LIST_WRITE_program_name_long_s_length);
 #endif // _di_fss_basic_list_write_program_name_
 
-#ifndef _di_fss_basic_list_write_main_delete_
-  f_status_t fss_basic_list_write_main_delete(fss_basic_list_write_main_t * const main) {
-
-    f_console_parameters_delete(&main->parameters);
+#ifndef _di_fss_basic_list_write_defines_
+  const f_string_static_t fss_basic_list_write_pipe_content_end_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_WRITE_pipe_content_end_s, 0, FSS_BASIC_LIST_WRITE_pipe_content_end_s_length);
+  const f_string_static_t fss_basic_list_write_pipe_content_ignore_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_WRITE_pipe_content_ignore_s, 0, FSS_BASIC_LIST_WRITE_pipe_content_ignore_s_length);
+  const f_string_static_t fss_basic_list_write_pipe_content_start_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_WRITE_pipe_content_start_s, 0, FSS_BASIC_LIST_WRITE_pipe_content_start_s_length);
+#endif // _di_fss_basic_list_write_defines_
+
+#ifndef _di_fss_basic_list_write_parameters_
+  const f_string_static_t fss_basic_list_write_short_file_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_WRITE_short_file_s, 0, FSS_BASIC_LIST_WRITE_short_file_s_length);
+  const f_string_static_t fss_basic_list_write_short_content_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_WRITE_short_content_s, 0, FSS_BASIC_LIST_WRITE_short_content_s_length);
+  const f_string_static_t fss_basic_list_write_short_double_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_WRITE_short_double_s, 0, FSS_BASIC_LIST_WRITE_short_double_s_length);
+  const f_string_static_t fss_basic_list_write_short_ignore_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_WRITE_short_ignore_s, 0, FSS_BASIC_LIST_WRITE_short_ignore_s_length);
+  const f_string_static_t fss_basic_list_write_short_object_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_WRITE_short_object_s, 0, FSS_BASIC_LIST_WRITE_short_object_s_length);
+  const f_string_static_t fss_basic_list_write_short_partial_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_WRITE_short_partial_s, 0, FSS_BASIC_LIST_WRITE_short_partial_s_length);
+  const f_string_static_t fss_basic_list_write_short_prepend_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_WRITE_short_prepend_s, 0, FSS_BASIC_LIST_WRITE_short_prepend_s_length);
+  const f_string_static_t fss_basic_list_write_short_single_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_WRITE_short_single_s, 0, FSS_BASIC_LIST_WRITE_short_single_s_length);
+  const f_string_static_t fss_basic_list_write_short_trim_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_WRITE_short_trim_s, 0, FSS_BASIC_LIST_WRITE_short_trim_s_length);
+
+  const f_string_static_t fss_basic_list_write_long_file_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_WRITE_long_file_s, 0, FSS_BASIC_LIST_WRITE_long_file_s_length);
+  const f_string_static_t fss_basic_list_write_long_content_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_WRITE_long_content_s, 0, FSS_BASIC_LIST_WRITE_long_content_s_length);
+  const f_string_static_t fss_basic_list_write_long_double_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_WRITE_long_double_s, 0, FSS_BASIC_LIST_WRITE_long_double_s_length);
+  const f_string_static_t fss_basic_list_write_long_ignore_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_WRITE_long_ignore_s, 0, FSS_BASIC_LIST_WRITE_long_ignore_s_length);
+  const f_string_static_t fss_basic_list_write_long_object_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_WRITE_long_object_s, 0, FSS_BASIC_LIST_WRITE_long_object_s_length);
+  const f_string_static_t fss_basic_list_write_long_partial_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_WRITE_long_partial_s, 0, FSS_BASIC_LIST_WRITE_long_partial_s_length);
+  const f_string_static_t fss_basic_list_write_long_prepend_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_WRITE_long_prepend_s, 0, FSS_BASIC_LIST_WRITE_long_prepend_s_length);
+  const f_string_static_t fss_basic_list_write_long_single_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_WRITE_long_single_s, 0, FSS_BASIC_LIST_WRITE_long_single_s_length);
+  const f_string_static_t fss_basic_list_write_long_trim_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_WRITE_long_trim_s, 0, FSS_BASIC_LIST_WRITE_long_trim_s_length);
+#endif // _di_fss_basic_list_write_parameters_
 
-    f_type_array_lengths_resize(0, &main->remaining);
-
-    macro_f_color_context_t_delete_simple(main->context);
+#ifndef _di_fss_basic_list_write_main_delete_
+  f_status_t fss_basic_list_write_main_delete(fll_program_data_t * const main) {
 
-    return F_none;
+    return fll_program_data_delete(main);
   }
 #endif // _di_fss_basic_list_write_main_delete_
 
index 816d71df0b451010803385e5b4070f4ea0e3e91d..a1a57e2284866558e9b0332c3b126118befedba5 100644 (file)
@@ -16,6 +16,9 @@
 extern "C" {
 #endif
 
+/**
+ * The program version.
+ */
 #ifndef _di_fss_basic_list_write_program_version_
   #define FSS_BASIC_LIST_WRITE_program_version_major_s F_string_ascii_0_s
   #define FSS_BASIC_LIST_WRITE_program_version_minor_s F_string_ascii_5_s
@@ -42,6 +45,9 @@ extern "C" {
   extern const f_string_static_t fss_basic_list_write_program_version_s;
 #endif // _di_fss_basic_list_write_program_version_
 
+/**
+ * The program name.
+ */
 #ifndef _di_fss_basic_list_write_program_name_
   #define FSS_BASIC_LIST_WRITE_program_name_s      "fss_basic_list_write"
   #define FSS_BASIC_LIST_WRITE_program_name_long_s "FSS Basic List Write"
@@ -53,32 +59,88 @@ extern "C" {
   extern const f_string_static_t fss_basic_list_write_program_name_long_s;
 #endif // _di_fss_basic_list_write_program_name_
 
+/**
+ * The program defines.
+ */
 #ifndef _di_fss_basic_list_write_defines_
   #define fss_basic_list_write_signal_check_d 10000
 
-  #define fss_basic_list_write_pipe_content_end_s    '\f'
-  #define fss_basic_list_write_pipe_content_ignore_s '\v'
-  #define fss_basic_list_write_pipe_content_start_s  '\b'
-
-  #define fss_basic_list_write_short_file_s    "f"
-  #define fss_basic_list_write_short_content_s "c"
-  #define fss_basic_list_write_short_double_s  "d"
-  #define fss_basic_list_write_short_ignore_s  "I"
-  #define fss_basic_list_write_short_object_s  "o"
-  #define fss_basic_list_write_short_partial_s "p"
-  #define fss_basic_list_write_short_prepend_s "P"
-  #define fss_basic_list_write_short_single_s  "s"
-  #define fss_basic_list_write_short_trim_s    "T"
-
-  #define fss_basic_list_write_long_file_s    "file"
-  #define fss_basic_list_write_long_content_s "content"
-  #define fss_basic_list_write_long_double_s  "double"
-  #define fss_basic_list_write_long_ignore_s  "ignore"
-  #define fss_basic_list_write_long_object_s  "object"
-  #define fss_basic_list_write_long_partial_s "partial"
-  #define fss_basic_list_write_long_prepend_s "prepend"
-  #define fss_basic_list_write_long_single_s  "single"
-  #define fss_basic_list_write_long_trim_s    "trim"
+  #define FSS_BASIC_LIST_WRITE_pipe_content_end_s    '\f'
+  #define FSS_BASIC_LIST_WRITE_pipe_content_ignore_s '\v'
+  #define FSS_BASIC_LIST_WRITE_pipe_content_start_s  '\b'
+
+  #define FSS_BASIC_LIST_WRITE_pipe_content_end_s_length    1
+  #define FSS_BASIC_LIST_WRITE_pipe_content_ignore_s_length 1
+  #define FSS_BASIC_LIST_WRITE_pipe_content_start_s_length  1
+
+  extern const f_string_static_t fss_basic_list_write_pipe_content_end_s;
+  extern const f_string_static_t fss_basic_list_write_pipe_content_ignore_s;
+  extern const f_string_static_t fss_basic_list_write_pipe_content_start_s;
+#endif // _di_fss_basic_list_write_defines_
+
+/**
+ * The main program parameters.
+ */
+#ifndef _di_fss_basic_list_write_parameters_
+  #define FSS_BASIC_LIST_WRITE_short_file_s    "f"
+  #define FSS_BASIC_LIST_WRITE_short_content_s "c"
+  #define FSS_BASIC_LIST_WRITE_short_double_s  "d"
+  #define FSS_BASIC_LIST_WRITE_short_ignore_s  "I"
+  #define FSS_BASIC_LIST_WRITE_short_object_s  "o"
+  #define FSS_BASIC_LIST_WRITE_short_partial_s "p"
+  #define FSS_BASIC_LIST_WRITE_short_prepend_s "P"
+  #define FSS_BASIC_LIST_WRITE_short_single_s  "s"
+  #define FSS_BASIC_LIST_WRITE_short_trim_s    "T"
+
+  #define FSS_BASIC_LIST_WRITE_long_file_s    "file"
+  #define FSS_BASIC_LIST_WRITE_long_content_s "content"
+  #define FSS_BASIC_LIST_WRITE_long_double_s  "double"
+  #define FSS_BASIC_LIST_WRITE_long_ignore_s  "ignore"
+  #define FSS_BASIC_LIST_WRITE_long_object_s  "object"
+  #define FSS_BASIC_LIST_WRITE_long_partial_s "partial"
+  #define FSS_BASIC_LIST_WRITE_long_prepend_s "prepend"
+  #define FSS_BASIC_LIST_WRITE_long_single_s  "single"
+  #define FSS_BASIC_LIST_WRITE_long_trim_s    "trim"
+
+  #define FSS_BASIC_LIST_WRITE_short_file_s_length    1
+  #define FSS_BASIC_LIST_WRITE_short_content_s_length 1
+  #define FSS_BASIC_LIST_WRITE_short_double_s_length  1
+  #define FSS_BASIC_LIST_WRITE_short_ignore_s_length  1
+  #define FSS_BASIC_LIST_WRITE_short_object_s_length  1
+  #define FSS_BASIC_LIST_WRITE_short_partial_s_length 1
+  #define FSS_BASIC_LIST_WRITE_short_prepend_s_length 1
+  #define FSS_BASIC_LIST_WRITE_short_single_s_length  1
+  #define FSS_BASIC_LIST_WRITE_short_trim_s_length    1
+
+  #define FSS_BASIC_LIST_WRITE_long_file_s_length    4
+  #define FSS_BASIC_LIST_WRITE_long_content_s_length 7
+  #define FSS_BASIC_LIST_WRITE_long_double_s_length  6
+  #define FSS_BASIC_LIST_WRITE_long_ignore_s_length  6
+  #define FSS_BASIC_LIST_WRITE_long_object_s_length  6
+  #define FSS_BASIC_LIST_WRITE_long_partial_s_length 7
+  #define FSS_BASIC_LIST_WRITE_long_prepend_s_length 7
+  #define FSS_BASIC_LIST_WRITE_long_single_s_length  6
+  #define FSS_BASIC_LIST_WRITE_long_trim_s_length    4
+
+  extern const f_string_static_t fss_basic_list_write_short_file_s;
+  extern const f_string_static_t fss_basic_list_write_short_content_s;
+  extern const f_string_static_t fss_basic_list_write_short_double_s;
+  extern const f_string_static_t fss_basic_list_write_short_ignore_s;
+  extern const f_string_static_t fss_basic_list_write_short_object_s;
+  extern const f_string_static_t fss_basic_list_write_short_partial_s;
+  extern const f_string_static_t fss_basic_list_write_short_prepend_s;
+  extern const f_string_static_t fss_basic_list_write_short_single_s;
+  extern const f_string_static_t fss_basic_list_write_short_trim_s;
+
+  extern const f_string_static_t fss_basic_list_write_long_file_s;
+  extern const f_string_static_t fss_basic_list_write_long_content_s;
+  extern const f_string_static_t fss_basic_list_write_long_double_s;
+  extern const f_string_static_t fss_basic_list_write_long_ignore_s;
+  extern const f_string_static_t fss_basic_list_write_long_object_s;
+  extern const f_string_static_t fss_basic_list_write_long_partial_s;
+  extern const f_string_static_t fss_basic_list_write_long_prepend_s;
+  extern const f_string_static_t fss_basic_list_write_long_single_s;
+  extern const f_string_static_t fss_basic_list_write_long_trim_s;
 
   enum {
     fss_basic_list_write_parameter_help_e,
@@ -113,51 +175,19 @@ extern "C" {
       macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_version_s.string, f_console_standard_long_version_s.string, 0, 0, f_console_type_inverse_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_list_write_short_file_s, fss_basic_list_write_long_file_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_list_write_short_content_s, fss_basic_list_write_long_content_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_list_write_short_double_s, fss_basic_list_write_long_double_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_list_write_short_ignore_s, fss_basic_list_write_long_ignore_s, 0, 2, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_list_write_short_object_s, fss_basic_list_write_long_object_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_list_write_short_partial_s, fss_basic_list_write_long_partial_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_list_write_short_prepend_s, fss_basic_list_write_long_prepend_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_list_write_short_single_s, fss_basic_list_write_long_single_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_list_write_short_trim_s, fss_basic_list_write_long_trim_s, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_list_write_short_file_s.string, fss_basic_list_write_long_file_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_list_write_short_content_s.string, fss_basic_list_write_long_content_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_list_write_short_double_s.string, fss_basic_list_write_long_double_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_list_write_short_ignore_s.string, fss_basic_list_write_long_ignore_s.string, 0, 2, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_list_write_short_object_s.string, fss_basic_list_write_long_object_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_list_write_short_partial_s.string, fss_basic_list_write_long_partial_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_list_write_short_prepend_s.string, fss_basic_list_write_long_prepend_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_list_write_short_single_s.string, fss_basic_list_write_long_single_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_list_write_short_trim_s.string, fss_basic_list_write_long_trim_s.string, 0, 0, f_console_type_normal_e), \
     }
 
   #define fss_basic_list_write_total_parameters_d 18
-#endif // _di_fss_basic_list_write_defines_
-
-#ifndef _di_fss_basic_list_write_main_t_
-  typedef struct {
-    f_console_parameters_t parameters;
-
-    f_array_lengths_t remaining;
-    bool process_pipe;
-
-    fl_print_t output;
-    fl_print_t error;
-    fl_print_t warning;
-
-    f_signal_t signal;
-
-    f_string_static_t prepend;
-
-    f_color_context_t context;
-  } fss_basic_list_write_main_t;
-
-  #define fss_basic_list_write_main_t_initialize \
-    { \
-      f_console_parameters_t_initialize, \
-      f_array_lengths_t_initialize, \
-      F_false, \
-      fl_print_t_initialize, \
-      macro_fl_print_t_initialize_error(), \
-      macro_fl_print_t_initialize_warning(), \
-      f_signal_t_initialize, \
-      f_string_static_t_initialize, \
-      f_color_context_t_initialize, \
-    }
-#endif // _di_fss_basic_list_write_main_t_
+#endif // _di_fss_basic_list_write_parameters_
 
 /**
  * Deallocate main.
@@ -175,7 +205,7 @@ extern "C" {
  * @see fss_basic_list_write_main()
  */
 #ifndef _di_fss_basic_list_write_main_delete_
-  extern f_status_t fss_basic_list_write_main_delete(fss_basic_list_write_main_t * const main);
+  extern f_status_t fss_basic_list_write_main_delete(fll_program_data_t * const main);
 #endif // _di_fss_basic_list_write_main_delete_
 
 #ifdef __cplusplus
index 22036498a6d31b8a952aae518e9af8bbb0dec524..13aec6115f503affa3a5f3ec7f68b2345d5d75f0 100644 (file)
@@ -6,15 +6,6 @@
 extern "C" {
 #endif
 
-#ifndef _di_fss_basic_list_write_program_version_
-  const f_string_static_t fss_basic_list_write_program_version_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_WRITE_program_version_s, 0, FSS_BASIC_LIST_WRITE_program_version_s_length);
-#endif // _di_fss_basic_list_write_program_version_
-
-#ifndef _di_fss_basic_list_write_program_name_
-  const f_string_static_t fss_basic_list_write_program_name_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_WRITE_program_name_s, 0, FSS_BASIC_LIST_WRITE_program_name_s_length);
-  const f_string_static_t fss_basic_list_write_program_name_long_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_WRITE_program_name_long_s, 0, FSS_BASIC_LIST_WRITE_program_name_long_s_length);
-#endif // _di_fss_basic_list_write_program_name_
-
 #ifndef _di_fss_basic_list_write_print_help_
   f_status_t fss_basic_list_write_print_help(const f_file_t file, const f_color_context_t context) {
 
@@ -66,7 +57,7 @@ extern "C" {
 #endif // _di_fss_basic_list_write_print_help_
 
 #ifndef _di_fss_basic_list_write_main_
-  f_status_t fss_basic_list_write_main(fss_basic_list_write_main_t * const main, const f_console_arguments_t *arguments) {
+  f_status_t fss_basic_list_write_main(fll_program_data_t * const main, const f_console_arguments_t *arguments) {
 
     f_status_t status = F_none;
 
@@ -78,7 +69,7 @@ extern "C" {
       f_console_parameter_id_t ids[3] = { fss_basic_list_write_parameter_no_color_e, fss_basic_list_write_parameter_light_e, fss_basic_list_write_parameter_dark_e };
       const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
 
-      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
+      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->context);
 
       main->output.set = &main->context.set;
       main->error.set = &main->context.set;
index dc1b8fb8cfcf1ec9224a8c37e38fbf681cf39670..ce37b35bec250ef080df38a2687e431864f86f96 100644 (file)
@@ -88,7 +88,7 @@ extern "C" {
  * @see fss_basic_list_write_main_delete()
  */
 #ifndef _di_fss_basic_list_write_main_
-  extern f_status_t fss_basic_list_write_main(fss_basic_list_write_main_t * const main, const f_console_arguments_t *arguments);
+  extern f_status_t fss_basic_list_write_main(fll_program_data_t * const main, const f_console_arguments_t *arguments);
 #endif // _di_fss_basic_list_write_main_
 
 #ifdef __cplusplus
index f847a282839eca4b65a1a621ddc44c251711ef30..bf62b5954203d19c5d329674e63c6f15cc1408bd 100644 (file)
@@ -3,7 +3,7 @@
 int main(const int argc, const f_string_t *argv) {
 
   const f_console_arguments_t arguments = { argc, argv };
-  fss_basic_list_write_main_t data = fss_basic_list_write_main_t_initialize;
+  fll_program_data_t data = fll_program_data_t_initialize;
 
   if (f_pipe_input_exists()) {
     data.process_pipe = F_true;
index 94f07d7635e44c4c8c2097e60b86edc1819ab8b6..c1b383409a3bc9b8ccc42aabb1760435968c0190 100644 (file)
@@ -6,7 +6,7 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_basic_list_write_print_signal_received_
-  void fss_basic_list_write_print_signal_received(fss_basic_list_write_main_t * const main, const f_status_t signal) {
+  void fss_basic_list_write_print_signal_received(fll_program_data_t * const main, const f_status_t signal) {
 
     if (main->warning.verbosity != f_console_verbosity_verbose_e) return;
 
@@ -24,7 +24,7 @@ extern "C" {
 #endif // _di_fss_basic_list_write_print_signal_received_
 
 #ifndef _di_fss_basic_list_write_signal_received_
-  f_status_t fss_basic_list_write_signal_received(fss_basic_list_write_main_t * const main) {
+  f_status_t fss_basic_list_write_signal_received(fll_program_data_t * const main) {
 
     if (main->signal.id == -1) {
       return F_false;
index 0493e91bb298f3be7342137701214d3dde0fd3cf..ebf42c8a2ffef8d7a660ec35b22956033b4a4f9e 100644 (file)
@@ -33,7 +33,7 @@ extern "C" {
  *   The signal received.
  */
 #ifndef _di_fss_basic_list_write_print_signal_received_
-  extern void fss_basic_list_write_print_signal_received(fss_basic_list_write_main_t * const main, const f_status_t signal) F_attribute_visibility_internal_d;
+  extern void fss_basic_list_write_print_signal_received(fll_program_data_t * const main, const f_status_t signal) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_list_write_print_signal_received_
 
 /**
@@ -51,7 +51,7 @@ extern "C" {
  * @see f_signal_read()
  */
 #ifndef _di_fss_basic_list_write_signal_received_
-  extern f_status_t fss_basic_list_write_signal_received(fss_basic_list_write_main_t * const main) F_attribute_visibility_internal_d;
+  extern f_status_t fss_basic_list_write_signal_received(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_list_write_signal_received_
 
 #ifdef __cplusplus
index e8fe7830bcc6fde2bf02cad5650f3be05bf3a6bd..a16924cfe6fed089c58d112c0218c8e66c6ce557 100644 (file)
@@ -7,7 +7,7 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_basic_list_write_error_parameter_same_times_print_
-  void fss_basic_list_write_error_parameter_same_times_print(fss_basic_list_write_main_t * const main) {
+  void fss_basic_list_write_error_parameter_same_times_print(fll_program_data_t * const main) {
 
     if (main->error.verbosity == f_console_verbosity_quiet_e) {
       return;
@@ -28,7 +28,7 @@ extern "C" {
 #endif // _di_fss_basic_list_write_error_parameter_same_times_print_
 
 #ifndef _di_fss_basic_list_write_error_parameter_unsupported_eol_print_
-  void fss_basic_list_write_error_parameter_unsupported_eol_print(fss_basic_list_write_main_t * const main) {
+  void fss_basic_list_write_error_parameter_unsupported_eol_print(fll_program_data_t * const main) {
 
     if (main->error.verbosity == f_console_verbosity_quiet_e) {
       return;
@@ -45,7 +45,7 @@ extern "C" {
 #endif // _di_fss_basic_list_write_error_parameter_unsupported_eol_print_
 
 #ifndef _di_fss_basic_list_write_error_parameter_value_missing_print_
-  void fss_basic_list_write_error_parameter_value_missing_print(fss_basic_list_write_main_t * const main, const f_string_static_t symbol, const f_string_static_t parameter) {
+  void fss_basic_list_write_error_parameter_value_missing_print(fll_program_data_t * const main, const f_string_static_t symbol, const f_string_static_t parameter) {
 
     if (main->error.verbosity == f_console_verbosity_quiet_e) {
       return;
@@ -62,7 +62,7 @@ extern "C" {
 #endif // _di_fss_basic_list_write_error_parameter_value_missing_print_
 
 #ifndef _di_fss_basic_list_write_process_
-  f_status_t fss_basic_list_write_process(fss_basic_list_write_main_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, f_string_dynamic_t *buffer) {
+  f_status_t fss_basic_list_write_process(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, f_string_dynamic_t *buffer) {
 
     f_status_t status = F_none;
     f_state_t state = macro_f_state_t_initialize(fss_basic_list_write_common_allocation_large_d, fss_basic_list_write_common_allocation_small_d, 0, 0, 0, 0, 0);
@@ -136,7 +136,7 @@ extern "C" {
 #endif // _di_fss_basic_list_write_process_
 
 #ifndef _di_fss_basic_list_write_process_pipe_
-  f_status_t fss_basic_list_write_process_pipe(fss_basic_list_write_main_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer) {
+  f_status_t fss_basic_list_write_process_pipe(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer) {
 
     f_status_t status = F_none;
     f_status_t status_pipe = F_none;
index d329d56498cfc0aa2ba494d854ff0a92aff8e44b..220962e26e3317f4d73244987b91aef7fbd55c8e 100644 (file)
@@ -19,7 +19,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_basic_list_write_error_parameter_same_times_print_
-  void fss_basic_list_write_error_parameter_same_times_print(fss_basic_list_write_main_t * const main) F_attribute_visibility_internal_d;
+  void fss_basic_list_write_error_parameter_same_times_print(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_list_write_error_parameter_same_times_print_
 
 /**
@@ -29,7 +29,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_basic_list_write_error_parameter_unsupported_eol_print_
-  void fss_basic_list_write_error_parameter_unsupported_eol_print(fss_basic_list_write_main_t * const main) F_attribute_visibility_internal_d;
+  void fss_basic_list_write_error_parameter_unsupported_eol_print(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_list_write_error_parameter_unsupported_eol_print_
 
 /**
@@ -43,7 +43,7 @@ extern "C" {
  *   The parameter name, such as "help" in "--help".
  */
 #ifndef _di_fss_basic_list_write_error_parameter_value_missing_print_
-  void fss_basic_list_write_error_parameter_value_missing_print(fss_basic_list_write_main_t * const main, const f_string_static_t symbol, const f_string_static_t parameter) F_attribute_visibility_internal_d;
+  void fss_basic_list_write_error_parameter_value_missing_print(fll_program_data_t * const main, const f_string_static_t symbol, const f_string_static_t parameter) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_list_write_error_parameter_value_missing_print_
 
 /**
@@ -70,7 +70,7 @@ extern "C" {
  *   F_failure (with error bit) for any othe failure.
  */
 #ifndef _di_fss_basic_list_write_process_
-  extern f_status_t fss_basic_list_write_process(fss_basic_list_write_main_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
+  extern f_status_t fss_basic_list_write_process(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_list_write_process_
 
 /**
@@ -91,7 +91,7 @@ extern "C" {
  *   F_failure (with error bit) for any othe failure.
  */
 #ifndef _di_fss_basic_list_write_process_pipe_
-  extern f_status_t fss_basic_list_write_process_pipe(fss_basic_list_write_main_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
+  extern f_status_t fss_basic_list_write_process_pipe(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_list_write_process_pipe_
 
 #ifdef __cplusplus
index 00b15d74502afedb0168d0e06d644c822fe85eff..bc287cd43fc69437718b94d1de62f11dce4a1e75 100644 (file)
@@ -13,15 +13,48 @@ extern "C" {
   const f_string_static_t fss_basic_read_program_name_long_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_program_name_long_s, 0, FSS_BASIC_READ_program_name_long_s_length);
 #endif // _di_fss_basic_read_program_name_
 
-#ifndef _di_fss_basic_read_main_delete_
-  f_status_t fss_basic_read_main_delete(fss_basic_read_main_t * const main) {
-
-    f_console_parameters_delete(&main->parameters);
+#ifndef _di_fss_basic_read_defines_
+  const f_string_static_t fss_basic_read_pipe_content_end_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_pipe_content_end_s, 0, FSS_BASIC_READ_pipe_content_end_s_length);
+  const f_string_static_t fss_basic_read_pipe_content_ignore_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_pipe_content_ignore_s, 0, FSS_BASIC_READ_pipe_content_ignore_s_length);
+  const f_string_static_t fss_basic_read_pipe_content_start_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_pipe_content_start_s, 0, FSS_BASIC_READ_pipe_content_start_s_length);
+#endif // _di_fss_basic_read_defines_
+
+#ifndef _di_fss_basic_read_parameters_
+  const f_string_static_t fss_basic_read_short_at_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_short_at_s, 0, FSS_BASIC_READ_short_at_s_length);
+  const f_string_static_t fss_basic_read_short_content_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_short_content_s, 0, FSS_BASIC_READ_short_content_s_length);
+  const f_string_static_t fss_basic_read_short_columns_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_short_columns_s, 0, FSS_BASIC_READ_short_columns_s_length);
+  const f_string_static_t fss_basic_read_short_delimit_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_short_delimit_s, 0, FSS_BASIC_READ_short_delimit_s_length);
+  const f_string_static_t fss_basic_read_short_depth_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_short_depth_s, 0, FSS_BASIC_READ_short_depth_s_length);
+  const f_string_static_t fss_basic_read_short_empty_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_short_empty_s, 0, FSS_BASIC_READ_short_empty_s_length);
+  const f_string_static_t fss_basic_read_short_line_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_short_line_s, 0, FSS_BASIC_READ_short_line_s_length);
+  const f_string_static_t fss_basic_read_short_name_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_short_name_s, 0, FSS_BASIC_READ_short_name_s_length);
+  const f_string_static_t fss_basic_read_short_object_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_short_object_s, 0, FSS_BASIC_READ_short_object_s_length);
+  const f_string_static_t fss_basic_read_short_pipe_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_short_pipe_s, 0, FSS_BASIC_READ_short_pipe_s_length);
+  const f_string_static_t fss_basic_read_short_raw_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_short_raw_s, 0, FSS_BASIC_READ_short_raw_s_length);
+  const f_string_static_t fss_basic_read_short_select_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_short_select_s, 0, FSS_BASIC_READ_short_select_s_length);
+  const f_string_static_t fss_basic_read_short_total_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_short_total_s, 0, FSS_BASIC_READ_short_total_s_length);
+  const f_string_static_t fss_basic_read_short_trim_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_short_trim_s, 0, FSS_BASIC_READ_short_trim_s_length);
+
+  const f_string_static_t fss_basic_read_long_at_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_long_at_s, 0, FSS_BASIC_READ_long_at_s_length);
+  const f_string_static_t fss_basic_read_long_content_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_long_content_s, 0, FSS_BASIC_READ_long_content_s_length);
+  const f_string_static_t fss_basic_read_long_columns_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_long_columns_s, 0, FSS_BASIC_READ_long_columns_s_length);
+  const f_string_static_t fss_basic_read_long_delimit_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_long_delimit_s, 0, FSS_BASIC_READ_long_delimit_s_length);
+  const f_string_static_t fss_basic_read_long_depth_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_long_depth_s, 0, FSS_BASIC_READ_long_depth_s_length);
+  const f_string_static_t fss_basic_read_long_empty_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_long_empty_s, 0, FSS_BASIC_READ_long_empty_s_length);
+  const f_string_static_t fss_basic_read_long_line_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_long_line_s, 0, FSS_BASIC_READ_long_line_s_length);
+  const f_string_static_t fss_basic_read_long_name_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_long_name_s, 0, FSS_BASIC_READ_long_name_s_length);
+  const f_string_static_t fss_basic_read_long_object_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_long_object_s, 0, FSS_BASIC_READ_long_object_s_length);
+  const f_string_static_t fss_basic_read_long_pipe_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_long_pipe_s, 0, FSS_BASIC_READ_long_pipe_s_length);
+  const f_string_static_t fss_basic_read_long_raw_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_long_raw_s, 0, FSS_BASIC_READ_long_raw_s_length);
+  const f_string_static_t fss_basic_read_long_select_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_long_select_s, 0, FSS_BASIC_READ_long_select_s_length);
+  const f_string_static_t fss_basic_read_long_total_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_long_total_s, 0, FSS_BASIC_READ_long_total_s_length);
+  const f_string_static_t fss_basic_read_long_trim_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_long_trim_s, 0, FSS_BASIC_READ_long_trim_s_length);
+#endif // _di_fss_basic_read_parameters_
 
-    f_type_array_lengths_resize(0, &main->remaining);
-    macro_f_color_context_t_delete_simple(main->context);
+#ifndef _di_fss_basic_read_main_delete_
+  f_status_t fss_basic_read_main_delete(fll_program_data_t * const main) {
 
-    return F_none;
+    return fll_program_data_delete(main);
   }
 #endif // _di_fss_basic_read_main_delete_
 
index a157de512dffe4c9c25dd103f9e18d24d1c0abae..be67b79941789361b64b5aadc3e81e5348e20973 100644 (file)
@@ -16,6 +16,9 @@
 extern "C" {
 #endif
 
+/**
+ * The program version.
+ */
 #ifndef _di_fss_basic_read_program_version_
   #define FSS_BASIC_READ_program_version_major_s F_string_ascii_0_s
   #define FSS_BASIC_READ_program_version_minor_s F_string_ascii_5_s
@@ -42,6 +45,9 @@ extern "C" {
   extern const f_string_static_t fss_basic_read_program_version_s;
 #endif // _di_fss_basic_read_program_version_
 
+/**
+ * The program name.
+ */
 #ifndef _di_fss_basic_read_program_name_
   #define FSS_BASIC_READ_program_name_s      "fss_basic_read"
   #define FSS_BASIC_READ_program_name_long_s "FSS Basic Read"
@@ -53,42 +59,118 @@ extern "C" {
   extern const f_string_static_t fss_basic_read_program_name_long_s;
 #endif // _di_fss_basic_read_program_name_
 
+/**
+ * The program defines.
+ */
 #ifndef _di_fss_basic_read_defines_
   #define fss_basic_read_signal_check_d 10000
 
-  #define fss_basic_read_pipe_content_end_s    '\f'
-  #define fss_basic_read_pipe_content_ignore_s '\v'
-  #define fss_basic_read_pipe_content_start_s  '\b'
-
-  #define fss_basic_read_short_at_s      "a"
-  #define fss_basic_read_short_content_s "c"
-  #define fss_basic_read_short_columns_s "C"
-  #define fss_basic_read_short_delimit_s "D"
-  #define fss_basic_read_short_depth_s   "d"
-  #define fss_basic_read_short_empty_s   "e"
-  #define fss_basic_read_short_line_s    "l"
-  #define fss_basic_read_short_name_s    "n"
-  #define fss_basic_read_short_object_s  "o"
-  #define fss_basic_read_short_pipe_s    "p"
-  #define fss_basic_read_short_raw_s     "R"
-  #define fss_basic_read_short_select_s  "s"
-  #define fss_basic_read_short_total_s   "t"
-  #define fss_basic_read_short_trim_s    "T"
-
-  #define fss_basic_read_long_at_s      "at"
-  #define fss_basic_read_long_content_s "content"
-  #define fss_basic_read_long_columns_s "columns"
-  #define fss_basic_read_long_delimit_s "delimit"
-  #define fss_basic_read_long_depth_s   "depth"
-  #define fss_basic_read_long_empty_s   "empty"
-  #define fss_basic_read_long_line_s    "line"
-  #define fss_basic_read_long_name_s    "name"
-  #define fss_basic_read_long_object_s  "object"
-  #define fss_basic_read_long_pipe_s    "pipe"
-  #define fss_basic_read_long_raw_s     "raw"
-  #define fss_basic_read_long_select_s  "select"
-  #define fss_basic_read_long_total_s   "total"
-  #define fss_basic_read_long_trim_s    "trim"
+  #define FSS_BASIC_READ_pipe_content_end_s    "\f"
+  #define FSS_BASIC_READ_pipe_content_ignore_s "\v"
+  #define FSS_BASIC_READ_pipe_content_start_s  "\b"
+
+  #define FSS_BASIC_READ_pipe_content_end_s_length    1
+  #define FSS_BASIC_READ_pipe_content_ignore_s_length 1
+  #define FSS_BASIC_READ_pipe_content_start_s_length  1
+
+  extern const f_string_static_t fss_basic_read_pipe_content_end_s;
+  extern const f_string_static_t fss_basic_read_pipe_content_ignore_s;
+  extern const f_string_static_t fss_basic_read_pipe_content_start_s;
+#endif // _di_fss_basic_read_defines_
+
+/**
+ * The main program parameters.
+ */
+#ifndef _di_fss_basic_read_parameters_
+  #define FSS_BASIC_READ_short_at_s      "a"
+  #define FSS_BASIC_READ_short_content_s "c"
+  #define FSS_BASIC_READ_short_columns_s "C"
+  #define FSS_BASIC_READ_short_delimit_s "D"
+  #define FSS_BASIC_READ_short_depth_s   "d"
+  #define FSS_BASIC_READ_short_empty_s   "e"
+  #define FSS_BASIC_READ_short_line_s    "l"
+  #define FSS_BASIC_READ_short_name_s    "n"
+  #define FSS_BASIC_READ_short_object_s  "o"
+  #define FSS_BASIC_READ_short_pipe_s    "p"
+  #define FSS_BASIC_READ_short_raw_s     "R"
+  #define FSS_BASIC_READ_short_select_s  "s"
+  #define FSS_BASIC_READ_short_total_s   "t"
+  #define FSS_BASIC_READ_short_trim_s    "T"
+
+  #define FSS_BASIC_READ_long_at_s      "at"
+  #define FSS_BASIC_READ_long_content_s "content"
+  #define FSS_BASIC_READ_long_columns_s "columns"
+  #define FSS_BASIC_READ_long_delimit_s "delimit"
+  #define FSS_BASIC_READ_long_depth_s   "depth"
+  #define FSS_BASIC_READ_long_empty_s   "empty"
+  #define FSS_BASIC_READ_long_line_s    "line"
+  #define FSS_BASIC_READ_long_name_s    "name"
+  #define FSS_BASIC_READ_long_object_s  "object"
+  #define FSS_BASIC_READ_long_pipe_s    "pipe"
+  #define FSS_BASIC_READ_long_raw_s     "raw"
+  #define FSS_BASIC_READ_long_select_s  "select"
+  #define FSS_BASIC_READ_long_total_s   "total"
+  #define FSS_BASIC_READ_long_trim_s    "trim"
+
+  #define FSS_BASIC_READ_short_at_s_length      1
+  #define FSS_BASIC_READ_short_content_s_length 1
+  #define FSS_BASIC_READ_short_columns_s_length 1
+  #define FSS_BASIC_READ_short_delimit_s_length 1
+  #define FSS_BASIC_READ_short_depth_s_length   1
+  #define FSS_BASIC_READ_short_empty_s_length   1
+  #define FSS_BASIC_READ_short_line_s_length    1
+  #define FSS_BASIC_READ_short_name_s_length    1
+  #define FSS_BASIC_READ_short_object_s_length  1
+  #define FSS_BASIC_READ_short_pipe_s_length    1
+  #define FSS_BASIC_READ_short_raw_s_length     1
+  #define FSS_BASIC_READ_short_select_s_length  1
+  #define FSS_BASIC_READ_short_total_s_length   1
+  #define FSS_BASIC_READ_short_trim_s_length    1
+
+  #define FSS_BASIC_READ_long_at_s_length      2
+  #define FSS_BASIC_READ_long_content_s_length 7
+  #define FSS_BASIC_READ_long_columns_s_length 7
+  #define FSS_BASIC_READ_long_delimit_s_length 7
+  #define FSS_BASIC_READ_long_depth_s_length   5
+  #define FSS_BASIC_READ_long_empty_s_length   5
+  #define FSS_BASIC_READ_long_line_s_length    4
+  #define FSS_BASIC_READ_long_name_s_length    4
+  #define FSS_BASIC_READ_long_object_s_length  6
+  #define FSS_BASIC_READ_long_pipe_s_length    4
+  #define FSS_BASIC_READ_long_raw_s_length     3
+  #define FSS_BASIC_READ_long_select_s_length  6
+  #define FSS_BASIC_READ_long_total_s_length   5
+  #define FSS_BASIC_READ_long_trim_s_length    4
+
+  extern const f_string_static_t fss_basic_read_short_at_s;
+  extern const f_string_static_t fss_basic_read_short_content_s;
+  extern const f_string_static_t fss_basic_read_short_columns_s;
+  extern const f_string_static_t fss_basic_read_short_delimit_s;
+  extern const f_string_static_t fss_basic_read_short_depth_s;
+  extern const f_string_static_t fss_basic_read_short_empty_s;
+  extern const f_string_static_t fss_basic_read_short_line_s;
+  extern const f_string_static_t fss_basic_read_short_name_s;
+  extern const f_string_static_t fss_basic_read_short_object_s;
+  extern const f_string_static_t fss_basic_read_short_pipe_s;
+  extern const f_string_static_t fss_basic_read_short_raw_s;
+  extern const f_string_static_t fss_basic_read_short_select_s;
+  extern const f_string_static_t fss_basic_read_short_total_s;
+  extern const f_string_static_t fss_basic_read_short_trim_s;
+
+  extern const f_string_static_t fss_basic_read_long_at_s;
+  extern const f_string_static_t fss_basic_read_long_content_s;
+  extern const f_string_static_t fss_basic_read_long_columns_s;
+  extern const f_string_static_t fss_basic_read_long_delimit_s;
+  extern const f_string_static_t fss_basic_read_long_depth_s;
+  extern const f_string_static_t fss_basic_read_long_empty_s;
+  extern const f_string_static_t fss_basic_read_long_line_s;
+  extern const f_string_static_t fss_basic_read_long_name_s;
+  extern const f_string_static_t fss_basic_read_long_object_s;
+  extern const f_string_static_t fss_basic_read_long_pipe_s;
+  extern const f_string_static_t fss_basic_read_long_raw_s;
+  extern const f_string_static_t fss_basic_read_long_select_s;
+  extern const f_string_static_t fss_basic_read_long_total_s;
+  extern const f_string_static_t fss_basic_read_long_trim_s;
 
   enum {
     fss_basic_read_parameter_help_e,
@@ -128,24 +210,24 @@ extern "C" {
       macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_version_s.string, f_console_standard_long_version_s.string, 0, 0, f_console_type_inverse_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_read_short_at_s, fss_basic_read_long_at_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_read_short_content_s, fss_basic_read_long_content_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_read_short_columns_s, fss_basic_read_long_columns_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_read_short_delimit_s, fss_basic_read_long_delimit_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_read_short_depth_s, fss_basic_read_long_depth_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_read_short_empty_s, fss_basic_read_long_empty_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_read_short_line_s, fss_basic_read_long_line_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_read_short_name_s, fss_basic_read_long_name_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_read_short_object_s, fss_basic_read_long_object_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_read_short_pipe_s, fss_basic_read_long_pipe_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_read_short_raw_s, fss_basic_read_long_raw_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_read_short_select_s, fss_basic_read_long_select_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_read_short_total_s, fss_basic_read_long_total_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_read_short_trim_s, fss_basic_read_long_trim_s, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_read_short_at_s.string, fss_basic_read_long_at_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_read_short_content_s.string, fss_basic_read_long_content_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_read_short_columns_s.string, fss_basic_read_long_columns_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_read_short_delimit_s.string, fss_basic_read_long_delimit_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_read_short_depth_s.string, fss_basic_read_long_depth_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_read_short_empty_s.string, fss_basic_read_long_empty_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_read_short_line_s.string, fss_basic_read_long_line_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_read_short_name_s.string, fss_basic_read_long_name_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_read_short_object_s.string, fss_basic_read_long_object_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_read_short_pipe_s.string, fss_basic_read_long_pipe_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_read_short_raw_s.string, fss_basic_read_long_raw_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_read_short_select_s.string, fss_basic_read_long_select_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_read_short_total_s.string, fss_basic_read_long_total_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_read_short_trim_s.string, fss_basic_read_long_trim_s.string, 0, 0, f_console_type_normal_e), \
     }
 
   #define fss_basic_read_total_parameters_d 23
-#endif // _di_fss_basic_read_defines_
+#endif // _di_fss_basic_read_parameters_
 
 /**
  * FSS Delimit Parameter data.
@@ -186,35 +268,6 @@ extern "C" {
   };
 #endif // _di_fss_basic_read_delimit_modes_
 
-#ifndef _di_fss_basic_read_main_t_
-  typedef struct {
-    f_console_parameters_t parameters;
-
-    f_array_lengths_t remaining;
-    bool process_pipe;
-
-    fl_print_t output;
-    fl_print_t error;
-    fl_print_t warning;
-
-    f_signal_t signal;
-
-    f_color_context_t context;
-  } fss_basic_read_main_t;
-
-  #define fss_basic_read_main_t_initialize \
-    { \
-      f_console_parameters_t_initialize, \
-      f_array_lengths_t_initialize, \
-      F_false, \
-      fl_print_t_initialize, \
-      macro_fl_print_t_initialize_error(), \
-      macro_fl_print_t_initialize_warning(), \
-      f_signal_t_initialize, \
-      f_color_context_t_initialize, \
-    }
-#endif // _di_fss_basic_read_main_t_
-
 /**
  * Deallocate main.
  *
@@ -231,7 +284,7 @@ extern "C" {
  * @see fss_basic_read_main()
  */
 #ifndef _di_fss_basic_read_main_delete_
-  extern f_status_t fss_basic_read_main_delete(fss_basic_read_main_t * const main);
+  extern f_status_t fss_basic_read_main_delete(fll_program_data_t * const main);
 #endif // _di_fss_basic_read_main_delete_
 
 #ifdef __cplusplus
index a6ab07455cc2d2496b48d27e793fc2665794f89d..f687e157fd56e996a962bf0f2cd55869e5568a83 100644 (file)
@@ -7,15 +7,6 @@
 extern "C" {
 #endif
 
-#ifndef _di_fss_basic_read_program_version_
-  const f_string_static_t fss_basic_read_program_version_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_program_version_s, 0, FSS_BASIC_READ_program_version_s_length);
-#endif // _di_fss_basic_read_program_version_
-
-#ifndef _di_fss_basic_read_program_name_
-  const f_string_static_t fss_basic_read_program_name_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_program_name_s, 0, FSS_BASIC_READ_program_name_s_length);
-  const f_string_static_t fss_basic_read_program_name_long_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_program_name_long_s, 0, FSS_BASIC_READ_program_name_long_s_length);
-#endif // _di_fss_basic_read_program_name_
-
 #ifndef _di_fss_basic_read_print_help_
   f_status_t fss_basic_read_print_help(const f_file_t file, const f_color_context_t context) {
 
@@ -50,7 +41,7 @@ extern "C" {
     fll_program_print_help_option(file, context, fss_basic_read_short_total_s, fss_basic_read_long_total_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "   Print the total number of lines.");
     fll_program_print_help_option(file, context, fss_basic_read_short_trim_s, fss_basic_read_long_trim_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "    Trim Object names on select or print.");
 
-    fll_program_print_help_usage(file, context, fss_basic_read_program_name_s, "filename(s)");
+    fll_program_print_help_usage(file, context, fss_basic_read_program_name_s, fll_program_parameter_filenames_s);
 
     fl_print_format(" %[Notes:%]%r", file.stream, context.set.important, context.set.important, f_string_eol_s);
 
@@ -127,7 +118,7 @@ extern "C" {
 #endif // _di_fss_basic_read_print_help_
 
 #ifndef _di_fss_basic_read_main_
-  f_status_t fss_basic_read_main(fss_basic_read_main_t * const main, const f_console_arguments_t *arguments) {
+  f_status_t fss_basic_read_main(fll_program_data_t * const main, const f_console_arguments_t *arguments) {
 
     f_status_t status = F_none;
 
@@ -139,7 +130,7 @@ extern "C" {
       f_console_parameter_id_t ids[3] = { fss_basic_read_parameter_no_color_e, fss_basic_read_parameter_light_e, fss_basic_read_parameter_dark_e };
       const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
 
-      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
+      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->context);
 
       main->output.set = &main->context.set;
       main->error.set = &main->context.set;
@@ -225,17 +216,17 @@ extern "C" {
     }
 
     // Provide a range designating where within the buffer a particular file exists, using a statically allocated array.
-    fss_basic_read_file_t files_array[main->remaining.used + 1];
+    fss_basic_read_file_t files_array[main->parameters.remaining.used + 1];
     fss_basic_read_data_t data = fss_basic_read_data_t_initialize;
 
     data.files.array = files_array;
     data.files.used = 1;
-    data.files.size = main->remaining.used + 1;
+    data.files.size = main->parameters.remaining.used + 1;
     data.files.array[0].name = "(pipe)";
     data.files.array[0].range.start = 1;
     data.files.array[0].range.stop = 0;
 
-    if (main->remaining.used || main->process_pipe) {
+    if (main->parameters.remaining.used || main->process_pipe) {
       {
         const f_array_length_t parameter_code[] = {
           fss_basic_read_parameter_at_e,
@@ -561,11 +552,11 @@ extern "C" {
         }
       }
 
-      if (F_status_is_error_not(status) && main->remaining.used > 0) {
+      if (F_status_is_error_not(status) && main->parameters.remaining.used > 0) {
         f_file_t file = f_file_t_initialize;
         f_array_length_t size_file = 0;
 
-        for (f_array_length_t i = 0; i < main->remaining.used; ++i) {
+        for (f_array_length_t i = 0; i < main->parameters.remaining.used; ++i) {
 
           if (fss_basic_read_signal_received(main)) {
             status = F_status_set_error(F_signal);
@@ -576,10 +567,10 @@ extern "C" {
           file.stream = 0;
           file.id = -1;
 
-          status = f_file_stream_open(arguments->argv[main->remaining.array[i]], 0, &file);
+          status = f_file_stream_open(arguments->argv[main->parameters.remaining.array[i]], 0, &file);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e);
 
             break;
           }
@@ -588,7 +579,7 @@ extern "C" {
           status = f_file_size_by_id(file.id, &size_file);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
             break;
           }
@@ -597,7 +588,7 @@ extern "C" {
             status = f_string_dynamic_resize(data.buffer.size + size_file, &data.buffer);
 
             if (F_status_is_error(status)) {
-              fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+              fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
               break;
             }
@@ -605,13 +596,13 @@ extern "C" {
             status = f_file_stream_read(file, &data.buffer);
 
             if (F_status_is_error(status)) {
-              fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+              fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
               break;
             }
 
             if (data.buffer.used > data.files.array[data.files.used].range.start) {
-              data.files.array[data.files.used].name = arguments->argv[main->remaining.array[i]];
+              data.files.array[data.files.used].name = arguments->argv[main->parameters.remaining.array[i]];
               data.files.array[data.files.used++].range.stop = data.buffer.used - 1;
 
               // This standard is newline sensitive, when appending files to the buffer if the file lacks a final newline then this could break the format for files appended thereafter.
index fb2b8226bf1452b65d18c87fdfcfbfa0b304f8d2..a11835dffc52e0750bc0c43df5ddfa88f20e5b72 100644 (file)
@@ -7,7 +7,7 @@
  *
  * This is the FSS Basic Read program
  * This program utilizes the Featureless Linux Library.
- * This program processes files or other input in fss format and stores the results in the fss_basic_read_main_t.
+ * This program processes files or other input in fss format and stores the results in the fll_program_data_t.
  *
  * This processes in accordance to the FSS-0000 Basic specification.
  */
@@ -96,7 +96,7 @@ extern "C" {
  * @see fss_basic_read_main_delete()
  */
 #ifndef _di_fss_basic_read_main_
-  extern f_status_t fss_basic_read_main(fss_basic_read_main_t * const main, const f_console_arguments_t *arguments);
+  extern f_status_t fss_basic_read_main(fll_program_data_t * const main, const f_console_arguments_t *arguments);
 #endif // _di_fss_basic_read_main_
 
 #ifdef __cplusplus
index 38a29b15528f5490687a443d0a3f823ded3821c5..79d532f3f39a2520cd851d133117dd652c4be1bf 100644 (file)
@@ -3,7 +3,7 @@
 int main(const int argc, const f_string_t *argv) {
 
   f_console_arguments_t arguments = { argc, argv };
-  fss_basic_read_main_t data = fss_basic_read_main_t_initialize;
+  fll_program_data_t data = fll_program_data_t_initialize;
 
   if (f_pipe_input_exists()) {
     data.process_pipe = F_true;
index 0dcd5e26823bd456e49a359c17530a496817b3b7..1961d073e17231b3521a536901324dd65dab74ec 100644 (file)
@@ -57,7 +57,7 @@ extern "C" {
 #endif // _di_fss_basic_read_depths_resize_
 
 #ifndef _di_fss_basic_read_print_signal_received_
-  void fss_basic_read_print_signal_received(fss_basic_read_main_t * const main, const f_status_t signal) {
+  void fss_basic_read_print_signal_received(fll_program_data_t * const main, const f_status_t signal) {
 
     if (main->warning.verbosity != f_console_verbosity_verbose_e) return;
 
@@ -75,7 +75,7 @@ extern "C" {
 #endif // _di_fss_basic_read_print_signal_received_
 
 #ifndef _di_fss_basic_read_signal_received_
-  f_status_t fss_basic_read_signal_received(fss_basic_read_main_t * const main) {
+  f_status_t fss_basic_read_signal_received(fll_program_data_t * const main) {
 
     if (main->signal.id == -1) {
       return F_false;
index 3ce37ce3fc1cd20a6c7a2060e017a085d1ec2ae5..8cc0c3705cfdcb66dc9ae00af963566dd4229ac4 100644 (file)
@@ -252,7 +252,7 @@ extern "C" {
  *   The signal received.
  */
 #ifndef _di_fss_basic_read_print_signal_received_
-  extern void fss_basic_read_print_signal_received(fss_basic_read_main_t * const main, const f_status_t signal) F_attribute_visibility_internal_d;
+  extern void fss_basic_read_print_signal_received(fll_program_data_t * const main, const f_status_t signal) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_read_print_signal_received_
 
 /**
@@ -270,7 +270,7 @@ extern "C" {
  * @see f_signal_read()
  */
 #ifndef _di_fss_basic_read_signal_received_
-  extern f_status_t fss_basic_read_signal_received(fss_basic_read_main_t * const main);
+  extern f_status_t fss_basic_read_signal_received(fll_program_data_t * const main);
 #endif // _di_fss_basic_read_signal_received_
 
 #ifdef __cplusplus
index 1f74fcb4ca49d0dab00c7ae4c70138ab60d5bdc3..7b406c956990d32524608968312f89bcfcd27fb0 100644 (file)
@@ -7,7 +7,7 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_basic_read_print_at_
-  void fss_basic_read_print_at(fss_basic_read_main_t * const main, const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_basic_read_data_t * const data) {
+  void fss_basic_read_print_at(fll_program_data_t * const main, const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_basic_read_data_t * const data) {
 
     if (at >= data->contents.used) {
       return;
@@ -72,7 +72,7 @@ extern "C" {
 #endif // _di_fss_basic_read_print_at_
 
 #ifndef _di_fss_basic_read_print_object_end_
-  void fss_basic_read_print_object_end(fss_basic_read_main_t * const main) {
+  void fss_basic_read_print_object_end(fll_program_data_t * const main) {
 
     if (main->parameters.array[fss_basic_read_parameter_pipe_e].result == f_console_result_found_e) {
       f_print_character(fss_basic_read_pipe_content_start_s, main->output.to.stream);
@@ -84,7 +84,7 @@ extern "C" {
 #endif // _di_fss_basic_read_print_object_end_
 
 #ifndef _di_fss_basic_read_print_one_
-  void fss_basic_read_print_one(fss_basic_read_main_t * const main) {
+  void fss_basic_read_print_one(fll_program_data_t * const main) {
 
     f_print_character(f_string_ascii_1_s.string[0], main->output.to.stream);
     f_print_dynamic_raw(f_string_eol_s, main->output.to.stream);
@@ -92,7 +92,7 @@ extern "C" {
 #endif // _di_fss_basic_read_print_one_
 
 #ifndef _di_fss_basic_read_print_set_end_
-  void fss_basic_read_print_set_end(fss_basic_read_main_t * const main) {
+  void fss_basic_read_print_set_end(fll_program_data_t * const main) {
 
     if (main->parameters.array[fss_basic_read_parameter_pipe_e].result == f_console_result_found_e) {
       f_print_character(fss_basic_read_pipe_content_end_s, main->output.to.stream);
@@ -104,7 +104,7 @@ extern "C" {
 #endif // _di_fss_basic_read_print_set_end_
 
 #ifndef _di_fss_basic_read_print_zero_
-  void fss_basic_read_print_zero(fss_basic_read_main_t * const main) {
+  void fss_basic_read_print_zero(fll_program_data_t * const main) {
 
     f_print_character(f_string_ascii_0_s.string[0], main->output.to.stream);
     f_print_dynamic_raw(f_string_eol_s, main->output.to.stream);
index 5ac0017093490f2b31ec2ba0bf349219cc16d656..2f6941aa9b5944b6a0f6ae754d388f6c1becc123 100644 (file)
@@ -29,7 +29,7 @@ extern "C" {
  *   The program data.
  */
 #ifndef _di_fss_basic_read_print_at_
-  extern void fss_basic_read_print_at(fss_basic_read_main_t * const main, const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_basic_read_data_t * const data) F_attribute_visibility_internal_d;
+  extern void fss_basic_read_print_at(fll_program_data_t * const main, const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_basic_read_data_t * const data) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_read_print_at_
 
 /**
@@ -39,7 +39,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_basic_read_print_object_end_
-  extern void fss_basic_read_print_object_end(fss_basic_read_main_t * const main) F_attribute_visibility_internal_d;
+  extern void fss_basic_read_print_object_end(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_read_print_object_end_
 
 /**
@@ -49,7 +49,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_basic_read_print_one_
-  extern void fss_basic_read_print_one(fss_basic_read_main_t * const main) F_attribute_visibility_internal_d;
+  extern void fss_basic_read_print_one(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_read_print_one_
 
 /**
@@ -59,7 +59,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_basic_read_print_set_end_
-  extern void fss_basic_read_print_set_end(fss_basic_read_main_t * const main) F_attribute_visibility_internal_d;
+  extern void fss_basic_read_print_set_end(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_read_print_set_end_
 
 /**
@@ -69,7 +69,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_basic_read_print_zero_
-  extern void fss_basic_read_print_zero(fss_basic_read_main_t * const main) F_attribute_visibility_internal_d;
+  extern void fss_basic_read_print_zero(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_read_print_zero_
 
 #ifdef __cplusplus
index d69cdc4af1a4e1fdfc8830a39c9c8013259e60ef..3089404c973744d1f135fd9ca3befb6f9f26ffa5 100644 (file)
@@ -33,7 +33,7 @@ extern "C" {
 #endif // _di_fss_basic_read_delimit_object_is_
 
 #ifndef _di_fss_basic_read_depth_process_
-  f_status_t fss_basic_read_depth_process(fss_basic_read_main_t * const main, const f_console_arguments_t *arguments, fss_basic_read_data_t *data) {
+  f_status_t fss_basic_read_depth_process(fll_program_data_t * const main, const f_console_arguments_t *arguments, fss_basic_read_data_t *data) {
 
     f_status_t status = F_none;
 
@@ -213,7 +213,7 @@ extern "C" {
 #endif // _di_fss_basic_read_file_identify_
 
 #ifndef _di_fss_basic_read_load_
-  f_status_t fss_basic_read_load(fss_basic_read_main_t * const main, fss_basic_read_data_t *data) {
+  f_status_t fss_basic_read_load(fll_program_data_t * const main, fss_basic_read_data_t *data) {
 
     f_state_t state = macro_f_state_t_initialize(fss_basic_read_common_allocation_large_d, fss_basic_read_delimit_common_allocation_small_d, 0, 0, 0, 0, 0);
     f_string_range_t input = macro_f_string_range_t_initialize(data->buffer.used);
@@ -246,7 +246,7 @@ extern "C" {
 #endif // _di_fss_basic_read_load_
 
 #ifndef _di_fss_basic_read_load_number_
-  f_status_t fss_basic_read_load_number(fss_basic_read_main_t * const main, const f_array_length_t parameter, const f_string_t name, const f_console_arguments_t *arguments, f_number_unsigned_t *number) {
+  f_status_t fss_basic_read_load_number(fll_program_data_t * const main, const f_array_length_t parameter, const f_string_t name, const f_console_arguments_t *arguments, f_number_unsigned_t *number) {
 
     if (main->parameters.array[parameter].result == f_console_result_additional_e) {
       const f_array_length_t index = main->parameters.array[parameter].values.array[main->parameters.array[parameter].values.used - 1];
@@ -268,7 +268,7 @@ extern "C" {
 #endif // _di_fss_basic_read_load_number_
 
 #ifndef _di_fss_basic_read_process_
-  f_status_t fss_basic_read_process(fss_basic_read_main_t * const main, const f_console_arguments_t *arguments, fss_basic_read_data_t *data) {
+  f_status_t fss_basic_read_process(fll_program_data_t * const main, const f_console_arguments_t *arguments, fss_basic_read_data_t *data) {
 
     f_status_t status = fss_basic_read_process_option(main, arguments, data);
     if (F_status_is_error(status)) return status;
@@ -325,7 +325,7 @@ extern "C" {
 #endif // _di_fss_basic_read_process_
 
 #ifndef _di_fss_basic_read_process_at_
-  f_status_t fss_basic_read_process_at(fss_basic_read_main_t * const main, fss_basic_read_data_t *data, bool names[]) {
+  f_status_t fss_basic_read_process_at(fll_program_data_t * const main, fss_basic_read_data_t *data, bool names[]) {
 
     if (data->depths.array[0].value_at >= data->objects.used) {
       if (data->option & (fss_basic_read_data_option_columns_d | fss_basic_read_data_option_total_d)) {
@@ -422,7 +422,7 @@ extern "C" {
 #endif // _di_fss_basic_read_process_at_
 
 #ifndef _di_fss_basic_read_process_columns_
-  f_status_t fss_basic_read_process_columns(fss_basic_read_main_t * const main, fss_basic_read_data_t *data, bool names[]) {
+  f_status_t fss_basic_read_process_columns(fll_program_data_t * const main, fss_basic_read_data_t *data, bool names[]) {
 
     if (!(data->option & fss_basic_read_data_option_content_d)) {
       flockfile(main->output.to.stream);
@@ -456,7 +456,7 @@ extern "C" {
 #endif // _di_fss_basic_read_process_columns_
 
 #ifndef _di_fss_basic_read_process_line_
-  f_status_t fss_basic_read_process_line(fss_basic_read_main_t * const main, fss_basic_read_data_t *data, bool names[]) {
+  f_status_t fss_basic_read_process_line(fll_program_data_t * const main, fss_basic_read_data_t *data, bool names[]) {
 
     f_array_lengths_t except_none = f_array_lengths_t_initialize;
     f_array_lengths_t *delimits = fss_basic_read_delimit_object_is(0, data) ? &data->delimits : &except_none;
@@ -540,7 +540,7 @@ extern "C" {
 #endif // _di_fss_basic_read_process_name_
 
 #ifndef _di_fss_basic_read_process_option_
-  f_status_t fss_basic_read_process_option(fss_basic_read_main_t * const main, const f_console_arguments_t *arguments, fss_basic_read_data_t *data) {
+  f_status_t fss_basic_read_process_option(fll_program_data_t * const main, const f_console_arguments_t *arguments, fss_basic_read_data_t *data) {
 
     f_status_t status = F_none;
 
@@ -604,7 +604,7 @@ extern "C" {
 #endif // _di_fss_basic_read_process_option_
 
 #ifndef _di_fss_basic_read_process_total_
-  f_status_t fss_basic_read_process_total(fss_basic_read_main_t * const main, fss_basic_read_data_t *data, bool names[]) {
+  f_status_t fss_basic_read_process_total(fll_program_data_t * const main, fss_basic_read_data_t *data, bool names[]) {
 
     f_array_length_t total = 0;
 
index 085983422d1d74995df4eacc702802afed5738d3..b85bbc9a257a93121576493f4816328e60eafd4d 100644 (file)
@@ -56,7 +56,7 @@ extern "C" {
  * @see fss_basic_read_depths_resize()
  */
 #ifndef _di_fss_basic_read_depth_process_
-  extern f_status_t fss_basic_read_depth_process(fss_basic_read_main_t * const main, const f_console_arguments_t *arguments, fss_basic_read_data_t *data) F_attribute_visibility_internal_d;
+  extern f_status_t fss_basic_read_depth_process(fll_program_data_t * const main, const f_console_arguments_t *arguments, fss_basic_read_data_t *data) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_read_depth_process_
 
 /**
@@ -100,7 +100,7 @@ extern "C" {
  * @see fss_basic_read_process_option()
  */
 #ifndef _di_fss_basic_read_load_
-  extern f_status_t fss_basic_read_load(fss_basic_read_main_t * const main, fss_basic_read_data_t *data) F_attribute_visibility_internal_d;
+  extern f_status_t fss_basic_read_load(fll_program_data_t * const main, fss_basic_read_data_t *data) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_read_load_
 
 /**
@@ -130,7 +130,7 @@ extern "C" {
  * @see fss_basic_read_depths_resize()
  */
 #ifndef _di_fss_basic_read_load_number_
-  extern f_status_t fss_basic_read_load_number(fss_basic_read_main_t * const main, const f_array_length_t parameter, const f_string_t name, const f_console_arguments_t *arguments, f_number_unsigned_t *number) F_attribute_visibility_internal_d;
+  extern f_status_t fss_basic_read_load_number(fll_program_data_t * const main, const f_array_length_t parameter, const f_string_t name, const f_console_arguments_t *arguments, f_number_unsigned_t *number) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_read_load_number_
 
 /**
@@ -155,7 +155,7 @@ extern "C" {
  * @see fss_basic_read_process_option()
  */
 #ifndef _di_fss_basic_read_process_
-  extern f_status_t fss_basic_read_process(fss_basic_read_main_t * const main, const f_console_arguments_t *arguments, fss_basic_read_data_t *data) F_attribute_visibility_internal_d;
+  extern f_status_t fss_basic_read_process(fll_program_data_t * const main, const f_console_arguments_t *arguments, fss_basic_read_data_t *data) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_read_process_
 
 /**
@@ -173,7 +173,7 @@ extern "C" {
  *   F_none on success.
  */
 #ifndef _di_fss_basic_read_process_at_
-  extern f_status_t fss_basic_read_process_at(fss_basic_read_main_t * const main, fss_basic_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
+  extern f_status_t fss_basic_read_process_at(fll_program_data_t * const main, fss_basic_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_read_process_at_
 
 /**
@@ -191,7 +191,7 @@ extern "C" {
  *   F_none on success.
  */
 #ifndef _di_fss_basic_read_process_columns_
-  extern f_status_t fss_basic_read_process_columns(fss_basic_read_main_t * const main, fss_basic_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
+  extern f_status_t fss_basic_read_process_columns(fll_program_data_t * const main, fss_basic_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_read_process_columns_
 
 /**
@@ -209,7 +209,7 @@ extern "C" {
  *   F_none on success.
  */
 #ifndef _di_fss_basic_read_process_line_
-  extern f_status_t fss_basic_read_process_line(fss_basic_read_main_t * const main, fss_basic_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
+  extern f_status_t fss_basic_read_process_line(fll_program_data_t * const main, fss_basic_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_read_process_line_
 
 /**
@@ -250,7 +250,7 @@ extern "C" {
  * @see fss_basic_read_load_setting()
  */
 #ifndef _di_fss_basic_read_process_option_
-  extern f_status_t fss_basic_read_process_option(fss_basic_read_main_t * const main, const f_console_arguments_t *arguments, fss_basic_read_data_t *data) F_attribute_visibility_internal_d;
+  extern f_status_t fss_basic_read_process_option(fll_program_data_t * const main, const f_console_arguments_t *arguments, fss_basic_read_data_t *data) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_read_process_option_
 
 /**
@@ -268,7 +268,7 @@ extern "C" {
  *   F_none on success.
  */
 #ifndef _di_fss_basic_read_process_total_
-  extern f_status_t fss_basic_read_process_total(fss_basic_read_main_t * const main, fss_basic_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
+  extern f_status_t fss_basic_read_process_total(fll_program_data_t * const main, fss_basic_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_read_process_total_
 
 #ifdef __cplusplus
index 7dbeed0b9ed64800e2a399b0ca27d30c63ff3705..14f06385e19f11279f0e257a7cca99d9d9e719ec 100644 (file)
@@ -13,16 +13,38 @@ extern "C" {
   const f_string_static_t fss_basic_write_program_name_long_s = macro_f_string_static_t_initialize(FSS_BASIC_WRITE_program_name_long_s, 0, FSS_BASIC_WRITE_program_name_long_s_length);
 #endif // _di_fss_basic_write_program_name_
 
-#ifndef _di_fss_basic_write_main_delete_
-  f_status_t fss_basic_write_main_delete(fss_basic_write_main_t * const main) {
-
-    f_console_parameters_delete(&main->parameters);
+#ifndef _di_fss_basic_write_defines_
+  const f_string_static_t fss_basic_write_pipe_content_end_s = macro_f_string_static_t_initialize(FSS_BASIC_WRITE_pipe_content_end_s, 0, FSS_BASIC_WRITE_pipe_content_end_s_length);
+  const f_string_static_t fss_basic_write_pipe_content_ignore_s = macro_f_string_static_t_initialize(FSS_BASIC_WRITE_pipe_content_ignore_s, 0, FSS_BASIC_WRITE_pipe_content_ignore_s_length);
+  const f_string_static_t fss_basic_write_pipe_content_start_s = macro_f_string_static_t_initialize(FSS_BASIC_WRITE_pipe_content_start_s, 0, FSS_BASIC_WRITE_pipe_content_start_s_length);
+#endif // _di_fss_basic_write_defines.
+
+#ifndef _di_fss_basic_write_program_parameters_
+  const f_string_static_t fss_basic_write_short_file_s = macro_f_string_static_t_initialize(FSS_BASIC_WRITE_short_file_s, 0, FSS_BASIC_WRITE_short_file_s_length);
+  const f_string_static_t fss_basic_write_short_content_s = macro_f_string_static_t_initialize(FSS_BASIC_WRITE_short_content_s, 0, FSS_BASIC_WRITE_short_content_s_length);
+  const f_string_static_t fss_basic_write_short_double_s = macro_f_string_static_t_initialize(FSS_BASIC_WRITE_short_double_s, 0, FSS_BASIC_WRITE_short_double_s_length);
+  const f_string_static_t fss_basic_write_short_ignore_s = macro_f_string_static_t_initialize(FSS_BASIC_WRITE_short_ignore_s, 0, FSS_BASIC_WRITE_short_ignore_s_length);
+  const f_string_static_t fss_basic_write_short_object_s = macro_f_string_static_t_initialize(FSS_BASIC_WRITE_short_object_s, 0, FSS_BASIC_WRITE_short_object_s_length);
+  const f_string_static_t fss_basic_write_short_partial_s = macro_f_string_static_t_initialize(FSS_BASIC_WRITE_short_partial_s, 0, FSS_BASIC_WRITE_short_partial_s_length);
+  const f_string_static_t fss_basic_write_short_prepend_s = macro_f_string_static_t_initialize(FSS_BASIC_WRITE_short_prepend_s, 0, FSS_BASIC_WRITE_short_prepend_s_length);
+  const f_string_static_t fss_basic_write_short_single_s = macro_f_string_static_t_initialize(FSS_BASIC_WRITE_short_single_s, 0, FSS_BASIC_WRITE_short_single_s_length);
+  const f_string_static_t fss_basic_write_short_trim_s = macro_f_string_static_t_initialize(FSS_BASIC_WRITE_short_trim_s, 0, FSS_BASIC_WRITE_short_trim_s_length);
+
+  const f_string_static_t fss_basic_write_long_file_s = macro_f_string_static_t_initialize(FSS_BASIC_WRITE_long_file_s, 0, FSS_BASIC_WRITE_long_file_s_length);
+  const f_string_static_t fss_basic_write_long_content_s = macro_f_string_static_t_initialize(FSS_BASIC_WRITE_long_content_s, 0, FSS_BASIC_WRITE_long_content_s_length);
+  const f_string_static_t fss_basic_write_long_double_s = macro_f_string_static_t_initialize(FSS_BASIC_WRITE_long_double_s, 0, FSS_BASIC_WRITE_long_double_s_length);
+  const f_string_static_t fss_basic_write_long_ignore_s = macro_f_string_static_t_initialize(FSS_BASIC_WRITE_long_ignore_s, 0, FSS_BASIC_WRITE_long_ignore_s_length);
+  const f_string_static_t fss_basic_write_long_object_s = macro_f_string_static_t_initialize(FSS_BASIC_WRITE_long_object_s, 0, FSS_BASIC_WRITE_long_object_s_length);
+  const f_string_static_t fss_basic_write_long_partial_s = macro_f_string_static_t_initialize(FSS_BASIC_WRITE_long_partial_s, 0, FSS_BASIC_WRITE_long_partial_s_length);
+  const f_string_static_t fss_basic_write_long_prepend_s = macro_f_string_static_t_initialize(FSS_BASIC_WRITE_long_prepend_s, 0, FSS_BASIC_WRITE_long_prepend_s_length);
+  const f_string_static_t fss_basic_write_long_single_s = macro_f_string_static_t_initialize(FSS_BASIC_WRITE_long_single_s, 0, FSS_BASIC_WRITE_long_single_s_length);
+  const f_string_static_t fss_basic_write_long_trim_s = macro_f_string_static_t_initialize(FSS_BASIC_WRITE_long_trim_s, 0, FSS_BASIC_WRITE_long_trim_s_length);
+#endif // _di_fss_basic_write_program_parameters_
 
-    f_type_array_lengths_resize(0, &main->remaining);
-
-    macro_f_color_context_t_delete_simple(main->context);
+#ifndef _di_fss_basic_write_main_delete_
+  f_status_t fss_basic_write_main_delete(fll_program_data_t * const main) {
 
-    return F_none;
+    return fll_program_data_delete(main);
   }
 #endif // _di_fss_basic_write_main_delete_
 
index 1704a3231b40bf38ab7ac3425345b23c1aa399a0..46bc0337026dbbc8d090493ee7dd1efc2471174a 100644 (file)
@@ -16,6 +16,9 @@
 extern "C" {
 #endif
 
+/**
+ * The program version.
+ */
 #ifndef _di_fss_basic_write_program_version_
   #define FSS_BASIC_WRITE_program_version_major_s F_string_ascii_0_s
   #define FSS_BASIC_WRITE_program_version_minor_s F_string_ascii_5_s
@@ -42,6 +45,9 @@ extern "C" {
   extern const f_string_static_t fss_basic_write_program_version_s;
 #endif // _di_fss_basic_write_program_version_
 
+/**
+ * The main program name.
+ */
 #ifndef _di_fss_basic_write_program_name_
   #define FSS_BASIC_WRITE_program_name_s      "fss_basic_write"
   #define FSS_BASIC_WRITE_program_name_long_s "FSS Basic Write"
@@ -53,32 +59,88 @@ extern "C" {
   extern const f_string_static_t fss_basic_write_program_name_long_s;
 #endif // _di_fss_basic_write_program_name_
 
+/**
+ * The program defines.
+ */
 #ifndef _di_fss_basic_write_defines_
   #define fss_basic_write_signal_check_d 10000
 
-  #define fss_basic_write_pipe_content_end_s    '\f'
-  #define fss_basic_write_pipe_content_ignore_s '\v'
-  #define fss_basic_write_pipe_content_start_s  '\b'
-
-  #define fss_basic_write_short_file_s    "f"
-  #define fss_basic_write_short_content_s "c"
-  #define fss_basic_write_short_double_s  "d"
-  #define fss_basic_write_short_ignore_s  "I"
-  #define fss_basic_write_short_object_s  "o"
-  #define fss_basic_write_short_partial_s "p"
-  #define fss_basic_write_short_prepend_s "P"
-  #define fss_basic_write_short_single_s  "s"
-  #define fss_basic_write_short_trim_s    "T"
-
-  #define fss_basic_write_long_file_s    "file"
-  #define fss_basic_write_long_content_s "content"
-  #define fss_basic_write_long_double_s  "double"
-  #define fss_basic_write_long_ignore_s  "ignore"
-  #define fss_basic_write_long_object_s  "object"
-  #define fss_basic_write_long_partial_s "partial"
-  #define fss_basic_write_long_prepend_s "prepend"
-  #define fss_basic_write_long_single_s  "single"
-  #define fss_basic_write_long_trim_s    "trim"
+  #define FSS_BASIC_WRITE_pipe_content_end_s    "\f"
+  #define FSS_BASIC_WRITE_pipe_content_ignore_s "\v"
+  #define FSS_BASIC_WRITE_pipe_content_start_s  "\b"
+
+  #define FSS_BASIC_WRITE_pipe_content_end_s_length    1
+  #define FSS_BASIC_WRITE_pipe_content_ignore_s_length 1
+  #define FSS_BASIC_WRITE_pipe_content_start_s_length  1
+
+  extern const f_string_static_t fss_basic_write_pipe_content_end_s;
+  extern const f_string_static_t fss_basic_write_pipe_content_ignore_s;
+  extern const f_string_static_t fss_basic_write_pipe_content_start_s;
+#endif // _di_fss_basic_write_defines.
+
+/**
+ * The main program parameters.
+ */
+#ifndef _di_fss_basic_write_parameters_
+  #define FSS_BASIC_WRITE_short_file_s    "f"
+  #define FSS_BASIC_WRITE_short_content_s "c"
+  #define FSS_BASIC_WRITE_short_double_s  "d"
+  #define FSS_BASIC_WRITE_short_ignore_s  "I"
+  #define FSS_BASIC_WRITE_short_object_s  "o"
+  #define FSS_BASIC_WRITE_short_partial_s "p"
+  #define FSS_BASIC_WRITE_short_prepend_s "P"
+  #define FSS_BASIC_WRITE_short_single_s  "s"
+  #define FSS_BASIC_WRITE_short_trim_s    "T"
+
+  #define FSS_BASIC_WRITE_long_file_s    "file"
+  #define FSS_BASIC_WRITE_long_content_s "content"
+  #define FSS_BASIC_WRITE_long_double_s  "double"
+  #define FSS_BASIC_WRITE_long_ignore_s  "ignore"
+  #define FSS_BASIC_WRITE_long_object_s  "object"
+  #define FSS_BASIC_WRITE_long_partial_s "partial"
+  #define FSS_BASIC_WRITE_long_prepend_s "prepend"
+  #define FSS_BASIC_WRITE_long_single_s  "single"
+  #define FSS_BASIC_WRITE_long_trim_s    "trim"
+
+  #define FSS_BASIC_WRITE_short_file_s_length    1
+  #define FSS_BASIC_WRITE_short_content_s_length 1
+  #define FSS_BASIC_WRITE_short_double_s_length  1
+  #define FSS_BASIC_WRITE_short_ignore_s_length  1
+  #define FSS_BASIC_WRITE_short_object_s_length  1
+  #define FSS_BASIC_WRITE_short_partial_s_length 1
+  #define FSS_BASIC_WRITE_short_prepend_s_length 1
+  #define FSS_BASIC_WRITE_short_single_s_length  1
+  #define FSS_BASIC_WRITE_short_trim_s_length    1
+
+  #define FSS_BASIC_WRITE_long_file_s_length    4
+  #define FSS_BASIC_WRITE_long_content_s_length 7
+  #define FSS_BASIC_WRITE_long_double_s_length  6
+  #define FSS_BASIC_WRITE_long_ignore_s_length  6
+  #define FSS_BASIC_WRITE_long_object_s_length  6
+  #define FSS_BASIC_WRITE_long_partial_s_length 7
+  #define FSS_BASIC_WRITE_long_prepend_s_length 7
+  #define FSS_BASIC_WRITE_long_single_s_length  6
+  #define FSS_BASIC_WRITE_long_trim_s_length    4
+
+  extern const f_string_static_t fss_basic_write_short_file_s;
+  extern const f_string_static_t fss_basic_write_short_content_s;
+  extern const f_string_static_t fss_basic_write_short_double_s;
+  extern const f_string_static_t fss_basic_write_short_ignore_s;
+  extern const f_string_static_t fss_basic_write_short_object_s;
+  extern const f_string_static_t fss_basic_write_short_partial_s;
+  extern const f_string_static_t fss_basic_write_short_prepend_s;
+  extern const f_string_static_t fss_basic_write_short_single_s;
+  extern const f_string_static_t fss_basic_write_short_trim_s;
+
+  extern const f_string_static_t fss_basic_write_long_file_s;
+  extern const f_string_static_t fss_basic_write_long_content_s;
+  extern const f_string_static_t fss_basic_write_long_double_s;
+  extern const f_string_static_t fss_basic_write_long_ignore_s;
+  extern const f_string_static_t fss_basic_write_long_object_s;
+  extern const f_string_static_t fss_basic_write_long_partial_s;
+  extern const f_string_static_t fss_basic_write_long_prepend_s;
+  extern const f_string_static_t fss_basic_write_long_single_s;
+  extern const f_string_static_t fss_basic_write_long_trim_s;
 
   enum {
     fss_basic_write_parameter_help_e,
@@ -113,48 +175,19 @@ extern "C" {
       macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_version_s.string, f_console_standard_long_version_s.string, 0, 0, f_console_type_inverse_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_write_short_file_s, fss_basic_write_long_file_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_write_short_content_s, fss_basic_write_long_content_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_write_short_double_s, fss_basic_write_long_double_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_write_short_ignore_s, fss_basic_write_long_ignore_s, 0, 2, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_write_short_object_s, fss_basic_write_long_object_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_write_short_partial_s, fss_basic_write_long_partial_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_write_short_prepend_s, fss_basic_write_long_prepend_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_write_short_single_s, fss_basic_write_long_single_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_basic_write_short_trim_s, fss_basic_write_long_trim_s, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_write_short_file_s.string, fss_basic_write_long_file_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_write_short_content_s.string, fss_basic_write_long_content_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_write_short_double_s.string, fss_basic_write_long_double_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_write_short_ignore_s.string, fss_basic_write_long_ignore_s.string, 0, 2, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_write_short_object_s.string, fss_basic_write_long_object_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_write_short_partial_s.string, fss_basic_write_long_partial_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_write_short_prepend_s.string, fss_basic_write_long_prepend_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_write_short_single_s.string, fss_basic_write_long_single_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_basic_write_short_trim_s.string, fss_basic_write_long_trim_s.string, 0, 0, f_console_type_normal_e), \
     }
 
   #define fss_basic_write_total_parameters_d 18
-#endif // _di_fss_basic_write_defines_
-
-#ifndef _di_fss_basic_write_data_
-  typedef struct {
-    f_console_parameters_t parameters;
-
-    f_array_lengths_t remaining;
-    bool process_pipe;
-
-    fl_print_t output;
-    fl_print_t error;
-    fl_print_t warning;
-
-    f_signal_t signal;
-
-    f_color_context_t context;
-  } fss_basic_write_main_t;
-
-  #define fss_basic_write_main_t_initialize \
-    { \
-      f_console_parameters_t_initialize, \
-      f_array_lengths_t_initialize, \
-      F_false, \
-      fl_print_t_initialize, \
-      macro_fl_print_t_initialize_error(), \
-      macro_fl_print_t_initialize_warning(), \
-      f_signal_t_initialize, \
-      f_color_context_t_initialize, \
-    }
-#endif // _di_fss_basic_write_data_
+#endif // _di_fss_basic_write_parameters_
 
 /**
  * Deallocate main.
@@ -171,7 +204,7 @@ extern "C" {
  * @see fss_basic_write_main()
  */
 #ifndef _di_fss_basic_write_main_delete_
-  extern f_status_t fss_basic_write_main_delete(fss_basic_write_main_t * const main);
+  extern f_status_t fss_basic_write_main_delete(fll_program_data_t * const main);
 #endif // _di_fss_basic_write_main_delete_
 
 #ifdef __cplusplus
index 36236b6591843f810830fc878eaff2e6c290cb1b..30028a8fe2256903ab036f2b2b5f0c0b1385186a 100644 (file)
@@ -6,15 +6,6 @@
 extern "C" {
 #endif
 
-#ifndef _di_byte_dump_program_version_
-  const f_string_static_t fss_basic_write_program_version_s = macro_f_string_static_t_initialize(FSS_BASIC_WRITE_program_version_s, 0, FSS_BASIC_WRITE_program_version_s_length);
-#endif // _di_byte_dump_program_version_
-
-#ifndef _di_byte_dump_program_name_
-  const f_string_static_t fss_basic_write_program_name_s = macro_f_string_static_t_initialize(FSS_BASIC_WRITE_program_name_s, 0, FSS_BASIC_WRITE_program_name_s_length);
-  const f_string_static_t fss_basic_write_program_name_long_s = macro_f_string_static_t_initialize(FSS_BASIC_WRITE_program_name_long_s, 0, FSS_BASIC_WRITE_program_name_long_s_length);
-#endif // _di_byte_dump_program_name_
-
 #ifndef _di_fss_basic_write_print_help_
   f_status_t fss_basic_write_print_help(const f_file_t file, const f_color_context_t context) {
 
@@ -66,7 +57,7 @@ extern "C" {
 #endif // _di_fss_basic_write_print_help_
 
 #ifndef _di_fss_basic_write_main_
-  f_status_t fss_basic_write_main(fss_basic_write_main_t * const main, const f_console_arguments_t *arguments) {
+  f_status_t fss_basic_write_main(fll_program_data_t * const main, const f_console_arguments_t *arguments) {
 
     f_status_t status = F_none;
 
@@ -78,7 +69,7 @@ extern "C" {
       f_console_parameter_id_t ids[3] = { fss_basic_write_parameter_no_color_e, fss_basic_write_parameter_light_e, fss_basic_write_parameter_dark_e };
       const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
 
-      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
+      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->context);
 
       main->output.set = &main->context.set;
       main->error.set = &main->context.set;
index ed2fe64a8fd6fff05306dedc6ac63b29f7e9b57d..224626484891301094a6d8cca56b002e7d75aca3 100644 (file)
@@ -88,7 +88,7 @@ extern "C" {
  * @see fss_basic_write_main_delete()
  */
 #ifndef _di_fss_basic_write_main_
-  extern f_status_t fss_basic_write_main(fss_basic_write_main_t * const main, const f_console_arguments_t *arguments);
+  extern f_status_t fss_basic_write_main(fll_program_data_t * const main, const f_console_arguments_t *arguments);
 #endif // _di_fss_basic_write_main_
 
 #ifdef __cplusplus
index e1bc3b6f47de09b5e27a4d40395127d9d59e8ec6..3e7ab464b700c6d075d7ce76e2326071fa41f3a4 100644 (file)
@@ -3,7 +3,7 @@
 int main(const int argc, const f_string_t *argv) {
 
   const f_console_arguments_t arguments = { argc, argv };
-  fss_basic_write_main_t data = fss_basic_write_main_t_initialize;
+  fll_program_data_t data = fll_program_data_t_initialize;
 
   if (f_pipe_input_exists()) {
     data.process_pipe = F_true;
index 1fd1fad5e11c3c8bdeb343dc3cd5400a371f1aac..63c624afad19993657eafc91abc393b85aa4a808 100644 (file)
@@ -6,7 +6,7 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_basic_write_print_signal_received_
-  void fss_basic_write_print_signal_received(fss_basic_write_main_t * const main, const f_status_t signal) {
+  void fss_basic_write_print_signal_received(fll_program_data_t * const main, const f_status_t signal) {
 
     if (main->warning.verbosity != f_console_verbosity_verbose_e) return;
 
@@ -24,7 +24,7 @@ extern "C" {
 #endif // _di_fss_basic_write_print_signal_received_
 
 #ifndef _di_fss_basic_write_signal_received_
-  f_status_t fss_basic_write_signal_received(fss_basic_write_main_t * const main) {
+  f_status_t fss_basic_write_signal_received(fll_program_data_t * const main) {
 
     if (main->signal.id == -1) {
       return F_false;
index 870ad356c641d76c7d2079cec6716118d7cc48b2..2eb6cd717c6e76e5e7476e768b52c2600f34eee3 100644 (file)
@@ -33,7 +33,7 @@ extern "C" {
  *   The signal received.
  */
 #ifndef _di_fss_basic_write_print_signal_received_
-  extern void fss_basic_write_print_signal_received(fss_basic_write_main_t * const main, const f_status_t signal) F_attribute_visibility_internal_d;
+  extern void fss_basic_write_print_signal_received(fll_program_data_t * const main, const f_status_t signal) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_write_print_signal_received_
 
 /**
@@ -51,7 +51,7 @@ extern "C" {
  * @see f_signal_read()
  */
 #ifndef _di_fss_basic_write_signal_received_
-  extern f_status_t fss_basic_write_signal_received(fss_basic_write_main_t * const main) F_attribute_visibility_internal_d;
+  extern f_status_t fss_basic_write_signal_received(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_write_signal_received_
 
 #ifdef __cplusplus
index 33c49ec827517299bb1235bc2f37f3633e546bcd..372c6739b2e457d4e396dc48c7a58c28249dea4a 100644 (file)
@@ -7,7 +7,7 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_basic_write_error_parameter_same_times_print_
-  void fss_basic_write_error_parameter_same_times_print(fss_basic_write_main_t * const main) {
+  void fss_basic_write_error_parameter_same_times_print(fll_program_data_t * const main) {
 
     if (main->error.verbosity == f_console_verbosity_quiet_e) {
       return;
@@ -28,7 +28,7 @@ extern "C" {
 #endif // _di_fss_basic_write_error_parameter_same_times_print_
 
 #ifndef _di_fss_basic_write_error_parameter_value_missing_print_
-  void fss_basic_write_error_parameter_value_missing_print(fss_basic_write_main_t * const main, const f_string_static_t symbol, const f_string_static_t parameter) {
+  void fss_basic_write_error_parameter_value_missing_print(fll_program_data_t * const main, const f_string_static_t symbol, const f_string_static_t parameter) {
 
     if (main->error.verbosity == f_console_verbosity_quiet_e) {
       return;
@@ -45,7 +45,7 @@ extern "C" {
 #endif // _di_fss_basic_write_error_parameter_value_missing_print_
 
 #ifndef _di_fss_basic_write_error_parameter_unsupported_eol_print_
-  void fss_basic_write_error_parameter_unsupported_eol_print(fss_basic_write_main_t * const main) {
+  void fss_basic_write_error_parameter_unsupported_eol_print(fll_program_data_t * const main) {
 
     if (main->error.verbosity == f_console_verbosity_quiet_e) {
       return;
@@ -62,7 +62,7 @@ extern "C" {
 #endif // _di_fss_basic_write_error_parameter_unsupported_eol_print_
 
 #ifndef _di_fss_basic_write_process_
-  f_status_t fss_basic_write_process(fss_basic_write_main_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, f_string_dynamic_t *buffer) {
+  f_status_t fss_basic_write_process(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, f_string_dynamic_t *buffer) {
 
     f_status_t status = F_none;
     f_state_t state = macro_f_state_t_initialize(fss_basic_write_common_allocation_large_d, fss_basic_write_common_allocation_small_d, 0, 0, 0, 0, 0);
@@ -148,7 +148,7 @@ extern "C" {
 #endif // _di_fss_basic_write_process_
 
 #ifndef _di_fss_basic_write_process_pipe_
-  f_status_t fss_basic_write_process_pipe(fss_basic_write_main_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer) {
+  f_status_t fss_basic_write_process_pipe(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer) {
 
     f_status_t status = F_none;
     f_status_t status_pipe = F_none;
index fab8ad2cb461830b36ff37b6d87fc9738019af29..e8c09e4bb616f8f6aa080870b16a3453259ae92d 100644 (file)
@@ -19,7 +19,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_basic_write_error_parameter_same_times_print_
-  void fss_basic_write_error_parameter_same_times_print(fss_basic_write_main_t * const main) F_attribute_visibility_internal_d;
+  void fss_basic_write_error_parameter_same_times_print(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_write_error_parameter_same_times_print_
 
 /**
@@ -33,7 +33,7 @@ extern "C" {
  *   The parameter name, such as "help" in "--help".
  */
 #ifndef _di_fss_basic_write_error_parameter_value_missing_print_
-  void fss_basic_write_error_parameter_value_missing_print(fss_basic_write_main_t * const main, const f_string_static_t symbol, const f_string_static_t parameter) F_attribute_visibility_internal_d;
+  void fss_basic_write_error_parameter_value_missing_print(fll_program_data_t * const main, const f_string_static_t symbol, const f_string_static_t parameter) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_write_error_parameter_value_missing_print_
 
 /**
@@ -43,7 +43,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_basic_write_error_parameter_unsupported_eol_print_
-  void fss_basic_write_error_parameter_unsupported_eol_print(fss_basic_write_main_t * const main) F_attribute_visibility_internal_d;
+  void fss_basic_write_error_parameter_unsupported_eol_print(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_write_error_parameter_unsupported_eol_print_
 
 /**
@@ -70,7 +70,7 @@ extern "C" {
  *   F_failure (with error bit) for any othe failure.
  */
 #ifndef _di_fss_basic_write_process_
-  extern f_status_t fss_basic_write_process(fss_basic_write_main_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
+  extern f_status_t fss_basic_write_process(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_write_process_
 
 /**
@@ -91,7 +91,7 @@ extern "C" {
  *   F_failure (with error bit) for any othe failure.
  */
 #ifndef _di_fss_basic_write_process_pipe_
-  extern f_status_t fss_basic_write_process_pipe(fss_basic_write_main_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
+  extern f_status_t fss_basic_write_process_pipe(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_write_process_pipe_
 
 /**
@@ -109,7 +109,7 @@ extern "C" {
  * @see f_signal_read()
  */
 #ifndef _di_fss_basic_write_signal_received_
-  extern f_status_t fss_basic_write_signal_received(fss_basic_write_main_t * const main) F_attribute_visibility_internal_d;
+  extern f_status_t fss_basic_write_signal_received(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_basic_write_signal_received_
 
 #ifdef __cplusplus
index e084a683b600d652fbb1a5a7eb9b2d8c21bb6c06..0d2ff7bf3bee469f277176eca2472f18174bfe7c 100644 (file)
@@ -13,6 +13,38 @@ extern "C" {
   const f_string_static_t fss_embedded_list_read_program_name_long_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_program_name_long_s, 0, FSS_EMBEDDED_LIST_READ_program_name_long_s_length);
 #endif // _di_fss_embedded_list_read_program_name_
 
+#ifndef _di_fss_embedded_list_read_parameters_
+  const f_string_static_t fss_embedded_list_read_short_at_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_short_at_s, 0, FSS_EMBEDDED_LIST_READ_short_at_s_length);
+  const f_string_static_t fss_embedded_list_read_short_content_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_short_content_s, 0, FSS_EMBEDDED_LIST_READ_short_content_s_length);
+  const f_string_static_t fss_embedded_list_read_short_columns_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_short_columns_s, 0, FSS_EMBEDDED_LIST_READ_short_columns_s_length);
+  const f_string_static_t fss_embedded_list_read_short_delimit_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_short_delimit_s, 0, FSS_EMBEDDED_LIST_READ_short_delimit_s_length);
+  const f_string_static_t fss_embedded_list_read_short_depth_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_short_depth_s, 0, FSS_EMBEDDED_LIST_READ_short_depth_s_length);
+  const f_string_static_t fss_embedded_list_read_short_empty_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_short_empty_s, 0, FSS_EMBEDDED_LIST_READ_short_empty_s_length);
+  const f_string_static_t fss_embedded_list_read_short_line_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_short_line_s, 0, FSS_EMBEDDED_LIST_READ_short_line_s_length);
+  const f_string_static_t fss_embedded_list_read_short_name_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_short_name_s, 0, FSS_EMBEDDED_LIST_READ_short_name_s_length);
+  const f_string_static_t fss_embedded_list_read_short_object_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_short_object_s, 0, FSS_EMBEDDED_LIST_READ_short_object_s_length);
+  const f_string_static_t fss_embedded_list_read_short_pipe_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_short_pipe_s, 0, FSS_EMBEDDED_LIST_READ_short_pipe_s_length);
+  const f_string_static_t fss_embedded_list_read_short_raw_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_short_raw_s, 0, FSS_EMBEDDED_LIST_READ_short_raw_s_length);
+  const f_string_static_t fss_embedded_list_read_short_select_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_short_select_s, 0, FSS_EMBEDDED_LIST_READ_short_select_s_length);
+  const f_string_static_t fss_embedded_list_read_short_total_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_short_total_s, 0, FSS_EMBEDDED_LIST_READ_short_total_s_length);
+  const f_string_static_t fss_embedded_list_read_short_trim_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_short_trim_s, 0, FSS_EMBEDDED_LIST_READ_short_trim_s_length);
+
+  const f_string_static_t fss_embedded_list_read_long_at_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_long_at_s, 0, FSS_EMBEDDED_LIST_READ_long_at_s_length);
+  const f_string_static_t fss_embedded_list_read_long_content_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_long_content_s, 0, FSS_EMBEDDED_LIST_READ_long_content_s_length);
+  const f_string_static_t fss_embedded_list_read_long_columns_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_long_columns_s, 0, FSS_EMBEDDED_LIST_READ_long_columns_s_length);
+  const f_string_static_t fss_embedded_list_read_long_delimit_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_long_delimit_s, 0, FSS_EMBEDDED_LIST_READ_long_delimit_s_length);
+  const f_string_static_t fss_embedded_list_read_long_depth_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_long_depth_s, 0, FSS_EMBEDDED_LIST_READ_long_depth_s_length);
+  const f_string_static_t fss_embedded_list_read_long_empty_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_long_empty_s, 0, FSS_EMBEDDED_LIST_READ_long_empty_s_length);
+  const f_string_static_t fss_embedded_list_read_long_line_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_long_line_s, 0, FSS_EMBEDDED_LIST_READ_long_line_s_length);
+  const f_string_static_t fss_embedded_list_read_long_name_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_long_name_s, 0, FSS_EMBEDDED_LIST_READ_long_name_s_length);
+  const f_string_static_t fss_embedded_list_read_long_object_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_long_object_s, 0, FSS_EMBEDDED_LIST_READ_long_object_s_length);
+  const f_string_static_t fss_embedded_list_read_long_pipe_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_long_pipe_s, 0, FSS_EMBEDDED_LIST_READ_long_pipe_s_length);
+  const f_string_static_t fss_embedded_list_read_long_raw_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_long_raw_s, 0, FSS_EMBEDDED_LIST_READ_long_raw_s_length);
+  const f_string_static_t fss_embedded_list_read_long_select_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_long_select_s, 0, FSS_EMBEDDED_LIST_READ_long_select_s_length);
+  const f_string_static_t fss_embedded_list_read_long_total_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_long_total_s, 0, FSS_EMBEDDED_LIST_READ_long_total_s_length);
+  const f_string_static_t fss_embedded_list_read_long_trim_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_long_trim_s, 0, FSS_EMBEDDED_LIST_READ_long_trim_s_length);
+#endif // _di_fss_embedded_list_read_parameters_
+
 #ifndef _di_fss_embedded_list_read_main_delete_
   f_status_t fss_embedded_list_read_main_delete(fss_embedded_list_read_main_t * const main) {
 
@@ -21,7 +53,6 @@ extern "C" {
     macro_f_fss_nest_t_delete_simple(main->nest);
 
     f_string_dynamic_resize(0, &main->buffer);
-    f_type_array_lengths_resize(0, &main->remaining);
 
     macro_f_color_context_t_delete_simple(main->context);
 
index c6e4307785d8f1f98bfd9c196e5b77b3932911d0..c6ceb651d5d445d06fb8fe6c9e0c6bbdc5deebab 100644 (file)
@@ -16,6 +16,9 @@
 extern "C" {
 #endif
 
+/**
+ * The program version.
+ */
 #ifndef _di_fss_embedded_list_read_program_version_
   #define FSS_EMBEDDED_LIST_READ_program_version_major_s F_string_ascii_0_s
   #define FSS_EMBEDDED_LIST_READ_program_version_minor_s F_string_ascii_5_s
@@ -42,6 +45,9 @@ extern "C" {
   extern const f_string_static_t fss_embedded_list_read_program_version_s;
 #endif // _di_fss_embedded_list_read_program_version_
 
+/**
+ * The program name.
+ */
 #ifndef _di_fss_embedded_list_read_program_name_
   #define FSS_EMBEDDED_LIST_READ_program_name_s      "fss_embedded_list_read"
   #define FSS_EMBEDDED_LIST_READ_program_name_long_s "FSS Embedded List Read"
@@ -53,42 +59,118 @@ extern "C" {
   extern const f_string_static_t fss_embedded_list_read_program_name_long_s;
 #endif // _di_fss_embedded_list_read_program_name_
 
+/**
+ * The program defines.
+ */
 #ifndef _di_fss_embedded_list_read_defines_
   #define fss_embedded_list_read_signal_check_d 10000
 
-  #define fss_embedded_list_read_pipe_content_end_s    '\f'
-  #define fss_embedded_list_read_pipe_content_ignore_s '\v'
-  #define fss_embedded_list_read_pipe_content_start_s  '\b'
-
-  #define fss_embedded_list_read_short_at_s      "a"
-  #define fss_embedded_list_read_short_content_s "c"
-  #define fss_embedded_list_read_short_columns_s "C"
-  #define fss_embedded_list_read_short_delimit_s "D"
-  #define fss_embedded_list_read_short_depth_s   "d"
-  #define fss_embedded_list_read_short_empty_s   "e"
-  #define fss_embedded_list_read_short_line_s    "l"
-  #define fss_embedded_list_read_short_name_s    "n"
-  #define fss_embedded_list_read_short_object_s  "o"
-  #define fss_embedded_list_read_short_pipe_s    "p"
-  #define fss_embedded_list_read_short_raw_s     "R"
-  #define fss_embedded_list_read_short_select_s  "s"
-  #define fss_embedded_list_read_short_total_s   "t"
-  #define fss_embedded_list_read_short_trim_s    "T"
-
-  #define fss_embedded_list_read_long_at_s      "at"
-  #define fss_embedded_list_read_long_content_s "content"
-  #define fss_embedded_list_read_long_columns_s "columns"
-  #define fss_embedded_list_read_long_delimit_s "delimit"
-  #define fss_embedded_list_read_long_depth_s   "depth"
-  #define fss_embedded_list_read_long_empty_s   "empty"
-  #define fss_embedded_list_read_long_line_s    "line"
-  #define fss_embedded_list_read_long_name_s    "name"
-  #define fss_embedded_list_read_long_object_s  "object"
-  #define fss_embedded_list_read_long_pipe_s    "pipe"
-  #define fss_embedded_list_read_long_raw_s     "raw"
-  #define fss_embedded_list_read_long_select_s  "select"
-  #define fss_embedded_list_read_long_total_s   "total"
-  #define fss_embedded_list_read_long_trim_s    "trim"
+  #define FSS_EMBEDDED_LIST_READ_pipe_content_end_s    "\f"
+  #define FSS_EMBEDDED_LIST_READ_pipe_content_ignore_s "\v"
+  #define FSS_EMBEDDED_LIST_READ_pipe_content_start_s  "\b"
+
+  #define FSS_EMBEDDED_LIST_READ_pipe_content_end_s_length    1
+  #define FSS_EMBEDDED_LIST_READ_pipe_content_ignore_s_length 1
+  #define FSS_EMBEDDED_LIST_READ_pipe_content_start_s_length  1
+
+  extern const f_string_static_t fss_embedded_list_read_pipe_content_end_s;
+  extern const f_string_static_t fss_embedded_list_read_pipe_content_ignore_s;
+  extern const f_string_static_t fss_embedded_list_read_pipe_content_start_s;
+#endif // _di_fss_embedded_list_read_defines_
+
+/**
+ * The main program parameters.
+ */
+#ifndef _di_fss_embedded_list_read_parameters_
+  #define FSS_EMBEDDED_LIST_READ_short_at_s      "a"
+  #define FSS_EMBEDDED_LIST_READ_short_content_s "c"
+  #define FSS_EMBEDDED_LIST_READ_short_columns_s "C"
+  #define FSS_EMBEDDED_LIST_READ_short_delimit_s "D"
+  #define FSS_EMBEDDED_LIST_READ_short_depth_s   "d"
+  #define FSS_EMBEDDED_LIST_READ_short_empty_s   "e"
+  #define FSS_EMBEDDED_LIST_READ_short_line_s    "l"
+  #define FSS_EMBEDDED_LIST_READ_short_name_s    "n"
+  #define FSS_EMBEDDED_LIST_READ_short_object_s  "o"
+  #define FSS_EMBEDDED_LIST_READ_short_pipe_s    "p"
+  #define FSS_EMBEDDED_LIST_READ_short_raw_s     "R"
+  #define FSS_EMBEDDED_LIST_READ_short_select_s  "s"
+  #define FSS_EMBEDDED_LIST_READ_short_total_s   "t"
+  #define FSS_EMBEDDED_LIST_READ_short_trim_s    "T"
+
+  #define FSS_EMBEDDED_LIST_READ_long_at_s      "at"
+  #define FSS_EMBEDDED_LIST_READ_long_content_s "content"
+  #define FSS_EMBEDDED_LIST_READ_long_columns_s "columns"
+  #define FSS_EMBEDDED_LIST_READ_long_delimit_s "delimit"
+  #define FSS_EMBEDDED_LIST_READ_long_depth_s   "depth"
+  #define FSS_EMBEDDED_LIST_READ_long_empty_s   "empty"
+  #define FSS_EMBEDDED_LIST_READ_long_line_s    "line"
+  #define FSS_EMBEDDED_LIST_READ_long_name_s    "name"
+  #define FSS_EMBEDDED_LIST_READ_long_object_s  "object"
+  #define FSS_EMBEDDED_LIST_READ_long_pipe_s    "pipe"
+  #define FSS_EMBEDDED_LIST_READ_long_raw_s     "raw"
+  #define FSS_EMBEDDED_LIST_READ_long_select_s  "select"
+  #define FSS_EMBEDDED_LIST_READ_long_total_s   "total"
+  #define FSS_EMBEDDED_LIST_READ_long_trim_s    "trim"
+
+  #define FSS_EMBEDDED_LIST_READ_short_at_s_length      1
+  #define FSS_EMBEDDED_LIST_READ_short_content_s_length 1
+  #define FSS_EMBEDDED_LIST_READ_short_columns_s_length 1
+  #define FSS_EMBEDDED_LIST_READ_short_delimit_s_length 1
+  #define FSS_EMBEDDED_LIST_READ_short_depth_s_length   1
+  #define FSS_EMBEDDED_LIST_READ_short_empty_s_length   1
+  #define FSS_EMBEDDED_LIST_READ_short_line_s_length    1
+  #define FSS_EMBEDDED_LIST_READ_short_name_s_length    1
+  #define FSS_EMBEDDED_LIST_READ_short_object_s_length  1
+  #define FSS_EMBEDDED_LIST_READ_short_pipe_s_length    1
+  #define FSS_EMBEDDED_LIST_READ_short_raw_s_length     1
+  #define FSS_EMBEDDED_LIST_READ_short_select_s_length  1
+  #define FSS_EMBEDDED_LIST_READ_short_total_s_length   1
+  #define FSS_EMBEDDED_LIST_READ_short_trim_s_length    1
+
+  #define FSS_EMBEDDED_LIST_READ_long_at_s_length      2
+  #define FSS_EMBEDDED_LIST_READ_long_content_s_length 7
+  #define FSS_EMBEDDED_LIST_READ_long_columns_s_length 7
+  #define FSS_EMBEDDED_LIST_READ_long_delimit_s_length 7
+  #define FSS_EMBEDDED_LIST_READ_long_depth_s_length   5
+  #define FSS_EMBEDDED_LIST_READ_long_empty_s_length   5
+  #define FSS_EMBEDDED_LIST_READ_long_line_s_length    4
+  #define FSS_EMBEDDED_LIST_READ_long_name_s_length    4
+  #define FSS_EMBEDDED_LIST_READ_long_object_s_length  6
+  #define FSS_EMBEDDED_LIST_READ_long_pipe_s_length    4
+  #define FSS_EMBEDDED_LIST_READ_long_raw_s_length     3
+  #define FSS_EMBEDDED_LIST_READ_long_select_s_length  6
+  #define FSS_EMBEDDED_LIST_READ_long_total_s_length   5
+  #define FSS_EMBEDDED_LIST_READ_long_trim_s_length    4
+
+  extern const f_string_static_t fss_embedded_list_read_short_at_s;
+  extern const f_string_static_t fss_embedded_list_read_short_content_s;
+  extern const f_string_static_t fss_embedded_list_read_short_columns_s;
+  extern const f_string_static_t fss_embedded_list_read_short_delimit_s;
+  extern const f_string_static_t fss_embedded_list_read_short_depth_s;
+  extern const f_string_static_t fss_embedded_list_read_short_empty_s;
+  extern const f_string_static_t fss_embedded_list_read_short_line_s;
+  extern const f_string_static_t fss_embedded_list_read_short_name_s;
+  extern const f_string_static_t fss_embedded_list_read_short_object_s;
+  extern const f_string_static_t fss_embedded_list_read_short_pipe_s;
+  extern const f_string_static_t fss_embedded_list_read_short_raw_s;
+  extern const f_string_static_t fss_embedded_list_read_short_select_s;
+  extern const f_string_static_t fss_embedded_list_read_short_total_s;
+  extern const f_string_static_t fss_embedded_list_read_short_trim_s;
+
+  extern const f_string_static_t fss_embedded_list_read_long_at_s;
+  extern const f_string_static_t fss_embedded_list_read_long_content_s;
+  extern const f_string_static_t fss_embedded_list_read_long_columns_s;
+  extern const f_string_static_t fss_embedded_list_read_long_delimit_s;
+  extern const f_string_static_t fss_embedded_list_read_long_depth_s;
+  extern const f_string_static_t fss_embedded_list_read_long_empty_s;
+  extern const f_string_static_t fss_embedded_list_read_long_line_s;
+  extern const f_string_static_t fss_embedded_list_read_long_name_s;
+  extern const f_string_static_t fss_embedded_list_read_long_object_s;
+  extern const f_string_static_t fss_embedded_list_read_long_pipe_s;
+  extern const f_string_static_t fss_embedded_list_read_long_raw_s;
+  extern const f_string_static_t fss_embedded_list_read_long_select_s;
+  extern const f_string_static_t fss_embedded_list_read_long_total_s;
+  extern const f_string_static_t fss_embedded_list_read_long_trim_s;
 
   enum {
     fss_embedded_list_read_parameter_help_e,
@@ -128,25 +210,28 @@ extern "C" {
       macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_version_s.string, f_console_standard_long_version_s.string, 0, 0, f_console_type_inverse_e), \
-      macro_f_console_parameter_t_initialize(fss_embedded_list_read_short_at_s, fss_embedded_list_read_long_at_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_embedded_list_read_short_content_s, fss_embedded_list_read_long_content_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_embedded_list_read_short_columns_s, fss_embedded_list_read_long_columns_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_embedded_list_read_short_delimit_s, fss_embedded_list_read_long_delimit_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_embedded_list_read_short_depth_s, fss_embedded_list_read_long_depth_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_embedded_list_read_short_empty_s, fss_embedded_list_read_long_empty_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_embedded_list_read_short_line_s, fss_embedded_list_read_long_line_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_embedded_list_read_short_name_s, fss_embedded_list_read_long_name_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_embedded_list_read_short_object_s, fss_embedded_list_read_long_object_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_embedded_list_read_short_pipe_s, fss_embedded_list_read_long_pipe_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_embedded_list_read_short_raw_s, fss_embedded_list_read_long_raw_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_embedded_list_read_short_select_s, fss_embedded_list_read_long_select_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_embedded_list_read_short_total_s, fss_embedded_list_read_long_total_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_embedded_list_read_short_trim_s, fss_embedded_list_read_long_trim_s, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_embedded_list_read_short_at_s.string, fss_embedded_list_read_long_at_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_embedded_list_read_short_content_s.string, fss_embedded_list_read_long_content_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_embedded_list_read_short_columns_s.string, fss_embedded_list_read_long_columns_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_embedded_list_read_short_delimit_s.string, fss_embedded_list_read_long_delimit_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_embedded_list_read_short_depth_s.string, fss_embedded_list_read_long_depth_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_embedded_list_read_short_empty_s.string, fss_embedded_list_read_long_empty_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_embedded_list_read_short_line_s.string, fss_embedded_list_read_long_line_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_embedded_list_read_short_name_s.string, fss_embedded_list_read_long_name_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_embedded_list_read_short_object_s.string, fss_embedded_list_read_long_object_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_embedded_list_read_short_pipe_s.string, fss_embedded_list_read_long_pipe_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_embedded_list_read_short_raw_s.string, fss_embedded_list_read_long_raw_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_embedded_list_read_short_select_s.string, fss_embedded_list_read_long_select_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_embedded_list_read_short_total_s.string, fss_embedded_list_read_long_total_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_embedded_list_read_short_trim_s.string, fss_embedded_list_read_long_trim_s.string, 0, 0, f_console_type_normal_e), \
     }
 
   #define fss_embedded_list_read_total_parameters_d 23
-#endif // _di_fss_embedded_list_read_defines_
+#endif // _di_fss_embedded_list_read_parameters_
 
+/**
+ * Provide delimit management.
+ */
 #ifndef _di_fss_embedded_list_read_delimit_mode_
   #define fss_embedded_list_read_delimit_mode_name_none_s    "none"
   #define fss_embedded_list_read_delimit_mode_name_all_s     "all"
@@ -167,6 +252,18 @@ extern "C" {
   };
 #endif // _di_fss_embedded_list_read_delimit_modes_
 
+/**
+ * The main program data.
+ *
+ * parameters:   The state of pre-defined parameters passed to the program.
+ * remaining:    The remaining, non-pre-defined parameters, passed to the program.
+ * process_pipe: Designate whether or not to process the input pipe.
+ * output:       The output file for general printing.
+ * error:        The output file for error printing.
+ * warning:      The output file for warning printing.
+ * signal:       The process signal management structure.
+ * context:      The color context.
+ */
 #ifndef _di_fss_embedded_list_read_main_t_
   typedef struct {
     f_console_parameters_t parameters;
index f7d2f180d060fa137e8ddb54d8e7513b720f325d..09d713ddf6cfba023e087539ae1b2045f000156b 100644 (file)
@@ -7,15 +7,6 @@
 extern "C" {
 #endif
 
-#ifndef _di_fss_embedded_list_read_program_version_
-  const f_string_static_t fss_embedded_list_read_program_version_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_program_version_s, 0, FSS_EMBEDDED_LIST_READ_program_version_s_length);
-#endif // _di_fss_embedded_list_read_program_version_
-
-#ifndef _di_fss_embedded_list_read_program_name_
-  const f_string_static_t fss_embedded_list_read_program_name_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_program_name_s, 0, FSS_EMBEDDED_LIST_READ_program_name_s_length);
-  const f_string_static_t fss_embedded_list_read_program_name_long_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_program_name_long_s, 0, FSS_EMBEDDED_LIST_READ_program_name_long_s_length);
-#endif // _di_fss_embedded_list_read_program_name_
-
 #ifndef _di_fss_embedded_list_read_print_help_
   f_status_t fss_embedded_list_read_print_help(const f_file_t file, const f_color_context_t context) {
 
@@ -50,7 +41,7 @@ extern "C" {
     fll_program_print_help_option(file, context, fss_embedded_list_read_short_total_s, fss_embedded_list_read_long_total_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "   Print the total number of lines.");
     fll_program_print_help_option(file, context, fss_embedded_list_read_short_trim_s, fss_embedded_list_read_long_trim_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "    Trim Object names on select or print.");
 
-    fll_program_print_help_usage(file, context, fss_embedded_list_read_program_name_s, "filename(s)");
+    fll_program_print_help_usage(file, context, fss_embedded_list_read_program_name_s, fll_program_parameter_filenames_s);
 
     fl_print_format(" %[Notes:%]%r", file.stream, context.set.important, context.set.important, f_string_eol_s);
 
@@ -140,7 +131,7 @@ extern "C" {
       f_console_parameter_id_t ids[3] = { fss_embedded_list_read_parameter_no_color_e, fss_embedded_list_read_parameter_light_e, fss_embedded_list_read_parameter_dark_e };
       const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
 
-      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
+      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->context);
 
       main->output.set = &main->context.set;
       main->error.set = &main->context.set;
@@ -240,7 +231,7 @@ extern "C" {
       }
     }
 
-    if (main->remaining.used > 0 || main->process_pipe) {
+    if (main->parameters.remaining.used > 0 || main->process_pipe) {
       if (main->parameters.array[fss_embedded_list_read_parameter_at_e].result == f_console_result_found_e) {
         flockfile(main->error.to.stream);
 
@@ -449,8 +440,8 @@ extern "C" {
         f_string_dynamic_resize(0, &main->buffer);
       }
 
-      if (F_status_is_error_not(status) && main->remaining.used > 0) {
-        for (f_array_length_t i = 0; i < main->remaining.used; ++i) {
+      if (F_status_is_error_not(status) && main->parameters.remaining.used > 0) {
+        for (f_array_length_t i = 0; i < main->parameters.remaining.used; ++i) {
 
           if (fss_embedded_list_read_signal_received(main)) {
             status = F_status_set_error(F_interrupt);
@@ -459,12 +450,12 @@ extern "C" {
 
           f_file_t file = f_file_t_initialize;
 
-          status = f_file_open(arguments->argv[main->remaining.array[i]], 0, &file);
+          status = f_file_open(arguments->argv[main->parameters.remaining.array[i]], 0, &file);
 
           main->quantity.total = original_size;
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_open", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_open", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e);
 
             break;
           }
@@ -472,7 +463,7 @@ extern "C" {
           if (!main->quantity.total) {
             status = f_file_size_by_id(file.id, &main->quantity.total);
             if (F_status_is_error(status)) {
-              fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+              fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
               f_file_stream_close(F_true, &file);
 
@@ -496,15 +487,15 @@ extern "C" {
           f_file_stream_close(F_true, &file);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_read_until", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_read_until", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
             break;
           }
 
-          status = fss_embedded_list_read_main_process_file(main, arguments, arguments->argv[main->remaining.array[i]], depths, &objects_delimits, &contents_delimits, &comments);
+          status = fss_embedded_list_read_main_process_file(main, arguments, arguments->argv[main->parameters.remaining.array[i]], depths, &objects_delimits, &contents_delimits, &comments);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "fss_embedded_list_read_main_process_file", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "fss_embedded_list_read_main_process_file", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
             break;
           }
index 7e5d00c0b3ccd9e3cc3c492b3850ec56b78b0a65..30df6b088a853e316c102442a9002f940602cd38 100644 (file)
@@ -13,16 +13,38 @@ extern "C" {
   const f_string_static_t fss_embedded_list_write_program_name_long_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_WRITE_program_name_long_s, 0, FSS_EMBEDDED_LIST_WRITE_program_name_long_s_length);
 #endif // _di_fss_embedded_list_write_program_name_
 
-#ifndef _di_fss_embedded_list_write_main_delete_
-  f_status_t fss_embedded_list_write_main_delete(fss_embedded_list_write_main_t * const main) {
-
-    f_console_parameters_delete(&main->parameters);
+#ifndef _di_fss_embedded_list_write_defines_
+  const f_string_static_t fss_embedded_list_write_pipe_content_end_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_WRITE_pipe_content_end_s, 0, FSS_EMBEDDED_LIST_WRITE_pipe_content_end_s_length);
+  const f_string_static_t fss_embedded_list_write_pipe_content_ignore_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_WRITE_pipe_content_ignore_s, 0, FSS_EMBEDDED_LIST_WRITE_pipe_content_ignore_s_length);
+  const f_string_static_t fss_embedded_list_write_pipe_content_start_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_WRITE_pipe_content_start_s, 0, FSS_EMBEDDED_LIST_WRITE_pipe_content_start_s_length);
+#endif // _di_fss_embedded_list_write_defines_
+
+#ifndef _di_fss_embedded_list_write_parameters_
+  const f_string_static_t fss_embedded_list_write_short_file_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_WRITE_short_file_s, 0, FSS_EMBEDDED_LIST_WRITE_short_file_s_length);
+  const f_string_static_t fss_embedded_list_write_short_content_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_WRITE_short_content_s, 0, FSS_EMBEDDED_LIST_WRITE_short_content_s_length);
+  const f_string_static_t fss_embedded_list_write_short_double_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_WRITE_short_double_s, 0, FSS_EMBEDDED_LIST_WRITE_short_double_s_length);
+  const f_string_static_t fss_embedded_list_write_short_ignore_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_WRITE_short_ignore_s, 0, FSS_EMBEDDED_LIST_WRITE_short_ignore_s_length);
+  const f_string_static_t fss_embedded_list_write_short_object_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_WRITE_short_object_s, 0, FSS_EMBEDDED_LIST_WRITE_short_object_s_length);
+  const f_string_static_t fss_embedded_list_write_short_partial_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_WRITE_short_partial_s, 0, FSS_EMBEDDED_LIST_WRITE_short_partial_s_length);
+  const f_string_static_t fss_embedded_list_write_short_prepend_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_WRITE_short_prepend_s, 0, FSS_EMBEDDED_LIST_WRITE_short_prepend_s_length);
+  const f_string_static_t fss_embedded_list_write_short_single_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_WRITE_short_single_s, 0, FSS_EMBEDDED_LIST_WRITE_short_single_s_length);
+  const f_string_static_t fss_embedded_list_write_short_trim_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_WRITE_short_trim_s, 0, FSS_EMBEDDED_LIST_WRITE_short_trim_s_length);
+
+  const f_string_static_t fss_embedded_list_write_long_file_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_WRITE_long_file_s, 0, FSS_EMBEDDED_LIST_WRITE_long_file_s_length);
+  const f_string_static_t fss_embedded_list_write_long_content_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_WRITE_long_content_s, 0, FSS_EMBEDDED_LIST_WRITE_long_content_s_length);
+  const f_string_static_t fss_embedded_list_write_long_double_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_WRITE_long_double_s, 0, FSS_EMBEDDED_LIST_WRITE_long_double_s_length);
+  const f_string_static_t fss_embedded_list_write_long_ignore_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_WRITE_long_ignore_s, 0, FSS_EMBEDDED_LIST_WRITE_long_ignore_s_length);
+  const f_string_static_t fss_embedded_list_write_long_object_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_WRITE_long_object_s, 0, FSS_EMBEDDED_LIST_WRITE_long_object_s_length);
+  const f_string_static_t fss_embedded_list_write_long_partial_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_WRITE_long_partial_s, 0, FSS_EMBEDDED_LIST_WRITE_long_partial_s_length);
+  const f_string_static_t fss_embedded_list_write_long_prepend_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_WRITE_long_prepend_s, 0, FSS_EMBEDDED_LIST_WRITE_long_prepend_s_length);
+  const f_string_static_t fss_embedded_list_write_long_single_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_WRITE_long_single_s, 0, FSS_EMBEDDED_LIST_WRITE_long_single_s_length);
+  const f_string_static_t fss_embedded_list_write_long_trim_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_WRITE_long_trim_s, 0, FSS_EMBEDDED_LIST_WRITE_long_trim_s_length);
+#endif // _di_fss_embedded_list_write_parameters_
 
-    f_type_array_lengths_resize(0, &main->remaining);
-
-    macro_f_color_context_t_delete_simple(main->context);
+#ifndef _di_fss_embedded_list_write_main_delete_
+  f_status_t fss_embedded_list_write_main_delete(fll_program_data_t * const main) {
 
-    return F_none;
+    return fll_program_data_delete(main);
   }
 #endif // _di_fss_embedded_list_write_main_delete_
 
index 4d09ff36f2955931d44c3f7d2e80e5567cdb4165..3234dbf46658860d0d4dc742a19294b6fef36f29 100644 (file)
@@ -16,6 +16,9 @@
 extern "C" {
 #endif
 
+/**
+ * The program version.
+ */
 #ifndef _di_fss_embedded_list_write_program_version_
   #define FSS_EMBEDDED_LIST_WRITE_program_version_major_s F_string_ascii_0_s
   #define FSS_EMBEDDED_LIST_WRITE_program_version_minor_s F_string_ascii_5_s
@@ -42,6 +45,9 @@ extern "C" {
   extern const f_string_static_t fss_embedded_list_write_program_version_s;
 #endif // _di_fss_embedded_list_write_program_version_
 
+/**
+ * The program name.
+ */
 #ifndef _di_fss_embedded_list_write_program_name_
   #define FSS_EMBEDDED_LIST_WRITE_program_name_s      "fss_embedded_list_write"
   #define FSS_EMBEDDED_LIST_WRITE_program_name_long_s "FSS Embedded List Write"
@@ -53,32 +59,88 @@ extern "C" {
   extern const f_string_static_t fss_embedded_list_write_program_name_long_s;
 #endif // _di_fss_embedded_list_write_program_name_
 
+/**
+ * The program defines.
+ */
 #ifndef _di_fss_embedded_list_write_defines_
   #define fss_embedded_list_write_signal_check_d 10000
 
-  #define fss_embedded_list_write_pipe_content_end_s    '\f'
-  #define fss_embedded_list_write_pipe_content_ignore_s '\v'
-  #define fss_embedded_list_write_pipe_content_start_s  '\b'
-
-  #define fss_embedded_list_write_short_file_s    "f"
-  #define fss_embedded_list_write_short_content_s "c"
-  #define fss_embedded_list_write_short_double_s  "d"
-  #define fss_embedded_list_write_short_ignore_s  "I"
-  #define fss_embedded_list_write_short_object_s  "o"
-  #define fss_embedded_list_write_short_partial_s "p"
-  #define fss_embedded_list_write_short_prepend_s "P"
-  #define fss_embedded_list_write_short_single_s  "s"
-  #define fss_embedded_list_write_short_trim_s    "T"
-
-  #define fss_embedded_list_write_long_file_s    "file"
-  #define fss_embedded_list_write_long_content_s "content"
-  #define fss_embedded_list_write_long_double_s  "double"
-  #define fss_embedded_list_write_long_ignore_s  "ignore"
-  #define fss_embedded_list_write_long_object_s  "object"
-  #define fss_embedded_list_write_long_partial_s "partial"
-  #define fss_embedded_list_write_long_prepend_s "prepend"
-  #define fss_embedded_list_write_long_single_s  "single"
-  #define fss_embedded_list_write_long_trim_s    "trim"
+  #define FSS_EMBEDDED_LIST_WRITE_pipe_content_end_s    "\f"
+  #define FSS_EMBEDDED_LIST_WRITE_pipe_content_ignore_s "\v"
+  #define FSS_EMBEDDED_LIST_WRITE_pipe_content_start_s  "\b"
+
+  #define FSS_EMBEDDED_LIST_WRITE_pipe_content_end_s_length    1
+  #define FSS_EMBEDDED_LIST_WRITE_pipe_content_ignore_s_length 1
+  #define FSS_EMBEDDED_LIST_WRITE_pipe_content_start_s_length  1
+
+  extern const f_string_static_t fss_embedded_list_write_pipe_content_end_s;
+  extern const f_string_static_t fss_embedded_list_write_pipe_content_ignore_s;
+  extern const f_string_static_t fss_embedded_list_write_pipe_content_start_s;
+#endif // _di_fss_embedded_list_write_defines_
+
+/**
+ * The main program parameters.
+ */
+#ifndef _di_fss_embedded_list_write_parameters_
+  #define FSS_EMBEDDED_LIST_WRITE_short_file_s    "f"
+  #define FSS_EMBEDDED_LIST_WRITE_short_content_s "c"
+  #define FSS_EMBEDDED_LIST_WRITE_short_double_s  "d"
+  #define FSS_EMBEDDED_LIST_WRITE_short_ignore_s  "I"
+  #define FSS_EMBEDDED_LIST_WRITE_short_object_s  "o"
+  #define FSS_EMBEDDED_LIST_WRITE_short_partial_s "p"
+  #define FSS_EMBEDDED_LIST_WRITE_short_prepend_s "P"
+  #define FSS_EMBEDDED_LIST_WRITE_short_single_s  "s"
+  #define FSS_EMBEDDED_LIST_WRITE_short_trim_s    "T"
+
+  #define FSS_EMBEDDED_LIST_WRITE_long_file_s    "file"
+  #define FSS_EMBEDDED_LIST_WRITE_long_content_s "content"
+  #define FSS_EMBEDDED_LIST_WRITE_long_double_s  "double"
+  #define FSS_EMBEDDED_LIST_WRITE_long_ignore_s  "ignore"
+  #define FSS_EMBEDDED_LIST_WRITE_long_object_s  "object"
+  #define FSS_EMBEDDED_LIST_WRITE_long_partial_s "partial"
+  #define FSS_EMBEDDED_LIST_WRITE_long_prepend_s "prepend"
+  #define FSS_EMBEDDED_LIST_WRITE_long_single_s  "single"
+  #define FSS_EMBEDDED_LIST_WRITE_long_trim_s    "trim"
+
+  #define FSS_EMBEDDED_LIST_WRITE_short_file_s_length    1
+  #define FSS_EMBEDDED_LIST_WRITE_short_content_s_length 1
+  #define FSS_EMBEDDED_LIST_WRITE_short_double_s_length  1
+  #define FSS_EMBEDDED_LIST_WRITE_short_ignore_s_length  1
+  #define FSS_EMBEDDED_LIST_WRITE_short_object_s_length  1
+  #define FSS_EMBEDDED_LIST_WRITE_short_partial_s_length 1
+  #define FSS_EMBEDDED_LIST_WRITE_short_prepend_s_length 1
+  #define FSS_EMBEDDED_LIST_WRITE_short_single_s_length  1
+  #define FSS_EMBEDDED_LIST_WRITE_short_trim_s_length    1
+
+  #define FSS_EMBEDDED_LIST_WRITE_long_file_s_length    4
+  #define FSS_EMBEDDED_LIST_WRITE_long_content_s_length 7
+  #define FSS_EMBEDDED_LIST_WRITE_long_double_s_length  6
+  #define FSS_EMBEDDED_LIST_WRITE_long_ignore_s_length  6
+  #define FSS_EMBEDDED_LIST_WRITE_long_object_s_length  6
+  #define FSS_EMBEDDED_LIST_WRITE_long_partial_s_length 7
+  #define FSS_EMBEDDED_LIST_WRITE_long_prepend_s_length 7
+  #define FSS_EMBEDDED_LIST_WRITE_long_single_s_length  6
+  #define FSS_EMBEDDED_LIST_WRITE_long_trim_s_length    4
+
+  extern const f_string_static_t fss_embedded_list_write_short_file_s;
+  extern const f_string_static_t fss_embedded_list_write_short_content_s;
+  extern const f_string_static_t fss_embedded_list_write_short_double_s;
+  extern const f_string_static_t fss_embedded_list_write_short_ignore_s;
+  extern const f_string_static_t fss_embedded_list_write_short_object_s;
+  extern const f_string_static_t fss_embedded_list_write_short_partial_s;
+  extern const f_string_static_t fss_embedded_list_write_short_prepend_s;
+  extern const f_string_static_t fss_embedded_list_write_short_single_s;
+  extern const f_string_static_t fss_embedded_list_write_short_trim_s;
+
+  extern const f_string_static_t fss_embedded_list_write_long_file_s;
+  extern const f_string_static_t fss_embedded_list_write_long_content_s;
+  extern const f_string_static_t fss_embedded_list_write_long_double_s;
+  extern const f_string_static_t fss_embedded_list_write_long_ignore_s;
+  extern const f_string_static_t fss_embedded_list_write_long_object_s;
+  extern const f_string_static_t fss_embedded_list_write_long_partial_s;
+  extern const f_string_static_t fss_embedded_list_write_long_prepend_s;
+  extern const f_string_static_t fss_embedded_list_write_long_single_s;
+  extern const f_string_static_t fss_embedded_list_write_long_trim_s;
 
   enum {
     fss_embedded_list_write_parameter_help_e,
@@ -113,51 +175,19 @@ extern "C" {
       macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_version_s.string, f_console_standard_long_version_s.string, 0, 0, f_console_type_inverse_e), \
-      macro_f_console_parameter_t_initialize(fss_embedded_list_write_short_file_s, fss_embedded_list_write_long_file_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_embedded_list_write_short_content_s, fss_embedded_list_write_long_content_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_embedded_list_write_short_double_s, fss_embedded_list_write_long_double_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_embedded_list_write_short_ignore_s, fss_embedded_list_write_long_ignore_s, 0, 2, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_embedded_list_write_short_object_s, fss_embedded_list_write_long_object_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_embedded_list_write_short_partial_s, fss_embedded_list_write_long_partial_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_embedded_list_write_short_prepend_s, fss_embedded_list_write_long_prepend_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_embedded_list_write_short_single_s, fss_embedded_list_write_long_single_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_embedded_list_write_short_trim_s, fss_embedded_list_write_long_trim_s, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_embedded_list_write_short_file_s.string, fss_embedded_list_write_long_file_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_embedded_list_write_short_content_s.string, fss_embedded_list_write_long_content_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_embedded_list_write_short_double_s.string, fss_embedded_list_write_long_double_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_embedded_list_write_short_ignore_s.string, fss_embedded_list_write_long_ignore_s.string, 0, 2, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_embedded_list_write_short_object_s.string, fss_embedded_list_write_long_object_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_embedded_list_write_short_partial_s.string, fss_embedded_list_write_long_partial_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_embedded_list_write_short_prepend_s.string, fss_embedded_list_write_long_prepend_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_embedded_list_write_short_single_s.string, fss_embedded_list_write_long_single_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_embedded_list_write_short_trim_s.string, fss_embedded_list_write_long_trim_s.string, 0, 0, f_console_type_normal_e), \
     }
 
   #define fss_embedded_list_write_total_parameters_d 18
-#endif // _di_fss_embedded_list_write_defines_
-
-#ifndef _di_fss_embedded_list_write_main_t_
-  typedef struct {
-    f_console_parameters_t parameters;
-
-    f_array_lengths_t remaining;
-    bool process_pipe;
-
-    fl_print_t output;
-    fl_print_t error;
-    fl_print_t warning;
-
-    f_signal_t signal;
-
-    f_string_static_t prepend;
-
-    f_color_context_t context;
-  } fss_embedded_list_write_main_t;
-
-  #define fss_embedded_list_write_main_t_initialize \
-    { \
-      f_console_parameters_t_initialize, \
-      f_array_lengths_t_initialize, \
-      F_false, \
-      fl_print_t_initialize, \
-      macro_fl_print_t_initialize_error(), \
-      macro_fl_print_t_initialize_warning(), \
-      f_signal_t_initialize, \
-      f_string_static_t_initialize, \
-      f_color_context_t_initialize, \
-    }
-#endif // _di_fss_embedded_list_write_main_t_
+#endif // _di_fss_embedded_list_write_parameters_
 
 /**
  * Deallocate main.
@@ -175,7 +205,7 @@ extern "C" {
  * @see fss_embedded_list_write_main()
  */
 #ifndef _di_fss_embedded_list_write_main_delete_
-  extern f_status_t fss_embedded_list_write_main_delete(fss_embedded_list_write_main_t * const main);
+  extern f_status_t fss_embedded_list_write_main_delete(fll_program_data_t * const main);
 #endif // _di_fss_embedded_list_write_main_delete_
 
 #ifdef __cplusplus
index 7cccab655f18fda5358040f37e9d126d6894e4ad..7630190edeb382fd3cabb5887b03e0cffaff3d37 100644 (file)
@@ -6,15 +6,6 @@
 extern "C" {
 #endif
 
-#ifndef _di_fss_embedded_list_write_program_version_
-  const f_string_static_t fss_embedded_list_write_program_version_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_WRITE_program_version_s, 0, FSS_EMBEDDED_LIST_WRITE_program_version_s_length);
-#endif // _di_fss_embedded_list_write_program_version_
-
-#ifndef _di_fss_embedded_list_write_program_name_
-  const f_string_static_t fss_embedded_list_write_program_name_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_WRITE_program_name_s, 0, FSS_EMBEDDED_LIST_WRITE_program_name_s_length);
-  const f_string_static_t fss_embedded_list_write_program_name_long_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_WRITE_program_name_long_s, 0, FSS_EMBEDDED_LIST_WRITE_program_name_long_s_length);
-#endif // _di_fss_embedded_list_write_program_name_
-
 #ifndef _di_fss_embedded_list_write_print_help_
   f_status_t fss_embedded_list_write_print_help(const f_file_t file, const f_color_context_t context) {
 
@@ -69,7 +60,7 @@ extern "C" {
 #endif // _di_fss_embedded_list_write_print_help_
 
 #ifndef _di_fss_embedded_list_write_main_
-  f_status_t fss_embedded_list_write_main(fss_embedded_list_write_main_t * const main, const f_console_arguments_t *arguments) {
+  f_status_t fss_embedded_list_write_main(fll_program_data_t * const main, const f_console_arguments_t *arguments) {
 
     f_status_t status = F_none;
 
@@ -81,7 +72,7 @@ extern "C" {
       f_console_parameter_id_t ids[3] = { fss_embedded_list_write_parameter_no_color_e, fss_embedded_list_write_parameter_light_e, fss_embedded_list_write_parameter_dark_e };
       const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
 
-      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
+      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->context);
 
       main->output.set = &main->context.set;
       main->error.set = &main->context.set;
@@ -339,13 +330,9 @@ extern "C" {
         if (length) {
           f_string_range_t range = macro_f_string_range_t_initialize(length);
 
-          main->prepend.string = arguments->argv[index];
-          main->prepend.used = length;
-          main->prepend.size = length;
-
           for (; range.start < length; ++range.start) {
 
-            status = f_fss_is_space(main->prepend, range);
+            status = f_fss_is_space(main->parameter->arguments.array[index], range);
             if (F_status_is_error(status)) break;
 
             if (status == F_false) {
index e5956564dd39e6482a62e77574b82d32d344fd2c..8bc23ad4960aa6c580b8a554a021abc6886f410a 100644 (file)
@@ -89,7 +89,7 @@ extern "C" {
  * @see fss_embedded_list_write_main_delete()
  */
 #ifndef _di_fss_embedded_list_write_main_
-  extern f_status_t fss_embedded_list_write_main(fss_embedded_list_write_main_t * const main, const f_console_arguments_t *arguments);
+  extern f_status_t fss_embedded_list_write_main(fll_program_data_t * const main, const f_console_arguments_t *arguments);
 #endif // _di_fss_embedded_list_write_main_
 
 #ifdef __cplusplus
index 8d9854d08b7813b02b1fdca76203d02d6a677850..ae17ec29b5a7abe76de7526d73d4ab86893046d1 100644 (file)
@@ -3,7 +3,7 @@
 int main(const int argc, const f_string_t *argv) {
 
   const f_console_arguments_t arguments = { argc, argv };
-  fss_embedded_list_write_main_t data = fss_embedded_list_write_main_t_initialize;
+  fll_program_data_t data = fll_program_data_t_initialize;
 
   if (f_pipe_input_exists()) {
     data.process_pipe = F_true;
index ca865e5b8be2a59eebeac785fcbe48e618e1caf2..f0dc8a766eec1a5431cb4cbb5c4be14083663cb6 100644 (file)
@@ -6,7 +6,7 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_embedded_list_write_print_signal_received_
-  void fss_embedded_list_write_print_signal_received(fss_embedded_list_write_main_t * const main, const f_status_t signal) {
+  void fss_embedded_list_write_print_signal_received(fll_program_data_t * const main, const f_status_t signal) {
 
     if (main->warning.verbosity != f_console_verbosity_verbose_e) return;
 
@@ -24,7 +24,7 @@ extern "C" {
 #endif // _di_fss_embedded_list_write_print_signal_received_
 
 #ifndef _di_fss_embedded_list_write_signal_received_
-  f_status_t fss_embedded_list_write_signal_received(fss_embedded_list_write_main_t * const main) {
+  f_status_t fss_embedded_list_write_signal_received(fll_program_data_t * const main) {
 
     if (main->signal.id == -1) {
       return F_false;
index 1e0141106f3629422f0529b40e6379f034f207fa..4ff4b1cdd43461c1048926d432f65dab2dac883f 100644 (file)
@@ -34,7 +34,7 @@ extern "C" {
  *   The signal received.
  */
 #ifndef _di_fss_embedded_list_write_print_signal_received_
-  extern void fss_embedded_list_write_print_signal_received(fss_embedded_list_write_main_t * const main, const f_status_t signal) F_attribute_visibility_internal_d;
+  extern void fss_embedded_list_write_print_signal_received(fll_program_data_t * const main, const f_status_t signal) F_attribute_visibility_internal_d;
 #endif // _di_fss_embedded_list_write_print_signal_received_
 
 /**
@@ -52,7 +52,7 @@ extern "C" {
  * @see f_signal_read()
  */
 #ifndef _di_fss_embedded_list_write_signal_received_
-  extern f_status_t fss_embedded_list_write_signal_received(fss_embedded_list_write_main_t * const main);
+  extern f_status_t fss_embedded_list_write_signal_received(fll_program_data_t * const main);
 #endif // _di_fss_embedded_list_write_signal_received_
 
 #ifdef __cplusplus
index 5c3c7c7b90b81944f6635145410e5a856006cff9..73f72cf61e77913bea97781e6b09e93a4e687c84 100644 (file)
@@ -7,7 +7,7 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_embedded_list_write_error_parameter_same_times_print_
-  void fss_embedded_list_write_error_parameter_same_times_print(fss_embedded_list_write_main_t * const main) {
+  void fss_embedded_list_write_error_parameter_same_times_print(fll_program_data_t * const main) {
 
     if (main->error.verbosity == f_console_verbosity_quiet_e) {
       return;
@@ -28,7 +28,7 @@ extern "C" {
 #endif // _di_fss_embedded_list_write_error_parameter_same_times_print_
 
 #ifndef _di_fss_embedded_list_write_error_parameter_unsupported_eol_print_
-  void fss_embedded_list_write_error_parameter_unsupported_eol_print(fss_embedded_list_write_main_t * const main) {
+  void fss_embedded_list_write_error_parameter_unsupported_eol_print(fll_program_data_t * const main) {
 
     if (main->error.verbosity == f_console_verbosity_quiet_e) {
       return;
@@ -45,7 +45,7 @@ extern "C" {
 #endif // _di_fss_embedded_list_write_error_parameter_unsupported_eol_print_
 
 #ifndef _di_fss_embedded_list_write_error_parameter_value_missing_print_
-  void fss_embedded_list_write_error_parameter_value_missing_print(fss_embedded_list_write_main_t * const main, const f_string_static_t symbol, const f_string_static_t parameter) {
+  void fss_embedded_list_write_error_parameter_value_missing_print(fll_program_data_t * const main, const f_string_static_t symbol, const f_string_static_t parameter) {
 
     if (main->error.verbosity == f_console_verbosity_quiet_e) {
       return;
@@ -62,7 +62,7 @@ extern "C" {
 #endif // _di_fss_embedded_list_write_error_parameter_value_missing_print_
 
 #ifndef _di_fss_embedded_list_write_process_
-  f_status_t fss_embedded_list_write_process(fss_embedded_list_write_main_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, const f_string_ranges_t *ignore, f_string_dynamic_t *buffer) {
+  f_status_t fss_embedded_list_write_process(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, const f_string_ranges_t *ignore, f_string_dynamic_t *buffer) {
 
     f_status_t status = F_none;
     f_state_t state = macro_f_state_t_initialize(fss_embedded_list_write_common_allocation_large_d, fss_embedded_list_write_common_allocation_small_d, 0, 0, 0, 0, 0);
@@ -136,7 +136,7 @@ extern "C" {
 #endif // _di_fss_embedded_list_write_process_
 
 #ifndef _di_fss_embedded_list_write_process_pipe_
-  f_status_t fss_embedded_list_write_process_pipe(fss_embedded_list_write_main_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer, f_string_ranges_t *ignore) {
+  f_status_t fss_embedded_list_write_process_pipe(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer, f_string_ranges_t *ignore) {
 
     f_status_t status = F_none;
     f_status_t status_pipe = F_none;
@@ -353,7 +353,7 @@ extern "C" {
 #endif // _di_fss_embedded_list_write_process_pipe_
 
 #ifndef _di_fss_embedded_list_write_process_parameter_ignore_
-  f_status_t fss_embedded_list_write_process_parameter_ignore(fss_embedded_list_write_main_t * const main, const f_console_arguments_t *arguments, const f_array_lengths_t contents, const f_array_length_t location, f_string_ranges_t *ignore) {
+  f_status_t fss_embedded_list_write_process_parameter_ignore(fll_program_data_t * const main, const f_console_arguments_t *arguments, const f_array_lengths_t contents, const f_array_length_t location, f_string_ranges_t *ignore) {
 
     f_status_t status = F_none;
 
index 6a4d9f546518ae3ceb1ae7f3b4530a4c809ce00b..bf59fd07955642e77f0faa4aa94e2ff266b54b99 100644 (file)
@@ -19,7 +19,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_embedded_list_write_error_parameter_same_times_print_
-  void fss_embedded_list_write_error_parameter_same_times_print(fss_embedded_list_write_main_t * const main) F_attribute_visibility_internal_d;
+  void fss_embedded_list_write_error_parameter_same_times_print(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_embedded_list_write_error_parameter_same_times_print_
 
 /**
@@ -29,7 +29,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_embedded_list_write_error_parameter_unsupported_eol_print_
-  void fss_embedded_list_write_error_parameter_unsupported_eol_print(fss_embedded_list_write_main_t * const main) F_attribute_visibility_internal_d;
+  void fss_embedded_list_write_error_parameter_unsupported_eol_print(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_embedded_list_write_error_parameter_unsupported_eol_print_
 
 /**
@@ -43,7 +43,7 @@ extern "C" {
  *   The parameter name, such as "help" in "--help".
  */
 #ifndef _di_fss_embedded_list_write_error_parameter_value_missing_print_
-  void fss_embedded_list_write_error_parameter_value_missing_print(fss_embedded_list_write_main_t * const main, const f_string_static_t symbol, const f_string_static_t parameter) F_attribute_visibility_internal_d;
+  void fss_embedded_list_write_error_parameter_value_missing_print(fll_program_data_t * const main, const f_string_static_t symbol, const f_string_static_t parameter) F_attribute_visibility_internal_d;
 #endif // _di_fss_embedded_list_write_error_parameter_value_missing_print_
 
 /**
@@ -73,7 +73,7 @@ extern "C" {
  *   F_failure (with error bit) for any othe failure.
  */
 #ifndef _di_fss_embedded_list_write_process_
-  extern f_status_t fss_embedded_list_write_process(fss_embedded_list_write_main_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, const f_string_ranges_t *ignore, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
+  extern f_status_t fss_embedded_list_write_process(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, const f_string_ranges_t *ignore, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
 #endif // _di_fss_embedded_list_write_process_
 
 /**
@@ -97,7 +97,7 @@ extern "C" {
  *   F_failure (with error bit) for any othe failure.
  */
 #ifndef _di_fss_embedded_list_write_process_pipe_
-  extern f_status_t fss_embedded_list_write_process_pipe(fss_embedded_list_write_main_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer, f_string_ranges_t *ignore) F_attribute_visibility_internal_d;
+  extern f_status_t fss_embedded_list_write_process_pipe(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer, f_string_ranges_t *ignore) F_attribute_visibility_internal_d;
 #endif // _di_fss_embedded_list_write_process_pipe_
 
 /**
@@ -119,7 +119,7 @@ extern "C" {
  *   F_failure (with error bit) for any othe failure.
  */
 #ifndef _di_fss_embedded_list_write_process_parameter_ignore_
-  extern f_status_t fss_embedded_list_write_process_parameter_ignore(fss_embedded_list_write_main_t * const main, const f_console_arguments_t *arguments, const f_array_lengths_t contents, const f_array_length_t location, f_string_ranges_t *ignore) F_attribute_visibility_internal_d;
+  extern f_status_t fss_embedded_list_write_process_parameter_ignore(fll_program_data_t * const main, const f_console_arguments_t *arguments, const f_array_lengths_t contents, const f_array_length_t location, f_string_ranges_t *ignore) F_attribute_visibility_internal_d;
 #endif // _di_fss_embedded_list_write_process_parameter_ignore_
 
 #ifdef __cplusplus
index 07fd6288b075bb3d507385b3724660d3bf6bb40d..9bbe35ed411cd00a14b5e90f3cb1b074179885af 100644 (file)
@@ -13,15 +13,48 @@ extern "C" {
   const f_string_static_t fss_extended_list_read_program_name_long_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_program_name_long_s, 0, FSS_EXTENDED_LIST_READ_program_name_long_s_length);
 #endif // _di_fss_extended_list_read_program_name_
 
-#ifndef _di_fss_extended_list_read_main_delete_
-  f_status_t fss_extended_list_read_main_delete(fss_extended_list_read_main_t *main) {
-
-    f_console_parameters_delete(&main->parameters);
+#ifndef _di_fss_extended_list_read_defines_
+  const f_string_static_t fss_extended_list_read_pipe_content_end_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_pipe_content_end_s, 0, FSS_EXTENDED_LIST_READ_pipe_content_end_s_length);
+  const f_string_static_t fss_extended_list_read_pipe_content_ignore_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_pipe_content_ignore_s, 0, FSS_EXTENDED_LIST_READ_pipe_content_ignore_s_length);
+  const f_string_static_t fss_extended_list_read_pipe_content_start_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_pipe_content_start_s, 0, FSS_EXTENDED_LIST_READ_pipe_content_start_s_length);
+#endif // _di_fss_extended_list_read_defines_
+
+#ifndef _di_fss_extended_list_read_parameters_
+  const f_string_static_t fss_extended_list_read_short_at_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_short_at_s, 0, FSS_EXTENDED_LIST_READ_short_at_s_length);
+  const f_string_static_t fss_extended_list_read_short_content_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_short_content_s, 0, FSS_EXTENDED_LIST_READ_short_content_s_length);
+  const f_string_static_t fss_extended_list_read_short_columns_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_short_columns_s, 0, FSS_EXTENDED_LIST_READ_short_columns_s_length);
+  const f_string_static_t fss_extended_list_read_short_delimit_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_short_delimit_s, 0, FSS_EXTENDED_LIST_READ_short_delimit_s_length);
+  const f_string_static_t fss_extended_list_read_short_depth_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_short_depth_s, 0, FSS_EXTENDED_LIST_READ_short_depth_s_length);
+  const f_string_static_t fss_extended_list_read_short_empty_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_short_empty_s, 0, FSS_EXTENDED_LIST_READ_short_empty_s_length);
+  const f_string_static_t fss_extended_list_read_short_line_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_short_line_s, 0, FSS_EXTENDED_LIST_READ_short_line_s_length);
+  const f_string_static_t fss_extended_list_read_short_name_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_short_name_s, 0, FSS_EXTENDED_LIST_READ_short_name_s_length);
+  const f_string_static_t fss_extended_list_read_short_object_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_short_object_s, 0, FSS_EXTENDED_LIST_READ_short_object_s_length);
+  const f_string_static_t fss_extended_list_read_short_pipe_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_short_pipe_s, 0, FSS_EXTENDED_LIST_READ_short_pipe_s_length);
+  const f_string_static_t fss_extended_list_read_short_raw_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_short_raw_s, 0, FSS_EXTENDED_LIST_READ_short_raw_s_length);
+  const f_string_static_t fss_extended_list_read_short_select_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_short_select_s, 0, FSS_EXTENDED_LIST_READ_short_select_s_length);
+  const f_string_static_t fss_extended_list_read_short_total_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_short_total_s, 0, FSS_EXTENDED_LIST_READ_short_total_s_length);
+  const f_string_static_t fss_extended_list_read_short_trim_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_short_trim_s, 0, FSS_EXTENDED_LIST_READ_short_trim_s_length);
+
+  const f_string_static_t fss_extended_list_read_long_at_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_long_at_s, 0, FSS_EXTENDED_LIST_READ_long_at_s_length);
+  const f_string_static_t fss_extended_list_read_long_content_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_long_content_s, 0, FSS_EXTENDED_LIST_READ_long_content_s_length);
+  const f_string_static_t fss_extended_list_read_long_columns_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_long_columns_s, 0, FSS_EXTENDED_LIST_READ_long_columns_s_length);
+  const f_string_static_t fss_extended_list_read_long_delimit_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_long_delimit_s, 0, FSS_EXTENDED_LIST_READ_long_delimit_s_length);
+  const f_string_static_t fss_extended_list_read_long_depth_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_long_depth_s, 0, FSS_EXTENDED_LIST_READ_long_depth_s_length);
+  const f_string_static_t fss_extended_list_read_long_empty_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_long_empty_s, 0, FSS_EXTENDED_LIST_READ_long_empty_s_length);
+  const f_string_static_t fss_extended_list_read_long_line_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_long_line_s, 0, FSS_EXTENDED_LIST_READ_long_line_s_length);
+  const f_string_static_t fss_extended_list_read_long_name_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_long_name_s, 0, FSS_EXTENDED_LIST_READ_long_name_s_length);
+  const f_string_static_t fss_extended_list_read_long_object_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_long_object_s, 0, FSS_EXTENDED_LIST_READ_long_object_s_length);
+  const f_string_static_t fss_extended_list_read_long_pipe_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_long_pipe_s, 0, FSS_EXTENDED_LIST_READ_long_pipe_s_length);
+  const f_string_static_t fss_extended_list_read_long_raw_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_long_raw_s, 0, FSS_EXTENDED_LIST_READ_long_raw_s_length);
+  const f_string_static_t fss_extended_list_read_long_select_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_long_select_s, 0, FSS_EXTENDED_LIST_READ_long_select_s_length);
+  const f_string_static_t fss_extended_list_read_long_total_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_long_total_s, 0, FSS_EXTENDED_LIST_READ_long_total_s_length);
+  const f_string_static_t fss_extended_list_read_long_trim_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_long_trim_s, 0, FSS_EXTENDED_LIST_READ_long_trim_s_length);
+#endif // _di_fss_extended_list_read_parameters_
 
-    f_type_array_lengths_resize(0, &main->remaining);
-    macro_f_color_context_t_delete_simple(main->context);
+#ifndef _di_fss_extended_list_read_main_delete_
+  f_status_t fss_extended_list_read_main_delete(fll_program_data_t *main) {
 
-    return F_none;
+    return fll_program_data_delete(main);
   }
 #endif // _di_fss_extended_list_read_main_delete_
 
index f14c7ae22aa5214e4686f7079689a1f013709b06..0369ea78ab13517ce25f18a2dd420bb182a9710d 100644 (file)
@@ -16,6 +16,9 @@
 extern "C" {
 #endif
 
+/**
+ * The program version.
+ */
 #ifndef _di_fss_extended_list_read_program_version_
   #define FSS_EXTENDED_LIST_READ_program_version_major_s F_string_ascii_0_s
   #define FSS_EXTENDED_LIST_READ_program_version_minor_s F_string_ascii_5_s
@@ -42,6 +45,9 @@ extern "C" {
   extern const f_string_static_t fss_extended_list_read_program_version_s;
 #endif // _di_fss_extended_list_read_program_version_
 
+/**
+ * The program name.
+ */
 #ifndef _di_fss_extended_list_read_program_name_
   #define FSS_EXTENDED_LIST_READ_program_name_s      "fss_extended_list_read"
   #define FSS_EXTENDED_LIST_READ_program_name_long_s "FSS Extended List Read"
@@ -53,42 +59,118 @@ extern "C" {
   extern const f_string_static_t fss_extended_list_read_program_name_long_s;
 #endif // _di_fss_extended_list_read_program_name_
 
+/**
+ * The program defines.
+ */
 #ifndef _di_fss_extended_list_read_defines_
   #define fss_extended_list_read_signal_check_d 10000
 
-  #define fss_extended_list_read_pipe_content_end    '\f'
-  #define fss_extended_list_read_pipe_content_ignore '\v'
-  #define fss_extended_list_read_pipe_content_start  '\b'
-
-  #define fss_extended_list_read_short_at_s      "a"
-  #define fss_extended_list_read_short_content_s "c"
-  #define fss_extended_list_read_short_columns_s "C"
-  #define fss_extended_list_read_short_delimit_s "D"
-  #define fss_extended_list_read_short_depth_s   "d"
-  #define fss_extended_list_read_short_empty_s   "e"
-  #define fss_extended_list_read_short_line_s    "l"
-  #define fss_extended_list_read_short_name_s    "n"
-  #define fss_extended_list_read_short_object_s  "o"
-  #define fss_extended_list_read_short_pipe_s    "p"
-  #define fss_extended_list_read_short_raw_s     "R"
-  #define fss_extended_list_read_short_select_s  "s"
-  #define fss_extended_list_read_short_total_s   "t"
-  #define fss_extended_list_read_short_trim_s    "T"
-
-  #define fss_extended_list_read_long_at_s      "at"
-  #define fss_extended_list_read_long_content_s "content"
-  #define fss_extended_list_read_long_columns_s "columns"
-  #define fss_extended_list_read_long_delimit_s "delimit"
-  #define fss_extended_list_read_long_depth_s   "depth"
-  #define fss_extended_list_read_long_empty_s   "empty"
-  #define fss_extended_list_read_long_line_s    "line"
-  #define fss_extended_list_read_long_name_s    "name"
-  #define fss_extended_list_read_long_object_s  "object"
-  #define fss_extended_list_read_long_pipe_s    "pipe"
-  #define fss_extended_list_read_long_raw_s     "raw"
-  #define fss_extended_list_read_long_select_s  "select"
-  #define fss_extended_list_read_long_total_s   "total"
-  #define fss_extended_list_read_long_trim_s    "trim"
+  #define FSS_EXTENDED_LIST_READ_pipe_content_end_s    "\f"
+  #define FSS_EXTENDED_LIST_READ_pipe_content_ignore_s "\v"
+  #define FSS_EXTENDED_LIST_READ_pipe_content_start_s  "\b"
+
+  #define FSS_EXTENDED_LIST_READ_pipe_content_end_s_length    1
+  #define FSS_EXTENDED_LIST_READ_pipe_content_ignore_s_length 1
+  #define FSS_EXTENDED_LIST_READ_pipe_content_start_s_length  1
+
+  extern const f_string_static_t fss_extended_list_read_pipe_content_end_s;
+  extern const f_string_static_t fss_extended_list_read_pipe_content_ignore_s;
+  extern const f_string_static_t fss_extended_list_read_pipe_content_start_s;
+#endif // _di_fss_extended_list_read_defines_
+
+/**
+ * The main program parameters.
+ */
+#ifndef _di_fss_extended_list_read_parameters_
+  #define FSS_EXTENDED_LIST_READ_short_at_s      "a"
+  #define FSS_EXTENDED_LIST_READ_short_content_s "c"
+  #define FSS_EXTENDED_LIST_READ_short_columns_s "C"
+  #define FSS_EXTENDED_LIST_READ_short_delimit_s "D"
+  #define FSS_EXTENDED_LIST_READ_short_depth_s   "d"
+  #define FSS_EXTENDED_LIST_READ_short_empty_s   "e"
+  #define FSS_EXTENDED_LIST_READ_short_line_s    "l"
+  #define FSS_EXTENDED_LIST_READ_short_name_s    "n"
+  #define FSS_EXTENDED_LIST_READ_short_object_s  "o"
+  #define FSS_EXTENDED_LIST_READ_short_pipe_s    "p"
+  #define FSS_EXTENDED_LIST_READ_short_raw_s     "R"
+  #define FSS_EXTENDED_LIST_READ_short_select_s  "s"
+  #define FSS_EXTENDED_LIST_READ_short_total_s   "t"
+  #define FSS_EXTENDED_LIST_READ_short_trim_s    "T"
+
+  #define FSS_EXTENDED_LIST_READ_long_at_s      "at"
+  #define FSS_EXTENDED_LIST_READ_long_content_s "content"
+  #define FSS_EXTENDED_LIST_READ_long_columns_s "columns"
+  #define FSS_EXTENDED_LIST_READ_long_delimit_s "delimit"
+  #define FSS_EXTENDED_LIST_READ_long_depth_s   "depth"
+  #define FSS_EXTENDED_LIST_READ_long_empty_s   "empty"
+  #define FSS_EXTENDED_LIST_READ_long_line_s    "line"
+  #define FSS_EXTENDED_LIST_READ_long_name_s    "name"
+  #define FSS_EXTENDED_LIST_READ_long_object_s  "object"
+  #define FSS_EXTENDED_LIST_READ_long_pipe_s    "pipe"
+  #define FSS_EXTENDED_LIST_READ_long_raw_s     "raw"
+  #define FSS_EXTENDED_LIST_READ_long_select_s  "select"
+  #define FSS_EXTENDED_LIST_READ_long_total_s   "total"
+  #define FSS_EXTENDED_LIST_READ_long_trim_s    "trim"
+
+  #define FSS_EXTENDED_LIST_READ_short_at_s_length      1
+  #define FSS_EXTENDED_LIST_READ_short_content_s_length 1
+  #define FSS_EXTENDED_LIST_READ_short_columns_s_length 1
+  #define FSS_EXTENDED_LIST_READ_short_delimit_s_length 1
+  #define FSS_EXTENDED_LIST_READ_short_depth_s_length   1
+  #define FSS_EXTENDED_LIST_READ_short_empty_s_length   1
+  #define FSS_EXTENDED_LIST_READ_short_line_s_length    1
+  #define FSS_EXTENDED_LIST_READ_short_name_s_length    1
+  #define FSS_EXTENDED_LIST_READ_short_object_s_length  1
+  #define FSS_EXTENDED_LIST_READ_short_pipe_s_length    1
+  #define FSS_EXTENDED_LIST_READ_short_raw_s_length     1
+  #define FSS_EXTENDED_LIST_READ_short_select_s_length  1
+  #define FSS_EXTENDED_LIST_READ_short_total_s_length   1
+  #define FSS_EXTENDED_LIST_READ_short_trim_s_length    1
+
+  #define FSS_EXTENDED_LIST_READ_long_at_s_length      2
+  #define FSS_EXTENDED_LIST_READ_long_content_s_length 7
+  #define FSS_EXTENDED_LIST_READ_long_columns_s_length 7
+  #define FSS_EXTENDED_LIST_READ_long_delimit_s_length 7
+  #define FSS_EXTENDED_LIST_READ_long_depth_s_length   5
+  #define FSS_EXTENDED_LIST_READ_long_empty_s_length   5
+  #define FSS_EXTENDED_LIST_READ_long_line_s_length    4
+  #define FSS_EXTENDED_LIST_READ_long_name_s_length    4
+  #define FSS_EXTENDED_LIST_READ_long_object_s_length  6
+  #define FSS_EXTENDED_LIST_READ_long_pipe_s_length    4
+  #define FSS_EXTENDED_LIST_READ_long_raw_s_length     3
+  #define FSS_EXTENDED_LIST_READ_long_select_s_length  6
+  #define FSS_EXTENDED_LIST_READ_long_total_s_length   5
+  #define FSS_EXTENDED_LIST_READ_long_trim_s_length    4
+
+  extern const f_string_static_t fss_extended_list_read_short_at_s;
+  extern const f_string_static_t fss_extended_list_read_short_content_s;
+  extern const f_string_static_t fss_extended_list_read_short_columns_s;
+  extern const f_string_static_t fss_extended_list_read_short_delimit_s;
+  extern const f_string_static_t fss_extended_list_read_short_depth_s;
+  extern const f_string_static_t fss_extended_list_read_short_empty_s;
+  extern const f_string_static_t fss_extended_list_read_short_line_s;
+  extern const f_string_static_t fss_extended_list_read_short_name_s;
+  extern const f_string_static_t fss_extended_list_read_short_object_s;
+  extern const f_string_static_t fss_extended_list_read_short_pipe_s;
+  extern const f_string_static_t fss_extended_list_read_short_raw_s;
+  extern const f_string_static_t fss_extended_list_read_short_select_s;
+  extern const f_string_static_t fss_extended_list_read_short_total_s;
+  extern const f_string_static_t fss_extended_list_read_short_trim_s;
+
+  extern const f_string_static_t fss_extended_list_read_long_at_s;
+  extern const f_string_static_t fss_extended_list_read_long_content_s;
+  extern const f_string_static_t fss_extended_list_read_long_columns_s;
+  extern const f_string_static_t fss_extended_list_read_long_delimit_s;
+  extern const f_string_static_t fss_extended_list_read_long_depth_s;
+  extern const f_string_static_t fss_extended_list_read_long_empty_s;
+  extern const f_string_static_t fss_extended_list_read_long_line_s;
+  extern const f_string_static_t fss_extended_list_read_long_name_s;
+  extern const f_string_static_t fss_extended_list_read_long_object_s;
+  extern const f_string_static_t fss_extended_list_read_long_pipe_s;
+  extern const f_string_static_t fss_extended_list_read_long_raw_s;
+  extern const f_string_static_t fss_extended_list_read_long_select_s;
+  extern const f_string_static_t fss_extended_list_read_long_total_s;
+  extern const f_string_static_t fss_extended_list_read_long_trim_s;
 
   enum {
     fss_extended_list_read_parameter_help_e,
@@ -128,24 +210,24 @@ extern "C" {
       macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_version_s.string, f_console_standard_long_version_s.string, 0, 0, f_console_type_inverse_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_list_read_short_at_s, fss_extended_list_read_long_at_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_list_read_short_content_s, fss_extended_list_read_long_content_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_list_read_short_columns_s, fss_extended_list_read_long_columns_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_list_read_short_delimit_s, fss_extended_list_read_long_delimit_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_list_read_short_depth_s, fss_extended_list_read_long_depth_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_list_read_short_empty_s, fss_extended_list_read_long_empty_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_list_read_short_line_s, fss_extended_list_read_long_line_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_list_read_short_name_s, fss_extended_list_read_long_name_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_list_read_short_object_s, fss_extended_list_read_long_object_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_list_read_short_pipe_s, fss_extended_list_read_long_pipe_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_list_read_short_raw_s, fss_extended_list_read_long_raw_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_list_read_short_select_s, fss_extended_list_read_long_select_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_list_read_short_total_s, fss_extended_list_read_long_total_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_list_read_short_trim_s, fss_extended_list_read_long_trim_s, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_list_read_short_at_s.string, fss_extended_list_read_long_at_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_list_read_short_content_s.string, fss_extended_list_read_long_content_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_list_read_short_columns_s.string, fss_extended_list_read_long_columns_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_list_read_short_delimit_s.string, fss_extended_list_read_long_delimit_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_list_read_short_depth_s.string, fss_extended_list_read_long_depth_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_list_read_short_empty_s.string, fss_extended_list_read_long_empty_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_list_read_short_line_s.string, fss_extended_list_read_long_line_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_list_read_short_name_s.string, fss_extended_list_read_long_name_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_list_read_short_object_s.string, fss_extended_list_read_long_object_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_list_read_short_pipe_s.string, fss_extended_list_read_long_pipe_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_list_read_short_raw_s.string, fss_extended_list_read_long_raw_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_list_read_short_select_s.string, fss_extended_list_read_long_select_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_list_read_short_total_s.string, fss_extended_list_read_long_total_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_list_read_short_trim_s.string, fss_extended_list_read_long_trim_s.string, 0, 0, f_console_type_normal_e), \
     }
 
   #define fss_extended_list_read_total_parameters_d 23
-#endif // _di_fss_extended_list_read_defines_
+#endif // _di_fss_extended_list_read_parameters_
 
 /**
  * FSS Delimit Parameter data.
@@ -186,35 +268,6 @@ extern "C" {
   };
 #endif // _di_fss_extended_list_read_delimit_modes_
 
-#ifndef _di_fss_extended_list_read_main_t_
-  typedef struct {
-    f_console_parameters_t parameters;
-
-    f_array_lengths_t remaining;
-    bool process_pipe;
-
-    fl_print_t output;
-    fl_print_t error;
-    fl_print_t warning;
-
-    f_signal_t signal;
-
-    f_color_context_t context;
-  } fss_extended_list_read_main_t;
-
-  #define fss_extended_list_read_main_t_initialize \
-    { \
-      f_console_parameters_t_initialize, \
-      f_array_lengths_t_initialize, \
-      F_false, \
-      fl_print_t_initialize, \
-      macro_fl_print_t_initialize_error(), \
-      macro_fl_print_t_initialize_warning(), \
-      f_signal_t_initialize, \
-      f_color_context_t_initialize, \
-    }
-#endif // _di_fss_extended_list_read_main_t_
-
 /**
  * Deallocate main.
  *
@@ -231,7 +284,7 @@ extern "C" {
  * @see fss_extended_list_read_main()
  */
 #ifndef _di_fss_extended_list_read_main_delete_
-  extern f_status_t fss_extended_list_read_main_delete(fss_extended_list_read_main_t *main);
+  extern f_status_t fss_extended_list_read_main_delete(fll_program_data_t *main);
 #endif // _di_fss_extended_list_read_main_delete_
 
 #ifdef __cplusplus
index 18cb5ca66668debad00976823f8ce747b9e7cc85..f31ace0eae199dad2c7c5db79c0f2aeb46f6afbf 100644 (file)
@@ -7,15 +7,6 @@
 extern "C" {
 #endif
 
-#ifndef _di_fss_extended_list_read_program_version_
-  const f_string_static_t fss_extended_list_read_program_version_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_program_version_s, 0, FSS_EXTENDED_LIST_READ_program_version_s_length);
-#endif // _di_fss_extended_list_read_program_version_
-
-#ifndef _di_fss_extended_list_read_program_name_
-  const f_string_static_t fss_extended_list_read_program_name_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_program_name_s, 0, FSS_EXTENDED_LIST_READ_program_name_s_length);
-  const f_string_static_t fss_extended_list_read_program_name_long_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_program_name_long_s, 0, FSS_EXTENDED_LIST_READ_program_name_long_s_length);
-#endif // _di_fss_extended_list_read_program_name_
-
 #ifndef _di_fss_extended_list_read_print_help_
   f_status_t fss_extended_list_read_print_help(const f_file_t file, const f_color_context_t context) {
 
@@ -50,7 +41,7 @@ extern "C" {
     fll_program_print_help_option(file, context, fss_extended_list_read_short_total_s, fss_extended_list_read_long_total_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "   Print the total number of lines.");
     fll_program_print_help_option(file, context, fss_extended_list_read_short_trim_s, fss_extended_list_read_long_trim_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "    Trim Object names on select or print.");
 
-    fll_program_print_help_usage(file, context, fss_extended_list_read_program_name_s, "filename(s)");
+    fll_program_print_help_usage(file, context, fss_extended_list_read_program_name_s, fll_program_parameter_filenames_s);
 
     fl_print_format(" %[Notes:%]%r", file.stream, context.set.important, context.set.important, f_string_eol_s);
 
@@ -127,7 +118,7 @@ extern "C" {
 #endif // _di_fss_extended_list_read_print_help_
 
 #ifndef _di_fss_extended_list_read_main_
-  f_status_t fss_extended_list_read_main(fss_extended_list_read_main_t * const main, const f_console_arguments_t *arguments) {
+  f_status_t fss_extended_list_read_main(fll_program_data_t * const main, const f_console_arguments_t *arguments) {
 
     f_status_t status = F_none;
 
@@ -139,7 +130,7 @@ extern "C" {
       f_console_parameter_id_t ids[3] = { fss_extended_list_read_parameter_no_color_e, fss_extended_list_read_parameter_light_e, fss_extended_list_read_parameter_dark_e };
       const f_console_parameter_ids_t choices = { ids, 3 };
 
-      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
+      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->context);
 
       main->output.set = &main->context.set;
       main->error.set = &main->context.set;
@@ -225,17 +216,17 @@ extern "C" {
     }
 
     // Provide a range designating where within the buffer a particular file exists, using a statically allocated array.
-    fss_extended_list_read_file_t files_array[main->remaining.used + 1];
+    fss_extended_list_read_file_t files_array[main->parameters.remaining.used + 1];
     fss_extended_list_read_data_t data = fss_extended_list_read_data_t_initialize;
 
     data.files.array = files_array;
     data.files.used = 1;
-    data.files.size = main->remaining.used + 1;
+    data.files.size = main->parameters.remaining.used + 1;
     data.files.array[0].name = "(pipe)";
     data.files.array[0].range.start = 1;
     data.files.array[0].range.stop = 0;
 
-    if (main->remaining.used || main->process_pipe) {
+    if (main->parameters.remaining.used || main->process_pipe) {
       {
         const f_array_length_t parameter_code[] = {
           fss_extended_list_read_parameter_at_e,
@@ -561,11 +552,11 @@ extern "C" {
         }
       }
 
-      if (F_status_is_error_not(status) && main->remaining.used > 0) {
+      if (F_status_is_error_not(status) && main->parameters.remaining.used > 0) {
         f_file_t file = f_file_t_initialize;
         f_array_length_t size_file = 0;
 
-        for (f_array_length_t i = 0; i < main->remaining.used; ++i) {
+        for (f_array_length_t i = 0; i < main->parameters.remaining.used; ++i) {
 
           if (fss_extended_list_read_signal_received(main)) {
             status = F_status_set_error(F_interrupt);
@@ -577,10 +568,10 @@ extern "C" {
           file.stream = 0;
           file.id = -1;
 
-          status = f_file_stream_open(arguments->argv[main->remaining.array[i]], 0, &file);
+          status = f_file_stream_open(arguments->argv[main->parameters.remaining.array[i]], 0, &file);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e);
 
             break;
           }
@@ -589,7 +580,7 @@ extern "C" {
           status = f_file_size_by_id(file.id, &size_file);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
             break;
           }
@@ -598,7 +589,7 @@ extern "C" {
             status = f_string_dynamic_resize(data.buffer.size + size_file, &data.buffer);
 
             if (F_status_is_error(status)) {
-              fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+              fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
               break;
             }
@@ -606,12 +597,12 @@ extern "C" {
             status = f_file_stream_read(file, &data.buffer);
 
             if (F_status_is_error(status)) {
-              fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+              fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
               break;
             }
             else if (data.buffer.used > data.files.array[data.files.used].range.start) {
-              data.files.array[data.files.used].name = arguments->argv[main->remaining.array[i]];
+              data.files.array[data.files.used].name = arguments->argv[main->parameters.remaining.array[i]];
               data.files.array[data.files.used++].range.stop = data.buffer.used - 1;
 
               // This standard is newline sensitive, when appending files to the buffer if the file lacks a final newline then this could break the format for files appended thereafter.
index cbfef7efed213d02abd526238517bdf48d7d3010..d4579a3ddd0aa35127ed8b58e7ad2b5aa17d7c84 100644 (file)
@@ -7,7 +7,7 @@
  *
  * This is the FSS Extended List Read program
  * This program utilizes the Featureless Linux Library.
- * This program processes files or other input in fss format and stores the results in the fss_extended_list_read_main_t.
+ * This program processes files or other input in fss format and stores the results in the fll_program_data_t.
  *
  * This processes in accordance to the FSS-0003 Extended List specification.
  */
@@ -96,7 +96,7 @@ extern "C" {
  * @see fss_extended_list_read_main_delete()
  */
 #ifndef _di_fss_extended_list_read_main_
-  extern f_status_t fss_extended_list_read_main(fss_extended_list_read_main_t * const main, const f_console_arguments_t *arguments);
+  extern f_status_t fss_extended_list_read_main(fll_program_data_t * const main, const f_console_arguments_t *arguments);
 #endif // _di_fss_extended_list_read_main_
 
 #ifdef __cplusplus
index e29bdff79902a471e3a1c0204d6fc704b9610ed6..5213a2abe8e4002dc33b92067f16b784756bf975 100644 (file)
@@ -3,7 +3,7 @@
 int main(const int argc, const f_string_t *argv) {
 
   f_console_arguments_t arguments = { argc, argv };
-  fss_extended_list_read_main_t data = fss_extended_list_read_main_t_initialize;
+  fll_program_data_t data = fll_program_data_t_initialize;
 
   if (f_pipe_input_exists()) {
     data.process_pipe = F_true;
index 9491846c0a8ec0b7fd948d603259d9649804323f..a9862584f078d5ab074cb2f7b956ea9d3d7ca927 100644 (file)
@@ -58,7 +58,7 @@ extern "C" {
 #endif // _di_fss_extended_list_read_depths_resize_
 
 #ifndef _di_fss_extended_list_read_print_signal_received_
-  void fss_extended_list_read_print_signal_received(fss_extended_list_read_main_t * const main, const f_status_t signal) {
+  void fss_extended_list_read_print_signal_received(fll_program_data_t * const main, const f_status_t signal) {
 
     if (main->warning.verbosity != f_console_verbosity_verbose_e) return;
 
@@ -76,7 +76,7 @@ extern "C" {
 #endif // _di_fss_extended_list_read_print_signal_received_
 
 #ifndef _di_fss_extended_list_read_signal_received_
-  f_status_t fss_extended_list_read_signal_received(fss_extended_list_read_main_t * const main) {
+  f_status_t fss_extended_list_read_signal_received(fll_program_data_t * const main) {
 
     if (main->signal.id == -1) {
       return F_false;
index 3a5752b2bfa9f3c470034ea33436e4d712e126dc..3a773654622afaeedead7364be5befad359d9d53 100644 (file)
@@ -258,7 +258,7 @@ extern "C" {
  *   The signal received.
  */
 #ifndef _di_fss_extended_list_read_print_signal_received_
-  extern void fss_extended_list_read_print_signal_received(fss_extended_list_read_main_t * const main, const f_status_t signal) F_attribute_visibility_internal_d;
+  extern void fss_extended_list_read_print_signal_received(fll_program_data_t * const main, const f_status_t signal) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_list_read_print_signal_received_
 
 /**
@@ -276,7 +276,7 @@ extern "C" {
  * @see f_signal_read()
  */
 #ifndef _di_fss_extended_list_read_signal_received_
-  extern f_status_t fss_extended_list_read_signal_received(fss_extended_list_read_main_t * const main) F_attribute_visibility_internal_d;
+  extern f_status_t fss_extended_list_read_signal_received(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_list_read_signal_received_
 
 #ifdef __cplusplus
index e55ccc0aec9a1501f70c59ef63c8d23f1ab8d1f6..d8380dcdc005ca8aa94079f22c0648d99398396e 100644 (file)
@@ -7,7 +7,7 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_extended_list_read_print_at_
-  void fss_extended_list_read_print_at(fss_extended_list_read_main_t * const main, const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_extended_list_read_data_t * const data) {
+  void fss_extended_list_read_print_at(fll_program_data_t * const main, const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_extended_list_read_data_t * const data) {
 
     if (at >= data->contents.used) {
       return;
@@ -47,7 +47,7 @@ extern "C" {
 #endif // _di_fss_extended_list_read_print_at_
 
 #ifndef _di_fss_extended_list_read_print_at_object_
-  void fss_extended_list_read_print_at_object(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t * const data, const f_array_length_t at, const f_fss_delimits_t delimits_object) {
+  void fss_extended_list_read_print_at_object(fll_program_data_t * const main, fss_extended_list_read_data_t * const data, const f_array_length_t at, const f_fss_delimits_t delimits_object) {
 
     if (at >= data->objects.used) {
       return;
@@ -65,7 +65,7 @@ extern "C" {
 #endif // _di_fss_extended_list_read_print_at_object_
 
 #ifndef _di_fss_extended_list_read_print_content_ignore_
-  void fss_extended_list_read_print_content_ignore(fss_extended_list_read_main_t * const main) {
+  void fss_extended_list_read_print_content_ignore(fll_program_data_t * const main) {
 
     if (main->parameters.array[fss_extended_list_read_parameter_pipe_e].result == f_console_result_found_e) {
       f_print_character(fss_extended_list_read_pipe_content_ignore, main->output.to.stream);
@@ -74,7 +74,7 @@ extern "C" {
 #endif // _di_fss_extended_list_read_print_content_ignore_
 
 #ifndef _di_fss_extended_list_read_print_object_end_
-  void fss_extended_list_read_print_object_end(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t * const data) {
+  void fss_extended_list_read_print_object_end(fll_program_data_t * const main, fss_extended_list_read_data_t * const data) {
 
     if (main->parameters.array[fss_extended_list_read_parameter_pipe_e].result == f_console_result_found_e) {
       f_print_character(fss_extended_list_read_pipe_content_start, main->output.to.stream);
@@ -89,7 +89,7 @@ extern "C" {
 #endif // _di_fss_extended_list_read_print_object_end_
 
 #ifndef _di_fss_extended_list_read_print_set_end_
-  void fss_extended_list_read_print_set_end(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t * const data) {
+  void fss_extended_list_read_print_set_end(fll_program_data_t * const main, fss_extended_list_read_data_t * const data) {
 
     if (main->parameters.array[fss_extended_list_read_parameter_pipe_e].result == f_console_result_found_e) {
       f_print_character(fss_extended_list_read_pipe_content_end, main->output.to.stream);
@@ -109,7 +109,7 @@ extern "C" {
 #endif // _di_fss_extended_list_read_print_set_end_
 
 #ifndef _di_fss_extended_list_read_print_one_
-  void fss_extended_list_read_print_one(fss_extended_list_read_main_t * const main) {
+  void fss_extended_list_read_print_one(fll_program_data_t * const main) {
 
     f_print_character(f_string_ascii_1_s.string[0], main->output.to.stream);
     f_print_dynamic_raw(f_string_eol_s, main->output.to.stream);
@@ -117,7 +117,7 @@ extern "C" {
 #endif // _di_fss_extended_list_read_print_one_
 
 #ifndef _di_fss_extended_list_read_print_zero_
-  void fss_extended_list_read_print_zero(fss_extended_list_read_main_t * const main) {
+  void fss_extended_list_read_print_zero(fll_program_data_t * const main) {
 
     f_print_character(f_string_ascii_0_s.string[0], main->output.to.stream);
     f_print_dynamic_raw(f_string_eol_s, main->output.to.stream);
index c30e38e42ad91b052c05c4a4f453ad359c75103b..f42f77af66c6cc237a48b1954acb374e7576c480 100644 (file)
@@ -29,7 +29,7 @@ extern "C" {
  *   The program data.
  */
 #ifndef _di_fss_extended_list_read_print_at_
-  extern void fss_extended_list_read_print_at(fss_extended_list_read_main_t * const main, const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_extended_list_read_data_t * const data) F_attribute_visibility_internal_d;
+  extern void fss_extended_list_read_print_at(fll_program_data_t * const main, const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_extended_list_read_data_t * const data) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_list_read_print_at_
 
 /**
@@ -45,7 +45,7 @@ extern "C" {
  *   The delimits to be applied to an Object.
  */
 #ifndef _di_fss_extended_list_read_print_at_object_
-  extern void fss_extended_list_read_print_at_object(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t * const data, const f_array_length_t at, const f_fss_delimits_t delimits_object) F_attribute_visibility_internal_d;
+  extern void fss_extended_list_read_print_at_object(fll_program_data_t * const main, fss_extended_list_read_data_t * const data, const f_array_length_t at, const f_fss_delimits_t delimits_object) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_list_read_print_at_object_
 
 /**
@@ -57,7 +57,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_extended_list_read_print_content_ignore_
-  extern void fss_extended_list_read_print_content_ignore(fss_extended_list_read_main_t * const main) F_attribute_visibility_internal_d;
+  extern void fss_extended_list_read_print_content_ignore(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_list_read_print_content_ignore_
 
 /**
@@ -69,7 +69,7 @@ extern "C" {
  *   The program data.
  */
 #ifndef _di_fss_extended_list_read_print_object_end_
-  extern void fss_extended_list_read_print_object_end(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t * const data) F_attribute_visibility_internal_d;
+  extern void fss_extended_list_read_print_object_end(fll_program_data_t * const main, fss_extended_list_read_data_t * const data) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_list_read_print_object_end_
 
 /**
@@ -79,7 +79,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_extended_list_read_print_one_
-  extern void fss_extended_list_read_print_one(fss_extended_list_read_main_t * const main) F_attribute_visibility_internal_d;
+  extern void fss_extended_list_read_print_one(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_list_read_print_one_
 
 /**
@@ -91,7 +91,7 @@ extern "C" {
  *   The program data.
  */
 #ifndef _di_fss_extended_list_read_print_set_end_
-  extern void fss_extended_list_read_print_set_end(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t * const data) F_attribute_visibility_internal_d;
+  extern void fss_extended_list_read_print_set_end(fll_program_data_t * const main, fss_extended_list_read_data_t * const data) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_list_read_print_set_end_
 
 /**
@@ -101,7 +101,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_extended_list_read_print_zero_
-  extern void fss_extended_list_read_print_zero(fss_extended_list_read_main_t * const main) F_attribute_visibility_internal_d;
+  extern void fss_extended_list_read_print_zero(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_list_read_print_zero_
 
 #ifdef __cplusplus
index a26a33c910cd2e150b97d9771820f218c1f3a33a..0a747b9de9b7d1fa377a4dbba69f8b920847e33e 100644 (file)
@@ -56,7 +56,7 @@ extern "C" {
 #endif // _di_fss_extended_list_read_delimit_object_is_
 
 #ifndef _di_fss_extended_list_read_depth_process_
-  f_status_t fss_extended_list_read_depth_process(fss_extended_list_read_main_t * const main, const f_console_arguments_t *arguments, fss_extended_list_read_data_t *data) {
+  f_status_t fss_extended_list_read_depth_process(fll_program_data_t * const main, const f_console_arguments_t *arguments, fss_extended_list_read_data_t *data) {
 
     f_status_t status = F_none;
 
@@ -235,7 +235,7 @@ extern "C" {
 #endif // _di_fss_extended_list_read_file_identify_
 
 #ifndef _di_fss_extended_list_read_load_
-  f_status_t fss_extended_list_read_load(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t *data) {
+  f_status_t fss_extended_list_read_load(fll_program_data_t * const main, fss_extended_list_read_data_t *data) {
 
     f_state_t state = macro_f_state_t_initialize(fss_extended_list_read_common_allocation_large_d, fss_extended_list_read_common_allocation_small_d, 0, 0, 0, 0, 0);
     f_string_range_t input = macro_f_string_range_t_initialize(data->buffer.used);
@@ -268,7 +268,7 @@ extern "C" {
 #endif // _di_fss_extended_list_read_load_
 
 #ifndef _di_fss_extended_list_read_load_number_
-  f_status_t fss_extended_list_read_load_number(fss_extended_list_read_main_t * const main, const f_array_length_t parameter, const f_string_t name, const f_console_arguments_t *arguments, f_number_unsigned_t *number) {
+  f_status_t fss_extended_list_read_load_number(fll_program_data_t * const main, const f_array_length_t parameter, const f_string_t name, const f_console_arguments_t *arguments, f_number_unsigned_t *number) {
 
     if (main->parameters.array[parameter].result == f_console_result_additional_e) {
       const f_array_length_t index = main->parameters.array[parameter].values.array[main->parameters.array[parameter].values.used - 1];
@@ -290,7 +290,7 @@ extern "C" {
 #endif // _di_fss_extended_list_read_load_number_
 
 #ifndef _di_fss_extended_list_read_process_
-  f_status_t fss_extended_list_read_process(fss_extended_list_read_main_t * const main, const f_console_arguments_t *arguments, fss_extended_list_read_data_t *data) {
+  f_status_t fss_extended_list_read_process(fll_program_data_t * const main, const f_console_arguments_t *arguments, fss_extended_list_read_data_t *data) {
 
     f_status_t status = fss_extended_list_read_process_option(main, arguments, data);
     if (F_status_is_error(status)) return status;
@@ -349,7 +349,7 @@ extern "C" {
 #endif // _di_fss_extended_list_read_process_
 
 #ifndef _di_fss_extended_list_read_process_at_
-  f_status_t fss_extended_list_read_process_at(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t *data, bool names[]) {
+  f_status_t fss_extended_list_read_process_at(fll_program_data_t * const main, fss_extended_list_read_data_t *data, bool names[]) {
 
     if (data->depths.array[0].value_at >= data->objects.used) {
       if (data->option & (fss_extended_list_read_data_option_columns_d | fss_extended_list_read_data_option_total_d)) {
@@ -468,7 +468,7 @@ extern "C" {
 #endif // _di_fss_extended_list_read_process_at_
 
 #ifndef _di_fss_extended_list_read_process_at_line_
-  f_status_t fss_extended_list_read_process_at_line(fss_extended_list_read_main_t * const main, const f_array_length_t at, const f_array_lengths_t delimits_object, const f_array_lengths_t delimits_content, fss_extended_list_read_data_t *data, f_array_length_t *line) {
+  f_status_t fss_extended_list_read_process_at_line(fll_program_data_t * const main, const f_array_length_t at, const f_array_lengths_t delimits_object, const f_array_lengths_t delimits_content, fss_extended_list_read_data_t *data, f_array_length_t *line) {
 
     if (data->option & fss_extended_list_read_data_option_object_d) {
 
@@ -564,7 +564,7 @@ extern "C" {
 #endif // _di_fss_extended_list_read_process_at_line_
 
 #ifndef _di_fss_extended_list_read_process_columns_
-  f_status_t fss_extended_list_read_process_columns(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t *data, bool names[]) {
+  f_status_t fss_extended_list_read_process_columns(fll_program_data_t * const main, fss_extended_list_read_data_t *data, bool names[]) {
 
     if (!(data->option & fss_extended_list_read_data_option_content_d)) {
       flockfile(main->output.to.stream);
@@ -594,7 +594,7 @@ extern "C" {
 #endif // _di_fss_extended_list_read_process_columns_
 
 #ifndef _di_fss_extended_list_read_process_line_
-  f_status_t fss_extended_list_read_process_line(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t *data, bool names[]) {
+  f_status_t fss_extended_list_read_process_line(fll_program_data_t * const main, fss_extended_list_read_data_t *data, bool names[]) {
 
     f_array_lengths_t except_none = f_array_lengths_t_initialize;
     f_array_lengths_t *delimits_object = fss_extended_list_read_delimit_object_is(0, data) ? &data->delimits_object : &except_none;
@@ -647,7 +647,7 @@ extern "C" {
 #endif // _di_fss_extended_list_read_process_name_
 
 #ifndef _di_fss_extended_list_read_process_option_
-  f_status_t fss_extended_list_read_process_option(fss_extended_list_read_main_t * const main, const f_console_arguments_t *arguments, fss_extended_list_read_data_t *data) {
+  f_status_t fss_extended_list_read_process_option(fll_program_data_t * const main, const f_console_arguments_t *arguments, fss_extended_list_read_data_t *data) {
 
     f_status_t status = F_none;
 
@@ -711,7 +711,7 @@ extern "C" {
 #endif // _di_fss_extended_list_read_process_option_
 
 #ifndef _di_fss_extended_list_read_process_total_
-  f_status_t fss_extended_list_read_process_total(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t *data, bool names[]) {
+  f_status_t fss_extended_list_read_process_total(fll_program_data_t * const main, fss_extended_list_read_data_t *data, bool names[]) {
 
     f_array_length_t total = 0;
     f_string_range_t range = f_string_range_t_initialize;
index a2ddfcbf740208b27d4fc0d1e04a6c7d3dd1c02c..35664c3599586f89ffa1ccda50c9997951f88552 100644 (file)
@@ -72,7 +72,7 @@ extern "C" {
  * @see fss_extended_list_read_depths_resize()
  */
 #ifndef _di_fss_extended_list_read_depth_process_
-  extern f_status_t fss_extended_list_read_depth_process(fss_extended_list_read_main_t * const main, const f_console_arguments_t *arguments, fss_extended_list_read_data_t *data) F_attribute_visibility_internal_d;
+  extern f_status_t fss_extended_list_read_depth_process(fll_program_data_t * const main, const f_console_arguments_t *arguments, fss_extended_list_read_data_t *data) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_list_read_depth_process_
 
 /**
@@ -116,7 +116,7 @@ extern "C" {
  * @see fss_extended_list_read_process_option()
  */
 #ifndef _di_fss_extended_list_read_load_
-  extern f_status_t fss_extended_list_read_load(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t *data) F_attribute_visibility_internal_d;
+  extern f_status_t fss_extended_list_read_load(fll_program_data_t * const main, fss_extended_list_read_data_t *data) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_list_read_load_
 
 /**
@@ -146,7 +146,7 @@ extern "C" {
  * @see fss_extended_list_read_depths_resize()
  */
 #ifndef _di_fss_extended_list_read_load_number_
-  extern f_status_t fss_extended_list_read_load_number(fss_extended_list_read_main_t * const main, const f_array_length_t parameter, const f_string_t name, const f_console_arguments_t *arguments, f_number_unsigned_t *number) F_attribute_visibility_internal_d;
+  extern f_status_t fss_extended_list_read_load_number(fll_program_data_t * const main, const f_array_length_t parameter, const f_string_t name, const f_console_arguments_t *arguments, f_number_unsigned_t *number) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_list_read_load_number_
 
 /**
@@ -171,7 +171,7 @@ extern "C" {
  * @see fss_extended_list_read_process_option()
  */
 #ifndef _di_fss_extended_list_read_process_
-  extern f_status_t fss_extended_list_read_process(fss_extended_list_read_main_t * const main, const f_console_arguments_t *arguments, fss_extended_list_read_data_t *data) F_attribute_visibility_internal_d;
+  extern f_status_t fss_extended_list_read_process(fll_program_data_t * const main, const f_console_arguments_t *arguments, fss_extended_list_read_data_t *data) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_list_read_process_
 
 /**
@@ -191,7 +191,7 @@ extern "C" {
  * @see fss_extended_list_read_process_at_line()
  */
 #ifndef _di_fss_extended_list_read_process_at_
-  extern f_status_t fss_extended_list_read_process_at(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
+  extern f_status_t fss_extended_list_read_process_at(fll_program_data_t * const main, fss_extended_list_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_list_read_process_at_
 
 /**
@@ -214,7 +214,7 @@ extern "C" {
  *   F_success on success and the line was matched (and possibly printed).
  */
 #ifndef _di_fss_extended_list_read_process_at_line_
-  extern f_status_t fss_extended_list_read_process_at_line(fss_extended_list_read_main_t * const main, const f_array_length_t at, const f_array_lengths_t delimits_object, const f_array_lengths_t delimits_content, fss_extended_list_read_data_t *data, f_array_length_t *line) F_attribute_visibility_internal_d;
+  extern f_status_t fss_extended_list_read_process_at_line(fll_program_data_t * const main, const f_array_length_t at, const f_array_lengths_t delimits_object, const f_array_lengths_t delimits_content, fss_extended_list_read_data_t *data, f_array_length_t *line) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_list_read_process_at_line_
 
 /**
@@ -232,7 +232,7 @@ extern "C" {
  *   F_none on success.
  */
 #ifndef _di_fss_extended_list_read_process_columns_
-  extern f_status_t fss_extended_list_read_process_columns(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
+  extern f_status_t fss_extended_list_read_process_columns(fll_program_data_t * const main, fss_extended_list_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_list_read_process_columns_
 
 /**
@@ -250,7 +250,7 @@ extern "C" {
  *   F_none on success.
  */
 #ifndef _di_fss_extended_list_read_process_line_
-  extern f_status_t fss_extended_list_read_process_line(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
+  extern f_status_t fss_extended_list_read_process_line(fll_program_data_t * const main, fss_extended_list_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_list_read_process_line_
 
 /**
@@ -291,7 +291,7 @@ extern "C" {
  * @see fss_extended_list_read_load_setting()
  */
 #ifndef _di_fss_extended_list_read_process_option_
-  extern f_status_t fss_extended_list_read_process_option(fss_extended_list_read_main_t * const main, const f_console_arguments_t *arguments, fss_extended_list_read_data_t *data) F_attribute_visibility_internal_d;
+  extern f_status_t fss_extended_list_read_process_option(fll_program_data_t * const main, const f_console_arguments_t *arguments, fss_extended_list_read_data_t *data) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_list_read_process_option_
 
 /**
@@ -309,7 +309,7 @@ extern "C" {
  *   F_none on success.
  */
 #ifndef _di_fss_extended_list_read_process_total_
-  extern f_status_t fss_extended_list_read_process_total(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
+  extern f_status_t fss_extended_list_read_process_total(fll_program_data_t * const main, fss_extended_list_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_list_read_process_total_
 
 #ifdef __cplusplus
index 7a09a324388cf5a66b7bcd9f844e27c179efc35f..b5174cf99e3dd3ee318e1d73045fa58ba1c08a88 100644 (file)
@@ -13,16 +13,38 @@ extern "C" {
   const f_string_static_t fss_extended_list_write_program_name_long_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_WRITE_program_name_long_s, 0, FSS_EXTENDED_LIST_WRITE_program_name_long_s_length);
 #endif // _di_fss_extended_list_write_program_name_
 
-#ifndef _di_fss_extended_list_write_main_delete_
-  f_status_t fss_extended_list_write_main_delete(fss_extended_list_write_main_t *main) {
-
-    f_console_parameters_delete(&main->parameters);
+#ifndef _di_fss_extended_list_write_defines_
+  const f_string_static_t fss_extended_list_write_pipe_content_end_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_WRITE_pipe_content_end_s, 0, FSS_EXTENDED_LIST_WRITE_pipe_content_end_s_length);
+  const f_string_static_t fss_extended_list_write_pipe_content_ignore_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_WRITE_pipe_content_ignore_s, 0, FSS_EXTENDED_LIST_WRITE_pipe_content_ignore_s_length);
+  const f_string_static_t fss_extended_list_write_pipe_content_start_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_WRITE_pipe_content_start_s, 0, FSS_EXTENDED_LIST_WRITE_pipe_content_start_s_length);
+#endif // _di_fss_extended_list_write_defines_
+
+#ifndef _di_fss_extended_list_write_parameters_
+  const f_string_static_t fss_extended_list_write_short_file_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_WRITE_short_file_s, 0, FSS_EXTENDED_LIST_WRITE_short_file_s_length);
+  const f_string_static_t fss_extended_list_write_short_content_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_WRITE_short_content_s, 0, FSS_EXTENDED_LIST_WRITE_short_content_s_length);
+  const f_string_static_t fss_extended_list_write_short_double_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_WRITE_short_double_s, 0, FSS_EXTENDED_LIST_WRITE_short_double_s_length);
+  const f_string_static_t fss_extended_list_write_short_ignore_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_WRITE_short_ignore_s, 0, FSS_EXTENDED_LIST_WRITE_short_ignore_s_length);
+  const f_string_static_t fss_extended_list_write_short_object_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_WRITE_short_object_s, 0, FSS_EXTENDED_LIST_WRITE_short_object_s_length);
+  const f_string_static_t fss_extended_list_write_short_partial_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_WRITE_short_partial_s, 0, FSS_EXTENDED_LIST_WRITE_short_partial_s_length);
+  const f_string_static_t fss_extended_list_write_short_prepend_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_WRITE_short_prepend_s, 0, FSS_EXTENDED_LIST_WRITE_short_prepend_s_length);
+  const f_string_static_t fss_extended_list_write_short_single_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_WRITE_short_single_s, 0, FSS_EXTENDED_LIST_WRITE_short_single_s_length);
+  const f_string_static_t fss_extended_list_write_short_trim_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_WRITE_short_trim_s, 0, FSS_EXTENDED_LIST_WRITE_short_trim_s_length);
+
+  const f_string_static_t fss_extended_list_write_long_file_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_WRITE_long_file_s, 0, FSS_EXTENDED_LIST_WRITE_long_file_s_length);
+  const f_string_static_t fss_extended_list_write_long_content_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_WRITE_long_content_s, 0, FSS_EXTENDED_LIST_WRITE_long_content_s_length);
+  const f_string_static_t fss_extended_list_write_long_double_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_WRITE_long_double_s, 0, FSS_EXTENDED_LIST_WRITE_long_double_s_length);
+  const f_string_static_t fss_extended_list_write_long_ignore_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_WRITE_long_ignore_s, 0, FSS_EXTENDED_LIST_WRITE_long_ignore_s_length);
+  const f_string_static_t fss_extended_list_write_long_object_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_WRITE_long_object_s, 0, FSS_EXTENDED_LIST_WRITE_long_object_s_length);
+  const f_string_static_t fss_extended_list_write_long_partial_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_WRITE_long_partial_s, 0, FSS_EXTENDED_LIST_WRITE_long_partial_s_length);
+  const f_string_static_t fss_extended_list_write_long_prepend_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_WRITE_long_prepend_s, 0, FSS_EXTENDED_LIST_WRITE_long_prepend_s_length);
+  const f_string_static_t fss_extended_list_write_long_single_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_WRITE_long_single_s, 0, FSS_EXTENDED_LIST_WRITE_long_single_s_length);
+  const f_string_static_t fss_extended_list_write_long_trim_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_WRITE_long_trim_s, 0, FSS_EXTENDED_LIST_WRITE_long_trim_s_length);
+#endif // _di_fss_extended_list_write_parameters_
 
-    f_type_array_lengths_resize(0, &main->remaining);
-
-    macro_f_color_context_t_delete_simple(main->context);
+#ifndef _di_fss_extended_list_write_main_delete_
+  f_status_t fss_extended_list_write_main_delete(fll_program_data_t *main) {
 
-    return F_none;
+    return fll_program_data_delete(main);
   }
 #endif // _di_fss_extended_list_write_main_delete_
 
index 3352294421d3db2ccfc7d87980c17abc30f6e930..824c00f4385ac11457c6b9147310d6ab0313119e 100644 (file)
@@ -16,6 +16,9 @@
 extern "C" {
 #endif
 
+/**
+ * The program version.
+ */
 #ifndef _di_fss_extended_list_write_program_version_
   #define FSS_EXTENDED_LIST_WRITE_program_version_major_s F_string_ascii_0_s
   #define FSS_EXTENDED_LIST_WRITE_program_version_minor_s F_string_ascii_5_s
@@ -42,6 +45,9 @@ extern "C" {
   extern const f_string_static_t fss_extended_list_write_program_version_s;
 #endif // _di_fss_extended_list_write_program_version_
 
+/**
+ * The program name.
+ */
 #ifndef _di_fss_extended_list_write_program_name_
   #define FSS_EXTENDED_LIST_WRITE_program_name_s      "fss_extended_list_write"
   #define FSS_EXTENDED_LIST_WRITE_program_name_long_s "FSS Extended List Write"
@@ -53,32 +59,88 @@ extern "C" {
   extern const f_string_static_t fss_extended_list_write_program_name_long_s;
 #endif // _di_fss_extended_list_write_program_name_
 
+/**
+ * The program defines.
+ */
 #ifndef _di_fss_extended_list_write_defines_
   #define fss_extended_list_write_signal_check_d 10000
 
-  #define fss_extended_list_write_pipe_content_end_s    '\f'
-  #define fss_extended_list_write_pipe_content_ignore_s '\v'
-  #define fss_extended_list_write_pipe_content_start_s  '\b'
-
-  #define fss_extended_list_write_short_file_s    "f"
-  #define fss_extended_list_write_short_content_s "c"
-  #define fss_extended_list_write_short_double_s  "d"
-  #define fss_extended_list_write_short_ignore_s  "I"
-  #define fss_extended_list_write_short_object_s  "o"
-  #define fss_extended_list_write_short_partial_s "p"
-  #define fss_extended_list_write_short_prepend_s "P"
-  #define fss_extended_list_write_short_single_s  "s"
-  #define fss_extended_list_write_short_trim_s    "T"
-
-  #define fss_extended_list_write_long_file_s    "file"
-  #define fss_extended_list_write_long_content_s "content"
-  #define fss_extended_list_write_long_double_s  "double"
-  #define fss_extended_list_write_long_ignore_s  "ignore"
-  #define fss_extended_list_write_long_object_s  "object"
-  #define fss_extended_list_write_long_partial_s "partial"
-  #define fss_extended_list_write_long_prepend_s "prepend"
-  #define fss_extended_list_write_long_single_s  "single"
-  #define fss_extended_list_write_long_trim_s    "trim"
+  #define FSS_EXTENDED_LIST_WRITE_pipe_content_end_s    "\f"
+  #define FSS_EXTENDED_LIST_WRITE_pipe_content_ignore_s "\v"
+  #define FSS_EXTENDED_LIST_WRITE_pipe_content_start_s  "\b"
+
+  #define FSS_EXTENDED_LIST_WRITE_pipe_content_end_s_length    1
+  #define FSS_EXTENDED_LIST_WRITE_pipe_content_ignore_s_length 1
+  #define FSS_EXTENDED_LIST_WRITE_pipe_content_start_s_length  1
+
+  extern const f_string_static_t fss_extended_list_write_pipe_content_end_s;
+  extern const f_string_static_t fss_extended_list_write_pipe_content_ignore_s;
+  extern const f_string_static_t fss_extended_list_write_pipe_content_start_s;
+#endif // _di_fss_extended_list_write_defines_
+
+/**
+ * The main program parameters.
+ */
+#ifndef _di_fss_extended_list_write_parameters_
+  #define FSS_EXTENDED_LIST_WRITE_short_file_s    "f"
+  #define FSS_EXTENDED_LIST_WRITE_short_content_s "c"
+  #define FSS_EXTENDED_LIST_WRITE_short_double_s  "d"
+  #define FSS_EXTENDED_LIST_WRITE_short_ignore_s  "I"
+  #define FSS_EXTENDED_LIST_WRITE_short_object_s  "o"
+  #define FSS_EXTENDED_LIST_WRITE_short_partial_s "p"
+  #define FSS_EXTENDED_LIST_WRITE_short_prepend_s "P"
+  #define FSS_EXTENDED_LIST_WRITE_short_single_s  "s"
+  #define FSS_EXTENDED_LIST_WRITE_short_trim_s    "T"
+
+  #define FSS_EXTENDED_LIST_WRITE_long_file_s    "file"
+  #define FSS_EXTENDED_LIST_WRITE_long_content_s "content"
+  #define FSS_EXTENDED_LIST_WRITE_long_double_s  "double"
+  #define FSS_EXTENDED_LIST_WRITE_long_ignore_s  "ignore"
+  #define FSS_EXTENDED_LIST_WRITE_long_object_s  "object"
+  #define FSS_EXTENDED_LIST_WRITE_long_partial_s "partial"
+  #define FSS_EXTENDED_LIST_WRITE_long_prepend_s "prepend"
+  #define FSS_EXTENDED_LIST_WRITE_long_single_s  "single"
+  #define FSS_EXTENDED_LIST_WRITE_long_trim_s    "trim"
+
+  #define FSS_EXTENDED_LIST_WRITE_short_file_s_length    1
+  #define FSS_EXTENDED_LIST_WRITE_short_content_s_length 1
+  #define FSS_EXTENDED_LIST_WRITE_short_double_s_length  1
+  #define FSS_EXTENDED_LIST_WRITE_short_ignore_s_length  1
+  #define FSS_EXTENDED_LIST_WRITE_short_object_s_length  1
+  #define FSS_EXTENDED_LIST_WRITE_short_partial_s_length 1
+  #define FSS_EXTENDED_LIST_WRITE_short_prepend_s_length 1
+  #define FSS_EXTENDED_LIST_WRITE_short_single_s_length  1
+  #define FSS_EXTENDED_LIST_WRITE_short_trim_s_length    1
+
+  #define FSS_EXTENDED_LIST_WRITE_long_file_s_length    4
+  #define FSS_EXTENDED_LIST_WRITE_long_content_s_length 7
+  #define FSS_EXTENDED_LIST_WRITE_long_double_s_length  6
+  #define FSS_EXTENDED_LIST_WRITE_long_ignore_s_length  6
+  #define FSS_EXTENDED_LIST_WRITE_long_object_s_length  6
+  #define FSS_EXTENDED_LIST_WRITE_long_partial_s_length 7
+  #define FSS_EXTENDED_LIST_WRITE_long_prepend_s_length 7
+  #define FSS_EXTENDED_LIST_WRITE_long_single_s_length  6
+  #define FSS_EXTENDED_LIST_WRITE_long_trim_s_length    4
+
+  extern const f_string_static_t fss_extended_list_write_short_file_s;
+  extern const f_string_static_t fss_extended_list_write_short_content_s;
+  extern const f_string_static_t fss_extended_list_write_short_double_s;
+  extern const f_string_static_t fss_extended_list_write_short_ignore_s;
+  extern const f_string_static_t fss_extended_list_write_short_object_s;
+  extern const f_string_static_t fss_extended_list_write_short_partial_s;
+  extern const f_string_static_t fss_extended_list_write_short_prepend_s;
+  extern const f_string_static_t fss_extended_list_write_short_single_s;
+  extern const f_string_static_t fss_extended_list_write_short_trim_s;
+
+  extern const f_string_static_t fss_extended_list_write_long_file_s;
+  extern const f_string_static_t fss_extended_list_write_long_content_s;
+  extern const f_string_static_t fss_extended_list_write_long_double_s;
+  extern const f_string_static_t fss_extended_list_write_long_ignore_s;
+  extern const f_string_static_t fss_extended_list_write_long_object_s;
+  extern const f_string_static_t fss_extended_list_write_long_partial_s;
+  extern const f_string_static_t fss_extended_list_write_long_prepend_s;
+  extern const f_string_static_t fss_extended_list_write_long_single_s;
+  extern const f_string_static_t fss_extended_list_write_long_trim_s;
 
   enum {
     fss_extended_list_write_parameter_help_e,
@@ -113,51 +175,19 @@ extern "C" {
       macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_version_s.string, f_console_standard_long_version_s.string, 0, 0, f_console_type_inverse_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_list_write_short_file_s, fss_extended_list_write_long_file_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_list_write_short_content_s, fss_extended_list_write_long_content_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_list_write_short_double_s, fss_extended_list_write_long_double_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_list_write_short_ignore_s, fss_extended_list_write_long_ignore_s, 0, 2, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_list_write_short_object_s, fss_extended_list_write_long_object_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_list_write_short_partial_s, fss_extended_list_write_long_partial_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_list_write_short_prepend_s, fss_extended_list_write_long_prepend_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_list_write_short_single_s, fss_extended_list_write_long_single_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_list_write_short_trim_s, fss_extended_list_write_long_trim_s, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_list_write_short_file_s.string, fss_extended_list_write_long_file_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_list_write_short_content_s.string, fss_extended_list_write_long_content_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_list_write_short_double_s.string, fss_extended_list_write_long_double_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_list_write_short_ignore_s.string, fss_extended_list_write_long_ignore_s.string, 0, 2, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_list_write_short_object_s.string, fss_extended_list_write_long_object_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_list_write_short_partial_s.string, fss_extended_list_write_long_partial_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_list_write_short_prepend_s.string, fss_extended_list_write_long_prepend_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_list_write_short_single_s.string, fss_extended_list_write_long_single_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_list_write_short_trim_s.string, fss_extended_list_write_long_trim_s.string, 0, 0, f_console_type_normal_e), \
     }
 
   #define fss_extended_list_write_total_parameters_d 18
-#endif // _di_fss_extended_list_write_defines_
-
-#ifndef _di_fss_extended_list_write_main_t_
-  typedef struct {
-    f_console_parameters_t parameters;
-
-    f_array_lengths_t remaining;
-    bool process_pipe;
-
-    fl_print_t output;
-    fl_print_t error;
-    fl_print_t warning;
-
-    f_signal_t signal;
-
-    f_string_static_t prepend;
-
-    f_color_context_t context;
-  } fss_extended_list_write_main_t;
-
-  #define fss_extended_list_write_main_t_initialize \
-    { \
-      f_console_parameters_t_initialize, \
-      f_array_lengths_t_initialize, \
-      F_false, \
-      fl_print_t_initialize, \
-      macro_fl_print_t_initialize_error(), \
-      macro_fl_print_t_initialize_warning(), \
-      f_signal_t_initialize, \
-      f_string_static_t_initialize, \
-      f_color_context_t_initialize, \
-    }
-#endif // _di_fss_extended_list_write_main_t_
+#endif // _di_fss_extended_list_write_parameters_
 
 /**
  * Deallocate main.
@@ -175,7 +205,7 @@ extern "C" {
  * @see fss_extended_list_write_main()
  */
 #ifndef _di_fss_extended_list_write_main_delete_
-  extern f_status_t fss_extended_list_write_main_delete(fss_extended_list_write_main_t *main);
+  extern f_status_t fss_extended_list_write_main_delete(fll_program_data_t *main);
 #endif // _di_fss_extended_list_write_main_delete_
 
 #ifdef __cplusplus
index 1f7ff5753dce65b81c7c7b46b95b8f31cbd7a0f5..6e4217c0b59cbc98af484db9bd85519608a9992e 100644 (file)
@@ -6,15 +6,6 @@
 extern "C" {
 #endif
 
-#ifndef _di_fss_extended_list_write_program_version_
-  const f_string_static_t fss_extended_list_write_program_version_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_WRITE_program_version_s, 0, FSS_EXTENDED_LIST_WRITE_program_version_s_length);
-#endif // _di_fss_extended_list_write_program_version_
-
-#ifndef _di_fss_extended_list_write_program_name_
-  const f_string_static_t fss_extended_list_write_program_name_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_WRITE_program_name_s, 0, FSS_EXTENDED_LIST_WRITE_program_name_s_length);
-  const f_string_static_t fss_extended_list_write_program_name_long_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_WRITE_program_name_long_s, 0, FSS_EXTENDED_LIST_WRITE_program_name_long_s_length);
-#endif // _di_fss_extended_list_write_program_name_
-
 #ifndef _di_fss_extended_list_write_print_help_
   f_status_t fss_extended_list_write_print_help(const f_file_t file, const f_color_context_t context) {
 
@@ -69,7 +60,7 @@ extern "C" {
 #endif // _di_fss_extended_list_write_print_help_
 
 #ifndef _di_fss_extended_list_write_main_
-  f_status_t fss_extended_list_write_main(fss_extended_list_write_main_t * const main, const f_console_arguments_t *arguments) {
+  f_status_t fss_extended_list_write_main(fll_program_data_t * const main, const f_console_arguments_t *arguments) {
 
     f_status_t status = F_none;
 
@@ -81,7 +72,7 @@ extern "C" {
       f_console_parameter_id_t ids[3] = { fss_extended_list_write_parameter_no_color_e, fss_extended_list_write_parameter_light_e, fss_extended_list_write_parameter_dark_e };
       const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
 
-      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
+      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->context);
 
       main->output.set = &main->context.set;
       main->error.set = &main->context.set;
index c6d34bc899743c9e0022ac3e718b4cf70a3de841..36691a581314649c1ad6c2e8af319ac879d735dd 100644 (file)
@@ -89,7 +89,7 @@ extern "C" {
  * @see fss_extended_list_write_main_delete()
  */
 #ifndef _di_fss_extended_list_write_main_
-  extern f_status_t fss_extended_list_write_main(fss_extended_list_write_main_t * const main, const f_console_arguments_t *arguments);
+  extern f_status_t fss_extended_list_write_main(fll_program_data_t * const main, const f_console_arguments_t *arguments);
 #endif // _di_fss_extended_list_write_main_
 
 #ifdef __cplusplus
index 3eb348b59405e9041dd282457fb32db44c7af6fe..672633e83926a339d8c7488c5d2e58eaf2a14fdc 100644 (file)
@@ -3,7 +3,7 @@
 int main(const int argc, const f_string_t *argv) {
 
   const f_console_arguments_t arguments = { argc, argv };
-  fss_extended_list_write_main_t data = fss_extended_list_write_main_t_initialize;
+  fll_program_data_t data = fll_program_data_t_initialize;
 
   if (f_pipe_input_exists()) {
     data.process_pipe = F_true;
index 22411969fbbc2c70aa4c5ca314eba7fccb23b31e..efead668866c56cfb6454471cc86ceb5ac78f177 100644 (file)
@@ -6,7 +6,7 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_extended_list_write_print_signal_received_
-  void fss_extended_list_write_print_signal_received(fss_extended_list_write_main_t * const main, const f_status_t signal) {
+  void fss_extended_list_write_print_signal_received(fll_program_data_t * const main, const f_status_t signal) {
 
     if (main->warning.verbosity != f_console_verbosity_verbose_e) return;
 
@@ -24,7 +24,7 @@ extern "C" {
 #endif // _di_fss_extended_list_write_print_signal_received_
 
 #ifndef _di_fss_extended_list_write_signal_received_
-  f_status_t fss_extended_list_write_signal_received(fss_extended_list_write_main_t * const main) {
+  f_status_t fss_extended_list_write_signal_received(fll_program_data_t * const main) {
 
     if (main->signal.id == -1) {
       return F_false;
index d93b6231b22146a4d97bbc18dcc3c4c4cf634c31..ad7c928d5694167b0a7c583b2c9f504d44a8a0f5 100644 (file)
@@ -33,7 +33,7 @@ extern "C" {
  *   The signal received.
  */
 #ifndef _di_fss_extended_list_write_print_signal_received_
-  extern void fss_extended_list_write_print_signal_received(fss_extended_list_write_main_t * const main, const f_status_t signal) F_attribute_visibility_internal_d;
+  extern void fss_extended_list_write_print_signal_received(fll_program_data_t * const main, const f_status_t signal) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_list_write_print_signal_received_
 
 /**
@@ -51,7 +51,7 @@ extern "C" {
  * @see f_signal_read()
  */
 #ifndef _di_fss_extended_list_write_signal_received_
-  extern f_status_t fss_extended_list_write_signal_received(fss_extended_list_write_main_t * const main) F_attribute_visibility_internal_d;
+  extern f_status_t fss_extended_list_write_signal_received(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_list_write_signal_received_
 
 #ifdef __cplusplus
index 685f56958d7b90d501e9a36d5b9d9b88fc809a60..d74149ab00a52eb19951778dc9cd51cb32d4b207 100644 (file)
@@ -7,7 +7,7 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_extended_list_write_error_parameter_same_times_print_
-  void fss_extended_list_write_error_parameter_same_times_print(fss_extended_list_write_main_t * const main) {
+  void fss_extended_list_write_error_parameter_same_times_print(fll_program_data_t * const main) {
 
     if (main->error.verbosity == f_console_verbosity_quiet_e) {
       return;
@@ -28,7 +28,7 @@ extern "C" {
 #endif // _di_fss_extended_list_write_error_parameter_same_times_print_
 
 #ifndef _di_fss_extended_list_write_error_parameter_unsupported_eol_print_
-  void fss_extended_list_write_error_parameter_unsupported_eol_print(fss_extended_list_write_main_t * const main) {
+  void fss_extended_list_write_error_parameter_unsupported_eol_print(fll_program_data_t * const main) {
 
     if (main->error.verbosity == f_console_verbosity_quiet_e) {
       return;
@@ -45,7 +45,7 @@ extern "C" {
 #endif // _di_fss_extended_list_write_error_parameter_unsupported_eol_print_
 
 #ifndef _di_fss_extended_list_write_error_parameter_value_missing_print_
-  void fss_extended_list_write_error_parameter_value_missing_print(fss_extended_list_write_main_t * const main, const f_string_static_t symbol, const f_string_static_t parameter) {
+  void fss_extended_list_write_error_parameter_value_missing_print(fll_program_data_t * const main, const f_string_static_t symbol, const f_string_static_t parameter) {
 
     if (main->error.verbosity == f_console_verbosity_quiet_e) {
       return;
@@ -62,7 +62,7 @@ extern "C" {
 #endif // _di_fss_extended_list_write_error_parameter_value_missing_print_
 
 #ifndef _di_fss_extended_list_write_process_
-  f_status_t fss_extended_list_write_process(fss_extended_list_write_main_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, const f_string_ranges_t *ignore, f_string_dynamic_t *buffer) {
+  f_status_t fss_extended_list_write_process(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, const f_string_ranges_t *ignore, f_string_dynamic_t *buffer) {
 
     f_status_t status = F_none;
     f_state_t state = macro_f_state_t_initialize(fss_extended_list_write_common_allocation_large_d, fss_extended_list_write_common_allocation_small_d, 0, 0, 0, 0, 0);
@@ -136,7 +136,7 @@ extern "C" {
 #endif // _di_fss_extended_list_write_process_
 
 #ifndef _di_fss_extended_list_write_process_pipe_
-  f_status_t fss_extended_list_write_process_pipe(fss_extended_list_write_main_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer, f_string_ranges_t *ignore) {
+  f_status_t fss_extended_list_write_process_pipe(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer, f_string_ranges_t *ignore) {
 
     f_status_t status = F_none;
     f_status_t status_pipe = F_none;
@@ -350,7 +350,7 @@ extern "C" {
 #endif // _di_fss_extended_list_write_process_pipe_
 
 #ifndef _di_fss_extended_list_write_process_parameter_ignore_
-  f_status_t fss_extended_list_write_process_parameter_ignore(fss_extended_list_write_main_t * const main, const f_console_arguments_t *arguments, const f_array_lengths_t contents, const f_array_length_t location, f_string_ranges_t *ignore) {
+  f_status_t fss_extended_list_write_process_parameter_ignore(fll_program_data_t * const main, const f_console_arguments_t *arguments, const f_array_lengths_t contents, const f_array_length_t location, f_string_ranges_t *ignore) {
 
     f_status_t status = F_none;
 
index 0acd1010c5213b617200c6f7ce4c32c1e99d350c..0883710ae3c784858f8a1ac96a24739566d1a021 100644 (file)
@@ -19,7 +19,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_extended_list_write_error_parameter_same_times_print_
-  void fss_extended_list_write_error_parameter_same_times_print(fss_extended_list_write_main_t * const main) F_attribute_visibility_internal_d;
+  void fss_extended_list_write_error_parameter_same_times_print(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_list_write_error_parameter_same_times_print_
 
 /**
@@ -29,7 +29,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_extended_list_write_error_parameter_unsupported_eol_print_
-  void fss_extended_list_write_error_parameter_unsupported_eol_print(fss_extended_list_write_main_t * const main) F_attribute_visibility_internal_d;
+  void fss_extended_list_write_error_parameter_unsupported_eol_print(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_list_write_error_parameter_unsupported_eol_print_
 
 /**
@@ -43,7 +43,7 @@ extern "C" {
  *   The parameter name, such as "help" in "--help".
  */
 #ifndef _di_fss_extended_list_write_error_parameter_value_missing_print_
-  void fss_extended_list_write_error_parameter_value_missing_print(fss_extended_list_write_main_t * const main, const f_string_static_t symbol, const f_string_static_t parameter) F_attribute_visibility_internal_d;
+  void fss_extended_list_write_error_parameter_value_missing_print(fll_program_data_t * const main, const f_string_static_t symbol, const f_string_static_t parameter) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_list_write_error_parameter_value_missing_print_
 
 /**
@@ -73,7 +73,7 @@ extern "C" {
  *   F_failure (with error bit) for any othe failure.
  */
 #ifndef _di_fss_extended_list_write_process_
-  extern f_status_t fss_extended_list_write_process(fss_extended_list_write_main_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, const f_string_ranges_t *ignore, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
+  extern f_status_t fss_extended_list_write_process(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, const f_string_ranges_t *ignore, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_list_write_process_
 
 /**
@@ -97,7 +97,7 @@ extern "C" {
  *   F_failure (with error bit) for any othe failure.
  */
 #ifndef _di_fss_extended_list_write_process_pipe_
-  extern f_status_t fss_extended_list_write_process_pipe(fss_extended_list_write_main_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer, f_string_ranges_t *ignore) F_attribute_visibility_internal_d;
+  extern f_status_t fss_extended_list_write_process_pipe(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer, f_string_ranges_t *ignore) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_list_write_process_pipe_
 
 /**
@@ -119,7 +119,7 @@ extern "C" {
  *   F_failure (with error bit) for any othe failure.
  */
 #ifndef _di_fss_extended_list_write_process_parameter_ignore_
-  extern f_status_t fss_extended_list_write_process_parameter_ignore(fss_extended_list_write_main_t * const main, const f_console_arguments_t *arguments, const f_array_lengths_t contents, const f_array_length_t location, f_string_ranges_t *ignore) F_attribute_visibility_internal_d;
+  extern f_status_t fss_extended_list_write_process_parameter_ignore(fll_program_data_t * const main, const f_console_arguments_t *arguments, const f_array_lengths_t contents, const f_array_length_t location, f_string_ranges_t *ignore) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_list_write_process_parameter_ignore_
 
 #ifdef __cplusplus
index 6df53970f1bdade46f6bd0e649e1b6e8026ebc29..b92e376cc7e4ff5317bfdeaee7a2e92f7fb8c985 100644 (file)
@@ -13,15 +13,48 @@ extern "C" {
   const f_string_static_t fss_extended_read_program_name_long_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_program_name_long_s, 0, FSS_EXTENDED_READ_program_name_long_s_length);
 #endif // _di_fss_extended_read_program_name_
 
-#ifndef _di_fss_extended_read_main_delete_
-  f_status_t fss_extended_read_main_delete(fss_extended_read_main_t * const main) {
-
-    f_console_parameters_delete(&main->parameters);
+#ifndef _di_fss_extended_read_defines_
+  const f_string_static_t fss_extended_read_pipe_content_end_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_pipe_content_end_s, 0, FSS_EXTENDED_READ_pipe_content_end_s_length);
+  const f_string_static_t fss_extended_read_pipe_content_ignore_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_pipe_content_ignore_s, 0, FSS_EXTENDED_READ_pipe_content_ignore_s_length);
+  const f_string_static_t fss_extended_read_pipe_content_start_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_pipe_content_start_s, 0, FSS_EXTENDED_READ_pipe_content_start_s_length);
+#endif // _di_fss_extended_read_defines_
+
+#ifndef _di_fss_extended_read_parameters_
+  const f_string_static_t fss_extended_read_short_at_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_short_at_s, 0, FSS_EXTENDED_READ_short_at_s_length);
+  const f_string_static_t fss_extended_read_short_content_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_short_content_s, 0, FSS_EXTENDED_READ_short_content_s_length);
+  const f_string_static_t fss_extended_read_short_columns_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_short_columns_s, 0, FSS_EXTENDED_READ_short_columns_s_length);
+  const f_string_static_t fss_extended_read_short_delimit_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_short_delimit_s, 0, FSS_EXTENDED_READ_short_delimit_s_length);
+  const f_string_static_t fss_extended_read_short_depth_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_short_depth_s, 0, FSS_EXTENDED_READ_short_depth_s_length);
+  const f_string_static_t fss_extended_read_short_empty_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_short_empty_s, 0, FSS_EXTENDED_READ_short_empty_s_length);
+  const f_string_static_t fss_extended_read_short_line_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_short_line_s, 0, FSS_EXTENDED_READ_short_line_s_length);
+  const f_string_static_t fss_extended_read_short_name_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_short_name_s, 0, FSS_EXTENDED_READ_short_name_s_length);
+  const f_string_static_t fss_extended_read_short_object_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_short_object_s, 0, FSS_EXTENDED_READ_short_object_s_length);
+  const f_string_static_t fss_extended_read_short_pipe_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_short_pipe_s, 0, FSS_EXTENDED_READ_short_pipe_s_length);
+  const f_string_static_t fss_extended_read_short_raw_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_short_raw_s, 0, FSS_EXTENDED_READ_short_raw_s_length);
+  const f_string_static_t fss_extended_read_short_select_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_short_select_s, 0, FSS_EXTENDED_READ_short_select_s_length);
+  const f_string_static_t fss_extended_read_short_total_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_short_total_s, 0, FSS_EXTENDED_READ_short_total_s_length);
+  const f_string_static_t fss_extended_read_short_trim_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_short_trim_s, 0, FSS_EXTENDED_READ_short_trim_s_length);
+
+  const f_string_static_t fss_extended_read_long_at_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_long_at_s, 0, FSS_EXTENDED_READ_long_at_s_length);
+  const f_string_static_t fss_extended_read_long_content_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_long_content_s, 0, FSS_EXTENDED_READ_long_content_s_length);
+  const f_string_static_t fss_extended_read_long_columns_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_long_columns_s, 0, FSS_EXTENDED_READ_long_columns_s_length);
+  const f_string_static_t fss_extended_read_long_delimit_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_long_delimit_s, 0, FSS_EXTENDED_READ_long_delimit_s_length);
+  const f_string_static_t fss_extended_read_long_depth_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_long_depth_s, 0, FSS_EXTENDED_READ_long_depth_s_length);
+  const f_string_static_t fss_extended_read_long_empty_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_long_empty_s, 0, FSS_EXTENDED_READ_long_empty_s_length);
+  const f_string_static_t fss_extended_read_long_line_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_long_line_s, 0, FSS_EXTENDED_READ_long_line_s_length);
+  const f_string_static_t fss_extended_read_long_name_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_long_name_s, 0, FSS_EXTENDED_READ_long_name_s_length);
+  const f_string_static_t fss_extended_read_long_object_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_long_object_s, 0, FSS_EXTENDED_READ_long_object_s_length);
+  const f_string_static_t fss_extended_read_long_pipe_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_long_pipe_s, 0, FSS_EXTENDED_READ_long_pipe_s_length);
+  const f_string_static_t fss_extended_read_long_raw_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_long_raw_s, 0, FSS_EXTENDED_READ_long_raw_s_length);
+  const f_string_static_t fss_extended_read_long_select_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_long_select_s, 0, FSS_EXTENDED_READ_long_select_s_length);
+  const f_string_static_t fss_extended_read_long_total_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_long_total_s, 0, FSS_EXTENDED_READ_long_total_s_length);
+  const f_string_static_t fss_extended_read_long_trim_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_long_trim_s, 0, FSS_EXTENDED_READ_long_trim_s_length);
+#endif // _di_fss_extended_read_parameters_
 
-    f_type_array_lengths_resize(0, &main->remaining);
-    macro_f_color_context_t_delete_simple(main->context);
+#ifndef _di_fss_extended_read_main_delete_
+  f_status_t fss_extended_read_main_delete(fll_program_data_t * const main) {
 
-    return F_none;
+    return fll_program_data_delete(main);
   }
 #endif // _di_fss_extended_read_main_delete_
 
index d20dcdab8a5fb585d355f1afae5b6e8fccfadaf2..f73ee23f96d77357b384432a2477e0cded2aab73 100644 (file)
@@ -16,6 +16,9 @@
 extern "C" {
 #endif
 
+/**
+ * The program version.
+ */
 #ifndef _di_fss_extended_read_program_version_
   #define FSS_EXTENDED_READ_program_version_major_s F_string_ascii_0_s
   #define FSS_EXTENDED_READ_program_version_minor_s F_string_ascii_5_s
@@ -42,6 +45,9 @@ extern "C" {
   extern const f_string_static_t fss_extended_read_program_version_s;
 #endif // _di_fss_extended_read_program_version_
 
+/**
+ * The program name.
+ */
 #ifndef _di_fss_extended_read_program_name_
   #define FSS_EXTENDED_READ_program_name_s      "fss_extended_read"
   #define FSS_EXTENDED_READ_program_name_long_s "FSS Extended Read"
@@ -53,42 +59,118 @@ extern "C" {
   extern const f_string_static_t fss_extended_read_program_name_long_s;
 #endif // _di_fss_extended_read_program_name_
 
+/**
+ * The program defines.
+ */
 #ifndef _di_fss_extended_read_defines_
   #define fss_extended_read_signal_check_d 10000
 
-  #define fss_extended_read_pipe_content_end_s    '\f'
-  #define fss_extended_read_pipe_content_ignore_s '\v'
-  #define fss_extended_read_pipe_content_start_s  '\b'
-
-  #define fss_extended_read_short_at_s      "a"
-  #define fss_extended_read_short_content_s "c"
-  #define fss_extended_read_short_columns_s "C"
-  #define fss_extended_read_short_delimit_s "D"
-  #define fss_extended_read_short_depth_s   "d"
-  #define fss_extended_read_short_empty_s   "e"
-  #define fss_extended_read_short_line_s    "l"
-  #define fss_extended_read_short_name_s    "n"
-  #define fss_extended_read_short_object_s  "o"
-  #define fss_extended_read_short_pipe_s    "p"
-  #define fss_extended_read_short_raw_s     "R"
-  #define fss_extended_read_short_select_s  "s"
-  #define fss_extended_read_short_total_s   "t"
-  #define fss_extended_read_short_trim_s    "T"
-
-  #define fss_extended_read_long_at_s      "at"
-  #define fss_extended_read_long_content_s "content"
-  #define fss_extended_read_long_columns_s "columns"
-  #define fss_extended_read_long_delimit_s "delimit"
-  #define fss_extended_read_long_depth_s   "depth"
-  #define fss_extended_read_long_empty_s   "empty"
-  #define fss_extended_read_long_line_s    "line"
-  #define fss_extended_read_long_name_s    "name"
-  #define fss_extended_read_long_object_s  "object"
-  #define fss_extended_read_long_pipe_s    "pipe"
-  #define fss_extended_read_long_raw_s     "raw"
-  #define fss_extended_read_long_select_s  "select"
-  #define fss_extended_read_long_total_s   "total"
-  #define fss_extended_read_long_trim_s    "trim"
+  #define FSS_EXTENDED_READ_pipe_content_end_s    "\f"
+  #define FSS_EXTENDED_READ_pipe_content_ignore_s "\v"
+  #define FSS_EXTENDED_READ_pipe_content_start_s  "\b"
+
+  #define FSS_EXTENDED_READ_pipe_content_end_s_length    1
+  #define FSS_EXTENDED_READ_pipe_content_ignore_s_length 1
+  #define FSS_EXTENDED_READ_pipe_content_start_s_length  1
+
+  extern const f_string_static_t fss_extended_read_pipe_content_end_s;
+  extern const f_string_static_t fss_extended_read_pipe_content_ignore_s;
+  extern const f_string_static_t fss_extended_read_pipe_content_start_s;
+#endif // _di_fss_extended_read_defines_
+
+/**
+ * The main program parameters.
+ */
+#ifndef _di_fss_extended_read_parameters_
+  #define FSS_EXTENDED_READ_short_at_s      "a"
+  #define FSS_EXTENDED_READ_short_content_s "c"
+  #define FSS_EXTENDED_READ_short_columns_s "C"
+  #define FSS_EXTENDED_READ_short_delimit_s "D"
+  #define FSS_EXTENDED_READ_short_depth_s   "d"
+  #define FSS_EXTENDED_READ_short_empty_s   "e"
+  #define FSS_EXTENDED_READ_short_line_s    "l"
+  #define FSS_EXTENDED_READ_short_name_s    "n"
+  #define FSS_EXTENDED_READ_short_object_s  "o"
+  #define FSS_EXTENDED_READ_short_pipe_s    "p"
+  #define FSS_EXTENDED_READ_short_raw_s     "R"
+  #define FSS_EXTENDED_READ_short_select_s  "s"
+  #define FSS_EXTENDED_READ_short_total_s   "t"
+  #define FSS_EXTENDED_READ_short_trim_s    "T"
+
+  #define FSS_EXTENDED_READ_long_at_s      "at"
+  #define FSS_EXTENDED_READ_long_content_s "content"
+  #define FSS_EXTENDED_READ_long_columns_s "columns"
+  #define FSS_EXTENDED_READ_long_delimit_s "delimit"
+  #define FSS_EXTENDED_READ_long_depth_s   "depth"
+  #define FSS_EXTENDED_READ_long_empty_s   "empty"
+  #define FSS_EXTENDED_READ_long_line_s    "line"
+  #define FSS_EXTENDED_READ_long_name_s    "name"
+  #define FSS_EXTENDED_READ_long_object_s  "object"
+  #define FSS_EXTENDED_READ_long_pipe_s    "pipe"
+  #define FSS_EXTENDED_READ_long_raw_s     "raw"
+  #define FSS_EXTENDED_READ_long_select_s  "select"
+  #define FSS_EXTENDED_READ_long_total_s   "total"
+  #define FSS_EXTENDED_READ_long_trim_s    "trim"
+
+  #define FSS_EXTENDED_READ_short_at_s_length      1
+  #define FSS_EXTENDED_READ_short_content_s_length 1
+  #define FSS_EXTENDED_READ_short_columns_s_length 1
+  #define FSS_EXTENDED_READ_short_delimit_s_length 1
+  #define FSS_EXTENDED_READ_short_depth_s_length   1
+  #define FSS_EXTENDED_READ_short_empty_s_length   1
+  #define FSS_EXTENDED_READ_short_line_s_length    1
+  #define FSS_EXTENDED_READ_short_name_s_length    1
+  #define FSS_EXTENDED_READ_short_object_s_length  1
+  #define FSS_EXTENDED_READ_short_pipe_s_length    1
+  #define FSS_EXTENDED_READ_short_raw_s_length     1
+  #define FSS_EXTENDED_READ_short_select_s_length  1
+  #define FSS_EXTENDED_READ_short_total_s_length   1
+  #define FSS_EXTENDED_READ_short_trim_s_length    1
+
+  #define FSS_EXTENDED_READ_long_at_s_length      2
+  #define FSS_EXTENDED_READ_long_content_s_length 7
+  #define FSS_EXTENDED_READ_long_columns_s_length 7
+  #define FSS_EXTENDED_READ_long_delimit_s_length 7
+  #define FSS_EXTENDED_READ_long_depth_s_length   5
+  #define FSS_EXTENDED_READ_long_empty_s_length   5
+  #define FSS_EXTENDED_READ_long_line_s_length    4
+  #define FSS_EXTENDED_READ_long_name_s_length    4
+  #define FSS_EXTENDED_READ_long_object_s_length  6
+  #define FSS_EXTENDED_READ_long_pipe_s_length    4
+  #define FSS_EXTENDED_READ_long_raw_s_length     3
+  #define FSS_EXTENDED_READ_long_select_s_length  6
+  #define FSS_EXTENDED_READ_long_total_s_length   5
+  #define FSS_EXTENDED_READ_long_trim_s_length    4
+
+  extern const f_string_static_t fss_extended_read_short_at_s;
+  extern const f_string_static_t fss_extended_read_short_content_s;
+  extern const f_string_static_t fss_extended_read_short_columns_s;
+  extern const f_string_static_t fss_extended_read_short_delimit_s;
+  extern const f_string_static_t fss_extended_read_short_depth_s;
+  extern const f_string_static_t fss_extended_read_short_empty_s;
+  extern const f_string_static_t fss_extended_read_short_line_s;
+  extern const f_string_static_t fss_extended_read_short_name_s;
+  extern const f_string_static_t fss_extended_read_short_object_s;
+  extern const f_string_static_t fss_extended_read_short_pipe_s;
+  extern const f_string_static_t fss_extended_read_short_raw_s;
+  extern const f_string_static_t fss_extended_read_short_select_s;
+  extern const f_string_static_t fss_extended_read_short_total_s;
+  extern const f_string_static_t fss_extended_read_short_trim_s;
+
+  extern const f_string_static_t fss_extended_read_long_at_s;
+  extern const f_string_static_t fss_extended_read_long_content_s;
+  extern const f_string_static_t fss_extended_read_long_columns_s;
+  extern const f_string_static_t fss_extended_read_long_delimit_s;
+  extern const f_string_static_t fss_extended_read_long_depth_s;
+  extern const f_string_static_t fss_extended_read_long_empty_s;
+  extern const f_string_static_t fss_extended_read_long_line_s;
+  extern const f_string_static_t fss_extended_read_long_name_s;
+  extern const f_string_static_t fss_extended_read_long_object_s;
+  extern const f_string_static_t fss_extended_read_long_pipe_s;
+  extern const f_string_static_t fss_extended_read_long_raw_s;
+  extern const f_string_static_t fss_extended_read_long_select_s;
+  extern const f_string_static_t fss_extended_read_long_total_s;
+  extern const f_string_static_t fss_extended_read_long_trim_s;
 
   enum {
     fss_extended_read_parameter_help_e,
@@ -128,24 +210,24 @@ extern "C" {
       macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_version_s.string, f_console_standard_long_version_s.string, 0, 0, f_console_type_inverse_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_read_short_at_s, fss_extended_read_long_at_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_read_short_content_s, fss_extended_read_long_content_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_read_short_columns_s, fss_extended_read_long_columns_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_read_short_delimit_s, fss_extended_read_long_delimit_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_read_short_depth_s, fss_extended_read_long_depth_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_read_short_empty_s, fss_extended_read_long_empty_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_read_short_line_s, fss_extended_read_long_line_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_read_short_name_s, fss_extended_read_long_name_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_read_short_object_s, fss_extended_read_long_object_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_read_short_pipe_s, fss_extended_read_long_pipe_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_read_short_raw_s, fss_extended_read_long_raw_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_read_short_select_s, fss_extended_read_long_select_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_read_short_total_s, fss_extended_read_long_total_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_read_short_trim_s, fss_extended_read_long_trim_s, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_read_short_at_s.string, fss_extended_read_long_at_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_read_short_content_s.string, fss_extended_read_long_content_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_read_short_columns_s.string, fss_extended_read_long_columns_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_read_short_delimit_s.string, fss_extended_read_long_delimit_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_read_short_depth_s.string, fss_extended_read_long_depth_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_read_short_empty_s.string, fss_extended_read_long_empty_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_read_short_line_s.string, fss_extended_read_long_line_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_read_short_name_s.string, fss_extended_read_long_name_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_read_short_object_s.string, fss_extended_read_long_object_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_read_short_pipe_s.string, fss_extended_read_long_pipe_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_read_short_raw_s.string, fss_extended_read_long_raw_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_read_short_select_s.string, fss_extended_read_long_select_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_read_short_total_s.string, fss_extended_read_long_total_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_read_short_trim_s.string, fss_extended_read_long_trim_s.string, 0, 0, f_console_type_normal_e), \
     }
 
   #define fss_extended_read_total_parameters_d 23
-#endif // _di_fss_extended_read_defines_
+#endif // _di_fss_extended_read_parameters_
 
 /**
  * FSS Delimit Parameter data.
@@ -186,36 +268,6 @@ extern "C" {
   };
 #endif // _di_fss_extended_read_delimit_modes_
 
-
-#ifndef _di_fss_extended_read_main_t_
-  typedef struct {
-    f_console_parameters_t parameters;
-
-    f_array_lengths_t remaining;
-    bool process_pipe;
-
-    fl_print_t output;
-    fl_print_t error;
-    fl_print_t warning;
-
-    f_signal_t signal;
-
-    f_color_context_t context;
-  } fss_extended_read_main_t;
-
-  #define fss_extended_read_main_t_initialize \
-    { \
-      f_console_parameters_t_initialize, \
-      f_array_lengths_t_initialize, \
-      F_false, \
-      fl_print_t_initialize, \
-      macro_fl_print_t_initialize_error(), \
-      macro_fl_print_t_initialize_warning(), \
-      f_signal_t_initialize, \
-      f_color_context_t_initialize, \
-    }
-#endif // _di_fss_extended_read_main_t_
-
 /**
  * Deallocate main.
  *
@@ -232,7 +284,7 @@ extern "C" {
  * @see fss_extended_read_main()
  */
 #ifndef _di_fss_extended_read_main_delete_
-  extern f_status_t fss_extended_read_main_delete(fss_extended_read_main_t * const main);
+  extern f_status_t fss_extended_read_main_delete(fll_program_data_t * const main);
 #endif // _di_fss_extended_read_main_delete_
 
 #ifdef __cplusplus
index 30eb18f4cf26ab149f3a8d11a2c5c6f151e4ef35..0db7da4666b8befd2388272d62436431f63f222c 100644 (file)
@@ -7,15 +7,6 @@
 extern "C" {
 #endif
 
-#ifndef _di_fss_extended_read_program_version_
-  const f_string_static_t fss_extended_read_program_version_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_program_version_s, 0, FSS_EXTENDED_READ_program_version_s_length);
-#endif // _di_fss_extended_read_program_version_
-
-#ifndef _di_fss_extended_read_program_name_
-  const f_string_static_t fss_extended_read_program_name_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_program_name_s, 0, FSS_EXTENDED_READ_program_name_s_length);
-  const f_string_static_t fss_extended_read_program_name_long_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_program_name_long_s, 0, FSS_EXTENDED_READ_program_name_long_s_length);
-#endif // _di_fss_extended_read_program_name_
-
 #ifndef _di_fss_extended_read_print_help_
   f_status_t fss_extended_read_print_help(const f_file_t file, const f_color_context_t context) {
 
@@ -50,7 +41,7 @@ extern "C" {
     fll_program_print_help_option(file, context, fss_extended_read_short_total_s, fss_extended_read_long_total_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "   Print the total number of lines.");
     fll_program_print_help_option(file, context, fss_extended_read_short_trim_s, fss_extended_read_long_trim_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "    Trim Object names on select or print.");
 
-    fll_program_print_help_usage(file, context, fss_extended_read_program_name_s, "filename(s)");
+    fll_program_print_help_usage(file, context, fss_extended_read_program_name_s, fll_program_parameter_filenames_s);
 
     fl_print_format(" %[Notes:%]%r", file.stream, context.set.important, context.set.important, f_string_eol_s);
 
@@ -127,7 +118,7 @@ extern "C" {
 #endif // _di_fss_extended_read_print_help_
 
 #ifndef _di_fss_extended_read_main_
-  f_status_t fss_extended_read_main(fss_extended_read_main_t * const main, const f_console_arguments_t *arguments) {
+  f_status_t fss_extended_read_main(fll_program_data_t * const main, const f_console_arguments_t *arguments) {
 
     f_status_t status = F_none;
 
@@ -139,7 +130,7 @@ extern "C" {
       f_console_parameter_id_t ids[3] = { fss_extended_read_parameter_no_color_e, fss_extended_read_parameter_light_e, fss_extended_read_parameter_dark_e };
       const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
 
-      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
+      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->context);
 
       main->output.set = &main->context.set;
       main->error.set = &main->context.set;
@@ -225,17 +216,17 @@ extern "C" {
     }
 
     // Provide a range designating where within the buffer a particular file exists, using a statically allocated array.
-    fss_extended_read_file_t files_array[main->remaining.used + 1];
+    fss_extended_read_file_t files_array[main->parameters.remaining.used + 1];
     fss_extended_read_data_t data = fss_extended_read_data_t_initialize;
 
     data.files.array = files_array;
     data.files.used = 1;
-    data.files.size = main->remaining.used + 1;
+    data.files.size = main->parameters.remaining.used + 1;
     data.files.array[0].name = "(pipe)";
     data.files.array[0].range.start = 1;
     data.files.array[0].range.stop = 0;
 
-    if (main->remaining.used || main->process_pipe) {
+    if (main->parameters.remaining.used || main->process_pipe) {
       {
         const f_array_length_t parameter_code[] = {
           fss_extended_read_parameter_at_e,
@@ -563,12 +554,12 @@ extern "C" {
         }
       }
 
-      if (F_status_is_error_not(status) && main->remaining.used > 0) {
+      if (F_status_is_error_not(status) && main->parameters.remaining.used > 0) {
         f_file_t file = f_file_t_initialize;
         f_array_length_t size_file = 0;
         uint16_t signal_check = 0;
 
-        for (f_array_length_t i = 0; i < main->remaining.used; ++i) {
+        for (f_array_length_t i = 0; i < main->parameters.remaining.used; ++i) {
 
           if (!((++signal_check) % fss_extended_read_signal_check_d)) {
             if (fss_extended_read_signal_received(main)) {
@@ -583,10 +574,10 @@ extern "C" {
           file.stream = 0;
           file.id = -1;
 
-          status = f_file_stream_open(arguments->argv[main->remaining.array[i]], 0, &file);
+          status = f_file_stream_open(arguments->argv[main->parameters.remaining.array[i]], 0, &file);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e);
 
             break;
           }
@@ -595,7 +586,7 @@ extern "C" {
           status = f_file_size_by_id(file.id, &size_file);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
             break;
           }
@@ -604,7 +595,7 @@ extern "C" {
             status = f_string_dynamic_resize(data.buffer.size + size_file, &data.buffer);
 
             if (F_status_is_error(status)) {
-              fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+              fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
               break;
             }
@@ -612,13 +603,13 @@ extern "C" {
             status = f_file_stream_read(file, &data.buffer);
 
             if (F_status_is_error(status)) {
-              fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+              fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
               break;
             }
 
             if (data.buffer.used > data.files.array[data.files.used].range.start) {
-              data.files.array[data.files.used].name = arguments->argv[main->remaining.array[i]];
+              data.files.array[data.files.used].name = arguments->argv[main->parameters.remaining.array[i]];
               data.files.array[data.files.used++].range.stop = data.buffer.used - 1;
 
               // This standard is newline sensitive, when appending files to the buffer if the file lacks a final newline then this could break the format for files appended thereafter.
index aea06f9af45e54944a6dd837ff452e1e5f5e4ae3..45cf61737906397223682e92ed9f5cb77045ec81 100644 (file)
@@ -7,7 +7,7 @@
  *
  * This is the FSS Basic Read program
  * This program utilizes the Featureless Linux Library.
- * This program processes files or other input in fss format and stores the results in the fss_extended_read_main_t.
+ * This program processes files or other input in fss format and stores the results in the fll_program_data_t.
  *
  * This processes in accordance to the FSS-0001 Extended specification.
  */
@@ -96,7 +96,7 @@ extern "C" {
  * @see fss_extended_read_main_delete()
  */
 #ifndef _di_fss_extended_read_main_
-  extern f_status_t fss_extended_read_main(fss_extended_read_main_t * const main, const f_console_arguments_t *arguments);
+  extern f_status_t fss_extended_read_main(fll_program_data_t * const main, const f_console_arguments_t *arguments);
 #endif // _di_fss_extended_read_main_
 
 #ifdef __cplusplus
index c804df4b70425960204890f02fce79f22276b6bb..492c3bcc179df25ec85ace7600d8ce2667ca935e 100644 (file)
@@ -3,7 +3,7 @@
 int main(const int argc, const f_string_t *argv) {
 
   f_console_arguments_t arguments = { argc, argv };
-  fss_extended_read_main_t data = fss_extended_read_main_t_initialize;
+  fll_program_data_t data = fss_extended_read_main_t_initialize;
 
   if (f_pipe_input_exists()) {
     data.process_pipe = F_true;
index c12242ebe41dd7bbf936830a9ab42c9d88f671bb..9e850e69c32d3b9d1e0f5acbf105559d0e56f109 100644 (file)
@@ -59,7 +59,7 @@ extern "C" {
 #endif // _di_fss_extended_read_depths_resize_
 
 #ifndef _di_fss_extended_read_print_signal_received_
-  void fss_extended_read_print_signal_received(fss_extended_read_main_t * const main, const f_status_t signal) {
+  void fss_extended_read_print_signal_received(fll_program_data_t * const main, const f_status_t signal) {
 
     if (main->warning.verbosity != f_console_verbosity_verbose_e) return;
 
@@ -77,7 +77,7 @@ extern "C" {
 #endif // _di_fss_extended_read_print_signal_received_
 
 #ifndef _di_fss_extended_read_signal_received_
-  f_status_t fss_extended_read_signal_received(fss_extended_read_main_t * const main) {
+  f_status_t fss_extended_read_signal_received(fll_program_data_t * const main) {
 
     if (main->signal.id == -1) {
       return F_false;
index d88cd0099f6ef6a2b5defdb0a2e23682fe9e1d40..0094e54514bf3ed53b6f69f3d6e444ecc48a2ad9 100644 (file)
@@ -257,7 +257,7 @@ extern "C" {
  *   The signal received.
  */
 #ifndef _di_fss_extended_read_print_signal_received_
-  extern void fss_extended_read_print_signal_received(fss_extended_read_main_t * const main, const f_status_t signal) F_attribute_visibility_internal_d;
+  extern void fss_extended_read_print_signal_received(fll_program_data_t * const main, const f_status_t signal) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_read_print_signal_received_
 
 /**
@@ -275,7 +275,7 @@ extern "C" {
  * @see f_signal_read()
  */
 #ifndef _di_fss_extended_read_signal_received_
-  extern f_status_t fss_extended_read_signal_received(fss_extended_read_main_t * const main) F_attribute_visibility_internal_d;
+  extern f_status_t fss_extended_read_signal_received(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_read_signal_received_
 
 #ifdef __cplusplus
index 84c24036ce2583530f831a3c59cb9ac8bb71ae22..9b1edb7278e7d4bdf46e0a4825657f027be5e728 100644 (file)
@@ -8,7 +8,7 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_extended_read_print_at_
-  void fss_extended_read_print_at(fss_extended_read_main_t * const main, const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_extended_read_data_t * const data) {
+  void fss_extended_read_print_at(fll_program_data_t * const main, const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_extended_read_data_t * const data) {
 
     if (at >= data->contents.used) {
       return;
@@ -100,7 +100,7 @@ extern "C" {
 #endif // _di_fss_extended_read_print_at_
 
 #ifndef _di_fss_extended_read_print_at_total_
-  f_status_t fss_extended_read_print_at_total(fss_extended_read_main_t * const main, const f_array_length_t at, fss_extended_read_data_t *data) {
+  f_status_t fss_extended_read_print_at_total(fll_program_data_t * const main, const f_array_length_t at, fss_extended_read_data_t *data) {
 
     if (data->option & fss_extended_read_data_option_select_d) {
       if (data->option & fss_extended_read_data_option_object_d) {
@@ -154,7 +154,7 @@ extern "C" {
 #endif // _di_fss_extended_read_print_at_total_
 
 #ifndef _di_fss_extended_read_print_content_end_
-  void fss_extended_read_print_content_end(fss_extended_read_main_t * const main) {
+  void fss_extended_read_print_content_end(fll_program_data_t * const main) {
 
     if (main->parameters.array[fss_extended_read_parameter_pipe_e].result == f_console_result_found_e) {
       f_print_character(fss_extended_read_pipe_content_start_s, main->output.to.stream);
@@ -166,7 +166,7 @@ extern "C" {
 #endif // _di_fss_extended_read_print_content_end_
 
 #ifndef _di_fss_extended_read_print_object_end_
-  void fss_extended_read_print_object_end(fss_extended_read_main_t * const main) {
+  void fss_extended_read_print_object_end(fll_program_data_t * const main) {
 
     if (main->parameters.array[fss_extended_read_parameter_pipe_e].result == f_console_result_found_e) {
       f_print_character(fss_extended_read_pipe_content_end_s, main->output.to.stream);
@@ -178,7 +178,7 @@ extern "C" {
 #endif // _di_fss_extended_read_print_object_end_
 
 #ifndef _di_fss_extended_read_print_one_
-  void fss_extended_read_print_one(fss_extended_read_main_t * const main) {
+  void fss_extended_read_print_one(fll_program_data_t * const main) {
 
     f_print_character(f_string_ascii_1_s.string[0], main->output.to.stream);
     f_print_dynamic_raw(f_string_eol_s, main->output.to.stream);
@@ -186,7 +186,7 @@ extern "C" {
 #endif // _di_fss_extended_read_print_one_
 
 #ifndef _di_fss_extended_read_print_set_end_
-  void fss_extended_read_print_set_end(fss_extended_read_main_t * const main) {
+  void fss_extended_read_print_set_end(fll_program_data_t * const main) {
 
     if (main->parameters.array[fss_extended_read_parameter_pipe_e].result == f_console_result_found_e) {
       f_print_character(fss_extended_read_pipe_content_end_s, main->output.to.stream);
@@ -198,7 +198,7 @@ extern "C" {
 #endif // _di_fss_extended_read_print_set_end_
 
 #ifndef _di_fss_extended_read_print_zero_
-  void fss_extended_read_print_zero(fss_extended_read_main_t * const main) {
+  void fss_extended_read_print_zero(fll_program_data_t * const main) {
 
     f_print_character(f_string_ascii_0_s.string[0], main->output.to.stream);
     f_print_dynamic_raw(f_string_eol_s, main->output.to.stream);
index dbc2bb4366d761e00f5aec74ef109a5e130f2087..59692c876e7c79ade01db64430e4fff168d51661 100644 (file)
@@ -29,7 +29,7 @@ extern "C" {
  *   The program data.
  */
 #ifndef _di_fss_extended_read_print_at_
-  extern void fss_extended_read_print_at(fss_extended_read_main_t * const main, const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_extended_read_data_t * const data) F_attribute_visibility_internal_d;
+  extern void fss_extended_read_print_at(fll_program_data_t * const main, const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_extended_read_data_t * const data) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_read_print_at_
 
 /**
@@ -47,7 +47,7 @@ extern "C" {
  *   F_success on success and something was matched (and total was printed).
  */
 #ifndef _di_fss_extended_read_print_at_total_
-  extern f_status_t fss_extended_read_print_at_total(fss_extended_read_main_t * const main, const f_array_length_t at, fss_extended_read_data_t *data) F_attribute_visibility_internal_d;
+  extern f_status_t fss_extended_read_print_at_total(fll_program_data_t * const main, const f_array_length_t at, fss_extended_read_data_t *data) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_read_print_at_total_
 
 /**
@@ -57,7 +57,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_extended_read_print_content_end_
-  extern void fss_extended_read_print_content_end(fss_extended_read_main_t * const main) F_attribute_visibility_internal_d;
+  extern void fss_extended_read_print_content_end(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_read_print_content_end_
 
 /**
@@ -67,7 +67,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_extended_read_print_object_end_
-  extern void fss_extended_read_print_object_end(fss_extended_read_main_t * const main) F_attribute_visibility_internal_d;
+  extern void fss_extended_read_print_object_end(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_read_print_object_end_
 
 /**
@@ -77,7 +77,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_extended_read_print_one_
-  extern void fss_extended_read_print_one(fss_extended_read_main_t * const main) F_attribute_visibility_internal_d;
+  extern void fss_extended_read_print_one(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_read_print_one_
 
 /**
@@ -87,7 +87,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_extended_read_print_set_end_
-  extern void fss_extended_read_print_set_end(fss_extended_read_main_t * const main) F_attribute_visibility_internal_d;
+  extern void fss_extended_read_print_set_end(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_read_print_set_end_
 
 /**
@@ -97,7 +97,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_extended_read_print_zero_
-  extern void fss_extended_read_print_zero(fss_extended_read_main_t * const main) F_attribute_visibility_internal_d;
+  extern void fss_extended_read_print_zero(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_read_print_zero_
 
 #ifdef __cplusplus
index c2205744a928dade29fc27be88c53b3082fc23bf..7dced40951ecb88736846faccb3b88bf4fb2592f 100644 (file)
@@ -60,7 +60,7 @@ extern "C" {
 #endif // _di_fss_extended_read_delimit_content_is_
 
 #ifndef _di_fss_extended_read_depth_process_
-  f_status_t fss_extended_read_depth_process(fss_extended_read_main_t * const main, const f_console_arguments_t *arguments, fss_extended_read_data_t *data) {
+  f_status_t fss_extended_read_depth_process(fll_program_data_t * const main, const f_console_arguments_t *arguments, fss_extended_read_data_t *data) {
 
     f_status_t status = F_none;
 
@@ -248,7 +248,7 @@ extern "C" {
 #endif // _di_fss_extended_read_file_identify_
 
 #ifndef _di_fss_extended_read_load_
-  f_status_t fss_extended_read_load(fss_extended_read_main_t * const main, fss_extended_read_data_t *data) {
+  f_status_t fss_extended_read_load(fll_program_data_t * const main, fss_extended_read_data_t *data) {
 
     f_state_t state = macro_f_state_t_initialize(fss_extended_read_common_allocation_large_d, fss_extended_read_common_allocation_small_d, 0, 0, 0, 0, 0);
     f_string_range_t input = macro_f_string_range_t_initialize(data->buffer.used);
@@ -283,7 +283,7 @@ extern "C" {
 #endif // _di_fss_extended_read_load_
 
 #ifndef _di_fss_extended_read_load_number_
-  f_status_t fss_extended_read_load_number(fss_extended_read_main_t * const main, const f_array_length_t parameter, const f_string_t name, const f_console_arguments_t *arguments, f_number_unsigned_t *number) {
+  f_status_t fss_extended_read_load_number(fll_program_data_t * const main, const f_array_length_t parameter, const f_string_t name, const f_console_arguments_t *arguments, f_number_unsigned_t *number) {
 
     if (main->parameters.array[parameter].result == f_console_result_additional_e) {
       const f_array_length_t index = main->parameters.array[parameter].values.array[main->parameters.array[parameter].values.used - 1];
@@ -305,7 +305,7 @@ extern "C" {
 #endif // _di_fss_extended_read_load_number_
 
 #ifndef _di_fss_extended_read_process_
-  f_status_t fss_extended_read_process(fss_extended_read_main_t * const main, const f_console_arguments_t *arguments, fss_extended_read_data_t *data) {
+  f_status_t fss_extended_read_process(fll_program_data_t * const main, const f_console_arguments_t *arguments, fss_extended_read_data_t *data) {
 
     f_status_t status = fss_extended_read_process_option(main, arguments, data);
     if (F_status_is_error(status)) return status;
@@ -355,7 +355,7 @@ extern "C" {
 #endif // _di_fss_extended_read_process_
 
 #ifndef _di_fss_extended_read_process_at_
-  f_status_t fss_extended_read_process_at(fss_extended_read_main_t * const main, fss_extended_read_data_t *data, bool names[]) {
+  f_status_t fss_extended_read_process_at(fll_program_data_t * const main, fss_extended_read_data_t *data, bool names[]) {
 
     if (data->depths.array[0].value_at >= data->objects.used) {
       if (data->option & (fss_extended_read_data_option_columns_d | fss_extended_read_data_option_total_d)) {
@@ -461,7 +461,7 @@ extern "C" {
 #endif // _di_fss_extended_read_process_at_
 
 #ifndef _di_fss_extended_read_process_columns_
-  f_status_t fss_extended_read_process_columns(fss_extended_read_main_t * const main, fss_extended_read_data_t *data, bool names[]) {
+  f_status_t fss_extended_read_process_columns(fll_program_data_t * const main, fss_extended_read_data_t *data, bool names[]) {
 
     if (!(data->option & fss_extended_read_data_option_content_d)) {
       flockfile(main->output.to.stream);
@@ -491,7 +491,7 @@ extern "C" {
 #endif // _di_fss_extended_read_process_columns_
 
 #ifndef _di_fss_extended_read_process_line_
-  f_status_t fss_extended_read_process_line(fss_extended_read_main_t * const main, fss_extended_read_data_t *data, bool names[]) {
+  f_status_t fss_extended_read_process_line(fll_program_data_t * const main, fss_extended_read_data_t *data, bool names[]) {
 
     f_array_lengths_t except_none = f_array_lengths_t_initialize;
     f_array_lengths_t *delimits_object = fss_extended_read_delimit_object_is(0, data) ? &data->delimits_object : &except_none;
@@ -577,7 +577,7 @@ extern "C" {
 #endif // _di_fss_extended_read_process_name_
 
 #ifndef _di_fss_extended_read_process_option_
-  f_status_t fss_extended_read_process_option(fss_extended_read_main_t * const main, const f_console_arguments_t *arguments, fss_extended_read_data_t *data) {
+  f_status_t fss_extended_read_process_option(fll_program_data_t * const main, const f_console_arguments_t *arguments, fss_extended_read_data_t *data) {
 
     f_status_t status = F_none;
 
@@ -641,7 +641,7 @@ extern "C" {
 #endif // _di_fss_extended_read_process_option_
 
 #ifndef _di_fss_extended_read_process_total_
-  f_status_t fss_extended_read_process_total(fss_extended_read_main_t * const main, fss_extended_read_data_t *data, bool names[]) {
+  f_status_t fss_extended_read_process_total(fll_program_data_t * const main, fss_extended_read_data_t *data, bool names[]) {
 
     f_array_length_t total = 0;
 
index 7462de59e7c8568f571f423a76e9f6b124638d66..509e3ef8be14f8aab2a047c010c571bb2ead2542 100644 (file)
@@ -72,7 +72,7 @@ extern "C" {
  * @see fss_extended_read_depths_resize()
  */
 #ifndef _di_fss_extended_read_depth_process_
-  extern f_status_t fss_extended_read_depth_process(fss_extended_read_main_t * const main, const f_console_arguments_t *arguments, fss_extended_read_data_t *data) F_attribute_visibility_internal_d;
+  extern f_status_t fss_extended_read_depth_process(fll_program_data_t * const main, const f_console_arguments_t *arguments, fss_extended_read_data_t *data) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_read_depth_process_
 
 /**
@@ -116,7 +116,7 @@ extern "C" {
  * @see fss_extended_read_process_option()
  */
 #ifndef _di_fss_extended_read_load_
-  extern f_status_t fss_extended_read_load(fss_extended_read_main_t * const main, fss_extended_read_data_t *data) F_attribute_visibility_internal_d;
+  extern f_status_t fss_extended_read_load(fll_program_data_t * const main, fss_extended_read_data_t *data) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_read_load_
 
 /**
@@ -146,7 +146,7 @@ extern "C" {
  * @see fss_extended_read_depths_resize()
  */
 #ifndef _di_fss_extended_read_load_number_
-  extern f_status_t fss_extended_read_load_number(fss_extended_read_main_t * const main, const f_array_length_t parameter, const f_string_t name, const f_console_arguments_t *arguments, f_number_unsigned_t *number) F_attribute_visibility_internal_d;
+  extern f_status_t fss_extended_read_load_number(fll_program_data_t * const main, const f_array_length_t parameter, const f_string_t name, const f_console_arguments_t *arguments, f_number_unsigned_t *number) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_read_load_number_
 
 /**
@@ -171,7 +171,7 @@ extern "C" {
  * @see fss_extended_read_process_option()
  */
 #ifndef _di_fss_extended_read_process_
-  extern f_status_t fss_extended_read_process(fss_extended_read_main_t * const main, const f_console_arguments_t *arguments, fss_extended_read_data_t *data) F_attribute_visibility_internal_d;
+  extern f_status_t fss_extended_read_process(fll_program_data_t * const main, const f_console_arguments_t *arguments, fss_extended_read_data_t *data) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_read_process_
 
 /**
@@ -189,7 +189,7 @@ extern "C" {
  *   F_none on success.
  */
 #ifndef _di_fss_extended_read_process_at_
-  extern f_status_t fss_extended_read_process_at(fss_extended_read_main_t * const main, fss_extended_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
+  extern f_status_t fss_extended_read_process_at(fll_program_data_t * const main, fss_extended_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_read_process_at_
 
 /**
@@ -207,7 +207,7 @@ extern "C" {
  *   F_none on success.
  */
 #ifndef _di_fss_extended_read_process_columns_
-  extern f_status_t fss_extended_read_process_columns(fss_extended_read_main_t * const main, fss_extended_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
+  extern f_status_t fss_extended_read_process_columns(fll_program_data_t * const main, fss_extended_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_read_process_columns_
 
 /**
@@ -225,7 +225,7 @@ extern "C" {
  *   F_none on success.
  */
 #ifndef _di_fss_extended_read_process_line_
-  extern f_status_t fss_extended_read_process_line(fss_extended_read_main_t * const main, fss_extended_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
+  extern f_status_t fss_extended_read_process_line(fll_program_data_t * const main, fss_extended_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_read_process_line_
 
 /**
@@ -266,7 +266,7 @@ extern "C" {
  * @see fss_extended_read_load_setting()
  */
 #ifndef _di_fss_extended_read_process_option_
-  extern f_status_t fss_extended_read_process_option(fss_extended_read_main_t * const main, const f_console_arguments_t *arguments, fss_extended_read_data_t *data) F_attribute_visibility_internal_d;
+  extern f_status_t fss_extended_read_process_option(fll_program_data_t * const main, const f_console_arguments_t *arguments, fss_extended_read_data_t *data) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_read_process_option_
 
 /**
@@ -284,7 +284,7 @@ extern "C" {
  *   F_none on success.
  */
 #ifndef _di_fss_extended_read_process_total_
-  extern f_status_t fss_extended_read_process_total(fss_extended_read_main_t * const main, fss_extended_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
+  extern f_status_t fss_extended_read_process_total(fll_program_data_t * const main, fss_extended_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_read_process_total_
 
 /**
@@ -300,7 +300,7 @@ extern "C" {
  *   F_false if not delimited.
  */
 #ifndef _di_fss_extended_read_is_delimited_at_depth_
-  extern f_status_t fss_extended_read_is_delimited_at_depth(fss_extended_read_main_t * const main, const f_array_length_t depth) F_attribute_visibility_internal_d;
+  extern f_status_t fss_extended_read_is_delimited_at_depth(fll_program_data_t * const main, const f_array_length_t depth) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_read_is_delimited_at_depth_
 
 /**
@@ -327,7 +327,7 @@ extern "C" {
  * @see fss_extended_read_main_preprocess_depth()
  */
 #ifndef _di_fss_extended_read_main_process_file_
-  extern f_status_t fss_extended_read_main_process_file(fss_extended_read_main_t * const main, const f_console_arguments_t arguments, const f_string_t file_name, const fss_extended_read_depths_t depths, f_fss_delimits_t *objects_delimits, f_fss_delimits_t *contents_delimits) F_attribute_visibility_internal_d;
+  extern f_status_t fss_extended_read_main_process_file(fll_program_data_t * const main, const f_console_arguments_t arguments, const f_string_t file_name, const fss_extended_read_depths_t depths, f_fss_delimits_t *objects_delimits, f_fss_delimits_t *contents_delimits) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_read_main_process_file_
 
 #ifdef __cplusplus
index 823700d8ceb1ec3bce554f1f9acbffebc46b556a..d7ec54012716f20c45cf4b0c080bddf8a735a7cb 100644 (file)
@@ -13,16 +13,38 @@ extern "C" {
   const f_string_static_t fss_extended_write_program_name_long_s = macro_f_string_static_t_initialize(FSS_EXTENDED_WRITE_program_name_long_s, 0, FSS_EXTENDED_WRITE_program_name_long_s_length);
 #endif // _di_fss_extended_write_program_name_
 
-#ifndef _di_fss_extended_write_main_delete_
-  f_status_t fss_extended_write_main_delete(fss_extended_write_main_t * const main) {
-
-    f_console_parameters_delete(&main->parameters);
+#ifndef _di_fss_extended_write_defines_
+  const f_string_static_t fss_extended_write_pipe_content_end_s = macro_f_string_static_t_initialize(FSS_EXTENDED_WRITE_pipe_content_end_s, 0, FSS_EXTENDED_WRITE_pipe_content_end_s_length);
+  const f_string_static_t fss_extended_write_pipe_content_ignore_s = macro_f_string_static_t_initialize(FSS_EXTENDED_WRITE_pipe_content_ignore_s, 0, FSS_EXTENDED_WRITE_pipe_content_ignore_s_length);
+  const f_string_static_t fss_extended_write_pipe_content_start_s = macro_f_string_static_t_initialize(FSS_EXTENDED_WRITE_pipe_content_start_s, 0, FSS_EXTENDED_WRITE_pipe_content_start_s_length);
+#endif // _di_fss_extended_write_defines_
+
+#ifndef _di_fss_extended_write_parameters_
+  const f_string_static_t fss_extended_write_short_file_s = macro_f_string_static_t_initialize(FSS_EXTENDED_WRITE_short_file_s, 0, FSS_EXTENDED_WRITE_short_file_s_length);
+  const f_string_static_t fss_extended_write_short_content_s = macro_f_string_static_t_initialize(FSS_EXTENDED_WRITE_short_content_s, 0, FSS_EXTENDED_WRITE_short_content_s_length);
+  const f_string_static_t fss_extended_write_short_double_s = macro_f_string_static_t_initialize(FSS_EXTENDED_WRITE_short_double_s, 0, FSS_EXTENDED_WRITE_short_double_s_length);
+  const f_string_static_t fss_extended_write_short_ignore_s = macro_f_string_static_t_initialize(FSS_EXTENDED_WRITE_short_ignore_s, 0, FSS_EXTENDED_WRITE_short_ignore_s_length);
+  const f_string_static_t fss_extended_write_short_object_s = macro_f_string_static_t_initialize(FSS_EXTENDED_WRITE_short_object_s, 0, FSS_EXTENDED_WRITE_short_object_s_length);
+  const f_string_static_t fss_extended_write_short_partial_s = macro_f_string_static_t_initialize(FSS_EXTENDED_WRITE_short_partial_s, 0, FSS_EXTENDED_WRITE_short_partial_s_length);
+  const f_string_static_t fss_extended_write_short_prepend_s = macro_f_string_static_t_initialize(FSS_EXTENDED_WRITE_short_prepend_s, 0, FSS_EXTENDED_WRITE_short_prepend_s_length);
+  const f_string_static_t fss_extended_write_short_single_s = macro_f_string_static_t_initialize(FSS_EXTENDED_WRITE_short_single_s, 0, FSS_EXTENDED_WRITE_short_single_s_length);
+  const f_string_static_t fss_extended_write_short_trim_s = macro_f_string_static_t_initialize(FSS_EXTENDED_WRITE_short_trim_s, 0, FSS_EXTENDED_WRITE_short_trim_s_length);
+
+  const f_string_static_t fss_extended_write_long_file_s = macro_f_string_static_t_initialize(FSS_EXTENDED_WRITE_long_file_s, 0, FSS_EXTENDED_WRITE_long_file_s_length);
+  const f_string_static_t fss_extended_write_long_content_s = macro_f_string_static_t_initialize(FSS_EXTENDED_WRITE_long_content_s, 0, FSS_EXTENDED_WRITE_long_content_s_length);
+  const f_string_static_t fss_extended_write_long_double_s = macro_f_string_static_t_initialize(FSS_EXTENDED_WRITE_long_double_s, 0, FSS_EXTENDED_WRITE_long_double_s_length);
+  const f_string_static_t fss_extended_write_long_ignore_s = macro_f_string_static_t_initialize(FSS_EXTENDED_WRITE_long_ignore_s, 0, FSS_EXTENDED_WRITE_long_ignore_s_length);
+  const f_string_static_t fss_extended_write_long_object_s = macro_f_string_static_t_initialize(FSS_EXTENDED_WRITE_long_object_s, 0, FSS_EXTENDED_WRITE_long_object_s_length);
+  const f_string_static_t fss_extended_write_long_partial_s = macro_f_string_static_t_initialize(FSS_EXTENDED_WRITE_long_partial_s, 0, FSS_EXTENDED_WRITE_long_partial_s_length);
+  const f_string_static_t fss_extended_write_long_prepend_s = macro_f_string_static_t_initialize(FSS_EXTENDED_WRITE_long_prepend_s, 0, FSS_EXTENDED_WRITE_long_prepend_s_length);
+  const f_string_static_t fss_extended_write_long_single_s = macro_f_string_static_t_initialize(FSS_EXTENDED_WRITE_long_single_s, 0, FSS_EXTENDED_WRITE_long_single_s_length);
+  const f_string_static_t fss_extended_write_long_trim_s = macro_f_string_static_t_initialize(FSS_EXTENDED_WRITE_long_trim_s, 0, FSS_EXTENDED_WRITE_long_trim_s_length);
+#endif // _di_fss_extended_write_parameters_
 
-    f_type_array_lengths_resize(0, &main->remaining);
-
-    macro_f_color_context_t_delete_simple(main->context);
+#ifndef _di_fss_extended_write_main_delete_
+  f_status_t fss_extended_write_main_delete(fll_program_data_t * const main) {
 
-    return F_none;
+    return fll_program_data_delete(main);
   }
 #endif // _di_fss_extended_write_main_delete_
 
index 1d5480c005592a0471c06c2e6a42c71ee0fa71db..405778c4b045b510fe1234293d0e4e52c8a1133b 100644 (file)
@@ -16,6 +16,9 @@
 extern "C" {
 #endif
 
+/**
+ * The program version.
+ */
 #ifndef _di_fss_extended_write_program_version_
   #define FSS_EXTENDED_WRITE_program_version_major_s F_string_ascii_0_s
   #define FSS_EXTENDED_WRITE_program_version_minor_s F_string_ascii_5_s
@@ -42,6 +45,9 @@ extern "C" {
   extern const f_string_static_t fss_extended_write_program_version_s;
 #endif // _di_fss_extended_write_program_version_
 
+/**
+ * The program name.
+ */
 #ifndef _di_fss_extended_write_program_name_
   #define FSS_EXTENDED_WRITE_program_name_s      "fss_extended_write"
   #define FSS_EXTENDED_WRITE_program_name_long_s "FSS Extended Write"
@@ -53,32 +59,88 @@ extern "C" {
   extern const f_string_static_t fss_extended_write_program_name_long_s;
 #endif // _di_fss_extended_write_program_name_
 
+/**
+ * The main program defines.
+ */
 #ifndef _di_fss_extended_write_defines_
   #define fss_extended_write_signal_check_d 10000
 
-  #define fss_extended_write_pipe_content_end_s    '\f'
-  #define fss_extended_write_pipe_content_ignore_s '\v'
-  #define fss_extended_write_pipe_content_start_s  '\b'
-
-  #define fss_extended_write_short_file_s    "f"
-  #define fss_extended_write_short_content_s "c"
-  #define fss_extended_write_short_double_s  "d"
-  #define fss_extended_write_short_ignore_s  "I"
-  #define fss_extended_write_short_object_s  "o"
-  #define fss_extended_write_short_partial_s "p"
-  #define fss_extended_write_short_prepend_s "P"
-  #define fss_extended_write_short_single_s  "s"
-  #define fss_extended_write_short_trim_s    "T"
-
-  #define fss_extended_write_long_file_s    "file"
-  #define fss_extended_write_long_content_s "content"
-  #define fss_extended_write_long_double_s  "double"
-  #define fss_extended_write_long_ignore_s  "ignore"
-  #define fss_extended_write_long_object_s  "object"
-  #define fss_extended_write_long_partial_s "partial"
-  #define fss_extended_write_long_prepend_s "prepend"
-  #define fss_extended_write_long_single_s  "single"
-  #define fss_extended_write_long_trim_s    "trim"
+  #define FSS_EXTENDED_WRITE_pipe_content_end_s    "\f"
+  #define FSS_EXTENDED_WRITE_pipe_content_ignore_s "\v"
+  #define FSS_EXTENDED_WRITE_pipe_content_start_s  "\b"
+
+  #define FSS_EXTENDED_WRITE_pipe_content_end_s_length    1
+  #define FSS_EXTENDED_WRITE_pipe_content_ignore_s_length 1
+  #define FSS_EXTENDED_WRITE_pipe_content_start_s_length  1
+
+  extern const f_string_static_t fss_extended_write_pipe_content_end_s;
+  extern const f_string_static_t fss_extended_write_pipe_content_ignore_s;
+  extern const f_string_static_t fss_extended_write_pipe_content_start_s;
+#endif // _di_fss_extended_write_defines_
+
+/**
+ * The main program parameters.
+ */
+#ifndef _di_fss_extended_write_parameters_
+  #define FSS_EXTENDED_WRITE_short_file_s    "f"
+  #define FSS_EXTENDED_WRITE_short_content_s "c"
+  #define FSS_EXTENDED_WRITE_short_double_s  "d"
+  #define FSS_EXTENDED_WRITE_short_ignore_s  "I"
+  #define FSS_EXTENDED_WRITE_short_object_s  "o"
+  #define FSS_EXTENDED_WRITE_short_partial_s "p"
+  #define FSS_EXTENDED_WRITE_short_prepend_s "P"
+  #define FSS_EXTENDED_WRITE_short_single_s  "s"
+  #define FSS_EXTENDED_WRITE_short_trim_s    "T"
+
+  #define FSS_EXTENDED_WRITE_long_file_s    "file"
+  #define FSS_EXTENDED_WRITE_long_content_s "content"
+  #define FSS_EXTENDED_WRITE_long_double_s  "double"
+  #define FSS_EXTENDED_WRITE_long_ignore_s  "ignore"
+  #define FSS_EXTENDED_WRITE_long_object_s  "object"
+  #define FSS_EXTENDED_WRITE_long_partial_s "partial"
+  #define FSS_EXTENDED_WRITE_long_prepend_s "prepend"
+  #define FSS_EXTENDED_WRITE_long_single_s  "single"
+  #define FSS_EXTENDED_WRITE_long_trim_s    "trim"
+
+  #define FSS_EXTENDED_WRITE_short_file_s_length    1
+  #define FSS_EXTENDED_WRITE_short_content_s_length 1
+  #define FSS_EXTENDED_WRITE_short_double_s_length  1
+  #define FSS_EXTENDED_WRITE_short_ignore_s_length  1
+  #define FSS_EXTENDED_WRITE_short_object_s_length  1
+  #define FSS_EXTENDED_WRITE_short_partial_s_length 1
+  #define FSS_EXTENDED_WRITE_short_prepend_s_length 1
+  #define FSS_EXTENDED_WRITE_short_single_s_length  1
+  #define FSS_EXTENDED_WRITE_short_trim_s_length    1
+
+  #define FSS_EXTENDED_WRITE_long_file_s_length    4
+  #define FSS_EXTENDED_WRITE_long_content_s_length 7
+  #define FSS_EXTENDED_WRITE_long_double_s_length  6
+  #define FSS_EXTENDED_WRITE_long_ignore_s_length  6
+  #define FSS_EXTENDED_WRITE_long_object_s_length  6
+  #define FSS_EXTENDED_WRITE_long_partial_s_length 7
+  #define FSS_EXTENDED_WRITE_long_prepend_s_length 7
+  #define FSS_EXTENDED_WRITE_long_single_s_length  6
+  #define FSS_EXTENDED_WRITE_long_trim_s_length    4
+
+  extern const f_string_static_t fss_extended_write_short_file_s;
+  extern const f_string_static_t fss_extended_write_short_content_s;
+  extern const f_string_static_t fss_extended_write_short_double_s;
+  extern const f_string_static_t fss_extended_write_short_ignore_s;
+  extern const f_string_static_t fss_extended_write_short_object_s;
+  extern const f_string_static_t fss_extended_write_short_partial_s;
+  extern const f_string_static_t fss_extended_write_short_prepend_s;
+  extern const f_string_static_t fss_extended_write_short_single_s;
+  extern const f_string_static_t fss_extended_write_short_trim_s;
+
+  extern const f_string_static_t fss_extended_write_long_file_s;
+  extern const f_string_static_t fss_extended_write_long_content_s;
+  extern const f_string_static_t fss_extended_write_long_double_s;
+  extern const f_string_static_t fss_extended_write_long_ignore_s;
+  extern const f_string_static_t fss_extended_write_long_object_s;
+  extern const f_string_static_t fss_extended_write_long_partial_s;
+  extern const f_string_static_t fss_extended_write_long_prepend_s;
+  extern const f_string_static_t fss_extended_write_long_single_s;
+  extern const f_string_static_t fss_extended_write_long_trim_s;
 
   enum {
     fss_extended_write_parameter_help_e,
@@ -113,51 +175,19 @@ extern "C" {
       macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_version_s.string, f_console_standard_long_version_s.string, 0, F_false, f_console_type_inverse_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_write_short_file_s, fss_extended_write_long_file_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_write_short_content_s, fss_extended_write_long_content_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_write_short_double_s, fss_extended_write_long_double_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_write_short_ignore_s, fss_extended_write_long_ignore_s, 0, 2, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_write_short_object_s, fss_extended_write_long_object_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_write_short_partial_s, fss_extended_write_long_partial_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_write_short_prepend_s, fss_extended_write_long_prepend_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_write_short_single_s, fss_extended_write_long_single_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_extended_write_short_trim_s, fss_extended_write_long_trim_s, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_write_short_file_s.string, fss_extended_write_long_file_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_write_short_content_s.string, fss_extended_write_long_content_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_write_short_double_s.string, fss_extended_write_long_double_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_write_short_ignore_s.string, fss_extended_write_long_ignore_s.string, 0, 2, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_write_short_object_s.string, fss_extended_write_long_object_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_write_short_partial_s.string, fss_extended_write_long_partial_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_write_short_prepend_s.string, fss_extended_write_long_prepend_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_write_short_single_s.string, fss_extended_write_long_single_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_extended_write_short_trim_s.string, fss_extended_write_long_trim_s.string, 0, 0, f_console_type_normal_e), \
     }
 
   #define fss_extended_write_total_parameters_d 18
-#endif // _di_fss_extended_write_defines_
-
-#ifndef _di_fss_extended_write_main_t_
-  typedef struct {
-    f_console_parameters_t parameters;
-
-    f_array_lengths_t remaining;
-    bool process_pipe;
-
-    fl_print_t output;
-    fl_print_t error;
-    fl_print_t warning;
-
-    f_signal_t signal;
-
-    f_string_static_t prepend;
-
-    f_color_context_t context;
-  } fss_extended_write_main_t;
-
-  #define fss_extended_write_main_t_initialize \
-    { \
-      f_console_parameters_t_initialize, \
-      f_array_lengths_t_initialize, \
-      F_false, \
-      fl_print_t_initialize, \
-      macro_fl_print_t_initialize_error(), \
-      macro_fl_print_t_initialize_warning(), \
-      f_signal_t_initialize, \
-      f_string_static_t_initialize, \
-      f_color_context_t_initialize, \
-    }
-#endif // _di_fss_extended_write_main_t_
+#endif // _di_fss_extended_write_parameters_
 
 /**
  * Deallocate main.
@@ -175,7 +205,7 @@ extern "C" {
  * @see fss_extended_write_main()
  */
 #ifndef _di_fss_extended_write_main_delete_
-  extern f_status_t fss_extended_write_main_delete(fss_extended_write_main_t * const main);
+  extern f_status_t fss_extended_write_main_delete(fll_program_data_t * const main);
 #endif // _di_fss_extended_write_main_delete_
 
 #ifdef __cplusplus
index d898e2eab072edd04a0ea0d2088deaeb4716c884..71a16912d8843f200cb804e6011e43da537802e8 100644 (file)
@@ -6,15 +6,6 @@
 extern "C" {
 #endif
 
-#ifndef _di_fss_extended_write_program_version_
-  const f_string_static_t fss_extended_write_program_version_s = macro_f_string_static_t_initialize(FSS_EXTENDED_WRITE_program_version_s, 0, FSS_EXTENDED_WRITE_program_version_s_length);
-#endif // _di_fss_extended_write_program_version_
-
-#ifndef _di_fss_extended_write_program_name_
-  const f_string_static_t fss_extended_write_program_name_s = macro_f_string_static_t_initialize(FSS_EXTENDED_WRITE_program_name_s, 0, FSS_EXTENDED_WRITE_program_name_s_length);
-  const f_string_static_t fss_extended_write_program_name_long_s = macro_f_string_static_t_initialize(FSS_EXTENDED_WRITE_program_name_long_s, 0, FSS_EXTENDED_WRITE_program_name_long_s_length);
-#endif // _di_fss_extended_write_program_name_
-
 #ifndef _di_fss_extended_write_print_help_
   f_status_t fss_extended_write_print_help(const f_file_t file, const f_color_context_t context) {
 
@@ -66,7 +57,7 @@ extern "C" {
 #endif // _di_fss_extended_write_print_help_
 
 #ifndef _di_fss_extended_write_main_
-  f_status_t fss_extended_write_main(fss_extended_write_main_t * const main, const f_console_arguments_t *arguments) {
+  f_status_t fss_extended_write_main(fll_program_data_t * const main, const f_console_arguments_t *arguments) {
 
     f_status_t status = F_none;
 
@@ -78,7 +69,7 @@ extern "C" {
       f_console_parameter_id_t ids[3] = { fss_extended_write_parameter_no_color_e, fss_extended_write_parameter_light_e, fss_extended_write_parameter_dark_e };
       const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
 
-      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
+      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->context);
 
       main->output.set = &main->context.set;
       main->error.set = &main->context.set;
index d60aea75886b719e66ff30aaab823e11f8dd29a0..835744e0084528d3e083aed45feb3132a991e75e 100644 (file)
@@ -88,7 +88,7 @@ extern "C" {
  * @see fss_extended_write_main_delete()
  */
 #ifndef _di_fss_extended_write_main_
-  extern f_status_t fss_extended_write_main(fss_extended_write_main_t * const main, const f_console_arguments_t *arguments);
+  extern f_status_t fss_extended_write_main(fll_program_data_t * const main, const f_console_arguments_t *arguments);
 #endif // _di_fss_extended_write_main_
 
 #ifdef __cplusplus
index 12d2ee0b8fdd36f3e345c7a8bf7a0ad87217f310..83662f03ef2871ecd2ddc73b169ce34f097fd45c 100644 (file)
@@ -3,7 +3,7 @@
 int main(const int argc, const f_string_t *argv) {
 
   const f_console_arguments_t arguments = { argc, argv };
-  fss_extended_write_main_t data = fss_extended_write_main_t_initialize;
+  fll_program_data_t data = fll_program_data_t_initialize;
 
   if (f_pipe_input_exists()) {
     data.process_pipe = F_true;
index 5fd86f569d93f93a8320ce6ca9ea6f9ce841549e..8cf08ea62d979abb2b0ffcf370e35c3010eb364c 100644 (file)
@@ -6,7 +6,7 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_extended_write_print_signal_received_
-  void fss_extended_write_print_signal_received(fss_extended_write_main_t * const main, const f_status_t signal) {
+  void fss_extended_write_print_signal_received(fll_program_data_t * const main, const f_status_t signal) {
 
     if (main->warning.verbosity != f_console_verbosity_verbose_e) return;
 
@@ -24,7 +24,7 @@ extern "C" {
 #endif // _di_fss_extended_write_print_signal_received_
 
 #ifndef _di_fss_extended_write_signal_received_
-  f_status_t fss_extended_write_signal_received(fss_extended_write_main_t * const main) {
+  f_status_t fss_extended_write_signal_received(fll_program_data_t * const main) {
 
     if (main->signal.id == -1) {
       return F_false;
index 495e5e4769a9c120fa6aedba74ace3dd751737d3..4b439d90713e19a450fbfbf15a8d57525054477a 100644 (file)
@@ -33,7 +33,7 @@ extern "C" {
  *   The signal received.
  */
 #ifndef _di_fss_extended_write_print_signal_received_
-  extern void fss_extended_write_print_signal_received(fss_extended_write_main_t * const main, const f_status_t signal) F_attribute_visibility_internal_d;
+  extern void fss_extended_write_print_signal_received(fll_program_data_t * const main, const f_status_t signal) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_write_print_signal_received_
 
 /**
@@ -51,7 +51,7 @@ extern "C" {
  * @see f_signal_read()
  */
 #ifndef _di_fss_extended_write_signal_received_
-  extern f_status_t fss_extended_write_signal_received(fss_extended_write_main_t * const main) F_attribute_visibility_internal_d;
+  extern f_status_t fss_extended_write_signal_received(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_write_signal_received_
 
 #ifdef __cplusplus
index af48d1073c61066b0c45e10ba0e833dc0e6589a6..fbce8d724584455e927aede2b852935a3137a98c 100644 (file)
@@ -7,7 +7,7 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_extended_write_error_parameter_at_least_once_print_
-  void fss_extended_write_error_parameter_at_least_once(fss_extended_write_main_t * const main) {
+  void fss_extended_write_error_parameter_at_least_once(fll_program_data_t * const main) {
 
     if (main->error.verbosity == f_console_verbosity_quiet_e) {
       return;
@@ -28,7 +28,7 @@ extern "C" {
 #endif // _di_fss_extended_write_error_parameter_at_least_once_print_
 
 #ifndef _di_fss_extended_write_error_parameter_value_missing_print_
-  void fss_extended_write_error_parameter_value_missing_print(fss_extended_write_main_t * const main, const f_string_t symbol, const f_string_t parameter) {
+  void fss_extended_write_error_parameter_value_missing_print(fll_program_data_t * const main, const f_string_t symbol, const f_string_t parameter) {
 
     if (main->error.verbosity == f_console_verbosity_quiet_e) {
       return;
@@ -45,7 +45,7 @@ extern "C" {
 #endif // _di_fss_extended_write_error_parameter_value_missing_print_
 
 #ifndef _di_fss_extended_write_error_parameter_unsupported_eol_print_
-  void fss_extended_write_error_parameter_unsupported_eol_print(fss_extended_write_main_t * const main) {
+  void fss_extended_write_error_parameter_unsupported_eol_print(fll_program_data_t * const main) {
 
     if (main->error.verbosity == f_console_verbosity_quiet_e) {
       return;
@@ -62,7 +62,7 @@ extern "C" {
 #endif // _di_fss_extended_write_error_parameter_unsupported_eol_print_
 
 #ifndef _di_fss_extended_write_process_
-  f_status_t fss_extended_write_process(fss_extended_write_main_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_statics_t *contents, f_string_dynamic_t *buffer) {
+  f_status_t fss_extended_write_process(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_statics_t *contents, f_string_dynamic_t *buffer) {
 
     f_status_t status = F_none;
     f_state_t state = macro_f_state_t_initialize(fss_extended_write_common_allocation_large_d, fss_extended_write_common_allocation_small_d, 0, 0, 0, 0, 0);
@@ -152,7 +152,7 @@ extern "C" {
 #endif // _di_fss_extended_write_process_
 
 #ifndef _di_fss_extended_write_process_pipe_
-  f_status_t fss_extended_write_process_pipe(fss_extended_write_main_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer) {
+  f_status_t fss_extended_write_process_pipe(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer) {
 
     f_status_t status = F_none;
     f_status_t status_pipe = F_none;
index bae6eb99927465434fa9d4f313291a9602eae63d..b5a5066cc215c47976976337f88ad6af54f220aa 100644 (file)
@@ -23,7 +23,7 @@ extern "C" {
  *   F_failure (with error bit) for any othe failure.
  */
 #ifndef _di_fss_extended_write_error_parameter_at_least_once_print_
-  void fss_extended_write_error_parameter_at_least_once(fss_extended_write_main_t * const main) F_attribute_visibility_internal_d;
+  void fss_extended_write_error_parameter_at_least_once(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_write_error_parameter_at_least_once_print_
 
 /**
@@ -41,7 +41,7 @@ extern "C" {
  *   F_failure (with error bit) for any othe failure.
  */
 #ifndef _di_fss_extended_write_error_parameter_value_missing_print_
-  void fss_extended_write_error_parameter_value_missing_print(fss_extended_write_main_t * const main, const f_string_t symbol, const f_string_t parameter) F_attribute_visibility_internal_d;
+  void fss_extended_write_error_parameter_value_missing_print(fll_program_data_t * const main, const f_string_t symbol, const f_string_t parameter) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_write_error_parameter_value_missing_print_
 
 /**
@@ -55,7 +55,7 @@ extern "C" {
  *   F_failure (with error bit) for any othe failure.
  */
 #ifndef _di_fss_extended_write_error_parameter_unsupported_eol_print_
-  void fss_extended_write_error_parameter_unsupported_eol_print(fss_extended_write_main_t * const main) F_attribute_visibility_internal_d;
+  void fss_extended_write_error_parameter_unsupported_eol_print(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_write_error_parameter_unsupported_eol_print_
 
 /**
@@ -82,7 +82,7 @@ extern "C" {
  *   F_failure (with error bit) for any othe failure.
  */
 #ifndef _di_fss_extended_write_process_
-  extern f_status_t fss_extended_write_process(fss_extended_write_main_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_statics_t *contents, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
+  extern f_status_t fss_extended_write_process(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_statics_t *contents, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_write_process_
 
 /**
@@ -103,7 +103,7 @@ extern "C" {
  *   F_failure (with error bit) for any othe failure.
  */
 #ifndef _di_fss_extended_write_process_pipe_
-  extern f_status_t fss_extended_write_process_pipe(fss_extended_write_main_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
+  extern f_status_t fss_extended_write_process_pipe(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
 #endif // _di_fss_extended_write_process_pipe_
 
 #ifdef __cplusplus
index ae737eaff8cdd5be1672a64219f901c559a3d44c..6beb761acf702d5e4dbc113d9acb862535a76093 100644 (file)
@@ -13,16 +13,24 @@ extern "C" {
   const f_string_static_t fss_identify_program_name_long_s = macro_f_string_static_t_initialize(FSS_IDENTIFY_program_name_long_s, 0, FSS_IDENTIFY_program_name_long_s_length);
 #endif // _di_fss_identify_program_name_
 
-#ifndef _di_fss_identify_main_delete_
-  f_status_t fss_identify_main_delete(fss_identify_main_t * const main) {
-
-    f_console_parameters_delete(&main->parameters);
+#ifndef _di_fss_identify_parameters_
+  const f_string_static_t fss_identify_short_content_s = macro_f_string_static_t_initialize(FSS_IDENTIFY_short_content_s, 0, FSS_IDENTIFY_short_content_s_length);
+  const f_string_static_t fss_identify_short_line_s = macro_f_string_static_t_initialize(FSS_IDENTIFY_short_line_s, 0, FSS_IDENTIFY_short_line_s_length);
+  const f_string_static_t fss_identify_short_name_s = macro_f_string_static_t_initialize(FSS_IDENTIFY_short_name_s, 0, FSS_IDENTIFY_short_name_s_length);
+  const f_string_static_t fss_identify_short_object_s = macro_f_string_static_t_initialize(FSS_IDENTIFY_short_object_s, 0, FSS_IDENTIFY_short_object_s_length);
+  const f_string_static_t fss_identify_short_total_s = macro_f_string_static_t_initialize(FSS_IDENTIFY_short_total_s, 0, FSS_IDENTIFY_short_total_s_length);
+
+  const f_string_static_t fss_identify_long_content_s = macro_f_string_static_t_initialize(FSS_IDENTIFY_long_content_s, 0, FSS_IDENTIFY_long_content_s_length);
+  const f_string_static_t fss_identify_long_line_s = macro_f_string_static_t_initialize(FSS_IDENTIFY_long_line_s, 0, FSS_IDENTIFY_long_line_s_length);
+  const f_string_static_t fss_identify_long_name_s = macro_f_string_static_t_initialize(FSS_IDENTIFY_long_name_s, 0, FSS_IDENTIFY_long_name_s_length);
+  const f_string_static_t fss_identify_long_object_s = macro_f_string_static_t_initialize(FSS_IDENTIFY_long_object_s, 0, FSS_IDENTIFY_long_object_s_length);
+  const f_string_static_t fss_identify_long_total_s = macro_f_string_static_t_initialize(FSS_IDENTIFY_long_total_s, 0, FSS_IDENTIFY_long_total_s_length);
+#endif // _di_fss_identify_parameters_
 
-    f_type_array_lengths_resize(0, &main->remaining);
-
-    macro_f_color_context_t_delete_simple(main->context);
+#ifndef _di_fss_identify_main_delete_
+  f_status_t fss_identify_main_delete(fll_program_data_t * const main) {
 
-    return F_none;
+    return fll_program_data_delete(main);
   }
 #endif // _di_fss_identify_main_delete_
 
index 6e2786e3778bed1877babf7cb137e6efc526c7a1..5d51e21b766600e58241ced6f6dd226b91fd5780 100644 (file)
@@ -16,6 +16,9 @@
 extern "C" {
 #endif
 
+/**
+ * The program version.
+ */
 #ifndef _di_fss_identify_program_version_
   #define FSS_IDENTIFY_program_version_major_s F_string_ascii_0_s
   #define FSS_IDENTIFY_program_version_minor_s F_string_ascii_5_s
@@ -42,6 +45,9 @@ extern "C" {
   const f_string_static_t fss_identify_program_version_s;
 #endif // _di_fss_identify_program_version_
 
+/**
+ * The program name.
+ */
 #ifndef _di_fss_identify_program_name_
   #define FSS_IDENTIFY_program_name_s      "fss_identify"
   #define FSS_IDENTIFY_program_name_long_s "FSS Identify"
@@ -53,20 +59,52 @@ extern "C" {
   const f_string_static_t fss_identify_program_name_long_s;
 #endif // _di_fss_identify_program_name_
 
+/**
+ * The program defines.
+ */
 #ifndef _di_fss_identify_defines_
   #define fss_identify_signal_check_d 10000
+#endif // _di_fss_identify_defines_
 
-  #define fss_identify_short_content_s "c"
-  #define fss_identify_short_line_s    "l"
-  #define fss_identify_short_name_s    "n"
-  #define fss_identify_short_object_s  "o"
-  #define fss_identify_short_total_s   "t"
-
-  #define fss_identify_long_content_s "content"
-  #define fss_identify_long_line_s    "line"
-  #define fss_identify_long_name_s    "name"
-  #define fss_identify_long_object_s  "object"
-  #define fss_identify_long_total_s   "total"
+/**
+ * The main program parameters.
+ */
+#ifndef _di_fss_identify_parameters_
+  #define FSS_IDENTIFY_short_content_s "c"
+  #define FSS_IDENTIFY_short_line_s    "l"
+  #define FSS_IDENTIFY_short_name_s    "n"
+  #define FSS_IDENTIFY_short_object_s  "o"
+  #define FSS_IDENTIFY_short_total_s   "t"
+
+  #define FSS_IDENTIFY_long_content_s "content"
+  #define FSS_IDENTIFY_long_line_s    "line"
+  #define FSS_IDENTIFY_long_name_s    "name"
+  #define FSS_IDENTIFY_long_object_s  "object"
+  #define FSS_IDENTIFY_long_total_s   "total"
+
+  #define FSS_IDENTIFY_short_content_s_length 1
+  #define FSS_IDENTIFY_short_line_s_length    1
+  #define FSS_IDENTIFY_short_name_s_length    1
+  #define FSS_IDENTIFY_short_object_s_length  1
+  #define FSS_IDENTIFY_short_total_s_length   1
+
+  #define FSS_IDENTIFY_long_content_s_length 7
+  #define FSS_IDENTIFY_long_line_s_length    4
+  #define FSS_IDENTIFY_long_name_s_length    4
+  #define FSS_IDENTIFY_long_object_s_length  6
+  #define FSS_IDENTIFY_long_total_s_length   5
+
+  extern const f_string_static_t fss_identify_short_content_s;
+  extern const f_string_static_t fss_identify_short_line_s;
+  extern const f_string_static_t fss_identify_short_name_s;
+  extern const f_string_static_t fss_identify_short_object_s;
+  extern const f_string_static_t fss_identify_short_total_s;
+
+  extern const f_string_static_t fss_identify_long_content_s;
+  extern const f_string_static_t fss_identify_long_line_s;
+  extern const f_string_static_t fss_identify_long_name_s;
+  extern const f_string_static_t fss_identify_long_object_s;
+  extern const f_string_static_t fss_identify_long_total_s;
 
   enum {
     fss_identify_parameter_help_e,
@@ -97,44 +135,15 @@ extern "C" {
       macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_version_s.string, f_console_standard_long_version_s.string, 0, 0, f_console_type_inverse_e), \
-      macro_f_console_parameter_t_initialize(fss_identify_short_content_s, fss_identify_long_content_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_identify_short_line_s, fss_identify_long_line_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_identify_short_name_s, fss_identify_long_name_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_identify_short_object_s, fss_identify_long_object_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_identify_short_total_s, fss_identify_long_total_s, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_identify_short_content_s.string, fss_identify_long_content_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_identify_short_line_s.string, fss_identify_long_line_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_identify_short_name_s.string, fss_identify_long_name_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_identify_short_object_s.string, fss_identify_long_object_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_identify_short_total_s.string, fss_identify_long_total_s.string, 0, 0, f_console_type_normal_e), \
     }
 
   #define fss_identify_total_parameters_d 14
-#endif // _di_fss_identify_defines_
-
-#ifndef _di_fss_identify_data_t_
-  typedef struct {
-    f_console_parameters_t parameters;
-
-    f_array_lengths_t remaining;
-    bool process_pipe;
-
-    fl_print_t output;
-    fl_print_t error;
-    fl_print_t warning;
-
-    f_signal_t signal;
-
-    f_color_context_t context;
-  } fss_identify_main_t;
-
-  #define fss_identify_data_initialize \
-    { \
-      f_console_parameters_t_initialize, \
-      f_array_lengths_t_initialize, \
-      F_false, \
-      fl_print_t_initialize, \
-      macro_fl_print_t_initialize_error(), \
-      macro_fl_print_t_initialize_warning(), \
-      f_signal_t_initialize, \
-      f_color_context_t_initialize, \
-    }
-#endif // _di_fss_identify_data_t_
+#endif // _di_fss_identify_parameters_
 
 /**
  * Deallocate main.
@@ -152,7 +161,7 @@ extern "C" {
  * @see fss_identify_main()
  */
 #ifndef _di_fss_identify_main_delete_
-  extern f_status_t fss_identify_main_delete(fss_identify_main_t * const main);
+  extern f_status_t fss_identify_main_delete(fll_program_data_t * const main);
 #endif // _di_fss_identify_main_delete_
 
 #ifdef __cplusplus
index 0ea7f0b01bc03616701c03de47ed5d494d72067a..4a118fea6676417f6dc7d6c0c48baac5e148216d 100644 (file)
@@ -6,15 +6,6 @@
 extern "C" {
 #endif
 
-#ifndef _di_fss_identify_program_version_
-  const f_string_static_t fss_identify_program_version_s = macro_f_string_static_t_initialize(FSS_IDENTIFY_program_version_s, 0, FSS_IDENTIFY_program_version_s_length);
-#endif // _di_fss_identify_program_version_
-
-#ifndef _di_fss_identify_program_name_
-  const f_string_static_t fss_identify_program_name_s = macro_f_string_static_t_initialize(FSS_IDENTIFY_program_name_s, 0, FSS_IDENTIFY_program_name_s_length);
-  const f_string_static_t fss_identify_program_name_long_s = macro_f_string_static_t_initialize(FSS_IDENTIFY_program_name_long_s, 0, FSS_IDENTIFY_program_name_long_s_length);
-#endif // _di_fss_identify_program_name_
-
 #ifndef _di_fss_identify_print_help_
   f_status_t fss_identify_print_help(const f_file_t file, const f_color_context_t context) {
 
@@ -43,7 +34,7 @@ extern "C" {
     fll_program_print_help_option(file, context, fss_identify_short_name_s, fss_identify_long_name_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object with this name.");
     fll_program_print_help_option(file, context, fss_identify_short_total_s, fss_identify_long_total_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print the total Identifiers found.");
 
-    fll_program_print_help_usage(file, context, fss_identify_program_name_s, "filename(s)");
+    fll_program_print_help_usage(file, context, fss_identify_program_name_s, fll_program_parameter_filenames_s);
 
     fl_print_format("  The %[%r%s%] parameter refers to the file lines and not the lines in a given file.%r%r", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_identify_long_line_s, context.set.notable, f_string_eol_s, f_string_eol_s);
 
@@ -67,7 +58,7 @@ extern "C" {
 #endif // _di_fss_identify_print_help_
 
 #ifndef _di_fss_identify_main_
-  f_status_t fss_identify_main(fss_identify_main_t * const main, const f_console_arguments_t *arguments) {
+  f_status_t fss_identify_main(fll_program_data_t * const main, const f_console_arguments_t *arguments) {
 
     f_status_t status = F_none;
 
@@ -79,7 +70,7 @@ extern "C" {
       f_console_parameter_id_t ids[3] = { fss_identify_parameter_no_color_e, fss_identify_parameter_light_e, fss_identify_parameter_dark_e };
       const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
 
-      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
+      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->context);
 
       main->output.set = &main->context.set;
       main->error.set = &main->context.set;
@@ -312,7 +303,7 @@ extern "C" {
     if (F_status_is_error_not(status)) {
       uint16_t signal_check = 0;
 
-      for (f_array_length_t i = 0; i < main->remaining.used; ++i) {
+      for (f_array_length_t i = 0; i < main->parameters.remaining.used; ++i) {
 
         if (!((++signal_check) % fss_identify_signal_check_d)) {
           if (fss_identify_signal_received(main)) {
@@ -331,16 +322,16 @@ extern "C" {
 
         file.size_read = 512;
 
-        status = f_file_stream_open(arguments->argv[main->remaining.array[i]], 0, &file);
+        status = f_file_stream_open(arguments->argv[main->parameters.remaining.array[i]], 0, &file);
 
         if (F_status_is_error(status)) {
-          fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e);
+          fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e);
         }
         else {
-          status = fss_identify_load_line(main, file, arguments->argv[main->remaining.array[i]], &buffer, &range);
+          status = fss_identify_load_line(main, file, arguments->argv[main->parameters.remaining.array[i]], &buffer, &range);
 
           if (F_status_is_error_not(status)) {
-            status = fss_identify_process(main, arguments->argv[main->remaining.array[i]], buffer, &range, &data);
+            status = fss_identify_process(main, arguments->argv[main->parameters.remaining.array[i]], buffer, &range, &data);
           }
         }
 
index b1b8d45393b446fe7f745aaed0aaf1496b7197ec..4ff3d1e0ddc0d9fc8120e1af7dbf1392e6176fcc 100644 (file)
@@ -94,7 +94,7 @@ extern "C" {
  * @see fss_identify_main_delete()
  */
 #ifndef _di_fss_identify_main_
-  extern f_status_t fss_identify_main(fss_identify_main_t * const main, const f_console_arguments_t *arguments);
+  extern f_status_t fss_identify_main(fll_program_data_t * const main, const f_console_arguments_t *arguments);
 #endif // _di_fss_identify_main_
 
 #ifdef __cplusplus
index fc319eebdb4ef682e2d861ab44a6eeffd26d0875..5a783e725e13dc13734dc950201eb3a73c6e13dd 100644 (file)
@@ -3,7 +3,7 @@
 int main(const int argc, const f_string_t *argv) {
 
   const f_console_arguments_t arguments = { argc, argv };
-  fss_identify_main_t data = fss_identify_data_initialize;
+  fll_program_data_t data = fll_program_data_t_initialize;
 
   if (f_pipe_input_exists()) {
     data.process_pipe = F_true;
index c7ee2c3e946512b49764395281eaa977c13bb3e5..fc42402226b2b56cfb6e0fa5741c12a99e93559a 100644 (file)
@@ -15,7 +15,7 @@ extern "C" {
 #endif // _di_fss_identify_data_delete_
 
 #ifndef _di_fss_identify_print_signal_received_
-  void fss_identify_print_signal_received(fss_identify_main_t * const main, const f_status_t signal) {
+  void fss_identify_print_signal_received(fll_program_data_t * const main, const f_status_t signal) {
 
     if (main->warning.verbosity != f_console_verbosity_verbose_e) return;
 
@@ -33,7 +33,7 @@ extern "C" {
 #endif // _di_fss_identify_print_signal_received_
 
 #ifndef _di_fss_identify_signal_received_
-  f_status_t fss_identify_signal_received(fss_identify_main_t * const main) {
+  f_status_t fss_identify_signal_received(fll_program_data_t * const main) {
 
     if (main->signal.id == -1) {
       return F_false;
index 4d3c1c1ca5fdcf0f6dcd83658a0d77e1149900a3..d10266522b4772f00a7f123e2f95dda8af47a68e 100644 (file)
@@ -57,7 +57,7 @@ extern "C" {
  *   The signal received.
  */
 #ifndef _di_fss_identify_print_signal_received_
-  extern void fss_identify_print_signal_received(fss_identify_main_t * const main, const f_status_t signal) F_attribute_visibility_internal_d;
+  extern void fss_identify_print_signal_received(fll_program_data_t * const main, const f_status_t signal) F_attribute_visibility_internal_d;
 #endif // _di_fss_identify_print_signal_received_
 
 /**
@@ -75,7 +75,7 @@ extern "C" {
  * @see f_signal_read()
  */
 #ifndef _di_fss_identify_signal_received_
-  extern f_status_t fss_identify_signal_received(fss_identify_main_t * const main) F_attribute_visibility_internal_d;
+  extern f_status_t fss_identify_signal_received(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_identify_signal_received_
 
 #ifdef __cplusplus
index b9852aee81182b8729453ded399d8ac1c278a560..29091529f0902b686f1cc058a3df920497b0e0e3 100644 (file)
@@ -8,7 +8,7 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_identify_load_line_
-  f_status_t fss_identify_load_line(fss_identify_main_t * const main, const f_file_t file, const f_string_static_t name, f_string_static_t *buffer, f_string_range_t *range) {
+  f_status_t fss_identify_load_line(fll_program_data_t * const main, const f_file_t file, const f_string_static_t name, f_string_static_t *buffer, f_string_range_t *range) {
 
     f_status_t status = F_none;
     uint16_t signal_check = 0;
@@ -64,7 +64,7 @@ extern "C" {
 #endif // _di_fss_identify_load_line_
 
 #ifndef _di_fss_identify_process_
-  f_status_t fss_identify_process(fss_identify_main_t * const main, const f_string_t name, const f_string_static_t buffer, f_string_range_t *range, fss_identify_data_t *data) {
+  f_status_t fss_identify_process(fll_program_data_t * const main, const f_string_t name, const f_string_static_t buffer, f_string_range_t *range, fss_identify_data_t *data) {
 
     f_status_t status = F_none;
     f_fll_ids_t ids = f_fll_ids_t_initialize;
index 11db1e510b6ea23cf3a8f9e96c2398cb2d3aabe2..05c04bf10ea4cdc12518142a0d981ac669341a9b 100644 (file)
@@ -37,7 +37,7 @@ extern "C" {
  * @see f_string_dynamic_resize()
  */
 #ifndef _di_fss_identify_load_line_
-  extern f_status_t fss_identify_load_line(fss_identify_main_t * const main, const f_file_t file, const f_string_t name, f_string_static_t *buffer, f_string_range_t *range) F_attribute_visibility_internal_d;
+  extern f_status_t fss_identify_load_line(fll_program_data_t * const main, const f_file_t file, const f_string_t name, f_string_static_t *buffer, f_string_range_t *range) F_attribute_visibility_internal_d;
 #endif // _di_fss_identify_load_line_
 
 /**
@@ -63,7 +63,7 @@ extern "C" {
  * @see fll_fss_identify()
  */
 #ifndef _di_fss_identify_process_
-  extern f_status_t fss_identify_process(fss_identify_main_t * const main, const f_string_t name, const f_string_static_t buffer, f_string_range_t *range, fss_identify_data_t *data) F_attribute_visibility_internal_d;
+  extern f_status_t fss_identify_process(fll_program_data_t * const main, const f_string_t name, const f_string_static_t buffer, f_string_range_t *range, fss_identify_data_t *data) F_attribute_visibility_internal_d;
 #endif // _di_fss_identify_process_
 
 #ifdef __cplusplus
index b8bc971eba1b9bfcc7ac97561711033934a63f19..4be91961b8810d6429c1c740bac3ef04bed03880 100644 (file)
@@ -7,7 +7,7 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_identify_print_
-  void fss_identify_print(fss_identify_main_t * const main, f_fll_id_t id) {
+  void fss_identify_print(fll_program_data_t * const main, f_fll_id_t id) {
 
     flockfile(main->output.to.stream);
 
index cc92489c4aaad3427390a4a5c68e5329aedcca2c..a03314d3a567e97061fe959e6bdc03606f0b6356 100644 (file)
@@ -21,7 +21,7 @@ extern "C" {
  *   The Identifier to print.
  */
 #ifndef _di_fss_identify_print_
-  extern void fss_identify_print(fss_identify_main_t * const main, f_fll_id_t id) F_attribute_visibility_internal_d;
+  extern void fss_identify_print(fll_program_data_t * const main, f_fll_id_t id) F_attribute_visibility_internal_d;
 #endif // _di_fss_identify_print_
 
 #ifdef __cplusplus
index fab4106b91ca01db7989b7995f46f8dfe0d3fc99..5ed08659ece2ead51dd58cfe75d5a12947ba5ea0 100644 (file)
@@ -4,24 +4,48 @@
 extern "C" {
 #endif
 
-#ifndef _di_fss_payload_read_program_version_
-  const f_string_static_t fss_payload_read_program_version_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_program_version_s, 0, FSS_PAYLOAD_READ_program_version_s_length);
-#endif // _di_fss_payload_read_program_version_
-
-#ifndef _di_fss_payload_read_program_name_
-  const f_string_static_t fss_payload_read_program_name_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_program_name_s, 0, FSS_PAYLOAD_READ_program_name_s_length);
-  const f_string_static_t fss_payload_read_program_name_long_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_program_name_long_s, 0, FSS_PAYLOAD_READ_program_name_long_s_length);
-#endif // _di_fss_payload_read_program_name_
+#ifndef _di_fss_payload_read_defines_
+  const f_string_static_t fss_payload_read_pipe_content_end_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_pipe_content_end_s, 0, FSS_PAYLOAD_READ_pipe_content_end_s_length);
+  const f_string_static_t fss_payload_read_pipe_content_ignore_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_pipe_content_ignore_s, 0, FSS_PAYLOAD_READ_pipe_content_ignore_s_length);
+  const f_string_static_t fss_payload_read_pipe_content_start_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_pipe_content_start_s, 0, FSS_PAYLOAD_READ_pipe_content_start_s_length);
+#endif // _di_fss_payload_read_defines_
+
+#ifndef _di_fss_payload_read_parameters_
+  const f_string_static_t fss_payload_read_short_at_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_short_at_s, 0, FSS_PAYLOAD_READ_short_at_s_length);
+  const f_string_static_t fss_payload_read_short_content_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_short_content_s, 0, FSS_PAYLOAD_READ_short_content_s_length);
+  const f_string_static_t fss_payload_read_short_columns_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_short_columns_s, 0, FSS_PAYLOAD_READ_short_columns_s_length);
+  const f_string_static_t fss_payload_read_short_delimit_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_short_delimit_s, 0, FSS_PAYLOAD_READ_short_delimit_s_length);
+  const f_string_static_t fss_payload_read_short_depth_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_short_depth_s, 0, FSS_PAYLOAD_READ_short_depth_s_length);
+  const f_string_static_t fss_payload_read_short_empty_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_short_empty_s, 0, FSS_PAYLOAD_READ_short_empty_s_length);
+  const f_string_static_t fss_payload_read_short_line_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_short_line_s, 0, FSS_PAYLOAD_READ_short_line_s_length);
+  const f_string_static_t fss_payload_read_short_name_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_short_name_s, 0, FSS_PAYLOAD_READ_short_name_s_length);
+  const f_string_static_t fss_payload_read_short_object_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_short_object_s, 0, FSS_PAYLOAD_READ_short_object_s_length);
+  const f_string_static_t fss_payload_read_short_pipe_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_short_pipe_s, 0, FSS_PAYLOAD_READ_short_pipe_s_length);
+  const f_string_static_t fss_payload_read_short_raw_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_short_raw_s, 0, FSS_PAYLOAD_READ_short_raw_s_length);
+  const f_string_static_t fss_payload_read_short_select_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_short_select_s, 0, FSS_PAYLOAD_READ_short_select_s_length);
+  const f_string_static_t fss_payload_read_short_total_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_short_total_s, 0, FSS_PAYLOAD_READ_short_total_s_length);
+  const f_string_static_t fss_payload_read_short_trim_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_short_trim_s, 0, FSS_PAYLOAD_READ_short_trim_s_length);
+
+  const f_string_static_t fss_payload_read_long_at_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_long_at_s, 0, FSS_PAYLOAD_READ_long_at_s_length);
+  const f_string_static_t fss_payload_read_long_content_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_long_content_s, 0, FSS_PAYLOAD_READ_long_content_s_length);
+  const f_string_static_t fss_payload_read_long_columns_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_long_columns_s, 0, FSS_PAYLOAD_READ_long_columns_s_length);
+  const f_string_static_t fss_payload_read_long_delimit_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_long_delimit_s, 0, FSS_PAYLOAD_READ_long_delimit_s_length);
+  const f_string_static_t fss_payload_read_long_depth_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_long_depth_s, 0, FSS_PAYLOAD_READ_long_depth_s_length);
+  const f_string_static_t fss_payload_read_long_empty_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_long_empty_s, 0, FSS_PAYLOAD_READ_long_empty_s_length);
+  const f_string_static_t fss_payload_read_long_line_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_long_line_s, 0, FSS_PAYLOAD_READ_long_line_s_length);
+  const f_string_static_t fss_payload_read_long_name_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_long_name_s, 0, FSS_PAYLOAD_READ_long_name_s_length);
+  const f_string_static_t fss_payload_read_long_object_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_long_object_s, 0, FSS_PAYLOAD_READ_long_object_s_length);
+  const f_string_static_t fss_payload_read_long_pipe_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_long_pipe_s, 0, FSS_PAYLOAD_READ_long_pipe_s_length);
+  const f_string_static_t fss_payload_read_long_raw_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_long_raw_s, 0, FSS_PAYLOAD_READ_long_raw_s_length);
+  const f_string_static_t fss_payload_read_long_select_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_long_select_s, 0, FSS_PAYLOAD_READ_long_select_s_length);
+  const f_string_static_t fss_payload_read_long_total_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_long_total_s, 0, FSS_PAYLOAD_READ_long_total_s_length);
+  const f_string_static_t fss_payload_read_long_trim_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_long_trim_s, 0, FSS_PAYLOAD_READ_long_trim_s_length);
+#endif // _di_fss_payload_read_parameters_
 
 #ifndef _di_fss_payload_read_main_delete_
-  f_status_t fss_payload_read_main_delete(fss_payload_read_main_t * const main) {
-
-    f_console_parameters_delete(&main->parameters);
-
-    f_type_array_lengths_resize(0, &main->remaining);
-    macro_f_color_context_t_delete_simple(main->context);
+  f_status_t fss_payload_read_main_delete(fll_program_data_t * const main) {
 
-    return F_none;
+    return fll_program_data_delete(main);
   }
 #endif // _di_fss_payload_read_main_delete_
 
index 375e5f9c3d69668674294fb4c0bfc3783d3b35f4..bbab7eed581ef151303be1a7a5cd488be5762a93 100644 (file)
@@ -16,6 +16,9 @@
 extern "C" {
 #endif
 
+/**
+ * The program version.
+ */
 #ifndef _di_fss_payload_read_program_version_
   #define FSS_PAYLOAD_READ_program_version_major_s F_string_ascii_0_s
   #define FSS_PAYLOAD_READ_program_version_minor_s F_string_ascii_5_s
@@ -42,6 +45,9 @@ extern "C" {
   extern const f_string_static_t fss_payload_read_program_version_s;
 #endif // _di_fss_payload_read_program_version_
 
+/**
+ * The program name.
+ */
 #ifndef _di_fss_payload_read_program_name_
   #define FSS_PAYLOAD_READ_program_name_s      "fss_payload_read"
   #define FSS_PAYLOAD_READ_program_name_long_s "FSS Payload Read"
@@ -53,42 +59,118 @@ extern "C" {
   extern const f_string_static_t fss_payload_read_program_name_long_s;
 #endif // _di_fss_payload_read_program_name_
 
+/**
+ * The program defines.
+ */
 #ifndef _di_fss_payload_read_defines_
   #define fss_payload_read_signal_check_d 10000
 
-  #define fss_payload_read_pipe_content_end_s    '\f'
-  #define fss_payload_read_pipe_content_ignore_s '\v'
-  #define fss_payload_read_pipe_content_start_s  '\b'
-
-  #define fss_payload_read_short_at_s      "a"
-  #define fss_payload_read_short_content_s "c"
-  #define fss_payload_read_short_columns_s "C"
-  #define fss_payload_read_short_delimit_s "D"
-  #define fss_payload_read_short_depth_s   "d"
-  #define fss_payload_read_short_empty_s   "e"
-  #define fss_payload_read_short_line_s    "l"
-  #define fss_payload_read_short_name_s    "n"
-  #define fss_payload_read_short_object_s  "o"
-  #define fss_payload_read_short_pipe_s    "p"
-  #define fss_payload_read_short_raw_s     "R"
-  #define fss_payload_read_short_select_s  "s"
-  #define fss_payload_read_short_total_s   "t"
-  #define fss_payload_read_short_trim_s    "T"
-
-  #define fss_payload_read_long_at_s      "at"
-  #define fss_payload_read_long_content_s "content"
-  #define fss_payload_read_long_columns_s "columns"
-  #define fss_payload_read_long_delimit_s "delimit"
-  #define fss_payload_read_long_depth_s   "depth"
-  #define fss_payload_read_long_empty_s   "empty"
-  #define fss_payload_read_long_line_s    "line"
-  #define fss_payload_read_long_name_s    "name"
-  #define fss_payload_read_long_object_s  "object"
-  #define fss_payload_read_long_pipe_s    "pipe"
-  #define fss_payload_read_long_raw_s     "raw"
-  #define fss_payload_read_long_select_s  "select"
-  #define fss_payload_read_long_total_s   "total"
-  #define fss_payload_read_long_trim_s    "trim"
+  #define FSS_PAYLOAD_READ_pipe_content_end_s    '\f'
+  #define FSS_PAYLOAD_READ_pipe_content_ignore_s '\v'
+  #define FSS_PAYLOAD_READ_pipe_content_start_s  '\b'
+
+  #define FSS_PAYLOAD_READ_pipe_content_end_s_length    1
+  #define FSS_PAYLOAD_READ_pipe_content_ignore_s_length 1
+  #define FSS_PAYLOAD_READ_pipe_content_start_s_length  1
+
+  extern const fss_payload_read_pipe_content_end_s;
+  extern const fss_payload_read_pipe_content_ignore_s;
+  extern const fss_payload_read_pipe_content_start_s;
+#endif // _di_fss_payload_read_defines_
+
+/**
+ * The main program parameters.
+ */
+#ifndef _di_fss_payload_read_parameters_
+  #define FSS_PAYLOAD_READ_short_at_s      "a"
+  #define FSS_PAYLOAD_READ_short_content_s "c"
+  #define FSS_PAYLOAD_READ_short_columns_s "C"
+  #define FSS_PAYLOAD_READ_short_delimit_s "D"
+  #define FSS_PAYLOAD_READ_short_depth_s   "d"
+  #define FSS_PAYLOAD_READ_short_empty_s   "e"
+  #define FSS_PAYLOAD_READ_short_line_s    "l"
+  #define FSS_PAYLOAD_READ_short_name_s    "n"
+  #define FSS_PAYLOAD_READ_short_object_s  "o"
+  #define FSS_PAYLOAD_READ_short_pipe_s    "p"
+  #define FSS_PAYLOAD_READ_short_raw_s     "R"
+  #define FSS_PAYLOAD_READ_short_select_s  "s"
+  #define FSS_PAYLOAD_READ_short_total_s   "t"
+  #define FSS_PAYLOAD_READ_short_trim_s    "T"
+
+  #define FSS_PAYLOAD_READ_long_at_s      "at"
+  #define FSS_PAYLOAD_READ_long_content_s "content"
+  #define FSS_PAYLOAD_READ_long_columns_s "columns"
+  #define FSS_PAYLOAD_READ_long_delimit_s "delimit"
+  #define FSS_PAYLOAD_READ_long_depth_s   "depth"
+  #define FSS_PAYLOAD_READ_long_empty_s   "empty"
+  #define FSS_PAYLOAD_READ_long_line_s    "line"
+  #define FSS_PAYLOAD_READ_long_name_s    "name"
+  #define FSS_PAYLOAD_READ_long_object_s  "object"
+  #define FSS_PAYLOAD_READ_long_pipe_s    "pipe"
+  #define FSS_PAYLOAD_READ_long_raw_s     "raw"
+  #define FSS_PAYLOAD_READ_long_select_s  "select"
+  #define FSS_PAYLOAD_READ_long_total_s   "total"
+  #define FSS_PAYLOAD_READ_long_trim_s    "trim"
+
+  #define FSS_PAYLOAD_READ_short_at_s_length      1
+  #define FSS_PAYLOAD_READ_short_content_s_length 1
+  #define FSS_PAYLOAD_READ_short_columns_s_length 1
+  #define FSS_PAYLOAD_READ_short_delimit_s_length 1
+  #define FSS_PAYLOAD_READ_short_depth_s_length   1
+  #define FSS_PAYLOAD_READ_short_empty_s_length   1
+  #define FSS_PAYLOAD_READ_short_line_s_length    1
+  #define FSS_PAYLOAD_READ_short_name_s_length    1
+  #define FSS_PAYLOAD_READ_short_object_s_length  1
+  #define FSS_PAYLOAD_READ_short_pipe_s_length    1
+  #define FSS_PAYLOAD_READ_short_raw_s_length     1
+  #define FSS_PAYLOAD_READ_short_select_s_length  1
+  #define FSS_PAYLOAD_READ_short_total_s_length   1
+  #define FSS_PAYLOAD_READ_short_trim_s_length    1
+
+  #define FSS_PAYLOAD_READ_long_at_s_length      2
+  #define FSS_PAYLOAD_READ_long_content_s_length 7
+  #define FSS_PAYLOAD_READ_long_columns_s_length 7
+  #define FSS_PAYLOAD_READ_long_delimit_s_length 7
+  #define FSS_PAYLOAD_READ_long_depth_s_length   5
+  #define FSS_PAYLOAD_READ_long_empty_s_length   5
+  #define FSS_PAYLOAD_READ_long_line_s_length    4
+  #define FSS_PAYLOAD_READ_long_name_s_length    4
+  #define FSS_PAYLOAD_READ_long_object_s_length  6
+  #define FSS_PAYLOAD_READ_long_pipe_s_length    4
+  #define FSS_PAYLOAD_READ_long_raw_s_length     3
+  #define FSS_PAYLOAD_READ_long_select_s_length  6
+  #define FSS_PAYLOAD_READ_long_total_s_length   5
+  #define FSS_PAYLOAD_READ_long_trim_s_length    4
+
+  extern const f_string_static_t fss_payload_read_short_at_s;
+  extern const f_string_static_t fss_payload_read_short_content_s;
+  extern const f_string_static_t fss_payload_read_short_columns_s;
+  extern const f_string_static_t fss_payload_read_short_delimit_s;
+  extern const f_string_static_t fss_payload_read_short_depth_s;
+  extern const f_string_static_t fss_payload_read_short_empty_s;
+  extern const f_string_static_t fss_payload_read_short_line_s;
+  extern const f_string_static_t fss_payload_read_short_name_s;
+  extern const f_string_static_t fss_payload_read_short_object_s;
+  extern const f_string_static_t fss_payload_read_short_pipe_s;
+  extern const f_string_static_t fss_payload_read_short_raw_s;
+  extern const f_string_static_t fss_payload_read_short_select_s;
+  extern const f_string_static_t fss_payload_read_short_total_s;
+  extern const f_string_static_t fss_payload_read_short_trim_s;
+
+  extern const f_string_static_t fss_payload_read_long_at_s;
+  extern const f_string_static_t fss_payload_read_long_content_s;
+  extern const f_string_static_t fss_payload_read_long_columns_s;
+  extern const f_string_static_t fss_payload_read_long_delimit_s;
+  extern const f_string_static_t fss_payload_read_long_depth_s;
+  extern const f_string_static_t fss_payload_read_long_empty_s;
+  extern const f_string_static_t fss_payload_read_long_line_s;
+  extern const f_string_static_t fss_payload_read_long_name_s;
+  extern const f_string_static_t fss_payload_read_long_object_s;
+  extern const f_string_static_t fss_payload_read_long_pipe_s;
+  extern const f_string_static_t fss_payload_read_long_raw_s;
+  extern const f_string_static_t fss_payload_read_long_select_s;
+  extern const f_string_static_t fss_payload_read_long_total_s;
+  extern const f_string_static_t fss_payload_read_long_trim_s;
 
   enum {
     fss_payload_read_parameter_help_e,
@@ -128,24 +210,24 @@ extern "C" {
       macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_version_s.string, f_console_standard_long_version_s.string, 0, 0, f_console_type_inverse_e), \
-      macro_f_console_parameter_t_initialize(fss_payload_read_short_at_s, fss_payload_read_long_at_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_payload_read_short_content_s, fss_payload_read_long_content_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_payload_read_short_columns_s, fss_payload_read_long_columns_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_payload_read_short_delimit_s, fss_payload_read_long_delimit_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_payload_read_short_depth_s, fss_payload_read_long_depth_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_payload_read_short_empty_s, fss_payload_read_long_empty_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_payload_read_short_line_s, fss_payload_read_long_line_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_payload_read_short_name_s, fss_payload_read_long_name_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_payload_read_short_object_s, fss_payload_read_long_object_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_payload_read_short_pipe_s, fss_payload_read_long_pipe_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_payload_read_short_raw_s, fss_payload_read_long_raw_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_payload_read_short_select_s, fss_payload_read_long_select_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_payload_read_short_total_s, fss_payload_read_long_total_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_payload_read_short_trim_s, fss_payload_read_long_trim_s, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_payload_read_short_at_s.string, fss_payload_read_long_at_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_payload_read_short_content_s.string, fss_payload_read_long_content_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_payload_read_short_columns_s.string, fss_payload_read_long_columns_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_payload_read_short_delimit_s.string, fss_payload_read_long_delimit_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_payload_read_short_depth_s.string, fss_payload_read_long_depth_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_payload_read_short_empty_s.string, fss_payload_read_long_empty_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_payload_read_short_line_s.string, fss_payload_read_long_line_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_payload_read_short_name_s.string, fss_payload_read_long_name_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_payload_read_short_object_s.string, fss_payload_read_long_object_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_payload_read_short_pipe_s.string, fss_payload_read_long_pipe_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_payload_read_short_raw_s.string, fss_payload_read_long_raw_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_payload_read_short_select_s.string, fss_payload_read_long_select_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_payload_read_short_total_s.string, fss_payload_read_long_total_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_payload_read_short_trim_s.string, fss_payload_read_long_trim_s.string, 0, 0, f_console_type_normal_e), \
     }
 
   #define fss_payload_total_parameters_d 23
-#endif // _di_fss_payload_read_defines_
+#endif // _di_fss_payload_read_parameters_
 
 /**
  * FSS Delimit Parameter data.
@@ -186,35 +268,6 @@ extern "C" {
   };
 #endif // _di_fss_payload_read_delimit_modes_
 
-#ifndef _di_fss_payload_read_main_t_
-  typedef struct {
-    f_console_parameters_t parameters;
-
-    f_array_lengths_t remaining;
-    bool process_pipe;
-
-    fl_print_t output;
-    fl_print_t error;
-    fl_print_t warning;
-
-    f_signal_t signal;
-
-    f_color_context_t context;
-  } fss_payload_read_main_t;
-
-  #define fss_payload_read_main_t_initialize \
-    { \
-      f_console_parameters_t_initialize, \
-      f_array_lengths_t_initialize, \
-      F_false, \
-      fl_print_t_initialize, \
-      macro_fl_print_t_initialize_error(), \
-      macro_fl_print_t_initialize_warning(), \
-      f_signal_t_initialize, \
-      f_color_context_t_initialize, \
-    }
-#endif // _di_fss_payload_read_main_t_
-
 /**
  * Deallocate main.
  *
@@ -231,7 +284,7 @@ extern "C" {
  * @see fss_payload_read_main()
  */
 #ifndef _di_fss_payload_read_main_delete_
-  extern f_status_t fss_payload_read_main_delete(fss_payload_read_main_t * const main);
+  extern f_status_t fss_payload_read_main_delete(fll_program_data_t * const main);
 #endif // _di_fss_payload_read_main_delete_
 
 #ifdef __cplusplus
index 979c8772082847a77e88b6dabadeee5d99a0a88f..f97622646b93cfbe059560159aa683762361437e 100644 (file)
@@ -50,7 +50,7 @@ extern "C" {
     fll_program_print_help_option(file, context, fss_payload_read_short_total_s, fss_payload_read_long_total_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "   Print the total number of lines.");
     fll_program_print_help_option(file, context, fss_payload_read_short_trim_s, fss_payload_read_long_trim_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "    Trim Object names on select or print.");
 
-    fll_program_print_help_usage(file, context, fss_payload_program_name_s, "filename(s)");
+    fll_program_print_help_usage(file, context, fss_payload_program_name_s, fll_program_parameter_filenames_s);
 
     fl_print_format(" %[Notes:%]%r", file.stream, context.set.important, context.set.important, f_string_eol_s);
 
@@ -137,7 +137,7 @@ extern "C" {
 #endif // _di_fss_payload_read_print_help_
 
 #ifndef _di_fss_payload_read_main_
-  f_status_t fss_payload_read_main(fss_payload_read_main_t * const main, const f_console_arguments_t *arguments) {
+  f_status_t fss_payload_read_main(fll_program_data_t * const main, const f_console_arguments_t *arguments) {
 
     f_status_t status = F_none;
 
@@ -149,7 +149,7 @@ extern "C" {
       f_console_parameter_id_t ids[3] = { fss_payload_read_parameter_no_color_e, fss_payload_read_parameter_light_e, fss_payload_read_parameter_dark_e };
       const f_console_parameter_ids_t choices = { ids, 3 };
 
-      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
+      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->context);
 
       main->output.set = &main->context.set;
       main->error.set = &main->context.set;
@@ -233,17 +233,17 @@ extern "C" {
     }
 
     // Provide a range designating where within the buffer a particular file exists, using a statically allocated array.
-    fss_payload_read_file_t files_array[main->remaining.used + 1];
+    fss_payload_read_file_t files_array[main->parameters.remaining.used + 1];
     fss_payload_read_data_t data = fss_payload_read_data_t_initialize;
 
     data.files.array = files_array;
     data.files.used = 1;
-    data.files.size = main->remaining.used + 1;
+    data.files.size = main->parameters.remaining.used + 1;
     data.files.array[0].name = "(pipe)";
     data.files.array[0].range.start = 1;
     data.files.array[0].range.stop = 0;
 
-    if (main->remaining.used || main->process_pipe) {
+    if (main->parameters.remaining.used || main->process_pipe) {
       {
         const f_array_length_t parameter_code[] = {
           fss_payload_read_parameter_at_e,
@@ -583,13 +583,13 @@ extern "C" {
         }
       }
 
-      if (F_status_is_error_not(status) && main->remaining.used > 0) {
+      if (F_status_is_error_not(status) && main->parameters.remaining.used > 0) {
         f_file_t file = f_file_t_initialize;
         f_array_length_t size_file = 0;
         const f_array_length_t buffer_used = data.buffer.used;
         uint16_t signal_check = 0;
 
-        for (f_array_length_t i = 0; i < main->remaining.used; ++i) {
+        for (f_array_length_t i = 0; i < main->parameters.remaining.used; ++i) {
 
           if (!((++signal_check) % fss_payload_read_signal_check_d)) {
             if (fss_payload_read_signal_received(main)) {
@@ -605,10 +605,10 @@ extern "C" {
           file.stream = 0;
           file.id = -1;
 
-          status = f_file_stream_open(arguments->argv[main->remaining.array[i]], 0, &file);
+          status = f_file_stream_open(arguments->argv[main->parameters.remaining.array[i]], 0, &file);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e);
 
             break;
           }
@@ -617,7 +617,7 @@ extern "C" {
           status = f_file_size_by_id(file.id, &size_file);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
             break;
           }
@@ -626,7 +626,7 @@ extern "C" {
             status = f_string_dynamic_resize(data.buffer.size + size_file, &data.buffer);
 
             if (F_status_is_error(status)) {
-              fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+              fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
               break;
             }
@@ -646,12 +646,12 @@ extern "C" {
             status = f_file_stream_read(file, &data.buffer);
 
             if (F_status_is_error(status)) {
-              fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+              fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
               break;
             }
             else if (data.buffer.used > data.files.array[data.files.used].range.start) {
-              data.files.array[data.files.used].name = arguments->argv[main->remaining.array[i]];
+              data.files.array[data.files.used].name = arguments->argv[main->parameters.remaining.array[i]];
               data.files.array[data.files.used++].range.stop = data.buffer.used - 1;
             }
           }
index 8dc2e92b0c8ea5069b6203857f5811c57ac2e4f7..f6bba6ecc9f04670ce751f84853c925b0b8c7961 100644 (file)
@@ -7,7 +7,7 @@
  *
  * This is the FSS Basic List Read program
  * This program utilizes the Featureless Linux Library.
- * This program processes files or other input in fss format and stores the results in the fss_payload_read_main_t.
+ * This program processes files or other input in fss format and stores the results in the fll_program_data_t.
  *
  * This processes in accordance to the FSS-0002 Basic List specification.
  */
@@ -97,7 +97,7 @@ extern "C" {
  * @see fss_payload_read_main_delete()
  */
 #ifndef _di_fss_payload_read_main_
-  extern f_status_t fss_payload_read_main(fss_payload_read_main_t * const main, const f_console_arguments_t *arguments);
+  extern f_status_t fss_payload_read_main(fll_program_data_t * const main, const f_console_arguments_t *arguments);
 #endif // _di_fss_payload_read_main_
 
 #ifdef __cplusplus
index 51382d21431dfb02dab1a8a94791ccaf85bea61c..c21cfade1990c63cd26ab0ded137cabda3d2963b 100644 (file)
@@ -3,7 +3,7 @@
 int main(const int argc, const f_string_t *argv) {
 
   f_console_arguments_t arguments = { argc, argv };
-  fss_payload_read_main_t data = fss_payload_read_main_t_initialize;
+  fll_program_data_t data = fll_program_data_t_initialize;
 
   if (f_pipe_input_exists()) {
     data.process_pipe = F_true;
index 75c7b77bbe0b95d718a5bdf13a77dd6b8fdfa2f7..af4159537e39f73005516be62fcbc63ad6db6776 100644 (file)
@@ -64,7 +64,7 @@ extern "C" {
 #endif // _di_fss_payload_read_depths_resize_
 
 #ifndef _di_fss_payload_read_print_signal_received_
-  void fss_payload_read_print_signal_received(fss_payload_read_main_t * const main, const f_status_t signal) {
+  void fss_payload_read_print_signal_received(fll_program_data_t * const main, const f_status_t signal) {
 
     if (main->warning.verbosity != f_console_verbosity_verbose_e) return;
 
@@ -82,7 +82,7 @@ extern "C" {
 #endif // _di_fss_payload_read_print_signal_received_
 
 #ifndef _di_fss_payload_read_signal_received_
-  f_status_t fss_payload_read_signal_received(fss_payload_read_main_t * const main) {
+  f_status_t fss_payload_read_signal_received(fll_program_data_t * const main) {
 
     if (main->signal.id == -1) {
       return F_false;
index 13ab8faa1216d7ddfe6d77bddbb033afd7305c33..badfb20175add41c0323aaa8a0bff8253ab5bbc8 100644 (file)
@@ -277,7 +277,7 @@ extern "C" {
  *   The signal received.
  */
 #ifndef _di_fss_payload_read_print_signal_received_
-  extern void fss_payload_read_print_signal_received(fss_payload_read_main_t * const main, const f_status_t signal) F_attribute_visibility_internal_d;
+  extern void fss_payload_read_print_signal_received(fll_program_data_t * const main, const f_status_t signal) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_read_print_signal_received_
 
 /**
@@ -295,7 +295,7 @@ extern "C" {
  * @see f_signal_read()
  */
 #ifndef _di_fss_payload_read_signal_received_
-  extern f_status_t fss_payload_read_signal_received(fss_payload_read_main_t * const main) F_attribute_visibility_internal_d;
+  extern f_status_t fss_payload_read_signal_received(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_read_signal_received_
 
 #ifdef __cplusplus
index 889c46e80d2ba139d2417c51e47c8b88100b6dbf..66b5af0b0422977d68879e3437bb30224e3404ed 100644 (file)
@@ -7,7 +7,7 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_payload_read_print_at_
-  void fss_payload_read_print_at(fss_payload_read_main_t * const main, const bool is_payload, const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_payload_read_data_t * const data) {
+  void fss_payload_read_print_at(fll_program_data_t * const main, const bool is_payload, const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_payload_read_data_t * const data) {
 
     if (at >= data->contents.used) {
       return;
@@ -56,7 +56,7 @@ extern "C" {
 #endif // _di_fss_payload_read_print_at_
 
 #ifndef _di_fss_payload_read_print_at_extended_
-  void fss_payload_read_print_at_extended(fss_payload_read_main_t * const main, const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_payload_read_data_t * const data) {
+  void fss_payload_read_print_at_extended(fll_program_data_t * const main, const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_payload_read_data_t * const data) {
 
     if (at >= data->contents_header.used) {
       return;
@@ -148,7 +148,7 @@ extern "C" {
 #endif // _di_fss_payload_read_print_at_extended_
 
 #ifndef _di_fss_payload_read_print_at_object_
-  void fss_payload_read_print_at_object(fss_payload_read_main_t * const main, fss_payload_read_data_t * const data, const f_array_length_t at, const f_fss_delimits_t delimits_object) {
+  void fss_payload_read_print_at_object(fll_program_data_t * const main, fss_payload_read_data_t * const data, const f_array_length_t at, const f_fss_delimits_t delimits_object) {
 
     if (at >= data->objects.used) {
       return;
@@ -166,7 +166,7 @@ extern "C" {
 #endif // _di_fss_payload_read_print_at_object_
 
 #ifndef _di_fss_payload_read_print_at_total_exteded_
-  f_status_t fss_payload_read_print_at_total_extended(fss_payload_read_main_t * const main, const f_array_length_t at, fss_payload_read_data_t *data) {
+  f_status_t fss_payload_read_print_at_total_extended(fll_program_data_t * const main, const f_array_length_t at, fss_payload_read_data_t *data) {
 
     if (data->option & fss_payload_read_data_option_select_d) {
       if (data->option & fss_payload_read_data_option_object_d) {
@@ -220,7 +220,7 @@ extern "C" {
 #endif // _di_fss_payload_read_print_at_total_extended_
 
 #ifndef _di_fss_payload_read_print_content_end_extended_
-  void fss_payload_read_print_content_end_extended(fss_payload_read_main_t * const main) {
+  void fss_payload_read_print_content_end_extended(fll_program_data_t * const main) {
 
     if (main->parameters.array[fss_payload_read_parameter_pipe_e].result == f_console_result_found_e) {
       f_print_character(fss_payload_read_pipe_content_start_s, main->output.to.stream);
@@ -232,7 +232,7 @@ extern "C" {
 #endif // _di_fss_payload_read_print_content_end_extended_
 
 #ifndef _di_fss_payload_read_print_content_ignore_
-  void fss_payload_read_print_content_ignore(fss_payload_read_main_t * const main) {
+  void fss_payload_read_print_content_ignore(fll_program_data_t * const main) {
 
     if (main->parameters.array[fss_payload_read_parameter_pipe_e].result == f_console_result_found_e) {
       f_print_character(fss_payload_read_pipe_content_ignore_s, main->output.to.stream);
@@ -241,7 +241,7 @@ extern "C" {
 #endif // _di_fss_payload_read_print_content_ignore_
 
 #ifndef _di_fss_payload_read_print_object_end_
-  void fss_payload_read_print_object_end(fss_payload_read_main_t * const main) {
+  void fss_payload_read_print_object_end(fll_program_data_t * const main) {
 
     if (main->parameters.array[fss_payload_read_parameter_pipe_e].result == f_console_result_found_e) {
       f_print_character(fss_payload_read_pipe_content_start_s, main->output.to.stream);
@@ -259,7 +259,7 @@ extern "C" {
 #endif // _di_fss_payload_read_print_object_end_
 
 #ifndef _di_fss_payload_read_print_object_end_extended_
-  void fss_payload_read_print_object_end_extended(fss_payload_read_main_t * const main) {
+  void fss_payload_read_print_object_end_extended(fll_program_data_t * const main) {
 
     if (main->parameters.array[fss_payload_read_parameter_pipe_e].result == f_console_result_found_e) {
       f_print_character(fss_payload_read_pipe_content_end_s, main->output.to.stream);
@@ -271,7 +271,7 @@ extern "C" {
 #endif // _di_fss_payload_read_print_object_end_extended_
 
 #ifndef _di_fss_payload_read_print_set_end_
-  void fss_payload_read_print_set_end(fss_payload_read_main_t * const main) {
+  void fss_payload_read_print_set_end(fll_program_data_t * const main) {
 
     if (main->parameters.array[fss_payload_read_parameter_pipe_e].result == f_console_result_found_e) {
       f_print_character(fss_payload_read_pipe_content_end_s, main->output.to.stream);
@@ -280,7 +280,7 @@ extern "C" {
 #endif // _di_fss_payload_read_print_set_end_
 
 #ifndef _di_fss_payload_read_print_set_end_extended_
-  void fss_payload_read_print_set_end_extended(fss_payload_read_main_t * const main) {
+  void fss_payload_read_print_set_end_extended(fll_program_data_t * const main) {
 
     if (main->parameters.array[fss_payload_read_parameter_pipe_e].result == f_console_result_found_e) {
       f_print_character(fss_payload_read_pipe_content_end_s, main->output.to.stream);
@@ -292,7 +292,7 @@ extern "C" {
 #endif // _di_fss_payload_read_print_set_end_extended_
 
 #ifndef _di_fss_payload_read_print_one_
-  void fss_payload_read_print_one(fss_payload_read_main_t * const main) {
+  void fss_payload_read_print_one(fll_program_data_t * const main) {
 
     f_print_dynamic_raw(f_string_ascii_1_s, main->output.to.stream);
     f_print_dynamic_raw(f_string_eol_s, main->output.to.stream);
@@ -300,7 +300,7 @@ extern "C" {
 #endif // _di_fss_payload_read_print_one_
 
 #ifndef _di_fss_payload_read_print_zero_
-  void fss_payload_read_print_zero(fss_payload_read_main_t * const main) {
+  void fss_payload_read_print_zero(fll_program_data_t * const main) {
 
     f_print_dynamic_raw(f_string_ascii_0_s, main->output.to.stream);
     f_print_dynamic_raw(f_string_eol_s, main->output.to.stream);
index e3abe57d7b1ff9e6a97b09fb39db39ccb22eeb46..971b694e2df63173a7b9546df6ec164dfb8f9d71 100644 (file)
@@ -31,7 +31,7 @@ extern "C" {
  *   The program data.
  */
 #ifndef _di_fss_payload_read_print_at_
-  extern void fss_payload_read_print_at(fss_payload_read_main_t * const main, const bool is_payload, const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_payload_read_data_t * const data) F_attribute_visibility_internal_d;
+  extern void fss_payload_read_print_at(fll_program_data_t * const main, const bool is_payload, const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_payload_read_data_t * const data) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_read_print_at_
 
 /**
@@ -51,7 +51,7 @@ extern "C" {
  *   The program data.
  */
 #ifndef _di_fss_payload_read_print_at_extended_
-  extern void fss_payload_read_print_at_extended(fss_payload_read_main_t * const main, const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_payload_read_data_t * const data) F_attribute_visibility_internal_d;
+  extern void fss_payload_read_print_at_extended(fll_program_data_t * const main, const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_payload_read_data_t * const data) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_read_print_at_extended_
 
 /**
@@ -67,7 +67,7 @@ extern "C" {
  *   The delimits to be applied to an Object.
  */
 #ifndef _di_fss_payload_read_print_at_object_
-  extern void fss_payload_read_print_at_object(fss_payload_read_main_t * const main, fss_payload_read_data_t * const data, const f_array_length_t at, const f_fss_delimits_t delimits_object) F_attribute_visibility_internal_d;
+  extern void fss_payload_read_print_at_object(fll_program_data_t * const main, fss_payload_read_data_t * const data, const f_array_length_t at, const f_fss_delimits_t delimits_object) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_read_print_at_object_
 
 /**
@@ -85,7 +85,7 @@ extern "C" {
  *   F_success on success and something was matched (and total was printed).
  */
 #ifndef _di_fss_payload_read_print_at_total_extended_
-  extern f_status_t fss_payload_read_print_at_total_extended(fss_payload_read_main_t * const main, const f_array_length_t at, fss_payload_read_data_t *data) F_attribute_visibility_internal_d;
+  extern f_status_t fss_payload_read_print_at_total_extended(fll_program_data_t * const main, const f_array_length_t at, fss_payload_read_data_t *data) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_read_print_at_total_extended_
 
 /**
@@ -95,7 +95,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_payload_read_print_content_end_extended_
-  extern void fss_payload_read_print_content_end_extended(fss_payload_read_main_t * const main) F_attribute_visibility_internal_d;
+  extern void fss_payload_read_print_content_end_extended(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_read_print_content_end_extended_
 
 /**
@@ -107,7 +107,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_payload_read_print_content_ignore_
-  extern void fss_payload_read_print_content_ignore(fss_payload_read_main_t * const main) F_attribute_visibility_internal_d;
+  extern void fss_payload_read_print_content_ignore(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_read_print_content_ignore_
 
 /**
@@ -117,7 +117,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_payload_read_print_object_end_
-  extern void fss_payload_read_print_object_end(fss_payload_read_main_t * const main) F_attribute_visibility_internal_d;
+  extern void fss_payload_read_print_object_end(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_read_print_object_end_
 
 /**
@@ -127,7 +127,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_payload_read_print_object_end_extended_
-  extern void fss_payload_read_print_object_end_extended(fss_payload_read_main_t * const main) F_attribute_visibility_internal_d;
+  extern void fss_payload_read_print_object_end_extended(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_read_print_object_end_extended_
 
 /**
@@ -137,7 +137,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_payload_read_print_one_
-  extern void fss_payload_read_print_one(fss_payload_read_main_t * const main) F_attribute_visibility_internal_d;
+  extern void fss_payload_read_print_one(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_read_print_one_
 
 /**
@@ -147,7 +147,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_payload_read_print_set_end_
-  extern void fss_payload_read_print_set_end(fss_payload_read_main_t * const main) F_attribute_visibility_internal_d;
+  extern void fss_payload_read_print_set_end(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_read_print_set_end_
 
 /**
@@ -157,7 +157,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_payload_read_print_set_end_extended_
-  extern void fss_payload_read_print_set_end_extended(fss_payload_read_main_t * const main) F_attribute_visibility_internal_d;
+  extern void fss_payload_read_print_set_end_extended(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_read_print_set_end_extended_
 
 /**
@@ -167,7 +167,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_payload_read_print_zero_
-  extern void fss_payload_read_print_zero(fss_payload_read_main_t * const main) F_attribute_visibility_internal_d;
+  extern void fss_payload_read_print_zero(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_read_print_zero_
 
 #ifdef __cplusplus
index c6ee4e8591728fca7fc5ed42563af27f17b5e6cd..af307aee8baa06fecad16beffdd90c4152f845ce 100644 (file)
@@ -56,7 +56,7 @@ extern "C" {
 #endif // _di_fss_payload_read_delimit_object_is_
 
 #ifndef _di_fss_payload_read_depth_process_
-  f_status_t fss_payload_read_depth_process(fss_payload_read_main_t * const main, const f_console_arguments_t *arguments, fss_payload_read_data_t *data) {
+  f_status_t fss_payload_read_depth_process(fll_program_data_t * const main, const f_console_arguments_t *arguments, fss_payload_read_data_t *data) {
 
     f_status_t status = F_none;
 
@@ -244,7 +244,7 @@ extern "C" {
 #endif // _di_fss_payload_read_file_identify_
 
 #ifndef _di_fss_payload_read_load_
-  f_status_t fss_payload_read_load(fss_payload_read_main_t * const main, fss_payload_read_data_t *data) {
+  f_status_t fss_payload_read_load(fll_program_data_t * const main, fss_payload_read_data_t *data) {
 
     f_state_t state = macro_f_state_t_initialize(fss_payload_common_allocation_large_d, fss_payload_read_common_allocation_small_d, 0, 0, 0, 0, 0);
     f_string_range_t input = macro_f_string_range_t_initialize(data->buffer.used);
@@ -314,7 +314,7 @@ extern "C" {
 #endif // _di_fss_payload_read_load_
 
 #ifndef _di_fss_payload_read_load_number_
-  f_status_t fss_payload_read_load_number(fss_payload_read_main_t * const main, const f_array_length_t parameter, const f_string_t name, const f_console_arguments_t *arguments, f_number_unsigned_t *number) {
+  f_status_t fss_payload_read_load_number(fll_program_data_t * const main, const f_array_length_t parameter, const f_string_t name, const f_console_arguments_t *arguments, f_number_unsigned_t *number) {
 
     if (main->parameters.array[parameter].result == f_console_result_additional_e) {
       const f_array_length_t index = main->parameters.array[parameter].values.array[main->parameters.array[parameter].values.used - 1];
@@ -336,7 +336,7 @@ extern "C" {
 #endif // _di_fss_payload_read_load_number_
 
 #ifndef _di_fss_payload_read_process_
-  f_status_t fss_payload_read_process(fss_payload_read_main_t * const main, const f_console_arguments_t *arguments, fss_payload_read_data_t *data) {
+  f_status_t fss_payload_read_process(fll_program_data_t * const main, const f_console_arguments_t *arguments, fss_payload_read_data_t *data) {
 
     f_status_t status = fss_payload_read_process_option(main, arguments, data);
     if (F_status_is_error(status)) return status;
@@ -473,7 +473,7 @@ extern "C" {
 #endif // _di_fss_payload_read_process_
 
 #ifndef _di_fss_payload_read_process_at_
-  f_status_t fss_payload_read_process_at(fss_payload_read_main_t * const main, fss_payload_read_data_t *data, bool names[]) {
+  f_status_t fss_payload_read_process_at(fll_program_data_t * const main, fss_payload_read_data_t *data, bool names[]) {
 
     if (data->depths.array[0].value_at >= data->objects.used) {
       if (data->option & (fss_payload_read_data_option_columns_d | fss_payload_read_data_option_total_d)) {
@@ -560,7 +560,7 @@ extern "C" {
 #endif // _di_fss_payload_read_process_at_
 
 #ifndef _di_fss_payload_read_process_at_extended_
-  f_status_t fss_payload_read_process_at_extended(fss_payload_read_main_t * const main, fss_payload_read_data_t *data, bool names[]) {
+  f_status_t fss_payload_read_process_at_extended(fll_program_data_t * const main, fss_payload_read_data_t *data, bool names[]) {
 
     if (data->depths.array[data->depths.used - 1].value_at >= data->objects_header.used) {
       if (data->option & (fss_payload_read_data_option_columns_d | fss_payload_read_data_option_total_d)) {
@@ -666,7 +666,7 @@ extern "C" {
 #endif // _di_fss_payload_read_process_at_extended_
 
 #ifndef _di_fss_payload_read_process_at_line_
-  f_status_t fss_payload_read_process_at_line(fss_payload_read_main_t * const main, const f_array_length_t at, const f_array_lengths_t delimits_object, const f_array_lengths_t delimits_content, fss_payload_read_data_t *data, f_array_length_t *line) {
+  f_status_t fss_payload_read_process_at_line(fll_program_data_t * const main, const f_array_length_t at, const f_array_lengths_t delimits_object, const f_array_lengths_t delimits_content, fss_payload_read_data_t *data, f_array_length_t *line) {
 
     if (data->option & fss_payload_read_data_option_object_d) {
       if (*line == data->line) {
@@ -770,7 +770,7 @@ extern "C" {
 #endif // _di_fss_payload_read_process_at_line_
 
 #ifndef _di_fss_payload_read_process_columns_
-  f_status_t fss_payload_read_process_columns(fss_payload_read_main_t * const main, fss_payload_read_data_t *data, bool names[]) {
+  f_status_t fss_payload_read_process_columns(fll_program_data_t * const main, fss_payload_read_data_t *data, bool names[]) {
 
     if (!(data->option & fss_payload_read_data_option_content_d)) {
       flockfile(main->output.to.stream);
@@ -809,7 +809,7 @@ extern "C" {
 #endif // _di_fss_payload_read_process_columns_
 
 #ifndef _di_fss_payload_read_process_columns_extended_
-  f_status_t fss_payload_read_process_columns_extended(fss_payload_read_main_t * const main, fss_payload_read_data_t *data, bool names[]) {
+  f_status_t fss_payload_read_process_columns_extended(fll_program_data_t * const main, fss_payload_read_data_t *data, bool names[]) {
 
     if (!(data->option & fss_payload_read_data_option_content_d)) {
       flockfile(main->output.to.stream);
@@ -839,7 +839,7 @@ extern "C" {
 #endif // _di_fss_payload_read_process_columns_extended_
 
 #ifndef _di_fss_payload_read_process_line_
-  f_status_t fss_payload_read_process_line(fss_payload_read_main_t * const main, fss_payload_read_data_t *data, bool names[]) {
+  f_status_t fss_payload_read_process_line(fll_program_data_t * const main, fss_payload_read_data_t *data, bool names[]) {
 
     f_array_lengths_t except_none = f_array_lengths_t_initialize;
     f_array_lengths_t *delimits_object = fss_payload_read_delimit_object_is(0, data) ? &data->delimits_object : &except_none;
@@ -875,7 +875,7 @@ extern "C" {
 #endif // _di_fss_payload_read_process_line_
 
 #ifndef _di_fss_payload_read_process_line_extended_
-  f_status_t fss_payload_read_process_line_extended(fss_payload_read_main_t * const main, fss_payload_read_data_t *data, bool names[]) {
+  f_status_t fss_payload_read_process_line_extended(fll_program_data_t * const main, fss_payload_read_data_t *data, bool names[]) {
 
     f_array_lengths_t except_none = f_array_lengths_t_initialize;
     f_array_lengths_t *delimits_object = fss_payload_read_delimit_object_is(0, data) ? &data->delimits_object_header : &except_none;
@@ -987,7 +987,7 @@ extern "C" {
 #endif // _di_fss_payload_read_process_name_extended_
 
 #ifndef _di_fss_payload_read_process_option_
-  f_status_t fss_payload_read_process_option(fss_payload_read_main_t * const main, const f_console_arguments_t *arguments, fss_payload_read_data_t *data) {
+  f_status_t fss_payload_read_process_option(fll_program_data_t * const main, const f_console_arguments_t *arguments, fss_payload_read_data_t *data) {
 
     f_status_t status = F_none;
 
@@ -1051,7 +1051,7 @@ extern "C" {
 #endif // _di_fss_payload_read_process_option_
 
 #ifndef _di_fss_payload_read_process_total_
-  f_status_t fss_payload_read_process_total(fss_payload_read_main_t * const main, fss_payload_read_data_t *data, bool names[]) {
+  f_status_t fss_payload_read_process_total(fll_program_data_t * const main, fss_payload_read_data_t *data, bool names[]) {
 
     f_array_length_t total = 0;
     f_string_range_t range = f_string_range_t_initialize;
@@ -1126,7 +1126,7 @@ extern "C" {
 #endif // _di_fss_payload_read_process_total_
 
 #ifndef _di_fss_payload_read_process_total_extended_
-  f_status_t fss_payload_read_process_total_extended(fss_payload_read_main_t * const main, fss_payload_read_data_t *data, bool names[]) {
+  f_status_t fss_payload_read_process_total_extended(fll_program_data_t * const main, fss_payload_read_data_t *data, bool names[]) {
 
     f_array_length_t total = 0;
 
index 39494afc4d8505ce8ffd1e605020e92110cb2e14..1d35991daf050d2d86a712773c931033fe71bd2c 100644 (file)
@@ -74,7 +74,7 @@ extern "C" {
  * @see fss_payload_read_depths_resize()
  */
 #ifndef _di_fss_payload_read_depth_process_
-  extern f_status_t fss_payload_read_depth_process(fss_payload_read_main_t * const main, const f_console_arguments_t *arguments, fss_payload_read_data_t *data) F_attribute_visibility_internal_d;
+  extern f_status_t fss_payload_read_depth_process(fll_program_data_t * const main, const f_console_arguments_t *arguments, fss_payload_read_data_t *data) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_read_depth_process_
 
 /**
@@ -118,7 +118,7 @@ extern "C" {
  * @see fss_payload_read_process_option()
  */
 #ifndef _di_fss_payload_read_load_
-  extern f_status_t fss_payload_read_load(fss_payload_read_main_t * const main, fss_payload_read_data_t *data) F_attribute_visibility_internal_d;
+  extern f_status_t fss_payload_read_load(fll_program_data_t * const main, fss_payload_read_data_t *data) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_read_load_
 
 /**
@@ -148,7 +148,7 @@ extern "C" {
  * @see fss_payload_read_depths_resize()
  */
 #ifndef _di_fss_payload_read_load_number_
-  extern f_status_t fss_payload_read_load_number(fss_payload_read_main_t * const main, const f_array_length_t parameter, const f_string_t name, const f_console_arguments_t *arguments, f_number_unsigned_t *number) F_attribute_visibility_internal_d;
+  extern f_status_t fss_payload_read_load_number(fll_program_data_t * const main, const f_array_length_t parameter, const f_string_t name, const f_console_arguments_t *arguments, f_number_unsigned_t *number) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_read_load_number_
 
 /**
@@ -173,7 +173,7 @@ extern "C" {
  * @see fss_payload_read_process_option()
  */
 #ifndef _di_fss_payload_read_process_
-  extern f_status_t fss_payload_read_process(fss_payload_read_main_t * const main, const f_console_arguments_t *arguments, fss_payload_read_data_t *data) F_attribute_visibility_internal_d;
+  extern f_status_t fss_payload_read_process(fll_program_data_t * const main, const f_console_arguments_t *arguments, fss_payload_read_data_t *data) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_read_process_
 
 /**
@@ -193,7 +193,7 @@ extern "C" {
  * @see fss_payload_read_process_at_line()
  */
 #ifndef _di_fss_payload_read_process_at_
-  extern f_status_t fss_payload_read_process_at(fss_payload_read_main_t * const main, fss_payload_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
+  extern f_status_t fss_payload_read_process_at(fll_program_data_t * const main, fss_payload_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_read_process_at_
 
 /**
@@ -213,7 +213,7 @@ extern "C" {
  * @see fss_payload_read_process_at_line()
  */
 #ifndef _di_fss_payload_read_process_at_extended_
-  extern f_status_t fss_payload_read_process_at_extended(fss_payload_read_main_t * const main, fss_payload_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
+  extern f_status_t fss_payload_read_process_at_extended(fll_program_data_t * const main, fss_payload_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_read_process_at_extended_
 
 /**
@@ -236,7 +236,7 @@ extern "C" {
  *   F_success on success and the line was matched (and possibly printed).
  */
 #ifndef _di_fss_payload_read_process_at_line_
-  extern f_status_t fss_payload_read_process_at_line(fss_payload_read_main_t * const main, const f_array_length_t at, const f_array_lengths_t delimits_object, const f_array_lengths_t delimits_content, fss_payload_read_data_t *data, f_array_length_t *line) F_attribute_visibility_internal_d;
+  extern f_status_t fss_payload_read_process_at_line(fll_program_data_t * const main, const f_array_length_t at, const f_array_lengths_t delimits_object, const f_array_lengths_t delimits_content, fss_payload_read_data_t *data, f_array_length_t *line) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_read_process_at_line_
 
 /**
@@ -254,7 +254,7 @@ extern "C" {
  *   F_none on success.
  */
 #ifndef _di_fss_payload_read_process_columns_
-  extern f_status_t fss_payload_read_process_columns(fss_payload_read_main_t * const main, fss_payload_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
+  extern f_status_t fss_payload_read_process_columns(fll_program_data_t * const main, fss_payload_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_read_process_columns_
 
 /**
@@ -272,7 +272,7 @@ extern "C" {
  *   F_none on success.
  */
 #ifndef _di_fss_payload_read_process_columns_extended_
-  extern f_status_t fss_payload_read_process_columns_extended(fss_payload_read_main_t * const main, fss_payload_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
+  extern f_status_t fss_payload_read_process_columns_extended(fll_program_data_t * const main, fss_payload_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_read_process_columns_extended_
 
 /**
@@ -290,7 +290,7 @@ extern "C" {
  *   F_none on success.
  */
 #ifndef _di_fss_payload_read_process_line_
-  extern f_status_t fss_payload_read_process_line(fss_payload_read_main_t * const main, fss_payload_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
+  extern f_status_t fss_payload_read_process_line(fll_program_data_t * const main, fss_payload_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_read_process_line_
 
 /**
@@ -308,7 +308,7 @@ extern "C" {
  *   F_none on success.
  */
 #ifndef _di_fss_payload_read_process_line_extended_
-  extern f_status_t fss_payload_read_process_line_extended(fss_payload_read_main_t * const main, fss_payload_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
+  extern f_status_t fss_payload_read_process_line_extended(fll_program_data_t * const main, fss_payload_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_read_process_line_extended_
 
 /**
@@ -367,7 +367,7 @@ extern "C" {
  * @see fss_payload_read_load_setting()
  */
 #ifndef _di_fss_payload_read_process_option_
-  extern f_status_t fss_payload_read_process_option(fss_payload_read_main_t * const main, const f_console_arguments_t *arguments, fss_payload_read_data_t *data) F_attribute_visibility_internal_d;
+  extern f_status_t fss_payload_read_process_option(fll_program_data_t * const main, const f_console_arguments_t *arguments, fss_payload_read_data_t *data) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_read_process_option_
 
 /**
@@ -385,7 +385,7 @@ extern "C" {
  *   F_none on success.
  */
 #ifndef _di_fss_payload_read_process_total_
-  extern f_status_t fss_payload_read_process_total(fss_payload_read_main_t * const main, fss_payload_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
+  extern f_status_t fss_payload_read_process_total(fll_program_data_t * const main, fss_payload_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_read_process_total_
 
 /**
@@ -403,7 +403,7 @@ extern "C" {
  *   F_none on success.
  */
 #ifndef _di_fss_payload_read_process_total_extended_
-  extern f_status_t fss_payload_read_process_total_extended(fss_payload_read_main_t * const main, fss_payload_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
+  extern f_status_t fss_payload_read_process_total_extended(fll_program_data_t * const main, fss_payload_read_data_t *data, bool names[]) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_read_process_total_extended_
 
 #ifdef __cplusplus
index 73ec236980b2c1c41a4962dad372ff530a692085..2a8a2aab2a2f732cbb81cf9ee3d641f0a1ef69a6 100644 (file)
@@ -4,25 +4,38 @@
 extern "C" {
 #endif
 
-#ifndef _di_fss_payload_write_program_version_
-  const f_string_static_t fss_payload_write_program_version_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_WRITE_program_version_s, 0, FSS_PAYLOAD_WRITE_program_version_s_length);
-#endif // _di_fss_payload_write_program_version_
-
-#ifndef _di_fss_payload_write_program_name_
-  const f_string_static_t fss_payload_write_program_name_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_WRITE_program_name_s, 0, FSS_PAYLOAD_WRITE_program_name_s_length);
-  const f_string_static_t fss_payload_write_program_name_long_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_WRITE_program_name_long_s, 0, FSS_PAYLOAD_WRITE_program_name_long_s_length);
-#endif // _di_fss_payload_write_program_name_
+#ifndef _di_fss_payload_write_defines_
+  const f_string_static_t fss_payload_write_pipe_content_end_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_WRITE_pipe_content_end_s, 0, FSS_PAYLOAD_WRITE_pipe_content_end_s_length);
+  const f_string_static_t fss_payload_write_pipe_content_ignore_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_WRITE_pipe_content_ignore_s, 0, FSS_PAYLOAD_WRITE_pipe_content_ignore_s_length);
+  const f_string_static_t fss_payload_write_pipe_content_start_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_WRITE_pipe_content_start_s, 0, FSS_PAYLOAD_WRITE_pipe_content_start_s_length);
+#endif // _di_fss_payload_write_defines_
+
+##ifndef _di_fss_payload_write_parameters_
+  const f_string_static_t fss_payload_write_short_file_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_WRITE_short_file_s, 0, FSS_PAYLOAD_WRITE_short_file_s_length);
+  const f_string_static_t fss_payload_write_short_content_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_WRITE_short_content_s, 0, FSS_PAYLOAD_WRITE_short_content_s_length);
+  const f_string_static_t fss_payload_write_short_double_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_WRITE_short_double_s, 0, FSS_PAYLOAD_WRITE_short_double_s_length);
+  const f_string_static_t fss_payload_write_short_ignore_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_WRITE_short_ignore_s, 0, FSS_PAYLOAD_WRITE_short_ignore_s_length);
+  const f_string_static_t fss_payload_write_short_object_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_WRITE_short_object_s, 0, FSS_PAYLOAD_WRITE_short_object_s_length);
+  const f_string_static_t fss_payload_write_short_partial_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_WRITE_short_partial_s, 0, FSS_PAYLOAD_WRITE_short_partial_s_length);
+  const f_string_static_t fss_payload_write_short_prepend_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_WRITE_short_prepend_s, 0, FSS_PAYLOAD_WRITE_short_prepend_s_length);
+  const f_string_static_t fss_payload_write_short_single_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_WRITE_short_single_s, 0, FSS_PAYLOAD_WRITE_short_single_s_length);
+  const f_string_static_t fss_payload_write_short_trim_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_WRITE_short_trim_s, 0, FSS_PAYLOAD_WRITE_short_trim_s_length);
+
+  const f_string_static_t fss_payload_write_long_file_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_WRITE_long_file_s, 0, FSS_PAYLOAD_WRITE_long_file_s_length);
+  const f_string_static_t fss_payload_write_long_content_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_WRITE_long_content_s, 0, FSS_PAYLOAD_WRITE_long_content_s_length);
+  const f_string_static_t fss_payload_write_long_double_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_WRITE_long_double_s, 0, FSS_PAYLOAD_WRITE_long_double_s_length);
+  const f_string_static_t fss_payload_write_long_ignore_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_WRITE_long_ignore_s, 0, FSS_PAYLOAD_WRITE_long_ignore_s_length);
+  const f_string_static_t fss_payload_write_long_object_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_WRITE_long_object_s, 0, FSS_PAYLOAD_WRITE_long_object_s_length);
+  const f_string_static_t fss_payload_write_long_partial_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_WRITE_long_partial_s, 0, FSS_PAYLOAD_WRITE_long_partial_s_length);
+  const f_string_static_t fss_payload_write_long_prepend_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_WRITE_long_prepend_s, 0, FSS_PAYLOAD_WRITE_long_prepend_s_length);
+  const f_string_static_t fss_payload_write_long_single_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_WRITE_long_single_s, 0, FSS_PAYLOAD_WRITE_long_single_s_length);
+  const f_string_static_t fss_payload_write_long_trim_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_WRITE_long_trim_s, 0, FSS_PAYLOAD_WRITE_long_trim_s_length);
+#endif // _di_fss_payload_write_parameters_
 
 #ifndef _di_fss_payload_write_main_delete_
-  f_status_t fss_payload_write_main_delete(fss_payload_write_main_t * const main) {
-
-    f_console_parameters_delete(&main->parameters);
-
-    f_type_array_lengths_resize(0, &main->remaining);
-
-    macro_f_color_context_t_delete_simple(main->context);
+  f_status_t fss_payload_write_main_delete(fll_program_data_t * const main) {
 
-    return F_none;
+    return fll_program_data_delete(main);
   }
 #endif // _di_fss_payload_write_main_delete_
 
index d6f079d802fa4c1a87e358e9eb76c1a7842c46f5..8198f551b82aa9f9984cfdf10ea16b42530654e8 100644 (file)
@@ -16,6 +16,9 @@
 extern "C" {
 #endif
 
+/**
+ * The program version.
+ */
 #ifndef _di_fss_payload_write_program_version_
   #define FSS_PAYLOAD_WRITE_program_version_major_s F_string_ascii_0_s
   #define FSS_PAYLOAD_WRITE_program_version_minor_s F_string_ascii_5_s
@@ -42,6 +45,9 @@ extern "C" {
   extern const f_string_static_t fss_payload_write_program_version_s;
 #endif // _di_fss_payload_write_program_version_
 
+/**
+ * The program name.
+ */
 #ifndef _di_fss_payload_write_program_name_
   #define FSS_PAYLOAD_WRITE_program_name_s      "fss_payload_write"
   #define FSS_PAYLOAD_WRITE_program_name_long_s "FSS Payload Write"
@@ -53,32 +59,88 @@ extern "C" {
   extern const f_string_static_t fss_payload_write_program_name_long_s;
 #endif // _di_fss_payload_write_program_name_
 
+/**
+ * The program defines.
+ */
 #ifndef _di_fss_payload_write_defines_
   #define fss_payload_write_signal_check_d 10000
 
-  #define fss_payload_write_pipe_content_end_s    '\f'
-  #define fss_payload_write_pipe_content_ignore_s '\v'
-  #define fss_payload_write_pipe_content_start_s  '\b'
-
-  #define fss_payload_write_short_file_s    "f"
-  #define fss_payload_write_short_content_s "c"
-  #define fss_payload_write_short_double_s  "d"
-  #define fss_payload_write_short_ignore_s  "I"
-  #define fss_payload_write_short_object_s  "o"
-  #define fss_payload_write_short_partial_s "p"
-  #define fss_payload_write_short_prepend_s "P"
-  #define fss_payload_write_short_single_s  "s"
-  #define fss_payload_write_short_trim_s    "T"
-
-  #define fss_payload_write_long_file_s    "file"
-  #define fss_payload_write_long_content_s "content"
-  #define fss_payload_write_long_double_s  "double"
-  #define fss_payload_write_long_ignore_s  "ignore"
-  #define fss_payload_write_long_object_s  "object"
-  #define fss_payload_write_long_partial_s "partial"
-  #define fss_payload_write_long_prepend_s "prepend"
-  #define fss_payload_write_long_single_s  "single"
-  #define fss_payload_write_long_trim_s    "trim"
+  #define FSS_PAYLOAD_WRITE_pipe_content_end_s    "\f"
+  #define FSS_PAYLOAD_WRITE_pipe_content_ignore_s "\v"
+  #define FSS_PAYLOAD_WRITE_pipe_content_start_s  "\b"
+
+  #define FSS_PAYLOAD_WRITE_pipe_content_end_s_length    1
+  #define FSS_PAYLOAD_WRITE_pipe_content_ignore_s_length 1
+  #define FSS_PAYLOAD_WRITE_pipe_content_start_s_length  1
+
+  extern const f_string_static_t fss_payload_write_pipe_content_end_s;
+  extern const f_string_static_t fss_payload_write_pipe_content_ignore_s;
+  extern const f_string_static_t fss_payload_write_pipe_content_start_s;
+#endif // _di_fss_payload_write_defines_
+
+/**
+ * The main program parameters.
+ */
+#ifndef _di_fss_payload_write_parameters_
+  #define FSS_PAYLOAD_WRITE_short_file_s    "f"
+  #define FSS_PAYLOAD_WRITE_short_content_s "c"
+  #define FSS_PAYLOAD_WRITE_short_double_s  "d"
+  #define FSS_PAYLOAD_WRITE_short_ignore_s  "I"
+  #define FSS_PAYLOAD_WRITE_short_object_s  "o"
+  #define FSS_PAYLOAD_WRITE_short_partial_s "p"
+  #define FSS_PAYLOAD_WRITE_short_prepend_s "P"
+  #define FSS_PAYLOAD_WRITE_short_single_s  "s"
+  #define FSS_PAYLOAD_WRITE_short_trim_s    "T"
+
+  #define FSS_PAYLOAD_WRITE_long_file_s    "file"
+  #define FSS_PAYLOAD_WRITE_long_content_s "content"
+  #define FSS_PAYLOAD_WRITE_long_double_s  "double"
+  #define FSS_PAYLOAD_WRITE_long_ignore_s  "ignore"
+  #define FSS_PAYLOAD_WRITE_long_object_s  "object"
+  #define FSS_PAYLOAD_WRITE_long_partial_s "partial"
+  #define FSS_PAYLOAD_WRITE_long_prepend_s "prepend"
+  #define FSS_PAYLOAD_WRITE_long_single_s  "single"
+  #define FSS_PAYLOAD_WRITE_long_trim_s    "trim"
+
+  #define FSS_PAYLOAD_WRITE_short_file_s_length    1
+  #define FSS_PAYLOAD_WRITE_short_content_s_length 1
+  #define FSS_PAYLOAD_WRITE_short_double_s_length  1
+  #define FSS_PAYLOAD_WRITE_short_ignore_s_length  1
+  #define FSS_PAYLOAD_WRITE_short_object_s_length  1
+  #define FSS_PAYLOAD_WRITE_short_partial_s_length 1
+  #define FSS_PAYLOAD_WRITE_short_prepend_s_length 1
+  #define FSS_PAYLOAD_WRITE_short_single_s_length  1
+  #define FSS_PAYLOAD_WRITE_short_trim_s_length    1
+
+  #define FSS_PAYLOAD_WRITE_long_file_s_length    4
+  #define FSS_PAYLOAD_WRITE_long_content_s_length 7
+  #define FSS_PAYLOAD_WRITE_long_double_s_length  6
+  #define FSS_PAYLOAD_WRITE_long_ignore_s_length  6
+  #define FSS_PAYLOAD_WRITE_long_object_s_length  6
+  #define FSS_PAYLOAD_WRITE_long_partial_s_length 7
+  #define FSS_PAYLOAD_WRITE_long_prepend_s_length 7
+  #define FSS_PAYLOAD_WRITE_long_single_s_length  6
+  #define FSS_PAYLOAD_WRITE_long_trim_s_length    4
+
+  extern const f_string_static_t fss_payload_write_short_file_s;
+  extern const f_string_static_t fss_payload_write_short_content_s;
+  extern const f_string_static_t fss_payload_write_short_double_s;
+  extern const f_string_static_t fss_payload_write_short_ignore_s;
+  extern const f_string_static_t fss_payload_write_short_object_s;
+  extern const f_string_static_t fss_payload_write_short_partial_s;
+  extern const f_string_static_t fss_payload_write_short_prepend_s;
+  extern const f_string_static_t fss_payload_write_short_single_s;
+  extern const f_string_static_t fss_payload_write_short_trim_s;
+
+  extern const f_string_static_t fss_payload_write_long_file_s;
+  extern const f_string_static_t fss_payload_write_long_content_s;
+  extern const f_string_static_t fss_payload_write_long_double_s;
+  extern const f_string_static_t fss_payload_write_long_ignore_s;
+  extern const f_string_static_t fss_payload_write_long_object_s;
+  extern const f_string_static_t fss_payload_write_long_partial_s;
+  extern const f_string_static_t fss_payload_write_long_prepend_s;
+  extern const f_string_static_t fss_payload_write_long_single_s;
+  extern const f_string_static_t fss_payload_write_long_trim_s;
 
   enum {
     fss_payload_write_parameter_help_e,
@@ -113,51 +175,19 @@ extern "C" {
       macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_version_s.string, f_console_standard_long_version_s.string, 0, 0, f_console_type_inverse_e), \
-      macro_f_console_parameter_t_initialize(fss_payload_write_short_file_s, fss_payload_write_long_file_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_payload_write_short_content_s, fss_payload_write_long_content_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_payload_write_short_double_s, fss_payload_write_long_double_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_payload_write_short_ignore_s, fss_payload_write_long_ignore_s, 0, 2, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_payload_write_short_object_s, fss_payload_write_long_object_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_payload_write_short_partial_s, fss_payload_write_long_partial_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_payload_write_short_prepend_s, fss_payload_write_long_prepend_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_payload_write_short_single_s, fss_payload_write_long_single_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_payload_write_short_trim_s, fss_payload_write_long_trim_s, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_payload_write_short_file_s.string, fss_payload_write_long_file_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_payload_write_short_content_s.string, fss_payload_write_long_content_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_payload_write_short_double_s.string, fss_payload_write_long_double_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_payload_write_short_ignore_s.string, fss_payload_write_long_ignore_s.string, 0, 2, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_payload_write_short_object_s.string, fss_payload_write_long_object_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_payload_write_short_partial_s.string, fss_payload_write_long_partial_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_payload_write_short_prepend_s.string, fss_payload_write_long_prepend_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_payload_write_short_single_s.string, fss_payload_write_long_single_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_payload_write_short_trim_s.string, fss_payload_write_long_trim_s.string, 0, 0, f_console_type_normal_e), \
     }
 
   #define fss_payload_write_total_parameters_d 18
-#endif // _di_fss_payload_write_defines_
-
-#ifndef _di_fss_payload_write_main_t_
-  typedef struct {
-    f_console_parameters_t parameters;
-
-    f_array_lengths_t remaining;
-    bool process_pipe;
-
-    fl_print_t output;
-    fl_print_t error;
-    fl_print_t warning;
-
-    f_signal_t signal;
-
-    f_string_static_t prepend;
-
-    f_color_context_t context;
-  } fss_payload_write_main_t;
-
-  #define fss_payload_write_main_t_initialize \
-    { \
-      f_console_parameters_t_initialize, \
-      f_array_lengths_t_initialize, \
-      F_false, \
-      fl_print_t_initialize, \
-      macro_fl_print_t_initialize_error(), \
-      macro_fl_print_t_initialize_warning(), \
-      f_signal_t_initialize, \
-      f_string_static_t_initialize, \
-      f_color_context_t_initialize, \
-    }
-#endif // _di_fss_payload_write_main_t_
+#endif // _di_fss_payload_write_parameters_
 
 /**
  * Deallocate main.
@@ -175,7 +205,7 @@ extern "C" {
  * @see fss_payload_write_main()
  */
 #ifndef _di_fss_payload_write_main_delete_
-  extern f_status_t fss_payload_write_main_delete(fss_payload_write_main_t * const main);
+  extern f_status_t fss_payload_write_main_delete(fll_program_data_t * const main);
 #endif // _di_fss_payload_write_main_delete_
 
 #ifdef __cplusplus
index 0ccf72469260fb0ea5f0f32e0887333be8b93fa9..302bc1ef077db9276a1d9bb77f2f8eef4e694510 100644 (file)
@@ -66,7 +66,7 @@ extern "C" {
 #endif // _di_fss_payload_write_print_help_
 
 #ifndef _di_fss_payload_write_main_
-  f_status_t fss_payload_write_main(fss_payload_write_main_t * const main, const f_console_arguments_t *arguments) {
+  f_status_t fss_payload_write_main(fll_program_data_t * const main, const f_console_arguments_t *arguments) {
 
     f_status_t status = F_none;
 
@@ -78,7 +78,7 @@ extern "C" {
       f_console_parameter_id_t ids[3] = { fss_payload_write_parameter_no_color_e, fss_payload_write_parameter_light_e, fss_payload_write_parameter_dark_e };
       const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
 
-      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
+      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->context);
 
       main->output.set = &main->context.set;
       main->error.set = &main->context.set;
index 6c9e4cec6828419c0f7066f7fc8932e45df2e732..890c29c00a04c0bdcd2fbaf8d950416898f1f67c 100644 (file)
@@ -89,7 +89,7 @@ extern "C" {
  * @see fss_payload_write_main_delete()
  */
 #ifndef _di_fss_payload_write_main_
-  extern f_status_t fss_payload_write_main(fss_payload_write_main_t * const main, const f_console_arguments_t *arguments);
+  extern f_status_t fss_payload_write_main(fll_program_data_t * const main, const f_console_arguments_t *arguments);
 #endif // _di_fss_payload_write_main_
 
 #ifdef __cplusplus
index e66dfa8ea7f299de762d17219972562ea16ba42f..9a3a0a33fb6ff97d78e84bc2e06612c03f3939c3 100644 (file)
@@ -3,7 +3,7 @@
 int main(const int argc, const f_string_t *argv) {
 
   const f_console_arguments_t arguments = { argc, argv };
-  fss_payload_write_main_t data = fss_payload_write_main_t_initialize;
+  fll_program_data_t data = fll_program_data_t_initialize;
 
   if (f_pipe_input_exists()) {
     data.process_pipe = F_true;
index e331b5f830280cc8842f9f9aa5e3356f5dfd182f..5cb2006b679440a36f763d4d3e6c0577754df79f 100644 (file)
@@ -6,7 +6,7 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_payload_write_print_signal_received_
-  void fss_payload_write_print_signal_received(fss_payload_write_main_t * const main, const f_status_t signal) {
+  void fss_payload_write_print_signal_received(fll_program_data_t * const main, const f_status_t signal) {
 
     if (main->warning.verbosity != f_console_verbosity_verbose_e) return;
 
@@ -24,7 +24,7 @@ extern "C" {
 #endif // _di_fss_payload_write_print_signal_received_
 
 #ifndef _di_fss_payload_write_signal_received_
-  f_status_t fss_payload_write_signal_received(fss_payload_write_main_t * const main) {
+  f_status_t fss_payload_write_signal_received(fll_program_data_t * const main) {
 
     if (main->signal.id == -1) {
       return F_false;
index 340fb78eeeb35a63472d52e99c9e3ae5066db0a5..a612a4016c7fbd0eaeb2401c5ecc93d952a0c35d 100644 (file)
@@ -33,7 +33,7 @@ extern "C" {
  *   The signal received.
  */
 #ifndef _di_fss_payload_write_print_signal_received_
-  extern void fss_payload_write_print_signal_received(fss_payload_write_main_t * const main, const f_status_t signal) F_attribute_visibility_internal_d;
+  extern void fss_payload_write_print_signal_received(fll_program_data_t * const main, const f_status_t signal) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_write_print_signal_received_
 
 /**
@@ -51,7 +51,7 @@ extern "C" {
  * @see f_signal_read()
  */
 #ifndef _di_fss_payload_write_signal_received_
-  extern f_status_t fss_payload_write_signal_received(fss_payload_write_main_t * const main) F_attribute_visibility_internal_d;
+  extern f_status_t fss_payload_write_signal_received(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_write_signal_received_
 
 #ifdef __cplusplus
index 166b7d1b11b47525ff7b83c6d5592baf2f465cb3..a862b10c092b89d917811fa1942081ff581b418f 100644 (file)
@@ -7,7 +7,7 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_payload_write_error_parameter_same_times_print_
-  void fss_payload_write_error_parameter_same_times_print(fss_payload_write_main_t * const main) {
+  void fss_payload_write_error_parameter_same_times_print(fll_program_data_t * const main) {
 
     if (main->error.verbosity == f_console_verbosity_quiet_e) {
       return;
@@ -28,7 +28,7 @@ extern "C" {
 #endif // _di_fss_payload_write_error_parameter_same_times_print_
 
 #ifndef _di_fss_payload_write_error_parameter_unsupported_eol_print_
-  void fss_payload_write_error_parameter_unsupported_eol_print(fss_payload_write_main_t * const main) {
+  void fss_payload_write_error_parameter_unsupported_eol_print(fll_program_data_t * const main) {
 
     if (main->error.verbosity == f_console_verbosity_quiet_e) {
       return;
@@ -45,7 +45,7 @@ extern "C" {
 #endif // _di_fss_payload_write_error_parameter_unsupported_eol_print_
 
 #ifndef _di_fss_payload_write_error_parameter_value_missing_print_
-  void fss_payload_write_error_parameter_value_missing_print(fss_payload_write_main_t * const main, const f_string_t symbol, const f_string_t parameter) {
+  void fss_payload_write_error_parameter_value_missing_print(fll_program_data_t * const main, const f_string_t symbol, const f_string_t parameter) {
 
     if (main->error.verbosity == f_console_verbosity_quiet_e) {
       return;
@@ -62,7 +62,7 @@ extern "C" {
 #endif // _di_fss_payload_write_error_parameter_value_missing_print_
 
 #ifndef _di_fss_payload_write_process_
-  f_status_t fss_payload_write_process(fss_payload_write_main_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, f_string_dynamic_t *buffer) {
+  f_status_t fss_payload_write_process(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, f_string_dynamic_t *buffer) {
 
     f_status_t status = F_none;
     f_state_t state = macro_f_state_t_initialize(fss_payload_write_common_allocation_large_d, fss_payload_write_common_allocation_small_d, 0, 0, 0, 0, 0);
@@ -169,7 +169,7 @@ extern "C" {
 #endif // _di_fss_payload_write_process_
 
 #ifndef _di_fss_payload_write_process_pipe_
-  f_status_t fss_payload_write_process_pipe(fss_payload_write_main_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer) {
+  f_status_t fss_payload_write_process_pipe(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer) {
 
     f_status_t status = F_none;
     f_status_t status_pipe = F_none;
index dedaa626f41c2d93ce79f49e76aaa5d85d0f56b6..ffe2782c6ea4236213d2435a96e4f1dcaeb55b56 100644 (file)
@@ -19,7 +19,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_payload_write_error_parameter_same_times_print_
-  void fss_payload_write_error_parameter_same_times_print(fss_payload_write_main_t * const main) F_attribute_visibility_internal_d;
+  void fss_payload_write_error_parameter_same_times_print(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_write_error_parameter_same_times_print_
 
 /**
@@ -29,7 +29,7 @@ extern "C" {
  *   The main program data.
  */
 #ifndef _di_fss_payload_write_error_parameter_unsupported_eol_print_
-  void fss_payload_write_error_parameter_unsupported_eol_print(fss_payload_write_main_t * const main) F_attribute_visibility_internal_d;
+  void fss_payload_write_error_parameter_unsupported_eol_print(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_write_error_parameter_unsupported_eol_print_
 
 /**
@@ -43,7 +43,7 @@ extern "C" {
  *   The parameter name, such as "help" in "--help".
  */
 #ifndef _di_fss_payload_write_error_parameter_value_missing_print_
-  void fss_payload_write_error_parameter_value_missing_print(fss_payload_write_main_t * const main, const f_string_t symbol, const f_string_t parameter) F_attribute_visibility_internal_d;
+  void fss_payload_write_error_parameter_value_missing_print(fll_program_data_t * const main, const f_string_t symbol, const f_string_t parameter) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_write_error_parameter_value_missing_print_
 
 /**
@@ -70,7 +70,7 @@ extern "C" {
  *   F_failure (with error bit) for any othe failure.
  */
 #ifndef _di_fss_payload_write_process_
-  extern f_status_t fss_payload_write_process(fss_payload_write_main_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
+  extern f_status_t fss_payload_write_process(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_write_process_
 
 /**
@@ -91,7 +91,7 @@ extern "C" {
  *   F_failure (with error bit) for any othe failure.
  */
 #ifndef _di_fss_payload_write_process_pipe_
-  extern f_status_t fss_payload_write_process_pipe(fss_payload_write_main_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
+  extern f_status_t fss_payload_write_process_pipe(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
 #endif // _di_fss_payload_write_process_pipe_
 
 #ifdef __cplusplus
index 79385169556ca1252c6e515688aad241c45f2b38..f9744fd4c236957a57d6a42e911ae944d6dfb51d 100644 (file)
@@ -4,25 +4,26 @@
 extern "C" {
 #endif
 
-#ifndef _di_fss_status_code_program_version_
-  const f_string_static_t fss_status_code_program_version_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_program_version_s, 0, FSS_STATUS_CODE_program_version_s_length);
-#endif // _di_fss_status_code_program_version_
-
-#ifndef _di_fss_status_code_program_name_
-  const f_string_static_t fss_status_code_program_name_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_program_name_s, 0, FSS_STATUS_CODE_program_name_s_length);
-  const f_string_static_t fss_status_code_program_name_long_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_program_name_long_s, 0, FSS_STATUS_CODE_program_name_long_s_length);
-#endif // _di_fss_status_code_program_name_
+#ifndef _di_fss_status_code_program_help_parameters_
+  const f_string_static_t fss_status_code_program_help_parameters_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_program_help_parameters_s, 0, FSS_STATUS_CODE_program_help_parameters_s_length);
+#endif // _di_fss_status_code_program_help_parameters_
+
+#ifndef _di_fss_status_code_parameters_
+  const f_string_static_t fss_status_code_short_is_fine_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_short_is_fine_s, 0, FSS_STATUS_CODE_short_is_fine_s_length);
+  const f_string_static_t fss_status_code_short_is_warning_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_short_is_warning_s, 0, FSS_STATUS_CODE_short_is_warning_s_length);
+  const f_string_static_t fss_status_code_short_is_error_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_short_is_error_s, 0, FSS_STATUS_CODE_short_is_error_s_length);
+  const f_string_static_t fss_status_code_short_number_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_short_number_s, 0, FSS_STATUS_CODE_short_number_s_length);
+
+  const f_string_static_t fss_status_code_long_is_fine_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_long_is_fine_s, 0, FSS_STATUS_CODE_long_is_fine_s_length);
+  const f_string_static_t fss_status_code_long_is_warning_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_long_is_warning_s, 0, FSS_STATUS_CODE_long_is_warning_s_length);
+  const f_string_static_t fss_status_code_long_is_error_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_long_is_error_s, 0, FSS_STATUS_CODE_long_is_error_s_length);
+  const f_string_static_t fss_status_code_long_number_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_long_number_s, 0, FSS_STATUS_CODE_long_number_s_length);
+#endif // _di_fss_status_code_parameters_
 
 #ifndef _di_fss_status_code_main_delete_
-  f_status_t fss_status_code_main_delete(fss_status_code_main_t * const main) {
-
-    f_console_parameters_delete(&main->parameters);
-
-    f_type_array_lengths_resize(0, &main->remaining);
-
-    macro_f_color_context_t_delete_simple(main->context);
+  f_status_t fss_status_code_main_delete(fll_program_data_t * const main) {
 
-    return F_none;
+    return fll_program_data_delete(main);
   }
 #endif // _di_fss_status_code_main_delete_
 
index ef9e3b225bc2fefc1337fec15478e586fcff022f..b9855dff10aa977e60f8fa786fe598ca66c13139 100644 (file)
@@ -16,6 +16,9 @@
 extern "C" {
 #endif
 
+/**
+ * The program version.
+ */
 #ifndef _di_fss_status_code_program_version_
   #define FSS_STATUS_code_program_version_major_s F_string_ascii_0_s
   #define FSS_STATUS_code_program_version_minor_s F_string_ascii_5_s
@@ -40,6 +43,9 @@ extern "C" {
   extern const f_string_static_t fss_status_code_program_version_s;
 #endif // _di_fss_status_code_program_version_
 
+/**
+ * The program name.
+ */
 #ifndef _di_fss_status_code_program_name_
   #define FSS_STATUS_code_program_name_s      "FSS_STATUS_code"
   #define FSS_STATUS_code_program_name_long_s "FSS Status Code"
@@ -51,18 +57,56 @@ extern "C" {
   const f_string_static_t fss_status_code_program_name_long_s;
 #endif // _di_fss_status_code_program_name_
 
+/**
+ * The program help related data.
+ */
+#ifndef _di_fss_status_code_program_help_parameters_
+  #define FSS_STATUS_CODE_program_help_parameters_s "status code(s)"
+  #define FSS_STATUS_CODE_program_help_parameters_s_length 14
+
+  extern const f_string_static_t fss_status_code_program_help_parameters_s;
+#endif // _di_fss_status_code_program_help_parameters_
+
+/**
+ * The program defines.
+ */
 #ifndef _di_fss_status_code_defines_
   #define fss_status_code_signal_check_d 10000
+#endif // _di_fss_status_code_defines_
 
-  #define fss_status_code_short_is_fine_s    "f"
-  #define fss_status_code_short_is_warning_s "w"
-  #define fss_status_code_short_is_error_s   "e"
-  #define fss_status_code_short_number_s     "n"
-
-  #define fss_status_code_long_is_fine_s    "is_fine"
-  #define fss_status_code_long_is_warning_s "is_warning"
-  #define fss_status_code_long_is_error_s   "is_error"
-  #define fss_status_code_long_number_s     "number"
+/**
+ * The main program parameters.
+ */
+#ifndef _di_fss_status_code_parameters_
+  #define FSS_STATUS_CODE_short_is_fine_s    "f"
+  #define FSS_STATUS_CODE_short_is_warning_s "w"
+  #define FSS_STATUS_CODE_short_is_error_s   "e"
+  #define FSS_STATUS_CODE_short_number_s     "n"
+
+  #define FSS_STATUS_CODE_long_is_fine_s    "is_fine"
+  #define FSS_STATUS_CODE_long_is_warning_s "is_warning"
+  #define FSS_STATUS_CODE_long_is_error_s   "is_error"
+  #define FSS_STATUS_CODE_long_number_s     "number"
+
+  #define FSS_STATUS_CODE_short_is_fine_s_length    1
+  #define FSS_STATUS_CODE_short_is_warning_s_length 1
+  #define FSS_STATUS_CODE_short_is_error_s_length   1
+  #define FSS_STATUS_CODE_short_number_s_length     1
+
+  #define FSS_STATUS_CODE_long_is_fine_s_length    7
+  #define FSS_STATUS_CODE_long_is_warning_s_length 10
+  #define FSS_STATUS_CODE_long_is_error_s_length   8
+  #define FSS_STATUS_CODE_long_number_s_length     6
+
+  extern const f_string_static_t fss_status_code_short_is_fine_s;
+  extern const f_string_static_t fss_status_code_short_is_warning_s;
+  extern const f_string_static_t fss_status_code_short_is_error_s;
+  extern const f_string_static_t fss_status_code_short_number_s;
+
+  extern const f_string_static_t fss_status_code_long_is_fine_s;
+  extern const f_string_static_t fss_status_code_long_is_warning_s;
+  extern const f_string_static_t fss_status_code_long_is_error_s;
+  extern const f_string_static_t fss_status_code_long_number_s;
 
   enum {
     fss_status_code_parameter_help_e,
@@ -92,44 +136,15 @@ extern "C" {
       macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_version_s.string, f_console_standard_long_version_s.string, 0, 0, f_console_type_inverse_e), \
-      macro_f_console_parameter_t_initialize(fss_status_code_short_is_fine_s, fss_status_code_long_is_fine_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_status_code_short_is_warning_s, fss_status_code_long_is_warning_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_status_code_short_is_error_s, fss_status_code_long_is_error_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(fss_status_code_short_number_s, fss_status_code_long_number_s, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_status_code_short_is_fine_s.string, fss_status_code_long_is_fine_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_status_code_short_is_warning_s.string, fss_status_code_long_is_warning_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_status_code_short_is_error_s.string, fss_status_code_long_is_error_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(fss_status_code_short_number_s.string, fss_status_code_long_number_s.string, 0, 0, f_console_type_normal_e), \
     }
 
   #define fss_status_code_total_parameters_d 13
 #endif // _di_fss_status_code_defines_
 
-#ifndef _di_fss_status_code_main_t_
-  typedef struct {
-    f_console_parameters_t parameters;
-
-    f_array_lengths_t remaining;
-    bool process_pipe;
-
-    fl_print_t output;
-    fl_print_t error;
-    fl_print_t warning;
-
-    f_signal_t signal;
-
-    f_color_context_t context;
-  } fss_status_code_main_t;
-
-  #define fss_status_code_main_t_initialize \
-    { \
-      f_console_parameters_t_initialize, \
-      f_array_lengths_t_initialize, \
-      F_false, \
-      fl_print_t_initialize, \
-      macro_fl_print_t_initialize_error(), \
-      macro_fl_print_t_initialize_warning(), \
-      f_signal_t_initialize, \
-      f_color_context_t_initialize, \
-    }
-#endif // _di_fss_status_code_main_t_
-
 /**
  * Deallocate main.
  *
@@ -146,7 +161,7 @@ extern "C" {
  * @see fss_status_code_main()
  */
 #ifndef _di_fss_status_code_main_delete_
-  extern f_status_t fss_status_code_main_delete(fss_status_code_main_t * const main);
+  extern f_status_t fss_status_code_main_delete(fll_program_data_t * const main);
 #endif // _di_fss_status_code_main_delete_
 
 #ifdef __cplusplus
index 730cd8d9b5cb7dc465148b9239ed88d62fcb110c..c3247ecaa791e86d32f453577ab54b7dac328aa5 100644 (file)
@@ -39,7 +39,7 @@ extern "C" {
     fll_program_print_help_option(file, context, fss_status_code_short_is_error_s, fss_status_code_long_is_error_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "  Print F_true if the error code is an error, F_false otherwise.");
     fll_program_print_help_option(file, context, fss_status_code_short_number_s, fss_status_code_long_number_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "    Convert status code name to number.");
 
-    fll_program_print_help_usage(file, context, fss_status_code_program_name_s, "status code(s)");
+    fll_program_print_help_usage(file, context, fss_status_code_program_name_s, fss_status_code_program_help_parameters_s);
 
     funlockfile(file.stream);
 
@@ -48,7 +48,7 @@ extern "C" {
 #endif // _di_fss_status_code_print_help_
 
 #ifndef _di_fss_status_code_main_
-  f_status_t fss_status_code_main(fss_status_code_main_t * const main, const f_console_arguments_t *arguments) {
+  f_status_t fss_status_code_main(fll_program_data_t * const main, const f_console_arguments_t *arguments) {
 
     f_status_t status = F_none;
 
@@ -60,7 +60,7 @@ extern "C" {
       f_console_parameter_id_t ids[3] = { fss_status_code_parameter_no_color_e, fss_status_code_parameter_light_e, fss_status_code_parameter_dark_e };
       const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
 
-      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
+      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->context);
 
       main->output.set = &main->context.set;
       main->error.set = &main->context.set;
@@ -186,7 +186,7 @@ extern "C" {
       return F_status_set_error(status);
     }
 
-    if (main->remaining.used == 0 && !main->process_pipe) {
+    if (main->parameters.remaining.used == 0 && !main->process_pipe) {
       fll_print_format("%[You failed to specify an error code.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
 
       fss_status_code_main_delete(main);
@@ -200,12 +200,12 @@ extern "C" {
         // @todo call fss_status_code_process_check() here for all main from pipe that is space separated.
       }
 
-      if (main->remaining.used > 0) {
+      if (main->parameters.remaining.used > 0) {
         uint16_t signal_check = 0;
 
         flockfile(main->output.to.stream);
 
-        for (f_array_length_t i = 0; i < main->remaining.used; ++i) {
+        for (f_array_length_t i = 0; i < main->parameters.remaining.used; ++i) {
 
           if (!((++signal_check) % fss_status_code_signal_check_d)) {
             if (fss_status_code_signal_received(main)) {
@@ -216,7 +216,7 @@ extern "C" {
             signal_check = 0;
           }
 
-          status2 = fss_status_code_process_check(main, arguments->argv[main->remaining.array[i]]);
+          status2 = fss_status_code_process_check(main, arguments->argv[main->parameters.remaining.array[i]]);
 
           if (F_status_is_error(status2) && status == F_none) {
             status = status2;
@@ -231,12 +231,12 @@ extern "C" {
         // @todo call fss_status_code_process_number() here for all main from pipe that is space separated.
       }
 
-      if (main->remaining.used > 0) {
+      if (main->parameters.remaining.used > 0) {
         uint16_t signal_check = 0;
 
         flockfile(main->output.to.stream);
 
-        for (f_array_length_t i = 0; i < main->remaining.used; ++i) {
+        for (f_array_length_t i = 0; i < main->parameters.remaining.used; ++i) {
 
           if (!((++signal_check) % fss_status_code_signal_check_d)) {
             if (fss_status_code_signal_received(main)) {
@@ -247,7 +247,7 @@ extern "C" {
             signal_check = 0;
           }
 
-          status2 = fss_status_code_process_number(main, arguments->argv[main->remaining.array[i]]);
+          status2 = fss_status_code_process_number(main, arguments->argv[main->parameters.remaining.array[i]]);
 
           if (F_status_is_error(status2) && status == F_none) {
             status = status2;
@@ -262,12 +262,12 @@ extern "C" {
         // @todo call fss_status_code_process_normal() here for all main from pipe that is space separated.
       }
 
-      if (main->remaining.used > 0) {
+      if (main->parameters.remaining.used > 0) {
         uint16_t signal_check = 0;
 
         flockfile(main->output.to.stream);
 
-        for (f_array_length_t i = 0; i < main->remaining.used; ++i) {
+        for (f_array_length_t i = 0; i < main->parameters.remaining.used; ++i) {
 
           if (!((++signal_check) % fss_status_code_signal_check_d)) {
             if (fss_status_code_signal_received(main)) {
@@ -278,7 +278,7 @@ extern "C" {
             signal_check = 0;
           }
 
-          status2 = fss_status_code_process_normal(main, arguments->argv[main->remaining.array[i]]);
+          status2 = fss_status_code_process_normal(main, arguments->argv[main->parameters.remaining.array[i]]);
 
           if (F_status_is_error(status2) && status == F_none) {
             status = status2;
index 9b4ad8ee52a11d4449f373833206cc0049954770..1cffaa2bdacfdd60bc172485ab323ff728b1d669 100644 (file)
@@ -91,7 +91,7 @@ extern "C" {
  * @see fss_status_code_main_delete()
  */
 #ifndef _di_fss_status_code_main_
-  extern f_status_t fss_status_code_main(fss_status_code_main_t * const main, const f_console_arguments_t *arguments);
+  extern f_status_t fss_status_code_main(fll_program_data_t * const main, const f_console_arguments_t *arguments);
 #endif // _di_fss_status_code_main_
 
 #ifdef __cplusplus
index 29dac47e6649d7be21202dfbcf91ce7c8abb7443..836c44793bb1d3470ee02d6c20c997d478a1b573 100644 (file)
@@ -3,7 +3,7 @@
 int main(const int argc, const f_string_t *argv) {
 
   const f_console_arguments_t arguments = { argc, argv };
-  fss_status_code_main_t data = fss_status_code_main_t_initialize;
+  fll_program_data_t data = fll_program_data_t_initialize;
 
   if (f_pipe_input_exists()) {
     data.process_pipe = F_true;
index 1e848a2978539d4105d48171c8f16c97510c1897..b0617cace45d4047ca5d086cc6d5d589d6e48c8f 100644 (file)
@@ -6,7 +6,7 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_status_code_print_signal_received_
-  void fss_status_code_print_signal_received(fss_status_code_main_t * const main, const f_status_t signal) {
+  void fss_status_code_print_signal_received(fll_program_data_t * const main, const f_status_t signal) {
 
     if (main->warning.verbosity != f_console_verbosity_verbose_e) return;
 
@@ -24,7 +24,7 @@ extern "C" {
 #endif // _di_fss_status_code_print_signal_received_
 
 #ifndef _di_fss_status_code_signal_received_
-  f_status_t fss_status_code_signal_received(fss_status_code_main_t * const main) {
+  f_status_t fss_status_code_signal_received(fll_program_data_t * const main) {
 
     if (main->signal.id == -1) {
       return F_false;
index 3b433f666bafd9bc585295d963753f3ccf9128c0..ecd02d2a056e662bec40fa1de4e8f4ff7ec702bf 100644 (file)
@@ -21,7 +21,7 @@ extern "C" {
  *   The signal received.
  */
 #ifndef _di_fss_status_code_print_signal_received_
-  extern void fss_status_code_print_signal_received(fss_status_code_main_t * const main, const f_status_t signal) F_attribute_visibility_internal_d;
+  extern void fss_status_code_print_signal_received(fll_program_data_t * const main, const f_status_t signal) F_attribute_visibility_internal_d;
 #endif // _di_fss_status_code_print_signal_received_
 
 /**
@@ -39,7 +39,7 @@ extern "C" {
  * @see f_signal_read()
  */
 #ifndef _di_fss_status_code_signal_received_
-  extern f_status_t fss_status_code_signal_received(fss_status_code_main_t * const main) F_attribute_visibility_internal_d;
+  extern f_status_t fss_status_code_signal_received(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_fss_status_code_signal_received_
 
 #ifdef __cplusplus
index 30bec61c5609f9d2030d00bbf680651ce67900c2..2b0f84a2a33f9e3669baf716500408d6ec13d26d 100644 (file)
@@ -7,7 +7,7 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_status_code_process_check_
-  f_status_t fss_status_code_process_check(fss_status_code_main_t * const main, const f_string_t value) {
+  f_status_t fss_status_code_process_check(fll_program_data_t * const main, const f_string_t value) {
 
     f_number_unsigned_t number = 0;
 
@@ -52,7 +52,7 @@ extern "C" {
 #endif // _di_fss_status_code_process_check_
 
 #ifndef _di_fss_status_code_process_number_
-  f_status_t fss_status_code_process_number(fss_status_code_main_t * const main, const f_string_t value) {
+  f_status_t fss_status_code_process_number(fll_program_data_t * const main, const f_string_t value) {
 
     f_status_t status = F_none;
 
@@ -110,7 +110,7 @@ extern "C" {
 #endif // _di_fss_status_code_process_number_
 
 #ifndef _di_fss_status_code_process_normal_
-  f_status_t fss_status_code_process_normal(fss_status_code_main_t * const main, const f_string_t value) {
+  f_status_t fss_status_code_process_normal(fll_program_data_t * const main, const f_string_t value) {
 
     f_number_unsigned_t number = 0;
 
@@ -140,7 +140,7 @@ extern "C" {
 #endif // _di_fss_status_code_process_normal_
 
 #ifndef _di_fss_status_code_convert_number_
-  f_status_t fss_status_code_convert_number(fss_status_code_main_t * const main, const f_string_t value, f_number_unsigned_t *number) {
+  f_status_t fss_status_code_convert_number(fll_program_data_t * const main, const f_string_t value, f_number_unsigned_t *number) {
 
     const f_string_range_t range = macro_f_string_range_t_initialize(strlen(value));
 
index c7f630f32321069c81a9b31f952b1970c5c97254..648718da5e4880e0eebf40465965ba866c994297 100644 (file)
@@ -34,7 +34,7 @@ extern "C" {
  * @see fss_status_code_convert_number()
  */
 #ifndef _di_fss_status_code_process_check_
-  extern f_status_t fss_status_code_process_check(fss_status_code_main_t * const main, const f_string_t value) F_attribute_visibility_internal_d;
+  extern f_status_t fss_status_code_process_check(fll_program_data_t * const main, const f_string_t value) F_attribute_visibility_internal_d;
 #endif // _di_fss_status_code_process_check_
 
 /**
@@ -56,7 +56,7 @@ extern "C" {
  * @see fll_fss_status_string_from()
  */
 #ifndef _di_fss_status_code_process_number_
-  extern f_status_t fss_status_code_process_number(fss_status_code_main_t * const main, const f_string_t value) F_attribute_visibility_internal_d;
+  extern f_status_t fss_status_code_process_number(fll_program_data_t * const main, const f_string_t value) F_attribute_visibility_internal_d;
 #endif // _di_fss_status_code_process_number_
 
 /**
@@ -83,7 +83,7 @@ extern "C" {
  * @see fss_status_code_convert_number()
  */
 #ifndef _di_fss_status_code_process_normal_
-  extern f_status_t fss_status_code_process_normal(fss_status_code_main_t * const main, const f_string_t value) F_attribute_visibility_internal_d;
+  extern f_status_t fss_status_code_process_normal(fll_program_data_t * const main, const f_string_t value) F_attribute_visibility_internal_d;
 #endif // _di_fss_status_code_process_normal_
 
 /**
@@ -111,7 +111,7 @@ extern "C" {
  * @see fl_console_parameter_to_number_unsigned()
  */
 #ifndef _di_fss_status_code_convert_number_
-  extern f_status_t fss_status_code_convert_number(fss_status_code_main_t * const main, const f_string_t value, f_number_unsigned_t *number) F_attribute_visibility_internal_d;
+  extern f_status_t fss_status_code_convert_number(fll_program_data_t * const main, const f_string_t value, f_number_unsigned_t *number) F_attribute_visibility_internal_d;
 #endif // _di_fss_status_code_convert_number_
 
 #ifdef __cplusplus
index c177de7d0882a968f49655fcae8c64a65b760afc..5f2872cebf149ec543772f53db3729240c816af5 100644 (file)
@@ -13,12 +13,33 @@ extern "C" {
   const f_string_static_t iki_read_program_name_long_s = macro_f_string_static_t_initialize(IKI_READ_program_name_long_s, 0, IKI_READ_program_name_long_s_length);
 #endif // _di_iki_read_program_name_
 
+#ifndef _di_iki_read_parameters_
+  const f_string_static_t iki_read_short_at_s = macro_f_string_static_t_initialize(IKI_READ_short_at_s, 0, IKI_READ_short_at_s_length);
+  const f_string_static_t iki_read_short_content_s = macro_f_string_static_t_initialize(IKI_READ_short_content_s, 0, IKI_READ_short_content_s_length);
+  const f_string_static_t iki_read_short_line_s = macro_f_string_static_t_initialize(IKI_READ_short_line_s, 0, IKI_READ_short_line_s_length);
+  const f_string_static_t iki_read_short_literal_s = macro_f_string_static_t_initialize(IKI_READ_short_literal_s, 0, IKI_READ_short_literal_s_length);
+  const f_string_static_t iki_read_short_name_s = macro_f_string_static_t_initialize(IKI_READ_short_name_s, 0, IKI_READ_short_name_s_length);
+  const f_string_static_t iki_read_short_object_s = macro_f_string_static_t_initialize(IKI_READ_short_object_s, 0, IKI_READ_short_object_s_length);
+  const f_string_static_t iki_read_short_substitute_s = macro_f_string_static_t_initialize(IKI_READ_short_substitute_s, 0, IKI_READ_short_substitute_s_length);
+  const f_string_static_t iki_read_short_total_s = macro_f_string_static_t_initialize(IKI_READ_short_total_s, 0, IKI_READ_short_total_s_length);
+  const f_string_static_t iki_read_short_whole_s = macro_f_string_static_t_initialize(IKI_READ_short_whole_s, 0, IKI_READ_short_whole_s_length);
+
+  const f_string_static_t iki_read_long_at_s = macro_f_string_static_t_initialize(IKI_READ_long_at_s, 0, IKI_READ_long_at_s_length);
+  const f_string_static_t iki_read_long_content_s = macro_f_string_static_t_initialize(IKI_READ_long_content_s, 0, IKI_READ_long_content_s_length);
+  const f_string_static_t iki_read_long_line_s = macro_f_string_static_t_initialize(IKI_READ_long_line_s, 0, IKI_READ_long_line_s_length);
+  const f_string_static_t iki_read_long_literal_s = macro_f_string_static_t_initialize(IKI_READ_long_literal_s, 0, IKI_READ_long_literal_s_length);
+  const f_string_static_t iki_read_long_name_s = macro_f_string_static_t_initialize(IKI_READ_long_name_s, 0, IKI_READ_long_name_s_length);
+  const f_string_static_t iki_read_long_object_s = macro_f_string_static_t_initialize(IKI_READ_long_object_s, 0, IKI_READ_long_object_s_length);
+  const f_string_static_t iki_read_long_substitute_s = macro_f_string_static_t_initialize(IKI_READ_long_substitute_s, 0, IKI_READ_long_substitute_s_length);
+  const f_string_static_t iki_read_long_total_s = macro_f_string_static_t_initialize(IKI_READ_long_total_s, 0, IKI_READ_long_total_s_length);
+  const f_string_static_t iki_read_long_whole_s = macro_f_string_static_t_initialize(IKI_READ_long_whole_s, 0, IKI_READ_long_whole_s_length);
+#endif // _di_iki_read_parameters_
+
 #ifndef _di_iki_read_main_delete_
   f_status_t iki_read_main_delete(iki_read_main_t * const main) {
 
     f_console_parameters_delete(&main->parameters);
 
-    f_type_array_lengths_resize(0, &main->remaining);
     f_string_dynamic_resize(0, &main->buffer);
 
     macro_f_color_context_t_delete_simple(main->context);
index a8a2c431362035470574c9db94bc84165b3d9fb6..012f9a5f1cb628d3102bab8d67d7b23a685a3be9 100644 (file)
@@ -16,6 +16,9 @@
 extern "C" {
 #endif
 
+/**
+ * The program version.
+ */
 #ifndef _di_iki_read_program_version_
   #define IKI_READ_program_version_major_s F_string_ascii_0_s
   #define IKI_READ_program_version_minor_s F_string_ascii_5_s
@@ -42,6 +45,9 @@ extern "C" {
   extern const f_string_static_t iki_read_program_version_s;
 #endif // _di_iki_read_program_version_
 
+/**
+ * The program name.
+ */
 #ifndef _di_iki_read_program_name_
   #define IKI_READ_program_name_s      "iki_read"
   #define IKI_READ_program_name_long_s "IKI Read"
@@ -53,6 +59,9 @@ extern "C" {
   extern const f_string_static_t iki_read_program_name_long_s;
 #endif // _di_iki_read_program_name_
 
+/**
+ * The program defines.
+ */
 #ifndef _di_iki_read_defines_
   #define iki_read_signal_check_d 10000
 
@@ -62,26 +71,71 @@ extern "C" {
     iki_read_mode_object_e,
     iki_read_mode_total_e,
   };
+#endif // _di_iki_read_defines_
 
-  #define iki_read_short_at_s         "a"
-  #define iki_read_short_content_s    "c"
-  #define iki_read_short_line_s       "l"
-  #define iki_read_short_literal_s    "L"
-  #define iki_read_short_name_s       "n"
-  #define iki_read_short_object_s     "o"
-  #define iki_read_short_substitute_s "s"
-  #define iki_read_short_total_s      "t"
-  #define iki_read_short_whole_s      "w"
-
-  #define iki_read_long_at_s         "at"
-  #define iki_read_long_content_s    "content"
-  #define iki_read_long_line_s       "line"
-  #define iki_read_long_literal_s    "literal"
-  #define iki_read_long_name_s       "name"
-  #define iki_read_long_object_s     "object"
-  #define iki_read_long_substitute_s "substitute"
-  #define iki_read_long_total_s      "total"
-  #define iki_read_long_whole_s      "whole"
+/**
+ * The main program parameters.
+ */
+#ifndef _di_iki_read_parameters_
+  #define IKI_READ_short_at_s         "a"
+  #define IKI_READ_short_content_s    "c"
+  #define IKI_READ_short_line_s       "l"
+  #define IKI_READ_short_literal_s    "L"
+  #define IKI_READ_short_name_s       "n"
+  #define IKI_READ_short_object_s     "o"
+  #define IKI_READ_short_substitute_s "s"
+  #define IKI_READ_short_total_s      "t"
+  #define IKI_READ_short_whole_s      "w"
+
+  #define IKI_READ_long_at_s         "at"
+  #define IKI_READ_long_content_s    "content"
+  #define IKI_READ_long_line_s       "line"
+  #define IKI_READ_long_literal_s    "literal"
+  #define IKI_READ_long_name_s       "name"
+  #define IKI_READ_long_object_s     "object"
+  #define IKI_READ_long_substitute_s "substitute"
+  #define IKI_READ_long_total_s      "total"
+  #define IKI_READ_long_whole_s      "whole"
+
+  #define IKI_READ_short_at_s_length         1
+  #define IKI_READ_short_content_s_length    1
+  #define IKI_READ_short_line_s_length       1
+  #define IKI_READ_short_literal_s_length    1
+  #define IKI_READ_short_name_s_length       1
+  #define IKI_READ_short_object_s_length     1
+  #define IKI_READ_short_substitute_s_length 1
+  #define IKI_READ_short_total_s_length      1
+  #define IKI_READ_short_whole_s_length      1
+
+  #define IKI_READ_long_at_s_length         2
+  #define IKI_READ_long_content_s_length    7
+  #define IKI_READ_long_line_s_length       4
+  #define IKI_READ_long_literal_s_length    7
+  #define IKI_READ_long_name_s_length       4
+  #define IKI_READ_long_object_s_length     7
+  #define IKI_READ_long_substitute_s_length 10
+  #define IKI_READ_long_total_s_length      5
+  #define IKI_READ_long_whole_s_length      5
+
+  extern const f_string_static_t iki_read_short_at_s;
+  extern const f_string_static_t iki_read_short_content_s;
+  extern const f_string_static_t iki_read_short_line_s;
+  extern const f_string_static_t iki_read_short_literal_s;
+  extern const f_string_static_t iki_read_short_name_s;
+  extern const f_string_static_t iki_read_short_object_s;
+  extern const f_string_static_t iki_read_short_substitute_s;
+  extern const f_string_static_t iki_read_short_total_s;
+  extern const f_string_static_t iki_read_short_whole_s;
+
+  extern const f_string_static_t iki_read_long_at_s;
+  extern const f_string_static_t iki_read_long_content_s;
+  extern const f_string_static_t iki_read_long_line_s;
+  extern const f_string_static_t iki_read_long_literal_s;
+  extern const f_string_static_t iki_read_long_name_s;
+  extern const f_string_static_t iki_read_long_object_s;
+  extern const f_string_static_t iki_read_long_substitute_s;
+  extern const f_string_static_t iki_read_long_total_s;
+  extern const f_string_static_t iki_read_long_whole_s;
 
   enum {
     iki_read_parameter_help_e,
@@ -116,19 +170,19 @@ extern "C" {
       macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_version_s.string, f_console_standard_long_version_s.string, 0, 0, f_console_type_inverse_e), \
-      macro_f_console_parameter_t_initialize(iki_read_short_at_s, iki_read_long_at_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(iki_read_short_content_s, iki_read_long_content_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(iki_read_short_line_s, iki_read_long_line_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(iki_read_short_literal_s, iki_read_long_literal_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(iki_read_short_name_s, iki_read_long_name_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(iki_read_short_object_s, iki_read_long_object_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(iki_read_short_whole_s, iki_read_long_whole_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(iki_read_short_substitute_s, iki_read_long_substitute_s, 0, 3, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(iki_read_short_total_s, iki_read_long_total_s, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(iki_read_short_at_s.string, iki_read_long_at_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(iki_read_short_content_s.string, iki_read_long_content_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(iki_read_short_line_s.string, iki_read_long_line_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(iki_read_short_literal_s.string, iki_read_long_literal_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(iki_read_short_name_s.string, iki_read_long_name_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(iki_read_short_object_s.string, iki_read_long_object_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(iki_read_short_whole_s.string, iki_read_long_whole_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(iki_read_short_substitute_s.string, iki_read_long_substitute_s.string, 0, 3, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(iki_read_short_total_s.string, iki_read_long_total_s.string, 0, 0, f_console_type_normal_e), \
     }
 
   #define iki_read_total_parameters_d 18
-#endif // _di_iki_read_defines_
+#endif // _di_iki_read_parameters_
 
 #ifndef _di_iki_read_substitution_t_
   #define iki_read_substitution_vocabulary_s "vocabulary"
@@ -172,11 +226,24 @@ extern "C" {
   #define macro_iki_read_substitutions_t_adjust(status, replacements, length) macro_f_memory_structure_adjust(status, replacements, iki_read_substitution_t, length)
 #endif // _di_iki_read_substitutions_t_
 
+/**
+ * The main program data.
+ *
+ * parameters:   The state of pre-defined parameters passed to the program.
+ * remaining:    The remaining, non-pre-defined parameters, passed to the program.
+ * process_pipe: Designate whether or not to process the input pipe.
+ * output:       The output file for general printing.
+ * error:        The output file for error printing.
+ * warning:      The output file for warning printing.
+ * signal:       The process signal management structure.
+ * context:      The color context.
+ *
+ * @todo
+ */
 #ifndef _di_iki_read_main_t_
   typedef struct {
     f_console_parameters_t parameters;
 
-    f_array_lengths_t remaining;
     bool process_pipe;
 
     fl_print_t output;
index b10e3941df6be153d8b099b53a8a0c60e751cd80..8c5b5a082334b9baa491f609e5ae109b62f5c45b 100644 (file)
@@ -6,15 +6,6 @@
 extern "C" {
 #endif
 
-#ifndef _di_iki_read_program_version_
-  const f_string_static_t iki_read_program_version_s = macro_f_string_static_t_initialize(IKI_READ_program_version_s, 0, IKI_READ_program_version_s_length);
-#endif // _di_iki_read_program_version_
-
-#ifndef _di_iki_read_program_name_
-  const f_string_static_t iki_read_program_name_s = macro_f_string_static_t_initialize(IKI_READ_program_name_s, 0, IKI_READ_program_name_s_length);
-  const f_string_static_t iki_read_program_name_long_s = macro_f_string_static_t_initialize(IKI_READ_program_name_long_s, 0, IKI_READ_program_name_long_s_length);
-#endif // _di_iki_read_program_name_
-
 #ifndef _di_iki_read_print_help_
   f_status_t iki_read_print_help(const f_file_t file, const f_color_context_t context) {
 
@@ -50,7 +41,7 @@ extern "C" {
 
     fll_program_print_help_option(file, context, iki_read_short_substitute_s, iki_read_long_substitute_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Substitute the entire variable for the given name and content value with the given string.");
 
-    fll_program_print_help_usage(file, context, iki_read_program_name_s, "filename(s)");
+    fll_program_print_help_usage(file, context, iki_read_program_name_s, fll_program_parameter_filenames_s);
 
     fl_print_format(" %[Notes:%]%r", file.stream, context.set.important, context.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", file.stream, f_string_eol_s, f_string_eol_s);
@@ -87,7 +78,7 @@ extern "C" {
       f_console_parameter_id_t ids[3] = { iki_read_parameter_no_color_e, iki_read_parameter_light_e, iki_read_parameter_dark_e };
       const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
 
-      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
+      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->context);
 
       main->output.set = &main->context.set;
       main->error.set = &main->context.set;
@@ -180,7 +171,7 @@ extern "C" {
       return F_none;
     }
 
-    if (main->remaining.used > 0 || main->process_pipe) {
+    if (main->parameters.remaining.used > 0 || main->process_pipe) {
       if (main->parameters.array[iki_read_parameter_at_e].result == f_console_result_found_e) {
         if (main->error.verbosity != f_console_verbosity_quiet_e) {
           flockfile(main->error.to.stream);
@@ -443,12 +434,12 @@ extern "C" {
         f_string_dynamic_resize(0, &main->buffer);
       }
 
-      if (F_status_is_fine(status) && main->remaining.used > 0) {
+      if (F_status_is_fine(status) && main->parameters.remaining.used > 0) {
         f_array_length_t i = 0;
         f_array_length_t total = 0;
         f_file_t file = f_file_t_initialize;
 
-        for (uint16_t signal_check = 0; i < main->remaining.used; ++i) {
+        for (uint16_t signal_check = 0; i < main->parameters.remaining.used; ++i) {
 
           if (!((++signal_check) % iki_read_signal_check_d)) {
             if (iki_read_signal_received(main)) {
@@ -462,17 +453,17 @@ extern "C" {
           macro_f_file_t_reset(file);
           total = 0;
 
-          status = f_file_open(arguments->argv[main->remaining.array[i]], 0, &file);
+          status = f_file_open(arguments->argv[main->parameters.remaining.array[i]], 0, &file);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_open", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_open", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e);
             break;
           }
 
           status = f_file_size_by_id(file.id, &total);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e);
 
             f_file_stream_close(F_true, &file);
             break;
@@ -489,11 +480,11 @@ extern "C" {
           f_file_stream_close(F_true, &file);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_read_until", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_read_until", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e);
             break;
           }
 
-          status = iki_read_process_buffer(main, arguments, arguments->argv[main->remaining.array[i]]);
+          status = iki_read_process_buffer(main, arguments, arguments->argv[main->parameters.remaining.array[i]]);
           if (F_status_is_error(status)) break;
 
           // Clear buffers before repeating the loop.
index 37f36f4112349c5231b07b3e98baa9e12912ba73..cdd85e6eb3e2f84d91674566c1c802609c7e58a8 100644 (file)
@@ -13,12 +13,25 @@ extern "C" {
   const f_string_static_t iki_write_program_name_long_s = macro_f_string_static_t_initialize(IKI_WRITE_program_name_long_s, 0, IKI_WRITE_program_name_long_s_length);
 #endif // _di_iki_write_program_name_
 
+#ifndef _di_iki_write_parameters_
+  const f_string_static_t iki_write_short_file_s = macro_f_string_static_t_initialize(IKI_WRITE_short_file_s, 0, IKI_WRITE_short_file_s_length);
+  const f_string_static_t iki_write_short_content_s = macro_f_string_static_t_initialize(IKI_WRITE_short_content_s, 0, IKI_WRITE_short_content_s_length);
+  const f_string_static_t iki_write_short_double_s = macro_f_string_static_t_initialize(IKI_WRITE_short_double_s, 0, IKI_WRITE_short_double_s_length);
+  const f_string_static_t iki_write_short_object_s = macro_f_string_static_t_initialize(IKI_WRITE_short_object_s, 0, IKI_WRITE_short_object_s_length);
+  const f_string_static_t iki_write_short_single_s = macro_f_string_static_t_initialize(IKI_WRITE_short_single_s, 0, IKI_WRITE_short_single_s_length);
+
+  const f_string_static_t iki_write_long_file_s = macro_f_string_static_t_initialize(IKI_WRITE_long_file_s, 0, IKI_WRITE_long_file_s_length);
+  const f_string_static_t iki_write_long_content_s = macro_f_string_static_t_initialize(IKI_WRITE_long_content_s, 0, IKI_WRITE_long_content_s_length);
+  const f_string_static_t iki_write_long_double_s = macro_f_string_static_t_initialize(IKI_WRITE_long_double_s, 0, IKI_WRITE_long_double_s_length);
+  const f_string_static_t iki_write_long_object_s = macro_f_string_static_t_initialize(IKI_WRITE_long_object_s, 0, IKI_WRITE_long_object_s_length);
+  const f_string_static_t iki_write_long_single_s = macro_f_string_static_t_initialize(IKI_WRITE_long_single_s, 0, IKI_WRITE_long_single_s_length);
+#endif // _di_iki_write_parameters_
+
 #ifndef _di_iki_write_main_delete_
   f_status_t iki_write_main_delete(iki_write_main_t * const main) {
 
     f_console_parameters_delete(&main->parameters);
 
-    f_type_array_lengths_resize(0, &main->remaining);
     f_string_dynamic_resize(0, &main->buffer);
 
     macro_f_color_context_t_delete_simple(main->context);
index 2042e134879885baeb6308b06c1609b2c6e1975c..b3d4ba776a08633e295ec402697744777309e165 100644 (file)
@@ -16,6 +16,9 @@
 extern "C" {
 #endif
 
+/**
+ * The program version.
+ */
 #ifndef _di_iki_write_program_version_
   #define IKI_WRITE_program_version_major_s F_string_ascii_0_s
   #define IKI_WRITE_program_version_minor_s F_string_ascii_5_s
@@ -42,6 +45,9 @@ extern "C" {
   extern const f_string_static_t iki_write_program_version_s;
 #endif // _di_iki_write_program_version_
 
+/**
+ * The program name.
+ */
 #ifndef _di_iki_write_program_name_
   #define iki_write_program_name_s      "iki_write"
   #define iki_write_program_name_long_s "IKI Write"
@@ -53,20 +59,52 @@ extern "C" {
   extern const f_string_static_t iki_write_program_name_long_s;
 #endif // _di_iki_write_program_name_
 
+/**
+ * The program defines.
+ */
 #ifndef _di_iki_write_defines_
   #define iki_write_signal_check_d 10000
+#endif // _di_iki_write_defines_
 
-  #define iki_write_short_file_s    "f"
-  #define iki_write_short_content_s "c"
-  #define iki_write_short_double_s  "d"
-  #define iki_write_short_object_s  "o"
-  #define iki_write_short_single_s  "s"
-
-  #define iki_write_long_file_s    "file"
-  #define iki_write_long_content_s "content"
-  #define iki_write_long_double_s  "double"
-  #define iki_write_long_object_s  "object"
-  #define iki_write_long_single_s  "single"
+/**
+ * The main program parameters.
+ */
+#ifndef _di_iki_write_parameters_
+  #define IKI_WRITE_short_file_s    "f"
+  #define IKI_WRITE_short_content_s "c"
+  #define IKI_WRITE_short_double_s  "d"
+  #define IKI_WRITE_short_object_s  "o"
+  #define IKI_WRITE_short_single_s  "s"
+
+  #define IKI_WRITE_long_file_s    "file"
+  #define IKI_WRITE_long_content_s "content"
+  #define IKI_WRITE_long_double_s  "double"
+  #define IKI_WRITE_long_object_s  "object"
+  #define IKI_WRITE_long_single_s  "single"
+
+  #define IKI_WRITE_short_file_s_length    1
+  #define IKI_WRITE_short_content_s_length 1
+  #define IKI_WRITE_short_double_s_length  1
+  #define IKI_WRITE_short_object_s_length  1
+  #define IKI_WRITE_short_single_s_length  1
+
+  #define IKI_WRITE_long_file_s_length    4
+  #define IKI_WRITE_long_content_s_length 7
+  #define IKI_WRITE_long_double_s_length  6
+  #define IKI_WRITE_long_object_s_length  6
+  #define IKI_WRITE_long_single_s_length  6
+
+  extern const f_string_static_t iki_write_short_file_s;
+  extern const f_string_static_t iki_write_short_content_s;
+  extern const f_string_static_t iki_write_short_double_s;
+  extern const f_string_static_t iki_write_short_object_s;
+  extern const f_string_static_t iki_write_short_single_s;
+
+  extern const f_string_static_t iki_write_long_file_s;
+  extern const f_string_static_t iki_write_long_content_s;
+  extern const f_string_static_t iki_write_long_double_s;
+  extern const f_string_static_t iki_write_long_object_s;
+  extern const f_string_static_t iki_write_long_single_s;
 
   enum {
     iki_write_parameter_help_e,
@@ -97,21 +135,34 @@ extern "C" {
       macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_version_s.string, f_console_standard_long_version_s.string, 0, 0, f_console_type_inverse_e), \
-      macro_f_console_parameter_t_initialize(iki_write_short_file_s, iki_write_long_file_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(iki_write_short_content_s, iki_write_long_content_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(iki_write_short_double_s, iki_write_long_double_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(iki_write_short_object_s, iki_write_long_object_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(iki_write_short_single_s, iki_write_long_single_s, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(iki_write_short_file_s.string, iki_write_long_file_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(iki_write_short_content_s.string, iki_write_long_content_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(iki_write_short_double_s.string, iki_write_long_double_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(iki_write_short_object_s.string, iki_write_long_object_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(iki_write_short_single_s.string, iki_write_long_single_s.string, 0, 0, f_console_type_normal_e), \
     }
 
   #define iki_write_total_parameters_d 14
-#endif // _di_iki_write_defines_
+#endif // _di_iki_write_parameters_
 
+/**
+ * The main program data.
+ *
+ * parameters:   The state of pre-defined parameters passed to the program.
+ * remaining:    The remaining, non-pre-defined parameters, passed to the program.
+ * process_pipe: Designate whether or not to process the input pipe.
+ * output:       The output file for general printing.
+ * error:        The output file for error printing.
+ * warning:      The output file for warning printing.
+ * signal:       The process signal management structure.
+ * context:      The color context.
+ *
+ * @todo
+ */
 #ifndef _di_iki_write_main_t_
   typedef struct {
     f_console_parameters_t parameters;
 
-    f_array_lengths_t remaining;
     bool process_pipe;
 
     fl_print_t output;
index fa14b47082e4aa0ab92183b124cb8bcd817fa561..68d7c8af8d62946a4a2feb35b12920239373158f 100644 (file)
@@ -6,15 +6,6 @@
 extern "C" {
 #endif
 
-#ifndef _di_iki_write_program_version_
-  const f_string_static_t iki_write_program_version_s = macro_f_string_static_t_initialize(IKI_WRITE_program_version_s, 0, IKI_WRITE_program_version_s_length);
-#endif // _di_iki_write_program_version_
-
-#ifndef _di_iki_write_program_name_
-  const f_string_static_t iki_write_program_name_s = macro_f_string_static_t_initialize(IKI_WRITE_program_name_s, 0, IKI_WRITE_program_name_s_length);
-  const f_string_static_t iki_write_program_name_long_s = macro_f_string_static_t_initialize(IKI_WRITE_program_name_long_s, 0, IKI_WRITE_program_name_long_s_length);
-#endif // _di_iki_write_program_name_
-
 #ifndef _di_iki_write_print_help_
   f_status_t iki_write_print_help(const f_file_t file, const f_color_context_t context) {
 
@@ -69,7 +60,7 @@ extern "C" {
       f_console_parameter_id_t ids[3] = { iki_write_parameter_no_color_e, iki_write_parameter_light_e, iki_write_parameter_dark_e };
       const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
 
-      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
+      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->context);
 
       main->output.set = &main->context.set;
       main->error.set = &main->context.set;
index 5389d22549def9e3e5596718d37815efd3756d62..20208f3c989526ef37c6a5b22b122c260ed63f4a 100644 (file)
@@ -13,16 +13,26 @@ extern "C" {
   const f_string_static_t status_code_program_name_long_s = macro_f_string_static_t_initialize(STATUS_CODE_program_name_long_s, 0, STATUS_CODE_program_name_long_s_length);
 #endif // _di_status_code_program_name_
 
-#ifndef _di_status_code_main_delete_
-  f_status_t status_code_main_delete(status_code_main_t * const main) {
-
-    f_console_parameters_delete(&main->parameters);
+#ifndef _di_status_code_program_help_parameters_
+  const f_string_static_t status_code_program_help_parameters_s = macro_f_string_static_t_initialize(STATUS_CODE_program_help_parameters_s, 0, STATUS_CODE_program_help_parameters_s_length);
+#endif // _di_status_code_program_help_parameters_
+
+#ifndef _di_status_code_parameters_
+  const f_string_static_t status_code_short_is_fine_s = macro_f_string_static_t_initialize(STATUS_CODE_short_is_fine_s, 0, STATUS_CODE_short_is_fine_s_length);
+  const f_string_static_t status_code_short_is_warning_s = macro_f_string_static_t_initialize(STATUS_CODE_short_is_warning_s, 0, STATUS_CODE_short_is_warning_s_length);
+  const f_string_static_t status_code_short_is_error_s = macro_f_string_static_t_initialize(STATUS_CODE_short_is_error_s, 0, STATUS_CODE_short_is_error_s_length);
+  const f_string_static_t status_code_short_number_s = macro_f_string_static_t_initialize(STATUS_CODE_short_number_s, 0, STATUS_CODE_short_number_s_length);
+
+  const f_string_static_t status_code_long_is_fine_s = macro_f_string_static_t_initialize(STATUS_CODE_long_is_fine_s, 0, STATUS_CODE_long_is_fine_s_length);
+  const f_string_static_t status_code_long_is_warning_s = macro_f_string_static_t_initialize(STATUS_CODE_long_is_warning_s, 0, STATUS_CODE_long_is_warning_s_length);
+  const f_string_static_t status_code_long_is_error_s = macro_f_string_static_t_initialize(STATUS_CODE_long_is_error_s, 0, STATUS_CODE_long_is_error_s_length);
+  const f_string_static_t status_code_long_number_s = macro_f_string_static_t_initialize(STATUS_CODE_long_number_s, 0, STATUS_CODE_long_number_s_length);
+#endif // _di_status_code_parameters_
 
-    f_type_array_lengths_resize(0, &main->remaining);
-
-    macro_f_color_context_t_delete_simple(main->context);
+#ifndef _di_status_code_main_delete_
+  f_status_t status_code_main_delete(fll_program_data_t * const main) {
 
-    return F_none;
+    return fll_program_data_delete(main);
   }
 #endif // _di_status_code_main_delete_
 
index ba5bd97748eb60d3f022eb503c7f73e387461e10..fcfb96746bab394e93653e44995fb199bf0c1699 100644 (file)
@@ -16,6 +16,9 @@
 extern "C" {
 #endif
 
+/**
+ * The program version.
+ */
 #ifndef _di_status_code_program_version_
   #define STATUS_CODE_program_version_major_s F_string_ascii_0_s
   #define STATUS_CODE_program_version_minor_s F_string_ascii_5_s
@@ -42,6 +45,9 @@ extern "C" {
   extern const f_string_static_t status_code_program_version_s;
 #endif // _di_status_code_program_version_
 
+/**
+ * The program name.
+ */
 #ifndef _di_status_code_program_name_
   #define STATUS_CODE_progam_name_s      "status_code"
   #define STATUS_CODE_progam_name_long_s "FSS Status Code"
@@ -53,18 +59,56 @@ extern "C" {
   extern const f_string_static_t status_code_program_name_long_s;
 #endif // _di_status_code_program_name_
 
+/**
+ * The program help related data.
+ */
+#ifndef _di_status_code_program_help_parameters_
+  #define STATUS_CODE_program_help_parameters_s "status code(s)"
+  #define STATUS_CODE_program_help_parameters_s_length 14
+
+  extern const f_string_static_t status_code_program_help_parameters_s;
+#endif // _di_status_code_program_help_parameters_
+
+/**
+ * The program defines.
+ */
 #ifndef _di_status_code_defines_
   #define status_code_signal_check_d 10000
+#endif // _di_status_code_defines_
 
-  #define status_code_short_is_fine_s    "f"
-  #define status_code_short_is_warning_s "w"
-  #define status_code_short_is_error_s   "e"
-  #define status_code_short_number_s     "n"
-
-  #define status_code_long_is_fine_s    "is_fine"
-  #define status_code_long_is_warning_s "is_warning"
-  #define status_code_long_is_error_s   "is_error"
-  #define status_code_long_number_s     "number"
+/**
+ * The main program parameters.
+ */
+#ifndef _di_status_code_parameters_
+  #define STATUS_CODE_short_is_fine_s    "f"
+  #define STATUS_CODE_short_is_warning_s "w"
+  #define STATUS_CODE_short_is_error_s   "e"
+  #define STATUS_CODE_short_number_s     "n"
+
+  #define STATUS_CODE_long_is_fine_s    "is_fine"
+  #define STATUS_CODE_long_is_warning_s "is_warning"
+  #define STATUS_CODE_long_is_error_s   "is_error"
+  #define STATUS_CODE_long_number_s     "number"
+
+  #define STATUS_CODE_short_is_fine_s_length    1
+  #define STATUS_CODE_short_is_warning_s_length 1
+  #define STATUS_CODE_short_is_error_s_length   1
+  #define STATUS_CODE_short_number_s_length     1
+
+  #define STATUS_CODE_long_is_fine_s_length    7
+  #define STATUS_CODE_long_is_warning_s_length 10
+  #define STATUS_CODE_long_is_error_s_length   8
+  #define STATUS_CODE_long_number_s_length     6
+
+  extern const f_string_static_t status_code_short_is_fine_s;
+  extern const f_string_static_t status_code_short_is_warning_s;
+  extern const f_string_static_t status_code_short_is_error_s;
+  extern const f_string_static_t status_code_short_number_s;
+
+  extern const f_string_static_t status_code_long_is_fine_s;
+  extern const f_string_static_t status_code_long_is_warning_s;
+  extern const f_string_static_t status_code_long_is_error_s;
+  extern const f_string_static_t status_code_long_number_s;
 
   enum {
     status_code_parameter_help_e,
@@ -94,43 +138,14 @@ extern "C" {
       macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_version_s.string, f_console_standard_long_version_s.string, 0, 0, f_console_type_inverse_e), \
-      macro_f_console_parameter_t_initialize(status_code_short_is_fine_s, status_code_long_is_fine_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(status_code_short_is_warning_s, status_code_long_is_warning_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(status_code_short_is_error_s, status_code_long_is_error_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(status_code_short_number_s, status_code_long_number_s, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(status_code_short_is_fine_s.string, status_code_long_is_fine_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(status_code_short_is_warning_s.string, status_code_long_is_warning_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(status_code_short_is_error_s.string, status_code_long_is_error_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(status_code_short_number_s.string, status_code_long_number_s.string, 0, 0, f_console_type_normal_e), \
     }
 
   #define status_code_total_parameters_d 13
-#endif // _di_status_code_defines_
-
-#ifndef _di_status_code_main_t_
-  typedef struct {
-    f_console_parameters_t parameters;
-
-    f_array_lengths_t remaining;
-    bool process_pipe;
-
-    fl_print_t output;
-    fl_print_t error;
-    fl_print_t warning;
-
-    f_signal_t signal;
-
-    f_color_context_t context;
-  } status_code_main_t;
-
-  #define status_code_main_t_initialize \
-    { \
-      f_console_parameters_t_initialize, \
-      f_array_lengths_t_initialize, \
-      F_false, \
-      fl_print_t_initialize, \
-      macro_fl_print_t_initialize_error(), \
-      macro_fl_print_t_initialize_warning(), \
-      f_signal_t_initialize, \
-      f_color_context_t_initialize, \
-    }
-#endif // _di_status_code_main_t_
+#endif // _di_status_code_parameters_
 
 /**
  * Deallocate main.
@@ -148,7 +163,7 @@ extern "C" {
  * @see status_code_main()
  */
 #ifndef _di_status_code_main_delete_
-  extern f_status_t status_code_main_delete(status_code_main_t * const main);
+  extern f_status_t status_code_main_delete(fll_program_data_t * const main);
 #endif // _di_status_code_main_delete_
 
 #ifdef __cplusplus
index ccb77aebb055cfc0c96b7ff565e9ad381de7d0f6..1d394a7fc211b4a58954b37047574751b675d250 100644 (file)
@@ -3,7 +3,7 @@
 int main(const int argc, const f_string_t *argv) {
 
   const f_console_arguments_t arguments = { argc, argv };
-  status_code_main_t data = status_code_main_t_initialize;
+  fll_program_data_t data = fll_program_data_t_initialize;
 
   if (f_pipe_input_exists()) {
     data.process_pipe = F_true;
index b1cd010f5471e572246f47506ec634762e0240c0..6ce8b7adbc7893ac4fb47791c14f0b6cf16a4f53 100644 (file)
@@ -6,7 +6,7 @@ extern "C" {
 #endif
 
 #ifndef _di_status_code_print_signal_received_
-  void status_code_print_signal_received(status_code_main_t * const main, const f_status_t signal) {
+  void status_code_print_signal_received(fll_program_data_t * const main, const f_status_t signal) {
 
     if (main->warning.verbosity != f_console_verbosity_verbose_e) return;
 
@@ -24,7 +24,7 @@ extern "C" {
 #endif // _di_status_code_print_signal_received_
 
 #ifndef _di_status_code_signal_received_
-  f_status_t status_code_signal_received(status_code_main_t * const main) {
+  f_status_t status_code_signal_received(fll_program_data_t * const main) {
 
     if (main->signal.id == -1) {
       return F_false;
index 2e701e8ba10e66009d52935ea1417b6c75d053c2..4b58f326da0dcbc9601b2fd3ef302955a986237d 100644 (file)
@@ -21,7 +21,7 @@ extern "C" {
  *   The signal received.
  */
 #ifndef _di_status_code_print_signal_received_
-  extern void status_code_print_signal_received(status_code_main_t * const main, const f_status_t signal) F_attribute_visibility_internal_d;
+  extern void status_code_print_signal_received(fll_program_data_t * const main, const f_status_t signal) F_attribute_visibility_internal_d;
 #endif // _di_status_code_print_signal_received_
 
 /**
@@ -39,7 +39,7 @@ extern "C" {
  * @see f_signal_read()
  */
 #ifndef _di_status_code_signal_received_
-  extern f_status_t status_code_signal_received(status_code_main_t * const main) F_attribute_visibility_internal_d;
+  extern f_status_t status_code_signal_received(fll_program_data_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_status_code_signal_received_
 
 #ifdef __cplusplus
index 95dca9dfc12433fef730aeb0aafa9c1ba005c536..29fdfde31305fbb8ee5512c5c509cb9b970c76f8 100644 (file)
@@ -7,7 +7,7 @@ extern "C" {
 #endif
 
 #ifndef _di_status_code_process_check_
-  f_status_t status_code_process_check(status_code_main_t * const main, const f_string_t value) {
+  f_status_t status_code_process_check(fll_program_data_t * const main, const f_string_t value) {
 
     f_number_unsigned_t number = 0;
     f_status_t status = status_code_convert_number(main, value, &number);
@@ -52,7 +52,7 @@ extern "C" {
 #endif // _di_status_code_process_check_
 
 #ifndef _di_status_code_process_number_
-  f_status_t status_code_process_number(status_code_main_t * const main, const f_string_t value) {
+  f_status_t status_code_process_number(fll_program_data_t * const main, const f_string_t value) {
 
     f_status_t status = F_none;
 
@@ -104,7 +104,7 @@ extern "C" {
 #endif // _di_status_code_process_number_
 
 #ifndef _di_status_code_process_normal_
-  f_status_t status_code_process_normal(status_code_main_t * const main, const f_string_t value) {
+  f_status_t status_code_process_normal(fll_program_data_t * const main, const f_string_t value) {
 
     f_number_unsigned_t number = 0;
     f_status_t status = status_code_convert_number(main, value, &number);
@@ -136,7 +136,7 @@ extern "C" {
 #endif // _di_status_code_process_normal_
 
 #ifndef _di_status_code_convert_number_
-  f_status_t status_code_convert_number(status_code_main_t * const main, const f_string_t value, f_number_unsigned_t *number) {
+  f_status_t status_code_convert_number(fll_program_data_t * const main, const f_string_t value, f_number_unsigned_t *number) {
 
     const f_string_range_t range = macro_f_string_range_t_initialize(strlen(value));
 
index 3aa76f2fdd17e4234ba73c2482c2c8800af3e1b8..d2da73719ed4eac833d4c82089474a472f91863d 100644 (file)
@@ -34,7 +34,7 @@ extern "C" {
  * @see fss_status_code_convert_number()
  */
 #ifndef _di_status_code_process_check_
-  extern f_status_t status_code_process_check(status_code_main_t * const main, const f_string_t value) F_attribute_visibility_internal_d;
+  extern f_status_t status_code_process_check(fll_program_data_t * const main, const f_string_t value) F_attribute_visibility_internal_d;
 #endif // _di_status_code_process_check_
 
 /**
@@ -56,7 +56,7 @@ extern "C" {
  * @see fll_fss_status_string_from()
  */
 #ifndef _di_status_code_process_number_
-  extern f_status_t status_code_process_number(status_code_main_t * const main, const f_string_t value) F_attribute_visibility_internal_d;
+  extern f_status_t status_code_process_number(fll_program_data_t * const main, const f_string_t value) F_attribute_visibility_internal_d;
 #endif // _di_status_code_process_number_
 
 /**
@@ -83,7 +83,7 @@ extern "C" {
  * @see fss_status_code_convert_number()
  */
 #ifndef _di_status_code_process_normal_
-  extern f_status_t status_code_process_normal(status_code_main_t * const main, const f_string_t value) F_attribute_visibility_internal_d;
+  extern f_status_t status_code_process_normal(fll_program_data_t * const main, const f_string_t value) F_attribute_visibility_internal_d;
 #endif // _di_status_code_process_normal_
 
 /**
@@ -111,7 +111,7 @@ extern "C" {
  * @see fl_console_parameter_to_number_unsigned()
  */
 #ifndef _di_status_code_convert_number_
-  extern f_status_t status_code_convert_number(status_code_main_t * const main, const f_string_t value, f_number_unsigned_t *number) F_attribute_visibility_internal_d;
+  extern f_status_t status_code_convert_number(fll_program_data_t * const main, const f_string_t value, f_number_unsigned_t *number) F_attribute_visibility_internal_d;
 #endif // _di_status_code_convert_number_
 
 #ifdef __cplusplus
index 1ae1f9b001a956eb5025840e0971d1ef0e69d627..c96880f12005cf772de7c7b36a75b97dc65aae45 100644 (file)
@@ -6,15 +6,6 @@
 extern "C" {
 #endif
 
-#ifndef _di_status_code_program_version_
-  const f_string_static_t status_code_progam_version_s = macro_f_string_static_t_initialize(STATUS_CODE_progam_version_s, 0, STATUS_CODE_progam_version_s_length);
-#endif // _di_status_code_program_version_
-
-#ifndef _di_status_code_program_name_
-  const f_string_static_t status_code_program_name_s = macro_f_string_static_t_initialize(STATUS_CODE_program_name_s, 0, STATUS_CODE_program_name_s_length);
-  const f_string_static_t status_code_program_name_long_s = macro_f_string_static_t_initialize(STATUS_CODE_program_name_long_s, 0, STATUS_CODE_program_name_long_s_length);
-#endif // _di_status_code_program_name_
-
 #ifndef _di_status_code_print_help_
   f_status_t status_code_print_help(const f_file_t file, const f_color_context_t context) {
 
@@ -39,7 +30,7 @@ extern "C" {
     fll_program_print_help_option(file, context, status_code_short_is_error_s, status_code_long_is_error_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "  Print F_true if the error code is an error, F_false otherwise.");
     fll_program_print_help_option(file, context, status_code_short_number_s, status_code_long_number_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "    Convert status code name to number.");
 
-    fll_program_print_help_usage(file, context, status_code_progam_name_s, "status code(s)");
+    fll_program_print_help_usage(file, context, status_code_progam_name_s, status_code_program_help_parameters_s);
 
     funlockfile(file.stream);
 
@@ -48,7 +39,7 @@ extern "C" {
 #endif // _di_status_code_print_help_
 
 #ifndef _di_status_code_main_
-  f_status_t status_code_main(status_code_main_t * const main, const f_console_arguments_t *arguments) {
+  f_status_t status_code_main(fll_program_data_t * const main, const f_console_arguments_t *arguments) {
 
     f_status_t status = F_none;
 
@@ -60,7 +51,7 @@ extern "C" {
       f_console_parameter_id_t ids[3] = { status_code_parameter_no_color_e, status_code_parameter_light_e, status_code_parameter_dark_e };
       const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
 
-      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
+      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->context);
 
       main->output.set = &main->context.set;
       main->error.set = &main->context.set;
@@ -192,7 +183,7 @@ extern "C" {
       return F_status_set_error(status);
     }
 
-    if (main->remaining.used == 0 && !main->process_pipe) {
+    if (main->parameters.remaining.used == 0 && !main->process_pipe) {
       fll_print_format("%[You failed to specify a status code.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
 
       status_code_main_delete(main);
@@ -207,12 +198,12 @@ extern "C" {
         // @todo call status_code_process_check() here for all main from pipe that is space separated.
       }
 
-      if (main->remaining.used > 0) {
+      if (main->parameters.remaining.used > 0) {
         uint16_t signal_check = 0;
 
         flockfile(main->output.to.stream);
 
-        for (f_array_length_t i = 0; i < main->remaining.used; ++i) {
+        for (f_array_length_t i = 0; i < main->parameters.remaining.used; ++i) {
 
           if (!((++signal_check) % status_code_signal_check_d)) {
             if (status_code_signal_received(main)) {
@@ -223,7 +214,7 @@ extern "C" {
             signal_check = 0;
           }
 
-          status2 = status_code_process_check(main, arguments->argv[main->remaining.array[i]]);
+          status2 = status_code_process_check(main, arguments->argv[main->parameters.remaining.array[i]]);
 
           if (F_status_is_error(status2) && status == F_none) {
             status = status2;
@@ -238,12 +229,12 @@ extern "C" {
         // @todo call status_code_process_number() here for all main from pipe that is space separated.
       }
 
-      if (main->remaining.used > 0) {
+      if (main->parameters.remaining.used > 0) {
         uint16_t signal_check = 0;
 
         flockfile(main->output.to.stream);
 
-        for (f_array_length_t i = 0; i < main->remaining.used; ++i) {
+        for (f_array_length_t i = 0; i < main->parameters.remaining.used; ++i) {
 
           if (!((++signal_check) % status_code_signal_check_d)) {
             if (status_code_signal_received(main)) {
@@ -254,7 +245,7 @@ extern "C" {
             signal_check = 0;
           }
 
-          status2 = status_code_process_number(main, arguments->argv[main->remaining.array[i]]);
+          status2 = status_code_process_number(main, arguments->argv[main->parameters.remaining.array[i]]);
 
           if (F_status_is_error(status2) && status == F_none) {
             status = status2;
@@ -269,12 +260,12 @@ extern "C" {
         // @todo call status_code_process_normal() here for all main from pipe that is space separated.
       }
 
-      if (main->remaining.used > 0) {
+      if (main->parameters.remaining.used > 0) {
         uint16_t signal_check = 0;
 
         flockfile(main->output.to.stream);
 
-        for (f_array_length_t i = 0; i < main->remaining.used; ++i) {
+        for (f_array_length_t i = 0; i < main->parameters.remaining.used; ++i) {
 
           if (!((++signal_check) % status_code_signal_check_d)) {
             if (status_code_signal_received(main)) {
@@ -285,7 +276,7 @@ extern "C" {
             signal_check = 0;
           }
 
-          status2 = status_code_process_normal(main, arguments->argv[main->remaining.array[i]]);
+          status2 = status_code_process_normal(main, arguments->argv[main->parameters.remaining.array[i]]);
 
           if (F_status_is_error(status2) && status == F_none) {
             status = status2;
index c091bb74c4ea4b70520236978aff309fc90776e1..09623cbd5df11e164d89e54f4f1e5192090b66f4 100644 (file)
@@ -90,7 +90,7 @@ extern "C" {
  * @see status_code_main_delete()
  */
 #ifndef _di_status_code_main_
-  extern f_status_t status_code_main(status_code_main_t * const main, const f_console_arguments_t *arguments);
+  extern f_status_t status_code_main(fll_program_data_t * const main, const f_console_arguments_t *arguments);
 #endif // _di_status_code_main_
 
 #ifdef __cplusplus
index 9071f8cc30e76637d49f9dda6fd5df2b33e056b5..a02780d740eb4f35769f80204ffe9551f1236668 100644 (file)
@@ -13,16 +13,66 @@ extern "C" {
   const f_string_static_t utf8_program_name_long_s = macro_f_string_static_t_initialize(UTF8_program_name_long_s, 0, UTF8_program_name_long_s_length);
 #endif // _di_utf8_program_name_
 
-#ifndef _di_utf8_main_delete_
-  f_status_t utf8_main_delete(utf8_main_t *main) {
+#ifndef _di_utf8_program_help_parameters_
+  const f_string_static_t utf8_program_help_parameters_s = macro_f_string_static_t_initialize(UTF8_program_help_parameters_s, 0, UTF8_program_help_parameters_s_length);
+#endif // _di_utf8_program_help_parameters_
+
+#ifndef _di_utf8_defines_
+  const f_string_static_t utf8_string_combining_is_s = macro_f_string_static_t_initialize(UTF8_string_combining_is_s, 0, UTF8_string_combining_is_s_length);
+  const f_string_static_t utf8_string_combining_not_s = macro_f_string_static_t_initialize(UTF8_string_combining_not_s, 0, UTF8_string_combining_not_s_length);
+  const f_string_static_t utf8_string_unknown_s = macro_f_string_static_t_initialize(UTF8_string_unknown_s, 0, UTF8_string_unknown_s_length);
+
+  const f_string_static_t utf8_string_from_s = macro_f_string_static_t_initialize(UTF8_string_from_s, 0, UTF8_string_from_s_length);
+  const f_string_static_t utf8_string_to_s = macro_f_string_static_t_initialize(UTF8_string_to_s, 0, UTF8_string_to_s_length);
+
+  const f_string_static_t utf8_string_prepend_padding_s = macro_f_string_static_t_initialize(UTF8_string_prepend_padding_s, 0, UTF8_string_prepend_padding_s_length);
+
+  const f_string_static_t utf8_string_valid_not_s = macro_f_string_static_t_initialize(UTF8_string_valid_not_s, 0, UTF8_string_valid_not_s_length);
+
+  const f_string_static_t utf8_string_verified_valid_s = macro_f_string_static_t_initialize(UTF8_string_verified_valid_s, 0, UTF8_string_verified_valid_s_length);
+  const f_string_static_t utf8_string_verified_valid_not_s = macro_f_string_static_t_initialize(UTF8_string_verified_valid_not_s, 0, UTF8_string_verified_valid_not_s_length);
 
-    f_console_parameters_delete(&main->parameters);
+  const f_string_static_t utf8_string_width_0_s = macro_f_string_static_t_initialize(UTF8_string_width_0_s, 0, UTF8_string_width_0_s_length);
+  const f_string_static_t utf8_string_width_1_s = macro_f_string_static_t_initialize(UTF8_string_width_1_s, 0, UTF8_string_width_1_s_length);
+  const f_string_static_t utf8_string_width_2_s = macro_f_string_static_t_initialize(UTF8_string_width_2_s, 0, UTF8_string_width_2_s_length);
+#endif // _di_utf8_defines_
 
-    f_type_array_lengths_resize(0, &main->remaining);
+#ifndef _di_utf8_parameters_
+  const f_string_static_t utf8_short_from_binary_s = macro_f_string_static_t_initialize(UTF8_short_from_binary_s, 0, UTF8_short_from_binary_s_length);
+  const f_string_static_t utf8_short_from_codepoint_s = macro_f_string_static_t_initialize(UTF8_short_from_codepoint_s, 0, UTF8_short_from_codepoint_s_length);
+  const f_string_static_t utf8_short_from_file_s = macro_f_string_static_t_initialize(UTF8_short_from_file_s, 0, UTF8_short_from_file_s_length);
 
-    macro_f_color_context_t_delete_simple(main->context);
+  const f_string_static_t utf8_short_headers_s = macro_f_string_static_t_initialize(UTF8_short_headers_s, 0, UTF8_short_headers_s_length);
+  const f_string_static_t utf8_short_separate_s = macro_f_string_static_t_initialize(UTF8_short_separate_s, 0, UTF8_short_separate_s_length);
+  const f_string_static_t utf8_short_strip_invalid_s = macro_f_string_static_t_initialize(UTF8_short_strip_invalid_s, 0, UTF8_short_strip_invalid_s_length);
+  const f_string_static_t utf8_short_verify_s = macro_f_string_static_t_initialize(UTF8_short_verify_s, 0, UTF8_short_verify_s_length);
+
+  const f_string_static_t utf8_short_to_binary_s = macro_f_string_static_t_initialize(UTF8_short_to_binary_s, 0, UTF8_short_to_binary_s_length);
+  const f_string_static_t utf8_short_to_codepoint_s = macro_f_string_static_t_initialize(UTF8_short_to_codepoint_s, 0, UTF8_short_to_codepoint_s_length);
+  const f_string_static_t utf8_short_to_combining_s = macro_f_string_static_t_initialize(UTF8_short_to_combining_s, 0, UTF8_short_to_combining_s_length);
+  const f_string_static_t utf8_short_to_file_s = macro_f_string_static_t_initialize(UTF8_short_to_file_s, 0, UTF8_short_to_file_s_length);
+  const f_string_static_t utf8_short_to_width_s = macro_f_string_static_t_initialize(UTF8_short_to_width_s, 0, UTF8_short_to_width_s_length);
+
+  const f_string_static_t utf8_long_from_binary_s = macro_f_string_static_t_initialize(UTF8_long_from_binary_s, 0, UTF8_long_from_binary_s_length);
+  const f_string_static_t utf8_long_from_codepoint_s = macro_f_string_static_t_initialize(UTF8_long_from_codepoint_s, 0, UTF8_long_from_codepoint_s_length);
+  const f_string_static_t utf8_long_from_file_s = macro_f_string_static_t_initialize(UTF8_long_from_file_s, 0, UTF8_long_from_file_s_length);
+
+  const f_string_static_t utf8_long_headers_s = macro_f_string_static_t_initialize(UTF8_long_headers_s, 0, UTF8_long_headers_s_length);
+  const f_string_static_t utf8_long_separate_s = macro_f_string_static_t_initialize(UTF8_long_separate_s, 0, UTF8_long_separate_s_length);
+  const f_string_static_t utf8_long_strip_invalid_s = macro_f_string_static_t_initialize(UTF8_long_strip_invalid_s, 0, UTF8_long_strip_invalid_s_length);
+  const f_string_static_t utf8_long_verify_s = macro_f_string_static_t_initialize(UTF8_long_verify_s, 0, UTF8_long_verify_s_length);
+
+  const f_string_static_t utf8_long_to_binary_s = macro_f_string_static_t_initialize(UTF8_long_to_binary_s, 0, UTF8_long_to_binary_s_length);
+  const f_string_static_t utf8_long_to_codepoint_s = macro_f_string_static_t_initialize(UTF8_long_to_codepoint_s, 0, UTF8_long_to_codepoint_s_length);
+  const f_string_static_t utf8_long_to_combining_s = macro_f_string_static_t_initialize(UTF8_long_to_combining_s, 0, UTF8_long_to_combining_s_length);
+  const f_string_static_t utf8_long_to_file_s = macro_f_string_static_t_initialize(UTF8_long_to_file_s, 0, UTF8_long_to_file_s_length);
+  const f_string_static_t utf8_long_to_width_s = macro_f_string_static_t_initialize(UTF8_long_to_width_s, 0, UTF8_long_to_width_s_length);
+#endif // _di_utf8_parameters_
+
+#ifndef _di_utf8_main_delete_
+  f_status_t utf8_main_delete(fll_program_data_t *main) {
 
-    return F_none;
+    return fll_program_data_delete(main);
   }
 #endif // _di_utf8_main_delete_
 
index 934eb40697fb1186c388e1e06d4d5abbb51ba3ef..9e4fd32df1b03dca4c2370e6a7333ded530d58ce 100644 (file)
@@ -16,6 +16,9 @@
 extern "C" {
 #endif
 
+/**
+ * The program version.
+ */
 #ifndef _di_utf8_program_version_
   #define UTF8_program_version_major_s F_string_ascii_0_s
   #define UTF8_program_version_minor_s F_string_ascii_5_s
@@ -39,9 +42,12 @@ extern "C" {
 
   #define UTF8_program_version_s_length UTF8_program_version_major_s_length + F_string_ascii_period_s_length + UTF8_program_version_minor_s_length + F_string_ascii_period_s_length + UTF8_program_version_micro_s_length + UTF8_program_version_nano_prefix_s_length + UTF8_program_version_nano_s_length
 
-    extern const f_string_static_t utf8_program_version_s;
+  extern const f_string_static_t utf8_program_version_s;
 #endif // _di_utf8_program_version_
 
+/**
+ * The program name.
+ */
 #ifndef _di_utf8_program_name_
   #define UTF8_program_name_s      "utf8"
   #define UTF8_program_name_long_s "UTF-8"
@@ -54,74 +60,176 @@ extern "C" {
 #endif // _di_utf8_program_name_
 
 /**
+ * The program help related data.
+ */
+#ifndef _di_utf8_program_help_parameters_
+  #define UTF8_program_help_parameters_s "character(s)"
+  #define UTF8_program_help_parameters_s_length 12
+
+  extern const f_string_static_t utf8_program_help_parameters_s;
+#endif // _di_utf8_program_help_parameters_
+
+/**
  * Set to at least 4 to provide a UTF-8 friendly allocation step.
  */
 #ifndef _di_utf8_default_allocation_step_
   #define utf8_default_allocation_step_d 16
 #endif // _di_utf8_default_allocation_step_
 
+/**
+ * The program defines.
+ */
 #ifndef _di_utf8_defines_
   #define utf8_signal_check_d 10000
 
-  #define utf8_string_from_s "from"
-  #define utf8_string_to_s   "to"
+  #define UTF8_string_combining_is_s  "C"
+  #define UTF8_string_combining_not_s "N"
+  #define UTF8_string_unknown_s       "?"
+
+  #define UTF8_string_from_s "from"
+  #define UTF8_string_to_s   "to"
+
+  #define UTF8_string_prepend_padding_s "  "
 
-  #define utf8_string_verified_valid_s     "Verified Valid"
-  #define utf8_string_verified_valid_not_s "Verified Invalid"
+  #define UTF8_string_valid_not_s "�"
 
-  #define utf8_string_combining_is_s  "C"
-  #define utf8_string_combining_not_s "N"
-  #define utf8_string_unknown_s       "?"
+  #define UTF8_string_verified_valid_s     "Verified Valid"
+  #define UTF8_string_verified_valid_not_s "Verified Invalid"
 
-  #define utf8_string_width_0_s "0"
-  #define utf8_string_width_1_s "1"
-  #define utf8_string_width_2_s "2"
+  #define UTF8_string_width_0_s "0"
+  #define UTF8_string_width_1_s "1"
+  #define UTF8_string_width_2_s "2"
 
-  #define utf8_string_from_s_length 4
-  #define utf8_string_to_s_length   2
+  #define UTF8_string_combining_is_s_length  1
+  #define UTF8_string_combining_not_s_length 1
+  #define UTF8_string_unknown_s_length       1
 
-  #define utf8_string_verified_valid_s_length     14
-  #define utf8_string_verified_valid_not_s_length 16
+  #define UTF8_string_from_s_length 4
+  #define UTF8_string_to_s_length   2
 
-  #define utf8_string_combining_is_s_length  1
-  #define utf8_string_combining_not_s_length 1
-  #define utf8_string_unknown_s_length       1
+  #define UTF8_string_prepend_padding_s_length 2
 
-  #define utf8_string_width_0_s_length 1
-  #define utf8_string_width_1_s_length 1
-  #define utf8_string_width_2_s_length 1
+  #define UTF8_string_valid_not_s_length 3
 
-  #define utf8_character_valid_not_s "�"
+  #define UTF8_string_verified_valid_s_length     14
+  #define UTF8_string_verified_valid_not_s_length 16
 
-  #define utf8_short_from_binary_s    "b"
-  #define utf8_short_from_codepoint_s "c"
-  #define utf8_short_from_file_s      "f"
+  #define UTF8_string_width_0_s_length 1
+  #define UTF8_string_width_1_s_length 1
+  #define UTF8_string_width_2_s_length 1
 
-  #define utf8_short_headers_s       "H"
-  #define utf8_short_separate_s      "S"
-  #define utf8_short_strip_invalid_s "s"
-  #define utf8_short_verify_s        "v"
+  extern const f_string_static_t utf8_string_combining_is_s;
+  extern const f_string_static_t utf8_string_combining_not_s;
+  extern const f_string_static_t utf8_string_unknown_s;
 
-  #define utf8_short_to_binary_s    "B"
-  #define utf8_short_to_codepoint_s "C"
-  #define utf8_short_to_combining_s "O"
-  #define utf8_short_to_file_s      "F"
-  #define utf8_short_to_width_s     "W"
+  extern const f_string_static_t utf8_string_from_s;
+  extern const f_string_static_t utf8_string_to_s;
 
-  #define utf8_long_from_binary_s    "from_binary"
-  #define utf8_long_from_codepoint_s "from_codepoint"
-  #define utf8_long_from_file_s      "from_file"
+  extern const f_string_static_t utf8_string_prepend_padding_s;
 
-  #define utf8_long_headers_s       "headers"
-  #define utf8_long_separate_s      "separate"
-  #define utf8_long_strip_invalid_s "strip_invalid"
-  #define utf8_long_verify_s        "verify"
+  extern const f_string_static_t utf8_string_verified_valid_s;
+  extern const f_string_static_t utf8_string_verified_valid_not_s;
 
-  #define utf8_long_to_binary_s    "to_binary"
-  #define utf8_long_to_codepoint_s "to_codepoint"
-  #define utf8_long_to_combining_s "to_combining"
-  #define utf8_long_to_file_s      "to_file"
-  #define utf8_long_to_width_s     "to_width"
+  extern const f_string_static_t utf8_string_width_0_s;
+  extern const f_string_static_t utf8_string_width_1_s;
+  extern const f_string_static_t utf8_string_width_2_s;
+
+  extern const f_string_static_t utf8_string_valid_not_s;
+#endif // _di_utf8_defines_
+
+/**
+ * The main program parameters.
+ */
+#ifndef _di_utf8_parameters_
+  #define UTF8_short_from_binary_s    "b"
+  #define UTF8_short_from_codepoint_s "c"
+  #define UTF8_short_from_file_s      "f"
+
+  #define UTF8_short_headers_s       "H"
+  #define UTF8_short_separate_s      "S"
+  #define UTF8_short_strip_invalid_s "s"
+  #define UTF8_short_verify_s        "v"
+
+  #define UTF8_short_to_binary_s    "B"
+  #define UTF8_short_to_codepoint_s "C"
+  #define UTF8_short_to_combining_s "O"
+  #define UTF8_short_to_file_s      "F"
+  #define UTF8_short_to_width_s     "W"
+
+  #define UTF8_long_from_binary_s    "from_binary"
+  #define UTF8_long_from_codepoint_s "from_codepoint"
+  #define UTF8_long_from_file_s      "from_file"
+
+  #define UTF8_long_headers_s       "headers"
+  #define UTF8_long_separate_s      "separate"
+  #define UTF8_long_strip_invalid_s "strip_invalid"
+  #define UTF8_long_verify_s        "verify"
+
+  #define UTF8_long_to_binary_s    "to_binary"
+  #define UTF8_long_to_codepoint_s "to_codepoint"
+  #define UTF8_long_to_combining_s "to_combining"
+  #define UTF8_long_to_file_s      "to_file"
+  #define UTF8_long_to_width_s     "to_width"
+
+  #define UTF8_short_from_binary_s_length    1
+  #define UTF8_short_from_codepoint_s_length 1
+  #define UTF8_short_from_file_s_length      1
+
+  #define UTF8_short_headers_s_length       1
+  #define UTF8_short_separate_s_length      1
+  #define UTF8_short_strip_invalid_s_length 1
+  #define UTF8_short_verify_s_length        1
+
+  #define UTF8_short_to_binary_s_length    1
+  #define UTF8_short_to_codepoint_s_length 1
+  #define UTF8_short_to_combining_s_length 1
+  #define UTF8_short_to_file_s_length      1
+  #define UTF8_short_to_width_s_length     1
+
+  #define UTF8_long_from_binary_s_length    11
+  #define UTF8_long_from_codepoint_s_length 14
+  #define UTF8_long_from_file_s_length      9
+
+  #define UTF8_long_headers_s_length       7
+  #define UTF8_long_separate_s_length      8
+  #define UTF8_long_strip_invalid_s_length 13
+  #define UTF8_long_verify_s_length        6
+
+  #define UTF8_long_to_binary_s_length    9
+  #define UTF8_long_to_codepoint_s_length 12
+  #define UTF8_long_to_combining_s_length 12
+  #define UTF8_long_to_file_s_length      7
+  #define UTF8_long_to_width_s_length     8
+
+  extern const f_string_static_t utf8_short_from_binary_s;
+  extern const f_string_static_t utf8_short_from_codepoint_s;
+  extern const f_string_static_t utf8_short_from_file_s;
+
+  extern const f_string_static_t utf8_short_headers_s;
+  extern const f_string_static_t utf8_short_separate_s;
+  extern const f_string_static_t utf8_short_strip_invalid_s;
+  extern const f_string_static_t utf8_short_verify_s;
+
+  extern const f_string_static_t utf8_short_to_binary_s;
+  extern const f_string_static_t utf8_short_to_codepoint_s;
+  extern const f_string_static_t utf8_short_to_combining_s;
+  extern const f_string_static_t utf8_short_to_file_s;
+  extern const f_string_static_t utf8_short_to_width_s;
+
+  extern const f_string_static_t utf8_long_from_binary_s;
+  extern const f_string_static_t utf8_long_from_codepoint_s;
+  extern const f_string_static_t utf8_long_from_file_s;
+
+  extern const f_string_static_t utf8_long_headers_s;
+  extern const f_string_static_t utf8_long_separate_s;
+  extern const f_string_static_t utf8_long_strip_invalid_s;
+  extern const f_string_static_t utf8_long_verify_s;
+
+  extern const f_string_static_t utf8_long_to_binary_s;
+  extern const f_string_static_t utf8_long_to_codepoint_s;
+  extern const f_string_static_t utf8_long_to_combining_s;
+  extern const f_string_static_t utf8_long_to_file_s;
+  extern const f_string_static_t utf8_long_to_width_s;
 
   enum {
     utf8_parameter_help_e,
@@ -162,22 +270,22 @@ extern "C" {
       macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_version_s.string, f_console_standard_long_version_s.string, 0, 0, f_console_type_inverse_e), \
-      macro_f_console_parameter_t_initialize(utf8_short_from_binary_s, utf8_long_from_binary_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(utf8_short_from_codepoint_s, utf8_long_from_codepoint_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(utf8_short_from_file_s, utf8_long_from_file_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(utf8_short_headers_s, utf8_long_headers_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(utf8_short_separate_s, utf8_long_headers_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(utf8_short_strip_invalid_s, utf8_long_strip_invalid_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(utf8_short_to_binary_s, utf8_long_to_binary_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(utf8_short_to_codepoint_s, utf8_long_to_codepoint_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(utf8_short_to_combining_s, utf8_long_to_combining_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(utf8_short_to_file_s, utf8_long_to_file_s, 0, 1, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(utf8_short_to_width_s, utf8_long_to_width_s, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(utf8_short_verify_s, utf8_long_verify_s, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(utf8_short_from_binary_s.string, utf8_long_from_binary_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(utf8_short_from_codepoint_s.string, utf8_long_from_codepoint_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(utf8_short_from_file_s.string, utf8_long_from_file_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(utf8_short_headers_s.string, utf8_long_headers_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(utf8_short_separate_s.string, utf8_long_headers_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(utf8_short_strip_invalid_s.string, utf8_long_strip_invalid_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(utf8_short_to_binary_s.string, utf8_long_to_binary_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(utf8_short_to_codepoint_s.string, utf8_long_to_codepoint_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(utf8_short_to_combining_s.string, utf8_long_to_combining_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(utf8_short_to_file_s.string, utf8_long_to_file_s.string, 0, 1, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(utf8_short_to_width_s.string, utf8_long_to_width_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(utf8_short_verify_s.string, utf8_long_verify_s.string, 0, 0, f_console_type_normal_e), \
     }
 
   #define utf8_total_parameters_d 21
-#endif // _di_utf8_defines_
+#endif // _di_utf8_parameters_
 
 /**
  * Modes used to designate how to the input and output are to be processed.
@@ -202,47 +310,6 @@ extern "C" {
 #endif // _di_utf8_modes_
 
 /**
- * The main program data.
- *
- * parameters:   The state of pre-defined parameters passed to the program.
- * remaining:    The remaining, non-pre-defined parameters, passed to the program.
- * process_pipe: Designate whether or not to process the input pipe.
- * output:       The output file for general printing.
- * error:        The output file for error printing.
- * warning:      The output file for warning printing.
- * signal:       The process signal management structure.
- * context:      The color context.
- */
-#ifndef _di_utf8_main_t_
-  typedef struct {
-    f_console_parameters_t parameters;
-
-    f_array_lengths_t remaining;
-    bool process_pipe;
-
-    fl_print_t output;
-    fl_print_t error;
-    fl_print_t warning;
-
-    f_signal_t signal;
-
-    f_color_context_t context;
-  } utf8_main_t;
-
-  #define utf8_main_t_initialize \
-    { \
-      f_console_parameters_t_initialize, \
-      f_array_lengths_t_initialize, \
-      F_false, \
-      fl_print_t_initialize, \
-      macro_fl_print_t_initialize_error(), \
-      macro_fl_print_t_initialize_warning(), \
-      f_signal_t_initialize, \
-      f_color_context_t_initialize, \
-    }
-#endif // _di_utf8_main_t_
-
-/**
  * Deallocate main.
  *
  * Be sure to call this after executing utf8_main().
@@ -258,7 +325,7 @@ extern "C" {
  * @see utf8_main()
  */
 #ifndef _di_utf8_main_delete_
-  extern f_status_t utf8_main_delete(utf8_main_t *main);
+  extern f_status_t utf8_main_delete(fll_program_data_t *main);
 #endif // _di_utf8_main_delete_
 
 #ifdef __cplusplus
index 8a08863c51bf330a05a9d20e74f543fd1364b301..a424fe8fdf43797666827dfbe2e6c2f25de93551 100644 (file)
@@ -3,7 +3,7 @@
 int main(const int argc, const f_string_t *argv) {
 
   const f_console_arguments_t arguments = { argc, argv };
-  utf8_main_t data = utf8_main_t_initialize;
+  fll_program_data_t data = fll_program_data_t_initialize;
 
   if (f_pipe_input_exists()) {
     data.process_pipe = F_true;
index 5ed8e9437d269428465656d81b8aebba32113d29..ee6b9bb9ad4ac3ed263648d8247e8df46ab911dd 100644 (file)
@@ -38,20 +38,19 @@ extern "C" {
  * The program data.
  *
  * main:      The main program data.
- * argv:      The argument structure in utf8_main_t.parameters for simplifying syntax.
+ * argv:      The argument structure in fll_program_data_t.parameters for simplifying syntax.
  * file:      The output file for writing the processed data to (may potentially default to "output").
  * mode:      The input/output mode (see utf8_modes).
  * valid:     Designate the output context set for valid characters.
  * valid_not: Designate the output context set for invalid characters.
  * append:    A string to append. A value of NULL results in not appending.
  * prepend:   A string to prepend. A value of NULL results in not prepending.
- * file_name: The name of the file being output to for processed data (is empty if defaulting to "output").
  * buffer:    A buffer to use for printing output (generally for storing a block of input from an input file).
  * text:      A buffer for storing a series of characters for processing (generally for codepoint processing).
  */
 #ifndef _di_utf8_data_t_
   typedef struct {
-    utf8_main_t *main;
+    fll_program_data_t *main;
     f_string_static_t *argv;
 
     f_file_t file;
@@ -60,10 +59,9 @@ extern "C" {
     f_color_set_t valid;
     f_color_set_t valid_not;
 
-    f_string_t append;
-    f_string_t prepend;
+    f_string_static_t append;
+    f_string_static_t prepend;
 
-    f_string_static_t file_name;
     f_string_dynamic_t buffer;
     f_string_dynamic_t text;
   } utf8_data_t;
@@ -76,8 +74,7 @@ extern "C" {
       utf8_mode_from_binary_d | utf8_mode_to_codepoint_d, \
       f_color_set_t_initialize, \
       f_color_set_t_initialize, \
-      f_string_t_initialize, \
-      f_string_t_initialize, \
+      f_string_static_t_initialize, \
       f_string_static_t_initialize, \
       f_string_dynamic_t_initialize, \
       f_string_dynamic_t_initialize, \
index 089f99c862d3c3c407fd6132765042ddca65626e..3b88459a2fa386864704bd97afc87fcd34aa418a 100644 (file)
@@ -9,7 +9,7 @@ extern "C" {
 #ifndef _di_utf8_print_binary_
   void utf8_print_binary(utf8_data_t * const data, const f_string_static_t character) {
 
-    fl_print_format("%s%r%s", data->file.stream, data->prepend, character, data->append);
+    fl_print_format("%r%r%r", data->file.stream, data->prepend, character, data->append);
   }
 #endif // _di_utf8_print_binary_
 
@@ -25,19 +25,19 @@ extern "C" {
       utf8_print_combining_or_width(data, character);
     }
     else if (data->mode & utf8_mode_to_binary_d) {
-      fl_print_format("%s%[%r%]%s", data->file.stream, data->prepend, data->valid_not, character, data->valid_not, data->append);
+      fl_print_format("%r%[%r%]%r", data->file.stream, data->prepend, data->valid_not, character, data->valid_not, data->append);
     }
     else if (data->mode & utf8_mode_from_codepoint_d) {
-      fl_print_format("%s%[%Q%]%s", data->file.stream, data->prepend, data->valid_not, character, data->valid_not, data->append);
+      fl_print_format("%r%[%Q%]%r", data->file.stream, data->prepend, data->valid_not, character, data->valid_not, data->append);
     }
     else {
-      fl_print_format("%s%[0x", data->file.stream, data->prepend, data->valid_not);
+      fl_print_format("%r%[0x", data->file.stream, data->prepend, data->valid_not);
 
       for (uint8_t i = 0; i < character.used; ++i) {
         fl_print_format("%02_uii", data->file.stream, (uint8_t) character.string[i]);
       } // for
 
-      fl_print_format("%]%s", data->file.stream, data->valid_not, data->append);
+      fl_print_format("%]%r", data->file.stream, data->valid_not, data->append);
     }
   }
 #endif // _di_utf8_print_character_invalid_
@@ -46,13 +46,13 @@ extern "C" {
   void utf8_print_codepoint(utf8_data_t * const data, const uint32_t codepoint) {
 
     if (codepoint < 0xffff) {
-      fl_print_format("%sU+%04_U%s", data->file.stream, data->prepend, codepoint, data->append);
+      fl_print_format("%rU+%04_U%r", data->file.stream, data->prepend, codepoint, data->append);
     }
     else if (codepoint < 0x100000) {
-      fl_print_format("%sU+%05_U%s", data->file.stream, data->prepend, codepoint, data->append);
+      fl_print_format("%rU+%05_U%r", data->file.stream, data->prepend, codepoint, data->append);
     }
     else {
-      fl_print_format("%sU+%06_U%s", data->file.stream, data->prepend, codepoint, data->append);
+      fl_print_format("%rU+%06_U%r", data->file.stream, data->prepend, codepoint, data->append);
     }
   }
 #endif // _di_utf8_print_codepoint_
@@ -66,23 +66,23 @@ extern "C" {
       status = f_utf_is_combining(character.string, character.used);
 
       if (status == F_true) {
-        fl_print_format("%s%s%s", data->file.stream, data->prepend, utf8_string_combining_is_s, data->append);
+        fl_print_format("%r%r%r", data->file.stream, data->prepend, utf8_string_combining_is_s, data->append);
       }
       else if (status == F_false) {
         status = f_utf_is_private(character.string, character.used);
 
         if (status == F_true) {
-          fl_print_format("%s%s%s", data->file.stream, data->prepend, utf8_string_unknown_s, data->append);
+          fl_print_format("%r%r%r", data->file.stream, data->prepend, utf8_string_unknown_s, data->append);
         }
         else if (data->mode & utf8_mode_to_width_d) {
           utf8_print_width(data, character);
         }
         else {
-          fl_print_format("%s%s%s", data->file.stream, data->prepend, utf8_string_combining_not_s, data->append);
+          fl_print_format("%r%r%r", data->file.stream, data->prepend, utf8_string_combining_not_s, data->append);
         }
       }
       else if (data->main->parameters.array[utf8_parameter_strip_invalid_e].result == f_console_result_none_e && data->main->parameters.array[utf8_parameter_verify_e].result == f_console_result_none_e) {
-        fl_print_format("%s%[%s%]%s", data->file.stream, data->prepend, data->valid_not, utf8_string_unknown_s, data->valid_not, data->append);
+        fl_print_format("%r%[%r%]%r", data->file.stream, data->prepend, data->valid_not, utf8_string_unknown_s, data->valid_not, data->append);
       }
     }
     else if (data->mode & utf8_mode_to_width_d) {
@@ -189,7 +189,7 @@ extern "C" {
 
     flockfile(data->main->error.to.stream);
 
-    fl_print_format("%r%[%QFailed to find the %s file '%]", data->main->error.to.stream, f_string_eol_s, data->main->context.set.error, data->main->error.prefix, from ? utf8_string_from_s : utf8_string_to_s, data->main->context.set.error);
+    fl_print_format("%r%[%QFailed to find the %r file '%]", data->main->error.to.stream, f_string_eol_s, data->main->context.set.error, data->main->error.prefix, from ? utf8_string_from_s : utf8_string_to_s, data->main->context.set.error);
     fl_print_format("%[%Q%]", data->main->error.to.stream, data->main->context.set.notable, name, data->main->context.set.notable);
     fl_print_format("%['.%]%r", data->main->error.to.stream, data->main->context.set.error, data->main->context.set.error, f_string_eol_s);
 
@@ -207,7 +207,7 @@ extern "C" {
 #endif // _di_utf8_print_error_parameter_file_to_too_many_
 
 #ifndef _di_utf8_print_section_header_file_
-  void utf8_print_section_header_file(utf8_data_t * const data, const f_string_t name) {
+  void utf8_print_section_header_file(utf8_data_t * const data, const f_string_static_t name) {
 
     if (data->main->parameters.array[utf8_parameter_headers_e].result == f_console_result_none_e) return;
     if (data->main->parameters.array[utf8_parameter_verify_e].result == f_console_result_found_e) return;
@@ -217,10 +217,10 @@ extern "C" {
     fl_print_format("%r%[File%] ", data->main->output.to.stream, f_string_eol_s, data->main->output.set->title, data->main->output.set->title);
 
     if (data->file.stream == data->main->output.to.stream) {
-      fl_print_format("%[%S%]:%r", data->main->output.to.stream, data->main->output.set->notable, name, data->main->output.set->notable, f_string_eol_s);
+      fl_print_format("%[%Q%]:%r", data->main->output.to.stream, data->main->output.set->notable, name, data->main->output.set->notable, f_string_eol_s);
     }
     else {
-      fl_print_format("%[%S%]: %S.%r", data->main->output.to.stream, data->main->output.set->notable, name, data->main->output.set->notable, data->file_name, f_string_eol_s);
+      fl_print_format("%[%Q%]: %Q.%r", data->main->output.to.stream, data->main->output.set->notable, name, data->main->output.set->notable, data->argv[data->main->parameters.array[utf8_parameter_to_file_e].values.array[0]], f_string_eol_s);
     }
 
     funlockfile(data->main->output.to.stream);
@@ -276,7 +276,7 @@ extern "C" {
     f_status_t status = f_utf_is_wide(character.string, character.used);
 
     if (status == F_true) {
-      fl_print_format("%s%s%s", data->file.stream, data->prepend, utf8_string_width_2_s, data->append);
+      fl_print_format("%r%r%r", data->file.stream, data->prepend, utf8_string_width_2_s, data->append);
 
       return;
     }
@@ -285,20 +285,20 @@ extern "C" {
       status = f_utf_is_graph(character.string, character.used);
 
       if (status == F_true) {
-        fl_print_format("%s%s%s", data->file.stream, data->prepend, utf8_string_width_1_s, data->append);
+        fl_print_format("%r%r%r", data->file.stream, data->prepend, utf8_string_width_1_s, data->append);
 
         return;
       }
 
       if (status == F_false) {
-        fl_print_format("%s%s%s", data->file.stream, data->prepend, utf8_string_width_0_s, data->append);
+        fl_print_format("%r%r%r", data->file.stream, data->prepend, utf8_string_width_0_s, data->append);
 
         return;
       }
     }
 
     if (data->main->parameters.array[utf8_parameter_strip_invalid_e].result == f_console_result_none_e && data->main->parameters.array[utf8_parameter_verify_e].result == f_console_result_none_e) {
-      fl_print_format("%s%[%s%]%s", data->file.stream, data->prepend, data->valid_not, utf8_string_unknown_s, data->valid_not, data->append);
+      fl_print_format("%r%[%r%]%r", data->file.stream, data->prepend, data->valid_not, utf8_string_unknown_s, data->valid_not, data->append);
     }
   }
 #endif // _di_utf8_print_width_
index d45df806d0227190d538b94c7a19d7251cb65d94..a4033a7b4dbd5230b9be48dd791ffc125bc2e272 100644 (file)
@@ -160,7 +160,7 @@ extern "C" {
  *   The name of the file.
  */
 #ifndef _di_utf8_print_section_header_file_
-  extern void utf8_print_section_header_file(utf8_data_t * const data, const f_string_t name) F_attribute_visibility_internal_d;
+  extern void utf8_print_section_header_file(utf8_data_t * const data, const f_string_static_t name) F_attribute_visibility_internal_d;
 #endif // _di_utf8_print_section_header_file_
 
 /**
index d99723ea67a3955bdd6ba355297a014985b59b88..6d700ac356cf8dfffb99013af7569fdae91cbabf 100644 (file)
@@ -22,9 +22,9 @@ extern "C" {
 #endif // _di_utf8_data_delete_
 
 #ifndef _di_utf8_process_text_
-  f_status_t utf8_process_text(utf8_data_t * const data, const f_string_t text) {
+  f_status_t utf8_process_text(utf8_data_t * const data, f_string_static_t text) {
 
-    if (!text) {
+    if (!text.used) {
       return F_true;
     }
 
@@ -32,19 +32,18 @@ extern "C" {
     bool valid = F_true;
     uint8_t mode_codepoint = utf8_codepoint_mode_ready_e;
 
-    f_string_static_t current = macro_f_string_static_t_initialize2(text, 0);
-
-    utf8_process_text_width(&current);
+    utf8_process_text_width(&text);
 
     flockfile(data->file.stream);
 
-    for (uint16_t signal_check = 0; current.string[0] && F_status_is_error_not(status); ) {
+    for (uint16_t signal_check = 0; text.string[0] && F_status_is_error_not(status); ) {
 
       if (!((++signal_check) % utf8_signal_check_d)) {
         if (utf8_signal_received(data)) {
           utf8_print_signal_received(data, status);
 
           status = F_status_set_error(F_signal);
+
           break;
         }
       }
@@ -52,10 +51,10 @@ extern "C" {
       status = F_none;
 
       if (data->mode & utf8_mode_from_binary_d) {
-        status = utf8_convert_binary(data, current);
+        status = utf8_convert_binary(data, text);
       }
       else {
-        status = utf8_detect_codepoint(data, current, &mode_codepoint);
+        status = utf8_detect_codepoint(data, text, &mode_codepoint);
 
         if (F_status_is_error(status)) {
           fll_error_print(data->main->error, F_status_set_fine(status), "utf8_detect_codepoint", F_true);
@@ -64,7 +63,7 @@ extern "C" {
         }
 
         if (F_status_is_fine(status) && status != F_next) {
-          status = utf8_convert_codepoint(data, current, &mode_codepoint);
+          status = utf8_convert_codepoint(data, text, &mode_codepoint);
         }
       }
 
@@ -72,8 +71,8 @@ extern "C" {
         valid = F_false;
       }
 
-      current.string += current.used;
-      utf8_process_text_width(&current);
+      text.string += text.used;
+      utf8_process_text_width(&text);
     } // for
 
     if (F_status_is_error_not(status) && !(data->mode & utf8_mode_from_binary_d)) {
@@ -86,9 +85,9 @@ extern "C" {
           valid = F_false;
         }
 
-        current.used = 0;
+        text.used = 0;
 
-        status = utf8_convert_codepoint(data, current, &mode_codepoint);
+        status = utf8_convert_codepoint(data, text, &mode_codepoint);
       }
     }
 
index 618abdae767ad5ad80bcc30ec1e665d9d0434539..f95bf03290e78d079465d9847090c97028f4dca1 100644 (file)
@@ -49,7 +49,7 @@ extern "C" {
  * @see utf8_signal_received()
  */
 #ifndef _di_utf8_process_text_
-  extern f_status_t utf8_process_text(utf8_data_t * const data, const f_string_t text) F_attribute_visibility_internal_d;
+  extern f_status_t utf8_process_text(utf8_data_t * const data, f_string_static_t text) F_attribute_visibility_internal_d;
 #endif // _di_utf8_process_text_
 
 /**
index 5f273347712e56a21c8f66f6951ba071b309e214..e4f7650d549d99b1b1a8cc21f9cf8ebd6af6c1ab 100644 (file)
@@ -9,21 +9,12 @@
 extern "C" {
 #endif
 
-#ifndef _di_utf8_program_version_
-  const f_string_static_t utf8_program_version_s = macro_f_string_static_t_initialize(UTF8_program_version_s, 0, UTF8_program_version_s_length);
-#endif // _di_utf8_program_version_
-
-#ifndef _di_utf8_program_name_
-  const f_string_static_t utf8_program_name_s = macro_f_string_static_t_initialize(UTF8_program_name_s, 0, UTF8_program_name_s_length);
-  const f_string_static_t utf8_program_name_long_s = macro_f_string_static_t_initialize(UTF8_program_name_long_s, 0, UTF8_program_name_s_long_length);
-#endif // _di_utf8_program_name_
-
 #ifndef _di_utf8_print_help_
   f_status_t utf8_print_help(const f_file_t file, const f_color_context_t context) {
 
     flockfile(file.stream);
 
-    fll_program_print_help_header(file, context, utf8_program_name_long_s, utf8_version_s);
+    fll_program_print_help_header(file, context, utf8_program_name_long_s, utf8_program_version_s);
 
     fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "    Print this help message.");
     fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "    Output using colors that show up better on dark backgrounds.");
@@ -56,17 +47,17 @@ extern "C" {
     fll_program_print_help_option(file, context, utf8_short_strip_invalid_s, utf8_long_strip_invalid_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Strip invalid Unicode characters (do not print invalid sequences).");
     fll_program_print_help_option(file, context, utf8_short_verify_s, utf8_long_verify_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "       Only perform verification of valid sequences.");
 
-    fll_program_print_help_usage(file, context, utf8_program_name_s, "filename(s)");
+    fll_program_print_help_usage(file, context, utf8_program_name_s, utf8_program_help_parameters_s);
 
     fl_print_format("  The default behavior is to assume the expected input is binary from the command line to be output to the screen as codepoints.%r%r", file.stream, f_string_eol_s, f_string_eol_s);
 
     fl_print_format("  Multiple input sources are allowed but only a single output destination is allowed.%r%r", file.stream, f_string_eol_s, f_string_eol_s);
 
-    fl_print_format("  When using the parameter '%[%r%s%]', no data is printed and 0 is returned if valid or 1 is returned if invalid.%r%r", file.stream, context.set.notable, f_console_symbol_long_enable_s, utf8_long_verify_s, context.set.notable, f_string_eol_s, f_string_eol_s);
+    fl_print_format("  When using the parameter '%[%r%r%]', no data is printed and 0 is returned if valid or 1 is returned if invalid.%r%r", file.stream, context.set.notable, f_console_symbol_long_enable_s, utf8_long_verify_s, context.set.notable, f_string_eol_s, f_string_eol_s);
 
-    fl_print_format("  When using the parameter '%[%r%s%]' with the parameter ", file.stream, context.set.notable, f_console_symbol_long_enable_s, utf8_long_to_combining_s, context.set.notable);
-    fl_print_format("'%[%r%s%]', the ", file.stream, context.set.notable, f_console_symbol_long_enable_s, utf8_long_to_width_s, context.set.notable);
-    fl_print_format("'%[%s%]' character is printed to represent the combining and the digits are used to represent widths.%r", file.stream, context.set.notable, utf8_string_combining_is_s, context.set.notable, f_string_eol_s);
+    fl_print_format("  When using the parameter '%[%r%r%]' with the parameter ", file.stream, context.set.notable, f_console_symbol_long_enable_s, utf8_long_to_combining_s, context.set.notable);
+    fl_print_format("'%[%r%r%]', the ", file.stream, context.set.notable, f_console_symbol_long_enable_s, utf8_long_to_width_s, context.set.notable);
+    fl_print_format("'%[%r%]' character is printed to represent the combining and the digits are used to represent widths.%r", file.stream, context.set.notable, utf8_string_combining_is_s, context.set.notable, f_string_eol_s);
     fl_print_format("  The combining characters should be considered 1-width by themselves or 0-width when combined.%r%r", file.stream, f_string_eol_s, f_string_eol_s);
 
     funlockfile(file.stream);
@@ -76,7 +67,7 @@ extern "C" {
 #endif // _di_utf8_print_help_
 
 #ifndef _di_utf8_main_
-  f_status_t utf8_main(utf8_main_t * const main, const f_console_arguments_t *arguments) {
+  f_status_t utf8_main(fll_program_data_t * const main, const f_console_arguments_t *arguments) {
 
     f_status_t status = F_none;
 
@@ -92,7 +83,7 @@ extern "C" {
       f_console_parameter_id_t ids[3] = { utf8_parameter_no_color_e, utf8_parameter_light_e, utf8_parameter_dark_e };
       const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
 
-      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
+      status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->context);
 
       main->output.set = &main->context.set;
       main->error.set = &main->context.set;
@@ -290,7 +281,7 @@ extern "C" {
     }
 
     if (main->parameters.array[utf8_parameter_version_e].result == f_console_result_found_e) {
-      fll_program_print_version(main->output.to, utf8_version_s);
+      fll_program_print_version(main->output.to, utf8_program_version_s);
 
       utf8_data_delete(&data);
       utf8_main_delete(main);
@@ -307,7 +298,7 @@ extern "C" {
 
           index = main->parameters.array[utf8_parameter_from_file_e].values.array[i];
 
-          if (arguments->argv[index][0]) {
+          if (!data.argv[index].used) {
             if (!f_file_exists(data.argv[index])) {
               utf8_print_error_parameter_file_not_found(&data, F_true, data.argv[index]);
 
@@ -342,14 +333,11 @@ extern "C" {
           status = F_status_set_error(F_parameter);
         }
         else {
-          data.file_name.string = arguments->argv[main->parameters.array[utf8_parameter_to_file_e].values.array[0]];
-          data.file_name.used = strnlen(data.file_name.string, PATH_MAX);
-
-          if (data.file_name.used) {
-            status = f_file_stream_open(data.file_name.string, "a", &data.file);
+          if (data.argv[main->parameters.array[utf8_parameter_to_file_e].values.array[0]].used) {
+            status = f_file_stream_open(data.argv[main->parameters.array[utf8_parameter_to_file_e].values.array[0]], f_file_open_mode_append_s, &data.file);
 
             if (F_status_is_error(status)) {
-              fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, data.file_name.string, f_file_operation_open_s, fll_error_file_type_file_e);
+              fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, data.argv[main->parameters.array[utf8_parameter_to_file_e].values.array[0]], f_file_operation_open_s, fll_error_file_type_file_e);
             }
           }
           else {
@@ -370,7 +358,7 @@ extern "C" {
     }
 
     if (F_status_is_error_not(status)) {
-      if (main->parameters.array[utf8_parameter_from_file_e].result == f_console_result_none_e && !(main->process_pipe || main->remaining.used)) {
+      if (main->parameters.array[utf8_parameter_from_file_e].result == f_console_result_none_e && !(main->process_pipe || main->parameters.remaining.used)) {
         utf8_print_error_no_from(&data);
 
         status = F_status_set_error(F_parameter);
@@ -378,7 +366,7 @@ extern "C" {
 
       if (!(data.mode & utf8_mode_to_binary_d)) {
         if (main->parameters.array[utf8_parameter_separate_e].result == f_console_result_found_e || main->parameters.array[utf8_parameter_headers_e].result == f_console_result_found_e) {
-          data.prepend = "  ";
+          data.prepend = utf8_string_prepend_padding_s;
           data.append = f_string_eol_s;
         }
         else {
@@ -408,7 +396,7 @@ extern "C" {
         }
 
         if (F_status_is_error(status) && F_status_set_fine(status) != F_utf_fragment) {
-          fll_error_file_print(main->error, F_status_set_fine(status), data.mode & utf8_mode_from_binary_d ? "utf8_process_file_binary" : "utf8_process_file_codepoint", F_true, 0, f_file_operation_process_s, fll_error_file_type_pipe_e);
+          fll_error_file_print(main->error, F_status_set_fine(status), data.mode & utf8_mode_from_binary_d ? "utf8_process_file_binary" : "utf8_process_file_codepoint", F_true, f_string_empty_s, f_file_operation_process_s, fll_error_file_type_pipe_e);
         }
       }
 
@@ -431,12 +419,12 @@ extern "C" {
 
           index = main->parameters.array[utf8_parameter_from_file_e].values.array[i];
 
-          utf8_print_section_header_file(&data, arguments->argv[index]);
+          utf8_print_section_header_file(&data, data.argv[index]);
 
-          status = f_file_stream_open(arguments->argv[index], 0, &file);
+          status = f_file_stream_open(data.argv[index], f_string_empty_s, &file);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[index], f_file_operation_open_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, data.argv[index], f_file_operation_open_s, fll_error_file_type_file_e);
 
             break;
           }
@@ -457,33 +445,31 @@ extern "C" {
           }
 
           if (F_status_is_error(status) && F_status_set_fine(status) != F_utf_fragment) {
-            fll_error_file_print(main->error, F_status_set_fine(status), data.mode & utf8_mode_from_binary_d ? "utf8_process_file_binary" : "utf8_process_file_codepoint", F_true, arguments->argv[index], f_file_operation_process_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), data.mode & utf8_mode_from_binary_d ? "utf8_process_file_binary" : "utf8_process_file_codepoint", F_true, data.argv[index], f_file_operation_process_s, fll_error_file_type_file_e);
 
             break;
           }
         } // for
       }
 
-      if (F_status_is_error_not(status) && status != F_signal && main->remaining.used) {
-        f_array_length_t i = 0;
-        f_array_length_t index = 0;
+      if (F_status_is_error_not(status) && status != F_signal && main->parameters.remaining.used) {
+        uint16_t signal_check = 0;
 
-        for (uint16_t signal_check = 0; F_status_is_error_not(status) && i < main->remaining.used; ++i) {
+        for (f_array_length_t i = 0; F_status_is_error_not(status) && i < main->parameters.remaining.used; ++i) {
 
           if (!((++signal_check) % utf8_signal_check_d)) {
             if (utf8_signal_received(&data)) {
               status = F_status_set_error(F_signal);
+
               break;
             }
 
             signal_check = 0;
           }
 
-          index = main->remaining.array[i];
-
-          utf8_print_section_header_parameter(&data, index);
+          utf8_print_section_header_parameter(&data, main->parameters.remaining.array[i]);
 
-          status = utf8_process_text(&data, arguments->argv[index]);
+          status = utf8_process_text(&data, data.argv[main->parameters.remaining.array[i]]);
 
           if (main->parameters.array[utf8_parameter_verify_e].result == f_console_result_found_e) {
             if (status == F_false) {
index aa1f211ea1fcfe362ab9f4bd4b61cb1e565ddde5..df6a933dfe2823b4977e73a46e464c420c9048ed 100644 (file)
@@ -106,7 +106,7 @@ extern "C" {
  * @see utf8_main_delete()
  */
 #ifndef _di_utf8_main_
-  extern f_status_t utf8_main(utf8_main_t * const main, const f_console_arguments_t *arguments);
+  extern f_status_t utf8_main(fll_program_data_t * const main, const f_console_arguments_t *arguments);
 #endif // _di_utf8_main_
 
 #ifdef __cplusplus