]> Kevux Git Server - fll/commitdiff
Progress: Improve thread support across programs and update threaded usage.
authorKevin Day <kevin@kevux.org>
Tue, 4 Apr 2023 23:49:22 +0000 (18:49 -0500)
committerKevin Day <kevin@kevux.org>
Tue, 4 Apr 2023 23:49:22 +0000 (18:49 -0500)
Enable the threaded signal handled consistently across all programs that are currently migrated (see commit 9e0529297bfdb1529be685eacd3ca5784ea8e946).

Improve the thread configuration to make it easier to enable or disable thread support.

Add documentation regarding the build modes supported in each of the build settings files.

Update the build scripts to better handle the now additional build modes.
The build scripts now use braces everywhere.
Doing this should make it easier to be compatible with other scripting engines such as ZSH.

198 files changed:
build/level_0/settings
build/level_1/settings
build/level_2/settings
build/monolithic/settings
build/scripts/bootstrap-example.sh
build/scripts/bootstrap.sh
build/scripts/install.sh
build/scripts/test.sh
build/stand_alone/fake.config.h
build/stand_alone/fake.settings
level_0/f_account/data/build/settings
level_0/f_capability/data/build/settings
level_0/f_color/data/build/settings
level_0/f_compare/data/build/settings
level_0/f_compare/data/build/settings-tests
level_0/f_console/data/build/settings
level_0/f_control_group/data/build/settings
level_0/f_conversion/data/build/settings
level_0/f_directory/data/build/settings
level_0/f_environment/data/build/settings
level_0/f_execute/data/build/settings
level_0/f_file/data/build/settings
level_0/f_fss/data/build/settings
level_0/f_iki/data/build/settings
level_0/f_limit/data/build/settings
level_0/f_memory/data/build/settings
level_0/f_parse/data/build/settings
level_0/f_path/data/build/settings
level_0/f_pipe/data/build/settings
level_0/f_print/data/build/settings
level_0/f_rip/data/build/settings
level_0/f_serialize/data/build/settings
level_0/f_signal/data/build/settings
level_0/f_socket/data/build/settings
level_0/f_status/data/build/settings
level_0/f_status_string/data/build/settings
level_0/f_string/data/build/settings
level_0/f_thread/data/build/settings
level_0/f_type/data/build/settings
level_0/f_type_array/data/build/settings
level_0/f_utf/data/build/settings
level_1/fl_control_group/data/build/settings
level_1/fl_conversion/data/build/settings
level_1/fl_directory/data/build/settings
level_1/fl_environment/data/build/settings
level_1/fl_execute/data/build/settings
level_1/fl_fss/data/build/settings
level_1/fl_iki/data/build/settings
level_1/fl_path/data/build/settings
level_1/fl_print/data/build/settings
level_1/fl_signal/data/build/settings
level_1/fl_status_string/data/build/settings
level_1/fl_utf/data/build/settings
level_1/fl_utf_file/data/build/settings
level_2/fll_control_group/data/build/settings
level_2/fll_error/data/build/settings
level_2/fll_execute/data/build/settings
level_2/fll_file/data/build/settings
level_2/fll_fss/data/build/settings
level_2/fll_fss_status_string/data/build/settings
level_2/fll_iki/data/build/settings
level_2/fll_print/data/build/settings
level_2/fll_program/data/build/settings
level_3/byte_dump/c/print.h
level_3/byte_dump/data/build/defines
level_3/byte_dump/data/build/settings
level_3/control/c/print.h
level_3/control/data/build/defines
level_3/control/data/build/settings
level_3/controller/c/print.h
level_3/controller/data/build/defines
level_3/controller/data/build/settings
level_3/fake/c/main/common/define.h
level_3/fake/c/main/fake.h
level_3/fake/data/build/defines
level_3/fake/data/build/settings
level_3/firewall/c/print.h
level_3/firewall/data/build/defines
level_3/firewall/data/build/settings
level_3/fss_basic_list_read/c/print.h
level_3/fss_basic_list_read/data/build/defines
level_3/fss_basic_list_read/data/build/settings
level_3/fss_basic_read/c/print.h
level_3/fss_basic_read/data/build/defines
level_3/fss_basic_read/data/build/settings
level_3/fss_embedded_list_read/c/print.h
level_3/fss_embedded_list_read/data/build/defines
level_3/fss_embedded_list_read/data/build/settings
level_3/fss_extended_list_read/c/print.h
level_3/fss_extended_list_read/data/build/defines
level_3/fss_extended_list_read/data/build/settings
level_3/fss_extended_read/c/print.h
level_3/fss_extended_read/data/build/defines
level_3/fss_extended_read/data/build/settings
level_3/fss_identify/c/print.h
level_3/fss_identify/data/build/defines
level_3/fss_identify/data/build/settings
level_3/fss_payload_read/c/print.h
level_3/fss_payload_read/data/build/defines
level_3/fss_payload_read/data/build/settings
level_3/fss_write/c/basic/main.c
level_3/fss_write/c/basic_list/main.c
level_3/fss_write/c/embedded_list/main.c
level_3/fss_write/c/extended/main.c
level_3/fss_write/c/extended_list/main.c
level_3/fss_write/c/main/common.c
level_3/fss_write/c/main/common.h
level_3/fss_write/c/main/common/define.h
level_3/fss_write/c/main/common/type.c
level_3/fss_write/c/main/common/type.h
level_3/fss_write/c/main/fss_write.h
level_3/fss_write/c/main/main.c
level_3/fss_write/c/main/signal.c [new file with mode: 0644]
level_3/fss_write/c/main/signal.h [new file with mode: 0644]
level_3/fss_write/c/main/thread.c [new file with mode: 0644]
level_3/fss_write/c/main/thread.h [new file with mode: 0644]
level_3/fss_write/c/payload/main.c
level_3/fss_write/data/build/defines
level_3/fss_write/data/build/settings
level_3/fss_write/data/build/settings.basic
level_3/fss_write/data/build/settings.basic_list
level_3/fss_write/data/build/settings.embedded_list
level_3/fss_write/data/build/settings.extended
level_3/fss_write/data/build/settings.extended_list
level_3/fss_write/data/build/settings.main
level_3/fss_write/data/build/settings.payload
level_3/iki_read/c/main/common.c
level_3/iki_read/c/main/common.h
level_3/iki_read/c/main/common/define.h
level_3/iki_read/c/main/common/print.c
level_3/iki_read/c/main/common/print.h
level_3/iki_read/c/main/common/string.h
level_3/iki_read/c/main/common/type.c
level_3/iki_read/c/main/common/type.h
level_3/iki_read/c/main/identify.h
level_3/iki_read/c/main/iki_read.c
level_3/iki_read/c/main/iki_read.h
level_3/iki_read/c/main/main.c
level_3/iki_read/c/main/print/data.h
level_3/iki_read/c/main/print/error.h
level_3/iki_read/c/main/process.h
level_3/iki_read/c/main/signal.c [new file with mode: 0644]
level_3/iki_read/c/main/signal.h [new file with mode: 0644]
level_3/iki_read/c/main/thread.c [new file with mode: 0644]
level_3/iki_read/c/main/thread.h [new file with mode: 0644]
level_3/iki_read/data/build/defines
level_3/iki_read/data/build/settings
level_3/iki_write/c/main/common.c
level_3/iki_write/c/main/common.h
level_3/iki_write/c/main/common/define.h
level_3/iki_write/c/main/common/print.c
level_3/iki_write/c/main/common/print.h
level_3/iki_write/c/main/common/type.c
level_3/iki_write/c/main/common/type.h
level_3/iki_write/c/main/iki_write.h
level_3/iki_write/c/main/main.c
level_3/iki_write/c/main/process.h
level_3/iki_write/c/main/signal.c [new file with mode: 0644]
level_3/iki_write/c/main/signal.h [new file with mode: 0644]
level_3/iki_write/c/main/thread.c [new file with mode: 0644]
level_3/iki_write/c/main/thread.h [new file with mode: 0644]
level_3/iki_write/data/build/defines
level_3/iki_write/data/build/settings
level_3/status_code/c/fss/main.c
level_3/status_code/c/main/common.c
level_3/status_code/c/main/common.h
level_3/status_code/c/main/common/define.h
level_3/status_code/c/main/common/print.c
level_3/status_code/c/main/common/print.h
level_3/status_code/c/main/common/type.c
level_3/status_code/c/main/common/type.h
level_3/status_code/c/main/main.c
level_3/status_code/c/main/signal.c [new file with mode: 0644]
level_3/status_code/c/main/signal.h [new file with mode: 0644]
level_3/status_code/c/main/status_code.h
level_3/status_code/c/main/thread.c [new file with mode: 0644]
level_3/status_code/c/main/thread.h [new file with mode: 0644]
level_3/status_code/data/build/defines
level_3/status_code/data/build/defines.fss
level_3/status_code/data/build/settings
level_3/status_code/data/build/settings.fss
level_3/status_code/data/build/settings.main
level_3/utf8/c/main/codepoint.c
level_3/utf8/c/main/common.c
level_3/utf8/c/main/common.h
level_3/utf8/c/main/common/define.h
level_3/utf8/c/main/common/print.c
level_3/utf8/c/main/common/print.h
level_3/utf8/c/main/common/type.c
level_3/utf8/c/main/common/type.h
level_3/utf8/c/main/main.c
level_3/utf8/c/main/signal.c [new file with mode: 0644]
level_3/utf8/c/main/signal.h [new file with mode: 0644]
level_3/utf8/c/main/thread.c [new file with mode: 0644]
level_3/utf8/c/main/thread.h [new file with mode: 0644]
level_3/utf8/c/main/utf8.h
level_3/utf8/data/build/defines
level_3/utf8/data/build/settings

index 813997b91373730cc6e1946176d92c2bcf82744a..d7e88d8ac66563809a73caea45c27f68daa48540 100644 (file)
@@ -1,4 +1,18 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
+# Note: This adds "individual" and "monolithic" for consistency reasons. This should never use "individual" or "monolithic".
+#
 
 build_name fll_0
 
@@ -8,8 +22,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes level level_threadless clang test fanalyzer
-modes_default level
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default level thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -64,7 +78,7 @@ build_sources_library utf.c private-utf.c private-utf_alphabetic.c private-utf_c
 build_sources_library utf/common.c utf/convert.c utf/dynamic.c utf/dynamics.c utf/dynamicss.c utf/is.c utf/is_character.c utf/map.c utf/maps.c utf/mapss.c utf/map_multi.c utf/map_multis.c utf/map_multiss.c utf/static.c utf/statics.c utf/staticss.c utf/string.c utf/triple.c utf/triples.c utf/tripless.c
 build_sources_library utf/private-dynamic.c utf/private-dynamics.c utf/private-dynamicss.c utf/private-maps.c utf/private-mapss.c utf/private-map_multis.c utf/private-map_multiss.c utf/private-string.c utf/private-triples.c utf/private-tripless.c
 
-build_sources_library-level thread.c private-thread.c thread/attribute.c thread/barrier.c thread/barrier_attribute.c thread/condition.c thread/condition_attribute.c thread/id.c thread/key.c thread/lock.c thread/lock_attribute.c thread/mutex.c thread/mutex_attribute.c thread/once.c thread/semaphore.c thread/set.c thread/spin.c
+build_sources_library-thread thread.c private-thread.c thread/attribute.c thread/barrier.c thread/barrier_attribute.c thread/condition.c thread/condition_attribute.c thread/id.c thread/key.c thread/lock.c thread/lock_attribute.c thread/mutex.c thread/mutex_attribute.c thread/once.c thread/semaphore.c thread/set.c thread/spin.c
 
 build_sources_headers account.h account/accounts.h account/common.h
 build_sources_headers capability.h capability/common.h
@@ -104,7 +118,7 @@ build_sources_headers type_array.h type_array/common.h
 build_sources_headers type_array/array_length.h type_array/cell.h type_array/fll_id.h type_array/int8.h type_array/int16.h type_array/int32.h type_array/int64.h type_array/int128.h type_array/state.h type_array/status.h type_array/uint8.h type_array/uint16.h type_array/uint32.h type_array/uint64.h type_array/uint128.h
 build_sources_headers utf.h utf/common.h utf/convert.h utf/dynamic.h utf/dynamics.h utf/dynamicss.h utf/is.h utf/is_character.h utf/map.h utf/maps.h utf/mapss.h utf/map_multi.h utf/map_multis.h utf/map_multiss.h utf/static.h utf/statics.h utf/staticss.h utf/string.h utf/triple.h utf/triples.h utf/tripless.h
 
-build_sources_headers-level thread.h thread/attribute.h thread/barrier.h thread/barrier_attribute.h thread/condition.h thread/condition_attribute.h thread/id.h thread/key.h thread/lock.h thread/lock_attribute.h thread/mutex.h thread/mutex_attribute.h thread/once.h thread/semaphore.h thread/set.h thread/spin.h
+build_sources_headers-thread thread.h thread/attribute.h thread/barrier.h thread/barrier_attribute.h thread/condition.h thread/condition_attribute.h thread/id.h thread/key.h thread/lock.h thread/lock_attribute.h thread/mutex.h thread/mutex_attribute.h thread/once.h thread/semaphore.h thread/set.h thread/spin.h
 
 build_script yes
 build_shared yes
@@ -133,15 +147,16 @@ environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY L
 
 #defines -D_di_libcap_
 #defines -D_f_file_rename_use_renameat2_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+defines -D_libcap_legacy_only_
 defines-clang -D_clang_not_a_compile_time_constant_workaround_
-defines-level_threadless -D_di_pthread_support_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
 
 flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -fstack-protector -Wall
 flags-fanalyzer -fanalyzer
-flags-level -pthread
 
 flags_library -fPIC
 flags_object -fPIC
index d61f45b72549c3731add4353ad73321520ee38fd..3cb05e11f8c1e6edc5415d6ab5f57c9ccf36587a 100644 (file)
@@ -1,4 +1,18 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
+# Note: This adds "individual" and "monolithic" for consistency reasons. This should never use "individual" or "monolithic".
+#
 
 build_name fll_1
 
@@ -8,8 +22,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes level level_threadless clang test fanalyzer
-modes_default level
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default level thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -19,7 +33,6 @@ build_language c
 
 build_libraries -lc -lcap
 build_libraries-level -lfll_0
-build_libraries-level_threadless -lfll_0
 
 build_sources_library control_group.c
 build_sources_library conversion.c private-conversion.c conversion/common.c
@@ -72,14 +85,15 @@ environment PATH LD_LIBRARY_PATH
 environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
 
 #defines -D_di_libcap_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
-defines-level_threadless -D_di_pthread_support_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
 
 flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -fstack-protector -Wall
 flags-fanalyzer -fanalyzer
-flags-level -pthread
 
 flags_library -fPIC
 flags_object -fPIC
index 606cb6b9e682a840c4f085f91d9b33ce3187edb2..dec81589360f29dee2c2b26a040ab52c6c5cd929 100644 (file)
@@ -1,4 +1,18 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
+# Note: This adds "individual" and "monolithic" for consistency reasons. This should never use "individual" or "monolithic".
+#
 
 build_name fll_2
 
@@ -8,8 +22,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes level level_threadless clang test fanalyzer
-modes_default level
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default level thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -19,7 +33,6 @@ build_language c
 
 build_libraries -lc -lcap
 build_libraries-level -lfll_1 -lfll_0
-build_libraries-level_threadless -lfll_1 -lfll_0
 
 build_sources_library control_group.c
 build_sources_library error.c private-error.c error/common.c
@@ -67,14 +80,15 @@ environment PATH LD_LIBRARY_PATH
 environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
 
 #defines -D_di_libcap_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
-defines-level_threadless -D_di_pthread_support_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
 
 flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -fstack-protector -Wall
 flags-fanalyzer -fanalyzer
-flags-level -pthread
 
 flags_library -fPIC
 flags_object -fPIC
index 25aff4a1f5e1822899e1f63fe44bfe75a30381bb..c735cbdc603a823ca8fc6bceb13370f4839eadc1 100644 (file)
@@ -1,4 +1,18 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
+# Note: This adds "individual" and "level" for consistency reasons. This should never use "individual" or "level".
+#
 
 build_name fll
 
@@ -8,8 +22,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes monolithic monolithic_threadless clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -86,7 +100,7 @@ build_sources_library level_2/iki.c level_2/private-iki.c
 build_sources_library level_2/print.c
 build_sources_library level_2/program.c level_2/program/common.c level_2/program/print.c level_2/private-program.c
 
-build_sources_library-monolithic level_0/thread.c level_0/private-thread.c level_0/thread/attribute.c level_0/thread/barrier.c level_0/thread/barrier_attribute.c level_0/thread/condition.c level_0/thread/condition_attribute.c level_0/thread/id.c level_0/thread/key.c level_0/thread/lock.c level_0/thread/lock_attribute.c level_0/thread/mutex.c level_0/thread/mutex_attribute.c level_0/thread/once.c level_0/thread/semaphore.c level_0/thread/set.c level_0/thread/spin.c
+build_sources_library-thread level_0/thread.c level_0/private-thread.c level_0/thread/attribute.c level_0/thread/barrier.c level_0/thread/barrier_attribute.c level_0/thread/condition.c level_0/thread/condition_attribute.c level_0/thread/id.c level_0/thread/key.c level_0/thread/lock.c level_0/thread/lock_attribute.c level_0/thread/mutex.c level_0/thread/mutex_attribute.c level_0/thread/once.c level_0/thread/semaphore.c level_0/thread/set.c level_0/thread/spin.c
 
 build_sources_headers level_0/account.h level_0/account/accounts.h level_0/account/common.h
 build_sources_headers level_0/capability.h level_0/capability/common.h
@@ -149,7 +163,7 @@ build_sources_headers level_2/iki.h
 build_sources_headers level_2/print.h
 build_sources_headers level_2/program.h level_2/program/common.h level_2/program/print.h
 
-build_sources_headers-monolithic level_0/thread.h level_0/thread/attribute.h level_0/thread/barrier.h level_0/thread/barrier_attribute.h level_0/thread/condition.h level_0/thread/condition_attribute.h level_0/thread/id.h level_0/thread/key.h level_0/thread/lock.h level_0/thread/lock_attribute.h level_0/thread/mutex.h level_0/thread/mutex_attribute.h level_0/thread/once.h level_0/thread/semaphore.h level_0/thread/set.h level_0/thread/spin.h
+build_sources_headers-thread level_0/thread.h level_0/thread/attribute.h level_0/thread/barrier.h level_0/thread/barrier_attribute.h level_0/thread/condition.h level_0/thread/condition_attribute.h level_0/thread/id.h level_0/thread/key.h level_0/thread/lock.h level_0/thread/lock_attribute.h level_0/thread/mutex.h level_0/thread/mutex_attribute.h level_0/thread/once.h level_0/thread/semaphore.h level_0/thread/set.h level_0/thread/spin.h
 
 build_script yes
 build_shared yes
@@ -178,15 +192,16 @@ environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY L
 
 #defines -D_di_libcap_
 #defines -D_f_file_rename_use_renameat2_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+defines -D_libcap_legacy_only_
 defines-clang -D_clang_not_a_compile_time_constant_workaround_
-defines-monolithic_threadless -D_di_pthread_support_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
 
 flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -fstack-protector -Wall
 flags-fanalyzer -fanalyzer
-flags-monolithic -pthread
 
 flags_library -fPIC
 flags_object -fPIC
index 8e1703b91400955a8274b483e1d2cf180bc3be44..095c49d0b4a71106c88ba7d0426fca89a3d33928 100644 (file)
 #   SHELL_ENGINE="zsh" zsh ./bootstrap-example.sh --help
 #
 
-if [[ $SHELL_ENGINE == "zsh" ]] ; then
+if [[ ${SHELL_ENGINE} == "zsh" ]] ; then
   emulate ksh
 fi
 
-path_original="$PWD/"
+path_original="${PWD}/"
 path_work="${path_original}fll/"
 
 verbose=
@@ -57,196 +57,228 @@ mode_part=
 mode_parameter=
 mode_path=
 mode_value=
+build_mode=
+build_mode_extra_param_1=
+build_mode_extra_value_1=
+build_mode_extra_param_2=
+build_mode_extra_value_2=
 shell_command=bash
 suppress_first="+F"
 
-if [[ $SHELL_ENGINE == "zsh" ]] ; then
+if [[ ${SHELL_ENGINE} == "zsh" ]] ; then
   shell_command=zsh
 fi
 
 let i=2
 p=
 
-while [[ $i -le $# ]] ; do
+while [[ ${i} -le $# ]] ; do
 
-  if [[ $SHELL_ENGINE == "zsh" ]] ; then
+  if [[ ${SHELL_ENGINE} == "zsh" ]] ; then
     p=${(P)i}
   else
     p=${!i}
   fi
 
-  if [[ $p == "+d" ]] ; then
+  if [[ ${p} == "+d" ]] ; then
     color="+d"
-  elif [[ $p == "+l" ]] ; then
+  elif [[ ${p} == "+l" ]] ; then
     color="+l"
-  elif [[ $p == "+n" ]] ; then
+  elif [[ ${p} == "+n" ]] ; then
     color="+n"
-  elif [[ $p == "+Q" ]] ; then
+  elif [[ ${p} == "+Q" ]] ; then
     verbose="+Q"
     verbose_common=
-  elif [[ $p == "+E" ]] ; then
+  elif [[ ${p} == "+E" ]] ; then
     verbose="+E"
     verbose_common=
-  elif [[ $p == "+N" ]] ; then
+  elif [[ ${p} == "+N" ]] ; then
     verbose="+N"
     verbose_common=
-  elif [[ $p == "+V" ]] ; then
+  elif [[ ${p} == "+V" ]] ; then
     verbose="+V"
     verbose_common="-v"
-  elif [[ $p == "+D" ]] ; then
+  elif [[ ${p} == "+D" ]] ; then
     verbose="+D"
     verbose_common="-v"
-  elif [[ $p == "--enable-static" ]] ; then
+  elif [[ ${p} == "--enable-static" ]] ; then
     static="--enable-static"
-  elif [[ $p == "--disable-static" ]] ; then
+  elif [[ ${p} == "--disable-static" ]] ; then
     static="--disable-static"
-  elif [[ $p == "--enable-shared" ]] ; then
+  elif [[ ${p} == "--enable-shared" ]] ; then
     shared="--enable-shared"
-  elif [[ $p == "--disable-shared" ]] ; then
+  elif [[ ${p} == "--disable-shared" ]] ; then
     shared="--disable-shared"
-  elif [[ $p == "clang" ]] ; then
+  elif [[ ${p} == "clang" ]] ; then
     clang="-m clang"
-  elif [[ $p == "-w" || $p == "--work" ]] ; then
+  elif [[ ${p} == "-w" || ${p} == "--work" ]] ; then
     let i++
 
-    if [[ $i -le $# ]] ; then
-      path_work=$p
+    if [[ ${i} -le $# ]] ; then
+      path_work=${p}
     fi
   fi
 
   let i++
 done
 
-if [[ ! -d $path_work ]] ; then
-  mkdir $verbose_common -p $path_work
+if [[ ! -d ${path_work} ]] ; then
+  mkdir ${verbose_common} -p ${path_work}
 fi
 
-if [[ $1 == "individual" ]] ; then
-  $shell_command build/scripts/package.sh $verbose $color rebuild -i
+if [[ ${1} == "individual" ]] ; then
+  ${shell_command} build/scripts/package.sh ${verbose} ${color} rebuild -i
 
-  if [[ $? -eq 0 ]] ; then
+  if [[ ${?} -eq 0 ]] ; then
     for i in f_type f_status f_memory f_type_array f_string f_utf f_account f_capability f_color f_compare f_console f_control_group f_conversion f_directory f_environment f_execute f_file f_fss f_iki f_limit f_parse f_path f_pipe f_print f_rip f_status_string f_serialize f_signal f_socket f_thread fl_control_group fl_conversion fl_directory fl_environment fl_execute fl_fss fl_iki fl_path fl_print fl_signal fl_status_string fl_utf_file fll_control_group fll_error fll_execute fll_file fll_fss fll_fss_status_string fll_iki fll_print fll_program ; do
-      echo && echo "Processing $i." &&
+      echo && echo "Processing ${i}." &&
 
-      cd package/individual/$i-$version/ &&
+      cd package/individual/${i}-${version}/ &&
 
-      $shell_command ./bootstrap.sh clean $verbose $color $suppress_first &&
+      ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} &&
 
-      $shell_command ./bootstrap.sh build $verbose $color $suppress_first $shared $static -w $path_work -m individual $clang &&
+      ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m individual -m individual_thread -m thread ${clang} &&
 
-      $shell_command ./install.sh $verbose $color $suppress_first $shared $static -w $path_work &&
+      ${shell_command} ./install.sh ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} &&
 
-      cd $path_original || break
+      cd ${path_original} || break
     done
   fi
 fi
 
-if [[ $1 == "level" ]] ; then
-  $shell_command build/scripts/package.sh $verbose $color rebuild -l &&
+if [[ ${1} == "level" ]] ; then
+  ${shell_command} build/scripts/package.sh ${verbose} ${color} rebuild -l &&
 
-  cd package/level/fll-level_0-$version/ &&
+  cd package/level/fll-level_0-${version}/ &&
 
-  $shell_command ./bootstrap.sh clean $verbose $color $suppress_first &&
+  ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} &&
 
-  $shell_command ./bootstrap.sh build $verbose $color $suppress_first $shared $static -w $path_work -m level $clang &&
+  ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m level -m thread ${clang} &&
 
-  $shell_command ./install.sh $verbose $color $suppress_first $shared $static -w $path_work &&
+  ${shell_command} ./install.sh ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} &&
 
-  cd $path_original &&
+  cd ${path_original} &&
 
-  cd package/level/fll-level_1-$version/ &&
+  cd package/level/fll-level_1-${version}/ &&
 
-  $shell_command ./bootstrap.sh clean $verbose $color $suppress_first &&
+  ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} &&
 
-  $shell_command ./bootstrap.sh build $verbose $color $suppress_first $shared $static -w $path_work -m level &&
+  ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m level -m thread &&
 
-  $shell_command ./install.sh $verbose $color $suppress_first $shared $static -w $path_work &&
+  ${shell_command} ./install.sh ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} &&
 
-  cd $path_original &&
+  cd ${path_original} &&
 
-  cd package/level/fll-level_2-$version/ &&
+  cd package/level/fll-level_2-${version}/ &&
 
-  $shell_command ./bootstrap.sh clean $verbose $color $suppress_first &&
+  ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} &&
 
-  $shell_command ./bootstrap.sh build $verbose $color $suppress_first $shared $static -w $path_work -m level &&
+  ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m level -m thread &&
 
-  $shell_command ./install.sh $verbose $color $suppress_first $shared $static -w $path_work
+  ${shell_command} ./install.sh ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work}
 fi
 
-if [[ $1 == "monolithic" ]] ; then
-  $shell_command build/scripts/package.sh $verbose $color rebuild -m &&
+if [[ ${1} == "monolithic" ]] ; then
+  ${shell_command} build/scripts/package.sh ${verbose} ${color} rebuild -m &&
 
-  cd package/monolithic/fll-$version/ &&
+  cd package/monolithic/fll-${version}/ &&
 
-  $shell_command ./bootstrap.sh clean $verbose $color $suppress_first &&
+  ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} &&
 
-  $shell_command ./bootstrap.sh build $verbose $color $suppress_first $shared $static -w $path_work -m monolithic $clang &&
+  ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m monolithic -m thread ${clang} &&
 
-  $shell_command ./install.sh $verbose $color $shared $suppress_first $static -w $path_work
+  ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${suppress_first} ${static} -w ${path_work}
 fi
 
 # The following in an example on building individual projects.
 for mode_part in fake utf8 ; do
-  if [[ $1 == "$mode_part-individual" || $1 == "$mode_part-level" || $1 == "$mode_part-monolithic" || $1 == "$mode_part-stand_alone" ]] ; then
+  if [[ ${1} == "${mode_part}-individual" || ${1} == "${mode_part}-level" || ${1} == "${mode_part}-monolithic" || ${1} == "${mode_part}-stand_alone" ]] ; then
     break;
   fi
 
   mode_part=
 done
 
-if [[ $mode_part != "" ]] ; then
+if [[ ${mode_part} != "" ]] ; then
   mode_parameter="-p"
   mode_path="program"
   mode_value=
+  build_mode_extra_param_1=
+  build_mode_extra_value_1=
+  build_mode_extra_param_2=
+  build_mode_extra_value_2=
 
-  if [[ $1 == "$mode_part-individual" ]] ; then
+  if [[ ${1} == "${mode_part}-individual" ]] ; then
     build_mode="individual"
-  elif [[ $1 == "$mode_part-level" ]] ; then
+    build_mode_extra_param_1="-m"
+    build_mode_extra_value_1="individual_thread"
+    build_mode_extra_param_2="-m"
+    build_mode_extra_value_2="thread"
+  elif [[ ${1} == "${mode_part}-level" ]] ; then
     build_mode="level"
-  elif [[ $1 == "$mode_part-monolithic" ]] ; then
+    build_mode_extra_param_1="-m"
+    build_mode_extra_value_1="thread"
+  elif [[ ${1} == "${mode_part}-monolithic" ]] ; then
     build_mode="monolithic"
-  elif [[ $1 == "$mode_part-stand_alone" ]] ; then
+    build_mode_extra_param_1="-m"
+    build_mode_extra_value_1="thread"
+  elif [[ ${1} == "${mode_part}-stand_alone" ]] ; then
     build_mode="stand_alone"
     mode_path="stand_alone"
     mode_parameter="-S"
-    mode_value="$mode_part"
+    mode_value="${mode_part}"
+    build_mode_extra_param_1="-m"
+    build_mode_extra_value_1="thread"
   fi
 
-  $shell_command build/scripts/package.sh $verbose $color rebuild $mode_parameter $mode_value &&
+  ${shell_command} build/scripts/package.sh ${verbose} ${color} rebuild ${mode_parameter} ${mode_value} &&
 
-  cd package/$mode_path/$mode_part-$version/ &&
+  cd package/${mode_path}/${mode_part}-${version}/ &&
 
-  $shell_command ./bootstrap.sh clean $verbose $color $suppress_first &&
+  ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} &&
 
-  $shell_command ./bootstrap.sh build $verbose $color $suppress_first $shared $static -w $path_work -m $build_mode &&
+  ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m ${build_mode} ${build_mode_extra_param_1} ${build_mode_extra_value_1} ${build_mode_extra_param_2} ${build_mode_extra_value_2} &&
 
-  $shell_command ./install.sh $verbose $color $suppress_first $shared $static -w $path_work
+  ${shell_command} ./install.sh ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work}
 
 # The following in an example on building all FLL program projects using the project bootstrapped from above.
-elif [[ $1 == "programs-individual" || $1 == "programs-level" || $1 == "programs-monolithic" ]] ; then
-  if [[ $1 == "programs-individual" ]] ; then
+elif [[ ${1} == "programs-individual" || ${1} == "programs-level" || ${1} == "programs-monolithic" ]] ; then
+  build_mode_extra_param_1=
+  build_mode_extra_value_1=
+  build_mode_extra_param_2=
+  build_mode_extra_value_2=
+
+  if [[ ${1} == "programs-individual" ]] ; then
     build_mode="individual"
-  elif [[ $1 == "programs-level" ]] ; then
+    build_mode_extra_param_1="-m"
+    build_mode_extra_value_1="individual_thread"
+    build_mode_extra_param_2="-m"
+    build_mode_extra_value_2="thread"
+  elif [[ ${1} == "programs-level" ]] ; then
     build_mode="level"
-  elif [[ $1 == "programs-monolithic" ]] ; then
+    build_mode_extra_param_1="-m"
+    build_mode_extra_value_1="thread"
+  elif [[ ${1} == "programs-monolithic" ]] ; then
     build_mode="monolithic"
+    build_mode_extra_param_1="-m"
+    build_mode_extra_value_1="thread"
   fi
 
-  $shell_command build/scripts/package.sh $verbose $color rebuild -p &&
+  ${shell_command} build/scripts/package.sh ${verbose} ${color} rebuild -p &&
 
   cd package/program
 
-  if [[ $? -eq 0 ]] ; then
+  if [[ ${?} -eq 0 ]] ; then
 
     for i in * ; do
 
-      cd ${path_original}package/program/$i &&
+      cd ${path_original}package/program/${i} &&
 
-      $shell_command ./bootstrap.sh clean $verbose $color $suppress_first &&
+      ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} &&
 
-      $shell_command ./bootstrap.sh build $verbose $color $suppress_first $shared $static -w $path_work -m $build_mode &&
+      ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m ${build_mode} ${build_mode_extra_param_1} ${build_mode_extra_value_1} ${build_mode_extra_param_2} ${build_mode_extra_value_2} &&
 
-      $shell_command ./install.sh $verbose $color $suppress_first $shared $static -w $path_work ||
+      ${shell_command} ./install.sh ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} ||
 
       break
     done
@@ -255,11 +287,11 @@ elif [[ $1 == "programs-individual" || $1 == "programs-level" || $1 == "programs
     echo "ERROR: failed to change directory to 'package/program'."
     echo
   fi
-elif [[ $1 != "individual" && $1 != "level" && $1 != "monolithic" ]] ; then
+elif [[ ${1} != "individual" && ${1} != "level" && ${1} != "monolithic" ]] ; then
   echo
-  echo "ERROR: '$1' is not a supported build mode."
+  echo "ERROR: '${1}' is not a supported build mode."
   echo
 fi
 
 # Regardless of what happens always return to the starting directory.
-cd $path_original
+cd ${path_original}
index 4ef5f0df175d4a8f9ebd3153f4e44c6b61b1fcdb..c39fa979d877f89853dc5fe389fe62cbeefce432 100644 (file)
 
 bootstrap_main() {
 
-  if [[ $SHELL_ENGINE == "zsh" ]] ; then
+  if [[ ${SHELL_ENGINE} == "zsh" ]] ; then
     emulate ksh
   fi
 
   local public_name="Simple FLL Bootstrap Script"
   local system_name=bootstrap
-  local called_name=$(basename $0)
+  local called_name=$(basename ${0})
   local version=0.7.0
 
   local grab_next=
@@ -84,109 +84,109 @@ bootstrap_main() {
   if [[ $# -gt 0 ]] ; then
     t=$#
 
-    while [[ $i -lt $t ]] ; do
-      let i=$i+1
+    while [[ ${i} -lt ${t} ]] ; do
+      let i=${i}+1
 
-      if [[ $SHELL_ENGINE == "zsh" ]] ; then
+      if [[ ${SHELL_ENGINE} == "zsh" ]] ; then
         p=${(P)i}
       else
         p=${!i}
       fi
 
-      if [[ $grab_next == "" ]] ; then
-        if [[ $p == "-h" || $p == "--help" ]] ; then
+      if [[ ${grab_next} == "" ]] ; then
+        if [[ ${p} == "-h" || ${p} == "--help" ]] ; then
           do_help=yes
-        elif [[ $p == "+C" || $p == "++copyright" ]] ; then
+        elif [[ ${p} == "+C" || ${p} == "++copyright" ]] ; then
           do_copyright="yes"
-        elif [[ $p == "+d" || $p == "++dark" ]] ; then
+        elif [[ ${p} == "+d" || ${p} == "++dark" ]] ; then
           do_color=dark
           context="+d"
-        elif [[ $p == "+l" || $p == "++light" ]] ; then
+        elif [[ ${p} == "+l" || ${p} == "++light" ]] ; then
           do_color=light
           context="+l"
-        elif [[ $p == "+n" || $p == "++no_color" ]] ; then
+        elif [[ ${p} == "+n" || ${p} == "++no_color" ]] ; then
           do_color=none
           context="+n"
-        elif [[ $p == "+Q" || $p == "++quiet" ]] ; then
+        elif [[ ${p} == "+Q" || ${p} == "++quiet" ]] ; then
           verbosity="quiet"
           verbose="+Q"
           verbose_common=
-        elif [[ $p == "+E" || $p == "++error" ]] ; then
+        elif [[ ${p} == "+E" || ${p} == "++error" ]] ; then
           verbosity="error"
           verbose="+E"
           verbose_common=
-        elif [[ $p == "+N" || $p == "++normal" ]] ; then
+        elif [[ ${p} == "+N" || ${p} == "++normal" ]] ; then
           verbosity=
           verbose="+N"
           verbose_common=
-        elif [[ $p == "+V" || $p == "++verbose" ]] ; then
+        elif [[ ${p} == "+V" || ${p} == "++verbose" ]] ; then
           verbosity="verbose"
           verbose="+V"
           verbose_common="-v"
-        elif [[ $p == "+D" || $p == "++debug" ]] ; then
+        elif [[ ${p} == "+D" || ${p} == "++debug" ]] ; then
           verbosity="debug"
           verbose="+D"
           verbose_common="-v"
-        elif [[ $p == "+F" || $p == "++line_first_no" ]] ; then
+        elif [[ ${p} == "+F" || ${p} == "++line_first_no" ]] ; then
           print_line_first="no"
-        elif [[ $p == "+L" || $p == "++line_last_no" ]] ; then
+        elif [[ ${p} == "+L" || ${p} == "++line_last_no" ]] ; then
           print_line_last="no"
-        elif [[ $p == "+v" || $p == "++version" ]] ; then
-          echo $version
+        elif [[ ${p} == "+v" || ${p} == "++version" ]] ; then
+          echo ${version}
           return 0
-        elif [[ $p == "-d" || $p == "--define" ]] ; then
+        elif [[ ${p} == "-d" || ${p} == "--define" ]] ; then
           grab_next=define_extra
-        elif [[ $p == "-m" || $p == "--mode" ]] ; then
+        elif [[ ${p} == "-m" || ${p} == "--mode" ]] ; then
           grab_next="mode"
-        elif [[ $p == "-p" || $p == "--process" ]] ; then
+        elif [[ ${p} == "-p" || ${p} == "--process" ]] ; then
           grab_next="process"
-        elif [[ $p == "-s" || $p == "--settings" ]] ; then
+        elif [[ ${p} == "-s" || ${p} == "--settings" ]] ; then
           grab_next=settings_name
-        elif [[ $p == "-b" || $p == "--build" ]] ; then
+        elif [[ ${p} == "-b" || ${p} == "--build" ]] ; then
           grab_next=path_build
-        elif [[ $p == "-d" || $p == "--data" ]] ; then
+        elif [[ ${p} == "-d" || ${p} == "--data" ]] ; then
           grab_next=path_data
-        elif [[ $p == "-S" || $p == "--sources" ]] ; then
+        elif [[ ${p} == "-S" || ${p} == "--sources" ]] ; then
           grab_next=path_sources
-        elif [[ $p == "-w" || $p == "--work" ]] ; then
+        elif [[ ${p} == "-w" || ${p} == "--work" ]] ; then
           grab_next=path_work
-        elif [[ $p == "--enable-doc" ]] ; then
+        elif [[ ${p} == "--enable-doc" ]] ; then
           enable_documentation="yes"
-        elif [[ $p == "--disable-doc" ]] ; then
+        elif [[ ${p} == "--disable-doc" ]] ; then
           enable_documentation="no"
-        elif [[ $p == "--enable-shared" ]] ; then
+        elif [[ ${p} == "--enable-shared" ]] ; then
           enable_shared="yes"
-        elif [[ $p == "--disable-shared" ]] ; then
+        elif [[ ${p} == "--disable-shared" ]] ; then
           enable_shared="no"
-        elif [[ $p == "--enable-static" ]] ; then
+        elif [[ ${p} == "--enable-static" ]] ; then
           enable_static="yes"
-        elif [[ $p == "--disable-static" ]] ; then
+        elif [[ ${p} == "--disable-static" ]] ; then
           enable_static="no"
-        elif [[ $operation == "" ]] ; then
-          operation="$p"
-        elif [[ $operation_failure == "" ]] ; then
+        elif [[ ${operation} == "" ]] ; then
+          operation="${p}"
+        elif [[ ${operation_failure} == "" ]] ; then
           operation_failure=fail-multiple
         fi
       else
-        if [[ $grab_next == "define_extra" ]] ; then
+        if [[ ${grab_next} == "define_extra" ]] ; then
           define_extra="${define_extra}${p} "
-        elif [[ $grab_next == "mode" ]] ; then
-          modes="$modes$p "
-        elif [[ $grab_next == "process" ]] ; then
-          process="$p"
-        elif [[ $grab_next == "settings_name" ]] ; then
-          settings_name="$p"
-        elif [[ $grab_next == "path_build" ]] ; then
-          path_build=$(echo $p | sed -e 's|//*|/|g' -e 's|/*$|/|')
+        elif [[ ${grab_next} == "mode" ]] ; then
+          modes="${modes}${p} "
+        elif [[ ${grab_next} == "process" ]] ; then
+          process="${p}"
+        elif [[ ${grab_next} == "settings_name" ]] ; then
+          settings_name="${p}"
+        elif [[ ${grab_next} == "path_build" ]] ; then
+          path_build=$(echo ${p} | sed -e 's|//*|/|g' -e 's|/*$|/|')
           override_path_build="y"
-        elif [[ $grab_next == "path_data" ]] ; then
-          path_data=$(echo $p | sed -e 's|//*|/|g' -e 's|/*$|/|')
+        elif [[ ${grab_next} == "path_data" ]] ; then
+          path_data=$(echo ${p} | sed -e 's|//*|/|g' -e 's|/*$|/|')
           override_path_data="y"
-        elif [[ $grab_next == "path_sources" ]] ; then
-          path_sources=$(echo $p | sed -e 's|//*|/|g' -e 's|/*$|/|')
+        elif [[ ${grab_next} == "path_sources" ]] ; then
+          path_sources=$(echo ${p} | sed -e 's|//*|/|g' -e 's|/*$|/|')
           override_path_sources="y"
-        elif [[ $grab_next == "path_work" ]] ; then
-          path_work=$(echo $p | sed -e 's|//*|/|g' -e 's|/*$|/|')
+        elif [[ ${grab_next} == "path_work" ]] ; then
+          path_work=$(echo ${p} | sed -e 's|//*|/|g' -e 's|/*$|/|')
           override_path_work="y"
         fi
 
@@ -197,19 +197,19 @@ bootstrap_main() {
     p=
   fi
 
-  if [[ $verbosity == "quiet" ]] ; then
+  if [[ ${verbosity} == "quiet" ]] ; then
     print_line_first="no"
     print_line_last="no"
   fi
 
   # If the settings_name has a directory separator, then assume it is a path to the settings file.
-  if [[ $(echo $settings_name | grep -s -o '/') == "" ]] ; then
-    settings_file="${path_data}build/$settings_name"
+  if [[ $(echo ${settings_name} | grep -s -o '/') == "" ]] ; then
+    settings_file="${path_data}build/${settings_name}"
   else
-    settings_file="$settings_name"
+    settings_file="${settings_name}"
 
     # Extract the settings name from the path.
-    settings_name=$(basename $settings_name)
+    settings_name=$(basename ${settings_name})
   fi
 
   settings_defines="${path_data}build/defines"
@@ -219,14 +219,14 @@ bootstrap_main() {
 
   bootstrap_handle_colors
 
-  if [[ $do_help == "yes" ]] ; then
+  if [[ ${do_help} == "yes" ]] ; then
     bootstrap_help
     bootstrap_cleanup
 
     return 0
   fi
 
-  if [[ $do_copyright == "yes" ]] ; then
+  if [[ ${do_copyright} == "yes" ]] ; then
     bootstrap_copyright
     bootstrap_cleanup
 
@@ -236,10 +236,10 @@ bootstrap_main() {
   bootstrap_load_settings
 
   # FSS and Featurless Make supports more flexible mode names, but for the purpose of this bootstrap script and avoiding potential problems, keep it simple.
-  if [[ $modes != "" ]] ; then
-    for mode in $modes ; do
-      if [[ $(echo "$mode" | grep -s -o "[^_[:alnum:]+-]") != "" ]] ; then
-        if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${modes} != "" ]] ; then
+    for mode in ${modes} ; do
+      if [[ $(echo "${mode}" | grep -s -o "[^_[:alnum:]+-]") != "" ]] ; then
+        if [[ ${verbosity} != "quiet" ]] ; then
           bootstrap_print_first
 
           echo -e "${c_error}ERROR: The mode ${c_notice}${mode}${c_error} includes invalid characters, only alphanumeric, underscore, minus, and plus are allowed.${c_reset}"
@@ -254,7 +254,7 @@ bootstrap_main() {
     done
   fi
 
-  if [[ $? -ne 0 ]] ; then
+  if [[ ${?} -ne 0 ]] ; then
     bootstrap_cleanup
 
     return 1
@@ -262,24 +262,24 @@ bootstrap_main() {
 
   bootstrap_load_settings_mode
 
-  if [[ $? -ne 0 ]] ; then
+  if [[ ${?} -ne 0 ]] ; then
     bootstrap_cleanup
 
     return 1
   fi
 
   bootstrap_id "build_name"
-  project_built="${path_build_stage}${variables[$key]}"
-  if [[ $process != "" ]] ; then
-    project_built="${project_built}-$process"
+  project_built="${path_build_stage}${variables[${key}]}"
+  if [[ ${process} != "" ]] ; then
+    project_built="${project_built}-${process}"
   fi
 
   project_built_shared="${project_built}.shared"
   project_built_static="${project_built}.static"
 
-  if [[ $modes_available == "" ]] ; then
-    if [[ $modes != "" ]] ; then
-      if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${modes_available} == "" ]] ; then
+    if [[ ${modes} != "" ]] ; then
+      if [[ ${verbosity} != "quiet" ]] ; then
         bootstrap_print_first
 
         echo -e "${c_error}ERROR: The mode(s) ${c_notice}${modes}${c_error} are not a valid modes, there are no available modes.${c_error}${c_reset}"
@@ -293,25 +293,25 @@ bootstrap_main() {
     fi
   else
     let i=0
-    for m in $modes_available ; do
+    for m in ${modes_available} ; do
 
-      for mode in $modes ; do
+      for mode in ${modes} ; do
 
-        if [[ "$mode" == "$m" ]] ; then
+        if [[ "${mode}" == "${m}" ]] ; then
           let i=1
 
           break
         fi
       done
 
-      if [[ $i -eq 1 ]] ; then break ; fi
+      if [[ ${i} -eq 1 ]] ; then break ; fi
     done
 
-    if [[ $i -eq 0 ]] ; then
-      if [[ $verbosity != "quiet" ]] ; then
+    if [[ ${i} -eq 0 ]] ; then
+      if [[ ${verbosity} != "quiet" ]] ; then
         bootstrap_print_first
 
-        echo -e "${c_error}ERROR: The mode(s) ${c_notice}${modes}${c_error} are not valid modes, they must be one of: ${c_notice}$modes_available${c_error}.${c_reset}"
+        echo -e "${c_error}ERROR: The mode(s) ${c_notice}${modes}${c_error} are not valid modes, they must be one of: ${c_notice}${modes_available}${c_error}.${c_reset}"
 
         bootstrap_print_last
       fi
@@ -323,8 +323,8 @@ bootstrap_main() {
   fi
 
   bootstrap_id "build_name"
-  if [[ ${variables[$key]} == "" ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${variables[${key}]} == "" ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       bootstrap_print_first
 
       echo -e "${c_error}ERROR: The required setting '${c_notice}build_name${c_error}' is not specified in the build settings file '${c_notice}${settings_file}${c_error}'.${c_reset}"
@@ -338,8 +338,8 @@ bootstrap_main() {
   fi
 
   bootstrap_id "version_major"
-  if [[ ${variables[$key]} == "" ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${variables[${key}]} == "" ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       bootstrap_print_first
 
       echo -e "${c_error}ERROR: The required setting '${c_notice}version_major${c_error}' is not specified in the build settings file '${c_notice}${settings_file}${c_error}'.${c_reset}"
@@ -353,8 +353,8 @@ bootstrap_main() {
   fi
 
   bootstrap_id "version_minor"
-  if [[ ${variables[$key]} == "" ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${variables[${key}]} == "" ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       bootstrap_print_first
 
       echo -e "${c_error}ERROR: The required setting '${c_notice}version_minor${c_error}' is not specified in the build settings file '${c_notice}${settings_file}${c_error}'.${c_reset}"
@@ -368,8 +368,8 @@ bootstrap_main() {
   fi
 
   bootstrap_id "version_micro"
-  if [[ ${variables[$key]} == "" ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${variables[${key}]} == "" ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       bootstrap_print_first
 
       echo -e "${c_error}ERROR: The required setting '${c_notice}version_micro${c_error}' is not specified in the build settings file '${c_notice}${settings_file}${c_error}'.${c_reset}"
@@ -382,8 +382,8 @@ bootstrap_main() {
     return 1
   fi
 
-  if [[ $path_data == "" || ! -d $path_data ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${path_data} == "" || ! -d ${path_data} ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       bootstrap_print_first
 
       echo -e "${c_error}ERROR: The data directory ${c_notice}${path_data}${c_error} is not a valid directory.${c_reset}"
@@ -396,8 +396,8 @@ bootstrap_main() {
     return 1
   fi
 
-  if [[ $path_sources == "" || ! -d $path_sources ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${path_sources} == "" || ! -d ${path_sources} ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       bootstrap_print_first
 
       echo -e "${c_error}ERROR: The sources directory ${c_notice}${path_sources}${c_error} is not a valid directory.${c_reset}"
@@ -410,8 +410,8 @@ bootstrap_main() {
     return 1
   fi
 
-  if [[ $path_work != "" && ! -d $path_work ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${path_work} != "" && ! -d ${path_work} ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       bootstrap_print_first
 
       echo -e "${c_error}ERROR: The work directory ${c_notice}${path_work}${c_error} is not a valid directory.${c_reset}"
@@ -425,25 +425,25 @@ bootstrap_main() {
   fi
 
   bootstrap_id "build_name"
-  project_label="${variables[$key]}"
+  project_label="${variables[${key}]}"
 
   bootstrap_id "version_major"
-  if [[ "${variables[$key]}" != "" ]] ; then
-    project_label="${project_label}-${variables[$key]}"
+  if [[ "${variables[${key}]}" != "" ]] ; then
+    project_label="${project_label}-${variables[${key}]}"
 
     bootstrap_id "version_minor"
-    if [[ "${variables[$key]}" != "" ]] ; then
-      project_label="${project_label}.${variables[$key]}"
+    if [[ "${variables[${key}]}" != "" ]] ; then
+      project_label="${project_label}.${variables[${key}]}"
 
       bootstrap_id "version_micro"
-      if [[ "${variables[$key]}" != "" ]] ; then
-        project_label="${project_label}.${variables[$key]}"
+      if [[ "${variables[${key}]}" != "" ]] ; then
+        project_label="${project_label}.${variables[${key}]}"
       fi
     fi
   fi
 
-  if [[ $operation_failure == "fail-multiple" ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${operation_failure} == "fail-multiple" ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       bootstrap_print_first
 
       echo -e "${c_error}ERROR: Only one operation may be specified at a time.${c_reset}"
@@ -454,17 +454,17 @@ bootstrap_main() {
     bootstrap_cleanup
 
     return 1
-  elif [[ $operation == "build" ]] ; then
-    if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+  elif [[ ${operation} == "build" ]] ; then
+    if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
       bootstrap_print_first
 
-      echo -e "${c_highlight}Building:${c_reset} ${c_notice}${project_label}${c_highlight}.${c_reset}"
+      echo -e "${c_highlight}Building:${c_reset} ${c_notice}${project_label}${c_highlight} with modes: ${c_notice}${modes}${c_highlight}.${c_reset}"
     fi
 
     if [[ ! -f ${project_built}.prepared ]] ; then
       bootstrap_prepare_build
 
-      if [[ $? -ne 0 ]] ; then
+      if [[ ${?} -ne 0 ]] ; then
         bootstrap_cleanup
 
         return 1
@@ -473,21 +473,21 @@ bootstrap_main() {
 
     bootstrap_operation_build
 
-    if [[ $? -ne 0 ]] ; then
+    if [[ ${?} -ne 0 ]] ; then
       bootstrap_cleanup
 
       return 1
     fi
-  elif [[ $operation == "clean" ]] ; then
-    if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+  elif [[ ${operation} == "clean" ]] ; then
+    if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
       bootstrap_print_first
 
       echo -e "${c_highlight}Cleaning Project:${c_reset} ${c_notice}${project_label}${c_highlight}.${c_reset}"
     fi
 
     bootstrap_operation_clean
-  elif [[ $operation == "" ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  elif [[ ${operation} == "" ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       bootstrap_print_first
 
       echo -e "${c_error}ERROR: No operation was given.${c_reset}"
@@ -497,7 +497,7 @@ bootstrap_main() {
 
     return 1
   else
-    if [[ $verbosity != "quiet" ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       bootstrap_print_first
 
       echo -e "${c_error}ERROR: The operation ${c_notice}${operation}${c_error} was not recognized.${c_reset}"
@@ -510,8 +510,8 @@ bootstrap_main() {
     return 1
   fi
 
-  if [[ $verbosity != "quiet" ]] ; then
-    if [[ $failure != "" || $verbosity != "error" ]] ; then
+  if [[ ${verbosity} != "quiet" ]] ; then
+    if [[ ${failure} != "" || ${verbosity} != "error" ]] ; then
       bootstrap_print_last
     fi
   fi
@@ -523,14 +523,14 @@ bootstrap_main() {
 
 bootstrap_handle_colors() {
 
-  if [[ $do_color == "light" ]] ; then
+  if [[ ${do_color} == "light" ]] ; then
     c_error="\\033[1;31m"
     c_warning="\\033[0;31m"
     c_title="\\033[1;34m"
     c_highlight="\\033[0;34m"
     c_notice="\\033[0;01m"
     c_important="\\033[0;35m"
-  elif [[ $do_color == "none" ]] ; then
+  elif [[ ${do_color} == "none" ]] ; then
     c_reset=
     c_title=
     c_error=
@@ -606,7 +606,7 @@ bootstrap_copyright() {
 
 bootstrap_id() {
 
-  case $1 in
+  case ${1} in
     "build_compiler") let key=0;;
     "build_indexer") let key=1;;
     "build_indexer_arguments") let key=2;;
@@ -841,15 +841,15 @@ bootstrap_load_settings() {
   local value=
 
   if [[ ! -d ${path_data}build/ ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       bootstrap_print_first
 
       echo -e "${c_error}ERROR: No build settings directory '${c_notice}${path_data}build/${c_error}' could not be found or is not a valid directory.${c_reset}"
     fi
 
     let failure=1
-  elif [[ ! -f $settings_file ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  elif [[ ! -f ${settings_file} ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       bootstrap_print_first
 
       echo -e "${c_error}ERROR: No settings file ${c_notice}${settings_file}${c_error} could not be found or is not a valid file.${c_reset}"
@@ -858,61 +858,61 @@ bootstrap_load_settings() {
     let failure=1
   fi
 
-  if [[ $failure != "" ]] ; then
+  if [[ ${failure} != "" ]] ; then
     return 1
   fi
 
   # Get available modes.
-  if [[ $modes_available == "" ]] ; then
-    modes_available=$(grep -s -o "^[[:space:]]*modes[[:space:]].*\$" $settings_file | sed -e "s|^[[:space:]]*modes\>||" -e 's|^[[:space:]]*||')
+  if [[ ${modes_available} == "" ]] ; then
+    modes_available=$(grep -s -o "^[[:space:]]*modes[[:space:]].*\$" ${settings_file} | sed -e "s|^[[:space:]]*modes\>||" -e 's|^[[:space:]]*||')
   fi
 
   # Get default modes.
-  modes_default=$(grep -s -o "^[[:space:]]*modes_default[[:space:]].*\$" $settings_file | sed -e "s|^[[:space:]]*modes_default\>||" -e 's|^[[:space:]]*||')
+  modes_default=$(grep -s -o "^[[:space:]]*modes_default[[:space:]].*\$" ${settings_file} | sed -e "s|^[[:space:]]*modes_default\>||" -e 's|^[[:space:]]*||')
 
   # Use default modes if no mode is explicitly provided.
-  if [[ $modes == "" ]] ; then
-    modes=$modes_default
+  if [[ ${modes} == "" ]] ; then
+    modes=${modes_default}
   fi
 
   # Single value Objects.
   for i in build_compiler build_indexer build_language build_name build_script build_shared build_sources_object build_sources_object_shared build_sources_object_static build_static has_path_standard path_headers path_language path_library_script path_library_shared path_library_static path_object_script path_object_shared path_object_static path_program_script path_program_shared path_program_static path_sources path_sources_object preserve_path_headers process_post process_pre search_exclusive search_shared search_static version_file version_major version_major_prefix version_micro version_micro_prefix version_minor version_minor_prefix version_nano version_nano_prefix version_target ; do
 
-    bootstrap_id "$i"
+    bootstrap_id "${i}"
 
-    if [[ $key == "" ]] ; then
-      if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+    if [[ ${key} == "" ]] ; then
+      if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
         echo -e "${c_warning}WARNING: Failed to find index for '${c_notice}${i}${c_warning}' when calling ${c_notice}bootstrap_id()${c_warning}.${c_reset}"
       fi
 
       key=
       bootstrap_id "has-${i}"
-      if [[ $key != "" ]] ; then
-        variables[$key]="no"
+      if [[ ${key} != "" ]] ; then
+        variables[${key}]="no"
       fi
     else
-      if [[ $(grep -s -o "^[[:space:]]*${i}[[:space:]].*\$" $settings_file) != "" ]] ; then
-        value=$(grep -s -o "^[[:space:]]*${i}[[:space:]].*\$" $settings_file | sed -e "s|^[[:space:]]*${i}\>||" -e 's|^[[:space:]]*||')
-        variables[$key]="$value"
+      if [[ $(grep -s -o "^[[:space:]]*${i}[[:space:]].*\$" ${settings_file}) != "" ]] ; then
+        value=$(grep -s -o "^[[:space:]]*${i}[[:space:]].*\$" ${settings_file} | sed -e "s|^[[:space:]]*${i}\>||" -e 's|^[[:space:]]*||')
+        variables[${key}]="${value}"
 
         key=
         bootstrap_id "has-${i}"
-        if [[ $key != "" ]] ; then
-          variables[$key]="yes"
+        if [[ ${key} != "" ]] ; then
+          variables[${key}]="yes"
         fi
-      elif [[ $(grep -s -o "^[[:space:]]*${i}\$" $settings_file) != "" ]] ; then
-        variables[$key]=""
+      elif [[ $(grep -s -o "^[[:space:]]*${i}\$" ${settings_file}) != "" ]] ; then
+        variables[${key}]=""
 
         key=
         bootstrap_id "has-${i}"
-        if [[ $key != "" ]] ; then
-          variables[$key]="yes"
+        if [[ ${key} != "" ]] ; then
+          variables[${key}]="yes"
         fi
       else
         key=
         bootstrap_id "has-${i}"
-        if [[ $key != "" ]] ; then
-          variables[$key]="no"
+        if [[ ${key} != "" ]] ; then
+          variables[${key}]="no"
         fi
       fi
     fi
@@ -921,41 +921,41 @@ bootstrap_load_settings() {
   # Multi value Objects.
   for i in build_indexer_arguments build_libraries build_libraries_shared build_libraries_static build_objects_library build_objects_library_shared build_objects_library_static build_objects_program build_objects_program_shared build_objects_program_static build_sources_documentation build_sources_headers build_sources_headers_shared build_sources_headers_static build_sources_library build_sources_library_shared build_sources_library_static build_sources_program build_sources_program_shared build_sources_program_static build_sources_script build_sources_setting defines defines_library defines_library_shared defines_library_static defines_object defines_object_shared defines_object_static defines_program defines_program_shared defines_program_static defines_shared defines_static environment flags flags_library flags_library_shared flags_library_static flags_object flags_object_shared flags_object_static flags_program flags_program_shared flags_program_static flags_shared flags_static ; do
 
-    bootstrap_id "$i"
+    bootstrap_id "${i}"
 
-    if [[ $key == "" ]] ; then
-      if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+    if [[ ${key} == "" ]] ; then
+      if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
         echo -e "${c_warning}WARNING: Failed to find index for '${c_notice}${i}${c_warning}' when calling ${c_notice}bootstrap_id()${c_warning}.${c_reset}"
       fi
 
       key=
       bootstrap_id "has-${i}"
-      if [[ $key != "" ]] ; then
-        variables[$key]="no"
+      if [[ ${key} != "" ]] ; then
+        variables[${key}]="no"
       fi
     else
-      if [[ $(grep -s -o "^[[:space:]]*${i}[[:space:]].*\$" $settings_file) != "" ]] ; then
-        value=$(grep -s -o "^[[:space:]]*${i}[[:space:]].*\$" $settings_file | sed -e "s|^[[:space:]]*${i}\>||" -e 's|^[[:space:]]*||')
-        variables[$key]="$value"
+      if [[ $(grep -s -o "^[[:space:]]*${i}[[:space:]].*\$" ${settings_file}) != "" ]] ; then
+        value=$(grep -s -o "^[[:space:]]*${i}[[:space:]].*\$" ${settings_file} | sed -e "s|^[[:space:]]*${i}\>||" -e 's|^[[:space:]]*||')
+        variables[${key}]="${variables[${key}]}${value} "
 
         key=
         bootstrap_id "has-${i}"
-        if [[ $key != "" ]] ; then
-          variables[$key]="yes"
+        if [[ ${key} != "" ]] ; then
+          variables[${key}]="yes"
         fi
-      elif [[ $(grep -s -o "^[[:space:]]*${i}\$" $settings_file) != "" ]] ; then
-        variables[$key]=""
+      elif [[ $(grep -s -o "^[[:space:]]*${i}\$" ${settings_file}) != "" ]] ; then
+        variables[${key}]=""
 
         key=
         bootstrap_id "has-${i}"
-        if [[ $key != "" ]] ; then
-          variables[$key]="yes"
+        if [[ ${key} != "" ]] ; then
+          variables[${key}]="yes"
         fi
       else
         key=
         bootstrap_id "has-${i}"
-        if [[ $key != "" ]] ; then
-          variables[$key]="no"
+        if [[ ${key} != "" ]] ; then
+          variables[${key}]="no"
         fi
       fi
     fi
@@ -968,46 +968,47 @@ bootstrap_load_settings_mode() {
   local m=
   local value=
 
-  for m in $modes ; do
+  for m in ${modes} ; do
 
     # Single value Objects.
     for i in build_compiler build_indexer build_language build_name build_script build_shared build_sources_object build_sources_object_shared build_sources_object_static build_static has_path_standard path_headers path_language path_library_script path_library_shared path_library_static path_object_script path_object_shared path_object_static path_program_script path_program_shared path_program_static path_sources path_sources_object preserve_path_headers process_post process_pre search_exclusive search_shared search_static version_file version_major version_major_prefix version_micro version_micro_prefix version_minor version_minor_prefix version_nano version_nano_prefix version_target ; do
 
       bootstrap_id "${i}-mode"
 
-      if [[ $key == "" ]] ; then
-        if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
-          echo -e "${c_warning}WARNING: Failed to find index for '${c_notice}$i-$m${c_warning}' when calling ${c_notice}bootstrap_id()${c_warning}.${c_reset}"
+      if [[ ${key} == "" ]] ; then
+        if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
+          echo -e "${c_warning}WARNING: Failed to find index for '${c_notice}${i}-${m}${c_warning}' when calling ${c_notice}bootstrap_id()${c_warning}.${c_reset}"
         fi
 
         key=
         bootstrap_id "has-${i}-mode"
-        if [[ $key != "" ]] ; then
-          variables[$key]="no"
+        if [[ ${key} != "" ]] ; then
+          variables[${key}]="no"
         fi
       else
-        if [[ $(grep -s -o "^[[:space:]]*${i}-${m}[[:space:]].*\$" $settings_file) != "" ]] ; then
-          value=$(grep -s -o "^[[:space:]]*${i}-${m}[[:space:]].*\$" $settings_file | sed -e "H;/${i}-${m}/h;\$!d;x" | sed -e "s|^[[:space:]]*${i}-${m}\>||" -e 's|^[[:space:]]*||')
-          variables[$key]="$value"
+
+        if [[ $(grep -s -o "^[[:space:]]*${i}-${m}[[:space:]].*\$" ${settings_file}) != "" ]] ; then
+          value=$(grep -s -o "^[[:space:]]*${i}-${m}[[:space:]].*\$" ${settings_file} | sed -e "H;/${i}-${m}/h;\$!d;x" | sed -e "s|^[[:space:]]*${i}-${m}\>||" -e 's|^[[:space:]]*||')
+          variables[${key}]="${value}"
 
           key=
           bootstrap_id "has-${i}-mode"
-          if [[ $key != "" ]] ; then
-            variables[$key]="yes"
+          if [[ ${key} != "" ]] ; then
+            variables[${key}]="yes"
           fi
-        elif [[ $(grep -s -o "^[[:space:]]*${i}-${m}\$" $settings_file) != "" ]] ; then
-          variables[$key]=""
+        elif [[ $(grep -s -o "^[[:space:]]*${i}-${m}\$" ${settings_file}) != "" ]] ; then
+          variables[${key}]=""
 
           key=
           bootstrap_id "has-${i}-mode"
-          if [[ $key != "" ]] ; then
-            variables[$key]="yes"
+          if [[ ${key} != "" ]] ; then
+            variables[${key}]="yes"
           fi
         else
           key=
           bootstrap_id "has-${i}-mode"
-          if [[ $key != "" ]] ; then
-            variables[$key]="no"
+          if [[ ${key} != "" ]] ; then
+            variables[${key}]="no"
           fi
         fi
       fi
@@ -1018,39 +1019,39 @@ bootstrap_load_settings_mode() {
 
       bootstrap_id "${i}-mode"
 
-      if [[ $key == "" ]] ; then
-        if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+      if [[ ${key} == "" ]] ; then
+        if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
           echo -e "${c_warning}WARNING: Failed to find index for '${c_notice}${i}-${m}${c_warning}' when calling ${c_notice}bootstrap_id()${c_warning}.${c_reset}"
         fi
 
         key=
         bootstrap_id "has-${i}-mode"
-        if [[ $key != "" ]] ; then
-          variables[$key]="no"
+        if [[ ${key} != "" ]] ; then
+          variables[${key}]="no"
         fi
       else
-        if [[ $(grep -s -o "^[[:space:]]*${i}-${m}[[:space:]].*\$" $settings_file) != "" ]] ; then
-          value=$(grep -s -o "^[[:space:]]*${i}-${m}[[:space:]].*\$" $settings_file | sed -e "s|^[[:space:]]*${i}-${m}\>||" -e 's|^[[:space:]]*||')
-          variables[$key]="$value"
+        if [[ $(grep -s -o "^[[:space:]]*${i}-${m}[[:space:]].*\$" ${settings_file}) != "" ]] ; then
+          value=$(grep -s -o "^[[:space:]]*${i}-${m}[[:space:]].*\$" ${settings_file} | sed -e "s|^[[:space:]]*${i}-${m}\>||" -e 's|^[[:space:]]*||')
+          variables[${key}]="${variables[${key}]}${value} "
 
           key=
           bootstrap_id "has-${i}"
-          if [[ $key != "" ]] ; then
-            variables[$key]="yes"
+          if [[ ${key} != "" ]] ; then
+            variables[${key}]="yes"
           fi
-        elif [[ $(grep -s -o "^[[:space:]]*${i}-${m}\$" $settings_file) != "" ]] ; then
-          variables[$key]=""
+        elif [[ $(grep -s -o "^[[:space:]]*${i}-${m}\$" ${settings_file}) != "" ]] ; then
+          variables[${key}]=""
 
           key=
           bootstrap_id "has-${i}"
-          if [[ $key != "" ]] ; then
-            variables[$key]="yes"
+          if [[ ${key} != "" ]] ; then
+            variables[${key}]="yes"
           fi
         else
           key=
           bootstrap_id "has-${i}-mode"
-          if [[ $key != "" ]] ; then
-            variables[$key]="no"
+          if [[ ${key} != "" && ${variables[${key}]} != "yes" ]] ; then
+            variables[${key}]="no"
           fi
         fi
       fi
@@ -1059,13 +1060,13 @@ bootstrap_load_settings_mode() {
 }
 
 bootstrap_prepare_build() {
-  local alt=$1
+  local alt=${1}
   local i=
 
-  mkdir $verbose_common -p ${path_build}{documents,includes,libraries/{script,shared,static},objects/{script,shared,static},programs/{script,shared,static},settings,stage} || failure=1
+  mkdir ${verbose_common} -p ${path_build}{documents,includes,libraries/{script,shared,static},objects/{script,shared,static},programs/{script,shared,static},settings,stage} || failure=1
 
-  if [[ $failure != "" ]] ; then
-    if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+  if [[ ${failure} != "" ]] ; then
+    if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
       echo -e "${c_warning}WARNING: Failed to create build directories in '${c_notice}${path_build}${c_error}'.${c_reset}"
     fi
 
@@ -1073,18 +1074,18 @@ bootstrap_prepare_build() {
   fi
 
   bootstrap_id "path_headers-mode"
-  if [[ ${variables[$key]} != "" ]] ; then
-    mkdir $verbose_common -p ${path_build}includes/${variables[$key]} || failure=1
+  if [[ ${variables[${key}]} != "" ]] ; then
+    mkdir ${verbose_common} -p ${path_build}includes/${variables[${key}]} || failure=1
   else
     bootstrap_id "path_headers"
 
-    if [[ ${variables[$key]} != "" ]] ; then
-      mkdir $verbose_common -p ${path_build}includes/${variables[$key]} || failure=1
+    if [[ ${variables[${key}]} != "" ]] ; then
+      mkdir ${verbose_common} -p ${path_build}includes/${variables[${key}]} || failure=1
     fi
   fi
 
-  if [[ $failure != "" ]] ; then
-    if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+  if [[ ${failure} != "" ]] ; then
+    if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
       echo -e "${c_warning}WARNING: Failed to create ${c_notice}path_heades${c_error} build directories in '${c_notice}${path_build}${c_error}'.${c_reset}"
     fi
 
@@ -1093,7 +1094,7 @@ bootstrap_prepare_build() {
 
   touch ${project_built}-${settings_name}.prepared
 
-  if [[ $failure == "" ]] ; then
+  if [[ ${failure} == "" ]] ; then
     return 0
   fi
 
@@ -1105,240 +1106,240 @@ bootstrap_operation_build() {
   local n=
   local version_file=
   local version_target=
-  local alt=$1
+  local alt=${1}
   local directory=
   local key=
 
   bootstrap_id "build_compiler"
-  local build_compiler=${variables[$key]}
+  local build_compiler=${variables[${key}]}
 
   bootstrap_id "build_indexer"
-  local build_indexer=${variables[$key]}
+  local build_indexer=${variables[${key}]}
 
   bootstrap_id "build_indexer_arguments"
-  local build_indexer_arguments=${variables[$key]}
+  local build_indexer_arguments=${variables[${key}]}
 
   bootstrap_id "build_name"
-  local build_name=${variables[$key]}
+  local build_name=${variables[${key}]}
 
   bootstrap_id "build_shared"
-  local build_shared=${variables[$key]}
+  local build_shared=${variables[${key}]}
 
   bootstrap_id "build_static"
-  local build_static=${variables[$key]}
+  local build_static=${variables[${key}]}
 
   bootstrap_id "defines"
-  local defines=${variables[$key]}
+  local defines=${variables[${key}]}
 
   bootstrap_id "defines_library"
-  local defines_library=${variables[$key]}
+  local defines_library=${variables[${key}]}
 
   bootstrap_id "defines_library_shared"
-  local defines_library_shared=${variables[$key]}
+  local defines_library_shared=${variables[${key}]}
 
   bootstrap_id "defines_library_static"
-  local defines_library_static=${variables[$key]}
+  local defines_library_static=${variables[${key}]}
 
   bootstrap_id "defines_object"
-  local defines_object=${variables[$key]}
+  local defines_object=${variables[${key}]}
 
   bootstrap_id "defines_object_shared"
-  local defines_object_shared=${variables[$key]}
+  local defines_object_shared=${variables[${key}]}
 
   bootstrap_id "defines_object_static"
-  local defines_object_static=${variables[$key]}
+  local defines_object_static=${variables[${key}]}
 
   bootstrap_id "defines_program"
-  local defines_program=${variables[$key]}
+  local defines_program=${variables[${key}]}
 
   bootstrap_id "defines_program_shared"
-  local defines_program_shared=${variables[$key]}
+  local defines_program_shared=${variables[${key}]}
 
   bootstrap_id "defines_program_static"
-  local defines_program_static=${variables[$key]}
+  local defines_program_static=${variables[${key}]}
 
   bootstrap_id "defines_shared"
-  local defines_shared=${variables[$key]}
+  local defines_shared=${variables[${key}]}
 
   bootstrap_id "defines_static"
-  local defines_static=${variables[$key]}
+  local defines_static=${variables[${key}]}
 
   bootstrap_id "flags"
-  local flags=${variables[$key]}
+  local flags=${variables[${key}]}
 
   bootstrap_id "flags_library"
-  local flags_library=${variables[$key]}
+  local flags_library=${variables[${key}]}
 
   bootstrap_id "flags_library_shared"
-  local flags_library_shared=${variables[$key]}
+  local flags_library_shared=${variables[${key}]}
 
   bootstrap_id "flags_library_static"
-  local flags_library_static=${variables[$key]}
+  local flags_library_static=${variables[${key}]}
 
   bootstrap_id "flags_object"
-  local flags_object=${variables[$key]}
+  local flags_object=${variables[${key}]}
 
   bootstrap_id "flags_object_shared"
-  local flags_object_shared=${variables[$key]}
+  local flags_object_shared=${variables[${key}]}
 
   bootstrap_id "flags_object_static"
-  local flags_object_static=${variables[$key]}
+  local flags_object_static=${variables[${key}]}
 
   bootstrap_id "flags_program"
-  local flags_program=${variables[$key]}
+  local flags_program=${variables[${key}]}
 
   bootstrap_id "flags_program_shared"
-  local flags_program_shared=${variables[$key]}
+  local flags_program_shared=${variables[${key}]}
 
   bootstrap_id "flags_program_static"
-  local flags_program_static=${variables[$key]}
+  local flags_program_static=${variables[${key}]}
 
   bootstrap_id "flags_shared"
-  local flags_shared=${variables[$key]}
+  local flags_shared=${variables[${key}]}
 
   bootstrap_id "flags_static"
-  local flags_static=${variables[$key]}
+  local flags_static=${variables[${key}]}
 
   bootstrap_id "build_libraries"
-  local libraries=${variables[$key]}
+  local libraries=${variables[${key}]}
 
   bootstrap_id "build_libraries_shared"
-  local libraries_shared=${variables[$key]}
+  local libraries_shared=${variables[${key}]}
 
   bootstrap_id "build_libraries_static"
-  local libraries_static=${variables[$key]}
+  local libraries_static=${variables[${key}]}
 
   bootstrap_id "build_objects_library"
-  local objects_library=${variables[$key]}
+  local objects_library=${variables[${key}]}
 
   bootstrap_id "build_objects_library_shared"
-  local objects_library_shared=${variables[$key]}
+  local objects_library_shared=${variables[${key}]}
 
   bootstrap_id "build_objects_library_static"
-  local objects_library_static=${variables[$key]}
+  local objects_library_static=${variables[${key}]}
 
   bootstrap_id "build_objects_program"
-  local objects_program=${variables[$key]}
+  local objects_program=${variables[${key}]}
 
   bootstrap_id "build_objects_program_shared"
-  local objects_program_shared=${variables[$key]}
+  local objects_program_shared=${variables[${key}]}
 
   bootstrap_id "build_objects_program_static"
-  local objects_program_static=${variables[$key]}
+  local objects_program_static=${variables[${key}]}
 
   bootstrap_id "path_headers"
-  local path_headers=${variables[$key]}
+  local path_headers=${variables[${key}]}
 
   bootstrap_id "preserve_path_headers"
-  local preserve_path_headers=${variables[$key]}
+  local preserve_path_headers=${variables[${key}]}
 
   bootstrap_id "path_library_script"
-  local path_library_script=${variables[$key]}
+  local path_library_script=${variables[${key}]}
 
   bootstrap_id "path_library_shared"
-  local path_library_shared=${variables[$key]}
+  local path_library_shared=${variables[${key}]}
 
   bootstrap_id "path_library_static"
-  local path_library_static=${variables[$key]}
+  local path_library_static=${variables[${key}]}
 
   bootstrap_id "path_object_script"
-  local path_object_script=${variables[$key]}
+  local path_object_script=${variables[${key}]}
 
   bootstrap_id "path_object_shared"
-  local path_object_shared=${variables[$key]}
+  local path_object_shared=${variables[${key}]}
 
   bootstrap_id "path_object_static"
-  local path_object_static=${variables[$key]}
+  local path_object_static=${variables[${key}]}
 
   bootstrap_id "path_program_script"
-  local path_program_script=${variables[$key]}
+  local path_program_script=${variables[${key}]}
 
   bootstrap_id "path_program_shared"
-  local path_program_shared=${variables[$key]}
+  local path_program_shared=${variables[${key}]}
 
   bootstrap_id "path_program_static"
-  local path_program_static=${variables[$key]}
+  local path_program_static=${variables[${key}]}
 
   bootstrap_id "has_path_standard"
-  local has_path_standard=${variables[$key]}
+  local has_path_standard=${variables[${key}]}
 
   bootstrap_id "search_exclusive"
-  local search_exclusive=${variables[$key]}
+  local search_exclusive=${variables[${key}]}
 
   bootstrap_id "search_shared"
-  local search_shared=${variables[$key]}
+  local search_shared=${variables[${key}]}
 
   bootstrap_id "search_static"
-  local search_static=${variables[$key]}
+  local search_static=${variables[${key}]}
 
   bootstrap_id "build_sources_documentation"
-  local sources_documentation=${variables[$key]}
+  local sources_documentation=${variables[${key}]}
 
   bootstrap_id "build_sources_headers"
-  local sources_headers=${variables[$key]}
+  local sources_headers=${variables[${key}]}
 
   bootstrap_id "build_sources_library"
-  local sources_library=${variables[$key]}
+  local sources_library=${variables[${key}]}
 
   bootstrap_id "build_sources_library_shared"
-  local sources_library_shared=${variables[$key]}
+  local sources_library_shared=${variables[${key}]}
 
   bootstrap_id "build_sources_library_static"
-  local sources_library_static=${variables[$key]}
+  local sources_library_static=${variables[${key}]}
 
   bootstrap_id "build_sources_object"
-  local sources_object=${variables[$key]}
+  local sources_object=${variables[${key}]}
 
   bootstrap_id "build_sources_object_shared"
-  local sources_object_shared=${variables[$key]}
+  local sources_object_shared=${variables[${key}]}
 
   bootstrap_id "build_sources_object_static"
-  local sources_object_static=${variables[$key]}
+  local sources_object_static=${variables[${key}]}
 
   bootstrap_id "build_sources_program"
-  local sources_program=${variables[$key]}
+  local sources_program=${variables[${key}]}
 
   bootstrap_id "build_sources_program_shared"
-  local sources_program_shared=${variables[$key]}
+  local sources_program_shared=${variables[${key}]}
 
   bootstrap_id "build_sources_program_static"
-  local sources_program_static=${variables[$key]}
+  local sources_program_static=${variables[${key}]}
 
   bootstrap_id "build_sources_script"
-  local sources_script=${variables[$key]}
+  local sources_script=${variables[${key}]}
 
   bootstrap_id "build_sources_setting"
-  local sources_setting=${variables[$key]}
+  local sources_setting=${variables[${key}]}
 
   bootstrap_id "version_file"
-  local version_file_value=${variables[$key]}
+  local version_file_value=${variables[${key}]}
 
   bootstrap_id "version_major"
-  local version_major=${variables[$key]}
+  local version_major=${variables[${key}]}
 
   bootstrap_id "version_major_prefix"
-  local version_major_prefix=${variables[$key]}
+  local version_major_prefix=${variables[${key}]}
 
   bootstrap_id "version_minor"
-  local version_minor=${variables[$key]}
+  local version_minor=${variables[${key}]}
 
   bootstrap_id "version_minor_prefix"
-  local version_minor_prefix=${variables[$key]}
+  local version_minor_prefix=${variables[${key}]}
 
   bootstrap_id "version_micro"
-  local version_micro=${variables[$key]}
+  local version_micro=${variables[${key}]}
 
   bootstrap_id "version_micro_prefix"
-  local version_micro_prefix=${variables[$key]}
+  local version_micro_prefix=${variables[${key}]}
 
   bootstrap_id "version_nano"
-  local version_nano=${variables[$key]}
+  local version_nano=${variables[${key}]}
 
   bootstrap_id "version_nano_prefix"
-  local version_nano_prefix=${variables[$key]}
+  local version_nano_prefix=${variables[${key}]}
 
   bootstrap_id "version_target"
-  local version_target_value=${variables[$key]}
+  local version_target_value=${variables[${key}]}
 
   local links=
   local sources=
@@ -1369,8 +1370,8 @@ bootstrap_operation_build() {
 
   bootstrap_operation_build_prepare_remaining
 
-  if [[ $build_shared == "yes" && -f ${project_built_shared}.built || $build_static == "yes" && -f ${project_built_static}.built ]] ; then
-    if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+  if [[ ${build_shared} == "yes" && -f ${project_built_shared}.built || ${build_static} == "yes" && -f ${project_built_static}.built ]] ; then
+    if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
       echo -e "${c_warning}WARNING: This project has already been built.${c_reset}"
     fi
 
@@ -1381,10 +1382,10 @@ bootstrap_operation_build() {
   local arguments_shared="-L${path_build}libraries/${path_library_shared}"
   local arguments_static="-L${path_build}libraries/${path_library_static}"
 
-  if [[ $path_work != "" ]] ; then
-    arguments_include="$arguments_include -I${path_work}includes/"
-    arguments_shared="$arguments_shared -L${path_work}libraries/${path_library_shared}"
-    arguments_static="$arguments_static -L${path_work}libraries/${path_library_static}"
+  if [[ ${path_work} != "" ]] ; then
+    arguments_include="${arguments_include} -I${path_work}includes/"
+    arguments_shared="${arguments_shared} -L${path_work}libraries/${path_library_shared}"
+    arguments_static="${arguments_static} -L${path_work}libraries/${path_library_static}"
   fi
 
   bootstrap_operation_build_validate_paths
@@ -1397,252 +1398,252 @@ bootstrap_operation_build() {
 
   bootstrap_operation_build_validate_build
 
-  if [[ $failure != "" ]] ; then
+  if [[ ${failure} != "" ]] ; then
     return 1
   fi
 
-  if [[ $sources_documentation != "" ]] ; then
-    for i in $sources_documentation ; do
-      directory=$(dirname $i)
+  if [[ ${sources_documentation} != "" ]] ; then
+    for i in ${sources_documentation} ; do
+      directory=$(dirname ${i})
 
-      if [[ $directory == "." ]] ; then
-        cp $verbose_common -R ${path_documentation}${i} ${path_build}documentation/ || failure=1
+      if [[ ${directory} == "." ]] ; then
+        cp ${verbose_common} -R ${path_documentation}${i} ${path_build}documentation/ || failure=1
       else
-        mkdir $verbose_common -p ${path_build}documentation/${directory} || failure=1
+        mkdir ${verbose_common} -p ${path_build}documentation/${directory} || failure=1
 
-        if [[ $failure == "" ]] ; then
-          cp $verbose_common -R ${path_documentation}${i} ${path_build}documentation/${directory}/ || failure=1
+        if [[ ${failure} == "" ]] ; then
+          cp ${verbose_common} -R ${path_documentation}${i} ${path_build}documentation/${directory}/ || failure=1
         fi
       fi
     done
   fi
 
-  if [[ $sources_setting != "" ]] ; then
-    for i in $sources_setting ; do
-      directory=$(dirname $i)
+  if [[ ${sources_setting} != "" ]] ; then
+    for i in ${sources_setting} ; do
+      directory=$(dirname ${i})
 
-      if [[ $directory == "." ]] ; then
-        cp $verbose_common -R ${path_settings}${i} ${path_build}settings/ || failure=1
+      if [[ ${directory} == "." ]] ; then
+        cp ${verbose_common} -R ${path_settings}${i} ${path_build}settings/ || failure=1
       else
-        mkdir $verbose_common -p ${path_build}settings/${directory} || failure=1
+        mkdir ${verbose_common} -p ${path_build}settings/${directory} || failure=1
 
-        if [[ $failure == "" ]] ; then
-          cp $verbose_common -R ${path_settings}${i} ${path_build}settings/${directory}/ || failure=1
+        if [[ ${failure} == "" ]] ; then
+          cp ${verbose_common} -R ${path_settings}${i} ${path_build}settings/${directory}/ || failure=1
         fi
       fi
     done
   fi
 
-  if [[ $failure == "" && $sources_headers != "" ]] ; then
-    if [[ $preserve_path_headers == "yes" ]] ; then
-      for i in $sources_headers ; do
-        directory=$(dirname $i)
+  if [[ ${failure} == "" && ${sources_headers} != "" ]] ; then
+    if [[ ${preserve_path_headers} == "yes" ]] ; then
+      for i in ${sources_headers} ; do
+        directory=$(dirname ${i})
 
-        if [[ $directory == "." ]] ; then
-          cp $verbose_common -f ${path_sources}${path_language}${i} ${path_build}includes/${path_headers} || failure=1
+        if [[ ${directory} == "." ]] ; then
+          cp ${verbose_common} -f ${path_sources}${path_language}${i} ${path_build}includes/${path_headers} || failure=1
         else
           if [[ ! -d ${path_build}includes/${path_headers}${directory} ]] ; then
-            mkdir $verbose_common -p ${path_build}includes/${path_headers}${directory} || failure=1
+            mkdir ${verbose_common} -p ${path_build}includes/${path_headers}${directory} || failure=1
           fi
 
-          if [[ $failure == "" ]] ; then
-            cp $verbose_common -f ${path_sources}${path_language}${i} ${path_build}includes/${path_headers}${i} || failure=1
+          if [[ ${failure} == "" ]] ; then
+            cp ${verbose_common} -f ${path_sources}${path_language}${i} ${path_build}includes/${path_headers}${i} || failure=1
           fi
         fi
       done
     else
-      for i in $sources_headers ; do
-        cp $verbose_common -f ${path_sources}${path_language}${i} ${path_build}includes/${path_headers} || failure=1
+      for i in ${sources_headers} ; do
+        cp ${verbose_common} -f ${path_sources}${path_language}${i} ${path_build}includes/${path_headers} || failure=1
       done
     fi
   fi
 
-  if [[ $failure == "" && $build_shared == "yes" && ! -f ${project_built_shared}.built ]] ; then
-    if [[ $sources_object != "" || $sources_object_shared != "" ]] ; then
+  if [[ ${failure} == "" && ${build_shared} == "yes" && ! -f ${project_built_shared}.built ]] ; then
+    if [[ ${sources_object} != "" || ${sources_object_shared} != "" ]] ; then
       sources=
       let count=0
 
       # Sources object only allows for a single value.
-      if [[ $sources_object_shared != "" ]] ; then
-        for i in $sources_object_shared ; do
+      if [[ ${sources_object_shared} != "" ]] ; then
+        for i in ${sources_object_shared} ; do
           let count++
         done
 
-        if [[ $count -gt 1 ]] ; then
-          if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+        if [[ ${count} -gt 1 ]] ; then
+          if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
             echo -e "${c_warning}WARNING: Multiple '${c_notice}sources_object_shared${c_warning}' found, only using the first one found is going to be used.${c_reset}"
           fi
         fi
 
-        for i in $sources_object_shared ; do
+        for i in ${sources_object_shared} ; do
           sources="${path_sources_object}${path_language}${i} "
 
           break
         done
       else
-        for i in $sources_object ; do
+        for i in ${sources_object} ; do
           let count++
         done
 
-        if [[ $count -gt 1 ]] ; then
-          if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+        if [[ ${count} -gt 1 ]] ; then
+          if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
             echo -e "${c_warning}WARNING: Multiple '${c_notice}sources_object${c_warning}' found, only using the first one found is going to be used.${c_reset}"
           fi
         fi
 
-        for i in $sources_object ; do
+        for i in ${sources_object} ; do
           sources="${path_sources_object}${path_language}${i} "
 
           break
         done
       fi
 
-      if [[ $verbosity == "verbose" ]] ; then
-        echo $build_compiler $sources -c -o ${path_build}objects/${path_object_shared}${build_name}.o $arguments_shared $arguments_include $libraries $libraries_shared $flags $flags_shared $flags_object $flags_object_shared $defines $defines_shared $defines_object $defines_object_shared $define_extra
+      if [[ ${verbosity} == "verbose" ]] ; then
+        echo ${build_compiler} ${sources} -c -o ${path_build}objects/${path_object_shared}${build_name}.o ${arguments_shared} ${arguments_include} ${libraries} ${libraries_shared} ${flags} ${flags_shared} ${flags_object} ${flags_object_shared} ${defines} ${defines_shared} ${defines_object} ${defines_object_shared} ${define_extra}
       fi
 
-      $build_compiler $sources -c -o ${path_build}objects/${path_object_shared}${build_name}.o $arguments_shared $arguments_include $libraries $libraries_shared $flags $flags_shared $flags_object $flags_object_shared $defines $defines_shared $defines_object $defines_object_shared $define_extra || failure=1
+      ${build_compiler} ${sources} -c -o ${path_build}objects/${path_object_shared}${build_name}.o ${arguments_shared} ${arguments_include} ${libraries} ${libraries_shared} ${flags} ${flags_shared} ${flags_object} ${flags_object_shared} ${defines} ${defines_shared} ${defines_object} ${defines_object_shared} ${define_extra} || failure=1
     fi
 
-    if [[ $sources_library != "" || $sources_library_shared != "" ]] ; then
+    if [[ ${sources_library} != "" || ${sources_library_shared} != "" ]] ; then
       sources=
 
-      if [[ $objects_library != "" || $objects_library_shared != "" ]] ; then
-        for i in $objects_library $objects_library_shared ; do
+      if [[ ${objects_library} != "" || ${objects_library_shared} != "" ]] ; then
+        for i in ${objects_library} ${objects_library_shared} ; do
           sources="${sources}${path_build}objects/${path_object_shared}${i} "
         done
       fi
 
-      for i in $sources_library $sources_library_shared ; do
+      for i in ${sources_library} ${sources_library_shared} ; do
         sources="${sources}${path_sources}${path_language}${i} "
       done
 
-      if [[ $verbosity == "verbose" ]] ; then
-        echo $build_compiler $sources -shared -Wl,-soname,lib${build_name}.so${version_target} -o ${path_build}libraries/${path_library_shared}lib${build_name}.so${version_file} $arguments_shared $arguments_include $libraries $libraries_shared $flags $flags_shared $flags_library $flags_library_shared $defines $defines_shared $defines_library $defines_library_shared $define_extra
+      if [[ ${verbosity} == "verbose" ]] ; then
+        echo ${build_compiler} ${sources} -shared -Wl,-soname,lib${build_name}.so${version_target} -o ${path_build}libraries/${path_library_shared}lib${build_name}.so${version_file} ${arguments_shared} ${arguments_include} ${libraries} ${libraries_shared} ${flags} ${flags_shared} ${flags_library} ${flags_library_shared} ${defines} ${defines_shared} ${defines_library} ${defines_library_shared} ${define_extra}
       fi
 
-      $build_compiler $sources -shared -Wl,-soname,lib${build_name}.so${version_target} -o ${path_build}libraries/${path_library_shared}lib${build_name}.so$version_file $arguments_shared $arguments_include $libraries $libraries_shared $flags $flags_shared $flags_library $flags_library_shared $defines $defines_shared $defines_library $defines_library_shared $define_extra || failure=1
+      ${build_compiler} ${sources} -shared -Wl,-soname,lib${build_name}.so${version_target} -o ${path_build}libraries/${path_library_shared}lib${build_name}.so${version_file} ${arguments_shared} ${arguments_include} ${libraries} ${libraries_shared} ${flags} ${flags_shared} ${flags_library} ${flags_library_shared} ${defines} ${defines_shared} ${defines_library} ${defines_library_shared} ${define_extra} || failure=1
 
-      if [[ $failure == "" ]] ; then
-        if [[ $version_file_value != "major" ]] ; then
-          if [[ $version_file_value == "minor" ]] ; then
-            ln $verbose_common -sf lib${build_name}.so${version_file} ${path_build}libraries/${path_library_shared}lib${build_name}.so${version_major_prefix}${version_major} || failure=1
+      if [[ ${failure} == "" ]] ; then
+        if [[ ${version_file_value} != "major" ]] ; then
+          if [[ ${version_file_value} == "minor" ]] ; then
+            ln ${verbose_common} -sf lib${build_name}.so${version_file} ${path_build}libraries/${path_library_shared}lib${build_name}.so${version_major_prefix}${version_major} || failure=1
           else
-            ln $verbose_common -sf lib${build_name}.so${version_major_prefix}${version_major}${version_minor_prefix}${version_minor} ${path_build}libraries/${path_library_shared}lib${build_name}.so${version_major_prefix}${version_major} || failure=1
+            ln ${verbose_common} -sf lib${build_name}.so${version_major_prefix}${version_major}${version_minor_prefix}${version_minor} ${path_build}libraries/${path_library_shared}lib${build_name}.so${version_major_prefix}${version_major} || failure=1
 
-            if [[ $failure == "" ]] ; then
-              if [[ $version_file_value == "micro" ]] ; then
-                ln $verbose_common -sf lib$build_name.so$version_file ${path_build}libraries/${path_library_shared}lib$build_name.so$version_major_prefix$version_major$version_minor_prefix$version_minor || failure=1
+            if [[ ${failure} == "" ]] ; then
+              if [[ ${version_file_value} == "micro" ]] ; then
+                ln ${verbose_common} -sf lib${build_name}.so${version_file} ${path_build}libraries/${path_library_shared}lib${build_name}.so${version_major_prefix}${version_major}${version_minor_prefix}${version_minor} || failure=1
               else
-                ln $verbose_common -sf lib${build_name}.so${version_major_prefix}${version_major}${version_minor_prefix}${version_minor}${version_micro_prefix}${version_micro} ${path_build}libraries/${path_library_shared}lib${build_name}.so${version_major_prefix}${version_major}${version_minor_prefix}${version_minor} || failure=1
+                ln ${verbose_common} -sf lib${build_name}.so${version_major_prefix}${version_major}${version_minor_prefix}${version_minor}${version_micro_prefix}${version_micro} ${path_build}libraries/${path_library_shared}lib${build_name}.so${version_major_prefix}${version_major}${version_minor_prefix}${version_minor} || failure=1
 
-                if [[ $failure == "" ]] ; then
-                  ln $verbose_common -sf lib${build_name}.so${version_file} ${path_build}libraries/${path_library_shared}lib${build_name}.so${version_major_prefix}${version_major}${version_minor_prefix}${version_minor_prefix}${version_minor}${version_micro_prefix}${version_micro} || failure=1
+                if [[ ${failure} == "" ]] ; then
+                  ln ${verbose_common} -sf lib${build_name}.so${version_file} ${path_build}libraries/${path_library_shared}lib${build_name}.so${version_major_prefix}${version_major}${version_minor_prefix}${version_minor_prefix}${version_minor}${version_micro_prefix}${version_micro} || failure=1
                 fi
               fi
             fi
           fi
         fi
 
-        if [[ $failure == "" ]] ; then
+        if [[ ${failure} == "" ]] ; then
           ln ${verbose_common} -sf lib${build_name}.so${version_major_prefix}${version_major} ${path_build}libraries/${path_library_shared}lib${build_name}.so || failure=1
         fi
       fi
     fi
 
-    if [[ $failure == "" && $sources_program != "" ]] ; then
+    if [[ ${failure} == "" && ${sources_program} != "" ]] ; then
       sources=
       links=
 
-      if [[ $sources_library != "" || $sources_library_shared != "" ]] ; then
-        links="-l$build_name "
+      if [[ ${sources_library} != "" || ${sources_library_shared} != "" ]] ; then
+        links="-l${build_name} "
       fi
 
-      if [[ $objects_program != "" || $objects_program_shared != "" ]] ; then
-        for i in $objects_program $objects_program_shared ; do
+      if [[ ${objects_program} != "" || ${objects_program_shared} != "" ]] ; then
+        for i in ${objects_program} ${objects_program_shared} ; do
           sources="${sources}${path_build}objects/${path_object_shared}${i} "
         done
       fi
 
-      for i in $sources_program $sources_program_shared ; do
+      for i in ${sources_program} ${sources_program_shared} ; do
         sources="${sources}${path_sources}${path_language}${i} "
       done
 
-      if [[ $verbosity == "verbose" ]] ; then
-        echo $build_compiler $sources -o ${path_build}programs/${path_program_shared}${build_name} $arguments_shared $arguments_include $links $libraries $libraries_shared $flags $flags_shared $flags_program $flags_program_shared $defines $defines_shared $defines_program $defines_program_shared $define_extra
+      if [[ ${verbosity} == "verbose" ]] ; then
+        echo ${build_compiler} ${sources} -o ${path_build}programs/${path_program_shared}${build_name} ${arguments_shared} ${arguments_include} ${links} ${libraries} ${libraries_shared} ${flags} ${flags_shared} ${flags_program} ${flags_program_shared} ${defines} ${defines_shared} ${defines_program} ${defines_program_shared} ${define_extra}
       fi
 
-      $build_compiler $sources -o ${path_build}programs/${path_program_shared}${build_name} $arguments_shared $arguments_include $links $libraries $libraries_shared $flags $flags_shared $flags_program $flags_program_shared $defines $defines_shared $defines_program $defines_program_shared $define_extra || failure=1
+      ${build_compiler} ${sources} -o ${path_build}programs/${path_program_shared}${build_name} ${arguments_shared} ${arguments_include} ${links} ${libraries} ${libraries_shared} ${flags} ${flags_shared} ${flags_program} ${flags_program_shared} ${defines} ${defines_shared} ${defines_program} ${defines_program_shared} ${define_extra} || failure=1
     fi
 
-    if [[ $failure == "" ]] ; then
+    if [[ ${failure} == "" ]] ; then
       touch ${project_built_shared}-${settings_name}.built
     fi
   fi
 
-  if [[ $failure == "" && $build_static == "yes" && ! -f ${project_built_static}.built ]] ; then
-    if [[ $sources_object != "" || $sources_object_static != "" ]] ; then
+  if [[ ${failure} == "" && ${build_static} == "yes" && ! -f ${project_built_static}.built ]] ; then
+    if [[ ${sources_object} != "" || ${sources_object_static} != "" ]] ; then
       let count=0
 
       # Sources object only allows for a single value.
-      if [[ $sources_object_static != "" ]] ; then
-        for i in $sources_object_static ; do
+      if [[ ${sources_object_static} != "" ]] ; then
+        for i in ${sources_object_static} ; do
           let count++
         done
 
-        if [[ $count -gt 1 ]] ; then
-          if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+        if [[ ${count} -gt 1 ]] ; then
+          if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
             echo -e "${c_warning}WARNING: Multiple '${c_notice}sources_object_static${c_warning}' found, only using the first one found is going to be used.${c_reset}"
           fi
         fi
 
-        for i in $sources_object_static ; do
+        for i in ${sources_object_static} ; do
           sources="${path_sources_object}${path_language}${i} "
 
           break
         done
       else
-        for i in $sources_object ; do
+        for i in ${sources_object} ; do
           let count++
         done
 
-        if [[ $count -gt 1 ]] ; then
-          if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+        if [[ ${count} -gt 1 ]] ; then
+          if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
             echo -e "${c_warning}WARNING: Multiple '${c_notice}sources_object${c_warning}' found, only using the first one found is going to be used.${c_reset}"
           fi
         fi
 
-        for i in $sources_object ; do
+        for i in ${sources_object} ; do
           sources="${path_sources_object}${path_language}${i} "
 
           break
         done
       fi
 
-      if [[ $verbosity == "verbose" ]] ; then
-        echo $build_compiler $sources -c -o ${path_build}objects/${path_object_static}${build_name}.o $arguments_static $arguments_include $libraries $libraries_static $flags $flags_static $flags_object $flags_object_static $defines $defines_static $defines_object $defines_object_static $define_extra
+      if [[ ${verbosity} == "verbose" ]] ; then
+        echo ${build_compiler} ${sources} -c -o ${path_build}objects/${path_object_static}${build_name}.o ${arguments_static} ${arguments_include} ${libraries} ${libraries_static} ${flags} ${flags_static} ${flags_object} ${flags_object_static} ${defines} ${defines_static} ${defines_object} ${defines_object_static} ${define_extra}
       fi
 
-      $build_compiler $sources -c -o ${path_build}objects/${path_object_static}${build_name}.o $arguments_static $arguments_include $libraries $libraries_static $flags $flags_static $flags_object $flags_object_static $defines $defines_static $defines_object $defines_object_static $define_extra || failure=1
+      ${build_compiler} ${sources} -c -o ${path_build}objects/${path_object_static}${build_name}.o ${arguments_static} ${arguments_include} ${libraries} ${libraries_static} ${flags} ${flags_static} ${flags_object} ${flags_object_static} ${defines} ${defines_static} ${defines_object} ${defines_object_static} ${define_extra} || failure=1
     fi
 
-    if [[ $sources_library != "" || $sources_library_static != "" ]] ; then
+    if [[ ${sources_library} != "" || ${sources_library_static} != "" ]] ; then
       sources=
 
-      if [[ $objects_library != "" || $objects_library_static != "" ]] ; then
-        for i in $objects_library $objects_library_static ; do
+      if [[ ${objects_library} != "" || ${objects_library_static} != "" ]] ; then
+        for i in ${objects_library} ${objects_library_static} ; do
           sources="${sources}${path_build}objects/${path_object_static}${i} "
         done
       fi
 
-      for i in $sources_library $sources_library_static ; do
-        directory=$(dirname $i)
-        n=$(basename $i | sed -e 's|\.c$||')
+      for i in ${sources_library} ${sources_library_static} ; do
+        directory=$(dirname ${i})
+        n=$(basename ${i} | sed -e 's|\.c$||')
 
-        if [[ $directory != "." && ! -d ${path_build}objects/${directory} ]] ; then
-          mkdir $verbose_common -p ${path_build}objects/${directory}
+        if [[ ${directory} != "." && ! -d ${path_build}objects/${directory} ]] ; then
+          mkdir ${verbose_common} -p ${path_build}objects/${directory}
 
-          if [[ $? -ne 0 ]] ; then
+          if [[ ${?} -ne 0 ]] ; then
             let failure=1
 
             break;
@@ -1650,61 +1651,61 @@ bootstrap_operation_build() {
         fi
 
         # These are objects created by the static build step rather than objects created by the object build step.
-        sources="${sources}${path_build}objects/$directory/$n.o "
+        sources="${sources}${path_build}objects/${directory}/${n}.o "
 
-        if [[ $verbosity == "verbose" ]] ; then
-          echo $build_compiler ${path_sources}${path_language}${i} -c -static -o ${path_build}objects/${directory}/${n}.o $arguments_static $arguments_include $libraries $libraries_static $flags $flags_static $flags_library $flags_library_static $defines $defines_static $defines_library $defines_library_static $define_extra
+        if [[ ${verbosity} == "verbose" ]] ; then
+          echo ${build_compiler} ${path_sources}${path_language}${i} -c -static -o ${path_build}objects/${directory}/${n}.o ${arguments_static} ${arguments_include} ${libraries} ${libraries_static} ${flags} ${flags_static} ${flags_library} ${flags_library_static} ${defines} ${defines_static} ${defines_library} ${defines_library_static} ${define_extra}
         fi
 
-        $build_compiler ${path_sources}${path_language}${i} -c -static -o ${path_build}objects/${directory}/${n}.o $arguments_static $arguments_include $libraries $libraries_static $flags $flags_static $flags_library $flags_library_static $defines $defines_static $defines_library $defines_library_static $define_extra || failure=1
+        ${build_compiler} ${path_sources}${path_language}${i} -c -static -o ${path_build}objects/${directory}/${n}.o ${arguments_static} ${arguments_include} ${libraries} ${libraries_static} ${flags} ${flags_static} ${flags_library} ${flags_library_static} ${defines} ${defines_static} ${defines_library} ${defines_library_static} ${define_extra} || failure=1
 
-        if [[ $failure != "" ]] ; then
+        if [[ ${failure} != "" ]] ; then
           break;
         fi
       done
 
-      if [[ $failure == "" && ( $sources_library != "" || $sources_library_static != "" ) ]] ; then
+      if [[ ${failure} == "" && ( ${sources_library} != "" || ${sources_library_static} != "" ) ]] ; then
 
-        if [[ $verbosity == "verbose" ]] ; then
-          echo $build_indexer $build_indexer_arguments ${path_build}libraries/${path_library_static}lib${build_name}.a $sources
+        if [[ ${verbosity} == "verbose" ]] ; then
+          echo ${build_indexer} ${build_indexer_arguments} ${path_build}libraries/${path_library_static}lib${build_name}.a ${sources}
         fi
 
-        $build_indexer $build_indexer_arguments ${path_build}libraries/${path_library_static}lib${build_name}.a $sources || failure=1
+        ${build_indexer} ${build_indexer_arguments} ${path_build}libraries/${path_library_static}lib${build_name}.a ${sources} || failure=1
       fi
     fi
 
-    if [[ $failure == "" && $sources_program != "" ]] ; then
+    if [[ ${failure} == "" && ${sources_program} != "" ]] ; then
       sources=
       links=
 
-      if [[ $sources_library != "" || $sources_library_static != "" ]] ; then
+      if [[ ${sources_library} != "" || ${sources_library_static} != "" ]] ; then
         links="-l${build_name} "
       fi
 
-      if [[ $objects_program != "" || $objects_program_static != "" ]] ; then
-        for i in $objects_program $objects_program_static ; do
+      if [[ ${objects_program} != "" || ${objects_program_static} != "" ]] ; then
+        for i in ${objects_program} ${objects_program_static} ; do
           sources="${sources}${path_build}objects/${path_object_static}${i} "
         done
       fi
 
-      for i in $sources_program $sources_program_static ; do
+      for i in ${sources_program} ${sources_program_static} ; do
         sources="${sources}${path_sources}${path_language}${i} "
       done
 
-      if [[ $verbosity == "verbose" ]] ; then
-        echo $build_compiler $sources -static -o ${path_build}programs/${path_program_static}${build_name} $arguments_static $arguments_include $links $libraries $libraries_static $flags $flags_static $flags_program $flags_program_static $defines $defines_static $defines_program $defines_program_static $define_extra
+      if [[ ${verbosity} == "verbose" ]] ; then
+        echo ${build_compiler} ${sources} -static -o ${path_build}programs/${path_program_static}${build_name} ${arguments_static} ${arguments_include} ${links} ${libraries} ${libraries_static} ${flags} ${flags_static} ${flags_program} ${flags_program_static} ${defines} ${defines_static} ${defines_program} ${defines_program_static} ${define_extra}
       fi
 
-      $build_compiler $sources -static -o ${path_build}programs/${path_program_static}${build_name} $arguments_static $arguments_include $links $libraries $libraries_static $flags $flags_static $flags_program $flags_program_static $defines $defines_static $defines_program $defines_program_static $define_extra || failure=1
+      ${build_compiler} ${sources} -static -o ${path_build}programs/${path_program_static}${build_name} ${arguments_static} ${arguments_include} ${links} ${libraries} ${libraries_static} ${flags} ${flags_static} ${flags_program} ${flags_program_static} ${defines} ${defines_static} ${defines_program} ${defines_program_static} ${define_extra} || failure=1
     fi
 
-    if [[ $failure == "" ]] ; then
+    if [[ ${failure} == "" ]] ; then
       touch ${project_built_static}-${settings_name}.built
     fi
   fi
 
-  if [[ $failure != "" ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${failure} != "" ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       bootstrap_print_first
 
       echo -e "${c_error}ERROR: Failed to build.${c_reset}"
@@ -1715,7 +1716,7 @@ bootstrap_operation_build() {
     return 1
   fi
 
-  if [[ $failure == "" ]] ; then
+  if [[ ${failure} == "" ]] ; then
     return 0
   fi
 
@@ -1726,181 +1727,181 @@ bootstrap_operation_build_prepare_defaults() {
   local key=
 
   bootstrap_id "has-version_major_prefix-mode"
-  if [[ ${variables[$key]} != "yes" ]] ; then
+  if [[ ${variables[${key}]} != "yes" ]] ; then
 
     bootstrap_id "has-version_major_prefix"
-    if [[ ${variables[$key]} != "yes" ]] ; then
+    if [[ ${variables[${key}]} != "yes" ]] ; then
       version_major_prefix="."
     fi
   fi
 
   bootstrap_id "has-version_minor_prefix-mode"
-  if [[ ${variables[$key]} != "yes" ]] ; then
+  if [[ ${variables[${key}]} != "yes" ]] ; then
 
     bootstrap_id "has-version_minor_prefix"
-    if [[ ${variables[$key]} != "yes" ]] ; then
+    if [[ ${variables[${key}]} != "yes" ]] ; then
       version_minor_prefix="."
     fi
   fi
 
   bootstrap_id "has-version_micro_prefix-mode"
-  if [[ ${variables[$key]} != "yes" ]] ; then
+  if [[ ${variables[${key}]} != "yes" ]] ; then
 
     bootstrap_id "has-version_micro_prefix"
-    if [[ ${variables[$key]} != "yes" ]] ; then
+    if [[ ${variables[${key}]} != "yes" ]] ; then
       version_micro_prefix="."
     fi
   fi
 
   bootstrap_id "has-version_nano_prefix-mode"
-  if [[ ${variables[$key]} != "yes" ]] ; then
+  if [[ ${variables[${key}]} != "yes" ]] ; then
 
     bootstrap_id "has-version_nano_prefix"
-    if [[ ${variables[$key]} != "yes" ]] ; then
+    if [[ ${variables[${key}]} != "yes" ]] ; then
       version_nano_prefix="."
     fi
   fi
 
   bootstrap_id "has-build_compiler-mode"
-  if [[ ${variables[$key]} != "yes" ]] ; then
+  if [[ ${variables[${key}]} != "yes" ]] ; then
 
     bootstrap_id "has-build_compiler"
-    if [[ ${variables[$key]} != "yes" ]] ; then
+    if [[ ${variables[${key}]} != "yes" ]] ; then
       build_compiler="gcc"
     fi
   fi
 
   bootstrap_id "has-build_indexer-mode"
-  if [[ ${variables[$key]} != "yes" ]] ; then
+  if [[ ${variables[${key}]} != "yes" ]] ; then
 
     bootstrap_id "has-build_indexer"
-    if [[ ${variables[$key]} != "yes" ]] ; then
+    if [[ ${variables[${key}]} != "yes" ]] ; then
       build_indexer="ar"
     fi
   fi
 
   bootstrap_id "has-path_library_script-mode"
-  if [[ ${variables[$key]} != "yes" ]] ; then
+  if [[ ${variables[${key}]} != "yes" ]] ; then
 
     bootstrap_id "has-path_library_script"
-    if [[ ${variables[$key]} != "yes" ]] ; then
+    if [[ ${variables[${key}]} != "yes" ]] ; then
       path_library_script="script/"
     fi
   fi
 
   bootstrap_id "has-path_library_shared-mode"
-  if [[ ${variables[$key]} != "yes" ]] ; then
+  if [[ ${variables[${key}]} != "yes" ]] ; then
 
     bootstrap_id "has-path_library_shared"
-    if [[ ${variables[$key]} != "yes" ]] ; then
+    if [[ ${variables[${key}]} != "yes" ]] ; then
       path_library_shared="shared/"
     fi
   fi
 
   bootstrap_id "has-path_library_static-mode"
-  if [[ ${variables[$key]} != "yes" ]] ; then
+  if [[ ${variables[${key}]} != "yes" ]] ; then
 
     bootstrap_id "has-path_library_static"
-    if [[ ${variables[$key]} != "yes" ]] ; then
+    if [[ ${variables[${key}]} != "yes" ]] ; then
       path_library_static="static/"
     fi
   fi
 
   bootstrap_id "has-path_object_script-mode"
-  if [[ ${variables[$key]} != "yes" ]] ; then
+  if [[ ${variables[${key}]} != "yes" ]] ; then
 
     bootstrap_id "has-path_object_script"
-    if [[ ${variables[$key]} != "yes" ]] ; then
+    if [[ ${variables[${key}]} != "yes" ]] ; then
       path_object_script="script/"
     fi
   fi
 
   bootstrap_id "has-path_object_shared-mode"
-  if [[ ${variables[$key]} != "yes" ]] ; then
+  if [[ ${variables[${key}]} != "yes" ]] ; then
 
     bootstrap_id "has-path_object_shared"
-    if [[ ${variables[$key]} != "yes" ]] ; then
+    if [[ ${variables[${key}]} != "yes" ]] ; then
       path_object_shared="shared/"
     fi
   fi
 
   bootstrap_id "has-path_object_static-mode"
-  if [[ ${variables[$key]} != "yes" ]] ; then
+  if [[ ${variables[${key}]} != "yes" ]] ; then
 
     bootstrap_id "has-path_object_static"
-    if [[ ${variables[$key]} != "yes" ]] ; then
+    if [[ ${variables[${key}]} != "yes" ]] ; then
       path_object_static="static/"
     fi
   fi
 
   bootstrap_id "has-path_program_script-mode"
-  if [[ ${variables[$key]} != "yes" ]] ; then
+  if [[ ${variables[${key}]} != "yes" ]] ; then
 
     bootstrap_id "has-path_program_script"
-    if [[ ${variables[$key]} != "yes" ]] ; then
+    if [[ ${variables[${key}]} != "yes" ]] ; then
       path_program_script="script/"
     fi
   fi
 
   bootstrap_id "has-path_program_shared-mode"
-  if [[ ${variables[$key]} != "yes" ]] ; then
+  if [[ ${variables[${key}]} != "yes" ]] ; then
 
     bootstrap_id "has-path_program_shared"
-    if [[ ${variables[$key]} != "yes" ]] ; then
+    if [[ ${variables[${key}]} != "yes" ]] ; then
       path_program_shared="shared/"
     fi
   fi
 
   bootstrap_id "has-path_program_static-mode"
-  if [[ ${variables[$key]} != "yes" ]] ; then
+  if [[ ${variables[${key}]} != "yes" ]] ; then
 
     bootstrap_id "has-path_program_static"
-    if [[ ${variables[$key]} != "yes" ]] ; then
+    if [[ ${variables[${key}]} != "yes" ]] ; then
       path_program_static="static/"
     fi
   fi
 
   bootstrap_id "has-path_sources-mode"
-  if [[ ${variables[$key]} != "yes" ]] ; then
+  if [[ ${variables[${key}]} != "yes" ]] ; then
 
     bootstrap_id "has-path_sources"
-    if [[ ${variables[$key]} != "yes" ]] ; then
+    if [[ ${variables[${key}]} != "yes" ]] ; then
       path_sources="sources/"
     fi
   fi
 
   bootstrap_id "has-path_sources_object-mode"
-  if [[ ${variables[$key]} != "yes" ]] ; then
+  if [[ ${variables[${key}]} != "yes" ]] ; then
 
     bootstrap_id "has-path_sources_object"
-    if [[ ${variables[$key]} != "yes" ]] ; then
+    if [[ ${variables[${key}]} != "yes" ]] ; then
       path_sources_object="sources/"
     fi
   fi
 
   bootstrap_id "has-has_path_standard-mode"
-  if [[ ${variables[$key]} != "yes" ]] ; then
+  if [[ ${variables[${key}]} != "yes" ]] ; then
 
     bootstrap_id "has-has_path_standard"
-    if [[ ${variables[$key]} != "yes" ]] ; then
+    if [[ ${variables[${key}]} != "yes" ]] ; then
       has_path_standard="yes"
     fi
   fi
 
   bootstrap_id "has-search_shared-mode"
-  if [[ ${variables[$key]} != "yes" ]] ; then
+  if [[ ${variables[${key}]} != "yes" ]] ; then
 
     bootstrap_id "has-search_shared"
-    if [[ ${variables[$key]} != "yes" ]] ; then
+    if [[ ${variables[${key}]} != "yes" ]] ; then
       search_shared="yes"
     fi
   fi
 
   bootstrap_id "has-build_shared-mode"
-  if [[ ${variables[$key]} != "yes" ]] ; then
+  if [[ ${variables[${key}]} != "yes" ]] ; then
 
     bootstrap_id "has-build_shared"
-    if [[ ${variables[$key]} != "yes" ]] ; then
+    if [[ ${variables[${key}]} != "yes" ]] ; then
       build_shared="yes"
     fi
   fi
@@ -1910,108 +1911,108 @@ bootstrap_operation_build_prepare_defines() {
   local key=
 
   bootstrap_id "defines-mode"
-  if [[ $defines == "" ]] ; then
-    defines=${variables[$key]}
+  if [[ ${defines} == "" ]] ; then
+    defines=${variables[${key}]}
   else
-    defines="$defines ${variables[$key]}"
+    defines="${defines} ${variables[${key}]}"
   fi
 
   bootstrap_id "defines_library-mode"
-  if [[ $defines_library == "" ]] ; then
-    defines_library=${variables[$key]}
+  if [[ ${defines_library} == "" ]] ; then
+    defines_library=${variables[${key}]}
   else
-    defines_library="$defines_library ${variables[$key]}"
+    defines_library="${defines_library} ${variables[${key}]}"
   fi
 
   bootstrap_id "defines_library_shared-mode"
-  if [[ $defines_library_shared == "" ]] ; then
-    defines_library_shared=${variables[$key]}
+  if [[ ${defines_library_shared} == "" ]] ; then
+    defines_library_shared=${variables[${key}]}
   else
-    defines_library_shared="$defines_library_shared ${variables[$key]}"
+    defines_library_shared="${defines_library_shared} ${variables[${key}]}"
   fi
 
   bootstrap_id "defines_library_static-mode"
-  if [[ $defines_library_static == "" ]] ; then
-    defines_library_static=${variables[$key]}
+  if [[ ${defines_library_static} == "" ]] ; then
+    defines_library_static=${variables[${key}]}
   else
-    defines_library_static="$defines_library_static ${variables[$key]}"
+    defines_library_static="${defines_library_static} ${variables[${key}]}"
   fi
 
   bootstrap_id "defines_object_library-mode"
-  if [[ $defines_object_library == "" ]] ; then
-    defines_object_library=${variables[$key]}
+  if [[ ${defines_object_library} == "" ]] ; then
+    defines_object_library=${variables[${key}]}
   else
-    defines_object_library="$defines_object_library ${variables[$key]}"
+    defines_object_library="${defines_object_library} ${variables[${key}]}"
   fi
 
   bootstrap_id "defines_object_library_shared-mode"
-  if [[ $defines_object_library_shared == "" ]] ; then
-    defines_object_library_shared=${variables[$key]}
+  if [[ ${defines_object_library_shared} == "" ]] ; then
+    defines_object_library_shared=${variables[${key}]}
   else
-    defines_object_library_shared="$defines_object_library_shared ${variables[$key]}"
+    defines_object_library_shared="${defines_object_library_shared} ${variables[${key}]}"
   fi
 
   bootstrap_id "defines_object_library_static-mode"
-  if [[ $defines_object_library_static == "" ]] ; then
-    defines_object_library_static=${variables[$key]}
+  if [[ ${defines_object_library_static} == "" ]] ; then
+    defines_object_library_static=${variables[${key}]}
   else
-    defines_object_library_static="$defines_object_library_static ${variables[$key]}"
+    defines_object_library_static="${defines_object_library_static} ${variables[${key}]}"
   fi
 
   bootstrap_id "defines_object_program-mode"
-  if [[ $defines_object_program == "" ]] ; then
-    defines_object_program=${variables[$key]}
+  if [[ ${defines_object_program} == "" ]] ; then
+    defines_object_program=${variables[${key}]}
   else
-    defines_object_program="$defines_object_program ${variables[$key]}"
+    defines_object_program="${defines_object_program} ${variables[${key}]}"
   fi
 
   bootstrap_id "defines_object_program_shared-mode"
-  if [[ $defines_object_program_shared == "" ]] ; then
-    defines_object_program_shared=${variables[$key]}
+  if [[ ${defines_object_program_shared} == "" ]] ; then
+    defines_object_program_shared=${variables[${key}]}
   else
-    defines_object_program_shared="$defines_object_program_shared ${variables[$key]}"
+    defines_object_program_shared="${defines_object_program_shared} ${variables[${key}]}"
   fi
 
   bootstrap_id "defines_object_program_static-mode"
-  if [[ $defines_object_program_static == "" ]] ; then
-    defines_object_program_static=${variables[$key]}
+  if [[ ${defines_object_program_static} == "" ]] ; then
+    defines_object_program_static=${variables[${key}]}
   else
-    defines_object_program_static="$defines_object_program_static ${variables[$key]}"
+    defines_object_program_static="${defines_object_program_static} ${variables[${key}]}"
   fi
 
   bootstrap_id "defines_program-mode"
-  if [[ $defines_program == "" ]] ; then
-    defines_program=${variables[$key]}
+  if [[ ${defines_program} == "" ]] ; then
+    defines_program=${variables[${key}]}
   else
-    defines_program="$defines_program ${variables[$key]}"
+    defines_program="${defines_program} ${variables[${key}]}"
   fi
 
   bootstrap_id "defines_program_shared-mode"
-  if [[ $defines_program_shared == "" ]] ; then
-    defines_program_shared=${variables[$key]}
+  if [[ ${defines_program_shared} == "" ]] ; then
+    defines_program_shared=${variables[${key}]}
   else
-    defines_program_shared="$defines_program_shared ${variables[$key]}"
+    defines_program_shared="${defines_program_shared} ${variables[${key}]}"
   fi
 
   bootstrap_id "defines_program_static-mode"
-  if [[ $defines_program_static == "" ]] ; then
-    defines_program_static=${variables[$key]}
+  if [[ ${defines_program_static} == "" ]] ; then
+    defines_program_static=${variables[${key}]}
   else
-    defines_program_static="$defines_program_static ${variables[$key]}"
+    defines_program_static="${defines_program_static} ${variables[${key}]}"
   fi
 
   bootstrap_id "defines_shared-mode"
-  if [[ $defines_shared == "" ]] ; then
-    defines_shared=${variables[$key]}
+  if [[ ${defines_shared} == "" ]] ; then
+    defines_shared=${variables[${key}]}
   else
-    defines_shared="$defines_shared ${variables[$key]}"
+    defines_shared="${defines_shared} ${variables[${key}]}"
   fi
 
   bootstrap_id "defines_static-mode"
-  if [[ $defines_static == "" ]] ; then
-    defines_static=${variables[$key]}
+  if [[ ${defines_static} == "" ]] ; then
+    defines_static=${variables[${key}]}
   else
-    defines_static="$defines_static ${variables[$key]}"
+    defines_static="${defines_static} ${variables[${key}]}"
   fi
 }
 
@@ -2019,10 +2020,10 @@ bootstrap_operation_build_prepare_documentation() {
   local key=
 
   bootstrap_id "build_sources_documentation-mode"
-  if [[ $sources_documentation == "" ]] ; then
-    sources_documentation=${variables[$key]}
+  if [[ ${sources_documentation} == "" ]] ; then
+    sources_documentation=${variables[${key}]}
   else
-    sources_documentation="$sources_documentation ${variables[$key]}"
+    sources_documentation="${sources_documentation} ${variables[${key}]}"
   fi
 }
 
@@ -2030,108 +2031,108 @@ bootstrap_operation_build_prepare_flags() {
   local key=
 
   bootstrap_id "flags-mode"
-  if [[ $flags == "" ]] ; then
-    flags=${variables[$key]}
+  if [[ ${flags} == "" ]] ; then
+    flags=${variables[${key}]}
   else
-    flags="$flags ${variables[$key]}"
+    flags="${flags} ${variables[${key}]}"
   fi
 
   bootstrap_id "flags_library-mode"
-  if [[ $flags_library == "" ]] ; then
-    flags_library=${variables[$key]}
+  if [[ ${flags_library} == "" ]] ; then
+    flags_library=${variables[${key}]}
   else
-    flags_library="$flags_library ${variables[$key]}"
+    flags_library="${flags_library} ${variables[${key}]}"
   fi
 
   bootstrap_id "flags_library_shared-mode"
-  if [[ $flags_library_shared == "" ]] ; then
-    flags_library_shared=${variables[$key]}
+  if [[ ${flags_library_shared} == "" ]] ; then
+    flags_library_shared=${variables[${key}]}
   else
-    flags_library_shared="$flags_library_shared ${variables[$key]}"
+    flags_library_shared="${flags_library_shared} ${variables[${key}]}"
   fi
 
   bootstrap_id "flags_library_static-mode"
-  if [[ $flags_library_static == "" ]] ; then
-    flags_library_static=${variables[$key]}
+  if [[ ${flags_library_static} == "" ]] ; then
+    flags_library_static=${variables[${key}]}
   else
-    flags_library_static="$flags_library_static ${variables[$key]}"
+    flags_library_static="${flags_library_static} ${variables[${key}]}"
   fi
 
   bootstrap_id "flags_object_library-mode"
-  if [[ $flags_object_library == "" ]] ; then
-    flags_object_library=${variables[$key]}
+  if [[ ${flags_object_library} == "" ]] ; then
+    flags_object_library=${variables[${key}]}
   else
-    flags_object_library="$flags_object_library ${variables[$key]}"
+    flags_object_library="${flags_object_library} ${variables[${key}]}"
   fi
 
   bootstrap_id "flags_object_library_shared-mode"
-  if [[ $flags_object_library_shared == "" ]] ; then
-    flags_object_library_shared=${variables[$key]}
+  if [[ ${flags_object_library_shared} == "" ]] ; then
+    flags_object_library_shared=${variables[${key}]}
   else
-    flags_object_library_shared="$flags_object_library_shared ${variables[$key]}"
+    flags_object_library_shared="${flags_object_library_shared} ${variables[${key}]}"
   fi
 
   bootstrap_id "flags_object_library_static-mode"
-  if [[ $flags_object_library_static == "" ]] ; then
-    flags_object_library_static=${variables[$key]}
+  if [[ ${flags_object_library_static} == "" ]] ; then
+    flags_object_library_static=${variables[${key}]}
   else
-    flags_object_library_static="$flags_object_library_static ${variables[$key]}"
+    flags_object_library_static="${flags_object_library_static} ${variables[${key}]}"
   fi
 
   bootstrap_id "flags_object_program-mode"
-  if [[ $flags_object_program == "" ]] ; then
-    flags_object_program=${variables[$key]}
+  if [[ ${flags_object_program} == "" ]] ; then
+    flags_object_program=${variables[${key}]}
   else
-    flags_object_program="$flags_object_program ${variables[$key]}"
+    flags_object_program="${flags_object_program} ${variables[${key}]}"
   fi
 
   bootstrap_id "flags_object_program_shared-mode"
-  if [[ $flags_object_program_shared == "" ]] ; then
-    flags_object_program_shared=${variables[$key]}
+  if [[ ${flags_object_program_shared} == "" ]] ; then
+    flags_object_program_shared=${variables[${key}]}
   else
-    flags_object_program_shared="$flags_object_program_shared ${variables[$key]}"
+    flags_object_program_shared="${flags_object_program_shared} ${variables[${key}]}"
   fi
 
   bootstrap_id "flags_object_program_static-mode"
-  if [[ $flags_object_program_static == "" ]] ; then
-    flags_object_program_static=${variables[$key]}
+  if [[ ${flags_object_program_static} == "" ]] ; then
+    flags_object_program_static=${variables[${key}]}
   else
-    flags_object_program_static="$flags_object_program_static ${variables[$key]}"
+    flags_object_program_static="${flags_object_program_static} ${variables[${key}]}"
   fi
 
   bootstrap_id "flags_program-mode"
-  if [[ $flags_program == "" ]] ; then
-    flags_program=${variables[$key]}
+  if [[ ${flags_program} == "" ]] ; then
+    flags_program=${variables[${key}]}
   else
-    flags_program="$flags_program ${variables[$key]}"
+    flags_program="${flags_program} ${variables[${key}]}"
   fi
 
   bootstrap_id "flags_program_shared-mode"
-  if [[ $flags_program_shared == "" ]] ; then
-    flags_program_shared=${variables[$key]}
+  if [[ ${flags_program_shared} == "" ]] ; then
+    flags_program_shared=${variables[${key}]}
   else
-    flags_program_shared="$flags_program_shared ${variables[$key]}"
+    flags_program_shared="${flags_program_shared} ${variables[${key}]}"
   fi
 
   bootstrap_id "flags_program_static-mode"
-  if [[ $flags_program_static == "" ]] ; then
-    flags_program_static=${variables[$key]}
+  if [[ ${flags_program_static} == "" ]] ; then
+    flags_program_static=${variables[${key}]}
   else
-    flags_program_static="$flags_program_static ${variables[$key]}"
+    flags_program_static="${flags_program_static} ${variables[${key}]}"
   fi
 
   bootstrap_id "flags_shared-mode"
-  if [[ $flags_shared == "" ]] ; then
-    flags_shared=${variables[$key]}
+  if [[ ${flags_shared} == "" ]] ; then
+    flags_shared=${variables[${key}]}
   else
-    flags_shared="$flags_shared ${variables[$key]}"
+    flags_shared="${flags_shared} ${variables[${key}]}"
   fi
 
   bootstrap_id "flags_static-mode"
-  if [[ $flags_static == "" ]] ; then
-    flags_static=${variables[$key]}
+  if [[ ${flags_static} == "" ]] ; then
+    flags_static=${variables[${key}]}
   else
-    flags_static="$flags_static ${variables[$key]}"
+    flags_static="${flags_static} ${variables[${key}]}"
   fi
 }
 
@@ -2139,56 +2140,56 @@ bootstrap_operation_build_prepare_headers() {
   local key=
 
   bootstrap_id "build_sources_headers-mode"
-  if [[ $sources_headers == "" ]] ; then
-    sources_headers=${variables[$key]}
+  if [[ ${sources_headers} == "" ]] ; then
+    sources_headers=${variables[${key}]}
   else
-    sources_headers="$sources_headers ${variables[$key]}"
+    sources_headers="${sources_headers} ${variables[${key}]}"
   fi
 
-  if [[ $build_shared == "yes" ]] ; then
+  if [[ ${build_shared} == "yes" ]] ; then
     bootstrap_id "build_sources_headers_shared"
-    if [[ $sources_headers == "" ]] ; then
-      sources_headers=${variables[$key]}
+    if [[ ${sources_headers} == "" ]] ; then
+      sources_headers=${variables[${key}]}
     else
-      sources_headers="$sources_headers ${variables[$key]}"
+      sources_headers="${sources_headers} ${variables[${key}]}"
     fi
 
     bootstrap_id "build_sources_headers_static"
-    if [[ $sources_headers == "" ]] ; then
-      sources_headers=${variables[$key]}
+    if [[ ${sources_headers} == "" ]] ; then
+      sources_headers=${variables[${key}]}
     else
-      sources_headers="$sources_headers ${variables[$key]}"
+      sources_headers="${sources_headers} ${variables[${key}]}"
     fi
   fi
 
-  if [[ $build_static == "yes" ]] ; then
+  if [[ ${build_static} == "yes" ]] ; then
     bootstrap_id "build_sources_headers_shared-mode"
-    if [[ $sources_headers == "" ]] ; then
-      sources_headers=${variables[$key]}
+    if [[ ${sources_headers} == "" ]] ; then
+      sources_headers=${variables[${key}]}
     else
-      sources_headers="$sources_headers ${variables[$key]}"
+      sources_headers="${sources_headers} ${variables[${key}]}"
     fi
 
     bootstrap_id "build_sources_headers_static-mode"
-    if [[ $sources_headers == "" ]] ; then
-      sources_headers=${variables[$key]}
+    if [[ ${sources_headers} == "" ]] ; then
+      sources_headers=${variables[${key}]}
     else
-      sources_headers="$sources_headers ${variables[$key]}"
+      sources_headers="${sources_headers} ${variables[${key}]}"
     fi
   fi
 
   bootstrap_id "path_headers-mode"
-  if [[ ${variables[$key]} != "" ]] ; then
-    path_headers=${variables[$key]}
+  if [[ ${variables[${key}]} != "" ]] ; then
+    path_headers=${variables[${key}]}
   else
     bootstrap_id "path_headers"
-    if [[ ${variables[$key]} != "" ]] ; then
-      path_headers=${variables[$key]}
+    if [[ ${variables[${key}]} != "" ]] ; then
+      path_headers=${variables[${key}]}
     fi
   fi
 
-  if [[ $path_headers != "" ]] ; then
-    path_headers=$(echo $path_headers | sed -e 's|/*$|/|')
+  if [[ ${path_headers} != "" ]] ; then
+    path_headers=$(echo ${path_headers} | sed -e 's|/*$|/|')
   fi
 }
 
@@ -2196,45 +2197,45 @@ bootstrap_operation_build_prepare_libraries() {
   local key=
 
   bootstrap_id "build_libraries-mode"
-  if [[ $libraries == "" ]] ; then
-    libraries=${variables[$key]}
+  if [[ ${libraries} == "" ]] ; then
+    libraries=${variables[${key}]}
   else
-    libraries="${variables[$key]} $libraries"
+    libraries="${variables[${key}]} ${libraries}"
   fi
 
   bootstrap_id "build_libraries_shared-mode"
-  if [[ $libraries_shared == "" ]] ; then
-    libraries_shared=${variables[$key]}
+  if [[ ${libraries_shared} == "" ]] ; then
+    libraries_shared=${variables[${key}]}
   else
-    libraries_shared="${variables[$key]} $libraries_shared"
+    libraries_shared="${variables[${key}]} ${libraries_shared}"
   fi
 
   bootstrap_id "build_libraries_static-mode"
-  if [[ $libraries_static == "" ]] ; then
-    libraries_static=${variables[$key]}
+  if [[ ${libraries_static} == "" ]] ; then
+    libraries_static=${variables[${key}]}
   else
-    libraries_static="${variables[$key]} $libraries_static"
+    libraries_static="${variables[${key}]} ${libraries_static}"
   fi
 
   bootstrap_id "build_sources_library-mode"
-  if [[ $sources_library == "" ]] ; then
-    sources_library=${variables[$key]}
+  if [[ ${sources_library} == "" ]] ; then
+    sources_library=${variables[${key}]}
   else
-    sources_library="$sources_library ${variables[$key]}"
+    sources_library="${sources_library} ${variables[${key}]}"
   fi
 
   bootstrap_id "build_sources_library_shared-mode"
-  if [[ $sources_library_shared == "" ]] ; then
-    sources_library_shared=${variables[$key]}
+  if [[ ${sources_library_shared} == "" ]] ; then
+    sources_library_shared=${variables[${key}]}
   else
-    sources_library_shared="$build_sources_library_shared ${variables[$key]}"
+    sources_library_shared="${build_sources_library_shared} ${variables[${key}]}"
   fi
 
   bootstrap_id "build_sources_library_static-mode"
-  if [[ $sources_library_static == "" ]] ; then
-    sources_library_static=${variables[$key]}
+  if [[ ${sources_library_static} == "" ]] ; then
+    sources_library_static=${variables[${key}]}
   else
-    sources_library_static="$build_sources_library_static ${variables[$key]}"
+    sources_library_static="${build_sources_library_static} ${variables[${key}]}"
   fi
 }
 
@@ -2242,287 +2243,287 @@ bootstrap_operation_build_prepare_objects() {
   local key=
 
   bootstrap_id "build_objects_library-mode"
-  if [[ $objects_library == "" ]] ; then
-    objects_library=${variables[$key]}
+  if [[ ${objects_library} == "" ]] ; then
+    objects_library=${variables[${key}]}
   else
-    objects_library="${variables[$key]} $objects_library"
+    objects_library="${variables[${key}]} ${objects_library}"
   fi
 
   bootstrap_id "build_objects_library_shared-mode"
-  if [[ $objects_library_shared == "" ]] ; then
-    objects_library_shared=${variables[$key]}
+  if [[ ${objects_library_shared} == "" ]] ; then
+    objects_library_shared=${variables[${key}]}
   else
-    objects_library_shared="${variables[$key]} $objects_library_shared"
+    objects_library_shared="${variables[${key}]} ${objects_library_shared}"
   fi
 
   bootstrap_id "build_objects_library_static-mode"
-  if [[ $objects_library_static == "" ]] ; then
-    objects_library_static=${variables[$key]}
+  if [[ ${objects_library_static} == "" ]] ; then
+    objects_library_static=${variables[${key}]}
   else
-    objects_library_static="${variables[$key]} $objects_library_static"
+    objects_library_static="${variables[${key}]} ${objects_library_static}"
   fi
 
   bootstrap_id "build_objects_program-mode"
-  if [[ $objects_program == "" ]] ; then
-    objects_program=${variables[$key]}
+  if [[ ${objects_program} == "" ]] ; then
+    objects_program=${variables[${key}]}
   else
-    objects_program="${variables[$key]} $objects_program"
+    objects_program="${variables[${key}]} ${objects_program}"
   fi
 
   bootstrap_id "build_objects_program_shared-mode"
-  if [[ $objects_program_shared == "" ]] ; then
-    objects_program_shared=${variables[$key]}
+  if [[ ${objects_program_shared} == "" ]] ; then
+    objects_program_shared=${variables[${key}]}
   else
-    objects_program_shared="${variables[$key]} $objects_program_shared"
+    objects_program_shared="${variables[${key}]} ${objects_program_shared}"
   fi
 
   bootstrap_id "build_objects_program_static-mode"
-  if [[ $objects_program_static == "" ]] ; then
-    objects_program_static=${variables[$key]}
+  if [[ ${objects_program_static} == "" ]] ; then
+    objects_program_static=${variables[${key}]}
   else
-    objects_program_static="${variables[$key]} $objects_program_static"
+    objects_program_static="${variables[${key}]} ${objects_program_static}"
   fi
 
-  if [[ $sources_object == "" ]] ; then
+  if [[ ${sources_object} == "" ]] ; then
     bootstrap_id "build_sources_object-mode"
-    sources_object=${variables[$key]}
+    sources_object=${variables[${key}]}
   fi
 
-  if [[ $sources_object_shared == "" ]] ; then
+  if [[ ${sources_object_shared} == "" ]] ; then
     bootstrap_id "build_sources_object_shared-mode"
-    sources_object_shared=${variables[$key]}
+    sources_object_shared=${variables[${key}]}
   fi
 
-  if [[ $sources_object_static == "" ]] ; then
+  if [[ ${sources_object_static} == "" ]] ; then
     bootstrap_id "build_sources_object_static-mode"
-    sources_object_static=${variables[$key]}
+    sources_object_static=${variables[${key}]}
   fi
 }
 
 bootstrap_operation_build_prepare_paths() {
   local key=
 
-  if [[ $override_path_sources == "" ]] ; then
+  if [[ ${override_path_sources} == "" ]] ; then
     bootstrap_id "path_sources-mode"
-    if [[ ${variables[$key]} != "" ]] ; then
-      path_sources=${variables[$key]}
+    if [[ ${variables[${key}]} != "" ]] ; then
+      path_sources=${variables[${key}]}
     else
       bootstrap_id "path_sources"
-      if [[ ${variables[$key]} != "" ]] ; then
-        path_sources=${variables[$key]}
+      if [[ ${variables[${key}]} != "" ]] ; then
+        path_sources=${variables[${key}]}
       fi
     fi
   fi
 
-  if [[ $path_sources != "" ]] ; then
-    path_sources=$(echo $path_sources | sed -e 's|//*|/|g' -e 's|/*$|/|')
+  if [[ ${path_sources} != "" ]] ; then
+    path_sources=$(echo ${path_sources} | sed -e 's|//*|/|g' -e 's|/*$|/|')
   fi
 
   bootstrap_id "path_sources_object-mode"
-  if [[ ${variables[$key]} != "" ]] ; then
-    path_sources_object=${variables[$key]}
+  if [[ ${variables[${key}]} != "" ]] ; then
+    path_sources_object=${variables[${key}]}
   else
     bootstrap_id "path_sources_object"
-    if [[ ${variables[$key]} != "" ]] ; then
-      path_sources_object=${variables[$key]}
+    if [[ ${variables[${key}]} != "" ]] ; then
+      path_sources_object=${variables[${key}]}
     fi
   fi
 
-  if [[ $path_sources_object != "" ]] ; then
-    path_sources_object=$(echo $path_sources_object | sed -e 's|//*|/|g' -e 's|/*$|/|')
+  if [[ ${path_sources_object} != "" ]] ; then
+    path_sources_object=$(echo ${path_sources_object} | sed -e 's|//*|/|g' -e 's|/*$|/|')
   fi
 
   bootstrap_id "path_headers-mode"
-  if [[ ${variables[$key]} != "" ]] ; then
-    path_headers=${variables[$key]}
+  if [[ ${variables[${key}]} != "" ]] ; then
+    path_headers=${variables[${key}]}
   fi
 
-  if [[ $path_headers != "" ]] ; then
-    path_headers=$(echo $path_headers | sed -e 's|//*|/|g' -e 's|/*$|/|')
+  if [[ ${path_headers} != "" ]] ; then
+    path_headers=$(echo ${path_headers} | sed -e 's|//*|/|g' -e 's|/*$|/|')
   fi
 
   bootstrap_id "has_path_standard-mode"
-  if [[ ${variables[$key]} != "" ]] ; then
-    has_path_standard=${variables[$key]}
+  if [[ ${variables[${key}]} != "" ]] ; then
+    has_path_standard=${variables[${key}]}
   fi
 
-  if [[ $has_path_standard == "no" ]] ; then
+  if [[ ${has_path_standard} == "no" ]] ; then
     path_language=
   else
     bootstrap_id "path_language-mode"
-    if [[ ${variables[$key]} != "" ]] ; then
-      path_language=${variables[$key]}
+    if [[ ${variables[${key}]} != "" ]] ; then
+      path_language=${variables[${key}]}
     else
       bootstrap_id "path_language"
-      if [[ ${variables[$key]} != "" ]] ; then
-        path_language=${variables[$key]}
+      if [[ ${variables[${key}]} != "" ]] ; then
+        path_language=${variables[${key}]}
       fi
     fi
 
-    if [[ $path_language != "" ]] ; then
-      path_language=$(echo $path_language | sed -e 's|//*|/|g' -e 's|/*$|/|')
+    if [[ ${path_language} != "" ]] ; then
+      path_language=$(echo ${path_language} | sed -e 's|//*|/|g' -e 's|/*$|/|')
     fi
   fi
 
   bootstrap_id "path_object_library-mode"
-  if [[ ${variables[$key]} != "" ]] ; then
-    path_object_library=${variables[$key]}
+  if [[ ${variables[${key}]} != "" ]] ; then
+    path_object_library=${variables[${key}]}
   fi
 
-  if [[ $path_object_library != "" ]] ; then
-    path_object_library=$(echo $path_object_library | sed -e 's|//*|/|g' -e 's|/*$|/|')
+  if [[ ${path_object_library} != "" ]] ; then
+    path_object_library=$(echo ${path_object_library} | sed -e 's|//*|/|g' -e 's|/*$|/|')
   fi
 
   bootstrap_id "path_object_program-mode"
-  if [[ ${variables[$key]} != "" ]] ; then
-    path_object_program=${variables[$key]}
+  if [[ ${variables[${key}]} != "" ]] ; then
+    path_object_program=${variables[${key}]}
   fi
 
-  if [[ $path_object_program != "" ]] ; then
-    path_object_program=$(echo $path_object_program | sed -e 's|//*|/|g' -e 's|/*$|/|')
+  if [[ ${path_object_program} != "" ]] ; then
+    path_object_program=$(echo ${path_object_program} | sed -e 's|//*|/|g' -e 's|/*$|/|')
   fi
 
   bootstrap_id "path_library_script-mode"
-  if [[ ${variables[$key]} != "" ]] ; then
-    path_library_script=${variables[$key]}
+  if [[ ${variables[${key}]} != "" ]] ; then
+    path_library_script=${variables[${key}]}
   fi
 
-  if [[ $path_library_script != "" ]] ; then
-    path_library_script=$(echo $path_library_script | sed -e 's|//*|/|g' -e 's|/*$|/|')
+  if [[ ${path_library_script} != "" ]] ; then
+    path_library_script=$(echo ${path_library_script} | sed -e 's|//*|/|g' -e 's|/*$|/|')
   fi
 
   bootstrap_id "path_library_shared-mode"
-  if [[ ${variables[$key]} != "" ]] ; then
-    path_library_shared=${variables[$key]}
+  if [[ ${variables[${key}]} != "" ]] ; then
+    path_library_shared=${variables[${key}]}
   fi
 
-  if [[ $path_library_shared != "" ]] ; then
-    path_library_shared=$(echo $path_library_shared | sed -e 's|//*|/|g' -e 's|/*$|/|')
+  if [[ ${path_library_shared} != "" ]] ; then
+    path_library_shared=$(echo ${path_library_shared} | sed -e 's|//*|/|g' -e 's|/*$|/|')
   fi
 
   bootstrap_id "path_library_static-mode"
-  if [[ ${variables[$key]} != "" ]] ; then
-    path_library_static=${variables[$key]}
+  if [[ ${variables[${key}]} != "" ]] ; then
+    path_library_static=${variables[${key}]}
   fi
 
-  if [[ $path_library_static != "" ]] ; then
-    path_library_static=$(echo $path_library_static | sed -e 's|//*|/|g' -e 's|/*$|/|')
+  if [[ ${path_library_static} != "" ]] ; then
+    path_library_static=$(echo ${path_library_static} | sed -e 's|//*|/|g' -e 's|/*$|/|')
   fi
 
   bootstrap_id "path_object_library_script-mode"
-  if [[ ${variables[$key]} != "" ]] ; then
-    path_object_library_script=${variables[$key]}
+  if [[ ${variables[${key}]} != "" ]] ; then
+    path_object_library_script=${variables[${key}]}
   fi
 
-  if [[ $path_object_library_script != "" ]] ; then
-    path_object_library_script=$(echo $path_object_library_script | sed -e 's|//*|/|g' -e 's|/*$|/|')
+  if [[ ${path_object_library_script} != "" ]] ; then
+    path_object_library_script=$(echo ${path_object_library_script} | sed -e 's|//*|/|g' -e 's|/*$|/|')
   fi
 
   bootstrap_id "path_object_library_shared-mode"
-  if [[ ${variables[$key]} != "" ]] ; then
-    path_object_library_shared=${variables[$key]}
+  if [[ ${variables[${key}]} != "" ]] ; then
+    path_object_library_shared=${variables[${key}]}
   fi
 
-  if [[ $path_object_library_shared != "" ]] ; then
-    path_object_library_shared=$(echo $path_object_library_shared | sed -e 's|//*|/|g' -e 's|/*$|/|')
+  if [[ ${path_object_library_shared} != "" ]] ; then
+    path_object_library_shared=$(echo ${path_object_library_shared} | sed -e 's|//*|/|g' -e 's|/*$|/|')
   fi
 
   bootstrap_id "path_object_library_static-mode"
-  if [[ ${variables[$key]} != "" ]] ; then
-    path_object_library_static=${variables[$key]}
+  if [[ ${variables[${key}]} != "" ]] ; then
+    path_object_library_static=${variables[${key}]}
   fi
 
-  if [[ $path_object_library_static != "" ]] ; then
-    path_object_library_static=$(echo $path_object_library_static | sed -e 's|//*|/|g' -e 's|/*$|/|')
+  if [[ ${path_object_library_static} != "" ]] ; then
+    path_object_library_static=$(echo ${path_object_library_static} | sed -e 's|//*|/|g' -e 's|/*$|/|')
   fi
 
   bootstrap_id "path_object_program_script-mode"
-  if [[ ${variables[$key]} != "" ]] ; then
-    path_object_program_script=${variables[$key]}
+  if [[ ${variables[${key}]} != "" ]] ; then
+    path_object_program_script=${variables[${key}]}
   fi
 
-  if [[ $path_object_program_script != "" ]] ; then
-    path_object_program_script=$(echo $path_object_program_script | sed -e 's|//*|/|g' -e 's|/*$|/|')
+  if [[ ${path_object_program_script} != "" ]] ; then
+    path_object_program_script=$(echo ${path_object_program_script} | sed -e 's|//*|/|g' -e 's|/*$|/|')
   fi
 
   bootstrap_id "path_object_program_shared-mode"
-  if [[ ${variables[$key]} != "" ]] ; then
-    path_object_program_shared=${variables[$key]}
+  if [[ ${variables[${key}]} != "" ]] ; then
+    path_object_program_shared=${variables[${key}]}
   fi
 
-  if [[ $path_object_program_shared != "" ]] ; then
-    path_object_program_shared=$(echo $path_object_program_shared | sed -e 's|//*|/|g' -e 's|/*$|/|')
+  if [[ ${path_object_program_shared} != "" ]] ; then
+    path_object_program_shared=$(echo ${path_object_program_shared} | sed -e 's|//*|/|g' -e 's|/*$|/|')
   fi
 
   bootstrap_id "path_object_program_static-mode"
-  if [[ ${variables[$key]} != "" ]] ; then
-    path_object_program_static=${variables[$key]}
+  if [[ ${variables[${key}]} != "" ]] ; then
+    path_object_program_static=${variables[${key}]}
   fi
 
-  if [[ $path_object_program_static != "" ]] ; then
-    path_object_program_static=$(echo $path_object_program_static | sed -e 's|//*|/|g' -e 's|/*$|/|')
+  if [[ ${path_object_program_static} != "" ]] ; then
+    path_object_program_static=$(echo ${path_object_program_static} | sed -e 's|//*|/|g' -e 's|/*$|/|')
   fi
 
   bootstrap_id "path_object_script-mode"
-  if [[ ${variables[$key]} != "" ]] ; then
-    path_object_script=${variables[$key]}
+  if [[ ${variables[${key}]} != "" ]] ; then
+    path_object_script=${variables[${key}]}
   fi
 
-  if [[ $path_object_script != "" ]] ; then
-    path_object_script=$(echo $path_object_script | sed -e 's|//*|/|g' -e 's|/*$|/|')
+  if [[ ${path_object_script} != "" ]] ; then
+    path_object_script=$(echo ${path_object_script} | sed -e 's|//*|/|g' -e 's|/*$|/|')
   fi
 
   bootstrap_id "path_object_shared-mode"
-  if [[ ${variables[$key]} != "" ]] ; then
-    path_object_shared=${variables[$key]}
+  if [[ ${variables[${key}]} != "" ]] ; then
+    path_object_shared=${variables[${key}]}
   fi
 
-  if [[ $path_object_shared != "" ]] ; then
-    path_object_shared=$(echo $path_object_shared | sed -e 's|//*|/|g' -e 's|/*$|/|')
+  if [[ ${path_object_shared} != "" ]] ; then
+    path_object_shared=$(echo ${path_object_shared} | sed -e 's|//*|/|g' -e 's|/*$|/|')
   fi
 
   bootstrap_id "path_object_static-mode"
-  if [[ ${variables[$key]} != "" ]] ; then
-    path_object_static=${variables[$key]}
+  if [[ ${variables[${key}]} != "" ]] ; then
+    path_object_static=${variables[${key}]}
   fi
 
-  if [[ $path_object_static != "" ]] ; then
-    path_object_static=$(echo $path_object_static | sed -e 's|//*|/|g' -e 's|/*$|/|')
+  if [[ ${path_object_static} != "" ]] ; then
+    path_object_static=$(echo ${path_object_static} | sed -e 's|//*|/|g' -e 's|/*$|/|')
   fi
 
-  if [[ $path_object_static != "" ]] ; then
-    path_object_static=$(echo $path_object_static | sed -e 's|//*|/|g' -e 's|/*$|/|')
+  if [[ ${path_object_static} != "" ]] ; then
+    path_object_static=$(echo ${path_object_static} | sed -e 's|//*|/|g' -e 's|/*$|/|')
   fi
 
   bootstrap_id "path_program_script-mode"
-  if [[ ${variables[$key]} != "" ]] ; then
-    path_program_script=${variables[$key]}
+  if [[ ${variables[${key}]} != "" ]] ; then
+    path_program_script=${variables[${key}]}
   fi
 
-  if [[ $path_program_script != "" ]] ; then
-    path_program_script=$(echo $path_program_script | sed -e 's|//*|/|g' -e 's|/*$|/|')
+  if [[ ${path_program_script} != "" ]] ; then
+    path_program_script=$(echo ${path_program_script} | sed -e 's|//*|/|g' -e 's|/*$|/|')
   fi
 
   bootstrap_id "path_program_shared-mode"
-  if [[ ${variables[$key]} != "" ]] ; then
-    path_program_shared=${variables[$key]}
+  if [[ ${variables[${key}]} != "" ]] ; then
+    path_program_shared=${variables[${key}]}
   fi
 
-  if [[ $path_program_shared != "" ]] ; then
-    path_program_shared=$(echo $path_program_shared | sed -e 's|//*|/|g' -e 's|/*$|/|')
+  if [[ ${path_program_shared} != "" ]] ; then
+    path_program_shared=$(echo ${path_program_shared} | sed -e 's|//*|/|g' -e 's|/*$|/|')
   fi
 
   bootstrap_id "path_program_static-mode"
-  if [[ ${variables[$key]} != "" ]] ; then
-    path_program_static=${variables[$key]}
+  if [[ ${variables[${key}]} != "" ]] ; then
+    path_program_static=${variables[${key}]}
   fi
 
-  if [[ $path_program_static != "" ]] ; then
-    path_program_static=$(echo $path_program_static | sed -e 's|//*|/|g' -e 's|/*$|/|')
+  if [[ ${path_program_static} != "" ]] ; then
+    path_program_static=$(echo ${path_program_static} | sed -e 's|//*|/|g' -e 's|/*$|/|')
   fi
 
-  if [[ $path_program_static != "" ]] ; then
-    path_program_static=$(echo $path_program_static | sed -e 's|//*|/|g' -e 's|/*$|/|')
+  if [[ ${path_program_static} != "" ]] ; then
+    path_program_static=$(echo ${path_program_static} | sed -e 's|//*|/|g' -e 's|/*$|/|')
   fi
 }
 
@@ -2530,24 +2531,24 @@ bootstrap_operation_build_prepare_programs() {
   local key=
 
   bootstrap_id "build_sources_program-mode"
-  if [[ $sources_program == "" ]] ; then
-    sources_program=${variables[$key]}
+  if [[ ${sources_program} == "" ]] ; then
+    sources_program=${variables[${key}]}
   else
-    sources_program="$sources_program ${variables[$key]}"
+    sources_program="${sources_program} ${variables[${key}]}"
   fi
 
   bootstrap_id "build_sources_program_shared-mode"
-  if [[ $sources_program_shared == "" ]] ; then
-    sources_program_shared=${variables[$key]}
+  if [[ ${sources_program_shared} == "" ]] ; then
+    sources_program_shared=${variables[${key}]}
   else
-    sources_program_shared="$sources_program_shared ${variables[$key]}"
+    sources_program_shared="${sources_program_shared} ${variables[${key}]}"
   fi
 
   bootstrap_id "build_sources_program_static-mode"
-  if [[ $sources_program_static == "" ]] ; then
-    sources_program_static=${variables[$key]}
+  if [[ ${sources_program_static} == "" ]] ; then
+    sources_program_static=${variables[${key}]}
   else
-    sources_program_static="$sources_program_static ${variables[$key]}"
+    sources_program_static="${sources_program_static} ${variables[${key}]}"
   fi
 }
 
@@ -2555,165 +2556,165 @@ bootstrap_operation_build_prepare_remaining() {
   local key=
 
   bootstrap_id "has-build_compiler-mode"
-  if [[ ${variables[$key]} == "yes" ]] ; then
+  if [[ ${variables[${key}]} == "yes" ]] ; then
     bootstrap_id "build_compiler-mode"
-    build_compiler=${variables[$key]}
+    build_compiler=${variables[${key}]}
   fi
 
   bootstrap_id "has-build_indexer-mode"
-  if [[ ${variables[$key]} == "yes" ]] ; then
+  if [[ ${variables[${key}]} == "yes" ]] ; then
     bootstrap_id "build_indexer-mode"
-    build_indexer=${variables[$key]}
+    build_indexer=${variables[${key}]}
   fi
 
   bootstrap_id "has-build_indexer_arguments-mode"
-  if [[ ${variables[$key]} == "yes" ]] ; then
+  if [[ ${variables[${key}]} == "yes" ]] ; then
     bootstrap_id "build_indexer_arguments-mode"
-    build_indexer_arguments=${variables[$key]}
+    build_indexer_arguments=${variables[${key}]}
   fi
 
   bootstrap_id "has-build_name-mode"
-  if [[ ${variables[$key]} == "yes" ]] ; then
+  if [[ ${variables[${key}]} == "yes" ]] ; then
     bootstrap_id "build_name-mode"
-    build_name=${variables[$key]}
+    build_name=${variables[${key}]}
   fi
 
   bootstrap_id "has-version_major-mode"
-  if [[ ${variables[$key]} == "yes" ]] ; then
+  if [[ ${variables[${key}]} == "yes" ]] ; then
     bootstrap_id "version_major-mode"
-    version_major=${variables[$key]}
+    version_major=${variables[${key}]}
   fi
 
   bootstrap_id "has-version_major_prefix-mode"
-  if [[ ${variables[$key]} == "yes" ]] ; then
+  if [[ ${variables[${key}]} == "yes" ]] ; then
     bootstrap_id "version_major_prefix-mode"
-    version_major_prefix=${variables[$key]}
+    version_major_prefix=${variables[${key}]}
   fi
 
   bootstrap_id "has-version_minor-mode"
-  if [[ ${variables[$key]} == "yes" ]] ; then
+  if [[ ${variables[${key}]} == "yes" ]] ; then
     bootstrap_id "version_minor-mode"
-    version_minor=${variables[$key]}
+    version_minor=${variables[${key}]}
   fi
 
   bootstrap_id "has-version_minor_prefix-mode"
-  if [[ ${variables[$key]} == "yes" ]] ; then
+  if [[ ${variables[${key}]} == "yes" ]] ; then
     bootstrap_id "version_minor_prefix-mode"
-    version_minor_prefix=${variables[$key]}
+    version_minor_prefix=${variables[${key}]}
   fi
 
   bootstrap_id "has-version_micro-mode"
-  if [[ ${variables[$key]} == "yes" ]] ; then
+  if [[ ${variables[${key}]} == "yes" ]] ; then
     bootstrap_id "version_micro-mode"
-    version_micro=${variables[$key]}
+    version_micro=${variables[${key}]}
   fi
 
   bootstrap_id "has-version_micro_prefix-mode"
-  if [[ ${variables[$key]} == "yes" ]] ; then
+  if [[ ${variables[${key}]} == "yes" ]] ; then
     bootstrap_id "version_micro_prefix-mode"
-    version_micro_prefix=${variables[$key]}
+    version_micro_prefix=${variables[${key}]}
   fi
 
   bootstrap_id "has-version_nano-mode"
-  if [[ ${variables[$key]} == "yes" ]] ; then
+  if [[ ${variables[${key}]} == "yes" ]] ; then
     bootstrap_id "version_nano-mode"
-    version_nano=${variables[$key]}
+    version_nano=${variables[${key}]}
   fi
 
   bootstrap_id "has-version_nano_prefix-mode"
-  if [[ ${variables[$key]} == "yes" ]] ; then
+  if [[ ${variables[${key}]} == "yes" ]] ; then
     bootstrap_id "version_nano_prefix-mode"
-    version_nano_prefix=${variables[$key]}
+    version_nano_prefix=${variables[${key}]}
   fi
 
   bootstrap_id "has-path_headers-mode"
-  if [[ ${variables[$key]} == "yes" ]] ; then
+  if [[ ${variables[${key}]} == "yes" ]] ; then
     bootstrap_id "path_headers-mode"
-    path_headers=${variables[$key]}
+    path_headers=${variables[${key}]}
   fi
 
   bootstrap_id "has-preserve_path_headers-mode"
-  if [[ ${variables[$key]} == "yes" ]] ; then
+  if [[ ${variables[${key}]} == "yes" ]] ; then
     bootstrap_id "preserve_path_headers-mode"
-    preserve_path_headers=${variables[$key]}
+    preserve_path_headers=${variables[${key}]}
   fi
 
   bootstrap_id "has-path_library_script-mode"
-  if [[ ${variables[$key]} == "yes" ]] ; then
+  if [[ ${variables[${key}]} == "yes" ]] ; then
     bootstrap_id "path_library_script-mode"
-    path_library_script=${variables[$key]}
+    path_library_script=${variables[${key}]}
   fi
 
   bootstrap_id "has-path_library_shared-mode"
-  if [[ ${variables[$key]} == "yes" ]] ; then
+  if [[ ${variables[${key}]} == "yes" ]] ; then
     bootstrap_id "path_library_shared-mode"
-    path_library_shared=${variables[$key]}
+    path_library_shared=${variables[${key}]}
   fi
 
   bootstrap_id "has-path_library_static-mode"
-  if [[ ${variables[$key]} == "yes" ]] ; then
+  if [[ ${variables[${key}]} == "yes" ]] ; then
     bootstrap_id "path_library_static-mode"
-    path_library_static=${variables[$key]}
+    path_library_static=${variables[${key}]}
   fi
 
   bootstrap_id "has-path_object_script-mode"
-  if [[ ${variables[$key]} == "yes" ]] ; then
+  if [[ ${variables[${key}]} == "yes" ]] ; then
     bootstrap_id "path_object_script-mode"
-    path_object_script=${variables[$key]}
+    path_object_script=${variables[${key}]}
   fi
 
   bootstrap_id "has-path_object_shared-mode"
-  if [[ ${variables[$key]} == "yes" ]] ; then
+  if [[ ${variables[${key}]} == "yes" ]] ; then
     bootstrap_id "path_object_shared-mode"
-    path_object_shared=${variables[$key]}
+    path_object_shared=${variables[${key}]}
   fi
 
   bootstrap_id "has-path_object_static-mode"
-  if [[ ${variables[$key]} == "yes" ]] ; then
+  if [[ ${variables[${key}]} == "yes" ]] ; then
     bootstrap_id "path_object_static-mode"
-    path_object_static=${variables[$key]}
+    path_object_static=${variables[${key}]}
   fi
 
   bootstrap_id "has-path_program_script-mode"
-  if [[ ${variables[$key]} == "yes" ]] ; then
+  if [[ ${variables[${key}]} == "yes" ]] ; then
     bootstrap_id "path_program_script-mode"
-    path_program_script=${variables[$key]}
+    path_program_script=${variables[${key}]}
   fi
 
   bootstrap_id "has-path_program_shared-mode"
-  if [[ ${variables[$key]} == "yes" ]] ; then
+  if [[ ${variables[${key}]} == "yes" ]] ; then
     bootstrap_id "path_program_shared-mode"
-    path_program_shared=${variables[$key]}
+    path_program_shared=${variables[${key}]}
   fi
 
   bootstrap_id "has-path_program_static-mode"
-  if [[ ${variables[$key]} == "yes" ]] ; then
+  if [[ ${variables[${key}]} == "yes" ]] ; then
     bootstrap_id "path_program_static-mode"
-    path_program_static=${variables[$key]}
+    path_program_static=${variables[${key}]}
   fi
 
   bootstrap_id "has-has_path_standard-mode"
-  if [[ ${variables[$key]} == "yes" ]] ; then
+  if [[ ${variables[${key}]} == "yes" ]] ; then
     bootstrap_id "has_path_standard-mode"
-    has_path_standard=${variables[$key]}
+    has_path_standard=${variables[${key}]}
   fi
 
   bootstrap_id "has-search_exclusive-mode"
-  if [[ ${variables[$key]} == "yes" ]] ; then
+  if [[ ${variables[${key}]} == "yes" ]] ; then
     bootstrap_id "search_exclusive-mode"
-    search_exclusive=${variables[$key]}
+    search_exclusive=${variables[${key}]}
   fi
 
   bootstrap_id "has-search_shared-mode"
-  if [[ ${variables[$key]} == "yes" ]] ; then
+  if [[ ${variables[${key}]} == "yes" ]] ; then
     bootstrap_id "search_shared-mode"
-    search_shared=${variables[$key]}
+    search_shared=${variables[${key}]}
   fi
 
   bootstrap_id "has-search_static-mode"
-  if [[ ${variables[$key]} == "yes" ]] ; then
+  if [[ ${variables[${key}]} == "yes" ]] ; then
     bootstrap_id "search_static-mode"
-    search_static=${variables[$key]}
+    search_static=${variables[${key}]}
   fi
 }
 
@@ -2721,10 +2722,10 @@ bootstrap_operation_build_prepare_settings() {
   local key=
 
   bootstrap_id "build_sources_setting-mode"
-  if [[ $sources_setting == "" ]] ; then
-    sources_setting=${variables[$key]}
+  if [[ ${sources_setting} == "" ]] ; then
+    sources_setting=${variables[${key}]}
   else
-    sources_setting="$sources_setting ${variables[$key]}"
+    sources_setting="${sources_setting} ${variables[${key}]}"
   fi
 }
 
@@ -2732,44 +2733,44 @@ bootstrap_operation_build_prepare_shared_static() {
   local key=
 
   bootstrap_id "build_shared-mode"
-  if [[ ${variables[$key]} != "" ]] ; then
-    build_shared=${variables[$key]}
+  if [[ ${variables[${key}]} != "" ]] ; then
+    build_shared=${variables[${key}]}
   fi
 
   bootstrap_id "build_static-mode"
-  if [[ ${variables[$key]} != "" ]] ; then
-    build_static=${variables[$key]}
+  if [[ ${variables[${key}]} != "" ]] ; then
+    build_static=${variables[${key}]}
   fi
 
-  if [[ $enable_shared == "yes" ]] ; then
+  if [[ ${enable_shared} == "yes" ]] ; then
     build_shared="yes"
     search_shared="yes"
-  elif [[ $enable_shared == "no" ]] ; then
+  elif [[ ${enable_shared} == "no" ]] ; then
     build_shared="no"
     search_shared="no"
   fi
 
-  if [[ $enable_static == "yes" ]] ; then
+  if [[ ${enable_static} == "yes" ]] ; then
     build_static="yes"
     search_static="yes"
-  elif [[ $enable_static == "no" ]] ; then
+  elif [[ ${enable_static} == "no" ]] ; then
     build_static="no"
     search_static="no"
   fi
 
-  if [[ $search_shared == "no" ]] ; then
+  if [[ ${search_shared} == "no" ]] ; then
     arguments_shared=
   fi
 
-  if [[ $search_static == "no" ]] ; then
+  if [[ ${search_static} == "no" ]] ; then
     arguments_static=
   fi
 }
 
 bootstrap_operation_build_validate_build() {
 
-  if [[ $build_compiler == "" ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${build_compiler} == "" ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       bootstrap_print_first
 
       echo -e "${c_error}ERROR: Cannot Build, no '${c_notice}build_compiler${c_error}' specified, such as '${c_notice}gcc${c_error}'.${c_reset}"
@@ -2778,8 +2779,8 @@ bootstrap_operation_build_validate_build() {
     let failure=1
   fi
 
-  if [[ $build_indexer == "" ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${build_indexer} == "" ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       bootstrap_print_first
 
       echo -e "${c_error}ERROR: Cannot Build, no '${c_notice}build_indexer${c_error}' specified, such as '${c_notice}ar${c_error}'.${c_reset}"
@@ -2788,7 +2789,7 @@ bootstrap_operation_build_validate_build() {
     let failure=1
   fi
 
-  if [[ $failure == "" ]] ; then
+  if [[ ${failure} == "" ]] ; then
     return 0
   fi
 
@@ -2797,8 +2798,8 @@ bootstrap_operation_build_validate_build() {
 
 bootstrap_operation_build_validate_paths() {
 
-  if [[ $path_sources == "" || ! -d $path_sources ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${path_sources} == "" || ! -d ${path_sources} ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       bootstrap_print_first
 
       echo -e "${c_error}ERROR: The sources directory ${c_notice}${path_sources}${c_error} is not a valid directory.${c_reset}"
@@ -2807,8 +2808,8 @@ bootstrap_operation_build_validate_paths() {
     let failure=1
   fi
 
-  if [[ $failure == "" && $path_sources_object != "" && ! -d $path_sources_object ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${failure} == "" && ${path_sources_object} != "" && ! -d ${path_sources_object} ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       bootstrap_print_first
 
       echo -e "${c_error}ERROR: The sources object directory ${c_notice}${path_sources_object}${c_error} is not a valid directory.${c_reset}"
@@ -2817,7 +2818,7 @@ bootstrap_operation_build_validate_paths() {
     let failure=1
   fi
 
-  if [[ $failure == "" ]] ; then
+  if [[ ${failure} == "" ]] ; then
     return 0
   fi
 
@@ -2827,15 +2828,15 @@ bootstrap_operation_build_validate_paths() {
 bootstrap_operation_build_validate_search() {
 
   # When not in search exclusive mode, allow static libraries to be linked into shared libraries if the shared library is not found first.
-  if [[ $search_exclusive == "no" ]] ; then
-    arguments_shared="$arguments_shared $arguments_static"
+  if [[ ${search_exclusive} == "no" ]] ; then
+    arguments_shared="${arguments_shared} ${arguments_static}"
   fi
 }
 
 bootstrap_operation_build_validate_shared_static() {
 
-  if [[ $build_shared != "yes" && $build_static != "yes" ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${build_shared} != "yes" && ${build_static} != "yes" ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       bootstrap_print_first
 
       echo -e "${c_error}ERROR: Cannot Build, either build_shared or build_static must be set to 'yes'.${c_reset}"
@@ -2844,8 +2845,8 @@ bootstrap_operation_build_validate_shared_static() {
     let failure=1
   fi
 
-  if [[ $search_shared != "yes" && $search_static != "yes" ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${search_shared} != "yes" && ${search_static} != "yes" ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       bootstrap_print_first
 
       echo -e "${c_error}ERROR: Cannot Build, either search_shared or search_static must be set to 'yes'.${c_reset}"
@@ -2854,7 +2855,7 @@ bootstrap_operation_build_validate_shared_static() {
     let failure=1
   fi
 
-  if [[ $failure == "" ]] ; then
+  if [[ ${failure} == "" ]] ; then
     return 0
   fi
 
@@ -2863,9 +2864,9 @@ bootstrap_operation_build_validate_shared_static() {
 
 bootstrap_operation_build_validate_sources() {
 
-  for i in $sources_script ; do
-    if [[ $i != "$(echo $i | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
-      if [[ $verbosity != "quiet" ]] ; then
+  for i in ${sources_script} ; do
+    if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
+      if [[ ${verbosity} != "quiet" ]] ; then
         bootstrap_print_first
 
         echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_script path provided: '${i}'.${c_reset}"
@@ -2875,9 +2876,9 @@ bootstrap_operation_build_validate_sources() {
     fi
   done
 
-  for i in $sources_headers ; do
-    if [[ $i != "$(echo $i | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
-      if [[ $verbosity != "quiet" ]] ; then
+  for i in ${sources_headers} ; do
+    if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
+      if [[ ${verbosity} != "quiet" ]] ; then
         bootstrap_print_first
 
         echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_headers path provided: '${i}'.${c_reset}"
@@ -2887,9 +2888,9 @@ bootstrap_operation_build_validate_sources() {
     fi
   done
 
-  for i in $sources_library ; do
-    if [[ $i != "$(echo $i | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
-      if [[ $verbosity != "quiet" ]] ; then
+  for i in ${sources_library} ; do
+    if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
+      if [[ ${verbosity} != "quiet" ]] ; then
         bootstrap_print_first
 
         echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_library path provided: '${i}'.${c_reset}"
@@ -2899,9 +2900,9 @@ bootstrap_operation_build_validate_sources() {
     fi
   done
 
-  for i in $sources_library_object ; do
-    if [[ $i != "$(echo $i | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
-      if [[ $verbosity != "quiet" ]] ; then
+  for i in ${sources_library_object} ; do
+    if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
+      if [[ ${verbosity} != "quiet" ]] ; then
         bootstrap_print_first
 
         echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_library_object path provided: '${i}'.${c_reset}"
@@ -2911,9 +2912,9 @@ bootstrap_operation_build_validate_sources() {
     fi
   done
 
-  for i in $sources_program_object ; do
-    if [[ $i != "$(echo $i | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
-      if [[ $verbosity != "quiet" ]] ; then
+  for i in ${sources_program_object} ; do
+    if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
+      if [[ ${verbosity} != "quiet" ]] ; then
         bootstrap_print_first
 
         echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_program_object path provided: '${i}'.${c_reset}"
@@ -2923,9 +2924,9 @@ bootstrap_operation_build_validate_sources() {
     fi
   done
 
-  for i in $sources_program ; do
-    if [[ $i != "$(echo $i | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
-      if [[ $verbosity != "quiet" ]] ; then
+  for i in ${sources_program} ; do
+    if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
+      if [[ ${verbosity} != "quiet" ]] ; then
         bootstrap_print_first
 
         echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_program path provided: '${i}'.${c_reset}"
@@ -2935,9 +2936,9 @@ bootstrap_operation_build_validate_sources() {
     fi
   done
 
-  for i in $sources_documentation ; do
-    if [[ $i != "$(echo $i | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
-      if [[ $verbosity != "quiet" ]] ; then
+  for i in ${sources_documentation} ; do
+    if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
+      if [[ ${verbosity} != "quiet" ]] ; then
         bootstrap_print_first
 
         echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_documentation path provided: '${i}'.${c_reset}"
@@ -2947,9 +2948,9 @@ bootstrap_operation_build_validate_sources() {
     fi
   done
 
-  for i in $sources_setting ; do
-    if [[ $i != "$(echo $i | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
-      if [[ $verbosity != "quiet" ]] ; then
+  for i in ${sources_setting} ; do
+    if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
+      if [[ ${verbosity} != "quiet" ]] ; then
         bootstrap_print_first
 
         echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_setting path provided: '${i}'.${c_reset}"
@@ -2959,7 +2960,7 @@ bootstrap_operation_build_validate_sources() {
     fi
   done
 
-  if [[ $failure == "" ]] ; then
+  if [[ ${failure} == "" ]] ; then
     return 0
   fi
 
@@ -2970,57 +2971,57 @@ bootstrap_operation_build_prepare_versions() {
   local key=
 
   bootstrap_id "version_file-mode"
-  if [[ ${variables[$key]} != "" ]] ; then
-    version_file_value=${variables[$key]}
+  if [[ ${variables[${key}]} != "" ]] ; then
+    version_file_value=${variables[${key}]}
   fi
 
   bootstrap_id "version_target-mode"
-  if [[ ${variables[$key]} != "" ]] ; then
-    version_target_value=${variables[$key]}
+  if [[ ${variables[${key}]} != "" ]] ; then
+    version_target_value=${variables[${key}]}
   fi
 
-  if [[ $version_file_value == "" ]] ; then
+  if [[ ${version_file_value} == "" ]] ; then
     version_file_value="micro"
   fi
 
-  if [[ $version_target_value == "" ]] ; then
+  if [[ ${version_target_value} == "" ]] ; then
     version_target_value="major"
   fi
 
-  if [[ $version_major == "" ]] ; then
+  if [[ ${version_major} == "" ]] ; then
     version_major_prefix=
   fi
 
-  if [[ $version_minor == "" ]] ; then
+  if [[ ${version_minor} == "" ]] ; then
     version_minor_prefix=
   fi
 
-  if [[ $version_micro == "" ]] ; then
+  if [[ ${version_micro} == "" ]] ; then
     version_micro_prefix=
   fi
 
-  if [[ $version_nano == "" ]] ; then
+  if [[ ${version_nano} == "" ]] ; then
     version_nano_prefix=
   fi
 
-  if [[ $version_file_value == "major" ]] ; then
-    version_file="$version_major_prefix$version_major"
-  elif [[ $version_file_value == "minor" ]] ; then
-    version_file="$version_major_prefix$version_major$version_minor_prefix$version_minor"
-  elif [[ $version_file_value == "micro" ]] ; then
-    version_file="$version_major_prefix$version_major$version_minor_prefix$version_minor$version_micro_prefix$version_micro"
-  elif [[ $version_file_value == "nano" ]] ; then
-    version_file="$version_major_prefix$version_major$version_minor_prefix$version_minor$version_micro_prefix$version_micro$version_nano_prefix$version_nano"
+  if [[ ${version_file_value} == "major" ]] ; then
+    version_file="${version_major_prefix}${version_major}"
+  elif [[ ${version_file_value} == "minor" ]] ; then
+    version_file="${version_major_prefix}${version_major}${version_minor_prefix}${version_minor}"
+  elif [[ ${version_file_value} == "micro" ]] ; then
+    version_file="${version_major_prefix}${version_major}${version_minor_prefix}${version_minor}${version_micro_prefix}${version_micro}"
+  elif [[ ${version_file_value} == "nano" ]] ; then
+    version_file="${version_major_prefix}${version_major}${version_minor_prefix}${version_minor}${version_micro_prefix}${version_micro}${version_nano_prefix}${version_nano}"
   fi
 
-  if [[ $version_target_value == "major" ]] ; then
-    version_target="$version_major_prefix$version_major"
-  elif [[ $version_target_value == "minor" ]] ; then
-    version_target="$version_major_prefix$version_major$version_minor_prefix$version_minor"
-  elif [[ $version_target_value == "micro" ]] ; then
-    version_target="$version_major_prefix$version_major$version_minor_prefix$version_minor$version_micro_prefix$version_micro"
-  elif [[ $version_target_value == "nano" ]] ; then
-    version_target="$version_major_prefix$version_major$version_minor_prefix$version_minor$version_micro_prefix$version_micro$version_nano_prefix$version_nano"
+  if [[ ${version_target_value} == "major" ]] ; then
+    version_target="${version_major_prefix}${version_major}"
+  elif [[ ${version_target_value} == "minor" ]] ; then
+    version_target="${version_major_prefix}${version_major}${version_minor_prefix}${version_minor}"
+  elif [[ ${version_target_value} == "micro" ]] ; then
+    version_target="${version_major_prefix}${version_major}${version_minor_prefix}${version_minor}${version_micro_prefix}${version_micro}"
+  elif [[ ${version_target_value} == "nano" ]] ; then
+    version_target="${version_major_prefix}${version_major}${version_minor_prefix}${version_minor}${version_micro_prefix}${version_micro}${version_nano_prefix}${version_nano}"
   fi
 }
 
@@ -3029,27 +3030,27 @@ bootstrap_operation_clean() {
   local i=
 
   for i in ${path_build}{documents,includes,libraries,objects,programs,settings,stage} ; do
-    if [[ -e $i ]] ; then
-      rm $verbose_common -Rf $i
+    if [[ -e ${i} ]] ; then
+      rm ${verbose_common} -Rf ${i}
     fi
   done
 
   if [[ -f ${project_built}.prepared ]] ; then
-    rm $verbose_common -f ${project_built}-${settings_name}.prepared
+    rm ${verbose_common} -f ${project_built}-${settings_name}.prepared
   fi
 
   if [[ -f ${project_built_shared}-${settings_name}.built ]] ; then
-    rm $verbose_common -f ${project_built_shared}-${settings_name}.built
+    rm ${verbose_common} -f ${project_built_shared}-${settings_name}.built
   fi
 
   if [[ -f ${project_built_static}-${settings_name}.built ]] ; then
-    rm $verbose_common -f ${project_built_static}-${settings_name}.built
+    rm ${verbose_common} -f ${project_built_static}-${settings_name}.built
   fi
 }
 
 bootstrap_print_first() {
 
-  if [[ $print_line_first == "yes" ]] ; then
+  if [[ ${print_line_first} == "yes" ]] ; then
     echo
 
     print_line_first=
@@ -3058,7 +3059,7 @@ bootstrap_print_first() {
 
 bootstrap_print_last() {
 
-  if [[ $print_line_last == "yes" ]] ; then
+  if [[ ${print_line_last} == "yes" ]] ; then
     echo
   fi
 }
index 5dfbb02e7ef97b25b9c5920e10615f456e24ce6b..7234d3e6b82e7dfacd4690ab931da7229711faa8 100644 (file)
 
 install_main() {
 
-  if [[ $SHELL_ENGINE == "zsh" ]] ; then
+  if [[ ${SHELL_ENGINE} == "zsh" ]] ; then
     emulate ksh
   fi
 
   local public_name="Simple FLL Project Install Script"
   local system_name=install
-  local called_name=$(basename $0)
+  local called_name=$(basename ${0})
   local version=0.7.0
 
   local grab_next=
@@ -87,137 +87,137 @@ install_main() {
   if [[ $# -gt 0 ]] ; then
     t=$#
 
-    while [[ $i -lt $t ]] ; do
-      let i=$i+1
+    while [[ ${i} -lt ${t} ]] ; do
+      let i=${i}+1
 
-      if [[ $SHELL_ENGINE == "zsh" ]] ; then
+      if [[ ${SHELL_ENGINE} == "zsh" ]] ; then
         p=${(P)i}
       else
         p=${!i}
       fi
 
-      if [[ $grab_next == "" ]] ; then
-        if [[ $p == "-h" || $p == "--help" ]] ; then
+      if [[ ${grab_next} == "" ]] ; then
+        if [[ ${p} == "-h" || ${p} == "--help" ]] ; then
           do_help=yes
-        elif [[ $p == "+C" || $p == "++copyright" ]] ; then
+        elif [[ ${p} == "+C" || ${p} == "++copyright" ]] ; then
           do_copyright="yes"
-        elif [[ $p == "+d" || $p == "++dark" ]] ; then
+        elif [[ ${p} == "+d" || ${p} == "++dark" ]] ; then
           do_color="dark"
           context="+d"
-        elif [[ $p == "+l" || $p == "++light" ]] ; then
+        elif [[ ${p} == "+l" || ${p} == "++light" ]] ; then
           do_color="light"
           context="+l"
-        elif [[ $p == "+n" || $p == "++no_color" ]] ; then
+        elif [[ ${p} == "+n" || ${p} == "++no_color" ]] ; then
           do_color=none
           context="+n"
-        elif [[ $p == "+Q" || $p == "++quiet" ]] ; then
+        elif [[ ${p} == "+Q" || ${p} == "++quiet" ]] ; then
           verbosity="quiet"
           verbose="+Q"
           verbose_common=
-        elif [[ $p == "+N" || $p == "++normal" ]] ; then
+        elif [[ ${p} == "+N" || ${p} == "++normal" ]] ; then
           verbosity=
           verbose="+N"
           verbose_common=
-        elif [[ $p == "+E" || $p == "++error" ]] ; then
+        elif [[ ${p} == "+E" || ${p} == "++error" ]] ; then
           verbosity="error"
           verbose="+E"
           verbose_common=
-        elif [[ $p == "+V" || $p == "++verbose" ]] ; then
+        elif [[ ${p} == "+V" || ${p} == "++verbose" ]] ; then
           verbosity="verbose"
           verbose="+V"
           verbose_common="-v"
-        elif [[ $p == "+D" || $p == "++debug" ]] ; then
+        elif [[ ${p} == "+D" || ${p} == "++debug" ]] ; then
           verbosity="debug"
           verbose="+D"
           verbose_common="-v"
-        elif [[ $p == "+F" || $p == "++line_first_no" ]] ; then
+        elif [[ ${p} == "+F" || ${p} == "++line_first_no" ]] ; then
           print_line_first="no"
-        elif [[ $p == "+L" || $p == "++line_last_no" ]] ; then
+        elif [[ ${p} == "+L" || ${p} == "++line_last_no" ]] ; then
           print_line_last="no"
-        elif [[ $p == "+v" || $p == "++version" ]] ; then
-          echo $version
+        elif [[ ${p} == "+v" || ${p} == "++version" ]] ; then
+          echo ${version}
           return 0
-        elif [[ $p == "-b" || $p == "--build" ]] ; then
+        elif [[ ${p} == "-b" || ${p} == "--build" ]] ; then
           grab_next=path_build
-        elif [[ $p == "-P" || $p == "--prefix" ]] ; then
+        elif [[ ${p} == "-P" || ${p} == "--prefix" ]] ; then
           grab_next=prefix
-        elif [[ $p == "-B" || $p == "--bindir" ]] ; then
+        elif [[ ${p} == "-B" || ${p} == "--bindir" ]] ; then
           grab_next=bindir
-        elif [[ $p == "-D" || $p == "--docdir" ]] ; then
+        elif [[ ${p} == "-D" || ${p} == "--docdir" ]] ; then
           grab_next=docdir
-        elif [[ $p == "-E" || $p == "--etcdir" ]] ; then
+        elif [[ ${p} == "-E" || ${p} == "--etcdir" ]] ; then
           grab_next=etcdir
-        elif [[ $p == "-I" || $p == "--includedir" ]] ; then
+        elif [[ ${p} == "-I" || ${p} == "--includedir" ]] ; then
           grab_next=includedir
-        elif [[ $p == "-L" || $p == "--libdir" ]] ; then
+        elif [[ ${p} == "-L" || ${p} == "--libdir" ]] ; then
           grab_next=libdir
-        elif [[ $p == "-w" || $p == "--work" ]] ; then
+        elif [[ ${p} == "-w" || ${p} == "--work" ]] ; then
           grab_next=work
-        elif [[ $p == "--enable-doc" ]] ; then
+        elif [[ ${p} == "--enable-doc" ]] ; then
           enable_documentation="yes"
-        elif [[ $p == "--disable-doc" ]] ; then
+        elif [[ ${p} == "--disable-doc" ]] ; then
           enable_documentation="no"
-        elif [[ $p == "--enable-settings" ]] ; then
+        elif [[ ${p} == "--enable-settings" ]] ; then
           enable_settings="yes"
-        elif [[ $p == "--disable-settings" ]] ; then
+        elif [[ ${p} == "--disable-settings" ]] ; then
           enable_settings="no"
-        elif [[ $p == "--enable-shared" ]] ; then
+        elif [[ ${p} == "--enable-shared" ]] ; then
           enable_shared="yes"
-        elif [[ $p == "--disable-shared" ]] ; then
+        elif [[ ${p} == "--disable-shared" ]] ; then
           enable_shared="no"
-        elif [[ $p == "--disable-shared-programs" ]] ; then
+        elif [[ ${p} == "--disable-shared-programs" ]] ; then
           enable_shared_programs="no"
-        elif [[ $p == "--disable-shared-libraries" ]] ; then
+        elif [[ ${p} == "--disable-shared-libraries" ]] ; then
           enable_shared_libraries="no"
-        elif [[ $p == "--disable-static-programs" ]] ; then
+        elif [[ ${p} == "--disable-static-programs" ]] ; then
           enable_static_programs="no"
-        elif [[ $p == "--disable-static-libraries" ]] ; then
+        elif [[ ${p} == "--disable-static-libraries" ]] ; then
           enable_static_libraries="no"
-        elif [[ $p == "--enable-static" ]] ; then
+        elif [[ ${p} == "--enable-static" ]] ; then
           enable_static="yes"
-        elif [[ $p == "--disable-static" ]] ; then
+        elif [[ ${p} == "--disable-static" ]] ; then
           enable_static="no"
-        elif [[ $p == "--enable-includes" ]] ; then
+        elif [[ ${p} == "--enable-includes" ]] ; then
           enable_includes="yes"
-        elif [[ $p == "--disable-includes" ]] ; then
+        elif [[ ${p} == "--disable-includes" ]] ; then
           enable_includes="no"
-        elif [[ $p == "--libraries-static" ]] ; then
+        elif [[ ${p} == "--libraries-static" ]] ; then
           grab_next="destination_libraries_static"
-        elif [[ $p == "--libraries-shared" ]] ; then
+        elif [[ ${p} == "--libraries-shared" ]] ; then
           grab_next="destination_libraries_shared"
-        elif [[ $p == "--programs-static" ]] ; then
+        elif [[ ${p} == "--programs-static" ]] ; then
           grab_next="destination_programs_static"
-        elif [[ $p == "--programs-shared" ]] ; then
+        elif [[ ${p} == "--programs-shared" ]] ; then
           grab_next="destination_programs_shared"
-        elif [[ $operation_failure == "" ]] ; then
-          operation="$p"
+        elif [[ ${operation_failure} == "" ]] ; then
+          operation="${p}"
           operation_failure=fail-unsupported
         fi
       else
-        if [[ $grab_next == "path_build" ]] ; then
-          path_build=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|')
-        elif [[ $grab_next == "prefix" ]] ; then
-          destination_prefix=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|')
-        elif [[ $grab_next == "bindir" ]] ; then
-          destination_programs=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|')
-        elif [[ $grab_next == "docdir" ]] ; then
-          destination_documentation=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|')
-        elif [[ $grab_next == "etcdir" ]] ; then
-          destination_settings=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|')
-        elif [[ $grab_next == "includedir" ]] ; then
-          destination_includes=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|')
-        elif [[ $grab_next == "libdir" ]] ; then
-          destination_libraries=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|')
-        elif [[ $grab_next == "work" ]] ; then
-          work=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|')
-        elif [[ $grab_next == "destination_libraries_static" ]] ; then
-          destination_libraries_static=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|')
-        elif [[ $grab_next == "destination_libraries_shared" ]] ; then
-          destination_libraries_shared=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|')
-        elif [[ $grab_next == "destination_programs_static" ]] ; then
-          destination_programs_static=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|')
-        elif [[ $grab_next == "destination_programs_shared" ]] ; then
-          destination_programs_shared=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|')
+        if [[ ${grab_next} == "path_build" ]] ; then
+          path_build=$(echo ${p} | sed -e 's|^//*|/|' -e 's|/*$|/|')
+        elif [[ ${grab_next} == "prefix" ]] ; then
+          destination_prefix=$(echo ${p} | sed -e 's|^//*|/|' -e 's|/*$|/|')
+        elif [[ ${grab_next} == "bindir" ]] ; then
+          destination_programs=$(echo ${p} | sed -e 's|^//*|/|' -e 's|/*$|/|')
+        elif [[ ${grab_next} == "docdir" ]] ; then
+          destination_documentation=$(echo ${p} | sed -e 's|^//*|/|' -e 's|/*$|/|')
+        elif [[ ${grab_next} == "etcdir" ]] ; then
+          destination_settings=$(echo ${p} | sed -e 's|^//*|/|' -e 's|/*$|/|')
+        elif [[ ${grab_next} == "includedir" ]] ; then
+          destination_includes=$(echo ${p} | sed -e 's|^//*|/|' -e 's|/*$|/|')
+        elif [[ ${grab_next} == "libdir" ]] ; then
+          destination_libraries=$(echo ${p} | sed -e 's|^//*|/|' -e 's|/*$|/|')
+        elif [[ ${grab_next} == "work" ]] ; then
+          work=$(echo ${p} | sed -e 's|^//*|/|' -e 's|/*$|/|')
+        elif [[ ${grab_next} == "destination_libraries_static" ]] ; then
+          destination_libraries_static=$(echo ${p} | sed -e 's|^//*|/|' -e 's|/*$|/|')
+        elif [[ ${grab_next} == "destination_libraries_shared" ]] ; then
+          destination_libraries_shared=$(echo ${p} | sed -e 's|^//*|/|' -e 's|/*$|/|')
+        elif [[ ${grab_next} == "destination_programs_static" ]] ; then
+          destination_programs_static=$(echo ${p} | sed -e 's|^//*|/|' -e 's|/*$|/|')
+        elif [[ ${grab_next} == "destination_programs_shared" ]] ; then
+          destination_programs_shared=$(echo ${p} | sed -e 's|^//*|/|' -e 's|/*$|/|')
         fi
 
         grab_next=
@@ -227,32 +227,32 @@ install_main() {
     p=
   fi
 
-  if [[ $verbosity == "quiet" ]] ; then
+  if [[ ${verbosity} == "quiet" ]] ; then
     print_line_first="no"
     print_line_last="no"
   fi
 
   install_handle_colors
 
-  if [[ $do_help == "yes" ]] ; then
+  if [[ ${do_help} == "yes" ]] ; then
     install_help
     install_cleanup
 
     return 0
   fi
 
-  if [[ $do_copyright == "yes" ]] ; then
+  if [[ ${do_copyright} == "yes" ]] ; then
     install_copyright
     install_cleanup
 
     return 0
   fi
 
-  if [[ $operation_failure == "fail-unsupported" ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${operation_failure} == "fail-unsupported" ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       install_print_first
 
-      echo -e "${c_error}ERROR: The operation ${c_notice}$operation${c_error} was not recognized.${c_reset}"
+      echo -e "${c_error}ERROR: The operation ${c_notice}${operation}${c_error} was not recognized.${c_reset}"
 
       install_print_last
     fi
@@ -262,11 +262,11 @@ install_main() {
     return 1
   fi
 
-  if [[ ! -d $path_build ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ! -d ${path_build} ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       install_print_first
 
-      echo -e "${c_error}ERROR: The build path ${c_notice}$path_build${c_error} is not a valid directory.${c_reset}"
+      echo -e "${c_error}ERROR: The build path ${c_notice}${path_build}${c_error} is not a valid directory.${c_reset}"
 
       install_print_last
     fi
@@ -276,11 +276,11 @@ install_main() {
     return 1
   fi
 
-  if [[ $work == "" && $destination_prefix != "" && ! -d $destination_prefix ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${work} == "" && ${destination_prefix} != "" && ! -d ${destination_prefix} ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       install_print_first
 
-      echo -e "${c_error}ERROR: The destination prefix ${c_notice}$destination_prefix${c_error} is not a valid directory.${c_reset}"
+      echo -e "${c_error}ERROR: The destination prefix ${c_notice}${destination_prefix}${c_error} is not a valid directory.${c_reset}"
 
       install_print_last
     fi
@@ -290,65 +290,65 @@ install_main() {
     return 1
   fi
 
-  if [[ $destination_prefix != "" ]] ; then
-    if [[ $(echo $destination_documentation | grep -o '^/') == "" ]] ; then
-      destination_documentation="$destination_prefix$destination_documentation"
+  if [[ ${destination_prefix} != "" ]] ; then
+    if [[ $(echo ${destination_documentation} | grep -o '^/') == "" ]] ; then
+      destination_documentation="${destination_prefix}${destination_documentation}"
     fi
 
-    if [[ $(echo $destination_programs | grep -o '^/') == "" ]] ; then
-      destination_programs="$destination_prefix$destination_programs"
+    if [[ $(echo ${destination_programs} | grep -o '^/') == "" ]] ; then
+      destination_programs="${destination_prefix}${destination_programs}"
     fi
 
-    if [[ $(echo $destination_includes | grep -o '^/') == "" ]] ; then
-      destination_includes="$destination_prefix$destination_includes"
+    if [[ $(echo ${destination_includes} | grep -o '^/') == "" ]] ; then
+      destination_includes="${destination_prefix}${destination_includes}"
     fi
 
-    if [[ $(echo $destination_libraries | grep -o '^/') == "" ]] ; then
-      destination_libraries="$destination_prefix$destination_libraries"
+    if [[ $(echo ${destination_libraries} | grep -o '^/') == "" ]] ; then
+      destination_libraries="${destination_prefix}${destination_libraries}"
     fi
 
-    if [[ $(echo $destination_settings | grep -o '^/') == "" ]] ; then
-      destination_settings="$destination_prefix$destination_settings"
+    if [[ $(echo ${destination_settings} | grep -o '^/') == "" ]] ; then
+      destination_settings="${destination_prefix}${destination_settings}"
     fi
   fi
 
-  if [[ $destination_libraries_static != "" ]] ; then
-    if [[ $(echo $destination_libraries_static | grep -o '^/') == "" ]] ; then
-      destination_libraries_static=$destination_libraries$destination_libraries_static
+  if [[ ${destination_libraries_static} != "" ]] ; then
+    if [[ $(echo ${destination_libraries_static} | grep -o '^/') == "" ]] ; then
+      destination_libraries_static=${destination_libraries}${destination_libraries_static}
     fi
   else
-    destination_libraries_static=$destination_libraries
+    destination_libraries_static=${destination_libraries}
   fi
 
-  if [[ $destination_libraries_shared != "" ]] ; then
-    if [[ $(echo $destination_libraries_shared | grep -o '^/') == "" ]] ; then
-      destination_libraries_shared=$destination_libraries$destination_libraries_shared
+  if [[ ${destination_libraries_shared} != "" ]] ; then
+    if [[ $(echo ${destination_libraries_shared} | grep -o '^/') == "" ]] ; then
+      destination_libraries_shared=${destination_libraries}${destination_libraries_shared}
     fi
   else
-    destination_libraries_shared=$destination_libraries
+    destination_libraries_shared=${destination_libraries}
   fi
 
-  if [[ $destination_programs_static != "" ]] ; then
-    if [[ $(echo $destination_programs_static | grep -o '^/') == "" ]] ; then
-      destination_programs_static=$destination_programs$destination_programs_static
+  if [[ ${destination_programs_static} != "" ]] ; then
+    if [[ $(echo ${destination_programs_static} | grep -o '^/') == "" ]] ; then
+      destination_programs_static=${destination_programs}${destination_programs_static}
     fi
   else
-    destination_programs_static=$destination_programs
+    destination_programs_static=${destination_programs}
   fi
 
-  if [[ $destination_programs_shared != "" ]] ; then
-    if [[ $(echo $destination_programs_shared | grep -o '^/') == "" ]] ; then
-      destination_programs_shared=$destination_programs$destination_programs_shared
+  if [[ ${destination_programs_shared} != "" ]] ; then
+    if [[ $(echo ${destination_programs_shared} | grep -o '^/') == "" ]] ; then
+      destination_programs_shared=${destination_programs}${destination_programs_shared}
     fi
   else
-    destination_programs_shared=$destination_programs
+    destination_programs_shared=${destination_programs}
   fi
 
-  if [[ $work != "" && ! -d $work ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${work} != "" && ! -d ${work} ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       install_print_first
 
-      echo -e "${c_error}ERROR: The work directory ${c_notice}$work${c_error} is not a valid directory.${c_reset}"
+      echo -e "${c_error}ERROR: The work directory ${c_notice}${work}${c_error} is not a valid directory.${c_reset}"
 
       install_print_last
     fi
@@ -358,11 +358,11 @@ install_main() {
     return 1
   fi
 
-  if [[ $work == "" && -e $destination_programs && ! -d $destination_programs ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${work} == "" && -e ${destination_programs} && ! -d ${destination_programs} ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       install_print_first
 
-      echo -e "${c_error}ERROR: The destination bindir ${c_notice}$destination_programs${c_error} is not a valid directory.${c_reset}"
+      echo -e "${c_error}ERROR: The destination bindir ${c_notice}${destination_programs}${c_error} is not a valid directory.${c_reset}"
 
       install_print_last
     fi
@@ -372,11 +372,11 @@ install_main() {
     return 1
   fi
 
-  if [[ $work == "" && -e $destination_programs_static && ! -d $destination_programs_static ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${work} == "" && -e ${destination_programs_static} && ! -d ${destination_programs_static} ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       install_print_first
 
-      echo -e "${c_error}ERROR: The destination (${c_notice}static${c_error}) bindir ${c_notice}$destination_programs_static${c_error} is not a valid directory.${c_reset}"
+      echo -e "${c_error}ERROR: The destination (${c_notice}static${c_error}) bindir ${c_notice}${destination_programs_static}${c_error} is not a valid directory.${c_reset}"
 
       install_print_last
     fi
@@ -386,11 +386,11 @@ install_main() {
     return 1
   fi
 
-  if [[ $work == "" && -e $destination_programs_shared && ! -d $destination_programs_shared ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${work} == "" && -e ${destination_programs_shared} && ! -d ${destination_programs_shared} ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       install_print_first
 
-      echo -e "${c_error}ERROR: The destination (${c_notice}shared${c_error}) bindir ${c_notice}$destination_programs_shared${c_error} is not a valid directory.${c_reset}"
+      echo -e "${c_error}ERROR: The destination (${c_notice}shared${c_error}) bindir ${c_notice}${destination_programs_shared}${c_error} is not a valid directory.${c_reset}"
 
       install_print_last
     fi
@@ -400,11 +400,11 @@ install_main() {
     return 1
   fi
 
-  if [[ $work == "" && -e $destination_includes && ! -d $destination_includes ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${work} == "" && -e ${destination_includes} && ! -d ${destination_includes} ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       install_print_first
 
-      echo -e "${c_error}ERROR: The destination incluedir ${c_notice}$destination_includes${c_error} is not a valid directory.${c_reset}"
+      echo -e "${c_error}ERROR: The destination incluedir ${c_notice}${destination_includes}${c_error} is not a valid directory.${c_reset}"
 
       install_print_last
     fi
@@ -414,11 +414,11 @@ install_main() {
     return 1
   fi
 
-  if [[ $work == "" && -e $destination_libraries_static && ! -d $destination_libraries_static ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${work} == "" && -e ${destination_libraries_static} && ! -d ${destination_libraries_static} ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       install_print_first
 
-      echo -e "${c_error}ERROR: The destination (${c_notice}static${c_error}) libdir ${c_notice}$destination_libraries_static${c_error} is not a valid directory.${c_reset}"
+      echo -e "${c_error}ERROR: The destination (${c_notice}static${c_error}) libdir ${c_notice}${destination_libraries_static}${c_error} is not a valid directory.${c_reset}"
 
       install_print_last
     fi
@@ -428,11 +428,11 @@ install_main() {
     return 1
   fi
 
-  if [[ $work == "" && -e $destination_libraries_shared && ! -d $destination_libraries_shared ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${work} == "" && -e ${destination_libraries_shared} && ! -d ${destination_libraries_shared} ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       install_print_first
 
-      echo -e "${c_error}ERROR: The destination (${c_notice}shared${c_error}) libdir ${c_notice}$destination_libraries_shared${c_error} is not a valid directory.${c_reset}"
+      echo -e "${c_error}ERROR: The destination (${c_notice}shared${c_error}) libdir ${c_notice}${destination_libraries_shared}${c_error} is not a valid directory.${c_reset}"
 
       install_print_last
     fi
@@ -444,15 +444,15 @@ install_main() {
 
   install_perform_install
 
-  if [[ $verbosity != "quiet" ]] ; then
-    if [[ $failure != "" || $verbosity != "error" ]] ; then
+  if [[ ${verbosity} != "quiet" ]] ; then
+    if [[ ${failure} != "" || ${verbosity} != "error" ]] ; then
       install_print_last
     fi
   fi
 
   install_cleanup
 
-  if [[ $failure == "" ]] ; then
+  if [[ ${failure} == "" ]] ; then
     return 0
   fi
 
@@ -461,14 +461,14 @@ install_main() {
 
 install_handle_colors() {
 
-  if [[ $do_color == "light" ]] ; then
+  if [[ ${do_color} == "light" ]] ; then
     c_error="\\033[1;31m"
     c_warning="\\033[0;31m"
     c_title="\\033[1;34m"
     c_highlight="\\033[0;34m"
     c_notice="\\033[0;01m"
     c_important="\\033[0;35m"
-  elif [[ $do_color == "none" ]] ; then
+  elif [[ ${do_color} == "none" ]] ; then
     c_reset=
     c_title=
     c_error=
@@ -557,17 +557,17 @@ install_perform_install() {
   local path=
   local message=
 
-  if [[ $enable_shared == "no" ]] ; then
+  if [[ ${enable_shared} == "no" ]] ; then
     enable_shared_programs="no"
     enable_shared_libraries="no"
   fi
 
-  if [[ $enable_static == "no" ]] ; then
+  if [[ ${enable_static} == "no" ]] ; then
     enable_static_programs="no"
     enable_static_libraries="no"
   fi
 
-  if [[ $work == "" ]] ; then
+  if [[ ${work} == "" ]] ; then
     message="install destination directory"
   else
     message="work directory"
@@ -584,10 +584,10 @@ install_perform_install() {
   fi
 
   if [[ ! -d ${destination_prefix} ]] ; then
-    mkdir $verbose_common ${destination_prefix}
+    mkdir ${verbose_common} ${destination_prefix}
 
-    if [[ $? -ne 0 ]] ; then
-      if [[ $verbosity != "quiet" ]] ; then
+    if [[ ${?} -ne 0 ]] ; then
+      if [[ ${verbosity} != "quiet" ]] ; then
         install_print_first
 
         echo -e "${c_error}ERROR: Failed to create install ${message} ${c_notice}${destination_prefix}${c_error}.${c_reset}"
@@ -597,12 +597,12 @@ install_perform_install() {
     fi
   fi
 
-  if [[ $enable_shared_programs == "yes" || $enable_static_programs == "yes" ]] ; then
+  if [[ ${enable_shared_programs} == "yes" || ${enable_static_programs} == "yes" ]] ; then
     if [[ -d ${path_build}${path_programs} && ! -d ${destination_programs} ]] ; then
-      mkdir $verbose_common ${destination_programs}
+      mkdir ${verbose_common} ${destination_programs}
 
-      if [[ $? -ne 0 ]] ; then
-        if [[ $verbosity != "quiet" ]] ; then
+      if [[ ${?} -ne 0 ]] ; then
+        if [[ ${verbosity} != "quiet" ]] ; then
           install_print_first
 
           echo -e "${c_error}ERROR: Failed to create install ${message} ${c_notice}${destination_programs}${c_error}.${c_reset}"
@@ -612,11 +612,11 @@ install_perform_install() {
       fi
     fi
 
-    if [[ $enable_shared_programs == "yes" && -d ${path_build}${path_programs}${path_shared} && ! -d ${destination_programs_shared} ]] ; then
-      mkdir $verbose_common ${destination_programs_shared}
+    if [[ ${enable_shared_programs} == "yes" && -d ${path_build}${path_programs}${path_shared} && ! -d ${destination_programs_shared} ]] ; then
+      mkdir ${verbose_common} ${destination_programs_shared}
 
-      if [[ $? -ne 0 ]] ; then
-        if [[ $verbosity != "quiet" ]] ; then
+      if [[ ${?} -ne 0 ]] ; then
+        if [[ ${verbosity} != "quiet" ]] ; then
           install_print_first
 
           echo -e "${c_error}ERROR: Failed to create install ${message} ${c_notice}${destination_programs_shared}${c_error}.${c_reset}"
@@ -626,11 +626,11 @@ install_perform_install() {
       fi
     fi
 
-    if [[ $enable_static_programs == "yes" && -d ${path_build}${path_programs}${path_static} && ! -d ${destination_programs_static} ]] ; then
-      mkdir $verbose_common ${destination_programs_static}
+    if [[ ${enable_static_programs} == "yes" && -d ${path_build}${path_programs}${path_static} && ! -d ${destination_programs_static} ]] ; then
+      mkdir ${verbose_common} ${destination_programs_static}
 
-      if [[ $? -ne 0 ]] ; then
-        if [[ $verbosity != "quiet" ]] ; then
+      if [[ ${?} -ne 0 ]] ; then
+        if [[ ${verbosity} != "quiet" ]] ; then
           install_print_first
 
           echo -e "${c_error}ERROR: Failed to create install ${message} ${c_notice}${destination_programs_static}${c_error}.${c_reset}"
@@ -641,12 +641,12 @@ install_perform_install() {
     fi
   fi
 
-  if [[ $enable_shared_libraries == "yes" || $enable_static_libraries == "yes" ]] ; then
+  if [[ ${enable_shared_libraries} == "yes" || ${enable_static_libraries} == "yes" ]] ; then
     if [[ -d ${path_build}${path_libraries} && ! -d ${destination_libraries} ]] ; then
-      mkdir $verbose_common ${destination_libraries}
+      mkdir ${verbose_common} ${destination_libraries}
 
-      if [[ $? -ne 0 ]] ; then
-        if [[ $verbosity != "quiet" ]] ; then
+      if [[ ${?} -ne 0 ]] ; then
+        if [[ ${verbosity} != "quiet" ]] ; then
           install_print_first
 
           echo -e "${c_error}ERROR: Failed to create install ${message} ${c_notice}${destination_libraries}${c_error}.${c_reset}"
@@ -656,11 +656,11 @@ install_perform_install() {
       fi
     fi
 
-    if [[ $enable_shared_libraries == "yes" && -d ${path_build}${path_libraries}${path_shared} && ! -d ${destination_libraries_shared} ]] ; then
-      mkdir $verbose_common ${destination_libraries_shared}
+    if [[ ${enable_shared_libraries} == "yes" && -d ${path_build}${path_libraries}${path_shared} && ! -d ${destination_libraries_shared} ]] ; then
+      mkdir ${verbose_common} ${destination_libraries_shared}
 
-      if [[ $? -ne 0 ]] ; then
-        if [[ $verbosity != "quiet" ]] ; then
+      if [[ ${?} -ne 0 ]] ; then
+        if [[ ${verbosity} != "quiet" ]] ; then
           install_print_first
 
           echo -e "${c_error}ERROR: Failed to create ${message} ${c_notice}${destination_libraries_shared}${c_error}.${c_reset}"
@@ -670,11 +670,11 @@ install_perform_install() {
       fi
     fi
 
-    if [[ $enable_static_libraries == "yes" && -d ${path_build}${path_libraries}${path_static} && ! -d ${destination_libraries_static} ]] ; then
-      mkdir $verbose_common ${destination_libraries_static}
+    if [[ ${enable_static_libraries} == "yes" && -d ${path_build}${path_libraries}${path_static} && ! -d ${destination_libraries_static} ]] ; then
+      mkdir ${verbose_common} ${destination_libraries_static}
 
-      if [[ $? -ne 0 ]] ; then
-        if [[ $verbosity != "quiet" ]] ; then
+      if [[ ${?} -ne 0 ]] ; then
+        if [[ ${verbosity} != "quiet" ]] ; then
           install_print_first
 
           echo -e "${c_error}ERROR: Failed to create ${message} ${c_notice}${destination_libraries_static}${c_error}.${c_reset}"
@@ -685,12 +685,12 @@ install_perform_install() {
     fi
   fi
 
-  if [[ $enable_includes == "yes" ]] ; then
+  if [[ ${enable_includes} == "yes" ]] ; then
     if [[ -d ${path_build}${path_includes} && ! -d ${destination_includes} ]] ; then
-      mkdir $verbose_common ${destination_includes}
+      mkdir ${verbose_common} ${destination_includes}
 
-      if [[ $? -ne 0 ]] ; then
-        if [[ $verbosity != "quiet" ]] ; then
+      if [[ ${?} -ne 0 ]] ; then
+        if [[ ${verbosity} != "quiet" ]] ; then
           install_print_first
 
           echo -e "${c_error}ERROR: Failed to create ${message} ${c_notice}${destination_includes}${c_error}.${c_reset}"
@@ -701,12 +701,12 @@ install_perform_install() {
     fi
   fi
 
-  if [[ $enable_documentation == "yes" ]] ; then
+  if [[ ${enable_documentation} == "yes" ]] ; then
     if [[ -d ${path_build}${path_documentation} && ! -d ${destination_documentation} ]] ; then
-      mkdir $verbose_common ${destination_documentation}
+      mkdir ${verbose_common} ${destination_documentation}
 
-      if [[ $? -ne 0 ]] ; then
-        if [[ $verbosity != "quiet" ]] ; then
+      if [[ ${?} -ne 0 ]] ; then
+        if [[ ${verbosity} != "quiet" ]] ; then
           install_print_first
 
           echo -e "${c_error}ERROR: Failed to create ${message} ${c_notice}${destination_documentation}${c_error}.${c_reset}"
@@ -717,12 +717,12 @@ install_perform_install() {
     fi
   fi
 
-  if [[ $enable_settings == "yes" ]] ; then
+  if [[ ${enable_settings} == "yes" ]] ; then
     if [[ -d ${path_build}${path_settings} && ! -d ${destination_settings} ]] ; then
-      mkdir $verbose_common ${destination_settings}
+      mkdir ${verbose_common} ${destination_settings}
 
-      if [[ $? -ne 0 ]] ; then
-        if [[ $verbosity != "quiet" ]] ; then
+      if [[ ${?} -ne 0 ]] ; then
+        if [[ ${verbosity} != "quiet" ]] ; then
           install_print_first
 
           echo -e "${c_error}ERROR: Failed to create ${message} ${c_notice}${destination_settings}${c_error}.${c_reset}"
@@ -733,29 +733,29 @@ install_perform_install() {
     fi
   fi
 
-  if [[ $failure == "" && -d ${path_build}${path_includes} && $enable_includes == "yes" ]] ; then
+  if [[ ${failure} == "" && -d ${path_build}${path_includes} && ${enable_includes} == "yes" ]] ; then
     for i in ${path_build}${path_includes}* ; do
 
-      file=$(echo $i | sed -e "s|^${path_build}${path_includes}||")
+      file=$(echo ${i} | sed -e "s|^${path_build}${path_includes}||")
 
       break
     done
 
-    if [[ $file == "*" && ! -f "${path_build}${path_includes}*" ]] ; then
+    if [[ ${file} == "*" && ! -f "${path_build}${path_includes}*" ]] ; then
       file=
     fi
 
-    if [[ $file != "" ]] ; then
-      if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+    if [[ ${file} != "" ]] ; then
+      if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
         install_print_first_or_always
 
         echo -e "${c_highlight}Installing Includes to: ${c_reset}${c_notice}${destination_includes}${c_reset}${c_highlight}.${c_reset}"
       fi
 
-      cp $verbose_common -R ${path_build}${path_includes}* ${destination_includes}
+      cp ${verbose_common} -R ${path_build}${path_includes}* ${destination_includes}
 
-      if [[ $? -ne 0 ]] ; then
-        if [[ $verbosity != "quiet" ]] ; then
+      if [[ ${?} -ne 0 ]] ; then
+        if [[ ${verbosity} != "quiet" ]] ; then
           install_print_first
 
           echo -e "${c_error}ERROR: Failed to copy include files from ${c_notice}${path_build}${path_includes}${c_error} to ${c_notice}${destination_includes}${c_error}.${c_reset}"
@@ -766,30 +766,30 @@ install_perform_install() {
     fi
   fi
 
-  if [[ $failure == "" && -d ${path_build}${path_libraries} && ( $enable_shared_libraries == "yes" || $enable_static_libraries == "yes" ) ]] ; then
-    if [[ -d ${path_build}${path_libraries}${path_static} && $enable_static_libraries == "yes" ]] ; then
+  if [[ ${failure} == "" && -d ${path_build}${path_libraries} && ( ${enable_shared_libraries} == "yes" || ${enable_static_libraries} == "yes" ) ]] ; then
+    if [[ -d ${path_build}${path_libraries}${path_static} && ${enable_static_libraries} == "yes" ]] ; then
       for i in ${path_build}${path_libraries}${path_static}* ; do
 
-        file=$(echo $i | sed -e "s|^${path_build}${path_libraries}${path_static}||")
+        file=$(echo ${i} | sed -e "s|^${path_build}${path_libraries}${path_static}||")
 
         break
       done
 
-      if [[ $file == "*" && ! -f "${path_build}${path_libraries}${path_static}*" ]] ; then
+      if [[ ${file} == "*" && ! -f "${path_build}${path_libraries}${path_static}*" ]] ; then
         file=
       fi
 
-      if [[ $file != "" ]] ; then
-        if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+      if [[ ${file} != "" ]] ; then
+        if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
           install_print_first_or_always
 
           echo -e "${c_highlight}Installing (${c_notice}static${c_highlight}) Libraries to: ${c_reset}${c_notice}${destination_libraries_static}${c_reset}${c_highlight}.${c_reset}"
         fi
 
-        cp $verbose_common -R ${path_build}${path_libraries}${path_static}* ${destination_libraries_static}
+        cp ${verbose_common} -R ${path_build}${path_libraries}${path_static}* ${destination_libraries_static}
 
-        if [[ $? -ne 0 ]] ; then
-          if [[ $verbosity != "quiet" ]] ; then
+        if [[ ${?} -ne 0 ]] ; then
+          if [[ ${verbosity} != "quiet" ]] ; then
             install_print_first
 
             echo -e "${c_error}ERROR: Failed to copy (${c_notice}static${c_error}) library files from ${c_notice}${path_build}${path_libraries}${path_static}${c_error} to ${c_notice}${destination_libraries_static}${c_error}.${c_reset}"
@@ -800,29 +800,29 @@ install_perform_install() {
       fi
     fi
 
-    if [[ $failure == "" && -d ${path_build}${path_libraries}${path_shared} && $enable_shared_libraries == "yes" ]] ; then
+    if [[ ${failure} == "" && -d ${path_build}${path_libraries}${path_shared} && ${enable_shared_libraries} == "yes" ]] ; then
       for i in ${path_build}${path_libraries}${path_shared}* ; do
 
-        file=$(echo $i | sed -e "s|^${path_build}${path_libraries}${path_shared}||")
+        file=$(echo ${i} | sed -e "s|^${path_build}${path_libraries}${path_shared}||")
 
         break
       done
 
-      if [[ $file == "*" && ! -f "${path_build}${path_libraries}${path_shared}*" ]] ; then
+      if [[ ${file} == "*" && ! -f "${path_build}${path_libraries}${path_shared}*" ]] ; then
         file=
       fi
 
-      if [[ $file != "" ]] ; then
-        if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+      if [[ ${file} != "" ]] ; then
+        if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
           install_print_first_or_always
 
           echo -e "${c_highlight}Installing (${c_notice}shared${c_highlight}) Libraries to: ${c_reset}${c_notice}${destination_libraries_shared}${c_reset}${c_highlight}.${c_reset}"
         fi
 
-        cp $verbose_common -R ${path_build}${path_libraries}${path_shared}* ${destination_libraries_shared}
+        cp ${verbose_common} -R ${path_build}${path_libraries}${path_shared}* ${destination_libraries_shared}
 
-        if [[ $? -ne 0 ]] ; then
-          if [[ $verbosity != "quiet" ]] ; then
+        if [[ ${?} -ne 0 ]] ; then
+          if [[ ${verbosity} != "quiet" ]] ; then
             install_print_first
 
             echo -e "${c_error}ERROR: Failed to copy (${c_notice}shared${c_error}) library files from ${c_notice}${path_build}${path_libraries}${path_shared}${c_error} to ${c_notice}${destination_libraries_shared}${c_error}.${c_reset}"
@@ -834,30 +834,30 @@ install_perform_install() {
     fi
   fi
 
-  if [[ $failure == "" && -d ${path_build}${path_programs} && ( $enable_shared_programs == "yes" || $enable_static_programs == "yes" ) ]] ; then
-    if [[ -d ${path_build}${path_programs}${path_static} && $enable_static_programs == "yes" ]] ; then
+  if [[ ${failure} == "" && -d ${path_build}${path_programs} && ( ${enable_shared_programs} == "yes" || ${enable_static_programs} == "yes" ) ]] ; then
+    if [[ -d ${path_build}${path_programs}${path_static} && ${enable_static_programs} == "yes" ]] ; then
       for i in ${path_build}${path_programs}${path_static}* ; do
 
-        file=$(echo $i | sed -e "s|^${path_build}${path_programs}${path_static}||")
+        file=$(echo ${i} | sed -e "s|^${path_build}${path_programs}${path_static}||")
 
         break
       done
 
-      if [[ $file == "*" && ! -f "${path_build}${path_programs}${path_static}*" ]] ; then
+      if [[ ${file} == "*" && ! -f "${path_build}${path_programs}${path_static}*" ]] ; then
         file=
       fi
 
-      if [[ $file != "" && $enable_static_programs == "yes" ]] ; then
-        if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+      if [[ ${file} != "" && ${enable_static_programs} == "yes" ]] ; then
+        if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
           install_print_first_or_always
 
           echo -e "${c_highlight}Installing (${c_notice}static${c_highlight}) Programs to: ${c_reset}${c_notice}${destination_programs_static}${c_reset}${c_highlight}.${c_reset}"
         fi
 
-        cp $verbose_common -R ${path_build}${path_programs}${path_static}* ${destination_programs_static}
+        cp ${verbose_common} -R ${path_build}${path_programs}${path_static}* ${destination_programs_static}
 
-        if [[ $? -ne 0 ]] ; then
-          if [[ $verbosity != "quiet" ]] ; then
+        if [[ ${?} -ne 0 ]] ; then
+          if [[ ${verbosity} != "quiet" ]] ; then
             install_print_first
 
             echo -e "${c_error}ERROR: failed to copy (${c_notice}static${c_error}) program files from ${c_notice}${path_build}${path_programs}${path_static}${c_error} to ${c_notice}${destination_programs_static}${c_error}.${c_reset}"
@@ -868,29 +868,29 @@ install_perform_install() {
       fi
     fi
 
-    if [[ $failure == "" && -d ${path_build}${path_programs}${path_shared} && $enable_shared_programs == "yes" ]] ; then
+    if [[ ${failure} == "" && -d ${path_build}${path_programs}${path_shared} && ${enable_shared_programs} == "yes" ]] ; then
       for i in ${path_build}${path_programs}${path_shared}* ; do
 
-        file=$(echo $i | sed -e "s|^${path_build}${path_programs}${path_shared}||")
+        file=$(echo ${i} | sed -e "s|^${path_build}${path_programs}${path_shared}||")
 
         break
       done
 
-      if [[ $file == "*" && ! -f "${path_build}${path_programs}${path_shared}*" ]] ; then
+      if [[ ${file} == "*" && ! -f "${path_build}${path_programs}${path_shared}*" ]] ; then
         file=
       fi
 
-      if [[ $file != "" ]] ; then
-        if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+      if [[ ${file} != "" ]] ; then
+        if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
           install_print_first_or_always
 
           echo -e "${c_highlight}Installing (${c_notice}shared${c_highlight}) Programs to: ${c_reset}${c_notice}${destination_programs_shared}${c_reset}${c_highlight}.${c_reset}"
         fi
 
-        cp $verbose_common -R ${path_build}${path_programs}${path_shared}* ${destination_programs_shared}
+        cp ${verbose_common} -R ${path_build}${path_programs}${path_shared}* ${destination_programs_shared}
 
-        if [[ $? -ne 0 ]] ; then
-          if [[ $verbosity != "quiet" ]] ; then
+        if [[ ${?} -ne 0 ]] ; then
+          if [[ ${verbosity} != "quiet" ]] ; then
             install_print_first
 
             echo -e "${c_error}ERROR: failed to copy (${c_notice}shared${c_error}) program files from ${c_notice}${path_build}${path_programs}${path_shared}${c_error} to ${c_notice}${destination_programs_shared}${c_error}.${c_reset}"
@@ -902,29 +902,29 @@ install_perform_install() {
     fi
   fi
 
-  if [[ $failure == "" && -d ${path_build}${path_settings} && $enable_settings == "yes" ]] ; then
+  if [[ ${failure} == "" && -d ${path_build}${path_settings} && ${enable_settings} == "yes" ]] ; then
     for i in ${path_build}${path_settings}* ; do
 
-      file=$(echo $i | sed -e "s|^${path_build}${path_settings}||")
+      file=$(echo ${i} | sed -e "s|^${path_build}${path_settings}||")
 
       break
     done
 
-    if [[ $file == "*" && ! -f "${path_build}${path_settings}*" ]] ; then
+    if [[ ${file} == "*" && ! -f "${path_build}${path_settings}*" ]] ; then
       file=
     fi
 
-    if [[ $file != "" ]] ; then
-      if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+    if [[ ${file} != "" ]] ; then
+      if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
         install_print_first_or_always
 
         echo -e "${c_highlight}Installing Settings to: ${c_reset}${c_notice}${destination_settings}${c_reset}${c_highlight}.${c_reset}"
       fi
 
-      cp $verbose_common -R ${path_build}${path_settings}* ${destination_settings}
+      cp ${verbose_common} -R ${path_build}${path_settings}* ${destination_settings}
 
-      if [[ $? -ne 0 ]] ; then
-        if [[ $verbosity != "quiet" ]] ; then
+      if [[ ${?} -ne 0 ]] ; then
+        if [[ ${verbosity} != "quiet" ]] ; then
           install_print_first
 
           echo -e "${c_error}ERROR: failed to copy settings files from ${c_notice}${path_build}${path_settings}${c_error} to ${c_notice}${destination_settings}${c_error}.${c_reset}"
@@ -935,29 +935,29 @@ install_perform_install() {
     fi
   fi
 
-  if [[ $failure == "" && -d ${path_build}${path_documentation} && $enable_documentation == "yes" ]] ; then
+  if [[ ${failure} == "" && -d ${path_build}${path_documentation} && ${enable_documentation} == "yes" ]] ; then
     for i in ${path_build}${path_documentation}* ; do
 
-      file=$(echo $i | sed -e "s|^${path_build}${path_documentation}||")
+      file=$(echo ${i} | sed -e "s|^${path_build}${path_documentation}||")
 
       break
     done
 
-    if [[ $file == "*" && ! -f "${path_build}${path_documentation}*" ]] ; then
+    if [[ ${file} == "*" && ! -f "${path_build}${path_documentation}*" ]] ; then
       file=
     fi
 
-    if [[ $file != "" ]] ; then
-      if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+    if [[ ${file} != "" ]] ; then
+      if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
         install_print_first_or_always
 
         echo -e "${c_highlight}Installing Documentation to: ${c_reset}${c_notice}${destination_documentation}${c_reset}${c_highlight}.${c_reset}"
       fi
 
-      cp $verbose_common -R ${path_build}${path_documentation}* ${destination_documentation}
+      cp ${verbose_common} -R ${path_build}${path_documentation}* ${destination_documentation}
 
-      if [[ $? -ne 0 ]] ; then
-        if [[ $verbosity != "quiet" ]] ; then
+      if [[ ${?} -ne 0 ]] ; then
+        if [[ ${verbosity} != "quiet" ]] ; then
           install_print_first
 
           echo -e "${c_error}ERROR: failed to copy documentation files from ${c_notice}${path_build}${path_documentation}${c_error} to ${c_notice}${destination_documentation}${c_error}.${c_reset}"
@@ -968,7 +968,7 @@ install_perform_install() {
     fi
   fi
 
-  if [[ $failure == "" ]] ; then
+  if [[ ${failure} == "" ]] ; then
     return 0
   fi
 
@@ -977,7 +977,7 @@ install_perform_install() {
 
 install_print_first() {
 
-  if [[ $print_line_first == "yes" ]] ; then
+  if [[ ${print_line_first} == "yes" ]] ; then
     echo
 
     print_line_first=
@@ -986,11 +986,11 @@ install_print_first() {
 
 install_print_first_or_always() {
 
-  if [[ $print_line_first == "yes" ]] ; then
+  if [[ ${print_line_first} == "yes" ]] ; then
     echo
 
     print_line_first=
-  elif [[ $print_line_first == "no" ]] ; then
+  elif [[ ${print_line_first} == "no" ]] ; then
     print_line_first=
   else
     echo
@@ -999,7 +999,7 @@ install_print_first_or_always() {
 
 install_print_last() {
 
-  if [[ $print_line_last == "yes" ]] ; then
+  if [[ ${print_line_last} == "yes" ]] ; then
     echo
   fi
 }
index b24e799a8c0f95d2c5ef6701e3d96c2990e79711..4e899df0b9df5e5780f4ebd057f6c80777370b41 100644 (file)
@@ -16,7 +16,7 @@
 test_main() {
   local shell_command=bash
 
-  if [[ $SHELL_ENGINE == "zsh" ]] ; then
+  if [[ ${SHELL_ENGINE} == "zsh" ]] ; then
     shell_command=zsh
 
     emulate ksh
@@ -24,7 +24,7 @@ test_main() {
 
   local public_name="FLL Project Mass Test Script"
   local system_name=install
-  local called_name=$(basename $0)
+  local called_name=$(basename ${0})
   local version=0.7.0
 
   local grab_next=
@@ -47,9 +47,10 @@ test_main() {
 
   local build_compiler=
   local build_project=no
-  local path_scripts=$PWD/build/scripts/
+  local build_project_thread="thread"
+  local path_scripts=${PWD}/build/scripts/
   local path_scripts_package=${path_scripts}package.sh
-  local path_test=$PWD/test/
+  local path_test=${PWD}/test/
   local path_test_package=${path_test}package/
   local path_test_project=${path_test}project/
   local path_test_work=${path_test}work/
@@ -58,6 +59,8 @@ test_main() {
   local print_line_first="yes"
   local print_line_last="yes"
   local test_system=
+  local test_thread="thread"
+  local test_thread_individual="thread_individual"
 
   local context=
   local failure=
@@ -73,81 +76,87 @@ test_main() {
   if [[ $# -gt 0 ]] ; then
     t=$#
 
-    while [[ $i -lt $t ]] ; do
+    while [[ ${i} -lt ${t} ]] ; do
 
-      let i=$i+1
+      let i=${i}+1
 
-      if [[ $SHELL_ENGINE == "zsh" ]] ; then
+      if [[ ${SHELL_ENGINE} == "zsh" ]] ; then
         p=${(P)i}
       else
         p=${!i}
       fi
 
-      if [[ $grab_next == "" ]] ; then
-        if [[ $p == "-h" || $p == "--help" ]] ; then
+      if [[ ${grab_next} == "" ]] ; then
+        if [[ ${p} == "-h" || ${p} == "--help" ]] ; then
           do_help=yes
-        elif [[ $p == "+C" || $p == "++copyright" ]] ; then
+        elif [[ ${p} == "+C" || ${p} == "++copyright" ]] ; then
           do_copyright="yes"
-        elif [[ $p == "+d" || $p == "++dark" ]] ; then
+        elif [[ ${p} == "+d" || ${p} == "++dark" ]] ; then
           do_color=dark
           context="+d"
-        elif [[ $p == "+l" || $p == "++light" ]] ; then
+        elif [[ ${p} == "+l" || ${p} == "++light" ]] ; then
           do_color=light
           context="+l"
-        elif [[ $p == "+n" || $p == "++no_color" ]] ; then
+        elif [[ ${p} == "+n" || ${p} == "++no_color" ]] ; then
           do_color=none
           context="+n"
-        elif [[ $p == "+Q" || $p == "++quiet" ]] ; then
+        elif [[ ${p} == "+Q" || ${p} == "++quiet" ]] ; then
           verbosity="quiet"
           verbose="+Q"
           verbose_common=
-        elif [[ $p == "+E" || $p == "++error" ]] ; then
+        elif [[ ${p} == "+E" || ${p} == "++error" ]] ; then
           verbosity="error"
           verbose="+E"
           verbose_common=
-        elif [[ $p == "+N" || $p == "++normal" ]] ; then
+        elif [[ ${p} == "+N" || ${p} == "++normal" ]] ; then
           verbosity=
           verbose="+N"
           verbose_common=
-        elif [[ $p == "+V" || $p == "++verbose" ]] ; then
+        elif [[ ${p} == "+V" || ${p} == "++verbose" ]] ; then
           verbosity="verbose"
           verbose="+V"
           verbose_common="-v"
-        elif [[ $p == "+D" || $p == "++debug" ]] ; then
+        elif [[ ${p} == "+D" || ${p} == "++debug" ]] ; then
           verbosity="debug"
           verbose="+D"
           verbose_common="-v"
-        elif [[ $p == "+F" || $p == "++line_first_no" ]] ; then
+        elif [[ ${p} == "+F" || ${p} == "++line_first_no" ]] ; then
           print_line_first="no"
-        elif [[ $p == "+L" || $p == "++line_last_no" ]] ; then
+        elif [[ ${p} == "+L" || ${p} == "++line_last_no" ]] ; then
           print_line_last="no"
-        elif [[ $p == "+v" || $p == "++version" ]] ; then
-          echo $version
+        elif [[ ${p} == "+v" || ${p} == "++version" ]] ; then
+          echo ${version}
           return 0
-        elif [[ $p == "-c" || $p == "--compiler" ]] ; then
+        elif [[ ${p} == "-c" || ${p} == "--compiler" ]] ; then
           grab_next=build_compiler
-        elif [[ $p == "-p" || $p == "--project" ]] ; then
+        elif [[ ${p} == "-p" || ${p} == "--project" ]] ; then
           build_project=yes
-        elif [[ $p == "-s" || $p == "--path_scripts" ]] ; then
+        elif [[ ${p} == "-s" || ${p} == "--path_scripts" ]] ; then
           grab_next=path_scripts
           path_scripts=
-        elif [[ $p == "-t" || $p == "--path_test" ]] ; then
+        elif [[ ${p} == "-t" || ${p} == "--path_test" ]] ; then
           grab_next=path_test
           path_test=
-        elif [[ $test_system == "" ]] ; then
-          test_system="$p"
+        elif [[ ${p} == "-T" || ${p} == "--thread" ]] ; then
+          test_thread="thread"
+          test_thread_individual="thread_individual"
+        elif [[ ${p} == "-L" || ${p} == "--threadless" ]] ; then
+          test_thread="threadless"
+          test_thread_individual=""
+        elif [[ ${test_system} == "" ]] ; then
+          test_system="${p}"
         else
-          operation="$operation "
+          operation="${operation} "
           operation_failure=fail-too_many
         fi
       else
-        if [[ $grab_next == "build_compiler" ]] ; then
-          build_compiler=$p
-        elif [[ $grab_next == "path_scripts" ]] ; then
-          path_scripts=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|')
+        if [[ ${grab_next} == "build_compiler" ]] ; then
+          build_compiler=${p}
+        elif [[ ${grab_next} == "path_scripts" ]] ; then
+          path_scripts=$(echo ${p} | sed -e 's|^//*|/|' -e 's|/*$|/|')
           path_scripts_package=${path_scripts}package.sh
-        elif [[ $grab_next == "path_test" ]] ; then
-          path_test=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|')
+        elif [[ ${grab_next} == "path_test" ]] ; then
+          path_test=$(echo ${p} | sed -e 's|^//*|/|' -e 's|/*$|/|')
           path_test_package=${path_test}package/
           path_test_package_individual=${path_test_package}individual/
           path_test_package_stand_alone=${path_test_package}stand_alone/
@@ -162,29 +171,29 @@ test_main() {
     p=
   fi
 
-  if [[ $verbosity == "quiet" ]] ; then
+  if [[ ${verbosity} == "quiet" ]] ; then
     print_line_first="no"
     print_line_last="no"
   fi
 
   test_handle_colors
 
-  if [[ $do_help == "yes" ]] ; then
+  if [[ ${do_help} == "yes" ]] ; then
     test_help
     test_cleanup
 
     return 0
   fi
 
-  if [[ $do_copyright == "yes" ]] ; then
+  if [[ ${do_copyright} == "yes" ]] ; then
     test_copyright
     test_cleanup
 
     return 0
   fi
 
-  if [[ $operation_failure == "fail-too_many" ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${operation_failure} == "fail-too_many" ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       test_print_first
 
       echo -e "${c_error}ERROR: Only a single build system is supported, received the following test systems ${c_notice}${test_system} ${operation}${c_error} was not recognized.${c_reset}"
@@ -193,16 +202,16 @@ test_main() {
     let failure=1
   fi
 
-  if [[ $test_system == "" ]] ; then
+  if [[ ${test_system} == "" ]] ; then
     test_system=normal
   fi
 
-  if [[ $grab_next != "build_compiler" && $build_compiler == "" ]] ; then
+  if [[ ${grab_next} != "build_compiler" && ${build_compiler} == "" ]] ; then
     build_compiler=gcc
   fi
 
-  if [[ $failure -eq 0 && $test_system != "normal" && $test_system != "github" && $test_system != "gitlab" ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${failure} -eq 0 && ${test_system} != "normal" && ${test_system} != "github" && ${test_system} != "gitlab" ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       test_print_first
 
       echo -e "${c_error}ERROR: The test system must be one of ${c_notice}normal${c_error}, ${c_notice}github${c_error}, or  ${c_notice}gitlab${c_error}.${c_reset}"
@@ -211,8 +220,8 @@ test_main() {
     let failure=1
   fi
 
-  if [[ $failure -eq 0 && $build_compiler != "gcc" && $build_compiler != "clang" ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${failure} -eq 0 && ${build_compiler} != "gcc" && ${build_compiler} != "clang" ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       test_print_first
 
       echo -e "${c_error}ERROR: The build compiler ${c_notice}${build_compiler}${c_error} is not currently directly supported.${c_reset}"
@@ -221,8 +230,8 @@ test_main() {
     let failure=1
   fi
 
-  if [[ $failure -eq 0 && ! -d $path_scripts ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${failure} -eq 0 && ! -d ${path_scripts} ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       test_print_first
 
       echo -e "${c_error}ERROR: The build scripts path ${c_notice}${path_scripts}${c_error} is not a valid directory.${c_reset}"
@@ -231,8 +240,8 @@ test_main() {
     let failure=1
   fi
 
-  if [[ $failure -eq 0 && ! -f $path_scripts_package ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${failure} -eq 0 && ! -f ${path_scripts_package} ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       test_print_first
 
       echo -e "${c_error}ERROR: Unable to find the package build script file under the build scripts path at ${c_notice}${path_scripts_package}${c_error}.${c_reset}"
@@ -241,11 +250,11 @@ test_main() {
     let failure=1
   fi
 
-  if [[ $failure -eq 0 && ! -d $path_test ]] ; then
-    mkdir $verbose_common -p $path_test
+  if [[ ${failure} -eq 0 && ! -d ${path_test} ]] ; then
+    mkdir ${verbose_common} -p ${path_test}
 
-    if [[ $? -ne 0 ]] ; then
-      if [[ $verbosity != "quiet" ]] ; then
+    if [[ ${?} -ne 0 ]] ; then
+      if [[ ${verbosity} != "quiet" ]] ; then
         test_print_first
 
         echo -e "${c_error}ERROR: The test path ${c_notice}${path_test}${c_error}, does not exist and could not be created or exists and is not a valid directory.${c_reset}"
@@ -255,11 +264,11 @@ test_main() {
     fi
   fi
 
-  if [[ $failure -eq 0 && ! -d $path_test_package ]] ; then
-    mkdir $verbose_common $path_test_package
+  if [[ ${failure} -eq 0 && ! -d ${path_test_package} ]] ; then
+    mkdir ${verbose_common} ${path_test_package}
 
-    if [[ $? -ne 0 ]] ; then
-      if [[ $verbosity != "quiet" ]] ; then
+    if [[ ${?} -ne 0 ]] ; then
+      if [[ ${verbosity} != "quiet" ]] ; then
         test_print_first
 
         echo -e "${c_error}ERROR: The package path ${c_notice}${path_test_package}${c_error}, does not exist and could not be created or exists and is not a valid directory.${c_reset}"
@@ -269,11 +278,11 @@ test_main() {
     fi
   fi
 
-  if [[ $failure -eq 0 && ! -d $path_test_project ]] ; then
-    mkdir $verbose_common $path_test_project
+  if [[ ${failure} -eq 0 && ! -d ${path_test_project} ]] ; then
+    mkdir ${verbose_common} ${path_test_project}
 
-    if [[ $? -ne 0 ]] ; then
-      if [[ $verbosity != "quiet" ]] ; then
+    if [[ ${?} -ne 0 ]] ; then
+      if [[ ${verbosity} != "quiet" ]] ; then
         test_print_first
 
         echo -e "${c_error}ERROR: The test project path ${c_notice}${path_test_project}${c_error}, does not exist and could not be created or exists and is not a valid directory.${c_reset}"
@@ -283,11 +292,11 @@ test_main() {
     fi
   fi
 
-  if [[ $failure -eq 0 && ! -d $path_test_work ]] ; then
-    mkdir $verbose_common $path_test_work
+  if [[ ${failure} -eq 0 && ! -d ${path_test_work} ]] ; then
+    mkdir ${verbose_common} ${path_test_work}
 
-    if [[ $? -ne 0 ]] ; then
-      if [[ $verbosity != "quiet" ]] ; then
+    if [[ ${?} -ne 0 ]] ; then
+      if [[ ${verbosity} != "quiet" ]] ; then
         test_print_first
 
         echo -e "${c_error}ERROR: The test work path ${c_notice}${path_test_work}${c_error}, does not exist and could not be created or exists and is not a valid directory.${c_reset}"
@@ -297,20 +306,20 @@ test_main() {
     fi
   fi
 
-  if [[ $failure -eq 0 ]] ; then
+  if [[ ${failure} -eq 0 ]] ; then
     test_operate
     let failure=$?
   fi
 
-  if [[ $verbosity != "quiet" ]] ; then
-    if [[ $failure != "" || $verbosity != "error" ]] ; then
+  if [[ ${verbosity} != "quiet" ]] ; then
+    if [[ ${failure} != "" || ${verbosity} != "error" ]] ; then
       test_print_last
     fi
   fi
 
   test_cleanup
 
-  if [[ $failure == "" ]] ; then
+  if [[ ${failure} == "" ]] ; then
     return 0
   fi
 
@@ -319,14 +328,14 @@ test_main() {
 
 test_handle_colors() {
 
-  if [[ $do_color == "light" ]] ; then
+  if [[ ${do_color} == "light" ]] ; then
     c_error="\\033[1;31m"
     c_warning="\\033[0;31m"
     c_title="\\033[1;34m"
     c_highlight="\\033[0;34m"
     c_notice="\\033[0;01m"
     c_important="\\033[0;35m"
-  elif [[ $do_color == "none" ]] ; then
+  elif [[ ${do_color} == "none" ]] ; then
     c_reset=
     c_title=
     c_error=
@@ -351,7 +360,7 @@ test_help() {
   echo -e " ${c_important}github${c_reset}  Perform a test meant to be used within Github."
   echo -e " ${c_important}gitlab${c_reset}  Perform a test meant to be used within Gitlab (not yet supported)."
   echo
-  echo -e "${c_highlight}Options:${c_reset}"
+  echo -e "${c_highlight}Available Options:${c_reset}"
   echo -e " -${c_important}h${c_reset}, --${c_important}help${c_reset}           Print this help message."
   echo -e " +${c_important}C${c_reset}, ++${c_important}copyright${c_reset}      Print the copyright."
   echo -e " +${c_important}d${c_reset}, ++${c_important}dark${c_reset}           Output using colors that show up better on dark backgrounds."
@@ -366,11 +375,12 @@ test_help() {
   echo -e " +${c_important}F${c_reset}, ++${c_important}line_first_no${c_reset}  Disable printing of first line."
   echo -e " +${c_important}L${c_reset}, ++${c_important}line_last_no${c_reset}   Disable printing of last line."
   echo
-  echo -e "${c_highlight}Install Options:${c_reset}"
   echo -e " -${c_important}c${c_reset}, --${c_important}compiler${c_reset}      Specify the compiler, either gcc (default) or clang."
   echo -e " -${c_important}p${c_reset}, --${c_important}project${c_reset}       Designate that the project files must also be built."
   echo -e " -${c_important}s${c_reset}, --${c_important}path_scripts${c_reset}  Specify a custom directory where the build scripts are found."
   echo -e " -${c_important}t${c_reset}, --${c_important}path_test${c_reset}     Specify a custom directory where the test environment is found."
+  echo -e " -${c_important}T${c_reset}, --${c_important}thread${c_reset}        Compile code being tested with threads enabled."
+  echo -e " -${c_important}L${c_reset}, --${c_important}threadless${c_reset}    Compile code being tested with threads disabled."
 
   test_print_last
 }
@@ -396,30 +406,30 @@ test_operate() {
   local libraries_path="${work_path}libraries/shared/"
   local ci_arguments=
 
-  if [[ $PATH != "" ]] ; then
+  if [[ ${PATH} != "" ]] ; then
     env_path="${env_path}:${PATH}"
   fi
 
-  if [[ $LD_LIBRARY_PATH != "" ]] ; then
+  if [[ ${LD_LIBRARY_PATH} != "" ]] ; then
     env_libs="${env_libs}:${LD_LIBRARY_PATH}"
   fi
 
-  if [[ $test_system == "github" || $test_system == "gitlab" ]] ; then
+  if [[ ${test_system} == "github" || ${test_system} == "gitlab" ]] ; then
     ci_arguments="-d -I${includes_path} -d -L${libraries_path}"
 
     test_operate_ci_prebuild
 
-    if [[ $? -ne 0 ]] ; then
+    if [[ ${?} -ne 0 ]] ; then
       let failure=1
 
       return 1
     fi
   fi
 
-  if [[ $build_project == "yes" ]] ; then
+  if [[ ${build_project} == "yes" ]] ; then
     test_operate_build_tools
 
-    if [[ $? -ne 0 ]] ; then
+    if [[ ${?} -ne 0 ]] ; then
       let failure=1
 
       return 1
@@ -428,16 +438,16 @@ test_operate() {
 
   test_operate_build_individual
 
-  if [[ $? -ne 0 ]] ; then
+  if [[ ${?} -ne 0 ]] ; then
     let failure=1
 
     return 1
   fi
 
-  if [[ $test_system == "github" || $test_system == "gitlab" ]] ; then
+  if [[ ${test_system} == "github" || ${test_system} == "gitlab" ]] ; then
     test_operate_ci_pretest
 
-    if [[ $? -ne 0 ]] ; then
+    if [[ ${?} -ne 0 ]] ; then
       let failure=1
 
       return 1
@@ -451,9 +461,9 @@ test_operate() {
 
 test_operate_build_individual() {
   local project=
-  local path_original="$PWD/"
+  local path_original="${PWD}/"
 
-  if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+  if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
     test_print_first_or_always
 
     echo -e "${c_highlight}Cleaning and building package.${c_reset}"
@@ -461,16 +471,16 @@ test_operate_build_individual() {
     echo
   fi
 
-  if [[ $verbosity == "debug" ]] ; then
+  if [[ ${verbosity} == "debug" ]] ; then
     test_print_first_or_always
 
-    echo "$shell_command ${path_scripts_package} $verbose $context +F -d $path_test_package -i rebuild"
+    echo "${shell_command} ${path_scripts_package} ${verbose} ${context} +F -d ${path_test_package} -i rebuild"
   fi
 
-  $shell_command ${path_scripts_package} $verbose $context +F -d $path_test_package -i rebuild
+  ${shell_command} ${path_scripts_package} ${verbose} ${context} +F -d ${path_test_package} -i rebuild
 
-  if [[ $? -ne 0 ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${?} -ne 0 ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       test_print_first
 
       echo -e "${c_error}ERROR: Failed to clean and build the individual packages.${c_reset}"
@@ -479,22 +489,22 @@ test_operate_build_individual() {
     return 1
   fi
 
-  for project in $projects ; do
+  for project in ${projects} ; do
 
-    test_operate_build_project "$path_test_package_individual" "$path_test_work" "$project" individual
+    test_operate_build_project "${path_test_package_individual}" "${path_test_work}" "${project}" individual ${test_thread} ${test_thread_individual}
 
-    if [[ $? -ne 0 ]] ; then
+    if [[ ${?} -ne 0 ]] ; then
       let failure=1
 
-      cd $path_original
+      cd ${path_original}
 
       break;
     fi
 
-    cd $path_original
+    cd ${path_original}
   done
 
-  if [[ $failure == "" ]] ; then
+  if [[ ${failure} == "" ]] ; then
     return 0
   fi
 
@@ -502,14 +512,28 @@ test_operate_build_individual() {
 }
 
 test_operate_build_project() {
-  local path_="$1"
-  local destination="$2"
-  local project="$3"
-  local mode="$4"
-  local bootstrap="$5"
+  local path_="${1}"
+  local destination="${2}"
+  local project="${3}"
+  local mode="${4}"
+  local bootstrap="${5}"
+  local mode_thread_param=
+  local mode_thread_value=
+  local mode_thread_individual_param=
+  local mode_thread_individual_value=
+
+  if [[ ${6} != "" ]] ; then
+    local mode_thread_param="-m"
+    local mode_thread_value="${6}"
+  fi
+
+  if [[ ${7} != "" ]] ; then
+    local mode_thread_individual_param="-m"
+    local mode_thread_individual_value="${7}"
+  fi
 
   if [[ ! -d ${path_}${project}-${version}/ ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       test_print_first
 
       echo -e "${c_error}ERROR: Package directory '${c_notice}${path_}${project}-${version}${c_error}' is invalid or missing.${c_reset}"
@@ -518,7 +542,7 @@ test_operate_build_project() {
     return 1
   fi
 
-  if [[ $verbosity == "debug" ]] ; then
+  if [[ ${verbosity} == "debug" ]] ; then
     test_print_first_or_always
 
     echo -e "Running '${c_notice}cd ${path_}${project}-${version}/${c_reset}'."
@@ -526,8 +550,8 @@ test_operate_build_project() {
 
   cd ${path_}${project}-${version}/
 
-  if [[ $? -ne 0 ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${?} -ne 0 ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       test_print_first
 
       echo -e "${c_error}ERROR: Failed to change into directory '${c_notice}${path_}${project}-${version}${c_error}'.${c_reset}"
@@ -538,63 +562,63 @@ test_operate_build_project() {
     return 1
   fi
 
-  if [[ $bootstrap == "" ]] ; then
-    if [[ $verbosity == "debug" ]] ; then
+  if [[ ${bootstrap} == "" ]] ; then
+    if [[ ${verbosity} == "debug" ]] ; then
       test_print_first_or_always
 
-      if [[ $build_compiler == "gcc" ]] ; then
-        echo "PATH=\"$env_path\" LD_LIBRARY_PATH=\"$env_libs\" fake $verbose $context -w \"$destination\" -m $mode clean build $ci_arguments"
+      if [[ ${build_compiler} == "gcc" ]] ; then
+        echo "PATH=\"${env_path}\" LD_LIBRARY_PATH=\"${env_libs}\" fake ${verbose} ${context} -w \"${destination}\" -m ${mode} ${mode_thread_param} ${mode_thread_value} ${mode_thread_individual_param} ${mode_thread_individual_value} clean build ${ci_arguments}"
       else
-        echo "PATH=\"$env_path\" LD_LIBRARY_PATH=\"$env_libs\" fake $verbose $context -w \"$destination\" -m $mode -m $build_compiler clean make -f testfile $ci_arguments"
+        echo "PATH=\"${env_path}\" LD_LIBRARY_PATH=\"${env_libs}\" fake ${verbose} ${context} -w \"${destination}\" -m ${mode} ${mode_thread_param} ${mode_thread_value} -m ${build_compiler} ${mode_thread_individual_param} ${mode_thread_individual_value} clean make -f testfile ${ci_arguments}"
       fi
     fi
 
-    if [[ $build_compiler == "gcc" ]] ; then
-      PATH="$env_path" LD_LIBRARY_PATH="$env_libs" fake $verbose $context -w "$destination" -m $mode -m test clean build $ci_arguments
+    if [[ ${build_compiler} == "gcc" ]] ; then
+      PATH="${env_path}" LD_LIBRARY_PATH="${env_libs}" fake ${verbose} ${context} -w "${destination}" -m ${mode} ${mode_thread_param} ${mode_thread_value} ${mode_thread_individual_param} ${mode_thread_individual_value} -m test clean build ${ci_arguments}
     else
-      PATH="$env_path" LD_LIBRARY_PATH="$env_libs" fake $verbose $context -w "$destination" -m $mode -m test -m $build_compiler clean build $ci_arguments
+      PATH="${env_path}" LD_LIBRARY_PATH="${env_libs}" fake ${verbose} ${context} -w "${destination}" -m ${mode} ${mode_thread_param} ${mode_thread_value} ${mode_thread_individual_param} ${mode_thread_individual_value} -m test -m ${build_compiler} clean build ${ci_arguments}
     fi
   else
-    if [[ $SHELL_ENGINE == "zsh" ]] ; then
-      if [[ $verbosity == "debug" ]] ; then
+    if [[ ${SHELL_ENGINE} == "zsh" ]] ; then
+      if [[ ${verbosity} == "debug" ]] ; then
         test_print_first_or_always
 
-        if [[ $build_compiler == "gcc" ]] ; then
-          echo "zsh ./bootstrap.sh $verbose $context +F -w \"$destination\" -m $mode -m test build"
+        if [[ ${build_compiler} == "gcc" ]] ; then
+          echo "zsh ./bootstrap.sh ${verbose} ${context} +F -w \"${destination}\" -m ${mode} ${mode_thread_param} ${mode_thread_value} ${mode_thread_individual_param} ${mode_thread_individual_value} -m test build"
         else
-          echo "zsh ./bootstrap.sh $verbose $context +F -w \"$destination\" -m $mode -m test -m $build_compiler build"
+          echo "zsh ./bootstrap.sh ${verbose} ${context} +F -w \"${destination}\" -m ${mode} ${mode_thread_param} ${mode_thread_value} ${mode_thread_individual_param} ${mode_thread_individual_value} -m test -m ${build_compiler} build"
         fi
       fi
 
-      if [[ $build_compiler == "gcc" ]] ; then
-        zsh ./bootstrap.sh $verbose $context +F -w "$destination" -m $mode -m test build
+      if [[ ${build_compiler} == "gcc" ]] ; then
+        zsh ./bootstrap.sh ${verbose} ${context} +F -w "${destination}" -m ${mode} ${mode_thread_param} ${mode_thread_value} ${mode_thread_individual_param} ${mode_thread_individual_value} -m test build
       else
-        zsh ./bootstrap.sh $verbose $context +F -w "$destination" -m $mode -m test -m $build_compiler build
+        zsh ./bootstrap.sh ${verbose} ${context} +F -w "${destination}" -m ${mode} ${mode_thread_param} ${mode_thread_value} ${mode_thread_individual_param} ${mode_thread_individual_value} -m test -m ${build_compiler} build
       fi
     else
-      if [[ $verbosity == "debug" ]] ; then
+      if [[ ${verbosity} == "debug" ]] ; then
         test_print_first_or_always
 
-        if [[ $build_compiler == "gcc" ]] ; then
-          echo "./bootstrap.sh $verbose $context +F -w \"$destination\" -m $mode -m test build"
+        if [[ ${build_compiler} == "gcc" ]] ; then
+          echo "./bootstrap.sh ${verbose} ${context} +F -w \"${destination}\" -m ${mode} ${mode_thread_individual_param} ${mode_thread_individual_value} ${mode_thread_param} ${mode_thread_value} -m test build"
         else
-          echo "./bootstrap.sh $verbose $context +F -w \"$destination\" -m $mode -m test -m $build_compiler build"
+          echo "./bootstrap.sh ${verbose} ${context} +F -w \"${destination}\" -m ${mode} ${mode_thread_individual_param} ${mode_thread_individual_value} ${mode_thread_param} ${mode_thread_value} -m test -m ${build_compiler} build"
         fi
       fi
 
-      if [[ $build_compiler == "gcc" ]] ; then
-        ./bootstrap.sh $verbose $context +F -w "$destination" -m $mode -m test build
+      if [[ ${build_compiler} == "gcc" ]] ; then
+        ./bootstrap.sh ${verbose} ${context} +F -w "${destination}" -m ${mode} ${mode_thread_param} ${mode_thread_value} ${mode_thread_individual_param} ${mode_thread_individual_value} -m test build
       else
-        ./bootstrap.sh $verbose $context +F -w "$destination" -m $mode -m test -m $build_compiler build
+        ./bootstrap.sh ${verbose} ${context} +F -w "${destination}" -m ${mode} ${mode_thread_param} ${mode_thread_value} ${mode_thread_individual_param} ${mode_thread_individual_value} -m test -m ${build_compiler} build
       fi
     fi
   fi
 
-  if [[ $? -ne 0 ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${?} -ne 0 ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       test_print_first
 
-      echo -e "${c_error}ERROR: Failed to build $mode project '${c_notice}$project${c_reset}${c_error}'.${c_reset}"
+      echo -e "${c_error}ERROR: Failed to build ${mode} project '${c_notice}${project}${c_reset}${c_error}'.${c_reset}"
     fi
 
     let failure=1
@@ -602,22 +626,22 @@ test_operate_build_project() {
     return 1
   fi
 
-  if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
-    echo -e "Installing $mode project '${c_notice}$project${c_reset}'."
+  if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
+    echo -e "Installing ${mode} project '${c_notice}${project}${c_reset}'."
     echo
   fi
 
-  if [[ $SHELL_ENGINE == "zsh" ]] ; then
-    zsh ./install.sh $verbose $context +F +L -w "$destination"
+  if [[ ${SHELL_ENGINE} == "zsh" ]] ; then
+    zsh ./install.sh ${verbose} ${context} +F +L -w "${destination}"
   else
-    ./install.sh $verbose $context +F +L -w "$destination"
+    ./install.sh ${verbose} ${context} +F +L -w "${destination}"
   fi
 
-  if [[ $? -ne 0 ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${?} -ne 0 ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       test_print_first
 
-      echo -e "${c_error}ERROR: Failed to install $mode project '${c_notice}$project${c_reset}${c_error}'.${c_reset}"
+      echo -e "${c_error}ERROR: Failed to install ${mode} project '${c_notice}${project}${c_reset}${c_error}'.${c_reset}"
     fi
 
     let failure=1
@@ -629,9 +653,9 @@ test_operate_build_project() {
 }
 
 test_operate_build_tools() {
-  local path_original="$PWD/"
+  local path_original="${PWD}/"
 
-  if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+  if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
     test_print_first_or_always
 
     echo -e "${c_highlight}Building project build tools.${c_reset}"
@@ -639,16 +663,16 @@ test_operate_build_tools() {
     echo
   fi
 
-  if [[ $verbosity == "debug" ]] ; then
+  if [[ ${verbosity} == "debug" ]] ; then
     test_print_first_or_always
 
-    echo "$shell_command ${path_scripts_package} $verbose $context +F -d $path_test_package -S fake rebuild"
+    echo "${shell_command} ${path_scripts_package} ${verbose} ${context} +F -d ${path_test_package} -S fake rebuild"
   fi
 
-  $shell_command ${path_scripts_package} $verbose $context +F -d $path_test_package -S fake rebuild
+  ${shell_command} ${path_scripts_package} ${verbose} ${context} +F -d ${path_test_package} -S fake rebuild
 
-  if [[ $? -ne 0 ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${?} -ne 0 ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       test_print_first
 
       echo -e "${c_error}ERROR: Failed to clean and build the stand_alone fake package.${c_reset}"
@@ -657,15 +681,15 @@ test_operate_build_tools() {
     return 1
   fi
 
-  test_operate_build_project "$path_test_package_stand_alone" "$path_test_project" fake stand_alone bootstrap
+  test_operate_build_project "${path_test_package_stand_alone}" "${path_test_project}" fake stand_alone bootstrap ${build_project_thread}
 
-  if [[ $? -ne 0 ]] ; then
+  if [[ ${?} -ne 0 ]] ; then
     let failure=1
   fi
 
-  cd $path_original
+  cd ${path_original}
 
-  if [[ $failure == "" ]] ; then
+  if [[ ${failure} == "" ]] ; then
     return 0
   fi
 
@@ -674,14 +698,14 @@ test_operate_build_tools() {
 
 test_operate_ci_prebuild() {
   local clone_quiet=
-  local path_original="$PWD/"
+  local path_original="${PWD}/"
   local result=
 
-  if [[ $verbosity == "quiet" ]] ; then
+  if [[ ${verbosity} == "quiet" ]] ; then
     clone_quiet="-q"
   fi
 
-  if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+  if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
     test_print_first_or_always
 
     echo -e "${c_highlight}Performing Github Specific Pre-Build Operations.${c_reset}"
@@ -691,13 +715,13 @@ test_operate_ci_prebuild() {
 
   test_operate_ci_prebuild_libcap
 
-  if [[ $? -ne 0 ]] ; then
+  if [[ ${?} -ne 0 ]] ; then
     let failure=1
   fi
 
   cd ${path_original}
 
-  if [[ $failure == "" ]] ; then
+  if [[ ${failure} == "" ]] ; then
     return 0
   fi
 
@@ -706,14 +730,14 @@ test_operate_ci_prebuild() {
 
 test_operate_ci_pretest() {
   local clone_quiet=
-  local path_original="$PWD/"
+  local path_original="${PWD}/"
   local result=
 
-  if [[ $verbosity == "quiet" ]] ; then
+  if [[ ${verbosity} == "quiet" ]] ; then
     clone_quiet="-q"
   fi
 
-  if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+  if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
     test_print_first_or_always
 
     echo -e "${c_highlight}Performing Github Specific Pre-Test Operations.${c_reset}"
@@ -723,13 +747,13 @@ test_operate_ci_pretest() {
 
   test_operate_ci_pretest_cmocka
 
-  if [[ $? -ne 0 ]] ; then
+  if [[ ${?} -ne 0 ]] ; then
     let failure=1
   fi
 
   cd ${path_original}
 
-  if [[ $failure == "" ]] ; then
+  if [[ ${failure} == "" ]] ; then
     return 0
   fi
 
@@ -744,29 +768,29 @@ test_operate_ci_pretest_cmocka() {
   local cmocka_uri="https://github.com/coreboot/cmocka.git"
   local cmocka_branch="cmocka-1.1.5"
 
-  if [[ -d $cmocka_path ]] ; then
-    if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+  if [[ -d ${cmocka_path} ]] ; then
+    if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
       test_print_first_or_always
 
-      echo -e "Detected existing cmocka repository at \"${c_notice}$cmocka_path${c_reset}\", skipping the cmocka process."
+      echo -e "Detected existing cmocka repository at \"${c_notice}${cmocka_path}${c_reset}\", skipping the cmocka process."
     fi
 
     return 0
   fi
 
-  if [[ $verbosity == "debug" ]] ; then
+  if [[ ${verbosity} == "debug" ]] ; then
     test_print_first_or_always
 
-    echo "git clone $clone_quiet --single-branch -b $cmocka_branch \"$cmocka_uri\" $cmocka_path"
+    echo "git clone ${clone_quiet} --single-branch -b ${cmocka_branch} \"${cmocka_uri}\" ${cmocka_path}"
   fi
 
-  git clone $clone_quiet --single-branch -b $cmocka_branch "$cmocka_uri" $cmocka_path
+  git clone ${clone_quiet} --single-branch -b ${cmocka_branch} "${cmocka_uri}" ${cmocka_path}
 
-  if [[ $? -ne 0 ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${?} -ne 0 ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       test_print_first
 
-      echo -e "${c_error}ERROR: Failed to git clone '${c_notice}$cmocka_uri${c_error}' onto  '${c_notice}$cmocka_path${c_error}'.${c_reset}"
+      echo -e "${c_error}ERROR: Failed to git clone '${c_notice}${cmocka_uri}${c_error}' onto  '${c_notice}${cmocka_path}${c_error}'.${c_reset}"
     fi
 
     let failure=1
@@ -774,19 +798,19 @@ test_operate_ci_pretest_cmocka() {
     return 1
   fi
 
-  if [[ $verbosity == "debug" ]] ; then
+  if [[ ${verbosity} == "debug" ]] ; then
     test_print_first_or_always
 
-    echo "mkdir $verbose_common -p $cmocka_data"
+    echo "mkdir ${verbose_common} -p ${cmocka_data}"
   fi
 
-  mkdir $verbose_common -p $cmocka_data
+  mkdir ${verbose_common} -p ${cmocka_data}
 
-  if [[ $? -ne 0 ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${?} -ne 0 ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       test_print_first
 
-      echo -e "${c_error}ERROR: Failed to create cmocka build data directory '${c_notice}$cmocka_data${c_error}'.${c_reset}"
+      echo -e "${c_error}ERROR: Failed to create cmocka build data directory '${c_notice}${cmocka_data}${c_error}'.${c_reset}"
     fi
 
     let failure=1
@@ -794,19 +818,19 @@ test_operate_ci_pretest_cmocka() {
     return 1
   fi
 
-  if [[ $verbosity == "debug" ]] ; then
+  if [[ ${verbosity} == "debug" ]] ; then
     test_print_first_or_always
 
-    echo "cp $verbose_common $cmocka_settings $cmocka_data"
+    echo "cp ${verbose_common} ${cmocka_settings} ${cmocka_data}"
   fi
 
-  cp $verbose_common $cmocka_settings $cmocka_data
+  cp ${verbose_common} ${cmocka_settings} ${cmocka_data}
 
-  if [[ $? -ne 0 ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${?} -ne 0 ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       test_print_first
 
-      echo -e "${c_error}ERROR: Failed to copy cmocka build settings: '${c_notice}$cmocka_settings${c_error}'.${c_reset}"
+      echo -e "${c_error}ERROR: Failed to copy cmocka build settings: '${c_notice}${cmocka_settings}${c_error}'.${c_reset}"
     fi
 
     let failure=1
@@ -814,19 +838,19 @@ test_operate_ci_pretest_cmocka() {
     return 1
   fi
 
-  if [[ $verbosity == "debug" ]] ; then
+  if [[ ${verbosity} == "debug" ]] ; then
     test_print_first_or_always
 
-    echo "cd $cmocka_path"
+    echo "cd ${cmocka_path}"
   fi
 
-  cd $cmocka_path
+  cd ${cmocka_path}
 
-  if [[ $? -ne 0 ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${?} -ne 0 ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       test_print_first
 
-      echo -e "${c_error}ERROR: Failed to change cmocka source directory '${c_notice}$cmocka_path${c_error}'.${c_reset}"
+      echo -e "${c_error}ERROR: Failed to change cmocka source directory '${c_notice}${cmocka_path}${c_error}'.${c_reset}"
     fi
 
     let failure=1
@@ -834,16 +858,16 @@ test_operate_ci_pretest_cmocka() {
     return 1
   fi
 
-  if [[ $verbosity == "debug" ]] ; then
+  if [[ ${verbosity} == "debug" ]] ; then
     test_print_first_or_always
 
-    echo "PATH=\"$env_path\" LD_LIBRARY_PATH=\"$env_libs\" fake $verbose $context -w \"$path_test_work\" -m $build_compiler clean build $ci_arguments"
+    echo "PATH=\"${env_path}\" LD_LIBRARY_PATH=\"${env_libs}\" fake ${verbose} ${context} -w \"${path_test_work}\" -m ${build_compiler} -m ${test_thread} clean build ${ci_arguments}"
   fi
 
-  PATH="$env_path" LD_LIBRARY_PATH="$env_libs" fake $verbose $context -w "$path_test_work" -m $build_compiler clean build $ci_arguments
+  PATH="${env_path}" LD_LIBRARY_PATH="${env_libs}" fake ${verbose} ${context} -w "${path_test_work}" -m ${build_compiler} -m ${test_thread} clean build ${ci_arguments}
 
-  if [[ $? -ne 0 ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${?} -ne 0 ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       test_print_first
 
       echo -e "${c_error}ERROR: Failed to build '${c_notice}cmocka${c_error}'.${c_reset}"
@@ -854,16 +878,16 @@ test_operate_ci_pretest_cmocka() {
     return 1
   fi
 
-  if [[ $verbosity == "debug" ]] ; then
+  if [[ ${verbosity} == "debug" ]] ; then
     test_print_first_or_always
 
-    echo "cp $verbose_common -R ${cmocka_build}includes/* ${work_path}includes/"
+    echo "cp ${verbose_common} -R ${cmocka_build}includes/* ${work_path}includes/"
   fi
 
-  cp $verbose_common -R ${cmocka_build}includes/* ${work_path}includes/
+  cp ${verbose_common} -R ${cmocka_build}includes/* ${work_path}includes/
 
-  if [[ $? -ne 0 ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${?} -ne 0 ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       test_print_first
 
       echo -e "${c_error}ERROR: Failed to install cmocka headers to '${c_notice}${work_path}includes/${c_error}'.${c_reset}"
@@ -874,16 +898,16 @@ test_operate_ci_pretest_cmocka() {
     return 1
   fi
 
-  if [[ $verbosity == "debug" ]] ; then
+  if [[ ${verbosity} == "debug" ]] ; then
     test_print_first_or_always
 
-    echo "cp $verbose_common -R ${cmocka_build}libraries/shared/* ${work_path}libraries/shared/"
+    echo "cp ${verbose_common} -R ${cmocka_build}libraries/shared/* ${work_path}libraries/shared/"
   fi
 
-  cp $verbose_common -R ${cmocka_build}libraries/shared/* ${work_path}libraries/shared/
+  cp ${verbose_common} -R ${cmocka_build}libraries/shared/* ${work_path}libraries/shared/
 
-  if [[ $? -ne 0 ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${?} -ne 0 ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       test_print_first
 
       echo -e "${c_error}ERROR: Failed to install cmocka libraries to '${c_notice}${work_path}libraries/shared/${c_error}'.${c_reset}"
@@ -902,29 +926,29 @@ test_operate_ci_prebuild_libcap() {
   local libcap_uri="https://github.com/thekevinday/kernel.org-libcap.git"
   local libcap_branch="master"
 
-  if [[ -d $libcap_path ]] ; then
-    if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+  if [[ -d ${libcap_path} ]] ; then
+    if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
       test_print_first_or_always
 
-      echo -e "Detected existing libcap repository at \"${c_notice}$libcap_path${c_reset}\", skipping the libcap process."
+      echo -e "Detected existing libcap repository at \"${c_notice}${libcap_path}${c_reset}\", skipping the libcap process."
     fi
 
     return 0
   fi
 
-  if [[ $verbosity == "debug" ]] ; then
+  if [[ ${verbosity} == "debug" ]] ; then
     test_print_first_or_always
 
-    echo "git clone $clone_quiet --single-branch -b $libcap_branch \"$libcap_uri\" $libcap_path"
+    echo "git clone ${clone_quiet} --single-branch -b ${libcap_branch} \"${libcap_uri}\" ${libcap_path}"
   fi
 
-  git clone $clone_quiet --single-branch -b $libcap_branch "$libcap_uri" $libcap_path
+  git clone ${clone_quiet} --single-branch -b ${libcap_branch} "${libcap_uri}" ${libcap_path}
 
-  if [[ $? -ne 0 ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${?} -ne 0 ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       test_print_first
 
-      echo -e "${c_error}ERROR: Failed to git clone '${c_notice}$libcap_uri${c_error}' onto  '${c_notice}$libcap_path${c_error}'.${c_reset}"
+      echo -e "${c_error}ERROR: Failed to git clone '${c_notice}${libcap_uri}${c_error}' onto  '${c_notice}${libcap_path}${c_error}'.${c_reset}"
     fi
 
     let failure=1
@@ -932,19 +956,19 @@ test_operate_ci_prebuild_libcap() {
     return 1
   fi
 
-  if [[ $verbosity == "debug" ]] ; then
+  if [[ ${verbosity} == "debug" ]] ; then
     test_print_first_or_always
 
-    echo "cd $libcap_path"
+    echo "cd ${libcap_path}"
   fi
 
-  cd $libcap_path
+  cd ${libcap_path}
 
-  if [[ $? -ne 0 ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${?} -ne 0 ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       test_print_first
 
-      echo -e "${c_error}ERROR: Failed to change libcap source directory '${c_notice}$libcap_path${c_error}'.${c_reset}"
+      echo -e "${c_error}ERROR: Failed to change libcap source directory '${c_notice}${libcap_path}${c_error}'.${c_reset}"
 
       test_print_last
     fi
@@ -954,7 +978,7 @@ test_operate_ci_prebuild_libcap() {
     return 1
   fi
 
-  if [[ $verbosity == "debug" ]] ; then
+  if [[ ${verbosity} == "debug" ]] ; then
     test_print_first_or_always
 
     echo "make MANDIR=${work_path}fake/ SBINDIR=${work_path}fake/ INCDIR=${work_path}includes/ LIBDIR=${work_path}libraries/shared/ PKGCONFIGDIR=${work_path}fake/ install"
@@ -962,8 +986,8 @@ test_operate_ci_prebuild_libcap() {
 
   make MANDIR=${work_path}fake/ SBINDIR=${work_path}fake/ INCDIR=${work_path}includes/ LIBDIR=${work_path}libraries/shared/ PKGCONFIGDIR=${work_path}fake/ install
 
-  if [[ $? -ne 0 ]] ; then
-    if [[ $verbosity != "quiet" ]] ; then
+  if [[ ${?} -ne 0 ]] ; then
+    if [[ ${verbosity} != "quiet" ]] ; then
       test_print_first
 
       echo -e "${c_error}ERROR: Failed to build and install libcap into the work directory '${c_notice}${work_path}${c_error}'.${c_reset}"
@@ -981,24 +1005,30 @@ test_operate_ci_prebuild_libcap() {
 
 test_operate_tests() {
   local project=
-  local path_original="$PWD/"
-  local destination="$path_test_work"
+  local path_original="${PWD}/"
+  local destination="${path_test_work}"
+  local thread_individual_param=
+  local thread_individual_value="${test_thread_individual}"
+
+  if [[ ${test_thread_individual} != "" ]] ; then
+    thread_individual_param="-m"
+  fi
 
-  for project in $projects ; do
+  for project in ${projects} ; do
 
-    if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+    if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
       test_print_first_or_always
 
-      echo -e "${c_highlight}Testing Project $project.${c_reset}"
+      echo -e "${c_highlight}Testing Project ${project}.${c_reset}"
       echo -e "${c_title}--------------------------------------${c_reset}"
       echo
     fi
 
-    if [[ ! -d $path_test_package_individual$project-$version/ ]] ; then
-      if [[ $verbosity != "quiet" ]] ; then
+    if [[ ! -d ${path_test_package_individual}${project}-${version}/ ]] ; then
+      if [[ ${verbosity} != "quiet" ]] ; then
         test_print_first
 
-        echo -e "${c_error}ERROR: Package directory '${c_notice}$path_test_package_individual$project-$version${c_error}' is invalid or missing.${c_reset}"
+        echo -e "${c_error}ERROR: Package directory '${c_notice}${path_test_package_individual}${project}-${version}${c_error}' is invalid or missing.${c_reset}"
 
         test_print_last
       fi
@@ -1006,38 +1036,38 @@ test_operate_tests() {
       let failure=1
     fi
 
-    if [[ $failure == "" ]] ; then
-      if [[ ! -f $path_test_package_individual$project-$version/data/build/testfile ]] ; then
-        if [[ $(echo $projects_no_tests | grep -o "\<$project\>") == "" ]] ; then
-          if [[ $verbosity == "verbose" || $verbosity == "debug" ]] ; then
+    if [[ ${failure} == "" ]] ; then
+      if [[ ! -f ${path_test_package_individual}${project}-${version}/data/build/testfile ]] ; then
+        if [[ $(echo ${projects_no_tests} | grep -o "\<${project}\>") == "" ]] ; then
+          if [[ ${verbosity} == "verbose" || ${verbosity} == "debug" ]] ; then
             test_print_first_or_always
 
-            echo -e "${c_warning}WARNING: Project '${c_notice}$project${c_warning}' does not have a testfile.${c_reset}"
+            echo -e "${c_warning}WARNING: Project '${c_notice}${project}${c_warning}' does not have a testfile.${c_reset}"
           fi
         else
           test_print_first_or_always
 
-          echo -e "Project '${c_notice}$project${c_reset}' has no tests and is not expected to.${c_reset}"
+          echo -e "Project '${c_notice}${project}${c_reset}' has no tests and is not expected to.${c_reset}"
         fi
 
         continue
       fi
     fi
 
-    if [[ $failure == "" ]] ; then
-      if [[ $verbosity == "debug" ]] ; then
+    if [[ ${failure} == "" ]] ; then
+      if [[ ${verbosity} == "debug" ]] ; then
         test_print_first_or_always
 
-        echo -e "Running '${c_notice}cd $path_test_package_individual$project-$version/${c_reset}'."
+        echo -e "Running '${c_notice}cd ${path_test_package_individual}${project}-${version}/${c_reset}'."
       fi
 
-      cd $path_test_package_individual$project-$version/
+      cd ${path_test_package_individual}${project}-${version}/
 
-      if [[ $? -ne 0 ]] ; then
-        if [[ $verbosity != "quiet" ]] ; then
+      if [[ ${?} -ne 0 ]] ; then
+        if [[ ${verbosity} != "quiet" ]] ; then
           test_print_first
 
-          echo -e "${c_error}ERROR: Failed to change into directory '${c_notice}$path_test_package_individual$project-$version${c_error}'.${c_reset}"
+          echo -e "${c_error}ERROR: Failed to change into directory '${c_notice}${path_test_package_individual}${project}-${version}${c_error}'.${c_reset}"
 
           test_print_last
         fi
@@ -1046,28 +1076,28 @@ test_operate_tests() {
       fi
     fi
 
-    if [[ $failure == "" ]] ; then
-      if [[ $verbosity == "debug" ]] ; then
+    if [[ ${failure} == "" ]] ; then
+      if [[ ${verbosity} == "debug" ]] ; then
         test_print_first_or_always
 
-        if [[ $build_compiler == "gcc" ]] ; then
-          echo "PATH=\"$env_path\" LD_LIBRARY_PATH=\"$env_libs\" fake $verbose $context -w \"$destination\" -m individual -m test clean make -f testfile $ci_arguments"
+        if [[ ${build_compiler} == "gcc" ]] ; then
+          echo "PATH=\"${env_path}\" LD_LIBRARY_PATH=\"${env_libs}\" fake ${verbose} ${context} -w \"${destination}\" -m individual -m ${test_thread} ${thread_individual_param} ${thread_individual_value} -m test clean make -f testfile ${ci_arguments}"
         else
-          echo "PATH=\"$env_path\" LD_LIBRARY_PATH=\"$env_libs\" fake $verbose $context -w \"$destination\" -m individual -m test -m $build_compiler clean make -f testfile $ci_arguments"
+          echo "PATH=\"${env_path}\" LD_LIBRARY_PATH=\"${env_libs}\" fake ${verbose} ${context} -w \"${destination}\" -m individual -m ${test_thread} ${thread_individual_param} ${thread_individual_value} -m test -m ${build_compiler} clean make -f testfile ${ci_arguments}"
         fi
       fi
 
-      if [[ $build_compiler == "gcc" ]] ; then
-        PATH="$env_path" LD_LIBRARY_PATH="$env_libs" fake $verbose $context -w "$destination" -m individual -m test clean make -f testfile $ci_arguments
+      if [[ ${build_compiler} == "gcc" ]] ; then
+        PATH="${env_path}" LD_LIBRARY_PATH="${env_libs}" fake ${verbose} ${context} -w "${destination}" -m individual -m ${test_thread} ${thread_individual_param} ${thread_individual_value} -m test clean make -f testfile ${ci_arguments}
       else
-        PATH="$env_path" LD_LIBRARY_PATH="$env_libs" fake $verbose $context -w "$destination" -m individual -m test -m $build_compiler clean make -f testfile $ci_arguments
+        PATH="${env_path}" LD_LIBRARY_PATH="${env_libs}" fake ${verbose} ${context} -w "${destination}" -m individual -m ${test_thread} ${thread_individual_param} ${thread_individual_value} -m test -m ${build_compiler} clean make -f testfile ${ci_arguments}
       fi
 
-      if [[ $? -ne 0 ]] ; then
-        if [[ $verbosity != "quiet" ]] ; then
+      if [[ ${?} -ne 0 ]] ; then
+        if [[ ${verbosity} != "quiet" ]] ; then
           test_print_first
 
-          echo -e "${c_error}ERROR: Failure while testing project '${c_notice}$project${c_reset}${c_error}'.${c_reset}"
+          echo -e "${c_error}ERROR: Failure while testing project '${c_notice}${project}${c_reset}${c_error}'.${c_reset}"
 
           test_print_last
         fi
@@ -1076,14 +1106,14 @@ test_operate_tests() {
       fi
     fi
 
-    cd $path_original
+    cd ${path_original}
 
-    if [[ $failure != "" ]] ; then
+    if [[ ${failure} != "" ]] ; then
       break;
     fi
   done
 
-  if [[ $failure == "" ]] ; then
+  if [[ ${failure} == "" ]] ; then
     return 0
   fi
 
@@ -1092,7 +1122,7 @@ test_operate_tests() {
 
 test_print_first() {
 
-  if [[ $print_line_first == "yes" ]] ; then
+  if [[ ${print_line_first} == "yes" ]] ; then
     echo
 
     print_line_first=
@@ -1101,11 +1131,11 @@ test_print_first() {
 
 test_print_first_or_always() {
 
-  if [[ $print_line_first == "yes" ]] ; then
+  if [[ ${print_line_first} == "yes" ]] ; then
     echo
 
     print_line_first=
-  elif [[ $print_line_first == "no" ]] ; then
+  elif [[ ${print_line_first} == "no" ]] ; then
     print_line_first=
   else
     echo
@@ -1114,7 +1144,7 @@ test_print_first_or_always() {
 
 test_print_last() {
 
-  if [[ $print_line_last == "yes" ]] ; then
+  if [[ ${print_line_last} == "yes" ]] ; then
     echo
   fi
 }
index f240f7c0dcc5baf606924920ac1f4d94f324ceda..c83ec0d0e64d430c428a43a6d13e58fc71fabc95 100644 (file)
 #define _di_f_signal_set_has_
 #define _di_f_signal_suspend_
 //#define _di_f_signal_t_
-#define _di_f_signal_wait_
+//#define _di_f_signal_wait_
 #define _di_f_signal_wait_until_
 
 #define _di_f_states_adjust_
 #define _di_f_thread_attribute_stack_set_
 #define _di_f_thread_attribute_stack_size_get_
 #define _di_f_thread_attribute_stack_size_set_
-#define _di_f_thread_attribute_t_
+//#define _di_f_thread_attribute_t_
 #define _di_f_thread_barrier_attribute_create_
 #define _di_f_thread_barrier_attribute_delete_
 #define _di_f_thread_barrier_attributes_adjust_
 #define _di_f_thread_barrier_t_
 #define _di_f_thread_barrier_wait_
 #define _di_f_thread_caller_
-#define _di_f_thread_cancel_
-#define _di_f_thread_cancel_state_set_
+//#define _di_f_thread_cancel_
+//#define _di_f_thread_cancel_state_set_
 #define _di_f_thread_cancel_test_
 #define _di_f_thread_cancel_type_set_
 #define _di_f_thread_clock_get_id_
 #define _di_f_thread_condition_t_
 #define _di_f_thread_condition_wait_
 #define _di_f_thread_condition_wait_timed_
-#define _di_f_thread_create_
+//#define _di_f_thread_create_
 #define _di_f_thread_detach_
 #define _di_f_thread_exit_
 #define _di_f_thread_ids_adjust_
 #define _di_f_thread_ids_increase_by_
 #define _di_f_thread_ids_resize_
 #define _di_f_thread_ids_t_
-#define _di_f_thread_id_t_
-#define _di_f_thread_join_
+//#define _di_f_thread_id_t_
+//#define _di_f_thread_join_
 #define _di_f_thread_join_timed_
 #define _di_f_thread_join_try_
 #define _di_f_thread_key_create_
index c7b225e40dc36b248e04edd058dfe34d1d95ea3c..c08936d5b1011e63db483a4a9789aaec840f94e1 100644 (file)
@@ -1,7 +1,15 @@
 # fss-0001
 #
 # A custom build for compiling fake as a stand alone binary building in all of the FLL dependencies.
-# This will compile a program that does not have a libfake.so library.
+# This will compile a program that does not have a libfake.so library and builds all of the FLL dependencies into the resulting program.
+#
+# Modes:
+#   - stand_alone: The stand alone build mode, which in general should always be used.
+#   - clang:       Use clang rather than the default, which is generally gcc.
+#   - test:        Compile for a test, such as unit testing.
+#   - fanalyzer:   Compile using GCC's -fanalyzer compile time option.
+#   - thread:      Compile with thread support.
+#   - threadless:  Compile without thread support.
 #
 
 build_name fake
@@ -12,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes stand_alone clang fanalyzer
-modes_default stand_alone
+modes stand_alone clang test fanalyzer thread threadless
+modes_default stand_alone thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -46,13 +54,14 @@ build_sources_program fll/level_0/rip.c fll/level_0/rip/utf.c fll/level_0/privat
 build_sources_program fll/level_0/signal.c
 build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c fll/level_0/string/private-dynamic.c fll/level_0/string/private-dynamics.c fll/level_0/string/private-dynamicss.c fll/level_0/string/private-maps.c fll/level_0/string/private-mapss.c fll/level_0/string/private-map_multis.c fll/level_0/string/private-map_multiss.c fll/level_0/string/private-quantitys.c fll/level_0/string/private-quantityss.c fll/level_0/string/private-ranges.c fll/level_0/string/private-rangess.c fll/level_0/string/private-triples.c fll/level_0/string/private-tripless.c
 build_sources_program fll/level_0/string/dynamic.c fll/level_0/string/dynamics.c fll/level_0/string/dynamicss.c fll/level_0/string/map.c fll/level_0/string/maps.c fll/level_0/string/mapss.c fll/level_0/string/map_multi.c fll/level_0/string/map_multis.c fll/level_0/string/map_multiss.c fll/level_0/string/quantity.c fll/level_0/string/quantitys.c fll/level_0/string/quantityss.c fll/level_0/string/range.c fll/level_0/string/ranges.c fll/level_0/string/rangess.c fll/level_0/string/static.c fll/level_0/string/statics.c fll/level_0/string/staticss.c fll/level_0/string/triple.c fll/level_0/string/triples.c fll/level_0/string/tripless.c
-build_sources_program fll/level_0/thread.c fll/level_0/private-thread.c fll/level_0/thread/attribute.c fll/level_0/thread/barrier.c fll/level_0/thread/barrier_attribute.c fll/level_0/thread/condition.c fll/level_0/thread/condition_attribute.c fll/level_0/thread/id.c fll/level_0/thread/key.c fll/level_0/thread/lock.c fll/level_0/thread/lock_attribute.c fll/level_0/thread/mutex.c fll/level_0/thread/mutex_attribute.c fll/level_0/thread/once.c fll/level_0/thread/semaphore.c fll/level_0/thread/set.c fll/level_0/thread/spin.c
 build_sources_program fll/level_0/type_array/array_length.c fll/level_0/type_array/cell.c fll/level_0/type_array/fll_id.c fll/level_0/type_array/int8.c fll/level_0/type_array/int16.c fll/level_0/type_array/int32.c fll/level_0/type_array/int64.c fll/level_0/type_array/int128.c fll/level_0/type_array/state.c fll/level_0/type_array/status.c fll/level_0/type_array/uint8.c fll/level_0/type_array/uint16.c fll/level_0/type_array/uint32.c fll/level_0/type_array/uint64.c fll/level_0/type_array/uint128.c
 build_sources_program fll/level_0/type_array/private-array_length.c fll/level_0/type_array/private-cell.c fll/level_0/type_array/private-fll_id.c fll/level_0/type_array/private-int8.c fll/level_0/type_array/private-int16.c fll/level_0/type_array/private-int32.c fll/level_0/type_array/private-int64.c fll/level_0/type_array/private-int128.c fll/level_0/type_array/private-state.c fll/level_0/type_array/private-status.c fll/level_0/type_array/private-uint8.c fll/level_0/type_array/private-uint16.c fll/level_0/type_array/private-uint32.c fll/level_0/type_array/private-uint64.c fll/level_0/type_array/private-uint128.c
 build_sources_program fll/level_0/utf.c fll/level_0/private-utf.c fll/level_0/private-utf_alphabetic.c fll/level_0/private-utf_combining.c fll/level_0/private-utf_control.c fll/level_0/private-utf_digit.c fll/level_0/private-utf_emoji.c fll/level_0/private-utf_numeric.c fll/level_0/private-utf_phonetic.c fll/level_0/private-utf_private.c fll/level_0/private-utf_punctuation.c fll/level_0/private-utf_subscript.c fll/level_0/private-utf_superscript.c fll/level_0/private-utf_symbol.c fll/level_0/private-utf_unassigned.c fll/level_0/private-utf_valid.c fll/level_0/private-utf_whitespace.c fll/level_0/private-utf_wide.c fll/level_0/private-utf_word.c fll/level_0/private-utf_zero_width.c
 build_sources_program fll/level_0/utf/common.c fll/level_0/utf/convert.c fll/level_0/utf/dynamic.c fll/level_0/utf/dynamics.c fll/level_0/utf/dynamicss.c fll/level_0/utf/is.c fll/level_0/utf/is_character.c fll/level_0/utf/map.c fll/level_0/utf/maps.c fll/level_0/utf/mapss.c fll/level_0/utf/map_multi.c fll/level_0/utf/map_multis.c fll/level_0/utf/map_multiss.c fll/level_0/utf/static.c fll/level_0/utf/statics.c fll/level_0/utf/staticss.c fll/level_0/utf/string.c fll/level_0/utf/triple.c fll/level_0/utf/triples.c fll/level_0/utf/tripless.c
 build_sources_program fll/level_0/utf/private-dynamic.c fll/level_0/utf/private-dynamics.c fll/level_0/utf/private-dynamicss.c fll/level_0/utf/private-maps.c fll/level_0/utf/private-mapss.c fll/level_0/utf/private-map_multis.c fll/level_0/utf/private-map_multiss.c fll/level_0/utf/private-string.c fll/level_0/utf/private-triples.c fll/level_0/utf/private-tripless.c
 
+build_sources_program-thread fll/level_0/thread.c fll/level_0/private-thread.c fll/level_0/thread/attribute.c fll/level_0/thread/barrier.c fll/level_0/thread/barrier_attribute.c fll/level_0/thread/condition.c fll/level_0/thread/condition_attribute.c fll/level_0/thread/id.c fll/level_0/thread/key.c fll/level_0/thread/lock.c fll/level_0/thread/lock_attribute.c fll/level_0/thread/mutex.c fll/level_0/thread/mutex_attribute.c fll/level_0/thread/once.c fll/level_0/thread/semaphore.c fll/level_0/thread/set.c fll/level_0/thread/spin.c
+
 build_sources_program fll/level_1/control_group.c
 build_sources_program fll/level_1/conversion.c fll/level_1/private-conversion.c fll/level_1/conversion/common.c
 build_sources_program fll/level_1/directory.c fll/level_1/private-directory.c
@@ -104,15 +113,18 @@ search_static yes
 environment PATH LD_LIBRARY_PATH
 environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
 
-#defines -D_di_libcap_
-#defines -D_f_file_rename_use_renameat2_
 defines -include sources/c/config.h -I sources/c/
-#defines -D_libcap_legacy_only_ -D_di_pthread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_f_file_rename_use_renameat2_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
 defines-clang -D_clang_not_a_compile_time_constant_workaround_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
 
-flags -O2 -z now -g -pthread -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses
+flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
+flags-test -O0 -fstack-protector -Wall
 flags-fanalyzer -fanalyzer
 
 flags_library -fPIC
index 89bdc8f6bf4c3ba546743752e33be62a60039446..6e14db10741f6b460d683ef01006089ab886c0ed 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name f_account
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index d10bcf11d2b2b9ca6a1f48c7318afa7dd5cc622c..1af1f293917847ebf341597395e117d199140d16 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name f_capability
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 7ca6fa7fc801877e0adbb5ec22cf715eb5ccd55e..12dfbc244314bee82316bf1461a688006f9bfe2d 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name f_color
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index f9c9bff4523eb0b4813de05420fce6d98a2f043a..73b1628ddd5a5e25f6fa83f6d1bf4ed047e04f75 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name f_compare
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index b2642ba2f2b1c5b7ef70ae60b7c8ecbfa833d6d5..8e963c2297b0f9135ccb3b11c98c1e93e1586903 100644 (file)
@@ -4,6 +4,17 @@
 #
 # Memory leaks in the test program can be checked for by running valgrind with this executable.
 #
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name test-f_compare
 
index 10b0bdf722b96cf96650912e68a4afb0a6d00dcb..f1e6bb5ef676ab565349f82c879dec6e04d8127f 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name f_console
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index bd041b97f0a75ad6abdb35739b687aab10d76371..a7608abdeaf47863ece04e136390dbcf98e8f340 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name f_control_group
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 3fd6f6165067d2e2b87ee8c9bb98cb567cf5e5bc..9a7edf7420c75a2a8981639c09c9fb35ea930636 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name f_conversion
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 9640884e0cc961a6c304d5f8f7fc9fae07a554d0..ba1a85adf5311996ee81356c3d6db030c2e7318f 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name f_directory
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index e36b30343c131942cb5e18500a4b60464e86c0ef..0857e116d28b98c7d2b6156050d2a57e71a2c1ef 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name f_environment
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 196cdc157ed7de46beaef910df75c682e2d282e9..81a3f9b8d11ff8c268dad0695802f6291b7d22a0 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name f_execute
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 3c864547f82e9ec80d90a12bbf421f0ebdb94e83..d594be05cfac9209a5d35dc40b06f75503c8d037 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name f_file
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 7463b75b8ab4b7a79a3d9d37ae379a9fffc5ef41..a70d27e9578c8a2bb295561e62746c5809eb6147 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name f_fss
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 6030fd22b7dffabc47460dfdeb288b92a741aaab..9cbb7ef36e83041bb340088cff4cfe13f0248aed 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name f_iki
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 31d6935a0ea1f469d546c36d5d5f7339a7bafcd5..6783b370cef27e9729a74527e9de22856c5a675e 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name f_limit
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 8d7daa4006165f90162108afc612d87a6fc1134d..d3030ea93b43d67890a49b948ab9193c5df0fff7 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name f_memory
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index cc35de0267b8a4a1b4bddef89280598f67398ed0..203bf02182023ed88b5ccafabb5efc5f529792d4 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name f_parse
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 31e7a2818f30ae28c682a87ed2ba3a04857a1a8d..56deccc99651bb0fe5ac6ca2d285355a9fdf183c 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name f_path
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 07d824018abf00c0a45cb4bb41aaac88115d81da..3dbd7426b908755c9937ebe994a22cd4d744f02c 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name f_pipe
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index e7df0425c64e5873fc519f1dfdf0c582356c5887..98c470347fb771d04b922f3ff133378f0235d6f1 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name f_print
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 85fe0915efcf7f886615243f8a7a2fa42e8608e2..1f1486321fbe397346ed9e37e7113988bca92b68 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name f_rip
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 7982c77aa16c58329ed6d857521ddea994a75bb0..a3ea03d3bf10df2e449ab4ada1bcef709b064bf6 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name f_serialize
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index d6b7c54c33a40cbe75c4f1da3db8e515804c6a96..8cacb8c638820910fb4e013ac9e031631a28d24b 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name f_signal
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index f84262ab6f32cb9dae19e5c70209228ecb4148f6..6e9e1fc3b231f705f2343b04b420c11fe35ec63a 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name f_socket
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 100ff878bbc079e9bc4b4c6cf38ec600c8d3a4ab..e7b3f52b5e3bbeb671183786d25a3b986b0cda08 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name f_status
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 10ce6451d8c0e1095ddfa09c9044547095d7d8d0..55ea400abb835c2250205d368cb649fe3ebdb387 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name f_status_string
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 58a1910e33906a937b32a4b6d35c869ca813270c..cacfd29c852b07f58bd71ae80edec8c4504cff8a 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name f_string
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index cf715294e5361638f8bbd0397aec61642ca51404..7a58ba08ffec8c58c275de9e2fe239f94ef90772 100644 (file)
@@ -1,4 +1,18 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
+# Note: This adds "threadless" and "thread" for consistency reasons. This should never use "threadless" and using "thread" is redundant.
+#
 
 build_name f_thread
 
@@ -8,8 +22,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -17,7 +31,7 @@ build_indexer ar
 build_indexer_arguments rcs
 build_language c
 
-build_libraries -pthread -lc
+build_libraries -lc
 build_libraries-individual -lf_memory -lf_string
 
 build_sources_library thread.c private-thread.c thread/attribute.c thread/barrier.c thread/barrier_attribute.c thread/condition.c thread/condition_attribute.c thread/id.c thread/key.c thread/lock.c thread/lock_attribute.c thread/mutex.c thread/mutex_attribute.c thread/once.c thread/semaphore.c thread/set.c thread/spin.c
@@ -52,6 +66,7 @@ environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY L
 defines -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
 
 flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses
+flags -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -O0 -fstack-protector -Wall
 flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
index eb700b2de98475bd0a4a95164fa47d234eb59b10..cc801ba2fa909cf37f2cced4570af92e0a062bdd 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name f_type
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index cafad5f4329fa43f4679e92bca657d6654ee651e..50afb441ae3e060bc19cd9af81c7e6dceb2bbb5f 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name f_type_array
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index f0d4c7be486d5b415274d763dbe4f4dcf91e7f77..202aff573e8ca3c58aa20de71d6cf736ad71acb3 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name f_utf
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 77ea4f1ae4e9d47f3fc07e36540d93a1b23c3d92..de36fba2ae1e6536c66ca6695f724f1f52f22d1b 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name fl_control_group
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 2374c35c096cecfc3d1640fa89d723d4fe4b2ae3..32aa0fc5b08674d9de4b51d03c6a0155e072e3ce 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name fl_conversion
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 99d9e88c928f2d03ecd13fa6d1678338c9ccf974..7cecb02596a8bc2b65982e9772bea5b594e729fa 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name fl_directory
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 5ae482341a34f42f3c04a80dc5080c8431cabf9c..b7e1040134aa36f6be561dced3b8667c8e2af9df 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name fl_environment
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index fd4b5d8797b5d5e977d59406721e8086ab955248..f179e8d361c0bd1791c41c4d23fd5c7e47583526 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name fl_execute
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -19,6 +31,7 @@ build_language c
 
 build_libraries -lc -lcap
 build_libraries-individual -lf_capability -lf_execute -lf_limit -lf_memory -lf_signal -lf_string -lf_type_array
+build_libraries-individual_thread -lf_thread
 
 build_sources_headers execute.h execute/common.h
 
@@ -49,8 +62,11 @@ environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY L
 
 #defines -D_di_libcap_
 defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
 
 flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -O0 -fstack-protector -Wall
 flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
index 5fc8b4d30ec7cb075ca1592169fc9a82857802e9..48f9f610aa604aa25ed512d6a3974f5382e82d1f 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name fl_fss
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index a4111569eadf09899a062f780502b65c9734abbc..b8863faee55f8bc0859d75e4b4b010829cbeca56 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name fl_iki
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 1cba3f9822430af73936e51da81357787ffb63ba..c70331f6291fee2b74b0d1b23a48ca532a25510b 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name fl_path
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 817b7c65de9e2e668b449b617370525d31f8267b..0c354ebaa4256f510f0ade0be3bf292ab177a8e6 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name fl_print
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 136888c7afd65089974c809d98d6aa783efb5689..a384c626fbce2e672a4eee34dabc9177fa4d81fd 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name fl_signal
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index d5852348e1093524ba07791e51ae72696f41fc48..4ab0c010bc1aa297b047a46acd9f06314e53a721 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name fl_status_string
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 6f132c5c15443133fc8754d883e92d3388199e04..91d36209979e2b5fa7f28e935609ea87c5bdc60d 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name fl_utf
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 1470c8a3941e93e9d10de1839bfb89a6c5a5b690..3161e30a07d1b088b551c10926273ec5a89cbea4 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name fl_utf_file
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 19d66b95577cd29ce0de095ee9ec6c63235324fd..7661641b05a698ab369d854f09b488afbc492914 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name fll_control_group
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 53b4ac2127fc7c1a4bb4ae560f5a46e2382b5dee..1c7daa347a079ca0a2e394c88f7bf2c5ae89cffe 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name fll_error
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 4e7057a4d611545a7e7799fc725126579695e6b3..9320de2142cb4a99b37b70bd1f364433f7e85741 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name fll_execute
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual individual_threadless clang test
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -18,8 +30,8 @@ build_indexer_arguments rcs
 build_language c
 
 build_libraries -lc -lcap
-build_libraries-individual -lfl_control_group -lfl_environment -lf_account -lf_capability -lf_control_group -lf_environment -lf_execute -lf_file -lf_limit -lf_memory -lf_path -lf_signal -lf_string -lf_thread -lf_type_array -lf_utf
-build_libraries-individual_threadless -lfl_control_group -lfl_environment -lf_account -lf_capability -lf_control_group -lf_environment -lf_execute -lf_file -lf_limit -lf_memory -lf_path -lf_signal -lf_string -lf_type_array -lf_utf
+build_libraries-individual -lfl_control_group -lfl_environment -lf_account -lf_capability -lf_control_group -lf_environment -lf_execute -lf_file -lf_limit -lf_memory -lf_path -lf_signal -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
 
 build_sources_library execute.c private-execute.c
 
@@ -51,14 +63,15 @@ environment PATH LD_LIBRARY_PATH
 environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
 
 #defines -D_di_libcap_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
-defines-individual_threadless -D_di_thread_support_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
 
 flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -O0 -fstack-protector -Wall
 flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
-flags-individual -pthread
 
 flags_library -fPIC
 flags_object -fPIC
index 04717345be04a1e0ac4b54fd37820e8b2862fb34..73667359ccf0299ba3836351732f93565c00004f 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name fll_file
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 704ea587028b6753ab15eebad8b4c74f51d08d54..80cf279b3b7ade5f034447a2bdac8eb6fcc0b59b 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name fll_fss
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 93fe52c78b26c12d74951375501c27c8aa401750..be8bd2b161d9377276779a4fd040e90d793e2cf0 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name fll_fss_status_string
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 384ddc719d2df4cb7a229e788e333fc81421b9ba..8b9fb0f8961e009b5e62f258180dc7f4a6eebe12 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name fll_iki
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index f00ecdadc62a268f543f0a547256f926b4053620..bce236c72f6e4fa23adae6c0c424f93528a3156b 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name fll_print
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 859c08799293d9066c09d36a01f5597174ed01d9..358dc1efe98082cab21d556163da0821855774c7 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name fll_program
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
 
 build_compiler gcc
 build_compiler-clang clang
index 8526e082954648fd90ff7093cac15ec83e771dc6..9fc38d1c0bdd92858755809ecfb1261876968a20 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 3
  *
- * Project: UTF8
+ * Project: Byte Dump
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  */
index c6653172ef1e71eb1aff738b1cbad4300feeacd6..490da41d8e72323bf3a9086dfbed1d8d565cd20f 100644 (file)
@@ -1,2 +1,6 @@
 # fss-0000
 
+_di_thread_support_ Disables thread support.
+
+_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
+_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
index c5d010d80969f0ca08e018eca8016522af0d4fdb..3b3d53b451b531e75dbf7a7ff1d716a9273fecc3 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name byte_dump
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual level monolithic clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -19,6 +31,7 @@ build_language c
 
 build_libraries -lc
 build_libraries-individual -lfll_error -lfll_print -lfll_program -lfl_conversion -lfl_print -lf_color -lf_console -lf_conversion -lf_file -lf_memory -lf_pipe -lf_print -lf_rip -lf_signal -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
@@ -55,10 +68,13 @@ search_static yes
 environment PATH LD_LIBRARY_PATH
 environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
 
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
 
 flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -O0 -fstack-protector -Wall
 flags-fanalyzer -fanalyzer
index 3476d7074e2fcdd8859287c6c89335af50a4704b..e46b5a4307ebc6e46a58b6f959b4f2beecbbadc9 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 3
  *
- * Project: UTF8
+ * Project: Control
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  */
index d44a0dec7574868e57dafe9b06419569b7772733..822a9b68892286c7a4d9f1265c945a89cf90800a 100644 (file)
@@ -1,5 +1,7 @@
 # fss-0000
 
+_di_thread_support_ Disables thread support.
+
 _controller_as_init_ The controller program is compiled as an init replacement and this control program should treat it as such.
 _override_controller_name_socket_ Use this as the default custom file name representing the controller program socket.
 _override_controller_name_socket_length_ The number of bytes representing the string in _override_controller_name_socket_ (not including the terminating NULL).
@@ -11,4 +13,6 @@ _override_controller_path_socket_suffix_ Use this as the default custom prefix p
 _override_controller_path_socket_suffix_length_ The number of bytes representing the string in _override_controller_path_socket_suffix_ (not including the terminating NULL).
 _override_control_path_settings_ Use this as the default full path to the controlsettings.
 _override_control_path_settings_length_ The number of bytes representing the string in _override_controller_path_settings_length_ (not including the terminating NULL).
+
+_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
 _pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
index 0d949798b2531d9c46172a65e27c887f0ec4b52c..fbad46344539865d1cc84892fa57f5731394b410 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name control
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual level monolithic clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -19,6 +31,7 @@ build_language c
 
 build_libraries -lc
 build_libraries-individual -lfll_error -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_fss -lfl_print -lfl_status_string -lf_color -lf_compare -lf_console -lf_conversion -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_socket -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
@@ -55,10 +68,13 @@ search_static yes
 environment PATH LD_LIBRARY_PATH
 environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
 
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
 
 flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -O0 -fstack-protector -Wall
 flags-fanalyzer -fanalyzer
index c9142f7c2229bbd7d352f593efe706bafa4e23bb..caf5f190b2959494732048b8df14353090bad550 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 3
  *
- * Project: UTF8
+ * Project: Controller
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  */
index 80818ea98e1750bbe4f12a89e1843124890a9e81..a5c6973bf7f4c68f08bfe84acb5457d8edbf9923 100644 (file)
@@ -1,6 +1,7 @@
 # fss-0000
 
 _di_libcap_ Disable libcap support, allow for compiling and linking without libcap (-lcap).
+_di_thread_support_ Disables thread support.
 
 _libcap_legacy_only_ Disable functionality provided by later versions of libcap (2.43 and later).
 _controller_as_init_ Build the program to run as if it were "init" by default, including displaying the program name as "Init Program" or "Init". This changes the main.c file only, leaving the library shareable between both "controller" and "init".
@@ -24,5 +25,6 @@ _override_controller_path_socket_prefix_ Use this as the default custom prefix p
 _override_controller_path_socket_prefix_length_ The number of bytes representing the string in _override_controller_path_socket_prefix_ (not including the terminating NULL).
 _override_controller_path_socket_suffix_ Use this as the default custom prefix prepended to the file name of the file representing the controller program socket.
 _override_controller_path_socket_suffix_length_ The number of bytes representing the string in _override_controller_path_socket_suffix_ (not including the terminating NULL).
+
 _pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
 _pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
index 021e2143088b3040f558df114be0a96f38ffa6bf..02682a66f3775d7b55b3a7be705e42ab4ecf46ab 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name controller
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual level monolithic clang test fanalyzer as_init
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless as_init
+modes_default monolithic thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -19,8 +31,10 @@ build_language c
 
 build_libraries -lc -lcap
 build_libraries-individual -lfll_control_group -lfll_error -lfll_execute -lfll_fss -lfll_print -lfll_program -lfll_status_string
+build_libraries-individual_thread -lf_thread
 build_libraries-individual -lfl_control_group -lfl_conversion -lfl_directory -lfl_environment -lfl_fss -lfl_iki -lfl_path -lfl_print
-build_libraries-individual -lf_account -lf_capability -lf_color -lf_compare -lf_console -lf_control_group -lf_conversion -lf_directory -lf_environment -lf_execute -lf_file -lf_fss -lf_iki -lf_limit -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_socket -lf_status_string -lf_string -lf_thread -lf_type_array -lf_utf
+build_libraries-individual -lf_account -lf_capability -lf_color -lf_compare -lf_console -lf_control_group -lf_conversion -lf_directory -lf_environment -lf_execute -lf_file -lf_fss -lf_iki -lf_limit -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_socket -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
@@ -67,11 +81,14 @@ search_static yes
 environment PATH LD_LIBRARY_PATH
 environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
 
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
 defines-as_init -D_controller_as_init_
 
-flags -O2 -z now -g -pthread -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -O0 -fstack-protector -Wall
 flags-fanalyzer -fanalyzer
index 059ec84ad3262b1f98c6c796faea1c02d71e2298..4f2b7d20d8ed82945ac9d8b45be233158278fca8 100644 (file)
@@ -17,20 +17,20 @@ extern "C" {
 #endif
 
 /**
- * The program defines.
+ * The program allocation defines.
  *
- * fake_*_d:
- *   - allocation_console: An allocation step used for small buffers specifically for console parameter.
- *   - allocation_large:   An allocation step used for buffers that are anticipated to have large buffers.
- *   - allocation_pipe:    A buffer size used for processing piped data.
- *   - allocation_small:   An allocation step used for buffers that are anticipated to have small buffers.
+ * fake_allocation_*_d:
+ *   - console: An allocation step used for small buffers specifically for console parameter.
+ *   - large:   An allocation step used for buffers that are anticipated to have large buffers.
+ *   - pipe:    A buffer size used for processing piped data.
+ *   - small:   An allocation step used for buffers that are anticipated to have small buffers.
  */
-#ifndef _di_fake_d_
+#ifndef _di_fake_allocation_d_
   #define fake_allocation_console_d 4
   #define fake_allocation_large_d   256
   #define fake_allocation_pipe_d    16384
   #define fake_allocation_small_d   16
-#endif // _di_fake_d_
+#endif // _di_fake_allocation_d_
 
 /**
  * The program signal defines.
index 4e5f42fa35003847140683f68ffe72ff6275c067..0e53db26b5bcf54029beb2877dec88eb3ccd6b5f 100644 (file)
 #include <fll/level_0/rip.h>
 #include <fll/level_0/signal.h>
 
+#ifndef _di_thread_support_
+  #include <fll/level_0/thread.h>
+#endif // _di_thread_support_
+
 // FLL-1 includes.
 #include <fll/level_1/control_group.h>
 #include <fll/level_1/conversion.h>
index e9989520f04ee5376202b6401549955445ac06f6..82abf48afdd2ffa1ce33679c35590cb671805871 100644 (file)
@@ -4,5 +4,6 @@ _di_libcap_ Disable libcap support, allow for compiling and linking without libc
 _di_thread_support_ Disables thread support.
 
 _libcap_legacy_only_ Disable functionality provided by later versions of libcap (2.43 and later).
+
 _pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
 _pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
index b82ecd617c3386c222697f766ed43499f39f2cf2..217e6a1a180633e6e7138db7686ba41efc4bd1c4 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name fake
 
@@ -11,8 +23,8 @@ version_target minor
 process_pre process_pre.sh
 process_post process_post.sh
 
-modes individual level monolithic clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -23,7 +35,8 @@ build_language c
 build_libraries -lc -lcap
 build_libraries-individual -lfll_error -lfll_execute -lfll_file -lfll_fss -lfll_print -lfll_program
 build_libraries-individual -lfl_control_group -lfl_conversion -lfl_directory -lfl_environment -lfl_fss -lfl_iki -lfl_path -lfl_print
-build_libraries-individual -lf_account -lf_capability -lf_color -lf_compare -lf_console -lf_control_group -lf_conversion -lf_directory -lf_environment -lf_execute -lf_file -lf_fss -lf_iki -lf_limit -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_thread -lf_type_array -lf_utf
+build_libraries-individual -lf_account -lf_capability -lf_color -lf_compare -lf_console -lf_control_group -lf_conversion -lf_directory -lf_environment -lf_execute -lf_file -lf_fss -lf_iki -lf_limit -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string  -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
@@ -68,10 +81,13 @@ search_static yes
 environment PATH LD_LIBRARY_PATH
 environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
 
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
 
-flags -O2 -z now -g -pthread -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -O0 -fstack-protector -Wall
 flags-fanalyzer -fanalyzer
index 27c01cf431ca8580ee35f5358c8287ac72b7ef1f..b2f32fe531be0526b8a4786ef04c1d77cb266643 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 3
  *
- * Project: UTF8
+ * Project: Firewall
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  */
index 546ad61163654d263d352494d0f85c19c5608ce1..82abf48afdd2ffa1ce33679c35590cb671805871 100644 (file)
@@ -1,7 +1,9 @@
 # fss-0000
 
 _di_libcap_ Disable libcap support, allow for compiling and linking without libcap (-lcap).
+_di_thread_support_ Disables thread support.
 
 _libcap_legacy_only_ Disable functionality provided by later versions of libcap (2.43 and later).
+
 _pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
 _pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
index 7d138124adb8ecc95bf0c1a0f8df6ed06e34dc9c..5948f9e24d66f830337f10871476c2e08cf307d6 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name firewall
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual level monolithic clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -18,7 +30,8 @@ build_indexer_arguments rcs
 build_language c
 
 build_libraries -lc -lcap
-build_libraries-individual -lfll_error -lfll_execute -lfll_fss -lfll_print -lfll_program -lfl_control_group -lfl_conversion -lfl_environment -lfl_fss -lfl_print -lf_account -lf_capability -lf_color -lf_compare -lf_console -lf_control_group -lf_conversion -lf_directory -lf_environment -lf_execute -lf_file -lf_fss -lf_limit -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_thread -lf_type_array -lf_utf
+build_libraries-individual -lfll_error -lfll_execute -lfll_fss -lfll_print -lfll_program -lfl_control_group -lfl_conversion -lfl_environment -lfl_fss -lfl_print -lf_account -lf_capability -lf_color -lf_compare -lf_console -lf_control_group -lf_conversion -lf_directory -lf_environment -lf_execute -lf_file -lf_fss -lf_limit -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
@@ -57,10 +70,13 @@ search_static yes
 environment PATH LD_LIBRARY_PATH
 environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
 
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
 
-flags -O2 -z now -g -pthread -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -O0 -fstack-protector -Wall
 flags-fanalyzer -fanalyzer
index 7c5dbd1b1a9617d5659be349e57bb8b7fbc79138..d32559896886928f487ae429bfd883e40acdc49f 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 3
  *
- * Project: UTF8
+ * Project: FSS Basic List Read
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  */
index c6653172ef1e71eb1aff738b1cbad4300feeacd6..490da41d8e72323bf3a9086dfbed1d8d565cd20f 100644 (file)
@@ -1,2 +1,6 @@
 # fss-0000
 
+_di_thread_support_ Disables thread support.
+
+_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
+_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
index 8ef54e0e8a7aafec4b1792d20bb8ef51b065a213..ae97d9edec92cebdba1fd1b68db2b43d6e7815bd 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name fss_basic_list_read
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual level monolithic clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -19,6 +31,7 @@ build_language c
 
 build_libraries -lc
 build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
@@ -55,10 +68,13 @@ search_static yes
 environment PATH LD_LIBRARY_PATH
 environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
 
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
 
 flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -O0 -fstack-protector -Wall
 flags-fanalyzer -fanalyzer
index ae4dbb717db61bdb5034317bae7cc83f74ee8d43..38c2460e9a014c62b02b2c9bbe13cc6897571047 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 3
  *
- * Project: UTF8
+ * Project: FSS Basic Read
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  */
index c6653172ef1e71eb1aff738b1cbad4300feeacd6..490da41d8e72323bf3a9086dfbed1d8d565cd20f 100644 (file)
@@ -1,2 +1,6 @@
 # fss-0000
 
+_di_thread_support_ Disables thread support.
+
+_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
+_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
index 93b37a28df700c42397a5c0141492a120d58c3db..7848db0a95253b5098f3038c9dc50d872466a35c 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name fss_basic_read
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual level monolithic clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -19,6 +31,7 @@ build_language c
 
 build_libraries -lc
 build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lf_color -lf_rip -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_compare -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
@@ -55,10 +68,13 @@ search_static yes
 environment PATH LD_LIBRARY_PATH
 environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
 
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
 
 flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -O0 -fstack-protector -Wall
 flags-fanalyzer -fanalyzer
index cd3d1028fe12eb335df9231da57cfd538aab5e33..fae9547c4e5cf7cac447fac206d528cf60a59303 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 3
  *
- * Project: UTF8
+ * Project: FSS Embedded List Read
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  */
index c6653172ef1e71eb1aff738b1cbad4300feeacd6..490da41d8e72323bf3a9086dfbed1d8d565cd20f 100644 (file)
@@ -1,2 +1,6 @@
 # fss-0000
 
+_di_thread_support_ Disables thread support.
+
+_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
+_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
index 8d2a9d3bf3c5fb84f2eadfd9f96887b3f6d837ff..e567a6ef8126c8bf99c14f9b3e5fa658870b0885 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name fss_embedded_list_read
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual level monolithic clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -19,6 +31,7 @@ build_language c
 
 build_libraries -lc
 build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
@@ -46,10 +59,13 @@ search_static yes
 environment PATH LD_LIBRARY_PATH
 environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
 
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
 
 flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -O0 -fstack-protector -Wall
 flags-fanalyzer -fanalyzer
index 69d157e1fd6e45f551b53e77a66df52c693e38b5..a350c54157736883850b41d15ea450aac61bb1b7 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 3
  *
- * Project: UTF8
+ * Project: FSS Embedded List Read
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  */
index c6653172ef1e71eb1aff738b1cbad4300feeacd6..490da41d8e72323bf3a9086dfbed1d8d565cd20f 100644 (file)
@@ -1,2 +1,6 @@
 # fss-0000
 
+_di_thread_support_ Disables thread support.
+
+_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
+_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
index cbc14987c36a935f1371dc370f55c0be1ab5c8b7..4c0e7b268e9680be9e23b8afc4fc7698a3cc04ad 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name fss_extended_list_read
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual level monolithic clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -19,6 +31,7 @@ build_language c
 
 build_libraries -lc
 build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
@@ -46,10 +59,13 @@ search_static yes
 environment PATH LD_LIBRARY_PATH
 environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
 
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
 
 flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -O0 -fstack-protector -Wall
 flags-fanalyzer -fanalyzer
index 9309eb6102cc9d2062bc2c5be6292845a3e643f6..251fb214f13fe40a40d87dd0f12432434a3f2d28 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 3
  *
- * Project: UTF8
+ * Project: FSS Extended Read
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  */
index c6653172ef1e71eb1aff738b1cbad4300feeacd6..490da41d8e72323bf3a9086dfbed1d8d565cd20f 100644 (file)
@@ -1,2 +1,6 @@
 # fss-0000
 
+_di_thread_support_ Disables thread support.
+
+_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
+_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
index 2bc3615649dffa9eaf70c7ac8eeeccec1c5b4531..99e48b2b936dcfc5d8840e1204bdd9b21d74234f 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name fss_extended_read
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual level monolithic clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -19,6 +31,7 @@ build_language c
 
 build_libraries -lc
 build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
@@ -55,10 +68,13 @@ search_static yes
 environment PATH LD_LIBRARY_PATH
 environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
 
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
 
 flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -O0 -fstack-protector -Wall
 flags-fanalyzer -fanalyzer
index 837567f9443eee46191fd73a43bf2c36d8d415d3..1dbfbef5e3c16cc75431aa45c0f665ae536fe413 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 3
  *
- * Project: UTF8
+ * Project: FSS Identify
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  */
index c6653172ef1e71eb1aff738b1cbad4300feeacd6..490da41d8e72323bf3a9086dfbed1d8d565cd20f 100644 (file)
@@ -1,2 +1,6 @@
 # fss-0000
 
+_di_thread_support_ Disables thread support.
+
+_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
+_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
index 521026c84b24e1bc99b207a7f5b014bf4a96b819..994bae0be814885c8fbc3ec430c7bb87b0ea779f 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name fss_identify
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual level monolithic clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -19,6 +31,7 @@ build_language c
 
 build_libraries -lc
 build_libraries-individual -lfll_error -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_fss -lfl_print -lf_color -lf_console -lf_conversion -lf_file -lf_fss -lf_memory -lf_parse -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
@@ -55,10 +68,13 @@ search_static yes
 environment PATH LD_LIBRARY_PATH
 environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
 
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
 
 flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -O0 -fstack-protector -Wall
 flags-fanalyzer -fanalyzer
index ee7be2650223ddf3d25badd256f077dfccde4174..6667a71b436b66aa1661e9987747f1e983f6c552 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 3
  *
- * Project: UTF8
+ * Project: FSS Payload Read
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  */
index c6653172ef1e71eb1aff738b1cbad4300feeacd6..490da41d8e72323bf3a9086dfbed1d8d565cd20f 100644 (file)
@@ -1,2 +1,6 @@
 # fss-0000
 
+_di_thread_support_ Disables thread support.
+
+_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
+_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
index 61811366cdbf21e9346bbfec43958e8f492b9434..3ace09b1d2112cd82fbd4d855b986c9cec4af27b 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name fss_payload_read
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual level monolithic clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithi threadc
 
 build_compiler gcc
 build_compiler-clang clang
@@ -19,6 +31,7 @@ build_language c
 
 build_libraries -lc
 build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
@@ -55,10 +68,13 @@ search_static yes
 environment PATH LD_LIBRARY_PATH
 environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
 
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
 
 flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -O0 -fstack-protector -Wall
 flags-fanalyzer -fanalyzer
index 60ce513e379e6c1c756e5a135df1948e3afbad04..2b8e7805fea11232a167bf8ea067c9ec4fc5eeff 100644 (file)
@@ -37,17 +37,45 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
   fll_program_standard_set_up(&data.program);
 
-  {
-    const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+  f_file_umask_get(&data.program.umask);
 
-    fss_write_setting_load(arguments, &data, 0);
-  }
+  #ifdef _di_thread_support_
+    {
+      const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+      fss_write_setting_load(arguments, &data);
+    }
+
+    fss_write_main(&data);
+  #else
+    {
+      f_thread_id_t id_signal;
+
+      memset(&id_signal, 0, sizeof(f_thread_id_t));
+
+      data.setting.state.status = f_thread_create(0, &id_signal, &fss_write_thread_signal, (void *) &data);
+
+      if (F_status_is_error(data.setting.state.status)) {
+        fss_write_print_error(&data.program.error, macro_fss_write_f(f_thread_create));
+      }
+      else {
+        {
+          const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+          fss_write_setting_load(arguments, &data);
+        }
 
-  fss_write_main(&data);
+        if (!fss_write_signal_check(&data)) {
+          fss_write_main(&data);
+        }
 
-  fss_write_setting_unload(&data);
+        f_thread_cancel(id_signal);
+        f_thread_join(id_signal, 0);
+      }
+    }
+  #endif // _di_thread_support_
 
-  fll_program_data_delete(&data.program);
+  fss_write_main_delete(&data);
 
   fll_program_standard_set_down(&data.program);
 
index eae411c6acc518794382d2e92b73b1607beca320..e8d53d26031a39ea70182a298f7ec88467cd0686 100644 (file)
@@ -37,17 +37,45 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
   fll_program_standard_set_up(&data.program);
 
-  {
-    const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+  f_file_umask_get(&data.program.umask);
 
-    fss_write_setting_load(arguments, &data, 0);
-  }
+  #ifdef _di_thread_support_
+    {
+      const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+      fss_write_setting_load(arguments, &data);
+    }
+
+    fss_write_main(&data);
+  #else
+    {
+      f_thread_id_t id_signal;
+
+      memset(&id_signal, 0, sizeof(f_thread_id_t));
+
+      data.setting.state.status = f_thread_create(0, &id_signal, &fss_write_thread_signal, (void *) &data);
+
+      if (F_status_is_error(data.setting.state.status)) {
+        fss_write_print_error(&data.program.error, macro_fss_write_f(f_thread_create));
+      }
+      else {
+        {
+          const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+          fss_write_setting_load(arguments, &data);
+        }
 
-  fss_write_main(&data);
+        if (!fss_write_signal_check(&data)) {
+          fss_write_main(&data);
+        }
 
-  fss_write_setting_unload(&data);
+        f_thread_cancel(id_signal);
+        f_thread_join(id_signal, 0);
+      }
+    }
+  #endif // _di_thread_support_
 
-  fll_program_data_delete(&data.program);
+  fss_write_main_delete(&data);
 
   fll_program_standard_set_down(&data.program);
 
index 851d9c116ce718af245d08de30443deb7e3e635c..9d6ec4fed5942f93289ebd3399ae859cf762f6f4 100644 (file)
@@ -39,17 +39,45 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
   fll_program_standard_set_up(&data.program);
 
-  {
-    const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+  f_file_umask_get(&data.program.umask);
 
-    fss_write_setting_load(arguments, &data, 0);
-  }
+  #ifdef _di_thread_support_
+    {
+      const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+      fss_write_setting_load(arguments, &data);
+    }
+
+    fss_write_main(&data);
+  #else
+    {
+      f_thread_id_t id_signal;
+
+      memset(&id_signal, 0, sizeof(f_thread_id_t));
+
+      data.setting.state.status = f_thread_create(0, &id_signal, &fss_write_thread_signal, (void *) &data);
+
+      if (F_status_is_error(data.setting.state.status)) {
+        fss_write_print_error(&data.program.error, macro_fss_write_f(f_thread_create));
+      }
+      else {
+        {
+          const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+          fss_write_setting_load(arguments, &data);
+        }
 
-  fss_write_main(&data);
+        if (!fss_write_signal_check(&data)) {
+          fss_write_main(&data);
+        }
 
-  fss_write_setting_unload(&data);
+        f_thread_cancel(id_signal);
+        f_thread_join(id_signal, 0);
+      }
+    }
+  #endif // _di_thread_support_
 
-  fll_program_data_delete(&data.program);
+  fss_write_main_delete(&data);
 
   fll_program_standard_set_down(&data.program);
 
index cade2d6ac05f9f7a305e35c946098b45da339c08..c0ee4723de323f8ab4aec3cbfd2f12c0076de1a7 100644 (file)
@@ -38,17 +38,45 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
   fll_program_standard_set_up(&data.program);
 
-  {
-    const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+  f_file_umask_get(&data.program.umask);
 
-    fss_write_setting_load(arguments, &data, 0);
-  }
+  #ifdef _di_thread_support_
+    {
+      const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+      fss_write_setting_load(arguments, &data);
+    }
+
+    fss_write_main(&data);
+  #else
+    {
+      f_thread_id_t id_signal;
+
+      memset(&id_signal, 0, sizeof(f_thread_id_t));
+
+      data.setting.state.status = f_thread_create(0, &id_signal, &fss_write_thread_signal, (void *) &data);
+
+      if (F_status_is_error(data.setting.state.status)) {
+        fss_write_print_error(&data.program.error, macro_fss_write_f(f_thread_create));
+      }
+      else {
+        {
+          const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+          fss_write_setting_load(arguments, &data);
+        }
 
-  fss_write_main(&data);
+        if (!fss_write_signal_check(&data)) {
+          fss_write_main(&data);
+        }
 
-  fss_write_setting_unload(&data);
+        f_thread_cancel(id_signal);
+        f_thread_join(id_signal, 0);
+      }
+    }
+  #endif // _di_thread_support_
 
-  fll_program_data_delete(&data.program);
+  fss_write_main_delete(&data);
 
   fll_program_standard_set_down(&data.program);
 
index a5786cc061043298a792a32803f4784d2fc874fe..dbd9b8b810e7932af09366919655e8722b6bd120 100644 (file)
@@ -38,17 +38,45 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
   fll_program_standard_set_up(&data.program);
 
-  {
-    const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+  f_file_umask_get(&data.program.umask);
 
-    fss_write_setting_load(arguments, &data, 0);
-  }
+  #ifdef _di_thread_support_
+    {
+      const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+      fss_write_setting_load(arguments, &data);
+    }
+
+    fss_write_main(&data);
+  #else
+    {
+      f_thread_id_t id_signal;
+
+      memset(&id_signal, 0, sizeof(f_thread_id_t));
+
+      data.setting.state.status = f_thread_create(0, &id_signal, &fss_write_thread_signal, (void *) &data);
+
+      if (F_status_is_error(data.setting.state.status)) {
+        fss_write_print_error(&data.program.error, macro_fss_write_f(f_thread_create));
+      }
+      else {
+        {
+          const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+          fss_write_setting_load(arguments, &data);
+        }
 
-  fss_write_main(&data);
+        if (!fss_write_signal_check(&data)) {
+          fss_write_main(&data);
+        }
 
-  fss_write_setting_unload(&data);
+        f_thread_cancel(id_signal);
+        f_thread_join(id_signal, 0);
+      }
+    }
+  #endif // _di_thread_support_
 
-  fll_program_data_delete(&data.program);
+  fss_write_main_delete(&data);
 
   fll_program_standard_set_down(&data.program);
 
index b7dc1b23e7134a6693013a4e925da2f0e8472993..9c4e511657adde0ae7e387ab2bb6856c4213c80f 100644 (file)
@@ -4,24 +4,6 @@
 extern "C" {
 #endif
 
-#ifndef _di_fss_write_setting_delete_
-  f_status_t fss_write_setting_delete(fss_write_setting_t * const setting) {
-
-    if (!setting) return F_status_set_error(F_parameter);
-
-    f_string_dynamic_resize(0, &setting->escaped);
-    f_string_dynamic_resize(0, &setting->block);
-    f_string_dynamic_resize(0, &setting->buffer);
-    f_string_dynamic_resize(0, &setting->prepend);
-
-    f_string_rangess_resize(0, &setting->ignoress);
-    f_string_dynamics_resize(0, &setting->objects);
-    f_string_dynamicss_resize(0, &setting->contentss);
-
-    return F_none;
-  }
-#endif // _di_fss_write_setting_delete_
-
 #ifndef _di_fss_write_setting_load_
   void fss_write_setting_load(const f_console_arguments_t arguments, fss_write_main_t * const main, void (*callback)(const f_console_arguments_t arguments, fss_write_main_t * const main)) {
 
@@ -753,17 +735,6 @@ extern "C" {
   }
 #endif // _di_fss_write_setting_load_
 
-#ifndef _di_fss_write_setting_unload_
-  f_status_t fss_write_setting_unload(fss_write_main_t * const main) {
-
-    if (!main) return F_status_set_error(F_parameter);
-
-    fss_write_setting_delete(&main->setting);
-
-    return F_none;
-  }
-#endif // _di_fss_write_setting_unload_
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index b4b28bc62ab8a4db96292dcc677db73e0c01f0f0..f8ef10491a46fec0012b961bfacf10ce05bf6cbd 100644 (file)
@@ -17,23 +17,6 @@ extern "C" {
 #endif
 
 /**
- * Delete the program main setting data.
- *
- * @param setting
- *   The program main setting data.
- *
- *   This does not alter setting.state.status.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_fss_write_setting_delete_
-  extern f_status_t fss_write_setting_delete(fss_write_setting_t * const setting);
-#endif // _di_fss_write_setting_delete_
-
-/**
  * Perform the standard program setting load process.
  *
  * This prints error messages as appropriate.
@@ -73,28 +56,6 @@ extern "C" {
   extern void fss_write_setting_load(const f_console_arguments_t arguments, fss_write_main_t * const main, void (*callback)(const f_console_arguments_t arguments, fss_write_main_t * const main));
 #endif // _di_fss_write_setting_load_
 
-/**
- * Perform the standard program setting unload process.
- *
- * @param main
- *   The main program and setting data.
- *   All buffers are deallocated.
- *
- *   This does not alter main.setting.state.status.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: fss_write_setting_delete().
- *
- * @see fss_write_setting_delete()
- */
-#ifndef _di_fss_write_setting_unload_
-  extern f_status_t fss_write_setting_unload(fss_write_main_t * const main);
-#endif // _di_fss_write_setting_unload_
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index fd06f2488bab68e52ad75eeef9e560aef1caead2..f91dccad971ae0b91740ce0834c2b4729661e87f 100644 (file)
@@ -17,20 +17,36 @@ extern "C" {
 #endif
 
 /**
- * The program default defines.
+ * The program allocation defines.
  *
- * fss_write_*_d:
- *   - allocation_console: An allocation step used for small buffers specifically for console parameter.
- *   - allocation_large:   An allocation step used for buffers that are anticipated to have large buffers.
- *   - allocation_small:   An allocation step used for buffers that are anticipated to have small buffers.
- *   - signal_check:       Number of iterations before performing signal check in non-threaded signal handling.
+ * fss_write_allocation_*_d:
+ *   - console: An allocation step used for small buffers specifically for console parameter.
+ *   - large:   An allocation step used for buffers that are anticipated to have large buffers.
+ *   - pipe:    A buffer size used for processing piped data.
+ *   - small:   An allocation step used for buffers that are anticipated to have small buffers.
  */
-#ifndef _di_fss_write_d_
+#ifndef _di_fss_write_allocation_d_
   #define fss_write_allocation_console_d 4
   #define fss_write_allocation_large_d   2048
+  #define fss_write_allocation_pipe_d    16384
   #define fss_write_allocation_small_d   128
-  #define fss_write_signal_check_d       20000
-#endif // _di_fss_write_d_
+#endif // _di_fss_write_allocation_d_
+
+/**
+ * The program signal defines.
+ *
+ * fss_write_signal_*_d:
+ *   - check:          Number of iterations before performing signal check in non-threaded signal handling.
+ *   - check_failsafe: When using threads, how many consecutive failures to check signal before aborting (as a recursion failsafe).
+ *   - check_tiny:     The tiny check.
+ *   - check_short:    The short signal check.
+ */
+#ifndef _di_fss_write_signal_d_
+  #define fss_write_signal_check_d          500000
+  #define fss_write_signal_check_failsafe_d 20000
+  #define fss_write_signal_check_tiny_d     4
+  #define fss_write_signal_check_short_d    16
+#endif // _di_fss_write_signal_d_
 
 #ifdef __cplusplus
 } // extern "C"
index 0b80a88f4d3793ab1df1eb46615dca797f8da7cc..e2075a0c2886f12a01c3799f357078cd971e28e4 100644 (file)
@@ -4,6 +4,34 @@
 extern "C" {
 #endif
 
+#ifndef _di_fss_write_main_data_delete_
+  void fss_write_main_delete(fss_write_main_t * const main) {
+
+    if (!main) return;
+
+    fll_program_data_delete(&main->program);
+    fss_write_setting_delete(&main->setting);
+  }
+#endif // _di_fss_write_main_data_delete_
+
+#ifndef _di_fss_write_setting_delete_
+  f_status_t fss_write_setting_delete(fss_write_setting_t * const setting) {
+
+    if (!setting) return F_status_set_error(F_parameter);
+
+    f_string_dynamic_resize(0, &setting->escaped);
+    f_string_dynamic_resize(0, &setting->block);
+    f_string_dynamic_resize(0, &setting->buffer);
+    f_string_dynamic_resize(0, &setting->prepend);
+
+    f_string_rangess_resize(0, &setting->ignoress);
+    f_string_dynamics_resize(0, &setting->objects);
+    f_string_dynamicss_resize(0, &setting->contentss);
+
+    return F_none;
+  }
+#endif // _di_fss_write_setting_delete_
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
index a5e700c64e177ae02e9732f293c97e3dc5cc57ff..1165c2706feee2d68b6b6d7f2b3b96029d4f252e 100644 (file)
@@ -26,7 +26,9 @@ extern "C" {
  *
  * flag: Flags passed to the main function.
  *
- * state: The state data used when processing the FSS data.
+ * status_thread: A status used eclusively by the threaded signal handler.
+ * state:         The state data used when processing the FSS data.
+ *
  * range: A range used as a buffer during processing.
  *
  * quote:    This holds the quote used during processing.
@@ -56,7 +58,9 @@ extern "C" {
   typedef struct {
     uint16_t flag;
 
+    f_status_t status_thread;
     f_state_t state;
+
     f_string_range_t range;
 
     f_string_static_t quote;
@@ -87,6 +91,7 @@ extern "C" {
   #define fss_write_setting_t_initialize \
     { \
       fss_write_main_flag_none_e, \
+      F_none, \
       macro_f_state_t_initialize_1(fss_write_allocation_large_d, fss_write_allocation_small_d, F_none, 0, 0, &fll_program_standard_signal_handle, 0, 0, 0), \
       f_string_range_t_initialize, \
       f_string_static_t_initialize, \
@@ -130,6 +135,35 @@ extern "C" {
     }
 #endif // _di_fss_write_main_t_
 
+/**
+ * Deallocate main program data.
+ *
+ * @param setting_make
+ *   The make setting data.
+ *
+ *   This does not alter data_make.main.setting.state.status.
+ */
+#ifndef _di_fss_write_main_data_delete_
+  extern void fss_write_main_delete(fss_write_main_t * const main);
+#endif // _di_fss_write_main_data_delete_
+
+/**
+ * Delete the program main setting data.
+ *
+ * @param setting
+ *   The program main setting data.
+ *
+ *   This does not alter setting.state.status.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_fss_write_setting_delete_
+  extern f_status_t fss_write_setting_delete(fss_write_setting_t * const setting);
+#endif // _di_fss_write_setting_delete_
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 0dea37986c59bc46f76a40a2ef27f09f9ae01802..d10765074a4b8b39825bf7bc1614311858a3d865 100644 (file)
 #include <fll/level_0/rip.h>
 #include <fll/level_0/signal.h>
 
+#ifndef _di_thread_support_
+  #include <fll/level_0/thread.h>
+#endif // _di_thread_support_
+
 // FLL-1 includes.
 #include <fll/level_1/conversion.h>
 #include <fll/level_1/print.h>
@@ -53,6 +57,8 @@
 #include <program/fss_write/main/print/error.h>
 #include <program/fss_write/main/print/message.h>
 #include <program/fss_write/basic/print.h>
+#include <program/fss_write/main/signal.h>
+#include <program/fss_write/main/thread.h>
 
 #ifdef __cplusplus
 extern "C" {
index a47d77f2159f15271ab500cff2d868eb8b15de6c..30d3fec00f5840f7c84a4c039bc29e6ebd6c66d1 100644 (file)
@@ -36,17 +36,45 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
   fll_program_standard_set_up(&data.program);
 
-  {
-    const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+  f_file_umask_get(&data.program.umask);
 
-    fss_write_setting_load(arguments, &data, &fss_write_main_setting_load_as);
-  }
+  #ifdef _di_thread_support_
+    {
+      const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+      fss_write_setting_load(arguments, &data);
+    }
+
+    fss_write_main(&data);
+  #else
+    {
+      f_thread_id_t id_signal;
 
-  fss_write_main(&data);
+      memset(&id_signal, 0, sizeof(f_thread_id_t));
+
+      data.setting.state.status = f_thread_create(0, &id_signal, &fss_write_thread_signal, (void *) &data);
+
+      if (F_status_is_error(data.setting.state.status)) {
+        fss_write_print_error(&data.program.error, macro_fss_write_f(f_thread_create));
+      }
+      else {
+        {
+          const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
 
-  fss_write_setting_unload(&data);
+          fss_write_setting_load(arguments, &data);
+        }
+
+        if (!fss_write_signal_check(&data)) {
+          fss_write_main(&data);
+        }
+
+        f_thread_cancel(id_signal);
+        f_thread_join(id_signal, 0);
+      }
+    }
+  #endif // _di_thread_support_
 
-  fll_program_data_delete(&data.program);
+  fss_write_main_delete(&data);
 
   fll_program_standard_set_down(&data.program);
 
diff --git a/level_3/fss_write/c/main/signal.c b/level_3/fss_write/c/main/signal.c
new file mode 100644 (file)
index 0000000..661b69f
--- /dev/null
@@ -0,0 +1,113 @@
+#include "fss_write.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_fss_write_signal_check_) && defined(_di_thread_support_)
+  f_status_t fss_write_signal_check(fss_write_main_t * const main) {
+
+    if (!main) return F_false;
+    if (main->program.signal.id == -1) return F_false;
+
+    if (!((++main->program.signal_check) % fss_write_signal_check_d)) {
+      if (fll_program_standard_signal_received(&main->program)) {
+        fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
+
+        main->setting.state.status = F_status_set_error(F_interrupt);
+
+        return F_true;
+      }
+
+      main->program.signal_check = 0;
+    }
+
+    return F_false;
+  }
+#endif // !defined(_di_fss_write_signal_check_) && defined(_di_thread_support_)
+
+#if !defined(_di_fss_write_signal_check_) && !defined(_di_thread_support_)
+  f_status_t fss_write_signal_check(fss_write_main_t * const main) {
+
+    if (!main) return F_false;
+    if (main->program.signal.id == -1) return F_false;
+
+    if (main->program.signal_received) {
+      fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
+
+      main->setting.state.status = F_status_set_error(F_interrupt);
+
+      return F_true;
+    }
+
+    return F_false;
+  }
+#endif // !defined(_di_fss_write_signal_check_) && !defined(_di_thread_support_)
+
+#if !defined(_di_fss_write_signal_handler_) && !defined(_di_thread_support_)
+  void fss_write_signal_handler(fss_write_main_t * const main) {
+
+    if (!main) return;
+
+    siginfo_t information;
+    f_array_length_t failsafe = 0;
+
+    memset(&information, 0, sizeof(siginfo_t));
+
+    main->program.signal_received = 0;
+
+    f_signal_set_empty(&main->program.signal.set);
+    f_signal_set_add(F_signal_abort, &main->program.signal.set);
+    f_signal_set_add(F_signal_broken_pipe, &main->program.signal.set);
+    f_signal_set_add(F_signal_hangup, &main->program.signal.set);
+    f_signal_set_add(F_signal_interrupt, &main->program.signal.set);
+    f_signal_set_add(F_signal_quit, &main->program.signal.set);
+    f_signal_set_add(F_signal_termination, &main->program.signal.set);
+
+    if (main->program.signal.id == -1) {
+      main->setting.status_thread = f_signal_open(&main->program.signal);
+
+      if (F_status_is_error(main->setting.status_thread)) {
+        main->program.signal_received = F_signal_abort;
+
+        return;
+      }
+    }
+
+    do {
+      memset(&information, 0, sizeof(siginfo_t));
+
+      main->setting.status_thread = f_signal_wait(&main->program.signal.set, &information);
+
+      if (F_status_is_error(main->setting.status_thread) && F_status_set_fine(main->setting.status_thread) != F_interrupt) {
+        if (++failsafe >= fss_write_signal_check_failsafe_d) break;
+      }
+
+      switch (information.si_signo) {
+        case F_signal_abort:
+        case F_signal_broken_pipe:
+        case F_signal_hangup:
+        case F_signal_interrupt:
+        case F_signal_quit:
+        case F_signal_termination:
+          main->program.signal_received = information.si_signo;
+
+          break;
+      }
+
+      failsafe = 0;
+      main->setting.status_thread = F_none;
+
+    } while (!main->program.signal_received);
+
+    f_signal_close(&main->program.signal);
+
+    if (F_status_is_error(main->setting.status_thread)) {
+      main->program.signal_received = F_signal_abort;
+    }
+  }
+#endif // !defined(_di_fss_write_signal_handler_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/fss_write/c/main/signal.h b/level_3/fss_write/c/main/signal.h
new file mode 100644 (file)
index 0000000..7e2d888
--- /dev/null
@@ -0,0 +1,86 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: FSS Write
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides signal functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _fss_write_signal_h
+#define _fss_write_signal_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Check to see if a signal is received.
+ *
+ * If main.signal is non-zero, then this handles the following signals:
+ *   - F_signal_abort
+ *   - F_signal_broken_pipe
+ *   - F_signal_hangup
+ *   - F_signal_interrupt
+ *   - F_signal_quit
+ *   - F_signal_termination
+ *
+ * There is a threaded and a non-threaded version of this.
+ * The non-threaded version checks periodically using fss_write_signal_check_d and updates main->signal_check as needed.
+ * The threaded version checks the flag state which is set by a separate thread that is blocking until signal is received.
+ *
+ * @param main
+ *   The main program and settings data.
+ *
+ *   This does not alter main.setting.state.status.
+ *
+ * @return
+ *   F_true on signal received.
+ *   F_false otherwise.
+ *
+ * @see fss_write_signal_handler()
+ *
+ * @see fll_program_standard_signal_received()
+ */
+#ifndef _di_fss_write_signal_check_
+  extern f_status_t fss_write_signal_check(fss_write_main_t * const main);
+#endif // _di_fss_write_signal_check_
+
+/**
+ * Signal handler for signals/interrupts.
+ *
+ * This blocks until an expected signal is recieved.
+ * When an expected signal is received it then sets the
+ *
+ * If main.signal is non-zero, then this handles the following signals:
+ *   - F_signal_abort
+ *   - F_signal_broken_pipe
+ *   - F_signal_hangup
+ *   - F_signal_interrupt
+ *   - F_signal_quit
+ *   - F_signal_termination
+ *
+ * @param main
+ *   The main program and settings data.
+ *
+ *   This alters main.program.signal_received, setting it to a received signal.
+ *
+ *   This alters setting.status:
+ *     Errors with (error bit set) from: f_signal_open()
+ *     Errors with (error bit set) from: f_signal_wait()
+ *
+ * @see f_signal_close()
+ * @see f_signal_open()
+ * @see f_signal_wait()
+ */
+#if !defined(_di_fss_write_signal_handler_) && !defined(_di_thread_support_)
+  extern void fss_write_signal_handler(fss_write_main_t * const main);
+#endif // !defined(_di_fss_write_signal_handler_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _fss_write_signal_h
diff --git a/level_3/fss_write/c/main/thread.c b/level_3/fss_write/c/main/thread.c
new file mode 100644 (file)
index 0000000..8701f2f
--- /dev/null
@@ -0,0 +1,26 @@
+#include "fss_write.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_fss_write_thread_signal_) && !defined(_di_thread_support_)
+  void * fss_write_thread_signal(void * const main) {
+
+    f_thread_cancel_state_set(PTHREAD_CANCEL_DEFERRED, 0);
+
+    if (main) {
+      fss_write_signal_handler((fss_write_main_t *) main);
+    }
+
+    return 0;
+  }
+#endif // !defined(_di_fss_write_thread_signal_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/fss_write/c/main/thread.h b/level_3/fss_write/c/main/thread.h
new file mode 100644 (file)
index 0000000..dabe708
--- /dev/null
@@ -0,0 +1,46 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: FSS Write
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides thread functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _fss_write_thread_h
+#define _fss_write_thread_h
+
+/**
+ * Thread handler for signals/interrupts.
+ *
+ * If main.signal is non-zero, then this handles the following signals:
+ *   - F_signal_abort
+ *   - F_signal_broken_pipe
+ *   - F_signal_hangup
+ *   - F_signal_interrupt
+ *   - F_signal_quit
+ *   - F_signal_termination
+ *
+ * @param main
+ *   The program and settings data.
+ *
+ *   Must be of type fss_write_main_t.
+ *
+ * @return
+ *   0, always.
+ *
+ * @see f_thread_cancel_state_set()
+ *
+ * @see fss_write_signal_handler()
+ */
+#if !defined(_di_fss_write_thread_signal_) && !defined(_di_thread_support_)
+  extern void * fss_write_thread_signal(void * const main);
+#endif // !defined(_di_fss_write_thread_signal_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _fss_write_thread_h
index 5f581ce7595b79984b22e04fc122b59646816869..b1af9ee5829ce37aaea50983d7d93d20cc10714f 100644 (file)
@@ -37,17 +37,45 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
   fll_program_standard_set_up(&data.program);
 
-  {
-    const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+  f_file_umask_get(&data.program.umask);
 
-    fss_write_setting_load(arguments, &data, &fss_write_payload_setting_load);
-  }
+  #ifdef _di_thread_support_
+    {
+      const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+      fss_write_setting_load(arguments, &data);
+    }
+
+    fss_write_main(&data);
+  #else
+    {
+      f_thread_id_t id_signal;
+
+      memset(&id_signal, 0, sizeof(f_thread_id_t));
+
+      data.setting.state.status = f_thread_create(0, &id_signal, &fss_write_thread_signal, (void *) &data);
+
+      if (F_status_is_error(data.setting.state.status)) {
+        fss_write_print_error(&data.program.error, macro_fss_write_f(f_thread_create));
+      }
+      else {
+        {
+          const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+          fss_write_setting_load(arguments, &data);
+        }
 
-  fss_write_main(&data);
+        if (!fss_write_signal_check(&data)) {
+          fss_write_main(&data);
+        }
 
-  fss_write_setting_unload(&data);
+        f_thread_cancel(id_signal);
+        f_thread_join(id_signal, 0);
+      }
+    }
+  #endif // _di_thread_support_
 
-  fll_program_data_delete(&data.program);
+  fss_write_main_delete(&data);
 
   fll_program_standard_set_down(&data.program);
 
index c6653172ef1e71eb1aff738b1cbad4300feeacd6..490da41d8e72323bf3a9086dfbed1d8d565cd20f 100644 (file)
@@ -1,2 +1,6 @@
 # fss-0000
 
+_di_thread_support_ Disables thread support.
+
+_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
+_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
index aa2338a096c508f433a84f6571d95cd2fe4162c0..4c1f0ba248e4a8bd57d1d001dcf2c16aa11bc1c8 100644 (file)
@@ -2,6 +2,17 @@
 #
 # Builds the main library of the project with all parts except "main" program related.
 #
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name fss_write
 
@@ -11,8 +22,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual level monolithic clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -22,10 +33,11 @@ build_language c
 
 build_libraries -lc
 build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
-build_sources_library main/fss_write.c main/common.c main/common/define.c main/common/enumeration.c main/common/print.c main/common/string.c main/common/type.c main/print/error.c main/print/message.c
+build_sources_library main/fss_write.c main/common.c main/common/define.c main/common/enumeration.c main/common/print.c main/common/string.c main/common/type.c main/print/error.c main/print/message.c main/signal.c main/thread.c
 build_sources_library basic/fss_write.c basic/common.c basic/print.c
 build_sources_library basic_list/fss_write.c basic_list/common.c basic_list/print.c
 build_sources_library embedded_list/fss_write.c embedded_list/common.c embedded_list/print.c
@@ -33,7 +45,7 @@ build_sources_library extended/fss_write.c extended/common.c extended/print.c
 build_sources_library extended_list/fss_write.c extended_list/common.c extended_list/print.c
 build_sources_library payload/fss_write.c payload/common.c payload/print.c
 
-build_sources_headers main/fss_write.h main/common.h main/common/define.h main/common/enumeration.h main/common/print.h main/common/string.h main/common/type.h main/print/error.h main/print/message.h
+build_sources_headers main/fss_write.h main/common.h main/common/define.h main/common/enumeration.h main/common/print.h main/common/string.h main/common/type.h main/print/error.h main/print/message.h main/signal.h main/thread.h
 build_sources_headers basic/fss_write.h basic/common.h basic/print.h basic/private-common.h
 build_sources_headers basic_list/fss_write.h basic_list/common.h basic_list/print.h
 build_sources_headers embedded_list/fss_write.h embedded_list/common.h embedded_list/print.h
@@ -57,10 +69,13 @@ search_static yes
 environment PATH LD_LIBRARY_PATH
 environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
 
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
 
 flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -O0 -fstack-protector -Wall
 flags-fanalyzer -fanalyzer
index dca59fa555d12ac198552bbef776a35d657fdf59..9317e17ceba8f3166b228bd4381b69823b958e1d 100644 (file)
@@ -12,8 +12,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual level monolithic clang test
-modes_default monolithic
+modes individual level monolithic clang test fanalyzer thread individual-thread threadless
+modes_default monolithic thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -23,6 +23,7 @@ build_language c
 
 build_libraries -lc -lfss_write
 build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual-thread -lf_thread
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
@@ -46,10 +47,13 @@ search_static yes
 environment PATH LD_LIBRARY_PATH
 environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
 
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+defines -D_libcap_legacy_only_
 
 flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -O0 -fstack-protector -Wall
 flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
index ba5a99918f9a8606f68943fa7ed0746a5f047cc9..d6eaf0b9da624c1ea6018a95cbb9e6a05196f266 100644 (file)
@@ -12,8 +12,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual level monolithic clang test
-modes_default monolithic
+modes individual level monolithic clang test fanalyzer thread individual-thread threadless
+modes_default monolithic thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -23,6 +23,7 @@ build_language c
 
 build_libraries -lc -lfss_write
 build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual-thread -lf_thread
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
@@ -46,10 +47,13 @@ search_static yes
 environment PATH LD_LIBRARY_PATH
 environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
 
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+defines -D_libcap_legacy_only_
 
 flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -O0 -fstack-protector -Wall
 flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
index 95bc87068a58ccb5d6782117ee316caeccefa98a..54cfadddd0bfd1366a6adfe62c901c0b7754fbc5 100644 (file)
@@ -12,8 +12,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual level monolithic clang test
-modes_default monolithic
+modes individual level monolithic clang test fanalyzer thread individual-thread threadless
+modes_default monolithic thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -23,6 +23,7 @@ build_language c
 
 build_libraries -lc -lfss_write
 build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual-thread -lf_thread
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
@@ -46,10 +47,13 @@ search_static yes
 environment PATH LD_LIBRARY_PATH
 environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
 
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+defines -D_libcap_legacy_only_
 
 flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -O0 -fstack-protector -Wall
 flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
index 3a7c1b37dfca2227e947f3a75fc3f056c506d904..39596cef6f1e323d64186e4b93e2fd537b58c0e9 100644 (file)
@@ -12,8 +12,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual level monolithic clang test
-modes_default monolithic
+modes individual level monolithic clang test fanalyzer thread individual-thread threadless
+modes_default monolithic thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -23,6 +23,7 @@ build_language c
 
 build_libraries -lc -lfss_write
 build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual-thread -lf_thread
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
@@ -46,10 +47,13 @@ search_static yes
 environment PATH LD_LIBRARY_PATH
 environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
 
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+defines -D_libcap_legacy_only_
 
 flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -O0 -fstack-protector -Wall
 flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
index 21d25874c38e67a3b76c75bda85cc2e351e9285f..d046242e41576d3115adc3e1ca2c685ffbdf084a 100644 (file)
@@ -12,8 +12,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual level monolithic clang test
-modes_default monolithic
+modes individual level monolithic clang test fanalyzer thread individual-thread threadless
+modes_default monolithic thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -23,6 +23,7 @@ build_language c
 
 build_libraries -lc -lfss_write
 build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual-thread -lf_thread
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
@@ -46,10 +47,13 @@ search_static yes
 environment PATH LD_LIBRARY_PATH
 environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
 
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+defines -D_libcap_legacy_only_
 
 flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -O0 -fstack-protector -Wall
 flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
index 6f889b02807d1660f423998c5348d9096e6fa494..c4e572d4dfa8527a8dc19380cecf79f8d59b854d 100644 (file)
@@ -12,8 +12,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual level monolithic clang test
-modes_default monolithic
+modes individual level monolithic clang test fanalyzer thread individual-thread threadless
+modes_default monolithic thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -23,6 +23,7 @@ build_language c
 
 build_libraries -lc -lfss_write
 build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual-thread -lf_thread
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
@@ -46,10 +47,13 @@ search_static yes
 environment PATH LD_LIBRARY_PATH
 environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
 
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+defines -D_libcap_legacy_only_
 
 flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -O0 -fstack-protector -Wall
 flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
index 3df838ca06f0f88db98989300283bf5c7b451480..50fe93fce2f7f6928fd10af1e9c991632e88f375 100644 (file)
@@ -12,8 +12,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual level monolithic clang test
-modes_default monolithic
+modes individual level monolithic clang test fanalyzer thread individual-thread threadless
+modes_default monolithic thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -23,6 +23,7 @@ build_language c
 
 build_libraries -lc -lfss_write
 build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual-thread -lf_thread
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
@@ -46,10 +47,13 @@ search_static yes
 environment PATH LD_LIBRARY_PATH
 environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
 
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+defines -D_libcap_legacy_only_
 
 flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -O0 -fstack-protector -Wall
 flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
index ca21a5d1792c44206383a4e90fd73f59aecf7714..988f8474072d09724d6057cac12e5bd2ea641f78 100644 (file)
@@ -4,26 +4,6 @@
 extern "C" {
 #endif
 
-#ifndef _di_iki_read_setting_delete_
-  f_status_t iki_read_setting_delete(iki_read_setting_t * const setting) {
-
-    if (!setting) return F_status_set_error(F_parameter);
-
-    f_string_dynamic_resize(0, &setting->buffer);
-    f_string_dynamics_resize(0, &setting->names);
-    f_string_dynamics_resize(0, &setting->files);
-
-    f_string_maps_resize(0, &setting->replace);
-    f_string_triples_resize(0, &setting->reassign);
-    f_string_triples_resize(0, &setting->substitute);
-    f_string_triples_resize(0, &setting->wrap);
-
-    f_iki_data_delete(&setting->data);
-
-    return F_none;
-  }
-#endif // _di_iki_read_setting_delete_
-
 #ifndef _di_iki_read_setting_load_
   void iki_read_setting_load(const f_console_arguments_t arguments, iki_read_main_t * const main) {
 
@@ -720,17 +700,6 @@ extern "C" {
   }
 #endif // _di_iki_read_setting_load_parameter_substitution_
 
-#ifndef _di_iki_read_setting_unload_
-  f_status_t iki_read_setting_unload(iki_read_main_t * const main) {
-
-    if (!main) return F_status_set_error(F_parameter);
-
-    iki_read_setting_delete(&main->setting);
-
-    return F_none;
-  }
-#endif // _di_iki_read_setting_unload_
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 9386d8d1744f5365460b00e878abca0b02e1f42f..62bfa01f2abc29ea409f3695859102428d68fb85 100644 (file)
@@ -17,23 +17,6 @@ extern "C" {
 #endif
 
 /**
- * Delete the program main setting data.
- *
- * @param setting
- *   The program main setting data.
- *
- *   This does not alter setting.state.status.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_iki_read_setting_delete_
-  extern f_status_t iki_read_setting_delete(iki_read_setting_t * const setting);
-#endif // _di_iki_read_setting_delete_
-
-/**
  * Perform the standard program setting load process.
  *
  * This prints error messages as appropriate.
@@ -100,29 +83,6 @@ extern "C" {
   extern f_status_t iki_read_setting_load_parameter_substitution(iki_read_main_t * const main, const f_console_parameter_t parameter, const f_string_static_t name, f_string_triples_t *triple);
 #endif // _di_iki_read_setting_load_parameter_substitution_
 
-/**
- * Perform the standard program setting unload process.
- *
- * @param main
- *   The program and settings data.
- *
- *   All buffers are deallocated.
- *
- *   This does not alter main.setting.state.status.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: iki_read_setting_delete().
- *
- * @see iki_read_setting_delete()
- */
-#ifndef _di_iki_read_setting_unload_
-  extern f_status_t iki_read_setting_unload(iki_read_main_t * const main);
-#endif // _di_iki_read_setting_unload_
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index aa8e33e138d720175e109b2c79cf9ae0e2324565..46193187bc0ec842844402b29961bce39bfd8503 100644 (file)
@@ -17,27 +17,51 @@ extern "C" {
 #endif
 
 /**
- * The program defines.
+ * The program allocation defines.
  *
- * iki_read_*_d:
- *   - allocation_console: An allocation step used for small buffers specifically for console parameter.
- *   - allocation_large:   An allocation step used for buffers that are anticipated to have large buffers.
- *   - allocation_small:   An allocation step used for buffers that are anticipated to have small buffers.
- *   - block_max:          The max block read size before checking for interrupt.
- *   - block_read_small:   The block read size for small files.
- *   - block_read_large:   The block read size for large files.
- *   - signal_check:       Number of iterations before performing signal check in non-threaded signal handling.
+ * iki_read_allocation_*_d:
+ *   - console: An allocation step used for small buffers specifically for console parameter.
+ *   - large:   An allocation step used for buffers that are anticipated to have large buffers.
+ *   - pipe:    A buffer size used for processing piped data.
+ *   - small:   An allocation step used for buffers that are anticipated to have small buffers.
  */
-#ifndef _di_iki_read_d_
+#ifndef _di_iki_read_allocation_d_
   #define iki_read_allocation_console_d 4
   #define iki_read_allocation_large_d   256
+  #define iki_read_allocation_pipe_d    16384
   #define iki_read_allocation_small_d   16
-  #define iki_read_block_max            16777216
-  #define iki_read_block_read_small     8192
-  #define iki_read_block_read_large     65536
-  #define iki_read_signal_check_d       20000
+#endif // _di_iki_read_allocation_d_
+
+/**
+ * The program block defines.
+ *
+ * iki_read_block_*_d:
+ *   - max:        The max block read size before checking for interrupt.
+ *   - read_small: The block read size for small files.
+ *   - read_large: The block read size for large files.
+ */
+#ifndef _di_iki_read_d_
+  #define iki_read_block_max_d        16777216
+  #define iki_read_block_read_small_d 8192
+  #define iki_read_block_read_large_d 65536
 #endif // _di_iki_read_d_
 
+/**
+ * The program signal defines.
+ *
+ * iki_read_signal_*_d:
+ *   - check:          Number of iterations before performing signal check in non-threaded signal handling.
+ *   - check_failsafe: When using threads, how many consecutive failures to check signal before aborting (as a recursion failsafe).
+ *   - check_tiny:     The tiny check.
+ *   - check_short:    The short signal check.
+ */
+#ifndef _di_iki_read_signal_d_
+  #define iki_read_signal_check_d          500000
+  #define iki_read_signal_check_failsafe_d 20000
+  #define iki_read_signal_check_tiny_d     4
+  #define iki_read_signal_check_short_d    16
+#endif // _di_iki_read_signal_d_
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
index b20020b6137d774a17dc944fcbbd8c907b916170..e4c0c501604255beb5823b3ae4065be1de71e458 100644 (file)
@@ -21,6 +21,7 @@ extern "C" {
     "f_string_dynamics_resize",
     "f_string_maps_increase_by",
     "f_string_triples_increase_by",
+    "f_thread_create",
     "fl_iki_read",
     "fll_program_parameter_process_context",
     "fll_program_parameter_process_verbosity",
index 5f3db06954e705c0939e67143092fb5fe63f82d7..f47d03287a914264d0ff09b0bb91844c85d98fac 100644 (file)
@@ -54,6 +54,7 @@ extern "C" {
     iki_read_f_f_string_dynamics_resize_e,
     iki_read_f_f_string_maps_increase_by_e,
     iki_read_f_f_string_triples_increase_by_e,
+    iki_read_f_f_thread_create_e,
     iki_read_f_fl_iki_read_e,
     iki_read_f_fll_program_parameter_process_context_e,
     iki_read_f_fll_program_parameter_process_verbosity_e,
index 083a1cbdf478a76cc435dbc0708a3a6fd6d979dd..7c90029452c92bd93e71e5c42a4fd2a747257250 100644 (file)
@@ -60,13 +60,6 @@ extern "C" {
 #endif // _di_iki_read_program_name_s_
 
 /**
- * The program defines.
- */
-#ifndef _di_iki_read_d_
-  #define iki_read_signal_check_d 20000
-#endif // _di_iki_read_d_
-
-/**
  * A collection of static strings associated with IKI Read.
  */
 #ifndef _di_iki_read_s_
index de0e2a3fee1593a68e7a19c627644493f4666db0..4f5faf0a164444858c61d3267f4c6db0d24a7da1 100644 (file)
@@ -4,6 +4,36 @@
 extern "C" {
 #endif
 
+#ifndef _di_iki_read_main_data_delete_
+  void iki_read_main_delete(iki_read_main_t * const main) {
+
+    if (!main) return;
+
+    fll_program_data_delete(&main->program);
+    iki_read_setting_delete(&main->setting);
+  }
+#endif // _di_iki_read_main_data_delete_
+
+#ifndef _di_iki_read_setting_delete_
+  f_status_t iki_read_setting_delete(iki_read_setting_t * const setting) {
+
+    if (!setting) return F_status_set_error(F_parameter);
+
+    f_string_dynamic_resize(0, &setting->buffer);
+    f_string_dynamics_resize(0, &setting->names);
+    f_string_dynamics_resize(0, &setting->files);
+
+    f_string_maps_resize(0, &setting->replace);
+    f_string_triples_resize(0, &setting->reassign);
+    f_string_triples_resize(0, &setting->substitute);
+    f_string_triples_resize(0, &setting->wrap);
+
+    f_iki_data_delete(&setting->data);
+
+    return F_none;
+  }
+#endif // _di_iki_read_setting_delete_
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 2764820aa588b088a6b3b0ca1b10ad4a941f8822..51a8bce3b5c36d93186c3947d99792a8fa4c947a 100644 (file)
@@ -24,7 +24,8 @@ extern "C" {
  *
  * flag: Flags passed to the main function.
  *
- * state: The state information.
+ * status_thread: A status used eclusively by the threaded signal handler.
+ * state:         The state data used when processing the FSS data.
  *
  * at:   The position representing the "at" index.
  * line: The position representing the "line" index.
@@ -47,6 +48,7 @@ extern "C" {
   typedef struct {
     uint16_t flag;
 
+    f_status_t status_thread;
     f_state_t state;
 
     f_array_length_t at;
@@ -70,6 +72,7 @@ extern "C" {
   #define iki_read_setting_t_initialize \
     { \
       iki_read_main_flag_none_e, \
+      F_none, \
       macro_f_state_t_initialize_1(iki_read_allocation_large_d, iki_read_allocation_small_d, F_none, 0, 0, 0, 0, 0, 0), \
       0, \
       0, \
@@ -105,6 +108,35 @@ extern "C" {
     }
 #endif // _di_iki_read_main_t_
 
+/**
+ * Deallocate main program data.
+ *
+ * @param setting_make
+ *   The make setting data.
+ *
+ *   This does not alter data_make.main.setting.state.status.
+ */
+#ifndef _di_iki_read_main_data_delete_
+  extern void iki_read_main_delete(iki_read_main_t * const main);
+#endif // _di_iki_read_main_data_delete_
+
+/**
+ * Delete the program main setting data.
+ *
+ * @param setting
+ *   The program main setting data.
+ *
+ *   This does not alter setting.state.status.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_iki_read_setting_delete_
+  extern f_status_t iki_read_setting_delete(iki_read_setting_t * const setting);
+#endif // _di_iki_read_setting_delete_
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
index e87f1ce79de899277c3d26a399db27e91b9ccf20..3eb1f7ff5f41e890f9cde66db08ee298c3de52b0 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 3
  *
- * Project: IKI
+ * Project: IKI Read
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index 643420561eafa7be69ac30484c2102b1e252bafe..8c06fda5daca23fffb018d50ef79e895dd6bc666 100644 (file)
@@ -116,12 +116,12 @@ extern "C" {
         }
 
         // Enforce a max block read size to allow for interrupts to be processed between blocks.
-        if (size_file > iki_read_block_max) {
-          file.size_read = iki_read_block_read_large;
-          size_block = iki_read_block_max;
+        if (size_file > iki_read_block_max_d) {
+          file.size_read = iki_read_block_read_large_d;
+          size_block = iki_read_block_max_d;
         }
         else {
-          file.size_read = iki_read_block_read_small;
+          file.size_read = iki_read_block_read_small_d;
           size_block = size_file;
         }
 
@@ -137,7 +137,7 @@ extern "C" {
         for (size_read = 0; size_read < size_file; size_read += size_block) {
 
           // The signal check is always performed on each pass.
-          if (size_file > iki_read_block_max && fll_program_standard_signal_received(&main->program)) {
+          if (size_file > iki_read_block_max_d && fll_program_standard_signal_received(&main->program)) {
             fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
 
             main->setting.state.status = F_status_set_error(F_interrupt);
index c56ae7b0ca4aa966b630f6023ae1204dab5f5e8b..31ce70467b946a867dc49fcf6afff8e0a868d3ae 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 3
  *
- * Project: IKI
+ * Project: IKI Read
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
 #include <fll/level_0/rip.h>
 #include <fll/level_0/signal.h>
 
+#ifndef _di_thread_support_
+  #include <fll/level_0/thread.h>
+#endif // _di_thread_support_
+
 // FLL-1 includes.
 #include <fll/level_1/conversion.h>
 #include <fll/level_1/iki.h>
@@ -63,6 +67,8 @@
 #include <program/iki_read/main/print/error.h>
 #include <program/iki_read/main/print/message.h>
 #include <program/iki_read/main/process.h>
+#include <program/iki_read/main/signal.h>
+#include <program/iki_read/main/thread.h>
 
 #ifdef __cplusplus
 extern "C" {
index 39ab62012e8e832567c22c296ae0c3fdd2f16fec..d63555682f8c3043549ac935eb36fa889be2887d 100644 (file)
@@ -29,17 +29,45 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
   fll_program_standard_set_up(&data.program);
 
-  {
-    const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+  f_file_umask_get(&data.program.umask);
 
-    iki_read_setting_load(arguments, &data);
-  }
+  #ifdef _di_thread_support_
+    {
+      const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+      iki_read_setting_load(arguments, &data);
+    }
+
+    iki_read_main(&data);
+  #else
+    {
+      f_thread_id_t id_signal;
+
+      memset(&id_signal, 0, sizeof(f_thread_id_t));
+
+      data.setting.state.status = f_thread_create(0, &id_signal, &iki_read_thread_signal, (void *) &data);
+
+      if (F_status_is_error(data.setting.state.status)) {
+        iki_read_print_error(&data.program.error, macro_iki_read_f(f_thread_create));
+      }
+      else {
+        {
+          const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+          iki_read_setting_load(arguments, &data);
+        }
 
-  iki_read_main(&data);
+        if (!iki_read_signal_check(&data)) {
+          iki_read_main(&data);
+        }
 
-  iki_read_setting_unload(&data);
+        f_thread_cancel(id_signal);
+        f_thread_join(id_signal, 0);
+      }
+    }
+  #endif // _di_thread_support_
 
-  fll_program_data_delete(&data.program);
+  iki_read_main_delete(&data);
 
   fll_program_standard_set_down(&data.program);
 
index 6a8d95a84f4316729540ac86853ab13508ab8ab9..a4d3f980721a2b85b4bdbb1f03bf75771192e25b 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 3
  *
- * Project: IKI
+ * Project: IKI Read
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index fb7df27754640a47b95b85c0ae389e1e85914442..f23bc39ca6e2e7c5cea7cda3ef86d3fa05901b49 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 3
  *
- * Project: UTF8
+ * Project: IKI Read
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index c001de31790994ddc7c64cdb9ebceb2b26fe6f42..5e9fda47eb0a8b4efb07982b91df7148483ebb36 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 3
  *
- * Project: IKI
+ * Project: IKI Read
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
diff --git a/level_3/iki_read/c/main/signal.c b/level_3/iki_read/c/main/signal.c
new file mode 100644 (file)
index 0000000..e79b3cd
--- /dev/null
@@ -0,0 +1,113 @@
+#include "iki_read.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_iki_read_signal_check_) && defined(_di_thread_support_)
+  f_status_t iki_read_signal_check(iki_read_main_t * const main) {
+
+    if (!main) return F_false;
+    if (main->program.signal.id == -1) return F_false;
+
+    if (!((++main->program.signal_check) % iki_read_signal_check_d)) {
+      if (fll_program_standard_signal_received(&main->program)) {
+        fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
+
+        main->setting.state.status = F_status_set_error(F_interrupt);
+
+        return F_true;
+      }
+
+      main->program.signal_check = 0;
+    }
+
+    return F_false;
+  }
+#endif // !defined(_di_iki_read_signal_check_) && defined(_di_thread_support_)
+
+#if !defined(_di_iki_read_signal_check_) && !defined(_di_thread_support_)
+  f_status_t iki_read_signal_check(iki_read_main_t * const main) {
+
+    if (!main) return F_false;
+    if (main->program.signal.id == -1) return F_false;
+
+    if (main->program.signal_received) {
+      fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
+
+      main->setting.state.status = F_status_set_error(F_interrupt);
+
+      return F_true;
+    }
+
+    return F_false;
+  }
+#endif // !defined(_di_iki_read_signal_check_) && !defined(_di_thread_support_)
+
+#if !defined(_di_iki_read_signal_handler_) && !defined(_di_thread_support_)
+  void iki_read_signal_handler(iki_read_main_t * const main) {
+
+    if (!main) return;
+
+    siginfo_t information;
+    f_array_length_t failsafe = 0;
+
+    memset(&information, 0, sizeof(siginfo_t));
+
+    main->program.signal_received = 0;
+
+    f_signal_set_empty(&main->program.signal.set);
+    f_signal_set_add(F_signal_abort, &main->program.signal.set);
+    f_signal_set_add(F_signal_broken_pipe, &main->program.signal.set);
+    f_signal_set_add(F_signal_hangup, &main->program.signal.set);
+    f_signal_set_add(F_signal_interrupt, &main->program.signal.set);
+    f_signal_set_add(F_signal_quit, &main->program.signal.set);
+    f_signal_set_add(F_signal_termination, &main->program.signal.set);
+
+    if (main->program.signal.id == -1) {
+      main->setting.status_thread = f_signal_open(&main->program.signal);
+
+      if (F_status_is_error(main->setting.status_thread)) {
+        main->program.signal_received = F_signal_abort;
+
+        return;
+      }
+    }
+
+    do {
+      memset(&information, 0, sizeof(siginfo_t));
+
+      main->setting.status_thread = f_signal_wait(&main->program.signal.set, &information);
+
+      if (F_status_is_error(main->setting.status_thread) && F_status_set_fine(main->setting.status_thread) != F_interrupt) {
+        if (++failsafe >= iki_read_signal_check_failsafe_d) break;
+      }
+
+      switch (information.si_signo) {
+        case F_signal_abort:
+        case F_signal_broken_pipe:
+        case F_signal_hangup:
+        case F_signal_interrupt:
+        case F_signal_quit:
+        case F_signal_termination:
+          main->program.signal_received = information.si_signo;
+
+          break;
+      }
+
+      failsafe = 0;
+      main->setting.status_thread = F_none;
+
+    } while (!main->program.signal_received);
+
+    f_signal_close(&main->program.signal);
+
+    if (F_status_is_error(main->setting.status_thread)) {
+      main->program.signal_received = F_signal_abort;
+    }
+  }
+#endif // !defined(_di_iki_read_signal_handler_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/iki_read/c/main/signal.h b/level_3/iki_read/c/main/signal.h
new file mode 100644 (file)
index 0000000..4be58af
--- /dev/null
@@ -0,0 +1,86 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: IKI Read
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides signal functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _iki_read_signal_h
+#define _iki_read_signal_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Check to see if a signal is received.
+ *
+ * If main.signal is non-zero, then this handles the following signals:
+ *   - F_signal_abort
+ *   - F_signal_broken_pipe
+ *   - F_signal_hangup
+ *   - F_signal_interrupt
+ *   - F_signal_quit
+ *   - F_signal_termination
+ *
+ * There is a threaded and a non-threaded version of this.
+ * The non-threaded version checks periodically using iki_read_signal_check_d and updates main->signal_check as needed.
+ * The threaded version checks the flag state which is set by a separate thread that is blocking until signal is received.
+ *
+ * @param main
+ *   The main program and settings data.
+ *
+ *   This does not alter main.setting.state.status.
+ *
+ * @return
+ *   F_true on signal received.
+ *   F_false otherwise.
+ *
+ * @see iki_read_signal_handler()
+ *
+ * @see fll_program_standard_signal_received()
+ */
+#ifndef _di_iki_read_signal_check_
+  extern f_status_t iki_read_signal_check(iki_read_main_t * const main);
+#endif // _di_iki_read_signal_check_
+
+/**
+ * Signal handler for signals/interrupts.
+ *
+ * This blocks until an expected signal is recieved.
+ * When an expected signal is received it then sets the
+ *
+ * If main.signal is non-zero, then this handles the following signals:
+ *   - F_signal_abort
+ *   - F_signal_broken_pipe
+ *   - F_signal_hangup
+ *   - F_signal_interrupt
+ *   - F_signal_quit
+ *   - F_signal_termination
+ *
+ * @param main
+ *   The main program and settings data.
+ *
+ *   This alters main.program.signal_received, setting it to a received signal.
+ *
+ *   This alters setting.status:
+ *     Errors with (error bit set) from: f_signal_open()
+ *     Errors with (error bit set) from: f_signal_wait()
+ *
+ * @see f_signal_close()
+ * @see f_signal_open()
+ * @see f_signal_wait()
+ */
+#if !defined(_di_iki_read_signal_handler_) && !defined(_di_thread_support_)
+  extern void iki_read_signal_handler(iki_read_main_t * const main);
+#endif // !defined(_di_iki_read_signal_handler_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _iki_read_signal_h
diff --git a/level_3/iki_read/c/main/thread.c b/level_3/iki_read/c/main/thread.c
new file mode 100644 (file)
index 0000000..a71a418
--- /dev/null
@@ -0,0 +1,26 @@
+#include "iki_read.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_iki_read_thread_signal_) && !defined(_di_thread_support_)
+  void * iki_read_thread_signal(void * const main) {
+
+    f_thread_cancel_state_set(PTHREAD_CANCEL_DEFERRED, 0);
+
+    if (main) {
+      iki_read_signal_handler((iki_read_main_t *) main);
+    }
+
+    return 0;
+  }
+#endif // !defined(_di_iki_read_thread_signal_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/iki_read/c/main/thread.h b/level_3/iki_read/c/main/thread.h
new file mode 100644 (file)
index 0000000..ee93255
--- /dev/null
@@ -0,0 +1,46 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: IKI Read
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides thread functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _iki_read_thread_h
+#define _iki_read_thread_h
+
+/**
+ * Thread handler for signals/interrupts.
+ *
+ * If main.signal is non-zero, then this handles the following signals:
+ *   - F_signal_abort
+ *   - F_signal_broken_pipe
+ *   - F_signal_hangup
+ *   - F_signal_interrupt
+ *   - F_signal_quit
+ *   - F_signal_termination
+ *
+ * @param main
+ *   The program and settings data.
+ *
+ *   Must be of type iki_read_main_t.
+ *
+ * @return
+ *   0, always.
+ *
+ * @see f_thread_cancel_state_set()
+ *
+ * @see iki_read_signal_handler()
+ */
+#if !defined(_di_iki_read_thread_signal_) && !defined(_di_thread_support_)
+  extern void * iki_read_thread_signal(void * const main);
+#endif // !defined(_di_iki_read_thread_signal_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _iki_read_thread_h
index c6653172ef1e71eb1aff738b1cbad4300feeacd6..490da41d8e72323bf3a9086dfbed1d8d565cd20f 100644 (file)
@@ -1,2 +1,6 @@
 # fss-0000
 
+_di_thread_support_ Disables thread support.
+
+_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
+_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
index 2c569c92b8b3206c41bd6c597bac34633201146a..7a6873ca4806a369baae6fced9eaf05ff471d43d 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name iki_read
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual level monolithic clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -19,14 +31,15 @@ build_language c
 
 build_libraries -lc
 build_libraries-individual -lfll_error -lfll_print -lfll_program -lfl_conversion -lfl_iki -lfl_print -lfl_signal -lf_color -lf_compare -lf_console -lf_conversion -lf_file -lf_iki -lf_memory -lf_pipe -lf_print -lf_rip -lf_signal -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
-build_sources_library main/iki_read.c main/common.c main/identify.c main/common/define.c main/common/enumeration.c main/common/print.c main/common/string.c main/common/type.c main/print/data.c main/print/error.c main/print/message.c main/process.c
+build_sources_library main/iki_read.c main/common.c main/identify.c main/common/define.c main/common/enumeration.c main/common/print.c main/common/string.c main/common/type.c main/print/data.c main/print/error.c main/print/message.c main/process.c main/signal.c main/thread.c
 
 build_sources_program main/main.c
 
-build_sources_headers main/iki_read.h main/common.h main/identify.h main/common/define.h main/common/enumeration.h main/common/print.h main/common/string.h main/common/type.h main/print/data.h main/print/error.h main/print/message.h main/process.h
+build_sources_headers main/iki_read.h main/common.h main/identify.h main/common/define.h main/common/enumeration.h main/common/print.h main/common/string.h main/common/type.h main/print/data.h main/print/error.h main/print/message.h main/process.h main/signal.h main/thread.h
 
 build_sources_documentation man
 
@@ -55,10 +68,13 @@ search_static yes
 environment PATH LD_LIBRARY_PATH
 environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
 
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
 
 flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -O0 -fstack-protector -Wall
 flags-fanalyzer -fanalyzer
index 239602881c66be09556702a1d69cf1fdc0d801c5..c6d7c03abb03df0fd0e772304dfe9e5e377de63d 100644 (file)
@@ -4,23 +4,6 @@
 extern "C" {
 #endif
 
-#ifndef _di_iki_write_setting_delete_
-  f_status_t iki_write_setting_delete(iki_write_setting_t * const setting) {
-
-    if (!setting) return F_status_set_error(F_parameter);
-
-    f_string_dynamic_resize(0, &setting->escaped);
-    f_string_dynamic_resize(0, &setting->buffer);
-    f_string_dynamic_resize(0, &setting->object);
-    f_string_dynamic_resize(0, &setting->content);
-
-    f_string_dynamics_resize(0, &setting->objects);
-    f_string_dynamics_resize(0, &setting->contents);
-
-    return F_none;
-  }
-#endif // _di_iki_write_setting_delete_
-
 #ifndef _di_iki_write_setting_load_
   void iki_write_setting_load(const f_console_arguments_t arguments, iki_write_main_t * const main) {
 
@@ -307,17 +290,6 @@ extern "C" {
   }
 #endif // _di_iki_write_setting_load_
 
-#ifndef _di_iki_write_setting_unload_
-  f_status_t iki_write_setting_unload(iki_write_main_t * const main) {
-
-    if (!main) return F_status_set_error(F_parameter);
-
-    iki_write_setting_delete(&main->setting);
-
-    return F_none;
-  }
-#endif // _di_iki_write_setting_unload_
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 3993ef7215dddda561cda81ae99257e34ecbc23e..034752609710bcc8a33d561243d8a53f15cf184d 100644 (file)
@@ -17,23 +17,6 @@ extern "C" {
 #endif
 
 /**
- * Delete the program main setting data.
- *
- * @param setting
- *   The program main setting data.
- *
- *   This does not alter setting.state.status.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_iki_write_setting_delete_
-  extern f_status_t iki_write_setting_delete(iki_write_setting_t * const setting);
-#endif // _di_iki_write_setting_delete_
-
-/**
  * Perform the standard program setting load process.
  *
  * This prints error messages as appropriate.
@@ -64,28 +47,6 @@ extern "C" {
   extern void iki_write_setting_load(const f_console_arguments_t arguments, iki_write_main_t * const main);
 #endif // _di_iki_write_setting_load_
 
-/**
- * Perform the standard program setting unload process.
- *
- * @param main
- *   The main program and setting data.
- *   All buffers are deallocated.
- *
- *   This does not alter main.setting.state.status.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: iki_write_setting_delete().
- *
- * @see iki_write_setting_delete()
- */
-#ifndef _di_iki_write_setting_unload_
-  extern f_status_t iki_write_setting_unload(iki_write_main_t * const main);
-#endif // _di_iki_write_setting_unload_
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 143f3506f6361957d8548c4833c85130157a5fba..0714d6cfcf5d649d4dffbd01d2a8f8f2334e57f8 100644 (file)
@@ -17,20 +17,48 @@ extern "C" {
 #endif
 
 /**
- * The program defines.
+ * The program allocation defines.
  *
- * iki_write_*_d:
- *   - allocation_console: An allocation step used for small buffers specifically for console parameter.
- *   - allocation_large:   An allocation step used for buffers that are anticipated to have large buffers.
- *   - allocation_small:   An allocation step used for buffers that are anticipated to have small buffers.
- *   - signal_check:       Number of iterations before performing signal check in non-threaded signal handling.
+ * iki_write_allocation_*_d:
+ *   - console: An allocation step used for small buffers specifically for console parameter.
+ *   - large:   An allocation step used for buffers that are anticipated to have large buffers.
+ *   - pipe:    A buffer size used for processing piped data.
+ *   - small:   An allocation step used for buffers that are anticipated to have small buffers.
  */
-#ifndef _di_iki_write_d_
+#ifndef _di_iki_write_allocation_d_
   #define iki_write_allocation_console_d 4
   #define iki_write_allocation_large_d   256
+  #define iki_write_allocation_pipe_d    16384
   #define iki_write_allocation_small_d   16
-  #define iki_write_signal_check_d       20000
-#endif // _di_iki_write_d_
+#endif // _di_iki_write_allocation_d_
+
+/**
+ * The program signal defines.
+ *
+ * iki_write_signal_*_d:
+ *   - check:          Number of iterations before performing signal check in non-threaded signal handling.
+ *   - check_failsafe: When using threads, how many consecutive failures to check signal before aborting (as a recursion failsafe).
+ *   - check_tiny:     The tiny check.
+ *   - check_short:    The short signal check.
+ */
+#ifndef _di_iki_write_signal_d_
+  #define iki_write_signal_check_d          500000
+  #define iki_write_signal_check_failsafe_d 20000
+  #define iki_write_signal_check_tiny_d     4
+  #define iki_write_signal_check_short_d    16
+#endif // _di_iki_write_signal_d_
+
+/**
+ * Deallocate main program data.
+ *
+ * @param setting_make
+ *   The make setting data.
+ *
+ *   This does not alter data_make.main.setting.state.status.
+ */
+#ifndef _di_iki_write_main_data_delete_
+  extern void iki_write_main_delete(iki_write_main_t * const main);
+#endif // _di_iki_write_main_data_delete_
 
 #ifdef __cplusplus
 } // extern "C"
index 0b193cb2ff32760f2ebeefdc00998a2c21557512..48eaf5ff9de0ab3138495c4323b03c68356ab7a1 100644 (file)
@@ -13,6 +13,7 @@ extern "C" {
     "f_string_dynamic_partial_append_nulless",
     "f_string_dynamic_seek_to",
     "f_string_dynamics_resize",
+    "f_thread_create",
     "fll_iki_content_escape",
     "fll_program_parameter_process_context",
     "fll_program_parameter_process_verbosity",
index 55e17738d4313db4202954f0967869f03c11f22a..a240b5cede0186a5242730a6df78d4b8ffabe678 100644 (file)
@@ -46,6 +46,7 @@ extern "C" {
     iki_write_f_f_string_dynamic_partial_append_nulless_e,
     iki_write_f_f_string_dynamic_seek_to_e,
     iki_write_f_f_string_dynamics_resize_e,
+    iki_write_f_f_thread_create_e,
     iki_write_f_fll_iki_content_escape_e,
     iki_write_f_fll_program_parameter_process_context_e,
     iki_write_f_fll_program_parameter_process_verbosity_e,
index 192b52858ac331efc681624e6540625b821ba22f..05241817f407961bc47e56e1087f5e600cac015e 100644 (file)
@@ -4,6 +4,33 @@
 extern "C" {
 #endif
 
+#ifndef _di_iki_write_main_data_delete_
+  void iki_write_main_delete(iki_write_main_t * const main) {
+
+    if (!main) return;
+
+    fll_program_data_delete(&main->program);
+    iki_write_setting_delete(&main->setting);
+  }
+#endif // _di_iki_write_main_data_delete_
+
+#ifndef _di_iki_write_setting_delete_
+  f_status_t iki_write_setting_delete(iki_write_setting_t * const setting) {
+
+    if (!setting) return F_status_set_error(F_parameter);
+
+    f_string_dynamic_resize(0, &setting->escaped);
+    f_string_dynamic_resize(0, &setting->buffer);
+    f_string_dynamic_resize(0, &setting->object);
+    f_string_dynamic_resize(0, &setting->content);
+
+    f_string_dynamics_resize(0, &setting->objects);
+    f_string_dynamics_resize(0, &setting->contents);
+
+    return F_none;
+  }
+#endif // _di_iki_write_setting_delete_
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 22bbd0292db021395d96f27b2139d1444cd7d041..d199ea3d6a4fd3edfaea63a67010686e4ef6f7c0 100644 (file)
@@ -24,7 +24,8 @@ extern "C" {
  *
  * flag: Flags passed to the main function.
  *
- * state: The state information.
+ * status_thread: A status used eclusively by the threaded signal handler.
+ * state:         The state data used when processing the FSS data.
  *
  * quote: This holds the quote used during processing.
  *
@@ -40,6 +41,7 @@ extern "C" {
   typedef struct {
     uint16_t flag;
 
+    f_status_t status_thread;
     f_state_t state;
 
     f_string_static_t quote;
@@ -56,6 +58,7 @@ extern "C" {
   #define iki_write_setting_t_initialize \
     { \
       iki_write_main_flag_none_e, \
+      F_none, \
       f_state_t_initialize, \
       f_string_dynamic_t_initialize, \
       f_string_dynamic_t_initialize, \
@@ -85,6 +88,35 @@ extern "C" {
     }
 #endif // _di_iki_write_main_t_
 
+/**
+ * Deallocate main program data.
+ *
+ * @param setting_make
+ *   The make setting data.
+ *
+ *   This does not alter data_make.main.setting.state.status.
+ */
+#ifndef _di_iki_write_main_data_delete_
+  extern void iki_write_main_delete(iki_write_main_t * const main);
+#endif // _di_iki_write_main_data_delete_
+
+/**
+ * Delete the program main setting data.
+ *
+ * @param setting
+ *   The program main setting data.
+ *
+ *   This does not alter setting.state.status.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_iki_write_setting_delete_
+  extern f_status_t iki_write_setting_delete(iki_write_setting_t * const setting);
+#endif // _di_iki_write_setting_delete_
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 5bddd486cf38c24d78de5d3ece55abf5eb0abb1f..433ff74e7aeeeaec3e02f94753dd702889cfd459 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 3
  *
- * Project: IKI
+ * Project: IKI Write
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
 #include <fll/level_0/rip.h>
 #include <fll/level_0/signal.h>
 
+#ifndef _di_thread_support_
+  #include <fll/level_0/thread.h>
+#endif // _di_thread_support_
+
 // FLL-1 includes.
 #include <fll/level_1/conversion.h>
 #include <fll/level_1/iki.h>
@@ -61,6 +65,8 @@
 #include <program/iki_write/main/print/error.h>
 #include <program/iki_write/main/print/message.h>
 #include <program/iki_write/main/process.h>
+#include <program/iki_write/main/signal.h>
+#include <program/iki_write/main/thread.h>
 
 #ifdef __cplusplus
 extern "C" {
index 9ead59555809d6d0327eac5c1a7b5eb281468462..9187eb2941ffb2501616eb188e6012138f2ab86f 100644 (file)
@@ -26,17 +26,45 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
   fll_program_standard_set_up(&data.program);
 
-  {
-    const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+  f_file_umask_get(&data.program.umask);
 
-    iki_write_setting_load(arguments, &data);
-  }
+  #ifdef _di_thread_support_
+    {
+      const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+      iki_write_setting_load(arguments, &data);
+    }
+
+    iki_write_main(&data);
+  #else
+    {
+      f_thread_id_t id_signal;
+
+      memset(&id_signal, 0, sizeof(f_thread_id_t));
+
+      data.setting.state.status = f_thread_create(0, &id_signal, &iki_write_thread_signal, (void *) &data);
+
+      if (F_status_is_error(data.setting.state.status)) {
+        iki_write_print_error(&data.program.error, macro_iki_write_f(f_thread_create));
+      }
+      else {
+        {
+          const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+          iki_write_setting_load(arguments, &data);
+        }
 
-  iki_write_main(&data);
+        if (!iki_write_signal_check(&data)) {
+          iki_write_main(&data);
+        }
 
-  iki_write_setting_unload(&data);
+        f_thread_cancel(id_signal);
+        f_thread_join(id_signal, 0);
+      }
+    }
+  #endif // _di_thread_support_
 
-  fll_program_data_delete(&data.program);
+  iki_write_main_delete(&data);
 
   fll_program_standard_set_down(&data.program);
 
index f8e2a9e7c887e5051639d6fc3339851843e4a36d..26888d7052da82b0adde6b0ac8e6cced62e36100 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 3
  *
- * Project: IKI
+ * Project: IKI Write
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
diff --git a/level_3/iki_write/c/main/signal.c b/level_3/iki_write/c/main/signal.c
new file mode 100644 (file)
index 0000000..f6b4327
--- /dev/null
@@ -0,0 +1,113 @@
+#include "iki_write.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_iki_write_signal_check_) && defined(_di_thread_support_)
+  f_status_t iki_write_signal_check(iki_write_main_t * const main) {
+
+    if (!main) return F_false;
+    if (main->program.signal.id == -1) return F_false;
+
+    if (!((++main->program.signal_check) % iki_write_signal_check_d)) {
+      if (fll_program_standard_signal_received(&main->program)) {
+        fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
+
+        main->setting.state.status = F_status_set_error(F_interrupt);
+
+        return F_true;
+      }
+
+      main->program.signal_check = 0;
+    }
+
+    return F_false;
+  }
+#endif // !defined(_di_iki_write_signal_check_) && defined(_di_thread_support_)
+
+#if !defined(_di_iki_write_signal_check_) && !defined(_di_thread_support_)
+  f_status_t iki_write_signal_check(iki_write_main_t * const main) {
+
+    if (!main) return F_false;
+    if (main->program.signal.id == -1) return F_false;
+
+    if (main->program.signal_received) {
+      fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
+
+      main->setting.state.status = F_status_set_error(F_interrupt);
+
+      return F_true;
+    }
+
+    return F_false;
+  }
+#endif // !defined(_di_iki_write_signal_check_) && !defined(_di_thread_support_)
+
+#if !defined(_di_iki_write_signal_handler_) && !defined(_di_thread_support_)
+  void iki_write_signal_handler(iki_write_main_t * const main) {
+
+    if (!main) return;
+
+    siginfo_t information;
+    f_array_length_t failsafe = 0;
+
+    memset(&information, 0, sizeof(siginfo_t));
+
+    main->program.signal_received = 0;
+
+    f_signal_set_empty(&main->program.signal.set);
+    f_signal_set_add(F_signal_abort, &main->program.signal.set);
+    f_signal_set_add(F_signal_broken_pipe, &main->program.signal.set);
+    f_signal_set_add(F_signal_hangup, &main->program.signal.set);
+    f_signal_set_add(F_signal_interrupt, &main->program.signal.set);
+    f_signal_set_add(F_signal_quit, &main->program.signal.set);
+    f_signal_set_add(F_signal_termination, &main->program.signal.set);
+
+    if (main->program.signal.id == -1) {
+      main->setting.status_thread = f_signal_open(&main->program.signal);
+
+      if (F_status_is_error(main->setting.status_thread)) {
+        main->program.signal_received = F_signal_abort;
+
+        return;
+      }
+    }
+
+    do {
+      memset(&information, 0, sizeof(siginfo_t));
+
+      main->setting.status_thread = f_signal_wait(&main->program.signal.set, &information);
+
+      if (F_status_is_error(main->setting.status_thread) && F_status_set_fine(main->setting.status_thread) != F_interrupt) {
+        if (++failsafe >= iki_write_signal_check_failsafe_d) break;
+      }
+
+      switch (information.si_signo) {
+        case F_signal_abort:
+        case F_signal_broken_pipe:
+        case F_signal_hangup:
+        case F_signal_interrupt:
+        case F_signal_quit:
+        case F_signal_termination:
+          main->program.signal_received = information.si_signo;
+
+          break;
+      }
+
+      failsafe = 0;
+      main->setting.status_thread = F_none;
+
+    } while (!main->program.signal_received);
+
+    f_signal_close(&main->program.signal);
+
+    if (F_status_is_error(main->setting.status_thread)) {
+      main->program.signal_received = F_signal_abort;
+    }
+  }
+#endif // !defined(_di_iki_write_signal_handler_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/iki_write/c/main/signal.h b/level_3/iki_write/c/main/signal.h
new file mode 100644 (file)
index 0000000..2301f0b
--- /dev/null
@@ -0,0 +1,86 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: IKI Write
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides signal functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _iki_write_signal_h
+#define _iki_write_signal_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Check to see if a signal is received.
+ *
+ * If main.signal is non-zero, then this handles the following signals:
+ *   - F_signal_abort
+ *   - F_signal_broken_pipe
+ *   - F_signal_hangup
+ *   - F_signal_interrupt
+ *   - F_signal_quit
+ *   - F_signal_termination
+ *
+ * There is a threaded and a non-threaded version of this.
+ * The non-threaded version checks periodically using iki_write_signal_check_d and updates main->signal_check as needed.
+ * The threaded version checks the flag state which is set by a separate thread that is blocking until signal is received.
+ *
+ * @param main
+ *   The main program and settings data.
+ *
+ *   This does not alter main.setting.state.status.
+ *
+ * @return
+ *   F_true on signal received.
+ *   F_false otherwise.
+ *
+ * @see iki_write_signal_handler()
+ *
+ * @see fll_program_standard_signal_received()
+ */
+#ifndef _di_iki_write_signal_check_
+  extern f_status_t iki_write_signal_check(iki_write_main_t * const main);
+#endif // _di_iki_write_signal_check_
+
+/**
+ * Signal handler for signals/interrupts.
+ *
+ * This blocks until an expected signal is recieved.
+ * When an expected signal is received it then sets the
+ *
+ * If main.signal is non-zero, then this handles the following signals:
+ *   - F_signal_abort
+ *   - F_signal_broken_pipe
+ *   - F_signal_hangup
+ *   - F_signal_interrupt
+ *   - F_signal_quit
+ *   - F_signal_termination
+ *
+ * @param main
+ *   The main program and settings data.
+ *
+ *   This alters main.program.signal_received, setting it to a received signal.
+ *
+ *   This alters setting.status:
+ *     Errors with (error bit set) from: f_signal_open()
+ *     Errors with (error bit set) from: f_signal_wait()
+ *
+ * @see f_signal_close()
+ * @see f_signal_open()
+ * @see f_signal_wait()
+ */
+#if !defined(_di_iki_write_signal_handler_) && !defined(_di_thread_support_)
+  extern void iki_write_signal_handler(iki_write_main_t * const main);
+#endif // !defined(_di_iki_write_signal_handler_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _iki_write_signal_h
diff --git a/level_3/iki_write/c/main/thread.c b/level_3/iki_write/c/main/thread.c
new file mode 100644 (file)
index 0000000..f67796e
--- /dev/null
@@ -0,0 +1,26 @@
+#include "iki_write.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_iki_write_thread_signal_) && !defined(_di_thread_support_)
+  void * iki_write_thread_signal(void * const main) {
+
+    f_thread_cancel_state_set(PTHREAD_CANCEL_DEFERRED, 0);
+
+    if (main) {
+      iki_write_signal_handler((iki_write_main_t *) main);
+    }
+
+    return 0;
+  }
+#endif // !defined(_di_iki_write_thread_signal_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/iki_write/c/main/thread.h b/level_3/iki_write/c/main/thread.h
new file mode 100644 (file)
index 0000000..3e3b5c0
--- /dev/null
@@ -0,0 +1,46 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: IKI Write
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides thread functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _iki_write_thread_h
+#define _iki_write_thread_h
+
+/**
+ * Thread handler for signals/interrupts.
+ *
+ * If main.signal is non-zero, then this handles the following signals:
+ *   - F_signal_abort
+ *   - F_signal_broken_pipe
+ *   - F_signal_hangup
+ *   - F_signal_interrupt
+ *   - F_signal_quit
+ *   - F_signal_termination
+ *
+ * @param main
+ *   The program and settings data.
+ *
+ *   Must be of type iki_write_main_t.
+ *
+ * @return
+ *   0, always.
+ *
+ * @see f_thread_cancel_state_set()
+ *
+ * @see iki_write_signal_handler()
+ */
+#if !defined(_di_iki_write_thread_signal_) && !defined(_di_thread_support_)
+  extern void * iki_write_thread_signal(void * const main);
+#endif // !defined(_di_iki_write_thread_signal_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _iki_write_thread_h
index c6653172ef1e71eb1aff738b1cbad4300feeacd6..490da41d8e72323bf3a9086dfbed1d8d565cd20f 100644 (file)
@@ -1,2 +1,6 @@
 # fss-0000
 
+_di_thread_support_ Disables thread support.
+
+_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
+_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
index fa1bc1dd54d5c35986f42d99428364f41d953a2e..d33f76f3c3da87a1ad4db88ba9030e7d912c4adb 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name iki_write
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual level monolithic clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -18,14 +30,15 @@ build_indexer_arguments rcs
 build_language c
 build_libraries -lc
 build_libraries-individual -lfll_error -lfll_iki -lfll_print -lfll_program -lfl_iki -lfl_print -lf_color -lf_console -lf_conversion -lf_file -lf_iki -lf_memory -lf_pipe -lf_print -lf_rip -lf_signal -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
-build_sources_library main/iki_write.c main/common.c main/common/define.c main/common/enumeration.c main/common/print.c main/common/string.c main/common/type.c main/print/error.c main/print/message.c main/process.c
+build_sources_library main/iki_write.c main/common.c main/common/define.c main/common/enumeration.c main/common/print.c main/common/string.c main/common/type.c main/print/error.c main/print/message.c main/process.c main/signal.c main/thread.c
 
 build_sources_program main/main.c
 
-build_sources_headers main/iki_write.h main/common.h main/common/define.h main/common/enumeration.h main/common/print.h main/common/string.h main/common/type.h main/print/error.h main/print/message.h main/process.h
+build_sources_headers main/iki_write.h main/common.h main/common/define.h main/common/enumeration.h main/common/print.h main/common/string.h main/common/type.h main/print/error.h main/print/message.h main/process.h main/signal.h main/thread.h
 
 build_sources_documentation man
 
@@ -54,14 +67,18 @@ search_static yes
 environment PATH LD_LIBRARY_PATH
 environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
 
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
 
 flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -O0 -fstack-protector -Wall
 flags-fanalyzer -fanalyzer
 flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
+
 flags_library -fPIC
 flags_object -fPIC
 flags_program -fPIE
index 22b118708512408f90fda7f6ec7a989c7fc0802a..607f16457f6de9c7bea26cca1d3333e7b95b8389 100644 (file)
@@ -35,17 +35,45 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
   fll_program_standard_set_up(&data.program);
 
-  {
-    const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+  f_file_umask_get(&data.program.umask);
 
-    status_code_setting_load(arguments, &data);
-  }
+  #ifdef _di_thread_support_
+    {
+      const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+      status_code_setting_load(arguments, &data);
+    }
+
+    status_code_main(&data);
+  #else
+    {
+      f_thread_id_t id_signal;
+
+      memset(&id_signal, 0, sizeof(f_thread_id_t));
+
+      data.setting.state.status = f_thread_create(0, &id_signal, &status_code_thread_signal, (void *) &data);
+
+      if (F_status_is_error(data.setting.state.status)) {
+        status_code_print_error(&data.program.error, macro_status_code_f(f_thread_create));
+      }
+      else {
+        {
+          const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+          status_code_setting_load(arguments, &data);
+        }
 
-  status_code_main(&data);
+        if (!status_code_signal_check(&data)) {
+          status_code_main(&data);
+        }
 
-  status_code_setting_unload(&data);
+        f_thread_cancel(id_signal);
+        f_thread_join(id_signal, 0);
+      }
+    }
+  #endif // _di_thread_support_
 
-  fll_program_data_delete(&data.program);
+  status_code_main_delete(&data);
 
   fll_program_standard_set_down(&data.program);
 
index 93385bf5fc4c1416f46cb55af37e73dbd6e5460d..c205e094ff02d26ca150e76dc6f09ec6c1cd94b0 100644 (file)
@@ -4,15 +4,6 @@
 extern "C" {
 #endif
 
-#ifndef _di_status_code_setting_delete_
-  f_status_t status_code_setting_delete(status_code_setting_t * const setting) {
-
-    if (!setting) return F_status_set_error(F_parameter);
-
-    return F_none;
-  }
-#endif // _di_status_code_setting_delete_
-
 #ifndef _di_status_code_setting_load_
   void status_code_setting_load(const f_console_arguments_t arguments, status_code_main_t * const main) {
 
@@ -182,17 +173,6 @@ extern "C" {
   }
 #endif // _di_status_code_setting_load_
 
-#ifndef _di_status_code_setting_unload_
-  f_status_t status_code_setting_unload(status_code_main_t * const main) {
-
-    if (!main) return F_status_set_error(F_parameter);
-
-    status_code_setting_delete(&main->setting);
-
-    return F_none;
-  }
-#endif // _di_status_code_setting_unload_
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 55552fcb5c5a7432827c1c1a98d5a72409b3d2b2..62d974a4c6b768ddc4df3c01bb584b76bf868109 100644 (file)
@@ -17,23 +17,6 @@ extern "C" {
 #endif
 
 /**
- * Delete the program main setting data.
- *
- * @param setting
- *   The program main setting data.
- *
- *   This does not alter setting.state.status.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_status_code_setting_delete_
-  extern f_status_t status_code_setting_delete(status_code_setting_t * const setting);
-#endif // _di_status_code_setting_delete_
-
-/**
  * Perform the standard program setting load process.
  *
  * This prints error messages as appropriate.
@@ -58,28 +41,6 @@ extern "C" {
   extern void status_code_setting_load(const f_console_arguments_t arguments, status_code_main_t * const main);
 #endif // _di_status_code_setting_load_
 
-/**
- * Perform the standard program setting unload process.
- *
- * @param main
- *   The main program and setting data.
- *   All buffers are deallocated.
- *
- *   This does not alter main.setting.state.status.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: status_code_setting_delete().
- *
- * @see status_code_setting_delete()
- */
-#ifndef _di_status_code_setting_unload_
-  extern f_status_t status_code_setting_unload(status_code_main_t * const main);
-#endif // _di_status_code_setting_unload_
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 9909e323acdc1fc1e199f8df39c0f92a5abaf087..b0356930f0ca05082febbb2965d3b9353f267161 100644 (file)
@@ -17,20 +17,36 @@ extern "C" {
 #endif
 
 /**
- * The program defines.
+ * The program allocation defines.
  *
- * status_code_*_d:
- *   - allocation_console: An allocation step used for small buffers specifically for console parameter.
- *   - allocation_large:   An allocation step used for buffers that are anticipated to have large buffers.
- *   - allocation_small:   An allocation step used for buffers that are anticipated to have small buffers.
- *   - signal_check:       Number of iterations before performing signal check in non-threaded signal handling.
+ * status_code_allocation_*_d:
+ *   - console: An allocation step used for small buffers specifically for console parameter.
+ *   - large:   An allocation step used for buffers that are anticipated to have large buffers.
+ *   - pipe:    A buffer size used for processing piped data.
+ *   - small:   An allocation step used for buffers that are anticipated to have small buffers.
  */
-#ifndef _di_status_code_d_
+#ifndef _di_status_code_allocation_d_
   #define status_code_allocation_console_d 4
   #define status_code_allocation_large_d   256
+  #define status_code_allocation_pipe_d    16384
   #define status_code_allocation_small_d   16
-  #define status_code_signal_check_d       20000
-#endif // _di_status_code_d_
+#endif // _di_status_code_allocation_d_
+
+/**
+ * The program signal defines.
+ *
+ * status_code_signal_*_d:
+ *   - check:          Number of iterations before performing signal check in non-threaded signal handling.
+ *   - check_failsafe: When using threads, how many consecutive failures to check signal before aborting (as a recursion failsafe).
+ *   - check_tiny:     The tiny check.
+ *   - check_short:    The short signal check.
+ */
+#ifndef _di_status_code_signal_d_
+  #define status_code_signal_check_d          500000
+  #define status_code_signal_check_failsafe_d 20000
+  #define status_code_signal_check_tiny_d     4
+  #define status_code_signal_check_short_d    16
+#endif // _di_status_code_signal_d_
 
 #ifdef __cplusplus
 } // extern "C"
index 4497281843309708e91b6dbb3caf0615b59b8b91..600acc87747709ed1b95494e2ae9723795c13809 100644 (file)
@@ -7,10 +7,11 @@ extern "C" {
 #ifndef _di_status_code_f_a_
   const f_string_t status_code_f_a[] = {
     "f_console_parameter_process",
-    "status_string_from",
-    "status_string_to",
+    "f_thread_create",
     "fll_program_parameter_process_context",
     "fll_program_parameter_process_verbosity",
+    "status_string_from",
+    "status_string_to",
   };
 #endif // _di_status_code_f_a_
 
index bcd71e9526464aaa9ffccc694ffae87061930497..9ded4a58bc80c7610c3181c5bab8317982a6f122 100644 (file)
@@ -40,10 +40,11 @@ extern "C" {
 #ifndef _di_status_code_f_e_
   enum {
     status_code_f_f_console_parameter_process_e,
-    status_code_f_status_string_from_e,
-    status_code_f_status_string_to_e,
+    status_code_f_f_thread_create_e,
     status_code_f_fll_program_parameter_process_context_e,
     status_code_f_fll_program_parameter_process_verbosity_e,
+    status_code_f_status_string_from_e,
+    status_code_f_status_string_to_e,
   }; // enum
 #endif // _di_status_code_f_e_
 
index 4c41666cdf0633aa43a06b4bf84eb5b964705c67..244c9c938d7df2c749b9fbcbbf983d217ea2aa1c 100644 (file)
@@ -4,6 +4,25 @@
 extern "C" {
 #endif
 
+#ifndef _di_status_code_main_data_delete_
+  void status_code_main_delete(status_code_main_t * const main) {
+
+    if (!main) return;
+
+    fll_program_data_delete(&main->program);
+    status_code_setting_delete(&main->setting);
+  }
+#endif // _di_status_code_main_data_delete_
+
+#ifndef _di_status_code_setting_delete_
+  f_status_t status_code_setting_delete(status_code_setting_t * const setting) {
+
+    if (!setting) return F_status_set_error(F_parameter);
+
+    return F_none;
+  }
+#endif // _di_status_code_setting_delete_
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 36cdd045c92f48ec81233cadd5ea321d0e4c853e..3054df6c796211fc4a9fd23600e944a337d8dd49 100644 (file)
@@ -24,7 +24,8 @@ extern "C" {
  *
  * flag: Flags passed to the main function.
  *
- * state: The state information.
+ * status_thread: A status used eclusively by the threaded signal handler.
+ * state:         The state data used when processing the FSS data.
  *
  * status_string_from:        A pointer to the status string function (usually either fl_status_string_from() or fll_fss_status_string_from()).
  * status_string_to:          A pointer to the status string function (usually either f_status_string_to() or fll_fss_status_string_to()).
@@ -34,6 +35,7 @@ extern "C" {
   typedef struct {
     uint16_t flag;
 
+    f_status_t status_thread;
     f_state_t state;
 
     const f_string_static_t *program_name;
@@ -47,6 +49,7 @@ extern "C" {
   #define status_code_setting_t_initialize \
     { \
       status_code_main_flag_none_e, \
+      F_none, \
       f_state_t_initialize, \
       0, \
       0, \
@@ -75,6 +78,35 @@ extern "C" {
     }
 #endif // _di_status_code_main_t_
 
+/**
+ * Deallocate main program data.
+ *
+ * @param setting_make
+ *   The make setting data.
+ *
+ *   This does not alter data_make.main.setting.state.status.
+ */
+#ifndef _di_status_code_main_data_delete_
+  extern void status_code_main_delete(status_code_main_t * const main);
+#endif // _di_status_code_main_data_delete_
+
+/**
+ * Delete the program main setting data.
+ *
+ * @param setting
+ *   The program main setting data.
+ *
+ *   This does not alter setting.state.status.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_status_code_setting_delete_
+  extern f_status_t status_code_setting_delete(status_code_setting_t * const setting);
+#endif // _di_status_code_setting_delete_
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
index f620de6a80e00ac4e22ba4ca24513c60dd693ee2..d3e286096ec8d7b43d83135419baa29e3f5aea39 100644 (file)
@@ -33,17 +33,45 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
   fll_program_standard_set_up(&data.program);
 
-  {
-    const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+  f_file_umask_get(&data.program.umask);
 
-    status_code_setting_load(arguments, &data);
-  }
+  #ifdef _di_thread_support_
+    {
+      const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+      status_code_setting_load(arguments, &data);
+    }
+
+    status_code_main(&data);
+  #else
+    {
+      f_thread_id_t id_signal;
+
+      memset(&id_signal, 0, sizeof(f_thread_id_t));
+
+      data.setting.state.status = f_thread_create(0, &id_signal, &status_code_thread_signal, (void *) &data);
+
+      if (F_status_is_error(data.setting.state.status)) {
+        status_code_print_error(&data.program.error, macro_status_code_f(f_thread_create));
+      }
+      else {
+        {
+          const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+          status_code_setting_load(arguments, &data);
+        }
 
-  status_code_main(&data);
+        if (!status_code_signal_check(&data)) {
+          status_code_main(&data);
+        }
 
-  status_code_setting_unload(&data);
+        f_thread_cancel(id_signal);
+        f_thread_join(id_signal, 0);
+      }
+    }
+  #endif // _di_thread_support_
 
-  fll_program_data_delete(&data.program);
+  status_code_main_delete(&data);
 
   fll_program_standard_set_down(&data.program);
 
diff --git a/level_3/status_code/c/main/signal.c b/level_3/status_code/c/main/signal.c
new file mode 100644 (file)
index 0000000..419a292
--- /dev/null
@@ -0,0 +1,113 @@
+#include "status_code.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_status_code_signal_check_) && defined(_di_thread_support_)
+  f_status_t status_code_signal_check(status_code_main_t * const main) {
+
+    if (!main) return F_false;
+    if (main->program.signal.id == -1) return F_false;
+
+    if (!((++main->program.signal_check) % status_code_signal_check_d)) {
+      if (fll_program_standard_signal_received(&main->program)) {
+        fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
+
+        main->setting.state.status = F_status_set_error(F_interrupt);
+
+        return F_true;
+      }
+
+      main->program.signal_check = 0;
+    }
+
+    return F_false;
+  }
+#endif // !defined(_di_status_code_signal_check_) && defined(_di_thread_support_)
+
+#if !defined(_di_status_code_signal_check_) && !defined(_di_thread_support_)
+  f_status_t status_code_signal_check(status_code_main_t * const main) {
+
+    if (!main) return F_false;
+    if (main->program.signal.id == -1) return F_false;
+
+    if (main->program.signal_received) {
+      fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
+
+      main->setting.state.status = F_status_set_error(F_interrupt);
+
+      return F_true;
+    }
+
+    return F_false;
+  }
+#endif // !defined(_di_status_code_signal_check_) && !defined(_di_thread_support_)
+
+#if !defined(_di_status_code_signal_handler_) && !defined(_di_thread_support_)
+  void status_code_signal_handler(status_code_main_t * const main) {
+
+    if (!main) return;
+
+    siginfo_t information;
+    f_array_length_t failsafe = 0;
+
+    memset(&information, 0, sizeof(siginfo_t));
+
+    main->program.signal_received = 0;
+
+    f_signal_set_empty(&main->program.signal.set);
+    f_signal_set_add(F_signal_abort, &main->program.signal.set);
+    f_signal_set_add(F_signal_broken_pipe, &main->program.signal.set);
+    f_signal_set_add(F_signal_hangup, &main->program.signal.set);
+    f_signal_set_add(F_signal_interrupt, &main->program.signal.set);
+    f_signal_set_add(F_signal_quit, &main->program.signal.set);
+    f_signal_set_add(F_signal_termination, &main->program.signal.set);
+
+    if (main->program.signal.id == -1) {
+      main->setting.status_thread = f_signal_open(&main->program.signal);
+
+      if (F_status_is_error(main->setting.status_thread)) {
+        main->program.signal_received = F_signal_abort;
+
+        return;
+      }
+    }
+
+    do {
+      memset(&information, 0, sizeof(siginfo_t));
+
+      main->setting.status_thread = f_signal_wait(&main->program.signal.set, &information);
+
+      if (F_status_is_error(main->setting.status_thread) && F_status_set_fine(main->setting.status_thread) != F_interrupt) {
+        if (++failsafe >= status_code_signal_check_failsafe_d) break;
+      }
+
+      switch (information.si_signo) {
+        case F_signal_abort:
+        case F_signal_broken_pipe:
+        case F_signal_hangup:
+        case F_signal_interrupt:
+        case F_signal_quit:
+        case F_signal_termination:
+          main->program.signal_received = information.si_signo;
+
+          break;
+      }
+
+      failsafe = 0;
+      main->setting.status_thread = F_none;
+
+    } while (!main->program.signal_received);
+
+    f_signal_close(&main->program.signal);
+
+    if (F_status_is_error(main->setting.status_thread)) {
+      main->program.signal_received = F_signal_abort;
+    }
+  }
+#endif // !defined(_di_status_code_signal_handler_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/status_code/c/main/signal.h b/level_3/status_code/c/main/signal.h
new file mode 100644 (file)
index 0000000..905544b
--- /dev/null
@@ -0,0 +1,86 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: Status Code
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides signal functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _status_code_signal_h
+#define _status_code_signal_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Check to see if a signal is received.
+ *
+ * If main.signal is non-zero, then this handles the following signals:
+ *   - F_signal_abort
+ *   - F_signal_broken_pipe
+ *   - F_signal_hangup
+ *   - F_signal_interrupt
+ *   - F_signal_quit
+ *   - F_signal_termination
+ *
+ * There is a threaded and a non-threaded version of this.
+ * The non-threaded version checks periodically using status_code_signal_check_d and updates main->signal_check as needed.
+ * The threaded version checks the flag state which is set by a separate thread that is blocking until signal is received.
+ *
+ * @param main
+ *   The main program and settings data.
+ *
+ *   This does not alter main.setting.state.status.
+ *
+ * @return
+ *   F_true on signal received.
+ *   F_false otherwise.
+ *
+ * @see status_code_signal_handler()
+ *
+ * @see fll_program_standard_signal_received()
+ */
+#ifndef _di_status_code_signal_check_
+  extern f_status_t status_code_signal_check(status_code_main_t * const main);
+#endif // _di_status_code_signal_check_
+
+/**
+ * Signal handler for signals/interrupts.
+ *
+ * This blocks until an expected signal is recieved.
+ * When an expected signal is received it then sets the
+ *
+ * If main.signal is non-zero, then this handles the following signals:
+ *   - F_signal_abort
+ *   - F_signal_broken_pipe
+ *   - F_signal_hangup
+ *   - F_signal_interrupt
+ *   - F_signal_quit
+ *   - F_signal_termination
+ *
+ * @param main
+ *   The main program and settings data.
+ *
+ *   This alters main.program.signal_received, setting it to a received signal.
+ *
+ *   This alters setting.status:
+ *     Errors with (error bit set) from: f_signal_open()
+ *     Errors with (error bit set) from: f_signal_wait()
+ *
+ * @see f_signal_close()
+ * @see f_signal_open()
+ * @see f_signal_wait()
+ */
+#if !defined(_di_status_code_signal_handler_) && !defined(_di_thread_support_)
+  extern void status_code_signal_handler(status_code_main_t * const main);
+#endif // !defined(_di_status_code_signal_handler_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _status_code_signal_h
index 6b178e89f7e6597f94c65f2d9824f72738f62787..df45ad665b2e2123d6eb2ebc36b324f40aabcd1f 100644 (file)
 #include <fll/level_0/signal.h>
 #include <fll/level_0/status_string.h>
 
+#ifndef _di_thread_support_
+  #include <fll/level_0/thread.h>
+#endif // _di_thread_support_
+
 // FLL-1 includes.
 #include <fll/level_1/conversion.h>
 #include <fll/level_1/print.h>
@@ -54,6 +58,8 @@
 #include <program/status_code/main/print/error.h>
 #include <program/status_code/main/print/message.h>
 #include <program/status_code/main/process.h>
+#include <program/status_code/main/signal.h>
+#include <program/status_code/main/thread.h>
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/level_3/status_code/c/main/thread.c b/level_3/status_code/c/main/thread.c
new file mode 100644 (file)
index 0000000..bb8d999
--- /dev/null
@@ -0,0 +1,26 @@
+#include "status_code.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_status_code_thread_signal_) && !defined(_di_thread_support_)
+  void * status_code_thread_signal(void * const main) {
+
+    f_thread_cancel_state_set(PTHREAD_CANCEL_DEFERRED, 0);
+
+    if (main) {
+      status_code_signal_handler((status_code_main_t *) main);
+    }
+
+    return 0;
+  }
+#endif // !defined(_di_status_code_thread_signal_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/status_code/c/main/thread.h b/level_3/status_code/c/main/thread.h
new file mode 100644 (file)
index 0000000..1dcb19e
--- /dev/null
@@ -0,0 +1,46 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: Status Code
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides thread functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _status_code_thread_h
+#define _status_code_thread_h
+
+/**
+ * Thread handler for signals/interrupts.
+ *
+ * If main.signal is non-zero, then this handles the following signals:
+ *   - F_signal_abort
+ *   - F_signal_broken_pipe
+ *   - F_signal_hangup
+ *   - F_signal_interrupt
+ *   - F_signal_quit
+ *   - F_signal_termination
+ *
+ * @param main
+ *   The program and settings data.
+ *
+ *   Must be of type status_code_main_t.
+ *
+ * @return
+ *   0, always.
+ *
+ * @see f_thread_cancel_state_set()
+ *
+ * @see status_code_signal_handler()
+ */
+#if !defined(_di_status_code_thread_signal_) && !defined(_di_thread_support_)
+  extern void * status_code_thread_signal(void * const main);
+#endif // !defined(_di_status_code_thread_signal_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _status_code_thread_h
index f8ebb041a43cb683cae8b17e7301c6294d0e4f6e..37246a0ffa6056e77b5bc7ab6c236a2add5727a4 100644 (file)
@@ -3,3 +3,7 @@
 # Defines for the "status_code" program.
 #
 
+_di_thread_support_ Disables thread support.
+
+_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
+_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
index dd7ed8d179bd2b46d990db5ed324b60f268803c0..c4872ba349badab58926e64c32c364cfd25c8966 100644 (file)
@@ -2,3 +2,8 @@
 #
 # Defines for the "fss_status_code" program.
 #
+
+_di_thread_support_ Disables thread support.
+
+_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
+_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
index 45c8e9b4bcbffd70e4dff372426c6d8a452906f5..152c97d10fd0e2a60b2893de8d583a63bad214d6 100644 (file)
@@ -2,6 +2,17 @@
 #
 # Builds the main library of the project with all parts except "main" program related.
 #
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name status_code
 
@@ -11,8 +22,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual level monolithic clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -22,13 +33,14 @@ build_language c
 
 build_libraries -lc
 build_libraries-individual -lfll_error -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_print -lfl_status_string -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_file -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
-build_sources_library main/status_code.c main/common.c main/common/define.c main/common/enumeration.c main/common/print.c main/common/string.c main/common/type.c main/convert.c main/print/data.c main/print/error.c main/print/message.c main/process.c
+build_sources_library main/status_code.c main/common.c main/common/define.c main/common/enumeration.c main/common/print.c main/common/string.c main/common/type.c main/convert.c main/print/data.c main/print/error.c main/print/message.c main/process.c main/signal.c main/thread.c
 build_sources_library fss/status_code.c fss/common.c
 
-build_sources_headers main/status_code.h main/common.h main/common/define.h main/common/enumeration.h main/common/print.h main/common/string.h main/common/type.h main/convert.h main/print/data.h main/print/error.h main/print/message.h main/process.h
+build_sources_headers main/status_code.h main/common.h main/common/define.h main/common/enumeration.h main/common/print.h main/common/string.h main/common/type.h main/convert.h main/print/data.h main/print/error.h main/print/message.h main/process.h main/signal.h main/thread.h
 build_sources_headers fss/status_code.h fss/common.h
 
 build_sources_documentation man
@@ -58,10 +70,13 @@ search_static yes
 environment PATH LD_LIBRARY_PATH
 environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
 
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
 
 flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -O0 -fstack-protector -Wall
 flags-fanalyzer -fanalyzer
index 657f19284b83dd80aa62301091055ca47aaeb416..f6402c92c64830a2d3a0cab31bdfea537b435d2a 100644 (file)
@@ -3,6 +3,17 @@
 # Builds the "fss" program (fss_status_code).
 # This must be called after the "setting".
 #
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name fss_status_code
 
@@ -12,8 +23,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual level monolithic clang test
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -23,6 +34,7 @@ build_language c
 
 build_libraries -lc -lstatus_code
 build_libraries-individual -lfll_error -lfll_fss_status_string -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lfl_status_string -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
@@ -55,10 +67,13 @@ search_static yes
 environment PATH LD_LIBRARY_PATH
 environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
 
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
 
 flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -O0 -fstack-protector -Wall
 flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
index d9b5768a3e53fa688680abd9c1252053daed9a3a..bc16a17727eed91115ba24cb00a604f6970fabf0 100644 (file)
@@ -3,6 +3,17 @@
 # Builds the "main" program (status_code).
 # This must be called after the "setting".
 #
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name status_code
 
@@ -12,8 +23,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual level monolithic clang test
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -23,6 +34,7 @@ build_language c
 
 build_libraries -lc -lstatus_code
 build_libraries-individual -lfll_error -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_print -lfl_status_string -lf_color -lf_console -lf_conversion -lf_directory -lf_file -lf_memory -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
@@ -55,10 +67,13 @@ search_static yes
 environment PATH LD_LIBRARY_PATH
 environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
 
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
 
 flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -O0 -fstack-protector -Wall
 flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
index c6e4ccdef6e168d264c7dc5077f9167fe5a62c4c..ecd4822e400b4a945b9e3725c265df6f94ab9286 100644 (file)
@@ -15,7 +15,7 @@ extern "C" {
 
     if (*mode != utf8_codepoint_mode_end_e) {
       if (main->setting.text.used + unicode.used >= main->setting.text.size) {
-        main->setting.state.status = f_string_dynamic_increase_by(utf8_default_allocation_step_d, &main->setting.text);
+        main->setting.state.status = f_string_dynamic_increase_by(utf8_allocation_small_d, &main->setting.text);
         if (F_status_is_error(main->setting.state.status)) return;
       }
 
@@ -108,7 +108,7 @@ extern "C" {
 
     if (*mode != utf8_codepoint_mode_raw_end_e) {
       if (main->setting.text.used + hex.used >= main->setting.text.size) {
-        main->setting.state.status = f_string_dynamic_increase_by(utf8_default_allocation_step_d, &main->setting.text);
+        main->setting.state.status = f_string_dynamic_increase_by(utf8_allocation_small_d, &main->setting.text);
         if (F_status_is_error(main->setting.state.status)) return;
       }
 
index 78d64a82400272ff5c1ccad652f3a7ca612087eb..371d7997695274e3946970c46fa1c3775f85f047 100644 (file)
@@ -4,22 +4,6 @@
 extern "C" {
 #endif
 
-#ifndef _di_utf8_setting_delete_
-  f_status_t utf8_setting_delete(utf8_setting_t * const setting) {
-
-    if (!setting) return F_status_set_error(F_parameter);
-
-    f_string_dynamic_resize(0, &setting->buffer);
-    f_string_dynamic_resize(0, &setting->text);
-
-    f_string_dynamics_resize(0, &setting->path_files_from);
-    f_string_dynamics_resize(0, &setting->path_files_to);
-    f_string_dynamics_resize(0, &setting->remaining);
-
-    return F_none;
-  }
-#endif // _di_utf8_setting_delete_
-
 #ifndef _di_utf8_setting_load_
   void utf8_setting_load(const f_console_arguments_t arguments, utf8_main_t * const main) {
 
@@ -457,17 +441,6 @@ extern "C" {
   }
 #endif // _di_utf8_setting_load_
 
-#ifndef _di_utf8_setting_unload_
-  f_status_t utf8_setting_unload(utf8_main_t * const main) {
-
-    if (!main) return F_status_set_error(F_parameter);
-
-    utf8_setting_delete(&main->setting);
-
-    return F_none;
-  }
-#endif // _di_utf8_setting_unload_
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index a08c1cbfc8789a1032482908fb4e400449139c88..669f2c0785016026689174f96a328fd308377597 100644 (file)
@@ -17,23 +17,6 @@ extern "C" {
 #endif
 
 /**
- * Delete the program main setting data.
- *
- * @param setting
- *   The program main setting data.
- *
- *   This does not alter setting.state.status.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_utf8_setting_delete_
-  extern f_status_t utf8_setting_delete(utf8_setting_t * const setting);
-#endif // _di_utf8_setting_delete_
-
-/**
  * Perform the standard program setting load process.
  *
  * This prints error messages as appropriate.
@@ -58,28 +41,6 @@ extern "C" {
   extern void utf8_setting_load(const f_console_arguments_t arguments, utf8_main_t * const main);
 #endif // _di_utf8_setting_load_
 
-/**
- * Perform the standard program setting unload process.
- *
- * @param main
- *   The main program and setting data.
- *   All buffers are deallocated.
- *
- *   This does not alter main.setting.state.status.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: utf8_setting_delete().
- *
- * @see utf8_setting_delete()
- */
-#ifndef _di_utf8_setting_unload_
-  extern f_status_t utf8_setting_unload(utf8_main_t * const main);
-#endif // _di_utf8_setting_unload_
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index dd5b66d1ee62a8e2e4727c34ec85de4a0283fdea..42ac41a553bfdc93f29b3ebc826578a50aafd135 100644 (file)
@@ -17,27 +17,36 @@ extern "C" {
 #endif
 
 /**
- * Set to at least 4 to provide a UTF-8 friendly allocation step.
- */
-#ifndef _di_utf8_default_d_
-  #define utf8_default_allocation_step_d 16
-#endif // _di_utf8_default_d_
-
-/**
- * The program defines.
+ * The program allocation defines.
  *
- * utf8_*_d:
- *   - allocation_console: An allocation step used for small buffers specifically for console parameter.
- *   - allocation_large:   An allocation step used for buffers that are anticipated to have large buffers.
- *   - allocation_small:   An allocation step used for buffers that are anticipated to have small buffers.
- *   - signal_check:       Number of iterations before performing signal check in non-threaded signal handling.
+ * utf8_allocation_*_d:
+ *   - console: An allocation step used for small buffers specifically for console parameter.
+ *   - large:   An allocation step used for buffers that are anticipated to have large buffers.
+ *   - pipe:    A buffer size used for processing piped data.
+ *   - small:   An allocation step used for buffers that are anticipated to have small buffers.
  */
-#ifndef _di_utf8_d_
+#ifndef _di_utf8_allocation_d_
   #define utf8_allocation_console_d 4
   #define utf8_allocation_large_d   256
+  #define utf8_allocation_pipe_d    16384
   #define utf8_allocation_small_d   16
-  #define utf8_signal_check_d       20000
-#endif // _di_utf8_d_
+#endif // _di_utf8_allocation_d_
+
+/**
+ * The program signal defines.
+ *
+ * utf8_signal_*_d:
+ *   - check:          Number of iterations before performing signal check in non-threaded signal handling.
+ *   - check_failsafe: When using threads, how many consecutive failures to check signal before aborting (as a recursion failsafe).
+ *   - check_tiny:     The tiny check.
+ *   - check_short:    The short signal check.
+ */
+#ifndef _di_utf8_signal_d_
+  #define utf8_signal_check_d          500000
+  #define utf8_signal_check_failsafe_d 20000
+  #define utf8_signal_check_tiny_d     4
+  #define utf8_signal_check_short_d    16
+#endif // _di_utf8_signal_d_
 
 #ifdef __cplusplus
 } // extern "C"
index 9a49594451deda964bf54b3f3810341db7b8d51d..7d7ac5b18eae6a397de22d884406f0311244c561 100644 (file)
@@ -11,6 +11,7 @@ extern "C" {
     "f_file_stream_open",
     "f_string_dynamic_append_nulless",
     "f_string_dynamics_increase_by",
+    "f_thread_create",
     "fll_program_parameter_process_context",
     "fll_program_parameter_process_verbosity",
     "utf8_detect_codepoint",
index aec343d22e664ce13e58e63898ba1cbadd5916db..5f98d2cf3da0e11b3279464b531235d1646d5819 100644 (file)
@@ -44,6 +44,7 @@ extern "C" {
     utf8_f_f_file_stream_open_e,
     utf8_f_f_string_dynamic_append_nulless_e,
     utf8_f_f_string_dynamics_increase_by_e,
+    utf8_f_f_thread_create_e,
     utf8_f_fll_program_parameter_process_context_e,
     utf8_f_fll_program_parameter_process_verbosity_e,
     utf8_f_utf8_detect_codepoint_e,
index d0e8414310831cf2e60cc23afa760a007c0ebd31..343dfdd3964151468caeb257398b106a16a99bf9 100644 (file)
@@ -4,6 +4,32 @@
 extern "C" {
 #endif
 
+#ifndef _di_utf8_main_data_delete_
+  void utf8_main_delete(utf8_main_t * const main) {
+
+    if (!main) return;
+
+    fll_program_data_delete(&main->program);
+    utf8_setting_delete(&main->setting);
+  }
+#endif // _di_utf8_main_data_delete_
+
+#ifndef _di_utf8_setting_delete_
+  f_status_t utf8_setting_delete(utf8_setting_t * const setting) {
+
+    if (!setting) return F_status_set_error(F_parameter);
+
+    f_string_dynamic_resize(0, &setting->buffer);
+    f_string_dynamic_resize(0, &setting->text);
+
+    f_string_dynamics_resize(0, &setting->path_files_from);
+    f_string_dynamics_resize(0, &setting->path_files_to);
+    f_string_dynamics_resize(0, &setting->remaining);
+
+    return F_none;
+  }
+#endif // _di_utf8_setting_delete_
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 25abea31b44b54a9be3e650396ff289eedf836b6..b4d2166720691ff168be53f26040c6733f9e4058 100644 (file)
@@ -25,7 +25,8 @@ extern "C" {
  * mode: The input/output mode (see utf8_modes_e).
  * flag: Flags passed to the main function.
  *
- * state: The state information.
+ * status_thread: A status used eclusively by the threaded signal handler.
+ * state:         The state data used when processing the FSS data.
  *
  * valid:     Designate the output context set for valid characters.
  * valid_not: Designate the output context set for invalid characters.
@@ -45,6 +46,7 @@ extern "C" {
     uint8_t mode;
     uint16_t flag;
 
+    f_status_t status_thread;
     f_state_t state;
 
     f_color_set_t valid;
@@ -65,6 +67,7 @@ extern "C" {
     { \
       utf8_mode_from_bytesequence_e | utf8_mode_to_codepoint_e, \
       utf8_main_flag_none_e, \
+      F_none, \
       f_state_t_initialize, \
       f_color_set_t_initialize, \
       f_color_set_t_initialize, \
@@ -97,6 +100,35 @@ extern "C" {
     }
 #endif // _di_utf8_main_t_
 
+/**
+ * Deallocate main program data.
+ *
+ * @param setting_make
+ *   The make setting data.
+ *
+ *   This does not alter data_make.main.setting.state.status.
+ */
+#ifndef _di_utf8_main_data_delete_
+  extern void utf8_main_delete(utf8_main_t * const main);
+#endif // _di_utf8_main_data_delete_
+
+/**
+ * Delete the program main setting data.
+ *
+ * @param setting
+ *   The program main setting data.
+ *
+ *   This does not alter setting.state.status.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_utf8_setting_delete_
+  extern f_status_t utf8_setting_delete(utf8_setting_t * const setting);
+#endif // _di_utf8_setting_delete_
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 7b616dbc8d25632bcae64ff3a465a81a4ce65d51..3146e2a4ba737b15d24f012069722938e3b7b823 100644 (file)
@@ -27,17 +27,45 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
   fll_program_standard_set_up(&data.program);
 
-  {
-    const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+  f_file_umask_get(&data.program.umask);
 
-    utf8_setting_load(arguments, &data);
-  }
+  #ifdef _di_thread_support_
+    {
+      const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+      utf8_setting_load(arguments, &data);
+    }
+
+    utf8_main(&data);
+  #else
+    {
+      f_thread_id_t id_signal;
+
+      memset(&id_signal, 0, sizeof(f_thread_id_t));
+
+      data.setting.state.status = f_thread_create(0, &id_signal, &utf8_thread_signal, (void *) &data);
+
+      if (F_status_is_error(data.setting.state.status)) {
+        utf8_print_error(&data.program.error, macro_utf8_f(f_thread_create));
+      }
+      else {
+        {
+          const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+          utf8_setting_load(arguments, &data);
+        }
 
-  utf8_main(&data);
+        if (!utf8_signal_check(&data)) {
+          utf8_main(&data);
+        }
 
-  utf8_setting_unload(&data);
+        f_thread_cancel(id_signal);
+        f_thread_join(id_signal, 0);
+      }
+    }
+  #endif // _di_thread_support_
 
-  fll_program_data_delete(&data.program);
+  utf8_main_delete(&data);
 
   fll_program_standard_set_down(&data.program);
 
diff --git a/level_3/utf8/c/main/signal.c b/level_3/utf8/c/main/signal.c
new file mode 100644 (file)
index 0000000..6635d04
--- /dev/null
@@ -0,0 +1,113 @@
+#include "utf8.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_utf8_signal_check_) && defined(_di_thread_support_)
+  f_status_t utf8_signal_check(utf8_main_t * const main) {
+
+    if (!main) return F_false;
+    if (main->program.signal.id == -1) return F_false;
+
+    if (!((++main->program.signal_check) % utf8_signal_check_d)) {
+      if (fll_program_standard_signal_received(&main->program)) {
+        fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
+
+        main->setting.state.status = F_status_set_error(F_interrupt);
+
+        return F_true;
+      }
+
+      main->program.signal_check = 0;
+    }
+
+    return F_false;
+  }
+#endif // !defined(_di_utf8_signal_check_) && defined(_di_thread_support_)
+
+#if !defined(_di_utf8_signal_check_) && !defined(_di_thread_support_)
+  f_status_t utf8_signal_check(utf8_main_t * const main) {
+
+    if (!main) return F_false;
+    if (main->program.signal.id == -1) return F_false;
+
+    if (main->program.signal_received) {
+      fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
+
+      main->setting.state.status = F_status_set_error(F_interrupt);
+
+      return F_true;
+    }
+
+    return F_false;
+  }
+#endif // !defined(_di_utf8_signal_check_) && !defined(_di_thread_support_)
+
+#if !defined(_di_utf8_signal_handler_) && !defined(_di_thread_support_)
+  void utf8_signal_handler(utf8_main_t * const main) {
+
+    if (!main) return;
+
+    siginfo_t information;
+    f_array_length_t failsafe = 0;
+
+    memset(&information, 0, sizeof(siginfo_t));
+
+    main->program.signal_received = 0;
+
+    f_signal_set_empty(&main->program.signal.set);
+    f_signal_set_add(F_signal_abort, &main->program.signal.set);
+    f_signal_set_add(F_signal_broken_pipe, &main->program.signal.set);
+    f_signal_set_add(F_signal_hangup, &main->program.signal.set);
+    f_signal_set_add(F_signal_interrupt, &main->program.signal.set);
+    f_signal_set_add(F_signal_quit, &main->program.signal.set);
+    f_signal_set_add(F_signal_termination, &main->program.signal.set);
+
+    if (main->program.signal.id == -1) {
+      main->setting.status_thread = f_signal_open(&main->program.signal);
+
+      if (F_status_is_error(main->setting.status_thread)) {
+        main->program.signal_received = F_signal_abort;
+
+        return;
+      }
+    }
+
+    do {
+      memset(&information, 0, sizeof(siginfo_t));
+
+      main->setting.status_thread = f_signal_wait(&main->program.signal.set, &information);
+
+      if (F_status_is_error(main->setting.status_thread) && F_status_set_fine(main->setting.status_thread) != F_interrupt) {
+        if (++failsafe >= utf8_signal_check_failsafe_d) break;
+      }
+
+      switch (information.si_signo) {
+        case F_signal_abort:
+        case F_signal_broken_pipe:
+        case F_signal_hangup:
+        case F_signal_interrupt:
+        case F_signal_quit:
+        case F_signal_termination:
+          main->program.signal_received = information.si_signo;
+
+          break;
+      }
+
+      failsafe = 0;
+      main->setting.status_thread = F_none;
+
+    } while (!main->program.signal_received);
+
+    f_signal_close(&main->program.signal);
+
+    if (F_status_is_error(main->setting.status_thread)) {
+      main->program.signal_received = F_signal_abort;
+    }
+  }
+#endif // !defined(_di_utf8_signal_handler_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/utf8/c/main/signal.h b/level_3/utf8/c/main/signal.h
new file mode 100644 (file)
index 0000000..2a54696
--- /dev/null
@@ -0,0 +1,86 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: UTF8
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides signal functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _utf8_signal_h
+#define _utf8_signal_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Check to see if a signal is received.
+ *
+ * If main.signal is non-zero, then this handles the following signals:
+ *   - F_signal_abort
+ *   - F_signal_broken_pipe
+ *   - F_signal_hangup
+ *   - F_signal_interrupt
+ *   - F_signal_quit
+ *   - F_signal_termination
+ *
+ * There is a threaded and a non-threaded version of this.
+ * The non-threaded version checks periodically using utf8_signal_check_d and updates main->signal_check as needed.
+ * The threaded version checks the flag state which is set by a separate thread that is blocking until signal is received.
+ *
+ * @param main
+ *   The main program and settings data.
+ *
+ *   This does not alter main.setting.state.status.
+ *
+ * @return
+ *   F_true on signal received.
+ *   F_false otherwise.
+ *
+ * @see utf8_signal_handler()
+ *
+ * @see fll_program_standard_signal_received()
+ */
+#ifndef _di_utf8_signal_check_
+  extern f_status_t utf8_signal_check(utf8_main_t * const main);
+#endif // _di_utf8_signal_check_
+
+/**
+ * Signal handler for signals/interrupts.
+ *
+ * This blocks until an expected signal is recieved.
+ * When an expected signal is received it then sets the
+ *
+ * If main.signal is non-zero, then this handles the following signals:
+ *   - F_signal_abort
+ *   - F_signal_broken_pipe
+ *   - F_signal_hangup
+ *   - F_signal_interrupt
+ *   - F_signal_quit
+ *   - F_signal_termination
+ *
+ * @param main
+ *   The main program and settings data.
+ *
+ *   This alters main.program.signal_received, setting it to a received signal.
+ *
+ *   This alters setting.status:
+ *     Errors with (error bit set) from: f_signal_open()
+ *     Errors with (error bit set) from: f_signal_wait()
+ *
+ * @see f_signal_close()
+ * @see f_signal_open()
+ * @see f_signal_wait()
+ */
+#if !defined(_di_utf8_signal_handler_) && !defined(_di_thread_support_)
+  extern void utf8_signal_handler(utf8_main_t * const main);
+#endif // !defined(_di_utf8_signal_handler_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _utf8_signal_h
diff --git a/level_3/utf8/c/main/thread.c b/level_3/utf8/c/main/thread.c
new file mode 100644 (file)
index 0000000..c5449e4
--- /dev/null
@@ -0,0 +1,26 @@
+#include "utf8.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_utf8_thread_signal_) && !defined(_di_thread_support_)
+  void * utf8_thread_signal(void * const main) {
+
+    f_thread_cancel_state_set(PTHREAD_CANCEL_DEFERRED, 0);
+
+    if (main) {
+      utf8_signal_handler((utf8_main_t *) main);
+    }
+
+    return 0;
+  }
+#endif // !defined(_di_utf8_thread_signal_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/utf8/c/main/thread.h b/level_3/utf8/c/main/thread.h
new file mode 100644 (file)
index 0000000..63a6a06
--- /dev/null
@@ -0,0 +1,46 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: UTF8
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides thread functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _utf8_thread_h
+#define _utf8_thread_h
+
+/**
+ * Thread handler for signals/interrupts.
+ *
+ * If main.signal is non-zero, then this handles the following signals:
+ *   - F_signal_abort
+ *   - F_signal_broken_pipe
+ *   - F_signal_hangup
+ *   - F_signal_interrupt
+ *   - F_signal_quit
+ *   - F_signal_termination
+ *
+ * @param main
+ *   The program and settings data.
+ *
+ *   Must be of type utf8_main_t.
+ *
+ * @return
+ *   0, always.
+ *
+ * @see f_thread_cancel_state_set()
+ *
+ * @see utf8_signal_handler()
+ */
+#if !defined(_di_utf8_thread_signal_) && !defined(_di_thread_support_)
+  extern void * utf8_thread_signal(void * const main);
+#endif // !defined(_di_utf8_thread_signal_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _utf8_thread_h
index 3cb0fd17c56c453a4e114c28630947f87a45caaa..7dc59f0e762a7d7672d5991abffabfca83a8fdbd 100644 (file)
 #include <fll/level_0/rip.h>
 #include <fll/level_0/signal.h>
 
+#ifndef _di_thread_support_
+  #include <fll/level_0/thread.h>
+#endif // _di_thread_support_
+
 // FLL-1 includes.
 #include <fll/level_1/conversion.h>
 #include <fll/level_1/print.h>
@@ -68,6 +72,8 @@
 #include <program/utf8/main/print/error.h>
 #include <program/utf8/main/print/message.h>
 #include <program/utf8/main/process.h>
+#include <program/utf8/main/signal.h>
+#include <program/utf8/main/thread.h>
 
 #ifdef __cplusplus
 extern "C" {
index c6653172ef1e71eb1aff738b1cbad4300feeacd6..490da41d8e72323bf3a9086dfbed1d8d565cd20f 100644 (file)
@@ -1,2 +1,6 @@
 # fss-0000
 
+_di_thread_support_ Disables thread support.
+
+_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
+_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
index 710372a94d4d253c12902de89994cf722aebdf20..64feb960e4de799e43d98265d29664466c85dd73 100644 (file)
@@ -1,4 +1,16 @@
 # fss-0001
+#
+# Modes:
+#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
+#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
+#   - level:             Compile using per level libraries.
+#   - monolithic:        Compile using per monolithic libraries.
+#   - clang:             Use clang rather than the default, which is generally gcc.
+#   - test:              Compile for a test, such as unit testing.
+#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
+#   - thread:            Compile with thread support.
+#   - threadless:        Compile without thread support.
+#
 
 build_name utf8
 
@@ -8,8 +20,8 @@ version_micro 0
 version_file micro
 version_target minor
 
-modes individual level monolithic clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
 
 build_compiler gcc
 build_compiler-clang clang
@@ -19,14 +31,15 @@ build_language c
 
 build_libraries -lc
 build_libraries-individual -lfll_error -lfll_print -lfll_program -lfl_conversion -lfl_print -lf_color -lf_console -lf_conversion -lf_file -lf_memory -lf_pipe -lf_print -lf_rip -lf_signal -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
-build_sources_library main/common.c main/common/define.c main/common/enumeration.c main/common/print.c main/common/string.c main/common/type.c main/bytesequence.c main/codepoint.c main/print/data.c main/print/error.c main/print/message.c main/process.c main/utf8.c
+build_sources_library main/common.c main/common/define.c main/common/enumeration.c main/common/print.c main/common/string.c main/common/type.c main/bytesequence.c main/codepoint.c main/print/data.c main/print/error.c main/print/message.c main/process.c main/signal.c main/thread.c main/utf8.c
 
 build_sources_program main/main.c
 
-build_sources_headers main/common.h main/common/define.h main/common/enumeration.h main/common/print.h main/common/string.h main/common/type.h main/bytesequence.h main/codepoint.h main/print.h main/print/data.h main/print/error.h main/print/message.h main/process.h main/utf8.h
+build_sources_headers main/common.h main/common/define.h main/common/enumeration.h main/common/print.h main/common/string.h main/common/type.h main/bytesequence.h main/codepoint.h main/print.h main/print/data.h main/print/error.h main/print/message.h main/process.h main/signal.h main/thread.h main/utf8.h
 
 build_sources_documentation man
 
@@ -55,10 +68,13 @@ search_static yes
 environment PATH LD_LIBRARY_PATH
 environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
 
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
 
 flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
 flags-clang -Wno-logical-op-parentheses
 flags-test -O0 -fstack-protector -Wall
 flags-fanalyzer -fanalyzer