From: Kevin Day Date: Wed, 6 Jan 2021 04:58:51 +0000 (-0600) Subject: Update: consistency issues in code design, better utilize global constants, and other... X-Git-Tag: 0.5.3~131 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=9e07a813c69418db1d7f935bf129b4d3038e7e7b;p=fll Update: consistency issues in code design, better utilize global constants, and other related changes or cleanups. Over time the code gets out of sync and less consistent. Update the source code structure to be a bit more consisten. There are more commits like this to come. Some of the consistency improvements involve: - Utilizing the XXX-common.h (and now XXX-common.c) sources. - Utilize the private-XXX.h and private-XXX.c sources. - More consistent declaration of allocation-related macros. - This updates mostly the array related structures. - This does not include the matrix related structures (an array of an array) to keep this commit from being too massive. - Re-order how I declae the allocation macros. - Add more of the increase(..), decrease(..) and similar macros (there will be further work on this in the future). - Use keyword "register" for the resize, delete, and similar macros. - If there are any sources, the main source for a project will exist even if it is empty. - Start a practice of using "_s", even in the define declarations for the "_di_XXX_" blocks. - Add semicolons at the end of macro functions. - In the past, I decided to not have these but now I have decided the semicolons probably should be there as a practice (even if their presence could be redundant). - Any exception cases where a macro function is meant to be used inline will not have semicolon. - I only spent so much time on this an there are likely several more macros to cleanup in this regard. I have been using "const static" for global strings. I seem to have forgotten that the C keyword "static" does not operate like "static" would natural do so in the global scope. The solution is to remove the static and make these "extern". Then those "extern" must be added to a source file and compiled in. Use these newly defined global constants strings more consistently. This adds a source file to f_string project. I tried avoiding this in the past but now that I am, I should move much of the fl_string code into f_string. This will simplify the project in many ways, but the changeset will be huge. To avoid mixing too much more in this commit, I will address this aspect at a later date. Simplify the allocation error, reducing memory related statuc codes to just F_memory and F_memory_not. The recent changes where thread (pthread) support being added caused problems (and revealed problems) in my package helper script. Fix the revealed problems in the package helper script. Update the package helper script to better handle the special situations in regards to thread support. Update all of these settings files based on the dependency changes and the packager helper script changes. Fix a bug in the memory resize/adjust logic where I failed to consistenty memset newly allocated space. This is the result of checking to see if the pointe has changed. I no longer no why I was doing that and it seems plainly wrong. I also never consistently performed memset() after calloc() (Inside the adjust/resize, memset() is not being called). Newly allocated memory should be guaranteed zeroed according to the designs of this project and this should now be true. Minor cleanup in the filesystem paths. I renamed "filesystem" to "tree" in this regard and relocated that code to the path-common.h, dropping the path_filesystem.h file. Add ascii characters. If I am going to use hardcoded strings, use the global constant strings to reduce the code size (even if only by small margins). More work is needed here, I only did what I needed to do. I would note that this is intended for ASCII only and is not intended to be locale/language aware. Any error message during testing lead me to noticing a problem in the private_fll_error_print() in regards to the text being printed. Add the access denied error message while I am at it. --- diff --git a/build/level_0/settings b/build/level_0/settings index 3363f4f..3da3373 100644 --- a/build/level_0/settings +++ b/build/level_0/settings @@ -21,10 +21,10 @@ build_language c build_libraries -lc -lcap build_libraries-level build_libraries-level_threadless -build_sources_library account.c private-account.c capability.c console.c conversion.c directory.c private-directory.c environment.c private-environment.c file.c private-file.c fss.c iki.c private-iki.c limit.c memory.c memory_structure.c private-memory.c path.c private-path.c pipe.c print.c private-print.c serialize.c private-serialize.c signal.c socket.c utf.c private-utf.c +build_sources_library account.c private-account.c capability.c color.c color-common.c console.c console-common.c control_group.c control_group-common.c conversion.c directory.c private-directory.c environment.c private-environment.c file.c file-common.c private-file.c fss.c iki.c iki-common.c private-iki.c limit.c memory.c memory_structure.c private-memory.c path.c path-common.c private-path.c pipe.c print.c private-print.c serialize.c serialize-common.c private-serialize.c signal.c socket.c string.c string-common.c utf.c private-utf.c build_sources_library-level thread.c build_sources_program -build_sources_headers account.h account-common.h capability.h capability-common.h color.h console.h console-common.h control_group.h control_group-common.h conversion.h conversion-common.h directory.h directory_type.h directory-common.h environment.h environment-common.h execute.h execute-common.h file.h file-common.h fss.h fss-common.h fss_comment.h fss_delimit.h fss_named.h fss_nest.h fss_quote.h fss_set.h iki.h iki-common.h limit.h limit-common.h memory.h memory_structure.h memory-common.h path.h path-common.h pipe.h print.h serialize.h serialize-common.h signal.h signal-common.h socket.h socket-common.h status.h status_array.h string.h string-common.h string_dynamic.h string_map.h string_quantity.h string_range.h string_triple.h type.h type_array.h utf.h utf-common.h +build_sources_headers account.h account-common.h capability.h capability-common.h color.h color-common.h console.h console-common.h control_group.h control_group-common.h conversion.h conversion-common.h directory.h directory_type.h directory-common.h environment.h environment-common.h execute.h execute-common.h file.h file-common.h fss.h fss-common.h fss_comment.h fss_delimit.h fss_named.h fss_nest.h fss_quote.h fss_set.h iki.h iki-common.h limit.h limit-common.h memory.h memory_structure.h memory-common.h path.h path-common.h pipe.h print.h serialize.h serialize-common.h signal.h signal-common.h socket.h socket-common.h status.h status_array.h string.h string-common.h string_dynamic.h string_map.h string_quantity.h string_range.h string_triple.h type.h type_array.h utf.h utf-common.h build_sources_headers-level thread.h thread-common.h build_sources_script build_sources_setting diff --git a/build/level_1/settings b/build/level_1/settings index be2ce79..a1da354 100644 --- a/build/level_1/settings +++ b/build/level_1/settings @@ -22,8 +22,10 @@ build_libraries -lc -lcap build_libraries-level -lfll_0 build_libraries-level_threadless -lfll_0 build_sources_library color.c console.c control_group.c conversion.c directory.c private-directory.c environment.c private-fss.c fss_basic.c fss_basic_list.c fss_embedded_list.c fss_extended.c fss_extended_list.c iki.c print.c private-print.c status.c string.c private-string.c type.c private-type.c utf.c private-utf.c utf_file.c private-utf_file.c +build_sources_library-level build_sources_program build_sources_headers color.h console.h control_group.h conversion.h directory.h environment.h execute.h execute-common.h fss.h fss_basic.h fss_basic_list.h fss_embedded_list.h fss_extended.h fss_extended_list.h fss_status.h iki.h print.h status.h string.h type.h utf.h utf_file.h +build_sources_headers-level build_sources_script build_sources_setting build_script yes diff --git a/build/level_2/settings b/build/level_2/settings index f002b57..e3903b6 100644 --- a/build/level_2/settings +++ b/build/level_2/settings @@ -21,9 +21,11 @@ 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 environment.c error.c private-error.c execute.c private-execute.c file.c private-file.c fss.c private-fss.c fss_basic.c fss_basic_list.c fss_embedded_list.c fss_extended.c fss_extended_list.c fss_status.c iki.c private-iki.c path.c program.c status.c +build_sources_library control_group.c environment.c error.c error-common.c private-error.c execute.c private-execute.c file.c private-file.c fss.c private-fss.c fss_basic.c fss_basic_list.c fss_embedded_list.c fss_extended.c fss_extended_list.c fss_status.c iki.c private-iki.c path.c program.c status.c +build_sources_library-level build_sources_program build_sources_headers control_group.h environment.h error.h error-common.h execute.h file.h fss.h fss_basic.h fss_basic_list.h fss_embedded_list.h fss_extended.h fss_extended_list.h fss_status.h iki.h path.h program.h status.h +build_sources_headers-level build_sources_script build_sources_setting build_script yes diff --git a/build/monolithic/settings b/build/monolithic/settings index 9d86110..7dc676f 100644 --- a/build/monolithic/settings +++ b/build/monolithic/settings @@ -21,14 +21,10 @@ build_language c build_libraries -lc -lcap build_libraries-monolithic build_libraries-monolithic_threadless -build_sources_library level_0/account.c level_0/private-account.c level_0/capability.c level_0/console.c level_0/conversion.c level_0/directory.c level_0/private-directory.c level_0/environment.c level_0/private-environment.c level_0/file.c level_0/private-file.c level_0/fss.c level_0/iki.c level_0/private-iki.c level_0/limit.c level_0/memory.c level_0/memory_structure.c level_0/private-memory.c level_0/path.c level_0/private-path.c level_0/pipe.c level_0/print.c level_0/private-print.c level_0/serialize.c level_0/private-serialize.c level_0/signal.c level_0/socket.c level_0/utf.c level_0/private-utf.c -build_sources_library level_1/color.c level_1/console.c level_1/control_group.c level_1/conversion.c level_1/directory.c level_1/private-directory.c level_1/environment.c level_1/private-fss.c level_1/fss_basic.c level_1/fss_basic_list.c level_1/fss_embedded_list.c level_1/fss_extended.c level_1/fss_extended_list.c level_1/iki.c level_1/print.c level_1/private-print.c level_1/status.c level_1/string.c level_1/private-string.c level_1/type.c level_1/private-type.c level_1/utf.c level_1/private-utf.c level_1/utf_file.c level_1/private-utf_file.c -build_sources_library level_2/control_group.c level_2/environment.c level_2/error.c level_2/private-error.c level_2/execute.c level_2/private-execute.c level_2/file.c level_2/private-file.c level_2/fss.c level_2/private-fss.c level_2/fss_basic.c level_2/fss_basic_list.c level_2/fss_embedded_list.c level_2/fss_extended.c level_2/fss_extended_list.c level_2/fss_status.c level_2/iki.c level_2/private-iki.c level_2/path.c level_2/program.c level_2/status.c +build_sources_library level_0/account.c level_0/private-account.c level_0/capability.c level_0/color.c level_0/color-common.c level_0/console.c level_0/console-common.c level_0/control_group.c level_0/control_group-common.c level_0/conversion.c level_0/directory.c level_0/private-directory.c level_0/environment.c level_0/private-environment.c level_0/file.c level_0/file-common.c level_0/private-file.c level_0/fss.c level_0/iki.c level_0/iki-common.c level_0/private-iki.c level_0/limit.c level_0/memory.c level_0/memory_structure.c level_0/private-memory.c level_0/path.c level_0/path-common.c level_0/private-path.c level_0/pipe.c level_0/print.c level_0/private-print.c level_0/serialize.c level_0/serialize-common.c level_0/private-serialize.c level_0/signal.c level_0/socket.c level_0/string.c level_0/string-common.c level_0/utf.c level_0/private-utf.c level_1/color.c level_1/console.c level_1/control_group.c level_1/conversion.c level_1/directory.c level_1/private-directory.c level_1/environment.c level_1/private-fss.c level_1/fss_basic.c level_1/fss_basic_list.c level_1/fss_embedded_list.c level_1/fss_extended.c level_1/fss_extended_list.c level_1/iki.c level_1/print.c level_1/private-print.c level_1/status.c level_1/string.c level_1/private-string.c level_1/type.c level_1/private-type.c level_1/utf.c level_1/private-utf.c level_1/utf_file.c level_1/private-utf_file.c level_2/control_group.c level_2/environment.c level_2/error.c level_2/error-common.c level_2/private-error.c level_2/execute.c level_2/private-execute.c level_2/file.c level_2/private-file.c level_2/fss.c level_2/private-fss.c level_2/fss_basic.c level_2/fss_basic_list.c level_2/fss_embedded_list.c level_2/fss_extended.c level_2/fss_extended_list.c level_2/fss_status.c level_2/iki.c level_2/private-iki.c level_2/path.c level_2/program.c level_2/status.c build_sources_library-monolithic level_0/thread.c build_sources_program -build_sources_headers level_0/account.h level_0/account-common.h level_0/capability.h level_0/capability-common.h level_0/color.h level_0/console.h level_0/console-common.h level_0/control_group.h level_0/control_group-common.h level_0/conversion.h level_0/conversion-common.h level_0/directory.h level_0/directory_type.h level_0/directory-common.h level_0/environment.h level_0/environment-common.h level_0/execute.h level_0/execute-common.h level_0/file.h level_0/file-common.h level_0/fss.h level_0/fss-common.h level_0/fss_comment.h level_0/fss_delimit.h level_0/fss_named.h level_0/fss_nest.h level_0/fss_quote.h level_0/fss_set.h level_0/iki.h level_0/iki-common.h level_0/limit.h level_0/limit-common.h level_0/memory.h level_0/memory_structure.h level_0/memory-common.h level_0/path.h level_0/path-common.h level_0/pipe.h level_0/print.h level_0/serialize.h level_0/serialize-common.h level_0/signal.h level_0/signal-common.h level_0/socket.h level_0/socket-common.h level_0/status.h level_0/status_array.h level_0/string.h level_0/string-common.h level_0/string_dynamic.h level_0/string_map.h level_0/string_quantity.h level_0/string_range.h level_0/string_triple.h level_0/type.h level_0/type_array.h level_0/utf.h level_0/utf-common.h -build_sources_headers level_1/color.h level_1/console.h level_1/control_group.h level_1/conversion.h level_1/directory.h level_1/environment.h level_1/execute.h level_1/execute-common.h level_1/fss.h level_1/fss_basic.h level_1/fss_basic_list.h level_1/fss_embedded_list.h level_1/fss_extended.h level_1/fss_extended_list.h level_1/fss_status.h level_1/iki.h level_1/print.h level_1/status.h level_1/string.h level_1/type.h level_1/utf.h level_1/utf_file.h -build_sources_headers level_2/control_group.h level_2/environment.h level_2/error.h level_2/error-common.h level_2/execute.h level_2/file.h level_2/fss.h level_2/fss_basic.h level_2/fss_basic_list.h level_2/fss_embedded_list.h level_2/fss_extended.h level_2/fss_extended_list.h level_2/fss_status.h level_2/iki.h level_2/path.h level_2/program.h level_2/status.h +build_sources_headers level_0/account.h level_0/account-common.h level_0/capability.h level_0/capability-common.h level_0/color.h level_0/color-common.h level_0/console.h level_0/console-common.h level_0/control_group.h level_0/control_group-common.h level_0/conversion.h level_0/conversion-common.h level_0/directory.h level_0/directory_type.h level_0/directory-common.h level_0/environment.h level_0/environment-common.h level_0/execute.h level_0/execute-common.h level_0/file.h level_0/file-common.h level_0/fss.h level_0/fss-common.h level_0/fss_comment.h level_0/fss_delimit.h level_0/fss_named.h level_0/fss_nest.h level_0/fss_quote.h level_0/fss_set.h level_0/iki.h level_0/iki-common.h level_0/limit.h level_0/limit-common.h level_0/memory.h level_0/memory_structure.h level_0/memory-common.h level_0/path.h level_0/path-common.h level_0/pipe.h level_0/print.h level_0/serialize.h level_0/serialize-common.h level_0/signal.h level_0/signal-common.h level_0/socket.h level_0/socket-common.h level_0/status.h level_0/status_array.h level_0/string.h level_0/string-common.h level_0/string_dynamic.h level_0/string_map.h level_0/string_quantity.h level_0/string_range.h level_0/string_triple.h level_0/type.h level_0/type_array.h level_0/utf.h level_0/utf-common.h level_1/color.h level_1/console.h level_1/control_group.h level_1/conversion.h level_1/directory.h level_1/environment.h level_1/execute.h level_1/execute-common.h level_1/fss.h level_1/fss_basic.h level_1/fss_basic_list.h level_1/fss_embedded_list.h level_1/fss_extended.h level_1/fss_extended_list.h level_1/fss_status.h level_1/iki.h level_1/print.h level_1/status.h level_1/string.h level_1/type.h level_1/utf.h level_1/utf_file.h level_2/control_group.h level_2/environment.h level_2/error.h level_2/error-common.h level_2/execute.h level_2/file.h level_2/fss.h level_2/fss_basic.h level_2/fss_basic_list.h level_2/fss_embedded_list.h level_2/fss_extended.h level_2/fss_extended_list.h level_2/fss_status.h level_2/iki.h level_2/path.h level_2/program.h level_2/status.h build_sources_headers-monolithic level_0/thread.h level_0/thread-common.h build_sources_script build_sources_setting diff --git a/build/scripts/package.sh b/build/scripts/package.sh index a6db2f9..91217f7 100644 --- a/build/scripts/package.sh +++ b/build/scripts/package.sh @@ -469,8 +469,11 @@ package_dependencies_individual() { local dependencies_0= local dependencies_1= local dependencies_2= + local dependencies_thread= local dependencies_individual= + local dependencies_individual_threadless= local dependency= + local has_thread= local sub_level= local sub_dependencies= local sub_dependency= @@ -510,12 +513,18 @@ package_dependencies_individual() { dependencies_0= dependencies_1= dependencies_2= + dependencies_thread= dependencies_individual= + has_thread= if [[ -f ${directory}/data/build/dependencies ]] ; then dependencies=$(cat ${directory}/data/build/dependencies | sed -e "/^\s*#/d" -e "s|#\.*$||") fi + if [[ $(echo "$dependencies" | grep -o "\") != "" ]] ; then + has_thread="yes" + fi + for dependency in $dependencies ; do if [[ $(echo "$dependency" | grep -o "^f_") != "" ]] ; then level=level_0 @@ -622,7 +631,8 @@ package_dependencies_individual() { fi settings=${directory}/data/build/settings - sed -i -e "s|^\s*build_libraries-individual\>.*\$|build_libraries-individual$dependencies_individual|" $settings + sed -i -e "s|^\s*build_libraries-individual[[:space:]].*\$|build_libraries-individual$dependencies_individual|" $settings && + sed -i -e "s|^\s*build_libraries-individual\$|build_libraries-individual$dependencies_individual|" $settings if [[ $? -ne 0 ]] ; then if [[ $verbosity != "quiet" ]] ; then @@ -633,9 +643,31 @@ package_dependencies_individual() { return fi + if [[ $has_thread == "yes" && $dependencies_individual != "" && $(grep -o "^\s*build_libraries-individual_threadless\>" $settings) != "" ]] ; then + dependencies_individual_threadless=$(echo "$dependencies_individual" | sed -e "s| \-lf_thread\>||g") + + if [[ $verbosity == "verbose" ]] ; then + echo -e " (threadless) $dependencies_individual_threadless" + fi + + settings=${directory}/data/build/settings + sed -i -e "s|^\s*build_libraries-individual_threadless[[:space:]].*\$|build_libraries-individual_threadless$dependencies_individual_threadless|" $settings && + sed -i -e "s|^\s*build_libraries-individual_threadless\$|build_libraries-individual_threadless$dependencies_individual_threadless|" $settings + + if [[ $? -ne 0 ]] ; then + if [[ $verbosity != "quiet" ]] ; then + echo -e "${c_error}ERROR: Failed to update settings file $c_notice${settings}$c_error.$c_reset" + fi + + failure=1 + return + fi + fi + # all level 3 are expected to support all modes: individual, level, and monolithic. if [[ $level_current == "3" ]] ; then - sed -i -e "s|^\s*build_libraries-level\>.*\$|build_libraries-level -lfll_2 -lfll_1 -lfll_0|" $settings + sed -i -e "s|^\s*build_libraries-level\>.*\$|build_libraries-level -lfll_2 -lfll_1 -lfll_0|" $settings && + sed -i -e "s|^\s*build_libraries-level\$|build_libraries-level -lfll_2 -lfll_1 -lfll_0|" $settings if [[ $? -ne 0 ]] ; then if [[ $verbosity != "quiet" ]] ; then @@ -646,7 +678,8 @@ package_dependencies_individual() { return fi - sed -i -e "s|^\s*build_libraries-monolithic\>.*\$|build_libraries-monolithic -lfll|" $settings + sed -i -e "s|^\s*build_libraries-monolithic\>.*\$|build_libraries-monolithic -lfll|" $settings && + sed -i -e "s|^\s*build_libraries-monolithic\$|build_libraries-monolithic -lfll|" $settings if [[ $? -ne 0 ]] ; then if [[ $verbosity != "quiet" ]] ; then @@ -676,7 +709,8 @@ package_dependencies_individual_append() { return fi - libraries=$(grep -o '^\s*build_sources_library\>.*$' $settings | sed -e 's|^\s*build_sources_library\>||' -e 's|^[[:space:]]*||' -e 's|[[:space:]]*$||') + libraries=$(grep -o '^\s*build_sources_library\s.*$' $settings | sed -e 's|^\s*build_sources_library\>||' -e 's|^\s*||' -e 's|\s*$||') + if [[ $libraries != "" ]] ; then if [[ $(echo -n $dependencies_individual | grep -o "\-l$dependency\>") == "" ]] ; then @@ -751,8 +785,12 @@ package_dependencies_level_update() { local level_libraries="$2" local level_sources_library= local level_sources_headers= + local level_sources_library_threaded= + local level_sources_headers_threaded= local monolithic_libraries= local monolithic_headers= + local monolithic_libraries_threaded= + local monolithic_headers_threaded= if [[ $verbosity != "quiet" ]] ; then echo @@ -772,16 +810,28 @@ package_dependencies_level_update() { return fi - libraries=$(grep -o '^\s*build_sources_library\>.*$' $settings | sed -e 's|^\s*build_sources_library\>||' -e 's|^[[:space:]]*||' -e 's|[[:space:]]*$||') + libraries=$(grep -o '^\s*build_sources_library\s.*$' $settings | sed -e 's|^\s*build_sources_library\>||' -e 's|^\s*||' -e 's|\s*$||') + for library in $libraries ; do - level_sources_library="$level_sources_library $library" - monolithic_libraries="$monolithic_libraries $level/$library" + if [[ $name == "f_thread" ]] ; then + level_sources_library_threaded="$level_sources_library_threaded $library" + monolithic_libraries_threaded="$monolithic_libraries_threaded $level/$library" + else + level_sources_library="$level_sources_library $library" + monolithic_libraries="$monolithic_libraries $level/$library" + fi done - headers=$(grep -o '^\s*build_sources_headers\>.*$' $settings | sed -e 's|^\s*build_sources_headers\>||' -e 's|^[[:space:]]*||' -e 's|[[:space:]]*$||') + headers=$(grep -o '^\s*build_sources_headers\s.*$' $settings | sed -e 's|^\s*build_sources_headers\>||' -e 's|^\s*||' -e 's|\s*$||') + for header in $headers ; do - level_sources_headers="$level_sources_headers $header" - monolithic_headers="$monolithic_headers $level/$header" + if [[ $name == "f_thread" ]] ; then + level_sources_headers_threaded="$level_sources_headers_threaded $header" + monolithic_headers_threaded="$monolithic_headers_threaded $level/$header" + else + level_sources_headers="$level_sources_headers $header" + monolithic_headers="$monolithic_headers $level/$header" + fi done done @@ -796,7 +846,10 @@ package_dependencies_level_update() { return fi - sed -i -e "s|^\s*build_libraries-level\>.*\$|build_libraries-level$level_libraries|" $settings + sed -i -e "s|^\s*build_libraries-level\s.*\$|build_libraries-level$level_libraries|" $settings && + sed -i -e "s|^\s*build_libraries-level\$|build_libraries-level$level_libraries|" $settings && + sed -i -e "s|^\s*build_libraries-level_threadless\s.*\$|build_libraries-level_threadless$level_libraries|" $settings && + sed -i -e "s|^\s*build_libraries-level_threadless\$|build_libraries-level_threadless$level_libraries|" $settings if [[ $? -ne 0 ]] ; then if [[ $verbosity != "quiet" ]] ; then @@ -813,7 +866,10 @@ package_dependencies_level_update() { level_sources_library=" $level_sources_library" fi - sed -i -e "s|^\s*build_sources_library\>.*\$|build_sources_library$level_sources_library|" $settings + sed -i -e "s|^\s*build_sources_library\s.*\$|build_sources_library$level_sources_library|" $settings && + sed -i -e "s|^\s*build_sources_library\$|build_sources_library$level_sources_library|" $settings && + sed -i -e "s|^\s*build_sources_library-level\s.*\$|build_sources_library-level$level_sources_library_threaded|" $settings && + sed -i -e "s|^\s*build_sources_library-level\$|build_sources_library-level$level_sources_library_threaded|" $settings if [[ $? -ne 0 ]] ; then if [[ $verbosity != "quiet" ]] ; then @@ -830,7 +886,10 @@ package_dependencies_level_update() { level_sources_headers=" $level_sources_headers" fi - sed -i -e "s|^\s*build_sources_headers\>.*\$|build_sources_headers$level_sources_headers|" $settings + sed -i -e "s|^\s*build_sources_headers\s.*\$|build_sources_headers$level_sources_headers|" $settings && + sed -i -e "s|^\s*build_sources_headers\$|build_sources_headers$level_sources_headers|" $settings && + sed -i -e "s|^\s*build_sources_headers-level\s.*\$|build_sources_headers-level$level_sources_headers_threaded|" $settings && + sed -i -e "s|^\s*build_sources_headers-level\$|build_sources_headers-level$level_sources_headers_threaded|" $settings if [[ $? -ne 0 ]] ; then if [[ $verbosity != "quiet" ]] ; then @@ -844,18 +903,29 @@ package_dependencies_level_update() { if [[ $level == "level_0" ]] ; then level_0_libraries=$(echo "$monolithic_libraries" | sed -e 's|^[[:space:]]*||' -e 's|[[:space:]]*$||') level_0_headers=$(echo "$monolithic_headers" | sed -e 's|^[[:space:]]*||' -e 's|[[:space:]]*$||') + + level_0_libraries_threaded=$(echo "$monolithic_libraries_threaded" | sed -e 's|^[[:space:]]*||' -e 's|[[:space:]]*$||') + level_0_headers_threaded=$(echo "$monolithic_headers_threaded" | sed -e 's|^[[:space:]]*||' -e 's|[[:space:]]*$||') elif [[ $level == "level_1" ]] ; then level_1_libraries=$(echo "$monolithic_libraries" | sed -e 's|^[[:space:]]*||' -e 's|[[:space:]]*$||') level_1_headers=$(echo "$monolithic_headers" | sed -e 's|^[[:space:]]*||' -e 's|[[:space:]]*$||') + + level_1_libraries_threaded=$(echo "$monolithic_libraries_threaded" | sed -e 's|^[[:space:]]*||' -e 's|[[:space:]]*$||') + level_1_headers_threaded=$(echo "$monolithic_headers_threaded" | sed -e 's|^[[:space:]]*||' -e 's|[[:space:]]*$||') elif [[ $level == "level_2" ]] ; then level_2_libraries=$(echo "$monolithic_libraries" | sed -e 's|^[[:space:]]*||' -e 's|[[:space:]]*$||') level_2_headers=$(echo "$monolithic_headers" | sed -e 's|^[[:space:]]*||' -e 's|[[:space:]]*$||') + + level_2_libraries_threaded=$(echo "$monolithic_libraries_threaded" | sed -e 's|^[[:space:]]*||' -e 's|[[:space:]]*$||') + level_2_headers_threaded=$(echo "$monolithic_headers_threaded" | sed -e 's|^[[:space:]]*||' -e 's|[[:space:]]*$||') fi } package_dependencies_monolithic() { local monolithic_libraries="" + local monolithic_libraries_threaded="" local monolithic_headers="" + local monolithic_headers_threaded="" if [[ $verbosity != "quiet" ]] ; then echo @@ -866,10 +936,18 @@ package_dependencies_monolithic() { monolithic_libraries="$level_0_libraries" fi + if [[ $level_0_libraries_threaded != "" ]] ; then + monolithic_libraries_threaded="$level_0_libraries_threaded" + fi + if [[ $level_0_headers != "" ]] ; then monolithic_headers="$level_0_headers" fi + if [[ $level_0_headers_threaded != "" ]] ; then + monolithic_headers_threaded="$level_0_headers_threaded" + fi + if [[ $level_1_libraries != "" ]] ; then if [[ $monolithic_libraries == "" ]] ; then monolithic_libraries="$level_1_libraries" @@ -878,6 +956,14 @@ package_dependencies_monolithic() { fi fi + if [[ $level_1_libraries_threaded != "" ]] ; then + if [[ $monolithic_libraries_threaded == "" ]] ; then + monolithic_libraries_threaded="$level_1_libraries_threaded" + else + monolithic_libraries_threaded="$monolithic_libraries_threaded $level_1_libraries_threaded" + fi + fi + if [[ $level_1_headers != "" ]] ; then if [[ $monolithic_libraries == "" ]] ; then monolithic_headers="$level_1_headers" @@ -886,6 +972,14 @@ package_dependencies_monolithic() { fi fi + if [[ $level_1_headers_threaded != "" ]] ; then + if [[ $monolithic_libraries_threaded == "" ]] ; then + monolithic_headers_threaded="$level_1_headers_threaded" + else + monolithic_headers_threaded="$monolithic_headers_threaded $level_1_headers_threaded" + fi + fi + if [[ $level_2_libraries != "" ]] ; then if [[ $monolithic_libraries == "" ]] ; then monolithic_libraries="$level_2_libraries" @@ -894,6 +988,14 @@ package_dependencies_monolithic() { fi fi + if [[ $level_2_libraries_threaded != "" ]] ; then + if [[ $monolithic_libraries_threaded == "" ]] ; then + monolithic_libraries_threaded="$level_2_libraries_threaded" + else + monolithic_libraries_threaded="$monolithic_libraries_threaded $level_2_libraries_threaded" + fi + fi + if [[ $level_2_headers != "" ]] ; then if [[ $monolithic_libraries == "" ]] ; then monolithic_headers="$level_2_headers" @@ -902,6 +1004,14 @@ package_dependencies_monolithic() { fi fi + if [[ $level_2_headers_threaded != "" ]] ; then + if [[ $monolithic_libraries_threaded == "" ]] ; then + monolithic_headers_threaded="$level_2_headers_threaded" + else + monolithic_headers_threaded="$monolithic_headers_threaded $level_2_headers_threaded" + fi + fi + settings=${path_sources}/build/monolithic/settings if [[ $monolithic_libraries != "" ]] ; then @@ -912,7 +1022,18 @@ package_dependencies_monolithic() { monolithic_libraries=" $monolithic_libraries" fi - sed -i -e "s|^\s*build_sources_library\>.*\$|build_sources_library$monolithic_libraries|" $settings + if [[ $monolithic_libraries_threaded != "" ]] ; then + if [[ $verbosity != "quiet" ]] ; then + echo " (threaded) $monolithic_libraries_threaded" + fi + + monolithic_libraries_threaded=" $monolithic_libraries_threaded" + fi + + sed -i -e "s|^\s*build_sources_library\s.*\$|build_sources_library$monolithic_libraries|" $settings && + sed -i -e "s|^\s*build_sources_library\$|build_sources_library$monolithic_libraries|" $settings && + sed -i -e "s|^\s*build_sources_library-monolithic\s.*\$|build_sources_library-monolithic$monolithic_libraries_threaded|" $settings && + sed -i -e "s|^\s*build_sources_library-monolithic\$|build_sources_library-monolithic$monolithic_libraries_threaded|" $settings if [[ $? -ne 0 ]] ; then if [[ $verbosity != "quiet" ]] ; then @@ -923,7 +1044,6 @@ package_dependencies_monolithic() { return fi - if [[ $monolithic_headers != "" ]] ; then if [[ $verbosity != "quiet" ]] ; then echo " $monolithic_headers" @@ -932,7 +1052,18 @@ package_dependencies_monolithic() { monolithic_headers=" $monolithic_headers" fi - sed -i -e "s|^\s*build_sources_headers\>.*\$|build_sources_headers$monolithic_headers|" $settings + if [[ $monolithic_headers_threaded != "" ]] ; then + if [[ $verbosity != "quiet" ]] ; then + echo " (threaded) $monolithic_headers_threaded" + fi + + monolithic_headers_threaded=" $monolithic_headers_threaded" + fi + + sed -i -e "s|^\s*build_sources_headers\s.*\$|build_sources_headers$monolithic_headers|" $settings && + sed -i -e "s|^\s*build_sources_headers\$|build_sources_headers$monolithic_headers|" $settings && + sed -i -e "s|^\s*build_sources_headers-monolithic\s.*\$|build_sources_headers-monolithic$monolithic_headers_threaded|" $settings && + sed -i -e "s|^\s*build_sources_headers-monolithic\$|build_sources_headers-monolithic$monolithic_headers_threaded|" $settings if [[ $? -ne 0 ]] ; then if [[ $verbosity != "quiet" ]] ; then diff --git a/level_0/f_account/c/account-common.h b/level_0/f_account/c/account-common.h index ae27b7c..b5116c5 100644 --- a/level_0/f_account/c/account-common.h +++ b/level_0/f_account/c/account-common.h @@ -112,14 +112,32 @@ extern "C" { accounts.size = 0; \ accounts.used = 0; - #define f_macro_accounts_new(status, accounts, length) \ - f_macro_accounts_clear(accounts) \ - status = f_memory_new((void **) & accounts.array, sizeof(f_account_t), length); \ + #define f_macro_string_accounts_t_new(status, values, length) f_macro_memory_structure_new(status, values, f_account_t, length) + + #define f_macro_string_accounts_t_resize(status, accounts, new_length) \ + status = F_none; \ + if (new_length < accounts.size) { \ + for (register f_array_length_t _macro__i = accounts.size - new_length; _macro__i < accounts.size; ++_macro__i) { \ + f_macro_account_t_delete(status, accounts.array[_macro__i]); \ + if (status != F_none) break; \ + } \ + } \ + if (status == F_none) status = f_memory_resize((void **) & accounts.array, sizeof(f_account_t), accounts.size, new_length); \ if (status == F_none) { \ - accounts.size = length; \ - accounts.used = 0; \ + accounts.size = new_length; \ + if (accounts.used > accounts.size) accounts.used = new_length; \ } + #define f_macro_string_accounts_t_adjust(status, accounts, new_length) \ + status = F_none; \ + if (new_length < accounts.size) { \ + for (register f_array_length_t _macro__i = accounts.size - new_length; _macro__i < accounts.size; ++_macro__i) { \ + f_macro_account_t_destroy(status, accounts.array[_macro__i], f_account_t); \ + if (status != F_none) break; \ + } \ + } \ + if (status == F_none) status = f_macro_memory_structure_resize(status, values, sizeof(f_limit_value_t)); + #define f_macro_string_accounts_t_delete(status, accounts) \ status = F_none; \ accounts.used = accounts.size; \ @@ -153,40 +171,48 @@ extern "C" { #define f_macro_string_accounts_t_destroy_simple(accounts) \ accounts.used = accounts.size; \ - while (accounts.used > 0) { \ + while (accounts.used) { \ accounts.used--; \ f_macro_account_t_destroy_simple(accounts.array[accounts.used]); \ } \ f_memory_destroy((void **) & accounts.array, sizeof(f_account_t), accounts.size); \ accounts.size = 0; - #define f_macro_string_accounts_t_resize(status, accounts, new_length) \ + #define f_macro_string_accounts_t_increase(status, values) f_macro_memory_structure_increase(status, values, f_account_t); + + #define f_macro_accounts_t_decrease(status, accounts) \ status = F_none; \ - if (new_length < accounts.size) { \ - for (f_array_length_t _macro__i = accounts.size - new_length; _macro__i < accounts.size; _macro__i++) { \ - f_macro_account_t_delete(status, accounts.array[_macro__i]); \ - if (status != F_none) break; \ - } \ + if (accounts.size) { \ + f_macro_account_t_delete(status, accounts.array[accounts.size - 1]); \ + if (status != F_none) break; \ } \ - if (status == F_none) status = f_memory_resize((void **) & accounts.array, sizeof(f_account_t), accounts.size, new_length); \ - if (status == F_none) { \ - accounts.size = new_length; \ - if (accounts.used > accounts.size) accounts.used = new_length; \ - } + f_macro_memory_structure_destroy(status, accounts, sizeof(f_account_t)); - #define f_macro_string_accounts_t_adjust(status, accounts, new_length) \ + #define f_macro_accounts_t_decimate(status, accounts) \ status = F_none; \ - if (new_length < accounts.size) { \ - for (f_array_length_t _macro__i = accounts.size - new_length; _macro__i < accounts.size; _macro__i++) { \ - f_macro_account_t_destroy(status, accounts.array[_macro__i], f_account_t); \ - if (status != F_none) break; \ - } \ + if (accounts.size) { \ + f_macro_account_t_destroy(status, accounts.array[accounts.size - 1]); \ + if (status != F_none) break; \ } \ - if (status == F_none) status = f_memory_adjust((void **) & accounts.array, sizeof(f_account_t), accounts.size, new_length); \ - if (status == F_none) { \ - accounts.size = new_length; \ - if (accounts.used > accounts.size) accounts.used = new_length; \ - } + f_macro_memory_structure_decimate(status, accounts, sizeof(f_account_t)); + + #define f_macro_string_accounts_t_increase_by(status, values, amount) f_macro_memory_structure_increase_by(status, values, f_account_t), amount); + + #define f_macro_accounts_t_decrease_by(status, accounts, amount) \ + status = F_none; \ + for (register f_array_length_t _macro__i = amount <= accounts.size ? accounts.size - amount : 0; _macro__i < accounts.size; ++_macro__i) { \ + f_macro_account_t_delete(status, accounts.array[_macro__i]); \ + if (status != F_none) break; \ + } \ + if (status == F_none) status = f_macro_memory_structure_decrease_by(status, accounts, f_account_t, amount); + + #define f_macro_accounts_t_decimate_by(status, accounts, amount) \ + status = F_none; \ + for (register f_array_length_t _macro__i = amount <= accounts.size ? accounts.size - amount : 0; _macro__i < accounts.size; ++_macro__i) { \ + f_macro_account_t_destroy(status, accounts.array[_macro__i]); \ + if (status != F_none) break; \ + } \ + if (status == F_none) status = f_macro_memory_structure_decimate_by(status, accounts, f_account_t, amount); #endif // _di_f_accounts_t_ #ifdef __cplusplus diff --git a/level_0/f_account/data/build/settings b/level_0/f_account/data/build/settings index 4ed2e4c..abf00a3 100644 --- a/level_0/f_account/data/build/settings +++ b/level_0/f_account/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lf_memory +build_libraries-individual -lf_memory -lf_string build_sources_library account.c private-account.c build_sources_program build_sources_headers account.h account-common.h diff --git a/level_0/f_capability/data/build/settings b/level_0/f_capability/data/build/settings index e538f67..6facb8e 100644 --- a/level_0/f_capability/data/build/settings +++ b/level_0/f_capability/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -lcap -build_libraries-individual -lf_memory +build_libraries-individual -lf_memory -lf_string build_sources_library capability.c build_sources_program build_sources_headers capability.h capability-common.h diff --git a/level_0/f_color/c/color-common.c b/level_0/f_color/c/color-common.c new file mode 100644 index 0000000..2e064a8 --- /dev/null +++ b/level_0/f_color/c/color-common.c @@ -0,0 +1,58 @@ +#include "color.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_f_color_strings_s_ + const f_string_t f_color_string_begin_s = "\033["; + const f_string_t f_color_string_end_s = "m"; + const f_string_t f_color_string_medium_s = ";"; + + const f_string_t f_color_string_code_reset_s = "0"; + const f_string_t f_color_string_code_bold_s = "1"; + const f_string_t f_color_string_code_underline_s = "4"; + const f_string_t f_color_string_code_blink_s = "5"; + const f_string_t f_color_string_code_reverse_s = "7"; + const f_string_t f_color_string_code_conceal_s = "8"; + const f_string_t f_color_string_code_black_s = "30"; + const f_string_t f_color_string_code_red_s = "31"; + const f_string_t f_color_string_code_green_s = "32"; + const f_string_t f_color_string_code_yellow_s = "33"; + const f_string_t f_color_string_code_blue_s = "34"; + const f_string_t f_color_string_code_purple_s = "35"; + const f_string_t f_color_string_code_teal_s = "36"; + const f_string_t f_color_string_code_white_s = "37"; + const f_string_t f_color_string_code_black_bg_s = "40"; + const f_string_t f_color_string_code_red_bg_s = "41"; + const f_string_t f_color_string_code_green_bg_s = "42"; + const f_string_t f_color_string_code_yellow_bg_s = "43"; + const f_string_t f_color_string_code_blue_bg_s = "44"; + const f_string_t f_color_string_code_purple_bg_s = "45"; + const f_string_t f_color_string_code_teal_bg_s = "46"; + const f_string_t f_color_string_code_white_bg_s = "47"; + const f_string_t f_color_string_code_bright_black_s = "90"; + const f_string_t f_color_string_code_bright_red_s = "91"; + const f_string_t f_color_string_code_bright_green_s = "92"; + const f_string_t f_color_string_code_bright_yellow_s = "93"; + const f_string_t f_color_string_code_bright_blue_s = "94"; + const f_string_t f_color_string_code_bright_purple_s = "95"; + const f_string_t f_color_string_code_bright_teal_s = "96"; + const f_string_t f_color_string_code_bright_white_s = "97"; + const f_string_t f_color_string_code_bright_black_bg_s = "100"; + const f_string_t f_color_string_code_bright_red_bg_s = "101"; + const f_string_t f_color_string_code_bright_green_bg_s = "102"; + const f_string_t f_color_string_code_bright_yellow_bg_s = "103"; + const f_string_t f_color_string_code_bright_blue_bg_s = "104"; + const f_string_t f_color_string_code_bright_purple_bg_s = "105"; + const f_string_t f_color_string_code_bright_teal_bg_s = "106"; + const f_string_t f_color_string_code_bright_white_bg_s = "107"; +#endif // _di_f_color_strings_s_ + +#ifndef _di_f_color_set_string_empty_s_ + const f_color_set_t f_color_set_empty_s = f_macro_color_set_t_initialize(&f_string_static_empty_s, &f_string_static_empty_s); +#endif // _di_f_color_set_string_empty_s_ + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_0/f_color/c/color-common.h b/level_0/f_color/c/color-common.h new file mode 100644 index 0000000..ccd7f85 --- /dev/null +++ b/level_0/f_color/c/color-common.h @@ -0,0 +1,484 @@ +/** + * FLL - Level 0 + * + * Project: Color + * API Version: 0.5 + * Licenses: lgplv2.1 + * + * Defines common data to be used for/by project color. + * + * This is auto-included by color.h and should not need to be explicitly included. + */ +#ifndef _F_color_common_h +#define _F_color_common_h + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_f_color_max_size_ + #define f_color_max_size 7 +#endif // _di_f_color_max_size_ + +#ifndef _di_f_color_types_t_ + typedef uint8_t f_color_code_t; + + #define f_color_code_none 0 + #define f_color_code_linux 1 + #define f_color_code_xterminal 2 +#endif // _di_f_color_types_t_ + +/** + * Provide a global color related strings. + */ +#ifndef _di_f_color_strings_s_ + extern const f_string_t f_color_string_begin_s; + extern const f_string_t f_color_string_end_s; + extern const f_string_t f_color_string_medium_s; + + extern const f_string_t f_color_string_code_reset_s; + extern const f_string_t f_color_string_code_bold_s; + extern const f_string_t f_color_string_code_underline_s; + extern const f_string_t f_color_string_code_blink_s; + extern const f_string_t f_color_string_code_reverse_s; + extern const f_string_t f_color_string_code_conceal_s; + extern const f_string_t f_color_string_code_black_s; + extern const f_string_t f_color_string_code_red_s; + extern const f_string_t f_color_string_code_green_s; + extern const f_string_t f_color_string_code_yellow_s; + extern const f_string_t f_color_string_code_blue_s; + extern const f_string_t f_color_string_code_purple_s; + extern const f_string_t f_color_string_code_teal_s; + extern const f_string_t f_color_string_code_white_s; + extern const f_string_t f_color_string_code_black_bg_s; + extern const f_string_t f_color_string_code_red_bg_s; + extern const f_string_t f_color_string_code_green_bg_s; + extern const f_string_t f_color_string_code_yellow_bg_s; + extern const f_string_t f_color_string_code_blue_bg_s; + extern const f_string_t f_color_string_code_purple_bg_s; + extern const f_string_t f_color_string_code_teal_bg_s; + extern const f_string_t f_color_string_code_white_bg_s; + extern const f_string_t f_color_string_code_bright_black_s; + extern const f_string_t f_color_string_code_bright_red_s; + extern const f_string_t f_color_string_code_bright_green_s; + extern const f_string_t f_color_string_code_bright_yellow_s; + extern const f_string_t f_color_string_code_bright_blue_s; + extern const f_string_t f_color_string_code_bright_purple_s; + extern const f_string_t f_color_string_code_bright_teal_s; + extern const f_string_t f_color_string_code_bright_white_s; + extern const f_string_t f_color_string_code_bright_black_bg_s; + extern const f_string_t f_color_string_code_bright_red_bg_s; + extern const f_string_t f_color_string_code_bright_green_bg_s; + extern const f_string_t f_color_string_code_bright_yellow_bg_s; + extern const f_string_t f_color_string_code_bright_blue_bg_s; + extern const f_string_t f_color_string_code_bright_purple_bg_s; + extern const f_string_t f_color_string_code_bright_teal_bg_s; + extern const f_string_t f_color_string_code_bright_white_bg_s; +#endif // _di_f_color_strings_s_ + +/** + * Specify color modes. + * + * Color modes communicate how the color is supposed to be. + * + * The f_color_mode_none define designates that there is no assigned mode (the mode is undefined). + * The f_color_mode_no_color define designates that the color mode is set to no color (disable colors). + */ +#ifndef _di_f_color_mode_t_ + typedef uint8_t f_color_mode_t; + + #define f_color_mode_none 0 + #define f_color_mode_no_color 1 + #define f_color_mode_dark 2 + #define f_color_mode_light 3 +#endif // _di_f_color_mode_t_ + +#ifndef _di_f_color_format_t_ + typedef struct { + const int8_t *begin; + const int8_t *end; + const int8_t *medium; + } f_color_format_t; + + #define f_color_format_t_initialize_linux { f_color_string_begin_s, f_color_string_end_s, f_color_string_medium_s } + #define f_color_format_t_initialize_xterminal { f_color_string_begin_s, f_color_string_end_s, f_color_string_medium_s } + + #define f_macro_color_format_t_clear(format) \ + format.begin = 0; \ + format.end = 0; \ + format.medium = 0; + + #define f_macro_color_format_t_set_linux(format) \ + format.begin = f_color_string_begin_s; \ + format.end = f_color_string_end_s; \ + format.medium = f_color_string_medium_s; + + #define f_macro_color_format_t_set_xterminal(format) \ + format.begin = f_color_string_begin_s; \ + format.end = f_color_string_end_s; \ + format.medium = f_color_string_medium_s; +#endif // _di_f_color_format_t_ + +/** + * A structure containing all supported color codes. + * + * Different system will support a different set. + * + * Custom initializers are provided for common defaults: + * - f_color_t_initialize_linux: ideal for linux console. + * - f_color_t_initialize_xterminal: ideal for linux x-terminal. + */ +#ifndef _di_f_color_t_ + typedef struct { + const int8_t *reset; + const int8_t *bold; + const int8_t *underline; + const int8_t *blink; + const int8_t *reverse; + const int8_t *conceal; + const int8_t *black; + const int8_t *red; + const int8_t *green; + const int8_t *yellow; + const int8_t *blue; + const int8_t *purple; + const int8_t *teal; + const int8_t *white; + const int8_t *black_bg; + const int8_t *red_bg; + const int8_t *green_bg; + const int8_t *yellow_bg; + const int8_t *blue_bg; + const int8_t *purple_bg; + const int8_t *teal_bg; + const int8_t *white_bg; + const int8_t *bright_black; + const int8_t *bright_red; + const int8_t *bright_green; + const int8_t *bright_yellow; + const int8_t *bright_blue; + const int8_t *bright_purple; + const int8_t *bright_teal; + const int8_t *bright_white; + const int8_t *bright_black_bg; + const int8_t *bright_red_bg; + const int8_t *bright_green_bg; + const int8_t *bright_yellow_bg; + const int8_t *bright_blue_bg; + const int8_t *bright_purple_bg; + const int8_t *bright_teal_bg; + const int8_t *bright_white_bg; + } f_color_t; + + #define f_color_t_initialize_linux { f_color_string_code_reset_s, f_color_string_code_bold_s, f_color_string_code_underline_s, f_color_string_code_blink_s, f_color_string_code_reverse_s, f_color_string_code_conceal_s, f_color_string_code_black_s, f_color_string_code_red_s, f_color_string_code_green_s, f_color_string_code_yellow_s, f_color_string_code_blue_s, f_color_string_code_purple_s, f_color_string_code_teal_s, f_color_string_code_white_s, f_color_string_code_black_bg_s, f_color_string_code_red_bg_s, f_color_string_code_green_bg_s, f_color_string_code_yellow_bg_s, f_color_string_code_blue_bg_s, f_color_string_code_purple_bg_s, f_color_string_code_teal_bg_s, f_color_string_code_white_bg_s, f_color_string_code_black_s, f_color_string_code_red_s, f_color_string_code_green_s, f_color_string_code_yellow_s, f_color_string_code_blue_s, f_color_string_code_purple_s, f_color_string_code_teal_s, f_color_string_code_white_s, f_color_string_code_black_bg_s, f_color_string_code_red_bg_s, f_color_string_code_green_bg_s, f_color_string_code_yellow_bg_s, f_color_string_code_blue_bg_s, f_color_string_code_purple_bg_s, f_color_string_code_teal_bg_s, f_color_string_code_white_bg_s } + #define f_color_t_initialize_xterminal { f_color_string_code_reset_s, f_color_string_code_bold_s, f_color_string_code_underline_s, f_color_string_code_blink_s, f_color_string_code_reverse_s, f_color_string_code_conceal_s, f_color_string_code_black_s, f_color_string_code_red_s, f_color_string_code_green_s, f_color_string_code_yellow_s, f_color_string_code_blue_s, f_color_string_code_purple_s, f_color_string_code_teal_s, f_color_string_code_white_s, f_color_string_code_black_bg_s, f_color_string_code_red_bg_s, f_color_string_code_green_bg_s, f_color_string_code_yellow_bg_s, f_color_string_code_blue_bg_s, f_color_string_code_purple_bg_s, f_color_string_code_teal_bg_s, f_color_string_code_white_bg_s, f_color_string_code_bright_black_s, f_color_string_code_bright_red_s, f_color_string_code_bright_green_s, f_color_string_code_bright_yellow_s, f_color_string_code_bright_blue_s, f_color_string_code_bright_purple_s, f_color_string_code_bright_teal_s, f_color_string_code_bright_white_s, f_color_string_code_bright_black_bg_s, f_color_string_code_bright_red_bg_s, f_color_string_code_bright_green_bg_s, f_color_string_code_bright_yellow_bg_s, f_color_string_code_bright_blue_bg_s, f_color_string_code_bright_purple_bg_s, f_color_string_code_bright_teal_bg_s, f_color_string_code_bright_white_bg_s } + + #define f_macro_color_t_clear(color) \ + color.reset = 0; \ + color.bold = 0; \ + color.underline = 0; \ + color.blink = 0; \ + color.reverse = 0; \ + color.conceal = 0; \ + color.black = 0; \ + color.red = 0; \ + color.green = 0; \ + color.yellow = 0; \ + color.blue = 0; \ + color.purple = 0; \ + color.teal = 0; \ + color.white = 0; \ + color.black_bg = 0; \ + color.red_bg = 0; \ + color.green_bg = 0; \ + color.yellow_bg = 0; \ + color.blue_bg = 0; \ + color.purple_bg = 0; \ + color.teal_bg = 0; \ + color.white_bg = 0; \ + color.bright_black = 0; \ + color.bright_red = 0; \ + color.bright_green = 0; \ + color.bright_yellow = 0; \ + color.bright_blue = 0; \ + color.bright_purple = 0; \ + color.bright_teal = 0; \ + color.bright_white = 0; \ + color.bright_black_bg = 0; \ + color.bright_red_bg = 0; \ + color.bright_green_bg = 0; \ + color.bright_yellow_bg = 0; \ + color.bright_blue_bg = 0; \ + color.bright_purple_bg = 0; \ + color.bright_teal_bg = 0; \ + color.bright_white_bg = 0; + + #define f_macro_color_t_set_linux(color) \ + color.reset = f_color_string_code_reset_s; \ + color.bold = f_color_string_code_bold_s; \ + color.underline = f_color_string_code_underline_s; \ + color.blink = f_color_string_code_blink_s; \ + color.reverse = f_color_string_code_reverse_s; \ + color.conceal = f_color_string_code_conceal_s; \ + color.black = f_color_string_code_black_s; \ + color.red = f_color_string_code_red_s; \ + color.green = f_color_string_code_green_s; \ + color.yellow = f_color_string_code_yellow_s; \ + color.blue = f_color_string_code_blue_s; \ + color.purple = f_color_string_code_purple_s; \ + color.teal = f_color_string_code_teal_s; \ + color.white = f_color_string_code_white_s; \ + color.black_bg = f_color_string_code_black_bg_s; \ + color.red_bg = f_color_string_code_red_bg_s; \ + color.green_bg = f_color_string_code_green_bg_s; \ + color.yellow_bg = f_color_string_code_yellow_bg_s; \ + color.blue_bg = f_color_string_code_blue_bg_s; \ + color.purple_bg = f_color_string_code_purple_bg_s; \ + color.teal_bg = f_color_string_code_teal_bg_s; \ + color.white_bg = f_color_string_code_white_bg_s; \ + color.bright_black = f_color_string_code_black_s; \ + color.bright_red = f_color_string_code_red_s; \ + color.bright_green = f_color_string_code_green_s; \ + color.bright_yellow = f_color_string_code_yellow_s; \ + color.bright_blue = f_color_string_code_blue_s; \ + color.bright_purple = f_color_string_code_purple_s; \ + color.bright_teal = f_color_string_code_teal_s; \ + color.bright_white = f_color_string_code_white_s; \ + color.bright_black_bg = f_color_string_code_black_bg_s; \ + color.bright_red_bg = f_color_string_code_red_bg_s; \ + color.bright_green_bg = f_color_string_code_green_bg_s; \ + color.bright_yellow_bg = f_color_string_code_yellow_bg_s; \ + color.bright_blue_bg = f_color_string_code_blue_bg_s; \ + color.bright_purple_bg = f_color_string_code_purple_bg_s; \ + color.bright_teal_bg = f_color_string_code_teal_bg_s; \ + color.bright_white_bg = f_color_string_code_white_bg_s; + + #define f_macro_color_t_set_xterminal(color) \ + color.reset = f_color_string_code_reset_s; \ + color.bold = f_color_string_code_bold_s; \ + color.underline = f_color_string_code_underline_s; \ + color.blink = f_color_string_code_blink_s; \ + color.reverse = f_color_string_code_reverse_s; \ + color.conceal = f_color_string_code_conceal_s; \ + color.black = f_color_string_code_black_s; \ + color.red = f_color_string_code_red_s; \ + color.green = f_color_string_code_green_s; \ + color.yellow = f_color_string_code_yellow_s; \ + color.blue = f_color_string_code_blue_s; \ + color.purple = f_color_string_code_purple_s; \ + color.teal = f_color_string_code_teal_s; \ + color.white = f_color_string_code_white_s; \ + color.black_bg = f_color_string_code_black_bg_s; \ + color.red_bg = f_color_string_code_red_bg_s; \ + color.green_bg = f_color_string_code_green_bg_s; \ + color.yellow_bg = f_color_string_code_yellow_bg_s; \ + color.blue_bg = f_color_string_code_blue_bg_s; \ + color.purple_bg = f_color_string_code_purple_bg_s; \ + color.teal_bg = f_color_string_code_teal_bg_s; \ + color.white_bg = f_color_string_code_white_bg_s; \ + color.bright_black = f_color_string_code_bright_black_s; \ + color.bright_red = f_color_string_code_bright_red_s; \ + color.bright_green = f_color_string_code_bright_green_s; \ + color.bright_yellow = f_color_string_code_bright_yellow_s; \ + color.bright_blue = f_color_string_code_bright_blue_s; \ + color.bright_purple= f_color_string_code_bright_purple_s; \ + color.bright_teal = f_color_string_code_bright_teal_s; \ + color.bright_white = f_color_string_code_bright_white_s; \ + color.bright_black_bg = f_color_string_code_bright_black_bg_s; \ + color.bright_red_bg = f_color_string_code_bright_red_bg_s; \ + color.bright_green_bg = f_color_string_code_bright_green_bg_s; \ + color.bright_yellow_bg = f_color_string_code_bright_yellow_bg_s; \ + color.bright_blue_bg = f_color_string_code_bright_blue_bg_s; \ + color.bright_purple_bg = f_color_string_code_bright_purple_bg_s; \ + color.bright_teal_bg = f_color_string_code_bright_teal_bg_s; \ + color.bright_white_bg = f_color_string_code_bright_white_bg_s; +#endif // _di_f_color_t_ + +/** + * Provide a set of two colors, a before and an after. + * + * This is intended to be used for printing, such that the printed code is prefixed with the "before" and postfixed with the "after". + * These color strings should be NULL terminated. + * + * before: A pointer to the dynamic string representing the before color to assign, set to NULL to disable. + * after: A pointer to the dynamic string representing the after color to assign, set to NULL to disable. + */ +#ifndef _di_f_color_set_t_ + typedef struct { + const f_string_static_t *before; + const f_string_static_t *after; + } f_color_set_t; + + #define f_color_set_t_initialize { 0, 0 } + + #define f_macro_color_set_t_initialize(before, after) { before, after } + + #define f_macro_color_set_t_clear(set) \ + set.before = 0; \ + set.after = 0; +#endif // _di_f_color_set_t_ + +/** + * Provide a global color set of global (static) empty strings. + */ +#ifndef _di_f_color_set_string_empty_s_ + extern const f_color_set_t f_color_set_empty_s; +#endif // _di_f_color_set_string_empty_s_ + +/** + * Provide a set of color contexts. + * + * This is intended to be used for printing, such that the printed code is prefixed with the "before" and postfixed with the "after", for each context. + * + * warning: Color context associated with "warning". + * error: Color context associated with "error". + * title: Color context associated with "title". + * notable: Color context associated with "notable". + * important: Color context associated with "important". + * standout: Color context associated with "standout". + * normal: Color context associated with "normal". + * normal_reset: Color context associated with "normal_reset". + */ +#ifndef _di_f_color_set_context_t_ + typedef struct { + f_color_set_t warning; + f_color_set_t error; + f_color_set_t title; + f_color_set_t notable; + f_color_set_t important; + f_color_set_t standout; + f_color_set_t normal; + f_color_set_t normal_reset; + } f_color_set_context_t; + + #define f_color_set_context_t_initialize { f_color_set_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize } + + #define f_macro_color_set_context_t_initialize(warning, error, title, notable, important, standout, normal, normal_reset) { warning, error, title, notable, important, standout, normal, normal_reset } + + #define f_macro_color_set_context_t_clear(set) \ + f_macro_color_set_t_clear(set.warning); \ + f_macro_color_set_t_clear(set.error); \ + f_macro_color_set_t_clear(set.title); \ + f_macro_color_set_t_clear(set.notable); \ + f_macro_color_set_t_clear(set.important); \ + f_macro_color_set_t_clear(set.standout); \ + f_macro_color_set_t_clear(set.normal); \ + f_macro_color_set_t_clear(set.normal_reset); + +#endif // _di_f_color_set_context_t_ + +/** + * Provide a color context structure. + * + * This is intended to be used for printing, and this provides a management structure for all color context related data. + * + * list: A list of colors, each with their specific color code string. + * format: The color code formatting strings. + * mode: A code representing the color mode. + * set: A collection of color context sets for direct use in color printing. + * warning: Color context associated with "warning". + * error: Color context associated with "error". + * title: Color context associated with "title". + * notable: Color context associated with "notable". + * important: Color context associated with "important". + * standout: Color context associated with "standout". + * normal: Color context associated with "normal". + * normal_reset: Color context associated with "normal_reset". + */ +#ifndef _di_f_color_context_t_ + typedef struct { + f_color_t list; + f_color_format_t format; + f_color_mode_t mode; + f_color_set_context_t set; + f_string_dynamic_t reset; + f_string_dynamic_t warning; + f_string_dynamic_t error; + f_string_dynamic_t title; + f_string_dynamic_t notable; + f_string_dynamic_t important; + f_string_dynamic_t standout; + f_string_dynamic_t normal; + f_string_dynamic_t normal_reset; + } f_color_context_t; + + #define f_color_context_t_initialize { f_color_t_initialize_linux, f_color_format_t_initialize_linux, f_color_mode_none, f_color_set_context_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize } + + #define f_macro_color_context_t_clear(context) \ + f_macro_color_t_clear(context.list); \ + f_macro_color_format_t_clear(context.format); \ + context.mode = f_color_mode_none; \ + f_macro_color_set_context_t_clear(context.set); \ + f_macro_string_dynamic_t_clear(context.error); \ + f_macro_string_dynamic_t_clear(context.title); \ + f_macro_string_dynamic_t_clear(context.notable); \ + f_macro_string_dynamic_t_clear(context.important); \ + f_macro_string_dynamic_t_clear(context.standout); \ + f_macro_string_dynamic_t_clear(context.normal); \ + f_macro_string_dynamic_t_clear(context.normal_reset); + + #define f_macro_color_context_t_new(status, context) \ + f_macro_string_dynamic_t_new(status, context.reset, f_color_max_size + 1); \ + if (F_status_is_error_not(status)) f_macro_string_dynamic_t_new(status, context.warning, f_color_max_size + 1); \ + if (F_status_is_error_not(status)) f_macro_string_dynamic_t_new(status, context.error, f_color_max_size + 1); \ + if (F_status_is_error_not(status)) f_macro_string_dynamic_t_new(status, context.title, f_color_max_size + 1); \ + if (F_status_is_error_not(status)) f_macro_string_dynamic_t_new(status, context.notable, f_color_max_size + 1); \ + if (F_status_is_error_not(status)) f_macro_string_dynamic_t_new(status, context.important, f_color_max_size + 1); \ + if (F_status_is_error_not(status)) f_macro_string_dynamic_t_new(status, context.standout, f_color_max_size + 1); \ + if (F_status_is_error_not(status)) f_macro_string_dynamic_t_new(status, context.normal, f_color_max_size + 1); \ + if (F_status_is_error_not(status)) f_macro_string_dynamic_t_new(status, context.normal_reset, f_color_max_size + 1); + + #define f_macro_color_context_t_delete(status, context) \ + f_macro_string_dynamic_t_delete(status, context.reset); \ + if (F_status_is_error_not(status)) f_macro_string_dynamic_t_delete(status, context.warning); \ + if (F_status_is_error_not(status)) f_macro_string_dynamic_t_delete(status, context.error); \ + if (F_status_is_error_not(status)) f_macro_string_dynamic_t_delete(status, context.title); \ + if (F_status_is_error_not(status)) f_macro_string_dynamic_t_delete(status, context.notable); \ + if (F_status_is_error_not(status)) f_macro_string_dynamic_t_delete(status, context.important); \ + if (F_status_is_error_not(status)) f_macro_string_dynamic_t_delete(status, context.standout); \ + if (F_status_is_error_not(status)) f_macro_string_dynamic_t_delete(status, context.normal); \ + if (F_status_is_error_not(status)) f_macro_string_dynamic_t_delete(status, context.normal_reset); \ + if (F_status_is_error_not(status)) f_macro_color_context_t_clear(context); + + #define f_macro_color_context_t_destroy(status, context, size) \ + f_macro_string_dynamic_t_destroy(status, context.reset); \ + if (F_status_is_error_not(status)) f_macro_string_dynamic_t_destroy(status, context.warning, size); \ + if (F_status_is_error_not(status)) f_macro_string_dynamic_t_destroy(status, context.error, size); \ + if (F_status_is_error_not(status)) f_macro_string_dynamic_t_destroy(status, context.title, size); \ + if (F_status_is_error_not(status)) f_macro_string_dynamic_t_destroy(status, context.notable, size); \ + if (F_status_is_error_not(status)) f_macro_string_dynamic_t_destroy(status, context.important, size); \ + if (F_status_is_error_not(status)) f_macro_string_dynamic_t_destroy(status, context.standout, size); \ + if (F_status_is_error_not(status)) f_macro_string_dynamic_t_destroy(status, context.normal); \ + if (F_status_is_error_not(status)) f_macro_string_dynamic_t_destroy(status, context.normal_reset); \ + if (F_status_is_error_not(status)) f_macro_color_context_t_clear(context); + + #define f_macro_color_context_t_delete_simple(context) \ + f_macro_string_dynamic_t_delete_simple(context.reset); \ + f_macro_string_dynamic_t_delete_simple(context.warning); \ + f_macro_string_dynamic_t_delete_simple(context.error); \ + f_macro_string_dynamic_t_delete_simple(context.title); \ + f_macro_string_dynamic_t_delete_simple(context.notable); \ + f_macro_string_dynamic_t_delete_simple(context.important); \ + f_macro_string_dynamic_t_delete_simple(context.standout); \ + f_macro_string_dynamic_t_delete_simple(context.normal); \ + f_macro_string_dynamic_t_delete_simple(context.normal_reset); \ + f_macro_color_context_t_clear(context); + + #define f_macro_color_context_t_destroy_simple(context, size) \ + f_macro_string_dynamic_t_destroy_simple(context.reset); \ + f_macro_string_dynamic_t_destroy_simple(context.warning, size); \ + f_macro_string_dynamic_t_destroy_simple(context.error, size); \ + f_macro_string_dynamic_t_destroy_simple(context.title, size); \ + f_macro_string_dynamic_t_destroy_simple(context.notable, size); \ + f_macro_string_dynamic_t_destroy_simple(context.important, size); \ + f_macro_string_dynamic_t_destroy_simple(context.standout, size); \ + f_macro_string_dynamic_t_destroy_simple(context.normal); \ + f_macro_string_dynamic_t_destroy_simple(context.normal_reset); \ + f_macro_color_context_t_clear(context); +#endif // _di_fl_color_context_t_ + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _F_color_common_h diff --git a/level_0/f_color/c/color.c b/level_0/f_color/c/color.c new file mode 100644 index 0000000..acc7c64 --- /dev/null +++ b/level_0/f_color/c/color.c @@ -0,0 +1,9 @@ +#include "color.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_0/f_color/c/color.h b/level_0/f_color/c/color.h index 8fd3aeb..ef1d2aa 100644 --- a/level_0/f_color/c/color.h +++ b/level_0/f_color/c/color.h @@ -13,425 +13,17 @@ // fll-0 includes #include +#include +#include #include +// fll-0 color includes +#include + #ifdef __cplusplus extern "C" { #endif -#ifndef _di_f_color_max_size_ - #define f_color_max_size 7 -#endif // _di_f_color_max_size_ - -#ifndef _di_f_color_types_t_ - typedef uint8_t f_color_code_t; - - #define f_color_code_none 0 - #define f_color_code_linux 1 - #define f_color_code_xterminal 2 -#endif // _di_f_color_types_t_ - -/** - * Specify color modes. - * - * Color modes communicate how the color is supposed to be. - * - * The f_color_mode_none define designates that there is no assigned mode (the mode is undefined). - * The f_color_mode_no_color define designates that the color mode is set to no color (disable colors). - */ -#ifndef _di_f_color_mode_t_ - typedef uint8_t f_color_mode_t; - - #define f_color_mode_none 0 - #define f_color_mode_no_color 1 - #define f_color_mode_dark 2 - #define f_color_mode_light 3 -#endif // _di_f_color_mode_t_ - -#ifndef _di_f_color_format_t_ - typedef struct { - const int8_t *begin; - const int8_t *end; - const int8_t *medium; - } f_color_format_t; - - #define f_color_format_t_initialize_linux { "\033[", "m", ";" } - #define f_color_format_t_initialize_xterminal { "\033[", "m", ";" } - - #define f_macro_color_format_t_clear(format) \ - format.begin = 0; \ - format.end = 0; \ - format.medium = 0; - - #define f_macro_color_format_t_set_linux(format) \ - format.begin = "\033["; \ - format.end = "m"; \ - format.medium = ";"; - - #define f_macro_color_format_t_set_xterminal(format) \ - format.begin = "\033["; \ - format.end = "m"; \ - format.medium = ";"; -#endif // _di_f_color_format_t_ - -/** - * A structure containing all supported color codes. - * - * Different system will support a different set. - * - * Custom initializers are provided for common defaults: - * - f_color_t_initialize_linux: ideal for linux console. - * - f_color_t_initialize_xterminal: ideal for linux x-terminal. - */ -#ifndef _di_f_color_t_ - typedef struct { - const int8_t *reset; - const int8_t *bold; - const int8_t *underline; - const int8_t *blink; - const int8_t *reverse; - const int8_t *conceal; - const int8_t *black; - const int8_t *red; - const int8_t *green; - const int8_t *yellow; - const int8_t *blue; - const int8_t *purple; - const int8_t *teal; - const int8_t *white; - const int8_t *black_bg; - const int8_t *red_bg; - const int8_t *green_bg; - const int8_t *yellow_bg; - const int8_t *blue_bg; - const int8_t *purple_bg; - const int8_t *teal_bg; - const int8_t *white_bg; - const int8_t *bright_black; - const int8_t *bright_red; - const int8_t *bright_green; - const int8_t *bright_yellow; - const int8_t *bright_blue; - const int8_t *bright_purple; - const int8_t *bright_teal; - const int8_t *bright_white; - const int8_t *bright_black_bg; - const int8_t *bright_red_bg; - const int8_t *bright_green_bg; - const int8_t *bright_yellow_bg; - const int8_t *bright_blue_bg; - const int8_t *bright_purple_bg; - const int8_t *bright_teal_bg; - const int8_t *bright_white_bg; - } f_color_t; - - #define f_color_t_initialize_linux { "0", "1", "4", "5", "7", "8", "30", "31", "32", "33", "34", "35", "36", "37", "40", "41", "42", "43", "44", "45", "46", "47", "30", "31", "32", "33", "34", "35", "36", "37", "40", "41", "42", "43", "44", "45", "46", "47" } - #define f_color_t_initialize_xterminal { "0", "1", "4", "5", "7", "8", "30", "31", "32", "33", "34", "35", "36", "37", "40", "41", "42", "43", "44", "45", "46", "47", "90", "91", "92", "93", "94", "95", "96", "97", "100", "101", "102", "103", "104", "105", "106", "107" } - - #define f_macro_color_t_clear(color) \ - color.reset = 0; \ - color.bold = 0; \ - color.underline = 0; \ - color.blink = 0; \ - color.reverse = 0; \ - color.conceal = 0; \ - color.black = 0; \ - color.red = 0; \ - color.green = 0; \ - color.yellow = 0; \ - color.blue = 0; \ - color.purple = 0; \ - color.teal = 0; \ - color.white = 0; \ - color.black_bg = 0; \ - color.red_bg = 0; \ - color.green_bg = 0; \ - color.yellow_bg = 0; \ - color.blue_bg = 0; \ - color.purple_bg = 0; \ - color.teal_bg = 0; \ - color.white_bg = 0; \ - color.bright_black = 0; \ - color.bright_red = 0; \ - color.bright_green = 0; \ - color.bright_yellow = 0; \ - color.bright_blue = 0; \ - color.bright_purple = 0; \ - color.bright_teal = 0; \ - color.bright_white = 0; \ - color.bright_black_bg = 0; \ - color.bright_red_bg = 0; \ - color.bright_green_bg = 0; \ - color.bright_yellow_bg = 0; \ - color.bright_blue_bg = 0; \ - color.bright_purple_bg = 0; \ - color.bright_teal_bg = 0; \ - color.bright_white_bg = 0; - - #define f_macro_color_t_set_linux(color) \ - color.reset = "0"; \ - color.bold = "1"; \ - color.underline = "4"; \ - color.blink = "5"; \ - color.reverse = "7"; \ - color.conceal = "8"; \ - color.black = "30"; \ - color.red = "31"; \ - color.green = "32"; \ - color.yellow = "33"; \ - color.blue = "34"; \ - color.purple = "35"; \ - color.teal = "36"; \ - color.white = "37"; \ - color.black_bg = "40"; \ - color.red_bg = "41"; \ - color.green_bg = "42"; \ - color.yellow_bg = "43"; \ - color.blue_bg = "44"; \ - color.purple_bg = "45"; \ - color.teal_bg = "46"; \ - color.white_bg = "47"; \ - color.bright_black = "30"; \ - color.bright_red = "31"; \ - color.bright_green = "32"; \ - color.bright_yellow = "33"; \ - color.bright_blue = "34"; \ - color.bright_purple = "35"; \ - color.bright_teal = "36"; \ - color.bright_white = "37"; \ - color.bright_black_bg = "40"; \ - color.bright_red_bg = "41"; \ - color.bright_green_bg = "42"; \ - color.bright_yellow_bg = "43"; \ - color.bright_blue_bg = "44"; \ - color.bright_purple_bg = "45"; \ - color.bright_teal_bg = "46"; \ - color.bright_white_bg = "47"; - - #define f_macro_color_t_set_xterminal(color) \ - color.reset = "0"; \ - color.bold = "1"; \ - color.underline = "4"; \ - color.blink = "5"; \ - color.reverse = "7"; \ - color.conceal = "8"; \ - color.black = "30"; \ - color.red = "31"; \ - color.green = "32"; \ - color.yellow = "33"; \ - color.blue = "34"; \ - color.purple = "35"; \ - color.teal = "36"; \ - color.white = "37"; \ - color.black_bg = "40"; \ - color.red_bg = "41"; \ - color.green_bg = "42"; \ - color.yellow_bg = "43"; \ - color.blue_bg = "44"; \ - color.purple_bg = "45"; \ - color.teal_bg = "46"; \ - color.white_bg = "47"; \ - color.bright_black = "90"; \ - color.bright_red = "91"; \ - color.bright_green = "92"; \ - color.bright_yellow = "93"; \ - color.bright_blue = "94"; \ - color.bright_purple= "95"; \ - color.bright_teal = "96"; \ - color.bright_white = "97"; \ - color.bright_black_bg = "100"; \ - color.bright_red_bg = "101"; \ - color.bright_green_bg = "102"; \ - color.bright_yellow_bg = "103"; \ - color.bright_blue_bg = "104"; \ - color.bright_purple_bg = "105"; \ - color.bright_teal_bg = "106"; \ - color.bright_white_bg = "107"; -#endif // _di_f_color_t_ - -/** - * Provide a set of two colors, a before and an after. - * - * This is intended to be used for printing, such that the printed code is prefixed with the "before" and postfixed with the "after". - * These color strings should be NULL terminated. - * - * before: A pointer to the dynamic string representing the before color to assign, set to NULL to disable. - * after: A pointer to the dynamic string representing the after color to assign, set to NULL to disable. - */ -#ifndef _di_f_color_set_t_ - typedef struct { - const f_string_static_t *before; - const f_string_static_t *after; - } f_color_set_t; - - #define f_color_set_t_initialize { 0, 0 } - - #define f_macro_color_set_t_initialize(before, after) { before, after } - - #define f_macro_color_set_t_clear(set) \ - set.before = 0; \ - set.after = 0; -#endif // _di_f_color_set_t_ - -/** - * Provide a global (static) color set of global (static) empty strings. - */ -#ifndef _di_f_color_set_string_empty_s_ - const static f_color_set_t f_color_set_empty_s = f_macro_color_set_t_initialize(&f_string_static_empty_s, &f_string_static_empty_s); -#endif // _di_f_color_set_string_empty_s_ - -/** - * Provide a set of color contexts. - * - * This is intended to be used for printing, such that the printed code is prefixed with the "before" and postfixed with the "after", for each context. - * - * warning: Color context associated with "warning". - * error: Color context associated with "error". - * title: Color context associated with "title". - * notable: Color context associated with "notable". - * important: Color context associated with "important". - * standout: Color context associated with "standout". - * normal: Color context associated with "normal". - * normal_reset: Color context associated with "normal_reset". - */ -#ifndef _di_f_color_set_context_t_ - typedef struct { - f_color_set_t warning; - f_color_set_t error; - f_color_set_t title; - f_color_set_t notable; - f_color_set_t important; - f_color_set_t standout; - f_color_set_t normal; - f_color_set_t normal_reset; - } f_color_set_context_t; - - #define f_color_set_context_t_initialize { f_color_set_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize } - - #define f_macro_color_set_context_t_initialize(warning, error, title, notable, important, standout, normal, normal_reset) { warning, error, title, notable, important, standout, normal, normal_reset } - - #define f_macro_color_set_context_t_clear(set) \ - f_macro_color_set_t_clear(set.warning); \ - f_macro_color_set_t_clear(set.error); \ - f_macro_color_set_t_clear(set.title); \ - f_macro_color_set_t_clear(set.notable); \ - f_macro_color_set_t_clear(set.important); \ - f_macro_color_set_t_clear(set.standout); \ - f_macro_color_set_t_clear(set.normal); \ - f_macro_color_set_t_clear(set.normal_reset); - -#endif // _di_f_color_set_context_t_ - -/** - * Provide a color context structure. - * - * This is intended to be used for printing, and this provides a management structure for all color context related data. - * - * list: A list of colors, each with their specific color code string. - * format: The color code formatting strings. - * mode: A code representing the color mode. - * set: A collection of color context sets for direct use in color printing. - * warning: Color context associated with "warning". - * error: Color context associated with "error". - * title: Color context associated with "title". - * notable: Color context associated with "notable". - * important: Color context associated with "important". - * standout: Color context associated with "standout". - * normal: Color context associated with "normal". - * normal_reset: Color context associated with "normal_reset". - */ -#ifndef _di_f_color_context_t_ - typedef struct { - f_color_t list; - f_color_format_t format; - f_color_mode_t mode; - f_color_set_context_t set; - f_string_dynamic_t reset; - f_string_dynamic_t warning; - f_string_dynamic_t error; - f_string_dynamic_t title; - f_string_dynamic_t notable; - f_string_dynamic_t important; - f_string_dynamic_t standout; - f_string_dynamic_t normal; - f_string_dynamic_t normal_reset; - } f_color_context_t; - - #define f_color_context_t_initialize { f_color_t_initialize_linux, f_color_format_t_initialize_linux, f_color_mode_none, f_color_set_context_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize } - - #define f_macro_color_context_t_clear(context) \ - f_macro_color_t_clear(context.list); \ - f_macro_color_format_t_clear(context.format); \ - context.mode = f_color_mode_none; \ - f_macro_color_set_context_t_clear(context.set); \ - f_macro_string_dynamic_t_clear(context.error); \ - f_macro_string_dynamic_t_clear(context.title); \ - f_macro_string_dynamic_t_clear(context.notable); \ - f_macro_string_dynamic_t_clear(context.important); \ - f_macro_string_dynamic_t_clear(context.standout); \ - f_macro_string_dynamic_t_clear(context.normal); \ - f_macro_string_dynamic_t_clear(context.normal_reset); - - #define f_macro_color_context_t_new(status, context) \ - f_macro_string_dynamic_t_new(status, context.reset, f_color_max_size + 1); \ - if (F_status_is_error_not(status)) f_macro_string_dynamic_t_new(status, context.warning, f_color_max_size + 1); \ - if (F_status_is_error_not(status)) f_macro_string_dynamic_t_new(status, context.error, f_color_max_size + 1); \ - if (F_status_is_error_not(status)) f_macro_string_dynamic_t_new(status, context.title, f_color_max_size + 1); \ - if (F_status_is_error_not(status)) f_macro_string_dynamic_t_new(status, context.notable, f_color_max_size + 1); \ - if (F_status_is_error_not(status)) f_macro_string_dynamic_t_new(status, context.important, f_color_max_size + 1); \ - if (F_status_is_error_not(status)) f_macro_string_dynamic_t_new(status, context.standout, f_color_max_size + 1); \ - if (F_status_is_error_not(status)) f_macro_string_dynamic_t_new(status, context.normal, f_color_max_size + 1); \ - if (F_status_is_error_not(status)) f_macro_string_dynamic_t_new(status, context.normal_reset, f_color_max_size + 1); - - #define f_macro_color_context_t_delete(status, context) \ - f_macro_string_dynamic_t_delete(status, context.reset); \ - if (F_status_is_error_not(status)) f_macro_string_dynamic_t_delete(status, context.warning); \ - if (F_status_is_error_not(status)) f_macro_string_dynamic_t_delete(status, context.error); \ - if (F_status_is_error_not(status)) f_macro_string_dynamic_t_delete(status, context.title); \ - if (F_status_is_error_not(status)) f_macro_string_dynamic_t_delete(status, context.notable); \ - if (F_status_is_error_not(status)) f_macro_string_dynamic_t_delete(status, context.important); \ - if (F_status_is_error_not(status)) f_macro_string_dynamic_t_delete(status, context.standout); \ - if (F_status_is_error_not(status)) f_macro_string_dynamic_t_delete(status, context.normal); \ - if (F_status_is_error_not(status)) f_macro_string_dynamic_t_delete(status, context.normal_reset); \ - if (F_status_is_error_not(status)) f_macro_color_context_t_clear(context); - - #define f_macro_color_context_t_destroy(status, context, size) \ - f_macro_string_dynamic_t_destroy(status, context.reset); \ - if (F_status_is_error_not(status)) f_macro_string_dynamic_t_destroy(status, context.warning, size); \ - if (F_status_is_error_not(status)) f_macro_string_dynamic_t_destroy(status, context.error, size); \ - if (F_status_is_error_not(status)) f_macro_string_dynamic_t_destroy(status, context.title, size); \ - if (F_status_is_error_not(status)) f_macro_string_dynamic_t_destroy(status, context.notable, size); \ - if (F_status_is_error_not(status)) f_macro_string_dynamic_t_destroy(status, context.important, size); \ - if (F_status_is_error_not(status)) f_macro_string_dynamic_t_destroy(status, context.standout, size); \ - if (F_status_is_error_not(status)) f_macro_string_dynamic_t_destroy(status, context.normal); \ - if (F_status_is_error_not(status)) f_macro_string_dynamic_t_destroy(status, context.normal_reset); \ - if (F_status_is_error_not(status)) f_macro_color_context_t_clear(context); - - #define f_macro_color_context_t_delete_simple(context) \ - f_macro_string_dynamic_t_delete_simple(context.reset); \ - f_macro_string_dynamic_t_delete_simple(context.warning); \ - f_macro_string_dynamic_t_delete_simple(context.error); \ - f_macro_string_dynamic_t_delete_simple(context.title); \ - f_macro_string_dynamic_t_delete_simple(context.notable); \ - f_macro_string_dynamic_t_delete_simple(context.important); \ - f_macro_string_dynamic_t_delete_simple(context.standout); \ - f_macro_string_dynamic_t_delete_simple(context.normal); \ - f_macro_string_dynamic_t_delete_simple(context.normal_reset); \ - f_macro_color_context_t_clear(context); - - #define f_macro_color_context_t_destroy_simple(context, size) \ - f_macro_string_dynamic_t_destroy_simple(context.reset); \ - f_macro_string_dynamic_t_destroy_simple(context.warning, size); \ - f_macro_string_dynamic_t_destroy_simple(context.error, size); \ - f_macro_string_dynamic_t_destroy_simple(context.title, size); \ - f_macro_string_dynamic_t_destroy_simple(context.notable, size); \ - f_macro_string_dynamic_t_destroy_simple(context.important, size); \ - f_macro_string_dynamic_t_destroy_simple(context.standout, size); \ - f_macro_string_dynamic_t_destroy_simple(context.normal); \ - f_macro_string_dynamic_t_destroy_simple(context.normal_reset); \ - f_macro_color_context_t_clear(context); -#endif // _di_fl_color_context_t_ - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_color/data/build/dependencies b/level_0/f_color/data/build/dependencies index b4d4980..d798245 100644 --- a/level_0/f_color/data/build/dependencies +++ b/level_0/f_color/data/build/dependencies @@ -1,4 +1,6 @@ # fss-0000 f_type +f_status +f_memory f_string diff --git a/level_0/f_color/data/build/settings b/level_0/f_color/data/build/settings index 80aaaeb..0b794f3 100644 --- a/level_0/f_color/data/build/settings +++ b/level_0/f_color/data/build/settings @@ -19,10 +19,10 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lf_memory -build_sources_library +build_libraries-individual -lf_memory -lf_string +build_sources_library color.c color-common.c build_sources_program -build_sources_headers color.h +build_sources_headers color.h color-common.h build_sources_script build_sources_setting build_script yes diff --git a/level_0/f_console/c/console-common.c b/level_0/f_console/c/console-common.c new file mode 100644 index 0000000..8a6436f --- /dev/null +++ b/level_0/f_console/c/console-common.c @@ -0,0 +1,43 @@ +#include "console.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_f_console_standard_s_ + const f_string_t f_console_standard_short_dark_s = f_console_standard_short_dark; + const f_string_t f_console_standard_short_debug_s = f_console_standard_short_debug; + const f_string_t f_console_standard_short_help_s = f_console_standard_short_help; + const f_string_t f_console_standard_short_light_s = f_console_standard_short_light; + const f_string_t f_console_standard_short_no_color_s = f_console_standard_short_no_color; + const f_string_t f_console_standard_short_normal_s = f_console_standard_short_normal; + const f_string_t f_console_standard_short_quiet_s = f_console_standard_short_quiet; + const f_string_t f_console_standard_short_status_in_s = f_console_standard_short_status_in; + const f_string_t f_console_standard_short_status_out_s = f_console_standard_short_status_out; + const f_string_t f_console_standard_short_verbose_s = f_console_standard_short_verbose; + const f_string_t f_console_standard_short_version_s = f_console_standard_short_version; + + const f_string_t f_console_standard_long_dark_s = f_console_standard_long_dark; + const f_string_t f_console_standard_long_debug_s = f_console_standard_long_debug; + const f_string_t f_console_standard_long_help_s = f_console_standard_long_help; + const f_string_t f_console_standard_long_light_s = f_console_standard_long_light; + const f_string_t f_console_standard_long_no_color_s = f_console_standard_long_no_color; + const f_string_t f_console_standard_long_normal_s = f_console_standard_long_normal; + const f_string_t f_console_standard_long_quiet_s = f_console_standard_long_quiet; + const f_string_t f_console_standard_long_status_in_s = f_console_standard_long_status_in; + const f_string_t f_console_standard_long_status_out_s = f_console_standard_long_status_out; + const f_string_t f_console_standard_long_verbose_s = f_console_standard_long_verbose; + const f_string_t f_console_standard_long_version_s = f_console_standard_long_version; +#endif // _di_f_console_standard_s_ + +#ifndef _di_f_console_symbol_s_ + const f_string_t f_console_symbol_short_enable_s = f_console_symbol_short_enable; + const f_string_t f_console_symbol_short_disable_s = f_console_symbol_short_disable; + + const f_string_t f_console_symbol_long_enable_s = f_console_symbol_long_enable; + const f_string_t f_console_symbol_long_disable_s = f_console_symbol_long_disable; +#endif // _di_f_console_symbol_s_ + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_0/f_console/c/console-common.h b/level_0/f_console/c/console-common.h index 6baad45..7321b99 100644 --- a/level_0/f_console/c/console-common.h +++ b/level_0/f_console/c/console-common.h @@ -37,15 +37,8 @@ extern "C" { /** * The symbols passed to the program for option handling. - * - * The following will be processed as an integer and therefore must not be string. - * - f_console_symbol_enable - * - f_console_symbol_disable */ -#ifndef _di_f_console_symbols_ - #define f_console_symbol_enable '-' - #define f_console_symbol_disable '+' - +#ifndef _di_f_console_symbol_s_ #define f_console_symbol_short_enable "-" #define f_console_symbol_short_disable "+" @@ -57,7 +50,13 @@ extern "C" { #define f_console_symbol_long_enable_length 2 #define f_console_symbol_long_disable_length 2 -#endif // _di_f_console_symbols_ + + extern const f_string_t f_console_symbol_short_enable_s; + extern const f_string_t f_console_symbol_short_disable_s; + + extern const f_string_t f_console_symbol_long_enable_s; + extern const f_string_t f_console_symbol_long_disable_s; +#endif // _di_f_console_symbol_s_ /** * Create some standard command line parameter options required/expected by the kevux/fss/fll specifications. @@ -93,7 +92,7 @@ extern "C" { * - In the case of "status_out" the environment variable is being written to, which means that it should store the status this program exits with. * - To avoid problems with the status code after a program is forcibly killed, the status_out environment variable should be cleared at program start. */ -#ifndef _di_f_standard_console_parameters_ +#ifndef _di_f_console_standard_s_ #define f_console_standard_short_dark "d" #define f_console_standard_short_debug "D" #define f_console_standard_short_help "h" @@ -141,7 +140,31 @@ extern "C" { #define f_console_standard_long_status_out_length 10 #define f_console_standard_long_verbose_length 7 #define f_console_standard_long_version_length 7 -#endif // _di_f_standard_console_parameters_ + + extern const f_string_t f_console_standard_short_dark_s; + extern const f_string_t f_console_standard_short_debug_s; + extern const f_string_t f_console_standard_short_help_s; + extern const f_string_t f_console_standard_short_light_s; + extern const f_string_t f_console_standard_short_no_color_s; + extern const f_string_t f_console_standard_short_normal_s; + extern const f_string_t f_console_standard_short_quiet_s; + extern const f_string_t f_console_standard_short_status_in_s; + extern const f_string_t f_console_standard_short_status_out_s; + extern const f_string_t f_console_standard_short_verbose_s; + extern const f_string_t f_console_standard_short_version_s; + + extern const f_string_t f_console_standard_long_dark_s; + extern const f_string_t f_console_standard_long_debug_s; + extern const f_string_t f_console_standard_long_help_s; + extern const f_string_t f_console_standard_long_light_s; + extern const f_string_t f_console_standard_long_no_color_s; + extern const f_string_t f_console_standard_long_normal_s; + extern const f_string_t f_console_standard_long_quiet_s; + extern const f_string_t f_console_standard_long_status_in_s; + extern const f_string_t f_console_standard_long_status_out_s; + extern const f_string_t f_console_standard_long_verbose_s; + extern const f_string_t f_console_standard_long_version_s; +#endif // _di_f_console_standard_s_ /** * The maximum size for a single parameter. @@ -151,15 +174,6 @@ extern "C" { #endif // _di_f_console_length_size_ /** - * Provide a default allocation step. - * - * For a UTF-8 friendly allocation step, set to at least 4. - */ -#ifndef _di_f_console_default_allocation_step_ - #define f_console_default_allocation_step 4 -#endif // _di_f_console_default_allocation_step_ - -/** * Provide console type enumerations: * * - none: parameter not found. diff --git a/level_0/f_console/c/console.c b/level_0/f_console/c/console.c index ba2620e..3b006e7 100644 --- a/level_0/f_console/c/console.c +++ b/level_0/f_console/c/console.c @@ -17,9 +17,9 @@ extern "C" { return F_data_not; } - if (input[0] == f_console_symbol_enable) { + if (input[0] == f_console_symbol_short_enable_s[0]) { if (length > 1) { - if (input[1] == f_console_symbol_enable) { + if (input[1] == f_console_symbol_short_enable_s[0]) { if (length > 2) { *result = f_console_long_enable; } @@ -29,9 +29,9 @@ extern "C" { } else *result = f_console_empty_short_enable; } - else if (input[0] == f_console_symbol_disable) { + else if (input[0] == f_console_symbol_short_disable_s[0]) { if (length > 1) { - if (input[1] == f_console_symbol_disable) { + if (input[1] == f_console_symbol_short_disable_s[0]) { if (length > 2) { *result = f_console_long_disable; } @@ -82,7 +82,7 @@ extern "C" { i = needs_value.array[0]; if (parameters.parameter[i].values.used + 1 > parameters.parameter[i].values.size) { - f_macro_array_lengths_t_resize(status, parameters.parameter[i].values, parameters.parameter[i].values.size + f_console_default_allocation_step); + f_macro_array_lengths_t_resize(status, parameters.parameter[i].values, parameters.parameter[i].values.size + f_memory_default_allocation_step); if (F_status_is_error(status)) { f_macro_string_lengths_t_delete_simple(needs_value); @@ -199,7 +199,7 @@ extern "C" { } if (parameters.parameter[i].locations.used + 1 > parameters.parameter[i].locations.size) { - f_macro_string_lengths_t_resize(status, parameters.parameter[i].locations, parameters.parameter[i].locations.size + f_console_default_allocation_step); + f_macro_string_lengths_t_resize(status, parameters.parameter[i].locations, parameters.parameter[i].locations.size + f_memory_default_allocation_step); if (F_status_is_error(status)) { f_macro_string_lengths_t_delete_simple(needs_value); @@ -208,7 +208,7 @@ extern "C" { } if (parameters.parameter[i].locations_sub.used == parameters.parameter[i].locations_sub.size) { - f_macro_string_lengths_t_resize(status, parameters.parameter[i].locations_sub, parameters.parameter[i].locations_sub.size + f_console_default_allocation_step); + f_macro_string_lengths_t_resize(status, parameters.parameter[i].locations_sub, parameters.parameter[i].locations_sub.size + f_memory_default_allocation_step); if (F_status_is_error(status)) { f_macro_string_lengths_t_delete_simple(needs_value); @@ -263,7 +263,7 @@ extern "C" { if (strncmp(arguments.argv[location], parameters.parameter[i].symbol_other, argument_length + 1) != 0) continue; if (parameters.parameter[i].locations.used == parameters.parameter[i].locations.size) { - f_macro_string_lengths_t_resize(status, parameters.parameter[i].locations, parameters.parameter[i].locations.size + f_console_default_allocation_step); + f_macro_string_lengths_t_resize(status, parameters.parameter[i].locations, parameters.parameter[i].locations.size + f_memory_default_allocation_step); if (F_status_is_error(status)) { f_macro_string_lengths_t_delete_simple(needs_value); @@ -272,7 +272,7 @@ extern "C" { } if (parameters.parameter[i].locations_sub.used == parameters.parameter[i].locations_sub.size) { - f_macro_string_lengths_t_resize(status, parameters.parameter[i].locations_sub, parameters.parameter[i].locations_sub.size + f_console_default_allocation_step); + f_macro_string_lengths_t_resize(status, parameters.parameter[i].locations_sub, parameters.parameter[i].locations_sub.size + f_memory_default_allocation_step); if (F_status_is_error(status)) { f_macro_string_lengths_t_delete_simple(needs_value); @@ -310,7 +310,7 @@ extern "C" { // populate list of remaining parameters.parameter not associated with anything. if (remaining->used == remaining->size) { - f_macro_memory_structure_macro_increment(status, (*remaining), 1, f_console_default_allocation_step, f_macro_string_lengths_t_resize, F_array_too_large); + f_macro_memory_structure_macro_increment(status, (*remaining), 1, f_memory_default_allocation_step, f_macro_string_lengths_t_resize, F_array_too_large); if (F_status_is_error(status)) { f_macro_string_lengths_t_delete_simple(needs_value); return status; diff --git a/level_0/f_console/c/console.h b/level_0/f_console/c/console.h index 5914581..d09d102 100644 --- a/level_0/f_console/c/console.h +++ b/level_0/f_console/c/console.h @@ -39,7 +39,6 @@ extern "C" { * @return * F_none on success. * F_data_not the input string is empty. - * F_memory_reallocation (with error bit) on memory reallocation error. */ #ifndef _di_f_console_identify_ extern f_status_t f_console_identify(const f_string_t input, f_console_id_t *result); @@ -83,7 +82,6 @@ extern "C" { * F_failure (with error bit) if width is not long enough to convert when processing arguments as UTF-8. * F_parameter (with error bit) if a parameter is invalid. * F_utf (with error bit) if character is an invalid UTF-8 character, when processing arguments. - * F_memory_reallocation (with error bit) on memory reallocation error. */ #ifndef _di_f_console_parameter_process_ extern f_status_t f_console_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t parameters, f_string_lengths_t *remaining); diff --git a/level_0/f_console/data/build/settings b/level_0/f_console/data/build/settings index c60e43e..4dbf60e 100644 --- a/level_0/f_console/data/build/settings +++ b/level_0/f_console/data/build/settings @@ -19,8 +19,8 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lf_memory -lf_utf -build_sources_library console.c +build_libraries-individual -lf_memory -lf_string -lf_utf +build_sources_library console.c console-common.c build_sources_program build_sources_headers console.h console-common.h build_sources_script diff --git a/level_0/f_control_group/c/control_group-common.c b/level_0/f_control_group/c/control_group-common.c new file mode 100644 index 0000000..030a74f --- /dev/null +++ b/level_0/f_control_group/c/control_group-common.c @@ -0,0 +1,15 @@ +#include "control_group.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_fl_control_group_defines_ + const f_string_t f_control_group_path_system_default_s = f_control_group_path_system_default; + const f_string_t f_control_group_path_system_prefix_s = f_control_group_path_system_prefix; + const f_string_t f_control_group_path_system_suffix_s = f_control_group_path_system_suffix; +#endif // _di_fl_control_group_defines_ + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_0/f_control_group/c/control_group-common.h b/level_0/f_control_group/c/control_group-common.h index 95f0f6d..b21933c 100644 --- a/level_0/f_control_group/c/control_group-common.h +++ b/level_0/f_control_group/c/control_group-common.h @@ -30,9 +30,9 @@ extern "C" { #define f_control_group_pid_length_max 64 - const static f_string_t f_control_group_path_system_default_s = f_control_group_path_system_default; - const static f_string_t f_control_group_path_system_prefix_s = f_control_group_path_system_prefix; - const static f_string_t f_control_group_path_system_suffix_s = f_control_group_path_system_suffix; + extern const f_string_t f_control_group_path_system_default_s; + extern const f_string_t f_control_group_path_system_prefix_s; + extern const f_string_t f_control_group_path_system_suffix_s; #endif // _di_fl_control_group_defines_ /** diff --git a/level_0/f_control_group/c/control_group.c b/level_0/f_control_group/c/control_group.c new file mode 100644 index 0000000..8139d7f --- /dev/null +++ b/level_0/f_control_group/c/control_group.c @@ -0,0 +1,9 @@ +#include "control_group.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_0/f_control_group/data/build/settings b/level_0/f_control_group/data/build/settings index 6523f94..1d5dd0c 100644 --- a/level_0/f_control_group/data/build/settings +++ b/level_0/f_control_group/data/build/settings @@ -19,8 +19,8 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lf_memory -build_sources_library +build_libraries-individual -lf_memory -lf_string +build_sources_library control_group.c control_group-common.c build_sources_program build_sources_headers control_group.h control_group-common.h build_sources_script diff --git a/level_0/f_conversion/c/conversion.c b/level_0/f_conversion/c/conversion.c index 89150fa..8508679 100644 --- a/level_0/f_conversion/c/conversion.c +++ b/level_0/f_conversion/c/conversion.c @@ -217,7 +217,7 @@ extern "C" { f_macro_string_dynamic_t_resize(status, (*destination), destination->used + 2); if (F_status_is_error(status)) return status; - destination->string[destination->used] = '0'; + destination->string[destination->used] = f_string_ascii_0_s[0]; destination->string[destination->used + 1] = 0; destination->used += 2; @@ -251,7 +251,7 @@ extern "C" { f_number_unsigned_t power = 1; if (negative) { - destination->string[destination->used] = '-'; + destination->string[destination->used] = f_string_ascii_minus_s[0]; destination->used++; } @@ -266,52 +266,52 @@ extern "C" { switch (work) { case 0: - destination->string[destination->used] = '0'; + destination->string[destination->used] = f_string_ascii_0_s[0]; break; case 1: - destination->string[destination->used] = '1'; + destination->string[destination->used] = f_string_ascii_1_s[0]; break; case 2: - destination->string[destination->used] = '2'; + destination->string[destination->used] = f_string_ascii_2_s[0]; break; case 3: - destination->string[destination->used] = '3'; + destination->string[destination->used] = f_string_ascii_3_s[0]; break; case 4: - destination->string[destination->used] = '4'; + destination->string[destination->used] = f_string_ascii_4_s[0]; break; case 5: - destination->string[destination->used] = '5'; + destination->string[destination->used] = f_string_ascii_5_s[0]; break; case 6: - destination->string[destination->used] = '6'; + destination->string[destination->used] = f_string_ascii_6_s[0]; break; case 7: - destination->string[destination->used] = '7'; + destination->string[destination->used] = f_string_ascii_7_s[0]; break; case 8: - destination->string[destination->used] = '8'; + destination->string[destination->used] = f_string_ascii_8_s[0]; break; case 9: - destination->string[destination->used] = '9'; + destination->string[destination->used] = f_string_ascii_9_s[0]; break; case 10: - destination->string[destination->used] = 'a'; + destination->string[destination->used] = f_string_ascii_a_s[0]; break; case 11: - destination->string[destination->used] = 'b'; + destination->string[destination->used] = f_string_ascii_b_s[0]; break; case 12: - destination->string[destination->used] = 'c'; + destination->string[destination->used] = f_string_ascii_c_s[0]; break; case 13: - destination->string[destination->used] = 'd'; + destination->string[destination->used] = f_string_ascii_d_s[0]; break; case 14: - destination->string[destination->used] = 'e'; + destination->string[destination->used] = f_string_ascii_e_s[0]; break; case 15: - destination->string[destination->used] = 'f'; + destination->string[destination->used] = f_string_ascii_f_s[0]; break; } @@ -338,7 +338,7 @@ extern "C" { f_macro_string_dynamic_t_resize(status, (*destination), destination->used + 2); if (F_status_is_error(status)) return status; - destination->string[destination->used] = '0'; + destination->string[destination->used] = f_string_ascii_0_s[0]; destination->string[destination->used + 1] = 0; destination->used += 2; @@ -369,52 +369,52 @@ extern "C" { switch (work) { case 0: - destination->string[destination->used] = '0'; + destination->string[destination->used] = f_string_ascii_0_s[0]; break; case 1: - destination->string[destination->used] = '1'; + destination->string[destination->used] = f_string_ascii_1_s[0]; break; case 2: - destination->string[destination->used] = '2'; + destination->string[destination->used] = f_string_ascii_2_s[0]; break; case 3: - destination->string[destination->used] = '3'; + destination->string[destination->used] = f_string_ascii_3_s[0]; break; case 4: - destination->string[destination->used] = '4'; + destination->string[destination->used] = f_string_ascii_4_s[0]; break; case 5: - destination->string[destination->used] = '5'; + destination->string[destination->used] = f_string_ascii_5_s[0]; break; case 6: - destination->string[destination->used] = '6'; + destination->string[destination->used] = f_string_ascii_6_s[0]; break; case 7: - destination->string[destination->used] = '7'; + destination->string[destination->used] = f_string_ascii_7_s[0]; break; case 8: - destination->string[destination->used] = '8'; + destination->string[destination->used] = f_string_ascii_8_s[0]; break; case 9: - destination->string[destination->used] = '9'; + destination->string[destination->used] = f_string_ascii_9_s[0]; break; case 10: - destination->string[destination->used] = 'a'; + destination->string[destination->used] = f_string_ascii_a_s[0]; break; case 11: - destination->string[destination->used] = 'b'; + destination->string[destination->used] = f_string_ascii_b_s[0]; break; case 12: - destination->string[destination->used] = 'c'; + destination->string[destination->used] = f_string_ascii_c_s[0]; break; case 13: - destination->string[destination->used] = 'd'; + destination->string[destination->used] = f_string_ascii_d_s[0]; break; case 14: - destination->string[destination->used] = 'e'; + destination->string[destination->used] = f_string_ascii_e_s[0]; break; case 15: - destination->string[destination->used] = 'f'; + destination->string[destination->used] = f_string_ascii_f_s[0]; break; } diff --git a/level_0/f_conversion/data/build/settings b/level_0/f_conversion/data/build/settings index fff2386..3c9df3a 100644 --- a/level_0/f_conversion/data/build/settings +++ b/level_0/f_conversion/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lf_memory -lf_utf +build_libraries-individual -lf_memory -lf_string -lf_utf build_sources_library conversion.c build_sources_program build_sources_headers conversion.h conversion-common.h diff --git a/level_0/f_directory/c/directory.c b/level_0/f_directory/c/directory.c index cf8d7b3..a4d5d64 100644 --- a/level_0/f_directory/c/directory.c +++ b/level_0/f_directory/c/directory.c @@ -137,7 +137,7 @@ extern "C" { const size_t length = scandir(path, &listing, filter, sort); if (length == -1) { - if (errno == ENOMEM) return F_status_set_error(F_memory_allocation); + if (errno == ENOMEM) return F_status_set_error(F_memory_not); else return F_status_set_error(F_failure); } diff --git a/level_0/f_directory/c/directory.h b/level_0/f_directory/c/directory.h index 27cae00..8a83666 100644 --- a/level_0/f_directory/c/directory.h +++ b/level_0/f_directory/c/directory.h @@ -232,7 +232,7 @@ extern "C" { * F_data_not if directory is empty. * F_array_too_large (with error bit) if the directory buffer max length would be exceeded. * F_failure (with error bit) if failed to read directory information. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * * @see alphasort() diff --git a/level_0/f_directory/c/directory_type.h b/level_0/f_directory/c/directory_type.h index 53f77b2..32c6ea4 100644 --- a/level_0/f_directory/c/directory_type.h +++ b/level_0/f_directory/c/directory_type.h @@ -111,14 +111,14 @@ extern "C" { #define f_macro_directory_status_t_new(status, statuses, length) f_macro_string_dynamic_t_new(status, statuses.path, length) + #define f_macro_directory_status_t_resize(status, statuses, new_length) f_macro_string_dynamic_t_resize(status, statuses.path, new_length) + #define f_macro_directory_status_t_adjust(status, statuses, new_length) f_macro_string_dynamic_t_adjust(status, statuses.path, new_length) + #define f_macro_directory_status_t_delete(status, statuses) f_macro_string_dynamic_t_delete(status, statuses.path) #define f_macro_directory_status_t_destroy(status, statuses) f_macro_string_dynamic_t_destroy(status, statuses.path) #define f_macro_directory_status_t_delete_simple(statuses) f_macro_string_dynamic_t_delete_simple(statuses.path) #define f_macro_directory_status_t_destroy_simple(statuses) f_macro_string_dynamic_t_destroy_simple(statuses.path) - - #define f_macro_directory_status_t_resize(status, statuses, new_length) f_macro_string_dynamic_t_resize(status, statuses.path, new_length) - #define f_macro_directory_status_t_adjust(status, statuses, new_length) f_macro_string_dynamic_t_adjust(status, statuses.path, new_length) #endif // _di_f_directory_status_t_ /** @@ -137,9 +137,37 @@ extern "C" { #define f_directory_statuss_t_initialize { 0, 0, 0 } - #define f_macro_directory_statuss_t_clear(structures) f_macro_memory_structures_t_clear(structures) + #define f_macro_directory_statuss_t_clear(structures) f_macro_memory_structures_clear(structures) - #define f_macro_directory_statuss_t_new(status, structures, length) f_macro_memory_structures_t_new(status, structures, f_directory_status_t, length) + #define f_macro_directory_statuss_t_new(status, structures, length) f_macro_memory_structures_new(status, structures, f_directory_status_t, length) + + #define f_macro_directory_statuss_t_resize(status, structures, new_length) \ + status = F_none; \ + if (new_length < structures.size) { \ + for (register f_array_length_t _macro__i = structures.size - new_length; _macro__i < structures.size; ++_macro__i) { \ + f_macro_directory_status_t_delete(status, structures.array[_macro__i]); \ + if (status != F_none) break; \ + } \ + } \ + if (status == F_none) status = f_memory_resize((void **) & structures.array, sizeof(f_directory_status_t), structures.size, new_length); \ + if (status == F_none) { \ + structures.size = new_length; \ + if (structures.used > structures.size) structures.used = new_length; \ + } + + #define f_macro_directory_statuss_t_adjust(status, structures, new_length) \ + status = F_none; \ + if (new_length < structures.size) { \ + for (register f_array_length_t _macro__i = structures.size - new_length; _macro__i < structures.size; ++_macro__i) { \ + f_macro_directory_status_t_destroy(status, structures.array[_macro__i]); \ + if (status != F_none) break; \ + } \ + } \ + if (status == F_none) status = f_memory_adjust((void **) & structures.array, sizeof(f_directory_status_t), structures.size, new_length); \ + if (status == F_none) { \ + structures.size = new_length; \ + if (structures.used > structures.size) structures.used = new_length; \ + } #define f_macro_directory_statuss_t_delete(status, structures) \ status = F_none; \ @@ -186,34 +214,6 @@ extern "C" { structures.size = 0; \ } \ } - - #define f_macro_directory_statuss_t_resize(status, structures, new_length) \ - status = F_none; \ - if (new_length < structures.size) { \ - for (f_array_length_t _macro__i = structures.size - new_length; _macro__i < structures.size; _macro__i++) { \ - f_macro_directory_status_t_delete(status, structures.array[_macro__i]); \ - if (status != F_none) break; \ - } \ - } \ - if (status == F_none) status = f_memory_resize((void **) & structures.array, sizeof(f_directory_status_t), structures.size, new_length); \ - if (status == F_none) { \ - structures.size = new_length; \ - if (structures.used > structures.size) structures.used = new_length; \ - } - - #define f_macro_directory_statuss_t_adjust(status, structures, new_length) \ - status = F_none; \ - if (new_length < structures.size) { \ - for (f_array_length_t _macro__i = structures.size - new_length; _macro__i < structures.size; _macro__i++) { \ - f_macro_directory_status_t_destroy(status, structures.array[_macro__i]); \ - if (status != F_none) break; \ - } \ - } \ - if (status == F_none) status = f_memory_adjust((void **) & structures.array, sizeof(f_directory_status_t), structures.size, new_length); \ - if (status == F_none) { \ - structures.size = new_length; \ - if (structures.used > structures.size) structures.used = new_length; \ - } #endif // _di_f_directory_statuss_t_ #ifdef __cplusplus diff --git a/level_0/f_directory/data/build/settings b/level_0/f_directory/data/build/settings index 9c51aff..9f53c5f 100644 --- a/level_0/f_directory/data/build/settings +++ b/level_0/f_directory/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lf_memory +build_libraries-individual -lf_memory -lf_string build_sources_library directory.c private-directory.c build_sources_program build_sources_headers directory.h directory_type.h directory-common.h diff --git a/level_0/f_environment/c/environment.h b/level_0/f_environment/c/environment.h index 24e37a6..0f7744a 100644 --- a/level_0/f_environment/c/environment.h +++ b/level_0/f_environment/c/environment.h @@ -82,7 +82,7 @@ extern "C" { * @return * F_none on success. * F_exist_not if name does not exist. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if appended string length is too large to store in the buffer. * @@ -110,7 +110,7 @@ extern "C" { * F_none on success. * F_data_not if name.used is 0. * F_exist_not if name does not exist. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if appended string length is too large to store in the buffer. * diff --git a/level_0/f_environment/c/private-environment.h b/level_0/f_environment/c/private-environment.h index 3e94750..e94d913 100644 --- a/level_0/f_environment/c/private-environment.h +++ b/level_0/f_environment/c/private-environment.h @@ -31,7 +31,7 @@ extern "C" { * @return * F_none on success. * F_exist_not if name does not exist. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_string_too_large (with error bit) if appended string length is too large to store in the buffer. * * @see f_environment_get() diff --git a/level_0/f_environment/data/build/settings b/level_0/f_environment/data/build/settings index d75807e..4c2b482 100644 --- a/level_0/f_environment/data/build/settings +++ b/level_0/f_environment/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lf_memory +build_libraries-individual -lf_memory -lf_string build_sources_library environment.c private-environment.c build_sources_program build_sources_headers environment.h environment-common.h diff --git a/level_0/f_execute/data/build/settings b/level_0/f_execute/data/build/settings index 0df1771..23cbbe1 100644 --- a/level_0/f_execute/data/build/settings +++ b/level_0/f_execute/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lf_memory +build_libraries-individual -lf_memory -lf_string build_sources_library build_sources_program build_sources_headers execute.h execute-common.h diff --git a/level_0/f_file/c/file-common.c b/level_0/f_file/c/file-common.c new file mode 100644 index 0000000..bf3b27c --- /dev/null +++ b/level_0/f_file/c/file-common.c @@ -0,0 +1,26 @@ +#include "file.h" +#include "private-file.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_f_file_type_ + const f_string_t f_file_type_name_blocks = f_file_type_name_block; + const f_string_t f_file_type_name_character_s = f_file_type_name_character; + const f_string_t f_file_type_name_directory_s = f_file_type_name_directory; + const f_string_t f_file_type_name_link_s = f_file_type_name_link; + const f_string_t f_file_type_name_regular_s = f_file_type_name_regular; + const f_string_t f_file_type_name_socket_s = f_file_type_name_socket; + + const f_string_t f_file_open_mode_append_s = f_macro_file_open_mode_append; + const f_string_t f_file_open_mode_read_s = f_macro_file_open_mode_read; + const f_string_t f_file_open_mode_read_append_s = f_macro_file_open_mode_read_append; + const f_string_t f_file_open_mode_read_truncate_s = f_macro_file_open_mode_read_truncate; + const f_string_t f_file_open_mode_read_write_s = f_macro_file_open_mode_read_write; + const f_string_t f_file_open_mode_truncate_s = f_macro_file_open_mode_truncate; +#endif // _di_f_file_type_ + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_0/f_file/c/file-common.h b/level_0/f_file/c/file-common.h index 5350e5d..63bbb10 100644 --- a/level_0/f_file/c/file-common.h +++ b/level_0/f_file/c/file-common.h @@ -92,8 +92,26 @@ extern "C" { #define f_macro_file_open_mode_read_write "r+" #define f_macro_file_open_mode_truncate "w" - // @todo consider adding the following for the different strings in this project. - //static char * const f_file_open_mode_append_s = f_macro_file_open_mode_append; + #define f_macro_file_open_mode_append_length 1 + #define f_macro_file_open_mode_read_length 1 + #define f_macro_file_open_mode_read_append_length 2 + #define f_macro_file_open_mode_read_truncate_length 2 + #define f_macro_file_open_mode_read_write_length 2 + #define f_macro_file_open_mode_truncate_length 1 + + extern const f_string_t f_file_type_name_blocks; + extern const f_string_t f_file_type_name_character_s; + extern const f_string_t f_file_type_name_directory_s; + extern const f_string_t f_file_type_name_link_s; + extern const f_string_t f_file_type_name_regular_s; + extern const f_string_t f_file_type_name_socket_s; + + extern const f_string_t f_file_open_mode_append_s; + extern const f_string_t f_file_open_mode_read_s; + extern const f_string_t f_file_open_mode_read_append_s; + extern const f_string_t f_file_open_mode_read_truncate_s; + extern const f_string_t f_file_open_mode_read_write_s; + extern const f_string_t f_file_open_mode_truncate_s; #endif // _di_f_file_type_ /** diff --git a/level_0/f_file/c/file.c b/level_0/f_file/c/file.c index 5df1a57..2638c49 100644 --- a/level_0/f_file/c/file.c +++ b/level_0/f_file/c/file.c @@ -864,57 +864,26 @@ extern "C" { *mode = 0; *replace = 0; - switch (string[0]) { - case '+': - case '-': - case '=': - switch (string[1]) { - case 'r': - case 'w': - case 'x': - case 'X': - case 's': - case 't': - syntax = 1; - break; - - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - syntax = 2; - break; - - default: - return F_status_set_error(F_syntax); - } + if (string[0] == f_string_ascii_plus_s[0] || string[0] == f_string_ascii_minus_s[0] || string[0] == f_string_ascii_equal_s[0]) { - break; - - case 'u': - case 'g': - case 'o': - case 'a': + if (string[1] == f_string_ascii_r_s[0] || f_string_ascii_w_s[0] || f_string_ascii_x_s[0] || f_string_ascii_X_s[0] || f_string_ascii_s_s[0] ||f_string_ascii_t_s[0]) { syntax = 1; - break; - - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': + } + else if (string[1] == f_string_ascii_0_s[0] || string[1] == f_string_ascii_1_s[0] || string[1] == f_string_ascii_2_s[0] || string[1] == f_string_ascii_3_s[0] || string[1] == f_string_ascii_4_s[0] || string[1] == f_string_ascii_5_s[0] || string[1] == f_string_ascii_6_s[0] || string[1] == f_string_ascii_7_s[0]) { syntax = 2; - break; - - default: + } + else { return F_status_set_error(F_syntax); + } + } + else if (string[0] == f_string_ascii_u_s[0] || string[0] == f_string_ascii_g_s[0] || string[0] == f_string_ascii_i_s[0] || string[0] == f_string_ascii_a_s[0]) { + syntax = 1; + } + else if (string[0] == f_string_ascii_0_s[0] || string[0] == f_string_ascii_1_s[0] || string[0] == f_string_ascii_2_s[0] || string[0] == f_string_ascii_3_s[0] || string[0] == f_string_ascii_4_s[0] || string[0] == f_string_ascii_5_s[0] || string[0] == f_string_ascii_6_s[0] || string[0] == f_string_ascii_7_s[0]) { + syntax = 2; + } + else { + return F_status_set_error(F_syntax); } if (syntax == 1) { @@ -976,136 +945,127 @@ extern "C" { for (f_string_length_t i = 0; syntax && string[i]; i++) { - switch (string[i]) { - case 'o': - on |= 1; - mode_mask |= f_file_mode_t_block_world; - break; - - case 'g': - on |= 2; - mode_mask |= f_file_mode_t_block_group; - break; + if (string[i] == f_string_ascii_o_s[0]) { + on |= 1; + mode_mask |= f_file_mode_t_block_world; + } + else if (string[i] == f_string_ascii_g_s[0]) { + on |= 2; + mode_mask |= f_file_mode_t_block_group; + } + else if (string[i] == f_string_ascii_u_s[0]) { + on |= 4; + mode_mask |= f_file_mode_t_block_owner; + } + else if (string[i] == f_string_ascii_a_s[0]) { + on = 7; + mode_mask = f_file_mode_t_block_standard; + } + else if (string[i] == f_string_ascii_plus_s[0] || string[i] == f_string_ascii_minus_s[0] || string[i] == f_string_ascii_equal_s[0]) { + if (string[i] == f_string_ascii_plus_s[0]) { + how = on ? 1 : 4; + } + else if (string[i] == f_string_ascii_minus_s[0]) { + how = on ? 3 : 6; + } + else { + how = on ? 2 : 5; - case 'u': - on |= 4; - mode_mask |= f_file_mode_t_block_owner; - break; + // clear by mask to prepare for replacement, which includes clearing the special block. + mode_mask |= f_file_mode_t_block_special; + *mode -= (*mode) & mode_mask; - case 'a': - on = 7; - mode_mask = f_file_mode_t_block_standard; - break; + *replace |= f_file_mode_t_replace_special; - case '+': - case '-': - case '=': - if (string[i] == '+') { - how = on ? 1 : 4; - } - else if (string[i] == '-') { - how = on ? 3 : 6; + if (mode_mask & f_file_mode_t_block_owner) { + *replace |= f_file_mode_t_replace_owner; } - else { - how = on ? 2 : 5; - // clear by mask to prepare for replacement, which includes clearing the special block. - mode_mask |= f_file_mode_t_block_special; - *mode -= (*mode) & mode_mask; + if (mode_mask & f_file_mode_t_block_group) { + *replace |= f_file_mode_t_replace_group; + } - *replace |= f_file_mode_t_replace_special; + if (mode_mask & f_file_mode_t_block_world) { + *replace |= f_file_mode_t_replace_world; + } + } - if (mode_mask & f_file_mode_t_block_owner) { - *replace |= f_file_mode_t_replace_owner; - } + if (!on) { + on = 7; + mode_mask = f_file_mode_t_block_all; + } - if (mode_mask & f_file_mode_t_block_group) { - *replace |= f_file_mode_t_replace_group; - } + for (i++; string[i]; i++) { - if (mode_mask & f_file_mode_t_block_world) { - *replace |= f_file_mode_t_replace_world; - } + if (string[i] == f_string_ascii_r_s[0]) { + what = f_file_mode_t_mask_bit_read; } - - if (!on) { - on = 7; - mode_mask = f_file_mode_t_block_all; + else if (string[i] == f_string_ascii_w_s[0]) { + what = f_file_mode_t_mask_bit_write; } + else if (string[i] == f_string_ascii_x_s[0]) { + what = f_file_mode_t_mask_bit_execute; + } + else if (string[i] == f_string_ascii_X_s[0]) { + what = f_file_mode_t_mask_bit_execute_only; + } + else if (string[i] == f_string_ascii_s_s[0]) { + mode_mask |= f_file_mode_t_block_special; - for (i++; string[i]; i++) { - - if (string[i] == 'r') { - what = f_file_mode_t_mask_bit_read; - } - else if (string[i] == 'w') { - what = f_file_mode_t_mask_bit_write; + if (on & 4) { + what = f_file_mode_t_mask_bit_set_owner; } - else if (string[i] == 'x') { - what = f_file_mode_t_mask_bit_execute; - } - else if (string[i] == 'X') { - what = f_file_mode_t_mask_bit_execute_only; - } - else if (string[i] == 's') { - mode_mask |= f_file_mode_t_block_special; - - if (on & 4) { - what = f_file_mode_t_mask_bit_set_owner; - } - else if (on & 2) { - what = f_file_mode_t_mask_bit_set_group; - } - else { - what = 0; - } - } - else if (string[i] == 't') { - mode_mask |= f_file_mode_t_block_special; - - if (on & 1) { - what = f_file_mode_t_mask_bit_sticky; - } - else { - what = 0; - } - } - else if (string[i] == ',') { - if (how > 3) { - *mode -= *mode & mode_umask; - } - - on = 0; - how = 0; - mode_mask = 0; - break; + else if (on & 2) { + what = f_file_mode_t_mask_bit_set_group; } else { - syntax = 0; - break; + what = 0; } + } + else if (string[i] == f_string_ascii_t_s[0]) { + mode_mask |= f_file_mode_t_block_special; - if (how == 1 || how == 2 || how == 4 || how == 5) { - *mode |= what & mode_mask & f_file_mode_t_mask_how_add; + if (on & 1) { + what = f_file_mode_t_mask_bit_sticky; } - else if (how == 3 || how == 6) { - *mode |= what & mode_mask & f_file_mode_t_mask_how_subtract; + else { + what = 0; + } + } + else if (string[i] == f_string_ascii_comma_s[0]) { + if (how > 3) { + *mode -= *mode & mode_umask; } - } // for - if (how > 3) { - *mode -= *mode & mode_umask; + on = 0; + how = 0; + mode_mask = 0; + break; + } + else { + syntax = 0; + break; } - break; + if (how == 1 || how == 2 || how == 4 || how == 5) { + *mode |= what & mode_mask & f_file_mode_t_mask_how_add; + } + else if (how == 3 || how == 6) { + *mode |= what & mode_mask & f_file_mode_t_mask_how_subtract; + } + } // for - default: - syntax = 0; - break; + if (how > 3) { + *mode -= *mode & mode_umask; + } + } + else { + syntax = 0; } } // for } else if (syntax == 2) { + // 1 = add, 2 = replace, 3 = subtract. uint8_t how = 0; @@ -1113,15 +1073,15 @@ extern "C" { *replace = 0; - if (string[0] == '+') { + if (string[0] == f_string_ascii_plus_s[0]) { how = 1; i = 1; } - else if (string[0] == '-') { + else if (string[0] == f_string_ascii_minus_s[0]) { how = 3; i = 1; } - else if (string[0] == '=') { + else if (string[0] == f_string_ascii_equal_s[0]) { how = 2; i = 1; @@ -1133,8 +1093,8 @@ extern "C" { *replace = f_file_mode_t_replace_standard | f_file_mode_t_replace_directory; } - if (string[i] == '0') { - for (; string[i] == '0'; i++) { + if (string[i] == f_string_ascii_0_s[0]) { + for (; string[i] == f_string_ascii_0_s[0]; ++i) { // seek past leading '0's. } // for } @@ -1148,32 +1108,24 @@ extern "C" { *mode <<= 8; } - switch (string[i]) { - case '0': - // already is a zero. - break; - - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - // this assumes ASCII/UTF-8. - if (how == 3) { - *mode |= (string[i + j] - 0x30) << 4; - } - else { - *mode |= string[i + j] - 0x30; - } + if (string[i] == f_string_ascii_0_s[0]) { + // already is a zero. + } + else if (string[i] == f_string_ascii_1_s[0] || string[i] == f_string_ascii_2_s[0] || string[i] == f_string_ascii_3_s[0] || string[i] == f_string_ascii_4_s[0] || string[i] == f_string_ascii_5_s[0] || string[i] == f_string_ascii_6_s[0] || string[i] == f_string_ascii_7_s[0]) { - break; + // this assumes ASCII/UTF-8. + if (how == 3) { + *mode |= (string[i + j] - 0x30) << 4; + } + else { + *mode |= string[i + j] - 0x30; + } + } + else { - default: - // designate that this is invalid. - j = 4; - break; + // designate that this is invalid. + j = 4; + break; } } // for diff --git a/level_0/f_file/c/file.h b/level_0/f_file/c/file.h index ef9e9e8..e4a09b3 100644 --- a/level_0/f_file/c/file.h +++ b/level_0/f_file/c/file.h @@ -1159,7 +1159,7 @@ extern "C" { * * @return * F_none on success. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if string is too large to store in the buffer. * @@ -1183,7 +1183,7 @@ extern "C" { * * @return * F_none on success. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if string is too large to store in the buffer. * diff --git a/level_0/f_file/c/private-file.c b/level_0/f_file/c/private-file.c index 5f68331..f90491c 100644 --- a/level_0/f_file/c/private-file.c +++ b/level_0/f_file/c/private-file.c @@ -727,26 +727,26 @@ extern "C" { if (flag & f_file_flag_read_write) { if (flag & f_file_flag_truncate) { - return f_macro_file_open_mode_read_truncate; + return f_file_open_mode_read_truncate_s; } else if (flag & f_file_flag_append) { - return f_macro_file_open_mode_read_append; + return f_file_open_mode_read_append_s; } // failsafe to read write prepend. - return f_macro_file_open_mode_read_write; + return f_file_open_mode_read_write_s; } else if (flag & f_file_flag_write_only) { if (flag & f_file_flag_truncate) { - return f_macro_file_open_mode_truncate; + return f_file_open_mode_truncate_s; } // failsafe to append. - return f_macro_file_open_mode_append; + return f_file_open_mode_append_s; } // failsafe to read only. - return f_macro_file_open_mode_read; + return f_file_open_mode_read_s; } #endif // !defined(_di_f_file_stream_descriptor_) || !defined(_di_f_file_stream_open_) || !defined(_di_f_file_stream_reopen_) diff --git a/level_0/f_file/data/build/settings b/level_0/f_file/data/build/settings index 153e524..b82e705 100644 --- a/level_0/f_file/data/build/settings +++ b/level_0/f_file/data/build/settings @@ -19,8 +19,8 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lf_memory -build_sources_library file.c private-file.c +build_libraries-individual -lf_memory -lf_string +build_sources_library file.c file-common.c private-file.c build_sources_program build_sources_headers file.h file-common.h build_sources_script diff --git a/level_0/f_fss/c/fss-common.h b/level_0/f_fss/c/fss-common.h index 5106182..b3e4d03 100644 --- a/level_0/f_fss/c/fss-common.h +++ b/level_0/f_fss/c/fss-common.h @@ -20,18 +20,18 @@ extern "C" { * FSS-specific types. */ #ifndef _di_f_fss_types_t_ - const extern f_string_t f_fss_brace_left_s; - const extern f_string_t f_fss_brace_right_s; - const extern f_string_t f_fss_colon_s; - const extern f_string_t f_fss_dash_s; - const extern f_string_t f_fss_f_s; - const extern f_string_t f_fss_pound_s; - const extern f_string_t f_fss_quote_single_s; - const extern f_string_t f_fss_quote_double_s; - const extern f_string_t f_fss_s_s; - const extern f_string_t f_fss_slash_s; - const extern f_string_t f_fss_space_s; - const extern f_string_t f_fss_underscore_s; + extern const f_string_t f_fss_brace_left_s; + extern const f_string_t f_fss_brace_right_s; + extern const f_string_t f_fss_colon_s; + extern const f_string_t f_fss_dash_s; + extern const f_string_t f_fss_f_s; + extern const f_string_t f_fss_pound_s; + extern const f_string_t f_fss_quote_single_s; + extern const f_string_t f_fss_quote_double_s; + extern const f_string_t f_fss_s_s; + extern const f_string_t f_fss_slash_s; + extern const f_string_t f_fss_space_s; + extern const f_string_t f_fss_underscore_s; #define f_fss_comment f_fss_pound_s[0] #define f_fss_eol f_string_eol_s[0] @@ -61,7 +61,7 @@ extern "C" { #define f_fss_type_header_part5 f_fss_dash_s[0] #define f_fss_type_header_close f_string_eol_s[0] - typedef unsigned long f_fss_id_t; + typedef uint64_t f_fss_id_t; #endif // _di_f_fss_types_t_ /** @@ -182,18 +182,18 @@ extern "C" { #define f_fss_headers_initialize { 0, 0, 0 } - #define f_macro_fss_headers_clear(headers) f_macro_memory_structure_t_clear(headers) + #define f_macro_fss_headers_clear(headers) f_macro_memory_structure_clear(headers) - #define f_macro_fss_headers_new(status, headers, length) f_macro_memory_structure_t_new(status, headers, f_fss_header_t, length) + #define f_macro_fss_headers_new(status, headers, length) f_macro_memory_structure_new(status, headers, f_fss_header_t, length); - #define f_macro_fss_headers_delete(status, headers) f_macro_memory_structure_t_delete(status, headers, f_fss_header_t) - #define f_macro_fss_headers_destroy(status, headers) f_macro_memory_structure_t_destroy(status, headers, f_fss_header_t) + #define f_macro_fss_headers_resize(status, headers, length) f_macro_memory_structure_resize(status, headers, f_fss_header_t, length); + #define f_macro_fss_headers_adjust(status, headers, length) f_macro_memory_structure_adjust(status, headers, f_fss_header_t, length); - #define f_macro_fss_headers_delete_simple(headers) f_macro_memory_structure_t_delete_simple(headers, f_fss_header_t) - #define f_macro_fss_headers_destroy_simple(headers) f_macro_memory_structure_t_destroy_simple(headers, f_fss_header_t) + #define f_macro_fss_headers_delete(status, headers) f_macro_memory_structure_delete(status, headers, f_fss_header_t); + #define f_macro_fss_headers_destroy(status, headers) f_macro_memory_structure_destroy(status, headers, f_fss_header_t); - #define f_macro_fss_headers_resize(status, headers, new_length) f_macro_memory_structure_t_resize(status, headers, f_fss_header_t, new_length) - #define f_macro_fss_headers_adjust(status, headers, new_length) f_macro_memory_structure_t_adjust(status, headers, f_fss_header_t, new_length) + #define f_macro_fss_headers_delete_simple(headers) f_macro_memory_structure_delete_simple(headers, f_fss_header_t); + #define f_macro_fss_headers_destroy_simple(headers) f_macro_memory_structure_destroy_simple(headers, f_fss_header_t); #endif // _di_f_fss_headers_t_ /** @@ -204,7 +204,7 @@ extern "C" { #define f_fss_object_t_initialize f_string_range_t_initialize - #define f_macro_fss_object_t_clear(object) f_macro_string_range_t_clear(object) + #define f_macro_fss_object_t_clear(object) f_macro_string_range_t_clear(object); #endif // _di_fss_object_t_ /** @@ -219,18 +219,18 @@ extern "C" { #define f_fss_objects_t_initialize f_string_ranges_t_initialize - #define f_macro_fss_objects_t_clear(objects) f_macro_string_ranges_t_clear(objects) + #define f_macro_fss_objects_t_clear(objects) f_macro_string_ranges_t_clear(objects); - #define f_macro_fss_objects_t_new(status, objects, length) f_macro_string_ranges_t_new(status, objects, length) + #define f_macro_fss_objects_t_new(status, objects, length) f_macro_string_ranges_t_new(status, objects, length); - #define f_macro_fss_objects_t_delete(status, objects) f_macro_string_ranges_t_delete(status, objects) - #define f_macro_fss_objects_t_destroy(status, objects) f_macro_string_ranges_t_destroy(status, objects) + #define f_macro_fss_objects_t_resize(status, objects, length) f_macro_string_ranges_t_resize(status, objects, length); + #define f_macro_fss_objects_t_adjust(status, objects, length) f_macro_string_ranges_t_destroy(status, objects, length); - #define f_macro_fss_objects_t_delete_simple(objects) f_macro_string_ranges_t_delete_simple(objects) - #define f_macro_fss_objects_t_destroy_simple(objects) f_macro_string_ranges_t_destroy_simple(objects) + #define f_macro_fss_objects_t_delete(status, objects) f_macro_string_ranges_t_delete(status, objects); + #define f_macro_fss_objects_t_destroy(status, objects) f_macro_string_ranges_t_destroy(status, objects); - #define f_macro_fss_objects_t_resize(status, objects, new_length) f_macro_string_ranges_t_resize(status, objects, new_length) - #define f_macro_fss_objects_t_adjust(status, objects, new_length) f_macro_string_ranges_t_destroy(status, objects, new_length) + #define f_macro_fss_objects_t_delete_simple(objects) f_macro_string_ranges_t_delete_simple(objects); + #define f_macro_fss_objects_t_destroy_simple(objects) f_macro_string_ranges_t_destroy_simple(objects); #endif // _di_fss_objects_t_ /** @@ -247,18 +247,18 @@ extern "C" { #define f_fss_content_t_initialize f_string_ranges_t_initialize - #define f_macro_fss_content_t_clear(content) f_macro_string_ranges_t_clear(content) + #define f_macro_fss_content_t_clear(content) f_macro_string_ranges_t_clear(content); - #define f_macro_fss_content_t_new(status, content, length) f_macro_string_ranges_t_new(status, content, length) + #define f_macro_fss_content_t_new(status, content, length) f_macro_string_ranges_t_new(status, content, length); - #define f_macro_fss_content_t_delete(status, content) f_macro_string_ranges_t_delete(status, content) - #define f_macro_fss_content_t_destroy(status, content) f_macro_string_ranges_t_destroy(status, content) + #define f_macro_fss_content_t_resize(status, content, length) f_macro_string_ranges_t_resize(status, content, length); + #define f_macro_fss_content_t_adjust(status, content, length) f_macro_string_ranges_t_adjust(status, content, length); - #define f_macro_fss_content_t_delete_simple(content) f_macro_string_ranges_t_delete_simple(content) - #define f_macro_fss_content_t_destroy_simple(content) f_macro_string_ranges_t_destroy_simple(content) + #define f_macro_fss_content_t_delete(status, content) f_macro_string_ranges_t_delete(status, content); + #define f_macro_fss_content_t_destroy(status, content) f_macro_string_ranges_t_destroy(status, content); - #define f_macro_fss_content_t_resize(status, content, new_length) f_macro_string_ranges_t_resize(status, content, new_length) - #define f_macro_fss_content_t_adjust(status, content, new_length) f_macro_string_ranges_t_adjust(status, content, new_length) + #define f_macro_fss_content_t_delete_simple(content) f_macro_string_ranges_t_delete_simple(content); + #define f_macro_fss_content_t_destroy_simple(content) f_macro_string_ranges_t_destroy_simple(content); #endif // _di_fss_content_ /** @@ -273,18 +273,18 @@ extern "C" { #define f_fss_contents_t_initialize f_string_rangess_t_initialize - #define f_macro_fss_contents_t_clear(contents) f_macro_string_rangess_t_clear(contents) + #define f_macro_fss_contents_t_clear(contents) f_macro_string_rangess_t_clear(contents); - #define f_macro_fss_contents_t_new(status, contents, length) f_macro_string_rangess_t_new(status, contents, length) + #define f_macro_fss_contents_t_new(status, contents, length) f_macro_string_rangess_t_new(status, contents, length); - #define f_macro_fss_contents_t_delete(status, contents) f_macro_string_rangess_t_delete(status, contents) - #define f_macro_fss_contents_t_destroy(status, contents) f_macro_string_rangess_t_destroy(status, contents) + #define f_macro_fss_contents_t_resize(status, contents, length) f_macro_string_rangess_t_resize(status, contents, length); + #define f_macro_fss_contents_t_adjust(status, contents, length) f_macro_string_rangess_t_adjust(status, contents, length); - #define f_macro_fss_contents_t_delete_simple(contents) f_macro_string_rangess_t_delete_simple(contents) - #define f_macro_fss_contents_t_destroy_simple(contents) f_macro_string_rangess_t_destroy_simple(contents) + #define f_macro_fss_contents_t_delete(status, contents) f_macro_string_rangess_t_delete(status, contents); + #define f_macro_fss_contents_t_destroy(status, contents) f_macro_string_rangess_t_destroy(status, contents); - #define f_macro_fss_contents_t_resize(status, contents, new_length) f_macro_string_rangess_t_resize(status, contents, new_length) - #define f_macro_fss_contents_t_adjust(status, contents, new_length) f_macro_string_rangess_t_adjust(status, contents, new_length) + #define f_macro_fss_contents_t_delete_simple(contents) f_macro_string_rangess_t_delete_simple(contents); + #define f_macro_fss_contents_t_destroy_simple(contents) f_macro_string_rangess_t_destroy_simple(contents); #endif // _di_f_fss_contents_t_ #ifdef __cplusplus diff --git a/level_0/f_fss/c/fss_comment.h b/level_0/f_fss/c/fss_comment.h index de6bd85..e48e0d7 100644 --- a/level_0/f_fss/c/fss_comment.h +++ b/level_0/f_fss/c/fss_comment.h @@ -35,18 +35,24 @@ extern "C" { #define f_fss_comments_t_initialize f_string_ranges_t_initialize - #define f_macro_fss_comments_t_clear(delimits) f_macro_string_ranges_t_clear(delimits) + #define f_macro_fss_comments_t_new(status, ranges, length) f_macro_string_ranges_t_new(status, ranges, length); - #define f_macro_fss_comments_t_new(status, delimits, length) f_macro_string_ranges_t_new(status, delimits, length) + #define f_macro_fss_comments_t_resize(status, ranges, length) f_macro_string_ranges_t_resize(status, ranges, length); + #define f_macro_fss_comments_t_adjust(status, ranges, length) f_macro_string_ranges_t_adjust(status, ranges, length); - #define f_macro_fss_comments_t_delete(status, delimits) f_macro_string_ranges_t_delete(status, delimits) - #define f_macro_fss_comments_t_destroy(status, delimits) f_macro_string_ranges_t_destroy(status, delimits) + #define f_macro_fss_comments_t_delete(status, ranges) f_macro_string_ranges_t_delete(status, ranges); + #define f_macro_fss_comments_t_destroy(status, ranges) f_macro_string_ranges_t_destroy(status, ranges); - #define f_macro_fss_comments_t_delete_simple(delimits) f_macro_string_ranges_t_delete_simple(delimits) - #define f_macro_fss_comments_t_destroy_simple(delimits) f_macro_string_ranges_t_destroy_simple(delimits) + #define f_macro_fss_comments_t_delete_simple(ranges) f_macro_string_ranges_t_delete_simple(ranges); + #define f_macro_fss_comments_t_destroy_simple(ranges) f_macro_string_ranges_t_destroy_simple(ranges); - #define f_macro_fss_comments_t_resize(status, delimits, new_length) f_macro_string_ranges_t_resize(status, delimits, new_length) - #define f_macro_fss_comments_t_adjust(status, delimits, new_length) f_macro_string_ranges_t_adjust(status, delimits, new_length) + #define f_macro_fss_comments_t_increase(status, ranges) f_macro_string_ranges_t_increase(status, ranges); + #define f_macro_fss_comments_t_decrease(status, ranges) f_macro_string_ranges_t_decrease(status, ranges); + #define f_macro_fss_comments_t_decimate(status, ranges) f_macro_string_ranges_t_decimate(status, ranges); + + #define f_macro_fss_comments_t_increase_by(status, ranges, amount) f_macro_string_ranges_t_increase_by(status, ranges, amount); + #define f_macro_fss_comments_t_decrease_by(status, ranges, amount) f_macro_string_ranges_t_decrease_by(status, ranges, amount); + #define f_macro_fss_comments_t_decimate_by(status, ranges, amount) f_macro_string_ranges_t_decimate_by(status, ranges, amount); #endif // _di_f_fss_comments_t_ /** @@ -61,18 +67,18 @@ extern "C" { #define f_fss_commentss_t_initialize f_string_rangess_t_initialize - #define f_macro_fss_commentss_t_clear(quotess) f_macro_string_rangess_t_clear(quotess) + #define f_macro_fss_commentss_t_clear(quotess) f_macro_string_rangess_t_clear(quotess); - #define f_macro_fss_commentss_t_new(status, quotess, length) f_macro_string_rangess_t_new(status, quotess, length) + #define f_macro_fss_commentss_t_new(status, quotess, length) f_macro_string_rangess_t_new(status, quotess, length); - #define f_macro_fss_commentss_t_delete(status, quotess) f_macro_string_rangess_t_delete(status, quotess) - #define f_macro_fss_commentss_t_destroy(status, quotess) f_macro_string_rangess_t_destroy(status, quotess) + #define f_macro_fss_commentss_t_resize(status, quotess, length) f_macro_string_rangess_t_resize(status, quotess, length); + #define f_macro_fss_commentss_t_adjust(status, quotess, length) f_macro_string_rangess_t_adjust(status, quotess, length); - #define f_macro_fss_commentss_t_delete_simple(quotess) f_macro_string_rangess_t_delete_simple(quotess) - #define f_macro_fss_commentss_t_destroy_simple(quotess) f_macro_string_rangess_t_destroy_simple(quotess) + #define f_macro_fss_commentss_t_delete(status, quotess) f_macro_string_rangess_t_delete(status, quotess); + #define f_macro_fss_commentss_t_destroy(status, quotess) f_macro_string_rangess_t_destroy(status, quotess); - #define f_macro_fss_commentss_t_resize(status, quotess, new_length) f_macro_string_rangess_t_resize(status, quotess, new_length) - #define f_macro_fss_commentss_t_adjust(status, quotess, new_length) f_macro_string_rangess_t_adjust(status, quotess, new_length) + #define f_macro_fss_commentss_t_delete_simple(quotess) f_macro_string_rangess_t_delete_simple(quotess); + #define f_macro_fss_commentss_t_destroy_simple(quotess) f_macro_string_rangess_t_destroy_simple(quotess); #endif // _di_f_fss_commentss_t_ #ifdef __cplusplus diff --git a/level_0/f_fss/c/fss_delimit.h b/level_0/f_fss/c/fss_delimit.h index 1ba4fcf..a946acc 100644 --- a/level_0/f_fss/c/fss_delimit.h +++ b/level_0/f_fss/c/fss_delimit.h @@ -35,28 +35,24 @@ extern "C" { #define f_fss_delimits_t_initialize f_string_lengths_t_initialize - #define f_macro_fss_delimits_t_adjust(status, delimits, length) f_macro_memory_structure_t_adjust(status, delimits, f_fss_delimit_t, length) + #define f_macro_fss_delimits_t_new(status, lengths, length) f_macro_string_lengths_t_new(status, lengths, length); - #define f_macro_fss_delimits_t_clear(delimits) f_macro_memory_structure_t_clear(delimits) + #define f_macro_fss_delimits_t_resize(status, lengths, length) f_macro_string_lengths_t_resize(status, lengths, length); + #define f_macro_fss_delimits_t_adjust(status, lengths, length) f_macro_string_lengths_t_adjust(status, lengths, length); - #define f_macro_fss_delimits_t_decimate(status, delimits) f_macro_memory_structure_decimate(status, delimits, f_fss_delimit_t); - #define f_macro_fss_delimits_t_decimate_by(status, delimits, amount) f_macro_memory_structure_decimate_by(status, delimits, f_fss_delimit_t, amount); + #define f_macro_fss_delimits_t_delete(status, lengths) f_macro_string_lengths_t_delete(status, lengths); + #define f_macro_fss_delimits_t_destroy(status, lengths) f_macro_string_lengths_t_destroy(status, lengths); - #define f_macro_fss_delimits_t_decrease(status, delimits) f_macro_memory_structure_decrease(status, delimits, f_fss_delimit_t); - #define f_macro_fss_delimits_t_decrease_by(status, delimits, amount) f_macro_memory_structure_decrease_by(status, delimits, f_fss_delimit_t, amount); + #define f_macro_fss_delimits_t_delete_simple(lengths) f_macro_string_lengths_t_delete_simple(lengths); + #define f_macro_fss_delimits_t_destroy_simple(lengths) f_macro_string_lengths_t_destroy_simple(lengths); - #define f_macro_fss_delimits_t_delete(status, delimits) f_macro_memory_structure_t_delete(status, delimits, f_fss_delimit_t) - #define f_macro_fss_delimits_t_delete_simple(delimits) f_macro_memory_structure_t_delete_simple(delimits, f_fss_delimit_t) + #define f_macro_fss_delimits_t_increase(status, lengths) f_macro_string_lengths_t_increase(status, lengths); + #define f_macro_fss_delimits_t_decrease(status, lengths) f_macro_string_lengths_t_decrease(status, lengths); + #define f_macro_fss_delimits_t_decimate(status, lengths) f_macro_string_lengths_t_decimate(status, lengths); - #define f_macro_fss_delimits_t_destroy(status, delimits) f_macro_memory_structure_t_destroy(status, delimits, f_fss_delimit_t) - #define f_macro_fss_delimits_t_destroy_simple(delimits) f_macro_memory_structure_t_destroy_simple(delimits, f_fss_delimit_t) - - #define f_macro_fss_delimits_t_increase(status, delimits) f_macro_memory_structure_increase(status, delimits, f_fss_delimit_t); - #define f_macro_fss_delimits_t_increase_by(status, delimits, amount) f_macro_memory_structure_increase_by(status, delimits, f_fss_delimit_t, amount); - - #define f_macro_fss_delimits_t_new(status, delimits, length) f_macro_memory_structure_t_new(status, delimits, f_fss_delimit_t, length) - - #define f_macro_fss_delimits_t_resize(status, delimits, new_length) f_macro_memory_structure_t_resize(status, delimits, f_fss_delimit_t, new_length) + #define f_macro_fss_delimits_t_increase_by(status, lengths, amount) f_macro_string_lengths_t_increase_by(status, lengths, amount); + #define f_macro_fss_delimits_t_decrease_by(status, lengths, amount) f_macro_string_lengths_t_decrease_by(status, lengths, amount); + #define f_macro_fss_delimits_t_decimate_by(status, lengths, amount) f_macro_string_lengths_t_decimate_by(status, lengths, amount); #endif // _di_f_fss_delimits_t_ /** @@ -71,18 +67,18 @@ extern "C" { #define f_fss_delimitss_t_initialize f_string_lengthss_t_initialize - #define f_macro_fss_delimitss_t_clear(quotess) f_macro_string_lengthss_t_clear(quotess) + #define f_macro_fss_delimitss_t_clear(delimitss) f_macro_string_lengthss_t_clear(delimitss); - #define f_macro_fss_delimitss_t_new(status, quotess, length) f_macro_string_lengthss_t_new(status, quotess, length) + #define f_macro_fss_delimitss_t_new(status, delimitss, length) f_macro_string_lengthss_t_new(status, delimitss, length); - #define f_macro_fss_delimitss_t_delete(status, quotess) f_macro_string_lengthss_t_delete(status, quotess) - #define f_macro_fss_delimitss_t_destroy(status, quotess) f_macro_string_lengthss_t_destroy(status, quotess) + #define f_macro_fss_delimitss_t_resize(status, delimitss, length) f_macro_string_lengthss_t_resize(status, delimitss, length); + #define f_macro_fss_delimitss_t_adjust(status, delimitss, length) f_macro_string_lengthss_t_adjust(status, delimitss, length); - #define f_macro_fss_delimitss_t_delete_simple(quotess) f_macro_string_lengthss_t_delete_simple(quotess) - #define f_macro_fss_delimitss_t_destroy_simple(quotess) f_macro_string_lengthss_t_destroy_simple(quotess) + #define f_macro_fss_delimitss_t_delete(status, delimitss) f_macro_string_lengthss_t_delete(status, delimitss); + #define f_macro_fss_delimitss_t_destroy(status, delimitss) f_macro_string_lengthss_t_destroy(status, delimitss); - #define f_macro_fss_delimitss_t_resize(status, quotess, new_length) f_macro_string_lengthss_t_resize(status, quotess, new_length) - #define f_macro_fss_delimitss_t_adjust(status, quotess, new_length) f_macro_string_lengthss_t_adjust(status, quotess, new_length) + #define f_macro_fss_delimitss_t_delete_simple(delimitss) f_macro_string_lengthss_t_delete_simple(delimitss); + #define f_macro_fss_delimitss_t_destroy_simple(delimitss) f_macro_string_lengthss_t_destroy_simple(delimitss); #endif // _di_f_fss_delimitss_t_ #ifdef __cplusplus diff --git a/level_0/f_fss/c/fss_named.h b/level_0/f_fss/c/fss_named.h index 2262c51..670ad40 100644 --- a/level_0/f_fss/c/fss_named.h +++ b/level_0/f_fss/c/fss_named.h @@ -53,6 +53,24 @@ extern "C" { f_macro_fss_quotess_t_new(status, set.quotess, length) \ } + #define f_macro_fss_named_t_resize(status, set, new_length) \ + f_macro_fss_objects_t_resize(status, set.objects, new_length) \ + if (F_status_is_fine(status)) { \ + f_macro_fss_contents_t_resize(status, set.contents, new_length) \ + } \ + if (F_status_is_fine(status)) { \ + f_macro_fss_quotess_t_resize(status, set.quotess, new_length) \ + } + + #define f_macro_fss_named_t_adjust(status, set, new_length) \ + f_macro_fss_objects_t_adjust(status, set.objects, new_length) \ + if (F_status_is_fine(status)) { \ + f_macro_fss_contents_t_adjust(status, set.contents, new_length) \ + } \ + if (F_status_is_fine(status)) { \ + f_macro_fss_quotess_t_adjust(status, set.quotess, new_length) \ + } + #define f_macro_fss_named_t_delete(status, set) \ f_macro_fss_objects_t_delete(status, set.objects) \ if (F_status_is_fine(status)) { \ @@ -80,24 +98,6 @@ extern "C" { f_macro_fss_objects_t_destroy_simple(set.objects) \ f_macro_fss_contents_t_destroy_simple(set.contents) \ f_macro_fss_quotess_t_destroy_simple(set.quotess) - - #define f_macro_fss_named_t_resize(status, set, new_length) \ - f_macro_fss_objects_t_resize(status, set.objects, new_length) \ - if (F_status_is_fine(status)) { \ - f_macro_fss_contents_t_resize(status, set.contents, new_length) \ - } \ - if (F_status_is_fine(status)) { \ - f_macro_fss_quotess_t_resize(status, set.quotess, new_length) \ - } - - #define f_macro_fss_named_t_adjust(status, set, new_length) \ - f_macro_fss_objects_t_adjust(status, set.objects, new_length) \ - if (F_status_is_fine(status)) { \ - f_macro_fss_contents_t_adjust(status, set.contents, new_length) \ - } \ - if (F_status_is_fine(status)) { \ - f_macro_fss_quotess_t_adjust(status, set.quotess, new_length) \ - } #endif // _di_f_fss_named_t_ /** @@ -149,6 +149,48 @@ extern "C" { } /** + * Resize a fss content sets. + * + * status: the status to return. + * sets: the f_fss_nameds_t structure to operate on. + * new_length: the new size of the array. + */ + #define f_macro_fss_nameds_t_resize(status, sets, new_length) \ + status = F_none; \ + if (new_length < sets.size) { \ + for (register f_array_length_t _macro__i = sets.size - new_length; _macro__i < sets.size; ++_macro__i) { \ + f_macro_fss_named_t_delete(status, sets.array[_macro__i]); \ + if (status != F_none) break; \ + } \ + } \ + if (status == F_none) status = f_memory_resize((void **) & sets.array, sizeof(f_fss_named_t), sets.size, new_length); \ + if (status == F_none) { \ + sets.size = new_length; \ + if (sets.used > sets.size) sets.used = new_length; \ + } + + /** + * Adjust a fss content sets. + * + * status: the status to return. + * sets: the f_fss_nameds_t structure to operate on. + * new_length: he new size of the array. + */ + #define f_macro_fss_nameds_t_adjust(status, sets, new_length) \ + status = F_none; \ + if (new_length < sets.size) { \ + for (register f_array_length_t _macro__i = sets.size - new_length; _macro__i < sets.size; ++_macro__i) { \ + f_macro_fss_named_t_destroy(status, sets.array[_macro__i]); \ + if (status != F_none) break; \ + } \ + } \ + if (status == F_none) status = f_memory_adjust((void **) & sets.array, sizeof(f_fss_named_t), sets.size, new_length); \ + if (status == F_none) { \ + sets.size = new_length; \ + if (sets.used > sets.size) sets.used = new_length; \ + } + + /** * Delete a fss content sets. * * status: the status to return. @@ -209,48 +251,6 @@ extern "C" { } \ f_memory_destroy((void **) & sets.array, sizeof(f_fss_named_t), sets.size); \ sets.size = 0; - - /** - * Resize a fss content sets. - * - * status: the status to return. - * sets: the f_fss_nameds_t structure to operate on. - * new_length: the new size of the array. - */ - #define f_macro_fss_nameds_t_resize(status, sets, new_length) \ - status = F_none; \ - if (new_length < sets.size) { \ - for (f_array_length_t _macro__i = sets.size - new_length; _macro__i < sets.size; _macro__i++) { \ - f_macro_fss_named_t_delete(status, sets.array[_macro__i]); \ - if (status != F_none) break; \ - } \ - } \ - if (status == F_none) status = f_memory_resize((void **) & sets.array, sizeof(f_fss_named_t), sets.size, new_length); \ - if (status == F_none) { \ - sets.size = new_length; \ - if (sets.used > sets.size) sets.used = new_length; \ - } - - /** - * Adjust a fss content sets. - * - * status: the status to return. - * sets: the f_fss_nameds_t structure to operate on. - * new_length: he new size of the array. - */ - #define f_macro_fss_nameds_t_adjust(status, sets, new_length) \ - status = F_none; \ - if (new_length < sets.size) { \ - for (f_array_length_t _macro__i = sets.size - new_length; _macro__i < sets.size; _macro__i++) { \ - f_macro_fss_named_t_destroy(status, sets.array[_macro__i]); \ - if (status != F_none) break; \ - } \ - } \ - if (status == F_none) status = f_memory_adjust((void **) & sets.array, sizeof(f_fss_named_t), sets.size, new_length); \ - if (status == F_none) { \ - sets.size = new_length; \ - if (sets.used > sets.size) sets.used = new_length; \ - } #endif // _di_fss_nameds_t_ #ifdef __cplusplus diff --git a/level_0/f_fss/c/fss_nest.h b/level_0/f_fss/c/fss_nest.h index 6df60b8..ad94c90 100644 --- a/level_0/f_fss/c/fss_nest.h +++ b/level_0/f_fss/c/fss_nest.h @@ -192,6 +192,48 @@ extern "C" { } /** + * Resize a fss items. + * + * status: the status to return. + * items: the f_fss_items_t structure to operate on. + * new_length: the new size of the array. + */ + #define f_macro_fss_items_t_resize(status, items, new_length) \ + status = F_none; \ + if (new_length < items.size) { \ + for (register f_array_length_t _macro__i = items.size - new_length; _macro__i < items.size; ++_macro__i) { \ + f_macro_fss_item_t_delete(status, items.array[_macro__i]); \ + if (status != F_none) break; \ + } \ + } \ + if (status == F_none) status = f_memory_resize((void **) & items.array, sizeof(f_fss_item_t), items.size, new_length); \ + if (status == F_none) { \ + items.size = new_length; \ + if (items.used > items.size) items.used = new_length; \ + } + + /** + * Adjust a fss items. + * + * status: the status to return. + * items: the f_fss_items_t structure to operate on. + * new_length: the new size of the array. + */ + #define f_macro_fss_items_t_adjust(status, items, new_length) \ + status = F_none; \ + if (new_length < items.size) { \ + for (length_variable _macro__i = items.size - new_length; _macro__i < items.size; ++_macro__i) { \ + f_macro_fss_item_t_destroy(status, items.array[_macro__i]); \ + if (status != F_none) break; \ + } \ + } \ + if (status == F_none) status = f_memory_adjust((void **) & items.array, sizeof(f_fss_item_t), items.size, new_length); \ + if (status == F_none) { \ + items.size = new_length; \ + if (items.used > items.size) items.used = new_length; \ + } + + /** * Delete a fss items. * * status: the status to return. @@ -252,48 +294,6 @@ extern "C" { } \ f_memory_destroy((void **) & items.array, sizeof(f_fss_item_t), items.size); \ items.size = 0; - - /** - * Resize a fss items. - * - * status: the status to return. - * items: the f_fss_items_t structure to operate on. - * new_length: the new size of the array. - */ - #define f_macro_fss_items_t_resize(status, items, new_length) \ - status = F_none; \ - if (new_length < items.size) { \ - for (f_array_length_t _macro__i = items.size - new_length; _macro__i < items.size; _macro__i++) { \ - f_macro_fss_item_t_delete(status, items.array[_macro__i]); \ - if (status != F_none) break; \ - } \ - } \ - if (status == F_none) status = f_memory_resize((void **) & items.array, sizeof(f_fss_item_t), items.size, new_length); \ - if (status == F_none) { \ - items.size = new_length; \ - if (items.used > items.size) items.used = new_length; \ - } - - /** - * Adjust a fss items. - * - * status: the status to return. - * items: the f_fss_items_t structure to operate on. - * new_length: the new size of the array. - */ - #define f_macro_fss_items_t_adjust(status, items, new_length) \ - status = F_none; \ - if (new_length < items.size) { \ - for (length_variable _macro__i = items.size - new_length; _macro__i < items.size; _macro__i++) { \ - f_macro_fss_item_t_destroy(status, items.array[_macro__i]); \ - if (status != F_none) break; \ - } \ - } \ - if (status == F_none) status = f_memory_adjust((void **) & items.array, sizeof(f_fss_item_t), items.size, new_length); \ - if (status == F_none) { \ - items.size = new_length; \ - if (items.used > items.size) items.used = new_length; \ - } #endif // _di_fss_items_t_ /** @@ -350,6 +350,48 @@ extern "C" { } /** + * Resize a fss content nest. + * + * status: the status to return. + * nest: the f_fss_nest_t structure to operate on. + * new_length: the new size of the array. + */ + #define f_macro_fss_nest_t_resize(status, nest, new_length) \ + status = F_none; \ + if (new_length < nest.size) { \ + for (register f_array_length_t _macro__i = nest.size - new_length; _macro__i < nest.size; ++_macro__i) { \ + f_macro_fss_items_t_delete(status, nest.depth[_macro__i]); \ + if (status != F_none) break; \ + } \ + } \ + if (status == F_none) status = f_memory_resize((void **) & nest.depth, sizeof(f_fss_items_t), nest.size, new_length); \ + if (status == F_none) { \ + nest.size = new_length; \ + if (nest.used > nest.size) nest.used = new_length; \ + } + + /** + * Adjust a fss content nest. + * + * status: the status to return. + * nest: the f_fss_nest_t structure to operate on. + * new_length: the new size of the array. + */ + #define f_macro_fss_nest_t_adjust(status, nest, new_length) \ + status = F_none; \ + if (new_length < nest.size) { \ + for (register f_array_length_t _macro__i = nest.size - new_length; _macro__i < nest.size; ++_macro__i) { \ + f_macro_fss_items_t_destroy(status, nest.depth[_macro__i]); \ + if (status != F_none) break; \ + } \ + } \ + if (status == F_none) status = f_memory_adjust((void **) & nest.depth, sizeof(f_fss_item_t), nest.size, new_length); \ + if (status == F_none) { \ + nest.size = new_length; \ + if (nest.used > nest.size) nest.used = new_length; \ + } + + /** * Delete a fss content nest. * * status: the status to return. @@ -410,48 +452,6 @@ extern "C" { } \ f_memory_destroy((void **) & nest.depth, sizeof(f_fss_items_t), nest.size); \ nest.size = 0; - - /** - * Resize a fss content nest. - * - * status: the status to return. - * nest: the f_fss_nest_t structure to operate on. - * new_length: the new size of the array. - */ - #define f_macro_fss_nest_t_resize(status, nest, new_length) \ - status = F_none; \ - if (new_length < nest.size) { \ - for (f_array_length_t _macro__i = nest.size - new_length; _macro__i < nest.size; _macro__i++) { \ - f_macro_fss_items_t_delete(status, nest.depth[_macro__i]); \ - if (status != F_none) break; \ - } \ - } \ - if (status == F_none) status = f_memory_resize((void **) & nest.depth, sizeof(f_fss_items_t), nest.size, new_length); \ - if (status == F_none) { \ - nest.size = new_length; \ - if (nest.used > nest.size) nest.used = new_length; \ - } - - /** - * Adjust a fss content nest. - * - * status: the status to return. - * nest: the f_fss_nest_t structure to operate on. - * new_length: the new size of the array. - */ - #define f_macro_fss_nest_t_adjust(status, nest, new_length) \ - status = F_none; \ - if (new_length < nest.size) { \ - for (f_array_length_t _macro__i = nest.size - new_length; _macro__i < nest.size; _macro__i++) { \ - f_macro_fss_items_t_destroy(status, nest.depth[_macro__i]); \ - if (status != F_none) break; \ - } \ - } \ - if (status == F_none) status = f_memory_adjust((void **) & nest.depth, sizeof(f_fss_item_t), nest.size, new_length); \ - if (status == F_none) { \ - nest.size = new_length; \ - if (nest.used > nest.size) nest.used = new_length; \ - } #endif // _di_fss_nest_t_ /** @@ -503,6 +503,48 @@ extern "C" { } /** + * Resize a fss content nests. + * + * status: the status to return. + * nests: the f_fss_nests_t structure to operate on. + * new_length: the new size of the array. + */ + #define f_macro_fss_nests_t_resize(status, nests, new_length) \ + status = F_none; \ + if (new_length < nests.size) { \ + for (register f_array_length_t _macro__i = nests.size - new_length; _macro__i < nests.size; ++_macro__i) { \ + f_macro_fss_nest_t_delete(status, nests.array[_macro__i]); \ + if (status != F_none) break; \ + } \ + } \ + if (status == F_none) status = f_memory_resize((void **) & nests.array, sizeof(f_fss_nest_t), nests.size, new_length); \ + if (status == F_none) { \ + nests.size = new_length; \ + if (nests.used > nests.size) nests.used = new_length; \ + } + + /** + * Adjust a fss content nests. + * + * status: the status to return. + * nests: the f_fss_nests_t structure to operate on. + * new_length: he new size of the array. + */ + #define f_macro_fss_nests_t_adjust(status, nests, new_length) \ + status = F_none; \ + if (new_length < nests.size) { \ + for (register f_array_length_t _macro__i = nests.size - new_length; _macro__i < nests.size; ++_macro__i) { \ + f_macro_fss_nest_t_destroy(status, nests.array[_macro__i]); \ + if (status != F_none) break; \ + } \ + } \ + if (status == F_none) status = f_memory_adjust((void **) & nests.array, sizeof(f_fss_nest_t), nests.size, new_length); \ + if (status == F_none) { \ + nests.size = new_length; \ + if (nests.used > nests.size) nests.used = new_length; \ + } + + /** * Delete a fss content nests. * * status: the status to return. @@ -563,48 +605,6 @@ extern "C" { } \ f_memory_destroy((void **) & nests.array, sizeof(f_fss_nest_t), nests.size); \ nests.size = 0; - - /** - * Resize a fss content nests. - * - * status: the status to return. - * nests: the f_fss_nests_t structure to operate on. - * new_length: the new size of the array. - */ - #define f_macro_fss_nests_t_resize(status, nests, new_length) \ - status = F_none; \ - if (new_length < nests.size) { \ - for (f_array_length_t _macro__i = nests.size - new_length; _macro__i < nests.size; _macro__i++) { \ - f_macro_fss_nest_t_delete(status, nests.array[_macro__i]); \ - if (status != F_none) break; \ - } \ - } \ - if (status == F_none) status = f_memory_resize((void **) & nests.array, sizeof(f_fss_nest_t), nests.size, new_length); \ - if (status == F_none) { \ - nests.size = new_length; \ - if (nests.used > nests.size) nests.used = new_length; \ - } - - /** - * Adjust a fss content nests. - * - * status: the status to return. - * nests: the f_fss_nests_t structure to operate on. - * new_length: he new size of the array. - */ - #define f_macro_fss_nests_t_adjust(status, nests, new_length) \ - status = F_none; \ - if (new_length < nests.size) { \ - for (f_array_length_t _macro__i = nests.size - new_length; _macro__i < nests.size; _macro__i++) { \ - f_macro_fss_nest_t_destroy(status, nests.array[_macro__i]); \ - if (status != F_none) break; \ - } \ - } \ - if (status == F_none) status = f_memory_adjust((void **) & nests.array, sizeof(f_fss_nest_t), nests.size, new_length); \ - if (status == F_none) { \ - nests.size = new_length; \ - if (nests.used > nests.size) nests.used = new_length; \ - } #endif // _di_fss_nests_t_ #ifdef __cplusplus diff --git a/level_0/f_fss/c/fss_quote.h b/level_0/f_fss/c/fss_quote.h index bc50497..cb055e4 100644 --- a/level_0/f_fss/c/fss_quote.h +++ b/level_0/f_fss/c/fss_quote.h @@ -37,26 +37,34 @@ extern "C" { * An array of f_fss_quote_t. * * array: the array of fss quote. - * size: total amount of allocated space. - * used: total number of allocated spaces used. + * size: total amount of allocated space. + * used: total number of allocated spaces used. */ #ifndef _di_f_fss_quotes_t_ typedef f_uint8s_t f_fss_quotes_t; #define f_fss_quotes_t_initialize f_uint8s_t_initialize - #define f_macro_fss_quotes_t_clear(quotes) f_macro_uint8s_t_clear(quotes) + #define f_macro_fss_quotes_t_clear(quotes) f_macro_uint8s_t_clear(quotes); + + #define f_macro_fss_quotes_t_new(status, quotes, length) f_macro_uint8s_t_new(status, quotes, length); - #define f_macro_fss_quotes_t_new(status, quotes, length) f_macro_uint8s_t_new(status, quotes, length) + #define f_macro_fss_quotes_t_resize(status, quotes, length) f_macro_uint8s_t_resize(status, quotes, length); + #define f_macro_fss_quotes_t_adjust(status, quotes, length) f_macro_uint8s_t_adjust(status, quotes, length); - #define f_macro_fss_quotes_t_delete(status, quotes) f_macro_uint8s_t_delete(status, quotes) - #define f_macro_fss_quotes_t_destroy(status, quotes) f_macro_uint8s_t_destroy(status, quotes) + #define f_macro_fss_quotes_t_delete(status, quotes) f_macro_uint8s_t_delete(status, quotes); + #define f_macro_fss_quotes_t_destroy(status, quotes) f_macro_uint8s_t_destroy(status, quotes); - #define f_macro_fss_quotes_t_delete_simple(quotes) f_macro_uint8s_t_delete_simple(quotes) - #define f_macro_fss_quotes_t_destroy_simple(quotes) f_macro_uint8s_t_destroy_simple(quotes) + #define f_macro_fss_quotes_t_delete_simple(quotes) f_macro_uint8s_t_delete_simple(quotes); + #define f_macro_fss_quotes_t_destroy_simple(quotes) f_macro_uint8s_t_destroy_simple(quotes); - #define f_macro_fss_quotes_t_resize(status, quotes, new_length) f_macro_uint8s_t_resize(status, quotes, new_length) - #define f_macro_fss_quotes_t_adjust(status, quotes, new_length) f_macro_uint8s_t_adjust(status, quotes, new_length) + #define f_macro_fss_quotes_t_increase(status, quotes) f_macro_uint8s_t_increase(status, quotes); + #define f_macro_fss_quotes_t_decrease(status, quotes) f_macro_uint8s_t_decrease(status, quotes); + #define f_macro_fss_quotes_t_decimate(status, quotes) f_macro_uint8s_t_decimate(status, quotes); + + #define f_macro_fss_quotes_t_increase_by(status, quotes, amount) f_macro_uint8s_t_increase_by(status, quotes, amount); + #define f_macro_fss_quotes_t_decrease_by(status, quotes, amount) f_macro_uint8s_t_decrease_by(status, quotes, amount); + #define f_macro_fss_quotes_t_decimate_by(status, quotes, amount) f_macro_uint8s_t_decimate_by(status, quotes, amount); #endif // _di_f_fss_quotes_t_ /** @@ -75,14 +83,14 @@ extern "C" { #define f_macro_fss_quotess_t_new(status, quotess, length) f_macro_uint8ss_t_new(status, quotess, length) + #define f_macro_fss_quotess_t_resize(status, quotess, length) f_macro_uint8ss_t_resize(status, quotess, length) + #define f_macro_fss_quotess_t_adjust(status, quotess, length) f_macro_uint8ss_t_adjust(status, quotess, length) + #define f_macro_fss_quotess_t_delete(status, quotess) f_macro_uint8ss_t_delete(status, quotess) #define f_macro_fss_quotess_t_destroy(status, quotess) f_macro_uint8ss_t_destroy(status, quotess) #define f_macro_fss_quotess_t_delete_simple(quotess) f_macro_uint8ss_t_delete_simple(quotess) #define f_macro_fss_quotess_t_destroy_simple(quotess) f_macro_uint8ss_t_destroy_simple(quotess) - - #define f_macro_fss_quotess_t_resize(status, quotess, new_length) f_macro_uint8ss_t_resize(status, quotess, new_length) - #define f_macro_fss_quotess_t_adjust(status, quotess, new_length) f_macro_uint8ss_t_adjust(status, quotess, new_length) #endif // _di_f_fss_quotess_t_ #ifdef __cplusplus diff --git a/level_0/f_fss/c/fss_set.h b/level_0/f_fss/c/fss_set.h index eb294d6..c18128e 100644 --- a/level_0/f_fss/c/fss_set.h +++ b/level_0/f_fss/c/fss_set.h @@ -196,7 +196,7 @@ extern "C" { #define f_macro_fss_sets_t_resize(status, sets, new_length) \ status = F_none; \ if (new_length < sets.size) { \ - for (f_array_length_t _macro__i = sets.size - new_length; _macro__i < sets.size; _macro__i++) { \ + for (register f_array_length_t _macro__i = sets.size - new_length; _macro__i < sets.size; ++_macro__i) { \ f_macro_fss_set_t_delete(status, sets.array[_macro__i]); \ if (status != F_none) break; \ } \ @@ -217,7 +217,7 @@ extern "C" { #define f_macro_fss_sets_t_adjust(status, sets, new_length) \ status = F_none; \ if (new_length < sets.size) { \ - for (f_array_length_t _macro__i = sets.size - new_length; _macro__i < sets.size; _macro__i++) { \ + for (register f_array_length_t _macro__i = sets.size - new_length; _macro__i < sets.size; ++_macro__i) { \ f_macro_fss_set_t_destroy(status, sets.array[_macro__i]); \ if (status != F_none) break; \ } \ @@ -379,6 +379,48 @@ extern "C" { } /** + * Resize a fss content sets. + * + * status: the status to return. + * sets: the f_fss_set_quotes_t structure to operate on. + * new_length: the new size of the array. + */ + #define f_macro_fss_set_quotes_t_resize(status, sets, new_length) \ + status = F_none; \ + if (new_length < sets.size) { \ + for (register f_array_length_t _macro__i = sets.size - new_length; _macro__i < sets.size; ++_macro__i) { \ + f_macro_fss_set_quote_t_delete(status, sets.array[_macro__i]); \ + if (status != F_none) break; \ + } \ + } \ + if (status == F_none) status = f_memory_resize((void **) & sets.array, sizeof(f_fss_set_quote_t), sets.size, new_length); \ + if (status == F_none) { \ + sets.size = new_length; \ + if (sets.used > sets.size) sets.used = new_length; \ + } + + /** + * Adjust a fss content sets. + * + * status: the status to return. + * sets: the f_fss_set_quotes_t structure to operate on. + * new_length: he new size of the array. + */ + #define f_macro_fss_set_quotes_t_adjust(status, sets, new_length) \ + status = F_none; \ + if (new_length < sets.size) { \ + for (register f_array_length_t _macro__i = sets.size - new_length; _macro__i < sets.size; ++_macro__i) { \ + f_macro_fss_set_quote_t_destroy(status, sets.array[_macro__i]); \ + if (status != F_none) break; \ + } \ + } \ + if (status == F_none) status = f_memory_adjust((void **) & sets.array, sizeof(f_fss_set_quote_t), sets.size, new_length); \ + if (status == F_none) { \ + sets.size = new_length; \ + if (sets.used > sets.size) sets.used = new_length; \ + } + + /** * Delete a fss content sets. * * status: the status to return. @@ -439,48 +481,6 @@ extern "C" { } \ f_memory_destroy((void **) & sets.array, sizeof(f_fss_set_quote_t), sets.size); \ sets.size = 0; - - /** - * Resize a fss content sets. - * - * status: the status to return. - * sets: the f_fss_set_quotes_t structure to operate on. - * new_length: the new size of the array. - */ - #define f_macro_fss_set_quotes_t_resize(status, sets, new_length) \ - status = F_none; \ - if (new_length < sets.size) { \ - for (f_array_length_t _macro__i = sets.size - new_length; _macro__i < sets.size; _macro__i++) { \ - f_macro_fss_set_quote_t_delete(status, sets.array[_macro__i]); \ - if (status != F_none) break; \ - } \ - } \ - if (status == F_none) status = f_memory_resize((void **) & sets.array, sizeof(f_fss_set_quote_t), sets.size, new_length); \ - if (status == F_none) { \ - sets.size = new_length; \ - if (sets.used > sets.size) sets.used = new_length; \ - } - - /** - * Adjust a fss content sets. - * - * status: the status to return. - * sets: the f_fss_set_quotes_t structure to operate on. - * new_length: he new size of the array. - */ - #define f_macro_fss_set_quotes_t_adjust(status, sets, new_length) \ - status = F_none; \ - if (new_length < sets.size) { \ - for (f_array_length_t _macro__i = sets.size - new_length; _macro__i < sets.size; _macro__i++) { \ - f_macro_fss_set_quote_t_destroy(status, sets.array[_macro__i]); \ - if (status != F_none) break; \ - } \ - } \ - if (status == F_none) status = f_memory_adjust((void **) & sets.array, sizeof(f_fss_set_quote_t), sets.size, new_length); \ - if (status == F_none) { \ - sets.size = new_length; \ - if (sets.used > sets.size) sets.used = new_length; \ - } #endif // _di_fss_set_quotes_t_ #ifdef __cplusplus diff --git a/level_0/f_fss/data/build/settings b/level_0/f_fss/data/build/settings index b619c5f..3234ba7d 100644 --- a/level_0/f_fss/data/build/settings +++ b/level_0/f_fss/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lf_memory -lf_utf +build_libraries-individual -lf_memory -lf_string -lf_utf build_sources_library fss.c build_sources_program build_sources_headers fss.h fss-common.h fss_comment.h fss_delimit.h fss_named.h fss_nest.h fss_quote.h fss_set.h diff --git a/level_0/f_iki/c/iki-common.c b/level_0/f_iki/c/iki-common.c new file mode 100644 index 0000000..2eb2d88 --- /dev/null +++ b/level_0/f_iki/c/iki-common.c @@ -0,0 +1,28 @@ +#include "iki.h" +#include "private-iki.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_iki_vocabulary_0001_s_ + const f_string_t iki_vocabulary_0001_address_s = iki_vocabulary_0001_address; + const f_string_t iki_vocabulary_0001_code_s = iki_vocabulary_0001_code; + const f_string_t iki_vocabulary_0001_email_s = iki_vocabulary_0001_email; + const f_string_t iki_vocabulary_0001_name_s = iki_vocabulary_0001_name; + const f_string_t iki_vocabulary_0001_phone_s = iki_vocabulary_0001_phone; + const f_string_t iki_vocabulary_0001_quote_s = iki_vocabulary_0001_quote; + const f_string_t iki_vocabulary_0001_uri_s = iki_vocabulary_0001_uri; + const f_string_t iki_vocabulary_0001_url_s = iki_vocabulary_0001_url; + const f_string_t iki_vocabulary_0001_urn_s = iki_vocabulary_0001_urn; + const f_string_t iki_vocabulary_0001_variable_s = iki_vocabulary_0001_variable; +#endif // _di_iki_vocabulary_0001_s_ + +#ifndef _di_iki_vocabulary_0002_s_ + const f_string_t iki_vocabulary_0002_define_s = iki_vocabulary_0002_define; + const f_string_t iki_vocabulary_0002_parameter_s = iki_vocabulary_0002_parameter; +#endif // _di_iki_vocabulary_0002_s_ + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_0/f_iki/c/iki-common.h b/level_0/f_iki/c/iki-common.h index a59801a..7fe89a5 100644 --- a/level_0/f_iki/c/iki-common.h +++ b/level_0/f_iki/c/iki-common.h @@ -27,7 +27,7 @@ extern "C" { #define f_iki_syntax_slash '\\' #endif //_di_f_iki_syntax_ -#ifndef _di_iki_vocabulary_0001_ +#ifndef _di_iki_vocabulary_0001_s_ #define iki_vocabulary_0001_address "address" #define iki_vocabulary_0001_code "code" #define iki_vocabulary_0001_email "email" @@ -49,15 +49,29 @@ extern "C" { #define iki_vocabulary_0001_url_length 3 #define iki_vocabulary_0001_urn_length 3 #define iki_vocabulary_0001_variable_length 3 -#endif // _di_iki_vocabulary_0001_ -#ifndef _di_iki_vocabulary_0002_ + extern const f_string_t iki_vocabulary_0001_address_s; + extern const f_string_t iki_vocabulary_0001_code_s; + extern const f_string_t iki_vocabulary_0001_email_s; + extern const f_string_t iki_vocabulary_0001_name_s; + extern const f_string_t iki_vocabulary_0001_phone_s; + extern const f_string_t iki_vocabulary_0001_quote_s; + extern const f_string_t iki_vocabulary_0001_uri_s; + extern const f_string_t iki_vocabulary_0001_url_s; + extern const f_string_t iki_vocabulary_0001_urn_s; + extern const f_string_t iki_vocabulary_0001_variable_s; +#endif // _di_iki_vocabulary_0001_s_ + +#ifndef _di_iki_vocabulary_0002_s_ #define iki_vocabulary_0002_define "define" #define iki_vocabulary_0002_parameter "parameter" #define iki_vocabulary_0002_define_length 6 #define iki_vocabulary_0002_parameter_length 9 -#endif // _di_iki_vocabulary_0002_ + + extern const f_string_t iki_vocabulary_0002_define_s; + extern const f_string_t iki_vocabulary_0002_parameter_s; +#endif // _di_iki_vocabulary_0002_s_ // @todo: consider IKI-0003 = vocabulary based on context from HTML5 and accessibility-related? @@ -77,14 +91,14 @@ extern "C" { #define f_macro_iki_variable_t_new(status, variable, length) f_macro_string_ranges_t_new(status, variable, length) + #define f_macro_iki_variable_t_resize(status, variable, new_length) f_macro_string_ranges_t_resize(status, variable, new_length) + #define f_macro_iki_variable_t_adjust(status, variable, new_length) f_macro_string_ranges_t_adjust(status, variable, new_length) + #define f_macro_iki_variable_t_delete(status, variable) f_macro_string_ranges_t_delete(status, variable) #define f_macro_iki_variable_t_destroy(status, variable) f_macro_string_ranges_t_destroy(status, variable) #define f_macro_iki_variable_t_delete_simple(variable) f_macro_string_ranges_t_delete_simple(variable) #define f_macro_iki_variable_t_destroy_simple(variable) f_macro_string_ranges_t_destroy_simple(variable) - - #define f_macro_iki_variable_t_resize(status, variable, new_length) f_macro_string_ranges_t_resize(status, variable, new_length) - #define f_macro_iki_variable_t_adjust(status, variable, new_length) f_macro_string_ranges_t_adjust(status, variable, new_length) #endif // _di_iki_variable_t_ /** @@ -103,14 +117,14 @@ extern "C" { #define f_macro_iki_vocabulary_t_new(status, vocabulary, length) f_macro_string_ranges_t_new(status, vocabulary, length) + #define f_macro_iki_vocabulary_t_resize(status, vocabulary, new_length) f_macro_string_ranges_t_resize(status, vocabulary, new_length) + #define f_macro_iki_vocabulary_t_adjust(status, vocabulary, new_length) f_macro_string_ranges_t_adjust(status, vocabulary, new_length) + #define f_macro_iki_vocabulary_t_delete(status, vocabulary) f_macro_string_ranges_t_delete(status, vocabulary) #define f_macro_iki_vocabulary_t_destroy(status, vocabulary) f_macro_string_ranges_t_destroy(status, vocabulary) #define f_macro_iki_vocabulary_t_delete_simple(vocabulary) f_macro_string_ranges_t_delete_simple(vocabulary) #define f_macro_iki_vocabulary_t_destroy_simple(vocabulary) f_macro_string_ranges_t_destroy_simple(vocabulary) - - #define f_macro_iki_vocabulary_t_resize(status, vocabulary, new_length) f_macro_string_ranges_t_resize(status, vocabulary, new_length) - #define f_macro_iki_vocabulary_t_adjust(status, vocabulary, new_length) f_macro_string_ranges_t_adjust(status, vocabulary, new_length) #endif // _di_iki_vocabulary_t_ /** @@ -129,14 +143,14 @@ extern "C" { #define f_macro_iki_vocabularys_t_new(status, content, length) f_macro_string_rangess_t_new(status, content, length) + #define f_macro_iki_vocabularys_t_resize(status, content, new_length) f_macro_string_rangess_t_resize(status, content, new_length) + #define f_macro_iki_vocabularys_t_adjust(status, content, new_length) f_macro_string_rangess_t_adjust(status, content, new_length) + #define f_macro_iki_vocabularys_t_delete(status, content) f_macro_string_rangess_t_delete(status, content) #define f_macro_iki_vocabularys_t_destroy(status, content) f_macro_string_rangess_t_destroy(status, content) #define f_macro_iki_vocabularys_t_delete_simple(content) f_macro_string_rangess_t_delete_simple(content) #define f_macro_iki_vocabularys_t_destroy_simple(content) f_macro_string_rangess_t_destroy_simple(content) - - #define f_macro_iki_vocabularys_t_resize(status, content, new_length) f_macro_string_rangess_t_resize(status, content, new_length) - #define f_macro_iki_vocabularys_t_adjust(status, content, new_length) f_macro_string_rangess_t_adjust(status, content, new_length) #endif // _di_iki_vocabularys_t_ /** @@ -157,14 +171,14 @@ extern "C" { #define f_macro_iki_content_t_new(status, content, length) f_macro_string_ranges_t_new(status, content, length) + #define f_macro_iki_content_t_resize(status, content, new_length) f_macro_string_ranges_t_resize(status, content, new_length) + #define f_macro_iki_content_t_adjust(status, content, new_length) f_macro_string_ranges_t_adjust(status, content, new_length) + #define f_macro_iki_content_t_delete(status, content) f_macro_string_ranges_t_delete(status, content) #define f_macro_iki_content_t_destroy(status, content) f_macro_string_ranges_t_destroy(status, content) #define f_macro_iki_content_t_delete_simple(content) f_macro_string_ranges_t_delete_simple(content) #define f_macro_iki_content_t_destroy_simple(content) f_macro_string_ranges_t_destroy_simple(content) - - #define f_macro_iki_content_t_resize(status, content, new_length) f_macro_string_ranges_t_resize(status, content, new_length) - #define f_macro_iki_content_t_adjust(status, content, new_length) f_macro_string_ranges_t_adjust(status, content, new_length) #endif // _di_iki_content_t_ /** @@ -183,14 +197,14 @@ extern "C" { #define f_macro_iki_contents_t_new(status, content, length) f_macro_string_rangess_t_new(status, content, length) + #define f_macro_iki_contents_t_resize(status, content, new_length) f_macro_string_rangess_t_resize(status, content, new_length) + #define f_macro_iki_contents_t_adjust(status, content, new_length) f_macro_string_rangess_t_adjust(status, content, new_length) + #define f_macro_iki_contents_t_delete(status, content) f_macro_string_rangess_t_delete(status, content) #define f_macro_iki_contents_t_destroy(status, content) f_macro_string_rangess_t_destroy(status, content) #define f_macro_iki_contents_t_delete_simple(content) f_macro_string_rangess_t_delete_simple(content) #define f_macro_iki_contents_t_destroy_simple(content) f_macro_string_rangess_t_destroy_simple(content) - - #define f_macro_iki_contents_t_resize(status, content, new_length) f_macro_string_rangess_t_resize(status, content, new_length) - #define f_macro_iki_contents_t_adjust(status, content, new_length) f_macro_string_rangess_t_adjust(status, content, new_length) #endif // _di_iki_contents_t_ /** diff --git a/level_0/f_iki/c/iki.h b/level_0/f_iki/c/iki.h index eb2063c..8a1611d 100644 --- a/level_0/f_iki/c/iki.h +++ b/level_0/f_iki/c/iki.h @@ -137,7 +137,7 @@ extern "C" { * F_data_not on success, but there were no IKI vocabulary names found. * F_data_not_eos on success and EOS was reached, but there were no IKI vocabulary names found. * F_data_not_stop on success and stop point was reached, but there were no IKI vocabulary names found. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if a string length is too large to store in the buffer. */ diff --git a/level_0/f_iki/data/build/settings b/level_0/f_iki/data/build/settings index 5dde159..882f7c0 100644 --- a/level_0/f_iki/data/build/settings +++ b/level_0/f_iki/data/build/settings @@ -19,8 +19,8 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lf_memory -lf_utf -build_sources_library iki.c private-iki.c +build_libraries-individual -lf_memory -lf_string -lf_utf +build_sources_library iki.c iki-common.c private-iki.c build_sources_program build_sources_headers iki.h iki-common.h build_sources_script diff --git a/level_0/f_limit/c/limit-common.h b/level_0/f_limit/c/limit-common.h index 4a9d6dd..6433e77 100644 --- a/level_0/f_limit/c/limit-common.h +++ b/level_0/f_limit/c/limit-common.h @@ -49,28 +49,26 @@ extern "C" { #define f_limit_values_t_initialize { 0, 0, 0 } - #define f_macro_limit_values_t_adjust(status, values, new_length) f_macro_memory_structure_t_adjust(status, values, f_limit_value_t, new_length) + #define f_macro_limit_values_t_clear(values) f_macro_memory_structure_clear(values); - #define f_macro_limit_values_t_clear(values) f_macro_memory_structure_t_clear(values) + #define f_macro_limit_values_t_new(status, values, length) f_macro_memory_structure_new(status, values, f_limit_value_t, length); - #define f_macro_limit_values_t_decimate(status, values) f_macro_memory_structure_decimate(status, values, sizeof(f_limit_value_t)); - #define f_macro_limit_values_t_decimate_by(status, values, amount) f_macro_memory_structure_decimate_by(status, values, sizeof(f_limit_value_t), amount); + #define f_macro_limit_values_t_resize(status, values, length) f_macro_memory_structure_resize(status, values, f_limit_value_t, length); + #define f_macro_limit_values_t_adjust(status, values, length) f_macro_memory_structure_adjust(status, values, f_limit_value_t, length); - #define f_macro_limit_values_t_decrease(status, values) f_macro_memory_structure_decrease(status, values, sizeof(f_limit_value_t)); - #define f_macro_limit_values_t_decrease_by(status, values, amount) f_macro_memory_structure_decrease_by(status, values, sizeof(f_limit_value_t), amount); + #define f_macro_limit_values_t_delete(status, values) f_macro_memory_structure_delete(status, values, f_limit_value_t); + #define f_macro_limit_values_t_destroy(status, values) f_macro_memory_structure_destroy(status, values, f_limit_value_t); - #define f_macro_limit_values_t_delete(status, values) f_macro_memory_structure_t_delete(status, values, f_limit_value_t) - #define f_macro_limit_values_t_delete_simple(values) f_macro_memory_structure_t_delete_simple(values, f_limit_value_t) + #define f_macro_limit_values_t_delete_simple(values) f_macro_memory_structure_delete_simple(values, f_limit_value_t); + #define f_macro_limit_values_t_destroy_simple(values) f_macro_memory_structure_destroy_simple(values, f_limit_value_t); - #define f_macro_limit_values_t_destroy(status, values) f_macro_memory_structure_t_destroy(status, values, f_limit_value_t) - #define f_macro_limit_values_t_destroy_simple(values) f_macro_memory_structure_t_destroy_simple(values, f_limit_value_t) + #define f_macro_limit_values_t_increase(status, values) f_macro_memory_structure_increase(status, values, f_limit_value_t); + #define f_macro_limit_values_t_decrease(status, values) f_macro_memory_structure_decrease(status, values, f_limit_value_t); + #define f_macro_limit_values_t_decimate(status, values) f_macro_memory_structure_decimate(status, values, f_limit_value_t); - #define f_macro_limit_values_t_increase(status, values) f_macro_memory_structure_increase(status, values, sizeof(f_limit_value_t)); - #define f_macro_limit_values_t_increase_by(status, values, amount) f_macro_memory_structure_increase_by(status, values, sizeof(f_limit_value_t), amount); - - #define f_macro_limit_values_t_new(status, values, length) f_macro_memory_structure_t_new(status, values, f_limit_value_t, length) - - #define f_macro_limit_values_t_resize(status, values, new_length) f_macro_memory_structure_t_resize(status, values, f_limit_value_t, new_length) + #define f_macro_limit_values_t_increase_by(status, values, amount) f_macro_memory_structure_increase_by(status, values, f_limit_value_t, amount); + #define f_macro_limit_values_t_decrease_by(status, values, amount) f_macro_memory_structure_decrease_by(status, values, f_limit_value_t, amount); + #define f_macro_limit_values_t_decimate_by(status, values, amount) f_macro_memory_structure_decimate_by(status, values, f_limit_value_t, amount); #endif // _di_f_limit_values_t_ /** @@ -109,28 +107,26 @@ extern "C" { #define f_limit_sets_t_initialize { 0, 0, 0 } - #define f_macro_limit_sets_t_adjust(status, sets, length) f_macro_memory_structure_t_adjust(status, sets, f_limit_set_t, length) + #define f_macro_limit_sets_t_clear(sets) f_macro_memory_structure_clear(sets); - #define f_macro_limit_sets_t_clear(sets) f_macro_memory_structure_t_clear(sets) + #define f_macro_limit_sets_t_new(status, sets, length) f_macro_memory_structure_new(status, sets, f_limit_set_t, length); - #define f_macro_limit_sets_t_decimate(status, sets) f_macro_memory_structure_decimate(status, sets, f_limit_set_t); - #define f_macro_limit_sets_t_decimate_by(status, sets, amount) f_macro_memory_structure_decimate_by(status, sets, f_limit_set_t, amount); + #define f_macro_limit_sets_t_resize(status, sets, length) f_macro_memory_structure_resize(status, sets, f_limit_set_t, length); + #define f_macro_limit_sets_t_adjust(status, sets, length) f_macro_memory_structure_adjust(status, sets, f_limit_set_t, length); - #define f_macro_limit_sets_t_decrease(status, sets) f_macro_memory_structure_decrease(status, sets, f_limit_set_t); - #define f_macro_limit_sets_t_decrease_by(status, sets, amount) f_macro_memory_structure_decrease_by(status, sets, f_limit_set_t, amount); + #define f_macro_limit_sets_t_delete(status, sets) f_macro_memory_structure_delete(status, sets, f_limit_set_t); + #define f_macro_limit_sets_t_destroy(status, sets) f_macro_memory_structure_destroy(status, sets, f_limit_set_t); - #define f_macro_limit_sets_t_delete(status, sets) f_macro_memory_structure_t_delete(status, sets, f_limit_set_t) - #define f_macro_limit_sets_t_delete_simple(sets) f_macro_memory_structure_t_delete_simple(sets, f_limit_set_t) + #define f_macro_limit_sets_t_delete_simple(sets) f_macro_memory_structure_delete_simple(sets, f_limit_set_t); + #define f_macro_limit_sets_t_destroy_simple(sets) f_macro_memory_structure_destroy_simple(sets, f_limit_set_t); - #define f_macro_limit_sets_t_destroy(status, sets) f_macro_memory_structure_t_destroy(status, sets, f_limit_set_t) - #define f_macro_limit_sets_t_destroy_simple(sets) f_macro_memory_structure_t_destroy_simple(sets, f_limit_set_t) + #define f_macro_limit_sets_t_increase(status, sets) f_macro_memory_structure_increase(status, sets, f_limit_set_t); + #define f_macro_limit_sets_t_decrease(status, sets) f_macro_memory_structure_decrease(status, sets, f_limit_set_t); + #define f_macro_limit_sets_t_decimate(status, sets) f_macro_memory_structure_decimate(status, sets, f_limit_set_t); - #define f_macro_limit_sets_t_increase(status, sets) f_macro_memory_structure_increase(status, sets, f_limit_set_t); #define f_macro_limit_sets_t_increase_by(status, sets, amount) f_macro_memory_structure_increase_by(status, sets, f_limit_set_t, amount); - - #define f_macro_limit_sets_t_new(status, sets, length) f_macro_memory_structure_t_new(status, sets, f_limit_set_t, length) - - #define f_macro_limit_sets_t_resize(status, sets, new_length) f_macro_memory_structure_t_resize(status, sets, f_limit_set_t, new_length) + #define f_macro_limit_sets_t_decrease_by(status, sets, amount) f_macro_memory_structure_decrease_by(status, sets, f_limit_set_t, amount); + #define f_macro_limit_sets_t_decimate_by(status, sets, amount) f_macro_memory_structure_decimate_by(status, sets, f_limit_set_t, amount); #endif // _di_f_limit_sets_t_ #ifdef __cplusplus diff --git a/level_0/f_memory/c/memory-common.h b/level_0/f_memory/c/memory-common.h index 3d8f9ce..5e17694 100644 --- a/level_0/f_memory/c/memory-common.h +++ b/level_0/f_memory/c/memory-common.h @@ -54,93 +54,83 @@ extern "C" { #endif // _di_f_memory_default_allocation_step_ /** - * Adjust a generic memory structure. - * - * status: the status to return. - * structure: the structure to operate on. - * type: the structure type. - * length: the new size of the array. - */ -#ifndef _di_f_macro_memory_structure_t_adjust_ - #define f_macro_memory_structure_t_adjust(status, structure, type, length) \ - status = f_memory_structure_adjust(length, sizeof(type), (void **) &structure.array, &structure.used, &structure.size); -#endif // _di_f_macro_memory_structure_t_adjust_ - -/** * Reset a generic memory stucture to 0 (clear all values). * * This does not deallocate memory, be certain that memory is not allocated before calling this to avoid potential memory leaks. * * structure: the structure to operate on. */ -#ifndef _di_f_macro_memory_structure_t_clear_ - #define f_macro_memory_structure_t_clear(structure) \ +#ifndef _di_f_macro_memory_structure_clear_ + #define f_macro_memory_structure_clear(structure) \ structure.array = 0; \ structure.size = 0; \ structure.used = 0; -#endif // _di_f_macro_memory_structure_t_clear_ +#endif // _di_f_macro_memory_structure_clear_ /** - * Decimate a generic memory structure. + * Create a new generic memory structure. + * + * This does not deallocate memory, be certain that memory is not allocated before calling this to avoid potential memory leaks. * * status: the status to return. * structure: the structure to operate on. * type: the structure type. + * length: the new size of the array. */ -#ifndef _di_f_macro_memory_structure_decimate_ - #define f_macro_memory_structure_decimate(status, structure, type) \ - status = f_memory_structure_decimate(sizeof(type), (void **) &structure.array, &structure.used, &structure.size); -#endif // _di_f_macro_memory_structure_decimate_ +#ifndef _di_f_macro_memory_structure_new_ + #define f_macro_memory_structure_new(status, structure, type, length) \ + status = f_memory_structure_new(length, sizeof(type), (void **) &structure.array, &structure.used, &structure.size); +#endif // _di_f_macro_memory_structure_new_ /** - * Decimate a generic memory structure by some amount. + * Resize a generic memory structure. * * status: the status to return. * structure: the structure to operate on. * type: the structure type. - * amount: the amount to decimate the size of the array by. + * length: the new size of the array. */ -#ifndef _di_f_macro_memory_structure_decimate_by_ - #define f_macro_memory_structure_decimate_by(status, structure, type, amount) \ - status = f_memory_structure_decimate_by(amount, sizeof(type), (void **) &structure.array, &structure.used, &structure.size); -#endif // _di_f_macro_memory_structure_decimate_by_ +#ifndef _di_f_macro_memory_structure_resize_ + #define f_macro_memory_structure_resize(status, structure, type, length) \ + status = f_memory_structure_resize(length, sizeof(type), (void **) &structure.array, &structure.used, &structure.size); +#endif // _di_f_macro_memory_structure_resize_ /** - * Decrease a generic memory structure. + * Adjust a generic memory structure. * * status: the status to return. * structure: the structure to operate on. * type: the structure type. + * length: the new size of the array. */ -#ifndef _di_f_macro_memory_structure_decrease_ - #define f_macro_memory_structure_decrease(status, structure, type) \ - status = f_memory_structure_decrease(sizeof(type), (void **) &structure.array, &structure.used, &structure.size); -#endif // _di_f_macro_memory_structure_decrease_ +#ifndef _di_f_macro_memory_structure_adjust_ + #define f_macro_memory_structure_adjust(status, structure, type, length) \ + status = f_memory_structure_adjust(length, sizeof(type), (void **) &structure.array, &structure.used, &structure.size); +#endif // _di_f_macro_memory_structure_adjust_ /** - * Decrease a generic memory structure by some amount. + * Delete a generic memory structure. * * status: the status to return. * structure: the structure to operate on. * type: the structure type. - * amount: the amount to decrease the size of the array by. */ -#ifndef _di_f_macro_memory_structure_decrease_by_ - #define f_macro_memory_structure_decrease_by(status, structure, type, amount) \ - status = f_memory_structure_decrease_by(amount, sizeof(type), (void **) &structure.array, &structure.used, &structure.size); -#endif // _di_f_macro_memory_structure_decrease_by_ +#ifndef _di_f_macro_memory_structure_delete_ + #define f_macro_memory_structure_delete(status, structure, type) \ + status = f_memory_structure_delete(sizeof(type), (void **) &structure.array, &structure.used, &structure.size); +#endif // _di_f_macro_memory_structure_delete_ /** - * Delete a generic memory structure. + * Destroy a generic memory structure. * * status: the status to return. * structure: the structure to operate on. * type: the structure type. */ -#ifndef _di_f_macro_memory_structure_t_delete_ - #define f_macro_memory_structure_t_delete(status, structure, type) \ - status = f_memory_structure_delete(sizeof(type), (void **) &structure.array, &structure.used, &structure.size); -#endif // _di_f_macro_memory_structure_t_delete_ +#ifndef _di_f_macro_memory_structure_destroy_ + #define f_macro_memory_structure_destroy(status, structure, type) \ + status = f_memory_structure_destroy(sizeof(type), (void **) &structure.array, &structure.used, &structure.size); +#endif // _di_f_macro_memory_structure_destroy_ /** * Delete a generic memory structure. @@ -148,45 +138,57 @@ extern "C" { * structure: the structure to operate on. * type: the structure type. */ -#ifndef _di_f_macro_memory_structure_t_delete_simple_ - #define f_macro_memory_structure_t_delete_simple(structure, type) \ +#ifndef _di_f_macro_memory_structure_delete_simple_ + #define f_macro_memory_structure_delete_simple(structure, type) \ f_memory_structure_delete(sizeof(type), (void **) &structure.array, &structure.used, &structure.size); -#endif // _di_f_macro_memory_structure_t_delete_simple_ +#endif // _di_f_macro_memory_structure_delete_simple_ /** * Destroy a generic memory structure. * + * structure: the structure to operate on. + * type: the structure type. + */ +#ifndef _di_f_macro_memory_structure_destroy_simple_ + #define f_macro_memory_structure_destroy_simple(structure, type) \ + f_memory_structure_destroy(sizeof(type), (void **) &structure.array, &structure.used, &structure.size); +#endif // _di_f_macro_memory_structure_destroy_simple_ + +/** + * Increase a generic memory structure. + * * status: the status to return. * structure: the structure to operate on. * type: the structure type. */ -#ifndef _di_f_macro_memory_structure_destroy_ - #define f_macro_memory_structure_t_destroy(status, structure, type) \ - status = f_memory_structure_destroy(sizeof(type), (void **) &structure.array, &structure.used, &structure.size); -#endif // _di_f_macro_memory_structure_destroy_ +#ifndef _di_f_macro_memory_structure_increase_ + #define f_macro_memory_structure_increase(status, structure, type) \ + status = f_memory_structure_increase(sizeof(type), (void **) &structure.array, &structure.used, &structure.size); +#endif // _di_f_macro_memory_structure_increase_ /** - * Destroy a generic memory structure. + * Decrease a generic memory structure. * + * status: the status to return. * structure: the structure to operate on. * type: the structure type. */ -#ifndef _di_f_macro_memory_structure_t_destroy_simple_ - #define f_macro_memory_structure_t_destroy_simple(structure, type) \ - f_memory_structure_destroy(sizeof(type), (void **) &structure.array, &structure.used, &structure.size); -#endif // _di_f_macro_memory_structure_t_destroy_simple_ +#ifndef _di_f_macro_memory_structure_decrease_ + #define f_macro_memory_structure_decrease(status, structure, type) \ + status = f_memory_structure_decrease(sizeof(type), (void **) &structure.array, &structure.used, &structure.size); +#endif // _di_f_macro_memory_structure_decrease_ /** - * Increase a generic memory structure. + * Decimate a generic memory structure. * * status: the status to return. * structure: the structure to operate on. * type: the structure type. */ -#ifndef _di_f_macro_memory_structure_increase_ - #define f_macro_memory_structure_increase(status, structure, type) \ - status = f_memory_structure_increase(sizeof(type), (void **) &structure.array, &structure.used, &structure.size); -#endif // _di_f_macro_memory_structure_increase_ +#ifndef _di_f_macro_memory_structure_decimate_ + #define f_macro_memory_structure_decimate(status, structure, type) \ + status = f_memory_structure_decimate(sizeof(type), (void **) &structure.array, &structure.used, &structure.size); +#endif // _di_f_macro_memory_structure_decimate_ /** * Increase a generic memory structure by some amount. @@ -202,32 +204,30 @@ extern "C" { #endif // _di_f_macro_memory_structure_increase_by_ /** - * Create a new generic memory structure. - * - * This does not deallocate memory, be certain that memory is not allocated before calling this to avoid potential memory leaks. + * Decrease a generic memory structure by some amount. * * status: the status to return. * structure: the structure to operate on. * type: the structure type. - * length: the new size of the array. + * amount: the amount to decrease the size of the array by. */ -#ifndef _di_f_macro_memory_structure_t_new_ - #define f_macro_memory_structure_t_new(status, structure, type, length) \ - status = f_memory_structure_new(length, sizeof(type), (void **) &structure.array, &structure.used, &structure.size); -#endif // _di_f_macro_memory_structure_t_new_ +#ifndef _di_f_macro_memory_structure_decrease_by_ + #define f_macro_memory_structure_decrease_by(status, structure, type, amount) \ + status = f_memory_structure_decrease_by(amount, sizeof(type), (void **) &structure.array, &structure.used, &structure.size); +#endif // _di_f_macro_memory_structure_decrease_by_ /** - * Resize a generic memory structure. + * Decimate a generic memory structure by some amount. * * status: the status to return. * structure: the structure to operate on. * type: the structure type. - * length: the new size of the array. + * amount: the amount to decimate the size of the array by. */ -#ifndef _di_f_macro_memory_structure_t_resize_ - #define f_macro_memory_structure_t_resize(status, structure, type, length) \ - status = f_memory_structure_resize(length, sizeof(type), (void **) &structure.array, &structure.used, &structure.size); -#endif // _di_f_macro_memory_structure_t_resize_ +#ifndef _di_f_macro_memory_structure_decimate_by_ + #define f_macro_memory_structure_decimate_by(status, structure, type, amount) \ + status = f_memory_structure_decimate_by(amount, sizeof(type), (void **) &structure.array, &structure.used, &structure.size); +#endif // _di_f_macro_memory_structure_decimate_by_ /** * Reset a generic memory stuctures to 0 (clear all values). @@ -237,7 +237,7 @@ extern "C" { * structures: the structures to operate on. */ #ifndef _di_f_macro_memory_structures_clear_ - #define f_macro_memory_structures_t_clear(structures) \ + #define f_macro_memory_structures_clear(structures) \ structures.array = 0; \ structures.size = 0; \ structures.used = 0; @@ -254,8 +254,8 @@ extern "C" { * length: the new size of the array. */ #ifndef _di_f_macro_memory_structures_new_ - #define f_macro_memory_structures_t_new(status, structures, type_structures, length) \ - f_macro_memory_structures_t_clear(structures) \ + #define f_macro_memory_structures_new(status, structures, type_structures, length) \ + f_macro_memory_structures_clear(structures) \ status = f_memory_new((void **) & structures.array, sizeof(type_structures), length); \ if (status == F_none) { \ structures.size = length; \ @@ -264,6 +264,58 @@ extern "C" { #endif // _di_f_macro_memory_structures_new_ /** + * Resize a generic memory structures. + * + * status: the status to return. + * structures: the structures to operate on. + * type_stucture: the structure type. + * type_stuctures: the structures type. + * length: the new size of the array. + * length_variable: the data type of the length variable. + */ +#ifndef _di_f_macro_memory_structures_resize_ + #define f_macro_memory_structures_resize(status, structures, type_structure, type_structures, length, length_variable) \ + status = F_none; \ + if (length < structures.size) { \ + for (length_variable _macro__i = structures.size - length; _macro__i < structures.size; ++_macro__i) { \ + f_macro_memory_structure_delete(status, structures.array[_macro__i], type_structure); \ + if (status != F_none) break; \ + } \ + } \ + if (status == F_none) status = f_memory_resize((void **) & structures.array, sizeof(type_structures), structures.size, length); \ + if (status == F_none) { \ + structures.size = length; \ + if (structures.used > structures.size) structures.used = length; \ + } +#endif // _di_f_macro_memory_structures_resize_ + +/** + * Adjust a generic memory structures. + * + * status: the status to return. + * structures: the structures to operate on. + * type_stucture: the structure type. + * type_stuctures: the structures type. + * length: the new size of the array. + * length_variable: the data type of the length variable. + */ +#ifndef _di_f_macro_memory_structures_adjust_ + #define f_macro_memory_structures_adjust(status, structures, type_structure, type_structures, length, length_variable) \ + status = F_none; \ + if (length < structures.size) { \ + for (length_variable _macro__i = structures.size - length; _macro__i < structures.size; ++_macro__i) { \ + f_macro_memory_structure_destroy(status, structures.array[_macro__i], type_structure); \ + if (status != F_none) break; \ + } \ + } \ + if (status == F_none) status = f_memory_adjust((void **) & structures.array, sizeof(type_structures), structures.size, length); \ + if (status == F_none) { \ + structures.size = length; \ + if (structures.used > structures.size) structures.used = length; \ + } +#endif // _di_f_macro_memory_structures_adjust_ + +/** * Delete a generic memory structures. * * status: the status to return. @@ -272,12 +324,12 @@ extern "C" { * type_stuctures: the structures type. */ #ifndef _di_f_macro_memory_structures_delete_ - #define f_macro_memory_structures_t_delete(status, structures, type_structure, type_structures) \ + #define f_macro_memory_structures_delete(status, structures, type_structure, type_structures) \ status = F_none; \ structures.used = structures.size; \ while (structures.used) { \ structures.used--; \ - f_macro_memory_structure_t_delete(status, structures.array[structures.used], type_structure); \ + f_macro_memory_structure_delete(status, structures.array[structures.used], type_structure); \ if (status != F_none) break; \ } \ if (status == F_none) status = f_memory_delete((void **) & structures.array, sizeof(type_structures), structures.size); \ @@ -293,12 +345,12 @@ extern "C" { * type_stuctures: the structures type. */ #ifndef _di_f_macro_memory_structures_destroy_ - #define f_macro_memory_structures_t_destroy(status, structures, type_structure, type_structures) \ + #define f_macro_memory_structures_destroy(status, structures, type_structure, type_structures) \ status = F_none; \ structures.used = structures.size; \ while (structures.used) { \ structures.used--; \ - f_macro_memory_structure_t_destroy(status, structures.array[structures.used], type_structure); \ + f_macro_memory_structure_destroy(status, structures.array[structures.used], type_structure); \ if (status != F_none) break; \ } \ if (status == F_none) status = f_memory_destroy((void **) & structures.array, sizeof(type_structures), structures.size); \ @@ -313,11 +365,11 @@ extern "C" { * type_stuctures: the structures type. */ #ifndef _di_f_macro_memory_structures_delete_simple_ - #define f_macro_memory_structures_t_delete_simple(structures, type_structure, type_structures) \ + #define f_macro_memory_structures_delete_simple(structures, type_structure, type_structures) \ structures.used = structures.size; \ while (structures.used) { \ structures.used--; \ - f_macro_memory_structure_t_delete_simple(structures.array[structures.used], type_structure); \ + f_macro_memory_structure_delete_simple(structures.array[structures.used], type_structure); \ } \ f_memory_delete((void **) & structures.array, sizeof(type_structures), structures.size); \ structures.size = 0; @@ -331,69 +383,17 @@ extern "C" { * type_stuctures: the structures type. */ #ifndef _di_f_macro_memory_structures_destroy_simple_ - #define f_macro_memory_structures_t_destroy_simple(structures, type_structure, type_structures) \ + #define f_macro_memory_structures_destroy_simple(structures, type_structure, type_structures) \ structures.used = structures.size; \ while (structures.used) { \ structures.used--; \ - f_macro_memory_structure_t_destroy_simple(structures.array[structures.used], type_structure); \ + f_macro_memory_structure_destroy_simple(structures.array[structures.used], type_structure); \ } \ f_memory_destroy((void **) & structures.array, sizeof(type_structures), structures.size); \ structures.size = 0; #endif // _di_f_macro_memory_structures_destroy_simple_ /** - * Resize a generic memory structures. - * - * status: the status to return. - * structures: the structures to operate on. - * type_stucture: the structure type. - * type_stuctures: the structures type. - * new_length: the new size of the array. - * length_variable: the data type of the length variable. - */ -#ifndef _di_f_macro_memory_structures_resize_ - #define f_macro_memory_structures_t_resize(status, structures, type_structure, type_structures, new_length, length_variable) \ - status = F_none; \ - if (new_length < structures.size) { \ - for (length_variable _macro__i = structures.size - new_length; _macro__i < structures.size; _macro__i++) { \ - f_macro_memory_structure_t_delete(status, structures.array[_macro__i], type_structure); \ - if (status != F_none) break; \ - } \ - } \ - if (status == F_none) status = f_memory_resize((void **) & structures.array, sizeof(type_structures), structures.size, new_length); \ - if (status == F_none) { \ - structures.size = new_length; \ - if (structures.used > structures.size) structures.used = new_length; \ - } -#endif // _di_f_macro_memory_structures_resize_ - -/** - * Adjust a generic memory structures. - * - * status: the status to return. - * structures: the structures to operate on. - * type_stucture: the structure type. - * type_stuctures: the structures type. - * new_length: the new size of the array. - * length_variable: the data type of the length variable. - */ -#ifndef _di_f_macro_memory_structures_adjust_ - #define f_macro_memory_structures_t_adjust(status, structures, type_structure, type_structures, new_length, length_variable) \ - status = F_none; \ - if (new_length < structures.size) { \ - for (length_variable _macro__i = structures.size - new_length; _macro__i < structures.size; _macro__i++) { \ - f_macro_memory_structure_t_destroy(status, structures.array[_macro__i], type_structure); \ - if (status != F_none) break; \ - } \ - } \ - if (status == F_none) status = f_memory_adjust((void **) & structures.array, sizeof(type_structures), structures.size, new_length); \ - if (status == F_none) { \ - structures.size = new_length; \ - if (structures.used > structures.size) structures.used = new_length; \ - } -#endif // _di_f_macro_memory_structures_adjust_ - -/** * Provide a macro for calling other macros for incrementing a buffer. * * If the used + step is greater than size, then increase by step_default. @@ -406,7 +406,7 @@ extern "C" { * structures: the structures to operate on. * step: the step to increase by, must be less than or equal to step_default. * step_default: the default step to increase by if memory allows. - * macro_resize: the resize structure macro to call that excepts the exact arguments: (status, structure, new_length). + * macro_resize: the resize structure macro to call that excepts the exact arguments: (status, structure, length). * error_too_large: the error status to return when f_array_length_t_size would be exceeded. */ #ifndef _di_f_macro_memory_structure_macro_increment_ diff --git a/level_0/f_memory/c/memory.c b/level_0/f_memory/c/memory.c index 7495ff1..e2de9ce 100644 --- a/level_0/f_memory/c/memory.c +++ b/level_0/f_memory/c/memory.c @@ -38,7 +38,7 @@ extern "C" { if (result) { if (result == EINVAL) return F_status_set_error(F_parameter); - return F_status_set_error(F_memory_allocation); + return F_status_set_error(F_memory_not); } // uint8_t * is of a data size size of 1, casting it to uint8_t should result in a single-length increment. @@ -123,7 +123,7 @@ extern "C" { return F_none; } - return F_status_set_error(F_memory_allocation); + return F_status_set_error(F_memory_not); } #endif // _di_f_memory_new_ diff --git a/level_0/f_memory/c/memory.h b/level_0/f_memory/c/memory.h index dc938f0..3d02a6d 100644 --- a/level_0/f_memory/c/memory.h +++ b/level_0/f_memory/c/memory.h @@ -48,7 +48,7 @@ extern "C" { * * @return * F_none on success. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * * @see calloc() @@ -74,7 +74,7 @@ extern "C" { * * @return * F_none on success. - * F_memory_allocation (with error bit) on allocation error. + * F_memory_not (with error bit) on allocation error. * F_parameter (with error bit) if a parameter is invalid. * * @see posix_memalign() @@ -149,7 +149,7 @@ extern "C" { * * @return * F_none on success. - * F_memory_allocation (with error bit) on allocation error. + * F_memory_not (with error bit) on allocation error. * F_parameter (with error bit) if a parameter is invalid. * * @see calloc() @@ -175,7 +175,7 @@ extern "C" { * * @return * F_none on success. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * * @see calloc() diff --git a/level_0/f_memory/c/memory_structure.h b/level_0/f_memory/c/memory_structure.h index 4ef8831..ff94e4f 100644 --- a/level_0/f_memory/c/memory_structure.h +++ b/level_0/f_memory/c/memory_structure.h @@ -67,7 +67,7 @@ extern "C" { * F_none on success. * F_data_not on success, but size is already 0 so there is nothing to do. * - * F_memory_reallocation (with error bit) on allocation error. + * F_memory_not (with error bit) on out of memory. * * @see calloc() * @see free() @@ -99,7 +99,7 @@ extern "C" { * F_none on success. * F_data_not on success, but amount is 0 so there is nothing to do. * - * F_memory_reallocation (with error bit) on allocation error. + * F_memory_not (with error bit) on out of memory. * * @see calloc() * @see free() diff --git a/level_0/f_memory/c/private-memory.c b/level_0/f_memory/c/private-memory.c index 515db9a..e618d6a 100644 --- a/level_0/f_memory/c/private-memory.c +++ b/level_0/f_memory/c/private-memory.c @@ -15,7 +15,7 @@ extern "C" { if (*pointer) { void *new_pointer = 0; - if (length_old > 0) { + if (length_old) { if (length_new < length_old) { // uint8_t * is of a data size size of 1, casting it to uint8_t should result in a single-length increment. @@ -37,24 +37,24 @@ extern "C" { } if (new_pointer) { - if (new_pointer != *pointer) { - if (length_new > length_old) { + if (length_new > length_old) { - // uint8_t * is of a data size size of 1, casting it to bool should result in a single-length increment. - // this is done to avoid problems with (void *) having arithmetic issues. - memset(((uint8_t *) new_pointer) + (type_size * length_old), 0, type_size * (length_new - length_old)); - } - - *pointer = new_pointer; + // uint8_t * is of a data size size of 1, casting it to bool should result in a single-length increment. + // this is done to avoid problems with (void *) having arithmetic issues. + memset(((uint8_t *) new_pointer) + (type_size * length_old), 0, type_size * (length_new - length_old)); } + *pointer = new_pointer; + return F_none; } } - else if (length_new > 0) { + else if (length_new) { *pointer = calloc(type_size, length_new); if (*pointer) { + memset(*pointer, 0, type_size * length_new); + return F_none; } } @@ -89,24 +89,24 @@ extern "C" { } if (new_pointer) { - if (new_pointer != *pointer) { - if (length_new > length_old) { + if (length_new > length_old) { - // uint8_t * is of a data size size of 1, casting it to bool should result in a single-length increment. - // this is done to avoid problems with (void *) having arithmetic issues. - memset(((uint8_t *) new_pointer) + (type_size * length_old), 0, type_size * (length_new - length_old)); - } - - *pointer = new_pointer; + // uint8_t * is of a data size size of 1, casting it to bool should result in a single-length increment. + // this is done to avoid problems with (void *) having arithmetic issues. + memset(((uint8_t *) new_pointer) + (type_size * length_old), 0, type_size * (length_new - length_old)); } + *pointer = new_pointer; + return F_none; } } - else if (length_new > 0) { + else if (length_new) { *pointer = calloc(type_size, length_new); if (*pointer) { + memset(*pointer, 0, type_size * length_new); + return F_none; } } diff --git a/level_0/f_path/c/path-common.c b/level_0/f_path/c/path-common.c new file mode 100644 index 0000000..c111452 --- /dev/null +++ b/level_0/f_path/c/path-common.c @@ -0,0 +1,89 @@ +#include "path.h" +#include "private-path.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_f_path_defines_ + const f_string_t f_path_separator_s = f_string_ascii_slash_forward; + const f_string_t f_path_separator_current_s = f_string_ascii_period; + const f_string_t f_path_separator_variable_s = f_string_ascii_colon; + + const f_string_t f_path_extension_separator_s = f_string_ascii_period; + + const f_string_t f_path_environment_s = f_path_environment; + const f_string_t f_path_home_wildcard_s = f_string_ascii_tilde; + const f_string_t f_path_present_working_s = f_path_present_working; + const f_string_t f_path_present_working_old_s = f_path_present_working_old; +#endif // _di_f_path_defines_ + +#ifdef _di_path_tree_s_ + + // KFS Root Level + extern const f_string_t f_path_tree_devices_s = f_path_tree_devices; + extern const f_string_t f_path_tree_external_s = f_path_tree_external; + extern const f_string_t f_path_tree_libraries_s = f_path_tree_libraries; + extern const f_string_t f_path_tree_programs_s = f_path_tree_programs; + extern const f_string_t f_path_tree_temporary_s = f_path_tree_temporary; + extern const f_string_t f_path_tree_home_s = f_path_tree_home; + extern const f_string_t f_path_tree_run_s = f_path_tree_run; + extern const f_string_t f_path_tree_binary_s = f_path_tree_binary; + + // FHS Root Level + extern const f_string_t f_path_tree_boot_s = f_path_tree_boot; + extern const f_string_t f_path_tree_hardware_s = f_path_tree_hardware; + extern const f_string_t f_path_tree_processes_s = f_path_tree_processes; + extern const f_string_t f_path_tree_system_s = f_path_tree_system; + + // Program Level + extern const f_string_t f_path_tree_programs_public_s = f_path_tree_programs_public; + extern const f_string_t f_path_tree_programs_system_s = f_path_tree_programs_system; + extern const f_string_t f_path_tree_programs_remote_s = f_path_tree_programs_remote; + extern const f_string_t f_path_tree_programs_services_s = f_path_tree_programs_services; + extern const f_string_t f_path_tree_programs_toolchain_s = f_path_tree_programs_toolchain; + extern const f_string_t f_path_tree_programs_users_s = f_path_tree_programs_users; + extern const f_string_t f_path_tree_programs_susers_s = f_path_tree_programs_susers; + extern const f_string_t f_path_tree_programs_boot_s = f_path_tree_programs_boot; + extern const f_string_t f_path_tree_programs_sboot_s = f_path_tree_programs_sboot; + + // Library Level + extern const f_string_t f_path_tree_libraries_public_s = f_path_tree_libraries_public; + extern const f_string_t f_path_tree_libraries_system_s = f_path_tree_libraries_system; + extern const f_string_t f_path_tree_libraries_remote_s = f_path_tree_libraries_remote; + extern const f_string_t f_path_tree_libraries_services_s = f_path_tree_libraries_services; + extern const f_string_t f_path_tree_libraries_toolchain_s = f_path_tree_libraries_toolchain; + extern const f_string_t f_path_tree_libraries_users_s = f_path_tree_libraries_users; + extern const f_string_t f_path_tree_libraries_boot_s = f_path_tree_libraries_boot; + + // Home Level + extern const f_string_t f_path_tree_home_services_s = f_path_tree_home_services; + extern const f_string_t f_path_tree_home_share_s = f_path_tree_home_share; + extern const f_string_t f_path_tree_home_users_s = f_path_tree_home_users; + extern const f_string_t f_path_tree_home_websites_s = f_path_tree_home_websites; + + // System Level + extern const f_string_t f_path_tree_system_logs_s = f_path_tree_system_logs; + extern const f_string_t f_path_tree_system_settings_s = f_path_tree_system_settings; + extern const f_string_t f_path_tree_system_data_s = f_path_tree_system_data; + extern const f_string_t f_path_tree_system_variables_s = f_path_tree_system_variables; + + // Temporary Level + extern const f_string_t f_path_tree_temporary_public_s = f_path_tree_temporary_public; + extern const f_string_t f_path_tree_temporary_services_s = f_path_tree_temporary_services; + extern const f_string_t f_path_tree_temporary_users_s = f_path_tree_temporary_users; + extern const f_string_t f_path_tree_temporary_variables_s = f_path_tree_temporary_variables; + + // Private User Directories + extern const f_string_t f_path_user_downloads_s = f_path_user_downloads; + extern const f_string_t f_path_user_desktop_s = f_path_user_desktop; + extern const f_string_t f_path_user_private_s = f_path_user_private; + extern const f_string_t f_path_user_settings_s = f_path_user_settings; + extern const f_string_t f_path_user_data_s = f_path_user_data; + extern const f_string_t f_path_user_temporary_s = f_path_user_temporary; + extern const f_string_t f_path_user_shared_s = f_path_user_shared; +#endif // _di_path_tree_s_ + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_0/f_path/c/path-common.h b/level_0/f_path/c/path-common.h index 7177cde..ab6686d 100644 --- a/level_0/f_path/c/path-common.h +++ b/level_0/f_path/c/path-common.h @@ -32,20 +32,20 @@ extern "C" { * The path extension separator is for the separator that separates the main part of a file path with its extension (which is generally a '.'). */ #ifndef _di_f_path_defines_ - #define f_path_separator "/" - #define f_path_separator_current "." - #define f_path_separator_variable ":" + #define f_path_separator f_string_ascii_slash_forward + #define f_path_separator_current f_string_ascii_period + #define f_path_separator_variable f_string_ascii_colon #define f_path_separator_length 1 #define f_path_separator_current_length 1 #define f_path_separator_variable_length 1 - #define f_path_extension_separator "." + #define f_path_extension_separator f_string_ascii_period #define f_path_extension_separator_length 1 #define f_path_environment "PATH" - #define f_path_home_wildcard "~" + #define f_path_home_wildcard f_string_ascii_tilde #define f_path_present_working "PWD" #define f_path_present_working_old "OLDPWD" @@ -54,20 +54,232 @@ extern "C" { #define f_path_present_working_length 3 #define f_path_present_working_old_length 6 - #define f_path_max PATH_MAX + #define f_path_length_max PATH_MAX - const static f_string_t f_path_separator_s = f_path_separator; - const static f_string_t f_path_separator_current_s = f_path_separator_current; - const static f_string_t f_path_separator_variable_s = f_path_separator_variable; + extern const f_string_t f_path_separator_s; + extern const f_string_t f_path_separator_current_s; + extern const f_string_t f_path_separator_variable_s; - #define f_path_extension_separator_s f_path_separator_current_s + extern const f_string_t f_path_extension_separator_s; - const static f_string_t f_path_environment_s = f_path_environment; - const static f_string_t f_path_home_wildcard_s = f_path_home_wildcard; - const static f_string_t f_path_present_working_s = f_path_present_working; - const static f_string_t f_path_present_working_old_s = f_path_present_working_old; + extern const f_string_t f_path_environment_s; + extern const f_string_t f_path_home_wildcard_s; + extern const f_string_t f_path_present_working_s; + extern const f_string_t f_path_present_working_old_s; #endif // _di_f_path_defines_ +/** + * KFS Filesystem Paths + * @todo outdated, needs to be updated. + */ +#ifndef _di_path_tree_kevux_standard_ + + // disable the FHS default paths + #define _di_path_tree_hierarchy_standard_ + + // KFS Root Level + #define f_path_tree_devices f_path_separator "devices" + #define f_path_tree_external f_path_separator "external" + #define f_path_tree_libraries f_path_separator "libraries" + #define f_path_tree_programs f_path_separator "programs" + #define f_path_tree_temporary f_path_separator "temporary" + #define f_path_tree_home f_path_separator "home" + #define f_path_tree_run f_path_separator "run" + #define f_path_tree_binary f_path_separator ".system" + + // Kernel Level + #define f_path_tree_boot f_path_devices f_path_separator "boot" + #define f_path_tree_hardware f_path_devices f_path_separator "devices" + #define f_path_tree_processes f_path_devices f_path_separator "processes" + #define f_path_tree_system f_path_devices f_path_separator "system" + + // Program Level + #define f_path_tree_programs_public f_path_programs f_path_separator "public" + #define f_path_tree_programs_system f_path_programs f_path_separator "system" + #define f_path_tree_programs_remote f_path_programs f_path_separator "remote" + #define f_path_tree_programs_services f_path_programs f_path_separator "targets" + #define f_path_tree_programs_toolchain f_path_programs f_path_separator "toolchain" + #define f_path_tree_programs_users f_path_programs f_path_separator "users" + #define f_path_tree_programs_susers f_path_programs f_path_separator "users" + #define f_path_tree_programs_boot f_path_boot f_path_separator "programs" + #define f_path_tree_programs_sboot f_path_boot f_path_separator "programs" + + // Library Level + #define f_path_tree_libraries_public f_path_libraries f_path_separator "public" + #define f_path_tree_libraries_system f_path_libraries f_path_separator "system" + #define f_path_tree_libraries_remote f_path_libraries f_path_separator "remote" + #define f_path_tree_libraries_services f_path_libraries f_path_separator "targets" + #define f_path_tree_libraries_toolchain f_path_libraries f_path_separator "toolchain" + #define f_path_tree_libraries_users f_path_libraries f_path_separator "users" + #define f_path_tree_libraries_boot f_path_boot f_path_separator "libraries" + + // Home Level + #define f_path_tree_home_services f_path_home f_path_separator "services" + #define f_path_tree_home_share f_path_home f_path_separator "share" + #define f_path_tree_home_users f_path_home f_path_separator "users" + #define f_path_tree_home_websites f_path_home f_path_separator "websites" + + // System Level + #define f_path_tree_system_logs f_path_system f_path_separator "logs" + #define f_path_tree_system_settings f_path_system f_path_separator "settings" + #define f_path_tree_system_data f_path_system f_path_separator "data" + #define f_path_tree_system_variables f_path_system f_path_separator "variables" // for backwards FHS support only, use of this directory is considered bad practice for KFS, use f_path_temporary_variables instead + + // Temporary Level + #define f_path_tree_temporary_public f_path_temporary f_path_separator "public" + #define f_path_tree_temporary_services f_path_temporary f_path_separator "services" + #define f_path_tree_temporary_users f_path_temporary f_path_separator "users" + #define f_path_tree_temporary_variables f_path_temporary f_path_separator "variables" + + // Private User Directories + #define f_path_tree_user_downloads "downloads" + #define f_path_tree_user_desktop "desktop" + #define f_path_tree_user_private "private" + #define f_path_tree_user_settings "settings" + #define f_path_tree_user_data "data" + #define f_path_tree_user_temporary "temporary" + #define f_path_tree_user_shared "shared" +#endif // _di_path_tree_kevux_standard_ + +/** + * FHS Filesystem Paths + * @todo outdated, needs to be updated. + */ +#ifndef _di_path_tree_hierarchy_standard_ + + // disable the kevux standard default paths + #define _di_path_tree_kevux_standard_ + + // KFS Root Level + #define f_path_tree_devices f_path_separator + #define f_path_tree_external f_path_separator "mnt" + #define f_path_tree_libraries f_path_separator + #define f_path_tree_programs f_path_separator + #define f_path_tree_temporary f_path_separator + #define f_path_tree_home f_path_separator "home" + #define f_path_tree_run f_path_separator "run" + #define f_path_tree_binary f_path_separator ".system" + + // FHS Root Level + #define f_path_tree_boot f_path_separator "boot" + #define f_path_tree_hardware f_path_separator "dev" + #define f_path_tree_processes f_path_separator "proc" + #define f_path_tree_system f_path_separator "sysfs" + + // Program Level + #define f_path_tree_programs_public f_path_separator "usr" f_path_separator "bin" + #define f_path_tree_programs_system f_path_separator "usr" f_path_separator "sbin" + #define f_path_tree_programs_remote f_path_separator "usr" f_path_separator "bin" + #define f_path_tree_programs_services f_path_separator "usr" f_path_separator "sbin" + #define f_path_tree_programs_toolchain f_path_separator "usr" f_path_separator "bin" + #define f_path_tree_programs_users f_path_separator "usr" f_path_separator "local" f_path_separator "bin" + #define f_path_tree_programs_susers f_path_separator "usr" f_path_separator "local" f_path_separator "sbin" + #define f_path_tree_programs_boot f_path_separator "bin" + #define f_path_tree_programs_sboot f_path_separator "sbin" + + // Library Level + #define f_path_tree_libraries_public f_path_separator "usr" f_path_separator "lib" + #define f_path_tree_libraries_system f_path_separator "usr" f_path_separator "lib" + #define f_path_tree_libraries_remote f_path_separator "usr" f_path_separator "lib" + #define f_path_tree_libraries_services f_path_separator "usr" f_path_separator "lib" + #define f_path_tree_libraries_toolchain f_path_separator "usr" f_path_separator "lib" + #define f_path_tree_libraries_users f_path_separator "usr" f_path_separator "local" f_path_separator "lib" + #define f_path_tree_libraries_boot f_path_separator "lib" + + // Home Level + #define f_path_tree_home_services f_path_separator "srv" + #define f_path_tree_home_share f_path_separator "" + #define f_path_tree_home_users f_path_home + #define f_path_tree_home_websites f_path_separator "srv" f_path_separator "www" + + // System Level + #define f_path_tree_system_logs f_path_separator "var" f_path_separator "log" + #define f_path_tree_system_settings f_path_separator "etc" + #define f_path_tree_system_data f_path_separator "usr" f_path_separator "share" + #define f_path_tree_system_variables f_path_separator "var" + + // Temporary Level + #define f_path_tree_temporary_public f_path_separator "tmp" + #define f_path_tree_temporary_services f_path_separator "tmp" + #define f_path_tree_temporary_users f_path_separator "tmp" + #define f_path_tree_temporary_variables f_path_separator "var" f_path_separator "tmp" + + // Private User Directories + #define f_path_tree_user_downloads "downloads" + #define f_path_tree_user_desktop "desktop" + #define f_path_tree_user_private "" + #define f_path_tree_user_settings "" + #define f_path_tree_user_data "" + #define f_path_tree_user_temporary "" + #define f_path_tree_user_shared "" +#endif // _di_path_tree_hierarchy_standard_ + +#ifdef _di_path_tree_s_ + + // KFS Root Level + extern const f_string_t f_path_tree_devices; + extern const f_string_t f_path_tree_external; + extern const f_string_t f_path_tree_libraries; + extern const f_string_t f_path_tree_programs; + extern const f_string_t f_path_tree_temporary; + extern const f_string_t f_path_tree_home; + extern const f_string_t f_path_tree_run; + extern const f_string_t f_path_tree_binary; + + // FHS Root Level + extern const f_string_t f_path_tree_boot; + extern const f_string_t f_path_tree_hardware; + extern const f_string_t f_path_tree_processes; + extern const f_string_t f_path_tree_system; + + // Program Level + extern const f_string_t f_path_tree_programs_public; + extern const f_string_t f_path_tree_programs_system; + extern const f_string_t f_path_tree_programs_remote; + extern const f_string_t f_path_tree_programs_services; + extern const f_string_t f_path_tree_programs_toolchain; + extern const f_string_t f_path_tree_programs_users; + extern const f_string_t f_path_tree_programs_susers; + extern const f_string_t f_path_tree_programs_boot; + extern const f_string_t f_path_tree_programs_sboot; + + // Library Level + extern const f_string_t f_path_tree_libraries_public; + extern const f_string_t f_path_tree_libraries_system; + extern const f_string_t f_path_tree_libraries_remote; + extern const f_string_t f_path_tree_libraries_services; + extern const f_string_t f_path_tree_libraries_toolchain; + extern const f_string_t f_path_tree_libraries_users; + extern const f_string_t f_path_tree_libraries_boot; + + // Home Level + extern const f_string_t f_path_tree_home_services; + extern const f_string_t f_path_tree_home_share; + extern const f_string_t f_path_tree_home_users; + extern const f_string_t f_path_tree_home_websites; + + // System Level + extern const f_string_t f_path_tree_system_logs; + extern const f_string_t f_path_tree_system_settings; + extern const f_string_t f_path_tree_system_data; + extern const f_string_t f_path_tree_system_variables; + + // Temporary Level + extern const f_string_t f_path_tree_temporary_public; + extern const f_string_t f_path_tree_temporary_services; + extern const f_string_t f_path_tree_temporary_users; + extern const f_string_t f_path_tree_temporary_variables; + + // Private User Directories + extern const f_string_t f_path_user_downloads; + extern const f_string_t f_path_user_desktop; + extern const f_string_t f_path_user_private; + extern const f_string_t f_path_user_settings; + extern const f_string_t f_path_user_data; + extern const f_string_t f_path_user_temporary; + extern const f_string_t f_path_user_shared; +#endif // _di_path_tree_s_ + #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_path/c/path.c b/level_0/f_path/c/path.c index 474a3ce..2e173c5 100644 --- a/level_0/f_path/c/path.c +++ b/level_0/f_path/c/path.c @@ -55,9 +55,9 @@ extern "C" { if (!path) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - char buffer[f_path_max]; + char buffer[f_path_length_max]; - if (!getcwd(buffer, f_path_max)) { + if (!getcwd(buffer, f_path_length_max)) { if (errno == EACCES) return F_status_set_error(F_access_denied); if (errno == EFAULT) return F_status_set_error(F_buffer); if (errno == EINVAL) return F_status_set_error(F_parameter); @@ -73,7 +73,7 @@ extern "C" { return private_f_path_real(buffer, path); } - const f_string_length_t length = strnlen(buffer, f_path_max); + const f_string_length_t length = strnlen(buffer, f_path_length_max); if (length + 1 > path->size) { f_status_t status = F_none; diff --git a/level_0/f_path/c/path.h b/level_0/f_path/c/path.h index 5246acb..96a0aae 100644 --- a/level_0/f_path/c/path.h +++ b/level_0/f_path/c/path.h @@ -88,7 +88,7 @@ extern "C" { * Otherwise, this gets the path as it appears to be. * @param path * The (allocated) file path. - * This will have a max size of f_path_max + 1. + * This will have a max size of f_path_length_max + 1. * This will be NULL terminated at real->used + 1. * * @return @@ -99,7 +99,6 @@ extern "C" { * F_directory (with error bit) if a supposed directory in path is not actually a directory. * F_input_output (with error bit) on I/O error. * F_loop (with error bit) on loop error. - * F_memory_allocation (with error bit) on allocation error. * F_memory_not (with error bit) if out of memory. * F_name (with error bit) on path name error. * F_parameter (with error bit) if a parameter is invalid. @@ -137,14 +136,14 @@ extern "C" { * This does check to see if the path exists or not (path must exist). * This processes all relative parts. * This processes all symbolic links. - * This has a max size of f_path_max + 1. + * This has a max size of f_path_length_max + 1. * * @param path * The source path to determine what the real path is. * This is a NULL terminated string. * @param real * The (allocated) real file path. - * This will have a max size of f_path_max + 1. + * This will have a max size of f_path_length_max + 1. * This will be NULL terminated at real->used + 1. * * @return @@ -155,7 +154,6 @@ extern "C" { * F_directory (with error bit) if a supposed directory in path is not actually a directory. * F_input_output (with error bit) on I/O error. * F_loop (with error bit) on loop error. - * F_memory_allocation (with error bit) on allocation error. * F_memory_not (with error bit) if out of memory. * F_name (with error bit) on path name error. * F_parameter (with error bit) if a parameter is invalid. diff --git a/level_0/f_path/c/path_filesystem.h b/level_0/f_path/c/path_filesystem.h deleted file mode 100644 index c04016b..0000000 --- a/level_0/f_path/c/path_filesystem.h +++ /dev/null @@ -1,163 +0,0 @@ -/** - * FLL - Level 0 - * - * Project: Path - * API Version: 0.5 - * Licenses: lgplv2.1 - * - * Provide locations to all filesystem paths, for low level hardcoding - * - * FIXME: this is very outdated due to numerous structural changes while I was developing turtle kevux. - */ -#ifndef _F_path_filesystem_h -#define _F_path_filesystem_h - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * KFS Filesystem Paths - */ -#ifdef _di_path_kevux_standard_ - // disable the FHS default paths - #define _di_path_filesystem_hierarchy_standard_ - - // KFS Root Level - #define f_path_devices "/devices" - #define f_path_external "/external" - #define f_path_libraries "/libraries" - #define f_path_programs "/programs" - #define f_path_temporary "/temporary" - #define f_path_home "/home" - #define f_path_run "/run" - #define f_path_binary "/.system" - - // Kernel Level - #define f_path_boot f_path_devices"/boot" - #define f_path_hardware f_path_devices"/devices" - #define f_path_processes f_path_devices"/processes" - #define f_path_system f_path_devices"/system" - - // Program Level - #define f_path_programs_public f_path_programs"/public" - #define f_path_programs_system f_path_programs"/system" - #define f_path_programs_remote f_path_programs"/remote" - #define f_path_programs_services f_path_programs"/targets" - #define f_path_programs_toolchain f_path_programs"/toolchain" - #define f_path_programs_users f_path_programs"/users" - #define f_path_programs_susers f_path_programs"/users" - #define f_path_programs_boot f_path_boot"/programs" - #define f_path_programs_sboot f_path_boot"/programs" - - // Library Level - #define f_path_libraries_public f_path_libraries"/public" - #define f_path_libraries_system f_path_libraries"/system" - #define f_path_libraries_remote f_path_libraries"/remote" - #define f_path_libraries_services f_path_libraries"/targets" - #define f_path_libraries_toolchain f_path_libraries"/toolchain" - #define f_path_libraries_users f_path_libraries"/users" - #define f_path_libraries_boot f_path_boot"/libraries" - - // Home Level - #define f_path_home_services f_path_home"/services" - #define f_path_home_share f_path_home"/share" - #define f_path_home_users f_path_home"/users" - #define f_path_home_websites f_path_home"/websites" - - // System Level - #define f_path_system_logs f_path_system"/logs" - #define f_path_system_settings f_path_system"/settings" - #define f_path_system_data f_path_system"/data" - #define f_path_system_variables f_path_system"/variables" // for backwards FHS support only, use of this directory is considered bad practice for KFS, use f_path_temporary_variables instead - - // Temporary Level - #define f_path_temporary_public f_path_temporary"/public" - #define f_path_temporary_services f_path_temporary"/services" - #define f_path_temporary_users f_path_temporary"/users" - #define f_path_temporary_variables f_path_temporary"/variables" - - // Private User Directories - #define f_path_user_downloads "downloads" - #define f_path_user_desktop "desktop" - #define f_path_user_private "private" - #define f_path_user_settings "settings" - #define f_path_user_data "data" - #define f_path_user_temporary "temporary" - #define f_path_user_shared "shared" -#endif // _di_path_kevux_standard_ - -// FHS Filesystem Paths -#ifndef _di_path_filesystem_hierarchy_standard_ - // disable the kevux standard default paths - #define _di_path_kevux_standard_ - - // KFS Root Level - #define f_path_devices "/" - #define f_path_external "/mnt" - #define f_path_libraries "/" - #define f_path_programs "/" - #define f_path_temporary "/" - #define f_path_home "/home" - #define f_path_run "/run" - #define f_path_binary "/.system" - - // FHS Root Level - #define f_path_boot "/boot" - #define f_path_hardware "/dev" - #define f_path_processes "/proc" - #define f_path_system "/sysfs" - - // Program Level - #define f_path_programs_public "/usr/bin" - #define f_path_programs_system "/usr/sbin" - #define f_path_programs_remote "/usr/bin" - #define f_path_programs_services "/usr/sbin" - #define f_path_programs_toolchain "/usr/bin" - #define f_path_programs_users "/usr/local/bin" - #define f_path_programs_susers "/usr/local/sbin" - #define f_path_programs_boot "/bin" - #define f_path_programs_sboot "/sbin" - - // Library Level - #define f_path_libraries_public "/usr/lib" - #define f_path_libraries_system "/usr/lib" - #define f_path_libraries_remote "/usr/lib" - #define f_path_libraries_services "/usr/lib" - #define f_path_libraries_toolchain "/usr/lib" - #define f_path_libraries_users "/usr/local/lib" - #define f_path_libraries_boot "/lib" - - // Home Level - #define f_path_home_services "/srv" - #define f_path_home_share "/" - #define f_path_home_users f_path_home - #define f_path_home_websites "/srv/www" - - // System Level - #define f_path_system_logs "/var/log" - #define f_path_system_settings "/etc" - #define f_path_system_data "/usr/share" - #define f_path_system_variables "/var" - - // Temporary Level - #define f_path_temporary_public "/tmp" - #define f_path_temporary_services "/tmp" - #define f_path_temporary_users "/tmp" - #define f_path_temporary_variables "/var/tmp" - - // Private User Directories - #define f_path_user_downloads "downloads" - #define f_path_user_desktop "desktop" - #define f_path_user_private "" - #define f_path_user_settings "" - #define f_path_user_data "" - #define f_path_user_temporary "" - #define f_path_user_shared "" -#endif // _di_path_filesystem_hierarchy_standard_ - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // _F_path_filesystem_h diff --git a/level_0/f_path/c/path_fll.h b/level_0/f_path/c/path_fll.h deleted file mode 100644 index 7552517..0000000 --- a/level_0/f_path/c/path_fll.h +++ /dev/null @@ -1,55 +0,0 @@ -/** - * FLL - Level 0 - * - * Project: Path - * API Version: 0.5 - * Licenses: lgplv2.1 - * - * Provide locations to all fll-specific paths - * It is planned to have this file auto-generated from a single /etc/fll file such that one file can be used for all supported languages. - * - * @fixme this is very outdated due to numerous structural changes while I was developing turtle kevux. - */ -#ifndef _F_path_fll_h -#define _F_path_fll_h - -// fll-0 includes -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * FLL Paths - * - * @todo don't forget to completely restructure the paths layout before 1.0.0 is released - */ -#ifndef _di_fll_paths_ - #define f_path_fll_base f_path_system_settings "/fll" // directory - #define f_path_fll_settings "settings" // directory - #define f_path_fll_packages "packages" // directory - #define f_path_fll_patches "patches" // directory - #define f_path_fll_archive "archive" // directory - #define f_path_fll_groups "groups" // directory - #define f_path_fll_licenses "licenses" // directory - #define f_path_fll_global "global" // file - #define f_path_fll_paths "paths" // file - #define f_path_fll_listing "listing" // file - #define f_path_fll_headers "headers" // file - #define f_path_fll_libraries "libraries" // file - #define f_path_fll_programs "programs" // file - #define f_path_fll_scripts "scripts" // file - #define f_path_fll_fakefile "fakefile" // file -#endif // _di_fll_paths_ - -#ifndef _di_fll_file_endings_ - #define f_fll_file_ending_package ".pkg" - #define f_fll_file_ending_patch ".patch" -#endif // _di_fll_file_endings_ - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // _F_path_fll_h diff --git a/level_0/f_path/c/private-path.c b/level_0/f_path/c/private-path.c index 191d0ba..3550f39 100644 --- a/level_0/f_path/c/private-path.c +++ b/level_0/f_path/c/private-path.c @@ -7,7 +7,7 @@ extern "C" { #if !defined(_di_f_path_current_) || !defined(_di_f_path_real_) f_status_t private_f_path_real(const f_string_t path, f_string_dynamic_t *real) { - char buffer[f_path_max]; + char buffer[f_path_length_max]; if (!realpath(path, buffer)) { if (errno == EACCES) return F_status_set_error(F_access_denied); @@ -22,7 +22,7 @@ extern "C" { return F_status_set_error(F_failure); } - const f_string_length_t length = strnlen(buffer, f_path_max); + const f_string_length_t length = strnlen(buffer, f_path_length_max); if (length + 1 > real->size) { f_status_t status = F_none; diff --git a/level_0/f_path/c/private-path.h b/level_0/f_path/c/private-path.h index 508ed68..7194b97 100644 --- a/level_0/f_path/c/private-path.h +++ b/level_0/f_path/c/private-path.h @@ -24,7 +24,7 @@ extern "C" { * The source path to determine what the real path is. * @param real * The (allocated) real file path. - * This will have a max size of f_path_max + 1. + * This will have a max size of f_path_length_max + 1. * This will be NULL terminated at real->used + 1. * * @return @@ -33,7 +33,6 @@ extern "C" { * F_directory (with error bit) if a supposed directory in path is not actually a directory. * F_input_output (with error bit) on I/O error. * F_loop (with error bit) on loop error. - * F_memory_allocation (with error bit) on allocation error. * F_memory_not (with error bit) if out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_failure (with error bit) for any other error. diff --git a/level_0/f_path/data/build/settings b/level_0/f_path/data/build/settings index bc38323..7dc51aa 100644 --- a/level_0/f_path/data/build/settings +++ b/level_0/f_path/data/build/settings @@ -19,8 +19,8 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lf_memory -build_sources_library path.c private-path.c +build_libraries-individual -lf_memory -lf_string +build_sources_library path.c path-common.c private-path.c build_sources_program build_sources_headers path.h path-common.h build_sources_script diff --git a/level_0/f_print/data/build/settings b/level_0/f_print/data/build/settings index a5ca534..fc8fb43 100644 --- a/level_0/f_print/data/build/settings +++ b/level_0/f_print/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lf_memory +build_libraries-individual -lf_memory -lf_string build_sources_library print.c private-print.c build_sources_program build_sources_headers print.h diff --git a/level_0/f_serialize/c/private-serialize.c b/level_0/f_serialize/c/private-serialize.c index 9ead0b6..592ef02 100644 --- a/level_0/f_serialize/c/private-serialize.c +++ b/level_0/f_serialize/c/private-serialize.c @@ -18,7 +18,7 @@ extern "C" { for (; i < serialize.used; i += width) { width = f_macro_utf_byte_width(serialize.string[i]); - if (serialize.string[i] == f_serialize_simple_splitter) { + if (serialize.string[i] == f_serialize_simple_splitter_s[0]) { if (current == index) { if (start == i) { diff --git a/level_0/f_serialize/c/serialize-common.c b/level_0/f_serialize/c/serialize-common.c new file mode 100644 index 0000000..d839f69 --- /dev/null +++ b/level_0/f_serialize/c/serialize-common.c @@ -0,0 +1,16 @@ +#include "serialize.h" +#include "private-serialize.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_f_serialize_splitter_s_ + const f_string_t f_serialize_simple_splitter_s = f_serialize_simple_splitter; + const f_string_t f_serialize_delimited_splitter_s = f_serialize_delimited_splitter; + const f_string_t f_serialize_delimited_delimiter_s = f_serialize_delimited_delimiter; +#endif // _di_f_serialize_splitter_s_ + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_0/f_serialize/c/serialize-common.h b/level_0/f_serialize/c/serialize-common.h index 1d68fe5..f66d223 100644 --- a/level_0/f_serialize/c/serialize-common.h +++ b/level_0/f_serialize/c/serialize-common.h @@ -16,20 +16,15 @@ extern "C" { #endif -#ifndef _di_f_serialize_splitters_ - #define f_serialize_simple_splitter ':' - #define f_serialize_delimited_splitter '\'' - #define f_serialize_delimited_delimiter '\\' +#ifndef _di_f_serialize_splitter_s_ + #define f_serialize_simple_splitter ":" + #define f_serialize_delimited_splitter "'" + #define f_serialize_delimited_delimiter "\\" - #define f_serialize_simple_splitter_string ":" - #define f_serialize_delimited_splitter_string "'" - #define f_serialize_delimited_delimiter_string "\\" -#endif // _di_f_serialize_splitters_ - -#ifndef _di_f_serialize_default_allocation_step_ - // provide a UTF-8 friendly allocation step. - #define f_serialize_default_allocation_step 4 -#endif // _di_f_serialize_default_allocation_step_ + extern const f_string_t f_serialize_simple_splitter_s; + extern const f_string_t f_serialize_delimited_splitter_s; + extern const f_string_t f_serialize_delimited_delimiter_s; +#endif // _di_f_serialize_splitter_s_ #ifdef __cplusplus } // extern "C" diff --git a/level_0/f_serialize/c/serialize.c b/level_0/f_serialize/c/serialize.c index 97bc994..a658de4 100644 --- a/level_0/f_serialize/c/serialize.c +++ b/level_0/f_serialize/c/serialize.c @@ -23,7 +23,7 @@ extern "C" { serialize->used += value.used; } else { - memcpy(serialize->string + serialize->used, f_serialize_simple_splitter_string, 1); + memcpy(serialize->string + serialize->used, f_serialize_simple_splitter_s, 1); memcpy(serialize->string + serialize->used + 1, value.string, value.used); serialize->used += value.used + 1; } @@ -49,8 +49,8 @@ extern "C" { while (i < serialize.used) { width = f_macro_utf_byte_width(serialize.string[i]); - if (serialize.string[i] == f_serialize_simple_splitter || i + 1 >= serialize.used) { - f_macro_memory_structure_macro_increment(status, (*strings), 1, f_serialize_default_allocation_step, f_macro_string_dynamics_t_resize, F_array_too_large); + if (serialize.string[i] == f_serialize_simple_splitter_s[0] || i + 1 >= serialize.used) { + f_macro_memory_structure_macro_increment(status, (*strings), 1, f_memory_default_allocation_step, f_macro_string_dynamics_t_resize, F_array_too_large); if (F_status_is_error(status)) return status; if (start == i) { @@ -64,7 +64,7 @@ extern "C" { total = (i - start) + 1; } else { - // subtract one from stop point to disclused the f_serialize_simple_splitter character. + // subtract one from stop point to disclused the f_serialize_simple_splitter_s[0] character. total = ((i - 1) - start) + 1; } @@ -115,8 +115,8 @@ extern "C" { for (; i < serialize.used; i += width) { width = f_macro_utf_byte_width(serialize.string[i]); - if (serialize.string[i] == f_serialize_simple_splitter || i + 1 >= serialize.used) { - f_macro_memory_structure_macro_increment(status, (*locations), 1, f_serialize_default_allocation_step, f_macro_string_ranges_t_resize, F_array_too_large); + if (serialize.string[i] == f_serialize_simple_splitter_s[0] || i + 1 >= serialize.used) { + f_macro_memory_structure_macro_increment(status, (*locations), 1, f_memory_default_allocation_step, f_macro_string_ranges_t_resize, F_array_too_large); if (F_status_is_error(status)) return status; if (start == i) { @@ -129,7 +129,7 @@ extern "C" { locations->array[locations->used].stop = i; } else { - // subtract one from stop point to disclused the f_serialize_simple_splitter character. + // subtract one from stop point to disclused the f_serialize_simple_splitter_s[0] character. locations->array[locations->used].start = start; locations->array[locations->used].stop = i - 1; } diff --git a/level_0/f_serialize/c/serialize.h b/level_0/f_serialize/c/serialize.h index a2a494c..ec1502e 100644 --- a/level_0/f_serialize/c/serialize.h +++ b/level_0/f_serialize/c/serialize.h @@ -46,7 +46,7 @@ extern "C" { * * @return * F_none on success. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_f_serialize_simple_ @@ -72,7 +72,7 @@ extern "C" { * F_none on success. * F_complete_not_utf_eos if end of sting is reached before a complete UTF-8 character can be processed. * F_array_too_large (with error bit) if a buffer would exceed maximum length. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_f_serialize_un_simple_ @@ -98,7 +98,7 @@ extern "C" { * F_none on success. * F_complete_not_utf_eos if end of sting is reached before a complete UTF-8 character can be processed. * F_array_too_large (with error bit) if a buffer would exceed memory max length. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_f_serialize_un_simple_map_ @@ -155,7 +155,7 @@ extern "C" { * F_none_eos on success at end of string. * F_data_not_eos if end of string reached before index was reached (dynamic->used is set to 0). * F_complete_not_utf_eos (with error bit) if end of string is reached before a complete UTF-8 character can be processed. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_f_serialize_un_simple_get_ diff --git a/level_0/f_serialize/data/build/settings b/level_0/f_serialize/data/build/settings index 6cfedf4..25e7947 100644 --- a/level_0/f_serialize/data/build/settings +++ b/level_0/f_serialize/data/build/settings @@ -19,8 +19,8 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lf_memory -lf_utf -build_sources_library serialize.c private-serialize.c +build_libraries-individual -lf_memory -lf_string -lf_utf +build_sources_library serialize.c serialize-common.c private-serialize.c build_sources_program build_sources_headers serialize.h serialize-common.h build_sources_script diff --git a/level_0/f_socket/data/build/settings b/level_0/f_socket/data/build/settings index 4883008..c89a599 100644 --- a/level_0/f_socket/data/build/settings +++ b/level_0/f_socket/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lf_memory +build_libraries-individual -lf_memory -lf_string build_sources_library socket.c build_sources_program build_sources_headers socket.h socket-common.h diff --git a/level_0/f_status/c/status.h b/level_0/f_status/c/status.h index 8ec171f..f54aa8c 100644 --- a/level_0/f_status/c/status.h +++ b/level_0/f_status/c/status.h @@ -214,6 +214,8 @@ extern "C" { F_loop_not, F_maybe, F_maybe_not, + F_memory, + F_memory_not, F_minor, F_minor_not, F_moderate, @@ -391,14 +393,6 @@ extern "C" { F_terminated_not_stop, #endif // _di_F_status_buffer_ - #ifndef _di_F_status_memory_ - F_memory, - F_memory_allocation, - F_memory_deallocation, - F_memory_not, - F_memory_reallocation, - #endif // _di_F_status_memory_ - #ifndef _di_F_status_process_ F_process, F_process_not, diff --git a/level_0/f_status/c/status_array.h b/level_0/f_status/c/status_array.h index 5f055e5..85e4be5 100644 --- a/level_0/f_status/c/status_array.h +++ b/level_0/f_status/c/status_array.h @@ -36,18 +36,26 @@ extern "C" { #define f_statuss_t_initialize { 0, 0, 0 } - #define f_macro_statuss_t_clear(statuss) f_macro_memory_structure_t_clear(statuss) + #define f_macro_statuss_t_clear(statuss) f_macro_memory_structure_clear(statuss); - #define f_macro_statuss_t_new(status, statuss, length) f_macro_memory_structure_t_new(status, statuss, f_status_t, length) + #define f_macro_statuss_t_new(status, statuss, length) f_macro_memory_structure_new(status, statuss, f_status_t, length); - #define f_macro_statuss_t_delete(status, statuss) f_macro_memory_structure_t_delete(status, statuss, f_status_t) - #define f_macro_statuss_t_destroy(status, statuss) f_macro_memory_structure_t_destroy(status, statuss, f_status_t) + #define f_macro_statuss_t_resize(status, statuss, length) f_macro_memory_structure_resize(status, statuss, f_status_t, length); + #define f_macro_statuss_t_adjust(status, statuss, length) f_macro_memory_structure_adjust(status, statuss, f_status_t, length); - #define f_macro_statuss_t_delete_simple(statuss) f_macro_memory_structure_t_delete_simple(statuss, f_status_t) - #define f_macro_statuss_t_destroy_simple(statuss) f_macro_memory_structure_t_destroy_simple(statuss, f_status_t) + #define f_macro_statuss_t_delete(status, statuss) f_macro_memory_structure_delete(status, statuss, f_status_t); + #define f_macro_statuss_t_destroy(status, statuss) f_macro_memory_structure_destroy(status, statuss, f_status_t); - #define f_macro_statuss_t_resize(status, statuss, new_length) f_macro_memory_structure_t_resize(status, statuss, f_status_t, new_length) - #define f_macro_statuss_t_adjust(status, statuss, new_length) f_macro_memory_structure_t_adjust(status, statuss, f_status_t, new_length) + #define f_macro_statuss_t_delete_simple(statuss) f_macro_memory_structure_delete_simple(statuss, f_status_t); + #define f_macro_statuss_t_destroy_simple(statuss) f_macro_memory_structure_destroy_simple(statuss, f_status_t); + + #define f_macro_statuss_t_increase(status, statuss) f_macro_memory_structure_increase(status, statuss, f_status_t); + #define f_macro_statuss_t_decrease(status, statuss) f_macro_memory_structure_decrease(status, statuss, f_status_t); + #define f_macro_statuss_t_decimate(status, statuss) f_macro_memory_structure_decimate(status, statuss, f_status_t); + + #define f_macro_statuss_t_increase_by(status, statuss, amount) f_macro_memory_structure_increase_by(status, statuss, f_status_t, amount); + #define f_macro_statuss_t_decrease_by(status, statuss, amount) f_macro_memory_structure_decrease_by(status, statuss, f_status_t, amount); + #define f_macro_statuss_t_decimate_by(status, statuss, amount) f_macro_memory_structure_decimate_by(status, statuss, f_status_t, amount); #endif // _di_f_statuss_t_ /** @@ -67,18 +75,18 @@ extern "C" { #define f_statusss_t_initialize { 0, 0, 0 } - #define f_macro_statusss_t_clear(statusss) f_macro_memory_structures_t_clear(statusss) + #define f_macro_statusss_t_clear(statusss) f_macro_memory_structures_clear(statusss); - #define f_macro_statusss_t_new(status, statusss, length) f_macro_memory_structures_t_new(status, statusss, f_status_t, f_statuss_t, length) + #define f_macro_statusss_t_new(status, statusss, length) f_macro_memory_structures_new(status, statusss, f_status_t, f_statuss_t, length); - #define f_macro_statusss_t_delete(status, statusss) f_macro_memory_structures_t_delete(status, statusss, f_status_t, f_statuss_t) - #define f_macro_statusss_t_destroy(status, statusss) f_macro_memory_structures_t_destroy(status, statusss, f_status_t, f_statuss_t) + #define f_macro_statusss_t_resize(status, statusss, length) f_macro_memory_structures_resize(status, statusss, f_status_t, f_statuss_t, length, f_array_length_t); + #define f_macro_statusss_t_adjust(status, statusss, length) f_macro_memory_structures_adjust(status, statusss, f_status_t, f_statuss_t, length, f_array_length_t); - #define f_macro_statusss_t_delete_simple(statusss) f_macro_memory_structures_t_delete_simple(statusss, f_status_t, f_statuss_t) - #define f_macro_statusss_t_destroy_simple(statusss) f_macro_memory_structures_t_destroy_simple(statusss, f_status_t, f_statuss_t) + #define f_macro_statusss_t_delete(status, statusss) f_macro_memory_structures_delete(status, statusss, f_status_t, f_statuss_t); + #define f_macro_statusss_t_destroy(status, statusss) f_macro_memory_structures_destroy(status, statusss, f_status_t, f_statuss_t); - #define f_macro_statusss_t_resize(status, statusss, new_length) f_macro_memory_structures_t_resize(status, statusss, f_status_t, f_statuss_t, new_length, f_array_length_t) - #define f_macro_statusss_t_adjust(status, statusss, new_length) f_macro_memory_structures_t_adjust(status, statusss, f_status_t, f_statuss_t, new_length, f_array_length_t) + #define f_macro_statusss_t_delete_simple(statusss) f_macro_memory_structures_delete_simple(statusss, f_status_t, f_statuss_t); + #define f_macro_statusss_t_destroy_simple(statusss) f_macro_memory_structures_destroy_simple(statusss, f_status_t, f_statuss_t); #endif // _di_f_statuss_t_ #ifdef __cplusplus diff --git a/level_0/f_string/c/string-common.c b/level_0/f_string/c/string-common.c new file mode 100644 index 0000000..0fac8ca --- /dev/null +++ b/level_0/f_string/c/string-common.c @@ -0,0 +1,122 @@ +#include "string.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_f_string_eol_s_ + const f_string_t f_string_eol_s = f_string_eol; +#endif // _di_f_string_eol_s_ + +#ifndef _di_f_string_empty_s_ + const f_string_t f_string_empty_s = ""; +#endif // _di_f_string_empty_s_ + +#ifndef _di_f_string_placeholder_s_ + const f_string_t f_string_placeholder_s = f_string_placeholder; +#endif // _di_f_string_placeholder_s_ + +#ifndef _di_f_string_space_s_ + const f_string_t f_string_space_s = f_string_space; +#endif // _di_f_string_space_s_ + +#ifndef _di_string_format_s_ + const f_string_t f_string_format_string_s = f_string_format_string; + const f_string_t f_string_format_character_s = f_string_format_character; + const f_string_t f_string_format_wide_string_s = f_string_format_wide_string; + const f_string_t f_string_format_wide_character_s = f_string_format_wide_character; + const f_string_t f_string_format_integer_s = f_string_format_integer; + const f_string_t f_string_format_unsigned_s = f_string_format_unsigned; + const f_string_t f_string_format_digit_s = f_string_format_digit; + const f_string_t f_string_format_float_s = f_string_format_float; + const f_string_t f_string_format_short_integer_s = f_string_format_short_integer; + const f_string_t f_string_format_short_unsigned_s = f_string_format_short_unsigned; + const f_string_t f_string_format_long_integer_s = f_string_format_long_integer; + const f_string_t f_string_format_long_unsigned_s = f_string_format_long_unsigned; + const f_string_t f_string_format_long_double_s = f_string_format_long_double; + const f_string_t f_string_format_long_long_integer_s = f_string_format_long_long_integer; + const f_string_t f_string_format_long_long_unsigned_s = f_string_format_long_long_unsigned; +#endif // _di_string_format_s_ + +#ifndef _di_string_ascii_s_ + const f_string_t f_string_ascii_0_s = f_string_ascii_0; + const f_string_t f_string_ascii_1_s = f_string_ascii_1; + const f_string_t f_string_ascii_2_s = f_string_ascii_2; + const f_string_t f_string_ascii_3_s = f_string_ascii_3; + const f_string_t f_string_ascii_4_s = f_string_ascii_4; + const f_string_t f_string_ascii_5_s = f_string_ascii_5; + const f_string_t f_string_ascii_6_s = f_string_ascii_6; + const f_string_t f_string_ascii_7_s = f_string_ascii_7; + const f_string_t f_string_ascii_8_s = f_string_ascii_8; + const f_string_t f_string_ascii_9_s = f_string_ascii_9; + + const f_string_t f_string_ascii_a_s = f_string_ascii_a; + const f_string_t f_string_ascii_b_s = f_string_ascii_b; + const f_string_t f_string_ascii_c_s = f_string_ascii_c; + const f_string_t f_string_ascii_d_s = f_string_ascii_d; + const f_string_t f_string_ascii_e_s = f_string_ascii_e; + const f_string_t f_string_ascii_f_s = f_string_ascii_f; + const f_string_t f_string_ascii_g_s = f_string_ascii_g; + const f_string_t f_string_ascii_h_s = f_string_ascii_h; + const f_string_t f_string_ascii_i_s = f_string_ascii_i; + const f_string_t f_string_ascii_j_s = f_string_ascii_j; + const f_string_t f_string_ascii_k_s = f_string_ascii_k; + const f_string_t f_string_ascii_l_s = f_string_ascii_l; + const f_string_t f_string_ascii_m_s = f_string_ascii_m; + const f_string_t f_string_ascii_n_s = f_string_ascii_n; + const f_string_t f_string_ascii_o_s = f_string_ascii_o; + const f_string_t f_string_ascii_p_s = f_string_ascii_p; + const f_string_t f_string_ascii_q_s = f_string_ascii_q; + const f_string_t f_string_ascii_r_s = f_string_ascii_r; + const f_string_t f_string_ascii_s_s = f_string_ascii_s; + const f_string_t f_string_ascii_t_s = f_string_ascii_t; + const f_string_t f_string_ascii_u_s = f_string_ascii_u; + const f_string_t f_string_ascii_v_s = f_string_ascii_v; + const f_string_t f_string_ascii_w_s = f_string_ascii_w; + const f_string_t f_string_ascii_x_s = f_string_ascii_x; + const f_string_t f_string_ascii_y_s = f_string_ascii_y; + const f_string_t f_string_ascii_z_s = f_string_ascii_z; + + const f_string_t f_string_ascii_A_s = f_string_ascii_A; + const f_string_t f_string_ascii_B_s = f_string_ascii_B; + const f_string_t f_string_ascii_C_s = f_string_ascii_C; + const f_string_t f_string_ascii_D_s = f_string_ascii_D; + const f_string_t f_string_ascii_E_s = f_string_ascii_E; + const f_string_t f_string_ascii_F_s = f_string_ascii_F; + const f_string_t f_string_ascii_G_s = f_string_ascii_G; + const f_string_t f_string_ascii_H_s = f_string_ascii_H; + const f_string_t f_string_ascii_I_s = f_string_ascii_I; + const f_string_t f_string_ascii_J_s = f_string_ascii_J; + const f_string_t f_string_ascii_K_s = f_string_ascii_K; + const f_string_t f_string_ascii_L_s = f_string_ascii_L; + const f_string_t f_string_ascii_M_s = f_string_ascii_M; + const f_string_t f_string_ascii_N_s = f_string_ascii_N; + const f_string_t f_string_ascii_O_s = f_string_ascii_O; + const f_string_t f_string_ascii_P_s = f_string_ascii_P; + const f_string_t f_string_ascii_Q_s = f_string_ascii_Q; + const f_string_t f_string_ascii_R_s = f_string_ascii_R; + const f_string_t f_string_ascii_S_s = f_string_ascii_S; + const f_string_t f_string_ascii_T_s = f_string_ascii_T; + const f_string_t f_string_ascii_U_s = f_string_ascii_U; + const f_string_t f_string_ascii_V_s = f_string_ascii_V; + const f_string_t f_string_ascii_W_s = f_string_ascii_W; + const f_string_t f_string_ascii_X_s = f_string_ascii_X; + const f_string_t f_string_ascii_Y_s = f_string_ascii_Y; + const f_string_t f_string_ascii_Z_s = f_string_ascii_Z; + + const f_string_t f_string_ascii_comma_s = f_string_ascii_comma; + const f_string_t f_string_ascii_colon_s = f_string_ascii_colon; + const f_string_t f_string_ascii_colon_semi_s = f_string_ascii_colon_semi; + const f_string_t f_string_ascii_equal_s = f_string_ascii_equal; + const f_string_t f_string_ascii_minus_s = f_string_ascii_minus; + const f_string_t f_string_ascii_period_s = f_string_ascii_period; + const f_string_t f_string_ascii_plus_s = f_string_ascii_plus; + const f_string_t f_string_ascii_slash_forward_s = f_string_ascii_slash_forward; + const f_string_t f_string_ascii_slash_backward_s = f_string_ascii_slash_backward; + const f_string_t f_string_ascii_tilde_s = f_string_ascii_tilde; + +#endif // _di_string_ascii_s_ + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_0/f_string/c/string-common.h b/level_0/f_string/c/string-common.h index 4ded583..a3d0d26 100644 --- a/level_0/f_string/c/string-common.h +++ b/level_0/f_string/c/string-common.h @@ -25,49 +25,6 @@ extern "C" { #endif // _en_BUG_strnlen_ /** - * Define the end of line character. - * FLL forbids '\r' and '\r\n' as end of line characters, \r will be silently ignored. - */ -#ifndef _di_f_string_has_eol_ - #define f_string_eol "\n" - #define f_string_eol_length 1 -#endif // _di_f_string_has_eol_ - -#ifndef _di_f_string_has_placeholder_ - #define f_string_placeholder "\0" - #define f_string_placeholder_length 1 -#endif // _di_f_string_has_placeholder_ - -#ifndef _di_f_string_has_space_ - #define f_string_space " " - #define f_string_space_length 1 -#endif // _di_f_string_has_space_ - -#ifndef _di_string_format_pointers_ - #define f_string_format_string "%s" - #define f_string_format_character "%c" - #define f_string_format_wide_string "%ls" - #define f_string_format_wide_character "%lc" - #define f_string_format_integer "%i" - #define f_string_format_unsigned "%u" - #define f_string_format_double "%d" - #define f_string_format_float "%f" - #define f_string_format_short_integer "%hi" - #define f_string_format_short_unsigned "%hu" - #define f_string_format_long_integer "%li" - #define f_string_format_long_unsigned "%lu" - #define f_string_format_long_double "%ld" - #define f_string_format_long_long_integer "%lli" - #define f_string_format_long_long_unsigned "%llu" -#endif // _di_string_format_pointers_ - -#ifndef _di_f_array_length_printf_ - #define f_array_length_printf string_format_integer - #define f_array_length_short_printf string_format_short_integer - #define f_array_length_long_printf string_format_long_integer -#endif // _di_f_array_length_printf_ - -/** * Define the basic string type. * * Dynamic allocation macros are provided, but it is recommended to utilize the f_string_dynamic_t for dynamic allocation. @@ -77,18 +34,16 @@ extern "C" { #define f_string_t_initialize 0 - #define f_macro_string_t_new(status, string, length) status = f_memory_new((void **) & string, sizeof(f_string_t), length) - #define f_macro_string_t_delete(status, string, length) status = f_memory_delete((void **) & string, sizeof(f_string_t), length) - #define f_macro_string_t_destroy(status, string, length) status = f_memory_destroy((void **) & string, sizeof(f_string_t), length) + #define f_macro_string_t_new(status, string, length) status = f_memory_new((void **) & string, sizeof(f_string_t), length); - #define f_macro_string_t_delete_simple(string, length) f_memory_delete((void **) & string, sizeof(f_string_t), length) - #define f_macro_string_t_destroy_simple(string, length) f_memory_destroy((void **) & string, sizeof(f_string_t), length) + #define f_macro_string_t_resize(status, string, length_old, length_new) status = f_memory_resize((void **) & string, sizeof(f_string_t), length_old, length_new); + #define f_macro_string_t_adjust(status, string, length_old, length_new) status = f_memory_adjust((void **) & string, sizeof(f_string_t), length_old, length_new); - #define f_macro_string_t_resize(status, string, old_length, new_length) \ - status = f_memory_resize((void **) & string, sizeof(f_string_t), old_length, new_length) + #define f_macro_string_t_delete(status, string, length) status = f_memory_delete((void **) & string, sizeof(f_string_t), length); + #define f_macro_string_t_destroy(status, string, length) status = f_memory_destroy((void **) & string, sizeof(f_string_t), length); - #define f_macro_string_t_adjust(status, string, old_length, new_length) \ - status = f_memory_adjust((void **) & string, sizeof(f_string_t), old_length, new_length) + #define f_macro_string_t_delete_simple(string, length) f_memory_delete((void **) & string, sizeof(f_string_t), length); + #define f_macro_string_t_destroy_simple(string, length) f_memory_destroy((void **) & string, sizeof(f_string_t), length); #endif // _di_f_string_t_ #ifndef _di_f_string_length_t_ @@ -118,28 +73,26 @@ extern "C" { #define f_string_lengths_t_initialize { 0, 0, 0 } - #define f_macro_string_lengths_t_adjust(status, lengths, length) f_macro_memory_structure_t_adjust(status, lengths, f_string_length_t, length) - - #define f_macro_string_lengths_t_clear(lengths) f_macro_memory_structure_t_clear(lengths) - - #define f_macro_string_lengths_t_decimate(status, lengths) f_macro_memory_structure_decimate(status, lengths, f_string_length_t); - #define f_macro_string_lengths_t_decimate_by(status, lengths, amount) f_macro_memory_structure_decimate_by(status, lengths, f_string_length_t, amount); + #define f_macro_string_lengths_t_clear(string_lengths) f_macro_memory_structures_clear(string_lengths); - #define f_macro_string_lengths_t_decrease(status, lengths) f_macro_memory_structure_decrease(status, lengths, f_string_length_t); - #define f_macro_string_lengths_t_decrease_by(status, lengths, amount) f_macro_memory_structure_decrease_by(status, lengths, f_string_length_t, amount); + #define f_macro_string_lengths_t_new(status, string_lengths, length) f_macro_memory_structure_new(status, string_lengths, f_string_length_t, length); - #define f_macro_string_lengths_t_delete(status, lengths) f_macro_memory_structure_t_delete(status, lengths, f_string_length_t) - #define f_macro_string_lengths_t_delete_simple(lengths) f_macro_memory_structure_t_delete_simple(lengths, f_string_length_t) + #define f_macro_string_lengths_t_resize(status, string_lengths, length) f_macro_memory_structure_resize(status, string_lengths, f_string_length_t, length); + #define f_macro_string_lengths_t_adjust(status, string_lengths, length) f_macro_memory_structure_adjust(status, string_lengths, f_string_length_t, length); - #define f_macro_string_lengths_t_destroy(status, lengths) f_macro_memory_structure_t_destroy(status, lengths, f_string_length_t) - #define f_macro_string_lengths_t_destroy_simple(lengths) f_macro_memory_structure_t_destroy_simple(lengths, f_string_length_t) + #define f_macro_string_lengths_t_delete(status, string_lengths) f_macro_memory_structure_delete(status, string_lengths, f_string_length_t); + #define f_macro_string_lengths_t_destroy(status, string_lengths) f_macro_memory_structure_destroy(status, string_lengths, f_string_length_t); - #define f_macro_string_lengths_t_increase(status, lengths) f_macro_memory_structure_increase(status, lengths, f_string_length_t); - #define f_macro_string_lengths_t_increase_by(status, lengths, amount) f_macro_memory_structure_increase_by(status, lengths, f_string_length_t, amount); + #define f_macro_string_lengths_t_delete_simple(string_lengths) f_macro_memory_structure_delete_simple(string_lengths, f_string_length_t); + #define f_macro_string_lengths_t_destroy_simple(string_lengths) f_macro_memory_structure_destroy_simple(string_lengths, f_string_length_t); - #define f_macro_string_lengths_t_new(status, lengths, length) f_macro_memory_structure_t_new(status, lengths, f_string_length_t, length) + #define f_macro_string_lengths_t_increase(status, string_lengths) f_macro_memory_structure_increase(status, string_lengths, f_string_length_t); + #define f_macro_string_lengths_t_decrease(status, string_lengths) f_macro_memory_structure_decrease(status, string_lengths, f_string_length_t); + #define f_macro_string_lengths_t_decimate(status, string_lengths) f_macro_memory_structure_decimate(status, string_lengths, f_string_length_t); - #define f_macro_string_lengths_t_resize(status, lengths, new_length) f_macro_memory_structure_t_resize(status, lengths, f_string_length_t, new_length) + #define f_macro_string_lengths_t_increase_by(status, string_lengths, amount) f_macro_memory_structure_increase_by(status, string_lengths, f_string_length_t, amount); + #define f_macro_string_lengths_t_decrease_by(status, string_lengths, amount) f_macro_memory_structure_decrease_by(status, string_lengths, f_string_length_t, amount); + #define f_macro_string_lengths_t_decimate_by(status, string_lengths, amount) f_macro_memory_structure_decimate_by(status, string_lengths, f_string_length_t, amount); #endif // _di_f_string_lengths_t_ /** @@ -159,20 +112,252 @@ extern "C" { #define f_string_lengthss_t_initialize { 0, 0, 0 } - #define f_macro_string_lengthss_t_clear(lengthss) f_macro_memory_structures_t_clear(lengthss) + #define f_macro_string_lengthss_t_clear(lengthss) f_macro_memory_structures_clear(lengthss); - #define f_macro_string_lengthss_t_new(status, lengthss, length) f_macro_memory_structures_t_new(status, lengthss, f_string_length_t, length) + #define f_macro_string_lengthss_t_new(status, lengthss, length) f_macro_memory_structures_new(status, lengthss, f_string_length_t, length); - #define f_macro_string_lengthss_t_delete(status, lengthss) f_macro_memory_structures_t_delete(status, lengthss, f_string_length_t, f_string_lengths_t) - #define f_macro_string_lengthss_t_destroy(status, lengthss) f_macro_memory_structures_t_destroy(status, lengthss, f_string_length_t, f_string_lengths_t) + #define f_macro_string_lengthss_t_resize(status, lengthss, length) f_macro_memory_structures_resize(status, lengthss, f_string_length_t, f_string_lengths_t, length, f_array_length_t); + #define f_macro_string_lengthss_t_adjust(status, lengthss, length) f_macro_memory_structures_adjust(status, lengthss, f_string_length_t, f_string_lengths_t, length, f_array_length_t); - #define f_macro_string_lengthss_t_delete_simple(lengthss) f_macro_memory_structures_t_delete_simple(lengthss, f_string_length_t, f_string_lengths_t) - #define f_macro_string_lengthss_t_destroy_simple(lengthss) f_macro_memory_structures_t_destroy_simple(lengthss, f_string_length_t, f_string_lengths_t) + #define f_macro_string_lengthss_t_delete(status, lengthss) f_macro_memory_structures_delete(status, lengthss, f_string_length_t, f_string_lengths_t); + #define f_macro_string_lengthss_t_destroy(status, lengthss) f_macro_memory_structures_destroy(status, lengthss, f_string_length_t, f_string_lengths_t); - #define f_macro_string_lengthss_t_resize(status, lengthss, new_length) f_macro_memory_structures_t_resize(status, lengthss, f_string_length_t, f_string_lengths_t, new_length, f_array_length_t) - #define f_macro_string_lengthss_t_adjust(status, lengthss, new_length) f_macro_memory_structures_t_adjust(status, lengthss, f_string_length_t, f_string_lengths_t, new_length, f_array_length_t) + #define f_macro_string_lengthss_t_delete_simple(lengthss) f_macro_memory_structures_delete_simple(lengthss, f_string_length_t, f_string_lengths_t); + #define f_macro_string_lengthss_t_destroy_simple(lengthss) f_macro_memory_structures_destroy_simple(lengthss, f_string_length_t, f_string_lengths_t); #endif // _di_f_string_lengthss_t_ +/** + * Define the end of line character. + * FLL forbids '\r' and '\r\n' as end of line characters, \r will be silently ignored. + */ +#ifndef _di_f_string_eol_s_ + #define f_string_eol "\n" + #define f_string_eol_length 1 + + const extern f_string_t f_string_eol_s; +#endif // _di_f_string_eol_s_ + +#ifndef _di_f_string_empty_s_ + const extern f_string_t f_string_empty_s; +#endif // _di_f_string_empty_s_ + +#ifndef _di_f_string_placeholder_s_ + #define f_string_placeholder "" + #define f_string_placeholder_length 1 + + const extern f_string_t f_string_placeholder_s; +#endif // _di_f_string_placeholder_s_ + +#ifndef _di_f_string_space_s_ + #define f_string_space " " + #define f_string_space_length 1 + + const extern f_string_t f_string_space_s; +#endif // _di_f_string_space_s_ + +#ifndef _di_string_format_s_ + #define f_string_format_string "%s" + #define f_string_format_character "%c" + #define f_string_format_wide_string "%ls" + #define f_string_format_wide_character "%lc" + #define f_string_format_integer "%i" + #define f_string_format_unsigned "%u" + #define f_string_format_digit "%d" + #define f_string_format_float "%f" + #define f_string_format_short_integer "%hi" + #define f_string_format_short_unsigned "%hu" + #define f_string_format_long_integer "%li" + #define f_string_format_long_unsigned "%lu" + #define f_string_format_long_double "%ld" + #define f_string_format_long_long_integer "%lli" + #define f_string_format_long_long_unsigned "%llu" + + extern const f_string_t f_string_format_string_s; + extern const f_string_t f_string_format_character_s; + extern const f_string_t f_string_format_wide_string_s; + extern const f_string_t f_string_format_wide_character_s; + extern const f_string_t f_string_format_integer_s; + extern const f_string_t f_string_format_unsigned_s; + extern const f_string_t f_string_format_digit_s; + extern const f_string_t f_string_format_float_s; + extern const f_string_t f_string_format_short_integer_s; + extern const f_string_t f_string_format_short_unsigned_s; + extern const f_string_t f_string_format_long_integer_s; + extern const f_string_t f_string_format_long_unsigned_s; + extern const f_string_t f_string_format_long_double_s; + extern const f_string_t f_string_format_long_long_integer_s; + extern const f_string_t f_string_format_long_long_unsigned_s; +#endif // _di_string_format_s_ + +#ifndef _di_f_array_length_printf_ + #define f_array_length_printf string_format_integer + #define f_array_length_short_printf string_format_short_integer + #define f_array_length_long_printf string_format_long_integer +#endif // _di_f_array_length_printf_ + +/** + * Provide a set of ASCII strings. + * + * This is not intended to be exhaustive or language-specific. + * Instead, this is for very common uses such as converting a hex-digit string into a number. + * These are standardized not be the language, per-say, but instead by the specific standard (such as hexidecimal). + * + * @todo provide most (printable) ASCII-characters. + */ +#ifndef _di_string_ascii_s_ + #define f_string_ascii_0 "0" + #define f_string_ascii_1 "1" + #define f_string_ascii_2 "2" + #define f_string_ascii_3 "3" + #define f_string_ascii_4 "4" + #define f_string_ascii_5 "5" + #define f_string_ascii_6 "6" + #define f_string_ascii_7 "7" + #define f_string_ascii_8 "8" + #define f_string_ascii_9 "9" + + #define f_string_ascii_a "a" + #define f_string_ascii_b "b" + #define f_string_ascii_c "c" + #define f_string_ascii_d "d" + #define f_string_ascii_e "e" + #define f_string_ascii_f "f" + #define f_string_ascii_g "g" + #define f_string_ascii_h "h" + #define f_string_ascii_i "i" + #define f_string_ascii_j "j" + #define f_string_ascii_k "k" + #define f_string_ascii_l "l" + #define f_string_ascii_m "m" + #define f_string_ascii_n "n" + #define f_string_ascii_o "o" + #define f_string_ascii_p "p" + #define f_string_ascii_q "q" + #define f_string_ascii_r "r" + #define f_string_ascii_s "s" + #define f_string_ascii_t "t" + #define f_string_ascii_u "u" + #define f_string_ascii_v "v" + #define f_string_ascii_w "w" + #define f_string_ascii_x "x" + #define f_string_ascii_y "y" + #define f_string_ascii_z "z" + + #define f_string_ascii_A "A" + #define f_string_ascii_B "B" + #define f_string_ascii_C "C" + #define f_string_ascii_D "D" + #define f_string_ascii_E "E" + #define f_string_ascii_F "F" + #define f_string_ascii_G "G" + #define f_string_ascii_H "H" + #define f_string_ascii_I "I" + #define f_string_ascii_J "J" + #define f_string_ascii_K "K" + #define f_string_ascii_L "L" + #define f_string_ascii_M "M" + #define f_string_ascii_N "N" + #define f_string_ascii_O "O" + #define f_string_ascii_P "P" + #define f_string_ascii_Q "Q" + #define f_string_ascii_R "R" + #define f_string_ascii_S "S" + #define f_string_ascii_T "T" + #define f_string_ascii_U "U" + #define f_string_ascii_V "V" + #define f_string_ascii_W "W" + #define f_string_ascii_X "X" + #define f_string_ascii_Y "Y" + #define f_string_ascii_Z "Z" + + #define f_string_ascii_comma "," + #define f_string_ascii_colon ":" + #define f_string_ascii_colon_semi ";" + #define f_string_ascii_equal "=" + #define f_string_ascii_minus "-" + #define f_string_ascii_period "." + #define f_string_ascii_plus "+" + #define f_string_ascii_slash_forward "/" + #define f_string_ascii_slash_backward "\\" + #define f_string_ascii_tilde "~" + + extern const f_string_t f_string_ascii_0_s; + extern const f_string_t f_string_ascii_1_s; + extern const f_string_t f_string_ascii_2_s; + extern const f_string_t f_string_ascii_3_s; + extern const f_string_t f_string_ascii_4_s; + extern const f_string_t f_string_ascii_5_s; + extern const f_string_t f_string_ascii_6_s; + extern const f_string_t f_string_ascii_7_s; + extern const f_string_t f_string_ascii_8_s; + extern const f_string_t f_string_ascii_9_s; + + extern const f_string_t f_string_ascii_a_s; + extern const f_string_t f_string_ascii_b_s; + extern const f_string_t f_string_ascii_c_s; + extern const f_string_t f_string_ascii_d_s; + extern const f_string_t f_string_ascii_e_s; + extern const f_string_t f_string_ascii_f_s; + extern const f_string_t f_string_ascii_g_s; + extern const f_string_t f_string_ascii_h_s; + extern const f_string_t f_string_ascii_i_s; + extern const f_string_t f_string_ascii_j_s; + extern const f_string_t f_string_ascii_k_s; + extern const f_string_t f_string_ascii_l_s; + extern const f_string_t f_string_ascii_m_s; + extern const f_string_t f_string_ascii_n_s; + extern const f_string_t f_string_ascii_o_s; + extern const f_string_t f_string_ascii_p_s; + extern const f_string_t f_string_ascii_q_s; + extern const f_string_t f_string_ascii_r_s; + extern const f_string_t f_string_ascii_s_s; + extern const f_string_t f_string_ascii_t_s; + extern const f_string_t f_string_ascii_u_s; + extern const f_string_t f_string_ascii_v_s; + extern const f_string_t f_string_ascii_w_s; + extern const f_string_t f_string_ascii_x_s; + extern const f_string_t f_string_ascii_y_s; + extern const f_string_t f_string_ascii_z_s; + + extern const f_string_t f_string_ascii_A_s; + extern const f_string_t f_string_ascii_B_s; + extern const f_string_t f_string_ascii_C_s; + extern const f_string_t f_string_ascii_D_s; + extern const f_string_t f_string_ascii_E_s; + extern const f_string_t f_string_ascii_F_s; + extern const f_string_t f_string_ascii_G_s; + extern const f_string_t f_string_ascii_H_s; + extern const f_string_t f_string_ascii_I_s; + extern const f_string_t f_string_ascii_J_s; + extern const f_string_t f_string_ascii_K_s; + extern const f_string_t f_string_ascii_L_s; + extern const f_string_t f_string_ascii_M_s; + extern const f_string_t f_string_ascii_N_s; + extern const f_string_t f_string_ascii_O_s; + extern const f_string_t f_string_ascii_P_s; + extern const f_string_t f_string_ascii_Q_s; + extern const f_string_t f_string_ascii_R_s; + extern const f_string_t f_string_ascii_S_s; + extern const f_string_t f_string_ascii_T_s; + extern const f_string_t f_string_ascii_U_s; + extern const f_string_t f_string_ascii_V_s; + extern const f_string_t f_string_ascii_W_s; + extern const f_string_t f_string_ascii_X_s; + extern const f_string_t f_string_ascii_Y_s; + extern const f_string_t f_string_ascii_Z_s; + + extern const f_string_t f_string_ascii_comma_s; + extern const f_string_t f_string_ascii_colon_s; + extern const f_string_t f_string_ascii_colon_semi_s; + extern const f_string_t f_string_ascii_equal_s; + extern const f_string_t f_string_ascii_minus_s; + extern const f_string_t f_string_ascii_period_s; + extern const f_string_t f_string_ascii_plus_s; + extern const f_string_t f_string_ascii_slash_forward_s; + extern const f_string_t f_string_ascii_slash_backward_s; + extern const f_string_t f_string_ascii_tilde_s; +#endif // _di_string_ascii_s_ + #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/c/string.c b/level_0/f_string/c/string.c new file mode 100644 index 0000000..fe3d96b --- /dev/null +++ b/level_0/f_string/c/string.c @@ -0,0 +1,13 @@ +#include "string.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_f_string_static_empty_s_ + const f_string_static_t f_string_static_empty_s = f_macro_string_static_t_initialize("", 0); +#endif // _di_f_string_static_empty_s_ + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_0/f_string/c/string.h b/level_0/f_string/c/string.h index 7d2f9f0..0c9a0d8 100644 --- a/level_0/f_string/c/string.h +++ b/level_0/f_string/c/string.h @@ -33,26 +33,6 @@ extern "C" { #endif -#ifndef _di_f_string_has_empty_ - const static f_string_t f_string_empty_s = ""; -#endif // _di_f_string_has_empty_ - -#ifndef _di_f_string_has_eol_ - const static f_string_t f_string_eol_s = f_string_eol; -#endif // _di_f_string_has_eol_ - -#ifndef _di_f_string_has_placeholder_ - const static f_string_t f_string_placeholder_s = f_string_placeholder; -#endif // _di_f_string_has_placeholder_ - -#ifndef _di_f_string_has_space_ - const static f_string_t f_string_space_s = f_string_space; -#endif // _di_f_string_has_space_ - -#ifndef _di_f_string_static_empty_s_ - const static f_string_static_t f_string_static_empty_s = f_macro_string_static_t_initialize(f_string_empty_s, 0); -#endif // _di_f_string_static_empty_s_ - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/c/string_dynamic.h b/level_0/f_string/c/string_dynamic.h index b44204b..e282c86 100644 --- a/level_0/f_string/c/string_dynamic.h +++ b/level_0/f_string/c/string_dynamic.h @@ -64,14 +64,28 @@ extern "C" { #define f_macro_string_dynamic_t_clear(dynamic) f_macro_string_static_t_clear(dynamic) - #define f_macro_string_dynamic_t_new(status, dynamic, new_length) \ + #define f_macro_string_dynamic_t_new(status, dynamic, length) \ f_macro_string_dynamic_t_clear(dynamic) \ - status = f_memory_new((void **) & dynamic.string, sizeof(f_string_t), new_length); \ + status = f_memory_new((void **) & dynamic.string, sizeof(f_string_t), length); \ if (status == F_none) { \ - dynamic.size = new_length; \ + dynamic.size = length; \ dynamic.used = 0; \ } + #define f_macro_string_dynamic_t_resize(status, dynamic, length) \ + status = f_memory_resize((void **) & dynamic.string, sizeof(f_string_t), dynamic.size, length); \ + if (status == F_none) { \ + dynamic.size = length; \ + if (dynamic.used > dynamic.size) dynamic.used = length; \ + } + + #define f_macro_string_dynamic_t_adjust(status, dynamic, length) \ + status = f_memory_adjust((void **) & dynamic.string, sizeof(f_string_t), dynamic.size, length); \ + if (status == F_none) { \ + dynamic.size = length; \ + if (dynamic.used > dynamic.size) dynamic.used = length; \ + } + #define f_macro_string_dynamic_t_delete(status, dynamic) \ status = f_memory_delete((void **) & dynamic.string, sizeof(f_string_t), dynamic.size); \ if (status == F_none) { \ @@ -95,20 +109,6 @@ extern "C" { f_memory_destroy((void **) & dynamic.string, sizeof(f_string_t), dynamic.size); \ dynamic.size = 0; \ dynamic.used = 0; - - #define f_macro_string_dynamic_t_resize(status, dynamic, new_length) \ - status = f_memory_resize((void **) & dynamic.string, sizeof(f_string_t), dynamic.size, new_length); \ - if (status == F_none) { \ - dynamic.size = new_length; \ - if (dynamic.used > dynamic.size) dynamic.used = new_length; \ - } - - #define f_macro_string_dynamic_t_adjust(status, dynamic, new_length) \ - status = f_memory_adjust((void **) & dynamic.string, sizeof(f_string_t), dynamic.size, new_length); \ - if (status == F_none) { \ - dynamic.size = new_length; \ - if (dynamic.used > dynamic.size) dynamic.used = new_length; \ - } #endif // _di_f_string_dynamic_t_ /** @@ -156,6 +156,34 @@ extern "C" { dynamics.used = 0; \ } + #define f_macro_string_dynamics_t_resize(status, dynamics, length) \ + status = F_none; \ + if (length < dynamics.size) { \ + for (register f_array_length_t _macro__i = dynamics.size - length; _macro__i < dynamics.size; ++_macro__i) { \ + f_macro_string_dynamic_t_delete(status, dynamics.array[_macro__i]); \ + if (status != F_none) break; \ + } \ + } \ + if (status == F_none) status = f_memory_resize((void **) & dynamics.array, sizeof(f_string_dynamic_t), dynamics.size, length); \ + if (status == F_none) { \ + dynamics.size = length; \ + if (dynamics.used > dynamics.size) dynamics.used = length; \ + } + + #define f_macro_string_dynamics_t_adjust(status, dynamics, length) \ + status = F_none; \ + if (length < dynamics.size) { \ + for (register f_array_length_t _macro__i = dynamics.size - length; _macro__i < dynamics.size; ++_macro__i) { \ + f_macro_string_dynamic_t_destroy(status, dynamics.array[_macro__i], f_string_dynamic_t); \ + if (status != F_none) break; \ + } \ + } \ + if (status == F_none) status = f_memory_adjust((void **) & dynamics.array, sizeof(f_string_dynamic_t), dynamics.size, length); \ + if (status == F_none) { \ + dynamics.size = length; \ + if (dynamics.used > dynamics.size) dynamics.used = length; \ + } + #define f_macro_string_dynamics_t_delete(status, dynamics) \ status = F_none; \ dynamics.used = dynamics.size; \ @@ -195,36 +223,12 @@ extern "C" { } \ f_memory_destroy((void **) & dynamics.array, sizeof(f_string_dynamic_t), dynamics.size); \ dynamics.size = 0; - - #define f_macro_string_dynamics_t_resize(status, dynamics, new_length) \ - status = F_none; \ - if (new_length < dynamics.size) { \ - for (f_array_length_t _macro__i = dynamics.size - new_length; _macro__i < dynamics.size; _macro__i++) { \ - f_macro_string_dynamic_t_delete(status, dynamics.array[_macro__i]); \ - if (status != F_none) break; \ - } \ - } \ - if (status == F_none) status = f_memory_resize((void **) & dynamics.array, sizeof(f_string_dynamic_t), dynamics.size, new_length); \ - if (status == F_none) { \ - dynamics.size = new_length; \ - if (dynamics.used > dynamics.size) dynamics.used = new_length; \ - } - - #define f_macro_string_dynamics_t_adjust(status, dynamics, new_length) \ - status = F_none; \ - if (new_length < dynamics.size) { \ - for (f_array_length_t _macro__i = dynamics.size - new_length; _macro__i < dynamics.size; _macro__i++) { \ - f_macro_string_dynamic_t_destroy(status, dynamics.array[_macro__i], f_string_dynamic_t); \ - if (status != F_none) break; \ - } \ - } \ - if (status == F_none) status = f_memory_adjust((void **) & dynamics.array, sizeof(f_string_dynamic_t), dynamics.size, new_length); \ - if (status == F_none) { \ - dynamics.size = new_length; \ - if (dynamics.used > dynamics.size) dynamics.used = new_length; \ - } #endif // _di_f_string_dynamics_t_ +#ifndef _di_f_string_static_empty_s_ + const extern f_string_static_t f_string_static_empty_s; +#endif // _di_f_string_static_empty_s_ + #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/c/string_map.h b/level_0/f_string/c/string_map.h index 5b8a5ba..46a189a 100644 --- a/level_0/f_string/c/string_map.h +++ b/level_0/f_string/c/string_map.h @@ -89,6 +89,34 @@ extern "C" { maps.used = 0; \ } + #define f_macro_string_maps_t_resize(status, maps, length) \ + status = F_none; \ + if (length < maps.size) { \ + for (register f_array_length_t _macro__i = maps.size - length; _macro__i < maps.size; ++_macro__i) { \ + f_macro_string_map_t_delete(status, maps.array[_macro__i]); \ + if (status != F_none) break; \ + } \ + } \ + if (status == F_none) status = f_memory_resize((void **) & maps.array, sizeof(f_string_map_t), maps.size, length); \ + if (status == F_none) { \ + maps.size = length; \ + if (maps.used > maps.size) maps.used = length; \ + } + + #define f_macro_string_maps_t_adjust(status, maps, length) \ + status = F_none; \ + if (length < maps.size) { \ + for (register f_array_length_t _macro__i = maps.size - length; _macro__i < maps.size; ++_macro__i) { \ + f_macro_string_map_t_destroy(status, maps.array[_macro__i], f_string_map_t); \ + if (status != F_none) break; \ + } \ + } \ + if (status == F_none) status = f_memory_adjust((void **) & maps.array, sizeof(f_string_map_t), maps.size, length); \ + if (status == F_none) { \ + maps.size = length; \ + if (maps.used > maps.size) maps.used = length; \ + } + #define f_macro_string_maps_t_delete(status, maps) \ status = F_none; \ maps.used = maps.size; \ @@ -128,34 +156,6 @@ extern "C" { } \ f_memory_destroy((void **) & maps.array, sizeof(f_string_map_t), maps.size); \ maps.size = 0; - - #define f_macro_string_maps_t_resize(status, maps, new_length) \ - status = F_none; \ - if (new_length < maps.size) { \ - for (f_array_length_t _macro__i = maps.size - new_length; _macro__i < maps.size; _macro__i++) { \ - f_macro_string_map_t_delete(status, maps.array[_macro__i]); \ - if (status != F_none) break; \ - } \ - } \ - if (status == F_none) status = f_memory_resize((void **) & maps.array, sizeof(f_string_map_t), maps.size, new_length); \ - if (status == F_none) { \ - maps.size = new_length; \ - if (maps.used > maps.size) maps.used = new_length; \ - } - - #define f_macro_string_maps_t_adjust(status, maps, new_length) \ - status = F_none; \ - if (new_length < maps.size) { \ - for (f_array_length_t _macro__i = maps.size - new_length; _macro__i < maps.size; _macro__i++) { \ - f_macro_string_map_t_destroy(status, maps.array[_macro__i], f_string_map_t); \ - if (status != F_none) break; \ - } \ - } \ - if (status == F_none) status = f_memory_adjust((void **) & maps.array, sizeof(f_string_map_t), maps.size, new_length); \ - if (status == F_none) { \ - maps.size = new_length; \ - if (maps.used > maps.size) maps.used = new_length; \ - } #endif // _di_f_string_maps_t_ /** @@ -224,6 +224,34 @@ extern "C" { maps.used = 0; \ } + #define f_macro_string_map_multis_t_resize(status, maps, length) \ + status = F_none; \ + if (length < maps.size) { \ + for (register f_array_length_t _macro__i = maps.size - length; _macro__i < maps.size; ++_macro__i) { \ + f_macro_string_map_multi_t_delete(status, maps.array[_macro__i]); \ + if (status != F_none) break; \ + } \ + } \ + if (status == F_none) status = f_memory_resize((void **) & maps.array, sizeof(f_string_map_multi_t), maps.size, length); \ + if (status == F_none) { \ + maps.size = length; \ + if (maps.used > maps.size) maps.used = length; \ + } + + #define f_macro_string_map_multis_t_adjust(status, maps, length) \ + status = F_none; \ + if (length < maps.size) { \ + for (register f_array_length_t _macro__i = maps.size - length; _macro__i < maps.size; ++_macro__i) { \ + f_macro_string_map_multi_t_destroy(status, maps.array[_macro__i], f_string_map_multi_t); \ + if (status != F_none) break; \ + } \ + } \ + if (status == F_none) status = f_memory_adjust((void **) & maps.array, sizeof(f_string_map_multi_t), maps.size, length); \ + if (status == F_none) { \ + maps.size = length; \ + if (maps.used > maps.size) maps.used = length; \ + } + #define f_macro_string_map_multis_t_delete(status, maps) \ status = F_none; \ maps.used = maps.size; \ @@ -263,34 +291,6 @@ extern "C" { } \ f_memory_destroy((void **) & maps.array, sizeof(f_string_map_multi_t), maps.size); \ maps.size = 0; - - #define f_macro_string_map_multis_t_resize(status, maps, new_length) \ - status = F_none; \ - if (new_length < maps.size) { \ - for (f_array_length_t _macro__i = maps.size - new_length; _macro__i < maps.size; _macro__i++) { \ - f_macro_string_map_multi_t_delete(status, maps.array[_macro__i]); \ - if (status != F_none) break; \ - } \ - } \ - if (status == F_none) status = f_memory_resize((void **) & maps.array, sizeof(f_string_map_multi_t), maps.size, new_length); \ - if (status == F_none) { \ - maps.size = new_length; \ - if (maps.used > maps.size) maps.used = new_length; \ - } - - #define f_macro_string_map_multis_t_adjust(status, maps, new_length) \ - status = F_none; \ - if (new_length < maps.size) { \ - for (f_array_length_t _macro__i = maps.size - new_length; _macro__i < maps.size; _macro__i++) { \ - f_macro_string_map_multi_t_destroy(status, maps.array[_macro__i], f_string_map_multi_t); \ - if (status != F_none) break; \ - } \ - } \ - if (status == F_none) status = f_memory_adjust((void **) & maps.array, sizeof(f_string_map_multi_t), maps.size, new_length); \ - if (status == F_none) { \ - maps.size = new_length; \ - if (maps.used > maps.size) maps.used = new_length; \ - } #endif // _di_f_string_map_multis_t_ #ifdef __cplusplus diff --git a/level_0/f_string/c/string_quantity.h b/level_0/f_string/c/string_quantity.h index fe4cda3..f1bf5bb 100644 --- a/level_0/f_string/c/string_quantity.h +++ b/level_0/f_string/c/string_quantity.h @@ -54,28 +54,26 @@ extern "C" { #define f_string_quantitys_t_initialize {0, 0, 0} - #define f_macro_string_quantitys_t_adjust(status, quantitys, length) f_macro_memory_structure_t_adjust(status, quantitys, f_string_quantity_t, length) + #define f_macro_string_quantitys_t_clear(quantitys) f_macro_memory_structure_clear(quantitys); - #define f_macro_string_quantitys_t_clear(quantitys) f_macro_memory_structure_t_clear(quantitys) + #define f_macro_string_quantitys_t_new(status, quantitys, length) f_macro_memory_structure_new(status, quantitys, f_string_quantity_t, length); - #define f_macro_string_quantitys_t_decimate(status, quantitys) f_macro_memory_structure_decimate(status, quantitys, f_string_quantity_t); - #define f_macro_string_quantitys_t_decimate_by(status, quantitys, amount) f_macro_memory_structure_decimate_by(status, quantitys, f_string_quantity_t, amount); + #define f_macro_string_quantitys_t_resize(status, quantitys, length) f_macro_memory_structure_resize(status, quantitys, f_string_quantity_t, length); + #define f_macro_string_quantitys_t_adjust(status, quantitys, length) f_macro_memory_structure_adjust(status, quantitys, f_string_quantity_t, length); - #define f_macro_string_quantitys_t_decrease(status, quantitys) f_macro_memory_structure_decrease(status, quantitys, f_string_quantity_t); - #define f_macro_string_quantitys_t_decrease_by(status, quantitys, amount) f_macro_memory_structure_decrease_by(status, quantitys, f_string_quantity_t, amount); + #define f_macro_string_quantitys_t_delete(status, quantitys) f_macro_memory_structure_delete(status, quantitys, f_string_quantity_t); + #define f_macro_string_quantitys_t_destroy(status, quantitys) f_macro_memory_structure_destroy(status, quantitys, f_string_quantity_t); - #define f_macro_string_quantitys_t_delete(status, quantitys) f_macro_memory_structure_t_delete(status, quantitys, f_string_quantity_t) - #define f_macro_string_quantitys_t_delete_simple(quantitys) f_macro_memory_structure_t_delete_simple(quantitys, f_string_quantity_t) + #define f_macro_string_quantitys_t_delete_simple(quantitys) f_macro_memory_structure_delete_simple(quantitys, f_string_quantity_t); + #define f_macro_string_quantitys_t_destroy_simple(quantitys) f_macro_memory_structure_destroy_simple(quantitys, f_string_quantity_t); - #define f_macro_string_quantitys_t_destroy(status, quantitys) f_macro_memory_structure_t_destroy(status, quantitys, f_string_quantity_t) - #define f_macro_string_quantitys_t_destroy_simple(quantitys) f_macro_memory_structure_t_destroy_simple(quantitys, f_string_quantity_t) + #define f_macro_string_quantitys_t_increase(status, quantitys) f_macro_memory_structure_increase(status, quantitys, f_string_quantity_t); + #define f_macro_string_quantitys_t_decrease(status, quantitys) f_macro_memory_structure_decrease(status, quantitys, f_string_quantity_t); + #define f_macro_string_quantitys_t_decimate(status, quantitys) f_macro_memory_structure_decimate(status, quantitys, f_string_quantity_t); - #define f_macro_string_quantitys_t_increase(status, quantitys) f_macro_memory_structure_increase(status, quantitys, f_string_quantity_t); #define f_macro_string_quantitys_t_increase_by(status, quantitys, amount) f_macro_memory_structure_increase_by(status, quantitys, f_string_quantity_t, amount); - - #define f_macro_string_quantitys_t_new(status, quantitys, length) f_macro_memory_structure_t_new(status, quantitys, f_string_quantity_t, length) - - #define f_macro_string_quantitys_t_resize(status, quantitys, new_length) f_macro_memory_structure_t_resize(status, quantitys, f_string_quantity_t, new_length) + #define f_macro_string_quantitys_t_decrease_by(status, quantitys, amount) f_macro_memory_structure_decrease_by(status, quantitys, f_string_quantity_t, amount); + #define f_macro_string_quantitys_t_decimate_by(status, quantitys, amount) f_macro_memory_structure_decimate_by(status, quantitys, f_string_quantity_t, amount); #endif // _di_f_string_quantitys_t_ /** @@ -95,18 +93,18 @@ extern "C" { #define f_string_quantityss_t_initialize {0, 0, 0} - #define f_macro_string_quantityss_t_clear(quantityss) f_macro_memory_structures_t_clear(quantityss) + #define f_macro_string_quantityss_t_clear(quantityss) f_macro_memory_structures_clear(quantityss) - #define f_macro_string_quantityss_t_new(status, quantityss, length) f_macro_memory_structures_t_new(status, quantityss, f_string_quantity_t, length) + #define f_macro_string_quantityss_t_new(status, quantityss, length) f_macro_memory_structures_new(status, quantityss, f_string_quantity_t, length); - #define f_macro_string_quantityss_t_delete(status, quantityss) f_macro_memory_structures_t_delete(status, quantityss, f_string_quantity_t, f_string_quantitys_t) - #define f_macro_string_quantityss_t_destroy(status, quantityss) f_macro_memory_structures_t_destroy(status, quantityss, f_string_quantity_t, f_string_quantitys_t) + #define f_macro_string_quantityss_t_resize(status, quantityss, length) f_macro_memory_structures_resize(status, quantityss, f_string_quantity_t, f_string_quantitys_t, length, f_array_length_t); + #define f_macro_string_quantityss_t_adjust(status, quantityss, length) f_macro_memory_structures_adjust(status, quantityss, f_string_quantity_t, f_string_quantitys_t, length, f_array_length_t); - #define f_macro_string_quantityss_t_delete_simple(quantityss) f_macro_memory_structures_t_delete_simple(quantityss, f_string_quantity_t, f_string_quantitys_t) - #define f_macro_string_quantityss_t_destroy_simple(quantityss) f_macro_memory_structures_t_destroy_simple(quantityss, f_string_quantity_t, f_string_quantitys_t) + #define f_macro_string_quantityss_t_delete(status, quantityss) f_macro_memory_structures_delete(status, quantityss, f_string_quantity_t, f_string_quantitys_t); + #define f_macro_string_quantityss_t_destroy(status, quantityss) f_macro_memory_structures_destroy(status, quantityss, f_string_quantity_t, f_string_quantitys_t); - #define f_macro_string_quantityss_t_resize(status, quantityss, new_length) f_macro_memory_structures_t_resize(status, quantityss, f_string_quantity_t, f_string_quantitys_t, new_length, f_array_length_t) - #define f_macro_string_quantityss_t_adjust(status, quantityss, new_length) f_macro_memory_structures_t_adjust(status, quantityss, f_string_quantity_t, f_string_quantitys_t, new_length, f_array_length_t) + #define f_macro_string_quantityss_t_delete_simple(quantityss) f_macro_memory_structures_delete_simple(quantityss, f_string_quantity_t, f_string_quantitys_t); + #define f_macro_string_quantityss_t_destroy_simple(quantityss) f_macro_memory_structures_destroy_simple(quantityss, f_string_quantity_t, f_string_quantitys_t); #endif // _di_f_string_quantityss_t_ #ifdef __cplusplus diff --git a/level_0/f_string/c/string_range.h b/level_0/f_string/c/string_range.h index 2750353..8ce7cd5 100644 --- a/level_0/f_string/c/string_range.h +++ b/level_0/f_string/c/string_range.h @@ -60,28 +60,26 @@ extern "C" { #define f_string_ranges_t_initialize {0, 0, 0} - #define f_macro_string_ranges_t_adjust(status, ranges, length) f_macro_memory_structure_t_adjust(status, ranges, f_string_range_t, length) + #define f_macro_string_ranges_t_clear(ranges) f_macro_memory_structure_clear(ranges); - #define f_macro_string_ranges_t_clear(ranges) f_macro_memory_structure_t_clear(ranges) + #define f_macro_string_ranges_t_new(status, ranges, length) f_macro_memory_structure_new(status, ranges, f_string_range_t, length); - #define f_macro_string_ranges_t_decimate(status, ranges) f_macro_memory_structure_decimate(status, ranges, f_string_range_t); - #define f_macro_string_ranges_t_decimate_by(status, ranges, amount) f_macro_memory_structure_decimate_by(status, ranges, f_string_range_t, amount); + #define f_macro_string_ranges_t_resize(status, ranges, length) f_macro_memory_structure_resize(status, ranges, f_string_range_t, length); + #define f_macro_string_ranges_t_adjust(status, ranges, length) f_macro_memory_structure_adjust(status, ranges, f_string_range_t, length); - #define f_macro_string_ranges_t_decrease(status, ranges) f_macro_memory_structure_decrease(status, ranges, f_string_range_t); - #define f_macro_string_ranges_t_decrease_by(status, ranges, amount) f_macro_memory_structure_decrease_by(status, ranges, f_string_range_t, amount); + #define f_macro_string_ranges_t_delete(status, ranges) f_macro_memory_structure_delete(status, ranges, f_string_range_t); + #define f_macro_string_ranges_t_destroy(status, ranges) f_macro_memory_structure_destroy(status, ranges, f_string_range_t); - #define f_macro_string_ranges_t_delete(status, ranges) f_macro_memory_structure_t_delete(status, ranges, f_string_range_t) - #define f_macro_string_ranges_t_delete_simple(ranges) f_macro_memory_structure_t_delete_simple(ranges, f_string_range_t) + #define f_macro_string_ranges_t_delete_simple(ranges) f_macro_memory_structure_delete_simple(ranges, f_string_range_t); + #define f_macro_string_ranges_t_destroy_simple(ranges) f_macro_memory_structure_destroy_simple(ranges, f_string_range_t); - #define f_macro_string_ranges_t_destroy(status, ranges) f_macro_memory_structure_t_destroy(status, ranges, f_string_range_t) - #define f_macro_string_ranges_t_destroy_simple(ranges) f_macro_memory_structure_t_destroy_simple(ranges, f_string_range_t) + #define f_macro_string_ranges_t_increase(status, ranges) f_macro_memory_structure_increase(status, ranges, f_string_range_t); + #define f_macro_string_ranges_t_decrease(status, ranges) f_macro_memory_structure_decrease(status, ranges, f_string_range_t); + #define f_macro_string_ranges_t_decimate(status, ranges) f_macro_memory_structure_decimate(status, ranges, f_string_range_t); - #define f_macro_string_ranges_t_increase(status, ranges) f_macro_memory_structure_increase(status, ranges, f_string_range_t); #define f_macro_string_ranges_t_increase_by(status, ranges, amount) f_macro_memory_structure_increase_by(status, ranges, f_string_range_t, amount); - - #define f_macro_string_ranges_t_new(status, ranges, length) f_macro_memory_structure_t_new(status, ranges, f_string_range_t, length) - - #define f_macro_string_ranges_t_resize(status, ranges, new_length) f_macro_memory_structure_t_resize(status, ranges, f_string_range_t, new_length) + #define f_macro_string_ranges_t_decrease_by(status, ranges, amount) f_macro_memory_structure_decrease_by(status, ranges, f_string_range_t, amount); + #define f_macro_string_ranges_t_decimate_by(status, ranges, amount) f_macro_memory_structure_decimate_by(status, ranges, f_string_range_t, amount); #endif // _di_f_string_ranges_t_ /** @@ -101,18 +99,18 @@ extern "C" { #define f_string_rangess_t_initialize { 0, 0, 0 } - #define f_macro_string_rangess_t_clear(rangess) f_macro_memory_structures_t_clear(rangess) + #define f_macro_string_rangess_t_clear(rangess) f_macro_memory_structures_clear(rangess); - #define f_macro_string_rangess_t_new(status, rangess, length) f_macro_memory_structures_t_new(status, rangess, f_string_ranges_t, length) + #define f_macro_string_rangess_t_new(status, rangess, length) f_macro_memory_structures_new(status, rangess, f_string_ranges_t, length); - #define f_macro_string_rangess_t_delete(status, rangess) f_macro_memory_structures_t_delete(status, rangess, f_string_range_t, f_string_ranges_t) - #define f_macro_string_rangess_t_destroy(status, rangess) f_macro_memory_structures_t_destroy(status, rangess, f_string_range_t, f_string_ranges_t) + #define f_macro_string_rangess_t_resize(status, rangess, length) f_macro_memory_structures_resize(status, rangess, f_string_range_t, f_string_ranges_t, length, f_array_length_t); + #define f_macro_string_rangess_t_adjust(status, rangess, length) f_macro_memory_structures_adjust(status, rangess, f_string_range_t, f_string_ranges_t, length, f_array_length_t); - #define f_macro_string_rangess_t_delete_simple(rangess) f_macro_memory_structures_t_delete_simple(rangess, f_string_range_t, f_string_ranges_t) - #define f_macro_string_rangess_t_destroy_simple(rangess) f_macro_memory_structures_t_destroy_simple(rangess, f_string_range_t, f_string_ranges_t) + #define f_macro_string_rangess_t_delete(status, rangess) f_macro_memory_structures_delete(status, rangess, f_string_range_t, f_string_ranges_t); + #define f_macro_string_rangess_t_destroy(status, rangess) f_macro_memory_structures_destroy(status, rangess, f_string_range_t, f_string_ranges_t); - #define f_macro_string_rangess_t_resize(status, rangess, new_length) f_macro_memory_structures_t_resize(status, rangess, f_string_range_t, f_string_ranges_t, new_length, f_array_length_t) - #define f_macro_string_rangess_t_adjust(status, rangess, new_length) f_macro_memory_structures_t_adjust(status, rangess, f_string_range_t, f_string_ranges_t, new_length, f_array_length_t) + #define f_macro_string_rangess_t_delete_simple(rangess) f_macro_memory_structures_delete_simple(rangess, f_string_range_t, f_string_ranges_t); + #define f_macro_string_rangess_t_destroy_simple(rangess) f_macro_memory_structures_destroy_simple(rangess, f_string_range_t, f_string_ranges_t); #endif // _di_f_string_rangess_t_ #ifdef __cplusplus diff --git a/level_0/f_string/c/string_triple.h b/level_0/f_string/c/string_triple.h index 812d696..a41e93f 100644 --- a/level_0/f_string/c/string_triple.h +++ b/level_0/f_string/c/string_triple.h @@ -102,6 +102,34 @@ extern "C" { triples.used = 0; \ } + #define f_macro_string_triples_t_resize(status, triples, length) \ + status = F_none; \ + if (length < triples.size) { \ + for (register f_array_length_t _macro__i = triples.size - length; _macro__i < triples.size; ++_macro__i) { \ + f_macro_string_triple_t_delete(status, triples.array[_macro__i]); \ + if (status != F_none) break; \ + } \ + } \ + if (status == F_none) status = f_memory_resize((void **) & triples.array, sizeof(f_string_triple_t), triples.size, length); \ + if (status == F_none) { \ + triples.size = length; \ + if (triples.used > triples.size) triples.used = length; \ + } + + #define f_macro_string_triples_t_adjust(status, triples, length) \ + status = F_none; \ + if (length < triples.size) { \ + for (register f_array_length_t _macro__i = triples.size - length; _macro__i < triples.size; ++_macro__i) { \ + f_macro_string_triple_t_destroy(status, triples.array[_macro__i], f_string_triple_t); \ + if (status != F_none) break; \ + } \ + } \ + if (status == F_none) status = f_memory_adjust((void **) & triples.array, sizeof(f_string_triple_t), triples.size, length); \ + if (status == F_none) { \ + triples.size = length; \ + if (triples.used > triples.size) triples.used = length; \ + } + #define f_macro_string_triples_t_delete(status, triples) \ status = F_none; \ triples.used = triples.size; \ @@ -141,34 +169,6 @@ extern "C" { } \ f_memory_destroy((void **) & triples.array, sizeof(f_string_triple_t), triples.size); \ triples.size = 0; - - #define f_macro_string_triples_t_resize(status, triples, new_length) \ - status = F_none; \ - if (new_length < triples.size) { \ - for (f_array_length_t _macro__i = triples.size - new_length; _macro__i < triples.size; _macro__i++) { \ - f_macro_string_triple_t_delete(status, triples.array[_macro__i]); \ - if (status != F_none) break; \ - } \ - } \ - if (status == F_none) status = f_memory_resize((void **) & triples.array, sizeof(f_string_triple_t), triples.size, new_length); \ - if (status == F_none) { \ - triples.size = new_length; \ - if (triples.used > triples.size) triples.used = new_length; \ - } - - #define f_macro_string_triples_t_adjust(status, triples, new_length) \ - status = F_none; \ - if (new_length < triples.size) { \ - for (f_array_length_t _macro__i = triples.size - new_length; _macro__i < triples.size; _macro__i++) { \ - f_macro_string_triple_t_destroy(status, triples.array[_macro__i], f_string_triple_t); \ - if (status != F_none) break; \ - } \ - } \ - if (status == F_none) status = f_memory_adjust((void **) & triples.array, sizeof(f_string_triple_t), triples.size, new_length); \ - if (status == F_none) { \ - triples.size = new_length; \ - if (triples.used > triples.size) triples.used = new_length; \ - } #endif // _di_f_string_triples_t_ #ifdef __cplusplus diff --git a/level_0/f_string/data/build/settings b/level_0/f_string/data/build/settings index 1213c19..3bd1a83 100644 --- a/level_0/f_string/data/build/settings +++ b/level_0/f_string/data/build/settings @@ -20,7 +20,7 @@ build_indexer ar build_language c build_libraries -lc build_libraries-individual -lf_memory -build_sources_library +build_sources_library string.c string-common.c build_sources_program build_sources_headers string.h string-common.h string_dynamic.h string_map.h string_quantity.h string_range.h string_triple.h build_sources_script diff --git a/level_0/f_thread/c/thread-common.h b/level_0/f_thread/c/thread-common.h index 8e2fcd3..f52eb67 100644 --- a/level_0/f_thread/c/thread-common.h +++ b/level_0/f_thread/c/thread-common.h @@ -45,28 +45,24 @@ extern "C" { #define f_thread_attributes_t_initialize { 0, 0, 0 } - #define f_macro_thread_attributes_t_adjust(status, attributes, length) f_macro_memory_structure_t_adjust(status, attributes, f_thread_attribute_t, length) + #define f_macro_thread_attributes_t_new(status, attributes, length) f_macro_memory_structure_new(status, attributes, f_thread_attribute_t, length); - #define f_macro_thread_attributes_t_clear(attributes) f_macro_memory_structure_t_clear(attributes) + #define f_macro_thread_attributes_t_resize(status, attributes, length) f_macro_memory_structure_resize(status, attributes, f_thread_attribute_t, length); + #define f_macro_thread_attributes_t_adjust(status, attributes, length) f_macro_memory_structure_adjust(status, attributes, f_thread_attribute_t, length); - #define f_macro_thread_attributes_t_decimate(status, attributes) f_macro_memory_structure_decimate(status, attributes, f_thread_attribute_t); - #define f_macro_thread_attributes_t_decimate_by(status, attributes, amount) f_macro_memory_structure_decimate_by(status, attributes, f_thread_attribute_t, amount); - - #define f_macro_thread_attributes_t_decrease(status, attributes) f_macro_memory_structure_decrease(status, attributes, f_thread_attribute_t); - #define f_macro_thread_attributes_t_decrease_by(status, attributes, amount) f_macro_memory_structure_decrease_by(status, attributes, f_thread_attribute_t, amount); + #define f_macro_thread_attributes_t_delete(status, attributes) f_macro_memory_structure_delete(status, attributes, f_thread_attribute_t); + #define f_macro_thread_attributes_t_destroy(status, attributes) f_macro_memory_structure_destroy(status, attributes, f_thread_attribute_t); - #define f_macro_thread_attributes_t_delete(status, attributes) f_macro_memory_structure_t_delete(status, attributes, f_thread_attribute_t) - #define f_macro_thread_attributes_t_delete_simple(attributes) f_macro_memory_structure_t_delete_simple(attributes, f_thread_attribute_t) + #define f_macro_thread_attributes_t_delete_simple(attributes) f_macro_memory_structure_delete_simple(attributes, f_thread_attribute_t); + #define f_macro_thread_attributes_t_destroy_simple(attributes) f_macro_memory_structure_destroy_simple(attributes, f_thread_attribute_t); - #define f_macro_thread_attributes_t_destroy(status, attributes) f_macro_memory_structure_t_destroy(status, attributes, f_thread_attribute_t) - #define f_macro_thread_attributes_t_destroy_simple(attributes) f_macro_memory_structure_t_destroy_simple(attributes, f_thread_attribute_t) + #define f_macro_thread_attributes_t_increase(status, attributes) f_macro_memory_structure_increase(status, attributes, f_thread_attribute_t); + #define f_macro_thread_attributes_t_decrease(status, attributes) f_macro_memory_structure_decrease(status, attributes, f_thread_attribute_t); + #define f_macro_thread_attributes_t_decimate(status, attributes) f_macro_memory_structure_decimate(status, attributes, f_thread_attribute_t); - #define f_macro_thread_attributes_t_increase(status, attributes) f_macro_memory_structure_increase(status, attributes, f_thread_attribute_t); #define f_macro_thread_attributes_t_increase_by(status, attributes, amount) f_macro_memory_structure_increase_by(status, attributes, f_thread_attribute_t, amount); - - #define f_macro_thread_attributes_t_new(status, attributes, length) f_macro_memory_structure_t_new(status, attributes, f_thread_attribute_t, length) - - #define f_macro_thread_attributes_t_resize(status, attributes, new_length) f_macro_memory_structure_t_resize(status, attributes, f_thread_attribute_t, new_length) + #define f_macro_thread_attributes_t_decrease_by(status, attributes, amount) f_macro_memory_structure_decrease_by(status, attributes, f_thread_attribute_t, amount); + #define f_macro_thread_attributes_t_decimate_by(status, attributes, amount) f_macro_memory_structure_decimate_by(status, attributes, f_thread_attribute_t, amount); #endif // _di_f_thread_attributes_t_ /** @@ -97,28 +93,24 @@ extern "C" { #define f_thread_conditions_t_initialize { 0, 0, 0 } - #define f_macro_thread_conditions_t_adjust(status, conditions, length) f_macro_memory_structure_t_adjust(status, conditions, f_thread_condition_t, length) + #define f_macro_thread_conditions_t_new(status, conditions, length) f_macro_memory_structure_new(status, conditions, f_thread_condition_t, length); - #define f_macro_thread_conditions_t_clear(conditions) f_macro_memory_structure_t_clear(conditions) + #define f_macro_thread_conditions_t_resize(status, conditions, length) f_macro_memory_structure_resize(status, conditions, f_thread_condition_t, length); + #define f_macro_thread_conditions_t_adjust(status, conditions, length) f_macro_memory_structure_adjust(status, conditions, f_thread_condition_t, length); - #define f_macro_thread_conditions_t_decimate(status, conditions) f_macro_memory_structure_decimate(status, conditions, f_thread_condition_t); - #define f_macro_thread_conditions_t_decimate_by(status, conditions, amount) f_macro_memory_structure_decimate_by(status, conditions, f_thread_condition_t, amount); + #define f_macro_thread_conditions_t_delete(status, conditions) f_macro_memory_structure_delete(status, conditions, f_thread_condition_t); + #define f_macro_thread_conditions_t_destroy(status, conditions) f_macro_memory_structure_destroy(status, conditions, f_thread_condition_t); - #define f_macro_thread_conditions_t_decrease(status, conditions) f_macro_memory_structure_decrease(status, conditions, f_thread_condition_t); - #define f_macro_thread_conditions_t_decrease_by(status, conditions, amount) f_macro_memory_structure_decrease_by(status, conditions, f_thread_condition_t, amount); - - #define f_macro_thread_conditions_t_delete(status, conditions) f_macro_memory_structure_t_delete(status, conditions, f_thread_condition_t) - #define f_macro_thread_conditions_t_delete_simple(conditions) f_macro_memory_structure_t_delete_simple(conditions, f_thread_condition_t) + #define f_macro_thread_conditions_t_delete_simple(conditions) f_macro_memory_structure_delete_simple(conditions, f_thread_condition_t); + #define f_macro_thread_conditions_t_destroy_simple(conditions) f_macro_memory_structure_destroy_simple(conditions, f_thread_condition_t); - #define f_macro_thread_conditions_t_destroy(status, conditions) f_macro_memory_structure_t_destroy(status, conditions, f_thread_condition_t) - #define f_macro_thread_conditions_t_destroy_simple(conditions) f_macro_memory_structure_t_destroy_simple(conditions, f_thread_condition_t) + #define f_macro_thread_conditions_t_increase(status, conditions) f_macro_memory_structure_increase(status, conditions, f_thread_condition_t); + #define f_macro_thread_conditions_t_decrease(status, conditions) f_macro_memory_structure_decrease(status, conditions, f_thread_condition_t); + #define f_macro_thread_conditions_t_decimate(status, conditions) f_macro_memory_structure_decimate(status, conditions, f_thread_condition_t); - #define f_macro_thread_conditions_t_increase(status, conditions) f_macro_memory_structure_increase(status, conditions, f_thread_condition_t); #define f_macro_thread_conditions_t_increase_by(status, conditions, amount) f_macro_memory_structure_increase_by(status, conditions, f_thread_condition_t, amount); - - #define f_macro_thread_conditions_t_new(status, conditions, length) f_macro_memory_structure_t_new(status, conditions, f_thread_condition_t, length) - - #define f_macro_thread_conditions_t_resize(status, conditions, new_length) f_macro_memory_structure_t_resize(status, conditions, f_thread_condition_t, new_length) + #define f_macro_thread_conditions_t_decrease_by(status, conditions, amount) f_macro_memory_structure_decrease_by(status, conditions, f_thread_condition_t, amount); + #define f_macro_thread_conditions_t_decimate_by(status, conditions, amount) f_macro_memory_structure_decimate_by(status, conditions, f_thread_condition_t, amount); #endif // _di_f_thread_conditions_t_ /** @@ -149,28 +141,24 @@ extern "C" { #define f_thread_ids_t_initialize { 0, 0, 0 } - #define f_macro_thread_ids_t_adjust(status, ids, length) f_macro_memory_structure_t_adjust(status, ids, f_thread_ids_t, length) - - #define f_macro_thread_ids_t_clear(ids) f_macro_memory_structure_t_clear(ids) + #define f_macro_thread_ids_t_new(status, ids, length) f_macro_memory_structure_new(status, ids, f_thread_id_t, length); - #define f_macro_thread_ids_t_decimate(status, ids) f_macro_memory_structure_decimate(status, ids, f_thread_ids_t); - #define f_macro_thread_ids_t_decimate_by(status, ids, amount) f_macro_memory_structure_decimate_by(status, ids, f_thread_ids_t, amount); + #define f_macro_thread_ids_t_resize(status, ids, length) f_macro_memory_structure_resize(status, ids, f_thread_id_t, length); + #define f_macro_thread_ids_t_adjust(status, ids, length) f_macro_memory_structure_adjust(status, ids, f_thread_id_t, length); - #define f_macro_thread_ids_t_decrease(status, ids) f_macro_memory_structure_decrease(status, ids, f_thread_ids_t); - #define f_macro_thread_ids_t_decrease_by(status, ids, amount) f_macro_memory_structure_decrease_by(status, ids, f_thread_ids_t, amount); + #define f_macro_thread_ids_t_delete(status, ids) f_macro_memory_structure_delete(status, ids, f_thread_id_t); + #define f_macro_thread_ids_t_destroy(status, ids) f_macro_memory_structure_destroy(status, ids, f_thread_id_t); - #define f_macro_thread_ids_t_delete(status, ids) f_macro_memory_structure_t_delete(status, ids, f_thread_ids_t) - #define f_macro_thread_ids_t_delete_simple(ids) f_macro_memory_structure_t_delete_simple(ids, f_thread_ids_t) + #define f_macro_thread_ids_t_delete_simple(ids) f_macro_memory_structure_delete_simple(ids, f_thread_id_t); + #define f_macro_thread_ids_t_destroy_simple(ids) f_macro_memory_structure_destroy_simple(ids, f_thread_id_t); - #define f_macro_thread_ids_t_destroy(status, ids) f_macro_memory_structure_t_destroy(status, ids, f_thread_ids_t) - #define f_macro_thread_ids_t_destroy_simple(ids) f_macro_memory_structure_t_destroy_simple(ids, f_thread_ids_t) + #define f_macro_thread_ids_t_increase(status, ids) f_macro_memory_structure_increase(status, ids, f_thread_id_t); + #define f_macro_thread_ids_t_decrease(status, ids) f_macro_memory_structure_decrease(status, ids, f_thread_id_t); + #define f_macro_thread_ids_t_decimate(status, ids) f_macro_memory_structure_decimate(status, ids, f_thread_id_t); - #define f_macro_thread_ids_t_increase(status, ids) f_macro_memory_structure_increase(status, ids, f_thread_ids_t); - #define f_macro_thread_ids_t_increase_by(status, ids, amount) f_macro_memory_structure_increase_by(status, ids, f_thread_ids_t, amount); - - #define f_macro_thread_ids_t_new(status, ids, length) f_macro_memory_structure_t_new(status, ids, f_thread_ids_t, length) - - #define f_macro_thread_ids_t_resize(status, ids, new_length) f_macro_memory_structure_t_resize(status, ids, f_thread_ids_t, new_length) + #define f_macro_thread_ids_t_increase_by(status, ids, amount) f_macro_memory_structure_increase_by(status, ids, f_thread_id_t, amount); + #define f_macro_thread_ids_t_decrease_by(status, ids, amount) f_macro_memory_structure_decrease_by(status, ids, f_thread_id_t, amount); + #define f_macro_thread_ids_t_decimate_by(status, ids, amount) f_macro_memory_structure_decimate_by(status, ids, f_thread_id_t, amount); #endif // _di_f_thread_ids_t_ /** @@ -201,28 +189,24 @@ extern "C" { #define f_thread_keys_t_initialize { 0, 0, 0 } - #define f_macro_thread_keys_t_adjust(status, keys, length) f_macro_memory_structure_t_adjust(status, keys, f_thread_key_t, length) + #define f_macro_thread_keys_t_new(status, keys, length) f_macro_memory_structure_new(status, keys, f_thread_key_t, length); - #define f_macro_thread_keys_t_clear(keys) f_macro_memory_structure_t_clear(keys) - - #define f_macro_thread_keys_t_decimate(status, keys) f_macro_memory_structure_decimate(status, keys, f_thread_key_t); - #define f_macro_thread_keys_t_decimate_by(status, keys, amount) f_macro_memory_structure_decimate_by(status, keys, f_thread_key_t, amount); + #define f_macro_thread_keys_t_resize(status, keys, length) f_macro_memory_structure_resize(status, keys, f_thread_key_t, length); + #define f_macro_thread_keys_t_adjust(status, keys, length) f_macro_memory_structure_adjust(status, keys, f_thread_key_t, length); - #define f_macro_thread_keys_t_decrease(status, keys) f_macro_memory_structure_decrease(status, keys, f_thread_key_t); - #define f_macro_thread_keys_t_decrease_by(status, keys, amount) f_macro_memory_structure_decrease_by(status, keys, f_thread_key_t, amount); + #define f_macro_thread_keys_t_delete(status, keys) f_macro_memory_structure_delete(status, keys, f_thread_key_t); + #define f_macro_thread_keys_t_destroy(status, keys) f_macro_memory_structure_destroy(status, keys, f_thread_key_t); - #define f_macro_thread_keys_t_delete(status, keys) f_macro_memory_structure_t_delete(status, keys, f_thread_key_t) - #define f_macro_thread_keys_t_delete_simple(keys) f_macro_memory_structure_t_delete_simple(keys, f_thread_key_t) + #define f_macro_thread_keys_t_delete_simple(keys) f_macro_memory_structure_delete_simple(keys, f_thread_key_t); + #define f_macro_thread_keys_t_destroy_simple(keys) f_macro_memory_structure_destroy_simple(keys, f_thread_key_t); - #define f_macro_thread_keys_t_destroy(status, keys) f_macro_memory_structure_t_destroy(status, keys, f_thread_key_t) - #define f_macro_thread_keys_t_destroy_simple(keys) f_macro_memory_structure_t_destroy_simple(keys, f_thread_key_t) + #define f_macro_thread_keys_t_increase(status, keys) f_macro_memory_structure_increase(status, keys, f_thread_key_t); + #define f_macro_thread_keys_t_decrease(status, keys) f_macro_memory_structure_decrease(status, keys, f_thread_key_t); + #define f_macro_thread_keys_t_decimate(status, keys) f_macro_memory_structure_decimate(status, keys, f_thread_key_t); - #define f_macro_thread_keys_t_increase(status, keys) f_macro_memory_structure_increase(status, keys, f_thread_key_t); #define f_macro_thread_keys_t_increase_by(status, keys, amount) f_macro_memory_structure_increase_by(status, keys, f_thread_key_t, amount); - - #define f_macro_thread_keys_t_new(status, keys, length) f_macro_memory_structure_t_new(status, keys, f_thread_key_t, length) - - #define f_macro_thread_keys_t_resize(status, keys, new_length) f_macro_memory_structure_t_resize(status, keys, f_thread_key_t, new_length) + #define f_macro_thread_keys_t_decrease_by(status, keys, amount) f_macro_memory_structure_decrease_by(status, keys, f_thread_key_t, amount); + #define f_macro_thread_keys_t_decimate_by(status, keys, amount) f_macro_memory_structure_decimate_by(status, keys, f_thread_key_t, amount); #endif // _di_f_thread_keys_t_ /** @@ -253,28 +237,24 @@ extern "C" { #define f_thread_locks_t_initialize { 0, 0, 0 } - #define f_macro_thread_locks_t_adjust(status, locks, length) f_macro_memory_structure_t_adjust(status, locks, f_thread_lock_t, length) - - #define f_macro_thread_locks_t_clear(locks) f_macro_memory_structure_t_clear(locks) + #define f_macro_thread_locks_t_new(status, locks, length) f_macro_memory_structure_new(status, locks, f_thread_lock_t, length); - #define f_macro_thread_locks_t_decimate(status, locks) f_macro_memory_structure_decimate(status, locks, f_thread_lock_t); - #define f_macro_thread_locks_t_decimate_by(status, locks, amount) f_macro_memory_structure_decimate_by(status, locks, f_thread_lock_t, amount); + #define f_macro_thread_locks_t_resize(status, locks, length) f_macro_memory_structure_resize(status, locks, f_thread_lock_t, length); + #define f_macro_thread_locks_t_adjust(status, locks, length) f_macro_memory_structure_adjust(status, locks, f_thread_lock_t, length); - #define f_macro_thread_locks_t_decrease(status, locks) f_macro_memory_structure_decrease(status, locks, f_thread_lock_t); - #define f_macro_thread_locks_t_decrease_by(status, locks, amount) f_macro_memory_structure_decrease_by(status, locks, f_thread_lock_t, amount); + #define f_macro_thread_locks_t_delete(status, locks) f_macro_memory_structure_delete(status, locks, f_thread_lock_t); + #define f_macro_thread_locks_t_destroy(status, locks) f_macro_memory_structure_destroy(status, locks, f_thread_lock_t); - #define f_macro_thread_locks_t_delete(status, locks) f_macro_memory_structure_t_delete(status, locks, f_thread_lock_t) - #define f_macro_thread_locks_t_delete_simple(locks) f_macro_memory_structure_t_delete_simple(locks, f_thread_lock_t) + #define f_macro_thread_locks_t_delete_simple(locks) f_macro_memory_structure_delete_simple(locks, f_thread_lock_t); + #define f_macro_thread_locks_t_destroy_simple(locks) f_macro_memory_structure_destroy_simple(locks, f_thread_lock_t); - #define f_macro_thread_locks_t_destroy(status, locks) f_macro_memory_structure_t_destroy(status, locks, f_thread_lock_t) - #define f_macro_thread_locks_t_destroy_simple(locks) f_macro_memory_structure_t_destroy_simple(locks, f_thread_lock_t) + #define f_macro_thread_locks_t_increase(status, locks) f_macro_memory_structure_increase(status, locks, f_thread_lock_t); + #define f_macro_thread_locks_t_decrease(status, locks) f_macro_memory_structure_decrease(status, locks, f_thread_lock_t); + #define f_macro_thread_locks_t_decimate(status, locks) f_macro_memory_structure_decimate(status, locks, f_thread_lock_t); - #define f_macro_thread_locks_t_increase(status, locks) f_macro_memory_structure_increase(status, locks, f_thread_lock_t); #define f_macro_thread_locks_t_increase_by(status, locks, amount) f_macro_memory_structure_increase_by(status, locks, f_thread_lock_t, amount); - - #define f_macro_thread_locks_t_new(status, locks, length) f_macro_memory_structure_t_new(status, locks, f_thread_lock_t, length) - - #define f_macro_thread_locks_t_resize(status, locks, new_length) f_macro_memory_structure_t_resize(status, locks, f_thread_lock_t, new_length) + #define f_macro_thread_locks_t_decrease_by(status, locks, amount) f_macro_memory_structure_decrease_by(status, locks, f_thread_lock_t, amount); + #define f_macro_thread_locks_t_decimate_by(status, locks, amount) f_macro_memory_structure_decimate_by(status, locks, f_thread_lock_t, amount); #endif // _di_f_thread_locks_t_ /** @@ -305,30 +285,24 @@ extern "C" { #define f_thread_mutexs_t_initialize { 0, 0, 0 } - #define f_macro_thread_mutexs_t_clear(mutexs) f_macro_memory_structure_t_clear(mutexs) - - #define f_macro_thread_mutexs_t_adjust(status, mutexs, length) f_macro_memory_structure_t_adjust(status, mutexs, f_thread_mutex_t, length) + #define f_macro_thread_mutexs_t_new(status, mutexs, length) f_macro_memory_structure_new(status, mutexs, f_thread_mutex_t, length); - #define f_macro_thread_mutexs_t_clear(mutexs) f_macro_memory_structure_t_clear(mutexs) - - #define f_macro_thread_mutexs_t_decimate(status, mutexs) f_macro_memory_structure_decimate(status, mutexs, f_thread_mutex_t); - #define f_macro_thread_mutexs_t_decimate_by(status, mutexs, amount) f_macro_memory_structure_decimate_by(status, mutexs, f_thread_mutex_t, amount); + #define f_macro_thread_mutexs_t_resize(status, mutexs, length) f_macro_memory_structure_resize(status, mutexs, f_thread_mutex_t, length); + #define f_macro_thread_mutexs_t_adjust(status, mutexs, length) f_macro_memory_structure_adjust(status, mutexs, f_thread_mutex_t, length); - #define f_macro_thread_mutexs_t_decrease(status, mutexs) f_macro_memory_structure_decrease(status, mutexs, f_thread_mutex_t); - #define f_macro_thread_mutexs_t_decrease_by(status, mutexs, amount) f_macro_memory_structure_decrease_by(status, mutexs, f_thread_mutex_t, amount); + #define f_macro_thread_mutexs_t_delete(status, mutexs) f_macro_memory_structure_delete(status, mutexs, f_thread_mutex_t); + #define f_macro_thread_mutexs_t_destroy(status, mutexs) f_macro_memory_structure_destroy(status, mutexs, f_thread_mutex_t); - #define f_macro_thread_mutexs_t_delete(status, mutexs) f_macro_memory_structure_t_delete(status, mutexs, f_thread_mutex_t) - #define f_macro_thread_mutexs_t_delete_simple(mutexs) f_macro_memory_structure_t_delete_simple(mutexs, f_thread_mutex_t) + #define f_macro_thread_mutexs_t_delete_simple(mutexs) f_macro_memory_structure_delete_simple(mutexs, f_thread_mutex_t); + #define f_macro_thread_mutexs_t_destroy_simple(mutexs) f_macro_memory_structure_destroy_simple(mutexs, f_thread_mutex_t); - #define f_macro_thread_mutexs_t_destroy(status, mutexs) f_macro_memory_structure_t_destroy(status, mutexs, f_thread_mutex_t) - #define f_macro_thread_mutexs_t_destroy_simple(mutexs) f_macro_memory_structure_t_destroy_simple(mutexs, f_thread_mutex_t) + #define f_macro_thread_mutexs_t_increase(status, mutexs) f_macro_memory_structure_increase(status, mutexs, f_thread_mutex_t); + #define f_macro_thread_mutexs_t_decrease(status, mutexs) f_macro_memory_structure_decrease(status, mutexs, f_thread_mutex_t); + #define f_macro_thread_mutexs_t_decimate(status, mutexs) f_macro_memory_structure_decimate(status, mutexs, f_thread_mutex_t); - #define f_macro_thread_mutexs_t_increase(status, mutexs) f_macro_memory_structure_increase(status, mutexs, f_thread_mutex_t); #define f_macro_thread_mutexs_t_increase_by(status, mutexs, amount) f_macro_memory_structure_increase_by(status, mutexs, f_thread_mutex_t, amount); - - #define f_macro_thread_mutexs_t_new(status, mutexs, length) f_macro_memory_structure_t_new(status, mutexs, f_thread_mutex_t, length) - - #define f_macro_thread_mutexs_t_resize(status, mutexs, new_length) f_macro_memory_structure_t_resize(status, mutexs, f_thread_mutex_t, new_length) + #define f_macro_thread_mutexs_t_decrease_by(status, mutexs, amount) f_macro_memory_structure_decrease_by(status, mutexs, f_thread_mutex_t, amount); + #define f_macro_thread_mutexs_t_decimate_by(status, mutexs, amount) f_macro_memory_structure_decimate_by(status, mutexs, f_thread_mutex_t, amount); #endif // _di_f_thread_mutexs_t_ /** @@ -359,28 +333,24 @@ extern "C" { #define f_thread_mutex_attributes_t_initialize { 0, 0, 0 } - #define f_macro_thread_mutex_attributes_t_adjust(status, mutex_attributes, length) f_macro_memory_structure_t_adjust(status, mutex_attributes, f_thread_mutex_attribute_t, length) - - #define f_macro_thread_mutex_attributes_t_clear(mutex_attributes) f_macro_memory_structure_t_clear(mutex_attributes) + #define f_macro_thread_mutex_attributes_t_new(status, mutex_attributes, length) f_macro_memory_structure_new(status, mutex_attributes, f_thread_mutex_attribute_t, length); - #define f_macro_thread_mutex_attributes_t_decimate(status, mutex_attributes) f_macro_memory_structure_decimate(status, mutex_attributes, f_thread_mutex_attribute_t); - #define f_macro_thread_mutex_attributes_t_decimate_by(status, mutex_attributes, amount) f_macro_memory_structure_decimate_by(status, mutex_attributes, f_thread_mutex_attribute_t, amount); + #define f_macro_thread_mutex_attributes_t_resize(status, mutex_attributes, length) f_macro_memory_structure_resize(status, mutex_attributes, f_thread_mutex_attribute_t, length); + #define f_macro_thread_mutex_attributes_t_adjust(status, mutex_attributes, length) f_macro_memory_structure_adjust(status, mutex_attributes, f_thread_mutex_attribute_t, length); - #define f_macro_thread_mutex_attributes_t_decrease(status, mutex_attributes) f_macro_memory_structure_decrease(status, mutex_attributes, f_thread_mutex_attribute_t); - #define f_macro_thread_mutex_attributes_t_decrease_by(status, mutex_attributes, amount) f_macro_memory_structure_decrease_by(status, mutex_attributes, f_thread_mutex_attribute_t, amount); + #define f_macro_thread_mutex_attributes_t_delete(status, mutex_attributes) f_macro_memory_structure_delete(status, mutex_attributes, f_thread_mutex_attribute_t); + #define f_macro_thread_mutex_attributes_t_destroy(status, mutex_attributes) f_macro_memory_structure_destroy(status, mutex_attributes, f_thread_mutex_attribute_t); - #define f_macro_thread_mutex_attributes_t_delete(status, mutex_attributes) f_macro_memory_structure_t_delete(status, mutex_attributes, f_thread_mutex_attribute_t) - #define f_macro_thread_mutex_attributes_t_delete_simple(mutex_attributes) f_macro_memory_structure_t_delete_simple(mutex_attributes, f_thread_mutex_attribute_t) + #define f_macro_thread_mutex_attributes_t_delete_simple(mutex_attributes) f_macro_memory_structure_delete_simple(mutex_attributes, f_thread_mutex_attribute_t); + #define f_macro_thread_mutex_attributes_t_destroy_simple(mutex_attributes) f_macro_memory_structure_destroy_simple(mutex_attributes, f_thread_mutex_attribute_t); - #define f_macro_thread_mutex_attributes_t_destroy(status, mutex_attributes) f_macro_memory_structure_t_destroy(status, mutex_attributes, f_thread_mutex_attribute_t) - #define f_macro_thread_mutex_attributes_t_destroy_simple(mutex_attributes) f_macro_memory_structure_t_destroy_simple(mutex_attributes, f_thread_mutex_attribute_t) + #define f_macro_thread_mutex_attributes_t_increase(status, mutex_attributes) f_macro_memory_structure_increase(status, mutex_attributes, f_thread_mutex_attribute_t); + #define f_macro_thread_mutex_attributes_t_decrease(status, mutex_attributes) f_macro_memory_structure_decrease(status, mutex_attributes, f_thread_mutex_attribute_t); + #define f_macro_thread_mutex_attributes_t_decimate(status, mutex_attributes) f_macro_memory_structure_decimate(status, mutex_attributes, f_thread_mutex_attribute_t); - #define f_macro_thread_mutex_attributes_t_increase(status, mutex_attributes) f_macro_memory_structure_increase(status, mutex_attributes, f_thread_mutex_attribute_t); #define f_macro_thread_mutex_attributes_t_increase_by(status, mutex_attributes, amount) f_macro_memory_structure_increase_by(status, mutex_attributes, f_thread_mutex_attribute_t, amount); - - #define f_macro_thread_mutex_attributes_t_new(status, mutex_attributes, length) f_macro_memory_structure_t_new(status, mutex_attributes, f_thread_mutex_attribute_t, length) - - #define f_macro_thread_mutex_attributes_t_resize(status, mutex_attributes, new_length) f_macro_memory_structure_t_resize(status, mutex_attributes, f_thread_mutex_attribute_t, new_length) + #define f_macro_thread_mutex_attributes_t_decrease_by(status, mutex_attributes, amount) f_macro_memory_structure_decrease_by(status, mutex_attributes, f_thread_mutex_attribute_t, amount); + #define f_macro_thread_mutex_attributes_t_decimate_by(status, mutex_attributes, amount) f_macro_memory_structure_decimate_by(status, mutex_attributes, f_thread_mutex_attribute_t, amount); #endif // _di_f_thread_mutex_attributes_t_ /** @@ -411,28 +381,24 @@ extern "C" { #define f_thread_onces_t_initialize { 0, 0, 0 } - #define f_macro_thread_onces_t_adjust(status, onces, length) f_macro_memory_structure_t_adjust(status, onces, f_thread_once_t, length) - - #define f_macro_thread_onces_t_clear(onces) f_macro_memory_structure_t_clear(onces) + #define f_macro_thread_onces_t_new(status, onces, length) f_macro_memory_structure_new(status, onces, f_thread_once_t, length); - #define f_macro_thread_onces_t_decimate(status, onces) f_macro_memory_structure_decimate(status, onces, f_thread_once_t); - #define f_macro_thread_onces_t_decimate_by(status, onces, amount) f_macro_memory_structure_decimate_by(status, onces, f_thread_once_t, amount); + #define f_macro_thread_onces_t_resize(status, onces, length) f_macro_memory_structure_resize(status, onces, f_thread_once_t, length); + #define f_macro_thread_onces_t_adjust(status, onces, length) f_macro_memory_structure_adjust(status, onces, f_thread_once_t, length); - #define f_macro_thread_onces_t_decrease(status, onces) f_macro_memory_structure_decrease(status, onces, f_thread_once_t); - #define f_macro_thread_onces_t_decrease_by(status, onces, amount) f_macro_memory_structure_decrease_by(status, onces, f_thread_once_t, amount); + #define f_macro_thread_onces_t_delete(status, onces) f_macro_memory_structure_delete(status, onces, f_thread_once_t); + #define f_macro_thread_onces_t_destroy(status, onces) f_macro_memory_structure_destroy(status, onces, f_thread_once_t); - #define f_macro_thread_onces_t_delete(status, onces) f_macro_memory_structure_t_delete(status, onces, f_thread_once_t) - #define f_macro_thread_onces_t_delete_simple(onces) f_macro_memory_structure_t_delete_simple(onces, f_thread_once_t) + #define f_macro_thread_onces_t_delete_simple(onces) f_macro_memory_structure_delete_simple(onces, f_thread_once_t); + #define f_macro_thread_onces_t_destroy_simple(onces) f_macro_memory_structure_destroy_simple(onces, f_thread_once_t); - #define f_macro_thread_onces_t_destroy(status, onces) f_macro_memory_structure_t_destroy(status, onces, f_thread_once_t) - #define f_macro_thread_onces_t_destroy_simple(onces) f_macro_memory_structure_t_destroy_simple(onces, f_thread_once_t) + #define f_macro_thread_onces_t_increase(status, onces) f_macro_memory_structure_increase(status, onces, f_thread_once_t); + #define f_macro_thread_onces_t_decrease(status, onces) f_macro_memory_structure_decrease(status, onces, f_thread_once_t); + #define f_macro_thread_onces_t_decimate(status, onces) f_macro_memory_structure_decimate(status, onces, f_thread_once_t); - #define f_macro_thread_onces_t_increase(status, onces) f_macro_memory_structure_increase(status, onces, f_thread_once_t); #define f_macro_thread_onces_t_increase_by(status, onces, amount) f_macro_memory_structure_increase_by(status, onces, f_thread_once_t, amount); - - #define f_macro_thread_onces_t_new(status, onces, length) f_macro_memory_structure_t_new(status, onces, f_thread_once_t, length) - - #define f_macro_thread_onces_t_resize(status, onces, new_length) f_macro_memory_structure_t_resize(status, onces, f_thread_once_t, new_length) + #define f_macro_thread_onces_t_decrease_by(status, onces, amount) f_macro_memory_structure_decrease_by(status, onces, f_thread_once_t, amount); + #define f_macro_thread_onces_t_decimate_by(status, onces, amount) f_macro_memory_structure_decimate_by(status, onces, f_thread_once_t, amount); #endif // _di_f_thread_onces_t_ /** @@ -473,28 +439,24 @@ extern "C" { #define f_thread_sets_t_initialize { 0, 0, 0 } - #define f_macro_thread_sets_t_adjust(status, sets, length) f_macro_memory_structure_t_adjust(status, sets, f_thread_set_t, length) + #define f_macro_thread_sets_t_new(status, sets, length) f_macro_memory_structure_new(status, sets, f_thread_set_t, length); - #define f_macro_thread_sets_t_clear(sets) f_macro_memory_structure_t_clear(sets) + #define f_macro_thread_sets_t_resize(status, sets, length) f_macro_memory_structure_resize(status, sets, f_thread_set_t, length); + #define f_macro_thread_sets_t_adjust(status, sets, length) f_macro_memory_structure_adjust(status, sets, f_thread_set_t, length); - #define f_macro_thread_sets_t_decimate(status, sets) f_macro_memory_structure_decimate(status, sets, f_thread_set_t); - #define f_macro_thread_sets_t_decimate_by(status, sets, amount) f_macro_memory_structure_decimate_by(status, sets, f_thread_set_t, amount); - - #define f_macro_thread_sets_t_decrease(status, sets) f_macro_memory_structure_decrease(status, sets, f_thread_set_t); - #define f_macro_thread_sets_t_decrease_by(status, sets, amount) f_macro_memory_structure_decrease_by(status, sets, f_thread_set_t, amount); + #define f_macro_thread_sets_t_delete(status, sets) f_macro_memory_structure_delete(status, sets, f_thread_set_t); + #define f_macro_thread_sets_t_destroy(status, sets) f_macro_memory_structure_destroy(status, sets, f_thread_set_t); - #define f_macro_thread_sets_t_delete(status, sets) f_macro_memory_structure_t_delete(status, sets, f_thread_set_t) - #define f_macro_thread_sets_t_delete_simple(sets) f_macro_memory_structure_t_delete_simple(sets, f_thread_set_t) + #define f_macro_thread_sets_t_delete_simple(sets) f_macro_memory_structure_delete_simple(sets, f_thread_set_t); + #define f_macro_thread_sets_t_destroy_simple(sets) f_macro_memory_structure_destroy_simple(sets, f_thread_set_t); - #define f_macro_thread_sets_t_destroy(status, sets) f_macro_memory_structure_t_destroy(status, sets, f_thread_set_t) - #define f_macro_thread_sets_t_destroy_simple(sets) f_macro_memory_structure_t_destroy_simple(sets, f_thread_set_t) + #define f_macro_thread_sets_t_increase(status, sets) f_macro_memory_structure_increase(status, sets, f_thread_set_t); + #define f_macro_thread_sets_t_decrease(status, sets) f_macro_memory_structure_decrease(status, sets, f_thread_set_t); + #define f_macro_thread_sets_t_decimate(status, sets) f_macro_memory_structure_decimate(status, sets, f_thread_set_t); - #define f_macro_thread_sets_t_increase(status, sets) f_macro_memory_structure_increase(status, sets, f_thread_set_t); #define f_macro_thread_sets_t_increase_by(status, sets, amount) f_macro_memory_structure_increase_by(status, sets, f_thread_set_t, amount); - - #define f_macro_thread_sets_t_new(status, sets, length) f_macro_memory_structure_t_new(status, sets, f_thread_set_t, length) - - #define f_macro_thread_sets_t_resize(status, sets, new_length) f_macro_memory_structure_t_resize(status, sets, f_thread_set_t, new_length) + #define f_macro_thread_sets_t_decrease_by(status, sets, amount) f_macro_memory_structure_decrease_by(status, sets, f_thread_set_t, amount); + #define f_macro_thread_sets_t_decimate_by(status, sets, amount) f_macro_memory_structure_decimate_by(status, sets, f_thread_set_t, amount); #endif // _di_f_thread_sets_t_ #ifdef __cplusplus diff --git a/level_0/f_type/c/type_array.h b/level_0/f_type/c/type_array.h index 453d3c6..53c3551 100644 --- a/level_0/f_type/c/type_array.h +++ b/level_0/f_type/c/type_array.h @@ -37,28 +37,26 @@ extern "C" { #define f_array_lengths_t_initialize { 0, 0, 0 } - #define f_macro_array_lengths_t_adjust(status, lengths, length) f_macro_memory_structure_t_adjust(status, lengths, f_array_length_t, length) + #define f_macro_array_lengths_t_clear(lengths) f_macro_memory_structure_clear(lengths); - #define f_macro_array_lengths_t_clear(lengths) f_macro_memory_structure_t_clear(lengths) + #define f_macro_array_lengths_t_new(status, lengths, length) f_macro_memory_structure_new(status, lengths, f_array_length_t, length); - #define f_macro_array_lengths_t_decimate(status, lengths) f_macro_memory_structure_decimate(status, lengths, f_array_length_t); - #define f_macro_array_lengths_t_decimate_by(status, lengths, amount) f_macro_memory_structure_decimate_by(status, lengths, f_array_length_t, amount); - - #define f_macro_array_lengths_t_decrease(status, lengths) f_macro_memory_structure_decrease(status, lengths, f_array_length_t); - #define f_macro_array_lengths_t_decrease_by(status, lengths, amount) f_macro_memory_structure_decrease_by(status, lengths, f_array_length_t, amount); + #define f_macro_array_lengths_t_resize(status, lengths, length) f_macro_memory_structure_resize(status, lengths, f_array_length_t, length); + #define f_macro_array_lengths_t_adjust(status, lengths, length) f_macro_memory_structure_adjust(status, lengths, f_array_length_t, length); - #define f_macro_array_lengths_t_delete(status, lengths) f_macro_memory_structure_t_delete(status, lengths, f_array_length_t) - #define f_macro_array_lengths_t_delete_simple(lengths) f_macro_memory_structure_t_delete_simple(lengths, f_array_length_t) + #define f_macro_array_lengths_t_increase(status, lengths) f_macro_memory_structure_increase(status, lengths, f_array_length_t); + #define f_macro_array_lengths_t_decrease(status, lengths) f_macro_memory_structure_decrease(status, lengths, f_array_length_t); + #define f_macro_array_lengths_t_decimate(status, lengths) f_macro_memory_structure_decimate(status, lengths, f_array_length_t); - #define f_macro_array_lengths_t_destroy(status, lengths) f_macro_memory_structure_t_destroy(status, lengths, f_array_length_t) - #define f_macro_array_lengths_t_destroy_simple(lengths) f_macro_memory_structure_t_destroy_simple(lengths, f_array_length_t) - - #define f_macro_array_lengths_t_increase(status, lengths) f_macro_memory_structure_increase(status, lengths, f_array_length_t); #define f_macro_array_lengths_t_increase_by(status, lengths, amount) f_macro_memory_structure_increase_by(status, lengths, f_array_length_t, amount); + #define f_macro_array_lengths_t_decrease_by(status, lengths, amount) f_macro_memory_structure_decrease_by(status, lengths, f_array_length_t, amount); + #define f_macro_array_lengths_t_decimate_by(status, lengths, amount) f_macro_memory_structure_decimate_by(status, lengths, f_array_length_t, amount); - #define f_macro_array_lengths_t_new(status, lengths, length) f_macro_memory_structure_t_new(status, lengths, f_array_length_t, length) + #define f_macro_array_lengths_t_delete(status, lengths) f_macro_memory_structure_delete(status, lengths, f_array_length_t); + #define f_macro_array_lengths_t_destroy(status, lengths) f_macro_memory_structure_destroy(status, lengths, f_array_length_t); - #define f_macro_array_lengths_t_resize(status, lengths, new_length) f_macro_memory_structure_t_resize(status, lengths, f_array_length_t, new_length) + #define f_macro_array_lengths_t_delete_simple(lengths) f_macro_memory_structure_delete_simple(lengths, f_array_length_t); + #define f_macro_array_lengths_t_destroy_simple(lengths) f_macro_memory_structure_destroy_simple(lengths, f_array_length_t); #endif // _di_f_array_lengths_t_ /** @@ -78,18 +76,18 @@ extern "C" { #define f_array_lengthss_t_initialize { 0, 0, 0 } - #define f_macro_array_lengthss_t_clear(lengths) f_macro_memory_structures_t_clear(lengths) + #define f_macro_array_lengthss_t_clear(lengths) f_macro_memory_structures_clear(lengths); - #define f_macro_array_lengthss_t_new(status, lengths, length) f_macro_memory_structures_t_new(status, lengths, f_array_length_t, length) + #define f_macro_array_lengthss_t_new(status, lengths, length) f_macro_memory_structures_new(status, lengths, f_array_length_t, length); - #define f_macro_array_lengthss_t_delete(status, lengths) f_macro_memory_structures_t_delete(status, lengths, f_array_length_t, f_array_lengths_t) - #define f_macro_array_lengthss_t_destroy(status, lengths) f_macro_memory_structures_t_destroy(status, lengths, f_array_length_t, f_array_lengths_t) + #define f_macro_array_lengthss_t_delete(status, lengths) f_macro_memory_structures_delete(status, lengths, f_array_length_t, f_array_lengths_t); + #define f_macro_array_lengthss_t_destroy(status, lengths) f_macro_memory_structures_destroy(status, lengths, f_array_length_t, f_array_lengths_t); - #define f_macro_array_lengthss_t_delete_simple(lengths) f_macro_memory_structures_t_delete_simple(lengths, f_array_length_t, f_array_lengths_t) - #define f_macro_array_lengthss_t_destroy_simple(lengths) f_macro_memory_structures_t_destroy_simple(lengths, f_array_length_t, f_array_lengths_t) + #define f_macro_array_lengthss_t_delete_simple(lengths) f_macro_memory_structures_delete_simple(lengths, f_array_length_t, f_array_lengths_t); + #define f_macro_array_lengthss_t_destroy_simple(lengths) f_macro_memory_structures_destroy_simple(lengths, f_array_length_t, f_array_lengths_t); - #define f_macro_array_lengthss_t_resize(status, lengths, new_length) f_macro_memory_structures_t_resize(status, lengths, f_array_length_t, f_array_lengths_t, new_length, f_array_length_t) - #define f_macro_array_lengthss_t_adjust(status, lengths, new_length) f_macro_memory_structures_t_adjust(status, lengths, f_array_length_t, f_array_lengths_t, new_length, f_array_length_t) + #define f_macro_array_lengthss_t_resize(status, lengths, length) f_macro_memory_structures_resize(status, lengths, f_array_length_t, f_array_lengths_t, length, f_array_length_t); + #define f_macro_array_lengthss_t_adjust(status, lengths, length) f_macro_memory_structures_adjust(status, lengths, f_array_length_t, f_array_lengths_t, length, f_array_length_t); #endif // _di_f_array_lengthss_t_ /** @@ -109,28 +107,28 @@ extern "C" { #define f_cells_t_initialize {0, 0, 0} - #define f_macro_cells_t_adjust(status, cells, length) f_macro_memory_structure_t_adjust(status, cells, f_cell_t, length) + #define f_macro_cells_t_clear(cells) f_macro_memory_structure_clear(cells); - #define f_macro_cells_t_clear(cells) f_macro_memory_structure_t_clear(cells) + #define f_macro_cells_t_new(status, cells, length) f_macro_memory_structure_new(status, cells, f_cell_t, length); - #define f_macro_cells_t_decimate(status, cells) f_macro_memory_structure_decimate(status, cells, f_cell_t); - #define f_macro_cells_t_decimate_by(status, cells, amount) f_macro_memory_structure_decimate_by(status, cells, f_cell_t, amount); + #define f_macro_cells_t_resize(status, cells, length) f_macro_memory_structure_resize(status, cells, f_cell_t, length); + #define f_macro_cells_t_adjust(status, cells, length) f_macro_memory_structure_adjust(status, cells, f_cell_t, length); + + #define f_macro_cells_t_increase(status, cells) f_macro_memory_structure_increase(status, cells, f_cell_t); + #define f_macro_cells_t_decrease(status, cells) f_macro_memory_structure_decrease(status, cells, f_cell_t); + #define f_macro_cells_t_decimate(status, cells) f_macro_memory_structure_decimate(status, cells, f_cell_t); - #define f_macro_cells_t_decrease(status, cells) f_macro_memory_structure_decrease(status, cells, f_cell_t); + #define f_macro_cells_t_increase_by(status, cells, amount) f_macro_memory_structure_increase_by(status, cells, f_cell_t, amount); #define f_macro_cells_t_decrease_by(status, cells, amount) f_macro_memory_structure_decrease_by(status, cells, f_cell_t, amount); + #define f_macro_cells_t_decimate_by(status, cells, amount) f_macro_memory_structure_decimate_by(status, cells, f_cell_t, amount); - #define f_macro_cells_t_delete(status, cells) f_macro_memory_structure_t_delete(status, cells, f_cell_t) - #define f_macro_cells_t_delete_simple(cells) f_macro_memory_structure_t_delete_simple(cells, f_cell_t) + #define f_macro_cells_t_delete(status, cells) f_macro_memory_structure_delete(status, cells, f_cell_t); + #define f_macro_cells_t_destroy(status, cells) f_macro_memory_structure_destroy(status, cells, f_cell_t); - #define f_macro_cells_t_destroy(status, cells) f_macro_memory_structure_t_destroy(status, cells, f_cell_t) - #define f_macro_cells_t_destroy_simple(cells) f_macro_memory_structure_t_destroy_simple(cells, f_cell_t) + #define f_macro_cells_t_delete_simple(cells) f_macro_memory_structure_delete_simple(cells, f_cell_t); + #define f_macro_cells_t_destroy_simple(cells) f_macro_memory_structure_destroy_simple(cells, f_cell_t); - #define f_macro_cells_t_increase(status, cells) f_macro_memory_structure_increase(status, cells, f_cell_t); - #define f_macro_cells_t_increase_by(status, cells, amount) f_macro_memory_structure_increase_by(status, cells, f_cell_t, amount); - #define f_macro_cells_t_new(status, cells, length) f_macro_memory_structure_t_new(status, cells, f_cell_t, length) - - #define f_macro_cells_t_resize(status, cells, new_length) f_macro_memory_structure_t_resize(status, cells, f_cell_t, new_length) #endif // _di_f_cells_t_ /** @@ -150,18 +148,18 @@ extern "C" { #define f_cellss_t_initialize { 0, 0, 0 } - #define f_macro_cellss_t_clear(rangess) f_macro_memory_structures_t_clear(rangess) + #define f_macro_cellss_t_clear(rangess) f_macro_memory_structures_clear(rangess); - #define f_macro_cellss_t_new(status, rangess, length) f_macro_memory_structures_t_new(status, rangess, f_cells_t, length) + #define f_macro_cellss_t_new(status, rangess, length) f_macro_memory_structures_new(status, rangess, f_cells_t, length); - #define f_macro_cellss_t_delete(status, rangess) f_macro_memory_structures_t_delete(status, rangess, f_cell_t, f_cells_t) - #define f_macro_cellss_t_destroy(status, rangess) f_macro_memory_structures_t_destroy(status, rangess, f_cell_t, f_cells_t) + #define f_macro_cellss_t_delete(status, rangess) f_macro_memory_structures_delete(status, rangess, f_cell_t, f_cells_t); + #define f_macro_cellss_t_destroy(status, rangess) f_macro_memory_structures_destroy(status, rangess, f_cell_t, f_cells_t); - #define f_macro_cellss_t_delete_simple(rangess) f_macro_memory_structures_t_delete_simple(rangess, f_cell_t, f_cells_t) - #define f_macro_cellss_t_destroy_simple(rangess) f_macro_memory_structures_t_destroy_simple(rangess, f_cell_t, f_cells_t) + #define f_macro_cellss_t_delete_simple(rangess) f_macro_memory_structures_delete_simple(rangess, f_cell_t, f_cells_t); + #define f_macro_cellss_t_destroy_simple(rangess) f_macro_memory_structures_destroy_simple(rangess, f_cell_t, f_cells_t); - #define f_macro_cellss_t_resize(status, rangess, new_length) f_macro_memory_structures_t_resize(status, rangess, f_cell_t, f_cells_t, new_length, f_array_length_t) - #define f_macro_cellss_t_adjust(status, rangess, new_length) f_macro_memory_structures_t_adjust(status, rangess, f_cell_t, f_cells_t, new_length, f_array_length_t) + #define f_macro_cellss_t_resize(status, rangess, length) f_macro_memory_structures_resize(status, rangess, f_cell_t, f_cells_t, length, f_array_length_t); + #define f_macro_cellss_t_adjust(status, rangess, length) f_macro_memory_structures_adjust(status, rangess, f_cell_t, f_cells_t, length, f_array_length_t); #endif // _di_f_cellss_t_ /** @@ -181,28 +179,26 @@ extern "C" { #define f_int8s_t_initialize { 0, 0, 0 } - #define f_macro_int8s_t_adjust(status, int8s, length) f_macro_memory_structure_t_adjust(status, int8s, int8_t, length) + #define f_macro_int8s_t_clear(int8s) f_macro_memory_structure_clear(int8s); - #define f_macro_int8s_t_clear(int8s) f_macro_memory_structure_t_clear(int8s) + #define f_macro_int8s_t_new(status, int8s, length) f_macro_memory_structure_new(status, int8s, int8_t, length); - #define f_macro_int8s_t_decimate(status, int8s) f_macro_memory_structure_decimate(status, int8s, int8_t); - #define f_macro_int8s_t_decimate_by(status, int8s, amount) f_macro_memory_structure_decimate_by(status, int8s, int8_t, amount); + #define f_macro_int8s_t_resize(status, int8s, length) f_macro_memory_structure_resize(status, int8s, int8_t, length); + #define f_macro_int8s_t_adjust(status, int8s, length) f_macro_memory_structure_adjust(status, int8s, int8_t, length); - #define f_macro_int8s_t_decrease(status, int8s) f_macro_memory_structure_decrease(status, int8s, int8_t); - #define f_macro_int8s_t_decrease_by(status, int8s, amount) f_macro_memory_structure_decrease_by(status, int8s, int8_t, amount); + #define f_macro_int8s_t_delete(status, int8s) f_macro_memory_structure_delete(status, int8s, int8_t); + #define f_macro_int8s_t_destroy(status, int8s) f_macro_memory_structure_destroy(status, int8s, int8_t); - #define f_macro_int8s_t_delete(status, int8s) f_macro_memory_structure_t_delete(status, int8s, int8_t) - #define f_macro_int8s_t_delete_simple(int8s) f_macro_memory_structure_t_delete_simple(int8s, int8_t) + #define f_macro_int8s_t_delete_simple(int8s) f_macro_memory_structure_delete_simple(int8s, int8_t); + #define f_macro_int8s_t_destroy_simple(int8s) f_macro_memory_structure_destroy_simple(int8s, int8_t); - #define f_macro_int8s_t_destroy(status, int8s) f_macro_memory_structure_t_destroy(status, int8s, int8_t) - #define f_macro_int8s_t_destroy_simple(int8s) f_macro_memory_structure_t_destroy_simple(int8s, int8_t) + #define f_macro_int8s_t_increase(status, int8s) f_macro_memory_structure_increase(status, int8s, int8_t); + #define f_macro_int8s_t_decrease(status, int8s) f_macro_memory_structure_decrease(status, int8s, int8_t); + #define f_macro_int8s_t_decimate(status, int8s) f_macro_memory_structure_decimate(status, int8s, int8_t); - #define f_macro_int8s_t_increase(status, int8s) f_macro_memory_structure_increase(status, int8s, int8_t); #define f_macro_int8s_t_increase_by(status, int8s, amount) f_macro_memory_structure_increase_by(status, int8s, int8_t, amount); - - #define f_macro_int8s_t_new(status, int8s, length) f_macro_memory_structure_t_new(status, int8s, int8_t, length) - - #define f_macro_int8s_t_resize(status, int8s, new_length) f_macro_memory_structure_t_resize(status, int8s, int8_t, new_length) + #define f_macro_int8s_t_decrease_by(status, int8s, amount) f_macro_memory_structure_decrease_by(status, int8s, int8_t, amount); + #define f_macro_int8s_t_decimate_by(status, int8s, amount) f_macro_memory_structure_decimate_by(status, int8s, int8_t, amount); #endif // _di_int8s_t_ /** @@ -222,18 +218,18 @@ extern "C" { #define f_int8ss_t_initialize { 0, 0, 0 } - #define f_macro_int8ss_t_clear(numbers) f_macro_memory_structures_t_clear(numbers) + #define f_macro_int8ss_t_clear(numbers) f_macro_memory_structures_clear(numbers); - #define f_macro_int8ss_t_new(status, numbers, length) f_macro_memory_structures_t_new(status, numbers, int8_t, length) + #define f_macro_int8ss_t_new(status, numbers, length) f_macro_memory_structures_new(status, numbers, int8_t, length); - #define f_macro_int8ss_t_delete(status, numbers) f_macro_memory_structures_t_delete(status, numbers, int8_t, f_int8s_t) - #define f_macro_int8ss_t_destroy(status, numbers) f_macro_memory_structures_t_destroy(status, numbers, int8_t, f_int8s_t) + #define f_macro_int8ss_t_delete(status, numbers) f_macro_memory_structures_delete(status, numbers, int8_t, f_int8s_t); + #define f_macro_int8ss_t_destroy(status, numbers) f_macro_memory_structures_destroy(status, numbers, int8_t, f_int8s_t); - #define f_macro_int8ss_t_delete_simple(numbers) f_macro_memory_structures_t_delete_simple(numbers, int8_t, f_int8s_t) - #define f_macro_int8ss_t_destroy_simple(numbers) f_macro_memory_structures_t_destroy_simple(numbers, int8_t, f_int8s_t) + #define f_macro_int8ss_t_delete_simple(numbers) f_macro_memory_structures_delete_simple(numbers, int8_t, f_int8s_t); + #define f_macro_int8ss_t_destroy_simple(numbers) f_macro_memory_structures_destroy_simple(numbers, int8_t, f_int8s_t); - #define f_macro_int8ss_t_resize(status, numbers, new_length) f_macro_memory_structures_t_resize(status, numbers, int8_t, f_int8s_t, new_length, f_array_length_t) - #define f_macro_int8ss_t_adjust(status, numbers, new_length) f_macro_memory_structures_t_adjust(status, numbers, int8_t, f_int8s_t, new_length, f_array_length_t) + #define f_macro_int8ss_t_resize(status, numbers, length) f_macro_memory_structures_resize(status, numbers, int8_t, f_int8s_t, length, f_array_length_t); + #define f_macro_int8ss_t_adjust(status, numbers, length) f_macro_memory_structures_adjust(status, numbers, int8_t, f_int8s_t, length, f_array_length_t); #endif // _di_int8ss_t_ /** @@ -253,28 +249,26 @@ extern "C" { #define f_uint8s_t_initialize { 0, 0, 0 } - #define f_macro_uint8s_t_adjust(status, uint8s, length) f_macro_memory_structure_t_adjust(status, uint8s, uint8_t, length) - - #define f_macro_uint8s_t_clear(uint8s) f_macro_memory_structure_t_clear(uint8s) - - #define f_macro_uint8s_t_decimate(status, uint8s) f_macro_memory_structure_decimate(status, uint8s, uint8_t); - #define f_macro_uint8s_t_decimate_by(status, uint8s, amount) f_macro_memory_structure_decimate_by(status, uint8s, uint8_t, amount); + #define f_macro_uint8s_t_clear(uint8s) f_macro_memory_structure_clear(uint8s); - #define f_macro_uint8s_t_decrease(status, uint8s) f_macro_memory_structure_decrease(status, uint8s, uint8_t); - #define f_macro_uint8s_t_decrease_by(status, uint8s, amount) f_macro_memory_structure_decrease_by(status, uint8s, uint8_t, amount); + #define f_macro_uint8s_t_new(status, uint8s, length) f_macro_memory_structure_new(status, uint8s, uint8_t, length); - #define f_macro_uint8s_t_delete(status, uint8s) f_macro_memory_structure_t_delete(status, uint8s, uint8_t) - #define f_macro_uint8s_t_delete_simple(uint8s) f_macro_memory_structure_t_delete_simple(uint8s, uint8_t) + #define f_macro_uint8s_t_adjust(status, uint8s, length) f_macro_memory_structure_adjust(status, uint8s, uint8_t, length); + #define f_macro_uint8s_t_resize(status, uint8s, length) f_macro_memory_structure_resize(status, uint8s, uint8_t, length); - #define f_macro_uint8s_t_destroy(status, uint8s) f_macro_memory_structure_t_destroy(status, uint8s, uint8_t) - #define f_macro_uint8s_t_destroy_simple(uint8s) f_macro_memory_structure_t_destroy_simple(uint8s, uint8_t) + #define f_macro_uint8s_t_increase(status, uint8s) f_macro_memory_structure_increase(status, uint8s, uint8_t); + #define f_macro_uint8s_t_decimate(status, uint8s) f_macro_memory_structure_decimate(status, uint8s, uint8_t); + #define f_macro_uint8s_t_decrease(status, uint8s) f_macro_memory_structure_decrease(status, uint8s, uint8_t); - #define f_macro_uint8s_t_increase(status, uint8s) f_macro_memory_structure_increase(status, uint8s, uint8_t); #define f_macro_uint8s_t_increase_by(status, uint8s, amount) f_macro_memory_structure_increase_by(status, uint8s, uint8_t, amount); + #define f_macro_uint8s_t_decrease_by(status, uint8s, amount) f_macro_memory_structure_decrease_by(status, uint8s, uint8_t, amount); + #define f_macro_uint8s_t_decimate_by(status, uint8s, amount) f_macro_memory_structure_decimate_by(status, uint8s, uint8_t, amount); - #define f_macro_uint8s_t_new(status, uint8s, length) f_macro_memory_structure_t_new(status, uint8s, uint8_t, length) + #define f_macro_uint8s_t_delete(status, uint8s) f_macro_memory_structure_delete(status, uint8s, uint8_t); + #define f_macro_uint8s_t_destroy(status, uint8s) f_macro_memory_structure_destroy(status, uint8s, uint8_t); - #define f_macro_uint8s_t_resize(status, uint8s, new_length) f_macro_memory_structure_t_resize(status, uint8s, uint8_t, new_length) + #define f_macro_uint8s_t_delete_simple(uint8s) f_macro_memory_structure_delete_simple(uint8s, uint8_t); + #define f_macro_uint8s_t_destroy_simple(uint8s) f_macro_memory_structure_destroy_simple(uint8s, uint8_t); #endif // _di_uint8s_t_ /** @@ -294,19 +288,19 @@ extern "C" { #define f_uint8ss_t_initialize { 0, 0, 0 } - #define f_macro_uint8ss_t_clear(numbers) f_macro_memory_structures_t_clear(numbers) + #define f_macro_uint8ss_t_clear(numbers) f_macro_memory_structures_clear(numbers); - #define f_macro_uint8ss_t_new(status, numbers, length) f_macro_memory_structures_t_new(status, numbers, uint8_t, length) + #define f_macro_uint8ss_t_new(status, numbers, length) f_macro_memory_structures_new(status, numbers, uint8_t, length); - #define f_macro_uint8ss_t_delete(status, numbers) f_macro_memory_structures_t_delete(status, numbers, uint8_t, f_uint8s_t) - #define f_macro_uint8ss_t_delete(status, numbers) f_macro_memory_structures_t_delete(status, numbers, uint8_t, f_uint8s_t) - #define f_macro_uint8ss_t_destroy(status, numbers) f_macro_memory_structures_t_destroy(status, numbers, uint8_t, f_uint8s_t) + #define f_macro_uint8ss_t_delete(status, numbers) f_macro_memory_structures_delete(status, numbers, uint8_t, f_uint8s_t); + #define f_macro_uint8ss_t_delete(status, numbers) f_macro_memory_structures_delete(status, numbers, uint8_t, f_uint8s_t); + #define f_macro_uint8ss_t_destroy(status, numbers) f_macro_memory_structures_destroy(status, numbers, uint8_t, f_uint8s_t); - #define f_macro_uint8ss_t_delete_simple(numbers) f_macro_memory_structures_t_delete_simple(numbers, uint8_t, f_uint8s_t) - #define f_macro_uint8ss_t_destroy_simple(numbers) f_macro_memory_structures_t_destroy_simple(numbers, uint8_t, f_uint8s_t) + #define f_macro_uint8ss_t_delete_simple(numbers) f_macro_memory_structures_delete_simple(numbers, uint8_t, f_uint8s_t); + #define f_macro_uint8ss_t_destroy_simple(numbers) f_macro_memory_structures_destroy_simple(numbers, uint8_t, f_uint8s_t); - #define f_macro_uint8ss_t_resize(status, numbers, new_length) f_macro_memory_structures_t_resize(status, numbers, uint8_t, f_uint8s_t, new_length, f_array_length_t) - #define f_macro_uint8ss_t_adjust(status, numbers, new_length) f_macro_memory_structures_t_adjust(status, numbers, uint8_t, f_uint8s_t, new_length, f_array_length_t) + #define f_macro_uint8ss_t_resize(status, numbers, length) f_macro_memory_structures_resize(status, numbers, uint8_t, f_uint8s_t, length, f_array_length_t); + #define f_macro_uint8ss_t_adjust(status, numbers, length) f_macro_memory_structures_adjust(status, numbers, uint8_t, f_uint8s_t, length, f_array_length_t); #endif // _di_uint8ss_t_ /** @@ -326,28 +320,26 @@ extern "C" { #define f_int16s_t_initialize { 0, 0, 0 } - #define f_macro_int16s_t_adjust(status, int16s, length) f_macro_memory_structure_t_adjust(status, int16s, int16_t, length) + #define f_macro_int16s_t_clear(int16s) f_macro_memory_structure_clear(int16s); - #define f_macro_int16s_t_clear(int16s) f_macro_memory_structure_t_clear(int16s) + #define f_macro_int16s_t_new(status, int16s, length) f_macro_memory_structure_new(status, int16s, int16_t, length); - #define f_macro_int16s_t_decimate(status, int16s) f_macro_memory_structure_decimate(status, int16s, int16_t); - #define f_macro_int16s_t_decimate_by(status, int16s, amount) f_macro_memory_structure_decimate_by(status, int16s, int16_t, amount); - - #define f_macro_int16s_t_decrease(status, int16s) f_macro_memory_structure_decrease(status, int16s, int16_t); - #define f_macro_int16s_t_decrease_by(status, int16s, amount) f_macro_memory_structure_decrease_by(status, int16s, int16_t, amount); + #define f_macro_int16s_t_adjust(status, int16s, length) f_macro_memory_structure_adjust(status, int16s, int16_t, length); + #define f_macro_int16s_t_resize(status, int16s, length) f_macro_memory_structure_resize(status, int16s, int16_t, length); - #define f_macro_int16s_t_delete(status, int16s) f_macro_memory_structure_t_delete(status, int16s, int16_t) - #define f_macro_int16s_t_delete_simple(int16s) f_macro_memory_structure_t_delete_simple(int16s, int16_t) + #define f_macro_int16s_t_increase(status, int16s) f_macro_memory_structure_increase(status, int16s, int16_t); + #define f_macro_int16s_t_decimate(status, int16s) f_macro_memory_structure_decimate(status, int16s, int16_t); + #define f_macro_int16s_t_decrease(status, int16s) f_macro_memory_structure_decrease(status, int16s, int16_t); - #define f_macro_int16s_t_destroy(status, int16s) f_macro_memory_structure_t_destroy(status, int16s, int16_t) - #define f_macro_int16s_t_destroy_simple(int16s) f_macro_memory_structure_t_destroy_simple(int16s, int16_t) - - #define f_macro_int16s_t_increase(status, int16s) f_macro_memory_structure_increase(status, int16s, int16_t); #define f_macro_int16s_t_increase_by(status, int16s, amount) f_macro_memory_structure_increase_by(status, int16s, int16_t, amount); + #define f_macro_int16s_t_decrease_by(status, int16s, amount) f_macro_memory_structure_decrease_by(status, int16s, int16_t, amount); + #define f_macro_int16s_t_decimate_by(status, int16s, amount) f_macro_memory_structure_decimate_by(status, int16s, int16_t, amount); - #define f_macro_int16s_t_new(status, int16s, length) f_macro_memory_structure_t_new(status, int16s, int16_t, length) + #define f_macro_int16s_t_delete(status, int16s) f_macro_memory_structure_delete(status, int16s, int16_t); + #define f_macro_int16s_t_destroy(status, int16s) f_macro_memory_structure_destroy(status, int16s, int16_t); - #define f_macro_int16s_t_resize(status, int16s, new_length) f_macro_memory_structure_t_resize(status, int16s, int16_t, new_length) + #define f_macro_int16s_t_delete_simple(int16s) f_macro_memory_structure_delete_simple(int16s, int16_t); + #define f_macro_int16s_t_destroy_simple(int16s) f_macro_memory_structure_destroy_simple(int16s, int16_t); #endif // _di_int16s_t_ /** @@ -367,18 +359,18 @@ extern "C" { #define f_int16ss_t_initialize { 0, 0, 0 } - #define f_macro_int16ss_t_clear(numbers) f_macro_memory_structures_t_clear(numbers) + #define f_macro_int16ss_t_clear(numbers) f_macro_memory_structures_clear(numbers); - #define f_macro_int16ss_t_new(status, numbers, length) f_macro_memory_structures_t_new(status, numbers, int16_t, length) + #define f_macro_int16ss_t_new(status, numbers, length) f_macro_memory_structures_new(status, numbers, int16_t, length); - #define f_macro_int16ss_t_delete(status, numbers) f_macro_memory_structures_t_delete(status, numbers, int16_t, f_int16s_t) - #define f_macro_int16ss_t_destroy(status, numbers) f_macro_memory_structures_t_destroy(status, numbers, int16_t, f_int16s_t) + #define f_macro_int16ss_t_delete(status, numbers) f_macro_memory_structures_delete(status, numbers, int16_t, f_int16s_t); + #define f_macro_int16ss_t_destroy(status, numbers) f_macro_memory_structures_destroy(status, numbers, int16_t, f_int16s_t); - #define f_macro_int16ss_t_delete_simple(numbers) f_macro_memory_structures_t_delete_simple(numbers, int16_t, f_int16s_t) - #define f_macro_int16ss_t_destroy_simple(numbers) f_macro_memory_structures_t_destroy_simple(numbers, int16_t, f_int16s_t) + #define f_macro_int16ss_t_delete_simple(numbers) f_macro_memory_structures_delete_simple(numbers, int16_t, f_int16s_t); + #define f_macro_int16ss_t_destroy_simple(numbers) f_macro_memory_structures_destroy_simple(numbers, int16_t, f_int16s_t); - #define f_macro_int16ss_t_resize(status, numbers, new_length) f_macro_memory_structures_t_resize(status, numbers, int16_t, f_int16s_t, new_length, f_array_length_t) - #define f_macro_int16ss_t_adjust(status, numbers, new_length) f_macro_memory_structures_t_adjust(status, numbers, int16_t, f_int16s_t, new_length, f_array_length_t) + #define f_macro_int16ss_t_resize(status, numbers, length) f_macro_memory_structures_resize(status, numbers, int16_t, f_int16s_t, length, f_array_length_t); + #define f_macro_int16ss_t_adjust(status, numbers, length) f_macro_memory_structures_adjust(status, numbers, int16_t, f_int16s_t, length, f_array_length_t); #endif // _di_int16ss_t_ /** @@ -398,28 +390,26 @@ extern "C" { #define f_uint16s_t_initialize { 0, 0, 0 } - #define f_macro_uint16s_t_adjust(status, uint16s, length) f_macro_memory_structure_t_adjust(status, uint16s, uint16_t, length) + #define f_macro_uint16s_t_clear(uint16s) f_macro_memory_structure_clear(uint16s); - #define f_macro_uint16s_t_clear(uint16s) f_macro_memory_structure_t_clear(uint16s) + #define f_macro_uint16s_t_new(status, uint16s, length) f_macro_memory_structure_new(status, uint16s, uint16_t, length); - #define f_macro_uint16s_t_decimate(status, uint16s) f_macro_memory_structure_decimate(status, uint16s, uint16_t); - #define f_macro_uint16s_t_decimate_by(status, uint16s, amount) f_macro_memory_structure_decimate_by(status, uint16s, uint16_t, amount); + #define f_macro_uint16s_t_adjust(status, uint16s, length) f_macro_memory_structure_adjust(status, uint16s, uint16_t, length); + #define f_macro_uint16s_t_resize(status, uint16s, length) f_macro_memory_structure_resize(status, uint16s, uint16_t, length); - #define f_macro_uint16s_t_decrease(status, uint16s) f_macro_memory_structure_decrease(status, uint16s, uint16_t); - #define f_macro_uint16s_t_decrease_by(status, uint16s, amount) f_macro_memory_structure_decrease_by(status, uint16s, uint16_t, amount); + #define f_macro_uint16s_t_increase(status, uint16s) f_macro_memory_structure_increase(status, uint16s, uint16_t); + #define f_macro_uint16s_t_decimate(status, uint16s) f_macro_memory_structure_decimate(status, uint16s, uint16_t); + #define f_macro_uint16s_t_decrease(status, uint16s) f_macro_memory_structure_decrease(status, uint16s, uint16_t); - #define f_macro_uint16s_t_delete(status, uint16s) f_macro_memory_structure_t_delete(status, uint16s, uint16_t) - #define f_macro_uint16s_t_delete_simple(uint16s) f_macro_memory_structure_t_delete_simple(uint16s, uint16_t) - - #define f_macro_uint16s_t_destroy(status, uint16s) f_macro_memory_structure_t_destroy(status, uint16s, uint16_t) - #define f_macro_uint16s_t_destroy_simple(uint16s) f_macro_memory_structure_t_destroy_simple(uint16s, uint16_t) - - #define f_macro_uint16s_t_increase(status, uint16s) f_macro_memory_structure_increase(status, uint16s, uint16_t); #define f_macro_uint16s_t_increase_by(status, uint16s, amount) f_macro_memory_structure_increase_by(status, uint16s, uint16_t, amount); + #define f_macro_uint16s_t_decrease_by(status, uint16s, amount) f_macro_memory_structure_decrease_by(status, uint16s, uint16_t, amount); + #define f_macro_uint16s_t_decimate_by(status, uint16s, amount) f_macro_memory_structure_decimate_by(status, uint16s, uint16_t, amount); - #define f_macro_uint16s_t_new(status, uint16s, length) f_macro_memory_structure_t_new(status, uint16s, uint16_t, length) + #define f_macro_uint16s_t_delete(status, uint16s) f_macro_memory_structure_delete(status, uint16s, uint16_t); + #define f_macro_uint16s_t_destroy(status, uint16s) f_macro_memory_structure_destroy(status, uint16s, uint16_t); - #define f_macro_uint16s_t_resize(status, uint16s, new_length) f_macro_memory_structure_t_resize(status, uint16s, uint16_t, new_length) + #define f_macro_uint16s_t_delete_simple(uint16s) f_macro_memory_structure_delete_simple(uint16s, uint16_t); + #define f_macro_uint16s_t_destroy_simple(uint16s) f_macro_memory_structure_destroy_simple(uint16s, uint16_t); #endif // _di_uint16s_t_ /** @@ -439,18 +429,18 @@ extern "C" { #define f_uint16ss_t_initialize { 0, 0, 0 } - #define f_macro_uint16ss_t_clear(numbers) f_macro_memory_structures_t_clear(numbers) + #define f_macro_uint16ss_t_clear(numbers) f_macro_memory_structures_clear(numbers); - #define f_macro_uint16ss_t_new(status, numbers, length) f_macro_memory_structures_t_new(status, numbers, uint16_t, length) + #define f_macro_uint16ss_t_new(status, numbers, length) f_macro_memory_structures_new(status, numbers, uint16_t, length); - #define f_macro_uint16ss_t_delete(status, numbers) f_macro_memory_structures_t_delete(status, numbers, uint16_t, f_uint16s_t) - #define f_macro_uint16ss_t_destroy(status, numbers) f_macro_memory_structures_t_destroy(status, numbers, uint16_t, f_uint16s_t) + #define f_macro_uint16ss_t_delete(status, numbers) f_macro_memory_structures_delete(status, numbers, uint16_t, f_uint16s_t); + #define f_macro_uint16ss_t_destroy(status, numbers) f_macro_memory_structures_destroy(status, numbers, uint16_t, f_uint16s_t); - #define f_macro_uint16ss_t_delete_simple(numbers) f_macro_memory_structures_t_delete_simple(numbers, uint16_t, f_uint16s_t) - #define f_macro_uint16ss_t_destroy_simple(numbers) f_macro_memory_structures_t_destroy_simple(numbers, uint16_t, f_uint16s_t) + #define f_macro_uint16ss_t_delete_simple(numbers) f_macro_memory_structures_delete_simple(numbers, uint16_t, f_uint16s_t); + #define f_macro_uint16ss_t_destroy_simple(numbers) f_macro_memory_structures_destroy_simple(numbers, uint16_t, f_uint16s_t); - #define f_macro_uint16ss_t_resize(status, numbers, new_length) f_macro_memory_structures_t_resize(status, numbers, uint16_t, f_uint16s_t, new_length, f_array_length_t) - #define f_macro_uint16ss_t_adjust(status, numbers, new_length) f_macro_memory_structures_t_adjust(status, numbers, uint16_t, f_uint16s_t, new_length, f_array_length_t) + #define f_macro_uint16ss_t_resize(status, numbers, length) f_macro_memory_structures_resize(status, numbers, uint16_t, f_uint16s_t, length, f_array_length_t); + #define f_macro_uint16ss_t_adjust(status, numbers, length) f_macro_memory_structures_adjust(status, numbers, uint16_t, f_uint16s_t, length, f_array_length_t); #endif // _di_uint16ss_t_ /** @@ -470,28 +460,26 @@ extern "C" { #define f_int32s_t_initialize { 0, 0, 0 } - #define f_macro_int32s_t_adjust(status, int32s, length) f_macro_memory_structure_t_adjust(status, int32s, int32_t, length) - - #define f_macro_int32s_t_clear(int32s) f_macro_memory_structure_t_clear(int32s) + #define f_macro_int32s_t_clear(int32s) f_macro_memory_structure_clear(int32s); - #define f_macro_int32s_t_decimate(status, int32s) f_macro_memory_structure_decimate(status, int32s, int32_t); - #define f_macro_int32s_t_decimate_by(status, int32s, amount) f_macro_memory_structure_decimate_by(status, int32s, int32_t, amount); - - #define f_macro_int32s_t_decrease(status, int32s) f_macro_memory_structure_decrease(status, int32s, int32_t); - #define f_macro_int32s_t_decrease_by(status, int32s, amount) f_macro_memory_structure_decrease_by(status, int32s, int32_t, amount); + #define f_macro_int32s_t_new(status, int32s, length) f_macro_memory_structure_new(status, int32s, int32_t, length); - #define f_macro_int32s_t_delete(status, int32s) f_macro_memory_structure_t_delete(status, int32s, int32_t) - #define f_macro_int32s_t_delete_simple(int32s) f_macro_memory_structure_t_delete_simple(int32s, int32_t) + #define f_macro_int32s_t_adjust(status, int32s, length) f_macro_memory_structure_adjust(status, int32s, int32_t, length); + #define f_macro_int32s_t_resize(status, int32s, length) f_macro_memory_structure_resize(status, int32s, int32_t, length); - #define f_macro_int32s_t_destroy(status, int32s) f_macro_memory_structure_t_destroy(status, int32s, int32_t) - #define f_macro_int32s_t_destroy_simple(int32s) f_macro_memory_structure_t_destroy_simple(int32s, int32_t) + #define f_macro_int32s_t_increase(status, int32s) f_macro_memory_structure_increase(status, int32s, int32_t); + #define f_macro_int32s_t_decimate(status, int32s) f_macro_memory_structure_decimate(status, int32s, int32_t); + #define f_macro_int32s_t_decrease(status, int32s) f_macro_memory_structure_decrease(status, int32s, int32_t); - #define f_macro_int32s_t_increase(status, int32s) f_macro_memory_structure_increase(status, int32s, int32_t); #define f_macro_int32s_t_increase_by(status, int32s, amount) f_macro_memory_structure_increase_by(status, int32s, int32_t, amount); + #define f_macro_int32s_t_decrease_by(status, int32s, amount) f_macro_memory_structure_decrease_by(status, int32s, int32_t, amount); + #define f_macro_int32s_t_decimate_by(status, int32s, amount) f_macro_memory_structure_decimate_by(status, int32s, int32_t, amount); - #define f_macro_int32s_t_new(status, int32s, length) f_macro_memory_structure_t_new(status, int32s, int32_t, length) + #define f_macro_int32s_t_delete(status, int32s) f_macro_memory_structure_delete(status, int32s, int32_t); + #define f_macro_int32s_t_destroy(status, int32s) f_macro_memory_structure_destroy(status, int32s, int32_t); - #define f_macro_int32s_t_resize(status, int32s, new_length) f_macro_memory_structure_t_resize(status, int32s, int32_t, new_length) + #define f_macro_int32s_t_delete_simple(int32s) f_macro_memory_structure_delete_simple(int32s, int32_t); + #define f_macro_int32s_t_destroy_simple(int32s) f_macro_memory_structure_destroy_simple(int32s, int32_t); #endif // _di_int32s_t_ /** @@ -511,18 +499,18 @@ extern "C" { #define f_int32ss_t_initialize { 0, 0, 0 } - #define f_macro_int32ss_t_clear(numbers) f_macro_memory_structures_t_clear(numbers) + #define f_macro_int32ss_t_clear(numbers) f_macro_memory_structures_clear(numbers); - #define f_macro_int32ss_t_new(status, numbers, length) f_macro_memory_structures_t_new(status, numbers, int32_t, length) + #define f_macro_int32ss_t_new(status, numbers, length) f_macro_memory_structures_new(status, numbers, int32_t, length); - #define f_macro_int32ss_t_delete(status, numbers) f_macro_memory_structures_t_delete(status, numbers, int32_t, f_int32s_t) - #define f_macro_int32ss_t_destroy(status, numbers) f_macro_memory_structures_t_destroy(status, numbers, int32_t, f_int32s_t) + #define f_macro_int32ss_t_delete(status, numbers) f_macro_memory_structures_delete(status, numbers, int32_t, f_int32s_t); + #define f_macro_int32ss_t_destroy(status, numbers) f_macro_memory_structures_destroy(status, numbers, int32_t, f_int32s_t); - #define f_macro_int32ss_t_delete_simple(numbers) f_macro_memory_structures_t_delete_simple(numbers, int32_t, f_int32s_t) - #define f_macro_int32ss_t_destroy_simple(numbers) f_macro_memory_structures_t_destroy_simple(numbers, int32_t, f_int32s_t) + #define f_macro_int32ss_t_delete_simple(numbers) f_macro_memory_structures_delete_simple(numbers, int32_t, f_int32s_t); + #define f_macro_int32ss_t_destroy_simple(numbers) f_macro_memory_structures_destroy_simple(numbers, int32_t, f_int32s_t); - #define f_macro_int32ss_t_resize(status, numbers, new_length) f_macro_memory_structures_t_resize(status, numbers, int32_t, f_int32s_t, new_length, f_array_length_t) - #define f_macro_int32ss_t_adjust(status, numbers, new_length) f_macro_memory_structures_t_adjust(status, numbers, int32_t, f_int32s_t, new_length, f_array_length_t) + #define f_macro_int32ss_t_resize(status, numbers, length) f_macro_memory_structures_resize(status, numbers, int32_t, f_int32s_t, length, f_array_length_t); + #define f_macro_int32ss_t_adjust(status, numbers, length) f_macro_memory_structures_adjust(status, numbers, int32_t, f_int32s_t, length, f_array_length_t); #endif // _di_int32ss_t_ /** @@ -542,28 +530,26 @@ extern "C" { #define f_uint32s_t_initialize { 0, 0, 0 } - #define f_macro_uint32s_t_adjust(status, uint32s, length) f_macro_memory_structure_t_adjust(status, uint32s, uint32_t, length) + #define f_macro_uint32s_t_clear(uint32s) f_macro_memory_structure_clear(uint32s); - #define f_macro_uint32s_t_clear(uint32s) f_macro_memory_structure_t_clear(uint32s) + #define f_macro_uint32s_t_new(status, uint32s, length) f_macro_memory_structure_new(status, uint32s, uint32_t, length); - #define f_macro_uint32s_t_decimate(status, uint32s) f_macro_memory_structure_decimate(status, uint32s, uint32_t); - #define f_macro_uint32s_t_decimate_by(status, uint32s, amount) f_macro_memory_structure_decimate_by(status, uint32s, uint32_t, amount); - - #define f_macro_uint32s_t_decrease(status, uint32s) f_macro_memory_structure_decrease(status, uint32s, uint32_t); - #define f_macro_uint32s_t_decrease_by(status, uint32s, amount) f_macro_memory_structure_decrease_by(status, uint32s, uint32_t, amount); + #define f_macro_uint32s_t_adjust(status, uint32s, length) f_macro_memory_structure_adjust(status, uint32s, uint32_t, length); + #define f_macro_uint32s_t_resize(status, uint32s, length) f_macro_memory_structure_resize(status, uint32s, uint32_t, length); - #define f_macro_uint32s_t_delete(status, uint32s) f_macro_memory_structure_t_delete(status, uint32s, uint32_t) - #define f_macro_uint32s_t_delete_simple(uint32s) f_macro_memory_structure_t_delete_simple(uint32s, uint32_t) + #define f_macro_uint32s_t_increase(status, uint32s) f_macro_memory_structure_increase(status, uint32s, uint32_t); + #define f_macro_uint32s_t_decimate(status, uint32s) f_macro_memory_structure_decimate(status, uint32s, uint32_t); + #define f_macro_uint32s_t_decrease(status, uint32s) f_macro_memory_structure_decrease(status, uint32s, uint32_t); - #define f_macro_uint32s_t_destroy(status, uint32s) f_macro_memory_structure_t_destroy(status, uint32s, uint32_t) - #define f_macro_uint32s_t_destroy_simple(uint32s) f_macro_memory_structure_t_destroy_simple(uint32s, uint32_t) - - #define f_macro_uint32s_t_increase(status, uint32s) f_macro_memory_structure_increase(status, uint32s, uint32_t); #define f_macro_uint32s_t_increase_by(status, uint32s, amount) f_macro_memory_structure_increase_by(status, uint32s, uint32_t, amount); + #define f_macro_uint32s_t_decrease_by(status, uint32s, amount) f_macro_memory_structure_decrease_by(status, uint32s, uint32_t, amount); + #define f_macro_uint32s_t_decimate_by(status, uint32s, amount) f_macro_memory_structure_decimate_by(status, uint32s, uint32_t, amount); - #define f_macro_uint32s_t_new(status, uint32s, length) f_macro_memory_structure_t_new(status, uint32s, uint32_t, length) + #define f_macro_uint32s_t_delete(status, uint32s) f_macro_memory_structure_delete(status, uint32s, uint32_t); + #define f_macro_uint32s_t_destroy(status, uint32s) f_macro_memory_structure_destroy(status, uint32s, uint32_t); - #define f_macro_uint32s_t_resize(status, uint32s, new_length) f_macro_memory_structure_t_resize(status, uint32s, uint32_t, new_length) + #define f_macro_uint32s_t_delete_simple(uint32s) f_macro_memory_structure_delete_simple(uint32s, uint32_t); + #define f_macro_uint32s_t_destroy_simple(uint32s) f_macro_memory_structure_destroy_simple(uint32s, uint32_t); #endif // _di_uint32s_t_ /** @@ -583,18 +569,18 @@ extern "C" { #define f_uint32ss_t_initialize { 0, 0, 0 } - #define f_macro_uint32ss_t_clear(numbers) f_macro_memory_structures_t_clear(numbers) + #define f_macro_uint32ss_t_clear(numbers) f_macro_memory_structures_clear(numbers); - #define f_macro_uint32ss_t_new(status, numbers, length) f_macro_memory_structures_t_new(status, numbers, uint32_t, length) + #define f_macro_uint32ss_t_new(status, numbers, length) f_macro_memory_structures_new(status, numbers, uint32_t, length); - #define f_macro_uint32ss_t_delete(status, numbers) f_macro_memory_structures_t_delete(status, numbers, uint32_t, f_uint32s_t) - #define f_macro_uint32ss_t_destroy(status, numbers) f_macro_memory_structures_t_destroy(status, numbers, uint32_t, f_uint32s_t) + #define f_macro_uint32ss_t_delete(status, numbers) f_macro_memory_structures_delete(status, numbers, uint32_t, f_uint32s_t); + #define f_macro_uint32ss_t_destroy(status, numbers) f_macro_memory_structures_destroy(status, numbers, uint32_t, f_uint32s_t); - #define f_macro_uint32ss_t_delete_simple(numbers) f_macro_memory_structures_t_delete_simple(numbers, uint32_t, f_uint32s_t) - #define f_macro_uint32ss_t_destroy_simple(numbers) f_macro_memory_structures_t_destroy_simple(numbers, uint32_t, f_uint32s_t) + #define f_macro_uint32ss_t_delete_simple(numbers) f_macro_memory_structures_delete_simple(numbers, uint32_t, f_uint32s_t); + #define f_macro_uint32ss_t_destroy_simple(numbers) f_macro_memory_structures_destroy_simple(numbers, uint32_t, f_uint32s_t); - #define f_macro_uint32ss_t_resize(status, numbers, new_length) f_macro_memory_structures_t_resize(status, numbers, uint32_t, f_uint32s_t, new_length, f_array_length_t) - #define f_macro_uint32ss_t_adjust(status, numbers, new_length) f_macro_memory_structures_t_adjust(status, numbers, uint32_t, f_uint32s_t, new_length, f_array_length_t) + #define f_macro_uint32ss_t_resize(status, numbers, length) f_macro_memory_structures_resize(status, numbers, uint32_t, f_uint32s_t, length, f_array_length_t); + #define f_macro_uint32ss_t_adjust(status, numbers, length) f_macro_memory_structures_adjust(status, numbers, uint32_t, f_uint32s_t, length, f_array_length_t); #endif // _di_uint32ss_t_ /** @@ -614,28 +600,26 @@ extern "C" { #define f_int64s_t_initialize { 0, 0, 0 } - #define f_macro_int64s_t_adjust(status, int64s, length) f_macro_memory_structure_t_adjust(status, int64s, int64_t, length) + #define f_macro_int64s_t_clear(int64s) f_macro_memory_structure_clear(int64s); - #define f_macro_int64s_t_clear(int64s) f_macro_memory_structure_t_clear(int64s) + #define f_macro_int64s_t_new(status, int64s, length) f_macro_memory_structure_new(status, int64s, int64_t, length); - #define f_macro_int64s_t_decimate(status, int64s) f_macro_memory_structure_decimate(status, int64s, int64_t); - #define f_macro_int64s_t_decimate_by(status, int64s, amount) f_macro_memory_structure_decimate_by(status, int64s, int64_t, amount); - - #define f_macro_int64s_t_decrease(status, int64s) f_macro_memory_structure_decrease(status, int64s, int64_t); - #define f_macro_int64s_t_decrease_by(status, int64s, amount) f_macro_memory_structure_decrease_by(status, int64s, int64_t, amount); + #define f_macro_int64s_t_adjust(status, int64s, length) f_macro_memory_structure_adjust(status, int64s, int64_t, length); + #define f_macro_int64s_t_resize(status, int64s, length) f_macro_memory_structure_resize(status, int64s, int64_t, length); - #define f_macro_int64s_t_delete(status, int64s) f_macro_memory_structure_t_delete(status, int64s, int64_t) - #define f_macro_int64s_t_delete_simple(int64s) f_macro_memory_structure_t_delete_simple(int64s, int64_t) + #define f_macro_int64s_t_increase(status, int64s) f_macro_memory_structure_increase(status, int64s, int64_t); + #define f_macro_int64s_t_decimate(status, int64s) f_macro_memory_structure_decimate(status, int64s, int64_t); + #define f_macro_int64s_t_decrease(status, int64s) f_macro_memory_structure_decrease(status, int64s, int64_t); - #define f_macro_int64s_t_destroy(status, int64s) f_macro_memory_structure_t_destroy(status, int64s, int64_t) - #define f_macro_int64s_t_destroy_simple(int64s) f_macro_memory_structure_t_destroy_simple(int64s, int64_t) - - #define f_macro_int64s_t_increase(status, int64s) f_macro_memory_structure_increase(status, int64s, int64_t); #define f_macro_int64s_t_increase_by(status, int64s, amount) f_macro_memory_structure_increase_by(status, int64s, int64_t, amount); + #define f_macro_int64s_t_decrease_by(status, int64s, amount) f_macro_memory_structure_decrease_by(status, int64s, int64_t, amount); + #define f_macro_int64s_t_decimate_by(status, int64s, amount) f_macro_memory_structure_decimate_by(status, int64s, int64_t, amount); - #define f_macro_int64s_t_new(status, int64s, length) f_macro_memory_structure_t_new(status, int64s, int64_t, length) + #define f_macro_int64s_t_delete(status, int64s) f_macro_memory_structure_delete(status, int64s, int64_t); + #define f_macro_int64s_t_destroy(status, int64s) f_macro_memory_structure_destroy(status, int64s, int64_t); - #define f_macro_int64s_t_resize(status, int64s, new_length) f_macro_memory_structure_t_resize(status, int64s, int64_t, new_length) + #define f_macro_int64s_t_delete_simple(int64s) f_macro_memory_structure_delete_simple(int64s, int64_t); + #define f_macro_int64s_t_destroy_simple(int64s) f_macro_memory_structure_destroy_simple(int64s, int64_t); #endif // _di_int64s_t_ /** @@ -655,18 +639,18 @@ extern "C" { #define f_int64ss_t_initialize { 0, 0, 0 } - #define f_macro_int64ss_t_clear(numbers) f_macro_memory_structures_t_clear(numbers) + #define f_macro_int64ss_t_clear(numbers) f_macro_memory_structures_clear(numbers); - #define f_macro_int64ss_t_new(status, numbers, length) f_macro_memory_structures_t_new(status, numbers, int64_t, length) + #define f_macro_int64ss_t_new(status, numbers, length) f_macro_memory_structures_new(status, numbers, int64_t, length); - #define f_macro_int64ss_t_delete(status, numbers) f_macro_memory_structures_t_delete(status, numbers, int64_t, f_int64s_t) - #define f_macro_int64ss_t_destroy(status, numbers) f_macro_memory_structures_t_destroy(status, numbers, int64_t, f_int64s_t) + #define f_macro_int64ss_t_delete(status, numbers) f_macro_memory_structures_delete(status, numbers, int64_t, f_int64s_t); + #define f_macro_int64ss_t_destroy(status, numbers) f_macro_memory_structures_destroy(status, numbers, int64_t, f_int64s_t); - #define f_macro_int64ss_t_delete_simple(numbers) f_macro_memory_structures_t_delete_simple(numbers, int64_t, f_int64s_t) - #define f_macro_int64ss_t_destroy_simple(numbers) f_macro_memory_structures_t_destroy_simple(numbers, int64_t, f_int64s_t) + #define f_macro_int64ss_t_delete_simple(numbers) f_macro_memory_structures_delete_simple(numbers, int64_t, f_int64s_t); + #define f_macro_int64ss_t_destroy_simple(numbers) f_macro_memory_structures_destroy_simple(numbers, int64_t, f_int64s_t); - #define f_macro_int64ss_t_resize(status, numbers, new_length) f_macro_memory_structures_t_resize(status, numbers, int64_t, f_int64s_t, new_length, f_array_length_t) - #define f_macro_int64ss_t_adjust(status, numbers, new_length) f_macro_memory_structures_t_adjust(status, numbers, int64_t, f_int64s_t, new_length, f_array_length_t) + #define f_macro_int64ss_t_resize(status, numbers, length) f_macro_memory_structures_resize(status, numbers, int64_t, f_int64s_t, length, f_array_length_t); + #define f_macro_int64ss_t_adjust(status, numbers, length) f_macro_memory_structures_adjust(status, numbers, int64_t, f_int64s_t, length, f_array_length_t); #endif // _di_int64ss_t_ /** @@ -686,28 +670,26 @@ extern "C" { #define f_uint64s_t_initialize { 0, 0, 0 } - #define f_macro_uint64s_t_adjust(status, uint64s, length) f_macro_memory_structure_t_adjust(status, uint64s, uint64_t, length) - - #define f_macro_uint64s_t_clear(uint64s) f_macro_memory_structure_t_clear(uint64s) + #define f_macro_uint64s_t_clear(uint64s) f_macro_memory_structure_clear(uint64s); - #define f_macro_uint64s_t_decimate(status, uint64s) f_macro_memory_structure_decimate(status, uint64s, uint64_t); - #define f_macro_uint64s_t_decimate_by(status, uint64s, amount) f_macro_memory_structure_decimate_by(status, uint64s, uint64_t, amount); - - #define f_macro_uint64s_t_decrease(status, uint64s) f_macro_memory_structure_decrease(status, uint64s, uint64_t); - #define f_macro_uint64s_t_decrease_by(status, uint64s, amount) f_macro_memory_structure_decrease_by(status, uint64s, uint64_t, amount); + #define f_macro_uint64s_t_new(status, uint64s, length) f_macro_memory_structure_new(status, uint64s, uint64_t, length); - #define f_macro_uint64s_t_delete(status, uint64s) f_macro_memory_structure_t_delete(status, uint64s, uint64_t) - #define f_macro_uint64s_t_delete_simple(uint64s) f_macro_memory_structure_t_delete_simple(uint64s, uint64_t) + #define f_macro_uint64s_t_adjust(status, uint64s, length) f_macro_memory_structure_adjust(status, uint64s, uint64_t, length); + #define f_macro_uint64s_t_resize(status, uint64s, length) f_macro_memory_structure_resize(status, uint64s, uint64_t, length); - #define f_macro_uint64s_t_destroy(status, uint64s) f_macro_memory_structure_t_destroy(status, uint64s, uint64_t) - #define f_macro_uint64s_t_destroy_simple(uint64s) f_macro_memory_structure_t_destroy_simple(uint64s, uint64_t) + #define f_macro_uint64s_t_increase(status, uint64s) f_macro_memory_structure_increase(status, uint64s, uint64_t); + #define f_macro_uint64s_t_decimate(status, uint64s) f_macro_memory_structure_decimate(status, uint64s, uint64_t); + #define f_macro_uint64s_t_decrease(status, uint64s) f_macro_memory_structure_decrease(status, uint64s, uint64_t); - #define f_macro_uint64s_t_increase(status, uint64s) f_macro_memory_structure_increase(status, uint64s, uint64_t); #define f_macro_uint64s_t_increase_by(status, uint64s, amount) f_macro_memory_structure_increase_by(status, uint64s, uint64_t, amount); + #define f_macro_uint64s_t_decrease_by(status, uint64s, amount) f_macro_memory_structure_decrease_by(status, uint64s, uint64_t, amount); + #define f_macro_uint64s_t_decimate_by(status, uint64s, amount) f_macro_memory_structure_decimate_by(status, uint64s, uint64_t, amount); - #define f_macro_uint64s_t_new(status, uint64s, length) f_macro_memory_structure_t_new(status, uint64s, uint64_t, length) + #define f_macro_uint64s_t_delete(status, uint64s) f_macro_memory_structure_delete(status, uint64s, uint64_t); + #define f_macro_uint64s_t_destroy(status, uint64s) f_macro_memory_structure_destroy(status, uint64s, uint64_t); - #define f_macro_uint64s_t_resize(status, uint64s, new_length) f_macro_memory_structure_t_resize(status, uint64s, uint64_t, new_length) + #define f_macro_uint64s_t_delete_simple(uint64s) f_macro_memory_structure_delete_simple(uint64s, uint64_t); + #define f_macro_uint64s_t_destroy_simple(uint64s) f_macro_memory_structure_destroy_simple(uint64s, uint64_t); #endif // _di_uint64s_t_ /** @@ -727,18 +709,18 @@ extern "C" { #define f_uint64ss_t_initialize { 0, 0, 0 } - #define f_macro_uint64ss_t_clear(numbers) f_macro_memory_structures_t_clear(numbers) + #define f_macro_uint64ss_t_clear(numbers) f_macro_memory_structures_clear(numbers); - #define f_macro_uint64ss_t_new(status, numbers, length) f_macro_memory_structures_t_new(status, numbers, uint64_t, length) + #define f_macro_uint64ss_t_new(status, numbers, length) f_macro_memory_structures_new(status, numbers, uint64_t, length); - #define f_macro_uint64ss_t_delete(status, numbers) f_macro_memory_structures_t_delete(status, numbers, uint64_t, f_uint64s_t) - #define f_macro_uint64ss_t_destroy(status, numbers) f_macro_memory_structures_t_destroy(status, numbers, uint64_t, f_uint64s_t) + #define f_macro_uint64ss_t_delete(status, numbers) f_macro_memory_structures_delete(status, numbers, uint64_t, f_uint64s_t); + #define f_macro_uint64ss_t_destroy(status, numbers) f_macro_memory_structures_destroy(status, numbers, uint64_t, f_uint64s_t); - #define f_macro_uint64ss_t_delete_simple(numbers) f_macro_memory_structures_t_delete_simple(numbers, uint64_t, f_uint64s_t) - #define f_macro_uint64ss_t_destroy_simple(numbers) f_macro_memory_structures_t_destroy_simple(numbers, uint64_t, f_uint64s_t) + #define f_macro_uint64ss_t_delete_simple(numbers) f_macro_memory_structures_delete_simple(numbers, uint64_t, f_uint64s_t); + #define f_macro_uint64ss_t_destroy_simple(numbers) f_macro_memory_structures_destroy_simple(numbers, uint64_t, f_uint64s_t); - #define f_macro_uint64ss_t_resize(status, numbers, new_length) f_macro_memory_structures_t_resize(status, numbers, uint64_t, f_uint64s_t, new_length, f_array_length_t) - #define f_macro_uint64ss_t_adjust(status, numbers, new_length) f_macro_memory_structures_t_adjust(status, numbers, uint64_t, f_uint64s_t, new_length, f_array_length_t) + #define f_macro_uint64ss_t_resize(status, numbers, length) f_macro_memory_structures_resize(status, numbers, uint64_t, f_uint64s_t, length, f_array_length_t); + #define f_macro_uint64ss_t_adjust(status, numbers, length) f_macro_memory_structures_adjust(status, numbers, uint64_t, f_uint64s_t, length, f_array_length_t); #endif // _di_uint64ss_t_ #ifndef __SIZEOF_INT128__ @@ -759,28 +741,26 @@ extern "C" { #define f_int128s_t_initialize { 0, 0, 0 } - #define f_macro_int128s_t_adjust(status, int128s, length) f_macro_memory_structure_t_adjust(status, int128s, __int128_t, length) - - #define f_macro_int128s_t_clear(int128s) f_macro_memory_structure_t_clear(int128s) - - #define f_macro_int128s_t_decimate(status, int128s) f_macro_memory_structure_decimate(status, int128s, __int128_t); - #define f_macro_int128s_t_decimate_by(status, int128s, amount) f_macro_memory_structure_decimate_by(status, int128s, __int128_t, amount); + #define f_macro_int128s_t_clear(int128s) f_macro_memory_structure_clear(int128s); - #define f_macro_int128s_t_decrease(status, int128s) f_macro_memory_structure_decrease(status, int128s, __int128_t); - #define f_macro_int128s_t_decrease_by(status, int128s, amount) f_macro_memory_structure_decrease_by(status, int128s, __int128_t, amount); + #define f_macro_int128s_t_new(status, int128s, length) f_macro_memory_structure_new(status, int128s, __int128_t, length); - #define f_macro_int128s_t_delete(status, int128s) f_macro_memory_structure_t_delete(status, int128s, __int128_t) - #define f_macro_int128s_t_delete_simple(int128s) f_macro_memory_structure_t_delete_simple(int128s, __int128_t) + #define f_macro_int128s_t_adjust(status, int128s, length) f_macro_memory_structure_adjust(status, int128s, __int128_t, length); + #define f_macro_int128s_t_resize(status, int128s, length) f_macro_memory_structure_resize(status, int128s, __int128_t, length); - #define f_macro_int128s_t_destroy(status, int128s) f_macro_memory_structure_t_destroy(status, int128s, __int128_t) - #define f_macro_int128s_t_destroy_simple(int128s) f_macro_memory_structure_t_destroy_simple(int128s, __int128_t) + #define f_macro_int128s_t_increase(status, int128s) f_macro_memory_structure_increase(status, int128s, __int128_t); + #define f_macro_int128s_t_decimate(status, int128s) f_macro_memory_structure_decimate(status, int128s, __int128_t); + #define f_macro_int128s_t_decrease(status, int128s) f_macro_memory_structure_decrease(status, int128s, __int128_t); - #define f_macro_int128s_t_increase(status, int128s) f_macro_memory_structure_increase(status, int128s, __int128_t); #define f_macro_int128s_t_increase_by(status, int128s, amount) f_macro_memory_structure_increase_by(status, int128s, __int128_t, amount); + #define f_macro_int128s_t_decrease_by(status, int128s, amount) f_macro_memory_structure_decrease_by(status, int128s, __int128_t, amount); + #define f_macro_int128s_t_decimate_by(status, int128s, amount) f_macro_memory_structure_decimate_by(status, int128s, __int128_t, amount); - #define f_macro_int128s_t_new(status, int128s, length) f_macro_memory_structure_t_new(status, int128s, __int128_t, length) + #define f_macro_int128s_t_delete(status, int128s) f_macro_memory_structure_delete(status, int128s, __int128_t); + #define f_macro_int128s_t_destroy(status, int128s) f_macro_memory_structure_destroy(status, int128s, __int128_t); - #define f_macro_int128s_t_resize(status, int128s, new_length) f_macro_memory_structure_t_resize(status, int128s, __int128_t, new_length) + #define f_macro_int128s_t_delete_simple(int128s) f_macro_memory_structure_delete_simple(int128s, __int128_t); + #define f_macro_int128s_t_destroy_simple(int128s) f_macro_memory_structure_destroy_simple(int128s, __int128_t); #endif // _di_int128s_t_ /** @@ -800,18 +780,18 @@ extern "C" { #define f_int128ss_t_initialize { 0, 0, 0 } - #define f_macro_int128ss_t_clear(numbers) f_macro_memory_structures_t_clear(numbers) + #define f_macro_int128ss_t_clear(numbers) f_macro_memory_structures_clear(numbers); - #define f_macro_int128ss_t_new(status, numbers, length) f_macro_memory_structures_t_new(status, numbers, __int128_t, length) + #define f_macro_int128ss_t_new(status, numbers, length) f_macro_memory_structures_new(status, numbers, __int128_t, length); - #define f_macro_int128ss_t_delete(status, numbers) f_macro_memory_structures_t_delete(status, numbers, __int128_t, f_int128s_t) - #define f_macro_int128ss_t_destroy(status, numbers) f_macro_memory_structures_t_destroy(status, numbers, __int128_t, f_int128s_t) + #define f_macro_int128ss_t_delete(status, numbers) f_macro_memory_structures_delete(status, numbers, __int128_t, f_int128s_t); + #define f_macro_int128ss_t_destroy(status, numbers) f_macro_memory_structures_destroy(status, numbers, __int128_t, f_int128s_t); - #define f_macro_int128ss_t_delete_simple(numbers) f_macro_memory_structures_t_delete_simple(numbers, __int128_t, f_int128s_t) - #define f_macro_int128ss_t_destroy_simple(numbers) f_macro_memory_structures_t_destroy_simple(numbers, __int128_t, f_int128s_t) + #define f_macro_int128ss_t_delete_simple(numbers) f_macro_memory_structures_delete_simple(numbers, __int128_t, f_int128s_t); + #define f_macro_int128ss_t_destroy_simple(numbers) f_macro_memory_structures_destroy_simple(numbers, __int128_t, f_int128s_t); - #define f_macro_int128ss_t_resize(status, numbers, new_length) f_macro_memory_structures_t_resize(status, numbers, __int128_t, f_int128s_t, new_length, f_array_length_t) - #define f_macro_int128ss_t_adjust(status, numbers, new_length) f_macro_memory_structures_t_adjust(status, numbers, __int128_t, f_int128s_t, new_length, f_array_length_t) + #define f_macro_int128ss_t_resize(status, numbers, length) f_macro_memory_structures_resize(status, numbers, __int128_t, f_int128s_t, length, f_array_length_t); + #define f_macro_int128ss_t_adjust(status, numbers, length) f_macro_memory_structures_adjust(status, numbers, __int128_t, f_int128s_t, length, f_array_length_t); #endif // _di_int128ss_t_ /** @@ -831,28 +811,26 @@ extern "C" { #define f_uint128s_t_initialize { 0, 0, 0 } - #define f_macro_uint128s_t_adjust(status, uint128s, length) f_macro_memory_structure_t_adjust(status, uint128s, __uint128_t, length) + #define f_macro_uint128s_t_clear(uint128s) f_macro_memory_structure_clear(uint128s); - #define f_macro_uint128s_t_clear(uint128s) f_macro_memory_structure_t_clear(uint128s) + #define f_macro_uint128s_t_new(status, uint128s, length) f_macro_memory_structure_new(status, uint128s, __uint128_t, length); - #define f_macro_uint128s_t_decimate(status, uint128s) f_macro_memory_structure_decimate(status, uint128s, __uint128_t); - #define f_macro_uint128s_t_decimate_by(status, uint128s, amount) f_macro_memory_structure_decimate_by(status, uint128s, __uint128_t, amount); - - #define f_macro_uint128s_t_decrease(status, uint128s) f_macro_memory_structure_decrease(status, uint128s, __uint128_t); - #define f_macro_uint128s_t_decrease_by(status, uint128s, amount) f_macro_memory_structure_decrease_by(status, uint128s, __uint128_t, amount); + #define f_macro_uint128s_t_adjust(status, uint128s, length) f_macro_memory_structure_adjust(status, uint128s, __uint128_t, length); + #define f_macro_uint128s_t_resize(status, uint128s, length) f_macro_memory_structure_resize(status, uint128s, __uint128_t, length); - #define f_macro_uint128s_t_delete(status, uint128s) f_macro_memory_structure_t_delete(status, uint128s, __uint128_t) - #define f_macro_uint128s_t_delete_simple(uint128s) f_macro_memory_structure_t_delete_simple(uint128s, __uint128_t) + #define f_macro_uint128s_t_increase(status, uint128s) f_macro_memory_structure_increase(status, uint128s, __uint128_t); + #define f_macro_uint128s_t_decimate(status, uint128s) f_macro_memory_structure_decimate(status, uint128s, __uint128_t); + #define f_macro_uint128s_t_decrease(status, uint128s) f_macro_memory_structure_decrease(status, uint128s, __uint128_t); - #define f_macro_uint128s_t_destroy(status, uint128s) f_macro_memory_structure_t_destroy(status, uint128s, __uint128_t) - #define f_macro_uint128s_t_destroy_simple(uint128s) f_macro_memory_structure_t_destroy_simple(uint128s, __uint128_t) - - #define f_macro_uint128s_t_increase(status, uint128s) f_macro_memory_structure_increase(status, uint128s, __uint128_t); #define f_macro_uint128s_t_increase_by(status, uint128s, amount) f_macro_memory_structure_increase_by(status, uint128s, __uint128_t, amount); + #define f_macro_uint128s_t_decrease_by(status, uint128s, amount) f_macro_memory_structure_decrease_by(status, uint128s, __uint128_t, amount); + #define f_macro_uint128s_t_decimate_by(status, uint128s, amount) f_macro_memory_structure_decimate_by(status, uint128s, __uint128_t, amount); - #define f_macro_uint128s_t_new(status, uint128s, length) f_macro_memory_structure_t_new(status, uint128s, __uint128_t, length) + #define f_macro_uint128s_t_delete(status, uint128s) f_macro_memory_structure_delete(status, uint128s, __uint128_t); + #define f_macro_uint128s_t_destroy(status, uint128s) f_macro_memory_structure_destroy(status, uint128s, __uint128_t); - #define f_macro_uint128s_t_resize(status, uint128s, new_length) f_macro_memory_structure_t_resize(status, uint128s, __uint128_t, new_length) + #define f_macro_uint128s_t_delete_simple(uint128s) f_macro_memory_structure_delete_simple(uint128s, __uint128_t); + #define f_macro_uint128s_t_destroy_simple(uint128s) f_macro_memory_structure_destroy_simple(uint128s, __uint128_t); #endif // _di_uint128s_t_ /** @@ -872,18 +850,18 @@ extern "C" { #define f_uint128ss_t_initialize { 0, 0, 0 } - #define f_macro_uint128ss_t_clear(numbers) f_macro_memory_structures_t_clear(numbers) + #define f_macro_uint128ss_t_clear(numbers) f_macro_memory_structures_clear(numbers); - #define f_macro_uint128ss_t_new(status, numbers, length) f_macro_memory_structures_t_new(status, numbers, __uint128_t, length) + #define f_macro_uint128ss_t_new(status, numbers, length) f_macro_memory_structures_new(status, numbers, __uint128_t, length); - #define f_macro_uint128ss_t_delete(status, numbers) f_macro_memory_structures_t_delete(status, numbers, __uint128_t, f_uint128s_t) - #define f_macro_uint128ss_t_destroy(status, numbers) f_macro_memory_structures_t_destroy(status, numbers, __uint128_t, f_uint128s_t) + #define f_macro_uint128ss_t_delete(status, numbers) f_macro_memory_structures_delete(status, numbers, __uint128_t, f_uint128s_t); + #define f_macro_uint128ss_t_destroy(status, numbers) f_macro_memory_structures_destroy(status, numbers, __uint128_t, f_uint128s_t); - #define f_macro_uint128ss_t_delete_simple(numbers) f_macro_memory_structures_t_delete_simple(numbers, __uint128_t, f_uint128s_t) - #define f_macro_uint128ss_t_destroy_simple(numbers) f_macro_memory_structures_t_destroy_simple(numbers, __uint128_t, f_uint128s_t) + #define f_macro_uint128ss_t_delete_simple(numbers) f_macro_memory_structures_delete_simple(numbers, __uint128_t, f_uint128s_t); + #define f_macro_uint128ss_t_destroy_simple(numbers) f_macro_memory_structures_destroy_simple(numbers, __uint128_t, f_uint128s_t); - #define f_macro_uint128ss_t_resize(status, numbers, new_length) f_macro_memory_structures_t_resize(status, numbers, __uint128_t, f_uint128s_t, new_length, f_array_length_t) - #define f_macro_uint128ss_t_adjust(status, numbers, new_length) f_macro_memory_structures_t_adjust(status, numbers, __uint128_t, f_uint128s_t, new_length, f_array_length_t) + #define f_macro_uint128ss_t_resize(status, numbers, length) f_macro_memory_structures_resize(status, numbers, __uint128_t, f_uint128s_t, length, f_array_length_t); + #define f_macro_uint128ss_t_adjust(status, numbers, length) f_macro_memory_structures_adjust(status, numbers, __uint128_t, f_uint128s_t, length, f_array_length_t); #endif // _di_uint128ss_t_ #else /** @@ -903,28 +881,26 @@ extern "C" { #define f_int128s_t_initialize { 0, 0, 0 } - #define f_macro_int128s_t_adjust(status, int128s, length) f_macro_memory_structure_t_adjust(status, int128s, int64_t, length) + #define f_macro_int128s_t_clear(int128s) f_macro_memory_structure_clear(int128s); - #define f_macro_int128s_t_clear(int128s) f_macro_memory_structure_t_clear(int128s) + #define f_macro_int128s_t_new(status, int128s, length) f_macro_memory_structure_new(status, int128s, int64_t, length); - #define f_macro_int128s_t_decimate(status, int128s) f_macro_memory_structure_decimate(status, int128s, int64_t); - #define f_macro_int128s_t_decimate_by(status, int128s, amount) f_macro_memory_structure_decimate_by(status, int128s, int64_t, amount); + #define f_macro_int128s_t_adjust(status, int128s, length) f_macro_memory_structure_adjust(status, int128s, int64_t, length); + #define f_macro_int128s_t_resize(status, int128s, length) f_macro_memory_structure_resize(status, int128s, int64_t, length); - #define f_macro_int128s_t_decrease(status, int128s) f_macro_memory_structure_decrease(status, int128s, int64_t); - #define f_macro_int128s_t_decrease_by(status, int128s, amount) f_macro_memory_structure_decrease_by(status, int128s, int64_t, amount); + #define f_macro_int128s_t_increase(status, int128s) f_macro_memory_structure_increase(status, int128s, int64_t); + #define f_macro_int128s_t_decimate(status, int128s) f_macro_memory_structure_decimate(status, int128s, int64_t); + #define f_macro_int128s_t_decrease(status, int128s) f_macro_memory_structure_decrease(status, int128s, int64_t); - #define f_macro_int128s_t_delete(status, int128s) f_macro_memory_structure_t_delete(status, int128s, int64_t) - #define f_macro_int128s_t_delete_simple(int128s) f_macro_memory_structure_t_delete_simple(int128s, int64_t) - - #define f_macro_int128s_t_destroy(status, int128s) f_macro_memory_structure_t_destroy(status, int128s, int64_t) - #define f_macro_int128s_t_destroy_simple(int128s) f_macro_memory_structure_t_destroy_simple(int128s, int64_t) - - #define f_macro_int128s_t_increase(status, int128s) f_macro_memory_structure_increase(status, int128s, int64_t); #define f_macro_int128s_t_increase_by(status, int128s, amount) f_macro_memory_structure_increase_by(status, int128s, int64_t, amount); + #define f_macro_int128s_t_decrease_by(status, int128s, amount) f_macro_memory_structure_decrease_by(status, int128s, int64_t, amount); + #define f_macro_int128s_t_decimate_by(status, int128s, amount) f_macro_memory_structure_decimate_by(status, int128s, int64_t, amount); - #define f_macro_int128s_t_new(status, int128s, length) f_macro_memory_structure_t_new(status, int128s, int64_t, length) + #define f_macro_int128s_t_delete(status, int128s) f_macro_memory_structure_delete(status, int128s, int64_t); + #define f_macro_int128s_t_destroy(status, int128s) f_macro_memory_structure_destroy(status, int128s, int64_t); - #define f_macro_int128s_t_resize(status, int128s, new_length) f_macro_memory_structure_t_resize(status, int128s, int64_t, new_length) + #define f_macro_int128s_t_delete_simple(int128s) f_macro_memory_structure_delete_simple(int128s, int64_t); + #define f_macro_int128s_t_destroy_simple(int128s) f_macro_memory_structure_destroy_simple(int128s, int64_t); #endif // _di_int128s_t_ /** @@ -944,18 +920,18 @@ extern "C" { #define f_int128ss_t_initialize { 0, 0, 0 } - #define f_macro_int128ss_t_clear(numbers) f_macro_memory_structures_t_clear(numbers) + #define f_macro_int128ss_t_clear(numbers) f_macro_memory_structures_clear(numbers); - #define f_macro_int128ss_t_new(status, numbers, length) f_macro_memory_structures_t_new(status, numbers, int64_t, length) + #define f_macro_int128ss_t_new(status, numbers, length) f_macro_memory_structures_new(status, numbers, int64_t, length); - #define f_macro_int128ss_t_delete(status, numbers) f_macro_memory_structures_t_delete(status, numbers, int64_t, f_int128s_t) - #define f_macro_int128ss_t_destroy(status, numbers) f_macro_memory_structures_t_destroy(status, numbers, int64_t, f_int128s_t) + #define f_macro_int128ss_t_delete(status, numbers) f_macro_memory_structures_delete(status, numbers, int64_t, f_int128s_t); + #define f_macro_int128ss_t_destroy(status, numbers) f_macro_memory_structures_destroy(status, numbers, int64_t, f_int128s_t); - #define f_macro_int128ss_t_delete_simple(numbers) f_macro_memory_structures_t_delete_simple(numbers, int64_t, f_int128s_t) - #define f_macro_int128ss_t_destroy_simple(numbers) f_macro_memory_structures_t_destroy_simple(numbers, int64_t, f_int128s_t) + #define f_macro_int128ss_t_delete_simple(numbers) f_macro_memory_structures_delete_simple(numbers, int64_t, f_int128s_t); + #define f_macro_int128ss_t_destroy_simple(numbers) f_macro_memory_structures_destroy_simple(numbers, int64_t, f_int128s_t); - #define f_macro_int128ss_t_resize(status, numbers, new_length) f_macro_memory_structures_t_resize(status, numbers, int64_t, f_int128s_t, new_length, f_array_length_t) - #define f_macro_int128ss_t_adjust(status, numbers, new_length) f_macro_memory_structures_t_adjust(status, numbers, int64_t, f_int128s_t, new_length, f_array_length_t) + #define f_macro_int128ss_t_resize(status, numbers, length) f_macro_memory_structures_resize(status, numbers, int64_t, f_int128s_t, length, f_array_length_t); + #define f_macro_int128ss_t_adjust(status, numbers, length) f_macro_memory_structures_adjust(status, numbers, int64_t, f_int128s_t, length, f_array_length_t); #endif // _di_int128ss_t_ /** @@ -975,28 +951,26 @@ extern "C" { #define f_uint128s_t_initialize { 0, 0, 0 } - #define f_macro_uint128s_t_adjust(status, uint128s, length) f_macro_memory_structure_t_adjust(status, uint128s, uint64_t, length) - - #define f_macro_uint128s_t_clear(uint128s) f_macro_memory_structure_t_clear(uint128s) + #define f_macro_uint128s_t_clear(uint128s) f_macro_memory_structure_clear(uint128s); - #define f_macro_uint128s_t_decimate(status, uint128s) f_macro_memory_structure_decimate(status, uint128s, uint64_t); - #define f_macro_uint128s_t_decimate_by(status, uint128s, amount) f_macro_memory_structure_decimate_by(status, uint128s, uint64_t, amount); - - #define f_macro_uint128s_t_decrease(status, uint128s) f_macro_memory_structure_decrease(status, uint128s, uint64_t); - #define f_macro_uint128s_t_decrease_by(status, uint128s, amount) f_macro_memory_structure_decrease_by(status, uint128s, uint64_t, amount); + #define f_macro_uint128s_t_new(status, uint128s, length) f_macro_memory_structure_new(status, uint128s, uint64_t, length); - #define f_macro_uint128s_t_delete(status, uint128s) f_macro_memory_structure_t_delete(status, uint128s, uint64_t) - #define f_macro_uint128s_t_delete_simple(uint128s) f_macro_memory_structure_t_delete_simple(uint128s, uint64_t) + #define f_macro_uint128s_t_adjust(status, uint128s, length) f_macro_memory_structure_adjust(status, uint128s, uint64_t, length); + #define f_macro_uint128s_t_resize(status, uint128s, length) f_macro_memory_structure_resize(status, uint128s, uint64_t, length); - #define f_macro_uint128s_t_destroy(status, uint128s) f_macro_memory_structure_t_destroy(status, uint128s, uint64_t) - #define f_macro_uint128s_t_destroy_simple(uint128s) f_macro_memory_structure_t_destroy_simple(uint128s, uint64_t) + #define f_macro_uint128s_t_increase(status, uint128s) f_macro_memory_structure_increase(status, uint128s, uint64_t); + #define f_macro_uint128s_t_decimate(status, uint128s) f_macro_memory_structure_decimate(status, uint128s, uint64_t); + #define f_macro_uint128s_t_decrease(status, uint128s) f_macro_memory_structure_decrease(status, uint128s, uint64_t); - #define f_macro_uint128s_t_increase(status, uint128s) f_macro_memory_structure_increase(status, uint128s, uint64_t); #define f_macro_uint128s_t_increase_by(status, uint128s, amount) f_macro_memory_structure_increase_by(status, uint128s, uint64_t, amount); + #define f_macro_uint128s_t_decrease_by(status, uint128s, amount) f_macro_memory_structure_decrease_by(status, uint128s, uint64_t, amount); + #define f_macro_uint128s_t_decimate_by(status, uint128s, amount) f_macro_memory_structure_decimate_by(status, uint128s, uint64_t, amount); - #define f_macro_uint128s_t_new(status, uint128s, length) f_macro_memory_structure_t_new(status, uint128s, uint64_t, length) + #define f_macro_uint128s_t_delete(status, uint128s) f_macro_memory_structure_delete(status, uint128s, uint64_t); + #define f_macro_uint128s_t_destroy(status, uint128s) f_macro_memory_structure_destroy(status, uint128s, uint64_t); - #define f_macro_uint128s_t_resize(status, uint128s, new_length) f_macro_memory_structure_t_resize(status, uint128s, uint64_t, new_length) + #define f_macro_uint128s_t_delete_simple(uint128s) f_macro_memory_structure_delete_simple(uint128s, uint64_t); + #define f_macro_uint128s_t_destroy_simple(uint128s) f_macro_memory_structure_destroy_simple(uint128s, uint64_t); #endif // _di_uint128s_t_ /** @@ -1016,18 +990,18 @@ extern "C" { #define f_uint128ss_t_initialize { 0, 0, 0 } - #define f_macro_uint128ss_t_clear(numbers) f_macro_memory_structures_t_clear(numbers) + #define f_macro_uint128ss_t_clear(numbers) f_macro_memory_structures_clear(numbers); - #define f_macro_uint128ss_t_new(status, numbers, length) f_macro_memory_structures_t_new(status, numbers, uint64_t, length) + #define f_macro_uint128ss_t_new(status, numbers, length) f_macro_memory_structures_new(status, numbers, uint64_t, length); - #define f_macro_uint128ss_t_delete(status, numbers) f_macro_memory_structures_t_delete(status, numbers, uint64_t, f_uint128s_t) - #define f_macro_uint128ss_t_destroy(status, numbers) f_macro_memory_structures_t_destroy(status, numbers, uint64_t, f_uint128s_t) + #define f_macro_uint128ss_t_delete(status, numbers) f_macro_memory_structures_delete(status, numbers, uint64_t, f_uint128s_t); + #define f_macro_uint128ss_t_destroy(status, numbers) f_macro_memory_structures_destroy(status, numbers, uint64_t, f_uint128s_t); - #define f_macro_uint128ss_t_delete_simple(numbers) f_macro_memory_structures_t_delete_simple(numbers, uint64_t, f_uint128s_t) - #define f_macro_uint128ss_t_destroy_simple(numbers) f_macro_memory_structures_t_destroy_simple(numbers, uint64_t, f_uint128s_t) + #define f_macro_uint128ss_t_delete_simple(numbers) f_macro_memory_structures_delete_simple(numbers, uint64_t, f_uint128s_t); + #define f_macro_uint128ss_t_destroy_simple(numbers) f_macro_memory_structures_destroy_simple(numbers, uint64_t, f_uint128s_t); - #define f_macro_uint128ss_t_resize(status, numbers, new_length) f_macro_memory_structures_t_resize(status, numbers, uint64_t, f_uint128s_t, new_length, f_array_length_t) - #define f_macro_uint128ss_t_adjust(status, numbers, new_length) f_macro_memory_structures_t_adjust(status, numbers, uint64_t, f_uint128s_t, new_length, f_array_length_t) + #define f_macro_uint128ss_t_resize(status, numbers, length) f_macro_memory_structures_resize(status, numbers, uint64_t, f_uint128s_t, length, f_array_length_t); + #define f_macro_uint128ss_t_adjust(status, numbers, length) f_macro_memory_structures_adjust(status, numbers, uint64_t, f_uint128s_t, length, f_array_length_t); #endif // _di_uint128ss_t_ #endif // __SIZEOF_INT128__ diff --git a/level_0/f_utf/c/utf-common.h b/level_0/f_utf/c/utf-common.h index d9ba3ad..31243d5 100644 --- a/level_0/f_utf/c/utf-common.h +++ b/level_0/f_utf/c/utf-common.h @@ -117,16 +117,17 @@ extern "C" { #ifndef _di_f_utf_string_t_ typedef f_utf_character_t *f_utf_string_t; - #define f_utf_string_t_size_max f_number_t_size_unsigned + #define f_utf_string_t_size_max f_number_t_size_unsigned + #define f_utf_string_t_initialize f_utf_character_t_eos - #define f_macro_utf_string_t_new(status, string, length) status = f_memory_new((void **) & string, sizeof(f_utf_string_t), length) + #define f_macro_utf_string_t_new(status, string, length) status = f_memory_new((void **) & string, sizeof(f_utf_string_t), length); - #define f_macro_utf_string_t_delete(status, string, size) status = f_memory_delete((void **) & string, sizeof(f_utf_string_t), size) - #define f_macro_utf_string_t_destroy(status, string, size) status = f_memory_destroy((void **) & string, sizeof(f_utf_string_t), size) + #define f_macro_utf_string_t_resize(status, string, old_length, new_length) status = f_memory_resize((void **) & string, sizeof(f_utf_string_t), old_length, new_length); + #define f_macro_utf_string_t_adjust(status, string, old_length, new_length) status = f_memory_adjust((void **) & string, sizeof(f_utf_string_t), old_length, new_length); - #define f_macro_utf_string_t_resize(status, string, old_length, new_length) status = f_memory_resize((void **) & string, sizeof(f_utf_string_t), old_length, new_length) - #define f_macro_utf_string_t_adjust(status, string, old_length, new_length) status = f_memory_adjust((void **) & string, sizeof(f_utf_string_t), old_length, new_length) + #define f_macro_utf_string_t_delete(status, string, size) status = f_memory_delete((void **) & string, sizeof(f_utf_string_t), size); + #define f_macro_utf_string_t_destroy(status, string, size) status = f_memory_destroy((void **) & string, sizeof(f_utf_string_t), size); #endif // _di_f_utf_string_t_ /** @@ -138,13 +139,13 @@ extern "C" { #define f_utf_string_length_t_size 0xfffffffffffffffe #define f_utf_string_length_t_size_max f_number_t_size_max_unsigned - #define f_macro_utf_string_length_t_new(status, string, length) status = f_memory_new((void **) & string, sizeof(f_utf_string_length_t), length) + #define f_macro_utf_string_length_t_new(status, string, length) status = f_memory_new((void **) & string, sizeof(f_utf_string_length_t), length); - #define f_macro_utf_string_length_t_delete(status, string, length) status = f_memory_delete((void **) & string, sizeof(f_utf_string_length_t), length) - #define f_macro_utf_string_length_t_destroy(status, string, size) status = f_memory_destroy((f_void_P *) & string, sizeof(f_utf_string_length_t), size) + #define f_macro_utf_string_length_t_resize(status, length, old_length, new_length) status = f_memory_resize((void **) & length, sizeof(f_utf_string_length_t), old_length, new_length); + #define f_macro_utf_string_length_t_adjust(status, length, old_length, new_length) status = f_memory_adjust((void **) & length, sizeof(f_utf_string_length_t), old_length, new_length); - #define f_macro_utf_string_length_t_resize(status, length, old_length, new_length) status = f_memory_resize((void **) & length, sizeof(f_utf_string_length_t), old_length, new_length) - #define f_macro_utf_string_length_t_adjust(status, length, old_length, new_length) status = f_memory_adjust((void **) & length, sizeof(f_utf_string_length_t), old_length, new_length) + #define f_macro_utf_string_length_t_delete(status, string, length) status = f_memory_delete((void **) & string, sizeof(f_utf_string_length_t), length); + #define f_macro_utf_string_length_t_destroy(status, string, size) status = f_memory_destroy((f_void_P *) & string, sizeof(f_utf_string_length_t), size); #endif // _di_f_utf_string_length_t_ /** @@ -161,15 +162,26 @@ extern "C" { #define f_utf_string_lengths_t_initialize { 0, 0, 0 } - #define f_macro_utf_string_lengths_t_clear(lengths) f_macro_memory_structure_t_clear(lengths) + #define f_macro_utf_string_lengths_t_clear(lengths) f_macro_memory_structure_clear(lengths); + + #define f_macro_utf_string_lengths_t_new(status, string_lengths, length) f_macro_memory_structure_new(status, string_lengths, f_utf_string_length_t, length); + + #define f_macro_utf_string_lengths_t_resize(status, string_lengths, length) f_macro_memory_structure_resize(status, string_lengths, f_utf_string_length_t, length); + #define f_macro_utf_string_lengths_t_adjust(status, string_lengths, length) f_macro_memory_structure_adjust(status, string_lengths, f_utf_string_length_t, length); - #define f_macro_utf_string_lengths_t_new(status, lengths, length) f_macro_memory_structure_t_new(status, lengths, f_utf_string_length_t, length) + #define f_macro_utf_string_lengths_t_delete(status, string_lengths) f_macro_memory_structure_delete(status, string_lengths, f_utf_string_length_t); + #define f_macro_utf_string_lengths_t_destroy(status, string_lengths) f_macro_memory_structure_destroy(status, string_lengths, f_utf_string_length_t); - #define f_macro_utf_string_lengths_t_delete(status, lengths) f_macro_memory_structure_t_delete(status, lengths, f_utf_string_length_t) - #define f_macro_utf_string_lengths_t_destroy(status, lengths) f_macro_memory_structure_t_destroy(status, lengths, f_utf_string_length_t) + #define f_macro_utf_string_lengths_t_delete_simple(string_lengths) f_macro_memory_structure_delete_simple(string_lengths, f_utf_string_length_t); + #define f_macro_utf_string_lengths_t_destroy_simple(string_lengths) f_macro_memory_structure_destroy_simple(string_lengths, f_utf_string_length_t); - #define f_macro_utf_string_lengths_t_resize(status, lengths, new_length) f_macro_memory_structure_t_resize(status, lengths, f_utf_string_length_t, new_length) - #define f_macro_utf_string_lengths_t_adjust(status, lengths, new_length) f_macro_memory_structure_t_adjust(status, lengths, f_utf_string_length_t, new_length) + #define f_macro_utf_string_lengths_t_increase(status, string_lengths) f_macro_memory_structure_increase(status, string_lengths, f_utf_string_length_t); + #define f_macro_utf_string_lengths_t_decrease(status, string_lengths) f_macro_memory_structure_decrease(status, string_lengths, f_utf_string_length_t); + #define f_macro_utf_string_lengths_t_decimate(status, string_lengths) f_macro_memory_structure_decimate(status, string_lengths, f_utf_string_length_t); + + #define f_macro_utf_string_lengths_t_increase_by(status, string_lengths, amount) f_macro_memory_structure_increase_by(status, string_lengths, f_utf_string_length_t, amount); + #define f_macro_utf_string_lengths_t_decrease_by(status, string_lengths, amount) f_macro_memory_structure_decrease_by(status, string_lengths, f_utf_string_length_t, amount); + #define f_macro_utf_string_lengths_t_decimate_by(status, string_lengths, amount) f_macro_memory_structure_decimate_by(status, string_lengths, f_utf_string_length_t, amount); #endif // _di_f_utf_string_lengths_t_ /** @@ -188,15 +200,13 @@ extern "C" { #define f_macro_utf_string_range_t_initialize(length) { length ? 0 : 1, length ? length - 1 : 0 } - #define f_macro_utf_string_range_t_new(status, utf_string_range, length) status = f_memory_new((void **) & utf_string_range, sizeof(f_utf_string_range_t), length) - #define f_macro_utf_string_range_t_delete(status, utf_string_range, size) status = f_memory_delete((void **) & utf_string_range, sizeof(f_utf_string_range_t), size) - #define f_macro_utf_string_range_t_destroy(status, utf_string_range, size) status = f_memory_destroy((void **) & utf_string_range, sizeof(f_utf_string_range_t), size) + #define f_macro_utf_string_range_t_new(status, utf_string_range, length) status = f_memory_new((void **) & utf_string_range, sizeof(f_utf_string_range_t), length); - #define f_macro_utf_string_range_t_resize(status, utf_string_range, old_length, new_length) \ - status = f_memory_resize((void **) & utf_string_range, sizeof(f_utf_string_range_t), old_length, new_length) + #define f_macro_utf_string_range_t_resize(status, utf_string_range, old_length, new_length) status = f_memory_resize((void **) & utf_string_range, sizeof(f_utf_string_range_t), old_length, new_length); + #define f_macro_utf_string_range_t_adjust(status, utf_string_range, old_length, new_length) status = f_memory_adjust((void **) & utf_string_range, sizeof(f_utf_string_range_t), old_length, new_length); - #define f_macro_utf_string_range_t_adjust(status, utf_string_range, old_length, new_length) \ - status = f_memory_adjust((void **) & utf_string_range, sizeof(f_utf_string_range_t), old_length, new_length) + #define f_macro_utf_string_range_t_delete(status, utf_string_range, size) status = f_memory_delete((void **) & utf_string_range, sizeof(f_utf_string_range_t), size); + #define f_macro_utf_string_range_t_destroy(status, utf_string_range, size) status = f_memory_destroy((void **) & utf_string_range, sizeof(f_utf_string_range_t), size); #endif // _di_f_utf_string_range_t_ /** @@ -213,17 +223,28 @@ extern "C" { f_array_length_t used; } f_utf_string_ranges_t; - #define f_utf_string_ranges_t_initialize {0, 0, 0} + #define f_utf_string_ranges_t_initialize { 0, 0, 0 } + + #define f_macro_utf_string_ranges_t_clear(lengths) f_macro_memory_structure_clear(lengths); + + #define f_macro_utf_string_ranges_t_new(status, string_ranges, length) f_macro_memory_structure_new(status, string_ranges, f_utf_string_range_t, length); - #define f_clear_utf_string_t_ranges(ranges) f_macro_memory_structure_t_clear(ranges) + #define f_macro_utf_string_ranges_t_resize(status, string_ranges, length) f_macro_memory_structure_resize(status, string_ranges, f_utf_string_range_t, length); + #define f_macro_utf_string_ranges_t_adjust(status, string_ranges, length) f_macro_memory_structure_adjust(status, string_ranges, f_utf_string_range_t, length); - #define f_macro_utf_string_range_t_news(status, ranges, length) f_macro_memory_structure_t_new(status, ranges, f_utf_string_range_t, length) + #define f_macro_utf_string_ranges_t_delete(status, string_ranges) f_macro_memory_structure_delete(status, string_ranges, f_utf_string_range_t); + #define f_macro_utf_string_ranges_t_destroy(status, string_ranges) f_macro_memory_structure_destroy(status, string_ranges, f_utf_string_range_t); - #define f_macro_utf_string_range_t_deletes(status, ranges) f_macro_memory_structure_t_delete(status, ranges, f_utf_string_range_t) - #define f_macro_utf_string_range_t_destroys(status, ranges) f_macro_memory_structure_t_destroy(status, ranges, f_utf_string_range_t) + #define f_macro_utf_string_ranges_t_delete_simple(string_ranges) f_macro_memory_structure_delete_simple(string_ranges, f_utf_string_range_t); + #define f_macro_utf_string_ranges_t_destroy_simple(string_ranges) f_macro_memory_structure_destroy_simple(string_ranges, f_utf_string_range_t); - #define f_macro_utf_string_range_t_resizes(status, ranges, new_length) f_macro_memory_structure_t_resize(status, ranges, f_utf_string_range_t, new_length) - #define f_macro_utf_string_range_t_adjusts(status, ranges, new_length) f_macro_memory_structure_t_adjust(status, ranges, f_utf_string_range_t, new_length) + #define f_macro_utf_string_ranges_t_increase(status, string_ranges) f_macro_memory_structure_increase(status, string_ranges, f_utf_string_range_t); + #define f_macro_utf_string_ranges_t_decrease(status, string_ranges) f_macro_memory_structure_decrease(status, string_ranges, f_utf_string_range_t); + #define f_macro_utf_string_ranges_t_decimate(status, string_ranges) f_macro_memory_structure_decimate(status, string_ranges, f_utf_string_range_t); + + #define f_macro_utf_string_ranges_t_increase_by(status, string_ranges, amount) f_macro_memory_structure_increase_by(status, string_ranges, f_utf_string_range_t, amount); + #define f_macro_utf_string_ranges_t_decrease_by(status, string_ranges, amount) f_macro_memory_structure_decrease_by(status, string_ranges, f_utf_string_range_t, amount); + #define f_macro_utf_string_ranges_t_decimate_by(status, string_ranges, amount) f_macro_memory_structure_decimate_by(status, string_ranges, f_utf_string_range_t, amount); #endif // _di_f_utf_string_ranges_t_ /** @@ -264,18 +285,26 @@ extern "C" { #define f_utf_string_quantitys_t_initialize {0, 0, 0} - #define f_macro_utf_string_quantitys_t_clear(quantitys) f_macro_memory_structure_t_clear(quantitys) + #define f_macro_utf_string_quantitys_t_clear(lengths) f_macro_memory_structure_clear(lengths); + + #define f_macro_utf_string_quantitys_t_new(status, quantitys, length) f_macro_memory_structure_new(status, quantitys, f_utf_string_quantity_t, length); + + #define f_macro_utf_string_quantitys_t_resize(status, quantitys, length) f_macro_memory_structure_resize(status, quantitys, f_utf_string_quantity_t, length); + #define f_macro_utf_string_quantitys_t_adjust(status, quantitys, length) f_macro_memory_structure_adjust(status, quantitys, f_utf_string_quantity_t, length); - #define f_macro_utf_string_quantitys_t_new(status, quantitys, length) f_macro_memory_structure_t_new(status, quantitys, f_utf_string_quantity_t, length) + #define f_macro_utf_string_quantitys_t_delete(status, quantitys) f_macro_memory_structure_delete(status, quantitys, f_utf_string_quantity_t); + #define f_macro_utf_string_quantitys_t_destroy(status, quantitys) f_macro_memory_structure_destroy(status, quantitys, f_utf_string_quantity_t); - #define f_macro_utf_string_quantitys_t_delete(status, quantitys) f_macro_memory_structure_t_delete(status, quantitys, f_utf_string_quantity_t) - #define f_macro_utf_string_quantitys_t_destroy(status, quantitys) f_macro_memory_structure_t_destroy(status, quantitys, f_utf_string_quantity_t) + #define f_macro_utf_string_quantitys_t_delete_simple(quantitys) f_macro_memory_structure_delete_simple(quantitys, f_utf_string_quantity_t); + #define f_macro_utf_string_quantitys_t_destroy_simple(quantitys) f_macro_memory_structure_destroy_simple(quantitys, f_utf_string_quantity_t); - #define f_macro_utf_string_quantitys_t_delete_simple(quantitys) f_macro_memory_structure_t_delete_simple(quantitys, f_utf_string_quantity_t) - #define f_macro_utf_string_quantitys_t_destroy_simple(quantitys) f_macro_memory_structure_t_destroy_simple(quantitys, f_utf_string_quantity_t) + #define f_macro_utf_string_quantitys_t_increase(status, quantitys) f_macro_memory_structure_increase(status, quantitys, f_utf_string_quantity_t); + #define f_macro_utf_string_quantitys_t_decrease(status, quantitys) f_macro_memory_structure_decrease(status, quantitys, f_utf_string_quantity_t); + #define f_macro_utf_string_quantitys_t_decimate(status, quantitys) f_macro_memory_structure_decimate(status, quantitys, f_utf_string_quantity_t); - #define f_macro_utf_string_quantitys_t_resize(status, quantitys, new_length) f_macro_memory_structure_t_resize(status, quantitys, f_utf_string_quantity_t, new_length) - #define f_macro_utf_string_quantitys_t_adjust(status, quantitys, new_length) f_macro_memory_structure_t_adjust(status, quantitys, f_utf_string_quantity_t, new_length) + #define f_macro_utf_string_quantitys_t_increase_by(status, quantitys, amount) f_macro_memory_structure_increase_by(status, quantitys, f_utf_string_quantity_t, amount); + #define f_macro_utf_string_quantitys_t_decrease_by(status, quantitys, amount) f_macro_memory_structure_decrease_by(status, quantitys, f_utf_string_quantity_t, amount); + #define f_macro_utf_string_quantitys_t_decimate_by(status, quantitys, amount) f_macro_memory_structure_decimate_by(status, quantitys, f_utf_string_quantity_t, amount); #endif // _di_f_utf_string_quantitys_t_ @@ -320,7 +349,7 @@ extern "C" { #define f_utf_string_dynamic_t_initialize f_utf_string_static_t_initialize - #define f_clear_utf_string_dynamic_t(dynamic) f_macro_utf_string_static_t_clear(dynamic) + #define f_macro_utf_string_dynamic_t_clear(dynamic) f_macro_utf_string_static_t_clear(dynamic) #define f_macro_utf_string_dynamic_t_new(status, dynamic, new_length) \ f_clear_utf_string_dynamic_t(dynamic) \ @@ -330,6 +359,20 @@ extern "C" { dynamic.used = 0; \ } + #define f_macro_utf_string_dynamic_t_resize(status, dynamic, new_length) \ + status = f_memory_resize((void **) & dynamic.string, sizeof(f_utf_string_t), dynamic.size, new_length); \ + if (status == F_none) { \ + dynamic.size = new_length; \ + if (dynamic.used > dynamic.size) dynamic.used = new_length; \ + } + + #define f_macro_utf_string_dynamic_t_adjust(status, dynamic, new_length) \ + status = f_memory_adjust((void **) & dynamic.string, sizeof(f_utf_string_t), dynamic.size, new_length); \ + if (status == F_none) { \ + dynamic.size = new_length; \ + if (dynamic.used > dynamic.size) dynamic.used = new_length; \ + } + #define f_macro_utf_string_dynamic_t_delete(status, dynamic) \ status = f_memory_delete((void **) & dynamic.string, sizeof(f_utf_string_t), dynamic.size); \ if (status == F_none) { \ @@ -353,20 +396,6 @@ extern "C" { f_memory_destroy((void **) & dynamic.string, sizeof(f_utf_string_t), dynamic.size); \ dynamic.size = 0; \ dynamic.used = 0; - - #define f_macro_utf_string_dynamic_t_resize(status, dynamic, new_length) \ - status = f_memory_resize((void **) & dynamic.string, sizeof(f_utf_string_t), dynamic.size, new_length); \ - if (status == F_none) { \ - dynamic.size = new_length; \ - if (dynamic.used > dynamic.size) dynamic.used = new_length; \ - } - - #define f_macro_utf_string_dynamic_t_adjust(status, dynamic, new_length) \ - status = f_memory_adjust((void **) & dynamic.string, sizeof(f_utf_string_t), dynamic.size, new_length); \ - if (status == F_none) { \ - dynamic.size = new_length; \ - if (dynamic.used > dynamic.size) dynamic.used = new_length; \ - } #endif // _di_f_utf_string_dynamic_t_ /** @@ -385,7 +414,7 @@ extern "C" { #define f_utf_string_dynamics_t_initialize { 0, 0, 0 } - #define f_clear_utf_string_dynamics_t(dynamics) \ + #define f_macro_utf_string_dynamics_t_clear(dynamics) \ dynamics.array = 0; \ dynamics.size = 0; \ dynamics.used = 0; @@ -400,6 +429,34 @@ extern "C" { dynamics.used = 0; \ } + #define f_macro_utf_string_dynamics_t_resize(status, dynamics, new_length) \ + status = F_none; \ + if (new_length < dynamics.size) { \ + for (f_utf_string_length_t _macro__i = dynamics.size - new_length; _macro__i < dynamics.size; ++_macro__i) { \ + f_macro_utf_string_dynamic_t_destroy(status, dynamics.array[_macro__i]); \ + if (status != F_none) break; \ + } \ + } \ + if (status == F_none) status = f_memory_resize((void **) & dynamics.array, sizeof(f_utf_string_dynamic_t), dynamics.size, new_length); \ + if (status == F_none) { \ + dynamics.size = new_length; \ + if (dynamics.used > dynamics.size) dynamics.used = new_length; \ + } + + #define f_macro_utf_string_dynamics_t_adjust(status, dynamics, new_length) \ + status = F_none; \ + if (new_length < dynamics.size) { \ + for (f_utf_string_length_t _macro__i = dynamics.size - new_length; _macro__i < dynamics.size; ++_macro__i) { \ + f_macro_utf_string_dynamic_t_destroy(status, dynamics.array[_macro__i], f_utf_string_dynamic_t); \ + if (status != F_none) break; \ + } \ + } \ + if (status == F_none) status = f_memory_adjust((void **) & dynamics.array, sizeof(f_utf_string_dynamic_t), dynamics.size, new_length); \ + if (status == F_none) { \ + dynamics.size = new_length; \ + if (dynamics.used > dynamics.size) dynamics.used = new_length; \ + } + #define f_macro_utf_string_dynamics_t_delete(status, dynamics) \ status = F_none; \ while (dynamics.size > 0) { \ @@ -443,34 +500,6 @@ extern "C" { } \ } \ } - - #define f_macro_utf_string_dynamics_t_resize(status, dynamics, new_length) \ - status = F_none; \ - if (new_length < dynamics.size) { \ - for (f_utf_string_length_t _macro__i = dynamics.size - new_length; _macro__i < dynamics.size; _macro__i++) { \ - f_macro_utf_string_dynamic_t_destroy(status, dynamics.array[_macro__i]); \ - if (status != F_none) break; \ - } \ - } \ - if (status == F_none) status = f_memory_resize((void **) & dynamics.array, sizeof(f_utf_string_dynamic_t), dynamics.size, new_length); \ - if (status == F_none) { \ - dynamics.size = new_length; \ - if (dynamics.used > dynamics.size) dynamics.used = new_length; \ - } - - #define f_macro_utf_string_dynamics_t_adjust(status, dynamics, new_length) \ - status = F_none; \ - if (new_length < dynamics.size) { \ - for (f_utf_string_length_t _macro__i = dynamics.size - new_length; _macro__i < dynamics.size; _macro__i++) { \ - f_macro_utf_string_dynamic_t_destroy(status, dynamics.array[_macro__i], f_utf_string_dynamic_t); \ - if (status != F_none) break; \ - } \ - } \ - if (status == F_none) status = f_memory_adjust((void **) & dynamics.array, sizeof(f_utf_string_dynamic_t), dynamics.size, new_length); \ - if (status == F_none) { \ - dynamics.size = new_length; \ - if (dynamics.used > dynamics.size) dynamics.used = new_length; \ - } #endif // _di_f_utf_string_dynamic_t_ /** diff --git a/level_0/f_utf/c/utf.h b/level_0/f_utf/c/utf.h index 34b18c3..07cae0c 100644 --- a/level_0/f_utf/c/utf.h +++ b/level_0/f_utf/c/utf.h @@ -658,7 +658,7 @@ extern "C" { * F_none if conversion was successful. * F_failure (with error bit) if width is not long enough to convert. * F_parameter (with error bit) if a parameter is invalid. - * F_memory_allocation (with error bit) on memory allocation error. + * F_memory_not (with error bit) on out of memory. * F_utf (with error bit) if character is an invalid UTF-8 character. * F_failure (with error bit) if width is not long enough to convert. */ diff --git a/level_0/f_utf/data/build/settings b/level_0/f_utf/data/build/settings index 3e9be8c..9783ea1 100644 --- a/level_0/f_utf/data/build/settings +++ b/level_0/f_utf/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lf_memory +build_libraries-individual -lf_memory -lf_string build_sources_library utf.c private-utf.c build_sources_program build_sources_headers utf.h utf-common.h diff --git a/level_1/fl_color/c/color.h b/level_1/fl_color/c/color.h index b3ff8e2..24d759f 100644 --- a/level_1/fl_color/c/color.h +++ b/level_1/fl_color/c/color.h @@ -57,11 +57,11 @@ extern "C" { #ifndef _di_fl_color_set_ extern f_status_t fl_color_set(FILE *stream, const f_color_format_t format, const int8_t *color1, const int8_t *color2, const int8_t *color3, const int8_t *color4, const int8_t *color5); - #define fl_macro_color_set_1(stream, format, color1) fl_color_set(stream, format, color1, 0, 0, 0, 0) - #define fl_macro_color_set_2(stream, format, color1, color2) fl_color_set(stream, format, color1, color2, 0, 0, 0) - #define fl_macro_color_set_3(stream, format, color1, color2, color3) fl_color_set(stream, format, color1, color2, color3, 0, 0) - #define fl_macro_color_set_4(stream, format, color1, color2, color3, color4) fl_color_set(stream, format, color1, color2, color3, color4, 0) - #define fl_macro_color_set_5(stream, format, color1, color2, color3, color4, color5) fl_color_set(stream, format, color1, color2, color3, color4, color5) + #define fl_macro_color_set_1(stream, format, color1) fl_color_set(stream, format, color1, 0, 0, 0, 0); + #define fl_macro_color_set_2(stream, format, color1, color2) fl_color_set(stream, format, color1, color2, 0, 0, 0); + #define fl_macro_color_set_3(stream, format, color1, color2, color3) fl_color_set(stream, format, color1, color2, color3, 0, 0); + #define fl_macro_color_set_4(stream, format, color1, color2, color3, color4) fl_color_set(stream, format, color1, color2, color3, color4, 0); + #define fl_macro_color_set_5(stream, format, color1, color2, color3, color4, color5) fl_color_set(stream, format, color1, color2, color3, color4, color5); #endif // _di_fl_color_set_ /** @@ -91,11 +91,11 @@ extern "C" { #ifndef _di_fl_color_set_to_ extern f_status_t fl_color_set_to(const int id, const f_color_format_t format, const int8_t *color1, const int8_t *color2, const int8_t *color3, const int8_t *color4, const int8_t *color5); - #define fl_macro_color_set_to_1(id, format, color1) fl_color_set_to(id, format, color1, 0, 0, 0, 0) - #define fl_macro_color_set_to_2(id, format, color1, color2) fl_color_set_to(id, format, color1, color2, 0, 0, 0) - #define fl_macro_color_set_to_3(id, format, color1, color2, color3) fl_color_set_to(id, format, color1, color2, color3, 0, 0) - #define fl_macro_color_set_to_4(id, format, color1, color2, color3, color4) fl_color_set_to(id, format, color1, color2, color3, color4, 0) - #define fl_macro_color_set_to_5(id, format, color1, color2, color3, color4, color5) fl_color_set_to(id, format, color1, color2, color3, color4, color5) + #define fl_macro_color_set_to_1(id, format, color1) fl_color_set_to(id, format, color1, 0, 0, 0, 0); + #define fl_macro_color_set_to_2(id, format, color1, color2) fl_color_set_to(id, format, color1, color2, 0, 0, 0); + #define fl_macro_color_set_to_3(id, format, color1, color2, color3) fl_color_set_to(id, format, color1, color2, color3, 0, 0); + #define fl_macro_color_set_to_4(id, format, color1, color2, color3, color4) fl_color_set_to(id, format, color1, color2, color3, color4, 0); + #define fl_macro_color_set_to_5(id, format, color1, color2, color3, color4, color5) fl_color_set_to(id, format, color1, color2, color3, color4, color5); #endif // _di_fl_color_set_to_ /** @@ -120,17 +120,17 @@ extern "C" { * * @return * F_none on success. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_color_save_ extern f_status_t fl_color_save(f_string_dynamic_t *buffer, const f_color_format_t format, const int8_t *color1, const int8_t *color2, const int8_t *color3, const int8_t *color4, const int8_t *color5); - #define fl_macro_color_save_1(buffer, format, color1) fl_color_save(buffer, format, color1, 0, 0, 0, 0) - #define fl_macro_color_save_2(buffer, format, color1, color2) fl_color_save(buffer, format, color1, color2, 0, 0, 0) - #define fl_macro_color_save_3(buffer, format, color1, color2, color3) fl_color_save(buffer, format, color1, color2, color3, 0, 0) - #define fl_macro_color_save_4(buffer, format, color1, color2, color3, color4) fl_color_save(buffer, format, color1, color2, color3, color4, 0) - #define fl_macro_color_save_5(buffer, format, color1, color2, color3, color4, color5) fl_color_save(buffer, format, color1, color2, color3, color4, color5) + #define fl_macro_color_save_1(buffer, format, color1) fl_color_save(buffer, format, color1, 0, 0, 0, 0); + #define fl_macro_color_save_2(buffer, format, color1, color2) fl_color_save(buffer, format, color1, color2, 0, 0, 0); + #define fl_macro_color_save_3(buffer, format, color1, color2, color3) fl_color_save(buffer, format, color1, color2, color3, 0, 0); + #define fl_macro_color_save_4(buffer, format, color1, color2, color3, color4) fl_color_save(buffer, format, color1, color2, color3, color4, 0); + #define fl_macro_color_save_5(buffer, format, color1, color2, color3, color4, color5) fl_color_save(buffer, format, color1, color2, color3, color4, color5); #endif // _di_fl_color_save_ /** @@ -291,7 +291,7 @@ extern "C" { * * @return * F_none on success. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_color_load_context_ diff --git a/level_1/fl_color/data/build/settings b/level_1/fl_color/data/build/settings index f5048dd..88c880d 100644 --- a/level_1/fl_color/data/build/settings +++ b/level_1/fl_color/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lf_file -lf_memory -lf_print +build_libraries-individual -lf_color -lf_file -lf_memory -lf_print -lf_string build_sources_library color.c build_sources_program build_sources_headers color.h diff --git a/level_1/fl_console/c/console.c b/level_1/fl_console/c/console.c index 27d19a7..eeffb35 100644 --- a/level_1/fl_console/c/console.c +++ b/level_1/fl_console/c/console.c @@ -19,14 +19,14 @@ extern "C" { } if (length > 1) { - while (length > 1 && argument[length - 1] == '/') { + while (length > 1 && argument[length - 1] == f_path_separator_s[0]) { length--; } // while - if (argument[0] == '/') { + if (argument[0] == f_path_separator_s[0]) { f_string_length_t begin = 1; - while (begin < length && argument[begin] == '/') { + while (begin < length && argument[begin] == f_path_separator_s[0]) { begin++; } // while @@ -42,8 +42,8 @@ extern "C" { directory->used = length; directory->size = length; - directory->string[0] = '/'; - directory->string[length - 1] = '/'; + directory->string[0] = f_path_separator_s[0]; + directory->string[length - 1] = f_path_separator_s[0]; } else { f_macro_string_dynamic_t_new(status, (*directory), 1); @@ -51,13 +51,13 @@ extern "C" { directory->used = 1; directory->size = 1; - directory->string[0] = '/'; + directory->string[0] = f_path_separator_s[0]; } } - else if (length > 3 && argument[0] == '.' && argument[1] == '.' && argument[2] == '/') { + else if (length > 3 && argument[0] == f_path_separator_current_s[0] && argument[1] == f_path_separator_current_s[0] && argument[2] == f_path_separator_s[0]) { f_string_length_t begin = 3; - while (begin < length && argument[begin] == '/') { + while (begin < length && argument[begin] == f_path_separator_s[0]) { begin++; } // while @@ -73,10 +73,10 @@ extern "C" { directory->used = length; directory->size = length; - directory->string[0] = '.'; - directory->string[1] = '.'; - directory->string[2] = '/'; - directory->string[length - 1] = '/'; + directory->string[0] = f_path_separator_current_s[0]; + directory->string[1] = f_path_separator_current_s[0]; + directory->string[2] = f_path_separator_s[0]; + directory->string[length - 1] = f_path_separator_s[0]; } else { f_macro_string_dynamic_t_new(status, (*directory), 3); @@ -84,15 +84,15 @@ extern "C" { directory->used = 3; directory->size = 3; - directory->string[0] = '.'; - directory->string[1] = '.'; - directory->string[2] = '/'; + directory->string[0] = f_path_separator_current_s[0]; + directory->string[1] = f_path_separator_current_s[0]; + directory->string[2] = f_path_separator_s[0]; } } - else if (length > 2 && argument[0] == '.' && argument[1] == '/') { + else if (length > 2 && argument[0] == f_path_separator_current_s[0] && argument[1] == f_path_separator_s[0]) { f_string_length_t begin = 2; - while (begin < length && argument[begin] == '/') { + while (begin < length && argument[begin] == f_path_separator_s[0]) { begin++; } // while @@ -108,9 +108,9 @@ extern "C" { directory->used = length; directory->size = length; - directory->string[0] = '.'; - directory->string[1] = '/'; - directory->string[length - 1] = '/'; + directory->string[0] = f_path_separator_current_s[0]; + directory->string[1] = f_path_separator_s[0]; + directory->string[length - 1] = f_path_separator_s[0]; } else { f_macro_string_dynamic_t_new(status, (*directory), 2); @@ -118,8 +118,8 @@ extern "C" { directory->used = 2; directory->size = 2; - directory->string[0] = '.'; - directory->string[1] = '/'; + directory->string[0] = f_path_separator_current_s[0]; + directory->string[1] = f_path_separator_s[0]; } } else { @@ -132,10 +132,10 @@ extern "C" { directory->used = length; directory->size = length; - directory->string[length - 1] = '/'; + directory->string[length - 1] = f_path_separator_s[0]; } } - else if (argument[0] != '/') { + else if (argument[0] != f_path_separator_s[0]) { f_macro_string_dynamic_t_new(status, (*directory), 2); if (F_status_is_error(status)) return status; @@ -143,7 +143,7 @@ extern "C" { directory->used = 2; directory->size = 2; - directory->string[1] = '/'; + directory->string[1] = f_path_separator_s[0]; } else { f_macro_string_dynamic_t_new(status, (*directory), 1); diff --git a/level_1/fl_console/c/console.h b/level_1/fl_console/c/console.h index 6491f76..51662e2 100644 --- a/level_1/fl_console/c/console.h +++ b/level_1/fl_console/c/console.h @@ -23,6 +23,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { @@ -52,7 +53,7 @@ extern "C" { * * @return * F_none on success. - * F_memory_allocation (with error bit) on allocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _fl_console_parameter_to_string_dynamic_directory_ diff --git a/level_1/fl_console/data/build/dependencies b/level_1/fl_console/data/build/dependencies index 71a6d9d..19ccf17 100644 --- a/level_1/fl_console/data/build/dependencies +++ b/level_1/fl_console/data/build/dependencies @@ -7,3 +7,4 @@ f_string f_utf f_console f_conversion +f_path diff --git a/level_1/fl_console/data/build/settings b/level_1/fl_console/data/build/settings index a6ad93e..ef63b77 100644 --- a/level_1/fl_console/data/build/settings +++ b/level_1/fl_console/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lf_console -lf_conversion -lf_memory -lf_utf +build_libraries-individual -lf_console -lf_conversion -lf_memory -lf_path -lf_string -lf_utf build_sources_library console.c build_sources_program build_sources_headers console.h diff --git a/level_1/fl_control_group/data/build/settings b/level_1/fl_control_group/data/build/settings index 5f7cde4..beb8a29 100644 --- a/level_1/fl_control_group/data/build/settings +++ b/level_1/fl_control_group/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lf_file -lf_memory +build_libraries-individual -lf_control_group -lf_file -lf_memory -lf_string build_sources_library control_group.c build_sources_program build_sources_headers control_group.h diff --git a/level_1/fl_conversion/data/build/settings b/level_1/fl_conversion/data/build/settings index f5bb19b..872bdbd 100644 --- a/level_1/fl_conversion/data/build/settings +++ b/level_1/fl_conversion/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lf_conversion -lf_memory -lf_utf +build_libraries-individual -lf_conversion -lf_memory -lf_string -lf_utf build_sources_library conversion.c build_sources_program build_sources_headers conversion.h diff --git a/level_1/fl_directory/c/directory.h b/level_1/fl_directory/c/directory.h index fca18d9..da76935 100644 --- a/level_1/fl_directory/c/directory.h +++ b/level_1/fl_directory/c/directory.h @@ -319,7 +319,7 @@ extern "C" { * F_failure (with error bit) if failed to read directory information. * F_file_descriptor_max (with error bit) if max file descriptors was reached. * F_file_open_max (with error bit) too many open files. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if appended string length is too large to store in the buffer. * diff --git a/level_1/fl_directory/c/private-directory.c b/level_1/fl_directory/c/private-directory.c index 6c565e3..d62961b 100644 --- a/level_1/fl_directory/c/private-directory.c +++ b/level_1/fl_directory/c/private-directory.c @@ -150,7 +150,7 @@ extern "C" { f_status_t status = f_file_clone(path_source, path_destination, role, recurse.size_block, recurse.exclusive); if (F_status_is_error(status) || status == F_supported_not) { - if (status == F_status_set_error(F_memory_allocation) || status == F_status_set_error(F_memory_reallocation)) { + if (status == F_status_set_error(F_memory_not)) { return F_status_set_error(status); } @@ -346,7 +346,7 @@ extern "C" { f_status_t status = f_file_copy(path_source, path_destination, mode, recurse.size_block, recurse.exclusive); if (F_status_is_error(status) || status == F_supported_not) { - if (status == F_status_set_error(F_memory_allocation) || status == F_status_set_error(F_memory_reallocation)) { + if (status == F_status_set_error(F_memory_not)) { return F_status_set_error(status); } @@ -468,7 +468,7 @@ extern "C" { if (length == -1) { closedir(parent); - if (errno == ENOMEM) return F_status_set_error(F_memory_allocation); + if (errno == ENOMEM) return F_status_set_error(F_memory_not); else return F_status_set_error(F_failure); } diff --git a/level_1/fl_directory/c/private-directory.h b/level_1/fl_directory/c/private-directory.h index 88e3ae1..06f4bbd 100644 --- a/level_1/fl_directory/c/private-directory.h +++ b/level_1/fl_directory/c/private-directory.h @@ -162,7 +162,7 @@ extern "C" { * F_failure (with error bit) if failed to read directory information. * F_file_descriptor_max (with error bit) if max file descriptors was reached. * F_file_open_max (with error bit) too many open files. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if appended string length is too large to store in the buffer. * diff --git a/level_1/fl_directory/data/build/settings b/level_1/fl_directory/data/build/settings index 1d4b2fe..d927299 100644 --- a/level_1/fl_directory/data/build/settings +++ b/level_1/fl_directory/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lf_directory -lf_file -lf_memory -lf_path -lf_utf +build_libraries-individual -lf_directory -lf_file -lf_memory -lf_path -lf_string -lf_utf build_sources_library directory.c private-directory.c build_sources_program build_sources_headers directory.h diff --git a/level_1/fl_environment/c/environment.c b/level_1/fl_environment/c/environment.c index 9e25b8d..40089fa 100644 --- a/level_1/fl_environment/c/environment.c +++ b/level_1/fl_environment/c/environment.c @@ -33,7 +33,7 @@ extern "C" { for (i = 0; i <= length; i++) { - if (i == length || path[i] == f_path_separator_variable[0]) { + if (i == length || path[i] == f_path_separator_variable_s[0]) { f_macro_memory_structure_macro_increment(status, (*paths), 1, f_memory_default_allocation_step, f_macro_string_dynamics_t_resize, F_array_too_large); if (F_status_is_error(status)) return status; @@ -112,7 +112,7 @@ extern "C" { for (i = 0; i <= path.used; i++) { - if (i == path.used || path.string[i] == f_path_separator_variable[0]) { + if (i == path.used || path.string[i] == f_path_separator_variable_s[0]) { f_macro_memory_structure_macro_increment(status, (*paths), 1, f_memory_default_allocation_step, f_macro_string_dynamics_t_resize, F_array_too_large); if (F_status_is_error(status)) return status; @@ -194,11 +194,11 @@ extern "C" { for (; i > 0; i--) { j--; - if (!j || path[j] == f_path_separator_variable[0]) { + if (!j || path[j] == f_path_separator_variable_s[0]) { f_macro_memory_structure_macro_increment(status, (*paths), 1, f_memory_default_allocation_step, f_macro_string_dynamics_t_resize, F_array_too_large); if (F_status_is_error(status)) return status; - if (path[j] == f_path_separator_variable[0]) { + if (path[j] == f_path_separator_variable_s[0]) { total = last - i; if (total > 0) { @@ -289,11 +289,11 @@ extern "C" { for (; i > 0; i--) { j--; - if (!j || path.string[j] == f_path_separator_variable[0]) { + if (!j || path.string[j] == f_path_separator_variable_s[0]) { f_macro_memory_structure_macro_increment(status, (*paths), 1, f_memory_default_allocation_step, f_macro_string_dynamics_t_resize, F_array_too_large); if (F_status_is_error(status)) return status; - if (path.string[j] == f_path_separator_variable[0]) { + if (path.string[j] == f_path_separator_variable_s[0]) { total = last - i; if (total > 0) { diff --git a/level_1/fl_environment/c/environment.h b/level_1/fl_environment/c/environment.h index 4719d6e..45730f2 100644 --- a/level_1/fl_environment/c/environment.h +++ b/level_1/fl_environment/c/environment.h @@ -41,8 +41,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if paths array is too large for further addressing. - * F_memory_reallocation (with error bit) on reallocation error. - * F_memory_allocation (with error bit) on allocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_environment_path_explode_ @@ -65,8 +64,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if paths array is too large for further addressing. - * F_memory_reallocation (with error bit) on reallocation error. - * F_memory_allocation (with error bit) on allocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_environment_path_explode_dynamic_ @@ -91,8 +89,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if paths array is too large for further addressing. - * F_memory_reallocation (with error bit) on reallocation error. - * F_memory_allocation (with error bit) on allocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_environment_path_explode_reverse_ @@ -117,8 +114,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if paths array is too large for further addressing. - * F_memory_reallocation (with error bit) on reallocation error. - * F_memory_allocation (with error bit) on allocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_environment_path_explode_reverse_dynamic_ diff --git a/level_1/fl_environment/data/build/settings b/level_1/fl_environment/data/build/settings index de57391..9949204 100644 --- a/level_1/fl_environment/data/build/settings +++ b/level_1/fl_environment/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lf_environment -lf_memory -lf_path -lf_utf +build_libraries-individual -lf_environment -lf_memory -lf_path -lf_string -lf_utf build_sources_library environment.c build_sources_program build_sources_headers environment.h diff --git a/level_1/fl_execute/data/build/settings b/level_1/fl_execute/data/build/settings index 9b4c26d..ebfad6d 100644 --- a/level_1/fl_execute/data/build/settings +++ b/level_1/fl_execute/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -lcap -build_libraries-individual -lf_capability -lf_limit -lf_memory -lf_signal +build_libraries-individual -lf_capability -lf_limit -lf_memory -lf_signal -lf_string build_sources_library build_sources_program build_sources_headers execute.h execute-common.h diff --git a/level_1/fl_fss/c/fss_basic.h b/level_1/fl_fss/c/fss_basic.h index 213f4b9..4f42dda 100644 --- a/level_1/fl_fss/c/fss_basic.h +++ b/level_1/fl_fss/c/fss_basic.h @@ -142,7 +142,7 @@ extern "C" { * F_data_not_stop no data to write due start location being greater than stop location. * F_data_not_eos no data to write due start location being greater than or equal to buffer size. * F_complete_not_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_none_eol (with error bit) after reaching an EOL, which is not supported by the standard. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if appended string length is too large to store in the destination. @@ -181,7 +181,7 @@ extern "C" { * F_none_stop on success after reaching the range stop. * F_data_not_stop no data to write due start location being greater than stop location. * F_data_not_eos no data to write due start location being greater than or equal to buffer size. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_none_eol (with error bit) after reaching an EOL, which is not supported by the standard. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if appended string length is too large to store in the destination. diff --git a/level_1/fl_fss/c/fss_basic_list.h b/level_1/fl_fss/c/fss_basic_list.h index a0504e7..f30b31b 100644 --- a/level_1/fl_fss/c/fss_basic_list.h +++ b/level_1/fl_fss/c/fss_basic_list.h @@ -61,7 +61,7 @@ extern "C" { * F_complete_not_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete. * F_complete_not_utf_eos (with error bit) if the end of buffer is reached before the complete UTF-8 character can be processed. * F_complete_not_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_utf (with error bit) is returned on failure to read/process a UTF-8 character. * @@ -109,7 +109,7 @@ extern "C" { * F_complete_not_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete. * F_complete_not_utf_eos (with error bit) if the end of buffer is reached before the complete UTF-8 character can be processed. * F_complete_not_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_utf (with error bit) is returned on failure to read/process a UTF-8 character. * @@ -152,7 +152,7 @@ extern "C" { * F_data_not_eos no data to write due start location being greater than or equal to buffer size. * F_none_stop on success after reaching stopping point . * F_complete_not_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_none_eol (with error bit) after reaching an EOL, which is not supported by the standard. * F_parameter (with error bit) if a parameter is invalid. * F_utf (with error bit) is returned on failure to read/process a UTF-8 character. @@ -196,7 +196,7 @@ extern "C" { * F_data_not_eos no data to write due start location being greater than or equal to buffer size. * F_none_stop on success after reaching stopping point . * F_complete_not_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_utf (with error bit) is returned on failure to read/process a UTF-8 character. * diff --git a/level_1/fl_fss/c/fss_embedded_list.h b/level_1/fl_fss/c/fss_embedded_list.h index 404503f..06272c1 100644 --- a/level_1/fl_fss/c/fss_embedded_list.h +++ b/level_1/fl_fss/c/fss_embedded_list.h @@ -61,7 +61,7 @@ extern "C" { * F_complete_not_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete. * F_complete_not_utf_eos (with error bit) if the end of buffer is reached before the complete UTF-8 character can be processed. * F_complete_not_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_utf (with error bit) is returned on failure to read/process a UTF-8 character. * @@ -113,7 +113,7 @@ extern "C" { * F_complete_not_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete. * F_complete_not_utf_eos (with error bit) if the end of buffer is reached before the complete UTF-8 character can be processed. * F_complete_not_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_utf (with error bit) is returned on failure to read/process a UTF-8 character. * @@ -155,7 +155,7 @@ extern "C" { * F_data_not_eos no data to write due start location being greater than or equal to buffer size. * F_none_stop on success after reaching stopping point . * F_complete_not_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_none_eol (with error bit) after reaching an EOL, which is not supported by the standard. * F_parameter (with error bit) if a parameter is invalid. * F_utf (with error bit) is returned on failure to read/process a UTF-8 character. @@ -203,7 +203,7 @@ extern "C" { * F_data_not_eos no data to write due start location being greater than or equal to buffer size. * F_none_stop on success after reaching stopping point . * F_complete_not_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_utf (with error bit) is returned on failure to read/process a UTF-8 character. * diff --git a/level_1/fl_fss/c/fss_extended.h b/level_1/fl_fss/c/fss_extended.h index f36f801..b0271f6 100644 --- a/level_1/fl_fss/c/fss_extended.h +++ b/level_1/fl_fss/c/fss_extended.h @@ -146,7 +146,7 @@ extern "C" { * F_data_not_stop no data to write due start location being greater than stop location. * F_data_not_eos no data to write due start location being greater than or equal to buffer size. * F_complete_not_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_none_eol (with error bit) after reaching an EOL, which is not supported by the standard. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if appended string length is too large to store in the destination. @@ -190,7 +190,7 @@ extern "C" { * F_data_not_stop no data to write due start location being greater than stop location. * F_data_not_eos no data to write due start location being greater than or equal to buffer size. * F_complete_not_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_none_eol (with error bit) after reaching an EOL, which is not supported by the standard. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if appended string length is too large to store in the destination. diff --git a/level_1/fl_fss/c/fss_extended_list.h b/level_1/fl_fss/c/fss_extended_list.h index 367d4d1..b084e37 100644 --- a/level_1/fl_fss/c/fss_extended_list.h +++ b/level_1/fl_fss/c/fss_extended_list.h @@ -61,7 +61,7 @@ extern "C" { * F_complete_not_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete. * F_complete_not_utf_eos (with error bit) if the end of buffer is reached before the complete UTF-8 character can be processed. * F_complete_not_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_utf (with error bit) is returned on failure to read/process a UTF-8 character. * @@ -111,7 +111,7 @@ extern "C" { * F_complete_not_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete. * F_complete_not_utf_eos (with error bit) if the end of buffer is reached before the complete UTF-8 character can be processed. * F_complete_not_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_utf (with error bit) is returned on failure to read/process a UTF-8 character. * @@ -153,7 +153,7 @@ extern "C" { * F_data_not_eos no data to write due start location being greater than or equal to buffer size. * F_none_stop on success after reaching stopping point . * F_complete_not_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_none_eol (with error bit) after reaching an EOL, which is not supported by the standard. * F_parameter (with error bit) if a parameter is invalid. * F_utf (with error bit) is returned on failure to read/process a UTF-8 character. @@ -201,7 +201,7 @@ extern "C" { * F_data_not_eos no data to write due start location being greater than or equal to buffer size. * F_none_stop on success after reaching stopping point . * F_complete_not_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_utf (with error bit) is returned on failure to read/process a UTF-8 character. * diff --git a/level_1/fl_fss/c/private-fss.h b/level_1/fl_fss/c/private-fss.h index 89a0891..6a2cbd3 100644 --- a/level_1/fl_fss/c/private-fss.h +++ b/level_1/fl_fss/c/private-fss.h @@ -122,7 +122,7 @@ extern "C" { * F_complete_not_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete. * F_complete_not_utf_eos (with error bit) if the end of buffer is reached before the complete UTF-8 character can be processed. * F_complete_not_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_utf (with error bit) is returned on failure to read/process a UTF-8 character. * @@ -171,7 +171,7 @@ extern "C" { * F_data_not_stop no data to write due start location being greater than stop location. * F_data_not_eos no data to write due start location being greater than or equal to buffer size. * F_complete_not_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_none_eol (with error bit) after reaching an EOL, which is not supported by the standard. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if appended string length is too large to store in the destination. @@ -195,8 +195,7 @@ extern "C" { * * @return * F_none on success. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_string_too_large (with error bit) if new length is larger than max string length. * * @see fl_fss_basic_content_write_string() @@ -224,8 +223,7 @@ extern "C" { * * @return * F_none on success. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_string_too_large (with error bit) if new length is larger than max string length. * * @see fl_fss_basic_content_write_string() @@ -254,7 +252,7 @@ extern "C" { * * @return * F_none on success. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_string_too_large (with error bit) if increased string length is too large to store in the destination. * * @see fl_fss_basic_list_content_write_string() @@ -272,7 +270,7 @@ extern "C" { * * @return * F_none on success. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_array_too_large (with error bit) if new length is larger than max array length. * * @see fl_fss_embedded_list_object_read() diff --git a/level_1/fl_fss/data/build/settings b/level_1/fl_fss/data/build/settings index c3c91bc..806a616 100644 --- a/level_1/fl_fss/data/build/settings +++ b/level_1/fl_fss/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lf_file -lf_fss -lf_memory -lf_utf +build_libraries-individual -lf_file -lf_fss -lf_memory -lf_string -lf_utf build_sources_library private-fss.c fss_basic.c fss_basic_list.c fss_embedded_list.c fss_extended.c fss_extended_list.c build_sources_program build_sources_headers fss.h fss_basic.h fss_basic_list.h fss_embedded_list.h fss_extended.h fss_extended_list.h fss_status.h diff --git a/level_1/fl_iki/c/iki.h b/level_1/fl_iki/c/iki.h index 6eeade2..0588ae7 100644 --- a/level_1/fl_iki/c/iki.h +++ b/level_1/fl_iki/c/iki.h @@ -55,7 +55,7 @@ extern "C" { * F_none_eos on success and an IKI vocabulary name was found and end of string was reached. * F_data_not_eos on success and EOS was reached, but there were no IKI vocabularie names found. * F_data_not_stop on success and stop point was reached, but there were no IKI vocabularie names found. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if a string length is too large to store in the buffer. * diff --git a/level_1/fl_iki/data/build/settings b/level_1/fl_iki/data/build/settings index 9bf500b..d0c6e28 100644 --- a/level_1/fl_iki/data/build/settings +++ b/level_1/fl_iki/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lf_iki -lf_memory -lf_utf +build_libraries-individual -lf_iki -lf_memory -lf_string -lf_utf build_sources_library iki.c build_sources_program build_sources_headers iki.h diff --git a/level_1/fl_print/data/build/settings b/level_1/fl_print/data/build/settings index cdf5f44..7e7155d 100644 --- a/level_1/fl_print/data/build/settings +++ b/level_1/fl_print/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lf_conversion -lf_memory -lf_print -lf_utf +build_libraries-individual -lf_conversion -lf_memory -lf_print -lf_string -lf_utf build_sources_library print.c private-print.c build_sources_program build_sources_headers print.h diff --git a/level_1/fl_status/c/status.c b/level_1/fl_status/c/status.c index 101e32f..8b906a1 100644 --- a/level_1/fl_status/c/status.c +++ b/level_1/fl_status/c/status.c @@ -419,6 +419,12 @@ extern "C" { case F_maybe_not: *string = FL_status_string_maybe_not; break; + case F_memory: + *string = FL_status_string_memory; + break; + case F_memory_not: + *string = FL_status_string_memory_not; + break; case F_minor: *string = FL_status_string_minor; break; @@ -919,24 +925,6 @@ extern "C" { break; #endif // _di_F_status_buffers_ - #ifndef _di_F_status_memory_ - case F_memory: - *string = FL_status_string_memory; - break; - case F_memory_allocation: - *string = FL_status_string_memory_allocation; - break; - case F_memory_deallocation: - *string = FL_status_string_memory_deallocation; - break; - case F_memory_not: - *string = FL_status_string_memory_not; - break; - case F_memory_reallocation: - *string = FL_status_string_memory_reallocation; - break; - #endif // _di_F_status_memory_ - #ifndef _di_F_status_process_ case F_process: *string = FL_status_string_process; diff --git a/level_1/fl_status/c/status.h b/level_1/fl_status/c/status.h index cfcd87c..d2e7b85 100644 --- a/level_1/fl_status/c/status.h +++ b/level_1/fl_status/c/status.h @@ -21,6 +21,7 @@ extern "C" { #endif +// @todo create external constants for each of the strings and use those. #ifndef _di_FL_status_string_ #ifndef _di_F_status_boolean_ #define FL_status_string_false "F_false" @@ -233,6 +234,8 @@ extern "C" { #define FL_status_string_loop_not "F_loop_not" #define FL_status_string_maybe "F_maybe" #define FL_status_string_maybe_not "F_maybe_not" + #define FL_status_string_memory "F_memory" + #define FL_status_string_memory_not "F_memory_not" #define FL_status_string_minor "F_minor" #define FL_status_string_minor_not "F_minor_not" #define FL_status_string_moderate "F_moderate" @@ -384,6 +387,8 @@ extern "C" { #define FL_status_string_loop_not_length 10 #define FL_status_string_maybe_length 7 #define FL_status_string_maybe_not_length 11 + #define FL_status_string_memory_length 8 + #define FL_status_string_memory_not_length 12 #define FL_status_string_minor_length 7 #define FL_status_string_minor_not_length 11 #define FL_status_string_moderate_length 10 @@ -647,21 +652,6 @@ extern "C" { #define FL_status_string_terminated_not_nest_stop_length 26 #endif // _di_F_status_buffer_ - #ifndef _di_F_status_memory_ - #define FL_status_string_memory "F_memory" - #define FL_status_string_memory_allocation "F_memory_allocation" - #define FL_status_string_memory_deallocation "F_memory_deallocation" - #define FL_status_string_memory_not "F_memory_not" - #define FL_status_string_memory_reallocation "F_memory_reallocation" - - #define FL_status_string_memory_length 8 - #define FL_status_string_memory_allocation_length 19 - #define FL_status_string_memory_deallocation_length 21 - #define FL_status_string_memory_not_length 12 - #define FL_status_string_memory_reallocation_length 21 - - #endif // _di_F_status_memory_ - #ifndef _di_F_status_process_ #define FL_status_string_process "F_process" #define FL_status_string_process_not "F_process_not" diff --git a/level_1/fl_status/data/build/settings b/level_1/fl_status/data/build/settings index 4ce15c4..0412304 100644 --- a/level_1/fl_status/data/build/settings +++ b/level_1/fl_status/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lf_memory -lf_utf +build_libraries-individual -lf_memory -lf_string -lf_utf build_sources_library status.c build_sources_program build_sources_headers status.h diff --git a/level_1/fl_string/c/private-string.h b/level_1/fl_string/c/private-string.h index 3c8440c..60bce30 100644 --- a/level_1/fl_string/c/private-string.h +++ b/level_1/fl_string/c/private-string.h @@ -30,8 +30,7 @@ extern "C" { * @return * F_none on success. * F_data_not if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. * diff --git a/level_1/fl_string/c/string.h b/level_1/fl_string/c/string.h index 9364dbe..6950dd5 100644 --- a/level_1/fl_string/c/string.h +++ b/level_1/fl_string/c/string.h @@ -47,8 +47,7 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -71,8 +70,7 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -96,8 +94,7 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -120,8 +117,7 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -260,8 +256,7 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -280,8 +275,7 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -302,8 +296,7 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -324,8 +317,7 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -578,8 +570,7 @@ extern "C" { * * @return * F_none on success. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_string_dynamic_decrease_ @@ -600,8 +591,7 @@ extern "C" { * * @return * F_none on success. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_string_dynamic_decrease_by_ @@ -639,8 +629,7 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -667,8 +656,7 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -693,8 +681,7 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -721,8 +708,7 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -744,8 +730,7 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -769,8 +754,7 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -796,8 +780,7 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -821,8 +804,7 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -1210,8 +1192,7 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -1241,8 +1222,7 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -1270,8 +1250,7 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -1301,8 +1280,7 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -1326,8 +1304,7 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -1353,8 +1330,7 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -1380,8 +1356,7 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -1405,8 +1380,7 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -1428,8 +1402,7 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -1453,8 +1426,7 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -1478,8 +1450,7 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -1501,8 +1472,7 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -1528,8 +1498,7 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -1557,8 +1526,7 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_string_dynamic_rip_nulless_ @@ -1579,8 +1547,7 @@ extern "C" { * * @return * F_none on success. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -1602,8 +1569,7 @@ extern "C" { * * @return * F_none on success. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -1702,8 +1668,7 @@ extern "C" { * F_data_not_stop on success, but the range.start > range.stop. * F_complete_not_utf (with error bit) if character is an incomplete UTF-8 fragment. * F_complete_not_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * * Errors (with error bit) from: f_utf_is_graph(). @@ -1732,8 +1697,7 @@ extern "C" { * F_data_not_stop on success, but the range.start > range.stop. * F_complete_not_utf (with error bit) if character is an incomplete UTF-8 fragment. * F_complete_not_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * * Errors (with error bit) from: f_utf_is_graph(). @@ -1810,7 +1774,7 @@ extern "C" { * * @return * F_none on success. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if string is too large to fit into the buffer. */ @@ -1833,7 +1797,7 @@ extern "C" { * * @return * F_none on success. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if string is too large to fit into the buffer. */ @@ -1852,8 +1816,7 @@ extern "C" { * * @return * F_none on success. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_string_dynamics_decrease_ @@ -1874,8 +1837,7 @@ extern "C" { * * @return * F_none on success. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_string_dynamics_decrease_by_ @@ -1907,8 +1869,7 @@ extern "C" { * * @return * F_none on success. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_array_too_large (with error bit) if the new array length is too large. */ @@ -1930,8 +1891,7 @@ extern "C" { * * @return * F_none on success. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_array_too_large (with error bit) if the new array length is too large. */ @@ -1950,8 +1910,7 @@ extern "C" { * * @return * F_none on success. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_string_maps_decrease_ @@ -1972,8 +1931,7 @@ extern "C" { * * @return * F_none on success. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_string_maps_decrease_by_ @@ -2006,8 +1964,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if the new array length is too large. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_string_maps_increase_ @@ -2028,8 +1985,7 @@ extern "C" { * * @return * F_none on success. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_array_too_large (with error bit) if the new array length is too large. */ @@ -2056,8 +2012,7 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -2086,8 +2041,7 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -2114,8 +2068,7 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -2144,8 +2097,7 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -2168,8 +2120,7 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -2194,8 +2145,7 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -2221,8 +2171,7 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -2248,8 +2197,7 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -2274,8 +2222,7 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * * Errors (with error bit) from: f_utf_is_whitespace(). @@ -2305,8 +2252,7 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * * Errors (with error bit) from: f_utf_is_whitespace(). @@ -2384,8 +2330,7 @@ extern "C" { * F_data_not_stop if range.start > range.stop. * F_complete_not_utf (with error bit) if character is an incomplete UTF-8 fragment. * F_complete_not_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * * Errors (with error bit) from: f_utf_is_graph(). @@ -2414,8 +2359,7 @@ extern "C" { * F_data_not_stop if range.start > range.stop. * F_complete_not_utf (with error bit) if character is an incomplete UTF-8 fragment. * F_complete_not_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * * Errors (with error bit) from: f_utf_is_whitespace(). diff --git a/level_1/fl_string/data/build/settings b/level_1/fl_string/data/build/settings index 6e00230..021f4a1 100644 --- a/level_1/fl_string/data/build/settings +++ b/level_1/fl_string/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lf_memory -lf_utf +build_libraries-individual -lf_memory -lf_string -lf_utf build_sources_library string.c private-string.c build_sources_program build_sources_headers string.h diff --git a/level_1/fl_type/c/type.h b/level_1/fl_type/c/type.h index 4440a56..be9676d 100644 --- a/level_1/fl_type/c/type.h +++ b/level_1/fl_type/c/type.h @@ -47,7 +47,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_cells_increase_ @@ -65,7 +65,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_cells_increase_by_ @@ -97,7 +97,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_cellss_increase_ @@ -115,7 +115,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_cellss_increase_by_ @@ -147,7 +147,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_array_lengths_increase_ @@ -165,7 +165,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_array_lengths_increase_by_ @@ -197,7 +197,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_array_lengthss_increase_ @@ -215,7 +215,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_array_lengthss_increase_by_ @@ -247,7 +247,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_int8s_increase_ @@ -265,7 +265,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_int8s_increase_by_ @@ -297,7 +297,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_int8ss_increase_ @@ -315,7 +315,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_int8ss_increase_by_ @@ -347,7 +347,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_uint8s_increase_ @@ -365,7 +365,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_uint8s_increase_by_ @@ -397,7 +397,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_uint8ss_increase_ @@ -415,7 +415,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_uint8ss_increase_by_ @@ -447,7 +447,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_int16s_increase_ @@ -465,7 +465,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_int16s_increase_by_ @@ -497,7 +497,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_int16ss_increase_ @@ -515,7 +515,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_int16ss_increase_by_ @@ -547,7 +547,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_uint16s_increase_ @@ -565,7 +565,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_uint16s_increase_by_ @@ -597,7 +597,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_uint16ss_increase_ @@ -615,7 +615,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_uint16ss_increase_by_ @@ -647,7 +647,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_int32s_increase_ @@ -665,7 +665,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_int32s_increase_by_ @@ -697,7 +697,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_int32ss_increase_ @@ -715,7 +715,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_int32ss_increase_by_ @@ -747,7 +747,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_uint32s_increase_ @@ -765,7 +765,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_uint32s_increase_by_ @@ -797,7 +797,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_uint32ss_increase_ @@ -815,7 +815,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_uint32ss_increase_by_ @@ -847,7 +847,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_int64s_increase_ @@ -865,7 +865,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_int64s_increase_by_ @@ -897,7 +897,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_int64ss_increase_ @@ -915,7 +915,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_int64ss_increase_by_ @@ -947,7 +947,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_uint64s_increase_ @@ -965,7 +965,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_uint64s_increase_by_ @@ -997,7 +997,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_uint64ss_increase_ @@ -1015,7 +1015,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_uint64ss_increase_by_ @@ -1047,7 +1047,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_int128s_increase_ @@ -1065,7 +1065,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_int128s_increase_by_ @@ -1097,7 +1097,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_int128ss_increase_ @@ -1115,7 +1115,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_int128ss_increase_by_ @@ -1147,7 +1147,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_uint128s_increase_ @@ -1165,7 +1165,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_uint128s_increase_by_ @@ -1197,7 +1197,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_uint128ss_increase_ @@ -1215,7 +1215,7 @@ extern "C" { * @return * F_none on success. * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_type_uint128ss_increase_by_ diff --git a/level_1/fl_utf/c/private-utf.h b/level_1/fl_utf/c/private-utf.h index cfcc4a2..29f1bb5 100644 --- a/level_1/fl_utf/c/private-utf.h +++ b/level_1/fl_utf/c/private-utf.h @@ -30,8 +30,8 @@ extern "C" { * @return * F_none on success. * F_data_not if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. * @@ -59,8 +59,8 @@ extern "C" { * @return * F_none on success. * F_data_not if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. * @@ -149,8 +149,8 @@ extern "C" { * * @return * F_none on success. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. * @@ -175,8 +175,8 @@ extern "C" { * * @return * F_none on success. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. * @@ -204,8 +204,8 @@ extern "C" { * @return * F_none on success. * F_data_not on success but only whitespace found. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * * @see fl_utf_string_dynamic_rip() diff --git a/level_1/fl_utf/c/utf.h b/level_1/fl_utf/c/utf.h index bd1d417..005075e 100644 --- a/level_1/fl_utf/c/utf.h +++ b/level_1/fl_utf/c/utf.h @@ -47,8 +47,8 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -72,8 +72,8 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -97,8 +97,8 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -121,8 +121,8 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -194,8 +194,8 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -214,8 +214,8 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -236,8 +236,8 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -258,8 +258,8 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -331,8 +331,8 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -359,8 +359,8 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -385,8 +385,8 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -413,8 +413,8 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -436,8 +436,8 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -461,8 +461,8 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -488,8 +488,8 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -513,8 +513,8 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -595,8 +595,8 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -626,8 +626,8 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -655,8 +655,8 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -686,8 +686,8 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -711,8 +711,8 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -738,8 +738,8 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -765,8 +765,8 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -790,8 +790,8 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -813,8 +813,8 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -838,8 +838,8 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -863,8 +863,8 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -886,8 +886,8 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -912,8 +912,8 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -940,8 +940,8 @@ extern "C" { * F_none on success. * F_data_not_eos if source length is 0. * F_data_not_stop if range.start > range.stop. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_utf_string_dynamic_rip_nulless_ @@ -1140,7 +1140,7 @@ extern "C" { * * @return * F_none on success. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if string is too large to fit into the buffer. */ @@ -1163,7 +1163,7 @@ extern "C" { * * @return * F_none on success. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if string is too large to fit into the buffer. */ @@ -1190,8 +1190,8 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -1220,8 +1220,8 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -1248,8 +1248,8 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -1278,8 +1278,8 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -1302,8 +1302,8 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -1328,8 +1328,8 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -1355,8 +1355,8 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -1382,8 +1382,8 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ @@ -1407,8 +1407,8 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * * Errors (with error bit) from: f_utf_character_is_whitespace(). @@ -1437,8 +1437,8 @@ extern "C" { * @return * F_none on success. * F_data_not_eos if source length is 0. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * * Errors (with error bit) from: f_utf_character_is_whitespace(). @@ -1511,8 +1511,8 @@ extern "C" { * F_data_not_stop if range.start > range.stop. * F_complete_not_utf (with error bit) if character is an incomplete UTF-8 fragment. * F_complete_not_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_utf (with error bit) if a character in the string is an invalid UTF-8 character. * @@ -1542,8 +1542,8 @@ extern "C" { * F_data_not_stop if range.start > range.stop. * F_complete_not_utf (with error bit) if character is an incomplete UTF-8 fragment. * F_complete_not_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_utf (with error bit) if a character in the string is an invalid UTF-8 character. * diff --git a/level_1/fl_utf/data/build/settings b/level_1/fl_utf/data/build/settings index be9c9c6..301efa6 100644 --- a/level_1/fl_utf/data/build/settings +++ b/level_1/fl_utf/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lf_memory -lf_utf +build_libraries-individual -lf_memory -lf_string -lf_utf build_sources_library utf.c private-utf.c build_sources_program build_sources_headers utf.h diff --git a/level_1/fl_utf_file/data/build/settings b/level_1/fl_utf_file/data/build/settings index cc62e2a..a5fd073 100644 --- a/level_1/fl_utf_file/data/build/settings +++ b/level_1/fl_utf_file/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lf_file -lf_memory -lf_utf +build_libraries-individual -lf_file -lf_memory -lf_string -lf_utf build_sources_library utf_file.c private-utf_file.c build_sources_program build_sources_headers utf_file.h diff --git a/level_2/fll_control_group/data/build/settings b/level_2/fll_control_group/data/build/settings index 0a6be9f..640ab4a 100644 --- a/level_2/fll_control_group/data/build/settings +++ b/level_2/fll_control_group/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lfl_control_group -lfl_directory -lf_directory -lf_file -lf_memory -lf_path -lf_utf +build_libraries-individual -lfl_control_group -lfl_directory -lf_control_group -lf_directory -lf_file -lf_memory -lf_path -lf_string -lf_utf build_sources_library control_group.c build_sources_program build_sources_headers control_group.h diff --git a/level_2/fll_environment/data/build/settings b/level_2/fll_environment/data/build/settings index 5d31bdb..e6a1ae6 100644 --- a/level_2/fll_environment/data/build/settings +++ b/level_2/fll_environment/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lfl_string -lf_environment -lf_memory -lf_utf +build_libraries-individual -lfl_string -lf_environment -lf_memory -lf_string -lf_utf build_sources_library environment.c build_sources_program build_sources_headers environment.h diff --git a/level_2/fll_error/c/error-common.c b/level_2/fll_error/c/error-common.c new file mode 100644 index 0000000..e4238ea --- /dev/null +++ b/level_2/fll_error/c/error-common.c @@ -0,0 +1,22 @@ +#include "error.h" +#include "private-error.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_fll_error_file_type_ + const f_string_t fll_error_file_type_string_directory_s = fll_error_file_type_string_directory; + const f_string_t fll_error_file_type_string_file_s = fll_error_file_type_string_file; + const f_string_t fll_error_file_type_string_pipe_s = fll_error_file_type_string_pipe; +#endif // _di_fll_error_file_type_ + +#ifndef _di_fll_error_print_t_ + const f_string_t fll_error_print_debug_s = fll_error_print_debug; + const f_string_t fll_error_print_error_s = fll_error_print_error; + const f_string_t fll_error_print_warning_s = fll_error_print_warning; +#endif // _di_fll_error_print_t_ + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_2/fll_error/c/error-common.h b/level_2/fll_error/c/error-common.h index 6b15caa..08077bd 100644 --- a/level_2/fll_error/c/error-common.h +++ b/level_2/fll_error/c/error-common.h @@ -33,6 +33,10 @@ extern "C" { #define fll_error_file_type_length_directory 9 #define fll_error_file_type_length_file 4 #define fll_error_file_type_length_pipe 4 + + extern const f_string_t fll_error_file_type_string_directory_s; + extern const f_string_t fll_error_file_type_string_file_s; + extern const f_string_t fll_error_file_type_string_pipe_s; #endif // _di_fll_error_file_type_ /** @@ -53,6 +57,10 @@ extern "C" { #define fll_error_print_error_length 7 #define fll_error_print_warning_length 9 + extern const f_string_t fll_error_print_debug_s; + extern const f_string_t fll_error_print_error_s; + extern const f_string_t fll_error_print_warning_s; + typedef struct { f_file_t to; uint8_t verbosity; @@ -66,14 +74,14 @@ extern "C" { #define fll_error_print_t_initialize { \ f_macro_file_t_initialize2(f_type_error, f_type_descriptor_error, f_file_flag_write_only), \ f_console_verbosity_normal, \ - fll_error_print_error, \ + fll_error_print_error_s, \ f_color_set_t_initialize, \ f_color_set_t_initialize, \ } #define fll_macro_error_print_t_initialize(to, verbosity, prefix, context, notable) { to, verbosity, prefix, context, notable } - #define fll_macro_error_print_t_initialize_debug() fll_macro_error_print_t_initialize(f_macro_file_t_initialize2(f_type_debug, f_type_descriptor_debug, f_file_flag_write_only), f_console_verbosity_normal, fll_error_print_debug, f_color_set_t_initialize, f_color_set_t_initialize) - #define fll_macro_error_print_t_initialize_warning() fll_macro_error_print_t_initialize(f_macro_file_t_initialize2(f_type_warning, f_type_descriptor_warning, f_file_flag_write_only), f_console_verbosity_normal, fll_error_print_warning, f_color_set_t_initialize, f_color_set_t_initialize) + #define fll_macro_error_print_t_initialize_debug() fll_macro_error_print_t_initialize(f_macro_file_t_initialize2(f_type_debug, f_type_descriptor_debug, f_file_flag_write_only), f_console_verbosity_normal, fll_error_print_debug_s, f_color_set_t_initialize, f_color_set_t_initialize) + #define fll_macro_error_print_t_initialize_warning() fll_macro_error_print_t_initialize(f_macro_file_t_initialize2(f_type_warning, f_type_descriptor_warning, f_file_flag_write_only), f_console_verbosity_normal, fll_error_print_warning_s, f_color_set_t_initialize, f_color_set_t_initialize) #endif // _di_fll_error_print_t_ #ifdef __cplusplus diff --git a/level_2/fll_error/c/private-error.c b/level_2/fll_error/c/private-error.c index f5bd390..bbd4fb9 100644 --- a/level_2/fll_error/c/private-error.c +++ b/level_2/fll_error/c/private-error.c @@ -8,10 +8,23 @@ extern "C" { #if !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_) || !defined(_di_fll_error_number_print_) f_status_t private_fll_error_print(const fll_error_print_t error, const f_status_t status, const f_string_t function, const bool fallback) { + if (status == F_access_denied) { + if (error.verbosity != f_console_verbosity_quiet) { + fprintf(error.to.stream, "%c", f_string_eol_s[0]); + fprintf(error.to.stream, "%s%sAccess denied", error.context.before->string, error.prefix); + + private_fll_error_print_function(error, function); + + fprintf(error.to.stream, ".%s%c", error.context.after->string, f_string_eol_s[0]); + } + + return F_false; + } + if (status == F_array_too_large) { if (error.verbosity != f_console_verbosity_quiet) { fprintf(error.to.stream, "%c", f_string_eol_s[0]); - fprintf(error.to.stream, "%s%sMaximum array length reached while processing ", error.context.before->string, error.prefix); + fprintf(error.to.stream, "%s%sMaximum array length reached", error.context.before->string, error.prefix); private_fll_error_print_function(error, function); @@ -24,7 +37,7 @@ extern "C" { if (status == F_buffer_too_large) { if (error.verbosity != f_console_verbosity_quiet) { fprintf(error.to.stream, "%c", f_string_eol_s[0]); - fprintf(error.to.stream, "%s%sMaximum buffer length reached while processing ", error.context.before->string, error.prefix); + fprintf(error.to.stream, "%s%sMaximum buffer length reached", error.context.before->string, error.prefix); private_fll_error_print_function(error, function); @@ -34,10 +47,10 @@ extern "C" { return F_false; } - if (status == F_memory_allocation || status == F_memory_reallocation || status == F_memory_not) { + if (status == F_memory_not) { if (error.verbosity != f_console_verbosity_quiet) { fprintf(error.to.stream, "%c", f_string_eol_s[0]); - fprintf(error.to.stream, "%s%sUnable to allocate memory in function ", error.context.before->string, error.prefix); + fprintf(error.to.stream, "%s%sUnable to allocate memory", error.context.before->string, error.prefix); private_fll_error_print_function(error, function); @@ -63,7 +76,7 @@ extern "C" { if (status == F_string_too_large) { if (error.verbosity != f_console_verbosity_quiet) { fprintf(error.to.stream, "%c", f_string_eol_s[0]); - fprintf(error.to.stream, "%s%sMaximum string length reached while processing ", error.context.before->string, error.prefix); + fprintf(error.to.stream, "%s%sMaximum string length reached", error.context.before->string, error.prefix); private_fll_error_print_function(error, function); @@ -76,7 +89,7 @@ extern "C" { if (status == F_utf) { if (error.verbosity != f_console_verbosity_quiet) { fprintf(error.to.stream, "%c", f_string_eol_s[0]); - fprintf(error.to.stream, "%s%sInvalid UTF-8 character while calling ", error.context.before->string, error.prefix); + fprintf(error.to.stream, "%s%sInvalid UTF-8 character", error.context.before->string, error.prefix); private_fll_error_print_function(error, function); @@ -89,7 +102,7 @@ extern "C" { if (status == F_complete_not_utf) { if (error.verbosity != f_console_verbosity_quiet) { fprintf(error.to.stream, "%c", f_string_eol_s[0]); - fprintf(error.to.stream, "%s%sInvalid (incomplete) UTF-8 character while calling ", error.context.before->string, error.prefix); + fprintf(error.to.stream, "%s%sInvalid (incomplete) UTF-8 character", error.context.before->string, error.prefix); private_fll_error_print_function(error, function); diff --git a/level_2/fll_error/data/build/settings b/level_2/fll_error/data/build/settings index eedc8c7..9a6e816 100644 --- a/level_2/fll_error/data/build/settings +++ b/level_2/fll_error/data/build/settings @@ -19,8 +19,8 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lfl_string -lf_console -lf_file -lf_memory -lf_print -lf_utf -build_sources_library error.c private-error.c +build_libraries-individual -lfl_string -lf_color -lf_console -lf_file -lf_memory -lf_print -lf_string -lf_utf +build_sources_library error.c error-common.c private-error.c build_sources_program build_sources_headers error.h error-common.h build_sources_script diff --git a/level_2/fll_execute/c/execute.c b/level_2/fll_execute/c/execute.c index 03c3cac..fa70c70 100644 --- a/level_2/fll_execute/c/execute.c +++ b/level_2/fll_execute/c/execute.c @@ -140,7 +140,7 @@ extern "C" { f_string_t fixed_arguments[arguments.used + 2]; const f_string_t last_slash = strrchr(program ? program : arguments.array[0].string, f_path_separator_s[0]); - const f_string_length_t name_size = last_slash ? strnlen(last_slash, f_path_max) : strnlen(program ? program : arguments.array[0].string, f_path_max); + const f_string_length_t name_size = last_slash ? strnlen(last_slash, f_path_length_max) : strnlen(program ? program : arguments.array[0].string, f_path_length_max); char program_name[name_size + 1]; @@ -178,7 +178,7 @@ extern "C" { f_string_t fixed_arguments[arguments.used + 2]; const f_string_t last_slash = strrchr(program ? program : arguments.array[0].string, f_path_separator_s[0]); - const f_string_length_t name_size = last_slash ? strnlen(last_slash, f_path_max) : strnlen(program ? program : arguments.array[0].string, f_path_max); + const f_string_length_t name_size = last_slash ? strnlen(last_slash, f_path_length_max) : strnlen(program ? program : arguments.array[0].string, f_path_length_max); char program_name[name_size + 1]; diff --git a/level_2/fll_execute/data/build/settings b/level_2/fll_execute/data/build/settings index 1620208..f82cca6 100644 --- a/level_2/fll_execute/data/build/settings +++ b/level_2/fll_execute/data/build/settings @@ -19,8 +19,8 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -lcap -build_libraries-individual -lfl_control_group -lfl_environment -lfl_string -lf_account -lf_capability -lf_environment -lf_file -lf_limit -lf_memory -lf_path -lf_signal -lf_thread -lf_utf -build_libraries-individual_threadless -lfl_control_group -lfl_environment -lfl_string -lf_account -lf_capability -lf_environment -lf_file -lf_limit -lf_memory -lf_path -lf_signal -lf_utf +build_libraries-individual -lfl_control_group -lfl_environment -lfl_string -lf_account -lf_capability -lf_control_group -lf_environment -lf_file -lf_limit -lf_memory -lf_path -lf_signal -lf_string -lf_thread -lf_utf +build_libraries-individual_threadless -lfl_control_group -lfl_environment -lfl_string -lf_account -lf_capability -lf_control_group -lf_environment -lf_file -lf_limit -lf_memory -lf_path -lf_signal -lf_string -lf_utf build_sources_library execute.c private-execute.c build_sources_program build_sources_headers execute.h diff --git a/level_2/fll_file/c/private-file.c b/level_2/fll_file/c/private-file.c index e8ac1a4..dd95457 100644 --- a/level_2/fll_file/c/private-file.c +++ b/level_2/fll_file/c/private-file.c @@ -27,7 +27,7 @@ extern "C" { status = F_none; - const f_string_length_t path_length = strnlen(path, f_path_max); + const f_string_length_t path_length = strnlen(path, f_path_length_max); { f_string_dynamics_t * const list[] = { @@ -124,7 +124,7 @@ extern "C" { status = F_none; - const f_string_length_t path_length = strnlen(path, f_path_max); + const f_string_length_t path_length = strnlen(path, f_path_length_max); { f_string_dynamics_t * const list[] = { diff --git a/level_2/fll_file/data/build/settings b/level_2/fll_file/data/build/settings index ea40752..1dc66c8 100644 --- a/level_2/fll_file/data/build/settings +++ b/level_2/fll_file/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lfl_color -lfl_directory -lf_directory -lf_file -lf_memory -lf_path -lf_print -lf_utf +build_libraries-individual -lfl_color -lfl_directory -lf_color -lf_directory -lf_file -lf_memory -lf_path -lf_print -lf_string -lf_utf build_sources_library file.c private-file.c build_sources_program build_sources_headers file.h diff --git a/level_2/fll_fss/c/fss.h b/level_2/fll_fss/c/fss.h index 1b3f4b2..7a3f77c 100644 --- a/level_2/fll_fss/c/fss.h +++ b/level_2/fll_fss/c/fss.h @@ -62,7 +62,7 @@ extern "C" { * F_none on success. * FL_fss_header_not if no header is found. * FL_fss_accepted_invalid (with warning bit) if header is technically invalid but can be identified. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * FL_fss_header_not (with error bit) if the an error occurred prior to identifying a valid header. * diff --git a/level_2/fll_fss/c/fss_basic.h b/level_2/fll_fss/c/fss_basic.h index 5e5d660..c0da80e 100644 --- a/level_2/fll_fss/c/fss_basic.h +++ b/level_2/fll_fss/c/fss_basic.h @@ -58,7 +58,7 @@ extern "C" { * F_data_not_eos no data to write due start location being greater than or equal to buffer size. * F_data_not_stop no data to write due start location being greater than stop location. * F_complete_not_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_number_overflow (with error bit) if the maximimum buffer size is reached. * F_parameter (with error bit) if a parameter is invalid. * F_utf (with error bit) is returned on failure to read/process a UTF-8 character. @@ -90,7 +90,7 @@ extern "C" { * F_data_not_eos no data to write due start location being greater than or equal to buffer size. * F_data_not_stop no data to write due start location being greater than stop location. * F_complete_not_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_utf (with error bit) is returned on failure to read/process a UTF-8 character. * diff --git a/level_2/fll_fss/c/fss_basic_list.h b/level_2/fll_fss/c/fss_basic_list.h index fa63b1c..ab0ff8b 100644 --- a/level_2/fll_fss/c/fss_basic_list.h +++ b/level_2/fll_fss/c/fss_basic_list.h @@ -57,7 +57,7 @@ extern "C" { * F_data_not_eos no data to write due start location being greater than or equal to buffer size. * F_data_not_stop no data to write due start location being greater than stop location. * F_complete_not_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_number_overflow (with error bit) if the maximimum buffer size is reached. * F_parameter (with error bit) if a parameter is invalid. * F_utf (with error bit) is returned on failure to read/process a UTF-8 character. @@ -89,7 +89,7 @@ extern "C" { * F_data_not_eos no data to write due start location being greater than or equal to buffer size. * F_data_not_stop no data to write due start location being greater than stop location. * F_complete_not_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_utf (with error bit) is returned on failure to read/process a UTF-8 character. * diff --git a/level_2/fll_fss/c/fss_embedded_list.h b/level_2/fll_fss/c/fss_embedded_list.h index b12d545..5ed6a9a 100644 --- a/level_2/fll_fss/c/fss_embedded_list.h +++ b/level_2/fll_fss/c/fss_embedded_list.h @@ -56,7 +56,7 @@ extern "C" { * F_complete_not_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete. * F_complete_not_utf_eos (with error bit) if the end of buffer is reached before the complete UTF-8 character can be processed. * F_complete_not_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_number_overflow (with error bit) if the maximimum buffer size is reached. * F_parameter (with error bit) if a parameter is invalid. * F_terminated_not_eos (with error bit) if end of buffer is reached before a closing bracket is found (object was found). @@ -98,7 +98,7 @@ extern "C" { * F_data_not_eos no data to write due start location being greater than or equal to buffer size. * F_data_not_stop no data to write due start location being greater than stop location. * F_complete_not_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_utf (with error bit) is returned on failure to read/process a UTF-8 character. * diff --git a/level_2/fll_fss/c/fss_extended.h b/level_2/fll_fss/c/fss_extended.h index 50c9e40..925f2df 100644 --- a/level_2/fll_fss/c/fss_extended.h +++ b/level_2/fll_fss/c/fss_extended.h @@ -60,7 +60,7 @@ extern "C" { * F_data_not_eol if there is no data to write and EOL was reached (@todo: review related code and detemine what this is doing). * F_complete_not_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete. * F_utf (with error bit) is returned on failure to read/process a UTF-8 character. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_number_overflow (with error bit) if the maximimum buffer size is reached. * @@ -91,7 +91,7 @@ extern "C" { * F_data_not_eos no data to write due start location being greater than or equal to buffer size. * F_data_not_stop no data to write due start location being greater than stop location. * F_complete_not_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_utf (with error bit) is returned on failure to read/process a UTF-8 character. * diff --git a/level_2/fll_fss/c/fss_extended_list.h b/level_2/fll_fss/c/fss_extended_list.h index f2a6c22..29f1759 100644 --- a/level_2/fll_fss/c/fss_extended_list.h +++ b/level_2/fll_fss/c/fss_extended_list.h @@ -60,7 +60,7 @@ extern "C" { * F_complete_not_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete. * F_complete_not_utf_eos (with error bit) if the end of buffer is reached before the complete UTF-8 character can be processed. * F_complete_not_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_number_overflow (with error bit) if the maximimum buffer size is reached. * F_parameter (with error bit) if a parameter is invalid. * F_terminated_not_eos (with error bit) if end of buffer is reached before a closing bracket is found (object was found). @@ -102,7 +102,7 @@ extern "C" { * F_data_not_eos no data to write due start location being greater than or equal to buffer size. * F_data_not_stop no data to write due start location being greater than stop location. * F_complete_not_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete. - * F_memory_reallocation (with error bit) on reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_utf (with error bit) is returned on failure to read/process a UTF-8 character. * diff --git a/level_2/fll_fss/data/build/settings b/level_2/fll_fss/data/build/settings index 56c2ffa..4dc367c 100644 --- a/level_2/fll_fss/data/build/settings +++ b/level_2/fll_fss/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lfl_conversion -lfl_fss -lfl_status -lfl_string -lf_conversion -lf_file -lf_fss -lf_memory -lf_utf +build_libraries-individual -lfl_conversion -lfl_fss -lfl_status -lfl_string -lf_conversion -lf_file -lf_fss -lf_memory -lf_string -lf_utf build_sources_library fss.c private-fss.c fss_basic.c fss_basic_list.c fss_embedded_list.c fss_extended.c fss_extended_list.c fss_status.c build_sources_program build_sources_headers fss.h fss_basic.h fss_basic_list.h fss_embedded_list.h fss_extended.h fss_extended_list.h fss_status.h diff --git a/level_2/fll_iki/data/build/settings b/level_2/fll_iki/data/build/settings index e80491d..e546cb2 100644 --- a/level_2/fll_iki/data/build/settings +++ b/level_2/fll_iki/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lfl_iki -lfl_string -lf_iki -lf_memory -lf_utf +build_libraries-individual -lfl_iki -lfl_string -lf_iki -lf_memory -lf_string -lf_utf build_sources_library iki.c private-iki.c build_sources_program build_sources_headers iki.h diff --git a/level_2/fll_path/c/path.c b/level_2/fll_path/c/path.c index 2199f60..0b7d37c 100644 --- a/level_2/fll_path/c/path.c +++ b/level_2/fll_path/c/path.c @@ -13,7 +13,7 @@ extern "C" { f_status_t status = F_none; f_string_length_t at = 0; - uint8_t previous_1 = '/'; + uint8_t previous_1 = f_path_separator_s[0]; uint8_t previous_2 = 0; f_string_length_t size_chunk = 0; @@ -21,7 +21,7 @@ extern "C" { canonical->used = 0; - if (path[0] == '/') { + if (path[0] == f_path_separator_s[0]) { at = 1; } else { @@ -39,14 +39,14 @@ extern "C" { for (; path[at]; at++) { - if (!size_chunk && path[at] == '.') { - if (!previous_1 || previous_1 == '/') { - previous_1 = '.'; + if (!size_chunk && path[at] == f_path_separator_current_s[0]) { + if (!previous_1 || previous_1 == f_path_separator_s[0]) { + previous_1 = f_path_separator_current_s[0]; previous_2 = 0; continue; } - if (previous_1 == '.') { + if (previous_1 == f_path_separator_current_s[0]) { if (previous_2) { previous_1 = 0; previous_2 = 0; @@ -54,22 +54,22 @@ extern "C" { position = at - 2; } else { - previous_2 = '.'; + previous_2 = f_path_separator_current_s[0]; } } } - else if (path[at] == '/') { - if (previous_1 == '/') { + else if (path[at] == f_path_separator_s[0]) { + if (previous_1 == f_path_separator_s[0]) { size_chunk = 0; position = 0; continue; } - if (previous_1 == '.') { - if (previous_2 == '.') { + if (previous_1 == f_path_separator_current_s[0]) { + if (previous_2 == f_path_separator_current_s[0]) { if (canonical->used > 1) { for (canonical->used--; canonical->used > 0; canonical->used--) { - if (canonical->string[canonical->used - 1] == '/') break; + if (canonical->string[canonical->used - 1] == f_path_separator_s[0]) break; } // for } } @@ -83,7 +83,7 @@ extern "C" { } } - previous_1 = '/'; + previous_1 = f_path_separator_s[0]; previous_2 = 0; size_chunk = 0; position = 0; @@ -96,7 +96,7 @@ extern "C" { position -= 2; size_chunk = 2; } - else if (previous_1 && previous_1 != '/') { + else if (previous_1 && previous_1 != f_path_separator_s[0]) { position--; size_chunk = 1; } @@ -111,14 +111,14 @@ extern "C" { } } // for - if (previous_2 == '.') { + if (previous_2 == f_path_separator_current_s[0]) { if (canonical->used > 1) { for (canonical->used--; canonical->used > 0; canonical->used--) { - if (canonical->string[canonical->used - 1] == '/') break; + if (canonical->string[canonical->used - 1] == f_path_separator_s[0]) break; } // for } } - else if (!(previous_1 == '.' || previous_1 == '/')) { + else if (!(previous_1 == f_path_separator_current_s[0] || previous_1 == f_path_separator_s[0])) { if (size_chunk) { status = fl_string_append(path + position, size_chunk, canonical); if (F_status_is_error(status)) return status; @@ -126,7 +126,7 @@ extern "C" { } // assure there is no trailing forward slash, unless it is the first slash. - if (canonical->used > 1 && canonical->string[canonical->used - 1] == '/') { + if (canonical->used > 1 && canonical->string[canonical->used - 1] == f_path_separator_s[0]) { canonical->used--; } diff --git a/level_2/fll_path/data/build/settings b/level_2/fll_path/data/build/settings index ed9362c..d2295b9 100644 --- a/level_2/fll_path/data/build/settings +++ b/level_2/fll_path/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lfl_string -lf_memory -lf_path -lf_utf +build_libraries-individual -lfl_string -lf_memory -lf_path -lf_string -lf_utf build_sources_library path.c build_sources_program build_sources_headers path.h diff --git a/level_2/fll_program/c/program.c b/level_2/fll_program/c/program.c index 8363a31..d3ddfae 100644 --- a/level_2/fll_program/c/program.c +++ b/level_2/fll_program/c/program.c @@ -158,7 +158,7 @@ extern "C" { status = F_none; } else { - f_macro_memory_structure_macro_increment(status, (*destination), 1, f_console_default_allocation_step, f_macro_string_dynamics_t_resize, F_array_too_large); + f_macro_memory_structure_macro_increment(status, (*destination), 1, f_memory_default_allocation_step, f_macro_string_dynamics_t_resize, F_array_too_large); if (F_status_is_error(status)) break; destination->array[destination->used] = ripped; @@ -232,7 +232,7 @@ extern "C" { } else { if (destination->used == destination->size) { - f_macro_string_dynamics_t_resize(status, (*destination), destination->size + f_console_default_allocation_step); + f_macro_string_dynamics_t_resize(status, (*destination), destination->size + f_memory_default_allocation_step); if (F_status_is_error(status)) return status; } diff --git a/level_2/fll_program/c/program.h b/level_2/fll_program/c/program.h index b266736..3a1ced7 100644 --- a/level_2/fll_program/c/program.h +++ b/level_2/fll_program/c/program.h @@ -188,7 +188,7 @@ extern "C" { * @return * F_none on success. * F_data_not if "values" parameters were expected but not found. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * * Errors (with error bit) from: f_console_parameter_prioritize_left(). @@ -223,8 +223,8 @@ extern "C" { * F_none on success. * F_data_not if nothing to rip, no allocations or reallocations are performed. * F_array_too_large (with error bit) if a buffer would exceed max length. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * * Errors (with error bit) from: fl_string_append(). @@ -252,8 +252,8 @@ extern "C" { * @return * F_none on success. * F_data_not if nothing to rip, no allocations or reallocations are performed. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. * @@ -280,8 +280,8 @@ extern "C" { * @return * F_none on success. * F_data_not if nothing to rip, no allocations or reallocations are performed. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * * Errors (with error bit) from: fl_string_rip(). @@ -311,8 +311,8 @@ extern "C" { * @return * F_none on success. * F_data_not if nothing to rip, no allocations or reallocations are performed. - * F_memory_allocation (with error bit) on memory allocation error. - * F_memory_reallocation (with error bit) on memory reallocation error. + * F_memory_out (with error bit) on out of memory. + * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. * diff --git a/level_2/fll_program/data/build/settings b/level_2/fll_program/data/build/settings index cdbb4e5..a202e24 100644 --- a/level_2/fll_program/data/build/settings +++ b/level_2/fll_program/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lfl_color -lfl_string -lf_console -lf_file -lf_memory -lf_print -lf_utf +build_libraries-individual -lfl_color -lfl_string -lf_color -lf_console -lf_file -lf_memory -lf_print -lf_string -lf_utf build_sources_library program.c build_sources_program build_sources_headers program.h diff --git a/level_2/fll_status/c/status.c b/level_2/fll_status/c/status.c index 2b02830..bc6e381 100644 --- a/level_2/fll_status/c/status.c +++ b/level_2/fll_status/c/status.c @@ -711,6 +711,16 @@ extern "C" { return F_none; } + if (fl_string_compare(string, FL_status_string_memory, length, FL_status_string_memory_length) == F_equal_to) { + *code = F_memory; + return F_none; + } + + if (fl_string_compare(string, FL_status_string_memory_not, length, FL_status_string_memory_not_length) == F_equal_to) { + *code = F_memory_not; + return F_none; + } + if (fl_string_compare(string, FL_status_string_minor, length, FL_status_string_minor_length) == F_equal_to) { *code = F_minor; return F_none; @@ -1522,33 +1532,6 @@ extern "C" { } #endif // _di_F_status_buffer_ - #ifndef _di_F_status_memory_ - if (fl_string_compare(string, FL_status_string_memory, length, FL_status_string_memory_length) == F_equal_to) { - *code = F_memory; - return F_none; - } - - if (fl_string_compare(string, FL_status_string_memory_allocation, length, FL_status_string_memory_allocation_length) == F_equal_to) { - *code = F_memory_allocation; - return F_none; - } - - if (fl_string_compare(string, FL_status_string_memory_deallocation, length, FL_status_string_memory_deallocation_length) == F_equal_to) { - *code = F_memory_deallocation; - return F_none; - } - - if (fl_string_compare(string, FL_status_string_memory_not, length, FL_status_string_memory_not_length) == F_equal_to) { - *code = F_memory_not; - return F_none; - } - - if (fl_string_compare(string, FL_status_string_memory_reallocation, length, FL_status_string_memory_reallocation_length) == F_equal_to) { - *code = F_memory_reallocation; - return F_none; - } - #endif // _di_F_status_memory_ - #ifndef _di_F_status_process_ if (fl_string_compare(string, FL_status_string_process, length, FL_status_string_process_length) == F_equal_to) { *code = F_process; diff --git a/level_2/fll_status/data/build/settings b/level_2/fll_status/data/build/settings index f84b695..ced564e 100644 --- a/level_2/fll_status/data/build/settings +++ b/level_2/fll_status/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lfl_status -lfl_string -lf_conversion -lf_memory -lf_utf +build_libraries-individual -lfl_status -lfl_string -lf_conversion -lf_memory -lf_string -lf_utf build_sources_library status.c build_sources_program build_sources_headers status.h diff --git a/level_3/byte_dump/c/byte_dump.c b/level_3/byte_dump/c/byte_dump.c index 8b5659a..65c0944 100644 --- a/level_3/byte_dump/c/byte_dump.c +++ b/level_3/byte_dump/c/byte_dump.c @@ -10,53 +10,53 @@ extern "C" { fll_program_print_help_header(output, context, byte_dump_name_long, byte_dump_version); - fll_program_print_help_option(output, context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message."); - fll_program_print_help_option(output, context, f_console_standard_short_dark, f_console_standard_long_dark, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on dark backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_light, f_console_standard_long_light, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on light backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_no_color, f_console_standard_long_no_color, f_console_symbol_short_disable, f_console_symbol_long_disable, "Do not output in color."); - fll_program_print_help_option(output, context, f_console_standard_short_quiet, f_console_standard_long_quiet, f_console_symbol_short_disable, f_console_symbol_long_disable, " Decrease verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_normal, f_console_standard_long_normal, f_console_symbol_short_disable, f_console_symbol_long_disable, " Set verbosity to normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_verbose, f_console_standard_long_verbose, f_console_symbol_short_disable, f_console_symbol_long_disable, " Increase verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number."); + fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); + fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color."); + fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number."); fprintf(output.stream, "%c", f_string_eol_s[0]); - fll_program_print_help_option(output, context, byte_dump_short_binary, byte_dump_long_binary, f_console_symbol_short_enable, f_console_symbol_long_enable, " Display binary representation."); - fll_program_print_help_option(output, context, byte_dump_short_decimal, byte_dump_long_decimal, f_console_symbol_short_enable, f_console_symbol_long_enable, " Display decimal representation."); - fll_program_print_help_option(output, context, byte_dump_short_duodecimal, byte_dump_long_duodecimal, f_console_symbol_short_enable, f_console_symbol_long_enable, " Display duodecimal representation."); - fll_program_print_help_option(output, context, byte_dump_short_hexidecimal, byte_dump_long_hexidecimal, f_console_symbol_short_enable, f_console_symbol_long_enable, "Display hexadecimal representation."); - fll_program_print_help_option(output, context, byte_dump_short_octal, byte_dump_long_octal, f_console_symbol_short_enable, f_console_symbol_long_enable, " Display octal representation."); + fll_program_print_help_option(output, context, byte_dump_short_binary, byte_dump_long_binary, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Display binary representation."); + fll_program_print_help_option(output, context, byte_dump_short_decimal, byte_dump_long_decimal, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Display decimal representation."); + fll_program_print_help_option(output, context, byte_dump_short_duodecimal, byte_dump_long_duodecimal, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Display duodecimal representation."); + fll_program_print_help_option(output, context, byte_dump_short_hexidecimal, byte_dump_long_hexidecimal, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Display hexadecimal representation."); + fll_program_print_help_option(output, context, byte_dump_short_octal, byte_dump_long_octal, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Display octal representation."); fprintf(output.stream, "%c", f_string_eol_s[0]); - fll_program_print_help_option(output, context, byte_dump_short_first, byte_dump_long_first, f_console_symbol_short_enable, f_console_symbol_long_enable, " Start reading at this byte offset."); - fll_program_print_help_option(output, context, byte_dump_short_last, byte_dump_long_last, f_console_symbol_short_enable, f_console_symbol_long_enable, " Stop reading at this (inclusive) byte offset."); - fll_program_print_help_option(output, context, byte_dump_short_width, byte_dump_long_width, f_console_symbol_short_enable, f_console_symbol_long_enable, " Set number of columns of Bytes to display."); + fll_program_print_help_option(output, context, byte_dump_short_first, byte_dump_long_first, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Start reading at this byte offset."); + fll_program_print_help_option(output, context, byte_dump_short_last, byte_dump_long_last, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Stop reading at this (inclusive) byte offset."); + fll_program_print_help_option(output, context, byte_dump_short_width, byte_dump_long_width, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Set number of columns of Bytes to display."); fprintf(output.stream, "%c", f_string_eol_s[0]); - fll_program_print_help_option(output, context, byte_dump_short_text, byte_dump_long_text, f_console_symbol_short_enable, f_console_symbol_long_enable, " Include a column of text when displaying the bytes."); - fll_program_print_help_option(output, context, byte_dump_short_placeholder, byte_dump_long_placeholder, f_console_symbol_short_enable, f_console_symbol_long_enable, "Use a placeholder character instead of a space for placeholders."); + fll_program_print_help_option(output, context, byte_dump_short_text, byte_dump_long_text, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include a column of text when displaying the bytes."); + fll_program_print_help_option(output, context, byte_dump_short_placeholder, byte_dump_long_placeholder, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Use a placeholder character instead of a space for placeholders."); fprintf(output.stream, "%c%c", f_string_eol_s[0], f_string_eol_s[0]); fl_color_print(output.stream, context.set.important, " Special Options: "); - fll_program_print_help_option_long(output, context, byte_dump_long_normal, f_console_symbol_long_enable, " Display UTF-8 symbols for ASCII control codes."); - fll_program_print_help_option_long(output, context, byte_dump_long_simple, f_console_symbol_long_enable, " Display spaces for ASCII control codes."); - fll_program_print_help_option_long(output, context, byte_dump_long_classic, f_console_symbol_long_enable, "Display periods for ASCII control codes."); + fll_program_print_help_option_long(output, context, byte_dump_long_normal, f_console_symbol_long_enable_s, " Display UTF-8 symbols for ASCII control codes."); + fll_program_print_help_option_long(output, context, byte_dump_long_simple, f_console_symbol_long_enable_s, " Display spaces for ASCII control codes."); + fll_program_print_help_option_long(output, context, byte_dump_long_classic, f_console_symbol_long_enable_s, "Display periods for ASCII control codes."); fll_program_print_help_usage(output, context, byte_dump_name, "filename(s)"); fprintf(output.stream, " When using the "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, byte_dump_long_text); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, byte_dump_long_text); fprintf(output.stream, " option, some UTF-8 characters may be replaced by your instance and cause display alignment issues."); fprintf(output.stream, "%c%c", f_string_eol_s[0], f_string_eol_s[0]); fprintf(output.stream, " Special UTF-8 characters and non-spacing UTF-8 characters may be replaced with a space (or a placeholder when the "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, byte_dump_long_placeholder); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, byte_dump_long_placeholder); fprintf(output.stream, " option is used)."); fprintf(output.stream, "%c%c", f_string_eol_s[0], f_string_eol_s[0]); @@ -66,7 +66,7 @@ extern "C" { fprintf(output.stream, "%c%c", f_string_eol_s[0], f_string_eol_s[0]); fprintf(output.stream, " When "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, byte_dump_long_last); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, byte_dump_long_last); fprintf(output.stream, " is used, any UTF-8 sequences will still be printed in full should any part is found within the requested range."); fprintf(output.stream, "%c%c", f_string_eol_s[0], f_string_eol_s[0]); @@ -222,7 +222,7 @@ extern "C" { if (data->remaining.used > 0 || data->process_pipe) { if (data->parameters[byte_dump_parameter_width].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, byte_dump_long_width); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, byte_dump_long_width); fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol_s[0]); byte_dump_delete_data(data); @@ -238,7 +238,7 @@ extern "C" { if (F_status_is_error(status) || number < 1 || number >= 0xfb) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, byte_dump_long_width); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, byte_dump_long_width); fl_color_print(data->error.to.stream, data->context.set.error, "' value can only be a number between "); fl_color_print(data->error.to.stream, data->context.set.notable, "0"); fl_color_print(data->error.to.stream, data->context.set.error, " and "); @@ -254,7 +254,7 @@ extern "C" { if (data->parameters[byte_dump_parameter_first].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, byte_dump_long_first); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, byte_dump_long_first); fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol_s[0]); byte_dump_delete_data(data); @@ -270,7 +270,7 @@ extern "C" { if (F_status_is_error(status) || number > f_number_t_size_unsigned) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, byte_dump_long_first); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, byte_dump_long_first); fl_color_print(data->error.to.stream, data->context.set.error, "' value can only be a number (inclusively) between "); fl_color_print(data->error.to.stream, data->context.set.notable, "0"); fl_color_print(data->error.to.stream, data->context.set.error, " and "); @@ -286,7 +286,7 @@ extern "C" { if (data->parameters[byte_dump_parameter_last].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, byte_dump_long_last); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, byte_dump_long_last); fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol_s[0]); byte_dump_delete_data(data); @@ -302,7 +302,7 @@ extern "C" { if (F_status_is_error(status) || number < 0 || number > f_number_t_size_unsigned) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, byte_dump_long_last); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, byte_dump_long_last); fl_color_print(data->error.to.stream, data->context.set.error, "' value can only be a number (inclusively) between "); fl_color_print(data->error.to.stream, data->context.set.notable, "0"); fl_color_print(data->error.to.stream, data->context.set.error, " and "); @@ -319,9 +319,9 @@ extern "C" { if (data->parameters[byte_dump_parameter_first].result == f_console_result_additional && data->parameters[byte_dump_parameter_last].result == f_console_result_additional) { if (data->first > data->last) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, byte_dump_long_first); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, byte_dump_long_first); fl_color_print(data->error.to.stream, data->context.set.error, "' value cannot be greater than the parameter '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, byte_dump_long_last); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, byte_dump_long_last); fl_color_print(data->error.to.stream, data->context.set.error, "' value.%c", f_string_eol_s[0]); byte_dump_delete_data(data); diff --git a/level_3/byte_dump/c/byte_dump.h b/level_3/byte_dump/c/byte_dump.h index 503155e..3ed90de 100644 --- a/level_3/byte_dump/c/byte_dump.h +++ b/level_3/byte_dump/c/byte_dump.h @@ -51,7 +51,7 @@ extern "C" { #define byte_dump_major_version "0" #define byte_dump_minor_version "5" #define byte_dump_micro_version "3" - #define byte_dump_version byte_dump_major_version "." byte_dump_minor_version "." byte_dump_micro_version + #define byte_dump_version byte_dump_major_version f_string_ascii_period byte_dump_minor_version f_string_ascii_period byte_dump_micro_version #endif // _di_byte_dump_version_ #ifndef _di_byte_dump_name_ @@ -180,15 +180,15 @@ extern "C" { #define byte_dump_console_parameter_t_initialize \ { \ - f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_normal, f_console_standard_long_normal, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(byte_dump_short_binary, byte_dump_long_binary, 0, 0, f_console_type_normal), \ f_console_parameter_t_initialize(byte_dump_short_decimal, byte_dump_long_decimal, 0, 0, f_console_type_normal), \ f_console_parameter_t_initialize(byte_dump_short_duodecimal, byte_dump_long_duodecimal, 0, 0, f_console_type_normal), \ diff --git a/level_3/byte_dump/c/private-byte_dump.c b/level_3/byte_dump/c/private-byte_dump.c index a7fed93..a326b37 100644 --- a/level_3/byte_dump/c/private-byte_dump.c +++ b/level_3/byte_dump/c/private-byte_dump.c @@ -322,10 +322,10 @@ extern "C" { uint8_t current = (byte % 144) / 12; if (current == 11) { - fprintf(data.output.stream, "b"); + fprintf(data.output.stream, f_string_ascii_b_s); } else if (current == 10) { - fprintf(data.output.stream, "a"); + fprintf(data.output.stream, f_string_ascii_a_s); } else { fprintf(data.output.stream, "%01d", current); @@ -334,10 +334,10 @@ extern "C" { current = (byte % 144) % 12; if (current == 11) { - fprintf(data.output.stream, "b"); + fprintf(data.output.stream, f_string_ascii_b_s); } else if (current == 10) { - fprintf(data.output.stream, "a"); + fprintf(data.output.stream, f_string_ascii_a_s); } else { fprintf(data.output.stream, "%01d", current); @@ -358,14 +358,14 @@ extern "C" { else if (data.mode == byte_dump_mode_binary) { int8_t binary_string[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - binary_string[0] = ((byte >> 7) & 0x01) ? '1' : '0'; - binary_string[1] = ((byte >> 6) & 0x01) ? '1' : '0'; - binary_string[2] = ((byte >> 5) & 0x01) ? '1' : '0'; - binary_string[3] = ((byte >> 4) & 0x01) ? '1' : '0'; - binary_string[4] = ((byte >> 3) & 0x01) ? '1' : '0'; - binary_string[5] = ((byte >> 2) & 0x01) ? '1' : '0'; - binary_string[6] = ((byte >> 1) & 0x01) ? '1' : '0'; - binary_string[7] = (byte & 0x01) ? '1' : '0'; + binary_string[0] = ((byte >> 7) & 0x01) ? f_string_ascii_1_s[0] : f_string_ascii_0_s[0]; + binary_string[1] = ((byte >> 6) & 0x01) ? f_string_ascii_1_s[0] : f_string_ascii_0_s[0]; + binary_string[2] = ((byte >> 5) & 0x01) ? f_string_ascii_1_s[0] : f_string_ascii_0_s[0]; + binary_string[3] = ((byte >> 4) & 0x01) ? f_string_ascii_1_s[0] : f_string_ascii_0_s[0]; + binary_string[4] = ((byte >> 3) & 0x01) ? f_string_ascii_1_s[0] : f_string_ascii_0_s[0]; + binary_string[5] = ((byte >> 2) & 0x01) ? f_string_ascii_1_s[0] : f_string_ascii_0_s[0]; + binary_string[6] = ((byte >> 1) & 0x01) ? f_string_ascii_1_s[0] : f_string_ascii_0_s[0]; + binary_string[7] = (byte & 0x01) ? f_string_ascii_1_s[0] : f_string_ascii_0_s[0]; if (invalid[character_current]) { fl_color_print(data.output.stream, data.context.set.error, " %s", binary_string); @@ -446,7 +446,7 @@ extern "C" { if (*offset > 0) { if (data.parameters[byte_dump_parameter_classic].result == f_console_result_found) { while (*offset > 0 && j < data.width) { - fprintf(data.output.stream, "."); + fprintf(data.output.stream, f_string_ascii_period_s); (*offset)--; j++; } // while @@ -482,7 +482,7 @@ extern "C" { fl_color_print(data.output.stream, data.context.set.error, "%s", byte_dump_character_placeholder); } else if (data.parameters[byte_dump_parameter_classic].result == f_console_result_found) { - fprintf(data.output.stream, "."); + fprintf(data.output.stream, f_string_ascii_period_s); } else { fl_color_print(data.output.stream, data.context.set.warning, "%s", byte_dump_character_placeholder); @@ -622,12 +622,12 @@ extern "C" { fprintf(data.output.stream, f_string_space_s); } else if (data.presentation == byte_dump_presentation_classic) { - fprintf(data.output.stream, "."); + fprintf(data.output.stream, f_string_ascii_period_s); } } else if (f_utf_character_is_whitespace(characters.string[i]) == F_true) { if (data.parameters[byte_dump_parameter_classic].result == f_console_result_found) { - fprintf(data.output.stream, "."); + fprintf(data.output.stream, f_string_ascii_period_s); } else { fl_color_print2(data.output.stream, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_space); @@ -635,7 +635,7 @@ extern "C" { } else if (f_utf_character_is_zero_width(characters.string[i]) == F_true) { if (data.presentation == byte_dump_presentation_classic) { - fprintf(data.output.stream, "."); + fprintf(data.output.stream, f_string_ascii_period_s); } else if (data.parameters[byte_dump_parameter_placeholder].result == f_console_result_found) { fl_color_print(data.output.stream, data.context.set.warning, "%s", byte_dump_character_placeholder); @@ -647,7 +647,7 @@ extern "C" { else if (f_utf_character_is_control(characters.string[i]) == F_true) { // print a space (or '.') for control characters. if (data.presentation == byte_dump_presentation_classic) { - fl_color_print(data.output.stream, data.context.set.warning, "."); + fl_color_print(data.output.stream, data.context.set.warning, f_string_ascii_period_s); } else { fprintf(data.output.stream, f_string_space_s); @@ -754,7 +754,7 @@ extern "C" { fl_color_print(data.output.stream, data.context.set.error, "%s", byte_dump_character_placeholder); } else if (data.parameters[byte_dump_parameter_classic].result == f_console_result_found) { - fprintf(data.output.stream, "."); + fprintf(data.output.stream, f_string_ascii_period_s); } else { fl_color_print(data.output.stream, data.context.set.warning, "%s", byte_dump_character_placeholder); @@ -772,7 +772,7 @@ extern "C" { fl_color_print(data.output.stream, data.context.set.error, "%s", byte_dump_character_placeholder); } else if (data.parameters[byte_dump_parameter_classic].result == f_console_result_found) { - fprintf(data.output.stream, "."); + fprintf(data.output.stream, f_string_ascii_period_s); } else { fl_color_print(data.output.stream, data.context.set.warning, "%s", byte_dump_character_placeholder); @@ -790,7 +790,7 @@ extern "C" { fl_color_print(data.output.stream, data.context.set.error, "%s", byte_dump_character_placeholder); } else if (data.parameters[byte_dump_parameter_classic].result == f_console_result_found) { - fprintf(data.output.stream, "."); + fprintf(data.output.stream, f_string_ascii_period_s); } else { fl_color_print(data.output.stream, data.context.set.warning, "%s", byte_dump_character_placeholder); @@ -814,7 +814,7 @@ extern "C" { fl_color_print(data.output.stream, data.context.set.error, "%s", byte_dump_character_placeholder); } else if (data.parameters[byte_dump_parameter_classic].result == f_console_result_found) { - fprintf(data.output.stream, "."); + fprintf(data.output.stream, f_string_ascii_period_s); } else { fl_color_print(data.output.stream, data.context.set.warning, "%s", byte_dump_character_placeholder); diff --git a/level_3/byte_dump/data/build/settings b/level_3/byte_dump/data/build/settings index 51d5165..a02e030 100644 --- a/level_3/byte_dump/data/build/settings +++ b/level_3/byte_dump/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lfll_error -lfll_program -lfl_color -lfl_console -lfl_conversion -lfl_string -lfl_utf -lf_console -lf_conversion -lf_file -lf_memory -lf_pipe -lf_print -lf_utf +build_libraries-individual -lfll_error -lfll_program -lfl_color -lfl_console -lfl_conversion -lfl_string -lfl_utf -lf_color -lf_console -lf_conversion -lf_file -lf_memory -lf_path -lf_pipe -lf_print -lf_string -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_sources_library byte_dump.c private-byte_dump.c diff --git a/level_3/control/c/control.c b/level_3/control/c/control.c index f73ab76..da7fa3f 100644 --- a/level_3/control/c/control.c +++ b/level_3/control/c/control.c @@ -10,15 +10,15 @@ extern "C" { fll_program_print_help_header(output, context, control_name_long, control_version); - fll_program_print_help_option(output, context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message."); - fll_program_print_help_option(output, context, f_console_standard_short_dark, f_console_standard_long_dark, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on dark backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_light, f_console_standard_long_light, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on light backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_no_color, f_console_standard_long_no_color, f_console_symbol_short_disable, f_console_symbol_long_disable, "Do not output in color."); - fll_program_print_help_option(output, context, f_console_standard_short_quiet, f_console_standard_long_quiet, f_console_symbol_short_disable, f_console_symbol_long_disable, " Decrease verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_normal, f_console_standard_long_normal, f_console_symbol_short_disable, f_console_symbol_long_disable, " Set verbosity to normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_verbose, f_console_standard_long_verbose, f_console_symbol_short_disable, f_console_symbol_long_disable, " Increase verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number."); + fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); + fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color."); + fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number."); fll_program_print_help_usage(output, context, control_name, f_string_empty_s); diff --git a/level_3/control/c/control.h b/level_3/control/c/control.h index 19103ac..06577ee 100644 --- a/level_3/control/c/control.h +++ b/level_3/control/c/control.h @@ -44,7 +44,7 @@ extern "C" { #define control_major_version "0" #define control_minor_version "5" #define control_micro_version "3" - #define control_version control_major_version "." control_minor_version "." control_micro_version + #define control_version control_major_version f_string_ascii_period control_minor_version f_string_ascii_period control_micro_version #endif // _di_control_version_ #ifndef _di_control_name_ @@ -68,15 +68,15 @@ extern "C" { #define control_console_parameter_t_initialize \ { \ - f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_normal, f_console_standard_long_normal, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ } #define control_total_parameters 9 diff --git a/level_3/control/data/build/settings b/level_3/control/data/build/settings index afb1852..3c9a12a 100644 --- a/level_3/control/data/build/settings +++ b/level_3/control/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lfll_error -lfll_program -lfll_status -lfl_color -lfl_console -lfl_status -lfl_string -lf_console -lf_conversion -lf_file -lf_memory -lf_pipe -lf_print -lf_utf +build_libraries-individual -lfll_error -lfll_program -lfll_status -lfl_color -lfl_console -lfl_status -lfl_string -lf_color -lf_console -lf_conversion -lf_file -lf_memory -lf_path -lf_pipe -lf_print -lf_string -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_sources_library control.c private-control.c diff --git a/level_3/controller/c/controller.c b/level_3/controller/c/controller.c index 49a7cdc..2f0659e 100644 --- a/level_3/controller/c/controller.c +++ b/level_3/controller/c/controller.c @@ -14,32 +14,32 @@ extern "C" { fll_program_print_help_header(output, context, controller_name_long, controller_version); - fll_program_print_help_option(output, context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message."); - fll_program_print_help_option(output, context, f_console_standard_short_dark, f_console_standard_long_dark, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on dark backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_light, f_console_standard_long_light, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on light backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_no_color, f_console_standard_long_no_color, f_console_symbol_short_disable, f_console_symbol_long_disable, "Do not output in color."); - fll_program_print_help_option(output, context, f_console_standard_short_quiet, f_console_standard_long_quiet, f_console_symbol_short_disable, f_console_symbol_long_disable, " Decrease verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_normal, f_console_standard_long_normal, f_console_symbol_short_disable, f_console_symbol_long_disable, " Set verbosity to normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_verbose, f_console_standard_long_verbose, f_console_symbol_short_disable, f_console_symbol_long_disable, " Increase verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number."); + fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); + fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color."); + fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number."); fprintf(output.stream, "%c", f_string_eol_s[0]); - fll_program_print_help_option(output, context, controller_short_control, controller_long_control, f_console_symbol_short_enable, f_console_symbol_long_enable, " Specify a custom control group file path, such as '" controller_path_control "'."); - fll_program_print_help_option(output, context, controller_short_daemon, controller_long_daemon, f_console_symbol_short_enable, f_console_symbol_long_enable, " Run in daemon only mode (do not process the entry)."); - fll_program_print_help_option(output, context, controller_short_interruptable, controller_long_interruptable, f_console_symbol_short_enable, f_console_symbol_long_enable, "Designate that this program can be interrupted."); - fll_program_print_help_option(output, context, controller_short_pid, controller_long_pid, f_console_symbol_short_enable, f_console_symbol_long_enable, " Specify a custom pid file path, such as '" controller_path_pid controller_string_default controller_path_suffix "'."); - fll_program_print_help_option(output, context, controller_short_settings, controller_long_settings, f_console_symbol_short_enable, f_console_symbol_long_enable, " Specify a custom settings path, such as '" controller_path_settings "'."); - fll_program_print_help_option(output, context, controller_short_test, controller_long_test, f_console_symbol_short_enable, f_console_symbol_long_enable, " Run in test mode, where nothing is actually run but is instead simulated."); - fll_program_print_help_option(output, context, controller_short_validate, controller_long_validate, f_console_symbol_short_enable, f_console_symbol_long_enable, " Validate the settings (entry and rules) without running (does not simulate)."); + fll_program_print_help_option(output, context, controller_short_control, controller_long_control, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a custom control group file path, such as '" controller_path_control "'."); + fll_program_print_help_option(output, context, controller_short_daemon, controller_long_daemon, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Run in daemon only mode (do not process the entry)."); + fll_program_print_help_option(output, context, controller_short_interruptable, controller_long_interruptable, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Designate that this program can be interrupted."); + fll_program_print_help_option(output, context, controller_short_pid, controller_long_pid, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a custom pid file path, such as '" controller_path_pid controller_string_default controller_path_suffix "'."); + fll_program_print_help_option(output, context, controller_short_settings, controller_long_settings, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a custom settings path, such as '" controller_path_settings "'."); + fll_program_print_help_option(output, context, controller_short_test, controller_long_test, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Run in test mode, where nothing is actually run but is instead simulated."); + fll_program_print_help_option(output, context, controller_short_validate, controller_long_validate, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Validate the settings (entry and rules) without running (does not simulate)."); fll_program_print_help_usage(output, context, controller_name, "entry"); fprintf(output.stream, " When both the "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, controller_long_test); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, controller_long_test); fprintf(output.stream, " operation and the "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, controller_long_validate); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, controller_long_validate); fprintf(output.stream, " operation are specified, then additional information on each would be executed rule is printed."); fprintf(output.stream, "%c", f_string_eol_s[0]); @@ -163,7 +163,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fprintf(data->error.to.stream, "%s%sThe parameter '", data->error.context.before->string, data->error.prefix ? data->error.prefix : f_string_empty_s); - fprintf(data->error.to.stream, "%s%s%s%s", data->error.context.after->string, data->error.notable.before->string, f_console_symbol_long_enable, controller_long_settings, data->error.notable.after->string); + fprintf(data->error.to.stream, "%s%s%s%s", data->error.context.after->string, data->error.notable.before->string, f_console_symbol_long_enable_s, controller_long_settings, data->error.notable.after->string); fprintf(data->error.to.stream, "%s' was specified, but no value was given.%s%c", data->error.context.before->string, data->error.context.after->string, f_string_eol_s[0]); } @@ -194,7 +194,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fprintf(data->error.to.stream, "%s%sThe parameter '", data->error.context.before->string, data->error.prefix ? data->error.prefix : f_string_empty_s); - fprintf(data->error.to.stream, "%s%s%s%s%s", data->error.context.after->string, data->error.notable.before->string, f_console_symbol_long_enable, controller_long_pid, data->error.notable.after->string); + fprintf(data->error.to.stream, "%s%s%s%s%s", data->error.context.after->string, data->error.notable.before->string, f_console_symbol_long_enable_s, controller_long_pid, data->error.notable.after->string); fprintf(data->error.to.stream, "%s' was specified, but no value was given.%s%c", data->error.context.before->string, data->error.context.after->string, f_string_eol_s[0]); } @@ -216,7 +216,7 @@ extern "C" { if (data->warning.verbosity == f_console_verbosity_debug) { fprintf(data->warning.to.stream, "%c", f_string_eol_s[0]); fprintf(data->warning.to.stream, "%s%sThe parameter '", data->warning.context.before->string, data->warning.prefix ? data->warning.prefix : f_string_empty_s); - fprintf(data->warning.to.stream, "%s%s%s%s%s", data->warning.context.after->string, data->warning.notable.before->string, f_console_symbol_long_enable, controller_long_pid, data->warning.notable.after->string); + fprintf(data->warning.to.stream, "%s%s%s%s%s", data->warning.context.after->string, data->warning.notable.before->string, f_console_symbol_long_enable_s, controller_long_pid, data->warning.notable.after->string); fprintf(data->warning.to.stream, "%s' must be a file path but instead is an empty string, falling back to the default.%s%c", data->warning.context.before->string, data->warning.context.after->string, f_string_eol_s[0]); } } @@ -245,7 +245,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fprintf(data->error.to.stream, "%s%sThe parameter '", data->error.context.before->string, data->error.prefix ? data->error.prefix : f_string_empty_s); - fprintf(data->error.to.stream, "%s%s%s%s%s", data->error.context.after->string, data->error.notable.before->string, f_console_symbol_long_enable, controller_long_control, data->error.notable.after->string); + fprintf(data->error.to.stream, "%s%s%s%s%s", data->error.context.after->string, data->error.notable.before->string, f_console_symbol_long_enable_s, controller_long_control, data->error.notable.after->string); fprintf(data->error.to.stream, "%s' was specified, but no value was given.%s%c", data->error.context.before->string, data->error.context.after->string, f_string_eol_s[0]); } @@ -267,7 +267,7 @@ extern "C" { if (data->warning.verbosity == f_console_verbosity_debug) { fprintf(data->warning.to.stream, "%c", f_string_eol_s[0]); fprintf(data->warning.to.stream, "%s%sThe parameter '", data->warning.context.before->string, data->warning.prefix ? data->warning.prefix : f_string_empty_s); - fprintf(data->warning.to.stream, "%s%s%s%s%s", data->warning.context.after->string, data->warning.notable.before->string, f_console_symbol_long_enable, controller_long_control, data->warning.notable.after->string); + fprintf(data->warning.to.stream, "%s%s%s%s%s", data->warning.context.after->string, data->warning.notable.before->string, f_console_symbol_long_enable_s, controller_long_control, data->warning.notable.after->string); fprintf(data->warning.to.stream, "%s' must be a file directory path but instead is an empty string, falling back to the default.%s%c", data->warning.context.before->string, data->warning.context.after->string, f_string_eol_s[0]); } } @@ -290,9 +290,9 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fprintf(data->error.to.stream, "%s%sThe parameter '", data->error.context.before->string, data->error.prefix ? data->error.prefix : f_string_empty_s); - fprintf(data->error.to.stream, "%s%s%s%s%s", data->error.context.after->string, data->error.notable.before->string, f_console_symbol_long_enable, controller_long_validate, data->error.notable.after->string); + fprintf(data->error.to.stream, "%s%s%s%s%s", data->error.context.after->string, data->error.notable.before->string, f_console_symbol_long_enable_s, controller_long_validate, data->error.notable.after->string); fprintf(data->error.to.stream, "%s' must not be specified with the parameter '", data->error.context.before->string); - fprintf(data->error.to.stream, "%s%s%s%s%s", data->error.context.after->string, data->error.notable.before->string, f_console_symbol_long_enable, controller_long_daemon, data->error.notable.after->string); + fprintf(data->error.to.stream, "%s%s%s%s%s", data->error.context.after->string, data->error.notable.before->string, f_console_symbol_long_enable_s, controller_long_daemon, data->error.notable.after->string); fprintf(data->error.to.stream, "%s'.%s%c", data->error.context.before->string, data->error.context.after->string, f_string_eol_s[0]); } diff --git a/level_3/controller/c/controller.h b/level_3/controller/c/controller.h index 3d759d3..4f3609d 100644 --- a/level_3/controller/c/controller.h +++ b/level_3/controller/c/controller.h @@ -78,7 +78,7 @@ extern "C" { #define controller_major_version "0" #define controller_minor_version "5" #define controller_micro_version "3" - #define controller_version controller_major_version "." controller_minor_version "." controller_micro_version + #define controller_version controller_major_version f_string_ascii_period controller_minor_version f_string_ascii_period controller_micro_version #endif // _di_controller_version_ #ifndef _di_controller_name_ @@ -141,15 +141,15 @@ extern "C" { #define controller_console_parameter_t_initialize \ { \ - f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_normal, f_console_standard_long_normal, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(controller_short_control, controller_long_control, 0, 1, f_console_type_normal), \ f_console_parameter_t_initialize(controller_short_daemon, controller_long_daemon, 0, 0, f_console_type_normal), \ f_console_parameter_t_initialize(controller_short_interruptable, controller_long_interruptable, 0, 0, f_console_type_normal), \ diff --git a/level_3/controller/c/private-controller.c b/level_3/controller/c/private-controller.c index 8992dd9..80b2693 100644 --- a/level_3/controller/c/private-controller.c +++ b/level_3/controller/c/private-controller.c @@ -158,7 +158,7 @@ extern "C" { file.flag = f_file_flag_write_only; - status = f_file_stream_open(path_pid.string, f_macro_file_open_mode_truncate, &file); + status = f_file_stream_open(path_pid.string, f_file_open_mode_truncate_s, &file); if (F_status_is_error(status)) return status; fprintf(file.stream, "%llu%c", data.pid, f_string_eol_s[0]); @@ -182,7 +182,7 @@ extern "C" { f_status_t status = F_none; f_file_t pid_file = f_file_t_initialize; - status = f_file_stream_open(path_pid.string, f_macro_file_open_mode_read, &pid_file); + status = f_file_stream_open(path_pid.string, f_file_open_mode_read_s, &pid_file); if (F_status_is_error(status)) return; f_string_dynamic_t pid_buffer = f_string_dynamic_t_initialize; @@ -315,7 +315,7 @@ extern "C" { if (F_status_is_error(status)) { // always return immediately on memory errors. - if (F_status_set_fine(status) == F_memory_not || F_status_set_fine(status) == F_memory_allocation || F_status_set_fine(status) == F_memory_reallocation) { + if (F_status_set_fine(status) == F_memory_not) { fll_error_file_print(data.error, F_status_set_fine(status), "controller_file_pid_create", F_true, setting->path_pid.string, "create", fll_error_file_type_file); controller_entry_error_print(data.error, *cache); @@ -952,7 +952,7 @@ extern "C" { if (F_status_is_error(status)) { controller_entry_error_print(data->error, *cache); - if (!simulate || F_status_set_fine(status) == F_memory_not || F_status_set_fine(status) == F_memory_allocation || F_status_set_fine(status) == F_memory_reallocation) { + if (!simulate || F_status_set_fine(status) == F_memory_not) { break; } } @@ -1030,7 +1030,7 @@ extern "C" { cache->name_action.used = 0; if (F_status_is_error(status)) { - if (!simulate || F_status_set_fine(status) == F_memory_not || F_status_set_fine(status) == F_memory_allocation || F_status_set_fine(status) == F_memory_reallocation) { + if (!simulate || F_status_set_fine(status) == F_memory_not) { break; } } @@ -1076,7 +1076,7 @@ extern "C" { #ifndef _di_controller_status_simplify_ f_status_t controller_status_simplify(const f_status_t status) { - if (status == F_memory_not || status == F_memory_allocation || status == F_memory_reallocation) { + if (status == F_memory_not) { return F_status_set_error(F_memory); } diff --git a/level_3/controller/c/private-entry.c b/level_3/controller/c/private-entry.c index edbf0d6..9b7ab74 100644 --- a/level_3/controller/c/private-entry.c +++ b/level_3/controller/c/private-entry.c @@ -322,7 +322,7 @@ extern "C" { action->status = status; - if (F_status_set_fine(status) == F_memory_not || F_status_set_fine(status) == F_memory_allocation || F_status_set_fine(status) == F_memory_reallocation) { + if (F_status_set_fine(status) == F_memory_not) { status_action = status; break; } @@ -353,7 +353,7 @@ extern "C" { if (F_status_is_error(status)) { fll_error_print(data.error, F_status_set_fine(status), "f_file_name_base", F_true); - if (F_status_set_fine(status) == F_memory_not || F_status_set_fine(status) == F_memory_allocation || F_status_set_fine(status) == F_memory_reallocation) { + if (F_status_set_fine(status) == F_memory_not) { status_action = status; break; } @@ -375,7 +375,7 @@ extern "C" { action->status = status; - if (F_status_set_fine(status) == F_memory_not || F_status_set_fine(status) == F_memory_allocation || F_status_set_fine(status) == F_memory_reallocation) { + if (F_status_set_fine(status) == F_memory_not) { status_action = status; } @@ -509,7 +509,7 @@ extern "C" { action->status = controller_status_simplify(F_status_set_fine(status)); } - if (F_status_set_fine(status) == F_memory_not || F_status_set_fine(status) == F_memory_allocation || F_status_set_fine(status) == F_memory_reallocation) { + if (F_status_set_fine(status) == F_memory_not) { fll_error_print(data.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true); status_action = status; @@ -784,7 +784,7 @@ extern "C" { if (F_status_is_error(status)) { controller_entry_error_print(data.error, *cache); - if (F_status_set_fine(status) == F_memory_not || F_status_set_fine(status) == F_memory_allocation || F_status_set_fine(status) == F_memory_reallocation) { + if (F_status_set_fine(status) == F_memory_not) { break; } } diff --git a/level_3/controller/c/private-rule.c b/level_3/controller/c/private-rule.c index 2803127..cea0397 100644 --- a/level_3/controller/c/private-rule.c +++ b/level_3/controller/c/private-rule.c @@ -1488,12 +1488,12 @@ extern "C" { cache->line_item = cache_line_item; if (F_status_is_error(status)) { - if (i == 0 || i == 1 || F_status_set_fine(status) == F_memory_not || F_status_set_fine(status) == F_memory_allocation || F_status_set_fine(status) == F_memory_reallocation) { + if (i == 0 || i == 1 || F_status_set_fine(status) == F_memory_not) { controller_rule_error_print_need_want_wish(data->error, strings[i], dynamics[i]->array[j].string, "failed during execution"); controller_rule_error_print(data->error, *cache, F_true); - if (!(options & controller_rule_option_simulate) || F_status_set_fine(status) == F_memory_not || F_status_set_fine(status) == F_memory_allocation || F_status_set_fine(status) == F_memory_reallocation) { + if (!(options & controller_rule_option_simulate) || F_status_set_fine(status) == F_memory_not) { break; } } @@ -1817,7 +1817,7 @@ extern "C" { status = controller_rule_setting_read(data, setting, cache, rule); if (F_status_is_error(status)) { - if (F_status_set_fine(status) == F_memory_not || F_status_set_fine(status) == F_memory_allocation || F_status_set_fine(status) == F_memory_reallocation) { + if (F_status_set_fine(status) == F_memory_not) { break; } } @@ -1894,7 +1894,7 @@ extern "C" { } if (F_status_is_error(status)) { - if (F_status_set_fine(status) == F_memory_not || F_status_set_fine(status) == F_memory_allocation || F_status_set_fine(status) == F_memory_reallocation) { + if (F_status_set_fine(status) == F_memory_not) { status_return = status; break; } @@ -2028,7 +2028,7 @@ extern "C" { controller_rule_error_print(data.error, *cache, F_false); - if (F_status_set_fine(status) == F_memory_not || F_status_set_fine(status) == F_memory_allocation || F_status_set_fine(status) == F_memory_reallocation) { + if (F_status_set_fine(status) == F_memory_not) { status_return = status; break; } @@ -2189,7 +2189,7 @@ extern "C" { if (F_status_is_error(status)) { fll_error_print(data.error, F_status_set_fine(status), "fl_string_maps_increase", F_true); - if (F_status_set_fine(status) == F_memory_not || F_status_set_fine(status) == F_memory_allocation || F_status_set_fine(status) == F_memory_reallocation) { + if (F_status_set_fine(status) == F_memory_not) { status_return = status; break; } @@ -2216,7 +2216,7 @@ extern "C" { if (F_status_is_error(status)) { fll_error_print(data.error, F_status_set_fine(status), "fl_string_dynamic_partial_append_nulless", F_true); - if (F_status_set_fine(status) == F_memory_not || F_status_set_fine(status) == F_memory_allocation || F_status_set_fine(status) == F_memory_reallocation) { + if (F_status_set_fine(status) == F_memory_not) { status_return = status; break; } @@ -2249,7 +2249,7 @@ extern "C" { } if (F_status_is_error(status)) { - if (F_status_set_fine(status) == F_memory_not || F_status_set_fine(status) == F_memory_allocation || F_status_set_fine(status) == F_memory_reallocation) { + if (F_status_set_fine(status) == F_memory_not) { status_return = status; break; } @@ -2364,7 +2364,7 @@ extern "C" { } if (F_status_is_error(status)) { - if (F_status_set_fine(status) == F_memory_not || F_status_set_fine(status) == F_memory_allocation || F_status_set_fine(status) == F_memory_reallocation) { + if (F_status_set_fine(status) == F_memory_not) { status_return = status; break; } @@ -2519,7 +2519,7 @@ extern "C" { if (F_status_is_error(status)) { fll_error_print(data.error, F_status_set_fine(status), "f_limit_sets_increase", F_true); - if (F_status_set_fine(status) == F_memory_not || F_status_set_fine(status) == F_memory_allocation || F_status_set_fine(status) == F_memory_reallocation) { + if (F_status_set_fine(status) == F_memory_not) { status_return = status; break; } @@ -2647,7 +2647,7 @@ extern "C" { if (F_status_is_error(status)) { setting_value->used = 0; - if (F_status_set_fine(status) == F_memory_not || F_status_set_fine(status) == F_memory_allocation || F_status_set_fine(status) == F_memory_reallocation) { + if (F_status_set_fine(status) == F_memory_not) { status_return = status; break; } @@ -2731,7 +2731,7 @@ extern "C" { } if (F_status_is_error(status)) { - if (F_status_set_fine(status) == F_memory_not || F_status_set_fine(status) == F_memory_allocation || F_status_set_fine(status) == F_memory_reallocation) { + if (F_status_set_fine(status) == F_memory_not) { status_return = status; break; } @@ -2934,7 +2934,7 @@ extern "C" { controller_rule_error_print(data.error, *cache, F_false); - if (F_status_set_fine(status) == F_memory_not || F_status_set_fine(status) == F_memory_allocation || F_status_set_fine(status) == F_memory_reallocation) { + if (F_status_set_fine(status) == F_memory_not) { status_return = status; break; } @@ -2957,7 +2957,7 @@ extern "C" { controller_rule_error_print(data.error, *cache, F_false); - if (F_status_set_fine(status) == F_memory_not || F_status_set_fine(status) == F_memory_allocation || F_status_set_fine(status) == F_memory_reallocation) { + if (F_status_set_fine(status) == F_memory_not) { status_return = status; break; } @@ -2971,7 +2971,7 @@ extern "C" { if (F_status_is_error(status) && F_status_set_fine(status) != F_supported_not) { - if (F_status_set_fine(status) == F_memory_not || F_status_set_fine(status) == F_memory_allocation || F_status_set_fine(status) == F_memory_reallocation) { + if (F_status_set_fine(status) == F_memory_not) { fll_error_print(data.error, F_status_set_fine(status), "f_capability_from_text", F_true); // get the current line number within the settings item. @@ -3150,7 +3150,7 @@ extern "C" { if (F_status_is_error(status)) { fll_error_print(data.error, F_status_set_fine(status), "fl_type_int32s_increase", F_true); - if (F_status_set_fine(status) == F_memory_not || F_status_set_fine(status) == F_memory_allocation || F_status_set_fine(status) == F_memory_reallocation) { + if (F_status_set_fine(status) == F_memory_not) { status_return = status; break; } @@ -3244,7 +3244,7 @@ extern "C" { if (F_status_is_error(status)) { fll_error_print(data.error, F_status_set_fine(status), "fl_string_dynamics_increase", F_true); - if (F_status_set_fine(status) == F_memory_not || F_status_set_fine(status) == F_memory_allocation || F_status_set_fine(status) == F_memory_reallocation) { + if (F_status_set_fine(status) == F_memory_not) { status_return = status; break; } @@ -3281,7 +3281,7 @@ extern "C" { if (F_status_is_error(status)) { setting_values->array[setting_values->used].used = 0; - if (F_status_set_fine(status) == F_memory_not || F_status_set_fine(status) == F_memory_allocation || F_status_set_fine(status) == F_memory_reallocation) { + if (F_status_set_fine(status) == F_memory_not) { status_return = status; break; } @@ -3389,7 +3389,7 @@ extern "C" { if (F_status_is_error(status)) { fll_error_print(data.error, F_status_set_fine(status), "fl_string_dynamics_increase_by", F_true); - if (F_status_set_fine(status) == F_memory_not || F_status_set_fine(status) == F_memory_allocation || F_status_set_fine(status) == F_memory_reallocation) { + if (F_status_set_fine(status) == F_memory_not) { status_return = status; break; } @@ -3413,7 +3413,7 @@ extern "C" { if (F_status_is_error(status)) { setting_values->array[setting_values->used].used = 0; - if (F_status_set_fine(status) == F_memory_not || F_status_set_fine(status) == F_memory_allocation || F_status_set_fine(status) == F_memory_reallocation) { + if (F_status_set_fine(status) == F_memory_not) { status_return = status; break; } @@ -3441,7 +3441,7 @@ extern "C" { fll_error_print(data.error, F_status_set_fine(status), "f_file_name_base", F_true); - if (F_status_set_fine(status) == F_memory_not || F_status_set_fine(status) == F_memory_allocation || F_status_set_fine(status) == F_memory_reallocation) { + if (F_status_set_fine(status) == F_memory_not) { status_return = status; break; } diff --git a/level_3/controller/data/build/settings b/level_3/controller/data/build/settings index 9cecadf..2e692da 100644 --- a/level_3/controller/data/build/settings +++ b/level_3/controller/data/build/settings @@ -18,8 +18,8 @@ modes_default monolithic build_compiler gcc build_indexer ar build_language c -build_libraries -pthread -lc -lcap -build_libraries-individual -lfll_control_group -lfll_environment -lfll_error -lfll_execute -lfll_fss -lfll_path -lfll_program -lfll_status -lfl_color -lfl_console -lfl_control_group -lfl_conversion -lfl_directory -lfl_environment -lfl_fss -lfl_iki -lfl_status -lfl_string -lfl_type -lf_account -lf_capability -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_iki -lf_limit -lf_memory -lf_path -lf_pipe -lf_print -lf_signal -lf_thread -lf_utf +build_libraries -lc -lcap +build_libraries-individual -lfll_control_group -lfll_environment -lfll_error -lfll_execute -lfll_fss -lfll_path -lfll_program -lfll_status -lfl_color -lfl_console -lfl_control_group -lfl_conversion -lfl_directory -lfl_environment -lfl_fss -lfl_iki -lfl_status -lfl_string -lfl_type -lf_account -lf_capability -lf_color -lf_console -lf_control_group -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_iki -lf_limit -lf_memory -lf_path -lf_pipe -lf_print -lf_signal -lf_string -lf_thread -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_sources_library controller.c private-control.c private-controller.c private-entry.c private-rule.c diff --git a/level_3/fake/c/fake.c b/level_3/fake/c/fake.c index ac72b44..fb72841 100644 --- a/level_3/fake/c/fake.c +++ b/level_3/fake/c/fake.c @@ -15,41 +15,41 @@ extern "C" { fll_program_print_help_header(output, context, fake_name_long, fake_version); - fll_program_print_help_option(output, context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message."); - fll_program_print_help_option(output, context, f_console_standard_short_dark, f_console_standard_long_dark, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on dark backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_light, f_console_standard_long_light, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on light backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_no_color, f_console_standard_long_no_color, f_console_symbol_short_disable, f_console_symbol_long_disable, "Do not output in color."); - fll_program_print_help_option(output, context, f_console_standard_short_quiet, f_console_standard_long_quiet, f_console_symbol_short_disable, f_console_symbol_long_disable, " Decrease verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_normal, f_console_standard_long_normal, f_console_symbol_short_disable, f_console_symbol_long_disable, " Set verbosity to normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_verbose, f_console_standard_long_verbose, f_console_symbol_short_disable, f_console_symbol_long_disable, " Increase verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number."); + fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); + fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color."); + fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number."); fprintf(output.stream, "%c", f_string_eol_s[0]); - fll_program_print_help_option(output, context, fake_short_define, fake_long_define, f_console_symbol_short_enable, f_console_symbol_long_enable, " Override defines from settings file with this define."); - fll_program_print_help_option(output, context, fake_short_fakefile, fake_long_fakefile, f_console_symbol_short_enable, f_console_symbol_long_enable, "Use this fakefile."); - fll_program_print_help_option(output, context, fake_short_mode, fake_long_mode, f_console_symbol_short_enable, f_console_symbol_long_enable, " Use this mode when processing the build settings."); - fll_program_print_help_option(output, context, fake_short_process, fake_long_process, f_console_symbol_short_enable, f_console_symbol_long_enable, " Process name for storing build states."); - fll_program_print_help_option(output, context, fake_short_settings, fake_long_settings, f_console_symbol_short_enable, f_console_symbol_long_enable, "Use this settings file."); + fll_program_print_help_option(output, context, fake_short_define, fake_long_define, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Override defines from settings file with this define."); + fll_program_print_help_option(output, context, fake_short_fakefile, fake_long_fakefile, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Use this fakefile."); + fll_program_print_help_option(output, context, fake_short_mode, fake_long_mode, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use this mode when processing the build settings."); + fll_program_print_help_option(output, context, fake_short_process, fake_long_process, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Process name for storing build states."); + fll_program_print_help_option(output, context, fake_short_settings, fake_long_settings, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Use this settings file."); fprintf(output.stream, "%c", f_string_eol_s[0]); - fll_program_print_help_option(output, context, fake_short_path_build, fake_long_path_build, f_console_symbol_short_enable, f_console_symbol_long_enable, " Specify a custom build directory."); - fll_program_print_help_option(output, context, fake_short_path_data, fake_long_path_data, f_console_symbol_short_enable, f_console_symbol_long_enable, " Specify a custom path to the data files."); - fll_program_print_help_option(output, context, fake_short_path_sources, fake_long_path_sources, f_console_symbol_short_enable, f_console_symbol_long_enable, " Specify a custom path to the source files."); - fll_program_print_help_option(output, context, fake_short_path_work, fake_long_path_work, f_console_symbol_short_enable, f_console_symbol_long_enable, " Use includes/libraries/programs from this directory instead of system."); + fll_program_print_help_option(output, context, fake_short_path_build, fake_long_path_build, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a custom build directory."); + fll_program_print_help_option(output, context, fake_short_path_data, fake_long_path_data, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a custom path to the data files."); + fll_program_print_help_option(output, context, fake_short_path_sources, fake_long_path_sources, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a custom path to the source files."); + fll_program_print_help_option(output, context, fake_short_path_work, fake_long_path_work, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use includes/libraries/programs from this directory instead of system."); fprintf(output.stream, "%c%c", f_string_eol_s[0], f_string_eol_s[0]); fl_color_print(output.stream, context.set.important, " Special Options: "); - fll_program_print_help_option_long(output, context, fake_long_documents_disabled, f_console_symbol_long_enable, " Forcibly do not build documents files."); - fll_program_print_help_option_long(output, context, fake_long_documents_enabled, f_console_symbol_long_enable, " Forcibly do build documents files."); - fll_program_print_help_option_long(output, context, fake_long_shared_disabled, f_console_symbol_long_enable, "Forcibly do not build shared files."); - fll_program_print_help_option_long(output, context, fake_long_shared_enabled, f_console_symbol_long_enable, " Forcibly do build shared files."); - fll_program_print_help_option_long(output, context, fake_long_static_disabled, f_console_symbol_long_enable, "Forcibly do not build static files."); - fll_program_print_help_option_long(output, context, fake_long_static_enabled, f_console_symbol_long_enable, " Forcibly do build static files."); + fll_program_print_help_option_long(output, context, fake_long_documents_disabled, f_console_symbol_long_enable_s, " Forcibly do not build documents files."); + fll_program_print_help_option_long(output, context, fake_long_documents_enabled, f_console_symbol_long_enable_s, " Forcibly do build documents files."); + fll_program_print_help_option_long(output, context, fake_long_shared_disabled, f_console_symbol_long_enable_s, "Forcibly do not build shared files."); + fll_program_print_help_option_long(output, context, fake_long_shared_enabled, f_console_symbol_long_enable_s, " Forcibly do build shared files."); + fll_program_print_help_option_long(output, context, fake_long_static_disabled, f_console_symbol_long_enable_s, "Forcibly do not build static files."); + fll_program_print_help_option_long(output, context, fake_long_static_enabled, f_console_symbol_long_enable_s, " Forcibly do build static files."); fprintf(output.stream, "%c%c", f_string_eol_s[0], f_string_eol_s[0]); @@ -65,7 +65,7 @@ extern "C" { fprintf(output.stream, " When performing the "); fl_color_print(output.stream, context.set.notable, "%s", fake_other_operation_build); fprintf(output.stream, " operation, the "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_mode); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fake_long_mode); fprintf(output.stream, " parameter specifies a name (limited to alpha-numeric, underscore, and dash) to be used in addition to the global."); fprintf(output.stream, "%c", f_string_eol_s[0]); @@ -83,11 +83,11 @@ extern "C" { fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " For example, with '"); - fl_color_print(output.stream, context.set.notable, "%s%s my_fakefile", f_console_symbol_long_enable, fake_long_fakefile); + fl_color_print(output.stream, context.set.notable, "%s%s my_fakefile", f_console_symbol_long_enable_s, fake_long_fakefile); fprintf(output.stream, "' the fakefile at '"); fl_color_print(output.stream, context.set.notable, "./%s%smy_fakefile", fake_default_path_data, fake_default_path_build); fprintf(output.stream, " would be used, however with '"); - fl_color_print(output.stream, context.set.notable, "%s%s ./my_fakefile", f_console_symbol_long_enable, fake_long_fakefile); + fl_color_print(output.stream, context.set.notable, "%s%s ./my_fakefile", f_console_symbol_long_enable_s, fake_long_fakefile); fprintf(output.stream, "' the fakefile at '"); fl_color_print(output.stream, context.set.notable, "./my_fakefile", fake_default_path_data, fake_default_path_build); fprintf(output.stream, " would be used."); diff --git a/level_3/fake/c/fake.h b/level_3/fake/c/fake.h index 00ef8f0..9fb13bb 100644 --- a/level_3/fake/c/fake.h +++ b/level_3/fake/c/fake.h @@ -93,7 +93,7 @@ extern "C" { #define fake_major_version "0" #define fake_minor_version "5" #define fake_micro_version "3" - #define fake_version fake_major_version "." fake_minor_version "." fake_micro_version + #define fake_version fake_major_version f_string_ascii_period fake_minor_version f_string_ascii_period fake_micro_version #endif // _di_fake_version_ #ifndef _di_fake_name_ @@ -334,15 +334,15 @@ extern "C" { #define fake_console_parameter_t_initialize \ { \ - f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_normal, f_console_standard_long_normal, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(fake_short_define, fake_long_define, 0, 1, f_console_type_normal), \ f_console_parameter_t_initialize(fake_short_fakefile, fake_long_fakefile, 0, 1, f_console_type_normal), \ f_console_parameter_t_initialize(fake_short_mode, fake_long_mode, 0, 1, f_console_type_normal), \ diff --git a/level_3/fake/c/private-build.c b/level_3/fake/c/private-build.c index 9c44369..c2355eb 100644 --- a/level_3/fake/c/private-build.c +++ b/level_3/fake/c/private-build.c @@ -481,16 +481,16 @@ extern "C" { // ensure console color mode is passed to the scripts so that they can also react to color mode. if (F_status_is_error_not(*status) && data.context.mode != f_color_mode_none) { - char argument[3] = { f_console_symbol_disable, 0, 0 }; + char argument[3] = { f_console_symbol_short_disable_s[0], 0, 0 }; if (data.context.mode == f_color_mode_dark) { - argument[1] = f_console_standard_short_dark[0]; + argument[1] = f_console_standard_short_dark_s[0]; } else if (data.context.mode == f_color_mode_light) { - argument[1] = f_console_standard_short_light[0]; + argument[1] = f_console_standard_short_light_s[0]; } else if (data.context.mode == f_color_mode_no_color) { - argument[1] = f_console_standard_short_no_color[0]; + argument[1] = f_console_standard_short_no_color_s[0]; } *status = fll_execute_arguments_add(argument, 2, &arguments); @@ -498,16 +498,16 @@ extern "C" { // ensure verbosity level is passed to the scripts so that they can also react to requested verbosity. if (F_status_is_error_not(*status) && data.error.verbosity != f_console_verbosity_normal) { - char argument[3] = { f_console_symbol_disable, 0, 0 }; + char argument[3] = { f_console_symbol_short_disable_s[0], 0, 0 }; if (data.error.verbosity == f_console_verbosity_quiet) { - argument[1] = f_console_standard_short_quiet[0]; + argument[1] = f_console_standard_short_quiet_s[0]; } else if (data.error.verbosity == f_console_verbosity_verbose) { - argument[1] = f_console_standard_short_verbose[0]; + argument[1] = f_console_standard_short_verbose_s[0]; } else if (data.error.verbosity == f_console_verbosity_debug) { - argument[1] = f_console_standard_short_debug[0]; + argument[1] = f_console_standard_short_debug_s[0]; } *status = fll_execute_arguments_add(argument, 2, &arguments); @@ -553,13 +553,13 @@ extern "C" { } const f_string_t parameters_prefix[] = { - f_console_symbol_short_enable, - f_console_symbol_short_enable, - f_console_symbol_short_enable, - f_console_symbol_short_enable, - f_console_symbol_short_enable, - f_console_symbol_short_enable, - f_console_symbol_short_enable, + f_console_symbol_short_enable_s, + f_console_symbol_short_enable_s, + f_console_symbol_short_enable_s, + f_console_symbol_short_enable_s, + f_console_symbol_short_enable_s, + f_console_symbol_short_enable_s, + f_console_symbol_short_enable_s, }; const f_string_length_t parameters_prefix_length[] = { @@ -2079,16 +2079,16 @@ extern "C" { if (data.error.verbosity == f_console_verbosity_verbose) { fprintf(data.output.stream, "%c", f_string_eol_s[0]); fl_color_print(data.output.stream, data.context.set.error, "%sthe parameters '", fll_error_print_warning); - fl_color_print(data.output.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_shared_disabled); + fl_color_print(data.output.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fake_long_shared_disabled); fl_color_print(data.output.stream, data.context.set.error, "' and '"); - fl_color_print(data.output.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_shared_enabled); + fl_color_print(data.output.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fake_long_shared_enabled); fl_color_print(data.output.stream, data.context.set.error, "' contradict, defaulting to '"); if (setting->build_shared) { - fl_color_print(data.output.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_shared_enabled); + fl_color_print(data.output.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fake_long_shared_enabled); } else { - fl_color_print(data.output.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_shared_disabled); + fl_color_print(data.output.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fake_long_shared_disabled); } fl_color_print(data.output.stream, data.context.set.error, "'."); @@ -2119,16 +2119,16 @@ extern "C" { if (data.error.verbosity == f_console_verbosity_verbose) { fprintf(data.output.stream, "%c", f_string_eol_s[0]); fl_color_print(data.output.stream, data.context.set.error, "%sthe parameters '", fll_error_print_warning); - fl_color_print(data.output.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_static_disabled); + fl_color_print(data.output.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fake_long_static_disabled); fl_color_print(data.output.stream, data.context.set.error, "' and '"); - fl_color_print(data.output.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_static_enabled); + fl_color_print(data.output.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fake_long_static_enabled); fl_color_print(data.output.stream, data.context.set.error, "' contradict, defaulting to '"); if (setting->build_static) { - fl_color_print(data.output.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_static_enabled); + fl_color_print(data.output.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fake_long_static_enabled); } else { - fl_color_print(data.output.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_static_disabled); + fl_color_print(data.output.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fake_long_static_disabled); } fl_color_print(data.output.stream, data.context.set.error, "'."); diff --git a/level_3/fake/c/private-fake.c b/level_3/fake/c/private-fake.c index 3408bbd..df60317 100644 --- a/level_3/fake/c/private-fake.c +++ b/level_3/fake/c/private-fake.c @@ -651,7 +651,7 @@ extern "C" { if (fll_error_print(data->error, F_status_set_fine(status), "f_utf_is_word_dash_plus", F_false) == F_known_not && data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sFailed to process the parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_process); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fake_long_process); fl_color_print(data->error.to.stream, data->context.set.error, "'.%c", f_string_eol_s[0]); } @@ -662,7 +662,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_process); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fake_long_process); fl_color_print(data->error.to.stream, data->context.set.error, "' parameters value '"); fl_color_print(data->error.to.stream, data->context.set.notable, "%s", arguments.argv[location]); fl_color_print(data->error.to.stream, data->context.set.error, "' contains non-word, non-dash, and non-plus characters.%c", f_string_eol_s[0]); @@ -680,7 +680,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, parameters_name[i]); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, parameters_name[i]); fl_color_print(data->error.to.stream, data->context.set.error, "' is too long.%c", f_string_eol_s[0]); } } @@ -699,7 +699,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, parameters_name[i]); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, parameters_name[i]); fl_color_print(data->error.to.stream, data->context.set.error, "' must not be empty and must not contain only whitespace.%c", f_string_eol_s[0]); } } @@ -777,7 +777,7 @@ extern "C" { if (fll_error_print(data->error, F_status_set_fine(status), "fl_console_parameter_to_string_dynamic_directory", F_false) == F_known_not && data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sFailed to process parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, parameters_name[i]); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, parameters_name[i]); fl_color_print(data->error.to.stream, data->context.set.error, "'.%c", f_string_eol_s[0]); } @@ -791,7 +791,7 @@ extern "C" { if (fll_error_print(data->error, F_status_set_fine(status), "f_macro_string_dynamic_t_new", F_false) == F_known_not && data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sFailed to load default for the parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, parameters_name[i]); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, parameters_name[i]); fl_color_print(data->error.to.stream, data->context.set.error, "'.%c", f_string_eol_s[0]); } @@ -811,7 +811,7 @@ extern "C" { if (fll_error_print(data->error, F_status_set_fine(status), "fll_program_parameter_additional_rip", F_false) == F_known_not && data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sFailed to process the parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_define); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fake_long_define); fl_color_print(data->error.to.stream, data->context.set.error, "'.%c", f_string_eol_s[0]); } @@ -834,7 +834,7 @@ extern "C" { if (fll_error_print(data->error, F_status_set_fine(status), "f_utf_is_word", F_false) == F_known_not && data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sFailed to process the parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_define); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fake_long_define); fl_color_print(data->error.to.stream, data->context.set.error, "'.%c", f_string_eol_s[0]); } @@ -845,7 +845,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_define); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fake_long_define); fl_color_print(data->error.to.stream, data->context.set.error, "' parameters value '"); fl_color_print(data->error.to.stream, data->context.set.notable, "%s", data->define.array[i].string); fl_color_print(data->error.to.stream, data->context.set.error, "' contains non-word characters.%c", f_string_eol_s[0]); @@ -868,7 +868,7 @@ extern "C" { if (fll_error_print(data->error, F_status_set_fine(status), "fll_program_parameter_additional_rip", F_false) == F_known_not && data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sFailed to process the parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_mode); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fake_long_mode); fl_color_print(data->error.to.stream, data->context.set.error, "'.%c", f_string_eol_s[0]); } @@ -891,7 +891,7 @@ extern "C" { if (fll_error_print(data->error, F_status_set_fine(status), "f_utf_is_word_dash_plus", F_false) == F_known_not && data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sFailed to process the parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_mode); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fake_long_mode); fl_color_print(data->error.to.stream, data->context.set.error, "'.%c", f_string_eol_s[0]); } @@ -902,7 +902,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_mode); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fake_long_mode); fl_color_print(data->error.to.stream, data->context.set.error, "' parameters value '"); fl_color_print(data->error.to.stream, data->context.set.notable, "%s", data->mode.array[i].string); fl_color_print(data->error.to.stream, data->context.set.error, "' contains non-word, non-dash, and non-plus characters.%c", f_string_eol_s[0]); @@ -1019,7 +1019,7 @@ extern "C" { else if (parameters_required[i]) { fprintf(data.error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data.error.to.stream, data.context.set.error, "%sNo valid path for the (required) directory parameter '", fll_error_print_error); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, parameters_name[i]); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, parameters_name[i]); fl_color_print(data.error.to.stream, data.context.set.error, "' was found.%c", f_string_eol_s[0]); return F_status_set_error(F_directory_found_not); diff --git a/level_3/fake/c/private-make.c b/level_3/fake/c/private-make.c index 92e861f..84c2c4f 100644 --- a/level_3/fake/c/private-make.c +++ b/level_3/fake/c/private-make.c @@ -775,38 +775,38 @@ extern "C" { if (data.context.mode == f_color_mode_no_color) { if (data.parameters[fake_parameter_no_color].type == f_console_type_normal) { - *status = fl_string_append(f_console_symbol_short_enable, 1, &data_make->parameter.color.array[data_make->parameter.color.used]); + *status = fl_string_append(f_console_symbol_short_enable_s, 1, &data_make->parameter.color.array[data_make->parameter.color.used]); } else if (data.parameters[fake_parameter_no_color].type == f_console_type_inverse) { - *status = fl_string_append(f_console_symbol_short_disable, 1, &data_make->parameter.color.array[data_make->parameter.color.used]); + *status = fl_string_append(f_console_symbol_short_disable_s, 1, &data_make->parameter.color.array[data_make->parameter.color.used]); } if (F_status_is_error_not(*status)) { - *status = fl_string_append(f_console_standard_short_no_color, 1, &data_make->parameter.color.array[data_make->parameter.color.used]); + *status = fl_string_append(f_console_standard_short_no_color_s, 1, &data_make->parameter.color.array[data_make->parameter.color.used]); } } else if (data.context.mode == f_color_mode_dark) { if (data.parameters[fake_parameter_dark].type == f_console_type_normal) { - *status = fl_string_append(f_console_symbol_short_enable, 1, &data_make->parameter.color.array[data_make->parameter.color.used]); + *status = fl_string_append(f_console_symbol_short_enable_s, 1, &data_make->parameter.color.array[data_make->parameter.color.used]); } else if (data.parameters[fake_parameter_dark].type == f_console_type_inverse) { - *status = fl_string_append(f_console_symbol_short_disable, 1, &data_make->parameter.color.array[data_make->parameter.color.used]); + *status = fl_string_append(f_console_symbol_short_disable_s, 1, &data_make->parameter.color.array[data_make->parameter.color.used]); } if (F_status_is_error_not(*status)) { - *status = fl_string_append(f_console_standard_short_dark, 1, &data_make->parameter.color.array[data_make->parameter.color.used]); + *status = fl_string_append(f_console_standard_short_dark_s, 1, &data_make->parameter.color.array[data_make->parameter.color.used]); } } else if (data.context.mode == f_color_mode_light) { if (data.parameters[fake_parameter_light].type == f_console_type_normal) { - *status = fl_string_append(f_console_symbol_short_enable, 1, &data_make->parameter.color.array[data_make->parameter.color.used]); + *status = fl_string_append(f_console_symbol_short_enable_s, 1, &data_make->parameter.color.array[data_make->parameter.color.used]); } else if (data.parameters[fake_parameter_light].type == f_console_type_inverse) { - *status = fl_string_append(f_console_symbol_short_disable, 1, &data_make->parameter.color.array[data_make->parameter.color.used]); + *status = fl_string_append(f_console_symbol_short_disable_s, 1, &data_make->parameter.color.array[data_make->parameter.color.used]); } if (F_status_is_error_not(*status)) { - *status = fl_string_append(f_console_standard_short_light, 1, &data_make->parameter.color.array[data_make->parameter.color.used]); + *status = fl_string_append(f_console_standard_short_light_s, 1, &data_make->parameter.color.array[data_make->parameter.color.used]); } } @@ -831,38 +831,38 @@ extern "C" { if (data.error.verbosity == f_console_verbosity_quiet) { if (data.parameters[fake_parameter_verbosity_quiet].type == f_console_type_normal) { - *status = fl_string_append(f_console_symbol_short_enable, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); + *status = fl_string_append(f_console_symbol_short_enable_s, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); } else if (data.parameters[fake_parameter_verbosity_quiet].type == f_console_type_inverse) { - *status = fl_string_append(f_console_symbol_short_disable, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); + *status = fl_string_append(f_console_symbol_short_disable_s, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); } if (F_status_is_error_not(*status)) { - *status = fl_string_append(f_console_standard_short_quiet, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); + *status = fl_string_append(f_console_standard_short_quiet_s, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); } } else if (data.error.verbosity == f_console_verbosity_verbose) { if (data.parameters[fake_parameter_verbosity_verbose].type == f_console_type_normal) { - *status = fl_string_append(f_console_symbol_short_enable, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); + *status = fl_string_append(f_console_symbol_short_enable_s, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); } else if (data.parameters[fake_parameter_verbosity_verbose].type == f_console_type_inverse) { - *status = fl_string_append(f_console_symbol_short_disable, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); + *status = fl_string_append(f_console_symbol_short_disable_s, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); } if (F_status_is_error_not(*status)) { - *status = fl_string_append(f_console_standard_short_verbose, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); + *status = fl_string_append(f_console_standard_short_verbose_s, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); } } else if (data.error.verbosity == f_console_verbosity_debug) { if (data.parameters[fake_parameter_verbosity_debug].type == f_console_type_normal) { - *status = fl_string_append(f_console_symbol_short_enable, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); + *status = fl_string_append(f_console_symbol_short_enable_s, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); } else if (data.parameters[fake_parameter_verbosity_debug].type == f_console_type_inverse) { - *status = fl_string_append(f_console_symbol_short_disable, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); + *status = fl_string_append(f_console_symbol_short_disable_s, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); } if (F_status_is_error_not(*status)) { - *status = fl_string_append(f_console_standard_short_debug, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); + *status = fl_string_append(f_console_standard_short_debug_s, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); } } @@ -913,10 +913,10 @@ extern "C" { } if (console[i]->type == f_console_type_normal) { - *status = fl_string_append(f_console_symbol_short_enable, 1, &destination[i]->array[destination[i]->used]); + *status = fl_string_append(f_console_symbol_short_enable_s, 1, &destination[i]->array[destination[i]->used]); } else if (console[i]->type == f_console_type_inverse) { - *status = fl_string_append(f_console_symbol_short_disable, 1, &destination[i]->array[destination[i]->used]); + *status = fl_string_append(f_console_symbol_short_disable_s, 1, &destination[i]->array[destination[i]->used]); } if (F_status_is_error_not(*status)) { @@ -1006,10 +1006,10 @@ extern "C" { } if (console[i]->type == f_console_type_normal) { - *status = fl_string_append(f_console_symbol_short_enable, 1, &destination[i]->array[destination[i]->used]); + *status = fl_string_append(f_console_symbol_short_enable_s, 1, &destination[i]->array[destination[i]->used]); } else if (console[i]->type == f_console_type_inverse) { - *status = fl_string_append(f_console_symbol_short_disable, 1, &destination[i]->array[destination[i]->used]); + *status = fl_string_append(f_console_symbol_short_disable_s, 1, &destination[i]->array[destination[i]->used]); } if (F_status_is_error_not(*status)) { @@ -1115,14 +1115,14 @@ extern "C" { } if (data_make.setting_make.fail == fake_make_operation_fail_type_exit) { - data_make.error.prefix = fll_error_print_error; + data_make.error.prefix = fll_error_print_error_s; data_make.error.context = data->context.set.error; data_make.error.notable = data->context.set.notable; data_make.error.to.stream = f_type_error; data_make.error.to.id = f_type_descriptor_error; } else if (data_make.setting_make.fail == fake_make_operation_fail_type_warn) { - data_make.error.prefix = fll_error_print_warning; + data_make.error.prefix = fll_error_print_warning_s; data_make.error.context = data->context.set.warning; data_make.error.notable = data->context.set.notable; data_make.error.to.stream = f_type_warning; @@ -1187,8 +1187,8 @@ extern "C" { } } - const f_string_static_t vocabulary_define = f_macro_string_static_t_initialize(iki_vocabulary_0002_define, iki_vocabulary_0002_define_length); - const f_string_static_t vocabulary_parameter = f_macro_string_static_t_initialize(iki_vocabulary_0002_parameter, iki_vocabulary_0002_parameter_length); + const f_string_static_t vocabulary_define = f_macro_string_static_t_initialize(iki_vocabulary_0002_define_s, iki_vocabulary_0002_define_length); + const f_string_static_t vocabulary_parameter = f_macro_string_static_t_initialize(iki_vocabulary_0002_parameter_s, iki_vocabulary_0002_parameter_length); const f_string_range_t range_define = f_macro_string_range_t_initialize(iki_vocabulary_0002_define_length); const f_string_range_t range_parameter = f_macro_string_range_t_initialize(iki_vocabulary_0002_parameter_length); diff --git a/level_3/fake/c/private-print.c b/level_3/fake/c/private-print.c index 25f6433..9142d20 100644 --- a/level_3/fake/c/private-print.c +++ b/level_3/fake/c/private-print.c @@ -279,7 +279,7 @@ extern "C" { fprintf(data.error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data.error.to.stream, data.context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, parameter); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, parameter); fl_color_print(data.error.to.stream, data.context.set.error, "' was specified, but no value was given.%c", f_string_eol_s[0]); } @@ -292,7 +292,7 @@ extern "C" { fprintf(data.error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data.error.to.stream, data.context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, parameter); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, parameter); fl_color_print(data.error.to.stream, data.context.set.error, "' specified too many times.%c", f_string_eol_s[0]); } diff --git a/level_3/fake/data/build/settings b/level_3/fake/data/build/settings index 3e9eb16..d06d128 100644 --- a/level_3/fake/data/build/settings +++ b/level_3/fake/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -lcap -build_libraries-individual -lfll_environment -lfll_error -lfll_execute -lfll_file -lfll_fss -lfll_path -lfll_program -lfl_color -lfl_console -lfl_control_group -lfl_conversion -lfl_directory -lfl_environment -lfl_fss -lfl_iki -lfl_status -lfl_string -lfl_utf -lf_account -lf_capability -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_iki -lf_limit -lf_memory -lf_path -lf_print -lf_signal -lf_thread -lf_utf +build_libraries-individual -lfll_environment -lfll_error -lfll_execute -lfll_file -lfll_fss -lfll_path -lfll_program -lfl_color -lfl_console -lfl_control_group -lfl_conversion -lfl_directory -lfl_environment -lfl_fss -lfl_iki -lfl_status -lfl_string -lfl_utf -lf_account -lf_capability -lf_color -lf_console -lf_control_group -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_iki -lf_limit -lf_memory -lf_path -lf_print -lf_signal -lf_string -lf_thread -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_sources_library fake.c private-fake.c private-clean.c private-build.c private-make.c private-print.c private-skeleton.c diff --git a/level_3/firewall/c/firewall.c b/level_3/firewall/c/firewall.c index 65b2a4f..2f1a54b 100644 --- a/level_3/firewall/c/firewall.c +++ b/level_3/firewall/c/firewall.c @@ -16,15 +16,15 @@ extern "C" { fll_program_print_help_header(output, context, firewall_name_long, firewall_version); - fll_program_print_help_option(output, context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message."); - fll_program_print_help_option(output, context, f_console_standard_short_dark, f_console_standard_long_dark, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on dark backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_light, f_console_standard_long_light, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on light backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_no_color, f_console_standard_long_no_color, f_console_symbol_short_disable, f_console_symbol_long_disable, "Do not output in color."); - fll_program_print_help_option(output, context, f_console_standard_short_quiet, f_console_standard_long_quiet, f_console_symbol_short_disable, f_console_symbol_long_disable, " Decrease verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_normal, f_console_standard_long_normal, f_console_symbol_short_disable, f_console_symbol_long_disable, " Set verbosity to normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_verbose, f_console_standard_long_verbose, f_console_symbol_short_disable, f_console_symbol_long_disable, " Increase verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number."); + fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); + fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color."); + fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number."); fprintf(output.stream, "%c%c", f_string_eol_s[0], f_string_eol_s[0]); fl_color_print(output.stream, context.set.important, " Available Commands: "); @@ -342,7 +342,7 @@ extern "C" { if (F_status_is_error(status)) { status = F_status_set_fine(status); - if (status == F_memory_allocation || status == F_memory_reallocation) { + if (status == F_memory_not) { fl_color_print(data->error.to.stream, data->context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]); } else { @@ -392,7 +392,7 @@ extern "C" { if (F_status_is_error(status)) { status = F_status_set_fine(status); - if (status == F_memory_allocation || status == F_memory_reallocation) { + if (status == F_memory_not) { fl_color_print(data->error.to.stream, data->context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]); } else if (status == F_data_not) { diff --git a/level_3/firewall/c/firewall.h b/level_3/firewall/c/firewall.h index 8c93e00..a3b8201 100644 --- a/level_3/firewall/c/firewall.h +++ b/level_3/firewall/c/firewall.h @@ -52,7 +52,7 @@ extern "C" { #define firewall_major_version "0" #define firewall_minor_version "5" #define firewall_micro_version "3" - #define firewall_version firewall_major_version "." firewall_minor_version "." firewall_micro_version + #define firewall_version firewall_major_version f_string_ascii_period firewall_minor_version f_string_ascii_period firewall_micro_version #endif // _di_firewall_version_ #ifndef _di_firewall_name_ @@ -245,15 +245,15 @@ extern "C" { #define firewall_console_parameter_t_initialize \ { \ - f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_normal, f_console_standard_long_normal, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(0, 0, firewall_command_start, F_false, f_console_type_other), \ f_console_parameter_t_initialize(0, 0, firewall_command_stop, F_false, f_console_type_other), \ f_console_parameter_t_initialize(0, 0, firewall_command_restart, F_false, f_console_type_other), \ diff --git a/level_3/firewall/c/private-firewall.c b/level_3/firewall/c/private-firewall.c index 9200148..927620f 100644 --- a/level_3/firewall/c/private-firewall.c +++ b/level_3/firewall/c/private-firewall.c @@ -600,7 +600,7 @@ f_status_t firewall_perform_commands(const firewall_local_data_t local, const fi else if (status == F_file_descriptor) { fl_color_print(data.error.to.stream, data.context.set.error, "%sFile descriptor error while trying to open the file '%.*s'%c", fll_error_print_error, file_path.used, file_path.string, f_string_eol_s[0]); } - else if (status == F_memory_allocation || status == F_memory_reallocation) { + else if (status == F_memory_not) { fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]); } else { @@ -636,7 +636,7 @@ f_status_t firewall_perform_commands(const firewall_local_data_t local, const fi else if (status == F_file_read) { fl_color_print(data.error.to.stream, data.context.set.error, "%sA read error occurred while accessing the file '%.*s'%c", fll_error_print_error, file_path.used, file_path.string, f_string_eol_s[0]); } - else if (status == F_memory_allocation || status == F_memory_reallocation) { + else if (status == F_memory_not) { fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]); } else { @@ -663,7 +663,7 @@ f_status_t firewall_perform_commands(const firewall_local_data_t local, const fi else if (status == F_data_not_eos || status == F_data_not || status == F_data_not_stop) { // empty files are to be silently ignored } - else if (status == F_memory_allocation || status == F_memory_reallocation) { + else if (status == F_memory_not) { fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]); } else { @@ -1418,7 +1418,7 @@ f_status_t firewall_buffer_rules(const f_string_t filename, const bool optional, else if (status == F_file_read) { fl_color_print(data->error.to.stream, data->context.set.error, "%sA read error occurred while accessing the file '%s'.%c", fll_error_print_error, filename, f_string_eol_s[0]); } - else if (status == F_memory_allocation || status == F_memory_reallocation) { + else if (status == F_memory_not) { fl_color_print(data->error.to.stream, data->context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]); } else { @@ -1446,7 +1446,7 @@ f_status_t firewall_buffer_rules(const f_string_t filename, const bool optional, else if (status == F_data_not_eos || status == F_data_not || status == F_data_not_stop) { fl_color_print(data->error.to.stream, data->context.set.error, "%sNo relevant data was found within the file '%s'.%c", fll_error_print_error, filename, f_string_eol_s[0]); } - else if (status == F_memory_allocation || status == F_memory_reallocation) { + else if (status == F_memory_not) { fl_color_print(data->error.to.stream, data->context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]); } else { @@ -1488,7 +1488,7 @@ f_status_t firewall_process_rules(f_string_range_t *range, firewall_local_data_t if (F_status_is_error(status)) { status = F_status_set_fine(status); - if (status == F_memory_allocation || status == F_memory_reallocation) { + if (status == F_memory_not) { fl_color_print(data->error.to.stream, data->context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]); } else if (status == F_failure) { diff --git a/level_3/firewall/data/build/settings b/level_3/firewall/data/build/settings index f34619c..35e41da 100644 --- a/level_3/firewall/data/build/settings +++ b/level_3/firewall/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -lcap -build_libraries-individual -lfll_error -lfll_execute -lfll_fss -lfll_program -lfl_color -lfl_console -lfl_control_group -lfl_conversion -lfl_environment -lfl_fss -lfl_status -lfl_string -lf_account -lf_capability -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_limit -lf_memory -lf_path -lf_pipe -lf_print -lf_signal -lf_thread -lf_utf +build_libraries-individual -lfll_error -lfll_execute -lfll_fss -lfll_program -lfl_color -lfl_console -lfl_control_group -lfl_conversion -lfl_environment -lfl_fss -lfl_status -lfl_string -lf_account -lf_capability -lf_color -lf_console -lf_control_group -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_limit -lf_memory -lf_path -lf_pipe -lf_print -lf_signal -lf_string -lf_thread -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_sources_library firewall.c private-firewall.c diff --git a/level_3/fss_basic_list_read/c/fss_basic_list_read.c b/level_3/fss_basic_list_read/c/fss_basic_list_read.c index 3d0a8a2..370c3d8 100644 --- a/level_3/fss_basic_list_read/c/fss_basic_list_read.c +++ b/level_3/fss_basic_list_read/c/fss_basic_list_read.c @@ -10,30 +10,30 @@ extern "C" { fll_program_print_help_header(output, context, fss_basic_list_read_name_long, fss_basic_list_read_version); - fll_program_print_help_option(output, context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message."); - fll_program_print_help_option(output, context, f_console_standard_short_dark, f_console_standard_long_dark, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on dark backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_light, f_console_standard_long_light, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on light backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_no_color, f_console_standard_long_no_color, f_console_symbol_short_disable, f_console_symbol_long_disable, "Do not output in color."); - fll_program_print_help_option(output, context, f_console_standard_short_quiet, f_console_standard_long_quiet, f_console_symbol_short_disable, f_console_symbol_long_disable, " Decrease verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_normal, f_console_standard_long_normal, f_console_symbol_short_disable, f_console_symbol_long_disable, " Set verbosity to normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_verbose, f_console_standard_long_verbose, f_console_symbol_short_disable, f_console_symbol_long_disable, " Increase verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number."); + fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); + fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color."); + fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number."); fprintf(output.stream, "%c", f_string_eol_s[0]); - fll_program_print_help_option(output, context, fss_basic_list_read_short_at, fss_basic_list_read_long_at, f_console_symbol_short_enable, f_console_symbol_long_enable, " Select object at this numeric index."); - fll_program_print_help_option(output, context, fss_basic_list_read_short_content, fss_basic_list_read_long_content, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print the content (default)."); - fll_program_print_help_option(output, context, fss_basic_list_read_short_delimit, fss_basic_list_read_long_delimit, f_console_symbol_short_enable, f_console_symbol_long_enable, " Designate how to handle applying delimits."); - fll_program_print_help_option(output, context, fss_basic_list_read_short_depth, fss_basic_list_read_long_depth, f_console_symbol_short_enable, f_console_symbol_long_enable, " Select object at this numeric depth."); - fll_program_print_help_option(output, context, fss_basic_list_read_short_empty, fss_basic_list_read_long_empty, f_console_symbol_short_enable, f_console_symbol_long_enable, " Include empty content when processing."); - fll_program_print_help_option(output, context, fss_basic_list_read_short_line, fss_basic_list_read_long_line, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print only the content at the given line."); - fll_program_print_help_option(output, context, fss_basic_list_read_short_name, fss_basic_list_read_long_name, f_console_symbol_short_enable, f_console_symbol_long_enable, " Select object with this name."); - fll_program_print_help_option(output, context, fss_basic_list_read_short_object, fss_basic_list_read_long_object, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print the object."); - fll_program_print_help_option(output, context, fss_basic_list_read_short_pipe, fss_basic_list_read_long_pipe, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print using the special pipe format."); - fll_program_print_help_option(output, context, fss_basic_list_read_short_select, fss_basic_list_read_long_select, f_console_symbol_short_enable, f_console_symbol_long_enable, " Select sub-content at this index."); - fll_program_print_help_option(output, context, fss_basic_list_read_short_total, fss_basic_list_read_long_total, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print the total number of lines."); - fll_program_print_help_option(output, context, fss_basic_list_read_short_trim, fss_basic_list_read_long_trim, f_console_symbol_short_enable, f_console_symbol_long_enable, " Trim object names on select or print."); + fll_program_print_help_option(output, context, fss_basic_list_read_short_at, fss_basic_list_read_long_at, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select object at this numeric index."); + fll_program_print_help_option(output, context, fss_basic_list_read_short_content, fss_basic_list_read_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the content (default)."); + fll_program_print_help_option(output, context, fss_basic_list_read_short_delimit, fss_basic_list_read_long_delimit, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate how to handle applying delimits."); + fll_program_print_help_option(output, context, fss_basic_list_read_short_depth, fss_basic_list_read_long_depth, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select object at this numeric depth."); + fll_program_print_help_option(output, context, fss_basic_list_read_short_empty, fss_basic_list_read_long_empty, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include empty content when processing."); + fll_program_print_help_option(output, context, fss_basic_list_read_short_line, fss_basic_list_read_long_line, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the content at the given line."); + fll_program_print_help_option(output, context, fss_basic_list_read_short_name, fss_basic_list_read_long_name, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select object with this name."); + fll_program_print_help_option(output, context, fss_basic_list_read_short_object, fss_basic_list_read_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the object."); + fll_program_print_help_option(output, context, fss_basic_list_read_short_pipe, fss_basic_list_read_long_pipe, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print using the special pipe format."); + fll_program_print_help_option(output, context, fss_basic_list_read_short_select, fss_basic_list_read_long_select, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select sub-content at this index."); + fll_program_print_help_option(output, context, fss_basic_list_read_short_total, fss_basic_list_read_long_total, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of lines."); + fll_program_print_help_option(output, context, fss_basic_list_read_short_trim, fss_basic_list_read_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim object names on select or print."); fll_program_print_help_usage(output, context, fss_basic_list_read_name, "filename(s)"); @@ -46,27 +46,27 @@ extern "C" { fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " When using the "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_depth); fprintf(output.stream, " option, an order of operations is enforced on the parameters.%c", f_string_eol_s[0]); fprintf(output.stream, " When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%c", f_string_eol_s[0]); fprintf(output.stream, " "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_at); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_at); fprintf(output.stream, ": An object index at the specified depth.%c", f_string_eol_s[0]); fprintf(output.stream, " "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_depth); fprintf(output.stream, ": A new depth within the specified depth, indexed from the root.%c", f_string_eol_s[0]); fprintf(output.stream, " "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_name); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_name); fprintf(output.stream, ": An object name at the specified depth.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " The parameter "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_depth); fprintf(output.stream, " must be in numeric order, but values in between may be skipped.%c", f_string_eol_s[0]); fprintf(output.stream, " ('-d 0 -a 1 -d 2 -a 2' would specify index 1 at depth 0, any index at depth 1, and index 2 at depth 2.)%c", f_string_eol_s[0]); fprintf(output.stream, " ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c", f_string_eol_s[0]); @@ -74,61 +74,61 @@ extern "C" { fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " The parameter "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_select); fprintf(output.stream, " selects a content index at a given depth.%c", f_string_eol_s[0]); fprintf(output.stream, " (This parameter is not synonymous with the depth parameter and does not relate to nested content).%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " Specify both "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_object); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_object); fprintf(output.stream, " and the "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_total); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_total); fprintf(output.stream, " parameters to get the total objects.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " When both "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_at); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_at); fprintf(output.stream, " and "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_name); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_name); fprintf(output.stream, " parameters are specified (at the same depth), the "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_at); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_at); fprintf(output.stream, " parameter value will be treated as a position relative to the specified "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_name); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_name); fprintf(output.stream, " parameter value.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " This program may support parameters, such as "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_depth); fprintf(output.stream, " or "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_select); fprintf(output.stream, ", even if not supported by the standard.%c", f_string_eol_s[0]); fprintf(output.stream, " This is done to help ensure consistency for scripting.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " For parameters like "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_depth); fprintf(output.stream, ", if the standard doesn't support nested content, then only a depth of 0 would be valid.%c", f_string_eol_s[0]); fprintf(output.stream, " For parameters like "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_select); fprintf(output.stream, ", if the standard doesn't support multiple content groups, then only a select of 0 would be valid.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " The parameter "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_trim); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_trim); fprintf(output.stream, " will remove leading and trailing whitespaces when selecting objects or when printing objects.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " When specifying both the "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_object); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_object); fprintf(output.stream, " parameter and the "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_content); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_content); fprintf(output.stream, " parameter, the entire object and content are printed, including the formatting.%c", f_string_eol_s[0]); fprintf(output.stream, " Both the object and content printed are already escaped.%c", f_string_eol_s[0]); fprintf(output.stream, " Both the object and content are separated by an EOL.%c", f_string_eol_s[0]); @@ -136,7 +136,7 @@ extern "C" { fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " The parameter "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_delimit); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_delimit); fprintf(output.stream, " accepts the following:%c", f_string_eol_s[0]); fprintf(output.stream, " - "); fl_color_print(output.stream, context.set.notable, "%s", fss_basic_list_read_delimit_mode_name_none); @@ -242,7 +242,7 @@ extern "C" { if (data->remaining.used > 0 || data->process_pipe) { if (data->parameters[fss_basic_list_read_parameter_at].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_at); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_at); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -250,7 +250,7 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_basic_list_read_parameter_depth].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_depth); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -258,7 +258,7 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_basic_list_read_parameter_line].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_line); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_line); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -266,7 +266,7 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_basic_list_read_parameter_name].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_name); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_name); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a string.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -274,7 +274,7 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_basic_list_read_parameter_select].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_select); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -283,9 +283,9 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_basic_list_read_parameter_object].result == f_console_result_found) { if (data->parameters[fss_basic_list_read_parameter_line].result == f_console_result_additional) { fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_line); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_line); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -293,9 +293,9 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_basic_list_read_parameter_select].result == f_console_result_additional) { fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_select); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -304,11 +304,11 @@ extern "C" { if (data->parameters[fss_basic_list_read_parameter_content].result == f_console_result_found) { if (F_status_is_error_not(status) && data->parameters[fss_basic_list_read_parameter_total].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify both the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' and the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_content); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_content); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_total); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_total); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -319,9 +319,9 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_basic_list_read_parameter_line].result == f_console_result_additional) { if (data->parameters[fss_basic_list_read_parameter_total].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_line); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_line); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_total); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_total); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -331,9 +331,9 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_basic_list_read_parameter_pipe].result == f_console_result_found) { if (data->parameters[fss_basic_list_read_parameter_total].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_pipe); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_pipe); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_total); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_total); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -343,7 +343,7 @@ extern "C" { if (F_status_is_error_not(status)) { if (data->parameters[fss_basic_list_read_parameter_delimit].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_delimit); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_delimit); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a value.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -354,7 +354,7 @@ extern "C" { if (length == 0) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_delimit); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_delimit); fl_color_print(data->error.to.stream, data->context.set.error, "' must not be empty.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -428,7 +428,7 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_basic_list_read_parameter_select].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_select); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter requires a positive number.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); diff --git a/level_3/fss_basic_list_read/c/fss_basic_list_read.h b/level_3/fss_basic_list_read/c/fss_basic_list_read.h index 4ccb533..4029f21 100644 --- a/level_3/fss_basic_list_read/c/fss_basic_list_read.h +++ b/level_3/fss_basic_list_read/c/fss_basic_list_read.h @@ -53,7 +53,7 @@ extern "C" { #define fss_basic_list_read_major_version "0" #define fss_basic_list_read_minor_version "5" #define fss_basic_list_read_micro_version "3" - #define fss_basic_list_read_version fss_basic_list_read_major_version "." fss_basic_list_read_minor_version "." fss_basic_list_read_micro_version + #define fss_basic_list_read_version fss_basic_list_read_major_version f_string_ascii_period fss_basic_list_read_minor_version f_string_ascii_period fss_basic_list_read_micro_version #endif // _di_fss_basic_list_read_version_ #ifndef _di_fss_basic_list_read_name_ @@ -119,15 +119,15 @@ extern "C" { #define fss_basic_list_read_console_parameter_t_initialize \ { \ - f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_normal, f_console_standard_long_normal, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, F_false, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(fss_basic_list_read_short_at, fss_basic_list_read_long_at, 0, 1, f_console_type_normal), \ f_console_parameter_t_initialize(fss_basic_list_read_short_content, fss_basic_list_read_long_content, 0, 0, f_console_type_normal), \ f_console_parameter_t_initialize(fss_basic_list_read_short_delimit, fss_basic_list_read_long_delimit, 0, 1, f_console_type_normal), \ diff --git a/level_3/fss_basic_list_read/c/private-fss_basic_list_read.c b/level_3/fss_basic_list_read/c/private-fss_basic_list_read.c index 63522da..5f1b946 100644 --- a/level_3/fss_basic_list_read/c/private-fss_basic_list_read.c +++ b/level_3/fss_basic_list_read/c/private-fss_basic_list_read.c @@ -102,12 +102,12 @@ extern "C" { f_status_t status_code = F_status_set_fine(status); // @todo: move error printing into common function. - if (status_code == F_memory_allocation || status_code == F_memory_reallocation) { + if (status_code == F_memory_not) { fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]); } else if (status_code == f_string_length_t_size) { fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to process '", fll_error_print_error); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_trim); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_trim); fl_color_print(data.error.to.stream, data.context.set.error, "' because the maximum buffer size was reached.%c", f_string_eol_s[0]); } else { @@ -129,7 +129,7 @@ extern "C" { if (!depths->array[i].value_name.used) { fl_color_print(data.error.to.stream, data.context.set.error, "%sThe '", fll_error_print_error); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_name); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_name); fl_color_print(data.error.to.stream, data.context.set.error, "' must not be an empty string.%c", f_string_eol_s[0]); return F_status_set_error(F_parameter); @@ -146,14 +146,14 @@ extern "C" { fl_color_print(data.error.to.stream, data.context.set.error, "%sThe value '", fll_error_print_error); fl_color_print(data.error.to.stream, data.context.set.notable, "%llu", depths->array[i].depth); fl_color_print(data.error.to.stream, data.context.set.error, "' may only be specified once for the parameter '"); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_depth); fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol_s[0]); return F_status_set_error(F_parameter); } else if (depths->array[i].depth > depths->array[j].depth) { fl_color_print(data.error.to.stream, data.context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_depth); fl_color_print(data.error.to.stream, data.context.set.error, "' may not have the value '"); fl_color_print(data.error.to.stream, data.context.set.notable, "%llu", depths->array[i].depth); fl_color_print(data.error.to.stream, data.context.set.error, "' before the value '"); diff --git a/level_3/fss_basic_list_read/c/private-fss_basic_list_read.h b/level_3/fss_basic_list_read/c/private-fss_basic_list_read.h index 50ea39d..f53a780 100644 --- a/level_3/fss_basic_list_read/c/private-fss_basic_list_read.h +++ b/level_3/fss_basic_list_read/c/private-fss_basic_list_read.h @@ -71,9 +71,9 @@ extern "C" { #define fss_basic_list_read_depths_t_initialize { 0, 0, 0 } - #define fss_basic_list_read_macro_depths_t_clear(depths) f_macro_memory_structure_t_clear(depths) + #define fss_basic_list_read_macro_depths_t_clear(depths) f_macro_memory_structure_clear(depths) - #define fss_basic_list_read_macro_depths_t_new(status, depths, length) f_macro_memory_structure_t_new(status, depths, fss_basic_list_read_depth_t, length) + #define fss_basic_list_read_macro_depths_t_new(status, depths, length) f_macro_memory_structure_new(status, depths, fss_basic_list_read_depth_t, length) #define fss_basic_list_read_macro_depths_t_delete(status, depths) \ status = F_none; \ @@ -83,7 +83,7 @@ extern "C" { fss_basic_list_read_macro_depth_t_delete(status, depths.array[depths.used]); \ if (status != F_none) break; \ } \ - if (status == F_none) f_macro_memory_structure_t_delete(depths, fss_basic_list_read_depth_t) + if (status == F_none) f_macro_memory_structure_delete(depths, fss_basic_list_read_depth_t) #define fss_basic_list_read_macro_depths_t_delete_simple(depths) \ depths.used = depths.size; \ @@ -91,7 +91,7 @@ extern "C" { depths.used--; \ fss_basic_list_read_macro_depth_t_delete_simple(depths.array[depths.used]); \ } \ - if (!depths.used) f_macro_memory_structure_t_delete_simple(depths, fss_basic_list_read_depth_t) + if (!depths.used) f_macro_memory_structure_delete_simple(depths, fss_basic_list_read_depth_t) #define fss_basic_list_read_macro_depths_t_resize(status, depths, new_length) \ status = F_none; \ diff --git a/level_3/fss_basic_list_read/data/build/settings b/level_3/fss_basic_list_read/data/build/settings index 4b81e30..daa87ad 100644 --- a/level_3/fss_basic_list_read/data/build/settings +++ b/level_3/fss_basic_list_read/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfl_color -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lfl_status -lfl_string -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_utf +build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfl_color -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lfl_status -lfl_string -lf_color -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_string -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_sources_library fss_basic_list_read.c private-fss_basic_list_read.c diff --git a/level_3/fss_basic_list_write/c/fss_basic_list_write.c b/level_3/fss_basic_list_write/c/fss_basic_list_write.c index b74cc4e..65c5d9b 100644 --- a/level_3/fss_basic_list_write/c/fss_basic_list_write.c +++ b/level_3/fss_basic_list_write/c/fss_basic_list_write.c @@ -10,27 +10,27 @@ extern "C" { fll_program_print_help_header(output, context, fss_basic_list_write_name_long, fss_basic_list_write_version); - fll_program_print_help_option(output, context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message."); - fll_program_print_help_option(output, context, f_console_standard_short_dark, f_console_standard_long_dark, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on dark backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_light, f_console_standard_long_light, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on light backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_no_color, f_console_standard_long_no_color, f_console_symbol_short_disable, f_console_symbol_long_disable, "Do not output in color."); - fll_program_print_help_option(output, context, f_console_standard_short_quiet, f_console_standard_long_quiet, f_console_symbol_short_disable, f_console_symbol_long_disable, " Decrease verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_normal, f_console_standard_long_normal, f_console_symbol_short_disable, f_console_symbol_long_disable, " Set verbosity to normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_verbose, f_console_standard_long_verbose, f_console_symbol_short_disable, f_console_symbol_long_disable, " Increase verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number."); + fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); + fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color."); + fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number."); fprintf(output.stream, "%c", f_string_eol_s[0]); - fll_program_print_help_option(output, context, fss_basic_list_write_short_file, fss_basic_list_write_long_file, f_console_symbol_short_enable, f_console_symbol_long_enable, " Specify a file to send output to."); - fll_program_print_help_option(output, context, fss_basic_list_write_short_content, fss_basic_list_write_long_content, f_console_symbol_short_enable, f_console_symbol_long_enable, "The Content to output."); - fll_program_print_help_option(output, context, fss_basic_list_write_short_double, fss_basic_list_write_long_double, f_console_symbol_short_enable, f_console_symbol_long_enable, " Use double quotes (default)."); - fll_program_print_help_option(output, context, fss_basic_list_write_short_ignore, fss_basic_list_write_long_ignore, f_console_symbol_short_enable, f_console_symbol_long_enable, " Ignore a given range within a content."); - fll_program_print_help_option(output, context, fss_basic_list_write_short_object, fss_basic_list_write_long_object, f_console_symbol_short_enable, f_console_symbol_long_enable, " The Object to output."); - fll_program_print_help_option(output, context, fss_basic_list_write_short_partial, fss_basic_list_write_long_partial, f_console_symbol_short_enable, f_console_symbol_long_enable, "Do not output end of Object/Content character."); - fll_program_print_help_option(output, context, fss_basic_list_write_short_prepend, fss_basic_list_write_long_prepend, f_console_symbol_short_enable, f_console_symbol_long_enable, "Prepend the given whitespace characters to the start of each multi-line Content."); - fll_program_print_help_option(output, context, fss_basic_list_write_short_single, fss_basic_list_write_long_single, f_console_symbol_short_enable, f_console_symbol_long_enable, " Use single quotes."); - fll_program_print_help_option(output, context, fss_basic_list_write_short_trim, fss_basic_list_write_long_trim, f_console_symbol_short_enable, f_console_symbol_long_enable, " Trim object names."); + fll_program_print_help_option(output, context, fss_basic_list_write_short_file, fss_basic_list_write_long_file, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a file to send output to."); + fll_program_print_help_option(output, context, fss_basic_list_write_short_content, fss_basic_list_write_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The Content to output."); + fll_program_print_help_option(output, context, fss_basic_list_write_short_double, fss_basic_list_write_long_double, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default)."); + fll_program_print_help_option(output, context, fss_basic_list_write_short_ignore, fss_basic_list_write_long_ignore, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Ignore a given range within a content."); + fll_program_print_help_option(output, context, fss_basic_list_write_short_object, fss_basic_list_write_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The Object to output."); + fll_program_print_help_option(output, context, fss_basic_list_write_short_partial, fss_basic_list_write_long_partial, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Do not output end of Object/Content character."); + fll_program_print_help_option(output, context, fss_basic_list_write_short_prepend, fss_basic_list_write_long_prepend, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Prepend the given whitespace characters to the start of each multi-line Content."); + fll_program_print_help_option(output, context, fss_basic_list_write_short_single, fss_basic_list_write_long_single, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes."); + fll_program_print_help_option(output, context, fss_basic_list_write_short_trim, fss_basic_list_write_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim object names."); fll_program_print_help_usage(output, context, fss_basic_list_write_name, f_string_empty_s); @@ -67,15 +67,15 @@ extern "C" { fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " The FSS-0002 (Basic List) specification does not support quoted names, therefore the parameters '"); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_single); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_write_long_single); fprintf(output.stream, "' and '"); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_double); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_write_long_double); fprintf(output.stream, "' do nothing.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " This program does not use the parameter '"); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_ignore); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_write_long_ignore); fprintf(output.stream, "', which therefore does nothing.%c", f_string_eol_s[0]); fprintf(output.stream, " This parameter requires two values.%c", f_string_eol_s[0]); @@ -178,7 +178,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_file); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_write_long_file); fl_color_print(data->error.to.stream, data->context.set.error, "' may only be specified once.%c", f_string_eol_s[0]); } @@ -197,7 +197,7 @@ extern "C" { } } else if (data->parameters[fss_basic_list_write_parameter_file].result == f_console_result_found) { - fss_basic_list_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable, fss_basic_list_write_long_file); + fss_basic_list_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable_s, fss_basic_list_write_long_file); status = F_status_set_error(F_parameter); } } @@ -206,11 +206,11 @@ extern "C" { if (data->parameters[fss_basic_list_write_parameter_object].locations.used || data->parameters[fss_basic_list_write_parameter_content].locations.used) { if (data->parameters[fss_basic_list_write_parameter_object].locations.used) { if (data->parameters[fss_basic_list_write_parameter_object].locations.used != data->parameters[fss_basic_list_write_parameter_object].values.used) { - fss_basic_list_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable, fss_basic_list_write_long_object); + fss_basic_list_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable_s, fss_basic_list_write_long_object); status = F_status_set_error(F_parameter); } else if (data->parameters[fss_basic_list_write_parameter_content].locations.used != data->parameters[fss_basic_list_write_parameter_content].values.used) { - fss_basic_list_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable, fss_basic_list_write_long_content); + fss_basic_list_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable_s, fss_basic_list_write_long_content); status = F_status_set_error(F_parameter); } else if (data->parameters[fss_basic_list_write_parameter_object].locations.used != data->parameters[fss_basic_list_write_parameter_content].locations.used && data->parameters[fss_basic_list_write_parameter_partial].result == f_console_result_none) { @@ -222,11 +222,11 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_partial); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_write_long_partial); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter only allows either the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_write_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter or the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_content); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_write_long_content); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter, but not both.%c", f_string_eol_s[0]); } @@ -251,9 +251,9 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sEach ", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_write_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter must be specified before a '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_content); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_write_long_content); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); } @@ -266,7 +266,7 @@ extern "C" { } else if (data->parameters[fss_basic_list_write_parameter_content].locations.used) { if (data->parameters[fss_basic_list_write_parameter_content].locations.used != data->parameters[fss_basic_list_write_parameter_content].values.used) { - fss_basic_list_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable, fss_basic_list_write_long_content); + fss_basic_list_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable_s, fss_basic_list_write_long_content); status = F_status_set_error(F_parameter); } else if (!data->parameters[fss_basic_list_write_parameter_partial].locations.used) { @@ -279,9 +279,9 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThis requires either piped data or the use of the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_write_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_content); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_write_long_content); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); } @@ -293,7 +293,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_partial); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_write_long_partial); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter cannot be used when processing a pipe.%c", f_string_eol_s[0]); } @@ -307,7 +307,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_prepend); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_write_long_prepend); fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol_s[0]); } @@ -333,7 +333,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_prepend); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_write_long_prepend); fl_color_print(data->error.to.stream, data->context.set.error, "' must only contain whitespace.%c", f_string_eol_s[0]); } @@ -346,7 +346,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_prepend); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_write_long_prepend); fl_color_print(data->error.to.stream, data->context.set.error, "' must not be an empty string.%c", f_string_eol_s[0]); } @@ -360,7 +360,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_ignore); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_write_long_ignore); fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no values were given.%c", f_string_eol_s[0]); } @@ -373,7 +373,7 @@ extern "C" { if (total_locations * 2 > total_arguments) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_ignore); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_write_long_ignore); fl_color_print(data->error.to.stream, data->context.set.error, "' requires two values.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); diff --git a/level_3/fss_basic_list_write/c/fss_basic_list_write.h b/level_3/fss_basic_list_write/c/fss_basic_list_write.h index ea6edfe..27dc3d2 100644 --- a/level_3/fss_basic_list_write/c/fss_basic_list_write.h +++ b/level_3/fss_basic_list_write/c/fss_basic_list_write.h @@ -46,7 +46,7 @@ extern "C" { #define fss_basic_list_write_major_version "0" #define fss_basic_list_write_minor_version "5" #define fss_basic_list_write_micro_version "3" - #define fss_basic_list_write_version fss_basic_list_write_major_version "." fss_basic_list_write_minor_version "." fss_basic_list_write_micro_version + #define fss_basic_list_write_version fss_basic_list_write_major_version f_string_ascii_period fss_basic_list_write_minor_version f_string_ascii_period fss_basic_list_write_micro_version #endif // _di_fss_basic_list_write_version_ #ifndef _di_fss_basic_list_write_name_ @@ -103,15 +103,15 @@ extern "C" { #define fss_basic_list_write_console_parameter_t_initialize \ { \ - f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_normal, f_console_standard_long_normal, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, F_false, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(fss_basic_list_write_short_file, fss_basic_list_write_long_file, 0, 1, f_console_type_normal), \ f_console_parameter_t_initialize(fss_basic_list_write_short_content, fss_basic_list_write_long_content, 0, 1, f_console_type_normal), \ f_console_parameter_t_initialize(fss_basic_list_write_short_double, fss_basic_list_write_long_double, 0, 0, f_console_type_normal), \ diff --git a/level_3/fss_basic_list_write/c/private-fss_basic_list_write.c b/level_3/fss_basic_list_write/c/private-fss_basic_list_write.c index ec5aff9..808c5b0 100644 --- a/level_3/fss_basic_list_write/c/private-fss_basic_list_write.c +++ b/level_3/fss_basic_list_write/c/private-fss_basic_list_write.c @@ -14,11 +14,11 @@ extern "C" { fprintf(data.error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data.error.to.stream, data.context.set.error, "%sMust specify both the '", fll_error_print_error); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_object); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_write_long_object); fl_color_print(data.error.to.stream, data.context.set.error, "' parameter and the '"); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_content); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_write_long_content); fl_color_print(data.error.to.stream, data.context.set.error, "' parameter the same number of times when not specifying the "); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_partial); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_write_long_partial); fl_color_print(data.error.to.stream, data.context.set.error, "' parameter.%c", f_string_eol_s[0]); } #endif // _di_fss_basic_list_write_error_parameter_same_times_print_ diff --git a/level_3/fss_basic_list_write/data/build/settings b/level_3/fss_basic_list_write/data/build/settings index 7a9917c..ade96c9 100644 --- a/level_3/fss_basic_list_write/data/build/settings +++ b/level_3/fss_basic_list_write/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfl_color -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_status -lfl_string -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_utf +build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfl_color -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_status -lfl_string -lf_color -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_string -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_sources_library fss_basic_list_write.c private-fss_basic_list_write.c diff --git a/level_3/fss_basic_read/c/fss_basic_read.c b/level_3/fss_basic_read/c/fss_basic_read.c index 8d943a2..e7eadf2 100644 --- a/level_3/fss_basic_read/c/fss_basic_read.c +++ b/level_3/fss_basic_read/c/fss_basic_read.c @@ -10,30 +10,30 @@ extern "C" { fll_program_print_help_header(output, context, fss_basic_read_name_long, fss_basic_read_version); - fll_program_print_help_option(output, context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message."); - fll_program_print_help_option(output, context, f_console_standard_short_dark, f_console_standard_long_dark, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on dark backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_light, f_console_standard_long_light, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on light backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_no_color, f_console_standard_long_no_color, f_console_symbol_short_disable, f_console_symbol_long_disable, "Do not output in color."); - fll_program_print_help_option(output, context, f_console_standard_short_quiet, f_console_standard_long_quiet, f_console_symbol_short_disable, f_console_symbol_long_disable, " Decrease verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_normal, f_console_standard_long_normal, f_console_symbol_short_disable, f_console_symbol_long_disable, " Set verbosity to normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_verbose, f_console_standard_long_verbose, f_console_symbol_short_disable, f_console_symbol_long_disable, " Increase verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number."); + fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); + fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color."); + fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number."); fprintf(output.stream, "%c", f_string_eol_s[0]); - fll_program_print_help_option(output, context, fss_basic_read_short_at, fss_basic_read_long_at, f_console_symbol_short_enable, f_console_symbol_long_enable, " Select object at this numeric index."); - fll_program_print_help_option(output, context, fss_basic_read_short_content, fss_basic_read_long_content, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print the content (default)."); - fll_program_print_help_option(output, context, fss_basic_read_short_delimit, fss_basic_read_long_delimit, f_console_symbol_short_enable, f_console_symbol_long_enable, " Designate how to handle applying delimits."); - fll_program_print_help_option(output, context, fss_basic_read_short_depth, fss_basic_read_long_depth, f_console_symbol_short_enable, f_console_symbol_long_enable, " Select object at this numeric depth."); - fll_program_print_help_option(output, context, fss_basic_read_short_empty, fss_basic_read_long_empty, f_console_symbol_short_enable, f_console_symbol_long_enable, " Include empty content when processing."); - fll_program_print_help_option(output, context, fss_basic_read_short_line, fss_basic_read_long_line, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print only the content at the given line."); - fll_program_print_help_option(output, context, fss_basic_read_short_name, fss_basic_read_long_name, f_console_symbol_short_enable, f_console_symbol_long_enable, " Select object with this name."); - fll_program_print_help_option(output, context, fss_basic_read_short_object, fss_basic_read_long_object, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print the object."); - fll_program_print_help_option(output, context, fss_basic_read_short_pipe, fss_basic_read_long_pipe, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print using the special pipe format."); - fll_program_print_help_option(output, context, fss_basic_read_short_select, fss_basic_read_long_select, f_console_symbol_short_enable, f_console_symbol_long_enable, " Select sub-content at this index."); - fll_program_print_help_option(output, context, fss_basic_read_short_total, fss_basic_read_long_total, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print the total number of lines."); - fll_program_print_help_option(output, context, fss_basic_read_short_trim, fss_basic_read_long_trim, f_console_symbol_short_enable, f_console_symbol_long_enable, " Trim object names on select or print."); + fll_program_print_help_option(output, context, fss_basic_read_short_at, fss_basic_read_long_at, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select object at this numeric index."); + fll_program_print_help_option(output, context, fss_basic_read_short_content, fss_basic_read_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the content (default)."); + fll_program_print_help_option(output, context, fss_basic_read_short_delimit, fss_basic_read_long_delimit, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate how to handle applying delimits."); + fll_program_print_help_option(output, context, fss_basic_read_short_depth, fss_basic_read_long_depth, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select object at this numeric depth."); + fll_program_print_help_option(output, context, fss_basic_read_short_empty, fss_basic_read_long_empty, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include empty content when processing."); + fll_program_print_help_option(output, context, fss_basic_read_short_line, fss_basic_read_long_line, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the content at the given line."); + fll_program_print_help_option(output, context, fss_basic_read_short_name, fss_basic_read_long_name, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select object with this name."); + fll_program_print_help_option(output, context, fss_basic_read_short_object, fss_basic_read_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the object."); + fll_program_print_help_option(output, context, fss_basic_read_short_pipe, fss_basic_read_long_pipe, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print using the special pipe format."); + fll_program_print_help_option(output, context, fss_basic_read_short_select, fss_basic_read_long_select, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select sub-content at this index."); + fll_program_print_help_option(output, context, fss_basic_read_short_total, fss_basic_read_long_total, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of lines."); + fll_program_print_help_option(output, context, fss_basic_read_short_trim, fss_basic_read_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim object names on select or print."); fll_program_print_help_usage(output, context, fss_basic_read_name, "filename(s)"); @@ -46,27 +46,27 @@ extern "C" { fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " When using the "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_depth); fprintf(output.stream, " option, an order of operations is enforced on the parameters.%c", f_string_eol_s[0]); fprintf(output.stream, " When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%c", f_string_eol_s[0]); fprintf(output.stream, " "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_at); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_at); fprintf(output.stream, ": An object index at the specified depth.%c", f_string_eol_s[0]); fprintf(output.stream, " "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_depth); fprintf(output.stream, ": A new depth within the specified depth, indexed from the root.%c", f_string_eol_s[0]); fprintf(output.stream, " "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_name); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_name); fprintf(output.stream, ": An object name at the specified depth.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " The parameter "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_depth); fprintf(output.stream, " must be in numeric order, but values in between may be skipped.%c", f_string_eol_s[0]); fprintf(output.stream, " ('-d 0 -a 1 -d 2 -a 2' would specify index 1 at depth 0, any index at depth 1, and index 2 at depth 2.)%c", f_string_eol_s[0]); fprintf(output.stream, " ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c", f_string_eol_s[0]); @@ -74,61 +74,61 @@ extern "C" { fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " The parameter "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_select); fprintf(output.stream, " selects a content index at a given depth.%c", f_string_eol_s[0]); fprintf(output.stream, " (This parameter is not synonymous with the depth parameter and does not relate to nested content).%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " Specify both "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_object); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_object); fprintf(output.stream, " and the "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_total); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_total); fprintf(output.stream, " parameters to get the total objects.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " When both "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_at); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_at); fprintf(output.stream, " and "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_name); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_name); fprintf(output.stream, " parameters are specified (at the same depth), the "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_at); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_at); fprintf(output.stream, " parameter value will be treated as a position relative to the specified "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_name); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_name); fprintf(output.stream, " parameter value.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " This program may support parameters, such as "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_depth); fprintf(output.stream, " or "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_select); fprintf(output.stream, ", even if not supported by the standard.%c", f_string_eol_s[0]); fprintf(output.stream, " This is done to help ensure consistency for scripting.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " For parameters like "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_depth); fprintf(output.stream, ", if the standard doesn't support nested content, then only a depth of 0 would be valid.%c", f_string_eol_s[0]); fprintf(output.stream, " For parameters like "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_select); fprintf(output.stream, ", if the standard doesn't support multiple content groups, then only a select of 0 would be valid.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " The parameter "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_trim); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_trim); fprintf(output.stream, " will remove leading and trailing whitespaces when selecting objects or when printing objects.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " When specifying both the "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_object); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_object); fprintf(output.stream, " parameter and the "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_content); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_content); fprintf(output.stream, " parameter, the entire object and content are printed, including the formatting.%c", f_string_eol_s[0]); fprintf(output.stream, " Both the object and content printed are already escaped.%c", f_string_eol_s[0]); fprintf(output.stream, " Both the object and content are separated by a space.%c", f_string_eol_s[0]); @@ -136,7 +136,7 @@ extern "C" { fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " The parameter "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_delimit); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_delimit); fprintf(output.stream, " accepts the following:%c", f_string_eol_s[0]); fprintf(output.stream, " - "); fl_color_print(output.stream, context.set.notable, "%s", fss_basic_read_delimit_mode_name_none); @@ -242,7 +242,7 @@ extern "C" { if (data->remaining.used > 0 || data->process_pipe) { if (data->parameters[fss_basic_read_parameter_at].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_at); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_at); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -250,7 +250,7 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_basic_read_parameter_depth].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_depth); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -258,7 +258,7 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_basic_read_parameter_line].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_line); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_line); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -266,7 +266,7 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_basic_read_parameter_name].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_name); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_name); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a string.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -274,7 +274,7 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_basic_read_parameter_select].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_select); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -283,9 +283,9 @@ extern "C" { if (data->parameters[fss_basic_read_parameter_object].result == f_console_result_found) { if (F_status_is_error_not(status) && data->parameters[fss_basic_read_parameter_line].result == f_console_result_additional) { fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_line); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_line); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter."); status = F_status_set_error(F_parameter); @@ -293,9 +293,9 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_basic_read_parameter_select].result == f_console_result_additional) { fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_select); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -304,11 +304,11 @@ extern "C" { if (data->parameters[fss_basic_read_parameter_content].result == f_console_result_found) { if (F_status_is_error_not(status) && data->parameters[fss_basic_read_parameter_total].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify both the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' and the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_content); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_content); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_total); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_total); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -319,9 +319,9 @@ extern "C" { if (data->parameters[fss_basic_read_parameter_line].result == f_console_result_additional) { if (F_status_is_error_not(status) && data->parameters[fss_basic_read_parameter_total].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_line); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_line); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_total); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_total); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -331,9 +331,9 @@ extern "C" { if (data->parameters[fss_basic_read_parameter_pipe].result == f_console_result_found) { if (F_status_is_error_not(status) && data->parameters[fss_basic_read_parameter_total].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_pipe); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_pipe); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_total); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_total); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -343,7 +343,7 @@ extern "C" { if (F_status_is_error_not(status)) { if (data->parameters[fss_basic_read_parameter_delimit].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_delimit); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_delimit); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a value.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -354,7 +354,7 @@ extern "C" { if (length == 0) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_delimit); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_delimit); fl_color_print(data->error.to.stream, data->context.set.error, "' must not be empty.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -426,7 +426,7 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_basic_read_parameter_select].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_select); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter requires a positive number.%c", f_string_eol_s[0]); fss_basic_read_macro_depths_t_delete_simple(depths); diff --git a/level_3/fss_basic_read/c/fss_basic_read.h b/level_3/fss_basic_read/c/fss_basic_read.h index 85e3b0b..dcb95ea 100644 --- a/level_3/fss_basic_read/c/fss_basic_read.h +++ b/level_3/fss_basic_read/c/fss_basic_read.h @@ -53,7 +53,7 @@ extern "C" { #define fss_basic_read_major_version "0" #define fss_basic_read_minor_version "5" #define fss_basic_read_micro_version "3" - #define fss_basic_read_version fss_basic_read_major_version "." fss_basic_read_minor_version "." fss_basic_read_micro_version + #define fss_basic_read_version fss_basic_read_major_version f_string_ascii_period fss_basic_read_minor_version f_string_ascii_period fss_basic_read_micro_version #endif // _di_fss_basic_read_version_ #ifndef _di_fss_basic_read_name_ @@ -119,15 +119,15 @@ extern "C" { #define fss_basic_read_console_parameter_t_initialize \ { \ - f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_normal, f_console_standard_long_normal, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, F_false, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(fss_basic_read_short_at, fss_basic_read_long_at, 0, 1, f_console_type_normal), \ f_console_parameter_t_initialize(fss_basic_read_short_content, fss_basic_read_long_content, 0, 0, f_console_type_normal), \ f_console_parameter_t_initialize(fss_basic_read_short_delimit, fss_basic_read_long_delimit, 0, 1, f_console_type_normal), \ diff --git a/level_3/fss_basic_read/c/private-fss_basic_read.c b/level_3/fss_basic_read/c/private-fss_basic_read.c index 91acecb..07cc411 100644 --- a/level_3/fss_basic_read/c/private-fss_basic_read.c +++ b/level_3/fss_basic_read/c/private-fss_basic_read.c @@ -102,12 +102,12 @@ extern "C" { f_status_t status_code = F_status_set_fine(status); // @todo: move error printing into common function. - if (status_code == F_memory_allocation || status_code == F_memory_reallocation) { + if (status_code == F_memory_not) { fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]); } else if (status_code == f_string_length_t_size) { fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to process '", fll_error_print_error); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_trim); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_trim); fl_color_print(data.error.to.stream, data.context.set.error, "' because the maximum buffer size was reached.%c", f_string_eol_s[0]); } else { @@ -129,7 +129,7 @@ extern "C" { if (!depths->array[i].value_name.used) { fl_color_print(data.error.to.stream, data.context.set.error, "%sThe '", fll_error_print_error); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_name); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_name); fl_color_print(data.error.to.stream, data.context.set.error, "' must not be an empty string.%c", f_string_eol_s[0]); return F_status_set_error(F_parameter); @@ -146,14 +146,14 @@ extern "C" { fl_color_print(data.error.to.stream, data.context.set.error, "%sThe value '", fll_error_print_error); fl_color_print(data.error.to.stream, data.context.set.notable, "%llu", depths->array[i].depth); fl_color_print(data.error.to.stream, data.context.set.error, "' may only be specified once for the parameter '"); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_depth); fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol_s[0]); return F_status_set_error(F_parameter); } else if (depths->array[i].depth > depths->array[j].depth) { fl_color_print(data.error.to.stream, data.context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_depth); fl_color_print(data.error.to.stream, data.context.set.error, "' may not have the value '"); fl_color_print(data.error.to.stream, data.context.set.notable, "%llu", depths->array[i].depth); fl_color_print(data.error.to.stream, data.context.set.error, "' before the value '"); diff --git a/level_3/fss_basic_read/c/private-fss_basic_read.h b/level_3/fss_basic_read/c/private-fss_basic_read.h index 0a9b0c1..96f305f 100644 --- a/level_3/fss_basic_read/c/private-fss_basic_read.h +++ b/level_3/fss_basic_read/c/private-fss_basic_read.h @@ -71,9 +71,9 @@ extern "C" { #define fss_basic_read_depths_t_initialize { 0, 0, 0 } - #define fss_basic_read_macro_depths_t_clear(depths) f_macro_memory_structure_t_clear(depths) + #define fss_basic_read_macro_depths_t_clear(depths) f_macro_memory_structure_clear(depths) - #define fss_basic_read_macro_depths_t_new(status, depths, length) f_macro_memory_structure_t_new(status, depths, fss_basic_read_depth_t, length) + #define fss_basic_read_macro_depths_t_new(status, depths, length) f_macro_memory_structure_new(status, depths, fss_basic_read_depth_t, length) #define fss_basic_read_macro_depths_t_delete(status, depths) \ status = F_none; \ @@ -83,7 +83,7 @@ extern "C" { fss_basic_read_macro_depth_t_delete(status, depths.array[depths.used]); \ if (status != F_none) break; \ } \ - if (status == F_none) f_macro_memory_structure_t_delete(depths, fss_basic_read_depth_t) + if (status == F_none) f_macro_memory_structure_delete(depths, fss_basic_read_depth_t) #define fss_basic_read_macro_depths_t_delete_simple(depths) \ depths.used = depths.size; \ @@ -91,7 +91,7 @@ extern "C" { depths.used--; \ fss_basic_read_macro_depth_t_delete_simple(depths.array[depths.used]); \ } \ - if (!depths.used) f_macro_memory_structure_t_delete_simple(depths, fss_basic_read_depth_t) + if (!depths.used) f_macro_memory_structure_delete_simple(depths, fss_basic_read_depth_t) #define fss_basic_read_macro_depths_t_resize(status, depths, new_length) \ status = F_none; \ diff --git a/level_3/fss_basic_read/data/build/settings b/level_3/fss_basic_read/data/build/settings index 9432734..a489fb5 100644 --- a/level_3/fss_basic_read/data/build/settings +++ b/level_3/fss_basic_read/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfl_color -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lfl_status -lfl_string -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_utf +build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfl_color -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lfl_status -lfl_string -lf_color -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_string -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_sources_library fss_basic_read.c private-fss_basic_read.c diff --git a/level_3/fss_basic_write/c/fss_basic_write.c b/level_3/fss_basic_write/c/fss_basic_write.c index 7a0c466..42865e2 100644 --- a/level_3/fss_basic_write/c/fss_basic_write.c +++ b/level_3/fss_basic_write/c/fss_basic_write.c @@ -10,27 +10,27 @@ extern "C" { fll_program_print_help_header(output, context, fss_basic_write_name_long, fss_basic_write_version); - fll_program_print_help_option(output, context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message."); - fll_program_print_help_option(output, context, f_console_standard_short_dark, f_console_standard_long_dark, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on dark backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_light, f_console_standard_long_light, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on light backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_no_color, f_console_standard_long_no_color, f_console_symbol_short_disable, f_console_symbol_long_disable, "Do not output in color."); - fll_program_print_help_option(output, context, f_console_standard_short_quiet, f_console_standard_long_quiet, f_console_symbol_short_disable, f_console_symbol_long_disable, " Decrease verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_normal, f_console_standard_long_normal, f_console_symbol_short_disable, f_console_symbol_long_disable, " Set verbosity to normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_verbose, f_console_standard_long_verbose, f_console_symbol_short_disable, f_console_symbol_long_disable, " Increase verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number."); + fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); + fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color."); + fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number."); fprintf(output.stream, "%c", f_string_eol_s[0]); - fll_program_print_help_option(output, context, fss_basic_write_short_file, fss_basic_write_long_file, f_console_symbol_short_enable, f_console_symbol_long_enable, " Specify a file to send output to."); - fll_program_print_help_option(output, context, fss_basic_write_short_content, fss_basic_write_long_content, f_console_symbol_short_enable, f_console_symbol_long_enable, "The Content to output."); - fll_program_print_help_option(output, context, fss_basic_write_short_double, fss_basic_write_long_double, f_console_symbol_short_enable, f_console_symbol_long_enable, " Use double quotes (default)."); - fll_program_print_help_option(output, context, fss_basic_write_short_ignore, fss_basic_write_long_ignore, f_console_symbol_short_enable, f_console_symbol_long_enable, " Ignore a given range within a content."); - fll_program_print_help_option(output, context, fss_basic_write_short_object, fss_basic_write_long_object, f_console_symbol_short_enable, f_console_symbol_long_enable, " The Object to output."); - fll_program_print_help_option(output, context, fss_basic_write_short_partial, fss_basic_write_long_partial, f_console_symbol_short_enable, f_console_symbol_long_enable, "Do not output end of Object/Content character."); - fll_program_print_help_option(output, context, fss_basic_write_short_prepend, fss_basic_write_long_prepend, f_console_symbol_short_enable, f_console_symbol_long_enable, "Prepend the given whitespace characters to the start of each multi-line Content."); - fll_program_print_help_option(output, context, fss_basic_write_short_single, fss_basic_write_long_single, f_console_symbol_short_enable, f_console_symbol_long_enable, " Use single quotes."); - fll_program_print_help_option(output, context, fss_basic_write_short_trim, fss_basic_write_long_trim, f_console_symbol_short_enable, f_console_symbol_long_enable, " Trim object names."); + fll_program_print_help_option(output, context, fss_basic_write_short_file, fss_basic_write_long_file, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a file to send output to."); + fll_program_print_help_option(output, context, fss_basic_write_short_content, fss_basic_write_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The Content to output."); + fll_program_print_help_option(output, context, fss_basic_write_short_double, fss_basic_write_long_double, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default)."); + fll_program_print_help_option(output, context, fss_basic_write_short_ignore, fss_basic_write_long_ignore, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Ignore a given range within a content."); + fll_program_print_help_option(output, context, fss_basic_write_short_object, fss_basic_write_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The Object to output."); + fll_program_print_help_option(output, context, fss_basic_write_short_partial, fss_basic_write_long_partial, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Do not output end of Object/Content character."); + fll_program_print_help_option(output, context, fss_basic_write_short_prepend, fss_basic_write_long_prepend, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Prepend the given whitespace characters to the start of each multi-line Content."); + fll_program_print_help_option(output, context, fss_basic_write_short_single, fss_basic_write_long_single, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes."); + fll_program_print_help_option(output, context, fss_basic_write_short_trim, fss_basic_write_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim object names."); fll_program_print_help_usage(output, context, fss_basic_write_name, f_string_empty_s); @@ -67,13 +67,13 @@ extern "C" { fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " The FSS-0000 (Basic) specification does not support multi-line Content, therefore the parameter '"); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_prepend); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_write_long_prepend); fprintf(output.stream, "' does nothing.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " This program does not use the parameter '"); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_ignore); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_write_long_ignore); fprintf(output.stream, "', which therefore does nothing.%c", f_string_eol_s[0]); fprintf(output.stream, " This parameter requires two values.%c", f_string_eol_s[0]); @@ -176,7 +176,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_file); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_write_long_file); fl_color_print(data->error.to.stream, data->context.set.error, "' may only be specified once.%c", f_string_eol_s[0]); } @@ -195,7 +195,7 @@ extern "C" { } } else if (data->parameters[fss_basic_write_parameter_file].result == f_console_result_found) { - fss_basic_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable, fss_basic_write_long_file); + fss_basic_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable_s, fss_basic_write_long_file); status = F_status_set_error(F_parameter); } } @@ -204,11 +204,11 @@ extern "C" { if (data->parameters[fss_basic_write_parameter_object].locations.used || data->parameters[fss_basic_write_parameter_content].locations.used) { if (data->parameters[fss_basic_write_parameter_object].locations.used) { if (data->parameters[fss_basic_write_parameter_object].locations.used != data->parameters[fss_basic_write_parameter_object].values.used) { - fss_basic_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable, fss_basic_write_long_object); + fss_basic_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable_s, fss_basic_write_long_object); status = F_status_set_error(F_parameter); } else if (data->parameters[fss_basic_write_parameter_content].locations.used != data->parameters[fss_basic_write_parameter_content].values.used) { - fss_basic_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable, fss_basic_write_long_content); + fss_basic_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable_s, fss_basic_write_long_content); status = F_status_set_error(F_parameter); } else if (data->parameters[fss_basic_write_parameter_object].locations.used != data->parameters[fss_basic_write_parameter_content].locations.used && data->parameters[fss_basic_write_parameter_partial].result == f_console_result_none) { @@ -220,11 +220,11 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_partial); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_write_long_partial); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter only allows either the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_write_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter or the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_content); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_write_long_content); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter, but not both.%c", f_string_eol_s[0]); } @@ -249,9 +249,9 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sEach ", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_write_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter must be specified before a '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_content); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_write_long_content); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); } @@ -264,7 +264,7 @@ extern "C" { } else if (data->parameters[fss_basic_write_parameter_content].locations.used) { if (data->parameters[fss_basic_write_parameter_content].locations.used != data->parameters[fss_basic_write_parameter_content].values.used) { - fss_basic_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable, fss_basic_write_long_content); + fss_basic_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable_s, fss_basic_write_long_content); status = F_status_set_error(F_parameter); } else if (!data->parameters[fss_basic_write_parameter_partial].locations.used) { @@ -277,9 +277,9 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThis requires either piped data or the use of the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_write_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_content); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_write_long_content); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); } @@ -291,7 +291,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_partial); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_write_long_partial); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter cannot be used when processing a pipe.%c", f_string_eol_s[0]); } @@ -305,7 +305,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_prepend); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_write_long_prepend); fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol_s[0]); } @@ -329,7 +329,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_prepend); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_write_long_prepend); fl_color_print(data->error.to.stream, data->context.set.error, "' must only contain whitespace.%c", f_string_eol_s[0]); } @@ -342,7 +342,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_prepend); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_write_long_prepend); fl_color_print(data->error.to.stream, data->context.set.error, "' must not be an empty string.%c", f_string_eol_s[0]); } @@ -356,7 +356,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_ignore); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_write_long_ignore); fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no values were given.%c", f_string_eol_s[0]); } @@ -369,7 +369,7 @@ extern "C" { if (total_locations * 2 > total_arguments) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_ignore); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_write_long_ignore); fl_color_print(data->error.to.stream, data->context.set.error, "' requires two values.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); diff --git a/level_3/fss_basic_write/c/fss_basic_write.h b/level_3/fss_basic_write/c/fss_basic_write.h index 1858749..05440cb 100644 --- a/level_3/fss_basic_write/c/fss_basic_write.h +++ b/level_3/fss_basic_write/c/fss_basic_write.h @@ -47,7 +47,7 @@ extern "C" { #define fss_basic_write_major_version "0" #define fss_basic_write_minor_version "5" #define fss_basic_write_micro_version "3" - #define fss_basic_write_version fss_basic_write_major_version "." fss_basic_write_minor_version "." fss_basic_write_micro_version + #define fss_basic_write_version fss_basic_write_major_version f_string_ascii_period fss_basic_write_minor_version f_string_ascii_period fss_basic_write_micro_version #endif // _di_fss_basic_write_version_ #ifndef _di_fss_basic_write_name_ @@ -104,15 +104,15 @@ extern "C" { #define fss_basic_write_console_parameter_t_initialize \ { \ - f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_normal, f_console_standard_long_normal, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(fss_basic_write_short_file, fss_basic_write_long_file, 0, 1, f_console_type_normal), \ f_console_parameter_t_initialize(fss_basic_write_short_content, fss_basic_write_long_content, 0, 1, f_console_type_normal), \ f_console_parameter_t_initialize(fss_basic_write_short_double, fss_basic_write_long_double, 0, 0, f_console_type_normal), \ diff --git a/level_3/fss_basic_write/c/private-fss_basic_write.c b/level_3/fss_basic_write/c/private-fss_basic_write.c index b710bb3..7cf2f42 100644 --- a/level_3/fss_basic_write/c/private-fss_basic_write.c +++ b/level_3/fss_basic_write/c/private-fss_basic_write.c @@ -14,11 +14,11 @@ extern "C" { fprintf(data.error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data.error.to.stream, data.context.set.error, "%sMust specify both the '", fll_error_print_error); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_object); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_write_long_object); fl_color_print(data.error.to.stream, data.context.set.error, "' parameter and the '"); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_content); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_write_long_content); fl_color_print(data.error.to.stream, data.context.set.error, "' parameter the same number of times when not specifying the "); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_partial); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_write_long_partial); fl_color_print(data.error.to.stream, data.context.set.error, "' parameter.%c", f_string_eol_s[0]); } #endif // _di_fss_basic_write_error_parameter_same_times_print_ diff --git a/level_3/fss_basic_write/data/build/settings b/level_3/fss_basic_write/data/build/settings index 970578c..8112ea9 100644 --- a/level_3/fss_basic_write/data/build/settings +++ b/level_3/fss_basic_write/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfl_color -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_status -lfl_string -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_utf +build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfl_color -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_status -lfl_string -lf_color -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_string -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_sources_library fss_basic_write.c private-fss_basic_write.c diff --git a/level_3/fss_embedded_list_read/c/fss_embedded_list_read.c b/level_3/fss_embedded_list_read/c/fss_embedded_list_read.c index ef82c42..b669b45 100644 --- a/level_3/fss_embedded_list_read/c/fss_embedded_list_read.c +++ b/level_3/fss_embedded_list_read/c/fss_embedded_list_read.c @@ -10,30 +10,30 @@ extern "C" { fll_program_print_help_header(output, context, fss_embedded_list_read_name_long, fss_embedded_list_read_version); - fll_program_print_help_option(output, context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message."); - fll_program_print_help_option(output, context, f_console_standard_short_dark, f_console_standard_long_dark, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on dark backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_light, f_console_standard_long_light, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on light backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_no_color, f_console_standard_long_no_color, f_console_symbol_short_disable, f_console_symbol_long_disable, "Do not output in color."); - fll_program_print_help_option(output, context, f_console_standard_short_quiet, f_console_standard_long_quiet, f_console_symbol_short_disable, f_console_symbol_long_disable, " Decrease verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_normal, f_console_standard_long_normal, f_console_symbol_short_disable, f_console_symbol_long_disable, " Set verbosity to normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_verbose, f_console_standard_long_verbose, f_console_symbol_short_disable, f_console_symbol_long_disable, " Increase verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number."); + fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); + fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color."); + fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number."); fprintf(output.stream, "%c", f_string_eol_s[0]); - fll_program_print_help_option(output, context, fss_embedded_list_read_short_at, fss_embedded_list_read_long_at, f_console_symbol_short_enable, f_console_symbol_long_enable, " Select object at this numeric index."); - fll_program_print_help_option(output, context, fss_embedded_list_read_short_content, fss_embedded_list_read_long_content, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print the content (default)."); - fll_program_print_help_option(output, context, fss_embedded_list_read_short_delimit, fss_embedded_list_read_long_delimit, f_console_symbol_short_enable, f_console_symbol_long_enable, " Designate how to handle applying delimits."); - fll_program_print_help_option(output, context, fss_embedded_list_read_short_depth, fss_embedded_list_read_long_depth, f_console_symbol_short_enable, f_console_symbol_long_enable, " Select object at this numeric depth."); - fll_program_print_help_option(output, context, fss_embedded_list_read_short_empty, fss_embedded_list_read_long_empty, f_console_symbol_short_enable, f_console_symbol_long_enable, " Include empty content when processing."); - fll_program_print_help_option(output, context, fss_embedded_list_read_short_line, fss_embedded_list_read_long_line, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print only the content at the given line."); - fll_program_print_help_option(output, context, fss_embedded_list_read_short_name, fss_embedded_list_read_long_name, f_console_symbol_short_enable, f_console_symbol_long_enable, " Select object with this name."); - fll_program_print_help_option(output, context, fss_embedded_list_read_short_object, fss_embedded_list_read_long_object, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print the object."); - fll_program_print_help_option(output, context, fss_embedded_list_read_short_pipe, fss_embedded_list_read_long_pipe, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print using the special pipe format."); - fll_program_print_help_option(output, context, fss_embedded_list_read_short_select, fss_embedded_list_read_long_select, f_console_symbol_short_enable, f_console_symbol_long_enable, " Select sub-content at this index."); - fll_program_print_help_option(output, context, fss_embedded_list_read_short_total, fss_embedded_list_read_long_total, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print the total number of lines."); - fll_program_print_help_option(output, context, fss_embedded_list_read_short_trim, fss_embedded_list_read_long_trim, f_console_symbol_short_enable, f_console_symbol_long_enable, " Trim object names on select or print."); + fll_program_print_help_option(output, context, fss_embedded_list_read_short_at, fss_embedded_list_read_long_at, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select object at this numeric index."); + fll_program_print_help_option(output, context, fss_embedded_list_read_short_content, fss_embedded_list_read_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the content (default)."); + fll_program_print_help_option(output, context, fss_embedded_list_read_short_delimit, fss_embedded_list_read_long_delimit, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate how to handle applying delimits."); + fll_program_print_help_option(output, context, fss_embedded_list_read_short_depth, fss_embedded_list_read_long_depth, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select object at this numeric depth."); + fll_program_print_help_option(output, context, fss_embedded_list_read_short_empty, fss_embedded_list_read_long_empty, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include empty content when processing."); + fll_program_print_help_option(output, context, fss_embedded_list_read_short_line, fss_embedded_list_read_long_line, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the content at the given line."); + fll_program_print_help_option(output, context, fss_embedded_list_read_short_name, fss_embedded_list_read_long_name, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select object with this name."); + fll_program_print_help_option(output, context, fss_embedded_list_read_short_object, fss_embedded_list_read_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the object."); + fll_program_print_help_option(output, context, fss_embedded_list_read_short_pipe, fss_embedded_list_read_long_pipe, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print using the special pipe format."); + fll_program_print_help_option(output, context, fss_embedded_list_read_short_select, fss_embedded_list_read_long_select, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select sub-content at this index."); + fll_program_print_help_option(output, context, fss_embedded_list_read_short_total, fss_embedded_list_read_long_total, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of lines."); + fll_program_print_help_option(output, context, fss_embedded_list_read_short_trim, fss_embedded_list_read_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim object names on select or print."); fll_program_print_help_usage(output, context, fss_embedded_list_read_name, "filename(s)"); @@ -46,27 +46,27 @@ extern "C" { fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " When using the "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_depth); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth); fprintf(output.stream, " option, an order of operations is enforced on the parameters.%c", f_string_eol_s[0]); fprintf(output.stream, " When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%c", f_string_eol_s[0]); fprintf(output.stream, " "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_at); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_at); fprintf(output.stream, ": An object index at the specified depth.%c", f_string_eol_s[0]); fprintf(output.stream, " "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_depth); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth); fprintf(output.stream, ": A new depth within the specified depth, indexed from the root.%c", f_string_eol_s[0]); fprintf(output.stream, " "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_name); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_name); fprintf(output.stream, ": An object name at the specified depth.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " The parameter "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_depth); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth); fprintf(output.stream, " must be in numeric order, but values in between may be skipped.%c", f_string_eol_s[0]); fprintf(output.stream, " ('-d 0 -a 1 -d 2 -a 2' would specify index 1 at depth 0, any index at depth 1, and index 2 at depth 2.)%c", f_string_eol_s[0]); fprintf(output.stream, " ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c", f_string_eol_s[0]); @@ -74,61 +74,61 @@ extern "C" { fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " The parameter "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_select); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_select); fprintf(output.stream, " selects a content index at a given depth.%c", f_string_eol_s[0]); fprintf(output.stream, " (This parameter is not synonymous with the depth parameter and does not relate to nested content).%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " Specify both "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_object); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_object); fprintf(output.stream, " and the "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_total); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_total); fprintf(output.stream, " parameters to get the total objects.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " When both "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_at); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_at); fprintf(output.stream, " and "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_name); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_name); fprintf(output.stream, " parameters are specified (at the same depth), the "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_at); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_at); fprintf(output.stream, " parameter value will be treated as a position relative to the specified "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_name); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_name); fprintf(output.stream, " parameter value.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " This program may support parameters, such as "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_depth); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth); fprintf(output.stream, " or "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_select); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_select); fprintf(output.stream, ", even if not supported by the standard.%c", f_string_eol_s[0]); fprintf(output.stream, " This is done to help ensure consistency for scripting.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " For parameters like "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_depth); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth); fprintf(output.stream, ", if the standard doesn't support nested content, then only a depth of 0 would be valid.%c", f_string_eol_s[0]); fprintf(output.stream, " For parameters like "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_select); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_select); fprintf(output.stream, ", if the standard doesn't support multiple content groups, then only a select of 0 would be valid.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " The parameter "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_trim); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_trim); fprintf(output.stream, " will remove leading and trailing whitespaces when selecting objects or when printing objects.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " When specifying both the "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_object); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_object); fprintf(output.stream, " parameter and the "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_content); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_content); fprintf(output.stream, " parameter, the entire object and content are printed, including the formatting.%c", f_string_eol_s[0]); fprintf(output.stream, " Both the object and content printed are already escaped.%c", f_string_eol_s[0]); fprintf(output.stream, " Both the object and content are separated by an EOL.%c", f_string_eol_s[0]); @@ -136,7 +136,7 @@ extern "C" { fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " The parameter "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_delimit); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_delimit); fprintf(output.stream, " accepts the following:%c", f_string_eol_s[0]); fprintf(output.stream, " - "); fl_color_print(output.stream, context.set.notable, "%s", fss_embedded_list_read_delimit_mode_name_none); @@ -242,7 +242,7 @@ extern "C" { if (data->remaining.used > 0 || data->process_pipe) { if (data->parameters[fss_embedded_list_read_parameter_at].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_at); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_at); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -250,7 +250,7 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_embedded_list_read_parameter_depth].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_depth); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -258,7 +258,7 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_embedded_list_read_parameter_line].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_line); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_line); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -266,7 +266,7 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_embedded_list_read_parameter_name].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_name); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_name); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a string.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -274,7 +274,7 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_embedded_list_read_parameter_select].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_select); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_select); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -283,9 +283,9 @@ extern "C" { if (data->parameters[fss_embedded_list_read_parameter_object].result == f_console_result_found) { if (F_status_is_error_not(status) && data->parameters[fss_embedded_list_read_parameter_line].result == f_console_result_additional) { fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_line); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_line); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -293,9 +293,9 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_embedded_list_read_parameter_select].result == f_console_result_additional) { fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_select); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_select); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -304,11 +304,11 @@ extern "C" { if (data->parameters[fss_embedded_list_read_parameter_content].result == f_console_result_found) { if (F_status_is_error_not(status) && data->parameters[fss_embedded_list_read_parameter_total].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify both the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' and the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_content); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_content); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_total); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_total); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -319,9 +319,9 @@ extern "C" { if (data->parameters[fss_embedded_list_read_parameter_line].result == f_console_result_additional) { if (F_status_is_error_not(status) && data->parameters[fss_embedded_list_read_parameter_total].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_line); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_line); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_total); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_total); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -331,9 +331,9 @@ extern "C" { if (data->parameters[fss_embedded_list_read_parameter_pipe].result == f_console_result_found) { if (F_status_is_error_not(status) && data->parameters[fss_embedded_list_read_parameter_total].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_pipe); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_pipe); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_total); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_total); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -343,7 +343,7 @@ extern "C" { if (F_status_is_error_not(status)) { if (data->parameters[fss_embedded_list_read_parameter_delimit].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_delimit); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_delimit); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a value.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -354,7 +354,7 @@ extern "C" { if (length == 0) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_delimit); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_delimit); fl_color_print(data->error.to.stream, data->context.set.error, "' must not be empty.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -415,7 +415,7 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_embedded_list_read_parameter_select].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_select); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_select); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter requires a positive number.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); diff --git a/level_3/fss_embedded_list_read/c/fss_embedded_list_read.h b/level_3/fss_embedded_list_read/c/fss_embedded_list_read.h index 69fab16..dd05f25 100644 --- a/level_3/fss_embedded_list_read/c/fss_embedded_list_read.h +++ b/level_3/fss_embedded_list_read/c/fss_embedded_list_read.h @@ -53,7 +53,7 @@ extern "C" { #define fss_embedded_list_read_major_version "0" #define fss_embedded_list_read_minor_version "5" #define fss_embedded_list_read_micro_version "3" - #define fss_embedded_list_read_version fss_embedded_list_read_major_version "." fss_embedded_list_read_minor_version "." fss_embedded_list_read_micro_version + #define fss_embedded_list_read_version fss_embedded_list_read_major_version f_string_ascii_period fss_embedded_list_read_minor_version f_string_ascii_period fss_embedded_list_read_micro_version #endif // _di_fss_embedded_list_read_version_ #ifndef _di_fss_embedded_list_read_name_ @@ -119,15 +119,15 @@ extern "C" { #define fss_embedded_list_read_console_parameter_t_initialize \ { \ - f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_normal, f_console_standard_long_normal, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(fss_embedded_list_read_short_at, fss_embedded_list_read_long_at, 0, 1, f_console_type_normal), \ f_console_parameter_t_initialize(fss_embedded_list_read_short_content, fss_embedded_list_read_long_content, 0, 0, f_console_type_normal), \ f_console_parameter_t_initialize(fss_embedded_list_read_short_delimit, fss_embedded_list_read_long_delimit, 0, 1, f_console_type_normal), \ diff --git a/level_3/fss_embedded_list_read/c/private-fss_embedded_list_read.c b/level_3/fss_embedded_list_read/c/private-fss_embedded_list_read.c index ff93fd5..d34a8d1 100644 --- a/level_3/fss_embedded_list_read/c/private-fss_embedded_list_read.c +++ b/level_3/fss_embedded_list_read/c/private-fss_embedded_list_read.c @@ -191,7 +191,7 @@ extern "C" { fl_color_print(data.error.to.stream, data.context.set.error, "%sThe value '", fll_error_print_error); fl_color_print(data.error.to.stream, data.context.set.notable, "%llu", depths->array[i].depth); fl_color_print(data.error.to.stream, data.context.set.error, "' may only be specified once for the parameter '"); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_depth); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth); fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol_s[0]); return F_status_set_error(F_parameter); @@ -199,7 +199,7 @@ extern "C" { else if (depths->array[i].depth > depths->array[j].depth) { fprintf(data.error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data.error.to.stream, data.context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_depth); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth); fl_color_print(data.error.to.stream, data.context.set.error, "' may not have the value '"); fl_color_print(data.error.to.stream, data.context.set.notable, "%llu", depths->array[i].depth); fl_color_print(data.error.to.stream, data.context.set.error, "' before the value '"); diff --git a/level_3/fss_embedded_list_read/c/private-fss_embedded_list_read.h b/level_3/fss_embedded_list_read/c/private-fss_embedded_list_read.h index 4f59e22..c7f5898 100644 --- a/level_3/fss_embedded_list_read/c/private-fss_embedded_list_read.h +++ b/level_3/fss_embedded_list_read/c/private-fss_embedded_list_read.h @@ -96,9 +96,9 @@ extern "C" { #define fss_embedded_list_read_depths_t_initialize { 0, 0, 0 } - #define fss_embedded_list_read_macro_depths_t_clear(depths) f_macro_memory_structure_t_clear(depths) + #define fss_embedded_list_read_macro_depths_t_clear(depths) f_macro_memory_structure_clear(depths) - #define fss_embedded_list_read_macro_depths_t_new(status, depths, length) f_macro_memory_structure_t_new(status, depths, fss_embedded_list_read_depth_t, length) + #define fss_embedded_list_read_macro_depths_t_new(status, depths, length) f_macro_memory_structure_new(status, depths, fss_embedded_list_read_depth_t, length) #define fss_embedded_list_read_macro_depths_t_delete(status, depths) \ status = F_none; \ @@ -108,7 +108,7 @@ extern "C" { fss_embedded_list_read_macro_depth_t_delete(status, depths.array[depths.used]); \ if (status != F_none) break; \ } \ - if (status == F_none) f_macro_memory_structure_t_delete(depths, fss_embedded_list_read_depth_t) + if (status == F_none) f_macro_memory_structure_delete(depths, fss_embedded_list_read_depth_t) #define fss_embedded_list_read_macro_depths_t_delete_simple(depths) \ depths.used = depths.size; \ @@ -116,7 +116,7 @@ extern "C" { depths.used--; \ fss_embedded_list_read_macro_depth_t_delete_simple(depths.array[depths.used]); \ } \ - if (!depths.used) f_macro_memory_structure_t_delete_simple(depths, fss_embedded_list_read_depth_t) + if (!depths.used) f_macro_memory_structure_delete_simple(depths, fss_embedded_list_read_depth_t) #define fss_embedded_list_read_macro_depths_t_resize(status, depths, new_length) \ status = F_none; \ diff --git a/level_3/fss_embedded_list_read/data/build/settings b/level_3/fss_embedded_list_read/data/build/settings index 5d2cd7a..c6bdc4c 100644 --- a/level_3/fss_embedded_list_read/data/build/settings +++ b/level_3/fss_embedded_list_read/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfl_color -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lfl_status -lfl_string -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_utf +build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfl_color -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lfl_status -lfl_string -lf_color -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_string -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_sources_library fss_embedded_list_read.c private-fss_embedded_list_read.c diff --git a/level_3/fss_embedded_list_write/c/fss_embedded_list_write.c b/level_3/fss_embedded_list_write/c/fss_embedded_list_write.c index 035737e..f9dd742 100644 --- a/level_3/fss_embedded_list_write/c/fss_embedded_list_write.c +++ b/level_3/fss_embedded_list_write/c/fss_embedded_list_write.c @@ -10,27 +10,27 @@ extern "C" { fll_program_print_help_header(output, context, fss_embedded_list_write_name_long, fss_embedded_list_write_version); - fll_program_print_help_option(output, context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message."); - fll_program_print_help_option(output, context, f_console_standard_short_dark, f_console_standard_long_dark, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on dark backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_light, f_console_standard_long_light, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on light backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_no_color, f_console_standard_long_no_color, f_console_symbol_short_disable, f_console_symbol_long_disable, "Do not output in color."); - fll_program_print_help_option(output, context, f_console_standard_short_quiet, f_console_standard_long_quiet, f_console_symbol_short_disable, f_console_symbol_long_disable, " Decrease verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_normal, f_console_standard_long_normal, f_console_symbol_short_disable, f_console_symbol_long_disable, " Set verbosity to normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_verbose, f_console_standard_long_verbose, f_console_symbol_short_disable, f_console_symbol_long_disable, " Increase verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number."); + fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); + fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color."); + fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number."); fprintf(output.stream, "%c", f_string_eol_s[0]); - fll_program_print_help_option(output, context, fss_embedded_list_write_short_file, fss_embedded_list_write_long_file, f_console_symbol_short_enable, f_console_symbol_long_enable, " Specify a file to send output to."); - fll_program_print_help_option(output, context, fss_embedded_list_write_short_content, fss_embedded_list_write_long_content, f_console_symbol_short_enable, f_console_symbol_long_enable, "The Content to output."); - fll_program_print_help_option(output, context, fss_embedded_list_write_short_double, fss_embedded_list_write_long_double, f_console_symbol_short_enable, f_console_symbol_long_enable, " Use double quotes (default)."); - fll_program_print_help_option(output, context, fss_embedded_list_write_short_ignore, fss_embedded_list_write_long_ignore, f_console_symbol_short_enable, f_console_symbol_long_enable, " Ignore a given range within a content."); - fll_program_print_help_option(output, context, fss_embedded_list_write_short_object, fss_embedded_list_write_long_object, f_console_symbol_short_enable, f_console_symbol_long_enable, " The Object to output."); - fll_program_print_help_option(output, context, fss_embedded_list_write_short_partial, fss_embedded_list_write_long_partial, f_console_symbol_short_enable, f_console_symbol_long_enable, "Do not output end of Object/Content character."); - fll_program_print_help_option(output, context, fss_embedded_list_write_short_prepend, fss_embedded_list_write_long_prepend, f_console_symbol_short_enable, f_console_symbol_long_enable, "Prepend the given whitespace characters to the start of each multi-line Content."); - fll_program_print_help_option(output, context, fss_embedded_list_write_short_single, fss_embedded_list_write_long_single, f_console_symbol_short_enable, f_console_symbol_long_enable, " Use single quotes."); - fll_program_print_help_option(output, context, fss_embedded_list_write_short_trim, fss_embedded_list_write_long_trim, f_console_symbol_short_enable, f_console_symbol_long_enable, " Trim object names."); + fll_program_print_help_option(output, context, fss_embedded_list_write_short_file, fss_embedded_list_write_long_file, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a file to send output to."); + fll_program_print_help_option(output, context, fss_embedded_list_write_short_content, fss_embedded_list_write_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The Content to output."); + fll_program_print_help_option(output, context, fss_embedded_list_write_short_double, fss_embedded_list_write_long_double, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default)."); + fll_program_print_help_option(output, context, fss_embedded_list_write_short_ignore, fss_embedded_list_write_long_ignore, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Ignore a given range within a content."); + fll_program_print_help_option(output, context, fss_embedded_list_write_short_object, fss_embedded_list_write_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The Object to output."); + fll_program_print_help_option(output, context, fss_embedded_list_write_short_partial, fss_embedded_list_write_long_partial, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Do not output end of Object/Content character."); + fll_program_print_help_option(output, context, fss_embedded_list_write_short_prepend, fss_embedded_list_write_long_prepend, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Prepend the given whitespace characters to the start of each multi-line Content."); + fll_program_print_help_option(output, context, fss_embedded_list_write_short_single, fss_embedded_list_write_long_single, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes."); + fll_program_print_help_option(output, context, fss_embedded_list_write_short_trim, fss_embedded_list_write_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim object names."); fll_program_print_help_usage(output, context, fss_embedded_list_write_name, f_string_empty_s); @@ -67,22 +67,22 @@ extern "C" { fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " The FSS-0008 (Embedded List) specification does not support quoted names, therefore the parameters '"); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_single); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_write_long_single); fprintf(output.stream, "' and '"); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_double); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_write_long_double); fprintf(output.stream, "' do nothing.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " The parameter '"); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_ignore); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_write_long_ignore); fprintf(output.stream, "' designates to not escape any valid nested Object or Content within some Content.%c", f_string_eol_s[0]); fprintf(output.stream, " This parameter requires two values.%c", f_string_eol_s[0]); fprintf(output.stream, " This parameter is not used for ignoring anything from the input pipe.%c", f_string_eol_s[0]); fprintf(output.stream, " This parameter must be specified after a '"); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_content); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_write_long_content); fprintf(output.stream, "' parameter and this applies only to the Content represented by that specific '"); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_content); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_write_long_content); fprintf(output.stream, "' parameter.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); @@ -184,7 +184,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_file); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_write_long_file); fl_color_print(data->error.to.stream, data->context.set.error, "' may only be specified once.%c", f_string_eol_s[0]); } @@ -203,7 +203,7 @@ extern "C" { } } else if (data->parameters[fss_embedded_list_write_parameter_file].result == f_console_result_found) { - fss_embedded_list_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable, fss_embedded_list_write_long_file); + fss_embedded_list_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable_s, fss_embedded_list_write_long_file); status = F_status_set_error(F_parameter); } } @@ -212,11 +212,11 @@ extern "C" { if (data->parameters[fss_embedded_list_write_parameter_object].locations.used || data->parameters[fss_embedded_list_write_parameter_content].locations.used) { if (data->parameters[fss_embedded_list_write_parameter_object].locations.used) { if (data->parameters[fss_embedded_list_write_parameter_object].locations.used != data->parameters[fss_embedded_list_write_parameter_object].values.used) { - fss_embedded_list_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable, fss_embedded_list_write_long_object); + fss_embedded_list_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable_s, fss_embedded_list_write_long_object); status = F_status_set_error(F_parameter); } else if (data->parameters[fss_embedded_list_write_parameter_content].locations.used != data->parameters[fss_embedded_list_write_parameter_content].values.used) { - fss_embedded_list_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable, fss_embedded_list_write_long_content); + fss_embedded_list_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable_s, fss_embedded_list_write_long_content); status = F_status_set_error(F_parameter); } else if (data->parameters[fss_embedded_list_write_parameter_object].locations.used != data->parameters[fss_embedded_list_write_parameter_content].locations.used && data->parameters[fss_embedded_list_write_parameter_partial].result == f_console_result_none) { @@ -228,11 +228,11 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_partial); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_write_long_partial); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter only allows either the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_write_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter or the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_content); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_write_long_content); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter, but not both.%c", f_string_eol_s[0]); } @@ -257,9 +257,9 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sEach ", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_write_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter must be specified before a '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_content); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_write_long_content); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); } @@ -272,7 +272,7 @@ extern "C" { } else if (data->parameters[fss_embedded_list_write_parameter_content].locations.used) { if (data->parameters[fss_embedded_list_write_parameter_content].locations.used != data->parameters[fss_embedded_list_write_parameter_content].values.used) { - fss_embedded_list_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable, fss_embedded_list_write_long_content); + fss_embedded_list_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable_s, fss_embedded_list_write_long_content); status = F_status_set_error(F_parameter); } else if (!data->parameters[fss_embedded_list_write_parameter_partial].locations.used) { @@ -285,9 +285,9 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThis requires either piped data or the use of the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_write_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_content); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_write_long_content); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); } @@ -299,7 +299,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_partial); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_write_long_partial); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter cannot be used when processing a pipe.%c", f_string_eol_s[0]); } @@ -313,7 +313,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_prepend); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_write_long_prepend); fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol_s[0]); } @@ -339,7 +339,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_prepend); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_write_long_prepend); fl_color_print(data->error.to.stream, data->context.set.error, "' must only contain whitespace.%c", f_string_eol_s[0]); } @@ -352,7 +352,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_prepend); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_write_long_prepend); fl_color_print(data->error.to.stream, data->context.set.error, "' must not be an empty string.%c", f_string_eol_s[0]); } @@ -366,7 +366,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_ignore); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_write_long_ignore); fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no values were given.%c", f_string_eol_s[0]); } @@ -379,7 +379,7 @@ extern "C" { if (total_locations * 2 > total_arguments) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_ignore); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_write_long_ignore); fl_color_print(data->error.to.stream, data->context.set.error, "' requires two values.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); diff --git a/level_3/fss_embedded_list_write/c/fss_embedded_list_write.h b/level_3/fss_embedded_list_write/c/fss_embedded_list_write.h index 537ed62..4341067 100644 --- a/level_3/fss_embedded_list_write/c/fss_embedded_list_write.h +++ b/level_3/fss_embedded_list_write/c/fss_embedded_list_write.h @@ -47,7 +47,7 @@ extern "C" { #define fss_embedded_list_write_major_version "0" #define fss_embedded_list_write_minor_version "5" #define fss_embedded_list_write_micro_version "3" - #define fss_embedded_list_write_version fss_embedded_list_write_major_version "." fss_embedded_list_write_minor_version "." fss_embedded_list_write_micro_version + #define fss_embedded_list_write_version fss_embedded_list_write_major_version f_string_ascii_period fss_embedded_list_write_minor_version f_string_ascii_period fss_embedded_list_write_micro_version #endif // _di_fss_embedded_list_write_version_ #ifndef _di_fss_embedded_list_write_name_ @@ -104,15 +104,15 @@ extern "C" { #define fss_embedded_list_write_console_parameter_t_initialize \ { \ - f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_normal, f_console_standard_long_normal, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, F_false, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(fss_embedded_list_write_short_file, fss_embedded_list_write_long_file, 0, 1, f_console_type_normal), \ f_console_parameter_t_initialize(fss_embedded_list_write_short_content, fss_embedded_list_write_long_content, 0, 1, f_console_type_normal), \ f_console_parameter_t_initialize(fss_embedded_list_write_short_double, fss_embedded_list_write_long_double, 0, 0, f_console_type_normal), \ diff --git a/level_3/fss_embedded_list_write/c/private-fss_embedded_list_write.c b/level_3/fss_embedded_list_write/c/private-fss_embedded_list_write.c index 071978c..720be72 100644 --- a/level_3/fss_embedded_list_write/c/private-fss_embedded_list_write.c +++ b/level_3/fss_embedded_list_write/c/private-fss_embedded_list_write.c @@ -14,11 +14,11 @@ extern "C" { fprintf(data.error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data.error.to.stream, data.context.set.error, "%sMust specify both the '", fll_error_print_error); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_object); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_write_long_object); fl_color_print(data.error.to.stream, data.context.set.error, "' parameter and the '"); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_content); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_write_long_content); fl_color_print(data.error.to.stream, data.context.set.error, "' parameter the same number of times when not specifying the "); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_partial); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_embedded_list_write_long_partial); fl_color_print(data.error.to.stream, data.context.set.error, "' parameter.%c", f_string_eol_s[0]); } #endif // _di_fss_embedded_list_write_error_parameter_same_times_print_ diff --git a/level_3/fss_embedded_list_write/data/build/settings b/level_3/fss_embedded_list_write/data/build/settings index 6f7f22b..c6e934a 100644 --- a/level_3/fss_embedded_list_write/data/build/settings +++ b/level_3/fss_embedded_list_write/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfl_color -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_status -lfl_string -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_utf +build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfl_color -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_status -lfl_string -lf_color -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_string -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_sources_library fss_embedded_list_write.c private-fss_embedded_list_write.c diff --git a/level_3/fss_extended_list_read/c/fss_extended_list_read.c b/level_3/fss_extended_list_read/c/fss_extended_list_read.c index 62780a6..056592e 100644 --- a/level_3/fss_extended_list_read/c/fss_extended_list_read.c +++ b/level_3/fss_extended_list_read/c/fss_extended_list_read.c @@ -10,30 +10,30 @@ extern "C" { fll_program_print_help_header(output, context, fss_extended_list_read_name_long, fss_extended_list_read_version); - fll_program_print_help_option(output, context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message."); - fll_program_print_help_option(output, context, f_console_standard_short_dark, f_console_standard_long_dark, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on dark backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_light, f_console_standard_long_light, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on light backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_no_color, f_console_standard_long_no_color, f_console_symbol_short_disable, f_console_symbol_long_disable, "Do not output in color."); - fll_program_print_help_option(output, context, f_console_standard_short_quiet, f_console_standard_long_quiet, f_console_symbol_short_disable, f_console_symbol_long_disable, " Decrease verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_normal, f_console_standard_long_normal, f_console_symbol_short_disable, f_console_symbol_long_disable, " Set verbosity to normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_verbose, f_console_standard_long_verbose, f_console_symbol_short_disable, f_console_symbol_long_disable, " Increase verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number."); + fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); + fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color."); + fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number."); fprintf(output.stream, "%c", f_string_eol_s[0]); - fll_program_print_help_option(output, context, fss_extended_list_read_short_at, fss_extended_list_read_long_at, f_console_symbol_short_enable, f_console_symbol_long_enable, " Select object at this numeric index."); - fll_program_print_help_option(output, context, fss_extended_list_read_short_content, fss_extended_list_read_long_content, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print the content (default)."); - fll_program_print_help_option(output, context, fss_extended_list_read_short_delimit, fss_extended_list_read_long_delimit, f_console_symbol_short_enable, f_console_symbol_long_enable, " Designate how to handle applying delimits."); - fll_program_print_help_option(output, context, fss_extended_list_read_short_depth, fss_extended_list_read_long_depth, f_console_symbol_short_enable, f_console_symbol_long_enable, " Select object at this numeric depth."); - fll_program_print_help_option(output, context, fss_extended_list_read_short_empty, fss_extended_list_read_long_empty, f_console_symbol_short_enable, f_console_symbol_long_enable, " Include empty content when processing."); - fll_program_print_help_option(output, context, fss_extended_list_read_short_line, fss_extended_list_read_long_line, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print only the content at the given line."); - fll_program_print_help_option(output, context, fss_extended_list_read_short_name, fss_extended_list_read_long_name, f_console_symbol_short_enable, f_console_symbol_long_enable, " Select object with this name."); - fll_program_print_help_option(output, context, fss_extended_list_read_short_object, fss_extended_list_read_long_object, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print the object."); - fll_program_print_help_option(output, context, fss_extended_list_read_short_pipe, fss_extended_list_read_long_pipe, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print using the special pipe format."); - fll_program_print_help_option(output, context, fss_extended_list_read_short_select, fss_extended_list_read_long_select, f_console_symbol_short_enable, f_console_symbol_long_enable, " Select sub-content at this index."); - fll_program_print_help_option(output, context, fss_extended_list_read_short_total, fss_extended_list_read_long_total, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print the total number of lines."); - fll_program_print_help_option(output, context, fss_extended_list_read_short_trim, fss_extended_list_read_long_trim, f_console_symbol_short_enable, f_console_symbol_long_enable, " Trim object names on select or print."); + fll_program_print_help_option(output, context, fss_extended_list_read_short_at, fss_extended_list_read_long_at, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select object at this numeric index."); + fll_program_print_help_option(output, context, fss_extended_list_read_short_content, fss_extended_list_read_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the content (default)."); + fll_program_print_help_option(output, context, fss_extended_list_read_short_delimit, fss_extended_list_read_long_delimit, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate how to handle applying delimits."); + fll_program_print_help_option(output, context, fss_extended_list_read_short_depth, fss_extended_list_read_long_depth, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select object at this numeric depth."); + fll_program_print_help_option(output, context, fss_extended_list_read_short_empty, fss_extended_list_read_long_empty, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include empty content when processing."); + fll_program_print_help_option(output, context, fss_extended_list_read_short_line, fss_extended_list_read_long_line, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the content at the given line."); + fll_program_print_help_option(output, context, fss_extended_list_read_short_name, fss_extended_list_read_long_name, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select object with this name."); + fll_program_print_help_option(output, context, fss_extended_list_read_short_object, fss_extended_list_read_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the object."); + fll_program_print_help_option(output, context, fss_extended_list_read_short_pipe, fss_extended_list_read_long_pipe, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print using the special pipe format."); + fll_program_print_help_option(output, context, fss_extended_list_read_short_select, fss_extended_list_read_long_select, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select sub-content at this index."); + fll_program_print_help_option(output, context, fss_extended_list_read_short_total, fss_extended_list_read_long_total, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of lines."); + fll_program_print_help_option(output, context, fss_extended_list_read_short_trim, fss_extended_list_read_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim object names on select or print."); fll_program_print_help_usage(output, context, fss_extended_list_read_name, "filename(s)"); @@ -46,27 +46,27 @@ extern "C" { fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " When using the "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_depth); fprintf(output.stream, " option, an order of operations is enforced on the parameters.%c", f_string_eol_s[0]); fprintf(output.stream, " When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%c", f_string_eol_s[0]); fprintf(output.stream, " "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_at); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_at); fprintf(output.stream, ": An object index at the specified depth.%c", f_string_eol_s[0]); fprintf(output.stream, " "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_depth); fprintf(output.stream, ": A new depth within the specified depth, indexed from the root.%c", f_string_eol_s[0]); fprintf(output.stream, " "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_name); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_name); fprintf(output.stream, ": An object name at the specified depth.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " The parameter "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_depth); fprintf(output.stream, " must be in numeric order, but values in between may be skipped.%c", f_string_eol_s[0]); fprintf(output.stream, " ('-d 0 -a 1 -d 2 -a 2' would specify index 1 at depth 0, any index at depth 1, and index 2 at depth 2.)%c", f_string_eol_s[0]); fprintf(output.stream, " ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c", f_string_eol_s[0]); @@ -74,61 +74,61 @@ extern "C" { fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " The parameter "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_select); fprintf(output.stream, " selects a content index at a given depth.%c", f_string_eol_s[0]); fprintf(output.stream, " (This parameter is not synonymous with the depth parameter and does not relate to nested content).%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " Specify both "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_object); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_object); fprintf(output.stream, " and the "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_total); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_total); fprintf(output.stream, " parameters to get the total objects.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " When both "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_at); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_at); fprintf(output.stream, " and "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_name); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_name); fprintf(output.stream, " parameters are specified (at the same depth), the "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_at); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_at); fprintf(output.stream, " parameter value will be treated as a position relative to the specified "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_name); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_name); fprintf(output.stream, " parameter value.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " This program may support parameters, such as "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_depth); fprintf(output.stream, " or "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_select); fprintf(output.stream, ", even if not supported by the standard.%c", f_string_eol_s[0]); fprintf(output.stream, " This is done to help ensure consistency for scripting.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " For parameters like "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_depth); fprintf(output.stream, ", if the standard doesn't support nested content, then only a depth of 0 would be valid.%c", f_string_eol_s[0]); fprintf(output.stream, " For parameters like "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_select); fprintf(output.stream, ", if the standard doesn't support multiple content groups, then only a select of 0 would be valid.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " The parameter "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_trim); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_trim); fprintf(output.stream, " will remove leading and trailing whitespaces when selecting objects or when printing objects.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " When specifying both the "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_object); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_object); fprintf(output.stream, " parameter and the "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_content); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_content); fprintf(output.stream, " parameter, the entire object and content are printed, including the formatting.%c", f_string_eol_s[0]); fprintf(output.stream, " Both the object and content printed are already escaped.%c", f_string_eol_s[0]); fprintf(output.stream, " Both the object and content are separated by an EOL.%c", f_string_eol_s[0]); @@ -136,7 +136,7 @@ extern "C" { fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " The parameter "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_delimit); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_delimit); fprintf(output.stream, " accepts the following:%c", f_string_eol_s[0]); fprintf(output.stream, " - "); fl_color_print(output.stream, context.set.notable, "%s", fss_extended_list_read_delimit_mode_name_none); @@ -242,7 +242,7 @@ extern "C" { if (data->remaining.used > 0 || data->process_pipe) { if (data->parameters[fss_extended_list_read_parameter_at].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_at); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_at); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -250,7 +250,7 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_extended_list_read_parameter_depth].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_depth); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -258,7 +258,7 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_extended_list_read_parameter_line].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_line); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_line); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -266,7 +266,7 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_extended_list_read_parameter_name].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_name); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_name); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a string.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -274,7 +274,7 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_extended_list_read_parameter_select].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_select); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -283,9 +283,9 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_extended_list_read_parameter_object].result == f_console_result_found) { if (data->parameters[fss_extended_list_read_parameter_line].result == f_console_result_additional) { fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_line); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_line); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -293,9 +293,9 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_extended_list_read_parameter_select].result == f_console_result_additional) { fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_select); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -304,11 +304,11 @@ extern "C" { if (data->parameters[fss_extended_list_read_parameter_content].result == f_console_result_found) { if (F_status_is_error_not(status) && data->parameters[fss_extended_list_read_parameter_total].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify both the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' and the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_content); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_content); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_total); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_total); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -319,9 +319,9 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_extended_list_read_parameter_line].result == f_console_result_additional) { if (data->parameters[fss_extended_list_read_parameter_total].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_line); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_line); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_total); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_total); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -331,9 +331,9 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_extended_list_read_parameter_pipe].result == f_console_result_found) { if (data->parameters[fss_extended_list_read_parameter_total].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_pipe); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_pipe); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_total); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_total); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -343,7 +343,7 @@ extern "C" { if (F_status_is_error_not(status)) { if (data->parameters[fss_extended_list_read_parameter_delimit].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_delimit); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_delimit); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a value.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -354,7 +354,7 @@ extern "C" { if (length == 0) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_delimit); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_delimit); fl_color_print(data->error.to.stream, data->context.set.error, "' must not be empty.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -428,7 +428,7 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_extended_list_read_parameter_select].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_select); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter requires a positive number.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); diff --git a/level_3/fss_extended_list_read/c/fss_extended_list_read.h b/level_3/fss_extended_list_read/c/fss_extended_list_read.h index ba30800..2bb2747 100644 --- a/level_3/fss_extended_list_read/c/fss_extended_list_read.h +++ b/level_3/fss_extended_list_read/c/fss_extended_list_read.h @@ -53,7 +53,7 @@ extern "C" { #define fss_extended_list_read_major_version "0" #define fss_extended_list_read_minor_version "5" #define fss_extended_list_read_micro_version "3" - #define fss_extended_list_read_version fss_extended_list_read_major_version "." fss_extended_list_read_minor_version "." fss_extended_list_read_micro_version + #define fss_extended_list_read_version fss_extended_list_read_major_version f_string_ascii_period fss_extended_list_read_minor_version f_string_ascii_period fss_extended_list_read_micro_version #endif // _di_fss_extended_list_read_version_ #ifndef _di_fss_extended_list_read_name_ @@ -119,15 +119,15 @@ extern "C" { #define fss_extended_list_read_console_parameter_t_initialize \ { \ - f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_normal, f_console_standard_long_normal, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, F_false, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(fss_extended_list_read_short_at, fss_extended_list_read_long_at, 0, 1, f_console_type_normal), \ f_console_parameter_t_initialize(fss_extended_list_read_short_content, fss_extended_list_read_long_content, 0, 0, f_console_type_normal), \ f_console_parameter_t_initialize(fss_extended_list_read_short_delimit, fss_extended_list_read_long_delimit, 0, 1, f_console_type_normal), \ diff --git a/level_3/fss_extended_list_read/c/private-fss_extended_list_read.c b/level_3/fss_extended_list_read/c/private-fss_extended_list_read.c index c6b7e5f..c919c70 100644 --- a/level_3/fss_extended_list_read/c/private-fss_extended_list_read.c +++ b/level_3/fss_extended_list_read/c/private-fss_extended_list_read.c @@ -102,12 +102,12 @@ extern "C" { f_status_t status_code = F_status_set_fine(status); // @todo: move error printing into common function. - if (status_code == F_memory_allocation || status_code == F_memory_reallocation) { + if (status_code == F_memory_not) { fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]); } else if (status_code == f_string_length_t_size) { fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to process '", fll_error_print_error); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_trim); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_trim); fl_color_print(data.error.to.stream, data.context.set.error, "' because the maximum buffer size was reached.%c", f_string_eol_s[0]); } else { @@ -129,7 +129,7 @@ extern "C" { if (!depths->array[i].value_name.used) { fl_color_print(data.error.to.stream, data.context.set.error, "%sThe '", fll_error_print_error); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_name); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_name); fl_color_print(data.error.to.stream, data.context.set.error, "' must not be an empty string.%c", f_string_eol_s[0]); return F_status_set_error(F_parameter); @@ -146,14 +146,14 @@ extern "C" { fl_color_print(data.error.to.stream, data.context.set.error, "%sThe value '", fll_error_print_error); fl_color_print(data.error.to.stream, data.context.set.notable, "%llu", depths->array[i].depth); fl_color_print(data.error.to.stream, data.context.set.error, "' may only be specified once for the parameter '"); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_depth); fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol_s[0]); return F_status_set_error(F_parameter); } else if (depths->array[i].depth > depths->array[j].depth) { fl_color_print(data.error.to.stream, data.context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_depth); fl_color_print(data.error.to.stream, data.context.set.error, "' may not have the value '"); fl_color_print(data.error.to.stream, data.context.set.notable, "%llu", depths->array[i].depth); fl_color_print(data.error.to.stream, data.context.set.error, "' before the value '"); diff --git a/level_3/fss_extended_list_read/c/private-fss_extended_list_read.h b/level_3/fss_extended_list_read/c/private-fss_extended_list_read.h index 44685dc..039513b 100644 --- a/level_3/fss_extended_list_read/c/private-fss_extended_list_read.h +++ b/level_3/fss_extended_list_read/c/private-fss_extended_list_read.h @@ -71,9 +71,9 @@ extern "C" { #define fss_extended_list_read_depths_t_initialize { 0, 0, 0 } - #define fss_extended_list_read_macro_depths_t_clear(depths) f_macro_memory_structure_t_clear(depths) + #define fss_extended_list_read_macro_depths_t_clear(depths) f_macro_memory_structure_clear(depths) - #define fss_extended_list_read_macro_depths_t_new(status, depths, length) f_macro_memory_structure_t_new(status, depths, fss_extended_list_read_depth_t, length) + #define fss_extended_list_read_macro_depths_t_new(status, depths, length) f_macro_memory_structure_new(status, depths, fss_extended_list_read_depth_t, length) #define fss_extended_list_read_macro_depths_t_delete(status, depths) \ status = F_none; \ @@ -83,7 +83,7 @@ extern "C" { fss_extended_list_read_macro_depth_t_delete(status, depths.array[depths.used]); \ if (status != F_none) break; \ } \ - if (status == F_none) f_macro_memory_structure_t_delete(depths, fss_extended_list_read_depth_t) + if (status == F_none) f_macro_memory_structure_delete(depths, fss_extended_list_read_depth_t) #define fss_extended_list_read_macro_depths_t_delete_simple(depths) \ depths.used = depths.size; \ @@ -91,7 +91,7 @@ extern "C" { depths.used--; \ fss_extended_list_read_macro_depth_t_delete_simple(depths.array[depths.used]); \ } \ - if (!depths.used) f_macro_memory_structure_t_delete_simple(depths, fss_extended_list_read_depth_t) + if (!depths.used) f_macro_memory_structure_delete_simple(depths, fss_extended_list_read_depth_t) #define fss_extended_list_read_macro_depths_t_resize(status, depths, new_length) \ status = F_none; \ diff --git a/level_3/fss_extended_list_read/data/build/settings b/level_3/fss_extended_list_read/data/build/settings index 7b38df5..af71054 100644 --- a/level_3/fss_extended_list_read/data/build/settings +++ b/level_3/fss_extended_list_read/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfl_color -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lfl_status -lfl_string -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_utf +build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfl_color -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lfl_status -lfl_string -lf_color -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_string -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_sources_library fss_extended_list_read.c private-fss_extended_list_read.c diff --git a/level_3/fss_extended_list_write/c/fss_extended_list_write.c b/level_3/fss_extended_list_write/c/fss_extended_list_write.c index cfc126a..8527d6e 100644 --- a/level_3/fss_extended_list_write/c/fss_extended_list_write.c +++ b/level_3/fss_extended_list_write/c/fss_extended_list_write.c @@ -10,27 +10,27 @@ extern "C" { fll_program_print_help_header(output, context, fss_extended_list_write_name_long, fss_extended_list_write_version); - fll_program_print_help_option(output, context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message."); - fll_program_print_help_option(output, context, f_console_standard_short_dark, f_console_standard_long_dark, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on dark backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_light, f_console_standard_long_light, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on light backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_no_color, f_console_standard_long_no_color, f_console_symbol_short_disable, f_console_symbol_long_disable, "Do not output in color."); - fll_program_print_help_option(output, context, f_console_standard_short_quiet, f_console_standard_long_quiet, f_console_symbol_short_disable, f_console_symbol_long_disable, " Decrease verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_normal, f_console_standard_long_normal, f_console_symbol_short_disable, f_console_symbol_long_disable, " Set verbosity to normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_verbose, f_console_standard_long_verbose, f_console_symbol_short_disable, f_console_symbol_long_disable, " Increase verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number."); + fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); + fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color."); + fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number."); fprintf(output.stream, "%c", f_string_eol_s[0]); - fll_program_print_help_option(output, context, fss_extended_list_write_short_file, fss_extended_list_write_long_file, f_console_symbol_short_enable, f_console_symbol_long_enable, " Specify a file to send output to."); - fll_program_print_help_option(output, context, fss_extended_list_write_short_content, fss_extended_list_write_long_content, f_console_symbol_short_enable, f_console_symbol_long_enable, "The Content to output."); - fll_program_print_help_option(output, context, fss_extended_list_write_short_double, fss_extended_list_write_long_double, f_console_symbol_short_enable, f_console_symbol_long_enable, " Use double quotes (default)."); - fll_program_print_help_option(output, context, fss_extended_list_write_short_ignore, fss_extended_list_write_long_ignore, f_console_symbol_short_enable, f_console_symbol_long_enable, " Ignore a given range within a content."); - fll_program_print_help_option(output, context, fss_extended_list_write_short_object, fss_extended_list_write_long_object, f_console_symbol_short_enable, f_console_symbol_long_enable, " The Object to output."); - fll_program_print_help_option(output, context, fss_extended_list_write_short_partial, fss_extended_list_write_long_partial, f_console_symbol_short_enable, f_console_symbol_long_enable, "Do not output end of Object/Content character."); - fll_program_print_help_option(output, context, fss_extended_list_write_short_prepend, fss_extended_list_write_long_prepend, f_console_symbol_short_enable, f_console_symbol_long_enable, "Prepend the given whitespace characters to the start of each multi-line Content."); - fll_program_print_help_option(output, context, fss_extended_list_write_short_single, fss_extended_list_write_long_single, f_console_symbol_short_enable, f_console_symbol_long_enable, " Use single quotes."); - fll_program_print_help_option(output, context, fss_extended_list_write_short_trim, fss_extended_list_write_long_trim, f_console_symbol_short_enable, f_console_symbol_long_enable, " Trim object names."); + fll_program_print_help_option(output, context, fss_extended_list_write_short_file, fss_extended_list_write_long_file, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a file to send output to."); + fll_program_print_help_option(output, context, fss_extended_list_write_short_content, fss_extended_list_write_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The Content to output."); + fll_program_print_help_option(output, context, fss_extended_list_write_short_double, fss_extended_list_write_long_double, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default)."); + fll_program_print_help_option(output, context, fss_extended_list_write_short_ignore, fss_extended_list_write_long_ignore, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Ignore a given range within a content."); + fll_program_print_help_option(output, context, fss_extended_list_write_short_object, fss_extended_list_write_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The Object to output."); + fll_program_print_help_option(output, context, fss_extended_list_write_short_partial, fss_extended_list_write_long_partial, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Do not output end of Object/Content character."); + fll_program_print_help_option(output, context, fss_extended_list_write_short_prepend, fss_extended_list_write_long_prepend, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Prepend the given whitespace characters to the start of each multi-line Content."); + fll_program_print_help_option(output, context, fss_extended_list_write_short_single, fss_extended_list_write_long_single, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes."); + fll_program_print_help_option(output, context, fss_extended_list_write_short_trim, fss_extended_list_write_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim object names."); fll_program_print_help_usage(output, context, fss_extended_list_write_name, f_string_empty_s); @@ -67,22 +67,22 @@ extern "C" { fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " The FSS-0003 (Extended List) specification does not support quoted names, therefore the parameters '"); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_single); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_write_long_single); fprintf(output.stream, "' and '"); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_double); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_write_long_double); fprintf(output.stream, "' do nothing.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " The parameter '"); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_ignore); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_write_long_ignore); fprintf(output.stream, "' designates to not escape any valid nested Object or Content within some Content.%c", f_string_eol_s[0]); fprintf(output.stream, " This parameter requires two values.%c", f_string_eol_s[0]); fprintf(output.stream, " This parameter is not used for ignoring anything from the input pipe.%c", f_string_eol_s[0]); fprintf(output.stream, " This parameter must be specified after a '"); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_content); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_write_long_content); fprintf(output.stream, "' parameter and this applies only to the Content represented by that specific '"); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_content); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_write_long_content); fprintf(output.stream, "' parameter.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); @@ -184,7 +184,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_file); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_write_long_file); fl_color_print(data->error.to.stream, data->context.set.error, "' may only be specified once.%c", f_string_eol_s[0]); } @@ -203,7 +203,7 @@ extern "C" { } } else if (data->parameters[fss_extended_list_write_parameter_file].result == f_console_result_found) { - fss_extended_list_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable, fss_extended_list_write_long_file); + fss_extended_list_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable_s, fss_extended_list_write_long_file); status = F_status_set_error(F_parameter); } } @@ -212,11 +212,11 @@ extern "C" { if (data->parameters[fss_extended_list_write_parameter_object].locations.used || data->parameters[fss_extended_list_write_parameter_content].locations.used) { if (data->parameters[fss_extended_list_write_parameter_object].locations.used) { if (data->parameters[fss_extended_list_write_parameter_object].locations.used != data->parameters[fss_extended_list_write_parameter_object].values.used) { - fss_extended_list_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable, fss_extended_list_write_long_object); + fss_extended_list_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable_s, fss_extended_list_write_long_object); status = F_status_set_error(F_parameter); } else if (data->parameters[fss_extended_list_write_parameter_content].locations.used != data->parameters[fss_extended_list_write_parameter_content].values.used) { - fss_extended_list_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable, fss_extended_list_write_long_content); + fss_extended_list_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable_s, fss_extended_list_write_long_content); status = F_status_set_error(F_parameter); } else if (data->parameters[fss_extended_list_write_parameter_object].locations.used != data->parameters[fss_extended_list_write_parameter_content].locations.used && data->parameters[fss_extended_list_write_parameter_partial].result == f_console_result_none) { @@ -228,11 +228,11 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_partial); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_write_long_partial); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter only allows either the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_write_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter or the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_content); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_write_long_content); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter, but not both.%c", f_string_eol_s[0]); } @@ -257,9 +257,9 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sEach ", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_write_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter must be specified before a '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_content); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_write_long_content); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); } @@ -272,7 +272,7 @@ extern "C" { } else if (data->parameters[fss_extended_list_write_parameter_content].locations.used) { if (data->parameters[fss_extended_list_write_parameter_content].locations.used != data->parameters[fss_extended_list_write_parameter_content].values.used) { - fss_extended_list_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable, fss_extended_list_write_long_content); + fss_extended_list_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable_s, fss_extended_list_write_long_content); status = F_status_set_error(F_parameter); } else if (!data->parameters[fss_extended_list_write_parameter_partial].locations.used) { @@ -285,9 +285,9 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThis requires either piped data or the use of the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_write_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_content); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_write_long_content); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); } @@ -299,7 +299,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_partial); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_write_long_partial); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter cannot be used when processing a pipe.%c", f_string_eol_s[0]); } @@ -313,7 +313,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_prepend); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_write_long_prepend); fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol_s[0]); } @@ -339,7 +339,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_prepend); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_write_long_prepend); fl_color_print(data->error.to.stream, data->context.set.error, "' must only contain whitespace.%c", f_string_eol_s[0]); } @@ -352,7 +352,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_prepend); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_write_long_prepend); fl_color_print(data->error.to.stream, data->context.set.error, "' must not be an empty string.%c", f_string_eol_s[0]); } @@ -366,7 +366,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_ignore); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_write_long_ignore); fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no values were given.%c", f_string_eol_s[0]); } @@ -379,7 +379,7 @@ extern "C" { if (total_locations * 2 > total_arguments) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_ignore); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_write_long_ignore); fl_color_print(data->error.to.stream, data->context.set.error, "' requires two values.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); diff --git a/level_3/fss_extended_list_write/c/fss_extended_list_write.h b/level_3/fss_extended_list_write/c/fss_extended_list_write.h index 089da84..9d462f3 100644 --- a/level_3/fss_extended_list_write/c/fss_extended_list_write.h +++ b/level_3/fss_extended_list_write/c/fss_extended_list_write.h @@ -47,7 +47,7 @@ extern "C" { #define fss_extended_list_write_major_version "0" #define fss_extended_list_write_minor_version "5" #define fss_extended_list_write_micro_version "3" - #define fss_extended_list_write_version fss_extended_list_write_major_version "." fss_extended_list_write_minor_version "." fss_extended_list_write_micro_version + #define fss_extended_list_write_version fss_extended_list_write_major_version f_string_ascii_period fss_extended_list_write_minor_version f_string_ascii_period fss_extended_list_write_micro_version #endif // _di_fss_extended_list_write_version_ #ifndef _di_fss_extended_list_write_name_ @@ -104,15 +104,15 @@ extern "C" { #define fss_extended_list_write_console_parameter_t_initialize \ { \ - f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_normal, f_console_standard_long_normal, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, F_false, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(fss_extended_list_write_short_file, fss_extended_list_write_long_file, 0, 1, f_console_type_normal), \ f_console_parameter_t_initialize(fss_extended_list_write_short_content, fss_extended_list_write_long_content, 0, 1, f_console_type_normal), \ f_console_parameter_t_initialize(fss_extended_list_write_short_double, fss_extended_list_write_long_double, 0, 0, f_console_type_normal), \ diff --git a/level_3/fss_extended_list_write/c/private-fss_extended_list_write.c b/level_3/fss_extended_list_write/c/private-fss_extended_list_write.c index c0eeff5..9f02571 100644 --- a/level_3/fss_extended_list_write/c/private-fss_extended_list_write.c +++ b/level_3/fss_extended_list_write/c/private-fss_extended_list_write.c @@ -14,11 +14,11 @@ extern "C" { fprintf(data.error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data.error.to.stream, data.context.set.error, "%sMust specify both the '", fll_error_print_error); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_object); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_write_long_object); fl_color_print(data.error.to.stream, data.context.set.error, "' parameter and the '"); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_content); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_write_long_content); fl_color_print(data.error.to.stream, data.context.set.error, "' parameter the same number of times when not specifying the "); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_partial); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_write_long_partial); fl_color_print(data.error.to.stream, data.context.set.error, "' parameter.%c", f_string_eol_s[0]); } #endif // _di_fss_extended_list_write_error_parameter_same_times_print_ diff --git a/level_3/fss_extended_list_write/data/build/settings b/level_3/fss_extended_list_write/data/build/settings index 736ae0f..25b8bd6 100644 --- a/level_3/fss_extended_list_write/data/build/settings +++ b/level_3/fss_extended_list_write/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfl_color -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_status -lfl_string -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_utf +build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfl_color -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_status -lfl_string -lf_color -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_string -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_sources_library fss_extended_list_write.c private-fss_extended_list_write.c diff --git a/level_3/fss_extended_read/c/fss_extended_read.c b/level_3/fss_extended_read/c/fss_extended_read.c index 24dcccf..c5f8d80 100644 --- a/level_3/fss_extended_read/c/fss_extended_read.c +++ b/level_3/fss_extended_read/c/fss_extended_read.c @@ -10,30 +10,30 @@ extern "C" { fll_program_print_help_header(output, context, fss_extended_read_name_long, fss_extended_read_version); - fll_program_print_help_option(output, context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message."); - fll_program_print_help_option(output, context, f_console_standard_short_dark, f_console_standard_long_dark, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on dark backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_light, f_console_standard_long_light, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on light backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_no_color, f_console_standard_long_no_color, f_console_symbol_short_disable, f_console_symbol_long_disable, "Do not output in color."); - fll_program_print_help_option(output, context, f_console_standard_short_quiet, f_console_standard_long_quiet, f_console_symbol_short_disable, f_console_symbol_long_disable, " Decrease verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_normal, f_console_standard_long_normal, f_console_symbol_short_disable, f_console_symbol_long_disable, " Set verbosity to normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_verbose, f_console_standard_long_verbose, f_console_symbol_short_disable, f_console_symbol_long_disable, " Increase verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number."); + fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); + fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color."); + fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number."); fprintf(output.stream, "%c", f_string_eol_s[0]); - fll_program_print_help_option(output, context, fss_extended_read_short_at, fss_extended_read_long_at, f_console_symbol_short_enable, f_console_symbol_long_enable, " Select object at this numeric index."); - fll_program_print_help_option(output, context, fss_extended_read_short_content, fss_extended_read_long_content, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print the content (default)."); - fll_program_print_help_option(output, context, fss_extended_read_short_delimit, fss_extended_read_long_delimit, f_console_symbol_short_enable, f_console_symbol_long_enable, " Designate how to handle applying delimits."); - fll_program_print_help_option(output, context, fss_extended_read_short_depth, fss_extended_read_long_depth, f_console_symbol_short_enable, f_console_symbol_long_enable, " Select object at this numeric depth."); - fll_program_print_help_option(output, context, fss_extended_read_short_empty, fss_extended_read_long_empty, f_console_symbol_short_enable, f_console_symbol_long_enable, " Include empty content when processing."); - fll_program_print_help_option(output, context, fss_extended_read_short_line, fss_extended_read_long_line, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print only the content at the given line."); - fll_program_print_help_option(output, context, fss_extended_read_short_name, fss_extended_read_long_name, f_console_symbol_short_enable, f_console_symbol_long_enable, " Select object with this name."); - fll_program_print_help_option(output, context, fss_extended_read_short_object, fss_extended_read_long_object, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print the object."); - fll_program_print_help_option(output, context, fss_extended_read_short_pipe, fss_extended_read_long_pipe, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print using the special pipe format."); - fll_program_print_help_option(output, context, fss_extended_read_short_select, fss_extended_read_long_select, f_console_symbol_short_enable, f_console_symbol_long_enable, " Select sub-content at this index."); - fll_program_print_help_option(output, context, fss_extended_read_short_total, fss_extended_read_long_total, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print the total number of lines."); - fll_program_print_help_option(output, context, fss_extended_read_short_trim, fss_extended_read_long_trim, f_console_symbol_short_enable, f_console_symbol_long_enable, " Trim object names on select or print."); + fll_program_print_help_option(output, context, fss_extended_read_short_at, fss_extended_read_long_at, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select object at this numeric index."); + fll_program_print_help_option(output, context, fss_extended_read_short_content, fss_extended_read_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the content (default)."); + fll_program_print_help_option(output, context, fss_extended_read_short_delimit, fss_extended_read_long_delimit, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate how to handle applying delimits."); + fll_program_print_help_option(output, context, fss_extended_read_short_depth, fss_extended_read_long_depth, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select object at this numeric depth."); + fll_program_print_help_option(output, context, fss_extended_read_short_empty, fss_extended_read_long_empty, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include empty content when processing."); + fll_program_print_help_option(output, context, fss_extended_read_short_line, fss_extended_read_long_line, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the content at the given line."); + fll_program_print_help_option(output, context, fss_extended_read_short_name, fss_extended_read_long_name, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select object with this name."); + fll_program_print_help_option(output, context, fss_extended_read_short_object, fss_extended_read_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the object."); + fll_program_print_help_option(output, context, fss_extended_read_short_pipe, fss_extended_read_long_pipe, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print using the special pipe format."); + fll_program_print_help_option(output, context, fss_extended_read_short_select, fss_extended_read_long_select, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select sub-content at this index."); + fll_program_print_help_option(output, context, fss_extended_read_short_total, fss_extended_read_long_total, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of lines."); + fll_program_print_help_option(output, context, fss_extended_read_short_trim, fss_extended_read_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim object names on select or print."); fll_program_print_help_usage(output, context, fss_extended_read_name, "filename(s)"); @@ -46,27 +46,27 @@ extern "C" { fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " When using the "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_depth); fprintf(output.stream, " option, an order of operations is enforced on the parameters.%c", f_string_eol_s[0]); fprintf(output.stream, " When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%c", f_string_eol_s[0]); fprintf(output.stream, " "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_at); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_at); fprintf(output.stream, ": An object index at the specified depth.%c", f_string_eol_s[0]); fprintf(output.stream, " "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_depth); fprintf(output.stream, ": A new depth within the specified depth, indexed from the root.%c", f_string_eol_s[0]); fprintf(output.stream, " "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_name); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_name); fprintf(output.stream, ": An object name at the specified depth.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " The parameter "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_depth); fprintf(output.stream, " must be in numeric order, but values in between may be skipped.%c", f_string_eol_s[0]); fprintf(output.stream, " ('-d 0 -a 1 -d 2 -a 2' would specify index 1 at depth 0, any index at depth 1, and index 2 at depth 2.)%c", f_string_eol_s[0]); fprintf(output.stream, " ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c", f_string_eol_s[0]); @@ -74,61 +74,61 @@ extern "C" { fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " The parameter "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_select); fprintf(output.stream, " selects a content index at a given depth.%c", f_string_eol_s[0]); fprintf(output.stream, " (This parameter is not synonymous with the depth parameter and does not relate to nested content).%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " Specify both "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_object); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_object); fprintf(output.stream, " and the "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_total); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_total); fprintf(output.stream, " parameters to get the total objects.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " When both "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_at); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_at); fprintf(output.stream, " and "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_name); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_name); fprintf(output.stream, " parameters are specified (at the same depth), the "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_at); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_at); fprintf(output.stream, " parameter value will be treated as a position relative to the specified "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_name); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_name); fprintf(output.stream, " parameter value.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " This program may support parameters, such as "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_depth); fprintf(output.stream, " or "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_select); fprintf(output.stream, ", even if not supported by the standard.%c", f_string_eol_s[0]); fprintf(output.stream, " This is done to help ensure consistency for scripting.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " For parameters like "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_depth); fprintf(output.stream, ", if the standard doesn't support nested content, then only a depth of 0 would be valid.%c", f_string_eol_s[0]); fprintf(output.stream, " For parameters like "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_select); fprintf(output.stream, ", if the standard doesn't support multiple content groups, then only a select of 0 would be valid.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " The parameter "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_trim); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_trim); fprintf(output.stream, " will remove leading and trailing whitespaces when selecting objects or when printing objects.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " When specifying both the "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_object); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_object); fprintf(output.stream, " parameter and the "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_content); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_content); fprintf(output.stream, " parameter, the entire object and content are printed, including the formatting.%c", f_string_eol_s[0]); fprintf(output.stream, " Both the object and content printed are already escaped.%c", f_string_eol_s[0]); fprintf(output.stream, " Both the object and content are separated by a space.%c", f_string_eol_s[0]); @@ -136,7 +136,7 @@ extern "C" { fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " The parameter "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_delimit); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_delimit); fprintf(output.stream, " accepts the following:%c", f_string_eol_s[0]); fprintf(output.stream, " - "); fl_color_print(output.stream, context.set.notable, "%s", fss_extended_read_delimit_mode_name_none); @@ -242,7 +242,7 @@ extern "C" { if (data->remaining.used > 0 || data->process_pipe) { if (data->parameters[fss_extended_read_parameter_at].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_at); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_at); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -250,7 +250,7 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_extended_read_parameter_depth].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_depth); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -258,7 +258,7 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_extended_read_parameter_line].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_line); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_line); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -266,7 +266,7 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_extended_read_parameter_name].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_name); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_name); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a string.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -274,7 +274,7 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_extended_read_parameter_select].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_select); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -283,9 +283,9 @@ extern "C" { if (data->parameters[fss_extended_read_parameter_object].result == f_console_result_found) { if (F_status_is_error_not(status) && data->parameters[fss_extended_read_parameter_line].result == f_console_result_additional) { fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_line); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_line); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -293,9 +293,9 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_extended_read_parameter_select].result == f_console_result_additional) { fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_select); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -304,11 +304,11 @@ extern "C" { if (data->parameters[fss_extended_read_parameter_content].result == f_console_result_found) { if (F_status_is_error_not(status) && data->parameters[fss_extended_read_parameter_total].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify both the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' and the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_content); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_content); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_total); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_total); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -319,9 +319,9 @@ extern "C" { if (data->parameters[fss_extended_read_parameter_line].result == f_console_result_additional) { if (F_status_is_error_not(status) && data->parameters[fss_extended_read_parameter_total].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_line); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_line); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_total); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_total); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -331,9 +331,9 @@ extern "C" { if (data->parameters[fss_extended_read_parameter_pipe].result == f_console_result_found) { if (F_status_is_error_not(status) && data->parameters[fss_extended_read_parameter_total].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_pipe); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_pipe); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_total); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_total); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -343,7 +343,7 @@ extern "C" { if (F_status_is_error_not(status)) { if (data->parameters[fss_extended_read_parameter_delimit].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_delimit); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_delimit); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a value.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -354,7 +354,7 @@ extern "C" { if (length == 0) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_delimit); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_delimit); fl_color_print(data->error.to.stream, data->context.set.error, "' must not be empty.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); @@ -428,7 +428,7 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[fss_extended_read_parameter_select].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_select); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter requires a positive number.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); diff --git a/level_3/fss_extended_read/c/fss_extended_read.h b/level_3/fss_extended_read/c/fss_extended_read.h index 067e457..77060cb 100644 --- a/level_3/fss_extended_read/c/fss_extended_read.h +++ b/level_3/fss_extended_read/c/fss_extended_read.h @@ -53,7 +53,7 @@ extern "C" { #define fss_extended_read_major_version "0" #define fss_extended_read_minor_version "5" #define fss_extended_read_micro_version "3" - #define fss_extended_read_version fss_extended_read_major_version "." fss_extended_read_minor_version "." fss_extended_read_micro_version + #define fss_extended_read_version fss_extended_read_major_version f_string_ascii_period fss_extended_read_minor_version f_string_ascii_period fss_extended_read_micro_version #endif // _di_fss_extended_read_version_ #ifndef _di_fss_extended_read_name_ @@ -119,15 +119,15 @@ extern "C" { #define fss_extended_read_console_parameter_t_initialize \ { \ - f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_normal, f_console_standard_long_normal, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(fss_extended_read_short_at, fss_extended_read_long_at, 0, 1, f_console_type_normal), \ f_console_parameter_t_initialize(fss_extended_read_short_content, fss_extended_read_long_content, 0, 0, f_console_type_normal), \ f_console_parameter_t_initialize(fss_extended_read_short_delimit, fss_extended_read_long_delimit, 0, 1, f_console_type_normal), \ diff --git a/level_3/fss_extended_read/c/private-fss_extended_read.c b/level_3/fss_extended_read/c/private-fss_extended_read.c index ea49403..5b3ad37 100644 --- a/level_3/fss_extended_read/c/private-fss_extended_read.c +++ b/level_3/fss_extended_read/c/private-fss_extended_read.c @@ -129,12 +129,12 @@ extern "C" { f_status_t status_code = F_status_set_fine(status); // @todo: move error printing into common function. - if (status_code == F_memory_allocation || status_code == F_memory_reallocation) { + if (status_code == F_memory_not) { fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]); } else if (status_code == f_string_length_t_size) { fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to process '", fll_error_print_error); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_trim); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_trim); fl_color_print(data.error.to.stream, data.context.set.error, "' because the maximum buffer size was reached.%c", f_string_eol_s[0]); } else { @@ -156,7 +156,7 @@ extern "C" { if (!depths->array[i].value_name.used) { fl_color_print(data.error.to.stream, data.context.set.error, "%sThe '", fll_error_print_error); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_name); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_name); fl_color_print(data.error.to.stream, data.context.set.error, "' must not be an empty string.%c", f_string_eol_s[0]); return F_status_set_error(F_parameter); @@ -173,14 +173,14 @@ extern "C" { fl_color_print(data.error.to.stream, data.context.set.error, "%sThe value '", fll_error_print_error); fl_color_print(data.error.to.stream, data.context.set.notable, "%llu", depths->array[i].depth); fl_color_print(data.error.to.stream, data.context.set.error, "' may only be specified once for the parameter '"); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_depth); fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol_s[0]); return F_status_set_error(F_parameter); } else if (depths->array[i].depth > depths->array[j].depth) { fl_color_print(data.error.to.stream, data.context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_depth); fl_color_print(data.error.to.stream, data.context.set.error, "' may not have the value '"); fl_color_print(data.error.to.stream, data.context.set.notable, "%llu", depths->array[i].depth); fl_color_print(data.error.to.stream, data.context.set.error, "' before the value '"); diff --git a/level_3/fss_extended_read/c/private-fss_extended_read.h b/level_3/fss_extended_read/c/private-fss_extended_read.h index 21c27c1..eba29b4 100644 --- a/level_3/fss_extended_read/c/private-fss_extended_read.h +++ b/level_3/fss_extended_read/c/private-fss_extended_read.h @@ -71,9 +71,9 @@ extern "C" { #define fss_extended_read_depths_t_initialize { 0, 0, 0 } - #define fss_extended_read_macro_depths_t_clear(depths) f_macro_memory_structure_t_clear(depths) + #define fss_extended_read_macro_depths_t_clear(depths) f_macro_memory_structure_clear(depths) - #define fss_extended_read_macro_depths_t_new(status, depths, length) f_macro_memory_structure_t_new(status, depths, fss_extended_read_depth_t, length) + #define fss_extended_read_macro_depths_t_new(status, depths, length) f_macro_memory_structure_new(status, depths, fss_extended_read_depth_t, length) #define fss_extended_read_macro_depths_t_delete(status, depths) \ status = F_none; \ @@ -83,7 +83,7 @@ extern "C" { fss_extended_read_macro_depth_t_delete(status, depths.array[depths.used]); \ if (status != F_none) break; \ } \ - if (status == F_none) f_macro_memory_structure_t_delete(depths, fss_extended_read_depth_t) + if (status == F_none) f_macro_memory_structure_delete(depths, fss_extended_read_depth_t) #define fss_extended_read_macro_depths_t_delete_simple(depths) \ depths.used = depths.size; \ @@ -91,7 +91,7 @@ extern "C" { depths.used--; \ fss_extended_read_macro_depth_t_delete_simple(depths.array[depths.used]); \ } \ - if (!depths.used) f_macro_memory_structure_t_delete_simple(depths, fss_extended_read_depth_t) + if (!depths.used) f_macro_memory_structure_delete_simple(depths, fss_extended_read_depth_t) #define fss_extended_read_macro_depths_t_resize(status, depths, new_length) \ status = F_none; \ diff --git a/level_3/fss_extended_read/data/build/settings b/level_3/fss_extended_read/data/build/settings index d412af1..01f1d7a 100644 --- a/level_3/fss_extended_read/data/build/settings +++ b/level_3/fss_extended_read/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfl_color -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lfl_status -lfl_string -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_utf +build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfl_color -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lfl_status -lfl_string -lf_color -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_string -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_sources_library fss_extended_read.c private-fss_extended_read.c diff --git a/level_3/fss_extended_write/c/fss_extended_write.c b/level_3/fss_extended_write/c/fss_extended_write.c index 9ca01e3..e459a9a 100644 --- a/level_3/fss_extended_write/c/fss_extended_write.c +++ b/level_3/fss_extended_write/c/fss_extended_write.c @@ -10,27 +10,27 @@ extern "C" { fll_program_print_help_header(output, context, fss_extended_write_name_long, fss_extended_write_version); - fll_program_print_help_option(output, context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message."); - fll_program_print_help_option(output, context, f_console_standard_short_dark, f_console_standard_long_dark, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on dark backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_light, f_console_standard_long_light, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on light backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_no_color, f_console_standard_long_no_color, f_console_symbol_short_disable, f_console_symbol_long_disable, "Do not output in color."); - fll_program_print_help_option(output, context, f_console_standard_short_quiet, f_console_standard_long_quiet, f_console_symbol_short_disable, f_console_symbol_long_disable, " Decrease verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_normal, f_console_standard_long_normal, f_console_symbol_short_disable, f_console_symbol_long_disable, " Set verbosity to normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_verbose, f_console_standard_long_verbose, f_console_symbol_short_disable, f_console_symbol_long_disable, " Increase verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number."); + fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); + fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color."); + fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number."); fprintf(output.stream, "%c", f_string_eol_s[0]); - fll_program_print_help_option(output, context, fss_extended_write_short_file, fss_extended_write_long_file, f_console_symbol_short_enable, f_console_symbol_long_enable, " Specify a file to send output to."); - fll_program_print_help_option(output, context, fss_extended_write_short_content, fss_extended_write_long_content, f_console_symbol_short_enable, f_console_symbol_long_enable, "The Content to output."); - fll_program_print_help_option(output, context, fss_extended_write_short_double, fss_extended_write_long_double, f_console_symbol_short_enable, f_console_symbol_long_enable, " Use double quotes (default)."); - fll_program_print_help_option(output, context, fss_extended_write_short_ignore, fss_extended_write_long_ignore, f_console_symbol_short_enable, f_console_symbol_long_enable, " Ignore a given range within a content."); - fll_program_print_help_option(output, context, fss_extended_write_short_object, fss_extended_write_long_object, f_console_symbol_short_enable, f_console_symbol_long_enable, " The Object to output."); - fll_program_print_help_option(output, context, fss_extended_write_short_partial, fss_extended_write_long_partial, f_console_symbol_short_enable, f_console_symbol_long_enable, "Do not output end of Object/Content character."); - fll_program_print_help_option(output, context, fss_extended_write_short_prepend, fss_extended_write_long_prepend, f_console_symbol_short_enable, f_console_symbol_long_enable, "Prepend the given whitespace characters to the start of each multi-line Content."); - fll_program_print_help_option(output, context, fss_extended_write_short_single, fss_extended_write_long_single, f_console_symbol_short_enable, f_console_symbol_long_enable, " Use single quotes."); - fll_program_print_help_option(output, context, fss_extended_write_short_trim, fss_extended_write_long_trim, f_console_symbol_short_enable, f_console_symbol_long_enable, " Trim object names."); + fll_program_print_help_option(output, context, fss_extended_write_short_file, fss_extended_write_long_file, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a file to send output to."); + fll_program_print_help_option(output, context, fss_extended_write_short_content, fss_extended_write_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The Content to output."); + fll_program_print_help_option(output, context, fss_extended_write_short_double, fss_extended_write_long_double, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default)."); + fll_program_print_help_option(output, context, fss_extended_write_short_ignore, fss_extended_write_long_ignore, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Ignore a given range within a content."); + fll_program_print_help_option(output, context, fss_extended_write_short_object, fss_extended_write_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The Object to output."); + fll_program_print_help_option(output, context, fss_extended_write_short_partial, fss_extended_write_long_partial, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Do not output end of Object/Content character."); + fll_program_print_help_option(output, context, fss_extended_write_short_prepend, fss_extended_write_long_prepend, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Prepend the given whitespace characters to the start of each multi-line Content."); + fll_program_print_help_option(output, context, fss_extended_write_short_single, fss_extended_write_long_single, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes."); + fll_program_print_help_option(output, context, fss_extended_write_short_trim, fss_extended_write_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim object names."); fll_program_print_help_usage(output, context, fss_extended_write_name, f_string_empty_s); @@ -67,13 +67,13 @@ extern "C" { fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " The FSS-0001 (Extended) specification does not support multi-line Content, therefore the parameter '"); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_prepend); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_write_long_prepend); fprintf(output.stream, "' does nothing.%c", f_string_eol_s[0]); fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " This program does not use the parameter '"); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_ignore); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_write_long_ignore); fprintf(output.stream, "', which therefore does nothing.%c", f_string_eol_s[0]); fprintf(output.stream, " This parameter requires two values.%c", f_string_eol_s[0]); @@ -176,7 +176,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_file); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_write_long_file); fl_color_print(data->error.to.stream, data->context.set.error, "' may only be specified once.%c", f_string_eol_s[0]); } @@ -195,7 +195,7 @@ extern "C" { } } else if (data->parameters[fss_extended_write_parameter_file].result == f_console_result_found) { - fss_extended_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable, fss_extended_write_long_file); + fss_extended_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable_s, fss_extended_write_long_file); status = F_status_set_error(F_parameter); } } @@ -204,11 +204,11 @@ extern "C" { if (data->parameters[fss_extended_write_parameter_object].locations.used || data->parameters[fss_extended_write_parameter_content].locations.used) { if (data->parameters[fss_extended_write_parameter_object].locations.used) { if (data->parameters[fss_extended_write_parameter_object].locations.used != data->parameters[fss_extended_write_parameter_object].values.used) { - fss_extended_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable, fss_extended_write_long_object); + fss_extended_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable_s, fss_extended_write_long_object); status = F_status_set_error(F_parameter); } else if (data->parameters[fss_extended_write_parameter_content].locations.used != data->parameters[fss_extended_write_parameter_content].values.used) { - fss_extended_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable, fss_extended_write_long_content); + fss_extended_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable_s, fss_extended_write_long_content); status = F_status_set_error(F_parameter); } else if (!data->parameters[fss_extended_write_parameter_content].locations.used && data->parameters[fss_extended_write_parameter_partial].result == f_console_result_none) { @@ -220,11 +220,11 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_partial); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_write_long_partial); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter only allows either the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_write_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter or the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_content); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_write_long_content); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter, but not both.%c", f_string_eol_s[0]); } @@ -243,9 +243,9 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sEach ", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_write_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter must be specified before a '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_content); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_write_long_content); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); } @@ -261,9 +261,9 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sEach ", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_write_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter must have at least one '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_content); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_write_long_content); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); } @@ -275,7 +275,7 @@ extern "C" { } else if (data->parameters[fss_extended_write_parameter_content].locations.used) { if (data->parameters[fss_extended_write_parameter_content].locations.used != data->parameters[fss_extended_write_parameter_content].values.used) { - fss_extended_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable, fss_extended_write_long_content); + fss_extended_write_error_parameter_value_missing_print(*data, f_console_symbol_long_enable_s, fss_extended_write_long_content); status = F_status_set_error(F_parameter); } else if (!data->parameters[fss_extended_write_parameter_partial].locations.used) { @@ -288,9 +288,9 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThis requires either piped data or the use of the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_write_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_content); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_write_long_content); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); } @@ -302,7 +302,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_partial); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_write_long_partial); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter cannot be used when processing a pipe.%c", f_string_eol_s[0]); } @@ -316,7 +316,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_prepend); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_write_long_prepend); fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol_s[0]); } @@ -340,7 +340,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_prepend); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_write_long_prepend); fl_color_print(data->error.to.stream, data->context.set.error, "' must only contain whitespace.%c", f_string_eol_s[0]); } @@ -353,7 +353,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_prepend); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_write_long_prepend); fl_color_print(data->error.to.stream, data->context.set.error, "' must not be an empty string.%c", f_string_eol_s[0]); } @@ -367,7 +367,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_ignore); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_write_long_ignore); fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no values were given.%c", f_string_eol_s[0]); } @@ -380,7 +380,7 @@ extern "C" { if (total_locations * 2 > total_arguments) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_ignore); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_write_long_ignore); fl_color_print(data->error.to.stream, data->context.set.error, "' requires two values.%c", f_string_eol_s[0]); status = F_status_set_error(F_parameter); diff --git a/level_3/fss_extended_write/c/fss_extended_write.h b/level_3/fss_extended_write/c/fss_extended_write.h index 0687254..81a2e0c 100644 --- a/level_3/fss_extended_write/c/fss_extended_write.h +++ b/level_3/fss_extended_write/c/fss_extended_write.h @@ -46,7 +46,7 @@ extern "C" { #define fss_extended_write_major_version "0" #define fss_extended_write_minor_version "5" #define fss_extended_write_micro_version "3" - #define fss_extended_write_version fss_extended_write_major_version "." fss_extended_write_minor_version "." fss_extended_write_micro_version + #define fss_extended_write_version fss_extended_write_major_version f_string_ascii_period fss_extended_write_minor_version f_string_ascii_period fss_extended_write_micro_version #endif // _di_fss_extended_write_version_ #ifndef _di_fss_extended_write_name_ @@ -103,15 +103,15 @@ extern "C" { #define fss_extended_write_console_parameter_t_initialize \ { \ - f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_normal, f_console_standard_long_normal, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, F_false, f_console_type_inverse), \ f_console_parameter_t_initialize(fss_extended_write_short_file, fss_extended_write_long_file, 0, 1, f_console_type_normal), \ f_console_parameter_t_initialize(fss_extended_write_short_content, fss_extended_write_long_content, 0, 1, f_console_type_normal), \ f_console_parameter_t_initialize(fss_extended_write_short_double, fss_extended_write_long_double, 0, 0, f_console_type_normal), \ diff --git a/level_3/fss_extended_write/c/private-fss_extended_write.c b/level_3/fss_extended_write/c/private-fss_extended_write.c index b97aefd..3b4fca8 100644 --- a/level_3/fss_extended_write/c/private-fss_extended_write.c +++ b/level_3/fss_extended_write/c/private-fss_extended_write.c @@ -14,11 +14,11 @@ extern "C" { fprintf(data.error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data.error.to.stream, data.context.set.error, "%sMust specify the '", fll_error_print_error); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_object); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_write_long_object); fl_color_print(data.error.to.stream, data.context.set.error, "' parameter at least once and the '"); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_content); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_write_long_content); fl_color_print(data.error.to.stream, data.context.set.error, "' parameter one or more times when not specifying the "); - fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_partial); + fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_write_long_partial); fl_color_print(data.error.to.stream, data.context.set.error, "' parameter.%c", f_string_eol_s[0]); } #endif // _di_fss_extended_write_error_parameter_at_least_once_print_ diff --git a/level_3/fss_extended_write/data/build/settings b/level_3/fss_extended_write/data/build/settings index 3ad3aa1..ad1d381 100644 --- a/level_3/fss_extended_write/data/build/settings +++ b/level_3/fss_extended_write/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfl_color -lfl_conversion -lfl_directory -lfl_fss -lfl_status -lfl_string -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_utf +build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfl_color -lfl_conversion -lfl_directory -lfl_fss -lfl_status -lfl_string -lf_color -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_string -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_sources_library fss_extended_write.c private-fss_extended_write.c diff --git a/level_3/fss_status_code/c/fss_status_code.c b/level_3/fss_status_code/c/fss_status_code.c index 7ac0ec1..14e084f 100644 --- a/level_3/fss_status_code/c/fss_status_code.c +++ b/level_3/fss_status_code/c/fss_status_code.c @@ -10,22 +10,22 @@ extern "C" { fll_program_print_help_header(output, context, fss_status_code_name_long, fss_status_code_version); - fll_program_print_help_option(output, context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message."); - fll_program_print_help_option(output, context, f_console_standard_short_dark, f_console_standard_long_dark, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on dark backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_light, f_console_standard_long_light, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on light backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_no_color, f_console_standard_long_no_color, f_console_symbol_short_disable, f_console_symbol_long_disable, "Do not output in color."); - fll_program_print_help_option(output, context, f_console_standard_short_quiet, f_console_standard_long_quiet, f_console_symbol_short_disable, f_console_symbol_long_disable, " Decrease verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_normal, f_console_standard_long_normal, f_console_symbol_short_disable, f_console_symbol_long_disable, " Set verbosity to normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_verbose, f_console_standard_long_verbose, f_console_symbol_short_disable, f_console_symbol_long_disable, " Increase verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number."); + fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); + fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color."); + fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number."); fprintf(output.stream, "%c", f_string_eol_s[0]); - fll_program_print_help_option(output, context, fss_status_code_short_is_fine, fss_status_code_long_is_fine, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print F_true if the error code is not an error, F_false otherwise."); - fll_program_print_help_option(output, context, fss_status_code_short_is_warning, fss_status_code_long_is_warning, f_console_symbol_short_enable, f_console_symbol_long_enable, "Print F_true if the error code is a warning, F_false otherwise."); - fll_program_print_help_option(output, context, fss_status_code_short_is_error, fss_status_code_long_is_error, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print F_true if the error code is an error, F_false otherwise."); - fll_program_print_help_option(output, context, fss_status_code_short_number, fss_status_code_long_number, f_console_symbol_short_enable, f_console_symbol_long_enable, " Convert status code name to number."); + fll_program_print_help_option(output, context, fss_status_code_short_is_fine, fss_status_code_long_is_fine, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print F_true if the error code is not an error, F_false otherwise."); + fll_program_print_help_option(output, context, fss_status_code_short_is_warning, fss_status_code_long_is_warning, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print F_true if the error code is a warning, F_false otherwise."); + fll_program_print_help_option(output, context, fss_status_code_short_is_error, fss_status_code_long_is_error, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print F_true if the error code is an error, F_false otherwise."); + fll_program_print_help_option(output, context, fss_status_code_short_number, fss_status_code_long_number, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Convert status code name to number."); fll_program_print_help_usage(output, context, fss_status_code_name, "status code(s)"); @@ -117,9 +117,9 @@ extern "C" { if (data->parameters[fss_status_code_parameter_is_error].result == f_console_result_found) { if (data->parameters[fss_status_code_parameter_is_warning].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_error); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_status_code_long_is_error); fl_color_print(data->error.to.stream, data->context.set.error, "' cannot be used with the parameter "); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_warning); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_status_code_long_is_warning); fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol_s[0]); fss_status_code_delete_data(data); @@ -127,9 +127,9 @@ extern "C" { } else if (data->parameters[fss_status_code_parameter_is_fine].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_error); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_status_code_long_is_error); fl_color_print(data->error.to.stream, data->context.set.error, "' cannot be used with the parameter "); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_fine); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_status_code_long_is_fine); fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol_s[0]); fss_status_code_delete_data(data); @@ -138,9 +138,9 @@ extern "C" { } else if (data->parameters[fss_status_code_parameter_is_warning].result == f_console_result_found && data->parameters[fss_status_code_parameter_is_fine].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_warning); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_status_code_long_is_warning); fl_color_print(data->error.to.stream, data->context.set.error, "' cannot be used with the parameter "); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_fine); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_status_code_long_is_fine); fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol_s[0]); fss_status_code_delete_data(data); diff --git a/level_3/fss_status_code/c/fss_status_code.h b/level_3/fss_status_code/c/fss_status_code.h index 556dec4..d113fa0 100644 --- a/level_3/fss_status_code/c/fss_status_code.h +++ b/level_3/fss_status_code/c/fss_status_code.h @@ -47,7 +47,7 @@ extern "C" { #define fss_status_code_major_version "0" #define fss_status_code_minor_version "5" #define fss_status_code_micro_version "3" - #define fss_status_code_version fss_status_code_major_version "." fss_status_code_minor_version "." fss_status_code_micro_version + #define fss_status_code_version fss_status_code_major_version f_string_ascii_period fss_status_code_minor_version f_string_ascii_period fss_status_code_micro_version #endif // _di_fss_status_code_version_ #ifndef _di_fss_status_code_name_ @@ -85,15 +85,15 @@ extern "C" { #define fss_status_code_console_parameter_t_initialize \ { \ - f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_normal, f_console_standard_long_normal, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(fss_status_code_short_is_fine, fss_status_code_long_is_fine, 0, 0, f_console_type_normal), \ f_console_parameter_t_initialize(fss_status_code_short_is_warning, fss_status_code_long_is_warning, 0, 0, f_console_type_normal), \ f_console_parameter_t_initialize(fss_status_code_short_is_error, fss_status_code_long_is_error, 0, 0, f_console_type_normal), \ diff --git a/level_3/fss_status_code/data/build/settings b/level_3/fss_status_code/data/build/settings index e0ce636..1241ad4 100644 --- a/level_3/fss_status_code/data/build/settings +++ b/level_3/fss_status_code/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfll_status -lfl_color -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_status -lfl_string -lfl_utf -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_utf +build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfll_status -lfl_color -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_status -lfl_string -lfl_utf -lf_color -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_string -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_sources_library fss_status_code.c private-fss_status_code.c diff --git a/level_3/iki_read/c/iki_read.c b/level_3/iki_read/c/iki_read.c index 2fb2d2b..7f8472c 100644 --- a/level_3/iki_read/c/iki_read.c +++ b/level_3/iki_read/c/iki_read.c @@ -10,33 +10,33 @@ extern "C" { fll_program_print_help_header(output, context, iki_read_name_long, iki_read_version); - fll_program_print_help_option(output, context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message."); - fll_program_print_help_option(output, context, f_console_standard_short_dark, f_console_standard_long_dark, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on dark backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_light, f_console_standard_long_light, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on light backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_no_color, f_console_standard_long_no_color, f_console_symbol_short_disable, f_console_symbol_long_disable, "Do not output in color."); - fll_program_print_help_option(output, context, f_console_standard_short_quiet, f_console_standard_long_quiet, f_console_symbol_short_disable, f_console_symbol_long_disable, " Decrease verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_normal, f_console_standard_long_normal, f_console_symbol_short_disable, f_console_symbol_long_disable, " Set verbosity to normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_verbose, f_console_standard_long_verbose, f_console_symbol_short_disable, f_console_symbol_long_disable, " Increase verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number."); + fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); + fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color."); + fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number."); fprintf(output.stream, "%c", f_string_eol_s[0]); - fll_program_print_help_option(output, context, iki_read_short_at, iki_read_long_at, f_console_symbol_short_enable, f_console_symbol_long_enable, " Select variable at this numeric index."); - fll_program_print_help_option(output, context, iki_read_short_line, iki_read_long_line, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print only the variables at the given line."); - fll_program_print_help_option(output, context, iki_read_short_name, iki_read_long_name, f_console_symbol_short_enable, f_console_symbol_long_enable, " Select variables with this name."); - fll_program_print_help_option(output, context, iki_read_short_whole, iki_read_long_whole, f_console_symbol_short_enable, f_console_symbol_long_enable, "Print all of the data instead of just the variable data."); + fll_program_print_help_option(output, context, iki_read_short_at, iki_read_long_at, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select variable at this numeric index."); + fll_program_print_help_option(output, context, iki_read_short_line, iki_read_long_line, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the variables at the given line."); + fll_program_print_help_option(output, context, iki_read_short_name, iki_read_long_name, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select variables with this name."); + fll_program_print_help_option(output, context, iki_read_short_whole, iki_read_long_whole, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print all of the data instead of just the variable data."); fprintf(output.stream, "%c", f_string_eol_s[0]); - fll_program_print_help_option(output, context, iki_read_short_content, iki_read_long_content, f_console_symbol_short_enable, f_console_symbol_long_enable, "Print the variable content (default)."); - fll_program_print_help_option(output, context, iki_read_short_literal, iki_read_long_literal, f_console_symbol_short_enable, f_console_symbol_long_enable, "Print the entire variable (aka: object, content, and syntax)."); - fll_program_print_help_option(output, context, iki_read_short_object, iki_read_long_object, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print the variable name (aka: object)."); - fll_program_print_help_option(output, context, iki_read_short_total, iki_read_long_total, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print the total number of variables."); + fll_program_print_help_option(output, context, iki_read_short_content, iki_read_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print the variable content (default)."); + fll_program_print_help_option(output, context, iki_read_short_literal, iki_read_long_literal, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print the entire variable (aka: object, content, and syntax)."); + fll_program_print_help_option(output, context, iki_read_short_object, iki_read_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the variable name (aka: object)."); + fll_program_print_help_option(output, context, iki_read_short_total, iki_read_long_total, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of variables."); fprintf(output.stream, "%c", f_string_eol_s[0]); - fll_program_print_help_option(output, context, iki_read_short_substitute, iki_read_long_substitute, f_console_symbol_short_enable, f_console_symbol_long_enable, "Substitute the entire variable for the given name and content value with the given string."); + fll_program_print_help_option(output, context, iki_read_short_substitute, iki_read_long_substitute, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Substitute the entire variable for the given name and content value with the given string."); fll_program_print_help_usage(output, context, iki_read_name, "filename(s)"); @@ -49,7 +49,7 @@ extern "C" { fprintf(output.stream, "%c", f_string_eol_s[0]); fprintf(output.stream, " The "); - fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_substitute); + fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable_s, iki_read_long_substitute); fprintf(output.stream, " option, requires 3 additional parameters: "); fl_color_print(output.stream, context.set.notable, "<"); @@ -182,7 +182,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_at); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, iki_read_long_at); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]); } @@ -208,9 +208,9 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_at); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, iki_read_long_at); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_total); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, iki_read_long_total); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter."); } @@ -222,7 +222,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_line); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, iki_read_long_line); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]); } @@ -249,7 +249,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_name); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, iki_read_long_name); fl_color_print(data->error.to.stream, data->context.set.error, "' requires a string.%c", f_string_eol_s[0]); } @@ -261,7 +261,7 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_substitute); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, iki_read_long_substitute); fl_color_print(data->error.to.stream, data->context.set.error, "' requires 3 strings.%c", f_string_eol_s[0]); } @@ -272,9 +272,9 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_substitute); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, iki_read_long_substitute); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_total); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, iki_read_long_total); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); } @@ -287,9 +287,9 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_literal); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, iki_read_long_literal); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, iki_read_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); } @@ -300,9 +300,9 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_literal); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, iki_read_long_literal); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_content); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, iki_read_long_content); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); } @@ -313,9 +313,9 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_literal); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, iki_read_long_literal); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_total); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, iki_read_long_total); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); } @@ -329,9 +329,9 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, iki_read_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_content); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, iki_read_long_content); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); } @@ -342,9 +342,9 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, iki_read_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_total); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, iki_read_long_total); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); } @@ -366,9 +366,9 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_whole); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, iki_read_long_whole); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_total); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, iki_read_long_total); fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]); } diff --git a/level_3/iki_read/c/iki_read.h b/level_3/iki_read/c/iki_read.h index 0c34940..eba40bb 100644 --- a/level_3/iki_read/c/iki_read.h +++ b/level_3/iki_read/c/iki_read.h @@ -55,7 +55,7 @@ extern "C" { #define iki_read_major_version "0" #define iki_read_minor_version "5" #define iki_read_micro_version "3" - #define iki_read_version iki_read_major_version "." iki_read_minor_version "." iki_read_micro_version + #define iki_read_version iki_read_major_version f_string_ascii_period iki_read_minor_version f_string_ascii_period iki_read_micro_version #endif // _di_iki_read_version_ #ifndef _di_iki_read_name_ @@ -115,15 +115,15 @@ extern "C" { #define iki_read_console_parameter_t_initialize \ { \ - f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_normal, f_console_standard_long_normal, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(iki_read_short_at, iki_read_long_at, 0, 1, f_console_type_normal), \ f_console_parameter_t_initialize(iki_read_short_content, iki_read_long_content, 0, 0, f_console_type_normal), \ f_console_parameter_t_initialize(iki_read_short_line, iki_read_long_line, 0, 1, f_console_type_normal), \ @@ -171,23 +171,23 @@ extern "C" { #define iki_read_substitutions_t_initialize {0, 0, 0} - #define iki_read_macro_substitutions_t_clear(replacements) f_macro_memory_structure_t_clear(replacements) + #define iki_read_macro_substitutions_t_clear(replacements) f_macro_memory_structure_clear(replacements) - #define iki_read_macro_substitutions_t_new(status, replacements, length) f_macro_memory_structure_t_new(status, replacements, iki_read_substitution_t, length) + #define iki_read_macro_substitutions_t_new(status, replacements, length) f_macro_memory_structure_new(status, replacements, iki_read_substitution_t, length) #define iki_read_macro_substitutions_t_delete_simple(replacements) \ replacements.used = replacements.size; \ while (replacements.used > 0) { \ replacements.used--; \ } \ - if (!replacements.used) f_macro_memory_structure_t_delete_simple(replacements, iki_read_substitution_t) + if (!replacements.used) f_macro_memory_structure_delete_simple(replacements, iki_read_substitution_t) #define iki_read_macro_substitutions_t_destroy_simple(replacements) \ replacements.used = replacements.size; \ while (replacements.used > 0) { \ replacements.used--; \ } \ - if (!replacements.used) f_macro_memory_structure_t_destroy_simple(replacements, iki_read_substitution_t) + if (!replacements.used) f_macro_memory_structure_destroy_simple(replacements, iki_read_substitution_t) #define iki_read_macro_substitutions_t_resize(status, replacements, new_length) \ status = F_none; \ diff --git a/level_3/iki_read/data/build/settings b/level_3/iki_read/data/build/settings index e5a1ae4..3312973 100644 --- a/level_3/iki_read/data/build/settings +++ b/level_3/iki_read/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lfll_error -lfll_program -lfl_color -lfl_console -lfl_conversion -lfl_iki -lfl_string -lf_console -lf_conversion -lf_file -lf_iki -lf_memory -lf_pipe -lf_print -lf_utf +build_libraries-individual -lfll_error -lfll_program -lfl_color -lfl_console -lfl_conversion -lfl_iki -lfl_string -lf_color -lf_console -lf_conversion -lf_file -lf_iki -lf_memory -lf_path -lf_pipe -lf_print -lf_string -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_sources_library iki_read.c private-iki_read.c diff --git a/level_3/iki_write/c/iki_write.c b/level_3/iki_write/c/iki_write.c index a65c7e7..22bfc72 100644 --- a/level_3/iki_write/c/iki_write.c +++ b/level_3/iki_write/c/iki_write.c @@ -10,23 +10,23 @@ extern "C" { fll_program_print_help_header(output, context, iki_write_name_long, iki_write_version); - fll_program_print_help_option(output, context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message."); - fll_program_print_help_option(output, context, f_console_standard_short_dark, f_console_standard_long_dark, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on dark backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_light, f_console_standard_long_light, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on light backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_no_color, f_console_standard_long_no_color, f_console_symbol_short_disable, f_console_symbol_long_disable, "Do not output in color."); - fll_program_print_help_option(output, context, f_console_standard_short_quiet, f_console_standard_long_quiet, f_console_symbol_short_disable, f_console_symbol_long_disable, " Decrease verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_normal, f_console_standard_long_normal, f_console_symbol_short_disable, f_console_symbol_long_disable, " Set verbosity to normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_verbose, f_console_standard_long_verbose, f_console_symbol_short_disable, f_console_symbol_long_disable, " Increase verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number."); + fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); + fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color."); + fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number."); fprintf(output.stream, "%c", f_string_eol_s[0]); - fll_program_print_help_option(output, context, iki_write_short_file, iki_write_long_file, f_console_symbol_short_enable, f_console_symbol_long_enable, " Specify a file to send output to."); - fll_program_print_help_option(output, context, iki_write_short_content, iki_write_long_content, f_console_symbol_short_enable, f_console_symbol_long_enable, "The content to output."); - fll_program_print_help_option(output, context, iki_write_short_double, iki_write_long_double, f_console_symbol_short_enable, f_console_symbol_long_enable, " Use double quotes (default)."); - fll_program_print_help_option(output, context, iki_write_short_object, iki_write_long_object, f_console_symbol_short_enable, f_console_symbol_long_enable, " The object to output."); - fll_program_print_help_option(output, context, iki_write_short_single, iki_write_long_single, f_console_symbol_short_enable, f_console_symbol_long_enable, " Use single quotes."); + fll_program_print_help_option(output, context, iki_write_short_file, iki_write_long_file, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a file to send output to."); + fll_program_print_help_option(output, context, iki_write_short_content, iki_write_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The content to output."); + fll_program_print_help_option(output, context, iki_write_short_double, iki_write_long_double, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default)."); + fll_program_print_help_option(output, context, iki_write_short_object, iki_write_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The object to output."); + fll_program_print_help_option(output, context, iki_write_short_single, iki_write_long_single, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes."); fll_program_print_help_usage(output, context, iki_write_name, f_string_empty_s); @@ -148,7 +148,7 @@ extern "C" { if (data->parameters[iki_write_parameter_file].values.used > 1) { if (data->error.verbosity != f_console_verbosity_quiet) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_write_long_file); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, iki_write_long_file); fl_color_print(data->error.to.stream, data->context.set.error, "' may only be specified once.%c", f_string_eol_s[0]); } @@ -170,7 +170,7 @@ extern "C" { else if (data->parameters[iki_write_parameter_file].result == f_console_result_found) { if (data->error.verbosity != f_console_verbosity_quiet) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_write_long_file); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, iki_write_long_file); fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol_s[0]); } @@ -181,7 +181,7 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[iki_write_parameter_object].result == f_console_result_found) { if (data->error.verbosity != f_console_verbosity_quiet) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_write_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, iki_write_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol_s[0]); } @@ -191,7 +191,7 @@ extern "C" { if (F_status_is_error_not(status) && data->parameters[iki_write_parameter_content].result == f_console_result_found) { if (data->error.verbosity != f_console_verbosity_quiet) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_write_long_content); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, iki_write_long_content); fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol_s[0]); } @@ -203,9 +203,9 @@ extern "C" { if (data->error.verbosity != f_console_verbosity_quiet) { fprintf(data->error.to.stream, "%c", f_string_eol_s[0]); fl_color_print(data->error.to.stream, data->context.set.error, "%sNo data provided, either pipe the data or use the '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_write_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, iki_write_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' and the '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_write_long_content); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, iki_write_long_content); fl_color_print(data->error.to.stream, data->context.set.error, "' parameters.%c", f_string_eol_s[0]); } @@ -217,9 +217,9 @@ extern "C" { if (data->parameters[iki_write_parameter_object].values.used != data->parameters[iki_write_parameter_content].values.used) { if (data->error.verbosity != f_console_verbosity_quiet) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameters '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_write_long_content); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, iki_write_long_content); fl_color_print(data->error.to.stream, data->context.set.error, "' and '"); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_write_long_object); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, iki_write_long_object); fl_color_print(data->error.to.stream, data->context.set.error, "' must be specified the same number of times.%c", f_string_eol_s[0]); } diff --git a/level_3/iki_write/c/iki_write.h b/level_3/iki_write/c/iki_write.h index 4e6efc2..79d3088 100644 --- a/level_3/iki_write/c/iki_write.h +++ b/level_3/iki_write/c/iki_write.h @@ -56,7 +56,7 @@ extern "C" { #define iki_write_major_version "0" #define iki_write_minor_version "5" #define iki_write_micro_version "3" - #define iki_write_version iki_write_major_version "." iki_write_minor_version "." iki_write_micro_version + #define iki_write_version iki_write_major_version f_string_ascii_period iki_write_minor_version f_string_ascii_period iki_write_micro_version #endif // _di_iki_write_version_ #ifndef _di_iki_write_name_ @@ -97,15 +97,15 @@ extern "C" { #define iki_write_console_parameter_t_initialize \ { \ - f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_normal, f_console_standard_long_normal, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(iki_write_short_file, iki_write_long_file, 0, 1, f_console_type_normal), \ f_console_parameter_t_initialize(iki_write_short_content, iki_write_long_content, 0, 1, f_console_type_normal), \ f_console_parameter_t_initialize(iki_write_short_double, iki_write_long_double, 0, 0, f_console_type_normal), \ diff --git a/level_3/iki_write/data/build/settings b/level_3/iki_write/data/build/settings index 0d8deff..6897031 100644 --- a/level_3/iki_write/data/build/settings +++ b/level_3/iki_write/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lfll_error -lfll_iki -lfll_program -lfl_color -lfl_console -lfl_iki -lfl_string -lf_console -lf_conversion -lf_file -lf_iki -lf_memory -lf_pipe -lf_print -lf_utf +build_libraries-individual -lfll_error -lfll_iki -lfll_program -lfl_color -lfl_console -lfl_iki -lfl_string -lf_color -lf_console -lf_conversion -lf_file -lf_iki -lf_memory -lf_path -lf_pipe -lf_print -lf_string -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_sources_library iki_write.c private-iki_write.c diff --git a/level_3/init/c/init.c b/level_3/init/c/init.c index 3b6ee47..59639df 100644 --- a/level_3/init/c/init.c +++ b/level_3/init/c/init.c @@ -10,11 +10,11 @@ extern "C" { fll_program_print_help_header(output, context, init_name_long, init_version); - fll_program_print_help_option(output, context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message."); - fll_program_print_help_option(output, context, f_console_standard_short_dark, f_console_standard_long_dark, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on dark backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_light, f_console_standard_long_light, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on light backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_no_color, f_console_standard_long_no_color, f_console_symbol_short_disable, f_console_symbol_long_disable, "Do not output in color."); - fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number."); + fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); + fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color."); + fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number."); fll_program_print_help_usage(output, context, init_name, f_string_empty_s); diff --git a/level_3/init/c/init.h b/level_3/init/c/init.h index 96c4f33..f93b1f9 100644 --- a/level_3/init/c/init.h +++ b/level_3/init/c/init.h @@ -52,7 +52,7 @@ extern "C" { #define init_major_version "0" #define init_minor_version "5" #define init_micro_version "3" - #define init_version init_major_version "." init_minor_version "." init_micro_version + #define init_version init_major_version f_string_ascii_period init_minor_version f_string_ascii_period init_micro_version #endif // _di_init_version_ #ifndef _di_init_name_ @@ -166,11 +166,11 @@ extern "C" { #define init_console_parameter_t_initialize \ { \ - f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ } #define init_total_parameters 5 diff --git a/level_3/init/data/build/settings b/level_3/init/data/build/settings index d795056..8c706a3 100644 --- a/level_3/init/data/build/settings +++ b/level_3/init/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lfll_error -lfll_program -lfll_status -lfl_color -lfl_conversion -lfl_iki -lfl_status -lfl_string -lf_console -lf_conversion -lf_file -lf_iki -lf_memory -lf_print -lf_signal -lf_utf +build_libraries-individual -lfll_error -lfll_program -lfll_status -lfl_color -lfl_conversion -lfl_iki -lfl_status -lfl_string -lf_color -lf_console -lf_conversion -lf_file -lf_iki -lf_memory -lf_print -lf_signal -lf_string -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_sources_library init.c private-init.c diff --git a/level_3/status_code/c/status_code.c b/level_3/status_code/c/status_code.c index ac037d3..9931c73 100644 --- a/level_3/status_code/c/status_code.c +++ b/level_3/status_code/c/status_code.c @@ -10,22 +10,22 @@ extern "C" { fll_program_print_help_header(output, context, status_code_name_long, status_code_version); - fll_program_print_help_option(output, context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message."); - fll_program_print_help_option(output, context, f_console_standard_short_dark, f_console_standard_long_dark, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on dark backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_light, f_console_standard_long_light, f_console_symbol_short_disable, f_console_symbol_long_disable, " Output using colors that show up better on light backgrounds."); - fll_program_print_help_option(output, context, f_console_standard_short_no_color, f_console_standard_long_no_color, f_console_symbol_short_disable, f_console_symbol_long_disable, "Do not output in color."); - fll_program_print_help_option(output, context, f_console_standard_short_quiet, f_console_standard_long_quiet, f_console_symbol_short_disable, f_console_symbol_long_disable, " Decrease verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_normal, f_console_standard_long_normal, f_console_symbol_short_disable, f_console_symbol_long_disable, " Set verbosity to normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_verbose, f_console_standard_long_verbose, f_console_symbol_short_disable, f_console_symbol_long_disable, " Increase verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output."); - fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number."); + fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); + fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); + fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color."); + fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output."); + fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number."); fprintf(output.stream, "%c", f_string_eol_s[0]); - fll_program_print_help_option(output, context, status_code_short_is_fine, status_code_long_is_fine, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print F_true if the error code is not an error, F_false otherwise."); - fll_program_print_help_option(output, context, status_code_short_is_warning, status_code_long_is_warning, f_console_symbol_short_enable, f_console_symbol_long_enable, "Print F_true if the error code is a warning, F_false otherwise."); - fll_program_print_help_option(output, context, status_code_short_is_error, status_code_long_is_error, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print F_true if the error code is an error, F_false otherwise."); - fll_program_print_help_option(output, context, status_code_short_number, status_code_long_number, f_console_symbol_short_enable, f_console_symbol_long_enable, " Convert status code name to number."); + fll_program_print_help_option(output, context, status_code_short_is_fine, status_code_long_is_fine, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print F_true if the error code is not an error, F_false otherwise."); + fll_program_print_help_option(output, context, status_code_short_is_warning, status_code_long_is_warning, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print F_true if the error code is a warning, F_false otherwise."); + fll_program_print_help_option(output, context, status_code_short_is_error, status_code_long_is_error, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print F_true if the error code is an error, F_false otherwise."); + fll_program_print_help_option(output, context, status_code_short_number, status_code_long_number, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Convert status code name to number."); fll_program_print_help_usage(output, context, status_code_name, "status code(s)"); @@ -117,9 +117,9 @@ extern "C" { if (data->parameters[status_code_parameter_is_error].result == f_console_result_found) { if (data->parameters[status_code_parameter_is_warning].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, status_code_long_is_error); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, status_code_long_is_error); fl_color_print(data->error.to.stream, data->context.set.error, "' cannot be used with the parameter "); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, status_code_long_is_warning); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, status_code_long_is_warning); fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol_s[0]); status_code_delete_data(data); @@ -127,9 +127,9 @@ extern "C" { } else if (data->parameters[status_code_parameter_is_fine].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, status_code_long_is_error); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, status_code_long_is_error); fl_color_print(data->error.to.stream, data->context.set.error, "' cannot be used with the parameter "); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, status_code_long_is_fine); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, status_code_long_is_fine); fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol_s[0]); status_code_delete_data(data); @@ -138,9 +138,9 @@ extern "C" { } else if (data->parameters[status_code_parameter_is_warning].result == f_console_result_found && data->parameters[status_code_parameter_is_fine].result == f_console_result_found) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, status_code_long_is_warning); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, status_code_long_is_warning); fl_color_print(data->error.to.stream, data->context.set.error, "' cannot be used with the parameter "); - fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, status_code_long_is_fine); + fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable_s, status_code_long_is_fine); fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol_s[0]); status_code_delete_data(data); diff --git a/level_3/status_code/c/status_code.h b/level_3/status_code/c/status_code.h index eda335b..f498f26 100644 --- a/level_3/status_code/c/status_code.h +++ b/level_3/status_code/c/status_code.h @@ -46,7 +46,7 @@ extern "C" { #define status_code_major_version "0" #define status_code_minor_version "5" #define status_code_micro_version "3" - #define status_code_version status_code_major_version "." status_code_minor_version "." status_code_micro_version + #define status_code_version status_code_major_version f_string_ascii_period status_code_minor_version f_string_ascii_period status_code_micro_version #endif // _di_status_code_version_ #ifndef _di_status_code_name_ @@ -84,15 +84,15 @@ extern "C" { #define status_code_console_parameter_t_initialize \ { \ - f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_normal, f_console_standard_long_normal, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(status_code_short_is_fine, status_code_long_is_fine, 0, 0, f_console_type_normal), \ f_console_parameter_t_initialize(status_code_short_is_warning, status_code_long_is_warning, 0, 0, f_console_type_normal), \ f_console_parameter_t_initialize(status_code_short_is_error, status_code_long_is_error, 0, 0, f_console_type_normal), \ diff --git a/level_3/status_code/data/build/settings b/level_3/status_code/data/build/settings index 539c2dd..587bc82 100644 --- a/level_3/status_code/data/build/settings +++ b/level_3/status_code/data/build/settings @@ -19,7 +19,7 @@ build_compiler gcc build_indexer ar build_language c build_libraries -lc -build_libraries-individual -lfll_error -lfll_program -lfll_status -lfl_color -lfl_console -lfl_conversion -lfl_status -lfl_string -lfl_utf -lf_console -lf_conversion -lf_file -lf_memory -lf_pipe -lf_print -lf_utf +build_libraries-individual -lfll_error -lfll_program -lfll_status -lfl_color -lfl_console -lfl_conversion -lfl_status -lfl_string -lfl_utf -lf_color -lf_console -lf_conversion -lf_file -lf_memory -lf_path -lf_pipe -lf_print -lf_string -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_sources_library status_code.c private-status_code.c